:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;color:#182940;background:#f2f5f9;font-synthesis:none;font-size:100%;line-height:1.75;--navy:#101f37;--blue:#174ecb;--muted:#617086;--border:#dce3ed}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #245dde;outline-offset:4px}button:disabled{cursor:default}a{color:#194db9;text-underline-offset:3px}.masthead{background:var(--navy);color:white}.header-inner{max-width:800px;margin:auto;padding:22px 32px;display:flex;align-items:center;justify-content:space-between;gap:15px}.brand{display:flex;gap:12px;align-items:center;color:white;font-size:1.25rem;font-weight:750;text-decoration:none;letter-spacing:.02em}.brand small{display:block;font-weight:400;color:#bfcbde;font-size:0.75rem;letter-spacing:.03em;line-height:1.5}.bolt{background:#d7ef69;color:var(--navy);display:grid;place-items:center;width:40px;height:44px;font-size:2.25rem;line-height:1;border-radius:9px}.edition{font-size:0.75rem;color:#d9e1ee;border:1px solid #48556a;padding:3px 10px;border-radius:5px;white-space:nowrap}main{max-width:752px;margin:32px auto;padding:0 24px 40px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.eyebrow{font-size:0.8125rem;color:var(--muted);margin:0 0 3px;font-weight:600}h1{font-size:1.6875rem;letter-spacing:.015em;margin:0}.session-note{font-size:0.75rem;color:var(--muted)}.modes{display:flex;border-bottom:1px solid #cfd8e4;gap:24px}.modes button{border:0;background:none;color:var(--muted);padding:10px 4px 12px;font-size:0.9375rem;font-weight:650;border-bottom:3px solid transparent}.modes button.active{color:var(--blue);border-bottom-color:var(--blue)}.modes span{background:#e2e8f0;display:inline-block;min-width:25px;text-align:center;border-radius:6px;margin-left:5px;font-size:0.75rem}.progress-label{display:flex;justify-content:space-between;color:var(--muted);font-size:0.8125rem;margin:20px 0 7px}progress{appearance:none;width:100%;display:block;height:5px;border:0;background:#dce4ee;border-radius:9px;overflow:hidden;margin-bottom:23px}progress::-webkit-progress-bar{background:#dce4ee}progress::-webkit-progress-value{background:var(--blue)}progress::-moz-progress-bar{background:var(--blue)}.card{background:white;border:1px solid var(--border);border-radius:18px;padding:28px;box-shadow:0 4px 20px #223d6410}.question-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.tag{font-size:0.75rem;font-weight:650;color:#1646a7;background:#eef3ff;border-radius:5px;padding:3px 10px}.q-num{font-size:0.8125rem;color:var(--muted)}h2{font-size:1.1875rem;line-height:1.95;font-weight:650;margin:0 0 20px;white-space:pre-line}.question-photo{display:block;width:270px;max-width:100%;margin:0 auto 22px;border-radius:6px}.prompt-note{font-size:0.8125rem;color:var(--muted);margin:0 0 10px}.choices{display:grid;gap:10px}.choice{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:white;border:1px solid #cdd6e3;color:#23334b;padding:15px 16px;border-radius:10px;line-height:1.7;min-height:59px;font-size:1.0rem;transition:background .12s,border-color .12s}.choice:hover:not(:disabled){border-color:var(--blue);background:#f5f8ff}.choice .letter{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:6px;background:#f0f3f7;font-size:0.875rem;font-weight:700}.choice.correct{border:2px solid #1f7955;background:#eff9f3;padding:14px 15px}.choice.correct .letter{background:#217954;color:white}.choice.wrong{border:2px solid #bb5545;background:#fff4f0;padding:14px 15px}.choice.wrong .letter{background:#ad4437;color:white}.choice-status{font-size:0.75rem;white-space:nowrap;margin-left:auto;font-weight:700}.source{font-size:0.75rem;color:#647287;margin:21px 0 0;line-height:1.8}.source a{color:inherit}.feedback{margin-top:18px;padding:24px 28px;background:white;border:1px solid var(--border);border-top:4px solid #237854;border-radius:12px}.feedback.missed{border-top-color:#bb5545}.result{font-size:1.25rem;font-weight:750;margin:0}.result small{display:block;font-size:0.875rem;font-weight:400;color:var(--muted);margin-top:4px}.feedback h3{font-size:0.9375rem;margin:22px 0 8px}.feedback p{margin:8px 0;font-size:1.0rem}.feedback ol{padding-left:23px;margin:8px 0}.feedback li{margin:7px 0}.formula{font-size:1.125rem!important;background:#f2f5fa;padding:15px;border-radius:8px;white-space:pre-line;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.remember{margin-top:20px;border-left:3px solid #9db638;background:#f6f9e9;padding:12px 16px}.remember strong{display:block;font-size:0.8125rem;margin-bottom:4px;color:#50621b}.remember p{margin:0}.reasons{border-top:1px solid var(--border);margin-top:20px;padding-top:16px}.reasons summary{cursor:pointer;font-size:0.875rem;font-weight:650}.reason{padding:9px 0;border-bottom:1px solid #edf0f5;font-size:0.875rem}.reason:last-child{border:0}.actions{margin:20px 0;display:flex;gap:12px}.primary,.secondary{border-radius:10px;min-height:52px;padding:12px 20px;font-weight:650;font-size:1.0rem}.primary{background:var(--blue);color:white;border:1px solid var(--blue);flex:1}.primary:hover{background:#103b9d}.secondary{background:white;color:#334663;border:1px solid #cbd5e2}.skip{display:block;margin:auto;background:transparent;border:0;color:var(--muted);font-size:0.875rem;padding:8px 18px}.empty{text-align:center;padding:30px 0}.empty .large{font-size:2.75rem;font-weight:750;color:var(--blue);line-height:1.2;margin:10px 0}.empty p{color:var(--muted);font-size:0.9375rem}.notice{background:#fff1d8;padding:12px;margin:16px 0;border-radius:8px;font-size:0.875rem}footer{color:#647287;font-size:0.75rem;margin-top:30px;line-height:1.8}footer details{margin-top:15px;border-top:1px solid var(--border);padding-top:15px}footer summary{cursor:pointer;font-size:0.8125rem}footer p{margin:8px 0}[hidden]{display:none!important}@media(max-width:540px){.header-inner{padding:17px 20px}.brand{font-size:1.125rem}.bolt{width:34px;height:38px;font-size:2.0rem}main{padding:0 16px 25px;margin-top:25px}h1{font-size:1.5625rem}.intro{margin-bottom:18px}.session-note{display:none}.card{padding:21px 18px;border-radius:14px}h2{font-size:1.0625rem;line-height:1.95}.choice{padding:13px 12px;gap:11px;font-size:1.0rem}.choice.correct,.choice.wrong{padding:12px 11px}.choice-status{white-space:normal;font-size:0.75rem}.feedback{padding:20px 18px}.actions{flex-wrap:wrap}.question-top{margin-bottom:15px}.source{font-size:0.75rem}.progress-label{margin-top:17px}.primary,.secondary{padding:12px 16px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.header-inner{flex-wrap:wrap}.brand{overflow-wrap:anywhere}.question-top{flex-wrap:wrap}.choice>span:nth-child(2){min-width:0;overflow-wrap:anywhere}.choice-status{flex-shrink:0}.progress-label{flex-wrap:wrap;gap:4px 12px}

