/* Tongo's app shell: the viewport stays still; long screens scroll inside it. */
:root { --app-header: calc(68px + env(safe-area-inset-top)); --glass-line: rgba(255,255,255,.88); --glass-shadow: 0 12px 32px rgba(30,91,59,.07),inset 0 1px 0 #fff; }
html, body { height:100%; overflow:hidden; overscroll-behavior:none; }
body { background:radial-gradient(ellipse at 0 10%,#d4f2df 0,transparent 50%),radial-gradient(ellipse at 100% 80%,#fff0ad 0,transparent 48%),#f2f6ef; }
button, a, input, select { -webkit-tap-highlight-color:transparent; }
button { touch-action:manipulation; }
button:focus-visible, a:focus-visible { outline:3px solid #238e61; outline-offset:3px; }
[hidden] { display:none !important; }
.ambient { display:none; }
.site-shell { display:block; height:100dvh; min-height:0; }
.app-main { width:100%; margin:0; min-width:0; height:100%; display:flex; flex-direction:column; }
.topbar { position:relative; flex:0 0 var(--app-header); min-height:0; height:var(--app-header); padding:10px 20px; display:flex; justify-content:space-between; align-items:center; background:rgba(249,252,247,.65); border-bottom:1px solid rgba(39,94,60,.07); backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); z-index:30; }
.header-brand,.header-actions { display:flex; align-items:center; gap:12px; }
.mobile-brand { display:flex; align-items:center; gap:9px; cursor:pointer; color:#164b34; text-align:left; }
.mobile-brand img { width:36px; height:36px; }
.mobile-brand span { font-size:19px; font-weight:900; letter-spacing:-.7px; line-height:1.1; }
.mobile-brand small { display:block; font-size:9px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; margin-top:3px; }
.icon-button,.sound-toggle { display:grid; place-content:center; width:42px; height:42px; padding:0; border-radius:14px; border:1px solid rgba(26,96,54,.09); background:rgba(255,255,255,.72); box-shadow:inset 0 1px 0 #fff; color:#215c3d; cursor:pointer; font-size:24px; }
.menu-toggle { gap:4px; }
.menu-toggle span { display:block; width:17px; height:2px; border-radius:2px; background:currentColor; }
.menu-toggle span:last-child { width:11px; }
.header-chest img { width:34px; height:34px; object-fit:contain; }
.header-actions { gap:8px; }
.screen { display:none; flex:1 1 auto; width:100%; min-height:0; margin:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:24px max(20px,calc((100% - 1100px)/2)) calc(24px + env(safe-area-inset-bottom)); }
.screen.active { display:block; }
.home-screen.active { display:flex; flex-direction:column; padding-top:22px; padding-bottom:max(14px,env(safe-area-inset-bottom)); overflow:hidden; }
.home-intro,.home-tiles,.home-explorer,.home-footnote,.guest-welcome,.progress-status { width:100%; max-width:660px; margin-left:auto; margin-right:auto; }
.home-intro { flex:none; }
.home-intro .eyebrow { font-size:9px; letter-spacing:1.7px; color:#37835b; }
.home-intro h1 { max-width:530px; margin:10px 0 8px; font-size:clamp(29px,4vw,43px); line-height:1.05; letter-spacing:-1.5px; color:#123f2b; }
.home-intro p { margin:0; font-size:13px; color:#6b8072; line-height:1.5; }
.home-tiles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:auto; margin-bottom:auto; padding:20px 0; max-width:590px; }
.home-tile { position:relative; isolation:isolate; display:flex; flex-direction:column; justify-content:space-between; align-items:flex-start; aspect-ratio:1; min-width:0; overflow:hidden; padding:22px; border-radius:29px; border:1px solid var(--glass-line); box-shadow:var(--glass-shadow); text-align:left; background:linear-gradient(130deg,rgba(255,255,255,.87),rgba(255,255,255,.36)); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); color:#17482f; cursor:pointer; transition:transform .18s,box-shadow .18s; }
.home-tile::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 100% 0,rgba(255,255,255,.82),transparent 60%); z-index:-1; }
.home-tile:hover:not(:disabled),.explorer-tile:hover:not(:disabled) { transform:translateY(-3px); box-shadow:0 15px 35px rgba(24,92,53,.13),inset 0 1px 0 #fff; }
.home-tile:active:not(:disabled),.explorer-tile:active:not(:disabled) { transform:scale(.97); }
.tile-continue { background:linear-gradient(135deg,rgba(98,216,151,.67),rgba(208,242,128,.51)); }
.tile-levels { background:linear-gradient(135deg,rgba(255,255,255,.88),rgba(226,241,201,.75)); }
.tile-shop { background:linear-gradient(135deg,rgba(255,247,219,.9),rgba(249,237,190,.52)); cursor:default; opacity:.8; }
.tile-extras { background:linear-gradient(135deg,rgba(239,247,222,.75),rgba(208,239,222,.79)); }
.tile-symbol { display:grid; place-items:center; width:48px; height:48px; border-radius:16px; background:rgba(255,255,255,.52); border:1px solid rgba(255,255,255,.8); font-size:30px; font-weight:700; color:#206a42; }
.tile-grid-symbol { display:grid; grid-template-columns:repeat(2,7px); grid-template-rows:repeat(2,7px); gap:4px; place-content:center; }
.tile-grid-symbol i { width:7px; height:7px; border:2px solid #287044; border-radius:2px; }
.tile-copy { position:relative; z-index:2; display:flex; flex-direction:column; gap:5px; max-width:100%; }
.tile-copy strong { font-size:clamp(17px,2.8vw,23px); line-height:1.1; letter-spacing:-.65px; }
.tile-copy small { font-size:11px; font-weight:650; color:#51765e; line-height:1.4; max-width:145px; }
.tile-copy>span { font-size:9px; color:#679073; font-weight:700; }
.tile-arrow { position:absolute; right:17px; bottom:19px; font-size:20px; color:#487659; }
.tile-art { position:absolute; right:-4%; top:0; width:73%; height:70%; object-fit:contain; pointer-events:none; filter:drop-shadow(0 12px 12px rgba(37,75,20,.12)); }
.tile-art.chest-art { width:75%; height:73%; right:3%; top:-2%; }
.tile-shop .tile-copy,.tile-extras .tile-copy { margin-top:auto; }
.tile-soon { position:absolute; top:13px; left:13px; padding:4px 7px; border-radius:7px; background:rgba(255,255,255,.78); color:#9c8044; font-size:8px; text-transform:uppercase; letter-spacing:.7px; }
.home-footnote { display:flex; align-items:center; justify-content:center; gap:6px; flex:none; color:#86978a; font-size:10px; }
.home-status-dot { width:5px; height:5px; border-radius:50%; background:#6dad77; }
.guest-welcome { margin-top:auto; margin-bottom:auto; text-align:center; padding:18px 20px 26px; }
.guest-logo { display:grid; place-items:center; width:104px; height:104px; border-radius:32px; margin:0 auto 22px; background:rgba(255,255,255,.7); border:1px solid #fff; box-shadow:var(--glass-shadow); transform:rotate(-5deg); }
.guest-logo img { width:76px; height:76px; }
.guest-welcome h2 { color:#204e35; font-size:23px; letter-spacing:-.9px; margin:0 0 12px; }
.guest-welcome p { color:#718575; font-size:13px; line-height:1.7; max-width:300px; margin:0 auto 24px; }
.guest-welcome>small { display:block; margin-top:17px; color:#839789; font-size:10px; }
.guest-welcome .primary-button { width:100%; max-width:320px; min-height:52px; font-size:13px; border-radius:17px; }
html:not([data-home-signed-in="true"]) .home-tiles,html:not([data-home-signed-in="true"]) .home-explorer,html:not([data-home-signed-in="true"]) .menu-toggle,html:not([data-home-signed-in="true"]) .header-actions,html:not([data-home-signed-in="true"]) .app-drawer { display:none !important; }
html[data-home-signed-in="true"] .guest-welcome { display:none; }
.guest-auth-notice[data-guest-notice="learn"] { display:none !important; }
.home-screen.is-exploring .home-intro,.home-screen.is-exploring .home-tiles,.home-screen.is-exploring .home-footnote { display:none; }
.home-explorer { display:flex; flex-direction:column; min-height:0; height:100%; }
.explorer-heading { display:flex; align-items:center; gap:14px; flex:none; }
.explorer-back { display:grid; place-items:center; width:42px; height:42px; flex:none; background:rgba(255,255,255,.74); border:1px solid #fff; border-radius:15px; color:#27663e; font-size:30px; cursor:pointer; box-shadow:var(--glass-shadow); }
.explorer-heading .eyebrow { font-size:8px; letter-spacing:1.4px; }
.explorer-heading h2 { margin:5px 0 0; font-size:25px; letter-spacing:-1px; color:#1c4c31; }
.explorer-description { margin:14px 0 18px; font-size:12px; color:#788b7d; line-height:1.6; flex:none; }
.explorer-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-content:start; overflow-y:auto; overscroll-behavior:contain; padding:3px 2px 18px; scrollbar-width:thin; min-height:0; }
.explorer-tile { position:relative; display:flex; align-items:flex-start; flex-direction:column; min-width:0; min-height:150px; padding:18px; border:1px solid #fff; border-radius:24px; background:linear-gradient(135deg,rgba(255,255,255,.88),rgba(255,255,255,.41)); box-shadow:var(--glass-shadow); color:#234e34; text-align:left; cursor:pointer; transition:transform .16s,box-shadow .16s; }
.explorer-tile .explorer-icon { font-size:27px; margin-bottom:17px; line-height:1; }
.explorer-tile strong { font-size:15px; letter-spacing:-.3px; line-height:1.3; margin-top:auto; }
.explorer-tile small { display:block; margin-top:7px; font-size:10px; line-height:1.4; color:#7b927f; }
.explorer-tile .tile-tag { font-size:8px; letter-spacing:1px; text-transform:uppercase; margin-bottom:9px; color:#62926d; font-weight:800; }
.explorer-tile .tile-status { position:absolute; right:14px; top:14px; font-size:12px; color:#71967b; }
.explorer-tile:disabled { cursor:default; color:#8a9a8b; background:rgba(236,241,232,.7); box-shadow:none; border-color:rgba(228,233,221,.7); }
.explorer-tile:disabled .explorer-icon { filter:grayscale(1); opacity:.42; }
.explorer-tile.is-completed { background:linear-gradient(135deg,#d6edbc,#f2f5cf); }
.explorer-tile.is-current { border-color:#9ad8aa; box-shadow:0 0 0 2px rgba(109,193,132,.12); background:linear-gradient(135deg,#ddf3e1,#f6f6d1); }
.explorer-tile .level-index { font-size:27px; line-height:1; margin:3px 0 18px; color:#75a17c; font-weight:900; }
.explorer-tile.is-completed .level-index { color:#3b9659; }
.explorer-tile .mini-chest-image { width:38px; height:38px; object-fit:contain; position:absolute; right:13px; top:16px; }
.explorer-tile.pack-tile { min-height:230px; grid-column:1/-1; background:linear-gradient(130deg,rgba(201,238,209,.75),rgba(250,244,186,.77)); }
.pack-tile>img { position:absolute; right:10px; top:0; width:55%; height:78%; object-fit:contain; }
.pack-tile strong,.pack-tile small,.pack-tile .tile-tag { position:relative; max-width:52%; }
.pack-tile strong { font-size:24px; }
.tiles-enter .explorer-tile { animation:tile-arrive .32s cubic-bezier(.2,.75,.3,1.12) both; animation-delay:calc(var(--tile-index,0) * 32ms); }
@keyframes tile-arrive { from { opacity:0; transform:scale(.04); } to { opacity:1; transform:scale(1); } }
.app-drawer { position:fixed; inset:0 auto 0 0; height:100dvh; width:min(345px,88vw); display:flex; flex-direction:column; padding:0; background:rgba(245,252,243,.89); backdrop-filter:blur(28px) saturate(140%); -webkit-backdrop-filter:blur(28px) saturate(140%); border-right:1px solid #fff; box-shadow:20px 0 80px rgba(20,54,34,.16); z-index:100; transform:translateX(-110%); visibility:hidden; transition:transform .32s cubic-bezier(.2,.8,.2,1),visibility .32s; }
.app-drawer.is-open { transform:translateX(0); visibility:visible; }
.drawer-backdrop { position:fixed; inset:0; z-index:90; border:0; background:rgba(12,45,24,.22); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); animation:screen-in .2s ease; }
.drawer-heading { display:flex; justify-content:space-between; align-items:center; padding:20px; flex:none; gap:10px; }
.drawer-heading .brand { padding:0; margin:0; gap:10px; }
.drawer-heading .brand img { width:37px; height:37px; }
.drawer-heading .brand strong { font-size:21px; }
.drawer-heading .brand small { font-size:10px; }
.drawer-heading .icon-button { background:transparent; box-shadow:none; border:0; }
.drawer-scroll { min-height:0; overflow-y:auto; flex:1; padding:6px 20px 22px; overscroll-behavior:contain; scrollbar-width:thin; }
.drawer-greeting { margin:3px 0 18px; }
.drawer-greeting .eyebrow { display:block; font-size:8px; margin-bottom:7px; }
.drawer-greeting strong { font-size:20px; letter-spacing:-.5px; }
.drawer-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.drawer-stats>div { display:grid; justify-items:center; gap:5px; padding:13px 4px; background:rgba(255,255,255,.68); border:1px solid rgba(255,255,255,.9); border-radius:18px; }
.drawer-stats span { font-size:19px; }.drawer-stats b { font-size:18px; }.drawer-stats small { font-size:9px; color:#8a9b8b; }
.drawer-progress { display:flex; justify-content:space-between; align-items:center; margin:18px 0 17px; padding:0 3px; }
.drawer-progress strong { display:block; font-size:11px; }.drawer-progress small { display:block; font-size:10px; color:#86998a; margin-top:5px; }
.main-nav { gap:4px; }.main-nav .nav-button { width:100%; min-height:44px; padding:0 13px; border-radius:14px; font-size:12px; font-weight:700; color:#57735e; }
.main-nav .nav-button span { width:24px; font-size:21px; }.main-nav .nav-button small { margin-left:auto; font-size:8px; font-weight:700; color:#829e83; }
.main-nav .nav-button.active { background:linear-gradient(110deg,rgba(119,216,151,.3),rgba(245,229,134,.2)); box-shadow:none; color:#206d3d; }
.drawer-section-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.drawer-section-heading h2 { margin:0; font-size:13px; letter-spacing:-.2px; }.drawer-section-heading>span { color:#7f9985; font-size:10px; }
.drawer-packs { margin-top:26px; }.drawer-hint { font-size:10px; color:#8a9b8b; line-height:1.5; margin:0 0 12px; }
.drawer-packs .chest-inventory { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.inventory-chest { --rarity:#9d6c45; min-height:104px; min-width:0; width:100%; border-radius:16px; border:1px solid color-mix(in srgb,var(--rarity) 20%,transparent); background:color-mix(in srgb,var(--rarity) 6%,white) !important; display:flex; flex-direction:column; align-items:center; gap:3px; padding:7px 3px; cursor:pointer; }
.inventory-chest img { width:58px; height:51px; object-fit:contain; filter:drop-shadow(0 4px 5px color-mix(in srgb,var(--rarity) 18%,transparent)); }
.inventory-chest strong { font-size:8px; color:var(--rarity); }.inventory-chest small { font-size:8px; color:#8e9d90; }.inventory-chest b { font-size:10px; }
.inventory-chest:disabled { opacity:.63; cursor:default; filter:none; }
.chest-common { --rarity:#976840; }.chest-rare { --rarity:#267ed7; }.chest-epic { --rarity:#9454cc; }.chest-legendary { --rarity:#c28c1b; }.chest-mythic { --rarity:#d64745; }
.chest-open-main { margin-top:10px; width:100%; min-height:38px; font-size:10px; border-radius:12px; }
.drawer-missions { margin-top:24px; }.drawer-missions .mission-list { display:flex; flex-direction:column; gap:8px; }.drawer-missions .mission { min-height:0; padding:9px 11px; border-radius:12px; background:rgba(255,255,255,.65); }.drawer-missions .mission strong { font-size:10px; }.drawer-missions .mission small { font-size:9px; }.drawer-missions .micro-track { height:3px; margin-top:7px; }.drawer-missions .mission-chest { border:0; padding:4px; width:32px; height:32px; font-size:19px; background:transparent; cursor:pointer; }
.drawer-footer { padding:13px 16px max(16px,env(safe-area-inset-bottom)); border-top:1px solid rgba(41,90,52,.08); background:rgba(255,255,255,.45); flex:none; }
.drawer-profile { display:flex; align-items:center; gap:11px; width:100%; border:0; background:transparent; text-align:left; color:#295338; cursor:pointer; padding:0; }
.drawer-avatar { display:grid; place-items:center; width:39px; height:39px; border-radius:14px; background:linear-gradient(120deg,#b5e4c3,#f9edaa); font-weight:900; }.drawer-profile strong { display:block; font-size:12px; }.drawer-profile small { display:block; font-size:9px; color:#8a9c8e; margin-top:3px; }.drawer-profile>span:last-child { margin-left:auto; font-size:24px; }
.page-heading { margin:0 0 22px; }.page-heading .eyebrow { font-size:9px; }.page-heading h1 { font-size:clamp(25px,4vw,37px); letter-spacing:-1px; line-height:1.12; margin:9px 0; }.page-heading p { font-size:12px; line-height:1.7; max-width:620px; }
.practice-grid { gap:14px; }.practice-card { padding:22px; border-radius:24px; }.practice-card h2 { font-size:19px; }.practice-card p { font-size:12px; }.practice-icon { font-size:27px; }.practice-card .primary-button,.practice-card .secondary-button { min-height:44px; font-size:12px; }
.mastery-section { margin-top:24px; }.section-title h2 { font-size:20px; }.mastery-list { gap:8px; }.mastery-item { padding:13px; border-radius:16px; }.mastery-item strong { font-size:13px; }.mastery-item>span { font-size:11px; }
.profile-hero { padding:23px; border-radius:25px; gap:14px; min-height:0; margin-bottom:18px; }.profile-hero .avatar { width:55px; height:55px; font-size:23px; border-radius:18px; }.profile-hero h1 { font-size:28px; margin:6px 0; }.profile-hero p { font-size:11px; }.profile-hero .eyebrow { font-size:8px; }.rank-badge { font-size:10px; padding:9px 12px; }
.profile-stats { gap:9px; margin:0 0 22px; }.profile-stats article { padding:15px 8px; border-radius:19px; }.profile-stats b { font-size:25px; }.profile-stats small { font-size:9px; }.profile-stats span { font-size:19px; }
.badge-grid { gap:10px; }.badge { padding:15px 10px; border-radius:18px; }.badge-icon { font-size:25px; }.badge strong { font-size:12px; }.badge small { font-size:10px; line-height:1.5; }
.settings-card { padding:18px; margin-top:15px; border-radius:21px; gap:15px; }.settings-card h2 { font-size:15px; }.settings-card p { font-size:11px; line-height:1.6; }.settings-card .primary-button { min-height:42px; font-size:12px; }
.corpus-toolbar { gap:8px; }.corpus-toolbar .search-box { min-width:0; flex:1 1 100%; }.corpus-toolbar input { font-size:13px; }.corpus-toolbar select { font-size:11px; max-width:100%; }.corpus-toolbar button { font-size:11px; min-height:40px; padding:0 13px; }.corpus-notice p,.corpus-status { font-size:11px; }.corpus-row { padding:17px; border-radius:19px; }.corpus-row dd { font-size:13px; }
.shop-coming-soon { min-height:0; height:100%; padding:24px 18px; border-radius:26px; }.shop-coming-soon-orb { width:70px; height:70px; border-radius:23px; font-size:28px; margin-bottom:13px; }.shop-coming-soon h1 { font-size:31px; }.shop-coming-soon p { font-size:12px; }.shop-coming-soon-note { font-size:10px; margin-top:18px; }.shop-coming-soon-actions { margin-top:20px; }.shop-coming-soon-actions button { font-size:12px; min-height:43px; }
.question-image { display:grid; place-items:center; margin:4px auto 16px; padding:9px; width:min(205px,45vw); height:min(205px,45vw); background:radial-gradient(ellipse,#e2f3d4,rgba(255,255,255,0) 70%); }
.question-image img { width:100%; height:100%; object-fit:contain; }
.animal-answer-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:100%; }
.animal-answer-grid .answer-button { width:100%; min-height:66px; margin:0; border-radius:18px; justify-content:flex-start; gap:9px; padding:12px; font-size:14px; }
.animal-answer-grid.is-images .answer-button { position:relative; flex-direction:column; justify-content:center; min-height:150px; padding:10px; }.animal-answer-grid.is-images img { width:100%; height:120px; object-fit:contain; }.animal-answer-grid.is-images .answer-key { position:absolute; top:8px; left:8px; }
.answer-button[aria-pressed="true"] { background:linear-gradient(120deg,#bce9c9,#fff0a8); border-color:#4caa6b; box-shadow:0 0 0 2px rgba(62,158,94,.14); }
.multi-answer-help { font-size:11px; color:#788f7b; text-align:center; width:100%; margin:4px 0 11px; }.animal-answer-check { margin-top:13px; width:100%; min-height:45px; border-radius:15px; }
.chest-open-card { position:relative; width:min(420px,calc(100vw - 30px)); padding:28px 22px; border-radius:30px; border:1px solid rgba(255,255,255,.8); background:linear-gradient(145deg,#fff,rgba(248,251,241,.96)); overflow:hidden; color:#24482f; }.chest-dismiss { position:absolute; top:10px; right:10px; width:32px; height:32px; font-size:23px; border:0; background:transparent; }
.chest-open-overlay[data-rarity="common"] { --chest-glow:#b8804a; }.chest-open-overlay[data-rarity="rare"] { --chest-glow:#398cea; }.chest-open-overlay[data-rarity="epic"] { --chest-glow:#a066e2; }.chest-open-overlay[data-rarity="legendary"] { --chest-glow:#e6b843; }.chest-open-overlay[data-rarity="mythic"] { --chest-glow:#f05c52; }
.chest-open-card h2 { font-size:27px; letter-spacing:-.7px; }.chest-open-card>p { font-size:12px; color:#87917b; }.chest-stage { height:225px; width:100%; margin:6px auto 15px; }.chest-artwork { position:relative; z-index:2; width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 15px 20px color-mix(in srgb,var(--chest-glow) 30%,transparent)); transition:transform .25s,filter .25s; }.chest-rays { background:repeating-conic-gradient(from 0deg,transparent 0deg 20deg,color-mix(in srgb,var(--chest-glow) 13%,transparent) 20deg 30deg); opacity:.5; }
.chest-stage.opening .chest-artwork { animation:chest-rattle .17s linear 6; }.chest-stage.opened .chest-artwork { animation:chest-pop .65s cubic-bezier(.2,.8,.3,1) both; filter:drop-shadow(0 0 26px var(--chest-glow)) brightness(1.12); }.chest-stage.opened .chest-rays { opacity:1; animation:chest-rays 12s linear infinite; }.chest-open-result { margin-top:0; }.chest-open-result>strong { color:var(--chest-glow); font-size:42px; }.chest-open-trigger { font-size:13px; min-height:48px; width:100%; }.chest-open-result button { min-height:46px; font-size:13px; }
@keyframes chest-rattle { 0%,100% { transform:rotate(0) scale(1); } 25% { transform:rotate(-5deg) scale(1.025); } 75% { transform:rotate(5deg) scale(1.04); } } @keyframes chest-pop { 0% { transform:scale(1); } 40% { transform:scale(1.18) translateY(-9px); } 100% { transform:scale(1.06); } }
@media(min-width:1050px) { html[data-home-signed-in="true"] .app-main { padding-left:290px; } html[data-home-signed-in="true"] .app-drawer { width:290px; transform:none; visibility:visible; box-shadow:8px 0 30px rgba(26,72,41,.03); } .drawer-heading #drawerClose,.menu-toggle { display:none; } .topbar { padding-left:32px; padding-right:32px; } .home-intro { max-width:590px; } .home-tiles { max-width:min(590px,calc(100dvh - 245px)); } }
@media(max-width:760px) { .screen { padding-left:18px; padding-right:18px; } .home-tile { padding:19px 16px; border-radius:25px; }.home-tiles { gap:12px; max-width:420px; }.home-intro { max-width:420px; }.home-tile .tile-symbol { width:40px; height:40px; border-radius:13px; font-size:26px; }.tile-copy strong { font-size:18px; }.tile-copy small { font-size:10px; max-width:125px; }.tile-arrow { right:13px; bottom:16px; }.tile-copy>span { font-size:8px; }.profile-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }.profile-hero { flex-wrap:wrap; }.profile-hero .rank-badge { margin:0; }.practice-grid { grid-template-columns:1fr; }.badge-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.settings-card { flex-wrap:wrap; }.home-explorer { max-width:550px; }.lesson-overlay { padding:12px; }.lesson-shell { min-height:0; height:100%; padding:15px; overflow-y:auto; }.question-prompt { font-size:clamp(22px,5vw,31px); line-height:1.2; }.question-context { font-size:10px; }.question-type { font-size:9px; }.answer-button { font-size:13px; }.feedback-panel { padding:15px; }.feedback-title { font-size:15px; }.feedback-text { font-size:12px; }.feedback-button { min-height:43px; font-size:12px; }.result-card { width:100%; max-height:calc(100dvh - 28px); overflow-y:auto; padding:25px 20px; }.result-card h1 { font-size:32px; }.result-card>p { font-size:13px; } }
@media(max-height:690px) { :root { --app-header:58px; }.home-screen.active { padding-top:15px; }.home-intro h1 { font-size:27px; margin-top:8px; }.home-intro p { font-size:11px; }.home-tiles { max-width:min(365px,calc(100dvh - 202px)); gap:10px; padding:13px 0; }.home-tile { padding:14px; border-radius:22px; }.tile-copy strong { font-size:16px; }.tile-copy small { font-size:9px; }.tile-copy>span { display:none; }.home-tile .tile-symbol { width:32px; height:32px; font-size:22px; }.tile-copy { gap:4px; }.tile-soon { font-size:7px; top:9px; left:9px; }.home-footnote { font-size:9px; }.guest-logo { width:75px; height:75px; margin-bottom:14px; }.guest-logo img { width:58px; height:58px; }.guest-welcome { padding-top:10px; padding-bottom:10px; }.guest-welcome h2 { font-size:20px; }.guest-welcome p { margin-bottom:16px; }.question-image { width:120px; height:120px; }.animal-answer-grid.is-images .answer-button { min-height:105px; }.animal-answer-grid.is-images img { height:80px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; }.tiles-enter .explorer-tile,.chest-stage.opening .chest-artwork,.chest-stage.opened .chest-artwork,.chest-stage.opened .chest-rays { animation:none; }.app-drawer,.home-tile,.explorer-tile { transition:none; } }

.topbar { padding-top:calc(10px + env(safe-area-inset-top)); }
@media(max-width:760px) {
  .profile-hero { grid-template-columns:55px minmax(0,1fr); margin-top:0; }
  .profile-hero .rank-badge { grid-column:1/-1; justify-self:start; }
  .lesson-overlay { height:100dvh; padding:0; }
  .lesson-header { flex:0 0 62px; min-height:62px; width:calc(100% - 32px); gap:12px; }
  .lesson-content { flex:1 1 auto; min-height:0; width:calc(100% - 32px); margin:0 auto; padding:14px 0 160px; overscroll-behavior:contain; }
  .lesson-content h2 { font-size:26px; margin:10px 0 18px; }
  .question-topline { gap:9px; flex-wrap:wrap; margin-bottom:16px; }
  .question-topline>span,.context-pill { font-size:9px; }
  .question-image { width:145px; height:145px; }
  .animal-answer-grid.is-images .answer-button { min-height:135px; }
  .animal-answer-grid.is-images img { height:105px; }
  .feedback-panel { min-height:0; padding:14px 18px calc(14px + env(safe-area-inset-bottom)); gap:11px; flex-direction:column; align-items:stretch; }
  .feedback-copy { gap:10px; }
  .feedback-copy>span { width:34px; height:34px; border-radius:11px; font-size:21px; flex:none; }
  .feedback-copy strong { font-size:14px; }.feedback-copy p { font-size:11px; line-height:1.5; }
  .feedback-button { min-width:0; width:100%; min-height:42px; }
}
@media(max-width:380px) { .display-settings-card .display-settings-controls { grid-template-columns:1fr; min-width:0; width:100%; }.home-tile .tile-copy small { max-width:100px; }.header-brand { gap:8px; }.topbar { padding-left:14px; padding-right:14px; }.mobile-brand span { font-size:17px; } }

/* The reward uses the supplied artwork only; no legacy CSS chest is attached. */
.reward-chest { gap:12px; padding:12px 14px; text-align:left; }
.reward-chest-art { flex:0 0 48px; width:48px; height:48px; position:relative; background:transparent; border:0; display:grid; place-items:center; }
.reward-chest-art img { width:48px; height:48px; object-fit:contain; }
.reward-chest>span:last-child { min-width:0; }
.reward-chest b { display:block; font-size:16px; line-height:1.25; }
.reward-chest small { display:block; margin-top:4px; font-size:11px; line-height:1.45; }

/* Shared lesson/reward dialogs fit the usable viewport, including Safari chrome. */
.result-overlay,
.chest-open-overlay {
  height:100dvh;
  padding:calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);
  overflow:hidden;
}
.result-card,
.chest-open-card {
  width:min(420px,100%);
  min-width:0;
  min-height:0;
  max-height:100%;
  padding:clamp(16px,4vw,26px);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  border-radius:26px;
}
.result-card { display:grid; gap:clamp(8px,1.8dvh,14px); }
.result-burst { width:58px; height:58px; margin:0 auto; border-width:5px; border-radius:20px; font-size:30px; }
.result-card .eyebrow { font-size:10px; line-height:1.4; }
.result-card h1 { margin:0; font-size:clamp(25px,6vw,34px); line-height:1.12; }
.result-card>p { margin:0; font-size:12px; line-height:1.5; }
.result-card .reward-chest { padding:10px 12px; gap:10px; }
.result-card .reward-chest-art { flex-basis:40px; width:40px; height:40px; }
.result-card .reward-chest-art img { width:100%; height:100%; }
.result-card .reward-chest b { font-size:15px; }
.result-card .reward-chest small { font-size:11px; line-height:1.35; }
.result-wallet { margin:0; gap:6px; }
.result-wallet span { padding:6px 9px; font-size:11px; }
.result-grid { min-width:0; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; gap:8px; }
.result-grid div { min-width:0; padding:11px 5px; }
.result-grid span { font-size:9px; line-height:1.4; letter-spacing:.04em; }
.result-grid b { font-size:20px; line-height:1.2; }
.result-card .primary-button,
.chest-open-card .primary-button { min-width:0; width:100%; min-height:46px; padding:11px 12px; font-size:13px; line-height:1.4; }
.chest-open-card { padding-top:32px; }
.chest-open-card .eyebrow { font-size:10px; }
.chest-open-card h2 { margin:8px 0 4px; font-size:clamp(24px,6vw,30px); line-height:1.15; }
.chest-open-card>p { font-size:12px; line-height:1.4; }
.chest-stage { position:relative; isolation:isolate; display:block; width:100%; height:clamp(120px,26dvh,210px); margin:8px auto 12px; overflow:hidden; }
.chest-artwork { position:absolute; inset:10%; display:block; width:80%; height:80%; min-width:0; min-height:0; object-fit:contain; pointer-events:none; }
.chest-rays { inset:0; width:min(100%,210px); height:100%; margin:auto; }
.chest-open-trigger,
.chest-open-result { position:relative; z-index:1; }
.chest-open-result { gap:4px; }
.chest-open-result>span { font-size:25px; line-height:1; }
.chest-open-result>strong { font-size:34px; line-height:1.1; }
.chest-open-result>small { margin-bottom:8px; color:#687c62; font-size:11px; }
.chest-dismiss { top:5px; right:5px; width:44px; height:44px; z-index:3; }
@media(max-height:640px) {
  .result-card { gap:8px; padding:16px; }
  .result-burst { width:44px; height:44px; border-radius:16px; font-size:24px; }
  .result-card h1 { font-size:25px; }
  .result-card>p { font-size:11px; }
  .result-card .reward-chest { padding:8px 10px; }
  .result-grid div { padding:8px 4px; }
  .result-grid b { font-size:18px; }
  .chest-stage { height:clamp(88px,23dvh,145px); margin:4px auto 8px; }
}
