:root{--symbol-size:28px}
html{background:#070a0f}
body{isolation:isolate;background:radial-gradient(ellipse at 50% 12%,#202a35cc 0,#10151dcc 38rem,#070a0ff2 78rem);cursor:url("assets/ui/relic-cursor.png") 2 2,auto}
body:before{z-index:-2;inset:0;opacity:.52;background:url("assets/branding/relic-workshop-background.webp") center/cover fixed no-repeat;mask-image:radial-gradient(ellipse at center,transparent 8%,#0008 54%,#000 100%);animation:relicBackdrop 1.4s ease-out both}
body:after{z-index:-1}
button,.shop-card,.pack-item,.bag-tile,.reserve-card,select,a{cursor:url("assets/ui/relic-cursor.png") 2 2,pointer}
.shop-card,.pack-item,.bag-tile,.reserve-card{-webkit-touch-callout:none;user-select:none}
input{cursor:text}
@keyframes relicBackdrop{from{opacity:0}to{opacity:.52}}

.app-shell{width:min(100%,1120px)}
.brand img{width:64px;height:64px;padding:0;border:0;border-radius:0;background:none;object-fit:contain;filter:drop-shadow(0 8px 10px #000b)}
.brand h1{font-size:25px}.brand p{font-size:11px}.brand-kicker,.eyebrow,.status-label{font-size:9px}
.header-actions{align-items:center}.symbol-button{display:grid;place-items:center;width:48px;min-width:48px;padding:3px}.symbol-button img{width:34px;height:34px;object-fit:contain;pointer-events:none}.account-trigger{min-width:78px}body[data-phase="menu"] .menu-trigger{display:grid}

.status-strip{grid-template-columns:2.2fr .72fr .86fr 1fr;margin-bottom:19px}.status-strip>div{display:flex;min-height:62px;flex-direction:column;align-items:center;justify-content:center}.status-label{display:flex;align-items:center;justify-content:center;gap:4px}.status-label img{width:24px;height:24px;object-fit:contain}.status-strip strong{min-height:29px;margin-top:4px}
.relic-track{display:grid!important;grid-template-columns:repeat(10,minmax(16px,1fr));gap:2px;width:100%;padding:0 5px}.relic-track img{width:100%;max-width:27px;aspect-ratio:1;object-fit:contain;filter:grayscale(1) brightness(.64);opacity:.68}.relic-track img.active{filter:none;opacity:1}.life-track{grid-template-columns:repeat(3,25px);justify-content:center}.life-track img{max-width:25px}.rank-value{display:flex!important;align-items:center;gap:5px}.rank-value img{width:34px;height:34px;object-fit:contain}.rank-value span{font-size:13px}

.rank-progress{margin-bottom:18px}.rank-progress>div{font-size:9px}.menu-hero>img{width:154px;height:154px;object-fit:contain;border:0;border-radius:0;background:none;box-shadow:none;filter:drop-shadow(0 16px 20px #000c)}.menu-hero h2{margin-top:-8px}.menu-hero p{font-size:14px;letter-spacing:.08em}.ranked-mode>img{width:74px;height:74px;object-fit:contain;filter:drop-shadow(0 8px 8px #000b)}
.mode-card p{font-size:12px}.instruction,.hint{display:none}

.heading-with-symbol{display:flex;align-items:center;gap:9px}.heading-with-symbol>img{width:48px;height:48px;object-fit:contain}.symbol-action{display:flex;align-items:center;justify-content:center;gap:1px;min-width:86px;padding:2px 6px}.symbol-action img{width:30px;height:30px;object-fit:contain}.symbol-action b{margin:0 1px!important;font-size:13px!important}
.price{display:inline-flex;align-items:center;gap:2px;min-height:24px;font-size:12px}.price img{width:22px;height:22px;object-fit:contain}.shop-kind{display:none}.shop-desc{font-size:11px}.shop-name{font-size:14px}.stat{position:relative;min-height:45px;display:grid;align-content:center}.stat b{font-size:14px}.stat small{height:16px;margin-top:1px}.stat small img{width:16px;height:16px;object-fit:contain}.tempo-line{font-size:9px}.selected-title strong,.detail-object strong{font-size:12px!important}.selected-title span,.detail-object span,.detail-object small,.detail-copy{font-size:9px!important}
.combat-legend{gap:13px;font-size:9px}.combat-legend span{gap:4px}.combat-legend img{width:24px;height:24px;object-fit:contain}
.effect-symbol{display:inline-flex;align-items:center;gap:4px;margin-top:8px;padding:3px 8px;border:1px solid #5f403f;border-radius:7px;background:#241616;color:#e8bd82}.effect-symbol img{width:28px;height:28px;object-fit:contain}.effect-symbol b{font-size:13px}

.pack-grid .grid-cell.covered{border-width:2px;border-style:solid;filter:saturate(1.22) brightness(1.16);box-shadow:inset 0 0 0 1px #fff2,inset 0 0 14px #0006,0 0 8px #0008}
.pack-grid .bag-tile{opacity:.96;border:2px solid #e6c08388;box-shadow:inset 0 0 0 1px #fff2,inset 0 0 11px #0007,0 2px 5px #0008}
.pack-grid .bag-tile:after{content:"";position:absolute;inset:4px;border:1px dashed #f5d49a66;border-radius:2px;box-shadow:inset 0 0 7px #0008;pointer-events:none}
.drag-preview-layer{position:absolute;z-index:20;inset:2px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(5,var(--cell));gap:2px;pointer-events:none}
.drag-preview-cell{grid-column:var(--preview-column);grid-row:var(--preview-row);min-width:0;border:2px solid;border-radius:5px;pointer-events:none}
.drag-preview-cell.source{border-color:#f5cf7dcc;background:#dba94d30;box-shadow:inset 0 0 12px #ffd97833,0 0 8px #e5b65366}
.drag-preview-cell.target.valid{border-color:#88ffac;background:#2dd36f55;box-shadow:inset 0 0 13px #4dff8e55,0 0 10px #32df7777}
.drag-preview-cell.target.invalid{border-color:#ff8791;background:#e1435355;box-shadow:inset 0 0 13px #ff526255,0 0 10px #ee465977}

.settings-modal{position:fixed;z-index:110;inset:0;display:grid;place-items:center;padding:16px;background:#05070bdc;backdrop-filter:blur(12px)}.settings-modal[hidden]{display:none}.settings-dialog{position:relative;width:min(100%,410px);padding:26px;border:1px solid #a57d3e;border-radius:12px;background:linear-gradient(145deg,#252a31,#11151b 72%);box-shadow:inset 0 0 0 3px #080a0d,inset 0 0 0 4px #57442e,0 28px 90px #000;text-align:center}.settings-mark{width:84px;height:84px;object-fit:contain}.settings-dialog h2{margin:3px 0 20px;font:700 27px Georgia,serif}.language-setting,.settings-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;width:100%;min-height:58px;margin-top:9px;padding:8px 12px;border:1px solid #524836;border-radius:8px;background:#12171d;color:#e9dcc5;text-align:left;font-weight:900;font-size:11px;letter-spacing:.1em}.language-setting select{min-width:128px;min-height:40px;padding:0 10px;border:1px solid #806638;border-radius:6px;background:#252a31;color:#f1dfbb;font:800 13px inherit}.settings-row{grid-template-columns:40px 1fr auto}.settings-row img{width:38px;height:38px;object-fit:contain}.settings-row b{color:#efca72}.settings-dialog .wide{font-size:11px}

@media(max-width:759px){
  :root{--symbol-size:24px}.app-shell{width:min(100%,600px)}.brand img{width:46px;height:46px}.brand h1{font-size:20px}.brand p,.brand-kicker{display:none}.account-trigger{min-width:62px;font-size:8px}.symbol-button{width:42px;min-width:42px;height:42px}.symbol-button img{width:30px;height:30px}
  .status-strip{grid-template-columns:1.75fr .65fr .8fr .9fr}.status-strip>div{min-height:54px;padding:4px 2px}.status-label{font-size:7px}.status-label img{width:19px;height:19px}.status-strip strong{font-size:13px}.relic-track{grid-template-columns:repeat(5,minmax(15px,1fr));gap:0;padding:0 2px}.relic-track img{max-width:21px}.life-track{grid-template-columns:repeat(3,21px)}.rank-value{gap:1px}.rank-value img{width:29px;height:29px}.rank-value span{font-size:9px}
  .menu-hero>img{width:118px;height:118px}.menu-hero p{font-size:11px}.mode-card p{font-size:10px}.heading-with-symbol>img{width:34px;height:34px}.symbol-action{min-width:63px}.symbol-action img{width:23px;height:23px}.symbol-action b{font-size:10px!important}
  .workbench-layout .shop-name{font-size:9px}.workbench-layout .shop-desc,.workbench-layout .tempo-line,.workbench-layout .footprint b{display:none}.workbench-layout .stat{min-height:0}.workbench-layout .stat small img{width:12px;height:12px}.workbench-layout .price{font-size:8px}
  .combat-legend{gap:7px}.combat-legend span{font-size:0}.combat-legend img{width:27px;height:27px}
}
@media(min-width:900px){
  body{cursor:url("assets/ui/cursors/relic-pointer.png") 1 1,auto}
  button,.icon-button,.small-button,.primary-button,.shop-card,.pack-item,.bag-tile,.reserve-card,select,a{cursor:url("assets/ui/cursors/relic-hover.png") 1 1,pointer!important}
  .app-shell,body[data-phase="shop"] .app-shell{width:min(calc(100% - 32px),1440px)}

  .topbar{min-height:72px;padding:7px 12px 10px;border:1px solid #58472f;border-radius:10px;background-image:linear-gradient(#0c1015b8,#0c1015d9),url("assets/ui/panels/forged-iron.webp");background-position:center;background-size:cover;box-shadow:inset 0 0 0 2px #080a0d,0 8px 24px #0008}
  body[data-phase="shop"] .topbar{padding:7px 12px 10px}
  body[data-phase="shop"] .brand img,.brand img{width:58px;height:58px}
  body[data-phase="shop"] .brand h1,.brand h1{font-size:25px}
  body[data-phase="shop"] .brand p,.brand p{font-size:14px}
  .brand-kicker,.eyebrow,.status-label,body[data-phase="shop"] .brand-kicker,body[data-phase="shop"] .status-label,.workbench-layout .eyebrow{font-size:12px!important;letter-spacing:.11em}
  .account-trigger,body[data-phase="shop"] .account-trigger{font-size:12px!important}
  .icon-button,.symbol-button{min-height:50px}
  .small-button{font-size:12px!important}
  .symbol-button{width:54px;min-width:54px}.symbol-button img{width:40px;height:40px}

  .status-strip{grid-template-columns:minmax(500px,2.4fr) minmax(140px,.65fr) minmax(180px,.8fr) minmax(210px,.95fr);gap:7px;margin:8px 0}
  body[data-phase="shop"] .status-strip{gap:7px;margin:8px 0}
  .status-strip>div,body[data-phase="shop"] .status-strip>div{min-height:99px;padding:7px 8px;border-color:#685335;background-color:#101319;background-position:center;background-size:cover;background-blend-mode:multiply;box-shadow:inset 0 0 0 2px #080a0dcc,inset 0 0 24px #0009}
  .status-strip>div:nth-child(1){background-image:linear-gradient(#141820aa,#141820d5),url("assets/ui/panels/forged-iron.webp")}
  .status-strip>div:nth-child(2){background-image:linear-gradient(#24180e99,#171008d5),url("assets/ui/panels/workbench-leather.webp")}
  .status-strip>div:nth-child(3){background-image:linear-gradient(#270d16a8,#180b10d8),url("assets/ui/panels/merchant-velvet.webp")}
  .status-strip>div:nth-child(4){background-image:linear-gradient(#111820a3,#0d1118d8),url("assets/ui/panels/alchemy-slate.webp")}
  .status-strip strong,body[data-phase="shop"] .status-strip strong{min-height:48px;margin-top:3px;font-size:20px}
  .status-label img{width:36px;height:36px}
  .relic-track{grid-template-columns:repeat(10,54px);justify-content:center;gap:0;width:auto;padding:0}
  .relic-track img{width:54px;max-width:none}
  .life-track{grid-template-columns:repeat(3,62px);gap:0}.life-track img{width:62px;max-width:none}
  .rank-value{gap:9px}.rank-value img{width:72px;height:72px}.rank-value span{font-size:18px}
  .rank-progress{padding:6px 10px;border:1px solid #594b38;border-radius:7px;background-image:linear-gradient(#10151bcc,#10151be8),url("assets/ui/panels/alchemy-slate.webp");background-position:center;background-size:cover}
  .rank-progress>div,body[data-phase="shop"] .rank-progress>div{font-size:12px!important}

  .workbench-layout{grid-template-columns:minmax(580px,.95fr) minmax(0,1.15fr);gap:12px}
  .shop-panel,.pack-panel{padding:12px;border-width:2px;background-position:center;background-size:cover;background-blend-mode:multiply;box-shadow:inset 0 0 0 2px #090b0e,inset 0 0 35px #0008,0 12px 28px #0007}
  .shop-panel{background-color:#260e17;background-image:linear-gradient(#1b1117aa,#100d11dd),url("assets/ui/panels/merchant-velvet.webp")}
  .pack-panel{--cell:min(8.2vh,78px);background-color:#24170e;background-image:linear-gradient(#1b130da3,#100d0add),url("assets/ui/panels/workbench-leather.webp")}
  .workbench-layout .section-heading h2,.workbench-layout .pack-toolbar h2{font-size:25px}
  .heading-with-symbol>img{width:58px;height:58px}
  .workbench-layout .small-button{min-height:42px;padding-inline:12px;font-size:12px}
  .symbol-action img{width:34px;height:34px}.symbol-action b{font-size:16px!important}
  .workbench-layout .instruction,.workbench-layout .hint{display:none}
  .workbench-layout .shop{gap:8px}
  .workbench-layout .shop-card,.workbench-layout .shop-card:last-child:nth-child(odd){padding:9px;border-color:#69563b;background-color:#15171c;background-image:linear-gradient(#131820b8,#101218e0),url("assets/ui/panels/forged-iron.webp");background-position:center;background-size:cover;box-shadow:inset 0 0 0 1px #b9975933,0 5px 12px #0008}
  .workbench-layout .shop-card:nth-child(even){background-image:linear-gradient(#220d15b5,#140b10e3),url("assets/ui/panels/merchant-velvet.webp")}
  .workbench-layout .shop-top,.workbench-layout .shop-card:last-child:nth-child(odd) .shop-top{grid-template-columns:70px minmax(0,1fr);gap:9px}
  .workbench-layout .item-image,.workbench-layout .shop-card:last-child:nth-child(odd) .item-image{width:70px;height:70px}
  .workbench-layout .shop-name{padding-right:52px;font-size:15px;line-height:1.2}
  .workbench-layout .shop-kind,.workbench-layout .shop-desc{display:none}
  .workbench-layout .price{margin-top:5px;padding:4px 6px;font-size:14px}.workbench-layout .price img{width:25px;height:25px}
  .workbench-layout .shop-lock{top:8px;right:8px;min-height:31px;padding-inline:7px;font-size:12px!important}
  .workbench-layout .shop-card>.footprint{display:flex;margin-top:7px;padding:5px}.workbench-layout .shop-card>.footprint b{display:none}
  .workbench-layout .shop-card>.stats{display:grid;gap:3px;margin-top:6px}.workbench-layout .shop-card>.stats .stat{min-height:42px;padding:4px 2px}.workbench-layout .shop-card>.stats .stat b{font-size:15px}.workbench-layout .shop-card>.stats .stat small{height:20px;font-size:0}.workbench-layout .shop-card>.stats .stat small img{width:20px;height:20px}
  .workbench-layout .shop-card>.tempo-line{display:none}
  .workbench-layout .shop-card .set-badge{display:inline-block;margin-block:4px;padding:3px 5px;font-size:12px!important}

  .pack-panel .pack-wrap{grid-template-columns:minmax(438px,478px) minmax(220px,1fr);gap:11px;padding:10px;background-image:linear-gradient(#26180c66,#140d08b8),url("assets/ui/panels/workbench-leather.webp");background-position:center;background-size:cover}
  .pack-panel .selected-details{min-height:calc(var(--cell)*5 + 12px);padding:14px;background-image:linear-gradient(#10151bc2,#0e1116e5),url("assets/ui/panels/alchemy-slate.webp");background-position:center;background-size:cover}
  .pack-panel .selected-title strong,.pack-panel .detail-object strong{font-size:16px}
  .pack-panel .selected-title span,.pack-panel .detail-object span,.pack-panel .detail-object small,.pack-panel .detail-copy,.pack-panel .detail-set small,.pack-panel .tempo-line{font-size:12px!important}
  .pack-panel .detail-object{grid-template-columns:76px 1fr}.pack-panel .detail-object img{width:76px;height:76px}
  .pack-panel .set-badge{padding:4px 7px;font-size:12px!important}
  .pack-panel .stat{min-height:48px}.pack-panel .stat b{font-size:16px}.pack-panel .stat small{font-size:0}.pack-panel .stat small img{width:22px;height:22px}
  .pack-panel .pack-item .level{display:none}

  .lower-dashboard{gap:10px}.lower-dashboard .utility-section,.lower-dashboard .recipe-access,.lower-dashboard .enemy-card{border:2px solid #5d4b35;background-position:center;background-size:cover;background-blend-mode:multiply;box-shadow:inset 0 0 0 2px #080a0dcc,0 8px 18px #0007}
  .lower-dashboard .utility-section{padding:8px;background-color:#17191e;background-image:linear-gradient(#12161cc0,#0d1015e2),url("assets/ui/panels/forged-iron.webp")}
  .lower-dashboard .recipe-access{padding:8px;background-color:#111820;background-image:linear-gradient(#10171dc0,#0b1016e2),url("assets/ui/panels/alchemy-slate.webp")}
  .lower-dashboard .enemy-card{padding:9px;background-color:#230d15;background-image:linear-gradient(#220d15b5,#130b10e3),url("assets/ui/panels/merchant-velvet.webp")}
  .lower-dashboard .reserve-zone,.lower-dashboard .combo-book-button{height:96px;min-height:96px;background-position:center;background-size:cover}
  .lower-dashboard .reserve-zone{background-image:linear-gradient(#171a20b5,#101218df),url("assets/ui/panels/forged-iron.webp")}
  .lower-dashboard .combo-book-button{background-image:linear-gradient(#111820b5,#0d1218df),url("assets/ui/panels/alchemy-slate.webp")}
  .lower-dashboard .subheading h2{font-size:18px}.lower-dashboard .zone-head img{width:46px;height:46px}.lower-dashboard .zone-head strong,.lower-dashboard .reserve-card span{font-size:12px}.lower-dashboard .zone-head small,.lower-dashboard .reserve-card small,.lower-dashboard .subheading>span,.lower-dashboard .combo-book-button small,.lower-dashboard .reserve-empty{display:none}
  .lower-dashboard .reserve-card{flex-basis:64px;background-image:linear-gradient(#25170db8,#150e09e0),url("assets/ui/panels/workbench-leather.webp");background-position:center;background-size:cover}.lower-dashboard .reserve-card img{width:48px;height:45px}
  .lower-dashboard .combo-book-button strong{font-size:17px}.lower-dashboard .combo-book-button b{font-size:12px}
  .lower-dashboard .rival-mark span{font-size:12px}.lower-dashboard .enemy-copy strong{font-size:16px}.lower-dashboard .enemy-copy small{display:none}.lower-dashboard .enemy-card .primary-button{font-size:12px}

  .team,.hero-core,.battle-pack,.battle-log,.victory-actions,.mode-card,.settings-dialog,.sell-dialog,.item-info-dialog,.account-dialog,.combos-dialog,.pause-dialog,.battle-result-dialog{background-position:center;background-size:cover}
  .team,.hero-core,.battle-log,.settings-dialog,.item-info-dialog,.account-dialog,.combos-dialog,.pause-dialog{background-image:linear-gradient(#11161cbd,#0b0e13e5),url("assets/ui/panels/forged-iron.webp")}
  .enemy-team,.sell-dialog{background-image:linear-gradient(#230e17ba,#130b10e8),url("assets/ui/panels/merchant-velvet.webp")}
  .battle-pack,.victory-actions,.battle-result-dialog{background-image:linear-gradient(#21150db5,#110c08e3),url("assets/ui/panels/workbench-leather.webp")}
  .battle-bag-layer{z-index:3!important}
  .battle-bag-piece{border-width:2px;box-shadow:inset 0 0 0 1px #ffffff19,inset 0 0 18px #0009,0 0 9px #0008}
  .battle-bag-piece:after{inset:5px;border-color:#f3ce8752}
  .mode-card{background-image:linear-gradient(#10171dbc,#0c1116e5),url("assets/ui/panels/alchemy-slate.webp")}
  .team h3,.battle-head .eyebrow,.hero-values strong,.hero-values b,.hero-debuffs span,.battle-sets span,.combat-legend,.battle-log,.playback-controls button,body[data-phase="battle"] .battle-sets span,body[data-phase="battle"] .combat-legend,body[data-phase="battle"] .combat-legend span{font-size:12px!important}
  .battle-item>span,.battle-item>small{display:none}.combat-legend img{width:34px;height:34px}
  small{font-size:12px}
}
@media(prefers-reduced-motion:reduce){body:before{animation:none}}
html[lang="en"] .enemy-card:before{content:"NEXT CHALLENGE"}
html[lang="en"] .workbench-layout .shop.sell-target:after{content:"DROP TO SELL"}

/* v25: icon controls, warmer material surfaces and compact round action */
.icon-only-action{display:inline-grid!important;place-items:center;padding:3px!important;font-size:0!important;line-height:0}
.icon-only-action[hidden]{display:none!important}
.icon-only-action img{display:block;width:26px;height:26px;object-fit:contain;pointer-events:none}
.shop-lock.icon-only-action{width:34px;min-width:34px;height:34px;min-height:34px!important;border-color:#80633a;background:linear-gradient(145deg,#4b3821,#20170f)}
.shop-locked .shop-lock{border-color:#d0a44e;box-shadow:0 0 13px #e2ad4e66,inset 0 0 8px #f2c76528}
.lock-action{width:44px;min-width:44px;padding:4px!important}.lock-action img{width:30px;height:30px}.lock-action.locked{border-color:#cf9d48;background:linear-gradient(#59401e,#281c12);box-shadow:0 0 12px #e5b04c55}
.item-lock-badge{display:grid!important;place-items:center!important;width:25px!important;height:25px!important;padding:2px!important;border:1px solid #e2b45b!important;border-radius:50%!important;background:#25180fe8!important;font-size:0!important}.item-lock-badge img{position:static!important;width:20px!important;height:20px!important;object-fit:contain!important}
.reserve-card{position:relative}.reserve-lock-mark{position:absolute;top:3px;right:3px;display:grid;place-items:center;width:23px;height:23px;border:1px solid #d6a447;border-radius:50%;background:#25180fed}.reserve-lock-mark img{width:18px!important;height:18px!important;object-fit:contain!important;background:transparent!important}
.fight-action{display:flex!important;align-items:center;justify-content:center;gap:10px}.fight-action img{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 2px 4px #0008)}.fight-action span{font:inherit}
.lower-dashboard .enemy-card{display:block!important;min-height:72px!important;height:72px!important;padding:5px!important;border-color:#9f7334!important;background-color:#5a3617!important;background-image:linear-gradient(90deg,#432712b5,#7b4d1db5,#432712b5),url("assets/ui/panels/workbench-leather.webp")!important;background-position:center!important;background-size:cover!important}
.lower-dashboard .enemy-card:before,.lower-dashboard .rival-mark,.lower-dashboard .enemy-copy,.lower-dashboard .enemy-preview{display:none!important}
.lower-dashboard .enemy-card .fight-action{width:100%!important;height:100%!important;min-height:0!important;border:1px solid #edc269!important;background:linear-gradient(#dca746,#8e541c)!important;color:#241408!important;font-size:17px!important;letter-spacing:.08em!important;box-shadow:inset 0 2px #fff3a36b,inset 0 -4px #522b0f99,0 3px 8px #0009!important}

/* Replace flat black with readable forged, leather, slate and velvet materials. */
.topbar{border:1px solid #66543b;border-radius:9px;background-color:#25313b;background-image:linear-gradient(90deg,#2b3844d9,#1c252ed9),url("assets/ui/panels/forged-iron.webp");background-position:center;background-size:cover}
.status-strip>div{background-color:#354452;background-image:linear-gradient(#394a58d5,#263440e5),url("assets/ui/panels/forged-iron.webp");background-position:center;background-size:cover}
.status-strip>div:nth-child(2){background-color:#66462a;background-image:linear-gradient(#69482bd5,#46301fe5),url("assets/ui/panels/workbench-leather.webp")}
.status-strip>div:nth-child(3){background-color:#642b3c;background-image:linear-gradient(#642c3dd5,#411d2ae5),url("assets/ui/panels/merchant-velvet.webp")}
.status-strip>div:nth-child(4),.rank-progress{background-color:#344b5c;background-image:linear-gradient(#354d5ed5,#233542e5),url("assets/ui/panels/alchemy-slate.webp");background-position:center;background-size:cover}
.shop-panel,.shop-card,.utility-section,.reserve-zone,.team,.hero-core,.battle-log,.settings-dialog,.account-dialog,.pause-dialog,.abandon-run-dialog{background-color:#2c313a;background-image:linear-gradient(#2e343bb5,#191e25d5),url("assets/ui/panels/forged-iron.webp");background-position:center;background-size:cover}
.pack-panel,.pack-wrap,.battle-pack,.victory-actions,.battle-result-dialog{background-color:#4b301c;background-image:linear-gradient(#49301db0,#251811d6),url("assets/ui/panels/workbench-leather.webp");background-position:center;background-size:cover}
.recipes-section,.combo-book-button,.mode-card,.selected-details,.item-info-dialog,.combos-dialog{background-color:#293946;background-image:linear-gradient(#2a3b47b0,#16212bd8),url("assets/ui/panels/alchemy-slate.webp");background-position:center;background-size:cover}
.shop-card:nth-child(even),.enemy-team,.sell-dialog{background-color:#4b202c;background-image:linear-gradient(#4d202cb0,#29121ad8),url("assets/ui/panels/merchant-velvet.webp");background-position:center;background-size:cover}
.pack-grid{background-color:#34251c;background-image:linear-gradient(#3a281fa8,#241912c7),url("assets/ui/panels/workbench-leather.webp");background-size:cover}

.abandon-run-button{display:flex;align-items:center;justify-content:center;gap:8px;border-color:#a54b47!important;background:linear-gradient(#63302f,#321b1c)!important;color:#ffd2c5!important}.abandon-run-button img{width:28px;height:28px;object-fit:contain}.abandon-run-button[hidden]{display:none!important}
.abandon-run-modal{position:fixed;z-index:145;inset:0;display:grid;place-items:center;padding:16px;background:#0d1115d8;backdrop-filter:blur(12px)}.abandon-run-modal[hidden]{display:none}.abandon-run-dialog{width:min(100%,460px);padding:28px;border:2px solid #a24e48;border-radius:12px;box-shadow:inset 0 0 0 3px #17120f,0 25px 80px #000b;text-align:center}.abandon-run-dialog>img{width:78px;height:78px}.abandon-run-dialog h2{margin:7px 0;color:#f2dfca;font-family:Georgia,serif;font-size:29px}.abandon-run-dialog p{margin:0 0 20px;color:#d1c0ad;font-size:14px;line-height:1.5}.abandon-run-dialog>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}.abandon-run-dialog button{min-height:50px}

@media(max-width:559px){
  .shop-lock.icon-only-action{width:30px;min-width:30px;height:30px;min-height:30px!important}.shop-lock.icon-only-action img{width:23px;height:23px}
  .lock-action{width:38px;min-width:38px}.lock-action img{width:27px;height:27px}
  .lower-dashboard{grid-template-columns:minmax(0,1fr) minmax(0,.8fr)!important;gap:6px}.lower-dashboard .enemy-card{grid-column:1/-1!important;height:62px!important;min-height:62px!important}.lower-dashboard .enemy-card .fight-action{font-size:14px!important}.fight-action img{width:36px;height:36px}
  .main-menu{align-content:center!important}.menu-hero p,.mode-card p,.mode-card>.eyebrow{display:none}.mode-select{grid-template-columns:1fr 1fr!important}.mode-card{display:flex;min-height:178px!important;padding:15px 10px!important;flex-direction:column;justify-content:flex-end}.mode-card h3{font-size:21px!important}.mode-card .primary-button{min-height:58px!important;font-size:10px!important;white-space:normal}.ranked-mode>img{top:12px!important;right:50%!important;width:58px!important;height:58px!important;transform:translateX(50%)}
  .status-strip>div{border-color:#6d583e!important}.shop-panel,.pack-panel{border-color:#745b3a!important}.shop-card{border-color:#6c593d!important}
  .abandon-run-dialog{padding:22px 16px}.abandon-run-dialog h2{font-size:24px}.abandon-run-dialog p{font-size:13px}.abandon-run-dialog>div{grid-template-columns:1fr}
}

/* v28: flatter hierarchy — one frame per functional area */
.workbench-layout .shop-card,.workbench-layout .shop-card:last-child:nth-child(odd){border:0!important;box-shadow:0 4px 10px #0005!important}
.workbench-layout .shop-card:before,.workbench-layout .shop-card:after{display:none!important}
.workbench-layout .shop-card.shop-locked{outline:1px solid #b98a3f;outline-offset:-1px;box-shadow:0 0 10px #d9a84735!important}
.workbench-layout .shop-card>.footprint{border:0!important;border-radius:3px!important;background:#10171b73!important}
.workbench-layout .shop-card>.stats{padding-top:4px;border-top:1px solid #9b80522e}
.workbench-layout .shop-card>.stats .stat,.pack-panel .stats .stat,.item-info-stats .stat{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.pack-panel .pack-wrap{border:0!important;box-shadow:none!important}
.pack-panel .pack-wrap:before,.pack-panel .pack-wrap:after{display:none!important}
.pack-panel .selected-details{border:0!important;box-shadow:none!important}
.pack-panel .pack-grid{border:1px solid #8d6a3f78!important;box-shadow:inset 0 0 18px #0005!important}
.lower-dashboard .utility-section,.lower-dashboard .recipe-access{border:1px solid #66543d!important;box-shadow:0 5px 12px #0005!important}
.lower-dashboard .reserve-zone,.lower-dashboard .combo-book-button{border:0!important;box-shadow:none!important}
.lower-dashboard .combo-book-button:before{display:none!important}
.lower-dashboard .reserve-card{border:0!important;box-shadow:none!important}
.status-strip>div{box-shadow:none!important}

/* v26: bespoke relic surfaces and generated control artwork */
.topbar,.status-strip>div,.rank-progress,.shop-panel,.shop-card,.utility-section,.reserve-zone,.team,.hero-core,.battle-log,.settings-dialog,.account-dialog,.pause-dialog,.abandon-run-dialog,.enemy-team,.sell-dialog,.pack-panel,.pack-wrap,.pack-grid,.battle-pack,.victory-actions,.battle-result-dialog,.recipes-section,.combo-book-button,.mode-card,.selected-details,.item-info-dialog,.combos-dialog,.lower-dashboard .enemy-card{background-blend-mode:normal!important}
.mode-rank-name{position:absolute;top:84px;right:14px;width:76px;color:#f2cf7b;font:900 11px/1 Georgia,serif;letter-spacing:.08em;text-align:center;text-shadow:0 2px 4px #000;text-transform:uppercase}
.ranked-mode.locked .mode-rank-name{opacity:.55}
.shop-lock.icon-only-action{width:38px;min-width:38px;height:38px;min-height:38px!important;padding:1px!important;background:linear-gradient(145deg,#72552d,#2d2116)!important}
.shop-lock.icon-only-action img{width:34px;height:34px;filter:drop-shadow(0 2px 4px #000a)}
.symbol-button img,.settings-row img{filter:drop-shadow(0 3px 5px #000a)}

.topbar{background-color:#27323a!important;background-image:linear-gradient(90deg,#202a31e8,#2c3941dc,#202a31e8),url("assets/ui/panels/guild-metal-v26.webp")!important;background-position:center!important;background-size:cover!important}
.status-strip>div{background-color:#29343c!important;background-image:linear-gradient(#27343ce3,#1d272eea),url("assets/ui/panels/guild-metal-v26.webp")!important;background-position:center!important;background-size:cover!important}
.status-strip>div:nth-child(2){background-color:#3b3026!important;background-image:linear-gradient(#3e3227e0,#2b241eea),url("assets/ui/panels/relic-leather-v26.webp")!important}
.status-strip>div:nth-child(3){background-color:#3d2930!important;background-image:linear-gradient(#412b33df,#2d2025eb),url("assets/ui/panels/merchant-velvet-v26.webp")!important}
.status-strip>div:nth-child(4),.rank-progress{background-color:#293840!important;background-image:linear-gradient(#2a3941e1,#1e2b32e9),url("assets/ui/panels/guild-metal-v26.webp")!important;background-position:center!important;background-size:cover!important}

.shop-panel,.shop-card,.utility-section,.reserve-zone,.team,.hero-core,.battle-log,.settings-dialog,.account-dialog,.pause-dialog,.abandon-run-dialog{background-color:#2b363d!important;background-image:linear-gradient(#2a373fe0,#1d282fe9),url("assets/ui/panels/guild-metal-v26.webp")!important;background-position:center!important;background-size:cover!important}
.shop-panel{background-color:#3c292f!important;background-image:linear-gradient(#402a32df,#2b2025eb),url("assets/ui/panels/merchant-velvet-v26.webp")!important}
.shop-card:nth-child(even),.enemy-team,.sell-dialog{background-color:#402b32!important;background-image:linear-gradient(#432c34df,#2d2025eb),url("assets/ui/panels/merchant-velvet-v26.webp")!important;background-position:center!important;background-size:cover!important}
.pack-panel,.pack-wrap,.pack-grid,.battle-pack,.victory-actions,.battle-result-dialog{background-color:#3c3026!important;background-image:linear-gradient(#403329de,#2c251fea),url("assets/ui/panels/relic-leather-v26.webp")!important;background-position:center!important;background-size:cover!important}
.recipes-section,.combo-book-button,.mode-card,.selected-details,.item-info-dialog,.combos-dialog{background-color:#2c3940!important;background-image:linear-gradient(#2c3a42e0,#202b32ea),url("assets/ui/panels/guild-metal-v26.webp")!important;background-position:center!important;background-size:cover!important}
.lower-dashboard .enemy-card{background-color:#493725!important;background-image:linear-gradient(90deg,#473522e0,#584128dc,#473522e0),url("assets/ui/panels/relic-leather-v26.webp")!important}

@media(max-width:559px){
  .shop-lock.icon-only-action{width:32px;min-width:32px;height:32px;min-height:32px!important}.shop-lock.icon-only-action img{width:29px;height:29px}
  .mode-rank-name{top:74px;right:50%;width:96px;transform:translateX(50%);font-size:10px}
  .ranked-mode>img{top:10px!important}
  .symbol-button img{width:34px!important;height:34px!important}
}

/* v29: compact battle controls and dedicated run-victory screen */
.battle-head-actions .compact-playback{display:flex;grid-template-columns:none;gap:3px;margin:0;padding:2px;border:0;border-radius:6px;background:#11161bc7}
.battle-head-actions .compact-playback .speed-button,body[data-phase="battle"] .battle-head-actions .compact-playback .speed-button{width:36px;min-width:36px;min-height:34px!important;height:34px;padding:0!important;border-radius:4px;font-size:10px!important;line-height:1}
.battle-head-actions .compact-playback .speed-button.active{border-color:#c49b4f;background:#554326;color:#f5d98c;box-shadow:inset 0 0 0 1px #19130c}
.battle-head-actions .compact-playback .speed-button.stop.active{border-color:#a44d56;background:#51272c;color:#efadb2}
body[data-phase="battle"] .battle-log{display:none}
@media(min-width:900px){body[data-phase="battle"] .battle-pack{height:min(37vh,370px);aspect-ratio:auto}}
.run-victory{position:relative;display:grid;justify-items:center;align-content:center;min-height:calc(100vh - 300px);overflow:hidden;padding:20px 18px 16px;text-align:center}.run-victory[hidden]{display:none!important}.run-victory>*{position:relative;z-index:1}
.run-victory-rays{position:absolute;z-index:0;inset:8% 15%;opacity:.32;background:repeating-conic-gradient(from 0deg,#d9ac4d22 0deg 5deg,transparent 5deg 22.5deg);mask-image:radial-gradient(circle,#000 0 28%,transparent 68%);animation:result-rays 28s linear infinite}
.run-victory-emblem{width:142px;height:142px;object-fit:contain;filter:drop-shadow(0 12px 14px #000b) drop-shadow(0 0 18px #d6aa4a66);animation:result-emblem .9s cubic-bezier(.2,.9,.2,1)}
.run-victory h2{margin:2px 0 6px;color:#f3e3bd;font:700 38px/1.1 Georgia,serif;text-shadow:0 3px #000,0 0 18px #d5a94e66}.run-victory>p{max-width:560px;margin:0 0 16px;color:#c9bdab;font-size:13px;line-height:1.5}
.run-victory-rank{display:grid;grid-template-columns:150px 46px 150px;align-items:center;gap:8px}.run-victory-rank article{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto auto;align-items:center;min-height:76px;padding:7px 12px;border-radius:8px;background:linear-gradient(#2d3a42e8,#1d282ee8),url("assets/ui/panels/guild-metal-v26.webp") center/cover}.run-victory-rank article small{grid-column:2;color:#a88c58;font-size:8px;font-weight:900;letter-spacing:.12em}.run-victory-rank article img{grid-row:1/3;width:58px;height:58px;object-fit:contain}.run-victory-rank article strong{grid-column:2;color:#f0cf7c;font:700 16px Georgia,serif}.run-victory-rank>i{position:relative;height:2px;background:#b98d42}.run-victory-rank>i:after{content:"";position:absolute;right:-2px;top:-5px;border-width:6px 0 6px 9px;border-style:solid;border-color:transparent transparent transparent #d2a44f}
.run-victory-gain{margin:10px 0;color:#efc963;font-size:14px;letter-spacing:.1em}.run-victory-track{display:grid;grid-template-columns:repeat(10,42px);gap:2px}.run-victory-track img{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 3px 4px #0009)}.run-victory-actions{display:grid;grid-template-columns:160px minmax(260px,1fr);gap:10px;width:min(100%,560px);margin-top:15px}.run-victory-actions button{width:100%;min-height:54px;margin:0}
@media(max-width:559px){
  .battle-head{display:grid;grid-template-columns:1fr;align-items:center}.battle-head>div:first-child .eyebrow{display:none}.battle-head h2{font-size:15px!important;white-space:nowrap}.battle-head-actions{justify-content:space-between;width:100%;gap:3px}
  .battle-head-actions .compact-playback{gap:1px;padding:1px}.battle-head-actions .compact-playback .speed-button,body[data-phase="battle"] .battle-head-actions .compact-playback .speed-button{width:27px;min-width:27px;min-height:29px!important;height:29px;font-size:7px!important}
  body[data-phase="battle"] #battleScore{min-width:47px;padding:7px 3px;font-size:10px}.battle-head-actions .small-button{min-height:31px;padding-inline:5px;font-size:6px}
  .run-victory{min-height:calc(100vh - 250px);padding:12px 7px 8px}.run-victory-emblem{width:88px;height:88px}.run-victory h2{font-size:27px}.run-victory>p{margin-bottom:9px;font-size:10px}
  .run-victory-rank{grid-template-columns:1fr 28px 1fr;width:100%;gap:3px}.run-victory-rank article{grid-template-columns:42px 1fr;min-height:60px;padding:4px 5px}.run-victory-rank article img{width:41px;height:41px}.run-victory-rank article small{font-size:5px}.run-victory-rank article strong{font-size:11px}
  .run-victory-gain{margin:7px 0;font-size:9px}.run-victory-track{grid-template-columns:repeat(10,minmax(0,1fr));gap:0;width:100%}.run-victory-track img{width:100%;height:auto}.run-victory-actions{grid-template-columns:1fr 1fr;gap:5px;margin-top:9px}.run-victory-actions button{min-height:46px;padding:4px;font-size:9px}
}

/* v30: frameless shop controls and artwork */
.workbench-layout .reroll,
.workbench-layout .reroll:hover,
.workbench-layout .reroll:active,
.workbench-layout .reroll:focus-visible{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:0!important;
}
.workbench-layout .reroll{padding-inline:3px!important}
.workbench-layout .reroll img{filter:drop-shadow(0 2px 4px #000b)}
.workbench-layout .reroll:hover img:first-child{filter:drop-shadow(0 0 7px #e0ad4c99) drop-shadow(0 2px 4px #000b)}
.workbench-layout .item-image,
.workbench-layout .shop-card:last-child:nth-child(odd) .item-image{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:0!important;
}
.workbench-layout .price{
  min-height:0!important;
  margin-top:4px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:0!important;
}
.workbench-layout .shop-lock.icon-only-action,
.workbench-layout .shop-lock.icon-only-action:hover,
.workbench-layout .shop-lock.icon-only-action:active,
.workbench-layout .shop-lock.icon-only-action:focus-visible{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:0!important;
}
.workbench-layout .shop-lock.icon-only-action img{filter:drop-shadow(0 2px 4px #000b)}
.workbench-layout .shop-lock.icon-only-action:hover img{filter:drop-shadow(0 0 7px #e0ad4c99) drop-shadow(0 2px 4px #000b)}
.workbench-layout .shop-card.shop-locked{outline:0!important;box-shadow:0 4px 10px #0005,0 0 10px #d9a84724!important}

/* v31: character rounds, living relics and borderless backpack pieces */
body[data-phase="shop"] #shopPhase{grid-template-rows:auto minmax(0,1fr) auto!important}
.round-meta{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(230px,.7fr);gap:8px;margin:7px 0 9px;padding:8px 10px;border:1px solid #665139;border-radius:8px;background:linear-gradient(90deg,#28353de8,#352c27e8),url("assets/ui/panels/guild-metal-v26.webp") center/cover;box-shadow:0 5px 15px #0005}
.run-character{display:flex;align-items:center;gap:10px;min-width:0}.run-character>img{width:54px;height:54px;object-fit:cover;object-position:top center;mask-image:linear-gradient(#000 78%,transparent);filter:drop-shadow(0 3px 5px #000b)}.run-character div,.run-character strong,.run-character small{display:block;min-width:0}.run-character strong{margin:2px 0;color:#f0d287;font:700 18px Georgia,serif}.run-character small{overflow:hidden;color:#bdb2a2;font-size:10px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.shop-event-banner{display:grid;align-content:center;padding:4px 10px;border:0;background:radial-gradient(circle at 85% 50%,#c08d3122,transparent 60%)}.shop-event-banner strong{margin:2px 0;color:#f0d287;font:700 16px Georgia,serif}.shop-event-banner small{color:#bdb2a2;font-size:10px;line-height:1.35}.shop-event-banner.event-crossroads strong{color:#bba9ff}.shop-event-banner.event-treasury strong{color:#ffd36d}.shop-event-banner.event-caravan strong{color:#8ed9c6}.rival-mark{position:relative;overflow:hidden}.rival-mark>img{width:100%;height:100%;object-fit:cover;object-position:top;mask-image:linear-gradient(#000 65%,transparent)}.rival-mark>span{position:absolute;bottom:2px;left:0;width:100%;text-align:center;text-shadow:0 1px 3px #000}

/* v32: one character choice for the entire run */
.character-select-phase{display:grid;align-content:center;gap:15px;min-height:0;padding:10px 0 18px}.character-select-phase[hidden]{display:none}.character-select-head{text-align:center}.character-select-head h2{margin:5px 0;color:#f1e4c8;font:700 34px Georgia,serif;text-shadow:0 3px 0 #000}.character-select-head p{margin:0;color:#c8bba7;font-size:14px}
.run-character-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.character-select-card{position:relative;display:grid;justify-items:center;align-content:end;min-height:285px;padding:12px 14px 20px;overflow:hidden;border:1px solid #665139;border-radius:10px;background:linear-gradient(#27333ce5,#161b21f2),url("assets/ui/panels/guild-metal-v26.webp") center/cover;color:#d5c7b1;box-shadow:0 12px 32px #0008;transition:transform .18s,filter .18s,border-color .18s}.character-select-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 30%,#d7a94a20,transparent 54%);opacity:0;transition:opacity .18s}.character-select-card:hover,.character-select-card.active{transform:translateY(-4px);border-color:#d7a94a;filter:brightness(1.12);box-shadow:0 16px 36px #000a,0 0 22px #d7a94a32}.character-select-card.active:before{opacity:1}.character-select-card img{position:absolute;inset:0 0 auto;width:100%;height:225px;object-fit:cover;object-position:top center;mask-image:linear-gradient(#000 68%,transparent 98%);filter:drop-shadow(0 8px 10px #000)}.character-select-card span,.character-select-card strong{position:relative;z-index:1}.character-select-card strong{margin-top:5px;color:#f4deaa;font:700 26px Georgia,serif}.character-select-details{min-height:55px;padding:14px 18px;border-left:3px solid #c89b49;background:linear-gradient(90deg,#2a3947d9,#1c242dd9);color:#e5d8c2;font-size:15px;line-height:1.55;text-align:center}.character-select-actions{display:grid;grid-template-columns:minmax(130px,.35fr) minmax(0,1fr);gap:10px}.character-select-actions button{min-height:54px}
.pack-grid:not(.is-dragging) .grid-cell{border-color:transparent!important;box-shadow:none!important}.pack-grid:not(.is-dragging) .grid-cell:not(.covered){background:transparent!important}.pack-grid:not(.is-dragging) .bag-tile{border-color:transparent!important;box-shadow:none!important}.pack-grid:not(.is-dragging) .bag-tile:after{display:none!important}
.pack-panel .pack-item{overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}.pack-panel .pack-item:before{display:none!important}.pack-panel .pack-item>img{width:112%!important;height:112%!important;max-width:none;object-fit:fill;border:0!important;border-radius:0!important;background:transparent!important;filter:drop-shadow(0 7px 7px #000b)}.pack-panel .pack-item.selected{outline:0!important;filter:drop-shadow(0 0 8px #e8bb55)}
.pack-item.idle-heart>img,.life-track img.active{animation:relic-heartbeat 2.2s ease-in-out infinite}.life-track img.active:nth-child(2){animation-delay:.22s}.life-track img.active:nth-child(3){animation-delay:.44s}.life-track{position:relative;overflow:visible!important}.life-track:before{content:"";position:absolute;z-index:2;left:50%;bottom:-3px;width:4px;height:8px;border-radius:60% 40% 70% 30%;background:#9f2037;box-shadow:0 0 6px #e33b52;opacity:0;animation:heart-drip 4.4s ease-in infinite}.life-track:after{content:"";position:absolute;z-index:3;top:4px;left:7%;width:14px;height:2px;background:linear-gradient(90deg,transparent,#fff6cf,transparent);filter:drop-shadow(0 0 5px #ffd46a);transform:rotate(-32deg);animation:heart-glint 3.2s ease-in-out infinite}.pack-item.idle-solar>img,.pack-item.idle-prism>img{animation:relic-glimmer 3s ease-in-out infinite}.pack-item.idle-soul>img,.pack-item.idle-reliquary>img{animation:relic-trail 2.7s ease-in-out infinite}.pack-item.idle-lightning>img,.pack-item.idle-tempest>img{animation:relic-static 1.8s steps(2,end) infinite}
.shop-card.fusion-opportunity .item-image{animation:recipe-found 1.5s ease-in-out infinite}.recipe-spark{position:absolute;z-index:2;left:8px;top:7px;width:8px;height:8px;border-radius:50%;background:#75f5bd;box-shadow:0 0 6px #75f5bd,0 0 15px #75f5bd}.fusion-partner>img{animation:partner-found .72s ease-in-out infinite alternate!important;filter:drop-shadow(0 0 9px #78f7bc) drop-shadow(0 7px 7px #000b)!important}
.battle-item{border:0!important;background:transparent!important;box-shadow:none!important}.battle-item>img{width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:fill!important;background:transparent!important;filter:drop-shadow(0 6px 6px #000b)}
@keyframes relic-heartbeat{0%,72%,100%{transform:scale(1);filter:drop-shadow(0 3px 4px #000b)}78%{transform:scale(1.12);filter:drop-shadow(0 0 9px #d7334c)}84%{transform:scale(1.03)}90%{transform:scale(1.1);filter:drop-shadow(0 0 12px #ff5670)}}
@keyframes relic-glimmer{0%,100%{filter:drop-shadow(0 5px 6px #000b) brightness(1)}45%{filter:drop-shadow(-7px 0 8px #6adfff88) brightness(1.12)}55%{filter:drop-shadow(8px -3px 10px #f1c65c99) brightness(1.25)}}
@keyframes relic-trail{0%,100%{transform:translateY(0);filter:drop-shadow(0 5px 6px #000b)}50%{transform:translateY(-3px);filter:drop-shadow(0 9px 9px #52e8c888)}}
@keyframes relic-static{0%,92%,100%{filter:drop-shadow(0 5px 6px #000b)}94%{filter:drop-shadow(-5px 0 6px #56dfff) brightness(1.45)}97%{filter:drop-shadow(5px -2px 8px #c09aff) brightness(1.2)}}
@keyframes heart-drip{0%,62%{opacity:0;transform:translateY(-5px) scale(.6)}68%{opacity:.9}82%{opacity:.75;transform:translateY(10px) scale(1)}90%,100%{opacity:0;transform:translateY(18px) scale(.45)}}@keyframes heart-glint{0%,28%,100%{opacity:0;transform:translateX(0) rotate(-32deg)}42%{opacity:1}58%{opacity:0;transform:translateX(150px) rotate(-32deg)}}
@keyframes recipe-found{0%,100%{filter:drop-shadow(0 3px 5px #000b)}50%{filter:drop-shadow(0 0 11px #70efb8) brightness(1.2)}}@keyframes partner-found{to{transform:scale(1.08);filter:drop-shadow(0 0 14px #7fffc8) brightness(1.3)}}
@media(max-width:559px){
  .round-meta{grid-template-columns:minmax(0,1fr) 118px;padding:4px 5px;gap:3px}.run-character{gap:4px}.run-character>img{width:36px;height:36px}.run-character .eyebrow{display:none}.run-character strong{font-size:12px}.run-character small{max-width:150px;font-size:7px}.shop-event-banner{display:grid;align-content:center;padding:2px 4px}.shop-event-banner .eyebrow{display:none}.shop-event-banner strong{font-size:9px;line-height:1.05}.shop-event-banner small{font-size:6px;line-height:1.2}
  .character-select-phase{gap:10px;padding:3px 0 8px}.character-select-head h2{font-size:25px}.character-select-head p{font-size:12px}.run-character-choices{gap:5px}.character-select-card{min-height:215px;padding:8px 3px 14px}.character-select-card img{height:170px}.character-select-card .eyebrow{font-size:7px}.character-select-card strong{font-size:18px}.character-select-details{min-height:67px;padding:10px 9px;font-size:12px}.character-select-actions{grid-template-columns:92px minmax(0,1fr);gap:6px}.character-select-actions button{min-height:48px;padding-inline:6px;font-size:9px}
  .pack-panel .pack-item>img{width:118%!important;height:118%!important}
}
@media(prefers-reduced-motion:reduce){.pack-item>img,.life-track img,.life-track:before,.life-track:after,.shop-card.fusion-opportunity .item-image,.fusion-partner>img{animation:none!important}}

/* v33: restrained ambient motion, darker materials and proportional item artwork */
body{background:radial-gradient(ellipse at 50% 10%,#17202acc 0,#0b1017e8 36rem,#04070bf8 78rem)!important}
body:before{opacity:.34!important;filter:brightness(.62) saturate(.78)}
.topbar{background-color:#182129!important;background-image:linear-gradient(90deg,#151d24f2,#202a31ed,#151d24f2),url("assets/ui/panels/guild-metal-v26.webp")!important}
.status-strip>div{background-color:#1c252b!important;background-image:linear-gradient(#1c272eea,#121a20f2),url("assets/ui/panels/guild-metal-v26.webp")!important}.status-strip>div:nth-child(2){background-color:#2b231d!important;background-image:linear-gradient(#2d251fec,#1c1815f3),url("assets/ui/panels/relic-leather-v26.webp")!important}.status-strip>div:nth-child(3){background-color:#2d1d23!important;background-image:linear-gradient(#311f26eb,#1f1519f3),url("assets/ui/panels/merchant-velvet-v26.webp")!important}.status-strip>div:nth-child(4),.rank-progress{background-color:#1b272e!important;background-image:linear-gradient(#1c2930ec,#121b21f3),url("assets/ui/panels/guild-metal-v26.webp")!important}
.shop-panel,.shop-card,.utility-section,.reserve-zone,.team,.hero-core,.battle-log,.settings-dialog,.account-dialog,.pause-dialog,.abandon-run-dialog{background-color:#202a30!important;background-image:linear-gradient(#202b32ed,#151d22f5),url("assets/ui/panels/guild-metal-v26.webp")!important}.shop-panel{background-color:#2d1d23!important;background-image:linear-gradient(#301f26ec,#20161af5),url("assets/ui/panels/merchant-velvet-v26.webp")!important}.shop-card:nth-child(even),.enemy-team,.sell-dialog{background-color:#2c1c22!important;background-image:linear-gradient(#301e25ed,#1d1418f5),url("assets/ui/panels/merchant-velvet-v26.webp")!important}.pack-panel,.pack-wrap,.pack-grid,.battle-pack,.victory-actions,.battle-result-dialog{background-color:#2c231d!important;background-image:linear-gradient(#2e251fed,#1d1815f5),url("assets/ui/panels/relic-leather-v26.webp")!important}.recipes-section,.combo-book-button,.mode-card,.selected-details,.item-info-dialog,.combos-dialog,.character-select-card,.character-select-details{background-color:#202a31!important;background-image:linear-gradient(#202c33ed,#151e24f5),url("assets/ui/panels/guild-metal-v26.webp")!important}

.pack-panel .pack-item>img,.battle-item>img{width:100%!important;height:100%!important;max-width:none!important;object-fit:cover!important;object-position:center!important;border:0!important;border-radius:0!important;background:transparent!important;filter:drop-shadow(0 6px 7px #000b);animation:item-ambient 7.2s ease-in-out infinite!important}.pack-panel .pack-item.is-rotated>img,.battle-item.is-rotated>img{transform:rotate(90deg)}.pack-panel .pack-item.w-2.h-1.is-rotated>img,.battle-item.w-2.h-1.is-rotated>img{width:50%!important;height:200%!important}.pack-panel .pack-item.w-1.h-2.is-rotated>img,.battle-item.w-1.h-2.is-rotated>img{width:200%!important;height:50%!important}
.life-track:before,.life-track:after{display:none!important}.life-track img.active{animation:heart-calm-glow 6.2s ease-in-out infinite!important}.life-track img.active:nth-child(2){animation-delay:-2.1s!important}.life-track img.active:nth-child(3){animation-delay:-4.2s!important}.relic-track:not(.life-track) img{animation:victory-ambient 8s ease-in-out infinite}.relic-track:not(.life-track) img:nth-child(3n+2){animation-delay:-2.6s}.relic-track:not(.life-track) img:nth-child(3n){animation-delay:-5.2s}
.gold-status .status-label img,.price img{animation:gold-ambient 6.8s ease-in-out infinite}.rank-value img,.ranked-mode>img{animation:rank-ambient 7.6s ease-in-out infinite}.brand img,.character-select-card img,.run-character>img,.rival-mark>img{animation:portrait-ambient 8.4s ease-in-out infinite}.shop-card .item-image,.reserve-card>img,.recipe-flow img,.enemy-preview img,.item-info-hero img{animation:item-ambient 7.2s ease-in-out infinite}.symbol-button img,.symbol-action img,.shop-lock img,.heading-with-symbol>img,.fight-action img{animation:control-ambient 7s ease-in-out infinite}
@keyframes heart-calm-glow{0%,100%{filter:drop-shadow(0 3px 4px #000b) drop-shadow(0 0 2px #8b1d33) brightness(1)}50%{filter:drop-shadow(0 3px 4px #000b) drop-shadow(0 0 13px #df3e58) brightness(1.12)}}
@keyframes victory-ambient{0%,100%{filter:grayscale(.8) brightness(.62) drop-shadow(0 2px 3px #000b)}50%{filter:grayscale(.65) brightness(.78) drop-shadow(0 0 7px #c8a35a55)}}
.relic-track:not(.life-track) img.active{animation-name:victory-active-ambient;opacity:1}@keyframes victory-active-ambient{0%,100%{filter:drop-shadow(0 2px 4px #000b) brightness(.95)}50%{filter:drop-shadow(0 0 10px #d5ac5e88) brightness(1.12)}}
@keyframes gold-ambient{0%,100%{filter:drop-shadow(0 2px 4px #000a) brightness(.96)}50%{filter:drop-shadow(0 0 9px #f1bd4a88) brightness(1.14)}}@keyframes rank-ambient{0%,100%{filter:drop-shadow(0 4px 6px #000b) brightness(.94)}50%{filter:drop-shadow(0 0 12px #b68cff66) brightness(1.1)}}@keyframes portrait-ambient{0%,100%{filter:drop-shadow(0 5px 7px #000b) brightness(.95)}50%{filter:drop-shadow(0 5px 9px #c79c4f44) brightness(1.06)}}@keyframes item-ambient{0%,100%{filter:drop-shadow(0 6px 7px #000b) brightness(.96)}50%{filter:drop-shadow(0 6px 9px #d2aa6255) brightness(1.08)}}@keyframes control-ambient{0%,100%{filter:drop-shadow(0 2px 4px #000b) brightness(.95)}50%{filter:drop-shadow(0 0 7px #d9ac5d66) brightness(1.08)}}

@media(min-width:900px){.workbench-layout .shop-card>.footprint{margin-top:3px!important;padding:2px 4px!important}.workbench-layout .shop-card>.stats{margin-top:3px!important;padding-top:2px!important}.workbench-layout .shop-card>.stats .stat{min-height:30px!important;padding:1px!important}.workbench-layout .shop-card>.stats .stat b{line-height:1!important}.workbench-layout .shop-card>.stats .stat small{height:16px!important}.workbench-layout .shop-card>.stats .stat small img{width:16px!important;height:16px!important}.workbench-layout .shop-card .set-badge{margin-block:2px!important}}
@media(prefers-reduced-motion:reduce){.life-track img,.relic-track img,.gold-status img,.price img,.rank-value img,.ranked-mode>img,.brand img,.character-select-card img,.run-character>img,.rival-mark>img,.shop-card .item-image,.reserve-card>img,.recipe-flow img,.enemy-preview img,.item-info-hero img,.pack-item>img,.battle-item>img,.symbol-button img,.symbol-action img,.shop-lock img,.heading-with-symbol>img,.fight-action img{animation:none!important}}

/* v34: silhouette footprints and distortion-free item art */
.pack-panel .pack-item{pointer-events:none!important}
.pack-panel .pack-item>img,.battle-item>img{inset:0;margin:auto!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;pointer-events:none!important}
.pack-panel .pack-item.is-rotated>img,.battle-item.is-rotated>img{transform:rotate(90deg)}
.pack-panel .pack-item.is-rotated.base-1x2>img,.battle-item.is-rotated.base-1x2>img{width:50%!important;height:200%!important}
.pack-panel .pack-item.is-rotated.base-1x3>img,.battle-item.is-rotated.base-1x3>img{width:33.333%!important;height:300%!important}
.pack-panel .pack-item.is-rotated.base-2x1>img,.battle-item.is-rotated.base-2x1>img{width:200%!important;height:50%!important}
.pack-panel .pack-item.is-rotated.base-3x1>img,.battle-item.is-rotated.base-3x1>img{width:300%!important;height:33.333%!important}
.pack-panel .pack-item.is-rotated.base-2x3>img,.battle-item.is-rotated.base-2x3>img{width:66.667%!important;height:150%!important}
.pack-panel .pack-item.is-rotated.base-3x2>img,.battle-item.is-rotated.base-3x2>img{width:150%!important;height:66.667%!important}
.item-hit-cell{position:absolute;z-index:3;display:block;pointer-events:auto;touch-action:none;background:transparent}
.pack-item.w-1 .item-hit-cell{width:100%}.pack-item.w-2 .item-hit-cell{width:50%}.pack-item.w-3 .item-hit-cell{width:33.3334%}
.pack-item.h-1 .item-hit-cell{height:100%}.pack-item.h-2 .item-hit-cell{height:50%}.pack-item.h-3 .item-hit-cell{height:33.3334%}
.pack-item .item-hit-cell.sx-0{left:0}.pack-item.w-2 .item-hit-cell.sx-1{left:50%}.pack-item.w-3 .item-hit-cell.sx-1{left:33.3333%}.pack-item.w-3 .item-hit-cell.sx-2{left:66.6666%}
.pack-item .item-hit-cell.sy-0{top:0}.pack-item.h-2 .item-hit-cell.sy-1{top:50%}.pack-item.h-3 .item-hit-cell.sy-1{top:33.3333%}.pack-item.h-3 .item-hit-cell.sy-2{top:66.6666%}
.pack-item .item-lock-badge{pointer-events:none!important}
.item-footprint.shape-w-3{grid-template-columns:repeat(3,10px)}.item-footprint.shape-h-3{grid-template-rows:repeat(3,10px)}

/* CSP-safe runtime geometry. */
.pct-0{width:0%!important}.pct-1{width:1%!important}.pct-2{width:2%!important}.pct-3{width:3%!important}.pct-4{width:4%!important}.pct-5{width:5%!important}.pct-6{width:6%!important}.pct-7{width:7%!important}.pct-8{width:8%!important}.pct-9{width:9%!important}.pct-10{width:10%!important}.pct-11{width:11%!important}.pct-12{width:12%!important}.pct-13{width:13%!important}.pct-14{width:14%!important}.pct-15{width:15%!important}.pct-16{width:16%!important}.pct-17{width:17%!important}.pct-18{width:18%!important}.pct-19{width:19%!important}.pct-20{width:20%!important}.pct-21{width:21%!important}.pct-22{width:22%!important}.pct-23{width:23%!important}.pct-24{width:24%!important}.pct-25{width:25%!important}.pct-26{width:26%!important}.pct-27{width:27%!important}.pct-28{width:28%!important}.pct-29{width:29%!important}.pct-30{width:30%!important}.pct-31{width:31%!important}.pct-32{width:32%!important}.pct-33{width:33%!important}.pct-34{width:34%!important}.pct-35{width:35%!important}.pct-36{width:36%!important}.pct-37{width:37%!important}.pct-38{width:38%!important}.pct-39{width:39%!important}.pct-40{width:40%!important}.pct-41{width:41%!important}.pct-42{width:42%!important}.pct-43{width:43%!important}.pct-44{width:44%!important}.pct-45{width:45%!important}.pct-46{width:46%!important}.pct-47{width:47%!important}.pct-48{width:48%!important}.pct-49{width:49%!important}.pct-50{width:50%!important}.pct-51{width:51%!important}.pct-52{width:52%!important}.pct-53{width:53%!important}.pct-54{width:54%!important}.pct-55{width:55%!important}.pct-56{width:56%!important}.pct-57{width:57%!important}.pct-58{width:58%!important}.pct-59{width:59%!important}.pct-60{width:60%!important}.pct-61{width:61%!important}.pct-62{width:62%!important}.pct-63{width:63%!important}.pct-64{width:64%!important}.pct-65{width:65%!important}.pct-66{width:66%!important}.pct-67{width:67%!important}.pct-68{width:68%!important}.pct-69{width:69%!important}.pct-70{width:70%!important}.pct-71{width:71%!important}.pct-72{width:72%!important}.pct-73{width:73%!important}.pct-74{width:74%!important}.pct-75{width:75%!important}.pct-76{width:76%!important}.pct-77{width:77%!important}.pct-78{width:78%!important}.pct-79{width:79%!important}.pct-80{width:80%!important}.pct-81{width:81%!important}.pct-82{width:82%!important}.pct-83{width:83%!important}.pct-84{width:84%!important}.pct-85{width:85%!important}.pct-86{width:86%!important}.pct-87{width:87%!important}.pct-88{width:88%!important}.pct-89{width:89%!important}.pct-90{width:90%!important}.pct-91{width:91%!important}.pct-92{width:92%!important}.pct-93{width:93%!important}.pct-94{width:94%!important}.pct-95{width:95%!important}.pct-96{width:96%!important}.pct-97{width:97%!important}.pct-98{width:98%!important}.pct-99{width:99%!important}.pct-100{width:100%!important}
.preview-x-0{grid-column:1}.preview-x-1{grid-column:2}.preview-x-2{grid-column:3}.preview-x-3{grid-column:4}.preview-x-4{grid-column:5}.preview-x-5{grid-column:6}
.preview-y-0{grid-row:1}.preview-y-1{grid-row:2}.preview-y-2{grid-row:3}.preview-y-3{grid-row:4}.preview-y-4{grid-row:5}
.combat-float.float-left{--float-x:-22px}.combat-float.float-center{--float-x:0px}.combat-float.float-right{--float-x:22px}

/* v36: deterministic rotated artwork and touch-first rotation controls */
.pack-panel .pack-item>img,.battle-item>img{
  position:absolute!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  left:50%!important;
  margin:0!important;
  transform:translate(-50%,-50%);
  transform-origin:50% 50%!important;
}
.pack-panel .pack-item.is-rotated>img,.battle-item.is-rotated>img{transform:translate(-50%,-50%) rotate(90deg)}
.item-info-rotate{display:none;align-items:center;justify-content:center;gap:9px;width:100%;margin-top:12px;min-height:50px!important;border-color:#a67d3e!important;background:linear-gradient(#4a3820,#241b12)!important;color:#f0d28a!important}
.item-info-rotate img{width:30px;height:30px;object-fit:contain;filter:drop-shadow(0 2px 4px #000a)}
.item-info-rotate[hidden]{display:none!important}
@media(max-width:559px){
  .item-info-rotate{display:flex}
  .combos-modal{place-items:start center!important;padding:calc(env(safe-area-inset-top) + 56px) 0 max(6px,env(safe-area-inset-bottom))!important}
  .combos-dialog{height:calc(100dvh - env(safe-area-inset-top) - 56px)!important;max-height:calc(100dvh - env(safe-area-inset-top) - 56px)!important;border-radius:12px 12px 0 0!important}
  .combo-book{max-height:calc(100dvh - env(safe-area-inset-top) - 220px)!important}
}

/* v35: startup presentation, compact mobile workbench and visible battle characters */
body.startup-active{overflow:hidden}
.startup-overlay{position:fixed;z-index:99999;inset:0;display:grid;place-items:center;overflow:hidden;background:#080d13;color:#eee2cc;font-family:Georgia,serif;transition:opacity .55s ease,visibility .55s ease}.startup-overlay:before{content:"";position:absolute;inset:-20%;background:radial-gradient(circle at 50% 46%,#263642 0,#111a22 23%,#080d13 54%,#04070b 76%)}.startup-overlay.is-complete{opacity:0;visibility:hidden;pointer-events:none}.startup-stage{position:relative;display:grid;place-items:center;width:min(82vw,360px);text-align:center}.startup-stage img{display:block;width:min(54vw,230px);height:min(54vw,230px);object-fit:contain}.startup-stage strong{margin-top:12px;color:#e3bf72;font-size:clamp(25px,7vw,39px);letter-spacing:.16em;text-shadow:0 3px #000,0 0 22px #b6792d55}.startup-stage span{margin-top:8px;color:#8fa3ae;font:800 10px system-ui,sans-serif;letter-spacing:.32em}.startup-game{display:none}.startup-overlay[data-stage="game"] .startup-studio{display:none}.startup-overlay[data-stage="game"] .startup-game{display:grid}.startup-game img{filter:drop-shadow(0 18px 24px #000b)}.startup-progress{position:relative;width:min(64vw,250px);height:3px;margin-top:22px;overflow:hidden;background:#29343b}.startup-progress i{position:absolute;inset:0 auto 0 0;width:42%;background:linear-gradient(90deg,transparent,#d7a84f,#fff1b5,#d7a84f,transparent);animation:startupSweep 1.1s ease-in-out infinite}.startup-studio img{animation:studioReveal .8s cubic-bezier(.2,.9,.2,1),studioGlow 2.5s ease-in-out .8s infinite}.startup-game img{animation:loaderFloat 2.2s ease-in-out infinite}@keyframes startupSweep{from{transform:translateX(-120%)}to{transform:translateX(340%)}}@keyframes studioReveal{from{opacity:0;transform:scale(.72) rotate(-8deg);filter:brightness(2)}to{opacity:1;transform:none}}@keyframes studioGlow{50%{filter:drop-shadow(0 0 20px #d89d3f88)}}@keyframes loaderFloat{50%{transform:translateY(-5px);filter:drop-shadow(0 22px 28px #d2923438)}}@media(prefers-reduced-motion:reduce){.startup-stage img,.startup-progress i{animation:none}}
.team-identity{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;margin:0 0 7px;color:#d9bd82;text-align:left}
.team-identity>img{width:46px;height:46px;object-fit:cover;object-position:top center;mask-image:linear-gradient(#000 72%,transparent);filter:drop-shadow(0 4px 6px #000b)}
.team-identity>div{min-width:0}.team-identity small{display:block;margin-bottom:2px;color:#8f8a80;font:900 8px/1.1 system-ui,sans-serif;letter-spacing:.12em}.team-identity h3{margin:0!important;text-align:left!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.enemy-team .team-identity{color:#d9a8b5}
.lower-dashboard .enemy-card{display:grid!important;grid-template-columns:58px minmax(0,1fr)!important;gap:4px!important}
.lower-dashboard .enemy-card .rival-mark{display:grid!important;width:58px!important;height:100%!important;border:0!important;border-radius:5px!important;background:transparent!important}
.lower-dashboard .enemy-card .rival-mark span{display:none!important}.lower-dashboard .enemy-card .rival-mark img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:top center!important}
.lower-dashboard .enemy-card .fight-action{grid-column:2!important}

@media(max-width:599px){
  body{padding:max(5px,env(safe-area-inset-top)) 6px max(8px,env(safe-area-inset-bottom))!important}
  .app-shell{width:100%!important}
  .topbar{min-height:54px!important;margin-bottom:5px!important;padding:4px 5px 7px!important}
  .brand{gap:5px!important}.brand img,body[data-phase="shop"] .brand img{width:41px!important;height:41px!important}.brand h1,body[data-phase="shop"] .brand h1{font-size:18px!important;white-space:nowrap}.brand p,.brand-kicker{display:none!important}
  .header-actions{gap:3px!important}.account-trigger{min-width:58px!important;max-width:82px;min-height:39px!important;padding:0 6px!important;overflow:hidden;font-size:8px!important;text-overflow:ellipsis}.symbol-button{width:39px!important;min-width:39px!important;height:39px!important;min-height:39px!important}.symbol-button img{width:31px!important;height:31px!important}
  .status-strip{grid-template-columns:1.62fr .7fr .83fr 1fr!important;margin:0 0 4px!important;padding:2px!important}.status-strip>div,body[data-phase="shop"] .status-strip>div{min-height:66px!important;padding:2px 1px!important}.status-label{font-size:7px!important}.status-label img{width:20px!important;height:20px!important}.status-strip strong{min-height:24px!important;margin-top:1px!important;font-size:13px!important}.relic-track{grid-template-columns:repeat(5,minmax(14px,1fr))!important;padding:0!important}.relic-track img{max-width:22px!important}.life-track{grid-template-columns:repeat(3,23px)!important}.life-track img{width:23px!important}.rank-value img{width:31px!important;height:31px!important}.rank-value span{font-size:10px!important}
  .rank-progress{margin:0 0 6px!important;padding:4px 6px!important}.rank-progress>div{font-size:7px!important}

  .main-menu{min-height:calc(100dvh - 147px)!important;align-content:center!important;padding:8px 4px 12px!important}.menu-hero{margin-bottom:8px}.menu-hero>img{width:112px!important;height:112px!important}.menu-hero h2{margin:0!important;font-size:29px!important}.menu-hero .eyebrow,.menu-hero p{display:none!important}.mode-select{gap:7px!important}.mode-card{min-height:182px!important;padding:10px 8px!important}.mode-card h3{font-size:19px!important}.mode-card .primary-button{min-height:54px!important;padding:4px!important;font-size:9px!important}.ranked-mode{padding-top:103px!important}.ranked-mode h3{position:absolute;top:10px;left:10px;margin:0}.ranked-mode>img{top:35px!important;width:51px!important;height:51px!important}.mode-rank-name{top:84px!important;font-size:9px!important}

  body[data-phase="shop"] #shopPhase{display:block!important;min-height:0!important}
  .round-meta{height:48px;margin:4px 0 5px!important;padding:2px 5px!important}.run-character>img{width:40px!important;height:40px!important}.run-character strong{font-size:12px!important}.run-character small{font-size:8px!important}.shop-event-banner strong{font-size:10px!important}.shop-event-banner small{font-size:7px!important}
  .workbench-layout{display:flex!important;flex-direction:column;gap:5px!important}
  .shop-panel{min-height:0!important;height:110px!important;padding:4px 5px!important;overflow:visible!important}
  .workbench-layout .shop-panel .section-heading{display:flex!important;height:25px;margin:0!important;padding-left:7px!important;text-align:left!important}.workbench-layout .shop-panel .section-heading:before{height:20px!important}.workbench-layout .shop-panel .heading-with-symbol{gap:4px!important}.workbench-layout .shop-panel .heading-with-symbol>img{width:25px!important;height:25px!important}.workbench-layout .shop-panel .section-heading h2{font-size:13px!important}.workbench-layout .shop-panel .reroll{width:auto!important;min-width:58px!important;height:26px!important}.workbench-layout .shop-panel .reroll img{width:23px!important;height:23px!important}
  .workbench-layout .shop{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:1fr!important;gap:3px!important;height:74px!important;margin:3px 0 0!important;padding:0!important;overflow:visible!important}
  .workbench-layout .shop-card,.workbench-layout .shop-card:last-child:nth-child(odd){display:grid!important;grid-column:auto!important;place-items:center;width:100%!important;height:74px!important;padding:2px!important;overflow:visible!important}.workbench-layout .shop-top,.workbench-layout .shop-card:last-child:nth-child(odd) .shop-top{display:block!important;width:100%!important;height:100%!important}.workbench-layout .shop-top>div{display:none!important}.workbench-layout .item-image,.workbench-layout .shop-card:last-child:nth-child(odd) .item-image{width:100%!important;height:70px!important;object-fit:contain!important}.workbench-layout .shop-lock.icon-only-action{top:-2px!important;right:-1px!important;width:26px!important;min-width:26px!important;height:26px!important;min-height:26px!important}.workbench-layout .shop-lock.icon-only-action img{width:25px!important;height:25px!important}.recipe-spark{top:3px!important;left:3px!important}
  .pack-panel{--cell:min(calc((100vw - 30px)/6),50px)!important;padding:5px!important}.pack-toolbar{min-height:34px!important;margin-bottom:3px!important;padding-left:8px!important}.pack-toolbar:before{height:24px!important}.workbench-layout .pack-toolbar h2{font-size:18px!important}.workbench-layout .pack-toolbar .eyebrow{display:none}.workbench-layout .pack-toolbar .small-button{min-height:34px!important;padding:0 7px!important;font-size:8px!important}.lock-action{width:34px!important;min-width:34px!important}.lock-action img{width:26px!important;height:26px!important}
  .pack-panel .pack-wrap{display:block!important;padding:4px!important}.pack-panel .pack-grid{width:calc(var(--cell)*6 + 14px)!important;margin-inline:auto}.pack-panel .selected-details{display:none!important;height:auto!important;min-height:54px!important;margin:4px 0 0!important;padding:7px!important}.pack-panel .selected-details.has-selection{display:block!important}.pack-panel .detail-object{grid-template-columns:46px 1fr!important}.pack-panel .detail-object img{width:46px!important;height:46px!important}.pack-panel .detail-copy{max-height:34px!important;overflow:hidden}.pack-panel .stats{margin-top:4px!important}.pack-panel .stat{min-height:34px!important}
  .lower-dashboard{position:relative;display:grid!important;grid-template-columns:1fr .72fr!important;gap:4px!important;margin-top:0!important;padding-bottom:63px}.lower-dashboard .utility-section,.lower-dashboard .recipe-access{height:58px!important;min-height:58px!important;padding:3px!important}.lower-dashboard .subheading{display:none!important}.lower-dashboard .reserve-zone,.lower-dashboard .combo-book-button{height:50px!important;min-height:50px!important}.lower-dashboard .zone-head{display:none!important}.lower-dashboard .reserve-list{padding:2px!important}.lower-dashboard .reserve-card{flex-basis:45px!important}.lower-dashboard .reserve-card img{width:39px!important;height:39px!important}.lower-dashboard .combo-book-button{padding:5px!important}.lower-dashboard .combo-book-button span small{display:none!important}.lower-dashboard .combo-book-button strong{font-size:10px!important}.lower-dashboard .combo-book-button b{font-size:7px!important}
  .lower-dashboard .enemy-card{position:absolute;right:0;bottom:0;left:0;height:59px!important;min-height:59px!important}.lower-dashboard .enemy-card .fight-action{font-size:15px!important}

  body[data-phase="battle"]{padding-bottom:0!important;overflow:hidden}body[data-phase="battle"] .status-strip,body[data-phase="battle"] .rank-progress{display:none!important}
  body[data-phase="battle"] .topbar{margin-bottom:4px!important}body[data-phase="battle"] .battle-phase{display:flex!important;min-height:calc(100dvh - 64px);padding-top:0!important;flex-direction:column;justify-content:center}.battle-head{grid-template-columns:minmax(0,1fr) auto!important;gap:4px!important;margin:0 0 5px!important;padding-left:7px!important}.battle-head>div:first-child{display:none!important}.battle-head-actions{justify-content:flex-end!important}.battle-head-actions .compact-playback .speed-button,body[data-phase="battle"] .battle-head-actions .compact-playback .speed-button{width:32px!important;min-width:32px!important;height:34px!important;min-height:34px!important;font-size:9px!important}body[data-phase="battle"] #battleScore{min-width:54px!important;font-size:10px!important}.battle-head-actions .small-button{min-height:34px!important;font-size:8px!important}
  .battle-phase .teams{gap:4px!important}.battle-phase .team{padding:4px!important}.team-identity{justify-content:flex-start;gap:4px;min-height:40px;margin-bottom:3px}.team-identity>img{width:38px;height:38px}.team-identity small{font-size:6px}.team-identity h3{max-width:126px;font-size:8px!important;letter-spacing:.06em!important}.hero-core{padding:5px!important}.hero-values{margin-bottom:3px!important}.hero-values strong{font-size:8px!important}.hero-values b{font-size:7px!important}.hero-bar{height:9px!important}.battle-pack{border-width:1px!important}.battle-sets{min-height:23px!important;margin-top:3px!important}.battle-sets span{font-size:6px!important}.combat-legend{margin:6px 0 2px!important;padding:4px!important}.combat-legend img{width:28px!important;height:28px!important}
}

/* v37: four-way item rotation and a usable mobile reserve tray */
.pack-panel .pack-item.rotation-0>img,.battle-item.rotation-0>img{transform:translate(-50%,-50%) rotate(0deg)}
.pack-panel .pack-item.rotation-1>img,.battle-item.rotation-1>img{transform:translate(-50%,-50%) rotate(90deg)}
.pack-panel .pack-item.rotation-2>img,.battle-item.rotation-2>img{width:100%!important;height:100%!important;transform:translate(-50%,-50%) rotate(180deg)}
.pack-panel .pack-item.rotation-3>img,.battle-item.rotation-3>img{transform:translate(-50%,-50%) rotate(270deg)}
@media(max-width:599px){
  .lower-dashboard .reserve-zone{display:block!important;width:100%!important;height:54px!important;min-height:54px!important;padding:3px!important;overflow:hidden!important}
  .lower-dashboard .reserve-list{display:flex!important;width:100%!important;height:48px!important;min-height:48px!important;padding:0!important;gap:4px!important;align-items:center!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .lower-dashboard .reserve-card{display:grid!important;place-items:center!important;flex:0 0 46px!important;width:46px!important;height:46px!important;padding:1px!important;overflow:visible!important;scroll-snap-align:start}
  .lower-dashboard .reserve-card>img{width:43px!important;height:43px!important;max-width:none!important;object-fit:contain!important;background:transparent!important}
  .lower-dashboard .reserve-card>span,.lower-dashboard .reserve-card>small{display:none!important}
  .lower-dashboard .reserve-empty{display:grid!important;place-items:center;width:100%;height:46px;padding:0!important}
}

/* v38: direct Android download on the mobile website */
.mobile-apk-download{display:none}
@media(max-width:599px){
  .mobile-apk-download{display:flex;align-items:center;justify-content:center;gap:11px;width:min(100%,330px);min-height:58px;margin:7px auto 0;padding:6px 18px;border:1px solid #a67b3d;border-radius:9px;background:linear-gradient(135deg,#26333b,#172129 58%,#2b2118);color:#ead49e;box-shadow:inset 0 1px #fff2bd24,0 7px 18px #0008;text-decoration:none}
  .mobile-apk-download>img{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 4px 5px #000b)}
  .mobile-apk-download>strong{font:800 14px/1 system-ui,sans-serif;letter-spacing:.08em}
  .mobile-apk-download>span{color:#c69a4d;font:900 9px/1 system-ui,sans-serif;letter-spacing:.14em}
  body.android-app .mobile-apk-download{display:none}
}

/* v42: hold-to-drag and second-finger 90-degree rotation on touch screens */
.mobile-hold-info{display:none}
@media(max-width:599px){
  #rotateButton,.item-info-rotate{display:none!important}
  .mobile-hold-info{position:fixed;z-index:1250;top:max(70px,calc(env(safe-area-inset-top) + 58px));left:50%;display:grid;width:min(calc(100vw - 24px),340px);min-height:94px;padding:10px;grid-template-columns:72px minmax(0,1fr);gap:10px;align-items:center;transform:translateX(-50%);border:1px solid #a47a3d;border-radius:11px;background:linear-gradient(145deg,#26343ceF,#111a21f5 70%);color:#eee2c8;box-shadow:inset 0 1px #fff3c21f,0 10px 30px #000c,0 0 20px #b77b2926;pointer-events:none;animation:mobileHoldInfoIn .18s ease-out}
  .mobile-hold-info>img{width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 5px 6px #000c)}
  .mobile-hold-info>div{min-width:0}.mobile-hold-info strong{display:block;color:#f0d596;font:800 16px/1.1 Georgia,serif}.mobile-hold-info p{display:-webkit-box;margin:6px 0 5px;overflow:hidden;color:#c5c8c7;font:600 11px/1.35 system-ui,sans-serif;-webkit-line-clamp:2;-webkit-box-orient:vertical}.mobile-hold-info span{color:#d3a650;font:900 10px/1 system-ui,sans-serif;letter-spacing:.08em}
  .drag-ghost.rotation-0>img{transform:rotate(0deg)}.drag-ghost.rotation-1>img{transform:rotate(90deg)}.drag-ghost.rotation-2>img{transform:rotate(180deg)}.drag-ghost.rotation-3>img{transform:rotate(270deg)}
}
@keyframes mobileHoldInfoIn{from{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%,0)}}

/* v40: keep the shop locked until every combat asset is decoded */
body.battle-preloading .workbench-layout,body.battle-preloading .lower-dashboard{pointer-events:none}
.fight-action.is-loading{filter:saturate(.7);cursor:wait!important}
.fight-action.is-loading>img{animation:battleAssetSpin 1.1s linear infinite}
@keyframes battleAssetSpin{to{transform:rotate(360deg)}}

/* v43: cleaner recipes, storage guidance and a guaranteed fight action */
.round-meta{grid-template-columns:1fr!important}.shop-event-banner{display:none!important}
.reserve-zone{grid-template-columns:1fr!important}.reserve-empty{display:grid!important;place-items:center!important;width:100%;height:100%;color:#b7a77f!important;font:800 clamp(9px,1vw,13px)/1.2 Georgia,serif!important;letter-spacing:.12em;text-align:center;animation:storageWhisper 3.8s ease-in-out infinite}
@keyframes storageWhisper{0%,100%{opacity:.3;filter:drop-shadow(0 0 0 transparent)}50%{opacity:.82;filter:drop-shadow(0 0 7px #c8954355)}}
.recipe{border:0!important;border-left:4px solid var(--recipe-owner,#776f61)!important;border-radius:4px!important;box-shadow:none!important}.recipe-owner-arin{--recipe-owner:#d39445;background:linear-gradient(90deg,#4a2e1dba,#171a20 48%)!important}.recipe-owner-lyra{--recipe-owner:#63b9dd;background:linear-gradient(90deg,#173d53ba,#171a20 48%)!important}.recipe-owner-morvak{--recipe-owner:#73b875;background:linear-gradient(90deg,#1d442bba,#171a20 48%)!important}.recipe-owner-guild{--recipe-owner:#817a70;background:linear-gradient(90deg,#323333ba,#171a20 48%)!important}
.recipe-flow{gap:10px!important}.recipe-flow img,.combo-book .recipe-flow img{flex:0 0 58px!important;width:58px!important;height:58px!important;border:0!important;border-radius:0!important;background:transparent!important;filter:drop-shadow(0 6px 7px #000c)}.recipe-operator{min-width:18px;color:#e6bd68!important;font:900 25px/1 Georgia,serif!important;text-align:center;text-shadow:0 2px 5px #000}.recipe-name small{color:var(--recipe-owner)!important;font-weight:900!important}.recipe.ready{box-shadow:inset 0 0 18px #d3aa4930!important}
.pack-item.fusion-ready{overflow:visible!important;outline:0!important;animation:none!important}.pack-item.fusion-ready:after{content:"";position:absolute;z-index:-1;inset:-7px;border-radius:12px;background:conic-gradient(from 0deg,transparent 0 20%,#d4af6266 30%,transparent 42% 65%,#75c8b955 76%,transparent 88%);filter:blur(5px);animation:fusionAura 4.2s linear infinite;pointer-events:none}.pack-panel .pack-item.fusion-ready:before{content:"";display:block!important;position:absolute;inset:-3px;border-radius:9px;box-shadow:0 0 8px #d9bd7966,inset 0 0 7px #84c8b955;opacity:.45;animation:fusionBreath 3.2s ease-in-out infinite;pointer-events:none}
@keyframes fusionAura{to{transform:rotate(360deg)}}@keyframes fusionBreath{50%{opacity:.9;box-shadow:0 0 16px #d9bd7988,inset 0 0 10px #84c8b977}}
@media(min-width:600px){body[data-phase="shop"] #shopPhase{grid-template-rows:minmax(0,1fr) minmax(88px,auto)!important}.lower-dashboard{min-height:88px!important;padding-bottom:4px!important;overflow:visible!important}.lower-dashboard .enemy-card{min-height:82px!important;height:82px!important}.lower-dashboard .enemy-card .fight-action{min-height:70px!important}}
@media(max-width:599px){.recipe-flow{gap:5px!important}.recipe-flow img,.combo-book .recipe-flow img{flex-basis:47px!important;width:47px!important;height:47px!important}.recipe-operator{min-width:13px;font-size:20px!important}.reserve-empty{font-size:8px!important;letter-spacing:.08em}}

/* v44: determinate update/start progress with a recoverable Android watchdog */
.startup-game small{display:block;min-height:14px;margin-top:8px;color:#a8b3b8;font:800 9px/1.35 system-ui,sans-serif;letter-spacing:.16em}
.startup-progress{display:block;width:min(72vw,290px);height:10px;margin-top:18px;border:1px solid #6e542b;border-radius:999px;overflow:hidden;background:#121a20;box-shadow:inset 0 2px 5px #000b,0 0 14px #c98b3128;appearance:none;-webkit-appearance:none}
.startup-progress::-webkit-progress-bar{background:#121a20}
.startup-progress::-webkit-progress-value{border-radius:999px;background:linear-gradient(90deg,#80511f,#d6a444 60%,#ffe6a0);box-shadow:0 0 10px #e8b54a99;transition:width .28s ease}
.startup-progress::-moz-progress-bar{border-radius:999px;background:linear-gradient(90deg,#80511f,#d6a444 60%,#ffe6a0);box-shadow:0 0 10px #e8b54a99}
.startup-progress-value{display:block;margin-top:7px;color:#e4c16f;font:900 12px/1 system-ui,sans-serif;letter-spacing:.14em}
.startup-retry{min-height:44px;margin-top:16px;padding:0 18px;border:1px solid #b58842;border-radius:7px;background:linear-gradient(#44341f,#211911);color:#f0d38c;font:900 10px system-ui,sans-serif;letter-spacing:.12em}
.startup-retry[hidden]{display:none}
