/* The four public portal surfaces follow the approved full-bleed cinematic mockups.
   Game boards, account data and existing forms remain functional DOM, not baked images. */
:root{--portal-coral:#fa6d66;--portal-ink:#1b2730;--portal-cream:#fffdfa}
body{background:#fffdfa;color:var(--portal-ink)}
body>header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:72px;padding:7px clamp(20px,5vw,96px);background:#fff;box-shadow:0 1px 6px #17281a18;border:0}
body>header .brand-wrap{gap:13px;flex:none}
body>header .brand-media{width:110px;height:56px;border:2px solid #fff;border-radius:9px;background:#071a35;box-shadow:0 1px 7px #173a4a40}
body>header .brand span{font-size:25px;color:#101923}
body>header .brand small{font-size:12px;color:#4c5861}
body>header nav{display:flex;justify-content:center;align-items:center;gap:clamp(14px,3vw,58px);flex:1;min-width:0;max-width:none}
body>header nav a,body>header nav :is(#home,#collection,#settings){position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:56px;padding:5px 3px;border:0;border-radius:0;background:transparent;color:#131c25;font-size:15px;font-weight:850;white-space:nowrap;line-height:1.18;text-decoration:none}
body>header nav small{display:block;color:#45505a;font-size:12px;font-weight:500;margin-top:3px}
body>header nav a:hover,body>header nav button:hover{background:transparent;color:var(--portal-coral)}
body>header nav a[aria-current=page]{color:#17372d}
body>header nav a[aria-current=page]::after{content:"";position:absolute;left:12%;right:12%;bottom:0;height:3px;border-radius:3px;background:var(--portal-coral)}
body>header nav a:focus-visible{outline:3px solid #c58513;outline-offset:2px}
.portal-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:18px;flex:none}
body>header #language{width:150px;max-width:150px;padding:7px 8px;border:0;border-radius:0;background:#fff;color:#1b2730;font-size:12px}
#account-slot{display:flex;align-items:center;min-width:70px}
#member-account{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:50px;padding:4px 8px;background:transparent;border-radius:0;color:#141d27;font-size:14px;font-weight:850;line-height:1.1;white-space:nowrap}
#member-account small{margin-top:4px;font-size:11px;font-weight:500}
.portal-tools{position:relative}
.portal-tools summary{display:grid;place-items:center;width:34px;height:34px;cursor:pointer;font-size:25px;line-height:1;list-style:none;border-radius:50%;color:#253c38}
.portal-tools summary::-webkit-details-marker{display:none}
.portal-tools[open] summary{background:#eaf1e8}
.portal-tools-panel{position:absolute;z-index:20;right:0;top:42px;display:flex;flex-direction:column;gap:5px;width:285px;padding:16px;border:1px solid #e2e9df;border-radius:17px;background:#fff;box-shadow:0 15px 40px #102e2440}
.portal-tools-panel .volume{width:100%;min-height:44px;padding:8px 0;font-size:13px}
.portal-tools-panel .volume input{width:110px}
.portal-tools-panel button{width:100%;font-size:13px}
main#app[data-page=home],main#app[data-page=auth],main#app[data-page=points],main#app[data-page=collection]{max-width:none;margin:0;padding:0 0 55px}
body>header+main[data-page=home]{padding-top:0}
/* Home: full viewport story illustration and three photographic portals. */
.portal-hero{position:relative;min-height:clamp(570px,40vw,670px);overflow:hidden;border:0;border-radius:0;background:#122117;box-shadow:none;isolation:isolate}
.portal-hero-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center center;opacity:1;z-index:-2}
.portal-hero::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#06130bb5 0%,#07160b48 37%,transparent 65%)}
.portal-hero-content{position:relative;max-width:750px;padding:clamp(74px,5vw,110px) 0 50px clamp(36px,8.8vw,160px);color:#fff}
.portal-hero .portal-kicker{display:none}
.portal-hero h1{margin:0 0 8px;font-size:clamp(52px,5.4vw,86px);font-weight:950;line-height:1.04;letter-spacing:-.055em;color:#fff;text-shadow:0 3px 12px #0b1c1055}
.portal-hero h1 em,.portal-auth-scene h1 em,.portal-collection-banner h1 em{font-style:normal;color:#fb867d}
.portal-hero h1 small{margin-top:12px;font-size:clamp(24px,2.6vw,37px);font-weight:760;letter-spacing:-.025em}
.portal-hero p:not(.portal-hero-quote){margin:20px 0;color:#fff;font-size:clamp(20px,1.8vw,27px);line-height:1.42}
.portal-hero p span{font-size:.85em}
.portal-hero-actions{display:flex;gap:14px;margin-top:28px;flex-wrap:wrap}
.portal-hero-actions>a,.portal-hero-actions>button{position:relative;display:flex;align-items:flex-start;min-width:235px;min-height:76px;padding:12px 46px 12px 30px;border:2px solid #fff;border-radius:999px;background:#1024117a;color:#fff;font-size:24px;line-height:1.1}
.portal-hero-actions>.portal-action{background:var(--portal-coral);border-color:#f7b0a7}
.portal-hero-actions>a::after,.portal-hero-actions>button::after{content:"→";position:absolute;right:26px;top:50%;transform:translateY(-50%);font-size:27px;font-weight:400}
.portal-hero-actions small{margin-top:5px;font-size:14px}
.portal-hero-quote{position:absolute;right:3%;bottom:35px;margin:0;color:#fff;font-size:18px;line-height:1.35;font-weight:800;text-shadow:0 2px 5px #001}
.portal-hero-quote span{display:block;margin-top:8px;font-size:14px;font-weight:500}
#app[data-page=home] .discovery-hub{max-width:1520px;margin:20px auto 44px;padding:0 clamp(18px,4vw,58px)}
#app[data-page=home] .discovery-hub>h2,#app[data-page=home] .discovery-hub>p:first-of-type{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#app[data-page=home] .journey-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
#app[data-page=home] .journey-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:240px;padding:26px 26px 30px;border:1px solid #edeae2;border-radius:22px;background:#fff;color:#111a24;box-shadow:0 8px 20px #1d281426;text-decoration:none;overflow:hidden;isolation:isolate}
#app[data-page=home] .journey-card::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#fff 0%,#fff 28%,#fffffff0 48%,#ffffff0a 82%);pointer-events:none}
#app[data-page=home] .journey-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:65% 38%;z-index:-2}
#app[data-page=home] .journey-card:nth-child(2)>img{object-position:60% 38%}
#app[data-page=home] .journey-card:nth-child(3)>img{object-position:65% 50%}
#app[data-page=home] .journey-number{display:none}
#app[data-page=home] .journey-card h3{position:relative;z-index:1;width:57%;margin:0 0 10px;color:#101923;font-size:clamp(22px,2.1vw,33px);line-height:1.17;font-weight:900}
#app[data-page=home] .journey-card h3 small{display:block;margin-top:4px;font-size:18px;font-weight:600}
#app[data-page=home] .journey-card p{position:relative;z-index:1;width:53%;margin:0;color:#374149;font-size:14px;line-height:1.45}
#app[data-page=home] .journey-card p small{display:block;margin-top:4px;font-size:12px}
#app[data-page=home] .journey-arrow{position:relative;z-index:1;display:grid;place-items:center;width:42px;height:42px;margin-top:20px;border:2px solid #283942;border-radius:50%;background:#fff;color:#182531;font-size:24px;line-height:1}
#app[data-page=home]>.section-title,#app[data-page=home]>#games{max-width:1440px;margin-left:auto;margin-right:auto;padding-left:36px;padding-right:36px}
/* Login: one forest scene with a floating, fully functional card. */
.portal-auth-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(390px,1fr);gap:0;min-height:calc(100vh - 72px);padding:clamp(34px,4vw,72px) clamp(24px,5vw,92px);border-radius:0;background:#2d3d2a url('./media/portal-login-v2.png') center center/cover no-repeat;box-shadow:none}
.portal-auth-scene{display:flex;justify-content:center;align-items:flex-start;min-height:0;padding:15px 0 15px 54%;background:none}
.portal-auth-scene::after{display:none}
.portal-auth-scene>div{width:100%;color:#fff}
.portal-auth-scene h1{margin:0;color:#fff;font-size:clamp(47px,4.6vw,73px);line-height:1.05;text-shadow:0 2px 10px #15201655}
.portal-auth-scene h1 small{margin-top:15px;font-size:clamp(26px,2.4vw,38px);font-weight:800;line-height:1.1}
.portal-auth-scene p{color:#fff;font-size:clamp(15px,1.5vw,21px);font-weight:600;line-height:1.5;text-shadow:0 1px 8px #17201377}
.portal-auth-card{align-self:center;width:100%;max-width:590px;min-height:650px;margin:0 0 0 auto;padding:clamp(30px,4vw,62px);border:0;border-radius:28px;background:#fffdfa;box-shadow:0 18px 52px #15271338}
.portal-auth-card h1{margin:8px 0 27px;color:#111920;font-size:clamp(35px,3vw,49px);letter-spacing:-.04em}
.portal-auth-card h1 small{display:inline;margin:0 0 0 10px;color:#1b2730;font-size:.7em;font-weight:780}
.portal-auth-tabs{justify-content:space-between;margin:12px 0 18px;gap:7px}
.portal-auth-tabs button{flex:1;min-height:38px;padding:6px 8px;border-radius:999px;font-size:13px}
.portal-auth-card #member-form{display:flex;flex-direction:column;gap:12px}
.portal-auth-card #member-form label{display:flex;align-items:stretch;flex-direction:column;gap:9px;padding:0 0 8px;border:0;color:#111b22;font-size:16px}
.portal-auth-card #member-form input{width:100%;min-height:64px;padding:14px 18px;border:1px solid #cbd3dc;border-radius:11px;background:#fff;color:#192932;font-size:16px}
.portal-auth-card #member-form button.primary{min-height:64px;margin-top:10px;border-radius:999px;background:var(--portal-coral);font-size:22px}
.portal-auth-note{margin:16px 0 0;font-size:12px;line-height:1.4}
.portal-auth-card .signup-terms{padding:12px 14px;border:1px solid #9dbca9;border-radius:12px;background:#eaf4eb;color:#173e35;font-size:16px;line-height:1.45}
/* Points: real account values in the same layered forest composition. */
#app[data-page=points]{min-height:calc(100vh - 72px);background:linear-gradient(#ffffff00 0%,#ffffff00 600px,#fffdfa 950px),url('./media/portal-forest-v2.png') center top/100% 700px no-repeat,#fffdfa}
.portal-points-intro{min-height:220px;padding:38px clamp(28px,8vw,135px) 40px;border:0;border-radius:0;background:transparent;color:#fff}
.portal-points-intro h1{margin:0 0 8px;font-size:clamp(47px,5vw,78px);font-weight:950;line-height:1;color:#fff}
.portal-points-intro h1 small{margin-top:8px;font-size:27px;font-weight:750}
.portal-points-intro p{color:#fff;font-size:18px;font-weight:650}
.portal-points-summary{display:flex;align-items:center;justify-content:space-between;max-width:1500px;min-height:265px;margin:-22px auto 14px;padding:30px 40px;border:0;border-radius:24px;background:#fffefb;box-shadow:0 16px 38px #12271430;overflow:hidden}
.portal-points-summary>div:first-child{z-index:1;flex:1}
.portal-points-summary>div:first-child>p{color:#18232b;font-size:20px;font-weight:850}
.portal-points-summary strong{color:#f05257;font-size:clamp(50px,5.2vw,80px);letter-spacing:-.04em}
.portal-points-metrics{display:flex;flex-wrap:wrap;gap:0;margin-top:17px}
.portal-points-metrics p{min-width:170px;max-width:260px;margin:0;padding:10px 20px;border-left:1px solid #d9dfdc;color:#233830;font-size:13px;font-weight:700}
.portal-points-summary>img{width:clamp(170px,24vw,330px);height:260px;object-fit:contain;object-position:bottom;align-self:end;margin:-15px -10px -34px 0}
.portal-points-lower{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(280px,1fr);gap:16px;max-width:1500px;margin:14px auto 30px}
.portal-ledger{min-width:0;margin:0;padding:28px 32px;border:0;border-radius:22px;background:#fffefa;box-shadow:0 6px 25px #16302222}
.portal-ledger h2{font-size:30px;color:#142029}
.portal-ledger-filters button{border-radius:18px}
.portal-points-promo{position:relative;display:flex;flex-direction:column;justify-content:space-between;min-height:410px;padding:28px;border-radius:22px;overflow:hidden;background:#172316 url('./media/portal-banana.jpg') center 45%/cover no-repeat;color:#fff;text-decoration:none;isolation:isolate}
.portal-points-promo::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#091b1699 0%,transparent 45%,#0a1b1990 100%)}
.portal-points-promo>span{font-size:25px;line-height:1.23;font-weight:900;text-shadow:0 2px 8px #001}
.portal-points-promo small{display:block;margin-top:6px;font-size:14px;font-weight:650}
.portal-points-promo>b{align-self:start;padding:11px 25px;border:1px solid #fff;border-radius:999px;background:var(--portal-coral);font-size:22px}
.portal-account-tools{max-width:1500px;margin:0 auto}
.card-support-panel{margin:24px 0;padding:20px;border:1px solid #b4d2bd;border-radius:18px;background:#f7fbf5}
.card-support-panel h2{margin:0 0 12px;font-size:clamp(23px,3vw,30px)}
.card-support-notice{padding:14px;border-left:5px solid #bc7d24;background:#fff5dc;color:#263a34;font-size:16px;line-height:1.5}
.card-support-form{display:flex;flex-wrap:wrap;align-items:end;gap:12px}
.card-support-form label{display:flex;flex:1 1 180px;flex-direction:column;gap:6px;font-size:16px;font-weight:750}
.card-support-form input,.card-support-form select,.card-support-form button{min-height:48px;font-size:16px}
.card-support-case{margin:12px 0;padding:14px;border:1px solid #d1dfd0;border-radius:12px;background:#fff;overflow-wrap:anywhere}
.card-support-case strong{font-size:17px}.card-support-case ul{padding-left:22px;line-height:1.5}
/* Collection: forest title, live search and large art cards. */
.portal-collection-banner{display:flex;align-items:center;justify-content:space-between;gap:25px;min-height:320px;padding:30px clamp(28px,6vw,100px);border-radius:0;background:#1b3225 url('./media/portal-forest-v2.png') center center/cover no-repeat;color:#fff}
.portal-collection-copy{max-width:610px}
.portal-collection-banner h1{margin:0;color:#fff;font-size:clamp(48px,5.3vw,82px);font-weight:950;line-height:1.05}
.portal-collection-banner h1 small{margin-top:5px;font-size:clamp(26px,3vw,42px);font-weight:750}
.portal-collection-banner p{margin:15px 0 0;color:#fff;font-size:22px;line-height:1.42}
.portal-collection-banner p span{font-size:20px}
.portal-today-friend{position:relative;display:flex;align-items:center;justify-content:space-between;width:min(520px,42%);min-height:260px;padding:24px;overflow:hidden;border:2px solid #fff;border-radius:22px;background:#fffef8;color:#172631;text-decoration:none;isolation:isolate;box-shadow:0 9px 24px #091b1240}
.portal-today-friend::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#fffefc 0%,#fffefcf5 44%,transparent 79%)}
.portal-today-friend>img{position:absolute;inset:0 0 0 auto;width:66%;height:100%;object-fit:cover;object-position:center 28%;z-index:-2;border:0;border-radius:0}
.portal-today-copy{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;gap:20px;max-width:56%}
.portal-today-copy strong{font-size:25px;line-height:1.1}
.portal-today-copy strong small,.portal-today-copy>span small,.portal-today-copy b small{display:block;margin-top:4px;font-size:14px;font-weight:500}
.portal-today-copy>span{font-size:15px;line-height:1.35;font-weight:700}
.portal-today-copy b{padding:10px 18px;border-radius:999px;background:var(--portal-coral);color:#fff;font-size:17px;line-height:1.1}
#app[data-page=collection]>.toolbar{display:flex;align-items:center;gap:12px;max-width:1500px;margin:15px auto 18px;padding:0 14px}
#app[data-page=collection]>.toolbar input{flex:1;min-height:55px;border-radius:999px;background:#fff;box-shadow:0 2px 9px #12251012;font-size:16px}
#app[data-page=collection]>.toolbar button{min-width:145px;min-height:52px;border:1px solid #e4e5df;border-radius:999px;background:#fff;color:#263538;font-size:15px}
#app[data-page=collection]>.toolbar button:focus,#app[data-page=collection]>.toolbar button:hover{background:var(--portal-coral);color:#fff}
#app[data-page=collection] .collection{max-width:1500px;margin:0 auto;padding:0 14px;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
#app[data-page=collection] .collection-tile{position:relative;min-width:0;padding:0;border:1px solid #eee7de;border-radius:16px;background:#fff;box-shadow:0 6px 20px #15271818;overflow:hidden}
#app[data-page=collection] .collection .card{position:relative;display:block;width:100%;padding:0;border:0;border-radius:0;background:transparent;text-align:left;box-shadow:none}
#app[data-page=collection] .collection .card>img{display:block;width:100%;height:225px;max-width:none;margin:0;background:radial-gradient(circle at 65% 20%,#cddfba 0%,#517744 70%,#25432b 100%);object-fit:contain;object-position:center bottom}
#app[data-page=collection] .collection .card h3{margin:0;padding:10px 15px 13px;color:#15232b;font-size:21px;line-height:1.05;text-align:left}
#app[data-page=collection] .collection .card h3 small{margin-top:4px;color:#415660;font-size:14px}
#app[data-page=collection] .portal-card-play{position:absolute;right:12px;bottom:13px;display:grid;place-items:center;width:38px;height:38px;border:2px solid #17272e;border-radius:50%;background:#fff;color:#17272e;font-size:15px}
#app[data-page=collection] .collection-study{display:block;margin:0 14px 13px;padding:8px 12px;border-radius:999px;background:#e9f2e7;color:#1d382d;font-size:13px;font-weight:800;text-align:center;text-decoration:none}
#app[data-page=collection] .favorite-toggle{position:absolute;top:9px;right:9px;display:grid;place-items:center;width:35px;height:35px;padding:0;border:1px solid #f3e6c4;border-radius:50%;background:#fffdf5;color:#b46d27;font-size:22px;line-height:1;box-shadow:0 2px 9px #17231a22}
#app[data-page=collection] .portal-collection-learning{max-width:1500px;margin:0 auto 18px;padding:0 14px}
#app[data-page=collection] .portal-collection-learning>summary{padding:12px 18px;border:1px solid #d9e4d6;border-radius:14px;background:#eef5eb;color:#1a392c;font-weight:800;cursor:pointer}
#app[data-page=collection] .portal-collection-learning>summary small{margin-left:8px;font-size:.85em;font-weight:600}
#app[data-page=collection] .portal-collection-learning[open]>:not(summary){margin:12px 0}
#app[data-page=collection]>.daily-collection,#app[data-page=collection]>.tiger-learning-card{max-width:1500px;margin:32px auto}
@media(max-width:1200px){body>header{gap:10px;padding:8px 24px}body>header nav{gap:13px}.portal-header-actions{gap:8px}.portal-auth-scene{padding-left:48%}.portal-points-summary,.portal-points-lower,.portal-account-tools{margin-left:18px;margin-right:18px}}
@media(max-width:900px){body>header{flex-wrap:wrap;justify-content:space-between}body>header nav{order:3;width:100%;flex:none;justify-content:space-around}body>header nav a:first-child::after{bottom:-4px}.portal-auth-layout{grid-template-columns:1fr;gap:18px;padding:26px}.portal-auth-scene{min-height:240px;padding-left:35%;justify-content:flex-start}.portal-auth-card{max-width:650px;margin:auto;min-height:0}.portal-points-lower{grid-template-columns:1fr}.portal-points-promo{min-height:300px}.portal-today-friend{width:45%}#app[data-page=home] .journey-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#app[data-page=collection] .collection{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){body>header{min-height:65px;padding:6px 12px;gap:4px}body>header .brand-media{width:68px;height:42px}body>header .brand span{font-size:18px}body>header .brand small{display:none}.portal-header-actions{gap:1px}body>header #language{width:115px;max-width:115px;font-size:10px}#member-account{font-size:11px;padding:3px}#member-account small{font-size:9px}.portal-tools summary{width:28px}body>header nav{gap:4px;overflow-x:auto;justify-content:space-between}body>header nav a,body>header nav :is(#home,#collection,#settings){min-height:43px;padding:3px 2px;font-size:12px}body>header nav small{font-size:9px}.portal-hero{min-height:620px}.portal-hero-image{object-position:61% center}.portal-hero::before{background:linear-gradient(0deg,#06130be8 0%,#06130b99 45%,transparent 100%)}.portal-hero-content{display:flex;flex-direction:column;justify-content:flex-end;min-height:620px;padding:26px 21px 62px}.portal-hero h1{font-size:45px}.portal-hero h1 small{font-size:24px}.portal-hero p:not(.portal-hero-quote){font-size:18px}.portal-hero-actions>a,.portal-hero-actions>button{min-width:0;flex:1 1 45%;min-height:62px;padding:10px 20px;font-size:17px}.portal-hero-actions>a::after,.portal-hero-actions>button::after{display:none}.portal-hero-actions small{font-size:11px}.portal-hero-quote{display:none}#app[data-page=home] .journey-grid{grid-template-columns:1fr}#app[data-page=home] .journey-card{min-height:210px}#app[data-page=home] .journey-card h3{font-size:26px}.portal-auth-layout{padding:14px;background-position:36% center}.portal-auth-scene{min-height:220px;padding:12px 0 12px 37%}.portal-auth-scene h1{font-size:35px}.portal-auth-scene h1 small{font-size:20px}.portal-auth-scene p{display:none}.portal-auth-card{padding:24px;border-radius:20px}.portal-auth-card h1{font-size:34px}.portal-points-intro{min-height:190px;padding:32px 20px}.portal-points-intro h1{font-size:47px}.portal-points-summary{min-height:250px;margin:-25px 12px 12px;padding:20px}.portal-points-summary strong{font-size:42px}.portal-points-summary>img{width:100px;height:145px;margin:0 -20px -20px 0}.portal-points-metrics p{padding:5px 8px;font-size:11px}.portal-points-lower,.portal-account-tools{margin:12px}.portal-ledger{padding:18px}.portal-collection-banner{min-height:480px;flex-direction:column;align-items:stretch;padding:24px}.portal-collection-banner h1{font-size:45px}.portal-collection-banner h1 small{font-size:26px}.portal-collection-banner p{font-size:16px}.portal-today-friend{width:100%;min-height:220px}#app[data-page=collection]>.toolbar input{flex-basis:100%}#app[data-page=collection]>.toolbar button{min-width:0;flex:1;padding:7px;font-size:12px}#app[data-page=collection] .collection{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#app[data-page=collection] .collection .card>img{height:170px}#app[data-page=collection] .collection .card h3{font-size:16px}#app[data-page=collection] .portal-card-play{width:30px;height:30px}}
@media(max-width:620px){.portal-hero h1{font-size:clamp(34px,9vw,42px);letter-spacing:-.065em}}
/* The remaining portal surfaces use the same forest, paper and coral system. */
#app[data-page=home]>.section-title{display:flex;align-items:center;justify-content:space-between;margin-top:44px;margin-bottom:20px}
#app[data-page=home]>.section-title h2{color:#19282d;font-size:clamp(28px,3vw,42px)}
#app[data-page=home] #games{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
#app[data-page=home] #games>.card{min-width:0;padding:14px;border:1px solid #ecebe5;border-radius:20px;background:#fff;box-shadow:0 6px 18px #18352417;text-align:left}
#app[data-page=home] #games>.card>img{width:100%;height:170px;margin:6px 0 12px;border-radius:14px;background:linear-gradient(#dce9d8,#8baa79);object-fit:contain}
#app[data-page=home] #games>.card h3{margin:0;color:#14252b;font-size:20px}
#app[data-page=home] #games>.card small{display:block;color:#526269;font-size:12px}
#app[data-page=settings]{max-width:none;margin:0;padding:0 20px 70px;background:#fffdfa}
.portal-settings-banner{margin:0 -20px 25px;min-height:290px;padding:54px clamp(28px,8vw,140px);background:#223d2b url('./media/portal-forest-v2.png') center 40%/cover no-repeat;color:#fff}
.portal-settings-banner h1{margin:0;color:#fff;font-size:clamp(46px,5vw,75px);line-height:1.05}
.portal-settings-banner h1 small{display:block;margin-top:8px;font-size:clamp(25px,2.7vw,42px)}
.portal-settings-banner p{color:#fff;font-size:19px;font-weight:750;line-height:1.45;text-shadow:0 2px 7px #0019}
.portal-settings-banner p span{color:#fff;font-size:.82em}
#app[data-page=settings] #preferences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:1000px;margin:0 auto;padding:30px;border:1px solid #eee9e1;border-radius:22px;background:#fff;box-shadow:0 8px 26px #162f2020}
#app[data-page=settings] #preferences label{display:flex;flex-direction:column;gap:9px;color:#1e3335;font-weight:800}
#app[data-page=settings] #preferences select,#app[data-page=settings] #preferences input:not([type=checkbox]):not([type=range]){min-height:50px;padding:10px;border:1px solid #d3ddd7;border-radius:10px;background:#fff}
#app[data-page=settings] #preferences button{min-height:53px;border-radius:999px;font-size:17px}
#app[data-page=settings] #preferences button.primary{background:var(--portal-coral)}
#app[data-page=settings] #operation-link{max-width:1000px;margin:22px auto}
@media(max-width:900px){#app[data-page=home] #games{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){#app[data-page=home] #games{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#app[data-page=home] #games>.card{padding:8px}#app[data-page=home] #games>.card>img{height:115px}#app[data-page=home] #games>.card h3{font-size:15px}#app[data-page=settings] #preferences{grid-template-columns:1fr;padding:18px}.portal-settings-banner{min-height:250px;padding:38px 22px}}
#app:has(.tutorial),#app:has(.play-layout){max-width:1500px;padding:28px clamp(18px,4vw,60px) 70px;background:#fffdfa}
#app:has(.tutorial)>.box{border:1px solid #eee9e1;border-radius:24px;background:#fff;box-shadow:0 9px 30px #1d322021}
#app:has(.tutorial)>.box h1{font-size:clamp(34px,4vw,58px);color:#19282d}
#app:has(.tutorial) .tutorial{border-radius:20px;background:#eaf1e5;color:#204331}
#app:has(.tutorial) .toolbar button,#app:has(.play-layout) .toolbar button,#app:has(.play-layout) .sidebar button{border-radius:999px}
#app:has(.tutorial) .toolbar button.primary{background:var(--portal-coral)}
#app:has(.play-layout)>.toolbar{align-items:center;margin:0 0 15px;padding:12px 20px;border-radius:18px;background:#eaf3e9}
#app:has(.play-layout)>.toolbar h2{margin:0;color:#1b2e2c;font-size:clamp(21px,2.4vw,32px)}
#app:has(.play-layout) .stage{overflow:hidden;border:4px solid #fff;border-radius:22px;box-shadow:0 8px 28px #112b2530}
#app:has(.play-layout) .sidebar{border:1px solid #e2e9de;border-radius:22px;background:#fff;box-shadow:0 8px 25px #182c2220}
#app:has(.play-layout) .sidebar .metric{color:#ef6b64}
@media(max-width:620px){#app:has(.tutorial),#app:has(.play-layout){padding:16px 10px 45px}#app:has(.play-layout)>.toolbar{padding:10px;gap:8px}#app:has(.play-layout)>.toolbar h2{font-size:18px}}
@media(max-width:620px){body>header nav{overflow:visible}}
/* Three primary destinations get the full mobile row; secondary tools stay behind ⋯. */
@media(max-width:620px){
  body>header nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;width:100%;overflow:visible}
  body>header nav > *{min-width:0}
  body>header nav a,body>header nav :is(#home,#collection){width:100%;min-height:58px;padding:6px 2px;font-size:clamp(16px,4.5vw,20px);line-height:1.2;text-align:center}
  body>header nav small{font-size:clamp(11px,3vw,13px);line-height:1.25}
}
@media(max-width:389px){
  .portal-tools-panel{position:fixed;top:100px;right:12px;width:min(285px,calc(100vw - 40px));max-height:calc(100dvh - 112px);overflow:auto}
}
/* QLB-UI-202: one readable artwork card per row on phones, without changing tablet grids. */
#app[data-page=collection] .collection-number{display:block;margin:10px 15px 0;color:#466258;font-size:14px;font-weight:800;letter-spacing:.08em}
#app[data-page=home] #games>.card .game-card-cta{display:block;margin-top:10px;color:#1e5b40;font-size:14px;font-weight:800}
@media(max-width:767px){
  #app[data-page=collection] .collection{grid-template-columns:minmax(0,1fr);gap:16px;padding:0 16px}
  #app[data-page=collection] .collection .card>img{height:clamp(230px,68vw,330px);object-fit:contain}
  #app[data-page=collection] .collection-number{margin:13px 18px 0;font-size:16px}
  #app[data-page=collection] .collection .card h3{min-height:66px;padding:8px 66px 14px 18px;font-size:clamp(22px,6vw,28px);line-height:1.2;overflow-wrap:anywhere}
  #app[data-page=collection] .collection .card h3 small{font-size:17px;line-height:1.35}
  #app[data-page=collection] .portal-card-play{right:18px;bottom:20px;width:44px;height:44px}
  #app[data-page=collection] .collection-study{display:grid;place-items:center;min-height:48px;margin:0 18px 18px;padding:10px 14px;font-size:16px}
  #app[data-page=collection] .favorite-toggle{top:14px;right:14px;width:44px;height:44px}
  #app[data-page=home] #games{grid-template-columns:minmax(0,1fr);gap:16px;padding-left:16px;padding-right:16px}
  #app[data-page=home] #games>.card{min-height:0;padding:16px;border-radius:22px}
  #app[data-page=home] #games>.card>img{height:clamp(180px,56vw,280px);margin:8px 0 15px;object-fit:contain}
  #app[data-page=home] #games>.card .num{font-size:16px}
  #app[data-page=home] #games>.card h3{font-size:clamp(22px,6vw,28px);line-height:1.2}
  #app[data-page=home] #games>.card small{font-size:16px;line-height:1.4}
  #app[data-page=home] #games>.card .game-card-cta{margin-top:14px;font-size:17px}
}
