/* Identidad del piloto. Las piezas y los colores del tablero se conservan. */
:root{--deep:#171b19;--ink:#202620;--paper:#fafbf5;--muted:#535c54;--gold:#d5f442;--line:#d3dacd;--red:#455d19}
/* WebView antiguo: conserva la altura de la pantalla y el scroll de los diálogos. */
@supports not (height:100dvh){:root{--vh:100vh}}
body{background:radial-gradient(ellipse at 18% 0,#343d32 0,transparent 65%),var(--deep)}
.app-footer{background:#141815;color:#e9ede4}.app-header{background:#151918eb}.brand strong{font-family:Georgia,serif;font-weight:600}.brand img,.welcome-body img{background:#171b19}
button.primary:hover{background:#324522}.steps button[aria-current="step"]{color:#455d19;border-bottom-color:#455d19}.steps button{color:#596357}
.workspace[data-stage="0"] .choice[aria-pressed="true"],.choice[aria-pressed=true]{border-color:#455d19;background:#f0f6db;outline-color:#455d19;box-shadow:inset 3px 0 #455d19}
.choice.good{border-color:#455d19}.moves button.active{background:#455d19;border-color:#455d19}.theme-card.selected,.user-row [aria-current=true],.game-card .exercise-button.selected{background:#f0f6db;border-color:#455d19}.exercise-done,.rating-big{color:#455d19}
.theme-card progress::-webkit-progress-value,.replay-progress progress::-webkit-progress-value{background:#455d19}.theme-card progress::-moz-progress-bar,.replay-progress progress::-moz-progress-bar{background:#455d19}
.takeaway{background:#283323;color:#f6f8ed}.takeaway strong{color:#d5f442}.scenario-intro{background:#f1f4e8;border-left-color:#779333}.move-note,.sequence-end{background:#f1f4eb;border-color:#d4ddc9;color:#202620}.feedback{background:#edf6e7;border-color:#bcd5ad}.feedback.consider{background:#fcf3e5;border-color:#e4d1ae}.result-card,.review-entry{background:#f2f4e7;border-color:#d7ddc2}.game-heading .eyebrow,.exercise-number,.question-step,.answer-instruction{color:#53644a}
.board-toolbar #next-move{background:#d5f442;border-color:#d5f442;color:#1c2317}.timer{color:#c9d5bd}dialog::backdrop{background:#121813dd}.reading{scrollbar-color:#aab6a0 transparent}.welcome-brand{display:flex;align-items:center;gap:16px}.welcome-body .welcome-brand .eyebrow{color:#485b2f}.pilot-badge{font-size:10px;letter-spacing:1.4px;color:#55654c;border:1px solid #d6dec9;border-radius:20px;padding:6px 10px}.welcome-body #welcome-title{font-size:clamp(36px,5vw,48px);color:#20251e}.welcome-body .brand-promise{font-family:Georgia,serif;font-size:24px;line-height:1.3;color:#526725}.welcome-steps li:before{border-color:#aeba96;color:#455d19}
.opening-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.opening-actions>button{font-size:12px}.opening-actions .hint-button{margin:0}.opening-description{line-height:1.65;font-size:14px;color:var(--muted)}.opening-moves{gap:4px}.opening-moves button{font-family:'Segoe UI Symbol','Segoe UI',sans-serif}
.position-heading .eyebrow{color:#d5f442}.brand span{color:#d5f442}.quiet:hover{background:#ffffff15;color:#fff}
/* Tras iniciar la variante, el comentario de la jugada tiene prioridad. */
.replay-guide.is-following>h1,.replay-guide.is-following>.eyebrow,.replay-guide.is-following>p{display:none}
.replay-guide.is-following .replay-progress{margin:0 0 10px}
.replay-guide.is-following+.move-note{margin-top:0}
@media(max-width:600px){.brand strong{font-size:16px}.brand span{display:block;font-size:7px;letter-spacing:1px}.header-actions{gap:4px}.app-header{gap:8px}.opening-actions{display:grid}.opening-actions>button{min-height:40px}.welcome-body #welcome-title{font-size:36px}.welcome-body .brand-promise{font-size:22px}}
@media(max-width:380px){.brand img{display:block;width:23px;height:23px}.brand strong{font-size:15px}.app-header{padding-inline:8px}.header-actions .quiet{padding-inline:7px}.header-actions{gap:3px}}
/* Índice por aperturas. La navegación del curso no ocupa espacio del tablero. */
#library [hidden]{display:none!important}
#library{scrollbar-width:thin;scrollbar-color:#aab6a0 var(--paper)}
.welcome-body .level-badge{font-size:13px;font-weight:650;line-height:1.5;padding:12px 14px;background:#f0f6db;color:#324522;border:1px solid #c7d69d;border-radius:12px;margin:0}.library-level{margin:12px 24px 0;font-size:12px;color:#55654c;line-height:1.6}
.course-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 24px}.course-actions>button{flex:1;min-height:44px;font-size:13px}
.course-order{margin:12px 24px 20px;font-size:12px;line-height:1.6;color:var(--muted)}
.catalog-search{margin:0 24px 20px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f1f4eb}.catalog-search label{display:block;margin-bottom:8px;font-size:13px;font-weight:650;color:var(--ink)}.catalog-search>div{display:flex;gap:8px;min-width:0}.catalog-search input{flex:1;width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #b1bfab;border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:16px}.catalog-search button{flex:none;min-height:44px;font-size:12px}.catalog-search p{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}.catalog-search p:empty{display:none}
.theme-index{grid-template-columns:1fr}.theme-card{display:grid;grid-template-columns:1fr auto;gap:9px 16px;padding:18px 20px}
.theme-card strong{font-family:Georgia,serif;font-size:23px;font-weight:500;grid-column:1/-1}.theme-number{color:#526725}.theme-description{font-size:13px;line-height:1.5;color:var(--muted);grid-column:1/-1;font-weight:400}.theme-card small{grid-column:1}.theme-card progress{grid-column:1/-1}.theme-enter{font-size:12px;color:#455d19;grid-row:1;grid-column:2}.theme-card:hover{border-color:#83965f;background:#f0f6db}
#positions-heading{flex-wrap:wrap}#all-themes{min-height:44px}.opening-complete-body{padding:30px}.opening-complete-body h2{font-size:34px;margin:12px 0}.opening-complete-actions{display:grid;gap:10px;margin-top:24px}.opening-complete-actions>button{min-height:44px}.app-footer #continue{max-width:55%;white-space:normal}
@media(min-width:700px){.theme-index{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-card{align-content:start}.theme-card progress{align-self:end}}
@media(max-width:600px){.course-actions{padding-inline:18px;display:grid}.course-order{margin-inline:18px}.theme-card{padding:16px;gap:8px}.theme-card strong{font-size:22px}.theme-description{font-size:12px}.theme-enter{font-size:11px}.theme-number{font-size:9px}.theme-card small{font-size:11px}.opening-complete-body{padding:24px}.opening-complete-body h2{font-size:28px}}
@media(max-width:600px){.catalog-search{margin-inline:18px;padding:12px}.catalog-search>div{flex-wrap:wrap}.catalog-search input{flex-basis:180px}}
/* Grafito y silicio. Las pistas aparecen en las superficies de marca. */
:root {
  --signal: #d5f442;
  --graphite: #1b201c;
  --signal-ink: #435620;
}
.app-header {
  background: #191d1a;
  border-bottom-color: #3c4634;
}
.app-header .brand img, .welcome-brand img {
  flex: none;
  box-shadow: 0 0 0 1px #a9c53e50;
}
.app-header .brand span { color: #c7db9b; }
.app-header .rating-pill { color: #e4edcd; border-color: #74825c; }
.eyebrow, .theme-number, .timer, .replay-progress {
  font-family: ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
button.primary, .board-toolbar #next-move {
  color: #1c2411;
  background: var(--signal);
  border-color: #9ab32e;
}
button.primary:hover, .board-toolbar #next-move:hover {
  color: #11180b;
  background: #c5e531;
}
button:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible, a:focus-visible {
  outline: 3px solid #687c23;
  outline-offset: 3px;
}
.app-header button:focus-visible, .app-footer button:focus-visible,
.board-toolbar button:focus-visible { outline-color: var(--signal); }
#library .dialog-heading, .welcome-brand {
  background: var(--graphite) url("circuito.svg") right center / auto 100% no-repeat;
  color: var(--paper);
}
#library .dialog-heading { border-bottom: 3px solid var(--signal); }
#library .dialog-heading h2 { color: #fcfdf8; }
#library .dialog-heading .eyebrow, .welcome-body .welcome-brand .eyebrow { color: var(--signal); }
#library .dialog-heading button { color: #f9fcf4; background: #262e25; border-color: #67725f; }
.welcome-brand { width: 100%; border-radius: 12px; padding: 12px 16px; }
.welcome-brand .eyebrow { line-height: 1.45; }
@media (max-width: 600px) {
  #library .dialog-heading, .welcome-brand { background-size: 108px auto; }
}
.welcome-body .brand-promise { color: var(--signal-ink); }
.theme-card { border-inline-start: 3px solid #ccd5bd; }
.theme-card:hover, .theme-card:focus-visible { border-inline-start-color: #718a28; }
.theme-enter, .theme-number { color: var(--signal-ink); }
.exercise-button.selected, .game-card .exercise-button.selected { border-color: #718a28; }
.hint { border-left-color: #79902a; background: #f1f5df; }
.review-entry strong, .source a, .dialog-heading .eyebrow, .lesson-panel .eyebrow { color: var(--signal-ink); }
.app-footer .timer { color: #dae5c7; }
.choice[aria-pressed=true] .choice-letter { color: #fff; background: #455d19; }

/* Shared Android/iOS: authentic white/gold and black/graphite Silicio pieces. */
.notation-move{white-space:nowrap}
.notation-figurine{--figurine-height:max(1.15em,14px);--asset-scale:1.2;--piece-aspect:.7;display:inline-block;width:calc(var(--figurine-height)*var(--piece-aspect) + 3px);height:var(--figurine-height);margin-inline:1px;vertical-align:-.2em;background:var(--notation-piece) center/calc(var(--figurine-height)*var(--asset-scale)) no-repeat;filter:drop-shadow(0 0 .3px var(--notation-halo,#535a47));text-indent:-9999px;overflow:hidden;white-space:nowrap;line-height:1}
.notation-figurine[data-piece="king"]{--asset-scale:1.111111;--piece-aspect:0.761111;--notation-piece:url('./tablero/piezassilicio/wK.svg')}
.notation-figurine[data-piece="king"][data-color="black"]{--notation-piece:url('./tablero/piezassilicio/bK.svg')}
.notation-figurine[data-piece="queen"]{--asset-scale:1.186944;--piece-aspect:0.961424;--notation-piece:url('./tablero/piezassilicio/wQ.svg')}
.notation-figurine[data-piece="queen"][data-color="black"]{--notation-piece:url('./tablero/piezassilicio/bQ.svg')}
.notation-figurine[data-piece="rook"]{--asset-scale:1.315789;--piece-aspect:0.657895;--notation-piece:url('./tablero/piezassilicio/wR.svg')}
.notation-figurine[data-piece="rook"][data-color="black"]{--notation-piece:url('./tablero/piezassilicio/bR.svg')}
.notation-figurine[data-piece="bishop"]{--asset-scale:1.190476;--piece-aspect:0.553571;--notation-piece:url('./tablero/piezassilicio/wB.svg')}
.notation-figurine[data-piece="bishop"][data-color="black"]{--notation-piece:url('./tablero/piezassilicio/bB.svg')}
.notation-figurine[data-piece="knight"]{--asset-scale:1.246106;--piece-aspect:0.697819;--notation-piece:url('./tablero/piezassilicio/wN.svg')}
.notation-figurine[data-piece="knight"][data-color="black"]{--notation-piece:url('./tablero/piezassilicio/bN.svg')}
.notation-figurine[data-piece="pawn"]{--asset-scale:1.315789;--piece-aspect:0.641447;--notation-piece:url('./tablero/piezassilicio/wP.svg')}
.notation-figurine[data-piece="pawn"][data-color="black"]{--notation-piece:url('./tablero/piezassilicio/bP.svg')}
.app-header,.app-footer,.takeaway,.moves button.active,.board-toolbar,.notation-dark{--notation-halo:#f3f5e9}

:is(.app-header,.app-footer,.takeaway,.moves button.active,.board-toolbar,.notation-dark) .notation-figurine[data-color="black"]{filter:drop-shadow(.45px 0 0 #f3f5e9) drop-shadow(-.45px 0 0 #f3f5e9) drop-shadow(0 .45px 0 #f3f5e9) drop-shadow(0 -.45px 0 #f3f5e9)}
