/* Warm wood and honey-yellow pieces from the project photograph. */
:root {
  --paper:#faf6ed;
  --surface:#fffcf6;
  --ink:#35281e;
  --muted:#685a49;
  --line:#daceb9;
  --pine:#6b421d;
  --pine-soft:#f5e7c9;
  --focus:#885212;
  --glow-rgb:164 109 31;
  --honey:#edba50;
  --honey-hover:#e4a735;
  --ochre:#975a0c;
  --control-line:#8c785b;
}
.method p { margin-top:.85rem; color:var(--muted); }
[hidden] { display:none !important; }
.filters { margin:0 0 1.4rem; padding:1rem 1.2rem 1.25rem; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.85rem 1.15rem; min-width:0; border:1px solid var(--line); border-radius:.65rem; }
.filters label { display:block; margin:0 0 .3rem; font-size:.875rem; font-weight:600; }
#custom-size { margin-top:.5rem; }
.select-shell { position:relative; display:block; }
.select-shell::after { content:""; width:.47rem; height:.47rem; border:solid var(--pine); border-width:0 1.6px 1.6px 0; position:absolute; right:1.05rem; top:50%; transform:translateY(-70%) rotate(45deg); pointer-events:none; }
.select-shell select, .filters input { display:block; box-sizing:border-box; width:100%; height:2.8rem; border:1px solid var(--control-line); border-radius:.45rem; background:var(--surface); color:var(--ink); font:inherit; }
.select-shell select { appearance:none; -webkit-appearance:none; padding:0 2.75rem 0 .85rem; }
.filters input { padding:0 .85rem; }
@media(forced-colors:active) { .select-shell select { appearance:auto; } .select-shell::after { display:none; } }
.workspace { display:grid; grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr); grid-template-areas:"quiz list"; align-items:start; gap:clamp(1rem,2vw,1.8rem); }
.quiz-panel,.results { border-radius:.75rem; padding:clamp(1.15rem,2.7vw,2rem); }
.quiz-panel { background:var(--pine-soft); position:sticky; top:1rem; }
.results { background:var(--surface); box-shadow:var(--surface-shadow); }
#step,#count { font-size:.875rem; color:var(--muted); }
#step { margin-bottom:.6rem; }
#question { font-size:clamp(1.5rem,2.7vw,2.15rem); }
.answers,.quiz-actions,.result-controls { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.answers { margin-top:1.1rem; }
:where(.answers button,#retry) { min-height:44px; padding:.45rem .95rem; border:0; border-radius:.4rem; background:var(--surface); box-shadow:0 2px 6px rgb(var(--glow-rgb) / 8%); }
.quiz-actions button { margin-top:.55rem; min-height:40px; padding:.25rem .35rem .25rem 0; background:transparent; border:0; color:var(--pine); text-decoration:underline; text-underline-offset:.2em; }
.results h2 { font-size:clamp(1.5rem,2.4vw,2rem); }
#count { margin-top:.25rem; }
.result-controls { margin:.85rem 0; justify-content:space-between; gap:.5rem 1rem; }
.limit,.model { display:flex; align-items:center; gap:.45rem; font-size:.9rem; }
.limit .select-shell { min-width:5.1rem; }
.model { cursor:pointer; }
.model input { width:1.1rem; height:1.1rem; accent-color:var(--pine); }
#games { list-style:none; counter-reset:game; margin:0; padding:0; }
#games li { display:grid; grid-template-columns:1.9rem minmax(0,1fr) auto; align-items:start; gap:.35rem .45rem; padding:1rem 0; border-top:1px solid var(--line); counter-increment:game; }
#games li::before { content:counter(game,decimal-leading-zero); font:italic 1.15rem var(--serif); color:var(--muted); }
#games a { font-weight:650; overflow-wrap:anywhere; }
#games .facts,#games .reasons,#games details { display:block; font-size:.86rem; color:var(--muted); margin-top:.3rem; }
#games summary { color:var(--pine); width:fit-content; }
#games details p { margin-top:.3rem; overflow-wrap:anywhere; }
#games img { width:clamp(3.3rem,6vw,4.6rem); height:4.5rem; object-fit:contain; border-radius:.25rem; }
.method { margin-top:1.4rem; }
.method p { max-width:76ch; }
.method summary { width:fit-content; color:var(--pine); font-weight:600; }
.method a { display:inline-block; margin-top:.8rem; }
@media(max-width:760px) { .filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .quiz-panel { position:static; } }
@media(max-width:400px) { .filters { padding-inline:.7rem; gap:.6rem; } #games li { grid-template-columns:1.35rem minmax(0,1fr) auto; } }

.opening { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.85fr); align-items:center; gap:clamp(2rem,6vw,6rem); padding:clamp(1.75rem,4.5vw,4rem) 0; }
.intro { max-width:58ch; }
.intro h1 { max-width:16ch; }
.intro h1 em { color:var(--ochre); font-weight:400; }
.intro > p { color:var(--muted); margin:1rem 0 .65rem; font-size:clamp(1.02rem,1.5vw,1.19rem); }
.method a { font-weight:600; }
.intro .primary { margin-top:.65rem; }

.game-night { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; border-radius:.4rem 2rem .4rem .4rem; }
.photo-credit { margin-top:.35rem; font-size:.78rem; color:var(--muted); }
.photo-credit a { color:inherit; }
.setup { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(1.2rem,5vw,4rem); align-items:start; padding:clamp(1.5rem,3vw,2.4rem) 0; border-top:1px solid var(--line); scroll-margin-top:1rem; }
.setup-copy p { margin:.65rem 0 0; max-width:50ch; color:var(--muted); }
.filters { border:0; padding:0; margin:0 0 1.1rem; grid-template-columns:repeat(2,minmax(0,1fr)); }

.advanced { grid-column:1/-1; }
.advanced summary { width:fit-content; font-size:.9rem; text-underline-offset:.2em; }
.extra-fields { margin-top:.8rem; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.go,#clear { min-height:44px; border-radius:.4rem; padding:.55rem 1.1rem; font-weight:650; }
.intro .primary,.go,#clear { color:var(--ink); background:var(--honey); border:0; }
@media (hover: hover) and (pointer: fine) {
  .intro .primary:hover,.go:hover,#clear:hover { background:var(--honey-hover); }
  .answers button:hover,#retry:hover { background:#f9dca0; }
}
#status { margin:1rem 0; }
.selection-head { border-top:1px solid var(--line); padding-top:1.7rem; margin-bottom:1.2rem; }
#selection,#list,#method,#results-title { scroll-margin-top:1rem; }
.results { grid-area:list; }
.list-title,#refine-title { font:400 clamp(1.55rem,2.4vw,2rem)/1.2 var(--serif); }
.quiz-panel { grid-area:quiz; }
#refine-help,#hint { margin:.55rem 0 .9rem; color:var(--muted); }
.rank-settings { margin-block:.6rem 1rem; }
#model-help { max-width:60ch; color:var(--muted); font-size:.9rem; }
.rank-settings summary { color:var(--pine); width:fit-content; font-size:.9rem; }
.selection-head a { display:inline-block; margin-top:.4rem; font-size:.9rem; }
#question { font:400 clamp(1.4rem,2.3vw,1.9rem)/1.22 var(--serif); }
#hint,#feedback { font-size:.92rem; }
#feedback:not(:empty) { border-top:1px solid var(--line); padding-top:.8rem; margin-top:.75rem; }
.method { border-top:1px solid var(--line); padding-top:1.4rem; }
@media(max-width:760px) {
  .opening,.setup { grid-template-columns:1fr; gap:1.3rem; }
  .game-night { aspect-ratio:1.8; }
  .workspace { grid-template-columns:1fr; grid-template-areas:"quiz" "list"; }
  .intro h1 { max-width:19ch; }
}
.empty-list .workspace { grid-template-columns:1fr; grid-template-areas:"list"; }
