@font-face{font-family:Lumeria;src:local('Trebuchet MS');font-display:swap}
:root{color-scheme:light;--ink:#343151;--muted:#6f687f;--purple:#8060c5;--purple-dark:#6346a2;--cream:#fffaf0;--coral:#eb876b;--gold:#ffc85b;--green:#4a9b70;--line:#e8e1f2;--shadow:0 6px 0 #43365a09,0 12px 35px #42345209;font-family:Lumeria,'Trebuchet MS',system-ui,sans-serif;color:var(--ink);background:#f5f2fa;font-size:15px}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.48}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #e99354;outline-offset:3px}a{color:var(--purple-dark);text-decoration:none}button{border:0;color:inherit}button:active:not(:disabled){transform:translateY(2px)}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:850;letter-spacing:-.6px}h1{font-size:clamp(25px,3vw,38px)}h2{font-size:24px}h3{font-size:18px}.icon{width:22px;height:22px;flex:none;object-fit:contain}.icon-lg{width:40px;height:40px}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:12px 20px;border-radius:15px;font-weight:800;background:#eee8f8;color:var(--purple-dark);border:1px solid #e3d9f3;transition:background .12s,transform .12s}.button.primary{background:var(--purple);color:white;border-color:var(--purple-dark);box-shadow:0 4px 0 var(--purple-dark)}.button.primary:hover{background:#8b6bd0}.button.coral{background:#f2a17e;border-color:#d98065;color:#51364b;box-shadow:0 4px 0 #d98065}.button.white{background:#fff;border-color:var(--line)}.button.small{min-height:40px;padding:8px 13px;font-size:13px;border-radius:12px}.button.quiet{background:transparent;border-color:transparent;box-shadow:none;color:var(--muted)}.icon-button{display:grid;place-items:center;background:white;border:1px solid var(--line);border-radius:13px;min-width:44px;min-height:44px}.eyebrow{text-transform:uppercase;letter-spacing:2px;font-size:10px;font-weight:850;color:var(--purple)}.muted{color:var(--muted)}.hint{font-size:12px;line-height:1.6;color:var(--muted)}.pill{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;padding:5px 10px;border-radius:20px;background:#ede6f9;color:var(--purple-dark)}.pill.green{background:#dff2e2;color:#34784e}.divider{height:1px;background:var(--line);margin:16px 0}.boot-screen{height:100dvh;display:grid;place-content:center;justify-items:center;gap:20px;color:var(--muted)}.brand-emblem{display:grid;place-items:center;width:44px;height:48px;background:var(--purple);color:#ffedb0;border-radius:14px 14px 18px 18px;font-size:27px;font-weight:900;box-shadow:0 4px 0 #634aa0;transform:rotate(-6deg)}.brand{display:flex;gap:12px;align-items:center;line-height:1.2;color:var(--ink)}.brand strong{font-size:22px;letter-spacing:-.7px}.brand small{display:block;margin-top:3px;font-size:9px;letter-spacing:1.8px;color:var(--muted);font-weight:800}.brand small span{color:var(--purple)}
/* A real entrance: account creation is part of the game. */
.entrance{min-height:100dvh;background:radial-gradient(ellipse at 25% 50%,#e9e2fb,transparent 60%),#fbf8f0;display:grid;grid-template-columns:1.2fr 1fr;position:relative;overflow:hidden}.entrance-header{position:absolute;top:26px;left:4%;z-index:1}.entrance-art{display:flex;flex-direction:column;justify-content:center;padding:105px 7% 50px;text-align:center;min-width:0}.entrance-art .eyebrow{margin:10px 0}.entrance-art h1{font-size:clamp(31px,4vw,53px);line-height:1.12;max-width:560px;margin:10px auto}.entrance-art p{max-width:440px;margin:12px auto;color:var(--muted);line-height:1.65}.entrance-art>img{width:100%;max-width:620px;height:330px;object-fit:contain;margin:5px auto}.entrance-traits{display:flex;justify-content:center;gap:18px;font-size:12px;font-weight:750;color:var(--muted)}.entrance-traits span{display:flex;align-items:center;gap:7px}.entrance-side{display:grid;place-items:center;padding:40px;background:#ffffff75;border-left:1px solid #ebe4f1}.auth-card{width:100%;max-width:400px;background:white;padding:32px;border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow)}.auth-card h2{font-size:28px;margin:18px 0 8px}.auth-card p{font-size:14px;line-height:1.6;color:var(--muted)}.auth-switch{display:flex;background:#f1edf7;border-radius:13px;padding:5px;gap:4px;margin:22px 0}.auth-switch button{flex:1;background:transparent;border-radius:9px;padding:10px;font-weight:750;font-size:13px;color:var(--muted)}.auth-switch button[aria-pressed=true]{background:white;color:var(--purple-dark);box-shadow:0 2px 6px #4134580a}.field{display:grid;gap:7px;margin:15px 0;min-width:0}.field label{font-weight:750;font-size:12px}.field input,.field select,.focus-field select{width:100%;min-width:0;border:1px solid #dfd7eb;border-radius:12px;background:#fcfaff;color:var(--ink);padding:12px;min-height:46px}.field input::placeholder{color:#746683}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.auth-card .button.primary{width:100%;margin:10px 0 15px}.form-error{color:#a13a4c;font-size:13px;line-height:1.5;padding:10px;background:#fff0ee;border-radius:10px;margin:10px 0}.auth-foot{text-align:center;margin-top:12px;font-size:11px!important}
/* Shell */
.app-shell{display:grid;grid-template-columns:210px minmax(0,1fr);min-height:100dvh}.sidebar{position:sticky;top:0;height:100dvh;padding:28px 20px 20px;display:flex;flex-direction:column;background:#fffaf2;border-right:1px solid #e8e1ee;gap:30px;z-index:10}.sidebar .brand{gap:10px}.sidebar .brand strong{font-size:23px}.nav-caption{font-size:9px;font-weight:850;letter-spacing:2px;text-transform:uppercase;color:#746582;margin:3px 14px 12px}.nav-stack{display:grid;gap:7px}.nav-item{display:flex;align-items:center;gap:12px;min-height:52px;padding:11px 14px;border:1px solid transparent;border-radius:15px;background:transparent;color:#736785;font-weight:750;font-size:14px;text-align:left}.nav-item:hover{background:#f2edf8}.nav-item[aria-current=page]{background:#ece3fa;color:#6d4cad;border-color:#e2d3f4}.nav-item .icon{width:27px;height:27px}.nav-item small{margin-left:auto;background:#d9c8f2;color:#7350ad;border-radius:7px;padding:2px 5px;font-size:9px}.sidebar-bottom{margin-top:auto}.side-companion{padding:13px;background:#eee6f9;border:1px solid #e3d6f5;border-radius:18px;position:relative;margin-top:15px}.side-companion img{height:70px;width:62px;object-fit:contain;float:right;margin-top:-28px;margin-right:-5px}.side-companion strong{display:block;font-size:13px}.side-companion p{font-size:11px;line-height:1.6;color:#756686;margin:7px 0 9px}.side-companion button{background:white;font-size:11px;font-weight:750;border-radius:9px;padding:7px 9px;color:#7a59b4}.main-shell{min-width:0}.topbar{min-height:85px;background:#fffdf9;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 30px}.topbar-title .eyebrow{font-size:9px;margin-bottom:4px}.topbar-title strong{font-size:16px}.topbar-right{display:flex;align-items:center;gap:13px}.resource-list{display:flex;align-items:center;gap:6px}.resource-chip{display:flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid #eee5db;border-radius:12px;background:#fffaf0;font-size:13px;font-weight:850}.resource-chip:nth-child(2){background:#f0f7ec;border-color:#e1ebda}.resource-chip:nth-child(3){background:#f0eef8;border-color:#e7e1f1}.resource-chip .icon{width:23px;height:23px}.profile-button{display:flex;align-items:center;gap:9px;background:transparent;padding:0;text-align:left}.avatar-portrait{width:42px;height:44px;object-fit:contain;background:#ece4f8;border-radius:14px;border:1px solid #dfd2ef}.profile-button strong{display:block;font-size:12px}.profile-button small{font-size:10px;color:var(--muted)}.page-content{max-width:1500px;margin:auto;padding:25px 30px 35px}.welcome-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}.welcome-row h1{font-size:30px;margin:6px 0}.welcome-row p{font-size:13px;color:var(--muted)}.study-button{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid #e5dced;border-radius:14px;background:#fffcf7;text-align:left;min-height:48px}.study-button strong{display:block;font-size:12px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.study-button small{font-size:10px;color:var(--muted)}.study-button>span:last-child{font-size:16px;color:#766292}.guide-strip{display:flex;align-items:center;gap:13px;padding:12px 17px;background:#eee7fa;border:1px solid #e2d7f2;border-radius:17px;margin-bottom:20px}.guide-number{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:12px;background:#fff;color:var(--purple);font-size:17px;font-weight:850}.guide-copy{flex:1;min-width:0}.guide-copy strong{font-size:13px}.guide-copy p{font-size:11px;color:#756290;margin-top:3px}.guide-strip .button{flex:none}.guide-dots{display:flex;gap:5px}.guide-dots i{width:7px;height:7px;border-radius:50%;background:#d7c6ec}.guide-dots i.done{background:var(--purple)}
/* World and building tools */
.play-grid{display:grid;grid-template-columns:minmax(0,1fr) 265px;gap:20px;align-items:start}.world-card{background:white;border:1px solid #e7e0eb;border-radius:23px;overflow:hidden;box-shadow:var(--shadow);min-width:0}.world-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 19px;border-bottom:1px solid #eae4ee;background:#fffdfa}.world-header h2{font-size:17px}.world-header small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.world-actions{display:flex;align-items:center;gap:5px}.world-actions .icon-button{min-width:34px;min-height:34px;width:34px;height:34px;font-size:20px;background:#f6f2fb;border:0}.world-actions .icon-button .icon{width:16px;height:16px}#game{width:100%;height:430px;min-height:300px;background:linear-gradient(#c4e9ef,#c7e3c4);touch-action:none;position:relative;overflow:hidden}#game canvas{display:block}#game .world-loading{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:10px;font-size:13px;color:#4f735e}.world-loading img{width:80px;height:80px;object-fit:contain}.map-hint{display:flex;align-items:center;gap:9px;padding:11px 17px;font-size:11px;color:#716588;background:#fffdfa;min-height:39px;border-top:1px solid #eee7f0}.map-hint .icon{width:15px;height:15px}.map-hint.placing{background:#fff0cc;color:#8c652b}.map-hint button{background:white;border-radius:8px;padding:5px 9px;color:#845f32;margin-left:auto;min-height:30px}.world-footer{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;padding:14px;background:#fffdfa;border-top:1px solid #eee8ed}.world-footer .button{min-height:48px;padding:10px 8px;font-size:12px;white-space:nowrap}.world-footer .icon{width:23px;height:23px}.detail-panel{background:white;border:1px solid var(--line);border-radius:21px;padding:21px;box-shadow:var(--shadow)}.detail-illustration{display:block;width:150px;height:135px;object-fit:contain;margin:0 auto 8px}.detail-panel h3{font-size:20px;text-align:center}.detail-panel>.pill{display:table;margin:8px auto 15px}.detail-panel p{font-size:12px;line-height:1.7;color:var(--muted);margin-bottom:15px}.detail-panel .button{width:100%;margin-top:10px}.detail-empty{text-align:center;padding-top:8px}.detail-empty img{height:155px;width:100%;object-fit:contain}.detail-empty h3{font-size:18px}.detail-empty p{margin-top:10px}.stat-line{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin:10px 0}.stat-line strong{color:#655388}.cost-list{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;font-size:12px;font-weight:800}.cost-list span{display:flex;align-items:center;gap:4px}.cost-list .icon{width:19px;height:19px}.cost-list .missing{color:#b64651}.rate-card{padding:15px;background:#f3f8ed;border:1px solid #e3ecd8;border-radius:16px;margin-top:17px}.rate-card strong{font-size:12px}.rate-card .resource-list{justify-content:space-between;margin-top:10px}.rate-card .resource-chip{background:transparent;border:0;padding:0;font-size:11px}.quick-modes{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:20px}.quick-card{display:flex;align-items:center;gap:16px;border:1px solid #e4ddee;background:#efe7fa;border-radius:18px;min-width:0;text-align:left;padding:15px 20px}.quick-card.race{background:#fff1d8;border-color:#f0e2c7}.quick-card>img{height:67px;width:65px;object-fit:contain}.quick-card strong{display:block;font-size:16px}.quick-card p{font-size:11px;color:var(--muted);margin:4px 0 7px}.quick-card .arrow{margin-left:auto;font-size:23px;color:#7a5ca7}.quick-card .pill{font-size:9px;padding:3px 7px}.placement-actions{display:flex;gap:8px;margin-top:15px}.placement-actions .button{margin:0}.building-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:20px}.shop-card{border:1px solid var(--line);background:#fffcf7;border-radius:18px;text-align:center;padding:15px 10px;display:flex;flex-direction:column;align-items:center}.shop-card img{height:110px;width:120px;object-fit:contain}.shop-card h3{font-size:15px;margin:7px 0}.shop-card p{font-size:11px;color:var(--muted);line-height:1.6;margin:5px 0 12px}.shop-card .button{font-size:12px;min-height:42px;margin-top:auto;width:100%}
/* Playable arena, race and revision pages */
.mode-prelude{padding:20px 24px;background:#fcf9ff;display:flex;align-items:center;gap:20px;border-bottom:1px solid var(--line)}.mode-prelude>img{width:84px;height:90px;object-fit:contain}.mode-prelude p{font-size:12px;color:var(--muted);line-height:1.65;margin:7px 0 12px}.mode-prelude h3{font-size:21px}.mode-rules{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.rule{font-size:11px;line-height:1.6;color:var(--muted);padding:12px;border-radius:12px;background:#f6f1fc}.rule b{display:inline-grid;place-items:center;width:20px;height:20px;background:#e1d1f3;border-radius:7px;color:var(--purple);margin-right:4px}.hand{padding:15px;background:#f8f4fd;border-top:1px solid var(--line)}.hand-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:12px;color:var(--muted)}.hand-header strong{color:var(--purple-dark)}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.battle-card{position:relative;background:white;border:2px solid #e5daee;border-radius:15px;padding:10px 9px 12px;text-align:center;box-shadow:0 3px 0 #e2d9eb;min-height:140px;transition:transform .12s,border-color .12s;min-width:0}.battle-card:hover:not(:disabled){transform:translateY(-3px);border-color:#a78acb}.battle-card:disabled{opacity:.53}.battle-card .card-cost{position:absolute;left:7px;top:7px;display:grid;place-items:center;width:26px;height:28px;border-radius:9px 9px 13px 13px;background:#9471d1;color:white;font-size:14px;font-weight:900;border:2px solid #f1e6ff}.battle-card>img{width:55px;height:49px;object-fit:contain;display:block;margin:0 auto 6px}.battle-card strong{display:block;font-size:12px;margin-bottom:5px}.battle-card .card-effect{display:block;font-size:10px;line-height:1.5;color:var(--muted)}.battle-card .card-reason{display:block;color:#886070;font-size:9px;margin-top:5px}.energy-display{display:flex;gap:4px;align-items:center;font-size:12px;font-weight:800;color:var(--purple)}.energy-dot{width:10px;height:12px;border-radius:3px;background:#e2d5ef;transform:rotate(8deg)}.energy-dot.filled{background:#9771d5}.game-status{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;background:#fffaf0;border-top:1px solid var(--line)}.game-status p{font-size:12px;color:var(--muted);margin-top:4px}.game-status strong{font-size:16px}.result-banner{background:linear-gradient(130deg,#eee3fa,#f9eddd);text-align:center;padding:24px;border-top:1px solid #e6d8ed}.result-banner img{height:80px;width:85px;object-fit:contain}.result-banner h3{font-size:25px;margin:8px 0}.result-banner p{font-size:13px;color:var(--muted);line-height:1.6;margin:8px 0 15px}.result-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.study-page{display:grid;grid-template-columns:1.1fr 1fr;gap:20px}.study-hero{background:#fffaf0;border:1px solid #ede1d5;border-radius:23px;padding:32px;text-align:center}.study-hero>img{width:185px;height:170px;object-fit:contain}.study-hero h2{margin:10px 0}.study-hero p{color:var(--muted);font-size:13px;line-height:1.7;max-width:360px;margin:12px auto 22px}.study-info{background:white;border:1px solid var(--line);border-radius:23px;padding:25px}.study-info h3{margin-bottom:12px}.study-info p{font-size:13px;line-height:1.7;color:var(--muted)}.study-benefit{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #f1ebf6;font-size:12px}.study-benefit .icon{width:34px;height:34px}.study-benefit strong{display:block;margin-bottom:4px}.study-benefit small{color:var(--muted)}
/* Dialogs keep each question visible, keyboard and touch friendly. */
dialog{border:1px solid #e5dcef;background:#fffdf8;color:var(--ink);border-radius:25px;padding:27px;max-width:calc(100vw - 26px);width:590px;max-height:calc(100dvh - 36px);overflow:auto;box-shadow:0 25px 90px #29203e42}dialog::backdrop{background:#30274377;backdrop-filter:blur(4px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.dialog-top h2{font-size:23px}.dialog-copy{font-size:13px;color:var(--muted);line-height:1.7;margin:10px 0 16px}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:23px}.dialog-actions .button{min-width:115px}.quiz-dialog{width:620px}.quiz-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin:10px 0}.quiz-dialog h2{font-size:22px;line-height:1.4;letter-spacing:-.4px;margin:20px 0}.quiz-purpose{display:flex;align-items:center;gap:12px;background:#eee6fa;border-radius:14px;padding:11px 14px}.quiz-purpose>img{width:35px;height:35px;object-fit:contain}.quiz-purpose strong{font-size:13px}.quiz-purpose small{display:block;font-size:11px;color:#776294;margin-top:4px}.answers{display:grid;gap:10px;margin:20px 0}.answer{display:flex;align-items:center;gap:13px;min-height:55px;padding:11px 15px;border:2px solid #e6dfed;background:white;color:var(--ink);border-radius:14px;text-align:left;font-size:14px;line-height:1.45}.answer>b{display:grid;place-items:center;flex:none;width:29px;height:29px;background:#f2ecf8;border-radius:9px;font-size:12px;color:var(--purple)}.answer:hover:not(:disabled){border-color:#b299cf;background:#f8f3ff}.answer.correct{background:#e1f2df;border-color:#82b97e;opacity:1}.answer.correct>b{background:#aed5a4;color:#387844}.answer.wrong{background:#fff0e9;border-color:#eab09a;opacity:1}.answer.wrong>b{background:#f4c7b8;color:#9c5947}.answer-explanation{padding:17px;background:#f0f5e9;border:1px solid #dce8cb;border-radius:15px;font-size:13px;line-height:1.7}.answer-explanation.wrong{background:#fff0e5;border-color:#f1d5bf}.answer-explanation>strong{display:block;font-size:16px;margin-bottom:6px}.earned{display:flex;gap:14px;align-items:center;font-size:12px;font-weight:800;color:#7b6a3d;margin-top:12px;flex-wrap:wrap}.earned span{display:flex;gap:5px;align-items:center}.focus-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.focus-field{display:grid;gap:6px;font-size:12px;font-weight:750;min-width:0;margin:5px 0}.focus-field select{font-size:12px;max-width:100%}.check-field{display:flex;gap:9px;align-items:center;font-size:12px;color:var(--muted);margin:15px 0}.check-field input{accent-color:var(--purple);width:17px;height:17px}.avatar-editor{display:grid;grid-template-columns:145px 1fr;gap:20px;align-items:center}.avatar-editor>img{width:140px;height:190px;object-fit:contain;background:#eee5f8;border-radius:22px}.help-steps{display:grid;gap:14px;margin:18px 0}.help-step{display:flex;gap:15px;align-items:center}.help-step img{width:48px;height:48px;object-fit:contain}.help-step p{font-size:12px;color:var(--muted);line-height:1.6;margin-top:4px}.modal-note{background:#f3edf9;padding:12px;border-radius:12px;font-size:11px;line-height:1.6;color:#76638c}.toast{position:fixed;z-index:100;bottom:25px;left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;background:#39324f;color:#fffaf3;border-radius:14px;padding:13px 20px;max-width:min(90vw,560px);box-shadow:0 7px 30px #32224033;font-size:13px;line-height:1.55;transition:opacity .15s,transform .15s}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{background:#925363}.mobile-brand{display:none}.mobile-nav{display:none}.online-state{font-size:10px;color:#756786;padding-top:12px}.online-state i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#78ae79;margin-right:5px}.no-connection{background:#fff1d7;color:#87662c;padding:12px;text-align:center;font-size:12px}.mode-side-image{width:140px;height:150px;display:block;object-fit:contain;margin:0 auto 15px}.mode-side-heading{font-size:21px;text-align:center;margin-bottom:12px}.mode-side-list{display:grid;gap:15px;margin-top:15px}.mode-side-list div{font-size:12px;line-height:1.6;color:var(--muted)}.mode-side-list strong{display:block;color:var(--ink);margin-bottom:3px}.restored-run{margin:10px 0;padding:10px;background:#fff0d6;border-radius:12px;font-size:11px;color:#846641}.restored-run button{padding:4px;background:transparent;color:var(--purple);font-weight:800}.loading-dots{display:inline-block;letter-spacing:2px;color:var(--purple)}
@media(min-width:1450px){#game{height:485px}.cards{grid-template-columns:repeat(6,minmax(0,1fr))}.battle-card{min-height:150px}.play-grid{grid-template-columns:minmax(0,1fr) 280px}}
@media(max-width:1100px){.app-shell{grid-template-columns:175px minmax(0,1fr)}.sidebar{padding:24px 12px}.sidebar .brand strong{font-size:20px}.sidebar .brand-emblem{width:36px;height:40px}.nav-item{padding:10px;font-size:12px;gap:9px}.page-content{padding:23px 22px}.topbar{padding:16px 22px}.profile-button>span{display:none}.play-grid{grid-template-columns:minmax(0,1fr) 235px;gap:15px}.detail-panel{padding:17px}.welcome-row h1{font-size:27px}.resource-chip{padding:7px 8px}.world-footer{gap:6px;padding:10px}.world-footer .button{font-size:11px}.world-footer .icon{width:20px;height:20px}.quick-card{padding:12px}.quick-card>img{width:50px;height:60px}.quick-card strong{font-size:14px}}
@media(max-width:900px){.app-shell{grid-template-columns:88px minmax(0,1fr)}.sidebar{padding:24px 11px}.sidebar .brand>div:last-child,.nav-caption,.nav-item>span,.nav-item small,.sidebar-bottom,.sidebar .brand small{display:none}.sidebar .brand{justify-content:center}.sidebar .brand-emblem{width:43px;height:46px}.nav-item{justify-content:center;padding:10px;min-height:54px}.nav-item .icon{width:30px;height:30px}.play-grid{grid-template-columns:minmax(0,1fr) 225px}.guide-dots{display:none}.welcome-row h1{font-size:25px}.study-button{padding:8px 10px}.study-button .icon{width:22px;height:22px}.study-button strong{max-width:140px}.world-footer .button{font-size:10px}.world-footer .icon{width:18px;height:18px}.entrance-art{padding-left:6%;padding-right:6%}.entrance-side{padding:24px}.entrance-art>img{height:270px}.entrance-traits{flex-wrap:wrap;gap:12px}}
@media(max-width:740px){.app-shell{display:block}.sidebar{display:none}.topbar{padding:13px 16px;min-height:72px;gap:10px}.topbar-title{display:none}.mobile-brand{display:flex}.mobile-brand .brand-emblem{width:33px;height:36px;font-size:22px}.mobile-brand strong{font-size:20px;letter-spacing:-1px}.mobile-brand{gap:9px;align-items:center}.topbar-right{gap:8px}.resource-list{gap:4px}.resource-chip{font-size:11px;padding:6px 7px;border-radius:10px;gap:4px}.resource-chip .icon{width:19px;height:19px}.profile-button{display:none}.page-content{padding:20px 16px calc(98px + env(safe-area-inset-bottom))}.welcome-row{margin-bottom:16px;gap:8px}.welcome-row h1{font-size:25px}.welcome-row p{font-size:11px;max-width:220px;line-height:1.6}.welcome-row .eyebrow{font-size:8px;letter-spacing:1.6px}.study-button{width:44px;height:44px;justify-content:center;flex:none;padding:9px}.study-button>span{display:none}.study-button .icon{width:26px;height:26px}.guide-strip{padding:11px 12px;gap:10px;margin-bottom:16px}.guide-copy p{font-size:10px;line-height:1.5}.guide-copy strong{font-size:12px}.guide-number{width:29px;height:30px;font-size:15px;border-radius:10px}.guide-strip .button{font-size:10px;padding:8px 9px;min-height:35px}.play-grid{grid-template-columns:1fr;gap:14px}.detail-panel{box-shadow:none}.detail-panel.empty-panel{display:none}.world-header{padding:13px 14px}.world-header h2{font-size:15px}.world-header small{font-size:10px}#game{height:345px;min-height:280px}.world-card{border-radius:20px}.world-footer{gap:7px;padding:11px}.world-footer .button{font-size:11px;padding:9px 7px;min-height:46px;gap:5px}.world-footer .icon{width:20px;height:20px}.map-hint{padding:9px 12px;font-size:10px;line-height:1.5}.quick-modes{gap:10px;margin-top:15px}.quick-card{gap:9px;padding:12px;align-items:flex-start;position:relative}.quick-card>img{width:42px;height:52px}.quick-card strong{font-size:13px}.quick-card p{font-size:10px;margin:4px 0}.quick-card .arrow{display:none}.quick-card .pill{font-size:8px}.rate-card{margin-top:12px}.detail-illustration{height:100px;width:110px;float:left;margin:0 16px 0 0}.detail-panel h3{text-align:left}.detail-panel>.pill{display:inline-flex;margin:8px 0}.detail-panel .cost-list{justify-content:flex-start}.detail-panel>.button{width:auto;min-width:130px;margin-right:7px}.detail-panel>.button:last-child{min-width:100px}.detail-panel .stat-line{margin:6px 0}.detail-panel p{font-size:11px}.detail-panel .divider{clear:both;margin-top:10px}.mode-rules{grid-template-columns:1fr;gap:7px}.rule{padding:10px}.mode-prelude{padding:18px 16px;gap:12px}.mode-prelude>img{width:66px;height:90px}.mode-prelude h3{font-size:19px}.mode-prelude p{font-size:11px}.hand{padding:12px}.cards{gap:8px}.battle-card{min-height:135px;padding:10px 7px}.battle-card strong{font-size:11px}.battle-card .card-effect{font-size:9px}.battle-card .card-cost{width:23px;height:25px;font-size:12px;left:5px;top:5px}.battle-card>img{width:45px;height:45px}.hand-header{font-size:10px}.energy-display{font-size:11px}.energy-dot{width:7px;height:10px}.game-status{padding:15px;gap:10px}.game-status strong{font-size:14px}.game-status p{font-size:10px}.game-status .button{font-size:12px;padding:10px 14px}.mode-aside{display:none}.study-page{grid-template-columns:1fr;gap:15px}.study-hero{padding:22px}.study-hero>img{height:130px;width:150px}.study-info{padding:22px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:20;background:#fffdf8f5;border-top:1px solid #e7dfee;display:grid;grid-template-columns:repeat(5,1fr);padding:6px 8px calc(6px + env(safe-area-inset-bottom));backdrop-filter:blur(10px)}.mobile-nav .nav-item{display:flex;flex-direction:column;gap:4px;font-size:9px;min-height:55px;padding:6px 3px;border-radius:12px}.mobile-nav .nav-item .icon{width:25px;height:25px}.mobile-nav .nav-item span{display:block}.mobile-nav .nav-item[aria-current=page]{border-color:transparent}.mobile-nav .nav-item.extra{color:#776192}.entrance{grid-template-columns:1fr}.entrance-header{position:static;padding:22px 22px 0}.entrance-art{padding:15px 20px 0}.entrance-art h1{font-size:32px;max-width:350px;margin:6px auto}.entrance-art p{font-size:13px;max-width:310px;margin:9px auto}.entrance-art .eyebrow{font-size:9px}.entrance-art>img{height:185px;margin:0 auto}.entrance-traits{display:none}.entrance-side{padding:15px 22px 30px;background:transparent;border:0}.auth-card{padding:23px;max-width:440px;border-radius:23px}.auth-card h2{margin-top:10px;font-size:25px}.auth-card p{font-size:12px}.auth-switch{margin:18px 0}.toast{bottom:calc(88px + env(safe-area-inset-bottom));font-size:12px;padding:11px 15px}.building-picker{grid-template-columns:1fr;gap:10px}.shop-card{display:grid;grid-template-columns:90px 1fr;text-align:left;padding:12px;column-gap:13px}.shop-card>img{width:90px;height:90px;grid-row:span 4}.shop-card h3{margin:0}.shop-card p{margin:3px 0 8px}.shop-card .cost-list{justify-content:flex-start;margin-bottom:9px}.shop-card .button{width:auto;font-size:11px;min-height:37px}.avatar-editor{grid-template-columns:100px 1fr;gap:13px}.avatar-editor>img{width:100px;height:150px}.dialog-top h2{font-size:21px}dialog{padding:22px 19px;border-radius:22px}.quiz-dialog h2{font-size:19px;line-height:1.45;margin:17px 0}.answer{min-height:54px;font-size:13px;padding:10px 12px}.answer-explanation{font-size:12px;padding:14px}.quiz-purpose{padding:10px 12px}.focus-grid{grid-template-columns:1fr}.dialog-actions{margin-top:20px;gap:8px}.dialog-actions .button{flex:1;min-width:0;padding:11px;font-size:12px}}
@media(max-width:360px){.mobile-brand strong{display:none}.resource-chip{font-size:10px;padding:6px}.welcome-row h1{font-size:22px}.guide-strip .button{font-size:9px}.world-footer .button{font-size:10px;gap:3px}.world-footer .icon{width:16px}.quick-card{padding:10px}.quick-card>img{width:32px}.quick-card strong{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.avatar-editor>.avatar-preview{width:140px;height:190px;background:#eee5f8;border-radius:22px;display:block}
@media(max-width:740px){.avatar-editor>.avatar-preview{width:100px;height:150px}}

.game-stage{position:relative}.world-overlay{position:absolute;bottom:24px;left:12px;right:12px;display:flex;justify-content:center;pointer-events:none}.world-overlay .button{pointer-events:auto;box-shadow:0 4px 0 #6346a2,0 8px 25px #34315135;font-size:13px}
@media(max-width:740px){body[data-scene=arena] #game{height:240px;min-height:225px}body[data-scene=arena] .welcome-row p{display:none}.world-overlay{bottom:17px}.world-overlay .button{font-size:12px;min-height:43px}}

@media(max-width:420px){.topbar.dense-resources .mobile-brand strong{display:none}}
@media(max-width:360px){.topbar.dense-resources .topbar-right>.icon-button{display:none}.resource-chip .icon{width:17px;height:17px}}
