/* Obsidian, aged metal and soul light. Presentation only; save format stays V5. */
:root{--text:#e8e1d3;--muted:#a1a8a5;--mint:#8cede0;--gold:#d3bb8c;--violet:#c6a4e5;--ink:#090e11;--panel:#101719;--line:#4d4c43}
body{background:radial-gradient(ellipse at 72% 0,#20313480,transparent 48%),#090e11;color:var(--text);font:15px/1.5 Georgia,'Times New Roman',serif;min-width:320px}body:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:-1;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.065' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23ffffff' opacity='.075' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");opacity:.5}
[hidden]{display:none!important}button{transition:border-color .15s,box-shadow .15s,background-color .15s}button:disabled{opacity:.55}button:focus-visible,a:focus-visible{outline:2px solid #e1c68f;outline-offset:3px}button:hover:not(:disabled){color:#fff3d6}.app{width:auto;max-width:1600px;margin:0 auto;padding:0 28px 12px;min-width:0}
.topbar{height:80px;margin:0;gap:10px;align-items:center;border-bottom:1px solid #81725857}.realm-heading{margin-right:auto;min-width:160px}.realm-heading>span{display:block;font-size:8px;color:#b09c78;letter-spacing:2.5px}.realm-heading strong{display:block;font-size:16px;font-weight:normal;color:#c1c7bd;margin-top:3px}.wallet,.hero-summary,.icon-button{border-radius:0;background:linear-gradient(120deg,#17211f,#080e11);border:1px solid #6c6654;box-shadow:inset 0 0 0 3px #090e11,inset 0 0 0 4px #4a4d423d}.wallet{flex:0 1 175px;height:48px;padding:7px 13px;gap:10px}.wallet strong{font-size:21px;font-weight:normal}.wallet small{font:8px 'Trebuchet MS',sans-serif;letter-spacing:1.3px;color:#b5b5a6}.resource-icon{width:26px;height:32px;flex-shrink:0;filter:drop-shadow(0 0 6px #5ba58d44)}.resource-detail{display:none}.hero-summary{height:48px;min-width:118px;padding:7px 12px}.hero-summary small{font-size:7px;color:#c9c0b1}.hero-summary strong{font-size:17px;font-weight:normal}.hero-summary>span:first-child{width:23px;height:25px;color:#bda0d1}.microbar{height:2px;width:58px;background:#343037}.microbar i{background:#aa88bf}.settings-button{width:43px;height:44px;padding:11px;border-radius:50%;color:#c3b28f}.mobile-menu{display:none}
/* Nine-slice ornaments leave all controls live and accessible. */
#panel,.battleground,.roster-card,.stat-box,.command-training,.world-card,.hunt-card,.spell-card,.node-detail,.tree,.discovery-banner,.reset-ledger>div{position:relative;border:1px solid #4e5148;border-radius:0;box-shadow:inset 0 0 0 3px #03090b,0 3px 10px #0005}#panel:before,.battleground:after,.roster-card:after,.stat-box:after,.command-training:after,.world-card:after,.hunt-card:after,.spell-card:after,.node-detail:after,.tree:after,.discovery-banner:after,.reset-ledger>div:after{content:'';position:absolute;inset:0;pointer-events:none;border:17px solid transparent;border-image:url('assets/ui-frame.svg') 32 / 20px / 0 stretch;z-index:4}
#panel{position:relative;inset:auto;width:100%;max-width:none;max-height:none;margin:30px 0 0;overflow:visible;padding:0;background:linear-gradient(#080f1280,#0b1115 410px),url('assets/ui-header.png') right top / 100% auto no-repeat,#0b1115;color:var(--text);isolation:isolate}#panel:not([open]){display:none}#panel:focus{outline:none}#panel::backdrop{background:#02070ce8}#panel:modal{position:fixed;inset:0;width:min(700px,90vw);max-height:90dvh;margin:auto;overflow:auto;z-index:30}.panel-heading{position:relative;top:auto;background:none;border:0;padding:30px 30px 17px;min-height:135px;align-items:flex-start;gap:14px}.panel-heading>div{flex:1;min-width:0}.panel-heading small{font-size:10px;letter-spacing:3px;color:#ccb187}.panel-heading h1{font:normal clamp(30px,3.5vw,56px)/1.1 Georgia;margin:6px 0 0;letter-spacing:-1px;text-shadow:0 3px 10px #000}.panel-heading .icon-button{width:38px;height:40px;min-height:40px;background:#071113b8;border-color:#79736566;color:#d4c5a9;flex-shrink:0}.panel-heading:after{content:'';position:absolute;bottom:0;left:30px;width:min(54%,610px);height:8px;background:linear-gradient(90deg,transparent,#877960 15%,#c0a878 50%,#877960 85%,transparent);clip-path:polygon(0 45%,46% 45%,48% 20%,49% 45%,50% 0,51% 45%,52% 20%,54% 45%,100% 45%,100% 55%,54% 55%,52% 80%,51% 55%,50% 100%,49% 55%,48% 80%,46% 55%,0 55%)}#panel-content{padding:19px 27px 28px;min-height:500px}.panel-intro{font:16px/1.65 Georgia;color:#ccd0c9;max-width:940px;margin:0 0 24px}.panel-intro strong{color:#f2e8d7;font-weight:normal}#panel-content>.panel-intro:first-child{max-width:72%;min-height:56px;text-shadow:0 2px 4px #000}p{overflow-wrap:break-word}
.command-training{display:flex;flex-direction:row;align-items:center;gap:23px;padding:20px 25px;margin:0 0 15px;background:radial-gradient(ellipse at 15% 30%,#63347b60,transparent 60%),linear-gradient(120deg,#231a31e8,#101116);border-color:#80668e;min-height:116px}.command-training:after{filter:sepia(.4) hue-rotate(205deg);opacity:.85}.command-training>div{flex:1}.command-training strong{font-size:28px;font-weight:normal;color:#eee1f5}.command-training p{font:15px/1.5 Georgia;color:#c1b9ca;margin:4px 0 0}.ritual-crystal{width:70px;height:75px;position:relative;flex-shrink:0;color:#e4b8ff;filter:drop-shadow(0 0 13px #b661ec)}.ritual-crystal:before{content:'';position:absolute;inset:2px 16px;border:1px solid #ca95ec;transform:rotate(25deg);box-shadow:inset 0 0 15px #ba61dc50}.command-training .primary{min-width:200px;min-height:65px;font-size:21px}
.primary,.secondary,.upgrade-button{border-radius:0;font-family:Georgia,serif;border-color:#5e9b82;background:linear-gradient(140deg,#166246,#0c332c 60%,#123d2e);box-shadow:inset 0 0 0 3px #0b1a17,inset 0 0 0 4px #6caa8260;color:#d7f4df;text-shadow:0 1px 2px #000}.primary,.secondary{padding:13px 17px;min-height:47px;font-size:14px}.primary:hover:not(:disabled){box-shadow:inset 0 0 0 3px #0b1a17,inset 0 0 0 4px #8ceec990,0 0 16px #3dcea029}.secondary{background:linear-gradient(#242724,#11191a);border-color:#716b5a;color:#d5cab4;box-shadow:inset 0 0 0 3px #0b1010,inset 0 0 0 4px #635b4240}
.stat-grid{gap:14px;margin:15px 0 22px}.stat-box{background:radial-gradient(ellipse at bottom,#17333344,transparent),#0b1317;padding:17px 20px;min-height:96px;text-align:left;display:grid;align-content:center;grid-template-columns:auto 1fr;column-gap:22px}.stat-symbol{grid-row:1/3;width:60px;height:60px;padding:13px;border:1px solid #528575;border-radius:50%;color:#8bd8c1}.stat-box strong{font:32px/1.2 Georgia;color:#a4ebdb;grid-column:2}.stat-box small{font:14px/1.5 Georgia;color:#c6ccc4;grid-column:2}.stat-box:not(:has(.stat-symbol)){display:block;text-align:center}
.roster{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.roster-card{padding:0 17px 18px;display:flex;flex-direction:column;min-width:0;isolation:isolate;background:radial-gradient(ellipse at 50% 25%,#223d3f66,transparent 65%),linear-gradient(#111e21,#080f12 65%)}.creature-art{height:220px;position:relative;margin:1px -16px 4px;display:grid;place-items:center;background:linear-gradient(0deg,#0c1418,transparent 50%,#0c141861),url('assets/moonlit-graves.png') center 30%/cover;isolation:isolate}.creature-art:before{content:'';position:absolute;inset:0;background:#09141680;z-index:-1}.creature-art .portrait{width:88%;height:205px;filter:drop-shadow(0 8px 12px #0009);transition:transform .2s}.roster-card:hover .creature-art .portrait{transform:translateY(-3px)}.creature-role-icon{position:absolute;left:16px;top:15px;width:33px;height:36px;padding:6px;background:#121b1bcc;border:1px solid #746a54;z-index:1;color:#cfccb8}.creature-status{position:absolute;right:14px;top:20px;font:8px 'Trebuchet MS',sans-serif;letter-spacing:1.2px;color:#c4c4b2;text-shadow:0 1px 3px #000}.creature-status.is-equipped{color:#aff7dc}.roster-card.equipped{border-color:#85debd;box-shadow:inset 0 0 0 3px #0b392f,0 0 19px #55d9bb44}.roster-card.equipped:after{filter:sepia(1) saturate(1.7) hue-rotate(92deg) brightness(1.55)}.roster-card.locked{background:linear-gradient(#151922,#0b1014);opacity:1}.roster-card.locked .creature-art{filter:saturate(.5)}.roster-card .roster-head{align-items:flex-start;gap:0;position:relative;z-index:1}.roster-card .roster-head small{color:#c4bba5;font:12px Georgia}.roster-card h2{font:bold 24px/1.15 Georgia;margin:3px 0 0;color:#f0e9d9;hyphens:auto}.roster-card p{font:14px/1.5 Georgia;color:#c9cfc9;min-height:84px;margin:11px 0 14px}.roster-meta{font:12px/1.5 Georgia;color:#c5cdca;margin-top:auto;gap:4px;margin-bottom:13px}.roster-card .primary{font-size:13px;padding:12px 7px;min-height:50px}.roster-card:not(.equipped) .primary{background:linear-gradient(#1d2420,#0b1212);border-color:#6f6957;box-shadow:inset 0 0 0 3px #090e11,inset 0 0 0 4px #635b4240;color:#dbd3c0}.roster-card .primary:disabled{opacity:1;color:#989e95;border-color:#464b42;background:#0e1515}.node-progress{font:12px/1.7 Georgia;color:#a5aaa1;margin:20px 0 0}.seal-row{font:12px Georgia;color:#c5b6d0}.seal-row i{background:#11151c;border-color:#7a6b88;width:11px;height:11px}.seal-row i.filled{background:#b287c9;box-shadow:0 0 8px #b187d180}
/* Battle controls share the same materials as the collection. */
.battle-heading{display:flex;align-items:center;justify-content:space-between;padding:22px 4px 20px}.battle-heading small{font:8px Georgia;letter-spacing:2.8px;color:#bca880}.battle-heading h1{font:32px/1.2 Georgia;margin:5px 0 0}.heading-ornament{width:38px;height:44px;color:#a89a7f;margin-right:12px}.battleground{height:clamp(420px,53vh,620px);border-color:#857457;overflow:hidden}.battleground:after{inset:0;z-index:5}.chapter-badge{background:linear-gradient(90deg,#1a2021ef,#282925ef,#12191cee);border-color:#9a8460;color:#d8c6a2}.chapter-badge strong{font-size:17px}.boss-tracker,.glass-button{border-radius:0;background:#0a1316de;border-color:#6e6456;box-shadow:inset 0 0 0 3px #0c1114}.boss-tracker strong{font-weight:normal}.wave-hud{font-family:Georgia}.wave-title{font-size:20px}.wave-title strong{font-weight:normal;font-size:30px}.region-label{font:9px 'Trebuchet MS',sans-serif;color:#d0c7ac;letter-spacing:2px}.wave-hint{font:11px Georgia;color:#ced1c6}.wave-track i{background:#242b29;border-color:#9c9c86}.wave-track i:not(:last-child):after{background:#686b58}.scene-caption{color:#d0d1c4}.active-controls{background:#0c1518;border-color:#5e594a;padding:13px 16px;gap:12px}.manual-action,.spell-action{border-radius:0;box-shadow:inset 0 0 0 3px #0a1014,inset 0 0 0 4px #61567570;min-height:72px}.manual-action{background:radial-gradient(ellipse at left,#4b3063,#1a1927);border-color:#8b6b9c}.spell-action{background:radial-gradient(ellipse at left,#214a3e,#0c2020);border-color:#568a79}.manual-action strong,.spell-action strong{font:17px Georgia}.manual-action small,.spell-action small{font:11px/1.4 'Trebuchet MS',sans-serif}.manual-action>span:first-child{width:33px;height:37px}.manual-action.charged{box-shadow:inset 0 0 0 3px #291c21,inset 0 0 25px #ba995646}.command-deck{border-color:#5e594a;background:linear-gradient(#131d20,#0c1417);padding:14px 16px 0}.deck-heading{font-size:10px;color:#c4b89a}.text-button{font-family:Georgia;color:#c4c7b9;font-size:13px}.upgrade-card,.summon-card,.empty-card{border-radius:0;background:linear-gradient(145deg,#1a2929,#0b1519);border-color:#626c5e;box-shadow:inset 0 0 0 3px #0b1214,inset 0 0 0 4px #56615455}.upgrade-card.hero-card{border-color:#998367}.upgrade-card{grid-template-columns:54px minmax(0,1fr) auto}.upgrade-card strong{font:18px Georgia}.upgrade-card small{font-size:11px;color:#acc7bb}.upgrade-card .price{font-size:14px}.upgrade-card .portrait{width:46px;height:64px}.upgrade-button{min-width:44px;width:44px;height:48px;align-self:center}.formation{gap:10px}.formation .summon-card strong{font:15px Georgia}.formation .summon-card small{font:11px Georgia;color:#aab6ac}.formation .summon-card>span:last-child{color:#b3d6c1}.formation .empty-card{border-style:solid;background:#0c1517}.empty-card strong{font-family:Georgia}.journey-row strong{font:14px Georgia;color:#d0d2c7}.journey-row small{color:#a0aea4;font:11px/1.6 Georgia}.journey-row>button{border-radius:0;border-color:#7c8068;color:#b7d6b7}.discovery-banner{background:radial-gradient(ellipse at 10% 100%,#4d2d6080,transparent 60%),#10151e;margin-top:14px;padding:14px 23px;min-height:95px}.discovery-banner strong{color:#e3d5e9;font-size:23px}.discovery-banner small{color:#c3a6d0}.discovery-banner span span{color:#bcb5c7;font:13px Georgia}.book-emblem{width:130px;height:76px}.banner-nodes{color:#c7a9e6}.bottom-nav{display:none}.app>footer{font:9px Georgia;letter-spacing:1.5px;color:#9a8b70;padding:25px 5px 6px;gap:12px}
/* Grimoire, hunts, world, character, spells, ascension and settings. */
.grimoire-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr);gap:22px;align-items:stretch}.book-tabs{gap:14px;margin-bottom:20px}.book-tabs button{font:12px Georgia;letter-spacing:1.5px;color:#c0b2c7;border-color:#7b6687;padding:12px 23px}.book-tabs button.selected{background:linear-gradient(#3a2948,#211d2c);color:#f0d9ff;border-color:#c79ddd}.tree{height:510px;background:radial-gradient(ellipse at center,#47305455,#081217 72%);margin:0}.tree:before{content:'';position:absolute;inset:25%;border:1px solid #a592c333;border-radius:50%;box-shadow:0 0 0 25px #6d577316,0 0 0 55px #6d577311,0 0 0 90px #6d57730e}.tree-node{width:55px;height:55px;border-color:#88759b;background:radial-gradient(#403345,#10161b);color:#cebddc;box-shadow:0 0 0 4px #161b20,0 0 0 5px #65566c}.tree-node svg{position:static}.tree-node.selected{outline-color:#ead4a6}.tree-node.locked{opacity:.65}.node-detail{padding:30px 26px;background:linear-gradient(#24202ee8,#0d151a);align-content:center}.node-detail h2{font-size:32px;color:#e7d8ed}.node-detail p{font:16px/1.7 Georgia;color:#c1bac9;margin:14px 0 24px}.node-detail .primary{width:100%}.hunt-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px}.hunt-card{background:#10151d;padding:0 17px 20px;margin:0;display:flex;flex-direction:column}.hunt-art{position:relative;height:255px;margin:0 -16px 13px;background:linear-gradient(0deg,#10151d,transparent 60%),linear-gradient(#07101770,#07101770),var(--hunt-scene) center/cover;display:grid;place-items:center}.hunt-art .portrait{height:235px;width:90%;filter:drop-shadow(0 8px 12px #0008)}.hunt-card small{font-size:11px;color:#c0abc9}.hunt-card h2{font-size:25px;margin-top:3px}.hunt-card p{font:14px/1.6 Georgia;color:#bcb9c4}.hunt-card .secondary{margin-top:auto}.world-grid{gap:23px}.world-card{background:linear-gradient(#1c272b,#10181c)}.world-art{height:225px}.world-art span{background:#081116d9;color:#dcc7a2;font:11px/1.6 Georgia;letter-spacing:1.5px;padding:12px 18px}.world-info{padding:18px 21px 22px}.world-info h2{font-size:28px;color:#e8e0ce}.world-info p{font:15px/1.6 Georgia;color:#bdc7c1;min-height:48px}.world-info small{font-size:12px;color:#a8d3be}.world-info button{font:13px Georgia;min-height:47px}.undiscovered{opacity:1;filter:saturate(.55)}.section-title{font-size:32px;color:#d8c8aa}.bestiary{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.bestiary-entry{background:linear-gradient(#172328,#0e191c);border-color:#5a6056;padding:16px;gap:16px}.bestiary-entry .portrait{width:60px;height:85px}.bestiary-entry strong{font:17px Georgia;color:#e0dcca}.bestiary-entry small,.bestiary-entry div>span{font:12px/1.5 Georgia;color:#adbbb0}.hero-identity{display:flex;gap:28px;align-items:center;padding:10px 25px;background:radial-gradient(ellipse at 20%,#2b4d4870,transparent 65%);border-bottom:1px solid #666453;margin-bottom:22px}.hero-portrait{width:190px;flex-shrink:0;height:235px}.hero-portrait .portrait{width:100%;height:100%;filter:drop-shadow(0 0 15px #6bcd9840)}.hero-identity h2{font:40px Georgia;margin:6px 0 16px}.hero-identity small{font-size:10px;letter-spacing:2px;color:#c6b28d}.hero-oath{font-style:italic;color:#b6c6b7}.spell-card{padding:30px;gap:28px;background:radial-gradient(ellipse at 0 0,#264f444f,transparent),#111b1e;margin-bottom:20px}.spell-card:first-child{background:radial-gradient(ellipse at 0 0,#50316b60,transparent),#161823;border-color:#7b668c}.spell-card>span{width:73px;height:82px;filter:drop-shadow(0 0 13px #69dfb960)}.spell-card:first-child>span{color:#c7a5ee;filter:drop-shadow(0 0 13px #ab67d770)}.spell-card h2{font-size:31px}.spell-card p{font:16px/1.7 Georgia;color:#c1ccc5}.spell-card .primary{min-width:200px}.setting-row{padding:22px 0;margin:0;border-color:#635b475c;gap:30px}.setting-row strong{font:21px Georgia}.setting-row p{font:15px/1.7 Georgia;color:#bcc4bb;max-width:730px}.setting-row button{flex-shrink:0;min-width:130px}.setting-row+.panel-intro{margin-top:28px}.ascend-art{height:190px;background:radial-gradient(ellipse,#6c399861,transparent 60%);margin:0 0 20px}.ascend-art span{height:150px;width:110px;filter:drop-shadow(0 0 20px #ad61df)}.reset-ledger{gap:20px}.reset-ledger>div{padding:25px;background:linear-gradient(#172123,#0d161a)}.reset-ledger h3{font:24px Georgia}.reset-ledger p{font:16px/1.8 Georgia;color:#c3cbc2}.danger-note{font:14px/1.6 Georgia;color:#e7b7a5}.notice-panel{background:#292619;border-color:#968466}.modal-actions{margin-top:24px}#toast{font:14px/1.5 Georgia;background:#102924f5;border-color:#7cb096;border-radius:0;color:#e1f4e4;box-shadow:inset 0 0 0 3px #0a1814,0 8px 28px #0009}#mobile-navigation{display:none}
@media(min-width:1700px){.app{padding-left:40px;padding-right:40px}.creature-art{height:275px}.creature-art .portrait{height:260px}.roster-card h2{font-size:28px}.roster-card p{font-size:16px}.panel-heading h1{font-size:60px}}
@media(max-width:1250px) and (min-width:901px){.app{padding:0 20px 10px}.realm-heading{display:none}.topbar{justify-content:flex-end}.roster,.hunt-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.creature-art{height:220px}.stat-symbol{width:45px;height:45px;padding:10px}.stat-box{gap:12px;padding:15px}.stat-box strong{font-size:27px}.stat-box small{font-size:12px}.grimoire-layout{grid-template-columns:1.5fr 1fr}.node-detail{padding:25px 20px}.node-detail h2{font-size:26px}.bestiary{grid-template-columns:repeat(2,minmax(0,1fr))}.command-training .primary{min-width:160px;font-size:18px}.command-training strong{font-size:24px}.boss-tracker{padding:10px;right:10px}.wave-hud{left:49%;width:250px}.chapter-badge{width:107px;left:12px}.wave-track i{margin:0 7px}.wave-track i:not(:last-child):after{width:15px}}
@media(max-width:900px){.app{margin:0;width:100%;padding:0 15px 10px}.topbar{height:75px;gap:8px}.realm-heading{display:none}.mobile-menu{display:grid;width:44px;min-width:44px;height:45px;padding:10px;color:#c5b390}.wallet{flex:1}.settings-button{display:none}.bottom-nav{position:sticky;bottom:0;z-index:10;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:8px 0 max(8px,env(safe-area-inset-bottom));margin:13px 0 0;background:#0b1116f5;border-top:1px solid #6a604f}.bottom-nav button{min-height:63px;flex-direction:column;gap:5px;border-radius:0;background:linear-gradient(#1d2428,#0a1418);border-color:#626358;box-shadow:inset 0 0 0 3px #0a1115,inset 0 0 0 4px #464e4a}.bottom-nav button>span{width:24px;height:27px;color:#babba9}.bottom-nav button strong{font:10px Georgia;letter-spacing:.6px}.bottom-nav button.active{background:radial-gradient(ellipse,#245142,#0d221e);border-color:#92cfb3;color:#e0f7dc;box-shadow:inset 0 0 0 3px #0c2520,inset 0 0 0 4px #658f76,0 0 15px #65d2a621}.bottom-nav button.active>span{color:#b2f6d7}.bottom-nav .notification{right:8px;top:8px}.roster{grid-template-columns:repeat(3,minmax(0,1fr))}.hunt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#panel{margin-top:20px;background-size:auto 310px}.panel-heading h1{font-size:42px}.panel-heading{padding:24px 23px 18px;min-height:120px}#panel-content{padding:18px 22px 24px}#panel-content>.panel-intro:first-child{max-width:78%;font-size:15px}.command-training{padding:18px;gap:15px}.command-training strong{font-size:24px}.ritual-crystal{width:47px;height:65px}.command-training .primary{min-width:145px;font-size:17px}.stat-box{padding:16px 14px;gap:12px}.stat-symbol{width:44px;height:44px;padding:10px}.stat-box strong{font-size:27px}.stat-box small{font-size:12px}.creature-art{height:200px}.creature-art .portrait{height:190px}.roster-card h2{font-size:23px}.grimoire-layout{grid-template-columns:1.5fr 1fr;gap:15px}.node-detail{padding:22px}.node-detail h2{font-size:27px}.bestiary{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-heading{padding:19px 3px 17px}.battle-heading h1{font-size:30px}.battleground{height:480px}#mobile-navigation:not([hidden]){display:grid;position:fixed;left:15px;right:15px;top:72px;z-index:25;padding:18px;gap:8px;background:#0d181dfc;border:1px solid #8c7d60;box-shadow:0 10px 80px #000e}#mobile-navigation small{color:#c2ae87;font-size:10px;letter-spacing:2px;margin-bottom:8px}#mobile-navigation button{min-height:48px;background:#1b2a29;border:1px solid #526858;font:16px Georgia;text-align:left;padding:12px 18px}}
@media(max-width:700px){.app{padding:0 9px 6px}.topbar{height:65px;gap:5px}.mobile-menu{width:37px;min-width:37px;height:43px;padding:9px}.wallet{height:43px;padding:7px 8px;gap:6px;min-width:0}.wallet strong{font-size:20px}.wallet small{font-size:7px;letter-spacing:1px}.resource-icon{width:21px;height:27px}.hero-summary{height:43px;min-width:78px;padding:6px;gap:4px}.hero-summary>span:first-child{display:none}.hero-summary small{font-size:7px}.hero-summary strong{font-size:16px}.microbar{width:47px}.battle-heading{padding:16px 4px}.battle-heading h1{font-size:25px;margin-top:4px}.battle-heading small{font-size:7px;letter-spacing:1.5px}.heading-ornament{width:28px;height:32px;margin-right:5px}.battleground{height:clamp(365px,51dvh,500px)}.chapter-badge{width:78px;left:10px}.chapter-badge strong{font-size:11px}.wave-hud{width:200px;left:61%;top:18px}.wave-title{font-size:13px}.wave-title strong{font-size:20px}.region-label{font-size:7px;letter-spacing:1.4px}.wave-hint{font-size:9px}.boss-tracker{top:109px}.boss-tracker strong{font-size:12px}.scene-controls{top:150px}.is-farming .scene-controls{top:150px}.glass-button{font-size:10px}.hero-status{bottom:16%;font-size:8px}.scene-caption{font-size:10px;bottom:20px;max-width:90%}.active-controls{padding:9px;gap:7px}.active-controls .manual-action,.active-controls .spell-action{padding:9px 7px;min-height:79px;gap:7px}.manual-action strong,.spell-action strong{font-size:13px}.manual-action small,.spell-action small{font-size:9px}.manual-action>span:first-child{width:23px;height:30px}.command-deck{padding:10px 9px 0}.deck-heading{font-size:8px}.text-button{font-size:11px}.upgrades .upgrade-card{padding:10px 7px;grid-template-columns:30px minmax(0,1fr) 34px;gap:4px}.upgrades .upgrade-card strong{font:13px Georgia}.upgrades .upgrade-card small{font-size:8px}.upgrades .upgrade-card .price{font-size:12px}.upgrades .upgrade-button{width:34px;min-width:34px;height:44px;font-size:23px}.upgrades .upgrade-card .portrait{width:29px;height:50px}.formation{gap:7px}.formation .summon-card strong{font-size:12px}.formation .summon-card small{font-size:10px}.formation .summon-card>span:last-child{font:10px Georgia}.formation .portrait{height:47px;width:40px}.formation .summon-card,.formation .empty-card{min-height:112px}.journey-row{gap:9px}.journey-row strong{font-size:12px}.journey-row small{font-size:10px}.discovery-banner{padding:12px;min-height:95px;gap:10px}.book-emblem{width:75px;height:64px}.discovery-banner strong{font-size:17px;line-height:1.3}.discovery-banner small{font-size:7px;letter-spacing:1.2px}.discovery-banner span span{font-size:11px;display:block;margin-top:4px}.bottom-nav{gap:4px;margin-top:10px}.bottom-nav button{min-height:62px}.bottom-nav button strong{font-size:9px}.app>footer{font-size:8px;letter-spacing:.6px;padding:16px 3px 8px;flex-direction:column;gap:3px}#panel{margin-top:13px;background-size:auto 270px;background-position:65% top}.panel-heading{padding:24px 19px 18px;min-height:127px;align-items:flex-start;background:linear-gradient(90deg,#09111590,transparent)}.panel-heading small{font-size:8px;letter-spacing:1.7px;display:block;max-width:190px}.panel-heading h1{font-size:32px;letter-spacing:-.6px;margin-top:10px}.panel-heading .icon-button{width:32px;min-height:35px;height:35px;font-size:24px}.panel-heading:after{left:18px;width:65%}#panel-content{padding:17px 16px 20px;min-height:0}#panel-content>.panel-intro:first-child{max-width:100%;font-size:14px;line-height:1.6;margin-bottom:20px;padding:0;text-shadow:0 2px 6px #000}.panel-intro{font-size:14px}.command-training{flex-wrap:wrap;padding:17px;gap:13px;margin-bottom:13px}.ritual-crystal{width:33px;height:48px}.ritual-crystal:before{inset:4px 6px}.command-training strong{font-size:21px}.command-training p{font-size:13px;line-height:1.5}.command-training .primary{min-width:0;width:100%;min-height:50px;font-size:18px}.stat-grid{gap:7px;margin:13px 0 18px}.stat-box{display:block;min-height:101px;text-align:center;padding:12px 5px}.stat-symbol{display:block;width:29px;height:29px;padding:5px;margin:0 auto 5px}.stat-box strong{font-size:22px}.stat-box small{font-size:11px;line-height:1.4;display:block;margin-top:4px}.roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.roster-card{padding:0 11px 13px}.creature-art{height:171px;margin:1px -10px 4px}.creature-art .portrait{height:159px;width:95%}.creature-role-icon{width:25px;height:27px;left:11px;top:12px;padding:4px}.creature-status{top:auto;bottom:4px;left:11px;right:auto;font-size:7px;letter-spacing:.8px}.roster-card h2{font-size:21px}.roster-card .roster-head small{font-size:10px}.roster-card p{font-size:13px;line-height:1.5;min-height:110px;margin:9px 0 13px}.roster-meta{font-size:11px;display:block;margin-bottom:11px}.roster-meta>span{display:block}.roster-card .primary{font-size:12px;min-height:55px;padding:9px 6px}.node-progress{font-size:11px;line-height:1.7}.seal-row{gap:5px;flex-wrap:wrap;font-size:10px}.seal-row span{margin-left:3px}.seal-row i{width:9px;height:9px}.book-tabs{gap:7px;margin-bottom:16px}.book-tabs button{font-size:10px;padding:10px;flex:1;letter-spacing:.5px}.grimoire-layout{display:block}.tree{height:395px;margin-bottom:16px}.tree-node{width:43px;height:43px;padding:11px}.node-detail{padding:23px 20px}.node-detail h2{font-size:27px}.node-detail p{font-size:14px;margin:13px 0 17px}.hunt-grid{grid-template-columns:1fr;gap:20px}.hunt-card{padding:0 20px 22px}.hunt-art{height:265px;margin:0 -19px 14px}.hunt-art .portrait{height:250px}.hunt-card h2{font-size:30px}.hunt-card p{font-size:14px}.world-grid{grid-template-columns:1fr;gap:20px}.world-art{height:190px}.world-art span{font-size:9px;padding:12px 16px;letter-spacing:1px}.world-info{padding:17px 18px 20px}.world-info h2{font-size:26px}.world-info p{font-size:14px;min-height:0}.bestiary{grid-template-columns:1fr;gap:10px}.bestiary-entry{padding:14px 16px}.bestiary-entry .portrait{height:78px;width:56px}.hero-identity{padding:0 0 20px;gap:15px;align-items:center}.hero-portrait{height:180px;width:100px}.hero-identity h2{font-size:29px}.hero-identity small{font-size:8px;letter-spacing:1px}.hero-oath{font-size:13px}.spell-card{display:block;padding:22px 20px}.spell-card>span{display:block;width:48px;height:58px;margin-bottom:15px}.spell-card h2{font-size:27px}.spell-card p{font-size:14px;line-height:1.7}.spell-card .primary{width:100%;min-width:0}.setting-row{align-items:flex-start;flex-direction:column;gap:10px;padding:21px 0}.setting-row strong{font-size:21px}.setting-row p{font-size:14px}.setting-row button{width:100%;min-height:46px}.ascend-art{height:160px}.ascend-art span{height:125px}.reset-ledger{grid-template-columns:1fr;gap:15px}.reset-ledger>div{padding:23px}.reset-ledger h3{font-size:23px}.reset-ledger p{font-size:14px}.modal-actions{display:block}.modal-actions button{width:100%;margin-top:8px}#toast{bottom:90px;width:max-content;max-width:90vw;padding:12px 18px;font-size:13px}#mobile-navigation:not([hidden]){left:9px;right:9px;top:63px}}
@media(max-width:365px){.resource-icon{width:16px;height:23px}.wallet{padding:7px;gap:4px}.wallet strong{font-size:17px}.hero-summary{min-width:70px}.mobile-menu{min-width:33px;width:33px;padding:8px}.wave-hud{width:173px;left:63%}.wave-track i{margin:0 5px}.wave-track i:not(:last-child):after{width:11px}.battle-heading h1{font-size:23px}.active-controls .manual-action,.active-controls .spell-action{gap:5px;padding:9px 6px}.manual-action strong,.spell-action strong{font-size:12px}.manual-action small,.spell-action small{font-size:8px}.active-controls .manual-action>span:first-child,.active-controls .spell-action>span:first-child{width:17px;height:25px}.upgrades .upgrade-card{grid-template-columns:minmax(0,1fr) 32px;min-height:84px}.upgrades .upgrade-card .portrait,.upgrades .command-icon{display:none}.upgrades .upgrade-card strong{font-size:12px}.formation .summon-card strong{font-size:10px}.bottom-nav button strong{font-size:8px}.panel-heading h1{font-size:29px}#panel-content{padding:17px 13px 20px}.stat-grid{gap:6px}.stat-box{padding:11px 4px}.stat-box strong{font-size:20px}.stat-box small{font-size:10px}.roster{grid-template-columns:1fr}.creature-art{height:245px}.creature-art .portrait{height:229px}.roster-card{padding:0 18px 20px}.creature-art{margin:1px -17px 7px}.roster-card h2{font-size:30px}.roster-card p{min-height:0;font-size:15px;margin:12px 0 20px}.roster-card .roster-head small{font-size:12px}.roster-meta{display:flex;font-size:13px}.roster-card .primary{font-size:14px}.creature-status{left:18px;font-size:9px}.tree{height:370px}.tree-node{width:39px;height:39px;padding:10px}.hero-portrait{width:82px}.hero-identity h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}.roster-card:hover .creature-art .portrait{transform:none}}

@media(min-width:901px){#panel{margin-top:24px}.panel-heading{min-height:122px;padding-top:26px}#panel-content{padding-top:17px}.command-training{min-height:110px}.creature-art{height:205px}.creature-art .portrait{height:192px}.roster-card p{min-height:76px}.roster-card .primary{min-height:47px}}
.ritual-crystal:before{inset:-5px 16px;border-color:#bf82e65e;transform:rotate(0deg);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);box-shadow:inset 0 0 15px #ba61dc70}.command-training .primary{position:relative;background:radial-gradient(ellipse at top,#25735255,transparent),linear-gradient(140deg,#164936,#0c2d28)}.command-training .primary:after{content:'';position:absolute;inset:0;border:10px solid transparent;border-image:url('assets/ui-frame.svg') 32 / 15px / 0 stretch;filter:sepia(1) saturate(1.6) hue-rotate(92deg);pointer-events:none}.spell-card>span{padding:10px;border:1px solid #6e8c7855;box-shadow:0 0 0 4px #09141880;border-radius:50%;background:radial-gradient(#38634d60,#061015)}.spell-card:first-child>span{border-color:#a481b066;background:radial-gradient(#76539480,#191521)}
/* The heraldic crest is an original transparent illustration. */
.heading-ornament img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 8px #79b5a42b)}.panel-crest{position:absolute;top:-24px;left:calc(50% - 27px);width:54px;height:62px;object-fit:contain;z-index:6;pointer-events:none;filter:drop-shadow(0 3px 5px #000)}.topbar{position:sticky;top:0;z-index:8;background:#0b1215ef;backdrop-filter:blur(8px)}.heading-ornament{height:55px;width:49px}
@media(max-width:900px){.panel-crest{display:none}}
@media(max-width:700px){.heading-ornament{width:34px;height:40px}}

/* Integrated navigation: the game uses the full content width. */
.navigation-shell{position:sticky;top:0;z-index:10;background:linear-gradient(90deg,#0b1215f5,#0b1215ee),url('assets/ui-sidebar.png') center 25% / 600px auto;box-shadow:0 8px 18px #0004;backdrop-filter:blur(8px)}
.navigation-shell .topbar{position:static;background:transparent;backdrop-filter:none;height:78px;border-bottom:1px solid #655c464d;gap:14px}
.masthead-brand{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:0 18px 0 0;margin-right:6px;border:0;background:none;text-align:left;color:#d9d0b9;font:22px/1.1 Georgia;letter-spacing:1px}
.masthead-brand img{width:48px;height:58px;object-fit:contain;filter:drop-shadow(0 0 6px #4c9e8c25)}
.masthead-brand strong{font-weight:normal}.masthead-brand small{display:block;font:8px/1.5 Georgia;letter-spacing:2.3px;color:#aa9875;margin-top:6px}
.realm-heading{padding-left:18px;border-left:1px solid #76674d55}.realm-heading strong{font-size:14px}
.game-nav{position:relative;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding:5px 6px;border:1px solid #67614f;border-top:0;background:linear-gradient(#18232277,#0b1416bd);box-shadow:inset 0 0 0 3px #080f12}
.game-nav:before{content:'';position:absolute;inset:0;pointer-events:none;border:12px solid transparent;border-image:url('assets/ui-frame.svg') 32 / 14px / 0 stretch}
.game-nav button{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;min-width:0;min-height:49px;padding:9px 7px;background:none;border:1px solid transparent;color:#c1c4b8;font:14px/1.3 Georgia}
.game-nav button+button{border-left-color:#73634935}.game-nav button>span:first-child{width:23px;height:26px;flex-shrink:0;color:#9faa9c}
.game-nav button:hover:not(:disabled){background:#233b3238;border-color:#7d826355;color:#f5ecd7}
.game-nav button.active{color:#e5f7e7;background:radial-gradient(ellipse at bottom,#2a6c534f,transparent 90%),linear-gradient(#153c303f,#103b304d);border-color:#70ac935c;box-shadow:inset 0 -2px #96d9b5,0 2px 10px #5cd4a41a}
.game-nav button.active>span:first-child{color:#a0efd1;filter:drop-shadow(0 0 7px #49dbad65)}
.nav-notification{position:absolute;right:10px;top:8px;width:5px;height:5px;border-radius:50%;background:#9befc5;box-shadow:0 0 8px #6bdeb9}
@media(min-width:901px) and (max-width:1250px){.masthead-brand{margin-right:auto;font-size:20px}.navigation-shell .topbar{gap:10px}.game-nav button{font-size:12px;gap:7px;padding:9px 5px}.game-nav button>span:first-child{width:20px;height:23px}}
@media(max-width:900px){.navigation-shell{box-shadow:0 4px 12px #0004}.navigation-shell .topbar{height:75px;gap:8px}.masthead-brand,.game-nav{display:none}}
@media(max-width:700px){.navigation-shell .topbar{height:65px;gap:5px}}

/* Three books, four readable development paths. */
.book-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.book-tabs button{padding:12px 6px;letter-spacing:.5px}.book-tabs small{display:block;font:11px/1.6 'Trebuchet MS',sans-serif;margin-top:5px;color:#b6afa9}.tree-wrap{min-width:0;border:1px solid #60516a;background:#0b141a}.path-headings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:15px 0;border-bottom:1px solid #61526c}.path-headings>div{text-align:center;color:var(--path);font:14px Georgia}.path-headings svg{display:block;width:24px;height:24px;margin:0 auto 8px}.tree{height:640px;border:0;overflow:visible;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 1px),#8a739416 calc(25% - 1px),#8a739416 25%),radial-gradient(ellipse,#42305155,#0b141a)}.tree-node{width:46px;height:46px;padding:10px;color:var(--path);border-color:var(--path);overflow:visible}.tree-node.locked{opacity:.8}.tree-node.learned{background:radial-gradient(#365147,#142125)}.tree-node.selected{outline:2px solid #f0d8a9;outline-offset:6px}.node-label{position:absolute;top:53px;left:50%;transform:translateX(-50%);width:120px;color:#e1dbd0;font:13px/1.25 Georgia;pointer-events:none;text-shadow:0 2px 3px #000}.node-label small{display:block;color:#aebbb6;font:10px/1.6 'Trebuchet MS',sans-serif}.node-detail{align-content:start;padding:30px 22px;scroll-margin-top:160px}.node-detail h2{font-size:28px}.node-detail .path-description{font-size:14px;color:#a4b5ad}.node-detail>small:last-child{display:block;margin-top:13px;color:#a7b2a9}.requirement{display:block;width:100%;text-align:left;padding:12px 10px;background:#161d25;border:1px solid #675773;color:#d1bfdc;margin-top:7px;min-height:44px}.requirement.met{color:#9ce0bc;border-color:#51816b}.node-requirements p{font-size:13px}.upgrade-preview{display:block;color:#b9ecd0;font:12px/1.5 'Trebuchet MS',sans-serif;margin:5px 0}.upgrade-card{min-height:118px}.upgrade-card .price{display:block}.learned-spell{display:flex;align-items:center;gap:12px;min-width:0;min-height:68px;padding:12px;background:linear-gradient(130deg,#24342f,#111a21);border:1px solid #736382;color:#d9e6dd;text-align:left}.learned-spell>svg{width:27px;height:30px;flex-shrink:0;color:#b3e7d0}.learned-spell strong{font:16px Georgia}.learned-spell small{display:block;margin-top:6px;font-size:11px}.learned-spell kbd{margin-left:auto;color:#a9ac9a}#learned-spells{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;padding:10px 16px;background:#0d171b}.spell-card{min-width:0}.spell-card>div{min-width:0}
@media(max-width:1100px){.node-label{width:96px;font-size:12px}.grimoire-layout{grid-template-columns:minmax(0,1fr) 270px}}
@media(max-width:900px){.grimoire-layout{grid-template-columns:1fr}.tree{height:650px}.node-detail{scroll-margin-top:90px}.node-label{width:110px}.path-headings>div{font-size:13px}}
@media(max-width:500px){.upgrades{grid-template-columns:1fr!important}.upgrades .upgrade-card{grid-template-columns:minmax(0,1fr) 44px;min-height:105px;padding:12px 14px}.upgrades .upgrade-card strong{font-size:18px}.upgrades .upgrade-card .portrait,.upgrades .command-icon{display:none}.upgrades .upgrade-card .upgrade-button{width:44px;min-width:44px;height:48px}.upgrade-preview{font-size:12px}.tree{height:660px}.tree-node{width:44px;height:44px;padding:10px}.node-label{width:65px;font-size:11px;overflow-wrap:anywhere}.path-headings>div{font-size:11px}.book-tabs button{font-size:11px;letter-spacing:0}.book-tabs small{font-size:9px}.node-detail h2{font-size:26px}#learned-spells{grid-template-columns:1fr;padding:10px}.learned-spell small{font-size:12px}}

.spell-sharing{grid-column:1/-1;margin:0;color:#b3bdb7;font-size:11px;text-align:center}.node-label{hyphens:manual}
