/* Default presets leave the established terminal untouched. No content scaling,
   blur, brightness filter or geometry changes; selection/check shadows survive. */
.terminal-controls{border:1px solid #398a51;background:#031109;color:#baffd0;margin:14px 0;padding:0 12px;text-align:left;min-width:0}
.terminal-controls summary{cursor:pointer;min-height:44px;padding:13px 0;font-size:12px;font-weight:800;letter-spacing:.06em;line-height:1.5;color:#baffd0}
.terminal-controls .terminal-help,.terminal-controls .terminal-policy,.terminal-controls .terminal-storage{font-size:12px;line-height:1.65;letter-spacing:normal;color:#a9d8b6;opacity:1;margin:8px 0 14px;overflow-wrap:anywhere}
.terminal-controls .terminal-storage:empty{display:none}.terminal-controls .terminal-storage{color:#ffda94}
.terminal-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.terminal-preset{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:bold;line-height:1.5;margin-top:12px}
.terminal-preset select{width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid var(--tc-edge,#65d982);border-radius:0;background:var(--tc-control,#04130a);color:var(--tc-text,#c5ffd4);-webkit-text-fill-color:currentColor;font-size:16px;color-scheme:dark}
.terminal-preset option{background:var(--tc-control,#04130a);color:var(--tc-text,#c5ffd4)}
.terminal-fields label{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:11px;font-weight:700;line-height:1.5}
.terminal-fields select,.terminal-fields input{font:inherit;font-size:14px;color:#c5ffd4;-webkit-text-fill-color:currentColor;min-height:44px;max-width:100%;width:100%;margin:0;accent-color:#41ff72;cursor:pointer}
.terminal-fields select{background:#04130a;border:1px solid #69cf86;border-radius:0;padding:8px;color-scheme:dark}
.terminal-fields option{background:#04130a;color:#c5ffd4}.terminal-volume{min-height:18px;color:#baffd0}
.terminal-controls :is(summary,select,input):focus-visible{outline:2px solid #e1ffe9;outline-offset:3px}
html[data-terminal-effects=low] .scanlines{opacity:.35}html[data-terminal-effects=low] body:has(.modal:not(.hidden),.startup:not(.dismissed) .onboarding:not(.hidden))>.scanlines{opacity:.2625}
html[data-terminal-effects=off] .scanlines,html[data-terminal-effects=off] .terminal-signal{display:none!important}
html[data-terminal-glow=soft] :is(h1,.config,.outcome-icon,.outcome-panel h2){text-shadow:0 0 3px #41ff7233}
html[data-terminal-glow=soft] .console{filter:drop-shadow(0 0 6px #41ff7210)}
html[data-terminal-glow=soft] :is(.board-frame,.panel){box-shadow:0 0 6px #41ff7218}
html[data-terminal-glow=off] *{text-shadow:none!important}
html[data-terminal-glow=off] .console{filter:none!important}
html[data-terminal-glow=off] :is(.board-frame,.panel){box-shadow:none}
html[data-terminal-contrast=high] :is(.square.light,.review-square.light){background:#17452b!important}
html[data-terminal-contrast=high] :is(.square.dark,.review-square.dark){background:#000!important}
html[data-terminal-contrast=high] .chess-piece.white{--piece-fill:#e4ffed;--piece-edge:#12321f;--piece-detail:#12321f}
html[data-terminal-contrast=high] .chess-piece.black{--piece-fill:#010603;--piece-edge:#8dffa7;--piece-detail:#8dffa7}
html[data-terminal-contrast=high] :is(.panel,.onboarding,.terminal-controls){color:#d4ffdf}
html[data-terminal-contrast=high] :is(.eyebrow,.hint,.config-note,.readout,.key-help,header p,footer,.panel small,.panel p,.onboarding p,.board small,.review-square small){color:#bcf4c9;opacity:1}
html[data-terminal-contrast=high] :is(.scanlines,.shell:before){display:none!important}
/* Suppress decorative motion, not board focus, check or status text. Cinematics
   use their controller's existing short/static reduced-motion presentation. */
html[data-terminal-motion=reduced] :is(.terminal-signal,.scanlines){display:none!important}
html[data-terminal-motion=reduced] :is(.lamp,.boot-cursor,.board-frame,.outcome-panel,.startup){animation:none!important;transition:none!important}
@media(max-width:420px){.terminal-fields{grid-template-columns:minmax(0,1fr)}}
/* Keep phone form text readable without disabling the player's pinch zoom. */
@media(max-width:760px){.terminal-fields :is(select,input){font-size:16px}}
@media(forced-colors:active){
  .terminal-controls,.terminal-fields select,.terminal-fields option,.terminal-preset select,.terminal-preset option{background:Canvas;color:CanvasText;border-color:CanvasText;-webkit-text-fill-color:currentColor}
  .terminal-controls :is(summary,p,span){color:CanvasText!important}.terminal-controls :focus-visible{outline-color:Highlight}
  .scanlines,.terminal-signal,.shell:before{display:none!important}
  /* Preserve filled White versus outlined Black pixels against both squares. */
  :is(.square,.review-square),.chess-piece{forced-color-adjust:none}
  html[data-terminal-contrast] :is(.square.light,.review-square.light){background:#444!important}html[data-terminal-contrast] :is(.square.dark,.review-square.dark){background:#000!important}
  html .chess-piece.white{--piece-fill:#fff!important;--piece-edge:#222!important;--piece-detail:#222!important}html .chess-piece.black{--piece-fill:#000!important;--piece-edge:#fff!important;--piece-detail:#fff!important}
  :is(.square,.review-square) small{color:#fff!important}
  :is(.square.selected,.square.in-check,.review-square.checked,.training-board .selected){outline:3px solid #ffdf7f!important;outline-offset:-3px}
}
