.mobile-map-friend{display:none}
/* Phone layout only; tablet and desktop map placement stays unchanged. */
@media (max-width:700px){
 /* Every destination belongs to the grid below the illustration. */
 .map-artwork>.island-link{display:none}
 .map-island-links .island-link{display:flex;position:static;left:auto;top:auto;transform:none;width:100%;min-height:52px;padding:10px 8px;font-size:clamp(.88rem,3.6vw,1rem);white-space:normal;justify-content:center}
 .map-island-links .island-link small{display:none}
 .map-island-links{gap:10px;padding:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .map-island-links .island-link:last-child{grid-column:1/-1}
 /* 1: Put the map and activity sooner in the first screen. */
 .intro,.page-intro{padding:22px 18px 20px}
 .intro .eyebrow{font-size:10px;letter-spacing:1.5px}
 .intro h1,.page-intro h1{font-size:clamp(1.9rem,7.4vw,2.6rem);line-height:1.12;margin:8px 0 12px}
 .intro p,.page-intro p{font-size:16px;line-height:1.45}
 /* 2: Compact, predictable navigation without squeezing the logo. */
 header{padding:12px max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));min-height:0;row-gap:8px;column-gap:10px}
 header .wordmark{font-size:23px;flex-shrink:0}
 header .wordmark span{font-size:8px;letter-spacing:2px;margin-top:4px}
 header .header-right{gap:8px;margin-left:auto}
 header .parent-link{font-size:12px;max-width:65px;line-height:1.3;text-align:center}
 header nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}
 header nav a{padding:10px 3px;min-height:44px;font-size:13px}
 /* 3: Comfortable targets and visible press feedback. */
 .pill,.text-link,.text-button,.sound,.parent-link,footer a{min-height:44px}
 .text-link,.parent-link,footer a{display:inline-flex;align-items:center}
 .sound{min-width:44px;padding:6px}
 button:active,.pill:active{filter:brightness(.94)}
 /* 4: Reduce long empty gaps between sections. */
 .section{padding:28px 16px}.section-heading{gap:16px;margin-bottom:20px;align-items:flex-start;flex-wrap:wrap}
 .section-heading h2{font-size:1.7rem}
 .island-bar{padding:0 4px;margin:12px auto 22px;gap:10px;flex-wrap:wrap}
 /* 5: Legible book and friend cards throughout the phone range. */
 .book-grid,.friends-grid{grid-template-columns:minmax(0,1fr);gap:28px}
 .book,.friend-card{min-width:0}.book h3{font-size:1.5rem;min-height:0}
 .book-art.cover{height:260px}.friend-art{height:210px}
 /* 6: Keep order and preview controls unambiguous. */
 .book-actions,.book-detail-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
 .book-actions>.pill,.book-detail-actions>.pill{width:100%;justify-content:center;text-align:center}
 .book-actions>.text-link,.book-actions>.text-button{justify-content:center;text-align:center}
 /* 7: Smaller game card artwork lets children reach the next choice sooner. */
 .teaser-grid{grid-template-columns:minmax(0,1fr);gap:18px}
 .card-art{height:175px}.card-copy{padding:18px}.card-copy h3{font-size:1.4rem}.card-copy p{font-size:16px}
 /* 8: Game exit stays in reach while a tall game scrolls. */
 #game-dialog{max-height:calc(100dvh - 12px);width:calc(100vw - 12px);max-width:calc(100vw - 12px);overscroll-behavior:contain}
 .game-shell{min-height:0}.game-top{position:sticky;top:0;z-index:8;background:#fffdf5;padding:10px 12px;gap:10px}
 .game-top h2{font-size:19px;line-height:1.2}.game-top .eyebrow{font-size:10px;letter-spacing:1px}
 .instruction{padding:14px 12px;font-size:16px;min-height:0}
 /* 9: Safe space around notches and home indicators in overlays. */
 #info-dialog{max-height:calc(100dvh - 12px);padding:54px 18px max(20px,env(safe-area-inset-bottom));overscroll-behavior:contain}
 .info-close{position:sticky;top:0;float:right;margin-top:-40px;z-index:3}
 #game-body{padding-bottom:max(10px,env(safe-area-inset-bottom))}
 /* 10: Full-width, clearly separated ending and welcome actions. */
 .ending-actions,.welcome-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .ending-actions .pill,.welcome-actions .pill{width:100%;text-align:center;justify-content:center}
 /* 11: Wrap score and sound controls rather than crowding them. */
 .catch-hud,.dash-hud{gap:8px;flex-wrap:wrap;padding:0 4px}
 .dash-hud>div{gap:8px;flex-wrap:wrap}.dash-hud .text-button{min-height:44px;padding:8px}
 .fs-bar{gap:6px}.fs-bar .pill{min-height:44px;font-size:14px;padding:8px 10px}
 /* 12: Footer links form clear rows instead of dense inline text. */
 footer{padding:28px 16px max(24px,env(safe-area-inset-bottom))}
 footer>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}
 footer>div a,footer>div button{margin:0;padding:8px 0;line-height:1.3;text-align:left}
 /* 13: Readable form text avoids iPhone focus zoom and horizontal overflow. */
 input,select,textarea{font-size:16px;max-width:100%}
 .setting-row{gap:12px;min-height:52px}.setting-row input{flex-shrink:0}
 .collection-card,.book-banner,.note-block{padding:22px 18px;min-width:0}
 .collection-card .pill{white-space:normal;text-align:center;line-height:1.35}
 .verse,.welcome-verse{font-size:clamp(1.05rem,4.8vw,1.35rem);line-height:1.55}
 .stamps{gap:5px;flex-wrap:wrap}.stamp{flex-shrink:0}
}
@media(max-width:360px){header .sound span{display:none}.fs-bar strong{font-size:26px}.fs-bar{column-gap:4px}.map-island-links{gap:8px;padding:10px}}
@media(max-width:700px) and (orientation:landscape){.intro{padding-top:16px}.game-top .eyebrow{display:none}.game-top{padding:8px 12px}}
/* Phone navigation and guided beginnings. Desktop and tablet retain their layout. */
.phone-shortcuts{display:none}
@media(max-width:700px){
 header:not(.book-page-header){height:auto;min-height:64px;padding:8px 14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
 header:not(.book-page-header) .wordmark{font-size:23px;margin-right:auto}
 header:not(.book-page-header) .phone-shortcuts{display:flex;gap:3px;align-items:center}
 .phone-shortcuts a,.phone-shortcuts button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px;font-size:14px;text-decoration:none;border:0;background:transparent;border-radius:8px}
 .phone-shortcuts button{background:#e8ead9;font-weight:700;padding:8px 12px}
 header:not(.book-page-header) nav,header:not(.book-page-header) .header-right{display:none}
 header.phone-menu-open nav{display:grid;order:3;width:100%;flex-basis:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:8px 0;border-top:1px solid #d6d5c6}
 header.phone-menu-open nav a{text-align:left;padding:10px 12px;background:#f2f0e5;border-radius:8px;min-height:44px;font-size:15px}
 header.phone-menu-open .header-right{display:flex;order:4;justify-content:space-between;width:100%;padding:0 12px 8px}
 header.phone-menu-open .parent-link{max-width:none;font-size:15px}
 .phone-start,.phone-next,.phone-books,.phone-play{padding:20px 18px}
 .phone-start{text-align:center;padding-top:12px}
 .phone-friends{height:105px;display:flex;justify-content:center;gap:14px;margin-bottom:10px}
 .phone-friends>*{width:100px;height:105px;object-fit:contain}
 .phone-start h1{font-size:clamp(1.65rem,7vw,2.2rem);margin:8px 0 12px}
 .phone-start p,.phone-page-intro p{font-size:16px;line-height:1.45;color:#526568}
 .phone-main-actions{display:grid;gap:10px;margin-top:18px}
 .phone-main-actions .pill{justify-content:center;padding:12px 14px;font-size:16px}
 .phone-start>.text-link{font-size:14px;margin-top:6px}
 .phone-start .phone-trust{font-size:12px;margin-top:10px}
 .phone-next{background:#eef1e3;border-radius:24px;margin:4px 12px;padding:20px 14px}
 .phone-next h2,.phone-books h2{font-size:1.6rem;margin-bottom:8px}
 .phone-next>p,.phone-books>p{font-size:15px;margin-bottom:14px}
 .phone-game-choice{display:grid;grid-template-columns:62px minmax(0,1fr) 18px;align-items:center;gap:12px;background:#fffdf5;border:1px solid #d4dbcf;border-radius:16px;text-align:left;width:100%;padding:12px;margin-bottom:12px;min-height:94px}
 .phone-choice-art{height:64px;display:flex;align-items:center;justify-content:center}
 .phone-choice-art>*{width:60px!important;height:64px!important;object-fit:contain}
 .phone-game-choice strong{display:block;font-family:Story,Georgia,serif;font-size:18px;line-height:1.2}
 .phone-game-choice small{display:block;font-size:13px;line-height:1.4;margin-top:6px;color:#526568}
 .phone-disclosure{margin-top:12px;border-top:1px solid #cdd5c7;padding-top:8px}
 .phone-disclosure summary{cursor:pointer;min-height:48px;padding:10px 4px;font-weight:700;font-size:16px}
 .phone-detail-note{font-size:14px;margin:4px 0 14px}
 .phone-disclosure .island-wrap{padding:0}.phone-disclosure .story-map{border-radius:16px}.phone-disclosure .island-bar{margin-bottom:10px}
 .phone-disclosure .section{padding:12px 0}.phone-disclosure .passport{margin:0;background:transparent}
 .phone-books>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}
 .phone-books>div a{text-decoration:none;min-width:0}.phone-books img{width:100%;height:150px;object-fit:contain}.phone-books strong{display:block;font-size:15px;line-height:1.3;margin-top:8px}.phone-books small{display:block;font-size:12px;margin-top:6px;color:#526568}
 .phone-page-intro,.page-intro.phone-page-intro{padding:22px 18px 14px}
 .phone-page-intro h1{font-size:1.9rem;line-height:1.15;margin:0 0 10px}
 .phone-page-intro .pill{margin-top:14px}
 .phone-play{padding-top:4px}.phone-play .teaser-grid{margin-bottom:16px}
 #main[data-mobile-route]>.section{padding-top:16px}
 .book-grid .book[data-available="no"]{order:2}.book-grid .book[data-available="yes"]{order:1}
 .book-art.cover{height:210px}.book-grid{gap:24px}.book p{margin:8px 0}
 .friend-art{height:150px}.friends-grid{gap:20px}.friend-card{padding:18px}
 .poem-card{display:block;padding:20px 0}.poem-portrait{float:right;position:static;width:86px;max-width:86px;padding:6px;margin:0 0 8px 12px;background:transparent}.poem-portrait img,.poem-portrait svg{height:88px}.poem-portrait span{display:none}
 .poem-copy h2{font-size:1.45rem;margin:8px 0 18px}.poem-copy .eyebrow{font-size:10px;letter-spacing:1.5px}.poem-copy .verse{clear:both;margin:14px 0;line-height:1.6}.poem-copy .wonder{font-size:15px;margin-top:16px}.poem-copy .poem-links{gap:8px 16px;margin-top:10px}
 .phone-reading-settings{margin:0 18px 20px}.phone-secondary-copy{display:none}
 .watch-section{padding-top:4px}.watch-section video{width:100%;height:auto;border-radius:16px}.watch-section>p{font-size:14px;line-height:1.5}
 .phone-after-watch{padding:20px 0}.phone-after-watch h2{font-size:1.45rem;margin-bottom:14px}.phone-after-watch .pill{display:flex;justify-content:center}.phone-after-watch .text-link{font-size:14px;margin-top:6px}.phone-extra-links{padding-top:12px;border-top:1px solid #d6d5c6}
 .commerce-grid{gap:16px}.commerce-book h2{font-size:1.2rem}.commerce-book .pill{font-size:14px;padding:10px}.commerce-book p{font-size:14px}
 .book-page-header{min-height:0;padding:12px 16px;gap:8px}.book-page-header nav{display:flex;flex-wrap:nowrap;gap:12px;justify-content:flex-start}.book-page-header nav a{font-size:12px;padding:6px 0;min-height:40px;white-space:normal}
}
@media(max-width:360px){header:not(.book-page-header){padding:8px 10px}.phone-shortcuts a{padding:8px 6px;font-size:13px}.phone-shortcuts button{font-size:13px;padding:8px}.phone-start,.phone-play{padding-left:14px;padding-right:14px}}

/* Approved illustrated welcome, confined to phone homepages. */
.mobile-welcome{display:none}
.welcome-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){
 body:has(#main>.mobile-welcome)>div>header,body:has(#main>.mobile-welcome)>header{display:none}
 #main:has(>.mobile-welcome){padding-top:0}
 .mobile-welcome{display:flex;flex-direction:column;width:100%;max-width:500px;height:100vh;height:100svh;max-height:1000px;margin:0 auto;padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));gap:6px;background:#fdfaf1;box-sizing:border-box}
 .mobile-welcome-heading{flex:0 0 21%;min-height:0;margin:0;line-height:0;position:relative}
 .mobile-welcome-heading img{display:block;width:100%;height:100%;object-fit:contain}
 .mobile-welcome-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;flex:1;min-height:0}
 .mobile-welcome-card{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;border-radius:22px;overflow:hidden;position:relative;text-decoration:none;-webkit-tap-highlight-color:transparent}
 .mobile-welcome-card img{display:block;width:100%;height:100%;object-fit:contain}
 .welcome-read{background:#eaf0c9}.welcome-play{background:#d8eff8}.welcome-watch{background:#ffe2d4}.welcome-shop{background:#fff0b8}
 .mobile-welcome-card:focus-visible{outline:4px solid #183d41;outline-offset:-4px}
 .mobile-welcome-card:active{filter:brightness(.92)}
 /* Server rendering shows the welcome immediately, before the runtime loads. */
 #main:has(>.mobile-welcome)>.intro,#main:has(>.mobile-welcome)>.adult-links{display:none}
}
/* The fourth illustrated door now includes a quiet bedtime choice. */
.welcome-watch-link{display:none}
@media(max-width:700px){
 .mobile-welcome-heading{flex-basis:18%}
 .welcome-sleep{background:#17263c;flex-direction:column;padding:8px 8px 6px}
 .welcome-sleep img{height:calc(100% - 32px);width:100%;object-fit:contain;border-radius:14px}
 .welcome-sleep-label{display:block;color:#f1e4c9;font-family:Georgia,serif;font-size:24px;font-weight:bold;letter-spacing:3px;line-height:32px}
 .welcome-watch-link{display:block;text-align:center;padding:4px;font-size:14px;color:#36575c;min-height:28px;text-decoration:none}
}

/* Approved adventure-first splash. Invisible on desktop; every illustrated area is a link. */
@media(max-width:700px){
 .mobile-welcome.mobile-splash{position:relative;display:block;height:auto;max-height:none;max-width:500px;padding:0;margin:0 auto;background:#fffdf5;line-height:0;gap:0}
 .mobile-splash-art{display:block;width:100%;height:auto;aspect-ratio:863/1823}
 .mobile-splash-links{display:block!important;position:absolute;inset:0;padding:0!important;margin:0!important;background:transparent!important}
 .mobile-splash-links a{position:absolute;display:block!important;min-height:44px;min-width:44px;margin:0!important;padding:0!important;border-radius:0;text-decoration:none;line-height:normal;background:transparent}
 .mobile-splash-links a:focus-visible{outline:4px solid #b74c22;outline-offset:-5px;background:#fff4ca22}
 .mobile-splash-links a:active{background:#fff4ca33}
 .splash-play{left:0;right:0;top:13.7%;height:32.8%}
 .splash-meet{left:0;right:0;top:46.5%;height:11.8%}
 .splash-watch{left:0;right:0;top:58.3%;height:11.5%}
 .splash-listen{left:0;right:0;top:69.8%;height:12.7%}
 .splash-books{left:0;width:50%;top:82.5%;bottom:0}
 .splash-gifts{right:0;width:50%;top:82.5%;bottom:0}
}

/* A quiet unframed welcome sits behind six raised, clearly tappable doors. */
@media(max-width:700px){
 .mobile-welcome.mobile-doors{display:flex;flex-direction:column;width:100%;max-width:500px;height:100vh;height:100dvh;max-height:none;min-height:0;margin:0 auto;padding:max(4px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));gap:8px;background:#f6f1e5;box-sizing:border-box}
 .mobile-doors-banner{flex:0 0 13%;min-height:0;max-height:108px;margin:0;line-height:0;position:relative;isolation:isolate}
 .mobile-doors-banner img{display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
 .mobile-doors-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1.55fr 1fr 1fr 1fr 1.35fr;gap:7px;flex:1;min-height:0;margin:0!important;padding:0!important;background:transparent!important}
 .mobile-door{display:flex!important;align-items:center;grid-column:1/-1;position:relative;min-height:44px;min-width:0;margin:0!important;padding:0!important;overflow:hidden;background:#fffdf5;border:1.5px solid #a89b73;border-radius:15px;text-decoration:none;box-shadow:0 3px 0 #a89b7340,0 3px 10px #243c3b12;line-height:1.2;-webkit-tap-highlight-color:transparent}
 .mobile-door:active{transform:translateY(2px);box-shadow:0 1px 0 #a89b7340;background:#fff0c5}
 .mobile-door:focus-visible{outline:3px solid #b74c22;outline-offset:1px}
 .door-picture{display:block;flex:0 0 48%;height:100%;min-width:0;overflow:hidden}
 .door-picture img{display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
 .door-caption{display:flex;flex-direction:column;gap:4px;padding:7px 9px 7px 3px;flex:1;min-width:0;color:#263f3e}
 .door-caption strong{display:flex;justify-content:space-between;gap:5px;font-family:Story,Georgia,serif;font-weight:700;font-size:clamp(20px,5.8vw,27px);line-height:1.1;letter-spacing:.4px}
 .door-caption strong span{font-family:Arial,sans-serif;font-size:.85em;align-self:center}
 .door-caption small{font-size:clamp(10px,2.8vw,13px);line-height:1.15}
 .door-play{background:#eef8f7;border-color:#7b9da3}.door-play .door-caption strong{font-size:clamp(28px,7.5vw,36px)}
 .door-listen{background:#f0f2f9;border-color:#949bb2}
 .door-books,.door-gifts{grid-column:auto;flex-direction:column;background:#fff8e5;border-color:#aa9668}
 .door-books .door-picture,.door-gifts .door-picture{flex:1;width:100%;min-height:0}
 .door-books .door-caption,.door-gifts .door-caption{flex:0 0 auto;width:100%;padding:4px 12px 8px}
 .door-books .door-caption strong,.door-gifts .door-caption strong{font-size:clamp(19px,5.3vw,25px)}
 #main:has(>.mobile-doors){padding-top:0}
}
@media(max-width:700px) and (max-height:600px){.mobile-welcome.mobile-doors{gap:5px;padding-bottom:6px}.mobile-doors-banner{flex-basis:11%}.mobile-doors-grid{gap:5px}.door-caption{gap:2px}.door-caption small{font-size:10px}.door-caption strong{font-size:20px}.door-books .door-caption,.door-gifts .door-caption{padding-bottom:5px}}

/* Selected living-cover design. Fit the entire image before and after hydration. */
@media(max-width:700px){
 .mobile-welcome.living-cover{display:flex;align-items:center;justify-content:center;width:100%;max-width:none;height:100vh;height:100svh;max-height:none;min-height:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);gap:0;background:#324179;box-sizing:border-box;overflow:hidden}
 .living-cover-frame{position:relative;width:min(100%,calc((100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom))*863/1823));height:auto;max-height:100%;aspect-ratio:863/1823;flex:none;line-height:0}
 .living-cover-art{display:block;width:100%;height:100%;object-fit:contain}
 .living-cover-links{position:absolute;inset:0;display:block!important;margin:0!important;padding:0!important;background:transparent!important}
 .living-cover-links .living-link{position:absolute;display:block!important;margin:0!important;padding:0!important;min-height:44px;min-width:44px;border:0;background:transparent;line-height:normal;border-radius:12px}
 .living-link:focus-visible{outline:4px solid #fff;outline-offset:-5px;box-shadow:inset 0 0 0 7px #193660}
 .living-link:active{background:#fff4ca33}
 .living-meet,.living-watch,.living-books{left:2%;width:48%}
 .living-play,.living-listen,.living-gifts{left:50%;width:48%}
 .living-meet,.living-play{top:40%;height:21%}
 .living-watch,.living-listen{top:61%;height:19%}
 .living-books,.living-gifts{top:80%;height:19.8%}
 #main:has(>.living-cover){padding-top:0}
}

/* Fidget's airy character-selection screen. */
/* The same character menu is the Play entrance on every screen. */
 body:has(.character-selector)>div>header,body:has(.character-selector)>header,body:has(.character-selector) footer{display:none}
 #main:has(>.character-selector){padding:0;max-width:none;margin:0}
 .character-selector{display:flex;flex-direction:column;height:100svh;height:100dvh;min-height:480px;max-width:500px;margin:auto;overflow:hidden;box-sizing:border-box;padding:env(safe-area-inset-top) 12px max(8px,env(safe-area-inset-bottom));color:#123821;background:#fbfdf7;font-family:inherit}
 .selector-header{display:flex;align-items:center;justify-content:space-between;flex:none;min-height:48px;background:none;padding:0;border:0;position:static;box-shadow:none;gap:4px}
 .selector-header>a{display:grid;place-items:center;width:44px;height:44px;text-decoration:none;color:#123821;font-size:42px;line-height:1}
 .selector-header>span{font-size:17px;letter-spacing:2px;text-align:center;text-transform:uppercase;line-height:1.2}
 .selector-header small{display:block;font-size:9px;letter-spacing:1.5px;margin-top:4px;color:#647a5b}
 .selector-header>a.selector-map-link{font-family:inherit;font-size:10px;width:44px;letter-spacing:0}
 .selector-content{display:grid;grid-template-rows:auto minmax(0,1fr) 24px 78px auto;flex:1;min-height:0;gap:7px}
 .character-selector h1{font-size:clamp(28px,8vw,42px);text-align:center;line-height:1.05;margin:0;padding:4px 0;letter-spacing:-1px;color:#123821}
 .selector-stage{position:relative;min-height:0;isolation:isolate;touch-action:pan-y;user-select:none}
 .selector-halo{position:absolute;inset:4% 4% 0;border-radius:48%;background:radial-gradient(ellipse,#e1f3cd 0,#eff9e8 50%,#fbfdf700 73%);z-index:-1}
 .selector-hero{height:100%;width:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}
 .selector-hero .character-art{display:block;width:100%;height:100%;max-height:none;max-width:100%;object-fit:contain;mix-blend-mode:multiply;filter:none;margin:0}
 .selector-arrow{position:absolute;top:43%;display:grid;place-items:center;width:44px;height:48px;padding:0;background:#fbfdf7a8;border:0;border-radius:16px;color:#23462d;font-size:50px;line-height:.8;box-shadow:none}
 .selector-prev{left:0}.selector-next{right:0}
 .selector-swipe{font-size:12px;letter-spacing:1px;text-align:center;margin:0!important;align-self:center;color:#486546}
 .selector-actions{display:flex!important;gap:8px;margin:0!important;padding:0!important;background:none!important}
 .selector-actions>a,.selector-actions>button{display:flex!important;flex:1;min-width:0;min-height:44px;align-items:center;justify-content:center;flex-direction:column;gap:3px;border:1px solid #e5eddb;border-radius:15px;background:#eef7e6;color:#123821;text-decoration:none;padding:6px 2px;box-shadow:0 4px 12px #304d2912;font-family:inherit;cursor:pointer}
 .selector-actions svg{width:38px;height:38px;flex:none}.selector-actions span{text-transform:uppercase;font-size:13px;font-weight:700;letter-spacing:1px}
 .selector-actions>.selector-play{background:#ffdf51;border-color:#ffe778;box-shadow:0 4px 14px #dcc23745}
 .selector-roster{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;padding:11px 1px 1px;border-top:1px solid #e1e8da}
 .selector-roster button{aspect-ratio:1;min-width:0;min-height:44px;width:100%;position:relative;padding:0;border:1px solid #e1e6dc;border-radius:11px;overflow:hidden;background:#fff;box-shadow:0 2px 8px #25331a0a;cursor:pointer}
 .selector-roster button[aria-pressed=true]{border:2px solid #ffe065;box-shadow:0 0 0 3px #ffeb7f80,0 0 13px #ffe06595}
 .selector-roster svg,.selector-roster img{display:block;width:100%;height:100%;object-fit:cover;max-height:none;max-width:none;margin:0}
 .selector-roster img{object-fit:contain}
 .character-selector button:focus-visible,.character-selector a:focus-visible{outline:3px solid #23593c;outline-offset:-3px}
 .selector-game-list{display:flex;flex-direction:column;gap:10px;margin:18px 0}.selector-game-list .pill{width:100%;text-align:center;justify-content:center;min-height:48px}
@media(max-width:700px) and (max-height:620px){.selector-header{min-height:40px}.selector-content{grid-template-rows:auto minmax(0,1fr) 18px 64px auto;gap:4px}.character-selector h1{font-size:28px}.selector-actions svg{width:30px;height:30px}.selector-roster{padding-top:7px;gap:5px}.selector-roster button{max-height:49px}.selector-swipe{font-size:10px}}

/* Reserve distinct tracks for actions and portraits; global nav order must not reorder them. */
 .character-selector{--selector-portrait-size:clamp(44px,calc((100vw - 56px)/6),64px);min-height:0}
 .character-selector .selector-header{min-height:48px;height:48px;padding:0;flex:0 0 48px;flex-wrap:nowrap}
 .selector-content{grid-template-areas:"title" "art" "swipe" "actions" "roster";grid-template-rows:auto minmax(0,1fr) 24px 86px calc(var(--selector-portrait-size)*2 + 19px);gap:8px;overflow:hidden}
 .selector-content>h1{grid-area:title}
 .selector-stage{grid-area:art;overflow:hidden}
 .selector-hero{position:absolute;inset:0;width:auto;height:auto}
 .selector-swipe{grid-area:swipe}
 .selector-actions{grid-area:actions;order:0;flex-wrap:nowrap;width:100%;height:100%;min-height:0;align-items:stretch}
 .selector-actions>a,.selector-actions>button{height:100%;line-height:1.2;padding:8px 2px;box-sizing:border-box}
 .selector-roster{grid-area:roster;grid-template-rows:repeat(2,minmax(0,1fr));height:100%;min-height:0;align-items:center;justify-items:center}
 .selector-roster button{width:var(--selector-portrait-size);height:var(--selector-portrait-size);min-height:0;max-height:none;aspect-ratio:1}
@media(max-width:700px) and (max-height:620px){
 .character-selector .selector-header{height:42px;min-height:42px;flex-basis:42px}
 .selector-content{grid-template-rows:auto minmax(0,1fr) 18px 76px calc(var(--selector-portrait-size)*2 + 15px);gap:6px}
 .selector-actions svg{width:34px;height:34px}
}

/* One viewport, generous controls, and a full-width portrait strip on larger screens. */
body:has(.character-selector){background:#fbfdf7}
.selector-browse{flex:none;display:flex;align-items:center;justify-content:center;gap:8px;min-height:34px;color:#23462d;text-underline-offset:4px;font-size:13px}
@media(min-width:701px){
 .character-selector{width:100%;max-width:1440px;padding:8px clamp(20px,4vw,64px) 6px;--selector-portrait-size:clamp(44px,7.2vw,92px)}
 .character-selector .selector-header{height:48px;min-height:48px;flex-basis:48px}
 .selector-header>span{font-size:clamp(18px,1.7vw,26px)}
 .selector-header small{font-size:11px}
 .selector-header>a.selector-map-link{font-size:14px;width:72px}
 .character-selector h1{font-size:clamp(32px,3.4vw,54px);padding:0}
 .selector-content{grid-template-rows:auto minmax(0,1fr) 20px clamp(76px,11dvh,116px) calc(var(--selector-portrait-size) + 16px);gap:8px}
 .selector-stage{width:100%;max-width:1000px;justify-self:center}
 .selector-actions{max-width:960px;justify-self:center;gap:14px}
 .selector-actions>a,.selector-actions>button{border-radius:20px;gap:6px}
 .selector-actions svg{width:clamp(36px,5dvh,52px);height:clamp(36px,5dvh,52px)}
 .selector-actions span{font-size:clamp(15px,1.4vw,20px)}
 .selector-roster{grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:1fr;gap:8px;width:100%;max-width:1280px;justify-self:center;padding:12px 4px 4px}
 .selector-arrow{width:64px;height:72px;font-size:68px;background:#fbfdf7cc}
 .selector-browse{font-size:15px;min-height:34px}
}
@media(min-width:701px) and (max-height:650px){
 .character-selector{padding-top:0;--selector-portrait-size:clamp(44px,9dvh,60px)}
 .character-selector .selector-header{height:38px;min-height:38px;flex-basis:38px}
 .selector-header small{display:none}
 .character-selector h1{font-size:30px}
 .selector-content{grid-template-rows:auto minmax(0,1fr) 18px 68px calc(var(--selector-portrait-size) + 12px);gap:4px}
 .selector-actions svg{width:30px;height:30px}
 .selector-roster{padding-top:8px}
 .selector-browse{min-height:30px}
}
@media(max-width:1100px) and (max-height:500px) and (orientation:landscape){
 .character-selector{max-width:none;--selector-portrait-size:clamp(36px,7vw,48px);padding-inline:12px}
 .character-selector .selector-header{height:32px;min-height:32px;flex-basis:32px}
 .selector-header small{display:none}
 .selector-content{grid-template-columns:1fr 1fr;grid-template-areas:"art title" "art actions" "art roster";grid-template-rows:auto 64px minmax(0,1fr);gap:6px 16px}
 .selector-swipe{display:none}
 .character-selector h1{font-size:26px}
 .selector-roster{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));padding-top:6px;gap:4px}
 .selector-actions svg{width:26px;height:26px}
 .selector-actions span{font-size:11px}
 .selector-browse{min-height:28px;font-size:12px}
}
