.lg {background:#f5f4ee;color:#143943;padding:24px 0 68px;--ink:#133a43;--soft:#d7e0d6;--mint:#91dec9}
.lg-wrap {width:min(94%,1024px);margin:auto}
.game-genres {margin:1.2rem 0 2rem;scroll-margin-top:5rem}
.game-genres h2 {font:400 clamp(1.55rem,2.8vw,2.15rem)/1.15 Georgia,serif;margin:.5rem 0 .7rem}
.game-genres>div {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.game-genres article {display:flex;flex-direction:column;border:1px solid #bbccc3;color:#153e43;background:#fffefa;border-radius:8px;overflow:hidden}
.game-genres .game-choice {flex:1;color:inherit;text-decoration:none}
.game-genres .game-related {display:flex;align-items:center;min-height:44px;margin:0 .85rem;border-top:1px solid #c9d8cf;color:#0a554f;font-weight:600;text-underline-offset:.2em}
.game-genres a:focus-visible {outline:3px solid #b45e20;outline-offset:-3px}
.game-genres a:hover strong,.game-genres a:focus-visible strong {text-decoration:underline;text-underline-offset:.18em}
.game-genres img {width:100%;height:auto;aspect-ratio:2.6;object-fit:cover;display:block}
.game-genres a>div {padding:.7rem .85rem}
.game-genres small,.game-genres strong,.game-genres span {display:block}
.game-genres small {color:#235b56;font-weight:700}
.game-genres strong {font:400 1.38rem/1.15 Georgia,serif;margin:.35rem 0}
.game-genres span {line-height:1.4}
@media(max-width:640px){.game-genres>div{grid-template-columns:1fr}.game-genres .game-choice{display:grid;grid-template-columns:minmax(56px,23%) minmax(0,1fr)}.game-genres img{height:100%;min-height:90px}}
.lg [hidden] {display:none!important}
.lg .lg-back {display:inline-block;color:#23615d;font-weight:650;font-size:.9rem;text-underline-offset:4px}
.lg-head {display:flex;gap:2rem;align-items:end;justify-content:space-between;margin:22px 0}
.lg .lg-head h1 {font:normal clamp(2.75rem,6vw,5.4rem)/.96 Georgia,serif;color:var(--ink);letter-spacing:-.052em;margin:0}
.lg-head p {max-width:31ch;margin:0;line-height:1.48;color:#3d5559}
.lg-picker {display:inline-flex;flex-wrap:wrap;max-width:100%;gap:4px;padding:4px;background:#e5e9df;border:1px solid #c6d2c8;border-radius:12px;margin:0 0 17px}
.lg-picker a {border-radius:8px;text-decoration:none;color:#234b4b;font-weight:700;padding:10px 16px;line-height:1.25;text-align:center}
.lg-picker a[aria-current] {background:var(--ink);color:white}
.lg-game,.lg-final {background:#fffefa;border:1px solid #bdccc2;border-radius:18px;padding:clamp(14px,2.8vw,30px);box-shadow:0 10px 25px #173f4310}
.lg-brief {display:flex;justify-content:space-between;gap:15px;align-items:start;margin-bottom:17px}
.lg-brief small,.lg-final small {font-size:.76rem;color:#27635b;font-weight:750;letter-spacing:.075em;text-transform:uppercase}
.lg-brief h2,.lg-final h2 {font:normal clamp(1.65rem,3.2vw,2.6rem)/1.08 Georgia,serif;letter-spacing:-.035em;color:var(--ink);margin:4px 0 7px}
.lg-brief p {margin:0;line-height:1.45;max-width:74ch;color:#385353}
.lg button {font:inherit;cursor:pointer}
.lg .lg-reset {background:transparent;border:1px solid #bacdc3;border-radius:6px;min-height:40px;padding:5px 12px;color:#2c5553;font-size:.85rem;flex:none}
.lg-surface {background:#0f2c38;border:1px solid #153d46;border-radius:12px;overflow:hidden}
.lg-board {position:relative;width:100%;height:clamp(190px,29vw,292px);overflow:hidden}
.lg-board[data-mode=mirror] {height:auto;width:min(100%,550px);aspect-ratio:7/5;margin:auto;border-inline:1px solid #36525b}
.lg-board canvas,.lg-pieces {position:absolute;inset:0;width:100%;height:100%}
.lg-pieces {pointer-events:none}
.lg .lg-pieces button {border:1.5px solid #9cc8c6;border-radius:7px;position:absolute;transform:translate(-50%,-50%);pointer-events:auto;font-weight:750;color:#f1fffb;background:#123a46;display:grid;place-items:center;line-height:1}
.lg .lg-socket {width:clamp(34px,5vw,53px);height:clamp(34px,4vw,40px)}
.lg .lg-socket[aria-pressed=true] {background:#ffe19c;color:#203943;border-color:#ffecbb;box-shadow:0 0 16px #ffd58d50}
.lg .lg-socket[aria-pressed=true]::after{content:"";position:absolute;top:4px;right:4px;width:4px;height:7px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg)}
.lg .lg-mirror {width:clamp(32px,7.4vw,46px);height:clamp(32px,7.4vw,46px);text-align:start;align-items:end;justify-items:start;padding:2px 4px;font-size:.65rem;color:#a5ecdc}
.lg .lg-mirror::before {content:'';position:absolute;width:83%;height:4px;background:#8ee2d2;box-shadow:0 0 6px #a2f6e750;left:8.5%;top:calc(50% - 2px);transform:rotate(45deg);border-radius:2px}
.lg .lg-mirror[data-slash=up]::before {transform:rotate(-45deg)}
.lg .lg-mirror[data-slash=up] {justify-items:end}
.lg a:focus-visible,.lg button:focus-visible,.lg summary:focus-visible {outline:3px solid #bb6408;outline-offset:3px}
.lg-pieces button:focus-visible {outline-color:white}
.lg-readings {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #456168;color:white}
.lg-board[data-mode=mirror]+.lg-readings {grid-template-columns:2fr 1fr}
.lg-readings>div {min-width:0;padding:10px clamp(9px,2vw,21px);border-right:1px solid #37545c}
.lg-readings>div:last-child {border-right:0}
.lg-readings span,.lg-readings strong {display:block}
.lg-readings span {font-size:.8rem;color:#b6d7ce;line-height:1.28}
.lg-readings strong {font-size:clamp(1.15rem,2.2vw,1.65rem);font-variant-numeric:tabular-nums;color:#fff7da}
.lg-board[data-mode=mirror]+.lg-readings strong {font-size:.92rem;line-height:1.45;margin-top:3px}
.lg-instructions {margin:12px 0;font-size:.94rem;color:#354e51}
.lg-plan {margin:0 0 12px;color:#245b55;font-size:.9rem}.lg-plan summary {cursor:pointer;text-decoration:underline;text-underline-offset:3px}.lg-plan p {margin:8px 0;line-height:1.5}
.lg-picker a {scroll-margin-top:90px}
.lg-feedback {border-top:1px solid #d3ddd4;padding-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.lg-feedback p,.lg-final p {margin:0;line-height:1.48}
.lg-success {color:#11584b;font-weight:650}
.lg-feedback button,.lg-final button {background:#165750;border:1px solid #165750;border-radius:7px;color:white;padding:10px 15px;min-height:44px;font-weight:650}
.lg-feedback button {flex:none}
.lg-final {max-width:80ch}
.lg-final h2 {margin:10px 0 18px}
.lg-answers {display:grid;gap:8px}
.lg-answers button {text-align:left;background:#eff4ec;color:#174941;border-color:#b7cabe}
.lg-final p:not(:empty) {margin:14px 0}
.lg-final [data-finish] {display:flex;flex-wrap:wrap;gap:8px}
.lg-notes {margin-top:24px}
.lg-notes h2 {font-size:1.22rem;margin:0 0 10px;color:var(--ink)}
.lg-notes details {border-top:1px solid #bfccc2}
.lg-notes summary {padding:11px 2px;cursor:pointer;color:#224f4e;font-weight:650}
.lg-notes p {max-width:74ch;margin:0 0 12px;line-height:1.5}
.lg-notes a {color:#0d6257;text-underline-offset:3px}
.sg-controls {display:flex;flex-wrap:wrap;gap:7px;margin:0 0 15px;padding:0;min-width:0;border:0}
.sg-controls legend {margin:0 0 6px;padding:0;font-size:.87rem;font-weight:650;color:#2c4f4e}
.lg .sg-controls button {display:inline-flex;align-items:center;gap:8px;min-height:42px;border:1px solid #a9bcb2;border-radius:7px;padding:6px 14px;background:#f6f7f0;color:#1d4844;font-weight:650}
.lg .sg-controls button[aria-pressed=true] {background:#164c4a;border-color:#164c4a;color:#fff}
.lg .sg-controls button[aria-pressed=true],.lg a[data-select][aria-current=true]{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.23em}
.sg-controls [data-band] i {width:12px;height:12px;border-radius:50%;background:#d95143;box-shadow:inset 0 0 0 1px #172a3150}
.sg-controls [data-band="1"] i {background:#61aa75}.sg-controls [data-band="2"] i {background:#609ae5}
.sg-tray {--sg-source:#334783;position:relative;isolation:isolate;overflow:hidden;background:#142f36;border:1px solid #273e43;border-radius:12px;padding:clamp(20px,3vw,34px) clamp(12px,5vw,60px) 0}
.sg-tray::before {content:'';pointer-events:none;position:absolute;z-index:-1;inset:0;background:radial-gradient(ellipse at 50% -10%,color-mix(in srgb,var(--sg-source) 38%,transparent),transparent 72%),repeating-linear-gradient(90deg,#ffffff03 0 1px,transparent 1px 32px)}
.sg-rail {position:relative;background:#45595e;height:12px;width:65%;margin:0 auto clamp(20px,4vw,42px);border:3px solid #1d272d;border-radius:10px;box-shadow:0 4px 4px #040d1840}
.sg-rail::before {display:block;content:'';height:100%;border-radius:8px;background:color-mix(in srgb,var(--sg-source),#fff 48%);box-shadow:0 2px 10px var(--sg-source)}
.sg-samples {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(8px,2.4vw,28px);max-width:700px;margin:0 auto 20px}
.sg-pair {grid-template-columns:repeat(2,minmax(0,1fr));max-width:480px}
.lg .sg-card {display:flex;flex-direction:column;align-items:center;min-width:0;padding:clamp(8px,1.8vw,18px) 4px 10px;border:1px solid #597077;border-radius:8px;background:#142a31;color:#fff}
.lg button.sg-card:not(:disabled):hover {border-color:#b6e6d5;background:#1c3840}
.sg .sg-card:focus-visible {outline-color:#ffe3a2}
.lg .sg-card.sg-picked {outline:2px solid #9de5c9;outline-offset:-1px}
.lg .sg-card:disabled,.lg .sg-controls button:disabled {opacity:1;cursor:default}
.sg-paper {position:relative;display:grid;place-items:center;width:78%;aspect-ratio:1.55;background:#c3cfca;border-radius:3px;box-shadow:0 3px 0 #738885,0 6px 10px #071a23a0;margin:2px 0 14px}
.sg-paper::after {content:'';position:absolute;bottom:8%;left:12%;width:18%;height:4%;background:repeating-linear-gradient(90deg,#5b6a6a 0 1px,transparent 1px 3px)}
.sg-paper i {display:block;width:77%;height:62%;background:var(--sg-ink);border-radius:1px;margin-bottom:4%}
.sg-card b {font-size:clamp(.85rem,1.5vw,1.04rem);color:#e5eee8}.sg-reading {font:600 clamp(1rem,2.6vw,1.6rem)/1.4 "Segoe UI",sans-serif;color:#ffe6a7;font-variant-numeric:tabular-nums}
.sg-legend {border-top:1px solid #4a6267;color:#cdded8;font-size:.83rem;line-height:1.35;padding:10px 0;display:flex;gap:2px 20px;justify-content:space-between;flex-wrap:wrap}
.sg .lg-feedback {border:0;margin-top:3px}
.sg-application {border-top:1px solid #c3d4c9;margin-top:14px;padding-top:12px;color:#244c47}
.sg-application summary {cursor:pointer;font-weight:650}.sg-application p {max-width:65ch;margin:8px 0}.sg-application a {color:#0c665b;text-underline-offset:3px}
@media(max-width:620px){
  .lg {padding-top:16px}.lg-wrap {width:calc(100% - 24px)}
  .lg-head {display:block;margin:16px 0}.lg-head p {margin-top:8px;max-width:48ch}
  .lg-game,.lg-final {border-radius:12px}.lg-picker a {font-size:.89rem;padding:9px 11px}
  .lg-brief {display:grid;grid-template-columns:1fr auto;gap:4px 8px}.lg-brief>div {display:contents}
  .lg-brief h2,.lg-brief p {grid-column:1/-1}.lg-brief .lg-reset {grid-column:2;grid-row:1;font-size:.76rem;min-height:30px}
  .lg-brief small {align-self:center}.lg-feedback {display:block}.lg-feedback button {margin-top:12px}
  .lg-readings>div {padding:8px 5px}.lg-readings span {font-size:.72rem}
}
.lg-notes p > a {display:inline-block;min-height:32px;padding-block:5px;line-height:1.45}
