:root{--might:#ad8846;--mana:#719caf}
.resource-icon{width:16px;height:16px;flex:0 0 16px;margin:0;object-fit:contain;filter:none}
.primary,.secondary,.map-pin,.icon-button,.battle-action{touch-action:manipulation}
.progress>span,.mini-durability>span{transition:width .65s cubic-bezier(.2,.65,.3,1)}
.item-card .item-art{background:none!important;box-shadow:none!important;height:85px;flex:0 0 85px;margin:4px 0 1px}.item-card .item-art img{filter:none!important;max-height:83px;height:83px;max-width:93%}
.item-grid{gap:10px}.item-card{min-height:195px;padding:10px;border-radius:13px;background:linear-gradient(145deg,#fff9ed,var(--rarity-bg));box-shadow:inset 0 0 0 3px #fffaf0a0,0 3px 9px #5969460d}.item-card h3{font-size:11px!important;min-height:29px;line-height:1.3;margin:4px 0 6px}.item-topline{font-size:7px}.item-card-stat{font-size:9px;line-height:1.35;gap:3px;min-height:26px}.item-card-stat .stat-tag{font-size:7px;padding:2px 4px}.item-card .mini-durability{margin-top:7px}.item-type{font-size:7px;min-height:19px;padding-top:6px}.enhancement-label{color:#9f7c40;background:#efe1b9;border-radius:4px;padding:2px 4px;font-size:9px;margin-left:3px;white-space:nowrap}
.quest-panel{padding:14px;margin-top:11px;border-radius:15px}.quest-panel .quest-title{font-size:15px}.quest-panel p{font-size:10px;line-height:1.6}

/* Equal-size benefit icons and a single short celebration. */
.level-card.celebration{padding:22px 20px;max-width:420px;border:1px solid #d5bb81;box-shadow:0 0 0 4px #fff9e77a,0 15px 50px #1c3a2c33;animation:v13-level-enter .48s cubic-bezier(.2,.8,.2,1) both}
.level-card::before{inset:-35%;animation:v13-level-rays 8s linear 1;opacity:.7}.level-card .level-heading{display:grid;grid-template-columns:36px minmax(0,1fr) 43px;align-items:center;gap:10px;margin:0 0 20px;text-align:left}.level-heading>img{width:36px;height:38px;margin:0}.level-card .level-heading .eyebrow{font-size:7px;line-height:1.5;letter-spacing:1px;margin-bottom:4px}.level-card .level-heading h2{font:700 26px/1.12 Interface,sans-serif;margin:0}.level-card .level-number{width:43px;height:49px;display:grid;place-items:center;font:700 32px Interface,sans-serif;border-radius:12px}
.level-card .level-benefits{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:14px}.level-card .level-benefits>span{grid-column:auto!important;padding:10px 5px;display:flex;flex-direction:column;align-items:center;gap:7px;min-height:95px;border-radius:11px;animation:v13-benefit .48s both}.level-card .level-benefits>span:nth-child(2){animation-delay:.1s}.level-card .level-benefits>span:nth-child(3){animation-delay:.2s}.level-benefit-icon{height:22px;display:grid;place-items:center;flex:0 0 22px}.level-benefit-icon>.icon{font-size:21px}.level-card .level-benefit-icon .resource-icon{width:22px;height:22px;max-width:22px;margin:0;flex:none}.level-card .level-benefits b{font-size:25px;line-height:1}.level-card .level-benefits small{font-size:8px;line-height:1.2}.level-card .level-benefits .mana{color:#a58850;background:#f0e4c7;border-color:#d9c58e}[data-hero-class="mage"] .level-card .level-benefits .mana{background:#e3edf0;color:#7199ac;border-color:#bbcdd6}
.level-card .level-fold{margin-bottom:12px}.level-card .level-fold summary{font-size:10px;min-height:39px}.level-card .level-actions{gap:8px;display:grid;grid-template-columns:1.13fr 1fr;margin-top:14px}.level-card .level-actions button{font-size:10px;min-height:43px;padding:8px}.level-sparks{position:absolute!important;inset:0;overflow:hidden;pointer-events:none}.level-sparks>i{position:absolute;width:4px;height:9px;background:#c5a262;left:var(--x);top:-10px;border-radius:2px;animation:v13-confetti 1.35s calc(var(--i)*.025s) both}.level-sparks>i:nth-child(3n){background:#79a38e}.level-sparks>i:nth-child(3n+1){background:#aac6c9}
@keyframes v13-level-enter{from{opacity:0;transform:translateY(18px) scale(.91)}65%{transform:translateY(-2px) scale(1.015)}to{opacity:1;transform:none}}@keyframes v13-level-rays{from{transform:rotate(0deg)}to{transform:rotate(70deg)}}@keyframes v13-benefit{from{opacity:0;transform:translateY(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes v13-confetti{0%{opacity:0;transform:translateY(0) rotate(0deg)}18%{opacity:.9}to{opacity:0;transform:translateY(430px) rotate(var(--r))}}

/* Keep the scene's colors; effects are brief and separate from the sprites. */
.battle-backdrop{opacity:1}.battle-field::after{background:linear-gradient(#243b3712,transparent 25%,#d8b78212)}.battle-field{min-height:205px;touch-action:manipulation}.battle-header{border-bottom:1px solid #dfd4b5}.battle-console{background:linear-gradient(140deg,#fff7e7,#f1e6cd);box-shadow:0 -4px 14px #2c432422}.combat-vitals .vital-row{font-size:9px}.battle-console .battle-action{border-radius:13px;min-height:48px;font-size:15px}.battle-console .battle-action small{font-size:8px}.battle-console .battle-action[data-fight]{background:linear-gradient(145deg,#3b796c,#2e625a);border-color:#2a6259;box-shadow:0 3px 0 #224d47}.battle-console .skills-button{background:linear-gradient(135deg,#fcf2d6,#e9ddbb);border-color:#cab784;color:#59715b;box-shadow:0 3px 0 #bfc7a6}.battle-console .battle-action:disabled{opacity:.52}.battle-console .battle-note{min-height:25px;padding:6px 9px;font-size:9px;background:#f7f6e9}.battle-header h2{font:700 18px/1.1 Interface,sans-serif}.battle-top{padding-bottom:7px}.enemy-panel{background:linear-gradient(125deg,#fff9eaf0,#e9ecdafa);border-color:#c8ceb5}.enemy-chip{border-color:#d0d2b8;background:#faf8e8}.enemy-chip.selected,.enemy-card.selected{border-color:#bca46c;background:#f8efcd}.enemy-chip .progress>span,.enemy-card .progress>span{background:#bd795b}.battle-top .turn-badge{color:#677f62;background:#eff1df}.enemy-panel-head strong{font-size:9px}.enemy-card-main strong{font-size:10px}.enemy-card-effects{gap:3px;min-height:17px}.enemy-effect{font-size:7px}
.party-clock .clock-copy{display:flex;align-items:center;gap:5px}.clock-copy>strong{margin-left:auto}.hourglass{display:inline-flex;position:relative;width:15px;height:18px;flex:0 0 15px;transform-origin:50% 50%;animation:v13-hourglass 5s ease-in-out infinite}.hourglass img{width:15px;height:18px}.hourglass::after{content:'';position:absolute;left:7px;top:8px;height:4px;width:1px;background:#c5a262;animation:v13-sand 1s linear infinite}.party-clock.urgent .hourglass{animation-duration:1.7s}.clock-copy strong{animation:none!important}
.battle-unit{height:auto;aspect-ratio:1;overflow:visible;will-change:auto;transition:opacity .24s ease}.battle-unit.hero-unit{width:42%;left:1%;bottom:11%}.monster-unit.slot-0{right:1%;bottom:15%;width:36%}.monster-unit.slot-1{right:21%;bottom:44%;width:28%}.monster-unit.slot-2{right:0;bottom:40%;width:28%}.monster-unit.slot-3{right:4%;bottom:65%;width:22%}.monster-unit.kind-sentinel{width:40%;right:2%;bottom:18%}.monster-unit.kind-crab.slot-0{width:34%}.monster-unit.kind-crab.slot-1{width:28%}.battle-hero-sprite,.monster-sprite{filter:none;image-rendering:auto}.monster-unit.selected .monster-sprite{filter:none}.monster-unit.frozen .monster-sprite{filter:drop-shadow(0 0 3px #90cad5)}.battle-unit .ground-shadow{filter:none;background:#354f3429;height:4%;bottom:2%;width:49%;left:25%}.battle-unit.selected .target-ring{border:1px solid #c5a45d;background:#f9d98618;box-shadow:none;animation:v13-target 2.8s ease-in-out infinite}.battle-actor.action-active{z-index:8}
.battle-unit .unit-health{display:flex;flex-direction:column;align-items:center;bottom:-16px;gap:2px;pointer-events:none}.unit-health .progress{height:3px}.unit-health small{font-size:8px;background:#fff9e3d9;border-radius:4px;padding:2px 5px;text-shadow:none;color:#596852}.unit-name{font-size:8px;background:#fff9e4c4;border-radius:4px;color:#586e58;bottom:-18px;padding:2px 5px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:none}
.party-arena .hero-unit{left:2%;bottom:11%;width:30%}.party-arena .party-ally.ally-0{left:1%;bottom:46%;width:24%}.party-arena .party-ally.ally-1{left:22%;bottom:62%;width:19%}.party-arena .party-ally.ally-2{left:24%;bottom:28%;width:24%}.party-arena .monster-unit.slot-0{right:0;bottom:19%;width:30%}.party-arena .monster-unit.slot-1{right:25%;bottom:46%;width:24%}.party-arena .monster-unit.slot-2{right:0;bottom:47%;width:25%}.party-arena .monster-unit.slot-3{right:4%;bottom:70%;width:20%}.party-ally .unit-name{font-size:7px}
.battle-effect{position:absolute;z-index:12;color:var(--effect-color);pointer-events:none;transform:translate(-50%,-50%);contain:layout style}.battle-effect svg{width:100%;height:100%;overflow:visible}.effect-spark{filter:drop-shadow(0 0 3px #edbf6770)}.effect-frost{filter:drop-shadow(0 0 3px #b8e9f580)}.effect-tidebolt,.effect-wave{filter:drop-shadow(0 0 3px #b6dbe770)}.damage-number{font-size:22px;font-weight:800;color:#fff7dd;top:16%;left:calc(50% + var(--number-offset,0px));text-shadow:0 1px 2px #6d514d,0 0 2px #5c5341;animation:v13-damage .8s ease-out both}.damage-number.critical{font-size:27px;color:#ffe1a0}.damage-number.healing{color:#dcf5c4;text-shadow:0 1px 2px #436856}.damage-number.received{color:#ffd6b8}.damage-number.dodge{font-size:10px;color:#edf5dc;top:19%}.reinforcement-note{font-size:8px;padding:5px 8px;max-width:73%;top:8px;right:8px;background:#fff8e2eb}.reinforcement-note img{width:25px;height:24px}.skills-drawer{width:50%;max-width:50%}
[data-hero-class="mage"] .battle-console .skills-button{background:linear-gradient(145deg,#eef6ef,#d7e7ea);border-color:#a9c2c6;color:#5a818b}.monster-unit:not(:disabled):active .target-ring{background:#f5d48644}
@keyframes v13-hourglass{0%,70%{transform:rotate(0deg)}82%,100%{transform:rotate(180deg)}}@keyframes v13-sand{0%{opacity:.1;transform:scaleY(.4)}50%{opacity:.8;transform:scaleY(1)}100%{opacity:.1;transform:scaleY(.4)}}@keyframes v13-target{50%{opacity:.6}}@keyframes v13-damage{from{opacity:0;transform:translate(-50%,5px) scale(.9)}15%{opacity:1;transform:translate(-50%,-4px) scale(1.05)}65%{opacity:1}to{opacity:0;transform:translate(-50%,-36px) scale(1)}}

/* Different travel motion for water, pine, ruins, caves and settlements. */
.journey-weather{position:absolute;inset:0;overflow:hidden;pointer-events:none}.journey-weather>i{position:absolute;left:var(--left);top:var(--top);animation-delay:var(--delay)}.weather-sea>i{width:80px;height:18px;border-top:1px solid #f6fffccc;border-radius:50%;animation:v13-sea 4s ease-in-out infinite}.weather-pine>i{width:2px;height:16px;background:#b3c29b;box-shadow:4px 3px 0 -1px #d2c89c;animation:v13-pine 4.5s linear infinite}.weather-fireflies>i{width:3px;height:3px;background:#fff3b2;border-radius:50%;box-shadow:0 0 7px #f9e9a8;animation:v13-firefly 3.4s ease-in-out infinite}.weather-lanterns>i{width:3px;height:7px;background:#ffe1a0;border-radius:40%;box-shadow:0 0 8px #ffdda4;animation:v13-lantern 4.2s linear infinite}.weather-stars>i{width:2px;height:2px;background:#fafff8;box-shadow:0 0 5px #eef8cb;animation:v13-firefly 3s ease-in-out infinite}.weather-runes>i{width:9px;height:9px;border:1px solid #b3dee3;animation:v13-rune 4s ease-in-out infinite}.weather-crystals>i{width:4px;height:14px;background:#c4d5e4;border:1px solid #e7f4ef;clip-path:polygon(50% 0,100% 25%,75% 100%,25% 100%,0 25%);animation:v13-rune 3.3s ease-in-out infinite}.weather-mist>i{width:100px;height:35px;background:radial-gradient(ellipse,#edf7e234,transparent 70%);animation:v13-sea 6s ease-in-out infinite}.journey-progress>span{transition:width .25s linear}
@keyframes v13-sea{from{opacity:0;transform:translateX(-40px)}45%{opacity:.7}to{opacity:0;transform:translateX(50px)}}@keyframes v13-pine{from{opacity:0;transform:translate(0,-15px) rotate(-20deg)}25%{opacity:.6}to{opacity:0;transform:translate(-50px,110px) rotate(35deg)}}@keyframes v13-firefly{0%,100%{opacity:.1;transform:translate(0,0)}50%{opacity:.9;transform:translate(6px,-8px)}}@keyframes v13-lantern{from{opacity:0;transform:translateY(30px)}25%{opacity:.75}to{opacity:0;transform:translate(-10px,-75px)}}@keyframes v13-rune{0%,100%{opacity:0;transform:translateY(10px) rotate(45deg)}50%{opacity:.65;transform:translateY(-9px) rotate(45deg)}}
.location-population{display:inline-flex;width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#9ba995;box-shadow:0 0 0 2px #dbe4d144;animation:v13-presence 2.8s ease-in-out infinite;margin-left:2px;align-self:center}.location-population.warm{background:#c4a15f;box-shadow:0 0 0 2px #e8d8a645}.location-population.busy{background:#b77161;box-shadow:0 0 0 2px #e6c3b549}.map-pin{gap:5px}@keyframes v13-presence{50%{opacity:.4}}
@media(min-width:900px){.item-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.item-card{min-height:225px;padding:14px}.item-card .item-art{height:110px;flex-basis:110px}.item-card .item-art img{height:105px;max-height:105px}.item-card h3{font-size:13px!important;min-height:33px}.item-card-stat{font-size:11px}.item-topline,.item-type{font-size:9px}.item-card-stat .stat-tag{font-size:8px}.battle-field{min-height:260px}.battle-console .battle-action{min-height:57px;font-size:19px}.battle-header h2{font-size:24px}.combat-vitals .vital-row{font-size:12px}.party-arena .hero-unit{width:27%}.hourglass,.hourglass img{width:20px;height:22px}.hourglass::after{left:9px;top:10px}}
@media(max-height:690px){.battle-header{padding-top:7px;padding-bottom:6px}.battle-header h2{font-size:15px}.battle-field{min-height:165px}.battle-console{padding:8px 11px 10px}.battle-console .combat-player{margin-bottom:6px}.battle-console .battle-action{min-height:44px;font-size:13px}.battle-console .battle-note{min-height:22px;margin:4px 0 7px}.battle-unit .unit-health small{font-size:7px;padding:1px 4px}.battle-unit .unit-health{bottom:-10px}.unit-name{bottom:-11px;font-size:7px}.level-card.celebration{padding:17px}.level-card .level-heading{margin-bottom:13px}.level-card .level-benefits>span{min-height:83px;padding:8px 5px}}
.reduced-motion .level-card,.reduced-motion .level-card::before,.reduced-motion .level-benefits>span,.reduced-motion .level-sparks>i,.reduced-motion .hourglass,.reduced-motion .hourglass::after,.reduced-motion .journey-weather>i,.reduced-motion .location-population,.reduced-motion .target-ring{animation:none!important}.reduced-motion .progress>span{transition:none!important}
@media(prefers-reduced-motion:reduce){.level-card,.level-card::before,.level-benefits>span,.level-sparks>i,.hourglass,.hourglass::after,.journey-weather>i,.location-population,.target-ring{animation:none!important}.progress>span{transition:none!important}}
