/* One terminal shell: compact identity, readable state and explicit navigation. */
html .app-view{position:fixed;inset:0;z-index:5000;background:var(--tc-bg,#010603);padding:0;display:flex}
html .app-view.hidden{display:none}
.app-view iframe{border:0;width:100%;height:100%;min-width:0;background:#010603}
.app-view iframe[hidden]{display:none}
html .app-view-loading{width:min(100%,900px);margin:0 auto;padding:16px;color:var(--tc-text)}
html .app-view-loading[hidden]{display:none}
html .app-view-loading p{font-size:14px;line-height:1.7}
html .section-header,html .mission-context-header{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--tc-edge);padding:8px 0 12px;margin:0 0 14px}
html .section-header>div{min-width:0}
html header.section-header{position:sticky;top:0;z-index:1100;background:var(--tc-screen)}
html :is(.page,.review-shell,.training-shell) [id]{scroll-margin-top:120px}
html .section-header .section-brand,html .mission-context-header strong{font-size:18px;line-height:1.3;font-weight:700;color:var(--tc-green);letter-spacing:-.03em;text-decoration:none}
html header.section-header h1{font-size:12px;line-height:1.5;letter-spacing:.08em;margin:4px 0 0;color:var(--tc-text)}
html .section-header .section-back,html .mission-context-header button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:44px;max-width:50%;padding:8px 12px;border:1px solid var(--tc-border);font-size:12px;line-height:1.4;text-decoration:none;text-align:center;color:var(--tc-text);background:var(--tc-control)}
html .section-context{font-size:12px;line-height:1.6;color:var(--tc-warning);margin:0 0 14px}
html .section-links{margin-bottom:12px}
html .section-links summary{font-size:12px;min-height:36px;cursor:pointer}
html .section-links .page-nav{padding:8px 0;margin:0}
html :is(.page,.review-shell,.training-shell){padding-top:14px}
html .mission-context-header[hidden]{display:none}
html .mission-context-header span{display:block;font-size:12px;color:var(--tc-text);margin-top:4px}
html .mission-home.mission-detail>.mission-primary,html .mission-home.mission-detail>.mission-title,html .mission-home.mission-detail>.eyebrow{display:none}
html .mission-home.mission-detail>.mission-section>h2{font-size:16px;margin:8px 0 16px}
html .beginner-setup>summary{font-size:12px;line-height:1.5;min-height:36px;cursor:pointer;color:var(--tc-text)}
html .beginner-setup:not([open]){padding:10px 12px;margin-bottom:16px}
/* The close target occupies real header space, never the sound row below. */
html .config-header{padding:12px 18px 8px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;row-gap:8px}
html .config-header>.eyebrow{grid-column:1;grid-row:1;font-size:12px;margin:0;min-width:0;overflow-wrap:anywhere}
html .config-header>.close{position:static;grid-column:2;grid-row:1;align-self:center;justify-self:end;display:grid;place-items:center;min-width:44px;min-height:44px;padding:4px;margin:0;line-height:1}
html .config-header>:is(.config-quick-sound,.config-tabs){grid-column:1/-1;min-width:0}
html .config-header>.config-quick-sound{grid-row:2}
html .config-header>.config-tabs{grid-row:3}
html .config-header-tools{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0}
html .config-header>.config-header-tools{grid-column:1/-1;grid-row:2}
html .config-header-tools>.config-quick-sound{margin:0;padding:4px 8px;min-height:44px;border:0;border-top:1px solid var(--tc-rule,#286940);background:transparent}
html .config-header-tools>.config-tabs{margin:0}
html .config-body>.config-note{font-size:12px;line-height:1.5;margin:0 0 12px}
html .config-quick-sound{margin:0 0 8px;padding:4px 8px;min-height:44px}
html .config-quick-sound button{min-height:36px}
html .config-tabs{gap:4px}
html .config-tabs button{font-size:11px;line-height:1.3;padding:8px 4px;min-height:44px}
html .config-body{min-height:0;flex:1;overflow:auto;padding:16px 18px}
html .config-footer{flex:none;padding:10px 18px;border-top:1px solid var(--tc-border);background:var(--tc-control,#04130a)}
html .config-footer[hidden]{display:none}
html .config-footer .initialize{margin:0;width:100%;min-height:44px;padding:10px;font-size:13px}
/* Only the title/close row is fixed when enlarged controls need more space. */
html .config-flow>.config-body>.config-header-tools{margin-bottom:16px;padding-bottom:8px;border-bottom:1px solid var(--tc-rule,#286940)}
html .log-body:focus-visible{outline:2px solid var(--tc-focus,#e1ffe9);outline-offset:-3px}
html .status :is(#message,#state){font-size:12px;line-height:1.5}
html .status{min-height:64px}
html .analysis-limits{margin:12px 0;color:var(--tc-muted);font-size:12px;line-height:1.7}
html .analysis-limits summary{cursor:pointer;min-height:36px;color:var(--tc-text)}
html .analysis-limits p{font-size:12px}
html #analysisTakeaway .analysis-focus{margin:12px 0}
html .review-board small,html .training-board small{white-space:pre;line-height:1.2}
html .review-square .edge-rank{top:1px;bottom:auto;left:2px}
html .review-square .edge-file{bottom:1px;left:auto;right:2px}
/* Readable coordinates without changing board dimensions or pixel-piece shapes. */
html .cockpit .square small,html .review-board small,html .training-board small{font-size:clamp(10px,1vw,12px);font-weight:700;opacity:1;color:var(--tc-muted,#a4dcb2);text-shadow:none}
html .status #message{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
html .cockpit>.status{grid-template-rows:minmax(34px,auto) 18px}
html .cockpit.beginner-guidance-on>.status{grid-template-rows:minmax(34px,auto) 18px 66px}
html .cockpit-compact.beginner-guidance-on>.status{padding-top:5px;padding-bottom:5px}
html .cockpit>.status:has(.online-link:not(.hidden)){grid-template-rows:minmax(34px,auto) minmax(36px,auto)}
@media(max-width:600px){html .cockpit>.status:has(.online-link:not(.hidden)){grid-template-rows:minmax(50px,auto) minmax(88px,auto)}}
/* Warnings span the status grid, never its 7px lamp column. Guidance owns row 3. */
html .cockpit>.status>.storage-notice{grid-column:1/-1;grid-row:4;min-width:0;max-width:100%;max-height:6.4em;overflow:auto;overscroll-behavior:contain;white-space:normal;overflow-wrap:anywhere;margin:4px 0 0;padding-top:4px;border-top:1px solid var(--tc-border,#28643a);scrollbar-color:#41ff72 #031109}
html #outcomeDrawHelp{display:inline-flex;align-items:center;min-height:44px;font-size:12px;line-height:1.5}
html #outcomeDrawHelp[hidden]{display:none}
@media(max-width:480px){html .section-header .section-brand{font-size:16px}html .section-header .section-back{padding:8px;font-size:11px}html .feedback-form{margin-top:16px}html .feedback-form fieldset{padding:12px}html .status #state{font-size:11px}}
