  :root{
    --kraft:#efe4cc; --kraft-dark:#e2d3b3; --paper:#fffaf0; --ink:#2a2622; --sub:#5d5347;
    --steel:#3b4148; --steel-dark:#262a2f; --steel-light:#59616b;
    --yellow:#f2b705; --yellow-soft:#fff1c2; --brick:#b5452b; --brick-dark:#8e3420;
    --green:#2f6b3f; --ok:#1f7a3a; --ok-soft:#e2f4e6; --ng:#b3261e; --ng-soft:#fbe4e2;
    --line:#cdbb97;
    --fs:20px;
    --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--steel-dark) 14px 28px);
    --head:"Dela Gothic One","Zen Maru Gothic","Noto Sans CJK JP",sans-serif;
  }
  body.size-xl{ --fs:24px; }
  *{ box-sizing:border-box; }
  html{ font-size:var(--fs); }
  body{
    margin:0; color:var(--ink); font-weight:500; line-height:1.75;
    font-family:"Zen Maru Gothic","Hiragino Maru Gothic ProN","Meiryo","Noto Sans CJK JP",sans-serif;
    background-color:var(--kraft);
    background-image:radial-gradient(rgba(120,90,40,.07) 1px, transparent 1.2px);
    background-size:6px 6px;
  }
  a{ color:var(--brick-dark); }
  .wrap{ max-width:900px; margin:0 auto; padding:0 20px; }

  /* ===== header: factory sign ===== */
  .site-header{ background:var(--steel); color:#fff; position:relative; }
  .site-header::after{ content:""; display:block; height:10px; background:var(--hazard); }
  .site-header .wrap{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:14px; padding-bottom:12px; flex-wrap:wrap; }
  .logo{ display:flex; align-items:center; gap:12px; color:#fff; text-decoration:none; }
  .logo-name{ font-family:var(--head); font-size:1.5rem; line-height:1.1; letter-spacing:.04em; }
  .logo-name small{ display:block; font-family:"Zen Maru Gothic",sans-serif; font-weight:700; font-size:.58rem; letter-spacing:.02em; color:var(--yellow); margin-top:4px; }
  .gnav{ display:flex; gap:6px; flex-wrap:wrap; }
  .gnav a{ text-decoration:none; color:#fff; font-size:.78rem; font-weight:700; padding:6px 12px; border-radius:6px; border:2px solid var(--steel-light); background:var(--steel-dark); }
  .gnav a[aria-current]{ background:var(--yellow); border-color:var(--yellow); color:var(--ink); }

  .crumbs{ font-size:.72rem; color:var(--sub); margin:18px 0 6px; }
  .crumbs a{ color:var(--sub); }

  /* ===== title + product label ===== */
  .line-tag{ display:inline-flex; align-items:center; gap:8px; background:var(--brick); color:#fff; font-weight:900; font-size:.72rem; padding:3px 12px; border-radius:4px; letter-spacing:.06em; }
  .line-tag .dot{ width:8px; height:8px; border-radius:50%; background:var(--yellow); box-shadow:0 0 0 3px rgba(242,183,5,.35); }
  h1{ font-family:var(--head); font-weight:400; font-size:1.75rem; line-height:1.4; margin:8px 0 12px; letter-spacing:.02em; }
  .lead{ margin:0 0 18px; }

  .label{ background:var(--paper); border:3px solid var(--ink); border-radius:6px; margin:0 0 22px; position:relative; box-shadow:5px 5px 0 rgba(42,38,34,.18); }
  .label-head{ display:flex; justify-content:space-between; align-items:center; background:var(--ink); color:var(--paper); padding:6px 14px; font-weight:900; font-size:.78rem; letter-spacing:.12em; }
  .label-head .lot{ margin-right:96px; font-family:ui-monospace,Menlo,Consolas,monospace; font-weight:700; letter-spacing:.04em; color:var(--yellow); }
  .label dl{ display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); margin:0; }
  .label dl > div{ padding:10px 14px; border-right:1px dashed var(--line); border-bottom:1px dashed var(--line); }
  .label dt{ font-size:.66rem; color:var(--sub); font-weight:700; }
  .label dd{ margin:0; font-weight:900; white-space:nowrap; }
  .fresh{ position:absolute; right:-10px; top:-18px; transform:rotate(8deg); background:var(--yellow); color:var(--ink); font-weight:900; font-size:.7rem; padding:6px 12px; border:3px solid var(--ink); border-radius:999px; }

  /* ===== control panel ===== */
  .panel{ background:var(--steel); color:#fff; border-radius:12px; padding:18px; margin:0 0 12px; border:4px solid var(--steel-dark); box-shadow:inset 0 0 0 2px var(--steel-light); position:relative; }
  .panel::before, .panel::after{ content:""; position:absolute; top:10px; width:10px; height:10px; border-radius:50%; background:radial-gradient(circle at 35% 35%, #9aa3ad, #4a5058); }
  .panel::before{ left:10px; } .panel::after{ right:10px; }
  .panel h2{ margin:0 0 12px; font-size:.95rem; color:var(--yellow); letter-spacing:.08em; text-align:center; }
  .btn-row{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
  @media (max-width:560px){ .btn-row{ grid-template-columns:1fr; } }
  .btn{
    display:flex; align-items:center; justify-content:center; gap:10px; text-align:center;
    min-height:68px; padding:12px 16px; border-radius:10px; border:0;
    background:var(--yellow); color:var(--ink); font:inherit; font-weight:900; font-size:.95rem;
    cursor:pointer; text-decoration:none; line-height:1.35;
    box-shadow:0 5px 0 #a87e00; transform:translateY(0); transition:transform .06s, box-shadow .06s;
  }
  .btn:hover{ background:#ffc61f; }
  .btn:active{ transform:translateY(4px); box-shadow:0 1px 0 #a87e00; }
  .btn.red{ background:var(--brick); color:#fff; box-shadow:0 5px 0 var(--brick-dark); }
  .btn.red:hover{ background:#c64f33; }
  .btn.red:active{ box-shadow:0 1px 0 var(--brick-dark); }
  .btn.white{ background:var(--paper); box-shadow:0 5px 0 #b9ab90; }
  .btn.white:active{ box-shadow:0 1px 0 #b9ab90; }
  .btn small{ display:block; font-weight:700; font-size:.66rem; opacity:.85; }
  .btn svg{ flex:none; }
  .size-toggle{ display:flex; align-items:center; justify-content:center; gap:8px; margin-top:16px; font-size:.8rem; flex-wrap:wrap; }
  .size-toggle button{ font:inherit; font-weight:900; border:2px solid var(--steel-light); background:var(--steel-dark); color:#fff; border-radius:8px; padding:6px 16px; cursor:pointer; min-height:44px; }
  .size-toggle button[aria-pressed="true"]{ background:var(--paper); color:var(--ink); border-color:var(--yellow); box-shadow:0 0 0 3px rgba(242,183,5,.5); }
  .notice{ font-size:.72rem; color:var(--yellow-soft); margin:10px 0 0; text-align:center; min-height:1em; }

  /* ad placeholder — far from controls */
  .ad-slot{ margin:44px 0; padding:22px; border:1px dashed #a99a7c; border-radius:8px; text-align:center; color:#8f826a; font-size:.7rem; background:rgba(255,250,240,.6); }
  .ad-slot b{ display:block; font-size:.62rem; letter-spacing:.1em; }

  /* ===== section heading: sign board ===== */
  h2.sec{ display:flex; align-items:center; gap:12px; font-family:var(--head); font-weight:400; font-size:1.25rem; margin:8px 0 16px; letter-spacing:.04em; }
  h2.sec::before{ content:""; width:34px; height:20px; flex:none; background:var(--hazard); border-radius:3px; }

  /* ===== conveyor ===== */
  .conveyor{ position:relative; padding:6px 0 4px; }
  .conveyor::before{ content:""; position:absolute; left:28px; top:0; bottom:0; width:14px; border-radius:7px;
    background:repeating-linear-gradient(180deg, var(--steel) 0 10px, var(--steel-light) 10px 14px); opacity:.55; }

  /* ===== question = product card ===== */
  .q{ position:relative; background:var(--paper); border:2px solid var(--ink); border-radius:8px; padding:18px 20px 16px 20px; margin:0 0 20px 60px; box-shadow:4px 4px 0 rgba(42,38,34,.15); }
  .q::before{ /* hole punch of shipping tag */ content:""; position:absolute; left:-36px; top:26px; width:30px; height:30px; border-radius:50%; background:var(--yellow); border:3px solid var(--ink); }
  .q-no{ display:inline-flex; align-items:baseline; gap:6px; font-family:var(--head); font-size:.95rem; background:var(--ink); color:var(--yellow); padding:2px 12px; border-radius:4px; letter-spacing:.06em; }
  .q-no small{ font-family:"Zen Maru Gothic",sans-serif; font-weight:700; font-size:.6rem; color:#fff; }
  .q-text{ font-size:1.18rem; font-weight:900; margin:10px 0 14px; line-height:1.55; }
  .choices{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
  .choice{
    width:100%; display:flex; align-items:center; gap:14px; text-align:left;
    min-height:62px; padding:10px 16px; border-radius:8px;
    border:2px solid var(--line); background:#fff; color:var(--ink);
    font:inherit; font-size:1.05rem; font-weight:700; cursor:pointer;
  }
  .choice:hover:not([disabled]){ border-color:var(--ink); background:var(--yellow-soft); }
  .choice .mark{ flex:none; width:42px; height:42px; border-radius:6px; display:grid; place-items:center; background:var(--steel); color:#fff; font-weight:900; }
  .choice[disabled]{ cursor:default; }
  .choice.correct{ border-color:var(--ok); background:var(--ok-soft); }
  .choice.correct .mark{ background:var(--ok); }
  .choice.wrong{ border-color:var(--ng); background:var(--ng-soft); }
  .choice.wrong .mark{ background:var(--ng); }
  .feedback{ display:flex; align-items:center; gap:12px; font-weight:900; font-size:1.15rem; margin:12px 0 0; min-height:0; }
  .feedback:empty{ display:none; }
  .feedback.ok{ color:var(--ok); } .feedback.ng{ color:var(--ng); }
  details.ans{ margin-top:12px; border-top:2px dashed var(--line); padding-top:10px; }
  details.ans summary{ cursor:pointer; font-weight:900; color:var(--brick-dark); font-size:.9rem; min-height:44px; display:flex; align-items:center; }
  details.ans p{ margin:6px 0 0; }
  details.ans .a{ font-weight:900; color:var(--ok); }

  /* inspection stamp */
  .stamp{ position:relative; flex:none; margin-left:auto; width:96px; height:96px; border-radius:50%;
    border:4px solid currentColor; box-shadow:inset 0 0 0 2px #fff, inset 0 0 0 4px currentColor;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; text-align:center;
    font-family:"Zen Maru Gothic","Noto Sans CJK JP",sans-serif; font-weight:900; font-size:1.55rem; line-height:1; letter-spacing:.04em;
    transform:rotate(-10deg) scale(1.6); opacity:0; pointer-events:none; }
  .stamp small{ display:block; font-family:"Zen Maru Gothic","Noto Sans CJK JP",sans-serif; font-weight:700; font-size:.72rem; letter-spacing:.12em; }
  .stamp{ white-space:nowrap; } .stamp.ok{ color:#c0261f; } .stamp.ng{ color:#4a5560; font-size:1.3rem; }
  .stamp.show{ animation:stamp .35s cubic-bezier(.2,1.6,.4,1) forwards; }
  @keyframes stamp{ to{ transform:rotate(-10deg) scale(1); opacity:1; } }
  @media (prefers-reduced-motion:reduce){ .stamp.show{ animation:none; transform:rotate(-10deg); opacity:1; } }

  /* ===== score: shipping slip ===== */
  .score{ background:var(--paper); border:3px solid var(--ink); border-radius:8px; padding:0 0 20px; text-align:center; margin:8px 0 0 60px; overflow:hidden; }
  .score .score-head{ background:var(--hazard); height:12px; }
  .score .ttl{ font-family:var(--head); font-size:1.1rem; margin:16px 0 0; }
  .score .big{ font-family:var(--head); font-size:2.2rem; line-height:1.3; color:var(--brick); }
  .score button{ margin-top:12px; }

  /* ===== tips: clipboard ===== */
  .tips{ background:var(--paper); border:2px solid var(--ink); border-radius:8px; padding:30px 20px 20px; position:relative; margin-top:6px; }
  .tips::before{ content:""; position:absolute; left:50%; top:-14px; transform:translateX(-50%); width:120px; height:26px; border-radius:6px; background:linear-gradient(#8a919a,#5b626b); border:2px solid var(--ink); }
  .tips h3{ margin:14px 0 4px; font-size:1rem; color:var(--brick-dark); }
  .tips h3:first-child{ margin-top:0; }
  .tips p{ margin:0; }
  .related{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; list-style:none; padding:0; margin:0; }
  .related a{ display:block; background:var(--paper); border:2px solid var(--ink); border-left:12px solid var(--steel); border-radius:6px; padding:12px 14px; text-decoration:none; color:var(--ink); font-weight:900; }
  .related a:hover{ border-left-color:var(--yellow); }
  .related a small{ display:block; color:var(--sub); font-weight:700; font-size:.68rem; }
  .terms-box{ background:var(--paper); border:2px solid var(--ink); border-radius:8px; padding:16px 20px; font-size:.9rem; }
  .terms-box h3{ margin:0 0 4px; font-size:.95rem; color:var(--brick-dark); }
  .terms-box ul{ margin:0 0 14px; padding-left:1.3em; }
  .terms-box li{ margin:0 0 4px; }
  .terms-box p{ margin:0; }
  .site-footer{ margin-top:48px; background:var(--steel-dark); color:#d9d4c8; padding:0 0 22px; font-size:.7rem; }
  .site-footer::before{ content:""; display:block; height:10px; background:var(--hazard); margin-bottom:22px; }

  .print-only{ display:none; }
  .staff-sheet{ display:none; }
  @media print{
    body.print-staff main > *:not(.staff-sheet){ display:none !important; }
    body.print-staff .site-header, body.print-staff .site-footer{ display:none !important; }
    body.print-staff .staff-sheet{ display:block; }
    .st-title{ font-size:17pt; font-weight:900; border-bottom:1.5pt solid #000; padding-bottom:3pt; margin-bottom:6pt; }
    .st-title span{ font-size:11pt; font-weight:700; }
    .st-guide{ font-size:10pt; margin:0 0 6pt; }
    .st-q{ border:1pt solid #999; border-radius:4pt; padding:4pt 8pt; margin:0 0 5pt; break-inside:avoid; font-size:10.5pt; line-height:1.45; }
    .st-head{ font-weight:900; font-size:12pt; }
    .st-no{ border:1.2pt solid #000; padding:0 5pt; margin-right:6pt; font-size:10pt; }
    .st-a{ margin-top:2pt; } .st-a b{ font-size:12pt; }
    .st-e{ color:#333; }
    .st-talk{ background:#eee; padding:2pt 6pt; margin-top:3pt; border-radius:3pt; }
  }


  /* ===== display (projector) mode: factory board ===== */
  .stage{ position:fixed; inset:0; z-index:100; background:#1f3a2c; color:#fff; display:none; flex-direction:column; padding:3vh 4vw; border:14px solid #6b4a2b; box-shadow:inset 0 0 0 4px #4b321c; }
  .stage.open{ display:flex; }
  .stage-top{ display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:clamp(16px,2.4vh,26px); margin-bottom:2vh; }
  .stage-top .pos{ font-family:var(--head); background:var(--yellow); color:var(--ink); padding:4px 20px; border-radius:6px; }
  .stage-top .brand{ font-family:var(--head); opacity:.7; }
  .stage-close{ font:inherit; font-weight:700; background:transparent; color:#fff; border:2px solid rgba(255,255,255,.5); border-radius:8px; padding:8px 18px; cursor:pointer; }
  .stage-body{ flex:1; min-height:0; overflow:auto; display:flex; flex-direction:column; justify-content:center; gap:2.6vh; padding:1vh 0; }
  .stage-q{ font-size:clamp(26px,5.4vh,64px); font-weight:900; line-height:1.35; }
  .stage-choices{ display:grid; gap:2vh; list-style:none; margin:0; padding:0; }
  .stage-choices li{ font-size:clamp(22px,4.4vh,52px); font-weight:700; background:rgba(255,255,255,.07); border:3px dashed rgba(255,255,255,.3); border-radius:12px; }
  .stage-choice{ width:100%; display:flex; align-items:center; gap:2vw; padding:1.4vh 2vw; background:none; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer; border-radius:10px; }
  .stage-choice:hover:not([disabled]){ background:rgba(255,255,255,.12); }
  .stage-choice[disabled]{ cursor:default; }
  .stage-choices li.miss{ background:#b3261e; border:3px solid #ff8a80; }
  .stage-exp .res{ display:block; font-size:1.25em; margin-bottom:.4vh; }
  .stage-exp .res.ok{ color:var(--yellow); } .stage-exp .res.ng{ color:#ffb4ab; }
  .stage-choices .mark{ flex:none; width:1.6em; height:1.6em; border-radius:10px; display:grid; place-items:center; background:#fff; color:#1f3a2c; font-weight:900; }
  .stage-choices li.hit{ background:var(--yellow); color:var(--ink); border:3px solid var(--yellow); }
  .stage-choices li.dim{ opacity:.35; }
  .stage-exp{ font-size:clamp(18px,3.2vh,34px); background:rgba(255,255,255,.1); border-radius:10px; padding:1.4vh 2vw; display:none; }
  .stage-exp.show{ display:block; }
  .stage-nav{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
  .stage-nav button{ font:inherit; font-weight:900; font-size:clamp(18px,3vh,30px); border:0; border-radius:10px; padding:1.4vh 3vw; cursor:pointer; min-height:56px; }
  .stage-nav .reveal{ background:var(--yellow); color:var(--ink); }
  .stage-nav .prev, .stage-nav .next{ background:#fff; color:#1f3a2c; }
  .stage-nav button:disabled{ opacity:.4; cursor:default; }
  .stage-hint{ text-align:center; font-size:clamp(12px,1.6vh,16px); opacity:.6; margin-top:1vh; }

  @media (max-width:560px){
    html{ font-size:calc(var(--fs) - 2px); }
    h1{ font-size:1.45rem; }
    .logo-name{ font-size:1.25rem; }
    .q, .score{ margin-left:0; }
    .conveyor::before, .q::before{ display:none; }
    .stamp{ width:80px; height:80px; font-size:1.3rem; } .stamp.ng{ font-size:1.08rem; } .stamp small{ font-size:.6rem; }
  }

  /* ===== print (A4) ===== */
  @media print{
    @page{ size:A4; margin:14mm 14mm 12mm; }
    html{ font-size:13.5pt; }
    body{ background:#fff; }
    .site-header, .crumbs, .panel, .terms, .ad-slot, .tips, .related-wrap, .site-footer, .score, details.ans, .feedback, .stage, .lead, .label, .line-tag, h2.sec.screen, .stamp{ display:none !important; }
    body:not(.print-staff) .print-only{ display:block; }
    .wrap{ max-width:none; padding:0; }
    h1{ font-size:19pt; margin:0 0 4pt; }
    .print-brand{ font-family:var(--head); font-size:10pt; margin-bottom:2pt; }
    .name-line{ display:flex; justify-content:space-between; font-size:11pt; border-bottom:1.5pt solid #000; padding-bottom:4pt; margin-bottom:10pt; }
    .conveyor::before, .q::before{ display:none; }
    .q{ display:grid; grid-template-columns:44pt 1fr; column-gap:6pt; align-items:start; border:0; border-bottom:1pt dashed #999; border-radius:0; box-shadow:none; padding:6pt 0; margin:0; break-inside:avoid; background:none; }
    .q > *{ grid-column:2; }
    .q > .q-no{ grid-column:1; grid-row:1 / span 2; justify-self:start; margin-top:2pt; }
    .q-no{ background:none; color:#000; border:1.5pt solid #000; padding:0 5pt; font-size:10pt; white-space:nowrap; }
    .q-no small{ display:none; }
    .q-text{ font-size:13.5pt; margin:0 0 3pt; line-height:1.45; }
    .choices{ grid-template-columns:repeat(3,1fr); gap:6pt; }
    .choice{ min-height:0; padding:3pt 6pt; border:0; font-size:13pt; gap:6pt; background:none; }
    .choice .mark{ width:22pt; height:22pt; border:1.5pt solid #000; background:#fff; color:#000; border-radius:50%; }
    .answer-sheet{ break-before:page; }
    .answer-sheet h2{ font-size:17pt; margin:0 0 8pt; }
    .answer-sheet ol{ margin:0; padding-left:1.4em; }
    .answer-sheet li{ margin:0 0 6pt; font-size:12pt; break-inside:avoid; }
    .answer-sheet .a{ font-weight:900; }
    .print-foot{ font-size:9pt; color:#555; margin-top:10pt; line-height:1.5; }
    .pdf-terms{ border:1pt solid #666; border-radius:3pt; padding:4pt 7pt; margin-top:5pt; font-size:8.5pt; line-height:1.5; color:#222; }
    .pdf-terms b{ display:block; font-size:9.5pt; margin-bottom:1pt; }
    .pdf-terms div{ margin-top:1pt; }
    .pdf-terms .t-ok, .pdf-terms .t-ng{ font-weight:900; margin-right:5pt; }

  }

  /* ===== smartphone tweaks ===== */
  @media (max-width:560px){
    .site-header .wrap{ flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:10px; padding-bottom:10px; }
    .gnav{ flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; margin:0 -20px; padding:0 20px 4px;
      -webkit-mask-image:linear-gradient(90deg,#000 85%,transparent); mask-image:linear-gradient(90deg,#000 85%,transparent); }
    .gnav::-webkit-scrollbar{ display:none; }
    .gnav a{ flex:none; white-space:nowrap; }
  }

  /* ===== list pages (category / month) ===== */
  .filters{ background:var(--paper); border:2px solid var(--ink); border-radius:8px; padding:12px 16px; margin:0 0 14px; display:grid; gap:10px; }
  .filter-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .filter-row > span{ font-weight:900; font-size:.8rem; min-width:4.5em; }
  .filter-group{ display:flex; gap:6px; flex-wrap:wrap; }
  .filter-group button{ font:inherit; font-weight:700; font-size:.8rem; border:2px solid var(--line); background:#fff; color:var(--ink); border-radius:999px; padding:4px 14px; min-height:40px; cursor:pointer; }
  .filter-group button[aria-pressed="true"]{ background:var(--ink); color:var(--yellow); border-color:var(--ink); }
  .list-count{ font-weight:700; color:var(--sub); font-size:.8rem; margin:0 0 10px; }
  .list-empty{ background:var(--paper); border:2px dashed var(--line); border-radius:8px; padding:18px; text-align:center; }
  .list-more{ text-align:center; margin:18px 0 0; }
  .list-more .btn{ display:inline-flex; min-width:240px; }
  .list-grid li[hidden]{ display:none; }
  .month-nav{ display:flex; flex-wrap:wrap; gap:6px; list-style:none; padding:0; margin:0 0 16px; }
  .month-nav a{ display:block; text-decoration:none; color:var(--ink); background:var(--paper); border:2px solid var(--line); border-radius:6px; padding:2px 10px; font-weight:900; font-size:.8rem; }
  .month-nav a[aria-current]{ background:var(--yellow); border-color:var(--ink); }
  .sub-title{ font-family:var(--head); font-weight:400; font-size:1.1rem; margin:34px 0 12px; }
  @media (max-width:560px){
    .filter-row{ align-items:flex-start; flex-direction:column; gap:4px; }
    .list-grid .item .thumb, .month-list .item .thumb{ height:64px; font-size:1.05rem; }
  }
  /* PDFが2枚に収まらない素材用(build.py が自動で付けます) */
  @media print{
    body.compact .q{ padding:4pt 0; }
    body.compact .q-text{ font-size:12.5pt; line-height:1.4; }
    body.compact .choice{ font-size:12.5pt; }
    body.compact h1{ font-size:17pt; }
    body.compact2 .q{ padding:3pt 0; }
    body.compact2 .q-text{ font-size:12pt; line-height:1.35; margin-bottom:2pt; }
    body.compact2 .choice{ font-size:12pt; }
    body.compact2 .choice .mark{ width:20pt; height:20pt; }
    body.compact2 h1{ font-size:16pt; }
    body.compact2 .name-line{ margin-bottom:6pt; }
  }
  .list-more .btn[hidden], .list-count[hidden]{ display:none; }

  /* ===== 間違い探し ===== */
  .spot-guide{ font-weight:900; font-size:1.05rem; margin:0 0 10px; }
  .spot-guide .print-inline{ display:none; }
  .spot-game{ background:var(--paper); border:3px solid var(--ink); border-radius:8px; padding:12px; box-shadow:4px 4px 0 rgba(42,38,34,.15); }
  .spot-bar{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; font-weight:900; margin:0 0 10px; }
  .spot-count{ font-family:var(--head); font-weight:400; font-size:1.2rem; }
  .spot-count b{ color:var(--brick); font-size:1.5rem; font-weight:400; }
  .spot-slots{ display:flex; gap:6px; }
  .spot-slots span{ width:30px; height:30px; border-radius:50%; border:3px dashed var(--line); background:#fff; }
  .spot-slots span.on{ border:5px solid #d21e1e; }
  .spot-slots span.on.show{ border-color:#1c5fbf; }
  .spot-puzzle{ display:grid; grid-template-columns:1fr 1fr; gap:6px; background:var(--ink); border:3px solid var(--ink); border-radius:4px; }
  .spot-scene{ position:relative; cursor:crosshair; overflow:hidden; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
  .spot-scene img{ display:block; width:100%; height:auto; -webkit-user-select:none; user-select:none; -webkit-user-drag:none; pointer-events:none; }
  .spot-ring{ position:absolute; border:5px solid #d21e1e; border-radius:50%; box-shadow:0 0 0 3px rgba(255,255,255,.9), inset 0 0 0 3px rgba(255,255,255,.7); pointer-events:none; animation:spot-in .35s cubic-bezier(.2,1.5,.4,1); }
  .spot-ring b{ position:absolute; left:-4px; top:-4px; width:1.5em; height:1.5em; border-radius:50%; display:grid; place-items:center; background:#d21e1e; color:#fff; font-size:.75rem; line-height:1; border:2px solid #fff; }
  .spot-ring.show{ border-color:#1c5fbf; border-style:dashed; }
  .spot-ring.show b{ background:#1c5fbf; }
  @keyframes spot-in{ from{ transform:scale(1.6); opacity:0; } to{ transform:scale(1); opacity:1; } }
  .spot-miss{ position:absolute; transform:translate(-50%,-50%); width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:rgba(60,70,80,.7); color:#fff; font-weight:900; font-size:1.2rem; pointer-events:none; animation:spot-fade 1.4s forwards; }
  @keyframes spot-fade{ 0%,60%{ opacity:1; } 100%{ opacity:0; } }
  .spot-hint{ position:absolute; border:4px dashed #f2b705; background:rgba(242,183,5,.22); border-radius:16px; pointer-events:none; animation:spot-pulse 1.2s ease-in-out 3; }
  @keyframes spot-pulse{ 50%{ background:rgba(242,183,5,.05); } }
  @media (prefers-reduced-motion:reduce){ .spot-ring, .spot-hint, .spot-miss{ animation:none; } }
  .spot-msg{ min-height:2.2em; margin:12px 0 4px; font-size:1.05rem; }
  .spot-msg b{ display:block; font-size:1.15rem; }
  .spot-msg span{ display:block; color:var(--sub); font-weight:700; }
  .spot-msg.ok b{ color:#c0201b; }
  .spot-msg.show b{ color:#1c5fbf; }
  .spot-tools{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:8px; }
  .spot-tools .btn{ min-height:56px; font-size:.9rem; border:2px solid var(--ink); }
  .spot-game + .print-only, .spot-game ~ .score{ margin-top:16px; }
  .spot-game ~ .score{ margin-left:0; }
  @media (max-width:560px){
    .spot-game{ padding:8px; margin:0 -12px; }
    .spot-puzzle{ gap:3px; }
    .spot-ring{ border-width:3px; }
    .spot-ring b{ font-size:.6rem; }
    .spot-tools{ grid-template-columns:1fr; }
  }
  .spot-levels{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 12px; font-weight:900; }
  .spot-levels a, .spot-levels span{ display:inline-block; padding:8px 14px; border:2px solid var(--ink); border-radius:6px; background:#fff; color:var(--ink); text-decoration:none; }
  .spot-levels span[aria-current]{ background:var(--yellow); }
  .spot-levels a:hover{ background:var(--paper); }
  @media print{ .spot-levels{ display:none; } }
  /* サムネイル画像(一覧のカード) */
  .item .thumb.has-img{ padding:0; overflow:hidden; }
  .item .thumb.has-img img{ width:100%; height:100%; object-fit:cover; display:block; }

  /* 画面に映すモード(間違い探し) */
  .spot-stage .stage-body{ justify-content:flex-start; align-items:center; gap:1.2vh; background:none; border:0; box-shadow:none; padding:0; overflow:hidden; }
  .spot-stage .spot-puzzle{ width:min(100%, calc((100vh - 330px) * 1.5)); flex:none; }
  .spot-stage .spot-ring{ border-width:7px; }
  .spot-stage .spot-ring b{ font-size:clamp(14px,2.2vh,24px); }
  .spot-stage .spot-msg{ width:100%; text-align:center; margin:0; font-size:clamp(15px,2.2vh,24px); line-height:1.6;
    min-height:calc(clamp(20px,3.4vh,38px) * 1.5 + clamp(15px,2.2vh,24px) * 1.6 * 2); flex:none; }   /* 見出し1行+説明2行ぶんを先に空けておく */
  .spot-stage .spot-msg b{ font-size:clamp(20px,3.4vh,38px); }
  .spot-stage .spot-msg span{ color:#e9efe9; }
  .spot-stage .spot-msg.ok b{ color:#ffd84d; } .spot-stage .spot-msg.show b{ color:#9fd0ff; }
  .spot-stage .stage-top .pos b{ color:var(--brick); }

  @media print{
    .spot-bar, .spot-tools, .spot-msg, .spot-game .spot-ring, .spot-miss, .spot-hint{ display:none !important; }
    .spot-guide{ font-size:13pt; margin:0 0 6pt; }
    .spot-guide .screen-only{ display:none; }
    .spot-guide .print-inline{ display:inline; }
    body.print-staff .spot-guide{ display:none; }
    .spot-game{ border:0; padding:0; background:none; box-shadow:none; }
    .spot-puzzle{ gap:4mm; background:none; border:0; break-inside:avoid; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    .spot-scene{ border:1.2pt solid #000; }
    .spot-ring{ animation:none; border-width:3pt; box-shadow:0 0 0 1.5pt #fff; }
    .spot-ring b{ font-size:9pt; }
    .spot-write{ margin-top:8pt; }
    .spot-write p{ margin:0 0 2pt; font-weight:900; font-size:12pt; }
    .spot-write ol{ margin:0; padding-left:1.6em; }
    .spot-write li{ height:24pt; border-bottom:1pt solid #666; font-size:12pt; }
    .answer-sheet .spot-puzzle{ margin-bottom:8pt; }
    .spot-answers li{ font-size:11.5pt; line-height:1.55; }
    .staff-sheet .spot-puzzle{ width:38%; margin:0 auto 4pt; }
    .answer-sheet.many .spot-puzzle{ width:80%; margin:0 auto 6pt; }
    .answer-sheet.many .spot-answers li{ font-size:10.5pt; line-height:1.45; }
    .staff-sheet .st-grid{ display:grid; grid-template-columns:1fr 1fr; gap:0 4mm; align-items:start; }
    .staff-sheet .st-grid .st-q{ break-inside:avoid; margin-bottom:4pt; font-size:10pt; line-height:1.4; }
  }

  /* ===== 耳クイズ(問題は声だけ・画面と用紙には選択肢だけ) ===== */
  .mimi-only{ display:none; }
  body.mimi .mimi-only{ display:inline; }
  body.mimi .q .mimi-text{ display:none; }
  body.mimi .q.show-text .mimi-text{ display:block; }
  .listen-row{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin:10px 0 14px; }
  .listen{ font:inherit; font-weight:900; font-size:1.1rem; display:inline-flex; align-items:center; gap:10px; min-height:56px; padding:8px 24px 8px 14px; border:3px solid var(--ink); border-radius:999px; background:var(--yellow); color:var(--ink); cursor:pointer; box-shadow:0 4px 0 var(--ink); }
  .listen .ico{ display:inline-grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--ink); color:var(--yellow); font-size:.9rem; }
  .listen:active{ transform:translateY(3px); box-shadow:0 1px 0 var(--ink); }
  .listen.playing{ background:var(--brick); color:#fff; }
  .listen.playing .ico{ animation:mimi-pulse 1s ease-in-out infinite; }
  .listen-note{ color:var(--sub); font-size:.9rem; font-weight:700; }
  @keyframes mimi-pulse{ 50%{ transform:scale(1.18); } }
  .stage-listen:not([hidden]){ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:1.2vh 2vw; font-size:clamp(20px,3.4vh,40px); font-weight:900; margin:0 0 2.4vh; }
  .stage-listen .ear{ font-size:1.8em; }
  .stage-listen.playing .ear{ animation:mimi-pulse 1s ease-in-out infinite; }
  .stage-listen button{ font:inherit; font-size:.7em; font-weight:900; padding:.4em 1.1em; border-radius:10px; cursor:pointer; border:2px solid rgba(255,255,255,.6); background:transparent; color:#fff; }
  .stage-listen #stage-replay{ background:var(--yellow); color:var(--ink); border-color:var(--yellow); }
  .stage-listen #stage-sub[aria-pressed="true"]{ background:#fff; color:var(--ink); }
  @media print{
    body.mimi .q .mimi-text, body.mimi .listen-row{ display:none !important; }
    body.mimi .q{ grid-template-columns:44pt 1fr; padding:8pt 0; }
    body.mimi .choice{ font-size:15pt; }
    .answer-sheet .aq{ font-size:10.5pt; color:#333; }
  }
  body.mimi .stage-q{ font-size:clamp(20px,3.6vh,44px); }
  /* ===== 効果音のオン・オフ ===== */
  .sfx-row{ margin:-4px 0 14px; text-align:right; }
  .sfx-toggle{ font:inherit; font-size:.92rem; font-weight:800; padding:8px 16px; border-radius:999px; border:2px solid var(--ink); background:#fff; color:var(--ink); cursor:pointer; }
  .sfx-toggle[aria-pressed="false"]{ background:#eee; color:var(--sub); border-color:#bbb; }
  .stage-top .stage-sfx{ font-size:clamp(14px,1.8vh,20px); margin-left:auto; margin-right:12px; background:transparent; color:#fff; border-color:rgba(255,255,255,.6); }
  .stage-top .stage-sfx[aria-pressed="false"]{ background:transparent; color:rgba(255,255,255,.55); border-color:rgba(255,255,255,.3); }
  @media print{ .sfx-row, .sfx-toggle{ display:none !important; } }
  /* ===== 共通フッター ===== */
  .site-footer .footer-links{ display:flex; gap:6px 18px; flex-wrap:wrap; margin:0 0 10px; font-size:.85rem; }
  .site-footer .footer-links a{ color:#fff; }
  .site-footer .footer-note{ margin:0 0 6px; }
  .site-footer .footer-copy{ margin:0; }
  .site-footer .footer-copy a{ color:inherit; }
  /* ===== 固定ページ(利用規約など) ===== */
  .doc{ background:#fff; border:3px solid var(--ink); border-radius:14px; padding:28px 32px; margin:18px 0 8px; line-height:1.9; }
  .doc h2{ font-size:1.15rem; margin:1.8em 0 .6em; padding-left:.6em; border-left:6px solid var(--yellow); }
  .doc h2:first-child{ margin-top:0; }
  .doc ol, .doc ul{ padding-left:1.6em; }
  .doc li{ margin:.3em 0; }
  .doc-date{ margin-top:2em; text-align:right; color:var(--sub); font-size:.9rem; }
  .doc-table{ width:100%; border-collapse:collapse; margin:8px 0 6px; }
  .doc-table th, .doc-table td{ border-bottom:1px solid #ddd6c8; padding:12px 10px; text-align:left; vertical-align:top; }
  .doc-table th{ width:8em; white-space:nowrap; color:var(--sub); }
  .contact-box{ background:var(--paper,#fffaf0); border:2px dashed var(--ink); border-radius:12px; padding:18px 22px; margin:14px 0 6px; }
  .contact-box p{ margin:.3em 0; }
  .contact-label{ font-weight:900; margin-top:.8em !important; }
  .contact-label:first-child{ margin-top:0 !important; }
  .contact-mail{ font-size:1.15rem; font-weight:700; user-select:all; }
  @media (max-width:640px){ .doc{ padding:18px 16px; } .doc-table th{ width:6em; } }
  .contact-form{ margin:14px 0 6px; border:2px solid var(--ink); border-radius:12px; overflow:hidden; background:#fff; }
  .contact-form iframe{ display:block; width:100%; height:1150px; border:0; }
  .contact-alt{ font-size:.9rem; color:var(--sub); margin:.4em 0 0; }
  @media (max-width:640px){ .contact-form iframe{ height:1300px; } }