/* Original exam figures remain legible, with a separate link for zooming. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.problem-figure{margin:0 0 22px}.problem-image{display:block;width:100%;max-width:420px;height:auto;margin:auto}.problem-figure figcaption{text-align:right;font-size:.75rem;margin-top:8px}.problem-figure .question-photo{height:auto;margin-bottom:0}
.illustrated-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.choice-row{min-width:0}.illustrated-choice{height:calc(100% - 28px);min-height:140px;flex-direction:column;align-items:flex-start;gap:8px;padding:12px}.illustrated-choice.correct,.illustrated-choice.wrong{padding:11px}.illustrated-choice .choice-content{display:block;width:100%}.choice-image{display:block;width:100%;max-height:320px;object-fit:contain;object-position:center}.illustrated-choice .choice-status{margin:0;align-self:flex-end}.choice-zoom{display:block;text-align:right;font-size:.75rem;line-height:28px}.illustrated-choice .choice-content>span{display:block;margin-top:10px}.illustrated-choices:has(.choice-content>span){grid-template-columns:1fr}.illustrated-choices:has(.choice-content>span) .choice-image{max-height:none}
@media(max-width:360px){.illustrated-choices{grid-template-columns:1fr}.choice-image{max-height:300px}.q-num{font-size:.75rem}}

.choice-content{white-space:pre-line}

/* Wiring questions: a local crop, the whole drawing and shared exam notes. */
.modes{gap:18px}.modes button{white-space:nowrap}.wiring-reference{margin:0 0 24px;border:1px solid var(--border);border-radius:12px;overflow:hidden}.wiring-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#f0f4fa;padding:12px 14px;flex-wrap:wrap}.wiring-heading strong{font-size:.875rem}.diagram-open{border:1px solid #b8c7df;background:white;border-radius:7px;color:var(--blue);padding:8px 11px;font-size:.875rem;min-height:44px}.detail-open{display:block;width:100%;padding:16px;border:0;background:white;cursor:zoom-in}.detail-open img{display:block;width:100%;max-height:420px;object-fit:contain}.diagram-hint{margin:0 14px 14px;color:var(--muted);font-size:.8125rem}.wiring-notes{border-top:1px solid var(--border);padding:12px 14px;font-size:.875rem}.wiring-notes summary{cursor:pointer;font-weight:650}.wiring-notes ol{padding-left:22px}.wiring-notes li{margin:7px 0}.wiring-notes p{margin-top:12px}
#diagram-dialog{width:min(96vw,1100px);max-width:none;height:92dvh;max-height:96dvh;padding:0;border:1px solid #c7d2e3;border-radius:14px;color:var(--navy);background:white;overflow:hidden}#diagram-dialog[open]{display:grid;grid-template-rows:auto auto auto minmax(0,1fr)}#diagram-dialog::backdrop{background:#071629bf}.diagram-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);gap:12px}.diagram-toolbar h2{font-size:1rem;margin:0;line-height:1.5}.diagram-toolbar .secondary{min-height:44px;padding:6px 14px;flex-shrink:0}.diagram-controls{display:flex;align-items:center;gap:12px;padding:10px 16px 0}.diagram-controls button{min-width:44px;min-height:44px;border:1px solid #c7d2e3;border-radius:7px;color:var(--blue);background:#f5f8fd;font-size:1.25rem}.diagram-controls button:disabled{opacity:.4}.diagram-controls a{font-size:.8125rem;margin-left:auto}.diagram-instruction{font-size:.8125rem;color:var(--muted);margin:5px 16px 9px}#diagram-scroll{width:100%;min-width:0;min-height:0;overflow:scroll;background:#e9eef5;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch;cursor:grab;user-select:none;-webkit-user-select:none}#diagram-scroll.dragging{cursor:grabbing}#diagram-image{display:block;max-width:none;height:auto;background:white;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}body:has(#diagram-dialog[open]){overflow:hidden}
@media(max-width:540px){.modes{gap:10px;justify-content:space-between}.modes button{font-size:.875rem;padding-left:0;padding-right:0}.modes span{margin-left:3px;min-width:23px}.diagram-controls{gap:8px}.detail-open{padding:10px}.wiring-heading{padding:10px}.diagram-controls a{max-width:120px}.wiring-notes{padding:10px}.wiring-reference{margin-left:-5px;margin-right:-5px}}
.header-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 13px;border:1px solid #60708a;border-radius:8px;color:white;text-decoration:none;font-size:.9375rem;font-weight:650;margin-left:auto;white-space:nowrap}.header-link:hover{background:#263b5b}@media(max-width:540px){.header-inner{gap:10px}.header-inner .edition{display:none}.header-link{font-size:.875rem;padding:8px 11px}}

