/* Living oak, leather and amber: shared desktop and phone materials. */
:root{--ink:#f4ead4;--muted:#c9bc98;--gold:#cda85f;--line:#896c3c;--surface:#182a22;--deep:#081811;--leaf:#799674;--app-font:16px}
body{color:var(--ink);background:radial-gradient(ellipse at 15% 0,#25423966,transparent 52%),radial-gradient(ellipse at 90% 70%,#4a351f33,transparent 55%),#091811;font-size:var(--app-font)}
h1,h2,h3,.brand{color:var(--ink);text-shadow:0 2px 3px #0005}
p{line-height:1.55}small,.muted{color:var(--muted)}
.panel,.mobile-leaf,.fortress-drawer,.catalog-entry,.help-panel,.character-card,.class-card,dialog{border:1px solid var(--line);border-image:none;border-radius:14px;background:linear-gradient(125deg,#29352a55,transparent 42%),repeating-linear-gradient(98deg,#a97d3505 0 1px,transparent 1px 7px),linear-gradient(160deg,#23362b,#12241d);box-shadow:inset 0 0 0 3px #090f0b80,inset 0 0 0 4px #ae8d4633,0 8px 24px #0003}
.panel{padding:20px}.page-heading{margin:0 0 18px}.page-heading h1{font-size:clamp(28px,2.4vw,40px);margin:4px 0}.eyebrow{color:#d1b773;letter-spacing:.13em}
button{border:1px solid #967d4d;border-radius:10px;box-shadow:inset 0 1px 0 #ddc57b22,inset 0 -2px 0 #0005,0 3px 6px #0003;background:linear-gradient(#304034,#182b22);color:var(--ink);transition:background-color .18s,box-shadow .18s,border-color .18s,filter .18s;transform:none;min-height:44px;font-size:16px;padding:9px 14px}
button:hover:not(:disabled){transform:none;filter:brightness(1.13);border-color:#ddc681;box-shadow:inset 0 1px 0 #fff2,0 0 12px #be995433}button:active:not(:disabled){transform:none;filter:brightness(.94)}button:focus-visible{outline:2px solid #ffe6a2;outline-offset:3px}button:disabled{opacity:.55;filter:saturate(.65);cursor:not-allowed}
button.primary,.primary{color:#30200c;background:linear-gradient(115deg,#fff0b3,#dab364 50%,#bd9148);border:1px solid #e6ce8a;box-shadow:inset 0 0 0 2px #9d753677,inset 0 2px 0 #fff8,0 4px 10px #0004;font-family:Georgia,serif;font-weight:bold;text-shadow:0 1px 0 #fff4}
button.active,button.selected{border-color:#ead492;background:linear-gradient(#4c5433,#263b26);box-shadow:inset 0 0 0 1px #ead49244,0 0 14px #bd9a3d22}
.topbar,body[data-view=fortress] .topbar{display:grid;grid-template-columns:250px minmax(0,1fr) auto;grid-template-rows:58px 42px;gap:0 16px;padding:0 20px;min-height:100px;align-items:center;background:linear-gradient(#152820f5,#0d1c17f5);border-bottom:2px solid #a08045;box-shadow:0 5px 18px #0005}
.brand{gap:10px;min-width:0}.brand .root-emblem{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 0 6px #dab46133)}.brand>span{font-family:Georgia,serif;font-size:15px;line-height:1.05;letter-spacing:.04em}.brand-version{font:11px system-ui;color:#bfa36a;letter-spacing:.06em;margin-top:3px}
.desktop-nav{justify-content:center;gap:4px}.desktop-nav button{padding:7px 10px;font-size:14px;min-height:42px;border-color:transparent;box-shadow:none;background:transparent;white-space:nowrap}.desktop-nav button.active{border-color:#a48b4d55;background:linear-gradient(#d5b96611,#d5b96622)}.desktop-nav .painted-icon{width:27px;height:27px}
.top-actions{grid-column:3;grid-row:1;gap:6px}.top-actions button,.top-actions select{min-height:38px;height:38px;padding:5px 9px}.top-actions .painted-icon,.top-actions .icon{width:26px;height:26px}
.resource-bar,body[data-view=fortress] .resource-bar{grid-column:1/-1;grid-row:2;display:flex;justify-content:center;gap:0;border-top:1px solid #b8994d22;padding:0;min-height:40px;background:linear-gradient(90deg,transparent,#bfa35f0c,transparent)}
.resource-bar>div,body[data-view=fortress] .resource-bar>div{display:flex;flex-direction:row;align-items:center;gap:7px;min-width:0;padding:4px 22px;border:0;border-right:1px solid #b99a4e33;border-radius:0;background:transparent;box-shadow:none}.resource-bar>div:last-child{border-right:0}.resource-bar strong,body[data-view=fortress] .resource-bar strong{font-size:18px;line-height:1;font-variant-numeric:tabular-nums}.resource-bar small,body[data-view=fortress] .resource-bar small{display:block;font-size:12px;color:#d5c5a0}.resource-bar .resource-icon,body[data-view=fortress] .resource-bar .resource-icon{width:29px;height:29px}.resource-bar .premium-wallet .icon{width:24px;height:24px}.resource-count-compact{display:none}.resource-count-full{display:inline}
.main-content{max-width:1800px;margin:auto;padding:18px 24px 30px}.test-banner{font-size:12px;color:#aebaa7;margin-bottom:12px}.test-banner .painted-icon{width:20px;height:20px}.test-banner>span{font-size:12px}
.interior-art{border:1px solid #947842;border-radius:10px;overflow:hidden}.interior-art::before{inset:0;background-image:url('assets/root-interiors-v090.webp');background-size:200% 300%;background-position:var(--scene-x) var(--scene-y)}
.sanctuary-panorama{background-image:url('assets/root-sanctuary-v090.webp')}.sanctuary-v07 .fortress-art{border:2px solid #b39451;border-radius:16px;overflow:hidden;box-shadow:inset 0 0 0 4px #22190c,0 15px 35px #0005}.sanctuary-v07 .fortress-drawer{background:linear-gradient(145deg,#2d392b,#14271f)}.scene-heading{padding:20px;background:linear-gradient(115deg,#102219b3,transparent 70%)}.scene-heading .eyebrow{font-size:12px}.scene-heading h1{font-size:32px}.building-marker{min-height:42px;border-radius:22px;padding:7px 11px;background:linear-gradient(#293d27f5,#111f15f5);box-shadow:0 4px 12px #0008}.building-marker:hover{transform:translate(-50%,-50%)!important}.building-marker .painted-icon{width:26px;height:26px}.sanctuary-bottom{background:linear-gradient(0deg,#0b1b14fa,#142b20e0 80%,transparent);gap:15px}.sanctuary-explore{font-size:23px}.sanctuary-building-nav .building-tile{border-radius:12px;gap:8px}.building-tile .painted-icon,.building-tile .resource-icon{width:36px;height:36px}
.class-portrait,.class-hero-art{background-image:url('assets/root-heroes-clean-v090.webp');background-size:500% 100%;mix-blend-mode:screen}.hero-portrait{background:radial-gradient(ellipse at center,#69825355,transparent 70%),url('assets/root-interiors-v090.webp') 100% 100%/200% 300%;border-radius:12px;isolation:isolate}.hero-layout{grid-template-columns:minmax(260px,.9fr) minmax(300px,1.25fr) minmax(310px,1fr);gap:18px}.hero-layout>.hero-character{grid-column:1;grid-row:1}.hero-layout>.inventory-panel{grid-column:2;grid-row:1}.hero-layout>.item-detail{grid-column:3;grid-row:1}.hero-portrait .class-hero-art{min-height:350px}.inventory-grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:9px}.inventory-cell{padding:6px;border-radius:10px}.inventory-cell small{font-size:12px;line-height:1.2;min-height:30px}.inventory-cell .item-art{width:86px;height:86px;max-width:100%}.item-workbench{border-radius:12px}.item-workbench .showpiece{width:180px;height:180px}.workbench-caption{background:#0f241cdd;padding:12px}.pips{gap:5px}.pips i{height:9px;background:#081b11;border:1px solid #726142;border-radius:4px}.pips i.filled{background:linear-gradient(#f6df8d,#b28232);box-shadow:0 0 7px #d6b36166}.below-hero{gap:18px}.skills-grid label{border:1px solid #80693d;border-radius:10px;background:linear-gradient(120deg,#3b442733,#13271e);padding:14px}.skills-grid .ability-art{width:58px;height:58px}
.forge-layout,.defense-layout,.warehouse-layout,.kitchen-layout{gap:18px}.recipe-detail{background:linear-gradient(#1a2d21ee,#101e16);border-radius:16px;overflow:hidden;border:1px solid #aa8747}.recipe-art{border-bottom:1px solid #b08c47}.recipe-art>.item-art{max-width:180px;max-height:180px}.slot-tabs{gap:5px;flex-wrap:wrap}.slot-tabs button{font-size:13px;padding:6px 9px;min-height:36px}.queue{background:linear-gradient(#243326,#14231b)}.job{gap:8px}.job small{font-size:12px}
.pet-art{background-image:var(--pet-art-url)!important;background-size:var(--pet-cols) var(--pet-rows)!important;background-position:var(--pet-x) var(--pet-y)!important;background-repeat:no-repeat!important;border-radius:0;box-shadow:none;mix-blend-mode:screen}.pet-link,.equipped-pet-gear,.pet-specialization{background:#132a2077;border:1px solid #9f814133;border-radius:10px}.companion-layout{grid-template-columns:minmax(0,1.4fr) minmax(340px,.8fr);gap:20px}.companion-scene{background:linear-gradient(#17302533,#071b1688),url('assets/root-sanctuary-v090.webp') left center/cover;border:2px solid #b5914c;border-radius:16px;isolation:isolate;overflow:hidden}.companion-animal{min-height:380px}.companion-animal .full-animal{width:85%;max-width:480px;height:410px;aspect-ratio:1}.companion-identity{background:linear-gradient(transparent,#0d211aee);padding:15px}.companion-controls h1{font-size:32px}.companion-tabs button{min-height:43px}.companion-stats>div{border-radius:10px;border:1px solid #bca45d44;background:#0a1d1477}.companion-queue summary{cursor:pointer;padding:12px 0}.troop-portrait>span{background-size:300% 100%;background-position:var(--troop-x) center;mix-blend-mode:screen;filter:none}.troop-portrait{background:radial-gradient(ellipse at bottom,#746b43,#10261c)}
.pet-equipment-view{min-height:0;display:flex;flex-direction:column;gap:9px}.pet-gear-picker button .item-art{width:70px;height:70px}.pet-gear-picker button>span:not(.item-art){font-size:13px}.pet-gear-picker button small{display:block}.pet-gear-detail{padding:12px;background:#0f2418a8;border-radius:10px;border:1px solid #ad8c4544}.pet-gear-detail h2{font-size:24px;margin-bottom:7px}.pet-equipment-view footer{display:flex;align-items:center;gap:10px}.pet-equipment-view footer button{flex:1}
/* Rails preserve real buttons and can be swiped, clicked or moved by keyboard. */
.pet-selector,.pet-choice,.unit-choice,.character-grid,.class-grid,.pet-gear-picker{display:block!important;width:100%;min-width:0;margin:8px 0;overflow:hidden}.gallery-track{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;min-width:0;padding:3px}.gallery-track::-webkit-scrollbar{display:none}.gallery-track>button,.gallery-track>article{flex:0 0 calc((100% - 40px)/5);min-width:0;scroll-snap-align:start;white-space:normal;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;overflow:hidden}.gallery-track button .pet-art{width:100%;height:105px;flex-shrink:0}.gallery-controls{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:7px;height:38px}.gallery-controls button.gallery-arrow{width:42px;min-height:36px;padding:0;font:27px Georgia,serif}.gallery-counter{font-size:13px;color:#d6c491;min-width:80px;text-align:center;font-variant-numeric:tabular-nums}.character-grid .gallery-track>article,.class-grid .gallery-track>article{flex-basis:calc((100% - 20px)/3);align-items:stretch}
/* Root market: real stock cards, selected item and transactional purchase action. */
.root-market{position:relative}.market-heading{display:flex;align-items:baseline;gap:20px;flex-wrap:wrap;margin-bottom:17px}.market-heading h1{font:34px Georgia,serif;margin:0}.market-heading>span:last-child{font-size:14px;color:#c4b891}.market-layout{display:grid;grid-template-columns:minmax(210px,.85fr) minmax(360px,1.45fr) minmax(300px,1fr);gap:18px;align-items:stretch}.market-merchant{position:relative;min-height:650px;border:2px solid #a78343;border-radius:16px;background:url('assets/root-market-v090.webp') 12% center/auto 100%;overflow:hidden;isolation:isolate;box-shadow:0 14px 30px #0006}.merchant-caption{position:absolute;bottom:0;left:0;right:0;padding:22px 18px;background:linear-gradient(transparent,#0a1d18e8 20%,#0a1d18);z-index:2}.merchant-caption h2{font:26px Georgia,serif}.merchant-caption p{font-size:15px}.merchant-caption small{display:block;font-size:11px;color:#b7aa88}.merchant-caption .icon{width:19px;height:19px;vertical-align:middle}.market-currencies{display:flex;gap:9px;margin:12px 0}.market-currencies button{flex:1;gap:6px;font-size:14px;padding:8px}.market-currencies .resource-icon{width:26px;height:26px}.market-stock{min-height:0;padding:16px;border:1px solid #8b7244;border-radius:16px;background:linear-gradient(#21352bdb,#11231bf5);box-shadow:inset 0 0 0 3px #1d180c44}.market-stock>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.market-stock h2{font-size:24px;margin:0}.market-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:740px;overflow:auto;padding:3px 5px 3px 3px;scrollbar-width:thin;scrollbar-color:#ad8b48 #0c2017}.market-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 6px;min-width:0;min-height:165px;border-color:#75603c;background:radial-gradient(ellipse at 50% 30%,#b2984f11,transparent 75%),linear-gradient(#24392c,#0f211a)}.market-card .market-showpiece{width:90px;height:90px;margin:0;flex-shrink:0}.market-card-name{font:14px Georgia,serif;line-height:1.2;min-height:34px}.market-card small{font-size:11px}.market-card-price{display:flex;align-items:center;gap:4px;margin-top:auto}.market-card-price .resource-icon{width:22px;height:22px}.market-card-price b{font-size:15px}.market-resource .resource-icon{width:90px;height:90px}.market-detail{display:flex;flex-direction:column;gap:14px;padding:22px;min-height:0}.market-detail h2{font-size:29px;margin:6px 0 0;line-height:1.15}.market-detail .eyebrow{font-size:12px}.market-display{display:grid;place-items:center;min-height:210px;background:radial-gradient(ellipse,#a28b4333,transparent 65%),linear-gradient(140deg,#11261c,#1b3023);border:1px solid #b69a4844;border-radius:12px;box-shadow:inset 0 0 25px #0006}.market-display .market-showpiece{width:185px;height:185px;max-width:100%;margin:0}.market-description{font-size:16px;line-height:1.5;margin:0}.market-comparison{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:10px;border-radius:10px;background:#091c1499;border:1px solid #a48c4633}.market-comparison span{font-size:13px;display:flex;flex-direction:column;gap:3px}.market-comparison b{font-size:23px}.market-purchase{display:flex;flex-direction:column;gap:10px;margin-top:auto}.market-purchase .cost{display:flex;flex-wrap:wrap;gap:7px}.market-purchase .cost-value{padding:5px 8px;border-radius:8px}.market-purchase .cost-caption{display:none}.market-purchase .primary{font-size:24px;min-height:50px}.market-purchase .quiet{min-height:40px;font-size:14px}.positive{color:#aed495}.negative{color:#f0a294}
/* Book pages are unbaked text over real blank paper artwork. */
.chronicle-book{background-image:url('assets/root-book-v090.webp');padding:10% 11% 9%;gap:7%;min-height:720px}.book-page{color:#3b2b15}.book-page h1,.book-page h2,.book-page h3{color:#3b2b15;text-shadow:none}.book-page p,.book-page small{color:#564124}.book-page .book-entry p{font-size:16px;line-height:1.5}.book-page .book-entry small{font-size:12px}.book-page .journal-loot{font-size:13px;background:#d5bc8133;border-color:#72582755}.parchment-leaf{background:linear-gradient(110deg,#c4a66e22,#f8e8bd99),repeating-linear-gradient(4deg,#9d744306 0 1px,transparent 1px 5px),#edd9a5!important;color:#382915;border:2px solid #ba9850;box-shadow:inset 8px 0 12px #8b6b3544}.parchment-leaf h2,.parchment-leaf h3{color:#3b2a15;text-shadow:none}.parchment-leaf p,.parchment-leaf small{color:#4c3a22}.journal-emblem .painted-icon{width:48px;height:48px}.journal-entry{font-size:19px;line-height:1.5}.journal-loot h3{font-size:16px}.journal-loot .resource-icon{width:32px;height:32px}.book-tabs button{gap:8px}
/* A coherent native map: no mismatching generated quadrant seams. */
.map-terrain{background-image:url('assets/root-map-open-v090.webp');filter:none}.terrain-tiles{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;pointer-events:none}.terrain-tile{background-repeat:no-repeat;background-size:100% 100%;min-width:0;min-height:0}.map-plane{backface-visibility:hidden}.map-terrain>.ambient{position:absolute;z-index:2;max-width:none;max-height:none;pointer-events:none}.map-terrain .mist{display:none}.map-site,.own-fortress{isolation:isolate}.map-site::before,.own-fortress::before{content:'';position:absolute;inset:4% -12% 8%;border-radius:50%;background:radial-gradient(ellipse,#b3b76bf5 0,#7b8b3ddb 37%,#70944866 57%,transparent 72%);box-shadow:none;pointer-events:none;z-index:-1}.map-site .location-art,.own-fortress .location-art{opacity:1;filter:brightness(1.18) saturate(1.12) drop-shadow(0 5px 3px #091807b3)}.map-node-name{font-size:11px;line-height:1.1;padding:3px 5px;border:1px solid #ac914d;background:#10241df2;border-radius:6px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-site:hover,.map-site.selected,.own-fortress:hover{transform:translate(-50%,-50%)!important}.map-viewport{border:2px solid #a78b49;border-radius:14px}.minimap{background-image:url('assets/root-map-open-v090.webp');border:1px solid #c8b061}.world-toolbar{padding:8px}.map-drawer{box-shadow:-8px 0 35px #0006}.raid-inputs label{background:#0e231b;border:1px solid #a58a4644;border-radius:9px;padding:8px}.raid-count-controls{display:flex;gap:4px;align-items:center}.raid-count-controls input{width:42px;text-align:center;padding:3px}.raid-count-controls button{min-width:35px;min-height:36px;padding:3px;font-size:22px}.target-art{border-radius:12px;background:radial-gradient(ellipse,#93a36255,transparent 70%),#14261b}.illustrated-marches{border:1px solid #b79950aa;border-radius:12px;background:#11251de8;box-shadow:0 6px 14px #0005}.marches-toggle{min-height:38px}
/* Opponent silhouettes are backed by amber light and a separate ground shadow. */
.battle-v06 .battle-scene{border:2px solid #c0a263;border-radius:16px;isolation:isolate;box-shadow:inset 0 0 70px #06231455,0 12px 28px #0005}.battle-scene::after{content:'';position:absolute;right:2%;top:15%;bottom:9%;width:46%;background:radial-gradient(ellipse at 50% 48%,#ced7ab35,transparent 68%),radial-gradient(ellipse at 50% 88%,#06100bcc,transparent 34%);pointer-events:none;z-index:1}.battle-v06 .enemy-fighter{z-index:3;filter:brightness(1.13) saturate(1.06);mix-blend-mode:screen}.battle-v06 .enemy-fighter.portrait-enemy{aspect-ratio:4/5;mask-image:none;-webkit-mask-image:none;bottom:12%;max-height:70%;width:36%}.battle-scene .class-fighter{background-image:url('assets/root-heroes-clean-v090.webp')!important;mix-blend-mode:screen;filter:brightness(1.1);isolation:auto}.battle-scene .ambient{pointer-events:none}.arena-health>section{background:#0c211bd9;border:1px solid #d1b67699;border-radius:11px;padding:8px 11px;box-shadow:0 2px 10px #0006}.arena-health strong{font-size:17px}.arena-intent{background:#17271aeb;border-color:#d1b377;color:#f2e1b6}.battle-action{border:1px solid #ac8c4e;background:radial-gradient(ellipse,#88975422,transparent 80%),#12261d;border-radius:12px}.battle-action .ability-art,.battle-action .class-ability{width:55px;height:55px}.floating-damage{font-weight:800;text-shadow:0 2px 4px #000,0 0 9px #000;font-size:40px}.health-impact{animation:root-health-pulse .35s ease-out}.arena-companion{background:#10251ccf;border-radius:14px;border:1px solid #bba16155}.skill-hint{background:#13271ff5;border:1px solid #c5a55d;border-radius:14px;box-shadow:0 8px 30px #000b}.skill-hint .ability-art{width:50px;height:50px}
@keyframes root-health-pulse{50%{box-shadow:0 0 19px #eed38766}}
@keyframes root-idle{0%,100%{translate:0 0}50%{translate:0 -3px}}
@media(prefers-reduced-motion:no-preference){body:not(.no-motion) .hero-portrait .class-hero-art,body:not(.no-motion) .companion-animal .full-animal{animation:root-idle 5s ease-in-out infinite}}
.no-motion *{animation:none!important;transition:none!important}
/* Tablet: retain all cards with readable two-column layouts. */
@media(min-width:851px) and (max-width:1250px){.topbar,body[data-view=fortress] .topbar{grid-template-columns:210px 1fr auto;padding:0 12px;gap:0 8px}.brand>span{font-size:13px}.desktop-nav button{font-size:12px;padding:6px}.desktop-nav .painted-icon{width:22px;height:22px}.top-actions .account-button>span{max-width:80px;overflow:hidden}.resource-bar>div{padding:4px 13px}.market-layout{grid-template-columns:minmax(240px,1fr) minmax(300px,1fr)}.market-merchant{display:none}.hero-layout{grid-template-columns:minmax(250px,1fr) minmax(280px,1fr)}.hero-layout>.item-detail{grid-column:2;grid-row:1}.hero-layout>.inventory-panel{grid-column:1/-1;grid-row:2}.gallery-track>button{flex-basis:calc((100% - 20px)/3)}}
/* Phone: same artwork, one bounded task, usable fixed navigation. */
@media(max-width:850px){
 :root{--app-font:15px}body{overflow:hidden}.topbar,body[data-view=fortress] .topbar{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:51px 32px;min-height:83px;padding:0 8px;gap:0 4px}.brand{gap:6px}.brand .root-emblem{width:37px;height:37px}.brand>span{font-size:12px;letter-spacing:0}.brand-version{font-size:10px;margin-top:2px}.desktop-nav{display:none}.top-actions{grid-row:1;grid-column:2;gap:3px}.top-actions select{width:47px;font-size:12px;padding:4px}.top-actions button{width:34px;height:36px;min-height:36px;padding:4px}.top-actions .icon,.top-actions .painted-icon{height:25px;width:25px}.account-button>span{display:none}.resource-bar,body[data-view=fortress] .resource-bar{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));height:32px;gap:2px;min-height:0;justify-content:initial}.resource-bar>div,body[data-view=fortress] .resource-bar>div{display:flex;justify-content:center;align-items:center;gap:3px;min-height:27px;height:27px;padding:2px 1px;background:#0b211ba3;border:1px solid #937c4133;border-radius:5px}.resource-bar small,body[data-view=fortress] .resource-bar small{display:none}.resource-bar .resource-icon,body[data-view=fortress] .resource-bar .resource-icon,.resource-bar .premium-wallet .icon{width:21px;height:21px}.resource-bar strong,body[data-view=fortress] .resource-bar strong{font-size:14px}.resource-count-full{display:none}.resource-count-compact{display:inline}
 .main-content{padding:8px 8px 5px;width:100%;max-width:none;min-height:0}.test-banner{font-size:10px;margin:0 0 5px;min-height:18px}.test-banner>span{font-size:10px}.test-banner .painted-icon{height:16px;width:16px}.page-heading{margin-bottom:6px}.page-heading h1{font-size:26px;margin:0}.page-heading>.eyebrow{font-size:10px}.mobile-nav{gap:1px;background:linear-gradient(#192d22,#0d2018);border-top:2px solid #b19555;min-height:56px;padding:3px 3px max(3px,env(safe-area-inset-bottom));box-shadow:0 -5px 18px #0005}.mobile-nav button{padding:3px 1px;min-height:46px;border-radius:10px;font-size:10px;gap:2px}.mobile-nav .painted-icon{width:27px;height:27px}.mobile-nav button.active{border-color:#d1b674;background:linear-gradient(#998f4444,#50663344);box-shadow:inset 0 1px 0 #e7d39933}.panel{padding:12px;border-radius:12px}button{font-size:15px;min-height:42px;padding:7px 10px}.mobile-tabs button,.leaf-tabs button{font-size:13px;min-height:37px;padding:5px 7px}.mobile-section-title h1{font-size:26px}.mobile-section-title .queue-shortcut{font-size:11px;min-height:33px;padding:4px 6px}.queue-shortcut .painted-icon{height:23px;width:23px}
 .sanctuary-v07 .fortress-art{border-radius:13px}.sanctuary-panorama{background-size:100% 100%}.scene-heading h1{font-size:21px}.scene-heading{padding:10px}.sanctuary-bottom{position:relative;inset:auto;padding:8px;height:auto;background:linear-gradient(#26372b,#10251b);gap:6px}.sanctuary-explore{font-size:22px;min-height:47px}.sanctuary-identity strong{font-size:19px}.sanctuary-progress>strong{font-size:15px;line-height:1.3}.sanctuary-building-nav .building-tile{min-height:47px;padding:5px;font-size:12px;gap:4px}.building-tile .painted-icon,.building-tile .resource-icon{width:24px;height:24px}.sanctuary-v07 .fortress-drawer{min-height:0}.sanctuary-v07 .fortress-drawer>.interior-art{max-height:135px}
 .hero-layout{display:block}.hero-layout>.hero-character,.hero-layout>.inventory-panel,.hero-layout>.item-detail{grid-column:auto;grid-row:auto}.hero-portrait .class-hero-art{min-height:0}.hero-layout .hero-portrait{isolation:isolate;min-height:45px;max-height:none}.hero-layout.tab-character>.hero-character{padding:8px;gap:5px}.hero-layout .stat-row{gap:4px}.hero-layout .stat-row strong{font-size:20px}.hero-layout .stat-row small{font-size:11px}.hero-layout .pet-link{padding:4px;gap:6px}.hero-layout .pet-link .pet-art{width:38px;height:38px}.hero-layout .pet-link button{min-height:33px;font-size:12px}.inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.inventory-cell .item-art{width:54px;height:54px}.inventory-cell small{font-size:10px;min-height:24px}.slot-tabs{gap:3px;flex-wrap:nowrap}.slot-tabs button{min-height:32px;padding:4px;font-size:11px}.inventory-panel>header{margin-bottom:5px}.inventory-panel input{min-height:35px;height:35px;margin:4px 0}.page-controls button{min-height:35px;font-size:12px}
 .gallery-track{gap:6px;padding:2px}.gallery-track>button,.gallery-track>article{flex-basis:calc((100% - 12px)/3);padding:5px;min-height:0;gap:3px;justify-content:center}.gallery-track button .pet-art,.mobile-leaf .pet-choice .pet-art{width:100%!important;height:68px!important;min-height:0!important}.gallery-track button>span:not(.pet-art):not(.item-art){font-size:12px;line-height:1.15}.gallery-controls{height:32px;gap:16px;margin-top:3px}.gallery-controls button.gallery-arrow{min-height:31px;width:39px;font-size:26px;padding:0}.gallery-counter{font-size:11px}.character-grid .gallery-track>article,.class-grid .gallery-track>article{flex-basis:100%;align-items:stretch}.pet-selector,.pet-choice,.unit-choice,.pet-gear-picker{margin:0;flex-shrink:0}
 .mobile-leaf{padding:10px;gap:6px;justify-content:center;background:linear-gradient(120deg,#35423255,transparent 50%),linear-gradient(#233b2c,#14291f)}.mobile-leaf h2{font-size:21px}.mobile-leaf p{font-size:15px;line-height:1.4}.mobile-leaf .leaf-art{max-height:140px;border-radius:10px}.leaf-pager{margin-top:5px;min-height:35px}.leaf-pager button{min-height:34px;font-size:12px}.leaf-pager>span{font-size:14px}.pet-equipment-view{gap:5px;flex:1;min-height:0;justify-content:center}.pet-gear-picker .gallery-track button{flex-basis:calc((100% - 6px)/2)}.pet-gear-picker .item-art{height:75px;width:75px}.pet-gear-detail{padding:7px}.pet-gear-detail h2{font-size:19px;margin-bottom:3px}.pet-gear-detail p{font-size:14px}.pet-gear-detail small{font-size:11px;line-height:1.3}.pet-equipment-view footer{gap:5px;flex-wrap:wrap}.pet-equipment-view footer .cost{margin:0;flex:1}.pet-equipment-view footer button{font-size:14px;min-height:38px}.leaf-actions{gap:5px}.leaf-actions button{min-height:38px;font-size:13px}
 .root-market{display:flex;flex-direction:column;flex:1;min-height:0;gap:5px}.market-heading{display:block;margin:0;flex-shrink:0}.market-heading>.eyebrow{display:none}.market-heading h1{font-size:26px}.market-currencies{margin:0;gap:6px;flex-shrink:0}.market-currencies button{min-height:35px;font-size:13px;padding:5px}.market-layout{display:flex;flex:1;min-height:0;gap:0}.market-detail{flex:1;min-height:0;gap:5px;padding:12px;overflow:hidden}.market-detail header{flex-shrink:0}.market-detail h2{font-size:22px;margin:3px 0 0}.market-detail .eyebrow{font-size:10px}.market-display{flex:1;min-height:55px;max-height:200px}.market-display .market-showpiece{width:min(165px,32dvh);height:min(165px,32dvh);max-height:100%;aspect-ratio:1}.market-display .market-resource .resource-icon{width:75px;height:75px}.market-description{font-size:14px;line-height:1.35;flex-shrink:0}.market-comparison{padding:6px;gap:6px;flex-shrink:0}.market-comparison span{font-size:11px}.market-comparison b{font-size:19px}.market-purchase{gap:5px;flex-shrink:0}.market-purchase .cost{gap:5px;padding:0}.market-purchase .cost-value{min-height:31px;padding:3px 6px}.market-purchase .cost .resource-icon{height:25px;width:25px}.market-purchase .cost b{font-size:20px}.market-purchase .cost small{font-size:10px}.market-purchase .primary{font-size:21px;min-height:42px}.market-purchase .quiet{font-size:12px;min-height:33px}.market-pager{flex-shrink:0;margin-top:0}.market-detail small.notice{font-size:11px;margin:0}
 .mobile-section[data-section=chronicle] .mobile-leaf{padding:14px!important;gap:8px}.parchment-leaf .journal-entry{font-size:17px;line-height:1.45}.parchment-leaf .journal-emblem .painted-icon{width:42px;height:42px}.parchment-leaf .journal-loot p{font-size:13px}.journal-loot .resource-icon{width:28px;height:28px}.leaf-creature{mix-blend-mode:screen}.parchment-leaf .leaf-creature{mix-blend-mode:normal;border-radius:12px}
 .map-viewport{border-radius:0;border-width:1px}.map-site::before,.own-fortress::before{inset:8% -8% 10%}.map-node-name{font-size:10px;max-width:100px}.map-drawer.raid-drawer[data-raid-step="0"]{max-height:70%;padding:10px}.raid-inputs label{padding:5px;gap:5px}.raid-count-controls{gap:2px}.raid-count-controls input{width:34px;height:34px;font-size:17px}.raid-count-controls button{width:30px;min-width:30px;min-height:34px;font-size:19px}.raid-page{min-height:0}.illustrated-marches{max-width:175px}.marches-toggle{font-size:12px;min-height:34px}
 body[data-mode=combat] .main-content{padding:4px}.battle-v06 .battle-scene{border-radius:12px;flex:1;min-height:0}.battle-v06 .enemy-fighter.portrait-enemy{width:42%;height:calc(100% - 83px);max-height:none;aspect-ratio:auto;bottom:8px;right:3%}.battle-scene .class-fighter{height:calc(100% - 78px);width:43%;bottom:7px;left:3%;background-size:500% 100%!important}.arena-health>section{padding:5px 7px;border-radius:8px}.arena-health strong{font-size:13px}.arena-health .painted-icon{width:21px;height:21px}.battle-action .ability-art,.battle-action .class-ability{width:51px;height:51px}.floating-damage{font-size:30px}.arena-intent{font-size:12px}.battle-scene::after{top:20%;bottom:4%;right:0;width:49%}.arena-companion .pet-art{width:28px;height:28px}.mobile-combat-actions button{min-height:60px}.combat-controls .combat-exit{font-size:12px}.skill-hint{max-width:calc(100vw - 22px)}
}
@media(max-width:850px) and (max-height:680px){.topbar,body[data-view=fortress] .topbar{grid-template-rows:45px 29px;min-height:74px}.brand .root-emblem{width:31px;height:31px}.brand>span{font-size:10px}.top-actions button{width:30px;min-height:31px;height:31px}.top-actions select{height:31px;min-height:31px}.top-actions .icon,.top-actions .painted-icon{height:23px;width:23px}.resource-bar,body[data-view=fortress] .resource-bar{height:29px}.resource-bar>div,body[data-view=fortress] .resource-bar>div{height:25px;min-height:25px}.resource-bar strong,body[data-view=fortress] .resource-bar strong{font-size:12px}.resource-bar .resource-icon,body[data-view=fortress] .resource-bar .resource-icon{height:18px;width:18px}.main-content{padding:5px}.test-banner{display:none}.mobile-nav{min-height:49px}.mobile-nav button{min-height:41px;font-size:9px}.mobile-nav .painted-icon{width:23px;height:23px}.gallery-track button .pet-art,.mobile-leaf .pet-choice .pet-art{height:46px!important}.gallery-controls{height:27px}.gallery-controls button.gallery-arrow{min-height:26px;height:26px}.mobile-section-title h1{font-size:22px}.mobile-leaf{padding:7px;gap:4px}.mobile-leaf h2{font-size:18px}.mobile-leaf p{font-size:13px;line-height:1.3}.mobile-leaf button{min-height:35px;font-size:13px}.mobile-leaf .leaf-art{max-height:90px}.pet-gear-picker .item-art{width:50px;height:50px}.pet-gear-detail h2{font-size:17px}.pet-equipment-view footer .cost-value{height:27px}.pet-gear-detail small{font-size:10px}.market-detail{padding:8px;gap:4px}.market-heading h1{font-size:22px}.market-detail h2{font-size:19px}.market-display{max-height:110px}.market-display .market-showpiece{width:90px;height:90px}.market-description{font-size:12px;line-height:1.25}.market-comparison b{font-size:17px}.market-purchase .primary{min-height:35px;font-size:18px}.market-currencies button{min-height:31px}.market-purchase .cost small{display:none}.mobile-section[data-section=chronicle] .mobile-leaf{padding:10px!important;gap:5px}.parchment-leaf .journal-entry{font-size:15px}.journal-emblem .painted-icon{width:31px!important;height:31px!important}.battle-action .ability-art,.battle-action .class-ability{width:42px;height:42px}}
@media(max-width:850px) and (max-height:480px) and (orientation:landscape){.topbar,body[data-view=fortress] .topbar{grid-template-columns:160px 1fr auto;grid-template-rows:44px;min-height:44px}.resource-bar,body[data-view=fortress] .resource-bar{grid-row:1;grid-column:2;height:29px}.top-actions{grid-column:3}.mobile-nav{min-height:42px}.mobile-nav button{flex-direction:row;min-height:34px;font-size:10px}.gallery-track button .pet-art,.mobile-leaf .pet-choice .pet-art{height:35px!important}.mobile-leaf{overflow:auto}.mobile-market .market-detail{display:grid;grid-template-columns:35% 1fr;grid-template-rows:auto auto 1fr;gap:4px 10px}.market-detail header{grid-column:2;grid-row:1}.market-display{grid-column:1;grid-row:1/-1;height:100%;max-height:none;min-height:0}.market-description{grid-column:2;grid-row:2}.market-comparison{display:none}.market-purchase{grid-column:2;grid-row:3}.mobile-market .market-heading{display:none}.market-purchase .cost{display:none}.pet-equipment-view{display:grid;grid-template-columns:40% 1fr;grid-template-rows:auto auto}.pet-gear-picker{grid-row:1/-1}.pet-equipment-view footer{grid-column:2}.pet-gear-detail{padding:4px}.pet-gear-detail small{display:none}.battle-v06 .enemy-fighter.portrait-enemy{height:calc(100% - 55px);width:35%}.battle-scene .class-fighter{height:calc(100% - 55px);width:35%}}

.map-minimap{background-image:url("assets/root-map-open-v090.webp")}
.map-viewport>.map-effects{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
.map-site:after{background:radial-gradient(ellipse,#b5b980eb 0%,#879d53a6 40%,transparent 72%);box-shadow:none}

.market-detail>header{display:block;margin-bottom:0}.market-display{position:relative;container-type:size;grid-template-rows:minmax(0,1fr);overflow:hidden}.market-display .market-showpiece{width:min(185px,88cqh,88cqw);height:min(185px,88cqh,88cqw);max-height:100%;max-width:100%}
@media(max-width:850px){.market-display .market-showpiece{width:min(165px,88cqh,88cqw);height:min(165px,88cqh,88cqw)}}

.sprite-filter-definitions{position:absolute;width:0;height:0;pointer-events:none}.game-sprite{display:block;width:100%;height:100%;overflow:hidden;pointer-events:none}.class-hero-art{background-image:none!important;mix-blend-mode:normal!important;filter:none}.hero-fighter:has(.game-sprite),.enemy-fighter:has(.game-sprite){background-image:none!important;mix-blend-mode:normal!important}.battle-scene .class-fighter:has(.game-sprite){background-image:none!important;mix-blend-mode:normal!important;filter:drop-shadow(0 7px 5px #06120dc9)}.battle-v06 .enemy-fighter:has(.game-sprite){filter:drop-shadow(0 1px 1px #ffe5aa99) drop-shadow(0 9px 6px #000b);mix-blend-mode:normal!important}.pet-art,.troop-portrait>span,.class-portrait{mix-blend-mode:normal!important;filter:url(#root-black-key) drop-shadow(0 3px 2px #0005)}.enemy-art:not(.enemy-fighter){mix-blend-mode:normal!important;filter:url(#root-black-key)}

.enemy-art:has(.game-sprite){background-image:none!important}
@media(min-width:851px){.desktop-market .market-layout{height:clamp(480px,calc(100dvh - 230px),760px)}.desktop-market .market-merchant{min-height:0}.desktop-market .market-stock{display:grid;grid-template-rows:auto minmax(0,1fr)}.desktop-market .market-grid{min-height:0;max-height:none}.desktop-market .market-detail{box-sizing:border-box;height:100%;gap:10px;padding:18px;overflow:auto}.desktop-market .market-detail h2{font-size:26px}.desktop-market .market-display{min-height:100px;flex:1}.desktop-market .market-purchase{flex-shrink:0}}
@media(min-width:851px){.chronicle-book{box-sizing:border-box;height:clamp(450px,calc(100dvh - 285px),740px);min-height:0;padding:5% 11% 4%}.chronicle-book .book-page{min-height:0;overflow:auto}}
@media(min-width:851px){.chronicle-book .book-page{display:flex;flex-direction:column;overflow:hidden}.chronicle-book .book-history{flex:1;min-height:0;height:auto;max-height:none;overflow:auto}.chronicle-book .book-pagination{flex-shrink:0}.chronicle-book .book-empty{flex:1;min-height:0}}
