/* Phone design system: charcoal, acid lime, lavender, open lists, one stage. */
#mobileAppHeader,#mobileAppNav{display:none}
.app-icon{display:block}
@media(max-width:700px){
 :root{--app-bg:#101410;--app-surface:#1b211b;--app-lime:#c3ff3e;--app-lavender:#dfbcff;--app-muted:#acb5ad;--app-line:#343e35;--lime:var(--app-lime)}
 html{background:var(--app-bg);scroll-padding-top:100px}
 body{background:var(--app-bg);color:#f5f6f1;min-height:100dvh;font-family:'DM Sans',sans-serif;overscroll-behavior-y:none}
 #siteSidebar{display:none}
 #mobileAppHeader{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;z-index:60;height:calc(84px + env(safe-area-inset-top));padding:calc(4px + env(safe-area-inset-top)) 20px 4px;background:#101410f2;backdrop-filter:blur(18px)}
 .app-brand{display:flex;align-items:center;width:128px;height:76px;flex-shrink:0}
 .app-brand img{width:128px;height:76px;object-fit:contain}
 #appMode{margin-left:auto;display:flex;align-items:center;gap:7px;border:1px solid #48514b;border-radius:30px;background:transparent;color:#f6f6f0;font-size:13px;font-weight:700;padding:11px 12px;min-height:44px}
 #appMode svg{width:14px;height:14px}
 #appAccount{width:46px;min-height:60px;padding:0;background:none;color:#f6f6f0;display:flex;align-items:center;flex-direction:column;gap:3px}
 #appAccount .account-circle{width:42px;height:42px;border:1.5px solid var(--app-lime);border-radius:50%;display:grid;place-items:center}
 #appAccount svg{width:22px;height:22px}
 #appAccountText{font-size:10px;font-weight:600;white-space:nowrap}
 main{padding:0 20px calc(106px + env(safe-area-inset-bottom));margin:0;min-width:0}
 main>header,main>footer{display:none}
 #app{animation:app-enter .22s ease-out}
 #mobileAppNav{position:fixed;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;z-index:55;padding:9px 12px calc(9px + env(safe-area-inset-bottom));min-height:82px;background:#111711f5;border:1px solid #39453a;border-bottom:0;border-radius:26px 26px 0 0;box-shadow:0 -8px 32px #0002;backdrop-filter:blur(20px)}
 #mobileAppNav button{min-width:0;min-height:60px;display:flex;align-items:center;flex-direction:column;gap:5px;background:none;color:#c7c9cf;padding:0 1px}
 #mobileAppNav button>span{width:54px;height:35px;border-radius:24px;display:grid;place-items:center;transition:background .16s,color .16s}
 #mobileAppNav svg{width:23px;height:23px}
 #mobileAppNav b{font-size:11px;font-weight:500;line-height:1.2}
 #mobileAppNav [aria-current=page]{color:var(--app-lime)}
 #mobileAppNav [aria-current=page]>span{background:var(--app-lime);color:#14200c}
 #mobileAppNav [aria-current=page] b{font-weight:700}
 #mobileAppNav [aria-current=page][data-mobile-route=home] svg{fill:currentColor}
 #mobileAppNav button:active>span{transform:scale(.92)}
 body:has(dialog[open]) #mobileAppNav,body:has(input:focus,textarea:focus) #mobileAppNav{visibility:hidden}
 .hub-intro{padding:10px 0 18px}
 .hub-intro h1{font-family:'Space Grotesk','DM Sans',sans-serif;font-size:38px;font-weight:700;letter-spacing:-1.8px;line-height:1.04;margin:0 0 12px}
 .hub-intro h1 em{font-style:normal;color:var(--app-lime);font-size:1.14em;letter-spacing:-2px}
 .hub-intro>p{margin:0;color:#c4c7d1;font-size:16px;line-height:1.4;letter-spacing:-.3px}
 .hub-stage{position:relative;isolation:isolate;height:212px;border:1px solid #493248;border-radius:24px;background:radial-gradient(ellipse at 42% 0,#d1a04242,transparent 50%),repeating-linear-gradient(100deg,#1c092c 0,#230e33 13px,#11091e 25px,#080e12 45px,#20102c 60px);margin:0 -3px;overflow:hidden}
 .hub-stage:after{content:'';position:absolute;inset:auto 0 0;height:18px;border-top:2px solid #ffab454f;background:linear-gradient(#71422255,#211409);box-shadow:0 -4px 15px #ffb84944;z-index:-1}
 .hub-stage-lights{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse 70px 140px at 38% 0,#ffd36544,transparent),radial-gradient(ellipse 100px 190px at 84% 0,#fdb63b44,transparent)}
 .hub-stage-lights:before,.hub-stage-lights:after{content:'';position:absolute;top:-7px;left:36%;width:9px;height:12px;border-radius:50%;background:#fff6b1;box-shadow:0 0 18px 6px #ffbe51c9}
 .hub-stage-lights:after{left:85%}
 .hub-pet-copy{position:relative;z-index:2;padding:28px 14px;width:100%;height:100%;pointer-events:none}
 .hub-pet-copy h2{max-width:70%;margin:0 0 14px;color:var(--app-lime);font-size:25px;font-weight:700;letter-spacing:-.8px;text-shadow:0 2px 8px #000}
 .hub-bubble{width:174px;max-width:52%;padding:14px 12px;border-radius:45% 45% 42% 40% / 40% 40% 45% 44%;background:#fffae9;color:#161b18;font-size:13px;line-height:1.35;font-weight:700;transform:rotate(-3deg);box-shadow:0 3px 0 #09090990;pointer-events:auto}
 .hub-feed{position:absolute;bottom:24px;left:14px;background:var(--app-lime);color:#14200b;min-height:44px;padding:12px 15px;border-radius:28px;font-weight:700;font-size:14px;pointer-events:auto;box-shadow:0 4px 20px #0004}
 .hub-feed span{margin-left:8px;font-size:18px}
 .hub-monster{position:absolute;right:-57px;bottom:-65px;width:288px;height:330px;object-fit:contain;object-position:right bottom;z-index:1;filter:drop-shadow(-4px 4px 6px #0005);transform-origin:60% 90%;animation:hub-breathe 5s ease-in-out infinite}
 .hub-stage[data-character=grimp] .hub-monster{right:-36px;bottom:-19px;width:225px;height:255px}
 .hub-section-heading{display:flex;align-items:center;justify-content:space-between;margin:20px 0 12px}
 .hub-section-heading h2{font-size:27px;letter-spacing:-.8px;margin:0}
 .hub-section-heading button{background:none;color:var(--app-lavender);padding:10px 0 10px 10px;min-height:44px;font-size:13px;font-weight:700}
 .hub-create{display:grid;grid-template-columns:1.1fr 1fr;gap:8px;margin-bottom:17px}
 .hub-create button{min-height:78px;border-radius:17px;display:flex;align-items:center;gap:9px;padding:15px 11px;text-align:left;color:#111b0d}
 .hub-create svg{width:30px;height:34px;flex-shrink:0;stroke-width:1.8}
 .hub-create svg:last-child:not(:first-child){display:none}
 .hub-create span{min-width:0}
 .hub-create b{font-size:14px;line-height:1.2;letter-spacing:-.4px;display:block;margin-bottom:4px;white-space:nowrap}
 .hub-create small{display:block;font-size:11px;color:#33412a;line-height:1.3;white-space:nowrap}
 .hub-write{background:var(--app-lime)}
 .hub-record{background:var(--app-lavender)}
 .hub-links>button{display:flex;align-items:center;gap:16px;width:100%;text-align:left;background:none;color:#f4f4ee;padding:16px 4px;border-top:1px solid var(--app-line);min-height:73px}
 .hub-links>button>svg{width:28px;height:29px;flex-shrink:0}
 .hub-links>button>svg:last-child{width:20px;height:20px;margin-left:auto}
 .hub-links b{display:block;font-size:16px;line-height:1.25;margin-bottom:5px}
 .hub-links small{display:block;color:#aeb5b5;font-size:12px;line-height:1.4}
 .hub-create button:active,.hub-feed:active{transform:scale(.97)}
 /* Shared phone screens use the same app chrome and compact controls. */
 .intro{margin:19px 0 24px}
 .intro h1{font-size:29px;line-height:1.1;letter-spacing:-1.1px}
 .intro p{font-size:14px;line-height:1.5;color:var(--app-muted)}
 .primary,.secondary{border-radius:15px}
 .primary{background:var(--app-lime)}
 .secondary{background:#222c22;border-color:#3b4a39}
 .card{background:#1b221c;border:1px solid #354236;border-radius:22px;padding:22px}
 .card h2{font-size:23px}
 .tabs{padding:5px;background:#1f2621;border-radius:17px;gap:4px}
 .tabs button{border-radius:13px;background:transparent;color:#bfc5c3;min-height:45px;font-weight:600}
 .tabs button.active{background:var(--app-lime);color:#17210b}
 .idea-shortcuts button{background:none;border:1px solid #3b493b;color:#d9e3d5;border-radius:14px;font-size:12px}
 #ideaToolPanel .grid{grid-template-columns:minmax(0,1fr);gap:6px}
 #ideaToolPanel .word{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 13px;font-size:19px;line-height:1.2;text-align:right;overflow-wrap:normal;background:#2b2739;border-color:#494057}
 #ideaToolPanel .word small{flex:0 0 76px;font-size:9px;letter-spacing:.7px;line-height:1.4;text-align:left}
 #ideaToolPanel .coach-tip{display:none}
 input,textarea,select{background:#131b15;border-color:#435045;border-radius:14px;font-size:16px}
 .notebook-shelves,.studio-tabs{margin:18px 0 22px}
 #writtenNotes>.row{gap:8px}
 #writtenNotes #search{background:#1d261f;border-radius:16px}
 .recording{padding:20px}
 .recording h3{font-size:17px;line-height:1.45}
 .recording .tag{color:var(--app-lavender)}
 .studio{background:radial-gradient(ellipse at 50% 40%,#263c28,#131b15);border:1px solid #40513b;border-radius:24px}
 .studio .timer{font-size:60px;letter-spacing:1px}
 .studio #record{background:#dfbcff;color:#1e112c;border:0}
 .studio .pill{display:none}
 .studio .row>.pill{display:none}
 .studio .row{grid-template-columns:1.4fr 1fr}
 .empty{border-color:#415044;background:#161f18;border-radius:20px}
 .source{color:#a2afa2}
 .simple-next{border-radius:23px;background:#25321c;border-color:#49622d}
 .simple-topic{border-radius:19px;background:#1c251e;border-color:#36483a}
 .pet-room{background:radial-gradient(ellipse at 50% 30%,#203c34,#15231b);border-radius:24px}
 .pet-room[data-character=grimp]{background:radial-gradient(ellipse at 50% 30%,#44212e,#21191a)}
 .pet-stage .pet-sprite{width:min(100%,290px);height:252px}
 .pet-speech{background:#f0f3df;color:#19251a;font-weight:500;border:0;box-shadow:none}
 .pet-character-picker{padding:4px;background:#0b1512;border-radius:16px}
 .pet-character-picker button{border:0;background:none;border-radius:12px}
 .pet-character-picker button[aria-pressed=true]{background:var(--app-lime);color:#14200b}
 .pet-play button{background:#243b2c;border:1px solid #405c47}
 .pet-identity{margin-top:12px}
 .pet-kitchen .card{border-radius:24px}
 .pet-choices{display:flex;overflow-x:auto;gap:14px;scroll-snap-type:x mandatory;padding:0 0 14px;scrollbar-width:thin}
 .pet-choice{flex:0 0 94%;scroll-snap-align:center;min-width:0}
 dialog,#detail,#choose,#petEvolutionDialog{padding:25px 20px;margin:auto;width:calc(100% - 16px);max-width:480px;max-height:calc(100dvh - env(safe-area-inset-top) - 24px);background:#172019;border:1px solid #4b5a4b;border-radius:24px;overscroll-behavior:contain}
 dialog::backdrop{background:#030804c9;backdrop-filter:blur(6px)}
 #detail textarea{min-height:210px}
 #detail .close{background:#29372b}
 #mobileMore{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:700px;max-height:calc(94dvh - env(safe-area-inset-top));padding:10px 22px calc(22px + env(safe-area-inset-bottom));border-radius:28px 28px 0 0;border:1px solid #455647;border-bottom:0;background:#172019;box-shadow:0 -20px 70px #0007}
 #mobileMore[open]{animation:sheet-up .22s ease-out}
 .sheet-grip{height:4px;width:36px;border-radius:10px;background:#647466;margin:0 auto 16px}
 .sheet-heading{position:sticky;top:0;z-index:3;background:#172019;padding:5px 0;display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:19px}
 .sheet-heading h2{font-size:25px;margin:0;letter-spacing:-.7px}
 .sheet-close{display:grid;place-items:center;border:1px solid #445246;border-radius:50%;width:44px;height:44px;flex-shrink:0;background:#233026;color:white}
 .sheet-close svg{width:20px;height:20px}
 .app-mode-picker{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:5px;background:#0b140e;border-radius:17px;margin-bottom:14px}
 .app-mode-picker button{background:none;color:#bfc9be;border-radius:12px;min-height:46px;font-size:14px;font-weight:600}
 .app-mode-picker [aria-pressed=true]{background:var(--app-lime);color:#14200b}
 .app-tool-list>button,.app-more-extras>button{display:flex;align-items:center;gap:15px;width:100%;background:none;text-align:left;color:#eef3e9;padding:15px 0;min-height:70px;border-bottom:1px solid #344037}
 .app-tool-list svg,.app-more-extras svg{width:22px;height:24px;flex-shrink:0;color:#c7dda3}
 .app-tool-list svg:last-child,.app-more-extras svg:last-child{width:17px;height:18px;margin-left:auto;color:#939e95}
 .app-tool-list b,.app-more-extras b{display:block;font-size:15px;line-height:1.35;font-weight:600}
 .app-tool-list small,.app-more-extras small{display:block;font-size:12px;color:#a4b0a5;line-height:1.4;margin-top:4px}
 .app-more-extras{margin-top:16px}
 #appSummon{background:#222e20;border:1px solid #455c32;padding:8px 12px;border-radius:18px;margin-bottom:7px}
 #appSummon img{width:58px;height:51px;object-fit:contain;margin-left:-5px}
 .app-more-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:18px}
 .app-more-footer button{color:var(--app-lavender);background:none;padding:10px 0;font-size:13px;min-height:44px}
 .install-help{font-size:15px;line-height:1.6}
 .install-help>img{border-radius:18px;display:block;margin:20px auto}
 .install-help h3{margin-top:24px;font-size:18px}
 #appInstallDone{width:100%;margin:10px 0}
 #summonDock{inset:auto 10px calc(92px + env(safe-area-inset-bottom)) auto;width:232px;height:auto;padding:0;display:block;border:0;background:none}
 #summonDock:before{display:none}
 #summonDock[data-phase=sleeping]{display:none}
 #summonLauncher{width:232px;height:155px}
 #summonDock[data-phase=awake],#summonDock[data-phase=breaking]{bottom:calc(92px + env(safe-area-inset-bottom));right:10px}
 #toast{bottom:calc(96px + env(safe-area-inset-bottom));background:var(--app-lime);color:#15210c;z-index:90}
 @keyframes hub-breathe{0%,100%{transform:rotate(-1deg) translateY(0)}50%{transform:rotate(1deg) translateY(-3px)}}
 @keyframes sheet-up{from{transform:translateY(24px);opacity:.4}to{transform:translateY(0);opacity:1}}
 @keyframes app-enter{from{opacity:.6;transform:translateY(3px)}to{opacity:1;transform:none}}
}
@media(max-width:360px){
 #mobileAppHeader{padding-inline:16px;gap:6px;height:calc(76px + env(safe-area-inset-top))}
 .app-brand,.app-brand img{width:105px;height:68px}
 #appMode{padding:10px;font-size:12px}
 main{padding-inline:16px}
 .hub-intro h1{font-size:33px}
 .hub-stage{height:216px}
 .hub-monster{width:208px;height:255px;right:-32px}
 .hub-pet-copy h2{font-size:23px}
 .hub-bubble{font-size:12px}
 .hub-feed{font-size:13px;padding-inline:12px}
 .hub-create button{gap:7px;padding:13px 10px}
 .hub-create b{font-size:12px}
 .hub-create small{font-size:10px}
 .hub-create svg{width:25px}
}
@media(prefers-reduced-motion:reduce){.hub-monster,#mobileMore[open],#app{animation:none!important}#mobileAppNav button>span{transition:none}}
