/* Shared presentation only: no chess rules, lesson progress, identity or network. */
html[data-adventure-theme="sunshine"]{--ep-bg:#fffaf0;--ep-panel:#ffffff;--ep-soft:#ffebdc;--ep-ink:#18394b;--ep-muted:#425665;--ep-edge:#d3cdbd;--ep-accent:#f9bf4c;--ep-on:#243849;--ep-tone:#a74730;--ep-light:#fff1d2;--ep-dark:#80b9b3;--ep-frame:#f5d99c;--ep-coord:#284b51;--ep-select:#943c1d;}
html[data-adventure-theme="arcade"]{--ep-bg:#f1f6ff;--ep-panel:#ffffff;--ep-soft:#deebff;--ep-ink:#193459;--ep-muted:#405773;--ep-edge:#b5cbed;--ep-accent:#ffd544;--ep-on:#193459;--ep-tone:#2656ba;--ep-light:#fff5dc;--ep-dark:#88b3e7;--ep-frame:#2b58b9;--ep-coord:#ffffff;--ep-select:#963d15;}
html[data-adventure-theme="explorer"]{--ep-bg:#f2f8ed;--ep-panel:#ffffff;--ep-soft:#deefdb;--ep-ink:#1c4438;--ep-muted:#3f5d4e;--ep-edge:#bbd5c0;--ep-accent:#f7c358;--ep-on:#244035;--ep-tone:#236b49;--ep-light:#f9f2d8;--ep-dark:#87b49a;--ep-frame:#e4ce94;--ep-coord:#28513d;--ep-select:#90421f;}
html[data-adventure-theme="royal"]{--ep-bg:#f9f4ff;--ep-panel:#ffffff;--ep-soft:#ebdff8;--ep-ink:#3e2958;--ep-muted:#5a466d;--ep-edge:#d3bee6;--ep-accent:#ffd16a;--ep-on:#432a5e;--ep-tone:#7746a2;--ep-light:#fff0db;--ep-dark:#b5a0d0;--ep-frame:#72518c;--ep-coord:#ffffff;--ep-select:#853f1d;}

html[data-adventure-theme]{color-scheme:light;--bg:var(--ep-bg);--deep:var(--ep-bg);--ink:var(--ep-ink);--cream:var(--ep-ink);--muted:var(--ep-muted);--line:var(--ep-edge);--gold:var(--ep-tone);--teal:var(--ep-tone);--accent:var(--ep-tone);background:var(--ep-bg)}html[data-adventure-theme] body{color:var(--ep-ink);background:var(--ep-bg)}
/* Plain controls and surfaces use a common readable light palette. */
html[data-adventure-theme] :is(button,select,input){color:var(--ep-ink);border-color:var(--ep-edge)}html[data-adventure-theme] :is(button:not(.tile):not(.square),select,input){background:var(--ep-panel)}html[data-adventure-theme] :is(.primary,.cta,.path-option[aria-pressed=true],.journey-nav a[aria-current=page]){background:var(--ep-accent);color:var(--ep-on);border-color:var(--ep-accent);box-shadow:0 3px 0 color-mix(in srgb,var(--ep-accent),#735526 25%)}html[data-adventure-theme] :is(.brand small,.provider,.footer,.home-footer,.local-note,footer,.micro,.available,.home-heading p,.map-note,.round-note,.muted,.small.muted){color:var(--ep-muted)}html[data-adventure-theme] :is(.eyebrow,.text-link,.text-button,.tiny-link,.passport-shortcut,.cinema,.home-footer a,.footer a){color:var(--ep-tone)}
html[data-adventure-theme] :is(.return-card,.player-level,.learning-links a,.path-option,.mission,.topic-card,.map-guide,.lesson-guide,.path-summary,.coach-panel,.skill-row,.keepsake,.field-card,.harbor-route,.play-controls button,.game-toolbar button,.promotion,.game-card,.empty-state,.challenge-panel,.move-book,.turn-card,.your-friend-code,.search-status,.stats,.other-view,.journey-nav,.storycard,.options-menu,.value-card,.cinema,.finale-panel){background:var(--ep-panel);border-color:var(--ep-edge);color:var(--ep-ink);box-shadow:0 3px 0 color-mix(in srgb,var(--ep-edge),transparent 65%)}html[data-adventure-theme] :is(.return-card small,.player-level small,.path-option small,.path-picker p,.grade p,.mission p,.mission small,.topic-card small,.map-guide p,.lesson-guide small,.path-summary small,.coach-panel div span,.skill-row p,.keepsake p,.field-card p,.game-detail,.game-toolbar,.chapter-status,.exp-feedback,.game-note,.topic-card .go,.empty-state p,.game-card-copy small,.game-card-end,.invitation small,.notice small,.notice em,.format-option small,.opponent-preview small,.turn-card p:not(.eyebrow),.turn-card>small,.deadline span,.stats span,.identity small,.other-view small,.boardnote,.board-note,.storycard p,.notecontent,.quest p,.field-card details p){color:var(--ep-muted)}html[data-adventure-theme] :is(.format-option,.play-methods button,.identity){background:var(--ep-soft);border-color:var(--ep-edge);color:var(--ep-ink)}html[data-adventure-theme] :is(.format-option[aria-pressed=true],.play-methods button[aria-pressed=true],.avatar-choices button[aria-pressed=true]){border:2px solid var(--ep-tone);background:var(--ep-soft);color:var(--ep-ink)}html[data-adventure-theme] :is(.stats b,.game-status,.seat-tag,.your-friend-code b,.result,.deadline b,.topic-card .go,.format-option>span,.quest-top a,.chapter-intro .eyebrow){color:var(--ep-tone)}html[data-adventure-theme] :is(.exp-choices button,.choices .answer){background:var(--ep-panel);color:var(--ep-ink);border-color:var(--ep-edge)}html[data-adventure-theme] :is(.feedback.success,.exp-feedback.success,.message.success){color:#236447}html[data-adventure-theme] :is(.feedback.error,.exp-feedback.error,.message.error){color:#a13b24}html[data-adventure-theme] :is(.answer.correct,.exp-choices button.correct){background:#dcf1df;color:#204b32;border-color:#32744a}html[data-adventure-theme] :is(.answer.wrong,.exp-choices button.wrong){background:#ffe2d6;color:#823821;border-color:#a24e31}html[data-adventure-theme] :is(.step-progress .reached,.quest-progress i.reached){background:var(--ep-tone)}
/* Board colors never alter the cast, square geometry, legal moves or teaching markers. */
html[data-adventure-theme] :is(.board,.miniboard){border-color:var(--ep-frame);background:var(--ep-frame)}html[data-adventure-theme] .board-wrap{background:var(--ep-frame);border-color:var(--ep-edge)}html[data-adventure-theme] :is(.tile.light,.square:not(.dark),.tile:not(.dark)){background:var(--ep-light)}html[data-adventure-theme] :is(.tile.dark,.square.dark){background:var(--ep-dark)}html[data-adventure-theme] :is(.tile.selected,.square.current){background:#f0ca75;box-shadow:inset 0 0 0 3px var(--ep-select)}html[data-adventure-theme] .tile.last{background:#e7d19b}html[data-adventure-theme] :is(.tile.target,.square.goal){box-shadow:inset 0 0 0 3px var(--ep-select)}html[data-adventure-theme] .tile.hinted{box-shadow:inset 0 0 0 3px #286552}html[data-adventure-theme] :is(.coordinate,.coord){color:#244339}html[data-adventure-theme] .board .piece-art{filter:drop-shadow(0 2px 1px #18374533)}
/* Keep artwork captions light on their dark artwork. */
html[data-adventure-theme] :is(.harbor-feature,.harbor-feature .eyebrow,.harbor-feature h2,.harbor-chapter,.cover-label,.cover-label .eyebrow,.cover-label h1,.cover-label p,.entry-art figcaption){color:#fff0d1}html[data-adventure-theme] .entry-art figcaption{color:var(--ep-tone)}html[data-adventure-theme] .harbor-feature p{color:#e1eded}html[data-adventure-theme] .harbor-feature b{color:#ffdc77}html[data-adventure-theme] :is(.worldtag,.viewtag,.stage-top,.stage-bottom,.chapterrow){color:#fff0d1}html[data-adventure-theme] .demo-strip{background:var(--ep-soft);border-color:var(--ep-edge);color:var(--ep-ink)}html[data-adventure-theme] .demo-strip>span:last-child{color:var(--ep-muted)}html[data-adventure-theme] .masthead .brand small{color:var(--ep-muted)}
/* Home layouts: same destinations and progress, different presentation. */
html[data-adventure-theme] .home-heading{margin:24px 0 18px}html[data-adventure-theme] .home-heading h1{font-size:36px;margin:10px 0}html[data-adventure-theme] .grades{grid-template-columns:repeat(3,minmax(0,1fr));max-width:1000px}html[data-adventure-theme] .grade.playable{background:var(--ep-panel);border-color:var(--ep-edge);color:var(--ep-ink);min-height:210px;padding:20px;box-shadow:0 4px 0 color-mix(in srgb,var(--ep-edge),transparent 45%)}html[data-adventure-theme] .grade.playable h2{color:var(--ep-ink)}html[data-adventure-theme] .grade.playable p{color:var(--ep-muted)}html[data-adventure-theme] .grade.playable .status{color:var(--ep-ink);background:var(--ep-soft);padding:8px 10px;font-size:10px}html[data-adventure-theme] .grade .number{color:var(--ep-muted);border-color:var(--ep-edge)}html[data-adventure-theme] .path-picker h2{font-size:17px}html[data-adventure-theme] .player-level select{color:var(--ep-ink);background:var(--ep-panel)}html[data-adventure-theme] .player-level{margin-bottom:16px}html[data-adventure-theme=sunshine] .grade:nth-child(2){background:#e2f3f1}html[data-adventure-theme=sunshine] .grade:nth-child(3){background:#fce9c6}html[data-adventure-theme=sunshine] .grade:nth-child(4){background:#ede6fd}html[data-adventure-theme=sunshine] .grade:nth-child(5){background:#ffe3da}html[data-adventure-theme=sunshine] .grade:nth-child(6){background:#e4edfc}
html[data-adventure-theme=arcade] :is(.home-heading h1,.world-heading h1,.entry-copy h1){font-family:'Avenir Next',system-ui,sans-serif;font-weight:850;letter-spacing:-1px}html[data-adventure-theme=arcade] .grades{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-adventure-theme=arcade] .grade{display:grid;grid-template-columns:68px 1fr;column-gap:14px;min-height:150px}html[data-adventure-theme=arcade] .grade .home-cast{grid-row:1/4;width:65px;height:76px;margin:0;align-self:center}html[data-adventure-theme=arcade] .grade .number{display:none}html[data-adventure-theme=arcade] .grade h2{font:850 23px 'Avenir Next',system-ui;margin:2px 0 5px}html[data-adventure-theme=arcade] .grade .status{justify-self:start;margin-top:6px}html[data-adventure-theme=arcade] .grade p{margin-bottom:0}
html[data-adventure-theme=explorer] .grades{grid-template-columns:1fr;gap:12px;padding-left:12px;position:relative;max-width:800px}html[data-adventure-theme=explorer] .grades:before{content:'';position:absolute;left:34px;top:20px;bottom:20px;border-left:3px dashed #7eae90;z-index:0}html[data-adventure-theme=explorer] .grade{display:grid;grid-template-columns:60px 1fr auto;column-gap:15px;min-height:102px;position:relative;align-items:center;padding:12px 18px}html[data-adventure-theme=explorer] .grade:nth-child(even){margin-left:20px}html[data-adventure-theme=explorer] .grade .home-cast{grid-row:1/3;width:52px;height:62px;margin:0}html[data-adventure-theme=explorer] .grade h2{margin:0;font-size:25px}html[data-adventure-theme=explorer] .grade p{grid-column:2;margin:5px 0 0}html[data-adventure-theme=explorer] .grade .status{grid-column:3;grid-row:1/3;align-self:center;margin:0}html[data-adventure-theme=explorer] .grade .number{display:none}
html[data-adventure-theme=royal] .grade{border-radius:55px 55px 18px 18px;text-align:center;align-items:center}html[data-adventure-theme=royal] .grade:nth-child(2n){background:#ffe6e5}html[data-adventure-theme=royal] .grade:nth-child(3n){background:#fff0bd}html[data-adventure-theme=royal] .grade .number{right:8px;top:35px}html[data-adventure-theme=royal] .harbor-feature{border-radius:60px 60px 20px 20px;border-color:#9b78be}html[data-adventure-theme=royal] .harbor-feature:after{background:linear-gradient(90deg,#3c1c6af2,#351d5544)}
/* Shared preference chooser, accessible from the same location on every play page. */
.look-button{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;padding:8px 11px!important;min-height:40px;border:1px solid var(--ep-edge)!important;border-radius:25px!important;background:var(--ep-panel)!important;color:var(--ep-ink)!important;font:750 11px 'Avenir Next',system-ui!important;white-space:nowrap}.look-button .look-avatar{width:24px;height:27px;display:block}.look-button svg{width:100%;height:100%}.look-settings{width:min(94vw,530px);max-height:92svh;padding:23px;border:1px solid var(--ep-edge);border-radius:23px;background:var(--ep-bg);color:var(--ep-ink);overflow:auto;box-shadow:0 20px 90px #12253655}.look-settings::backdrop{background:#102b3c99;backdrop-filter:blur(4px)}.look-settings h2{font:700 29px/1.15 Georgia;margin:0 0 9px;letter-spacing:-.6px}.look-settings .look-intro{font-size:12px;line-height:1.6;color:var(--ep-muted);margin:0 0 19px}.look-settings fieldset{border:0;margin:0;padding:0}.look-settings legend{font-weight:800;font-size:13px;margin-bottom:10px}.look-themes{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:22px}.look-theme{border:1px solid var(--ep-edge);border-radius:15px;padding:12px!important;min-height:123px;text-align:left;display:flex;flex-direction:column;gap:6px;position:relative;background:var(--ep-panel)!important}.look-theme b{font-size:12px;line-height:1.4;padding-right:8px}.look-theme small{font-size:10px;line-height:1.4;color:var(--ep-muted);font-weight:400}.look-theme[aria-pressed=true]{outline:2px solid var(--ep-tone);outline-offset:0}.look-theme[aria-pressed=true]:after{content:'✓';position:absolute;right:8px;top:10px;color:var(--ep-tone);font-weight:900}.look-swatches{display:flex;gap:4px;margin-bottom:3px}.look-swatches i{width:20px;height:15px;border-radius:4px;border:1px solid #18334d33}.look-theme[data-look=sunshine] .look-swatches i:nth-child(1){background:#fffaf0}.look-theme[data-look=sunshine] .look-swatches i:nth-child(2){background:#a74730}.look-theme[data-look=sunshine] .look-swatches i:nth-child(3){background:#f9bf4c}.look-theme[data-look=sunshine] .look-swatches i:nth-child(4){background:#80b9b3}.look-theme[data-look=arcade] .look-swatches i:nth-child(1){background:#f1f6ff}.look-theme[data-look=arcade] .look-swatches i:nth-child(2){background:#2656ba}.look-theme[data-look=arcade] .look-swatches i:nth-child(3){background:#ffd544}.look-theme[data-look=arcade] .look-swatches i:nth-child(4){background:#88b3e7}.look-theme[data-look=explorer] .look-swatches i:nth-child(1){background:#f2f8ed}.look-theme[data-look=explorer] .look-swatches i:nth-child(2){background:#236b49}.look-theme[data-look=explorer] .look-swatches i:nth-child(3){background:#f7c358}.look-theme[data-look=explorer] .look-swatches i:nth-child(4){background:#87b49a}.look-theme[data-look=royal] .look-swatches i:nth-child(1){background:#f9f4ff}.look-theme[data-look=royal] .look-swatches i:nth-child(2){background:#7746a2}.look-theme[data-look=royal] .look-swatches i:nth-child(3){background:#ffd16a}.look-theme[data-look=royal] .look-swatches i:nth-child(4){background:#b5a0d0}.look-characters{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin-bottom:20px}.look-character{padding:7px 2px!important;border:1px solid var(--ep-edge);background:var(--ep-panel);border-radius:12px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px}.look-character svg{width:35px;height:42px}.look-character span{font-size:8px}.look-character[aria-pressed=true]{outline:2px solid var(--ep-tone)}.look-actions{display:flex;gap:8px}.look-actions button{flex:1}.look-save{background:var(--ep-accent)!important;color:var(--ep-on)!important;font-weight:850;border-color:var(--ep-accent)!important}.look-status{font-size:10px;color:var(--ep-muted);line-height:1.5;min-height:15px;margin:12px 0 0}.topbar{flex-wrap:wrap}.topbar .brand{margin-right:auto}.topbar #install-help{width:40px;min-height:40px;padding:8px;font-size:0}.topbar #install-help:after{content:'↗';font-size:18px;color:var(--ep-ink)}.app-header,.journey-header,.masthead{flex-wrap:wrap}.app-header .header-controls{flex-wrap:wrap;justify-content:flex-end}.journey-header .look-button{margin-left:auto}.masthead .look-button{margin-left:auto}.headeractions{flex-wrap:wrap}
@media(max-width:700px){html[data-adventure-theme] .home-heading h1{font-size:31px}html[data-adventure-theme] .grade.playable{min-height:158px;padding:12px 9px}html[data-adventure-theme] .grade .home-cast{width:46px;height:55px;margin-bottom:9px}html[data-adventure-theme] .grade h2{font-size:20px;margin-bottom:6px}html[data-adventure-theme] .grade p{font-size:9px;line-height:1.45;margin-bottom:10px}html[data-adventure-theme] .grade.playable .status{font-size:8px;gap:3px;padding:7px 8px}html[data-adventure-theme] .grade .number{font-size:8px;width:19px;height:19px;right:7px;top:8px}html[data-adventure-theme=arcade] .grade{grid-template-columns:35px 1fr;gap:0 7px;min-height:119px;padding:12px}html[data-adventure-theme=arcade] .grade .home-cast{width:33px;height:42px;margin:0}html[data-adventure-theme=arcade] .grade h2{font-size:18px}html[data-adventure-theme=arcade] .grade p{font-size:8px}html[data-adventure-theme=arcade] .grade .status{font-size:8px}html[data-adventure-theme=explorer] .grade{grid-template-columns:38px 1fr auto;gap:0 9px;min-height:82px;padding:9px 12px}html[data-adventure-theme=explorer] .grade .home-cast{width:35px;height:43px;margin:0}html[data-adventure-theme=explorer] .grade h2{font-size:20px}html[data-adventure-theme=explorer] .grade p{font-size:9px;margin:3px 0 0}html[data-adventure-theme=explorer] .grade:nth-child(even){margin-left:12px}html[data-adventure-theme=royal] .grade .number{top:31px}.app-header .look-label,.journey-header .look-label,.masthead .look-label,.headeractions .look-label{display:none}.app-header .look-button,.journey-header .look-button,.masthead .look-button,.headeractions .look-button{padding:5px!important;min-width:40px}.header-controls{gap:5px}.look-settings{padding:20px}.look-characters{grid-template-columns:repeat(3,1fr)}.look-character{flex-direction:row;justify-content:center;padding:5px!important;gap:4px}.look-character svg{width:29px;height:34px}.look-character span{font-size:10px}}
@media(max-width:360px){.topbar{gap:7px}.topbar .look-button{font-size:10px!important;padding:7px 8px!important;gap:4px}.topbar .brand b{font-size:16px}.topbar #install-help{width:34px}.topbar .look-button .look-avatar{width:20px;height:23px}.look-themes{gap:8px}.look-theme{padding:9px!important}.look-theme b{font-size:11px}html[data-adventure-theme] .grade h2{font-size:17px}html[data-adventure-theme] .grade p{font-size:8px}html[data-adventure-theme] .grades{gap:7px}html[data-adventure-theme] .grade.playable{padding:11px 7px}html[data-adventure-theme=explorer] .grade .status{max-width:71px;font-size:8px}html[data-adventure-theme=explorer] .grade p{font-size:8px}}
/* Override legacy dark header/caption literals on every selected light theme. */
html[data-adventure-theme] :is(.app-header,.journey-header,.masthead,.topbar){background:var(--ep-bg);color:var(--ep-ink);border-color:var(--ep-edge)}html[data-adventure-theme] :is(.app-header .brand,.app-header .brand small,.header-controls a,.header-controls button,.path-summary b,.path-summary a,.path-picker h2,.mission .trail-number,.mission .trail-play,.play-path,.map-line,.step-count){color:var(--ep-ink)}html[data-adventure-theme] .map-extras a{background:var(--ep-panel);color:var(--ep-tone);border-color:var(--ep-edge)}html[data-adventure-theme] .look-actions button{border:1px solid var(--ep-edge);padding:12px 10px;min-height:44px;border-radius:12px;font:750 12px/1.3 'Avenir Next',system-ui,sans-serif}.adventure-personalize-bar{display:flex;justify-content:flex-end;padding:10px 18px}html[data-adventure-theme] .install-dialog{background:var(--ep-panel);color:var(--ep-ink);border-color:var(--ep-edge)}html[data-adventure-theme] .install-dialog :is(p,li,.small){color:var(--ep-muted)}
@media(max-width:700px){html[data-adventure-theme] .app-header{padding:12px 16px;gap:8px}html[data-adventure-theme] .app-header .brand{font-size:16px;gap:6px}html[data-adventure-theme] .app-header .brand img{width:28px;height:28px}html[data-adventure-theme] .header-controls{gap:5px}html[data-adventure-theme] .header-controls #back{font-size:0;min-width:36px;padding:7px}html[data-adventure-theme] .header-controls #back:after{content:'←';font-size:16px}html[data-adventure-theme] .header-controls #restart{padding:7px;font-size:10px}.look-actions button{min-height:44px}}

/* Separate adventure home from the level picker: no buried six-level grid. */
.choose-levels{display:flex;width:100%;max-width:1000px;margin:0 auto 15px;justify-content:space-between;padding:14px 18px;font-size:14px}.level-back{display:inline-flex;align-items:center;min-height:44px;font-size:12px;text-decoration:none;color:var(--ep-tone)}.levels-heading{text-align:left;margin:12px 0 21px}.levels-heading h1{font:700 37px/1.15 Georgia,serif;letter-spacing:-1px;margin:7px 0 9px}.levels-heading p{font-size:12px;color:var(--ep-muted);margin:0}.level-intro-link{font-size:11px;text-align:center;margin:24px 0 0;color:var(--ep-tone)}#level-picker .path-picker{margin-top:0;margin-bottom:21px}#level-picker .path-picker>h2{display:none}#level-picker .path-option{min-height:108px;padding:14px}#level-picker .path-option small{font-size:11px}#level-picker #path-note{font-size:11px;margin:12px 0 0}#home-dashboard .home-heading{margin:18px 0 17px;text-align:left}#home-dashboard .home-heading h1{font-size:32px}#home-dashboard .home-heading .available{text-align:left;margin-top:13px}#home-dashboard .harbor-feature{min-height:200px}#home-dashboard .harbor-feature>div{padding:21px}#home-dashboard .harbor-feature h2{font-size:32px}#home-dashboard .harbor-feature p{font-size:11px;margin-bottom:11px}#home-dashboard .return-card{padding:13px;gap:9px;margin-bottom:14px}#home-dashboard .return-card .eyebrow{font-size:8px}#home-dashboard .return-card b{font-size:14px}#home-dashboard .return-card small{display:none}#home-dashboard .return-card .cta{font-size:12px;padding:10px 13px;min-height:42px}#home-dashboard .learning-links{margin-bottom:8px}#home-dashboard .player-level{padding:10px 12px;margin-bottom:13px}.home-footer{margin-top:18px}
@media(max-width:700px){#home-dashboard .return-card{flex-direction:row;align-items:center}#home-dashboard .return-card .cta{width:auto;flex:none}#home-dashboard .return-card>div{min-width:0}#home-dashboard .home-heading h1{font-size:29px}#home-dashboard .home-heading h1 br{display:none}#home-dashboard .home-heading p{font-size:12px}#home-dashboard .player-level>span{width:36px;height:42px}#home-dashboard .harbor-feature{min-height:180px}#home-dashboard .harbor-feature h2{font-size:30px}.levels-heading h1{font-size:32px}#level-picker .path-option{min-height:105px}#level-picker .path-option b{font-size:14px}.home{padding-bottom:14px}}
@media(max-width:360px){.topbar .look-label{display:none}.topbar .look-button{min-width:34px;padding:5px!important}.topbar .look-button .look-avatar{width:22px;height:25px}#home-dashboard .player-level label{font-size:12px}}

/* One predictable six-card grid in every theme. Reset inherited trail/hero sizing. */
h1[tabindex="-1"]:focus,h1[tabindex="-1"]:focus-visible{outline:none;box-shadow:none}
#level-picker .grades{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:900px;padding:0;margin:0 auto;position:relative;align-items:stretch}
#level-picker .grades:before{display:none;content:none}
#level-picker .grades .grade.playable{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;grid-column:auto;grid-row:auto;margin:0;min-height:176px;height:auto;min-width:0;padding:16px;border-radius:18px;gap:0;text-align:left;background:var(--level-card);color:var(--ep-ink);border:1px solid color-mix(in srgb,var(--ep-tone),white 72%);box-shadow:0 4px 0 color-mix(in srgb,var(--ep-edge),transparent 30%)}
#level-picker .grade:nth-child(1){--level-card:#fff0cf;--level-complete:#f6d579;--level-complete-ink:#604812}#level-picker .grade:nth-child(2){--level-card:#def1eb;--level-complete:#a8d8c5;--level-complete-ink:#234f44}#level-picker .grade:nth-child(3){--level-card:#fce3d1;--level-complete:#f4bf9b;--level-complete-ink:#654326}#level-picker .grade:nth-child(4){--level-card:#ece2fa;--level-complete:#cfb7ed;--level-complete-ink:#52396b}#level-picker .grade:nth-child(5){--level-card:#ffe0df;--level-complete:#f4b5b2;--level-complete-ink:#683d43}#level-picker .grade:nth-child(6){--level-card:#dfeafa;--level-complete:#b4cdf0;--level-complete-ink:#2c4e74}
#level-picker .grade.playable .home-cast{display:block;position:static;grid-row:auto;grid-column:auto;align-self:flex-start;width:52px;height:60px;flex:none;margin:0 0 9px}
#level-picker .grade.playable .home-cast svg{position:static;left:auto;top:auto;width:100%;height:100%;margin:0}
#level-picker .grade.playable h2{display:block;grid-column:auto;grid-row:auto;align-self:auto;margin:0 0 10px;font-size:23px;line-height:1.15;letter-spacing:-.5px}
#level-picker .grade.playable p{display:none}
#level-picker .grade.playable .status{display:inline-flex;grid-column:auto;grid-row:auto;align-self:flex-start;justify-self:auto;align-items:center;margin: auto 0 0;padding:7px 10px;gap:5px;border-radius:24px;font-size:10px;line-height:1.2;min-height:27px;max-width:100%;white-space:nowrap;background:#ffffffa8;color:var(--ep-ink)}
#level-picker .grade.playable .number{display:grid;position:absolute;top:12px;right:12px;width:22px;height:22px;font-size:10px;color:var(--ep-muted);border:1px solid color-mix(in srgb,var(--ep-tone),white 70%)}
@media(max-width:700px){#level-picker .grades{gap:10px}#level-picker .grades .grade.playable{min-height:150px;padding:12px 10px}#level-picker .grade.playable .home-cast{width:43px;height:50px;margin-bottom:9px}#level-picker .grade.playable h2{font-size:20px;margin-bottom:9px}#level-picker .grade.playable .status{font-size:9px;padding:6px 8px;gap:3px;min-height:25px}#level-picker .grade.playable .number{top:8px;right:8px;width:18px;height:18px;font-size:8px}}
@media(max-width:360px){#level-picker .grades{gap:7px}#level-picker .grades .grade.playable{min-height:141px;padding:11px 8px}#level-picker .grade.playable h2{font-size:18px}#level-picker .grade.playable .home-cast{width:39px;height:46px}#level-picker .grade.playable .status{font-size:8px;padding:6px 7px}#level-picker .grade.playable .number{right:6px;top:7px;width:16px;height:16px;font-size:7px}}
#level-picker .grades .grade.playable:hover{transform:none}

/* Readable shared helper copy and links on every light adventure palette. */
html[data-adventure-theme] :is(.field-label,.copy-code-fallback label){color:var(--ep-ink)}
html[data-adventure-theme] :is(.empty-line,.goal-note,.copy-code-status,.your-friend-code span,.your-friend-code small,.playtest-tools details,.playtest-tools p,.playtest-tools summary span,.move-book .no-moves,.seat small,.board-tools label){color:var(--ep-muted)}
html[data-adventure-theme] :is(.follow-through a,.complete .follow-through a,.playtest-tools summary){color:var(--ep-tone);font-weight:650}
html[data-adventure-theme] .follow-through a{text-decoration:underline;text-underline-offset:3px}
html[data-adventure-theme] :is(.pill,.draw-note,.confirm-card){background:var(--ep-soft);border-color:var(--ep-edge);color:var(--ep-ink)}
html[data-adventure-theme] .move-book li:nth-child(even){background:var(--ep-soft)}
html[data-adventure-theme] .move-book li span{color:var(--ep-muted)}
html[data-adventure-theme] .copy-code-fallback input{background:var(--ep-panel);color:var(--ep-ink)}
html[data-adventure-theme] .tester-home :is(small,p){color:var(--ep-muted)}
html[data-adventure-theme] .tester-home :is(a,.tester-card strong){color:var(--ep-tone)}
html[data-adventure-theme] .tester-home .tester-card{background:var(--ep-panel);border-color:var(--ep-edge);color:var(--ep-ink);padding:20px;margin:0;box-shadow:0 3px 0 color-mix(in srgb,var(--ep-edge),transparent 55%)}
html[data-adventure-theme] .tester-home .tester-card strong{font:700 24px/1.25 Georgia,serif}
html[data-adventure-theme] .tester-home .tester-card p{font-size:14px}
html[data-adventure-theme] .tester-home .tester-card small{font-size:12px;color:var(--ep-muted)}
html[data-adventure-theme] .tester-home .cards{gap:14px;margin:24px 0}
html[data-adventure-theme] .tester-home :is(input,button){background:var(--ep-panel);color:var(--ep-ink);border-color:var(--ep-edge)}
html[data-adventure-theme] .tester-home form button{background:var(--ep-accent);color:var(--ep-on)}
@media(max-width:600px){html[data-adventure-theme] .tester-home{padding:12px 20px 24px}html[data-adventure-theme] .tester-home .cards{grid-template-columns:1fr}html[data-adventure-theme] .tester-home h1{font-size:33px}html[data-adventure-theme] .tester-home>p{font-size:14px}html[data-adventure-theme] .tester-home .tester-card strong{font-size:23px}}
html[data-adventure-theme] #entry .entry-art figcaption{color:var(--ep-tone)}
html[data-adventure-theme] .entry-note{color:var(--ep-muted);border-color:var(--ep-tone)}
html[data-adventure-theme] .adventure-personalize-bar .look-button{width:auto;min-height:40px;margin:0}
@media(max-width:650px){html[data-adventure-theme] .masthead{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:15px 18px}html[data-adventure-theme] .masthead .brand{min-width:0;gap:6px}html[data-adventure-theme] .masthead .brand b{font-size:20px}html[data-adventure-theme] .masthead .brand img{width:32px;height:32px}html[data-adventure-theme] .masthead .brand small{font-size:5px;letter-spacing:.7px;white-space:nowrap}html[data-adventure-theme] .masthead .look-button{min-width:32px;padding:5px!important}html[data-adventure-theme] .masthead .look-avatar{width:22px;height:25px}html[data-adventure-theme] .tester-home .tester-card strong{font-size:21px}}
@media(max-width:360px){html[data-adventure-theme] .masthead{padding:13px 12px;gap:6px}html[data-adventure-theme] .masthead .brand b{font-size:18px}html[data-adventure-theme] .masthead .brand small{font-size:4.5px;letter-spacing:.5px}html[data-adventure-theme] .masthead .identity{padding:5px 7px;gap:4px}}

/* Owner-approved M/24px completion badges; colors match the selected world. */
html[data-adventure-theme="sunshine"]{--ep-completed:#f9bf4c;--ep-completed-ink:#243849;--ep-completed-edge:#243849}
html[data-adventure-theme="arcade"]{--ep-completed:#285ed0;--ep-completed-ink:#ffffff;--ep-completed-edge:#00000018}
html[data-adventure-theme="explorer"]{--ep-completed:#187951;--ep-completed-ink:#ffffff;--ep-completed-edge:#00000018}
html[data-adventure-theme="royal"]{--ep-completed:#8250b5;--ep-completed-ink:#ffffff;--ep-completed-edge:#00000018}
html[data-adventure-theme] .mission.done .completion-badge{display:grid;place-items:center;position:absolute;top:16px;right:13px;width:24px;height:24px;padding:0;margin:0;border-radius:50%;background:var(--ep-completed);color:var(--ep-completed-ink);border:1px solid var(--ep-completed-edge);line-height:1;box-shadow:none}
html[data-adventure-theme="sunshine"] .mission.done .completion-badge{border-width:1.5px}
html[data-adventure-theme] .mission.done .completion-badge svg{display:block;width:15px;height:15px;flex:none;overflow:visible}
/* Shared local lesson counter and achievement-led passport. */
html[data-adventure-theme] .progress-header{position:sticky;top:env(safe-area-inset-top,0px);z-index:15;background:var(--ep-bg)}
html[data-adventure-theme] .progress-passport{position:relative;display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0!important;border:0;background:transparent;color:var(--ep-tone);text-decoration:none;flex:none;box-shadow:none}
.progress-passport .passport-diamond{display:block;width:42px;height:42px;fill:var(--ep-soft);stroke:var(--ep-tone);stroke-width:1.8}
.progress-passport .passport-count{position:absolute;inset:0;display:grid;place-items:center;font:850 12px/1 system-ui;color:var(--ep-ink);font-variant-numeric:tabular-nums}
.passport-hero{display:flex;align-items:center;gap:12px;margin:15px 0}
.passport-explorer{width:60px;height:67px;flex:none}.passport-hero h1{font:400 28px/1.1 Georgia,serif;margin:6px 0}
.passport-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--ep-edge);border-radius:16px;padding:13px 4px;background:var(--ep-panel);gap:5px}
.passport-totals>div{text-align:center;border-right:1px solid var(--ep-edge)}.passport-totals>div:last-child{border:0}.passport-totals b{display:block;font:750 28px/1.2 Georgia,serif;color:var(--ep-tone)}.passport-totals span{font-size:11px;color:var(--ep-muted)}
.passport-next{border:1px solid var(--ep-edge);border-radius:16px;padding:16px;background:var(--ep-panel);margin:15px 0 22px}.passport-next h2{font:800 19px/1.25 'Avenir Next',system-ui;margin:7px 0}.passport-next p{font-size:12px;line-height:1.5;color:var(--ep-muted);margin:6px 0 12px}.passport-next .primary{width:100%;font-size:13px;min-height:44px}
.passport-section-title{font:800 17px/1.3 'Avenir Next',system-ui;margin:22px 0 11px}
.level-achievements{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.level-achievement{display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;min-width:0;padding:12px 7px;border:1px solid var(--ep-edge);border-radius:16px;background:var(--ep-panel);color:var(--ep-ink);text-decoration:none}
.level-medallion{position:relative;display:block;width:52px;height:60px;padding:5px;border:1px solid var(--ep-edge);border-radius:45% 45% 30% 30%;background:var(--ep-soft)}
.level-achievement.earned{border:2px solid var(--ep-tone);padding:11px 6px}.level-achievement.earned .level-medallion{background:var(--ep-accent);border-color:var(--ep-on)}
.earned-check{position:absolute;right:-6px;bottom:-1px;display:grid;place-items:center;border-radius:50%;width:19px;height:19px;background:var(--ep-completed);color:var(--ep-completed-ink);font-size:12px;font-weight:900;border:1px solid var(--ep-completed-edge)}
.level-achievement b{font-size:14px}.level-count{font-size:10px;color:var(--ep-muted)}.achievement-status{font-size:10px;line-height:1.3;color:var(--ep-tone);font-weight:750;min-height:26px;display:grid;place-items:center}
.achievement-bar{width:100%;height:6px;background:var(--ep-soft);border:1px solid var(--ep-edge);border-radius:8px;overflow:hidden}.achievement-bar i{display:block;height:100%;background:var(--ep-tone);border-radius:6px}
.harbor-achievements{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.harbor-achievements .keepsake{padding:9px;margin:0;gap:7px;background:var(--ep-panel);border-color:var(--ep-edge);text-decoration:none}.harbor-achievements .keepsake img{width:45px;height:45px}.harbor-achievements .keepsake b{font-size:12px}.harbor-achievements .keepsake p{font-size:10px;line-height:1.35;color:var(--ep-muted)}.harbor-next-badge{display:grid;gap:7px;border:1px dashed var(--ep-edge);border-radius:13px;padding:12px;background:var(--ep-panel)}.harbor-next-badge b{font-size:12px}.harbor-next-badge>span{font-size:10px;color:var(--ep-muted)}.harbor-next-badge a{font-size:11px;color:var(--ep-tone);min-height:35px;display:flex;align-items:center}.passport-empty{font-size:12px;line-height:1.5;color:var(--ep-muted)}
.passport-skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.passport-skill{display:flex;flex-direction:column;gap:7px;border:1px solid var(--ep-edge);border-radius:13px;background:var(--ep-panel);padding:12px}.passport-skill b{font-size:13px}.passport-skill>span{font-size:10px;color:var(--ep-muted)}.passport-skill a{font-size:11px;color:var(--ep-tone);min-height:35px;display:flex;align-items:center;margin-top:auto;font-weight:750}.passport-tools{margin-bottom:10px}
@media(max-width:700px){html[data-adventure-theme] .topbar.progress-header{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-flow:column;grid-auto-columns:40px;gap:5px;align-items:center;padding:9px 14px}html[data-adventure-theme] .topbar.progress-header .brand{gap:5px;min-width:0}html[data-adventure-theme] .topbar.progress-header .brand img{width:28px;height:28px}html[data-adventure-theme] .topbar.progress-header .brand b{font-size:19px}html[data-adventure-theme] .topbar.progress-header .brand small{font-size:5px;letter-spacing:1px}html[data-adventure-theme] .topbar.progress-header .brand .provider{font-size:8px}html[data-adventure-theme] .topbar.progress-header .look-label{display:none}html[data-adventure-theme] .topbar.progress-header .look-button{padding:5px!important;min-width:40px}.topbar.progress-header .progress-passport{width:40px;min-width:40px}.journey-header.progress-header{gap:7px;flex-wrap:nowrap}.journey-header.progress-header .brand{font-size:17px;gap:6px}.journey-header.progress-header .brand small{font-size:6px}.journey-header.progress-header .brand img{width:28px;height:28px}.journey-header.progress-header .quiet{font-size:10px}.journey-header.progress-header .look-button{margin-left:0}.app-header.progress-header{flex-wrap:nowrap}.app-header.progress-header .header-controls{flex-wrap:nowrap}.passport-hero h1{font-size:25px}}
@media(max-width:360px){html[data-adventure-theme] .topbar.progress-header{padding:8px 10px;grid-template-columns:minmax(0,1fr);grid-auto-columns:36px;gap:3px}html[data-adventure-theme] .topbar.progress-header .brand b{font-size:16px}.topbar.progress-header .brand .provider{font-size:7px!important}.passport-hero h1{font-size:23px}.level-achievements{gap:7px}.level-achievement{padding:10px 5px}.level-achievement.earned{padding:9px 4px}.level-medallion{width:45px;height:52px}.level-count{font-size:9px}.achievement-status{font-size:9px}.journey-header.progress-header{padding-left:10px;padding-right:10px}.journey-header.progress-header .brand small{display:none}.journey-header.progress-header .brand{font-size:15px}}

/* Dialog entry focus is not a second theme choice. Keyboard focus remains distinct. */
.look-settings #look-title:focus,.look-settings #look-title:focus-visible{outline:none;box-shadow:none}
.look-settings .look-theme:focus-visible,.look-settings .look-character:focus-visible{outline:2px dashed var(--ep-ink);outline-offset:4px}

/* Full-level completion: 24px pastel badge matched to its card; isolate the check from legacy character SVG layout. */
html[data-adventure-theme] #level-picker .grade.playable .level-complete{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--level-complete);color:var(--level-complete-ink);border:1px solid color-mix(in srgb,var(--level-complete-ink),transparent 72%);box-shadow:none;padding:0;margin:0;line-height:1}
html[data-adventure-theme] #level-picker .level-complete svg{position:static;inset:auto;display:block;width:15px;height:15px;margin:0;padding:0;filter:none;transform:none;flex:none;grid-area:1/1;place-self:center;overflow:visible}
@media(max-width:700px){html[data-adventure-theme] #level-picker .grade.playable .level-complete{top:8px;right:8px}}