/* Short sessions with an optional, quieter challenge entry. */
.mode-note{font-size:.8125rem;color:var(--muted);margin:14px 0 0;line-height:1.8}.challenge-entry{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:16px;color:var(--muted);font-size:.75rem}.challenge-entry button{background:transparent;border:0;color:var(--blue);min-height:44px;padding:8px;font-size:.8125rem}.challenge-entry button.active{font-weight:700;text-decoration:underline}.empty .result-unit{font-size:1rem}.exam-options{display:grid;gap:12px}.exam-results>details{padding:12px 0;border-bottom:1px solid var(--border)}.exam-results summary{cursor:pointer;min-height:44px;padding:8px 0}.exam-results p{white-space:pre-line}.choice.selected{border:2px solid var(--blue);background:#eef3ff;padding:14px 15px}.illustrated-choice.selected{padding:11px}.actions>.secondary{flex:1}.modes button{min-height:48px}@media(max-width:540px){.choice.selected{padding:12px 11px}.modes{gap:8px}.modes button{font-size:.8125rem}.empty{padding:18px 0}.actions>button{min-width:130px}.exam-results{font-size:.875rem}}

.cloud-loading main,.cloud-loading .header-link{display:none!important}.cloud-bar{max-width:752px;margin:14px auto 0;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:.75rem;color:var(--muted)}.cloud-bar button{border:0;background:transparent;color:var(--blue);padding:8px;min-height:44px;font-size:.75rem}#sync-status[data-status="synced"]{color:#1f7955}#sync-status[data-status="offline"],#sync-status[data-status="unsaved"]{color:#995214}.detail-open img,.choice-image{height:auto}

/* Separate exam page, shared by all study entry points. */
.study-pages{display:flex;gap:8px;border-bottom:1px solid var(--border);margin:0 0 24px;padding-bottom:10px}.study-pages a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;text-decoration:none;font-size:.875rem;font-weight:650;border-radius:8px;color:var(--muted)}.study-pages a[aria-current="page"]{background:#e3ecff;color:var(--blue)}.study-pages a:hover{background:#eaf0f8}
