/* MADPILOT Horror UI v3 — visual layer only. Keeps all existing game logic intact. */
:root{
  --h-bg:#050405;--h-bg2:#0a0809;--h-panel:#121012;--h-panel2:#1a1214;
  --h-ink:#f3ece7;--h-muted:#a79a99;--h-faint:#6f6668;
  --h-accent:#d61924;--h-accent2:#7c0711;--h-accent3:#ff5b63;
  --h-line:rgba(206,39,52,.32);--h-line-soft:rgba(255,255,255,.075);
  --h-glow:rgba(214,25,36,.22);--h-shadow:0 28px 80px rgba(0,0,0,.62);
  --h-card:linear-gradient(155deg,rgba(24,18,20,.96),rgba(10,8,9,.985));
  --h-metal:linear-gradient(180deg,rgba(36,24,27,.97),rgba(16,11,13,.985));
  --h-page-image:url('./hospital_2.jpg');--h-overlay-image:url('./horror_3.webp');
  --h-icon-filter:drop-shadow(0 6px 10px rgba(0,0,0,.8));
}
html[data-theme="surgery"]{
  --h-bg:#030909;--h-bg2:#071011;--h-panel:#0c1515;--h-panel2:#102020;
  --h-ink:#e8f4ef;--h-muted:#8fa9a2;--h-faint:#5f7771;
  --h-accent:#5ec2a8;--h-accent2:#1c6659;--h-accent3:#b4ffe9;
  --h-line:rgba(94,194,168,.30);--h-glow:rgba(94,194,168,.15);
  --h-card:linear-gradient(155deg,rgba(13,28,27,.96),rgba(5,12,13,.985));
  --h-metal:linear-gradient(180deg,rgba(25,46,43,.96),rgba(8,18,18,.985));
  --h-page-image:url('./hospital_4.jpg');--h-overlay-image:url('./horror_5.webp');
}
html[data-theme="morgue"]{
  --h-bg:#05070a;--h-bg2:#091016;--h-panel:#10161d;--h-panel2:#131c25;
  --h-ink:#edf4f8;--h-muted:#94a5b0;--h-faint:#64747f;
  --h-accent:#78a9c8;--h-accent2:#315b77;--h-accent3:#c5edff;
  --h-line:rgba(120,169,200,.30);--h-glow:rgba(120,169,200,.14);
  --h-card:linear-gradient(155deg,rgba(17,28,38,.96),rgba(7,12,17,.985));
  --h-metal:linear-gradient(180deg,rgba(26,40,51,.96),rgba(10,17,23,.985));
  --h-page-image:url('./hospital_5.jpg');--h-overlay-image:url('./horror_1.webp');
}

html{background:var(--h-bg)!important;color-scheme:dark;scrollbar-color:var(--h-accent2) #090709}
body{
  color:var(--h-ink)!important;
  background:
    linear-gradient(180deg,rgba(2,2,3,.40),rgba(2,2,3,.88)),
    radial-gradient(circle at 82% 8%,var(--h-glow),transparent 31%),
    radial-gradient(circle at 13% 30%,rgba(92,7,14,.18),transparent 25%),
    var(--h-page-image) center/cover fixed no-repeat!important;
}
body:before{
  opacity:.2!important;z-index:0!important;
  background-image:
    repeating-linear-gradient(0deg,transparent 0 3px,rgba(255,255,255,.026) 4px),
    repeating-linear-gradient(90deg,transparent 0 97px,rgba(255,255,255,.017) 98px),
    radial-gradient(circle at 13% 18%,rgba(255,255,255,.11) 0 1px,transparent 1.5px)!important;
  background-size:auto,auto,23px 23px!important;mix-blend-mode:screen!important;
}
body:after{
  inset:0!important;z-index:0!important;opacity:.85;
  background:
    radial-gradient(ellipse at 50% -16%,transparent 0 42%,rgba(0,0,0,.58) 82%),
    linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.54)),
    linear-gradient(90deg,rgba(0,0,0,.34),transparent 18%,transparent 82%,rgba(0,0,0,.34))!important;
  animation:none!important;
}

/* Slow, non-flashing horror atmosphere. */
.mh-horror-atmosphere{position:fixed;inset:0;pointer-events:none;z-index:2;overflow:hidden}
.mh-horror-atmosphere:before{content:"";position:absolute;left:-8vw;right:-8vw;top:-28px;height:92px;opacity:.42;background:
  radial-gradient(ellipse at 3% 0,var(--h-accent2) 0 14px,transparent 15px),
  radial-gradient(ellipse at 17% 0,var(--h-accent2) 0 24px,transparent 25px),
  radial-gradient(ellipse at 35% 0,var(--h-accent2) 0 12px,transparent 13px),
  radial-gradient(ellipse at 57% 0,var(--h-accent2) 0 30px,transparent 31px),
  radial-gradient(ellipse at 79% 0,var(--h-accent2) 0 16px,transparent 17px),
  radial-gradient(ellipse at 94% 0,var(--h-accent2) 0 24px,transparent 25px),
  linear-gradient(180deg,var(--h-accent2),transparent 74%);filter:blur(.3px)}
.mh-horror-atmosphere:after{content:"";position:absolute;inset:0;background:var(--h-overlay-image) center/cover fixed no-repeat;opacity:.035;mix-blend-mode:screen;filter:grayscale(.55) contrast(1.25);animation:mhHorrorDrift 24s ease-in-out infinite alternate}
@keyframes mhHorrorDrift{from{transform:scale(1.02) translate3d(-.5%,0,0)}to{transform:scale(1.06) translate3d(.7%,-.5%,0)}}

.shell{position:relative!important;z-index:5!important}
.topbar{
  border:1px solid var(--h-line)!important;border-radius:24px!important;background:var(--h-metal)!important;
  box-shadow:var(--h-shadow),inset 0 1px rgba(255,255,255,.04),inset 0 -24px 60px rgba(0,0,0,.18)!important;
  backdrop-filter:blur(18px) saturate(.8)!important;overflow:hidden!important
}
.topbar:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 0 34%,rgba(255,255,255,.025) 47%,transparent 61%),repeating-linear-gradient(90deg,transparent 0 76px,rgba(255,255,255,.012) 77px);opacity:.8}
.topbar:after{left:-35%!important;width:28%!important;background:linear-gradient(90deg,transparent,var(--h-glow),transparent)!important;opacity:.35!important;animation:mhSlowSweep 13s ease-in-out infinite!important}
@keyframes mhSlowSweep{0%,32%{transform:translateX(-40vw) skewX(-18deg)}68%,100%{transform:translateX(190vw) skewX(-18deg)}}
.brand{position:relative!important;z-index:2;border-right:1px solid var(--h-line-soft);min-width:0}
.brand-mark,.nav-emblem,.mobile-menu-sigil,.auth-brand-mark{background:radial-gradient(circle at 36% 28%,color-mix(in srgb,var(--h-accent) 45%,#4c3034),#150b0e 62%,#040304)!important;border-color:color-mix(in srgb,var(--h-accent) 55%,transparent)!important;box-shadow:0 0 0 5px color-mix(in srgb,var(--h-accent) 11%,transparent),0 12px 35px #000!important}
.brand h1,.desktop-nav-brand b,.mobile-menu-identity small{letter-spacing:.12em!important}.madpilot-mad{color:var(--h-accent3)!important;text-shadow:0 0 18px var(--h-glow)}.madpilot-pilot{color:#fff!important}
.brand p{color:var(--h-muted)!important}.pulse-dot{background:var(--h-accent2)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--h-accent) 14%,transparent)!important}.pulse-dot.on{background:#78b86e!important;box-shadow:0 0 16px rgba(105,188,93,.7)!important}
.metric{border:1px solid var(--h-line-soft)!important;background:linear-gradient(160deg,rgba(255,255,255,.035),rgba(255,255,255,.008))!important;border-radius:16px!important;min-height:74px!important}
.metric:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:2px;background:var(--h-accent);opacity:.34;box-shadow:0 0 12px var(--h-glow)}
.metric:hover{border-color:var(--h-line)!important;background:linear-gradient(160deg,var(--h-glow),rgba(255,255,255,.01))!important;transform:translateY(-2px)!important}
.metric img{filter:var(--h-icon-filter)!important}.metric small,.level-line small{color:var(--h-muted)!important;text-transform:uppercase;letter-spacing:.12em;font-size:9px!important}.metric strong,.level-line strong{color:var(--h-ink)!important}.level-line strong{color:var(--h-accent3)!important}.xpbar{background:#050405!important;border-color:var(--h-line)!important}.xpbar i{background:linear-gradient(90deg,var(--h-accent2),var(--h-accent),var(--h-accent3))!important;box-shadow:0 0 16px var(--h-glow)!important}.xptext{color:var(--h-muted)!important}
.mp-license-pill{border-color:var(--h-line)!important;background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(0,0,0,.26))!important;color:var(--h-ink)!important}

/* Desktop becomes a clinical side dossier rail. */
@media(min-width:1080px){
  .shell{width:min(1680px,97vw)!important;display:grid!important;grid-template-columns:220px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:18px!important;margin:0 auto!important;padding:14px 0 50px!important}
  .topbar{grid-column:1/-1!important;grid-row:1!important}
  .nav{grid-column:1!important;grid-row:2!important;position:sticky!important;top:14px!important;width:220px!important;max-height:calc(100vh - 28px)!important;min-height:0!important;margin:18px 0 0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border:1px solid var(--h-line)!important;border-radius:22px!important;background:var(--h-metal)!important;box-shadow:var(--h-shadow)!important}
  .desktop-nav-brand{display:flex!important;min-height:76px!important;padding:13px 14px!important;border:0!important;border-bottom:1px solid var(--h-line-soft)!important;background:linear-gradient(180deg,var(--h-glow),transparent)!important}
  .desktop-nav-status{display:flex!important;min-height:48px!important;padding:10px 14px!important;border:0!important;border-top:1px solid var(--h-line-soft)!important;color:var(--h-muted)!important;background:rgba(0,0,0,.24)!important}
  .nav-links{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;gap:5px!important;flex:1!important;padding:10px!important;overflow:auto!important;scrollbar-width:thin!important;scrollbar-color:var(--h-accent2) transparent!important}
  .nav .nav-links a{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;align-items:center!important;justify-content:initial!important;gap:10px!important;min-height:48px!important;padding:6px 9px!important;border:1px solid transparent!important;border-radius:13px!important;text-align:left!important;color:var(--h-muted)!important;background:transparent!important;box-shadow:none!important;white-space:normal!important}
  .nav .nav-links a:hover{color:var(--h-ink)!important;border-color:var(--h-line-soft)!important;background:linear-gradient(90deg,var(--h-glow),transparent)!important;transform:translateX(2px)!important}
  .nav .nav-links a.active{color:#fff!important;border-color:var(--h-line)!important;background:linear-gradient(90deg,color-mix(in srgb,var(--h-accent2) 72%,transparent),rgba(0,0,0,.06))!important;box-shadow:inset 3px 0 var(--h-accent),0 8px 22px rgba(0,0,0,.24)!important}
  .nav .nav-links a.active:after{display:none!important}.nav-icon{width:36px!important;height:36px!important;flex-basis:36px!important;border-radius:11px!important;background:rgba(0,0,0,.32)!important;border:1px solid var(--h-line-soft)!important}.nav-icon img{max-width:29px!important;max-height:29px!important;filter:var(--h-icon-filter)!important}.nav-copy{min-width:0!important}.nav-copy small{display:block!important;margin-top:3px!important;color:var(--h-faint)!important;font-size:7.5px!important;line-height:1.2!important;white-space:normal!important}.nav-label{display:block!important;font-size:10px!important;line-height:1.1!important;color:inherit!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  main{grid-column:2!important;grid-row:2!important;padding-top:18px!important;min-width:0!important}
}
@media(min-width:851px) and (max-width:1079px){.nav{border-color:var(--h-line)!important;background:var(--h-metal)!important}.nav-links{grid-template-columns:repeat(5,minmax(0,1fr))!important}.nav .nav-links a{background:rgba(0,0,0,.15)!important}.nav .nav-links a.active{background:linear-gradient(180deg,var(--h-glow),rgba(0,0,0,.25))!important}.nav-icon img{filter:var(--h-icon-filter)!important}}

main{position:relative}
.page-head{margin-bottom:20px!important;padding:2px 4px 8px!important;border-bottom:1px solid var(--h-line-soft)}
.page-head h2{color:var(--h-ink)!important;text-shadow:0 2px 0 #000,0 0 22px var(--h-glow)!important;letter-spacing:.025em}.page-head p{color:var(--h-muted)!important}.eyebrow{color:var(--h-accent3)!important;letter-spacing:.2em!important;text-shadow:0 0 12px var(--h-glow)}

.panel,.floor-card,.hero,.mode-panel,.ug-panel,.mp-ref-card,.settings-card,.raid-queue-card,.raid-boss-tile,.profile-subpanel,.character-profile-panel,.admin-hero{
  color:var(--h-ink)!important;border-color:var(--h-line)!important;background:var(--h-card)!important;box-shadow:var(--h-shadow),inset 0 1px rgba(255,255,255,.03)!important
}
.panel:before,.floor-card:before,.hero:before{background:linear-gradient(108deg,transparent 0 37%,rgba(255,255,255,.022) 48%,transparent 59%)!important;opacity:.7}
.panel:after,.floor-card:after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(180deg,var(--h-glow),transparent 16%);opacity:.28;mix-blend-mode:screen}
.panel-head,.floor-head,.profile-subpanel-head{background:linear-gradient(110deg,color-mix(in srgb,var(--h-accent2) 46%,#171014),#111013 52%,#090809)!important;color:var(--h-ink)!important;border-bottom:1px solid var(--h-line)!important}.panel-head h3,.floor-head h3,.profile-subpanel-head h3{color:var(--h-ink)!important;text-shadow:0 1px #000}.head-meta{color:var(--h-muted)!important}.panel-body,.floor-body{color:var(--h-ink)!important}

.hero{min-height:330px!important;background:linear-gradient(90deg,rgba(9,7,8,.96) 0 46%,rgba(9,7,8,.68)),var(--h-page-image) right center/58% cover no-repeat!important}
.hero-topline{color:var(--h-accent3)!important;border-bottom-color:var(--h-line-soft)!important}.battle-portrait b{color:#fff!important}.battle-portrait span,.battle-portrait small{color:var(--h-muted)!important}.battle-portrait img{border-color:var(--h-line)!important;background:#090709!important;box-shadow:0 16px 34px rgba(0,0,0,.7),0 0 0 1px var(--h-line)!important}
.hp-track{background:#040304!important;border-color:var(--h-line-soft)!important}.hp-track i{background:linear-gradient(90deg,#6a0710,var(--h-accent),#ff5960)!important;box-shadow:0 0 18px var(--h-glow)!important}.hp-block.player .hp-track i{background:linear-gradient(90deg,#245130,#4e985c,#82c982)!important}.hp-value{color:#fff!important}

.btn,.mp-btn,.auth-btn,.mode-control,.action-card,.raid-chip,.mut-tab,.equipment-tab{
  border-color:var(--h-line)!important;background:linear-gradient(180deg,color-mix(in srgb,var(--h-accent2) 76%,#3e2429),color-mix(in srgb,var(--h-accent2) 58%,#140d10))!important;color:#fff!important;box-shadow:0 8px 20px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.05)!important
}
.btn:hover,.mp-btn:hover,.auth-btn:hover,.mode-control:hover,.action-card:hover,.raid-chip:hover{filter:brightness(1.13)!important;transform:translateY(-2px)!important;box-shadow:0 12px 28px rgba(0,0,0,.4),0 0 0 1px var(--h-line)!important}.btn.light,.mp-btn.soft,.raid-chip:not(.active){background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.018))!important;color:var(--h-ink)!important;border-color:var(--h-line-soft)!important}.btn.green{background:linear-gradient(180deg,#3f7349,#24452d)!important;border-color:#4f8d5c!important}.btn.red,.danger{background:linear-gradient(180deg,#a0131e,#5d0710)!important;border-color:#bd2230!important}

.kpi,.stat-card,.profile-stat,.settings-card,.auth-session-summary>div,.work-energy-card,.work-kpi,.boss-stat-number,.reward-money-card,.raid-counter,.invite-counter{
  border-color:var(--h-line-soft)!important;background:linear-gradient(150deg,rgba(255,255,255,.035),rgba(0,0,0,.19))!important;color:var(--h-ink)!important
}
.kpi small,.stat-card small,.profile-stat small,.settings-card small,.auth-session-summary small,.profile-stat em{color:var(--h-muted)!important}.kpi b,.stat-card b,.profile-stat b,.settings-card b{color:#fff!important}

input,textarea,select,.mh-auth-field,.auth-input,.auth-textarea{
  color:var(--h-ink)!important;background:linear-gradient(180deg,rgba(4,4,5,.93),rgba(12,9,11,.98))!important;border-color:var(--h-line)!important;box-shadow:inset 0 10px 28px rgba(0,0,0,.32)!important;caret-color:var(--h-accent3)!important
}
input:focus,textarea:focus,select:focus,.mh-auth-field:focus,.auth-input:focus,.auth-textarea:focus{outline:none!important;border-color:var(--h-accent)!important;box-shadow:0 0 0 3px var(--h-glow),inset 0 10px 28px rgba(0,0,0,.35)!important}
label,.settings-inline-note,.raid-note,.invite-hint,.empty,.muted{color:var(--h-muted)!important}.empty{border-color:var(--h-line-soft)!important;background:rgba(0,0,0,.16)!important}

/* Cards and inventories use dark clinical steel rather than parchment. */
.boss-card,.biz-card,.inventory-item,.work-task,.quick-boss,.friend-row,.raid-friend-card,.combat-item-setting,.stat-upgrade-card,.weapon-card-v53,.mp-plan,.ug-priority-card,.invite-wait-card{
  color:var(--h-ink)!important;background:linear-gradient(150deg,rgba(24,19,21,.94),rgba(8,7,8,.985))!important;border-color:var(--h-line-soft)!important;box-shadow:0 12px 34px rgba(0,0,0,.28)!important
}
.boss-card:hover,.biz-card:hover,.inventory-item:hover,.quick-boss:hover,.work-task:hover{border-color:var(--h-line)!important;box-shadow:0 16px 40px rgba(0,0,0,.4),0 0 20px var(--h-glow)!important}.boss-card b,.biz-card b,.inventory-item b,.quick-boss b,.work-task b{color:#fff!important}.boss-card small,.biz-card small,.inventory-item small,.quick-boss small,.work-task small{color:var(--h-muted)!important}
.boss-image-wrap img,.biz-card img,.inventory-item img,.work-task img,.quick-boss img{filter:var(--h-icon-filter)!important}

/* Progress, switches, tags. */
.switch i,.task-toggle i,.weapon-auto-switch i{background:#080608!important;border-color:var(--h-line)!important}.switch input:checked+i,.task-toggle input:checked+i,.weapon-auto-switch input:checked+i{background:color-mix(in srgb,var(--h-accent2) 76%,#1a1114)!important;border-color:var(--h-accent)!important;box-shadow:0 0 16px var(--h-glow)!important}.switch i:before,.task-toggle i span,.weapon-auto-switch i:before{background:#eee!important}
.tag,.floor-badge,.weapon-level,.auth-session-badge,.mp-status-badge,.clan-v-pill{border-color:var(--h-line)!important;background:rgba(0,0,0,.28)!important;color:var(--h-accent3)!important}

/* Modal / mobile drawer. */
.mobile-menu-overlay,.mh-auth-overlay{backdrop-filter:blur(8px)!important;background:rgba(0,0,0,.72)!important}.mobile-menu-drawer,.mh-auth-dialog{border-color:var(--h-line)!important;background:var(--h-card)!important;box-shadow:0 28px 90px #000!important}.mobile-menu-aura{background:radial-gradient(circle at 15% 0,var(--h-glow),transparent 34%)!important}.mobile-menu-links a{border-color:var(--h-line-soft)!important;color:var(--h-muted)!important;background:rgba(255,255,255,.018)!important}.mobile-menu-links a.active{color:#fff!important;border-color:var(--h-line)!important;background:linear-gradient(90deg,var(--h-glow),rgba(0,0,0,.15))!important}.mobile-menu-button{border-color:var(--h-line)!important;background:var(--h-card)!important;color:#fff!important}.menu-ring{border-color:var(--h-line)!important;background:radial-gradient(circle,var(--h-glow),transparent 70%)!important}

.toast{background:var(--h-card)!important;border-color:var(--h-line)!important;color:var(--h-ink)!important;box-shadow:0 18px 54px rgba(0,0,0,.55),0 0 18px var(--h-glow)!important}
.mh-page-loader{background:linear-gradient(180deg,rgba(3,3,4,.985),rgba(8,5,7,.992)),var(--h-page-image) center/cover!important}.mh-loader-card{border-color:var(--h-line)!important;background:var(--h-card)!important}.mh-loader-sigil{border-color:var(--h-line)!important;background:radial-gradient(circle at 40% 30%,var(--h-accent2),#160b0f 65%,#050405)!important}.mh-loader-kicker{color:var(--h-accent3)!important}.mh-loader-title{color:#fff!important}.mh-loader-text{color:var(--h-muted)!important}.mh-loader-track i{background:linear-gradient(90deg,var(--h-accent2),var(--h-accent3),var(--h-accent2))!important}

/* Theme/language cockpit. */
.mh-horror-controls{position:fixed;right:18px;bottom:18px;z-index:99990;font-family:var(--font);color:var(--h-ink)}
.mh-control-trigger{width:58px;height:58px;border:1px solid var(--h-line);border-radius:18px;background:var(--h-card);display:grid;place-items:center;cursor:pointer;box-shadow:0 18px 50px rgba(0,0,0,.55),0 0 24px var(--h-glow);transition:.2s ease}.mh-control-trigger:hover{transform:translateY(-2px);border-color:var(--h-accent)}.mh-control-trigger img{width:38px;height:38px;object-fit:contain;filter:var(--h-icon-filter)}.mh-control-trigger:after{content:"";position:absolute;width:9px;height:9px;border-radius:50%;right:4px;top:4px;background:var(--h-accent);box-shadow:0 0 10px var(--h-accent)}
.mh-control-panel{position:absolute;right:0;bottom:68px;width:min(360px,calc(100vw - 24px));padding:14px;border:1px solid var(--h-line);border-radius:20px;background:linear-gradient(150deg,rgba(17,13,15,.985),rgba(5,5,6,.99));box-shadow:0 26px 70px rgba(0,0,0,.72),0 0 30px var(--h-glow);opacity:0;visibility:hidden;transform:translateY(8px) scale(.98);transition:.18s ease;backdrop-filter:blur(16px)}.mh-horror-controls.open .mh-control-panel{opacity:1;visibility:visible;transform:none}.mh-control-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 2px 12px;border-bottom:1px solid var(--h-line-soft)}.mh-control-head small{display:block;color:var(--h-accent3);font-size:8px;letter-spacing:.2em}.mh-control-head b{display:block;margin-top:4px;font-size:15px}.mh-control-close{width:34px;height:34px;border:1px solid var(--h-line-soft);border-radius:10px;background:rgba(255,255,255,.025);color:var(--h-muted);font-size:20px;cursor:pointer}.mh-control-label{display:block;margin:12px 2px 8px;color:var(--h-muted);font-size:9px;letter-spacing:.14em;text-transform:uppercase}.mh-theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.mh-theme-btn{position:relative;min-height:86px;padding:7px;border:1px solid var(--h-line-soft);border-radius:13px;background:rgba(255,255,255,.018);color:var(--h-muted);cursor:pointer;text-align:left;overflow:hidden}.mh-theme-btn:before{content:"";position:absolute;inset:0;background:var(--thumb) center/cover;opacity:.27;filter:grayscale(.35)}.mh-theme-btn:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent,rgba(0,0,0,.92))}.mh-theme-btn span{position:absolute;left:9px;right:8px;bottom:8px;z-index:2;font-size:9px;line-height:1.25;color:#fff}.mh-theme-btn.active{border-color:var(--h-accent);box-shadow:0 0 0 1px var(--h-accent),0 0 18px var(--h-glow)}.mh-lang-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.mh-lang-btn{height:42px;border:1px solid var(--h-line-soft);border-radius:12px;background:rgba(255,255,255,.02);color:var(--h-muted);font:11px var(--font);cursor:pointer}.mh-lang-btn.active{color:#fff;border-color:var(--h-line);background:linear-gradient(180deg,var(--h-glow),rgba(0,0,0,.15));box-shadow:inset 0 -2px var(--h-accent)}.mh-control-foot{margin:11px 2px 2px;color:var(--h-faint);font-size:8px;line-height:1.45}

/* Settings theme gallery. */
.mh-theme-settings{margin-bottom:14px!important}.mh-theme-settings .panel-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.mh-theme-card{position:relative;min-height:150px;border:1px solid var(--h-line-soft);border-radius:16px;overflow:hidden;cursor:pointer;background:#090708;text-align:left;color:#fff}.mh-theme-card:before{content:"";position:absolute;inset:0;background:var(--preview) center/cover;filter:grayscale(.25) contrast(1.12);opacity:.65}.mh-theme-card:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.96))}.mh-theme-card>span{position:absolute;z-index:2;left:14px;right:14px;bottom:13px}.mh-theme-card b,.mh-theme-card small{display:block}.mh-theme-card b{font-size:15px}.mh-theme-card small{margin-top:4px;color:#c6bfc0;font-size:9px;line-height:1.4}.mh-theme-card.active{border-color:var(--h-accent);box-shadow:0 0 0 1px var(--h-accent),0 12px 35px var(--h-glow)}

/* Login page is part of the same visual system. */
body.auth-page{background:linear-gradient(180deg,rgba(2,2,3,.38),rgba(2,2,3,.9)),var(--h-page-image) center/cover fixed no-repeat!important}
.auth-frame{border-color:var(--h-line)!important;background:linear-gradient(150deg,rgba(13,10,12,.985),rgba(4,4,5,.992))!important;box-shadow:0 38px 110px rgba(0,0,0,.72),0 0 60px var(--h-glow)!important}.auth-frame:before{background:radial-gradient(circle at 18% 0,var(--h-glow),transparent 36%)!important}.auth-frame:after{border-color:var(--h-line-soft)!important}.auth-top{border-bottom-color:var(--h-line-soft)!important}.auth-brand p,.auth-desc,.help-card p{color:var(--h-muted)!important}.auth-brand h1,.auth-head h2{color:#fff!important}.auth-badge,.auth-panel,.help-card,.method-switch,.auth-status{border-color:var(--h-line-soft)!important;background:rgba(0,0,0,.24)!important}.method-btn{color:var(--h-muted)!important}.method-btn.active{color:#fff!important;border-color:var(--h-line)!important;background:linear-gradient(145deg,var(--h-glow),rgba(0,0,0,.34))!important}.auth-seal,.help-title i{border-color:var(--h-line)!important;background:linear-gradient(145deg,var(--h-glow),rgba(0,0,0,.35))!important;color:var(--h-accent3)!important}.field-label,.help-title{color:var(--h-ink)!important}.auth-footer{color:var(--h-faint)!important}.auth-footer b{color:var(--h-muted)!important}

/* Reduce motion without losing the look. */
@media(prefers-reduced-motion:reduce){.mh-horror-atmosphere:after,.topbar:after{animation:none!important}.btn,.metric,.nav a,.mh-control-panel,.mh-control-trigger{transition:none!important}}

@media(max-width:850px){
  body{background-attachment:scroll!important}.topbar{background:linear-gradient(180deg,rgba(18,13,15,.98),rgba(7,6,7,.99))!important}.metric{background:rgba(255,255,255,.025)!important}.mh-horror-controls{right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}.mh-control-trigger{width:50px;height:50px;border-radius:15px}.mh-control-trigger img{width:32px;height:32px}.mh-control-panel{bottom:60px}.mh-theme-settings .panel-body{grid-template-columns:1fr}.page-head{border-bottom:0!important}.hero{background-position:center!important}.nav{border-color:var(--h-line)!important;background:var(--h-metal)!important}
}
@media(max-width:520px){.mh-theme-grid{grid-template-columns:1fr}.mh-theme-btn{min-height:62px}.mh-control-panel{width:min(330px,calc(100vw - 14px));right:-2px}.panel,.hero,.floor-card{border-radius:18px!important}}

/* Final pass: logs, tables, license/admin and small utility surfaces. */
a{color:var(--h-accent3)}a:hover{color:#fff}
table{color:var(--h-ink)!important;border-color:var(--h-line-soft)!important}th{color:var(--h-accent3)!important;background:rgba(0,0,0,.32)!important;border-color:var(--h-line-soft)!important}td{color:var(--h-muted)!important;background:rgba(255,255,255,.012)!important;border-color:var(--h-line-soft)!important}tr:hover td{background:var(--h-glow)!important;color:var(--h-ink)!important}
.logbox,.mut-log,.admin-log-panel,.mp-admin-table-wrap{border-color:var(--h-line)!important;background:rgba(3,3,4,.62)!important;box-shadow:inset 0 12px 35px rgba(0,0,0,.22)!important}.logline{border-color:var(--h-line-soft)!important;color:var(--h-muted)!important}.logline b,.logline strong{color:var(--h-ink)!important}.logline time{color:var(--h-faint)!important}
.mp-hero,.mp-plan,.mp-promo-banner,.mp-days-card,.mp-message,.mp-ref-card{border-color:var(--h-line)!important;background:var(--h-card)!important;color:var(--h-ink)!important;box-shadow:var(--h-shadow)!important}.mp-hero:before,.mp-promo-banner:before{background:linear-gradient(120deg,var(--h-glow),transparent 38%)!important}.mp-plan-price,.mp-days-card strong,.mp-promo-title{color:#fff!important}.mp-plan-tag,.mp-status-badge{background:var(--h-glow)!important;color:var(--h-accent3)!important;border-color:var(--h-line)!important}
.admin-monitor-grid,.admin-kpis,.admin-server-kpis{gap:10px!important}.admin-spark,.admin-usage-detail,.admin-field{border-color:var(--h-line-soft)!important;background:rgba(0,0,0,.2)!important}.admin-chart-title,.admin-server-panel b,.admin-usage-panel b{color:var(--h-ink)!important}
.ug-track,.raid-progress,.stat-upgrade-progress{background:#050405!important;border-color:var(--h-line-soft)!important}.ug-track i,.raid-progress i,.stat-upgrade-progress i{background:linear-gradient(90deg,var(--h-accent2),var(--h-accent),var(--h-accent3))!important;box-shadow:0 0 14px var(--h-glow)!important}
.settings-section-symbol{border-color:var(--h-line)!important;background:rgba(0,0,0,.26)!important;color:var(--h-accent3)!important}.settings-section-symbol img{filter:var(--h-icon-filter)!important}.settings-section-heading p{color:var(--h-muted)!important}
::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:#080608}::-webkit-scrollbar-thumb{background:linear-gradient(var(--h-accent2),color-mix(in srgb,var(--h-accent2) 60%,#151015));border:2px solid #080608;border-radius:20px}::selection{background:var(--h-accent);color:#fff}

/* Blood theme receives one extra restrained forensic trace; other themes stay clinical. */
html[data-theme="blood"] .panel-head:after,html[data-theme="blood"] .floor-head:after{content:"";position:absolute;right:15px;top:0;width:70px;height:4px;background:linear-gradient(90deg,transparent,#7e0710,#d51a25,#5b050b,transparent);opacity:.58;filter:blur(.2px);pointer-events:none}


/* v301 — cohesive horror theming, readable inner surfaces, and a new home search block. */
:root{
  --h-surface:rgba(8,7,9,.78);
  --h-surface-2:rgba(255,255,255,.03);
  --h-surface-3:rgba(0,0,0,.24);
  --h-strong:#ffffff;
}
html[data-theme="surgery"]{--h-surface:rgba(7,16,17,.8)}
html[data-theme="morgue"]{--h-surface:rgba(8,14,22,.82)}

main :where(.panel-body,.floor-body,.settings-section,.settings-v201-grid,.settings-biz-compact,.settings-biz-text,
  .battle-mode-panel,.battle-mode-grid,.battle-mode-secondary,.action-card-grid,.boss-stat-sheet,.invite-stats-shell,
  .invite-journal,.invite-journal-list,.reward-section,.reward-money,.reward-empty,.drop-card,.friend-picker,
  .switchrow,.invite-follow-summary,.invite-mode-row,.mode-filter-switch,.auth-session-summary,.auth-session-actions,
  .mode-visibility-grid,.mode-visibility-tile,.mh-day-kpi,.work-energy-card,.work-kpi,.raid-counter,.invite-counter,
  .fact,.biz-upgrade-actions,.weapon-grid,.inventory-grid,.drop-grid,.boss-grid,.kpis){color:var(--h-ink)!important}

main :where(.panel-body,.floor-body){background:linear-gradient(180deg,rgba(255,255,255,.018),rgba(0,0,0,.08))!important}
main :where(p,li,span,small,em,label):not(.eyebrow):not(.mh-search-kicker):not(.mh-search-board-head span):not(.mh-search-board-head b){color:inherit}
main :where(.panel-body,.floor-body,.settings-section,.settings-v201-grid,.auth-session-panel,.settings-automation-panel,.settings-target-panel,.settings-combat-panel,.settings-invites-panel,.settings-service-panel,.settings-stats-panel) :is(p,small,span,em,li,label){color:var(--h-muted)!important}
main :where(h3,h4,b,strong,.mode-control-copy b,.action-card-copy b,.settings-section-heading h3,.auth-session-summary b,.boss-stat-hero h4,.reward-section-title span){color:var(--h-strong)!important}

.settings-v201 .settings-section{
  overflow:hidden!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.014),rgba(0,0,0,.16)),
    var(--h-card)!important;
}
.settings-v201-grid{gap:14px!important}
.settings-page-head{align-items:center!important}
.settings-head-emblem{
  width:66px;height:66px;display:grid;place-items:center;border-radius:18px;
  border:1px solid var(--h-line)!important;
  background:radial-gradient(circle at 35% 30%,var(--h-glow),rgba(0,0,0,.34) 72%)!important;
  color:var(--h-accent3)!important;box-shadow:0 16px 34px rgba(0,0,0,.45),0 0 18px var(--h-glow)!important;
}
.settings-section-heading{gap:14px!important}
.settings-section-symbol{
  width:48px!important;height:48px!important;flex:0 0 48px!important;border-radius:15px!important;
  box-shadow:0 10px 24px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.05)!important;
}
.settings-v201 .mode-visibility-tile,
.settings-v201 .auth-session-summary>div,
.settings-v201 .settings-biz-compact,
.settings-v201 .combat-item-setting,
.settings-v201 .stat-upgrade-card,
.settings-v201 .invite-boss-pick,
.settings-v201 .invite-mode,
.settings-v201 .switchrow,
.settings-v201 .raid-friend-card,
.settings-v201 .friend-row,
.settings-v201 .boss-card,
.settings-v201 .quick-boss,
.settings-v201 .reward-money,
.settings-v201 .reward-empty,
.settings-v201 .drop-card{
  border:1px solid var(--h-line-soft)!important;
  background:linear-gradient(155deg,rgba(255,255,255,.04),rgba(0,0,0,.24))!important;
  color:var(--h-ink)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.03)!important;
}
.settings-v201 .mode-visibility-tile.visible,
.settings-v201 .invite-mode.active,
.settings-v201 .combat-item-setting.active,
.settings-v201 .stat-upgrade-card.active,
.settings-v201 .raid-friend-card.chosen,
.settings-v201 .boss-card.selected{
  border-color:var(--h-line)!important;
  box-shadow:0 0 0 1px var(--h-line),0 18px 38px rgba(0,0,0,.34),0 0 18px var(--h-glow)!important;
}
.settings-v201 .mode-visibility-icon{
  background:linear-gradient(180deg,rgba(0,0,0,.3),rgba(255,255,255,.03))!important;
  border-color:var(--h-line)!important;
}
.settings-v201 .mode-visibility-text b{color:#fff!important}
.settings-v201 .mode-visibility-text small{color:var(--h-muted)!important}
.settings-v201 .auth-session-actions,
.settings-v201 .battle-mode-secondary,
.settings-v201 .battle-mode-grid,
.settings-v201 .invite-mode-row{gap:10px!important}
.settings-v201 .auth-session-summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important}
.settings-v201 .auth-session-summary>div b{font-size:16px!important}
.settings-v201 .settings-inline-note{padding:12px 14px;border-radius:14px;background:rgba(0,0,0,.18)!important;border:1px solid var(--h-line-soft)!important}
.settings-v201 .battle-mode-panel.settings-mode-panel{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
.settings-v201 .battle-mode-grid .mode-control,
.settings-v201 .battle-mode-secondary .action-card{min-height:102px!important}

/* Better readability across cards and inner modules */
.mode-control,.action-card,.mh-day-kpi,.boss-card,.quick-boss,.raid-friend-card,.friend-row,.drop-card,.reward-money,.reward-empty,.work-task,.inventory-item,.biz-card,.stat-upgrade-card,.combat-item-setting,.mode-visibility-tile{
  position:relative;overflow:hidden
}
.mode-control:before,.action-card:before,.mh-day-kpi:before,.boss-card:before,.quick-boss:before,.raid-friend-card:before,.friend-row:before,.drop-card:before,.reward-money:before,.mode-visibility-tile:before{
  content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(118deg,transparent 0 42%,rgba(255,255,255,.035) 50%,transparent 60%);opacity:.55
}
.mode-control small,.action-card small,.mh-day-kpi small,.boss-card small,.quick-boss small,.drop-card small,.reward-money small,.invite-journal-row b small,.reward-empty span{color:var(--h-muted)!important}
.mode-control b,.action-card b,.mh-day-kpi b,.boss-card b,.quick-boss b,.drop-card b,.reward-money b,.reward-empty b,.boss-stat-hero h4{color:#fff!important}
.mode-control-state,.action-card-copy b+.small,.tag,.auth-session-badge,.invite-counter b,.raid-counter b{letter-spacing:.06em}

/* Stronger visual separation for statistics and reward blocks */
.boss-stat-sheet,.invite-stats-shell,.reward-section,.invite-journal{
  border:1px solid var(--h-line-soft)!important;
  border-radius:20px!important;
  background:linear-gradient(160deg,rgba(255,255,255,.022),rgba(0,0,0,.24))!important;
  box-shadow:0 12px 34px rgba(0,0,0,.24)!important;
}
.reward-section-title,.invite-journal-head,.invite-stats-title{border-bottom:1px solid var(--h-line-soft)!important}
.invite-journal-row{border-bottom-color:var(--h-line-soft)!important}
.reward-money-grid{gap:10px!important}
.drop-grid{gap:10px!important}
.fact,.invite-follow-summary,.invite-hint,.empty,.raid-note,.settings-inline-note{
  border:1px solid var(--h-line-soft)!important;
  border-radius:16px!important;
  background:linear-gradient(160deg,rgba(255,255,255,.025),rgba(0,0,0,.18))!important;
}

/* Inputs and filters */
select option{background:#0b090b;color:var(--h-ink)}
input::placeholder,textarea::placeholder{color:color-mix(in srgb,var(--h-muted) 75%,transparent)!important}

/* Home page: remove the PC radar and replace it with a calmer operations board. */
#homeHero{overflow:hidden!important}
#homeHero .hero-topline{padding:16px 22px!important;font-size:11px!important;letter-spacing:.18em!important}
#homeHero .mh-search-wait{
  display:grid!important;grid-template-columns:minmax(280px,.42fr) 1fr!important;grid-template-areas:"copy board" "controls controls"!important;
  gap:18px!important;padding:22px!important;align-items:stretch!important
}
#homeHero .mh-search-copy{grid-area:copy!important;display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0!important;padding:8px 4px 8px 2px!important}
#homeHero .mh-search-kicker{display:inline-flex!important;align-items:center!important;gap:9px!important;color:var(--h-accent3)!important;font-size:11px!important;letter-spacing:.14em!important;text-transform:uppercase!important}
#homeHero .mh-search-kicker i{width:10px;height:10px;border-radius:50%;background:var(--h-accent)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--h-accent) 18%,transparent),0 0 14px var(--h-glow)!important;display:inline-block}
#homeHero .mh-search-copy h3{margin:16px 0 12px!important;font-size:54px!important;line-height:1.02!important;color:#fff!important;text-shadow:0 2px 0 #000,0 0 24px var(--h-glow)!important}
#homeHero .mh-search-copy p{margin:0 0 18px!important;max-width:460px!important;font-size:15px!important;line-height:1.6!important;color:var(--h-muted)!important}
#homeHero .mh-search-status{display:inline-flex!important;align-items:center!important;gap:10px!important;align-self:flex-start!important;padding:12px 16px!important;border-radius:999px!important;border:1px solid var(--h-line)!important;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(0,0,0,.2))!important;color:#fff!important;box-shadow:0 10px 20px rgba(0,0,0,.25)!important}
#homeHero .mh-search-status-dot{width:10px;height:10px;border-radius:50%;background:var(--h-accent)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--h-accent) 18%,transparent),0 0 14px var(--h-glow)!important;animation:mhSearchPulse 1.8s ease-in-out infinite}
@keyframes mhSearchPulse{0%,100%{transform:scale(.92);opacity:.82}50%{transform:scale(1.06);opacity:1}}
#homeHero .mh-search-board{grid-area:board!important;position:relative!important;overflow:hidden!important;border:1px solid var(--h-line)!important;border-radius:24px!important;padding:16px!important;background:linear-gradient(180deg,rgba(0,0,0,.22),rgba(0,0,0,.38)),linear-gradient(135deg,color-mix(in srgb,var(--h-accent2) 16%,#0a090a),rgba(0,0,0,.45)),var(--h-page-image) center/cover no-repeat!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 16px 36px rgba(0,0,0,.38)!important}
#homeHero .mh-search-board:before{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(255,255,255,.026) 4px),linear-gradient(135deg,transparent 0 42%,var(--h-glow) 100%);opacity:.55}
#homeHero .mh-search-board-head{position:relative;z-index:1;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;padding:0 2px 12px!important;margin-bottom:12px!important;border-bottom:1px solid var(--h-line-soft)!important}
#homeHero .mh-search-board-head span{color:var(--h-accent3)!important;font-size:11px!important;letter-spacing:.14em!important;text-transform:uppercase!important}
#homeHero .mh-search-board-head b{color:#fff!important;font-size:12px!important;letter-spacing:.08em!important}
#homeHero .mh-search-targets{position:relative;z-index:1;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
#homeHero .mh-search-target{position:relative!important;display:grid!important;grid-template-columns:56px 1fr auto!important;gap:12px!important;align-items:center!important;min-height:78px!important;padding:12px!important;border-radius:18px!important;border:1px solid var(--h-line-soft)!important;background:linear-gradient(160deg,rgba(255,255,255,.05),rgba(0,0,0,.24))!important;box-shadow:0 10px 22px rgba(0,0,0,.22)!important;animation:mhSearchLift .5s ease both;animation-delay:var(--stagger)}
@keyframes mhSearchLift{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
#homeHero .mh-search-target.has-signal{border-color:var(--h-line)!important;box-shadow:0 0 0 1px rgba(255,255,255,.04),0 12px 26px rgba(0,0,0,.3),0 0 18px var(--h-glow)!important}
#homeHero .mh-search-target-portrait{width:56px;height:56px;border-radius:15px!important;display:grid!important;place-items:center!important;border:1px solid var(--h-line)!important;background:linear-gradient(180deg,rgba(0,0,0,.38),rgba(255,255,255,.02))!important;overflow:hidden!important}
#homeHero .mh-search-target-portrait img{width:100%!important;height:100%!important;object-fit:cover!important;filter:var(--h-icon-filter)!important}
#homeHero .mh-search-target-copy{min-width:0!important;display:flex!important;flex-direction:column!important;gap:4px!important}
#homeHero .mh-search-target-copy small{font-size:10px!important;letter-spacing:.08em!important;color:var(--h-accent3)!important}
#homeHero .mh-search-target-copy b{font-size:15px!important;line-height:1.2!important;color:#fff!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#homeHero .mh-search-target-copy em{font-size:12px!important;font-style:normal!important;color:var(--h-muted)!important}
#homeHero .mh-search-target-state{justify-self:end!important;color:var(--h-accent3)!important;font-size:11px!important;letter-spacing:.08em!important;text-transform:uppercase!important}
#homeHero .mh-search-trace{position:relative;z-index:1;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;margin-top:12px!important}
#homeHero .mh-search-trace-row{position:relative!important;padding:12px 14px!important;border-radius:16px!important;border:1px solid var(--h-line-soft)!important;background:linear-gradient(180deg,rgba(0,0,0,.28),rgba(255,255,255,.025))!important;overflow:hidden!important}
#homeHero .mh-search-trace-row span{display:block!important;color:var(--h-accent3)!important;font-size:10px!important;letter-spacing:.14em!important;text-transform:uppercase!important}
#homeHero .mh-search-trace-row b{display:block!important;margin-top:6px!important;font-size:28px!important;line-height:1!important;color:#fff!important}
#homeHero .mh-search-trace-row small{display:block!important;margin-top:5px!important;color:var(--h-muted)!important;font-size:11px!important;line-height:1.35!important}
#homeHero .mh-search-trace-row i{position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:3px!important;background:linear-gradient(90deg,transparent,var(--h-accent),transparent)!important;opacity:.7!important}
#homeHero .mh-search-controls{grid-area:controls!important;margin-top:0!important}
#homeHero .mh-search-controls .battle-mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#homeHero .mh-search-controls .battle-mode-secondary{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
#homeHero .mh-search-controls .mode-control,
#homeHero .mh-search-controls .action-card{min-height:92px!important}

/* Normal home battle layout: cleaner and darker surfaces. */
#homeHero .battle-layout{padding:22px!important}
#homeHero .mh-home-stage-hp{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
#homeHero .mh-home-actions{margin-top:18px!important}
#homeHero .hp-fantasy-frame{filter:drop-shadow(0 14px 24px rgba(0,0,0,.36))}

/* Force theme consistency for legacy pale widgets. */
main :where(.mode-all-boss-note,.mh-daily-focus,.mh-daily-empty,.mh-daily-boss,.mh-daily-archive,.mh-daily-clear-panel,.friend-room-card,.raid-filter-card,.raid-drop-card,.inventory-slot,.combat-item-box,.mutagen-card,.license-card,.faq-card){
  border:1px solid var(--h-line-soft)!important;
  border-radius:18px!important;
  background:linear-gradient(160deg,rgba(255,255,255,.03),rgba(0,0,0,.2))!important;
  color:var(--h-ink)!important;
}
main :where(.mode-all-boss-note b,.mh-daily-focus strong,.mh-daily-boss h3,.raid-drop-card b,.mutagen-card b,.license-card b){color:#fff!important}
main :where(.mode-all-boss-note small,.mh-daily-focus span,.mh-daily-boss p,.raid-drop-card small,.mutagen-card small,.license-card small){color:var(--h-muted)!important}

@media(max-width:1180px){
  #homeHero .mh-search-wait{grid-template-columns:1fr!important;grid-template-areas:"copy" "board" "controls"!important}
  #homeHero .mh-search-copy h3{font-size:42px!important}
  #homeHero .mh-search-targets{grid-template-columns:1fr 1fr!important}
  #homeHero .mh-search-trace{grid-template-columns:1fr!important}
  .settings-v201 .auth-session-summary{grid-template-columns:1fr!important}
}
@media(max-width:820px){
  #homeHero .mh-home-stage-hp{grid-template-columns:1fr!important}
  #homeHero .mh-search-copy h3{font-size:34px!important}
  #homeHero .mh-search-board{padding:14px!important}
  #homeHero .mh-search-targets{grid-template-columns:1fr!important}
  #homeHero .mh-search-controls .battle-mode-grid,
  #homeHero .mh-search-controls .battle-mode-secondary{grid-template-columns:1fr!important}
}


/* v302 — brutal blood pass: more aggressive, dirtier, bloodier visuals with preserved readability. */
html[data-theme="blood"]{
  --h-bg:#030102;
  --h-bg2:#080304;
  --h-panel:#110507;
  --h-panel2:#180709;
  --h-ink:#f6efea;
  --h-muted:#bca9a7;
  --h-faint:#7f696b;
  --h-accent:#ef1d2d;
  --h-accent2:#8a0712;
  --h-accent3:#ffb1b5;
  --h-line:rgba(239,29,45,.38);
  --h-line-soft:rgba(255,180,185,.10);
  --h-glow:rgba(239,29,45,.28);
  --h-card:linear-gradient(160deg,rgba(26,8,11,.97),rgba(8,3,4,.992));
  --h-metal:linear-gradient(180deg,rgba(40,11,14,.98),rgba(13,5,6,.992));
}
html[data-theme="blood"] body{
  background:
    linear-gradient(180deg,rgba(3,1,2,.36),rgba(2,1,2,.9)),
    radial-gradient(circle at 82% 8%,rgba(239,29,45,.22),transparent 33%),
    radial-gradient(circle at 10% 18%,rgba(151,7,22,.16),transparent 22%),
    radial-gradient(circle at 74% 32%,rgba(90,6,13,.12),transparent 20%),
    var(--h-page-image) center/cover fixed no-repeat!important;
}
html[data-theme="blood"] body:before{
  opacity:.26!important;
  background-image:
    repeating-linear-gradient(0deg,transparent 0 3px,rgba(255,255,255,.03) 4px),
    radial-gradient(circle at 14% 9%,rgba(255,70,84,.22) 0 2px,transparent 3px),
    radial-gradient(circle at 19% 2%,rgba(137,8,18,.34) 0 9px,transparent 11px),
    radial-gradient(circle at 63% 4%,rgba(137,8,18,.28) 0 7px,transparent 9px),
    radial-gradient(circle at 77% 11%,rgba(255,70,84,.18) 0 2px,transparent 3px)!important;
  background-size:auto,130px 150px,220px 180px,260px 200px,160px 140px!important;
}
html[data-theme="blood"] body:after{
  background:
    radial-gradient(ellipse at 50% -16%,transparent 0 40%,rgba(0,0,0,.66) 84%),
    linear-gradient(180deg,rgba(0,0,0,.04),rgba(0,0,0,.6)),
    linear-gradient(90deg,rgba(0,0,0,.42),transparent 18%,transparent 82%,rgba(0,0,0,.42))!important;
}
html[data-theme="blood"] .mh-horror-atmosphere:before{
  opacity:.54;
  filter:blur(.2px) saturate(1.2);
}
html[data-theme="blood"] .topbar,
html[data-theme="blood"] .panel,
html[data-theme="blood"] .floor-card,
html[data-theme="blood"] .hero,
html[data-theme="blood"] .mode-panel,
html[data-theme="blood"] .ug-panel,
html[data-theme="blood"] .settings-section{
  box-shadow:
    0 28px 80px rgba(0,0,0,.66),
    0 0 34px rgba(239,29,45,.07),
    inset 0 1px rgba(255,255,255,.03)!important;
}
html[data-theme="blood"] .topbar:before,
html[data-theme="blood"] .panel:before,
html[data-theme="blood"] .floor-card:before,
html[data-theme="blood"] .hero:before{
  background:
    linear-gradient(108deg,transparent 0 36%,rgba(255,255,255,.02) 48%,transparent 58%),
    radial-gradient(circle at 12% 0,rgba(239,29,45,.06),transparent 24%)!important;
}
html[data-theme="blood"] .panel-head,
html[data-theme="blood"] .floor-head,
html[data-theme="blood"] .profile-subpanel-head{
  background:
    linear-gradient(110deg,rgba(92,7,15,.95),rgba(23,8,10,.98) 54%,rgba(10,4,5,.99))!important;
}
html[data-theme="blood"] .panel-head:after,
html[data-theme="blood"] .floor-head:after{
  content:"";
  position:absolute;right:18px;top:0;width:86px;height:5px;
  background:linear-gradient(90deg,transparent,#6b040c,#ff2435,#6f0610,transparent);
  opacity:.82;filter:blur(.15px);pointer-events:none;
}
html[data-theme="blood"] .page-head h2,
html[data-theme="blood"] #homeHero .mh-search-copy h3{
  text-shadow:0 2px 0 #000,0 0 20px rgba(239,29,45,.18),0 0 36px rgba(130,7,18,.12)!important;
}
html[data-theme="blood"] .eyebrow,
html[data-theme="blood"] #homeHero .mh-search-kicker,
html[data-theme="blood"] #homeHero .mh-search-board-head span,
html[data-theme="blood"] .hero-topline{
  color:#ff9ca3!important;
}
html[data-theme="blood"] .btn,
html[data-theme="blood"] .mode-control,
html[data-theme="blood"] .action-card{
  background:
    linear-gradient(180deg,rgba(123,10,19,.96),rgba(58,6,10,.98))!important;
  border-color:rgba(239,29,45,.34)!important;
  box-shadow:0 12px 24px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.05), inset 0 -14px 20px rgba(0,0,0,.18)!important;
}
html[data-theme="blood"] .btn.light,
html[data-theme="blood"] .raid-chip:not(.active){
  background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(33,8,10,.45))!important;
}
html[data-theme="blood"] .btn:before,
html[data-theme="blood"] .mode-control:before,
html[data-theme="blood"] .action-card:before,
html[data-theme="blood"] .mh-control-trigger:before{
  content:"";
  position:absolute;left:0;top:0;right:0;height:16px;pointer-events:none;
  background:
    radial-gradient(circle at 6% 0,rgba(255,44,60,.55) 0 4px,transparent 5px),
    radial-gradient(circle at 14% 0,rgba(118,6,16,.9) 0 8px,transparent 9px),
    radial-gradient(circle at 25% 0,rgba(255,44,60,.4) 0 3px,transparent 4px),
    linear-gradient(180deg,rgba(130,8,18,.55),transparent 78%);
  opacity:.24;
}
html[data-theme="blood"] .metric:before,
html[data-theme="blood"] .mh-search-trace-row i,
html[data-theme="blood"] .tag,
html[data-theme="blood"] .mode-control-state,
html[data-theme="blood"] .mh-search-status-dot{
  box-shadow:0 0 14px rgba(239,29,45,.28)!important;
}
html[data-theme="blood"] .kpi,
html[data-theme="blood"] .stat-card,
html[data-theme="blood"] .settings-v201 .mode-visibility-tile,
html[data-theme="blood"] .settings-v201 .auth-session-summary>div,
html[data-theme="blood"] .boss-card,
html[data-theme="blood"] .reward-money,
html[data-theme="blood"] .reward-empty,
html[data-theme="blood"] .drop-card,
html[data-theme="blood"] .mh-search-target,
html[data-theme="blood"] .mh-search-trace-row{
  background:linear-gradient(160deg,rgba(255,255,255,.038),rgba(28,7,10,.54))!important;
}
html[data-theme="blood"] .mh-search-board{
  background:
    linear-gradient(180deg,rgba(0,0,0,.24),rgba(0,0,0,.44)),
    linear-gradient(135deg,rgba(104,8,16,.22),rgba(0,0,0,.42)),
    var(--h-page-image) center/cover no-repeat!important;
}
html[data-theme="blood"] .mh-search-board:after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(circle at 8% 0,rgba(159,8,20,.24) 0 14px,transparent 16px),
    radial-gradient(circle at 15% 0,rgba(255,59,75,.16) 0 5px,transparent 7px),
    radial-gradient(circle at 81% 0,rgba(159,8,20,.2) 0 11px,transparent 13px),
    linear-gradient(180deg,rgba(130,8,18,.08),transparent 28%);
  opacity:.55;
}
html[data-theme="blood"] .mh-search-target.has-signal{
  box-shadow:0 0 0 1px rgba(255,255,255,.05),0 16px 28px rgba(0,0,0,.34),0 0 22px rgba(239,29,45,.14)!important;
}
html[data-theme="blood"] .mh-control-trigger:after{background:#ff3142!important;box-shadow:0 0 14px #ff3142!important}
html[data-theme="blood"] ::selection{background:#c81121;color:#fff}


/* v303 — infernal hell pass: nearly demonic blood theme with ember/fire accents. */
html[data-theme="blood"]{
  --h-bg:#020000;
  --h-bg2:#050102;
  --h-panel:#120304;
  --h-panel2:#1a0406;
  --h-ink:#fff3ef;
  --h-muted:#d2b4ac;
  --h-faint:#8f6e66;
  --h-accent:#ff2432;
  --h-accent2:#6f020a;
  --h-accent3:#ffd0ad;
  --h-line:rgba(255,49,63,.42);
  --h-line-soft:rgba(255,170,140,.11);
  --h-glow:rgba(255,36,50,.34);
  --h-card:linear-gradient(160deg,rgba(23,4,6,.975),rgba(7,1,2,.995));
  --h-metal:linear-gradient(180deg,rgba(50,8,10,.985),rgba(12,2,3,.995));
}
html[data-theme="blood"] body{
  background:
    radial-gradient(circle at 50% 115%,rgba(255,84,25,.16),transparent 34%),
    radial-gradient(circle at 18% 8%,rgba(255,36,50,.18),transparent 24%),
    radial-gradient(circle at 82% 14%,rgba(143,4,13,.16),transparent 26%),
    linear-gradient(180deg,rgba(7,1,2,.44),rgba(1,0,0,.92)),
    var(--h-page-image) center/cover fixed no-repeat!important;
}
html[data-theme="blood"] body:before{
  opacity:.34!important;
  background-image:
    repeating-linear-gradient(0deg,transparent 0 3px,rgba(255,255,255,.024) 4px),
    radial-gradient(circle at 8% 2%,rgba(255,78,42,.28) 0 3px,transparent 4px),
    radial-gradient(circle at 12% 0,rgba(128,5,12,.54) 0 13px,transparent 15px),
    radial-gradient(circle at 38% 0,rgba(255,45,61,.18) 0 4px,transparent 5px),
    radial-gradient(circle at 78% 0,rgba(128,5,12,.44) 0 10px,transparent 12px),
    radial-gradient(circle at 86% 6%,rgba(255,110,42,.24) 0 3px,transparent 4px)!important;
  background-size:auto,120px 140px,260px 190px,200px 150px,240px 180px,160px 130px!important;
}
html[data-theme="blood"] body:after{
  background:
    radial-gradient(ellipse at 50% -16%,transparent 0 42%,rgba(0,0,0,.76) 84%),
    radial-gradient(circle at 50% 118%,rgba(255,88,18,.16),transparent 30%),
    linear-gradient(180deg,rgba(0,0,0,.06),rgba(0,0,0,.68)),
    linear-gradient(90deg,rgba(0,0,0,.54),transparent 18%,transparent 82%,rgba(0,0,0,.54))!important;
}
html[data-theme="blood"] .mh-horror-atmosphere:after{
  opacity:.28!important;
  background:
    radial-gradient(circle at 50% 100%,rgba(255,92,20,.2),transparent 32%),
    conic-gradient(from 190deg at 50% 50%,transparent,rgba(255,72,32,.06),transparent 45%,rgba(255,36,50,.06),transparent)!important;
}
html[data-theme="blood"] .topbar,
html[data-theme="blood"] .panel,
html[data-theme="blood"] .floor-card,
html[data-theme="blood"] .hero,
html[data-theme="blood"] .mode-panel,
html[data-theme="blood"] .settings-section,
html[data-theme="blood"] .mh-control-panel{
  border-color:rgba(255,52,66,.34)!important;
  box-shadow:
    0 32px 90px rgba(0,0,0,.72),
    0 0 44px rgba(255,34,48,.08),
    inset 0 0 0 1px rgba(255,255,255,.018)!important;
}
html[data-theme="blood"] .panel:after,
html[data-theme="blood"] .floor-card:after,
html[data-theme="blood"] .hero:after{
  opacity:.42!important;
  background:
    linear-gradient(180deg,rgba(255,52,66,.12),transparent 14%),
    radial-gradient(circle at 100% 0,rgba(255,124,40,.08),transparent 18%)!important;
}
html[data-theme="blood"] .topbar:after{
  background:linear-gradient(90deg,transparent,rgba(255,126,76,.08),rgba(255,43,58,.1),transparent)!important;
}
html[data-theme="blood"] .panel-head,
html[data-theme="blood"] .floor-head,
html[data-theme="blood"] .profile-subpanel-head{
  background:
    linear-gradient(110deg,rgba(109,4,12,.98),rgba(33,6,9,.992) 52%,rgba(10,2,4,.996))!important;
}
html[data-theme="blood"] .panel-head:before,
html[data-theme="blood"] .floor-head:before{
  content:"";
  position:absolute;left:0;right:0;top:0;height:100%;pointer-events:none;
  background:
    radial-gradient(circle at 10% 0,rgba(255,107,52,.12),transparent 18%),
    linear-gradient(180deg,rgba(255,45,61,.06),transparent 55%);
}
html[data-theme="blood"] .panel-head:after,
html[data-theme="blood"] .floor-head:after{
  content:"";
  position:absolute;right:18px;top:0;width:110px;height:7px;
  background:
    linear-gradient(90deg,transparent,#5b0209,#ff2332,#8f0410,#ff7f31,transparent);
  opacity:.86;filter:blur(.1px);pointer-events:none;
  clip-path:polygon(0 0,100% 0,94% 38%,89% 52%,91% 70%,82% 100%,0 100%);
}
html[data-theme="blood"] .page-head h2,
html[data-theme="blood"] #homeHero .mh-search-copy h3{
  text-shadow:
    0 2px 0 #000,
    0 0 20px rgba(255,34,48,.2),
    0 0 42px rgba(255,87,31,.12),
    0 0 66px rgba(110,3,10,.1)!important;
}
html[data-theme="blood"] .brand-mark,
html[data-theme="blood"] .mh-loader-sigil,
html[data-theme="blood"] .settings-head-emblem,
html[data-theme="blood"] .settings-section-symbol,
html[data-theme="blood"] .mode-visibility-icon,
html[data-theme="blood"] .mh-search-target-portrait{
  background:
    radial-gradient(circle at 36% 28%,rgba(255,109,48,.18),rgba(101,6,13,.56) 42%,rgba(10,2,3,.98) 74%)!important;
  box-shadow:0 12px 24px rgba(0,0,0,.42),0 0 18px rgba(255,42,56,.12)!important;
}
html[data-theme="blood"] .brand-mark{color:#ffd4c2!important}
html[data-theme="blood"] .eyebrow,
html[data-theme="blood"] #homeHero .mh-search-kicker,
html[data-theme="blood"] #homeHero .mh-search-board-head span,
html[data-theme="blood"] .hero-topline,
html[data-theme="blood"] .mh-control-head small{
  color:#ffc0a0!important;
  text-shadow:0 0 10px rgba(255,88,24,.16)!important;
}
html[data-theme="blood"] .btn,
html[data-theme="blood"] .mode-control,
html[data-theme="blood"] .action-card,
html[data-theme="blood"] .mh-theme-card.active,
html[data-theme="blood"] .mh-lang-btn.active{
  background:
    linear-gradient(180deg,rgba(135,8,16,.98),rgba(56,3,8,.992))!important;
  border-color:rgba(255,42,56,.36)!important;
  box-shadow:
    0 14px 28px rgba(0,0,0,.38),
    0 0 16px rgba(255,39,52,.08),
    inset 0 1px rgba(255,255,255,.06),
    inset 0 -16px 20px rgba(0,0,0,.2)!important;
}
html[data-theme="blood"] .btn:hover,
html[data-theme="blood"] .mode-control:hover,
html[data-theme="blood"] .action-card:hover,
html[data-theme="blood"] .mh-control-trigger:hover{
  box-shadow:
    0 18px 36px rgba(0,0,0,.46),
    0 0 20px rgba(255,38,52,.16),
    0 0 32px rgba(255,118,32,.08),
    inset 0 1px rgba(255,255,255,.06)!important;
}
html[data-theme="blood"] .btn:before,
html[data-theme="blood"] .mode-control:before,
html[data-theme="blood"] .action-card:before,
html[data-theme="blood"] .mh-control-trigger:before,
html[data-theme="blood"] .mh-search-board:after{
  mix-blend-mode:screen;
}
html[data-theme="blood"] .btn:after,
html[data-theme="blood"] .mode-control:after,
html[data-theme="blood"] .action-card:after{
  content:"";
  position:absolute;left:0;right:0;bottom:0;height:6px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,89,22,.46),rgba(255,32,46,.72),rgba(255,89,22,.46),transparent);
  opacity:.58;
}
html[data-theme="blood"] .metric,
html[data-theme="blood"] .kpi,
html[data-theme="blood"] .stat-card,
html[data-theme="blood"] .settings-v201 .mode-visibility-tile,
html[data-theme="blood"] .settings-v201 .auth-session-summary>div,
html[data-theme="blood"] .boss-card,
html[data-theme="blood"] .reward-money,
html[data-theme="blood"] .reward-empty,
html[data-theme="blood"] .drop-card,
html[data-theme="blood"] .mh-search-target,
html[data-theme="blood"] .mh-search-trace-row,
html[data-theme="blood"] .fact,
html[data-theme="blood"] .empty{
  background:linear-gradient(160deg,rgba(255,255,255,.034),rgba(40,5,8,.56))!important;
  border-color:rgba(255,170,130,.14)!important;
}
html[data-theme="blood"] .tag,
html[data-theme="blood"] .floor-badge,
html[data-theme="blood"] .auth-session-badge,
html[data-theme="blood"] .mode-control-state{
  background:linear-gradient(180deg,rgba(0,0,0,.34),rgba(73,5,9,.42))!important;
  color:#ffcbb1!important;
  border-color:rgba(255,76,62,.22)!important;
}
html[data-theme="blood"] input,
html[data-theme="blood"] textarea,
html[data-theme="blood"] select{
  background:linear-gradient(180deg,rgba(8,2,3,.96),rgba(15,4,6,.992))!important;
  border-color:rgba(255,82,70,.22)!important;
}
html[data-theme="blood"] input:focus,
html[data-theme="blood"] textarea:focus,
html[data-theme="blood"] select:focus{
  box-shadow:0 0 0 3px rgba(255,36,50,.16),0 0 20px rgba(255,92,22,.08),inset 0 10px 28px rgba(0,0,0,.42)!important;
}
html[data-theme="blood"] #homeHero .mh-search-board{
  background:
    linear-gradient(180deg,rgba(0,0,0,.28),rgba(0,0,0,.48)),
    linear-gradient(135deg,rgba(118,5,14,.22),rgba(0,0,0,.44)),
    var(--h-page-image) center/cover no-repeat!important;
}
html[data-theme="blood"] #homeHero .mh-search-board:before{
  background:
    repeating-linear-gradient(0deg,transparent 0 3px,rgba(255,255,255,.022) 4px),
    linear-gradient(135deg,transparent 0 34%,rgba(255,98,28,.07) 100%)!important;
}
html[data-theme="blood"] #homeHero .mh-search-status,
html[data-theme="blood"] #homeHero .mh-search-trace-row,
html[data-theme="blood"] #homeHero .mh-search-target.has-signal{
  box-shadow:0 12px 24px rgba(0,0,0,.28),0 0 18px rgba(255,43,58,.12)!important;
}
html[data-theme="blood"] #homeHero .mh-search-status-dot,
html[data-theme="blood"] .mh-control-trigger:after{
  background:radial-gradient(circle,#ffaf72,#ff394a 56%,#7a030d)!important;
  box-shadow:0 0 16px rgba(255,55,67,.4),0 0 28px rgba(255,114,34,.16)!important;
}
html[data-theme="blood"] .pulse-dot.on{
  background:#ff4252!important;
  box-shadow:0 0 16px rgba(255,50,64,.44),0 0 28px rgba(255,107,34,.16)!important;
}
html[data-theme="blood"] ::-webkit-scrollbar-thumb{
  background:linear-gradient(#ff5a1f,#9f0410)!important;
}


/* v304 — full theme consistency pass: remove milk/brown legacy blocks, improve readability per theme. */
html[data-theme]{
  --h-surface-1:linear-gradient(160deg,color-mix(in srgb,var(--h-panel) 88%,rgba(255,255,255,.03)),color-mix(in srgb,var(--h-bg2) 94%,#000));
  --h-surface-2:linear-gradient(160deg,color-mix(in srgb,var(--h-accent2) 20%,var(--h-panel)),color-mix(in srgb,var(--h-bg) 92%,#000));
  --h-surface-3:linear-gradient(160deg,rgba(255,255,255,.045),rgba(0,0,0,.22));
  --h-surface-4:linear-gradient(180deg,rgba(0,0,0,.26),rgba(255,255,255,.02));
  --h-surface-flat:color-mix(in srgb,var(--h-panel) 84%,#050505);
  --h-field-bg:linear-gradient(180deg,color-mix(in srgb,var(--h-bg2) 92%,#000),color-mix(in srgb,var(--h-panel) 86%,#000));
  --h-chip-bg:linear-gradient(180deg,rgba(255,255,255,.055),rgba(0,0,0,.24));
  --h-chip-text:var(--h-accent3);
  --h-title:#fff;
  --h-body:var(--h-ink);
  --h-subtle:var(--h-muted);
}
html[data-theme="surgery"]{
  --h-title:#f1fff8;
  --h-chip-text:#c9fff1;
}
html[data-theme="morgue"]{
  --h-title:#f2f9ff;
  --h-chip-text:#d7f1ff;
}
html[data-theme="blood"]{
  --h-title:#fff6f3;
  --h-chip-text:#ffd2c0;
}

/* Global typography fixups for legacy components */
main :where(.panel-body,.floor-body,[class*="clan-v-"],[class*="friend-room"],[class*="ug-"],[class*="mut-"],[class*="biz-"],[class*="room-"],[class*="inventory-"],[class*="catalog-"],[class*="work-"],[class*="license-"],[class*="admin-"]) :is(h1,h2,h3,h4,h5,h6,b,strong){color:var(--h-title)!important}
main :where(.panel-body,.floor-body,[class*="clan-v-"],[class*="friend-room"],[class*="ug-"],[class*="mut-"],[class*="biz-"],[class*="room-"],[class*="inventory-"],[class*="catalog-"],[class*="work-"],[class*="license-"],[class*="admin-"]) :is(p,span,small,em,li,label){color:var(--h-subtle)!important}
main :where(.head-meta,.eyebrow,[class*="kicker"],[class*="meta"],[class*="label"],[class*="caption"]){color:var(--h-chip-text)!important}
main :where(.empty,.muted,.raid-note,.invite-hint,.settings-inline-note,.clan-help,[class*="empty"]){color:var(--h-subtle)!important}

/* Replace old pale surfaces in all sections. */
main :where(
  .kpi,.stat-card,.mode-control,.action-card,.boss-card,.biz-card,.inventory-item,.item-card,.set-card,.work-task,.work-task-card,
  .friend-row,.raid-friend-card,.combat-item-setting,.stat-upgrade-card,.weapon-card-v53,.mp-plan,.ug-priority-card,.invite-wait-card,
  .mode-all-boss-note,.mh-daily-focus,.mh-daily-empty,.mh-daily-boss,.mh-daily-archive,.mh-daily-clear-panel,
  .friend-room-card,.friend-launch-box,.friend-hunt-active,.friend-registered-card,.friend-create-step,.friend-room-code,.friend-room-journal,.friend-room-player,.friend-room-counters>div,.friend-room-loot-card,.friend-room-no-goal,
  .clan-v-banner,.clan-v-card,.clan-v-room,.clan-v-room-card,.clan-v-member,.clan-v-empty,.clan-v-summary .clan-v-kpi,.clan-v-invite-card,.clan-v-team-card,.clan-v-raid-card,
  .ug-hero,.ug-toggle,.ug-kpis article,.ug-setting,.ug-fighter,.ug-candidate,.ug-history-row,.ug-limit-note,.ug-limit-card,.ug-header-metric,
  .mut-category,.mut-recipe-section,.mut-chest,.mut-log-row,.mut-controls .switchrow,.mut-main-img,.mut-recipe,
  .admin-user-card,.admin-monitor-chart,.admin-usage-users article,.admin-usage-detail-card,.friend-batch-results .row,
  .reward-money,.reward-empty,.drop-card,.fact,.settings-card,.mode-visibility-tile,.auth-session-summary>div,.profile-stat,.boss-stat-number,.raid-counter,.invite-counter,
  .scene-chip-card,.ornament-card,.profile-shelf-pill,.profile-scene-shelf,.license-card,.faq-card,.mp-ref-card,.mp-feature,.mp-price-card
){
  border:1px solid var(--h-line-soft)!important;
  background:var(--h-surface-3)!important;
  color:var(--h-body)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.03)!important;
}
main :where(.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.admin-hero,.settings-section,.ug-panel,.mut-hero,.clan-v-banner,.clan-v-room,.clan-v-card,.friend-room-card,.invite-stats-shell,.reward-section,.invite-journal,.boss-stat-sheet){
  border-color:var(--h-line)!important;
  background:var(--h-surface-1)!important;
}
main :where(.panel-head,.floor-head,.profile-subpanel-head,.clan-v-room-head,.clan-v-card-head,.friend-room-journal-head,.reward-section-title,.invite-journal-head,.invite-stats-title){
  background:var(--h-surface-2)!important;
  border-bottom:1px solid var(--h-line)!important;
}
main :where(.panel-body,.floor-body,.profile-subpanel-body,.clan-v-room-body,.clan-v-card-body,.mut-hero .panel-body,.ug-panel .panel-body,.catalog-floor>.panel-body){
  background:linear-gradient(180deg,rgba(255,255,255,.015),rgba(0,0,0,.08))!important;
  color:var(--h-body)!important;
}

/* Text colors inside common action cards and lists */
main :where(.mode-control,.action-card,.boss-card,.biz-card,.inventory-item,.item-card,.set-card,.work-task,.friend-room-player,.friend-room-loot-card,.ug-setting,.ug-fighter,.ug-candidate,.ug-history-row,.mut-category,.mut-chest,.mut-recipe,.clan-v-room-card,.clan-v-member,.clan-v-empty,.license-card,.faq-card) :is(b,strong,h3,h4){color:var(--h-title)!important}
main :where(.mode-control,.action-card,.boss-card,.biz-card,.inventory-item,.item-card,.set-card,.work-task,.friend-room-player,.friend-room-loot-card,.ug-setting,.ug-fighter,.ug-candidate,.ug-history-row,.mut-category,.mut-chest,.mut-recipe,.clan-v-room-card,.clan-v-member,.clan-v-empty,.license-card,.faq-card) :is(p,small,span,em){color:var(--h-subtle)!important}
main :where(.tag,.floor-badge,.weapon-level,.auth-session-badge,.mp-status-badge,.clan-v-pill,.mode-control-state,.room-chip,.scene-room-badge,.profile-shelf-pill){background:var(--h-chip-bg)!important;border-color:var(--h-line)!important;color:var(--h-chip-text)!important}

/* Inputs / selects / code boxes */
main :where(input,textarea,select,.ug-budgets input[type=number],.ug-dual-budget input,.mut-category input[type=number],.mut-budget input,.settings-target-panel select,.friend-room-code-input){
  background:var(--h-field-bg)!important;
  color:var(--h-title)!important;
  border:1px solid var(--h-line)!important;
  box-shadow:inset 0 10px 24px rgba(0,0,0,.35)!important;
}
main :where(input::placeholder,textarea::placeholder){color:color-mix(in srgb,var(--h-subtle) 78%,transparent)!important}
main :where(select option){background:var(--h-surface-flat)!important;color:var(--h-title)!important}

/* Explicit fixes for friend room / mode page legacy creams */
.boss-modes-page .mode-control,
.boss-modes-page .friend-room-card,
.boss-modes-page .friend-room-code,
.boss-modes-page .friend-room-journal,
.boss-modes-page .friend-room-counters>div,
.boss-modes-page .friend-room-player,
.boss-modes-page .friend-room-loot-card,
.boss-modes-page .friend-room-no-goal,
.boss-modes-page .room-drop-card{
  background:var(--h-surface-3)!important;
  color:var(--h-body)!important;
  border-color:var(--h-line-soft)!important;
}
.boss-modes-page .friend-room-code b,
.boss-modes-page .friend-room-head h4,
.boss-modes-page .friend-room-player b,
.boss-modes-page .friend-room-journal-row b,
.boss-modes-page .friend-room-loot-card b{color:var(--h-title)!important}
.boss-modes-page .friend-room-code small,
.boss-modes-page .friend-room-code span,
.boss-modes-page .friend-room-head p,
.boss-modes-page .friend-room-player small,
.boss-modes-page .friend-room-journal-row span,
.boss-modes-page .friend-room-loot-card small{color:var(--h-subtle)!important}
.boss-modes-page .friend-room-loot-card img,
.boss-modes-page .friend-room-player-mark,
.boss-modes-page .friend-room-player>span{background:var(--h-field-bg)!important;border-color:var(--h-line)!important}
.boss-modes-page .friend-room-card.active,
.boss-modes-page .friend-room-card.active .friend-registered-card,
.boss-modes-page .friend-room-card.active .friend-room-player,
.boss-modes-page .friend-room-card.active .friend-room-loot-card{background:var(--h-surface-3)!important;color:var(--h-body)!important}

/* Underground page: kill milk cards and brown copy. */
.ug-hero{background:var(--h-surface-2)!important;border-color:var(--h-line)!important;color:var(--h-body)!important}
.ug-hero-icon{background:var(--h-field-bg)!important;border-color:var(--h-line)!important;box-shadow:0 10px 24px rgba(0,0,0,.35)!important}
.ug-toggle{background:var(--h-surface-3)!important;color:var(--h-title)!important;border:1px solid var(--h-line-soft)!important}
.ug-toggle:has(input:checked){background:linear-gradient(160deg,color-mix(in srgb,var(--h-accent2) 34%,transparent),rgba(255,255,255,.04))!important}
.ug-kpis article,.ug-setting,.ug-fighter,.ug-candidate,.ug-history-row,.ug-limit-note,.ug-limit-card,.ug-header-metric{background:var(--h-surface-3)!important;color:var(--h-body)!important;border-color:var(--h-line-soft)!important}
.ug-kpis article b,.ug-setting b,.ug-fighter b,.ug-candidate b,.ug-history-row b,.ug-limit-note b,.ug-limit-card b{color:var(--h-title)!important}
.ug-kpis article small,.ug-setting small,.ug-fighter small,.ug-candidate small,.ug-history-row small,.ug-limit-note,.ug-limit-card{color:var(--h-subtle)!important}
.ug-history-row .ug-result{background:linear-gradient(180deg,color-mix(in srgb,var(--h-accent2) 44%,transparent),rgba(255,255,255,.05))!important;color:var(--h-chip-text)!important}
.ug-history-row.ug-lost .ug-result{background:linear-gradient(180deg,rgba(123,18,28,.65),rgba(52,8,12,.8))!important;color:#ffe4df!important}
.ug-rewards span{background:var(--h-chip-bg)!important;color:var(--h-chip-text)!important}

/* Mutagens / recipe pages */
.mut-category,.mut-recipe-section,.mut-chest,.mut-controls .switchrow,.mut-main-img,.mut-log-row{background:var(--h-surface-3)!important;color:var(--h-body)!important;border-color:var(--h-line-soft)!important}
.mut-cat-title b,.mut-recipe-section h4,.mut-chest b,.mut-log-row b{color:var(--h-title)!important}
.mut-hero p,.mut-recipe small,.mut-chest small,.mut-log-row time{color:var(--h-subtle)!important}
.mut-recipe img,.mut-chest-art img{background:var(--h-field-bg)!important;border:1px solid var(--h-line)!important}
.mut-ready{color:color-mix(in srgb,var(--h-accent3) 85%,#8cffaa)!important}

/* Clan raids + empty states */
[class*="clan-v-"] .clan-v-banner,
[class*="clan-v-"] .clan-v-room,
[class*="clan-v-"] .clan-v-card,
[class*="clan-v-"] .clan-v-empty,
[class*="clan-v-"] .clan-v-room-card,
[class*="clan-v-"] .clan-v-member,
[class*="clan-v-"] .clan-v-summary .clan-v-kpi{background:var(--h-surface-3)!important;border-color:var(--h-line-soft)!important;color:var(--h-body)!important}
[class*="clan-v-"] :is(h2,h3,h4,b,strong){color:var(--h-title)!important}
[class*="clan-v-"] :is(p,span,small,em){color:var(--h-subtle)!important}
[class*="clan-v-"] .clan-v-btn,
[class*="clan-v-"] .clan-v-pill{background:var(--h-chip-bg)!important;color:var(--h-chip-text)!important;border-color:var(--h-line)!important}

/* Businesses / work / inventory / profile shelf cards */
main :where([class*="biz-"],[class*="work-"],[class*="inventory-"],[class*="catalog-"]) :is(.panel,.panel-body,.floor-card,.item-card,.set-card,.work-task-card,.biz-card,.inventory-item,.reward-money,.drop-card){background:var(--h-surface-3)!important;border-color:var(--h-line-soft)!important;color:var(--h-body)!important}
main :where([class*="biz-"],[class*="work-"],[class*="inventory-"],[class*="catalog-"]) :is(b,strong,h3,h4){color:var(--h-title)!important}
main :where([class*="biz-"],[class*="work-"],[class*="inventory-"],[class*="catalog-"]) :is(p,small,span,em){color:var(--h-subtle)!important}

/* Scrollables / journals / tables */
main :where(.friend-room-journal,.invite-journal,.reward-section,.boss-stat-sheet,.admin-monitor-chart,.admin-usage-detail,.admin-users,.admin-log-users,.mp-admin-table-wrap){background:var(--h-surface-1)!important;border-color:var(--h-line)!important}
main :where(table tbody tr, .mp-admin-table tbody tr, .mp-admin-license-table tbody tr){background:rgba(255,255,255,.02)!important}
main :where(table th,table td,.mp-admin-table th,.mp-admin-table td){color:var(--h-body)!important;border-color:var(--h-line-soft)!important}

/* Theme-coloured buttons instead of beige actions. */
.btn,.mp-btn,.auth-btn,.mode-control,.action-card,.raid-chip,.mut-tab,.equipment-tab,.clan-v-btn{
  background:linear-gradient(180deg,color-mix(in srgb,var(--h-accent2) 72%,#2f1b20),color-mix(in srgb,var(--h-accent2) 52%,#120d10))!important;
  color:#fff!important;
  border-color:var(--h-line)!important;
}
.btn.light,.mp-btn.soft,.raid-chip:not(.active),.clan-v-btn.ghost{background:var(--h-chip-bg)!important;color:var(--h-body)!important;border-color:var(--h-line-soft)!important}

/* Strong readability for key stat numbers. */
main :where(.kpi b,.stat-card b,.ug-kpis article b,.friend-room-counters b,.clan-v-kpi b,.boss-stat-number b,.reward-money b,.invite-counter b,.raid-counter b,.metric strong,.ug-history-row b,.friend-room-code b,.profile-shelf-pill){color:var(--h-title)!important;text-shadow:none!important}
main :where(.kpi small,.stat-card small,.friend-room-counters small,.clan-v-kpi small,.reward-money small,.metric small){color:var(--h-subtle)!important}


/* v305 — differentiated theme personalities: blood / surgery / morgue feel distinct in surfaces, not only hues. */

/* SURGERY — sterile operating room, glass/teal, clinical UI. */
html[data-theme="surgery"]{
  --h-surface-1:linear-gradient(160deg,rgba(8,24,24,.92),rgba(6,14,15,.98));
  --h-surface-2:linear-gradient(135deg,rgba(24,74,68,.82),rgba(8,22,23,.96) 54%,rgba(4,12,13,.99));
  --h-surface-3:linear-gradient(160deg,rgba(205,255,241,.055),rgba(0,0,0,.20));
  --h-surface-4:linear-gradient(180deg,rgba(0,22,22,.34),rgba(255,255,255,.015));
  --h-field-bg:linear-gradient(180deg,rgba(4,18,19,.96),rgba(8,26,27,.992));
  --h-chip-bg:linear-gradient(180deg,rgba(202,255,244,.07),rgba(0,0,0,.22));
}
html[data-theme="surgery"] body{
  background:
    linear-gradient(180deg,rgba(4,10,11,.34),rgba(3,8,9,.9)),
    radial-gradient(circle at 80% 10%,rgba(94,194,168,.16),transparent 28%),
    radial-gradient(circle at 12% 14%,rgba(164,255,228,.08),transparent 18%),
    var(--h-page-image) center/cover fixed no-repeat!important;
}
html[data-theme="surgery"] body:before{opacity:.22!important}
html[data-theme="surgery"] .mh-horror-atmosphere:before{
  background:
    linear-gradient(180deg,rgba(24,88,76,.48),transparent 72%),
    repeating-linear-gradient(90deg,transparent 0 18%,rgba(180,255,235,.06) 18.8% 19.2%,transparent 20%)!important;
  opacity:.34!important;filter:blur(.25px)
}
html[data-theme="surgery"] .mh-horror-atmosphere:after{opacity:.028!important;mix-blend-mode:screen!important;filter:grayscale(.45) contrast(1.18)}
html[data-theme="surgery"] .topbar,
html[data-theme="surgery"] .panel,
html[data-theme="surgery"] .floor-card,
html[data-theme="surgery"] .hero,
html[data-theme="surgery"] .settings-section{
  box-shadow:0 26px 72px rgba(0,0,0,.56),0 0 26px rgba(94,194,168,.08),inset 0 0 0 1px rgba(191,255,241,.03)!important;
}
html[data-theme="surgery"] .topbar:before,
html[data-theme="surgery"] .panel:before,
html[data-theme="surgery"] .floor-card:before,
html[data-theme="surgery"] .hero:before{
  background:
    linear-gradient(105deg,transparent 0 34%,rgba(196,255,242,.035) 47%,transparent 61%),
    repeating-linear-gradient(90deg,transparent 0 84px,rgba(196,255,242,.018) 85px 86px)!important;
}
html[data-theme="surgery"] .panel-head,
html[data-theme="surgery"] .floor-head,
html[data-theme="surgery"] .profile-subpanel-head{
  background:
    linear-gradient(135deg,rgba(24,80,70,.88),rgba(9,29,30,.96) 58%,rgba(4,13,14,.99))!important;
}
html[data-theme="surgery"] .panel-head:after,
html[data-theme="surgery"] .floor-head:after{
  content:"";position:absolute;right:18px;top:0;width:88px;height:4px;
  background:linear-gradient(90deg,transparent,#73d5bf,#c5fff0,#73d5bf,transparent);opacity:.78
}
html[data-theme="surgery"] .btn,
html[data-theme="surgery"] .mode-control,
html[data-theme="surgery"] .action-card,
html[data-theme="surgery"] .mh-theme-card.active,
html[data-theme="surgery"] .mh-lang-btn.active{
  background:linear-gradient(180deg,rgba(29,102,88,.95),rgba(11,42,39,.985))!important;
  color:#effff9!important;
  border-color:rgba(94,194,168,.34)!important;
  box-shadow:0 14px 24px rgba(0,0,0,.32),0 0 14px rgba(94,194,168,.08),inset 0 1px rgba(255,255,255,.05)!important;
}
html[data-theme="surgery"] .btn.light,
html[data-theme="surgery"] .raid-chip:not(.active),
html[data-theme="surgery"] .clan-v-btn.ghost{background:linear-gradient(180deg,rgba(202,255,244,.06),rgba(0,0,0,.2))!important;color:var(--h-body)!important}
html[data-theme="surgery"] .metric:before,
html[data-theme="surgery"] .mh-search-trace-row i,
html[data-theme="surgery"] .mh-search-status-dot,
html[data-theme="surgery"] .mh-control-trigger:after{box-shadow:0 0 14px rgba(94,194,168,.34)!important}
html[data-theme="surgery"] .mh-search-status-dot,
html[data-theme="surgery"] .mh-control-trigger:after{background:radial-gradient(circle,#d4fff2,#67d4b8 56%,#1f6659)!important}
html[data-theme="surgery"] :where(.kpi,.stat-card,.friend-room-card,.friend-room-loot-card,.ug-kpis article,.ug-setting,.clan-v-room-card,.mut-category,.drop-card,.mode-control,.action-card){
  box-shadow:0 10px 20px rgba(0,0,0,.24),inset 0 1px rgba(216,255,246,.035),0 0 0 1px rgba(94,194,168,.03)!important;
}
html[data-theme="surgery"] :where(input,textarea,select){box-shadow:inset 0 10px 24px rgba(0,0,0,.34),0 0 0 1px rgba(94,194,168,.08)!important}
html[data-theme="surgery"] #homeHero .mh-search-board:before{
  background:
    repeating-linear-gradient(0deg,transparent 0 3px,rgba(220,255,247,.02) 4px),
    linear-gradient(135deg,transparent 0 32%,rgba(94,194,168,.08) 100%)!important;
}

/* MORGUE — icy steel, cold blue-gray, dead/institutional feel. */
html[data-theme="morgue"]{
  --h-surface-1:linear-gradient(160deg,rgba(10,17,25,.92),rgba(6,10,16,.985));
  --h-surface-2:linear-gradient(135deg,rgba(36,63,84,.82),rgba(10,19,28,.97) 56%,rgba(5,10,15,.995));
  --h-surface-3:linear-gradient(160deg,rgba(218,241,255,.05),rgba(0,0,0,.22));
  --h-surface-4:linear-gradient(180deg,rgba(0,10,20,.34),rgba(255,255,255,.015));
  --h-field-bg:linear-gradient(180deg,rgba(6,12,19,.96),rgba(11,19,28,.992));
  --h-chip-bg:linear-gradient(180deg,rgba(215,240,255,.06),rgba(0,0,0,.22));
}
html[data-theme="morgue"] body{
  background:
    linear-gradient(180deg,rgba(4,7,12,.38),rgba(2,4,8,.92)),
    radial-gradient(circle at 78% 8%,rgba(120,169,200,.13),transparent 30%),
    radial-gradient(circle at 14% 18%,rgba(198,235,255,.05),transparent 19%),
    var(--h-page-image) center/cover fixed no-repeat!important;
}
html[data-theme="morgue"] .mh-horror-atmosphere:before{
  background:
    linear-gradient(180deg,rgba(51,88,112,.46),transparent 72%),
    radial-gradient(ellipse at 15% 0,rgba(197,235,255,.09) 0 18px,transparent 19px),
    radial-gradient(ellipse at 72% 0,rgba(197,235,255,.07) 0 22px,transparent 23px)!important;
  opacity:.32!important;filter:blur(.2px)
}
html[data-theme="morgue"] .mh-horror-atmosphere:after{opacity:.025!important;mix-blend-mode:screen!important;filter:grayscale(.42) contrast(1.2)}
html[data-theme="morgue"] .topbar,
html[data-theme="morgue"] .panel,
html[data-theme="morgue"] .floor-card,
html[data-theme="morgue"] .hero,
html[data-theme="morgue"] .settings-section{
  box-shadow:0 26px 76px rgba(0,0,0,.58),0 0 26px rgba(120,169,200,.08),inset 0 0 0 1px rgba(228,245,255,.025)!important;
}
html[data-theme="morgue"] .topbar:before,
html[data-theme="morgue"] .panel:before,
html[data-theme="morgue"] .floor-card:before,
html[data-theme="morgue"] .hero:before{
  background:
    linear-gradient(108deg,transparent 0 34%,rgba(226,244,255,.03) 48%,transparent 62%),
    repeating-linear-gradient(90deg,transparent 0 88px,rgba(200,235,255,.015) 89px 90px)!important;
}
html[data-theme="morgue"] .panel-head,
html[data-theme="morgue"] .floor-head,
html[data-theme="morgue"] .profile-subpanel-head{
  background:
    linear-gradient(135deg,rgba(45,76,102,.84),rgba(11,22,32,.96) 58%,rgba(5,10,16,.99))!important;
}
html[data-theme="morgue"] .panel-head:after,
html[data-theme="morgue"] .floor-head:after{
  content:"";position:absolute;right:18px;top:0;width:88px;height:4px;
  background:linear-gradient(90deg,transparent,#7eaacc,#d8f4ff,#7eaacc,transparent);opacity:.72
}
html[data-theme="morgue"] .btn,
html[data-theme="morgue"] .mode-control,
html[data-theme="morgue"] .action-card,
html[data-theme="morgue"] .mh-theme-card.active,
html[data-theme="morgue"] .mh-lang-btn.active{
  background:linear-gradient(180deg,rgba(49,82,109,.95),rgba(14,26,38,.988))!important;
  color:#f3fbff!important;
  border-color:rgba(120,169,200,.34)!important;
  box-shadow:0 14px 24px rgba(0,0,0,.34),0 0 14px rgba(120,169,200,.07),inset 0 1px rgba(255,255,255,.05)!important;
}
html[data-theme="morgue"] .btn.light,
html[data-theme="morgue"] .raid-chip:not(.active),
html[data-theme="morgue"] .clan-v-btn.ghost{background:linear-gradient(180deg,rgba(218,241,255,.06),rgba(0,0,0,.22))!important;color:var(--h-body)!important}
html[data-theme="morgue"] .metric:before,
html[data-theme="morgue"] .mh-search-trace-row i,
html[data-theme="morgue"] .mh-search-status-dot,
html[data-theme="morgue"] .mh-control-trigger:after{box-shadow:0 0 14px rgba(120,169,200,.3)!important}
html[data-theme="morgue"] .mh-search-status-dot,
html[data-theme="morgue"] .mh-control-trigger:after{background:radial-gradient(circle,#eff9ff,#9ec9e5 56%,#416783)!important}
html[data-theme="morgue"] :where(.kpi,.stat-card,.friend-room-card,.friend-room-loot-card,.ug-kpis article,.ug-setting,.clan-v-room-card,.mut-category,.drop-card,.mode-control,.action-card){
  box-shadow:0 10px 20px rgba(0,0,0,.24),inset 0 1px rgba(235,247,255,.03),0 0 0 1px rgba(120,169,200,.03)!important;
}
html[data-theme="morgue"] :where(input,textarea,select){box-shadow:inset 0 10px 24px rgba(0,0,0,.34),0 0 0 1px rgba(120,169,200,.08)!important}
html[data-theme="morgue"] #homeHero .mh-search-board:before{
  background:
    repeating-linear-gradient(0deg,transparent 0 3px,rgba(228,245,255,.02) 4px),
    linear-gradient(135deg,transparent 0 34%,rgba(120,169,200,.07) 100%)!important;
}

/* BLOOD — make the violent theme also structurally different. */
html[data-theme="blood"]{
  --h-surface-1:linear-gradient(160deg,rgba(16,3,5,.93),rgba(5,1,2,.988));
  --h-surface-2:linear-gradient(135deg,rgba(106,4,12,.9),rgba(26,4,7,.98) 54%,rgba(7,1,2,.995));
  --h-surface-3:linear-gradient(160deg,rgba(255,220,220,.04),rgba(0,0,0,.24));
  --h-surface-4:linear-gradient(180deg,rgba(20,0,0,.34),rgba(255,255,255,.012));
  --h-field-bg:linear-gradient(180deg,rgba(10,2,3,.97),rgba(18,3,5,.994));
  --h-chip-bg:linear-gradient(180deg,rgba(255,198,198,.06),rgba(0,0,0,.24));
}
html[data-theme="blood"] .topbar:before,
html[data-theme="blood"] .panel:before,
html[data-theme="blood"] .floor-card:before,
html[data-theme="blood"] .hero:before{
  background:
    linear-gradient(108deg,transparent 0 35%,rgba(255,255,255,.022) 48%,transparent 61%),
    radial-gradient(circle at 12% 0,rgba(255,86,98,.05),transparent 18%)!important;
}
html[data-theme="blood"] :where(.kpi,.stat-card,.friend-room-card,.friend-room-loot-card,.ug-kpis article,.ug-setting,.clan-v-room-card,.mut-category,.drop-card,.mode-control,.action-card){
  box-shadow:0 10px 22px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.02),0 0 0 1px rgba(255,36,50,.04)!important;
}
html[data-theme="blood"] .btn.light,
html[data-theme="blood"] .raid-chip:not(.active),
html[data-theme="blood"] .clan-v-btn.ghost{background:linear-gradient(180deg,rgba(255,214,214,.05),rgba(0,0,0,.26))!important;color:var(--h-body)!important}

/* Distinct theme backgrounds for settings theme cards themselves. */
html[data-theme="blood"] .mh-theme-card[data-theme-choice="blood"]{background:linear-gradient(180deg,rgba(78,5,11,.74),rgba(21,3,5,.92))!important}
html[data-theme="blood"] .mh-theme-card[data-theme-choice="surgery"]{background:linear-gradient(180deg,rgba(22,60,54,.36),rgba(8,16,16,.9))!important}
html[data-theme="blood"] .mh-theme-card[data-theme-choice="morgue"]{background:linear-gradient(180deg,rgba(30,49,64,.38),rgba(8,14,20,.9))!important}
html[data-theme="surgery"] .mh-theme-card[data-theme-choice="blood"]{background:linear-gradient(180deg,rgba(78,5,11,.36),rgba(11,6,8,.9))!important}
html[data-theme="surgery"] .mh-theme-card[data-theme-choice="surgery"]{background:linear-gradient(180deg,rgba(18,76,66,.72),rgba(6,18,18,.92))!important}
html[data-theme="surgery"] .mh-theme-card[data-theme-choice="morgue"]{background:linear-gradient(180deg,rgba(30,49,64,.34),rgba(7,14,18,.9))!important}
html[data-theme="morgue"] .mh-theme-card[data-theme-choice="blood"]{background:linear-gradient(180deg,rgba(78,5,11,.34),rgba(10,6,8,.9))!important}
html[data-theme="morgue"] .mh-theme-card[data-theme-choice="surgery"]{background:linear-gradient(180deg,rgba(18,76,66,.34),rgba(6,16,16,.9))!important}
html[data-theme="morgue"] .mh-theme-card[data-theme-choice="morgue"]{background:linear-gradient(180deg,rgba(37,64,88,.72),rgba(8,14,20,.93))!important}

/* Make cards and stats feel different per-theme via accents. */
html[data-theme="surgery"] .kpi i,html[data-theme="surgery"] .stat-card i{background:linear-gradient(90deg,#5ec2a8,transparent)!important}
html[data-theme="morgue"] .kpi i,html[data-theme="morgue"] .stat-card i{background:linear-gradient(90deg,#78a9c8,transparent)!important}
html[data-theme="blood"] .kpi i,html[data-theme="blood"] .stat-card i{background:linear-gradient(90deg,#ff2432,transparent)!important}


/* v306 — HARD THEME RESET
   No legacy beige / parchment / brown surfaces. All major app areas derive from active theme. */
html[data-theme]{
  --t-bg:#07090c;
  --t-panel:#0d1218;
  --t-panel-2:#111923;
  --t-raised:#141e29;
  --t-raised-2:#192533;
  --t-field:#070d13;
  --t-text:#eef4f7;
  --t-muted:#9caeb9;
  --t-soft:#71838e;
  --t-accent:#78a9c8;
  --t-accent-2:#315b77;
  --t-border:rgba(120,169,200,.27);
  --t-border-soft:rgba(195,226,244,.10);
  --t-glow:rgba(120,169,200,.14);
  --t-good:#78c58a;
  --t-danger:#ed5965;
  --t-warn:#d8b66b;
  --t-shadow:0 16px 38px rgba(0,0,0,.34);
  --t-card:linear-gradient(155deg,var(--t-raised),var(--t-panel));
  --t-card-soft:linear-gradient(155deg,color-mix(in srgb,var(--t-raised) 86%,#fff 2%),var(--t-panel));
  --t-head:linear-gradient(115deg,color-mix(in srgb,var(--t-accent-2) 58%,var(--t-panel-2)),var(--t-panel) 64%,#06090d);
  --t-button:linear-gradient(180deg,color-mix(in srgb,var(--t-accent-2) 78%,#17202a),color-mix(in srgb,var(--t-accent-2) 42%,#090d12));
  --t-button-soft:linear-gradient(180deg,rgba(255,255,255,.055),rgba(0,0,0,.18));
}
html[data-theme="blood"]{
  --t-bg:#040102;
  --t-panel:#0c0305;
  --t-panel-2:#130407;
  --t-raised:#180509;
  --t-raised-2:#22070c;
  --t-field:#080103;
  --t-text:#fff2ef;
  --t-muted:#c7a7a9;
  --t-soft:#946f73;
  --t-accent:#ff3142;
  --t-accent-2:#8d0612;
  --t-border:rgba(255,49,66,.30);
  --t-border-soft:rgba(255,188,194,.09);
  --t-glow:rgba(255,49,66,.18);
  --t-card:linear-gradient(155deg,#1b0509,#090203);
  --t-card-soft:linear-gradient(155deg,#20060b,#0b0204);
  --t-head:linear-gradient(115deg,#6c0711,#20050a 58%,#090203);
  --t-button:linear-gradient(180deg,#8d0a17,#3d040a);
}
html[data-theme="surgery"]{
  --t-bg:#020a0a;
  --t-panel:#061413;
  --t-panel-2:#0a1d1b;
  --t-raised:#0d2421;
  --t-raised-2:#12302b;
  --t-field:#041110;
  --t-text:#effff9;
  --t-muted:#9abbb2;
  --t-soft:#688b82;
  --t-accent:#68d5ba;
  --t-accent-2:#226f61;
  --t-border:rgba(104,213,186,.28);
  --t-border-soft:rgba(202,255,242,.09);
  --t-glow:rgba(104,213,186,.13);
  --t-card:linear-gradient(155deg,#0e2824,#061311);
  --t-card-soft:linear-gradient(155deg,#12302b,#071714);
  --t-head:linear-gradient(115deg,#1e6659,#0b2925 58%,#04110f);
  --t-button:linear-gradient(180deg,#267764,#103d35);
}
html[data-theme="morgue"]{
  --t-bg:#04080d;
  --t-panel:#08111a;
  --t-panel-2:#0c1823;
  --t-raised:#10202d;
  --t-raised-2:#152a3a;
  --t-field:#050c13;
  --t-text:#f2f9ff;
  --t-muted:#9cb2c0;
  --t-soft:#6f8492;
  --t-accent:#83b5d4;
  --t-accent-2:#365f7b;
  --t-border:rgba(131,181,212,.28);
  --t-border-soft:rgba(218,241,255,.09);
  --t-glow:rgba(131,181,212,.13);
  --t-card:linear-gradient(155deg,#122431,#08111a);
  --t-card-soft:linear-gradient(155deg,#172b3a,#09141e);
  --t-head:linear-gradient(115deg,#315d79,#122635 58%,#070f17);
  --t-button:linear-gradient(180deg,#3b6c8b,#182e40);
}

/* Core surfaces: explicitly detach all high-level sections from legacy parchment palette. */
html[data-theme] body,
html[data-theme] main{color:var(--t-text)!important}
html[data-theme] :where(.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.settings-section,.ug-panel,.clan-v-panel,.clan-v-banner,.friend-room-card,.mut-game-shell,.admin-hero,.mp-hero,.mp-plan){
  background:var(--t-card)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
  box-shadow:var(--t-shadow),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme] :where(.panel-head,.floor-head,.profile-subpanel-head,.settings-section>.panel-head,.clan-v-panel-header,.invite-journal-head,.friend-room-journal-head,.reward-section-title,.equipment-auto-head){
  background:var(--t-head)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
}
html[data-theme] :where(.panel-body,.floor-body,.profile-subpanel-body,.clan-v-panel-content,.clan-v-rooms){
  background:linear-gradient(180deg,rgba(255,255,255,.012),rgba(0,0,0,.07))!important;
  color:var(--t-text)!important;
}
html[data-theme] :where(h1,h2,h3,h4,h5,h6,b,strong){color:var(--t-text)!important}
html[data-theme] :where(p,small,em,label,.muted,.head-meta){color:var(--t-muted)!important}
html[data-theme] .eyebrow{color:var(--t-accent)!important}

/* All generic controls: no tan/brown buttons remain. */
html[data-theme] :where(.btn,.mp-btn,.auth-btn,.mode-control,.action-card,.raid-chip,.mut-tab,.equipment-tab,.clan-v-btn,.collapse-button,.friend-member-remove){
  background:var(--t-button)!important;
  border-color:var(--t-border)!important;
  color:var(--t-text)!important;
  box-shadow:0 8px 20px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.04)!important;
}
html[data-theme] :where(.btn.light,.mp-btn.soft,.raid-chip:not(.active),.clan-v-btn.ghost,.collapse-button){
  background:var(--t-button-soft)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border-soft)!important;
}
html[data-theme] :where(input,textarea,select){
  background:var(--t-field)!important;
  border-color:var(--t-border)!important;
  color:var(--t-text)!important;
  box-shadow:inset 0 8px 22px rgba(0,0,0,.36)!important;
}
html[data-theme] :where(input::placeholder,textarea::placeholder){color:var(--t-soft)!important}
html[data-theme] select option{background:var(--t-panel)!important;color:var(--t-text)!important}

/* ===== MODES / FRIEND ROOM: full reset ===== */
html[data-theme] .boss-modes-page{
  --bm-ink:var(--t-text)!important;--bm-strong:var(--t-text)!important;--bm-muted:var(--t-muted)!important;--bm-soft:var(--t-soft)!important;
  --bm-paper:var(--t-panel)!important;--bm-paper-2:var(--t-raised)!important;--bm-panel:var(--t-panel-2)!important;--bm-line:var(--t-border)!important;
  --bm-brown:var(--t-accent-2)!important;--bm-brown-2:var(--t-panel)!important;--bm-gold:var(--t-accent)!important;--bm-purple:var(--t-accent-2)!important;--bm-purple-2:var(--t-accent-2)!important;
}
html[data-theme] .boss-modes-page .panel{background:var(--t-card)!important;box-shadow:var(--t-shadow)!important}
html[data-theme] .boss-modes-page .panel-head{background:var(--t-head)!important;border-bottom-color:var(--t-border)!important}
html[data-theme] .boss-modes-page .panel-body{background:transparent!important;color:var(--t-text)!important}
html[data-theme] .boss-modes-page .modes-head-status,
html[data-theme] .boss-modes-page .modes-tabs button,
html[data-theme] .boss-modes-page .mode-boss-mini,
html[data-theme] .boss-modes-page .mode-filter-switch button,
html[data-theme] .boss-modes-page .mode-choice,
html[data-theme] .boss-modes-page .mode-flags label,
html[data-theme] .boss-modes-page .mode-wide-check,
html[data-theme] .boss-modes-page .mode-friend-card,
html[data-theme] .boss-modes-page .friend-goal,
html[data-theme] .boss-modes-page .boss-info-stats-grid>div,
html[data-theme] .boss-modes-page .friend-code-join,
html[data-theme] .boss-modes-page .friend-room-code,
html[data-theme] .boss-modes-page .friend-room-card,
html[data-theme] .boss-modes-page .friend-room-counters>div,
html[data-theme] .boss-modes-page .friend-add-members,
html[data-theme] .boss-modes-page .friend-registered-card,
html[data-theme] .boss-modes-page .friend-schedule-field,
html[data-theme] .boss-modes-page .friend-launch-box,
html[data-theme] .boss-modes-page .friend-confirm-box,
html[data-theme] .boss-modes-page .friend-room-journal,
html[data-theme] .boss-modes-page .friend-room-player,
html[data-theme] .boss-modes-page .friend-room-loot-card,
html[data-theme] .boss-modes-page .friend-currency-goals>label,
html[data-theme] .boss-modes-page .mode-all-boss-note,
html[data-theme] .boss-modes-page .friend-active-title>span{
  background:var(--t-card-soft)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
  box-shadow:0 8px 20px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme] .boss-modes-page .modes-tabs button.active,
html[data-theme] .boss-modes-page .mode-filter-switch button.active,
html[data-theme] .boss-modes-page .mode-choice.active,
html[data-theme] .boss-modes-page .friend-goal.selected,
html[data-theme] .boss-modes-page .friend-registered-card.selected{
  background:linear-gradient(160deg,color-mix(in srgb,var(--t-accent-2) 62%,var(--t-raised)),var(--t-panel))!important;
  border-color:var(--t-accent)!important;
  color:var(--t-text)!important;
  box-shadow:0 0 0 1px var(--t-border),0 10px 26px rgba(0,0,0,.3),0 0 18px var(--t-glow)!important;
}
html[data-theme] .boss-modes-page .modes-tabs button>span,
html[data-theme] .boss-modes-page .mode-friend-card>span,
html[data-theme] .boss-modes-page .friend-registered-card>span,
html[data-theme] .boss-modes-page .friend-room-player>span,
html[data-theme] .boss-modes-page .friend-room-player-mark{
  background:linear-gradient(145deg,var(--t-raised-2),var(--t-field))!important;
  border:1px solid var(--t-border)!important;
  color:var(--t-accent)!important;
}
html[data-theme] .boss-modes-page :where(.modes-tabs button b,.modes-tabs button.active b,.modes-tabs button.active small,.friend-code-join h3,.friend-room-code b,.friend-goal b,.friend-room-head h4,.friend-room-player b,.friend-room-loot-card b,.friend-create-step b,.friend-active-title h3){color:var(--t-text)!important}
html[data-theme] .boss-modes-page :where(.modes-tabs button small,.modes-head-status small,.friend-code-join p,.friend-room-code small,.friend-room-code span,.friend-goal small,.friend-room-head small,.friend-room-head p,.friend-room-player small,.friend-room-loot-card small,.friend-create-step small,.friend-active-title p){color:var(--t-muted)!important;opacity:1!important}
html[data-theme] .boss-modes-page .friend-code-form input,
html[data-theme] .boss-modes-page .friend-currency-goals input,
html[data-theme] .boss-modes-page .friend-schedule-field input{background:var(--t-field)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}
html[data-theme] .boss-modes-page .friend-room-loot-card img,
html[data-theme] .boss-modes-page .friend-goal img,
html[data-theme] .boss-modes-page .friend-room-loot-card.currency img,
html[data-theme] .boss-modes-page .friend-room-loot-card.currency.owned img{background:var(--t-field)!important;border:1px solid var(--t-border-soft)!important}
html[data-theme] .boss-modes-page .friend-room-card.active{background:var(--t-card)!important;border-color:var(--t-border)!important;color:var(--t-text)!important}
html[data-theme] .boss-modes-page .friend-room-card.active :where(.friend-room-counters>div,.friend-add-members,.friend-room-journal,.friend-registered-card,.friend-room-loot-card){background:var(--t-card-soft)!important;color:var(--t-text)!important}
html[data-theme] .boss-modes-page .friend-launch-box.ready{background:linear-gradient(160deg,color-mix(in srgb,var(--t-good) 14%,var(--t-raised)),var(--t-panel))!important;border-color:color-mix(in srgb,var(--t-good) 45%,var(--t-border))!important}
html[data-theme] .boss-modes-page .friend-launch-box.starting{background:linear-gradient(160deg,color-mix(in srgb,var(--t-warn) 12%,var(--t-raised)),var(--t-panel))!important}
html[data-theme] .boss-modes-page .mode-friend-hero{background:var(--t-head)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}
html[data-theme] .boss-modes-page .mode-sticky-actions{background:color-mix(in srgb,var(--t-panel) 92%,transparent)!important;border-color:var(--t-border-soft)!important}

/* ===== CLAN RAIDS: remove every parchment panel ===== */
html[data-theme] .clan-v-panel,
html[data-theme] .clan-v-panel-content,
html[data-theme] .clan-v-picker,
html[data-theme] .clan-v-chip,
html[data-theme] .clan-v-empty,
html[data-theme] .clan-v-joined,
html[data-theme] .clan-v-invite,
html[data-theme] .clan-v-item-preview,
html[data-theme] .clan-v-room,
html[data-theme] .clan-v-room-player,
html[data-theme] .clan-v-room-item,
html[data-theme] .clan-v-mini-items span,
html[data-theme] .clan-v-person,
html[data-theme] .clan-v-current,
html[data-theme] .clan-v-drop,
html[data-theme] .clan-v-boss{
  background:var(--t-card-soft)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
}
html[data-theme] .clan-v-panel-header{background:var(--t-head)!important;border-bottom-color:var(--t-border)!important}
html[data-theme] .clan-v-picker,
html[data-theme] .clan-v-empty,
html[data-theme] .clan-v-joined,
html[data-theme] .clan-v-invite{box-shadow:0 10px 24px rgba(0,0,0,.22)!important}
html[data-theme] .clan-v-empty-icon,
html[data-theme] .clan-v-avatar,
html[data-theme] .clan-v-room-head>img,
html[data-theme] .clan-v-drop-art,
html[data-theme] .clan-v-current img{background:var(--t-field)!important;color:var(--t-accent)!important;border-color:var(--t-border)!important}
html[data-theme] .clan-v :where(h2,h3,h4,b,strong,.clan-v-person-text b,.clan-v-picker-heading b,.clan-v-subheading b){color:var(--t-text)!important}
html[data-theme] .clan-v :where(p,small,em,.clan-v-subtle,.clan-v-person-text small,.clan-v-picker-heading small,.clan-v-subheading small,.clan-v-room-head p,.clan-v-room-head small,.clan-v-room-player small,.clan-v-drop-label small){color:var(--t-muted)!important}
html[data-theme] .clan-v-chip.active,
html[data-theme] .clan-v-boss.selected,
html[data-theme] .clan-v-drop.is-selected{background:linear-gradient(160deg,color-mix(in srgb,var(--t-accent-2) 58%,var(--t-raised)),var(--t-panel))!important;border-color:var(--t-accent)!important;color:var(--t-text)!important}
html[data-theme] .clan-v-meter{background:var(--t-field)!important}.clan-v-meter span{background:var(--t-accent)!important}

/* ===== UNDERGROUND: intro/fallback cards and every pale PvP surface ===== */
html[data-theme] :where(.ug-hero,.ug-toggle,.ug-kpis article,.ug-priority-intro,.ug-priority-card,.ug-fallback-card,.ug-priority-explain,.ug-setting,.ug-limit-note,.ug-limit-card,.ug-fighter,.ug-candidate,.ug-history-row,.ug-header-metric){
  background:var(--t-card-soft)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.22)!important;
}
html[data-theme] .ug-hero{background:var(--t-head)!important}
html[data-theme] .ug-hero-icon,.ug-candidate img,.ug-fighter img{background:var(--t-field)!important;border-color:var(--t-border)!important}
html[data-theme] .ug-page :where(h3,h4,b,strong,.ug-priority-intro b,.ug-fallback-copy b,.ug-kpis article b,.ug-setting b,.ug-candidate b,.ug-history-row b){color:var(--t-text)!important}
html[data-theme] .ug-page :where(p,small,span,.ug-fallback-copy small,.ug-fallback-input,.ug-kpis article small,.ug-setting small,.ug-candidate small,.ug-history-row small){color:var(--t-muted)!important}
html[data-theme] .ug-fallback-input input,.ug-dual-budget input{background:var(--t-field)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}
html[data-theme] .ug-priority-card.active{background:linear-gradient(160deg,color-mix(in srgb,var(--t-accent-2) 60%,var(--t-raised)),var(--t-panel))!important;border-color:var(--t-accent)!important}
html[data-theme] .ug-limit-card.is-exhausted{background:linear-gradient(160deg,color-mix(in srgb,var(--t-danger) 14%,var(--t-raised)),var(--t-panel))!important;border-color:color-mix(in srgb,var(--t-danger) 45%,var(--t-border))!important;color:var(--t-text)!important}

/* ===== AUTO STATS / EQUIPMENT: eliminate cream cards ===== */
html[data-theme] .stat-upgrade-card.stat-upgrade-card-v127,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-card.stat-upgrade-card-v127,
html[data-theme] .stat-settings-unified .stat-upgrade-card.stat-upgrade-card-v127,
html[data-theme] .equipment-auto-card,
html[data-theme] .equipment-status-row,
html[data-theme] .equipment-currency-card,
html[data-theme] .equipment-master-switch,
html[data-theme] .equipment-auto-note{
  background:var(--t-card-soft)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme] .stat-upgrade-card.stat-upgrade-card-v127.selected,
html[data-theme] .equipment-currency-card.selected{background:linear-gradient(160deg,color-mix(in srgb,var(--t-accent-2) 56%,var(--t-raised)),var(--t-panel))!important;border-color:var(--t-accent)!important}
html[data-theme] .stat-upgrade-card-v127 .stat-upgrade-icon,
html[data-theme] .stat-fixed-target,
html[data-theme] .stat-v127-bottom>span,
html[data-theme] .equipment-item-art,
html[data-theme] .equipment-currency-title>span,
html[data-theme] .equipment-currency-check{background:var(--t-field)!important;border-color:var(--t-border)!important;color:var(--t-text)!important}
html[data-theme] .stat-upgrade-card-v127 .stat-upgrade-bar,
html[data-theme] .equipment-level-bar{background:var(--t-field)!important}
html[data-theme] .stat-upgrade-card-v127 .stat-upgrade-bar i,
html[data-theme] .equipment-level-bar i{background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important;box-shadow:0 0 12px var(--t-glow)!important}
html[data-theme] :where(.stat-v127-title b,.stat-fixed-target b,.stat-v127-bottom b,.equipment-item-main h4,.equipment-level-line b,.equipment-status-row b,.equipment-currency-title b,.equipment-currency-copy b){color:var(--t-text)!important}
html[data-theme] :where(.stat-v127-title small,.stat-fixed-target small,.stat-v127-bottom small,.equipment-level-line,.equipment-status-row small,.equipment-status-row time,.equipment-currency-title small,.equipment-currency-copy small,.equipment-auto-note){color:var(--t-muted)!important}
html[data-theme] .equipment-tab{background:var(--t-button-soft)!important;color:var(--t-text)!important;border-color:var(--t-border-soft)!important}
html[data-theme] .equipment-tab.active{background:var(--t-button)!important;border-color:var(--t-accent)!important;color:var(--t-text)!important}
html[data-theme] .equipment-master-switch i{background:var(--t-field)!important;border-color:var(--t-border)!important}
html[data-theme] .equipment-master-switch i:after{background:var(--t-text)!important}
html[data-theme] .equipment-master-switch input:checked+i{background:var(--t-accent-2)!important;border-color:var(--t-accent)!important}
html[data-theme] .equipment-auto-card.max,.equipment-master-switch.done{background:linear-gradient(160deg,color-mix(in srgb,var(--t-good) 10%,var(--t-raised)),var(--t-panel))!important}

/* ===== BUSINESSES / MUTAGENS ===== */
html[data-theme] .biz-upgrade-feature,
html[data-theme] .biz-upgrade-page,
html[data-theme] .biz-upgrade-art-stack,
html[data-theme] .mut-game-shell,
html[data-theme] .mut-game-tabs,
html[data-theme] .mut-category,
html[data-theme] .mut-recipe-section,
html[data-theme] .mut-chest,
html[data-theme] .mut-switchrow,
html[data-theme] .mut-budget,
html[data-theme] .mut-category label:not(.switch),
html[data-theme] .mut-main-img,
html[data-theme] .mut-legend span,
html[data-theme] .mut-log,
html[data-theme] .mut-log-row{
  background:var(--t-card-soft)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.2)!important;
}
html[data-theme] .biz-upgrade-art-stack img,
html[data-theme] .mut-cat-emblem,
html[data-theme] .mut-recipe img,
html[data-theme] .mut-chest-art,
html[data-theme] .mut-chest-art img{background:var(--t-field)!important;border-color:var(--t-border)!important}
html[data-theme] .mut-page :where(h3,h4,b,strong),html[data-theme] .biz-upgrade-feature b{color:var(--t-text)!important}
html[data-theme] .mut-page :where(p,small,span,em),html[data-theme] .biz-upgrade-feature small,html[data-theme] .biz-upgrade-note{color:var(--t-muted)!important}
html[data-theme] .mut-category input[type=number],html[data-theme] .mut-budget input{background:var(--t-field)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}

/* ===== SETTINGS: no brown section headers or beige tiles ===== */
html[data-theme] .settings-v201 .settings-section>.panel-head,
html[data-theme] .settings-v201 .auth-session-panel>.panel-head,
html[data-theme] .settings-v201 .settings-visibility-panel>.panel-head,
html[data-theme] .settings-v201 .business-upgrade-section>.panel-head{background:var(--t-head)!important;border-color:var(--t-border)!important}
html[data-theme] .settings-v201 .settings-section>.panel-body{background:transparent!important;color:var(--t-text)!important}
html[data-theme] .settings-v201 :where(.mode-visibility-tile,.auth-session-summary>div,.settings-biz-compact,.combat-item-setting,.stat-upgrade-card,.invite-boss-pick,.invite-mode,.switchrow,.settings-card){background:var(--t-card-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}
html[data-theme] .settings-v201 :where(.settings-section-heading h3,.mode-visibility-text b,.auth-session-summary b,.settings-biz-text b){color:var(--t-text)!important}
html[data-theme] .settings-v201 :where(.settings-section-heading p,.mode-visibility-text small,.auth-session-summary span,.settings-biz-text small,.settings-inline-note){color:var(--t-muted)!important}
html[data-theme] .settings-section-symbol,.settings-head-emblem,.mode-visibility-icon{background:var(--t-field)!important;border-color:var(--t-border)!important;color:var(--t-accent)!important}

/* Explicitly neutralize legacy brown accent classes where screenshots still exposed them. */
html[data-theme] :where(.action-card-stop,.action-card-settings,.mode-primary,.friend-launch-btn,.friend-stop-btn,.settings-business-badge,.clan-v-pill,.equipment-max-badge,.equipment-currency-chance){
  background:var(--t-button)!important;border-color:var(--t-border)!important;color:var(--t-text)!important;
}
html[data-theme] :where(.tag,.floor-badge,.auth-session-badge,.clan-v-pill,.friend-room-role,.friend-ready-pill,.mode-control-state,.equipment-max-badge,.settings-business-badge){
  background:var(--t-button-soft)!important;border-color:var(--t-border)!important;color:var(--t-accent)!important;
}

/* Theme preview cards: actual data attribute used by JS. */
html[data-theme] .mh-theme-card[data-mp-theme]{background:var(--t-panel)!important}
html[data-theme] .mh-theme-card[data-mp-theme="blood"]:after{background:linear-gradient(180deg,rgba(40,0,4,.1),rgba(10,1,2,.96))!important}
html[data-theme] .mh-theme-card[data-mp-theme="surgery"]:after{background:linear-gradient(180deg,rgba(0,44,38,.08),rgba(3,16,14,.96))!important}
html[data-theme] .mh-theme-card[data-mp-theme="morgue"]:after{background:linear-gradient(180deg,rgba(0,28,45,.08),rgba(4,11,17,.96))!important}

/* Keep semantic green/red states, but never beige. */
html[data-theme] .btn.green{background:linear-gradient(180deg,#3c7750,#1c432b)!important;border-color:#5a9a69!important;color:#fff!important}
html[data-theme] .btn.red,.danger{background:linear-gradient(180deg,#9d1724,#4f0710)!important;border-color:#c32d3d!important;color:#fff!important}


/* v307 — NO-PARCHMENT GUARD: legacy variable remap + remaining page-specific warm surfaces. */
html[data-theme]{
  --ink:var(--t-text)!important;
  --dark:var(--t-bg)!important;
  --dark2:var(--t-panel)!important;
  --brown:var(--t-panel-2)!important;
  --brown2:var(--t-raised)!important;
  --copper:var(--t-accent-2)!important;
  --gold:var(--t-accent)!important;
  --paper:var(--t-panel)!important;
  --paper2:var(--t-raised)!important;
  --cream:var(--t-text)!important;
  --muted:var(--t-muted)!important;
  --red:var(--t-danger)!important;
  --red2:var(--t-danger)!important;
  --line:var(--t-border)!important;
}

/* Boss catalogue / info page */
html[data-theme] #bossGrid>.catalog-floor,
html[data-theme] .catalog-floor-head,
html[data-theme] .catalog-floor>.panel-body,
html[data-theme] .catalog-floor-grid .boss-card,
html[data-theme] .catalog-floor-grid .tag,
html[data-theme] .catalog-floor-grid .mini-hp,
html[data-theme] .catalog-floor-grid .boss-favorite.boss-bookmark-icon,
html[data-theme] .catalog-floor-grid .boss-target-button,
html[data-theme] .boss-info-stats-grid>div{
  background:var(--t-card-soft)!important;
  color:var(--t-text)!important;
  border-color:var(--t-border)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.22)!important;
}
html[data-theme] .catalog-floor-head{background:var(--t-head)!important}
html[data-theme] .catalog-floor-grid .boss-floor{background:var(--t-accent-2)!important;color:var(--t-text)!important}
html[data-theme] .catalog-floor-grid .mini-hp{background:var(--t-field)!important}
html[data-theme] .catalog-floor-grid .boss-target-button,
html[data-theme] .catalog-floor-grid .boss-favorite.boss-bookmark-icon.on{background:var(--t-button)!important;color:var(--t-text)!important}
html[data-theme] .catalog-floor-head .collapse-button{background:var(--t-button-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}

/* Raids */
html[data-theme] .raid-page :where(.raid-hero,.raid-queue-card,.raid-boss-tile,.raid-editor-top,.raid-drop-choice,.raid-friend-picker,.raid-friend-options label,.raid-editor-panel,.raid-empty,.raid-filter-grid input,.raid-filter-grid select),
html[data-theme] :where(.raid-queue-card,.raid-boss-tile,.raid-editor-top,.raid-drop-choice,.raid-friends label){
  background:var(--t-card-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important;
}
html[data-theme] .raid-page .raid-hero{background:var(--t-head)!important;box-shadow:var(--t-shadow)!important}
html[data-theme] .raid-page :where(.raid-queue-copy>b,.raid-boss-copy h4,.raid-editor-top>div,.raid-drop-choice b,.raid-empty b){color:var(--t-text)!important}
html[data-theme] .raid-page :where(.raid-queue-copy>small,.raid-boss-copy>small,.raid-editor-top small,.raid-drop-choice small,.raid-note,.raid-filter-meta,.raid-filter-grid label){color:var(--t-muted)!important}
html[data-theme] .raid-page :where(.raid-boss-art img,.raid-queue-card>img,.raid-drop-icon){background:var(--t-field)!important;border-color:var(--t-border)!important}
html[data-theme] .raid-page .raid-drop-choice.is-owned{background:linear-gradient(160deg,color-mix(in srgb,var(--t-good) 12%,var(--t-raised)),var(--t-panel))!important}
html[data-theme] .raid-page .raid-start,.raid-page .raid-add{background:var(--t-button)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}

/* Daily reports / rewards */
html[data-theme] :where(.mh-day-kpi,.mh-daily-dialog,.mh-daily-header,.mh-daily-picker,.mh-daily-boss,.mh-daily-boss-head,.mh-daily-drop,.mh-daily-empty,.mh-daily-clear-panel,.mh-daily-focus,.daily-reward-day,.daily-reward-received){
  background:var(--t-card-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important;
}
html[data-theme] .mh-daily-header{background:var(--t-head)!important}
html[data-theme] :where(.mh-daily-picker input,.mh-daily-picker button,.mh-daily-archive button,.mh-daily-metric-tabs button){background:var(--t-field)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}
html[data-theme] :where(.mh-daily-archive button.active,.mh-daily-metric-tabs button.active){background:var(--t-button)!important;color:var(--t-text)!important;border-color:var(--t-accent)!important}
html[data-theme] :where(.mh-day-kpi b,.mh-daily-boss h3,.mh-daily-focus strong){color:var(--t-text)!important}
html[data-theme] :where(.mh-day-kpi small,.mh-daily-boss p,.mh-daily-focus span){color:var(--t-muted)!important}

/* Stash / popup / reward surfaces */
html[data-theme] :where(.stash-modal,.stash-ingredient,.reward-popup-card,.invite-summary,.invite-flags label,.boss-invite-panel .panel-body,.invite-stats-shell.waiting){
  background:var(--t-card-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important;
}
html[data-theme] .stash-ingredient.missing{background:linear-gradient(160deg,color-mix(in srgb,var(--t-danger) 11%,var(--t-raised)),var(--t-panel))!important}
html[data-theme] .stash-modal-head button{background:var(--t-button-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important}

/* General settings cards left from old generations */
html[data-theme] :where(.settings-card,.settings-card .settings-mode-row .invite-mode,.combat-rule>span,.autobuy-fields input,.boss-friend-picker,.boss-friend-picker .raid-friend-filter-grid input,.boss-friend-picker .raid-friend-filter-grid select){
  background:var(--t-card-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important;
}
html[data-theme] .settings-card .settings-mode-row .invite-mode.active{background:var(--t-button)!important;border-color:var(--t-accent)!important;color:var(--t-text)!important}
html[data-theme] .settings-card :where(.invite-mode b,.invite-fresh-switch b){color:var(--t-text)!important}
html[data-theme] .settings-card :where(.invite-mode small,.invite-fresh-switch small){color:var(--t-muted)!important}

/* Mutagen game UI remaining cream controls */
html[data-theme] .mut-game-page :where(.mut-side,.mut-main,.mut-type-btn,.mut-craft-controls input,.mut-pills-indicator,.mut-recipe-badge,.mut-chest-pick,.mut-chest-detail-art,.mut-ing-card,.mut-chest-live-timer,.mut-orn img,.mut-claim-item,.mut-craft-price,.mut-reward-tabs button,.mut-craft-status,.mut-flow-block,.mut-craft-meta>div,.mut-compact-recipe,.mut-compact-item img,.mut-compact-cost){
  background:var(--t-card-soft)!important;color:var(--t-text)!important;border-color:var(--t-border)!important;
}
html[data-theme] .mut-game-page :where(.mut-type-btn.active,.mut-chest-pick.active,.mut-reward-tabs button.active){background:var(--t-button)!important;border-color:var(--t-accent)!important}
html[data-theme] .mut-game-page :where(.mut-craft-status.warn,.mut-compact-recipe.mut-recipe-insufficient){background:linear-gradient(160deg,color-mix(in srgb,var(--t-warn) 12%,var(--t-raised)),var(--t-panel))!important}

/* Legacy icon/background tiles */
html[data-theme] :where(.nav-emblem,.mobile-menu-sigil,.settings-head-emblem,.settings-section-symbol,.mode-visibility-icon,.stat-upgrade-icon,.combat-item-setting-icon,.scene-chip-thumb,.ornament-thumb,.raid-hero-art,.raid-drop-icon,.friend-avatar,.invite-player-avatar){
  background:var(--t-field)!important;color:var(--t-accent)!important;border-color:var(--t-border)!important;
}

/* Any structural card/panel accidentally left with a warm hardcoded background gets a themed base.
   Limited to structural tags so text badges/icons aren't flattened. */
html[data-theme] main :where(section,article,div)[class*="-card"]:not(.auth-frame):not(.mh-theme-card),
html[data-theme] main :where(section,article,div)[class*="-panel"]:not(.panel-body),
html[data-theme] main :where(section,article,div)[class*="-box"],
html[data-theme] main :where(section,article,div)[class*="-tile"]{
  border-color:var(--t-border-soft)!important;
}


/* v308 — FINAL VISUAL CONSISTENCY PASS
   Screenshot-driven cleanup: no brown/beige/gray legacy cards. Text palette is unique per theme. */
html[data-theme]{
  --tx-title:#f3f7fa;
  --tx-body:#c9d5dc;
  --tx-muted:#8fa1ac;
  --tx-label:#91bfd9;
  --tx-number:#f5fbff;
  --tx-dim:#667984;
  --ui-line:var(--t-border);
  --ui-soft:var(--t-border-soft);
  --ui-card:var(--t-card-soft);
  --ui-card-strong:var(--t-card);
  --ui-field:var(--t-field);
}
html[data-theme="blood"]{
  --tx-title:#fff6f3;
  --tx-body:#e7c8ca;
  --tx-muted:#b98d92;
  --tx-label:#ff727d;
  --tx-number:#ffd8c7;
  --tx-dim:#815f64;
}
html[data-theme="surgery"]{
  --tx-title:#effff9;
  --tx-body:#c3e9df;
  --tx-muted:#7fa99f;
  --tx-label:#75dfc5;
  --tx-number:#d9fff4;
  --tx-dim:#547a71;
}
html[data-theme="morgue"]{
  --tx-title:#f3faff;
  --tx-body:#c8dce8;
  --tx-muted:#839eaf;
  --tx-label:#8bc4e7;
  --tx-number:#e7f7ff;
  --tx-dim:#607989;
}

/* Typography: each theme has its own readable text family of colors. */
html[data-theme] main :where(h1,h2,h3,h4,h5,h6,.panel-head b,.panel-head strong){color:var(--tx-title)!important}
html[data-theme] main :where(p,li,.panel-body>span,.panel-body>div>span){color:var(--tx-body)!important}
html[data-theme] main :where(small,em,.muted,.head-meta,.settings-inline-note,.item-effect){color:var(--tx-muted)!important}
html[data-theme] main :where(.eyebrow,[class*="-kicker"],[class*="-label"],.inventory-section-head small,.mut-selected-kicker){color:var(--tx-label)!important}
html[data-theme] main :where(.qty,.kpi b,.stat-card b,.admin-server-kpi b,.weapon-stat-grid b,.stat-v127-title b,.equipment-item-main h4){color:var(--tx-number)!important}

/* SETTINGS — combat items / healing / autobuy. */
html[data-theme] .combat-items-settings :where(.combat-item-setting,.autobuy-card,.combat-rule,.combat-rule>div>.autobuy-card,.switchrow){
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.25),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme] .combat-items-settings .combat-rule{background:linear-gradient(160deg,var(--t-panel-2),var(--t-panel))!important}
html[data-theme] .combat-items-settings :where(.combat-item-setting b,.autobuy-copy>b,.combat-rule>b,.combat-rule .switchrow b){color:var(--tx-title)!important}
html[data-theme] .combat-items-settings :where(.combat-item-setting small,.combat-item-setting em,.autobuy-copy small,.combat-rule small,.autobuy-fields label,.combat-rule .switchrow>span){color:var(--tx-muted)!important}
html[data-theme] .combat-items-settings :where(.combat-item-setting-icon,.combat-rule>span){background:var(--t-field)!important;border-color:var(--ui-line)!important;color:var(--t-accent)!important}
html[data-theme] .combat-items-settings .autobuy-fields input{background:var(--t-field)!important;color:var(--tx-number)!important;border-color:var(--ui-line)!important}
html[data-theme] .combat-items-settings hr{border-top-color:var(--ui-line)!important}
html[data-theme] .combat-autobuy-grid .autobuy-card.enabled,.combat-items-settings .combat-item-setting.enabled{background:linear-gradient(155deg,color-mix(in srgb,var(--t-accent-2) 18%,var(--t-raised)),var(--t-panel))!important}

/* INVITATIONS settings — remove the remaining selected beige card. */
html[data-theme] :where(.invite-mode,.invite-follow-summary,.invite-summary,.invite-fresh-switch,.invite-flags label,.invite-boss-pick,.invite-hint){
  background:var(--ui-card)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important;box-shadow:none!important;
}
html[data-theme] .invite-mode.active{background:linear-gradient(155deg,color-mix(in srgb,var(--t-accent-2) 70%,var(--t-raised)),var(--t-panel))!important;border-color:var(--t-accent)!important;box-shadow:0 0 0 1px var(--ui-line),0 0 18px var(--t-glow)!important}
html[data-theme] :where(.invite-mode b,.invite-follow-summary b,.invite-summary b,.invite-flags b,.invite-boss-pick b,.invite-hint b){color:var(--tx-title)!important}
html[data-theme] :where(.invite-mode small,.invite-follow-summary small,.invite-summary small,.invite-flags small,.invite-boss-pick small,.invite-hint){color:var(--tx-muted)!important}

/* AUTO STAT UPGRADE — eradicate beige/gray subtiles and brown typography. */
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .stat-upgrade-card.stat-upgrade-card-v127,.stat-settings-unified .stat-upgrade-card.stat-upgrade-card-v127){
  background:var(--ui-card)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important;box-shadow:0 8px 22px rgba(0,0,0,.24)!important;filter:none!important;opacity:1!important;
}
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .stat-upgrade-card.selected,.stat-settings-unified .stat-upgrade-card.selected){border-color:var(--t-accent)!important;box-shadow:0 0 0 1px var(--ui-line),0 0 18px var(--t-glow)!important}
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .stat-upgrade-icon,.stat-settings-unified .stat-upgrade-icon,.profile-subpanel.stat-upgrade-shell .stat-fixed-target,.stat-settings-unified .stat-fixed-target,.profile-subpanel.stat-upgrade-shell .stat-pick.stat-pick-compact,.stat-settings-unified .stat-pick.stat-pick-compact,.profile-subpanel.stat-upgrade-shell .stat-v127-bottom>span,.stat-settings-unified .stat-v127-bottom>span){background:var(--t-field)!important;border-color:var(--ui-line)!important;box-shadow:none!important}
html[data-theme] :where(.stat-v127-title b,.stat-fixed-target b,.stat-v127-bottom b){color:var(--tx-number)!important}
html[data-theme] :where(.stat-v127-title small,.stat-fixed-target small,.stat-v127-bottom small){color:var(--tx-muted)!important}
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .stat-upgrade-bar,.stat-settings-unified .stat-upgrade-bar){background:var(--t-field)!important}
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .stat-upgrade-bar i,.stat-settings-unified .stat-upgrade-bar i){background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important}
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .stat-pick input,.stat-settings-unified .stat-pick input){background:var(--t-field)!important;border-color:var(--ui-line)!important}
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .stat-pick input:checked,.stat-settings-unified .stat-pick input:checked){background:var(--t-accent-2)!important;border-color:var(--t-accent)!important}

/* ADMIN MONITOR — remove brown cards and orange chart styling. */
html[data-theme] :where(.admin-server-kpi,.admin-monitor-chart,.admin-usage-row,.admin-usage-detail,.admin-usage-metrics span,.admin-user-live-kpis span,.admin-usage-log){background:var(--ui-card)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important}
html[data-theme] :where(.admin-server-kpi b,.admin-chart-title b,.admin-usage-who b,.admin-usage-metrics b,.admin-user-live-kpis b,.admin-usage-detail-head h4,.admin-usage-log-row b){color:var(--tx-number)!important}
html[data-theme] :where(.admin-server-kpi small,.admin-server-kpi span,.admin-chart-title span,.admin-usage-who small,.admin-usage-metrics small,.admin-user-live-kpis small,.admin-usage-log-row,.admin-usage-log-row time){color:var(--tx-muted)!important}
html[data-theme] .admin-server-kpi i{background:var(--t-field)!important}
html[data-theme] .admin-server-kpi i em{background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important}
html[data-theme] .admin-spark polyline{stroke:var(--t-accent)!important}

/* EQUIPMENT AUTO-UPGRADE — every internal tile uses the active theme. */
html[data-theme] :where(.equipment-auto-card,.equipment-master-switch,.equipment-status-row,.equipment-currency-card,.equipment-auto-note,.equipment-currency-title>span){background:var(--ui-card)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important;box-shadow:none!important}
html[data-theme] .equipment-auto-card.max{background:linear-gradient(155deg,color-mix(in srgb,var(--t-good) 9%,var(--t-raised)),var(--t-panel))!important}
html[data-theme] .equipment-item-art{background:var(--t-field)!important;border-color:var(--ui-line)!important}
html[data-theme] :where(.equipment-item-main h4,.equipment-level-line b,.equipment-status-row b,.equipment-currency-title b,.equipment-currency-copy b,.equipment-auto-note b){color:var(--tx-title)!important}
html[data-theme] :where(.equipment-level-line,.equipment-status-row small,.equipment-status-row time,.equipment-currency-title small,.equipment-currency-copy small,.equipment-auto-note,.equipment-master-switch){color:var(--tx-muted)!important}
html[data-theme] .equipment-level-bar{background:var(--t-field)!important;box-shadow:none!important}
html[data-theme] .equipment-level-bar i{background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important}
html[data-theme] .equipment-currency-check{background:var(--t-field)!important;border-color:var(--ui-line)!important}
html[data-theme] .equipment-currency-card.selected{background:linear-gradient(155deg,color-mix(in srgb,var(--t-accent-2) 24%,var(--t-raised)),var(--t-panel))!important;border-color:var(--t-accent)!important}
html[data-theme] .equipment-currency-card.selected .equipment-currency-check{background:var(--t-accent-2)!important;border-color:var(--t-accent)!important;color:#fff!important}

/* WEAPONS — no brown surfaces, borders, progress bars or labels. */
html[data-theme] :where(.profile-weapons-panel,.weapon-card-v53,.weapon-card,.weapon-card-actions,.weapon-summary,.weapon-upgrade,.weapon-stat-grid>div,.upgrade-option,.weapon-notice){background:var(--ui-card-strong)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important}
html[data-theme] :where(.weapon-art-v53,.weapon-art){background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--t-accent-2) 25%,transparent),var(--t-field) 70%)!important;border-color:var(--ui-line)!important}
html[data-theme] :where(.weapon-heading h4,.weapon-stat-grid b,.weapon-upgrade-title>span,.upgrade-option>strong,.weapon-title h4,.weapon-bonuses b){color:var(--tx-title)!important}
html[data-theme] :where(.weapon-heading small,.weapon-stat-grid span,.weapon-stat-grid small,.weapon-upgrade-title small,.upgrade-option>small,.weapon-title small,.repair-cost){color:var(--tx-muted)!important}
html[data-theme] :where(.weapon-level,.weapon-state-badge){background:var(--t-field)!important;border-color:var(--ui-line)!important;color:var(--tx-label)!important}
html[data-theme] .weapon-durability>i{background:var(--t-field)!important}.weapon-durability>i>b{background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important}

/* INVENTORY — tabs, cards, section blocks, unlocked rewards. */
html[data-theme] :where(.inventory-section,.inventory-section-head,.inventory-section-grid .item-card,.inventory-section-combat .item-card,.inventory-section-boosters .item-card,.inventory-section-activity .item-card,.inventory-real-item,.item-card,.set-card){background:var(--ui-card)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important}
html[data-theme] .inventory-section-head{background:var(--t-head)!important}
html[data-theme] .inventory-tab{background:var(--t-card-soft)!important;border-color:var(--ui-line)!important;color:var(--tx-muted)!important}
html[data-theme] .inventory-tab:hover{background:var(--t-raised-2)!important;border-color:var(--t-accent)!important}
html[data-theme] .inventory-tab.active{background:var(--t-button)!important;border-color:var(--t-accent)!important;color:var(--tx-title)!important;box-shadow:0 0 16px var(--t-glow)!important}
html[data-theme] .inventory-tab b{background:var(--t-field)!important;color:var(--tx-number)!important}
html[data-theme] :where(.inventory-real-item h4,.item-card h4,.set-card h4){color:var(--tx-title)!important}
html[data-theme] :where(.inventory-real-item p,.item-card p,.set-card p,.inventory-real-item small){color:var(--tx-muted)!important}
html[data-theme] :where(.drop-card.drop-owned,.rare-drop-card.drop-owned,.room-drop-card.drop-owned){background:linear-gradient(155deg,color-mix(in srgb,var(--t-good) 10%,var(--t-raised)),var(--t-panel))!important;border-color:color-mix(in srgb,var(--t-good) 38%,var(--ui-line))!important}
html[data-theme] .drop-owned-check{background:color-mix(in srgb,var(--t-good) 42%,var(--t-field))!important;color:#ecfff0!important;border-color:color-mix(in srgb,var(--t-good) 55%,var(--ui-line))!important}

/* MUTAGENS — exhaustive reset of game-like beige/gray UI. */
html[data-theme] .mut-game-page :where(.mut-game-shell,.mut-game-tabs,.mut-side,.mut-main,.mut-class-card,.mut-plan-board,.mut-plan-chip,.mut-range-status,.mut-craft-controls,.mut-pills-indicator,.mut-ing-card,.mut-recipe-row,.mut-recipe-term,.mut-recipe-result,.mut-recipe-badge,.mut-chest-pick,.mut-chest-detail,.mut-chest-detail-art,.mut-chest-detail-meta .meta-row,.mut-orn,.mut-switchrow,.mut-budget,.mut-category,.mut-recipe-section,.mut-chest,.mut-cascade-row,.mut-cascade-meta,.mut-class-stats span,.mut-craft-log-row,.mut-craft-log-title span){background:var(--ui-card)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important;box-shadow:none!important}
html[data-theme] .mut-game-page :where(.mut-type-btn,.mut-tab,.mut-class-run,.mut-plan-chip){background:var(--t-card-soft)!important;border-color:var(--ui-line)!important;color:var(--tx-body)!important}
html[data-theme] .mut-game-page :where(.mut-type-btn.active,.mut-tab.active,.mut-plan-chip.active,.mut-class-card.active,.mut-chest-pick.active){background:var(--t-button)!important;border-color:var(--t-accent)!important;color:var(--tx-title)!important;box-shadow:0 0 16px var(--t-glow)!important}
html[data-theme] .mut-game-page .mut-class-card.running,.mut-game-page .mut-plan-chip.running{background:linear-gradient(155deg,color-mix(in srgb,var(--t-accent-2) 24%,var(--t-raised)),var(--t-panel))!important;border-color:var(--t-accent)!important}
html[data-theme] .mut-game-page :where(.mut-class-select,.mut-class-select b,.mut-plan-board-head b,.mut-cascade-head b,.mut-recipe-term b,.mut-recipe-result b,.mut-chest-pick b,.mut-chest-detail-art strong,.mut-chest-detail-meta b,.mut-ornaments h4,.mut-cascade-item b,.mut-cascade-meta b,.mut-craft-log-title b){color:var(--tx-title)!important}
html[data-theme] .mut-game-page :where(.mut-class-select small,.mut-class-select em,.mut-plan-board-head small,.mut-plan-chip small,.mut-cascade-head small,.mut-cascade-item small,.mut-cascade-item span,.mut-cascade-meta small,.mut-cascade-meta span,.mut-recipe-term span,.mut-recipe-term small,.mut-recipe-result span,.mut-chest-pick small,.mut-chest-pick span,.mut-chest-detail-art small,.mut-chest-detail-meta .meta-row,.mut-orn small,.mut-craft-log-copy small,.mut-craft-log-row time){color:var(--tx-muted)!important}
html[data-theme] .mut-game-page :where(.mut-class-select>span,.mut-craft-log-code){background:var(--t-accent-2)!important;color:#fff!important;border-color:var(--t-accent)!important}
html[data-theme] .mut-game-page :where(.mut-recipe-term img,.mut-recipe-result img,.mut-ing-card img,.mut-chest-detail-art img,.mut-orn img,.mut-cat-emblem,.mut-recipe img){background:var(--t-field)!important;border-color:var(--ui-line)!important}
html[data-theme] .mut-game-page :where(.mut-craft-controls input,.mut-range-presets select,.mut-category input[type=number],.mut-budget input){background:var(--t-field)!important;color:var(--tx-number)!important;border-color:var(--ui-line)!important}
html[data-theme] .mut-game-page .mut-class-run.stop{background:linear-gradient(180deg,color-mix(in srgb,var(--t-danger) 52%,var(--t-raised)),var(--t-panel))!important;color:#fff!important;border-color:color-mix(in srgb,var(--t-danger) 62%,var(--ui-line))!important}
html[data-theme] .mut-game-page .mut-class-run:not(.stop){background:linear-gradient(180deg,color-mix(in srgb,var(--t-good) 30%,var(--t-raised)),var(--t-panel))!important;color:#eaffee!important;border-color:color-mix(in srgb,var(--t-good) 46%,var(--ui-line))!important}

/* Remove old warm accent colors from common borders/progress elements globally. */
html[data-theme] main :where(.mini-hp,.hp-track,.weapon-durability>i,.stat-upgrade-bar,.equipment-level-bar,.admin-server-kpi i){border-color:var(--ui-line)!important}
html[data-theme] main :where(.floor-pill,.department-pill,.settings-pill,.mut-range-mode-badge,.equipment-currency-chance){background:var(--t-field)!important;color:var(--tx-label)!important;border-color:var(--ui-line)!important}

/* Theme-specific accents beyond hue: typography and active-state character. */
html[data-theme="blood"] main :where(.eyebrow,[class*="-kicker"],.settings-pill,.floor-pill){text-shadow:0 0 10px rgba(255,49,66,.18)!important}
html[data-theme="surgery"] main :where(.eyebrow,[class*="-kicker"],.settings-pill,.floor-pill){text-shadow:0 0 10px rgba(104,213,186,.15)!important}
html[data-theme="morgue"] main :where(.eyebrow,[class*="-kicker"],.settings-pill,.floor-pill){text-shadow:0 0 10px rgba(131,181,212,.14)!important}

/* v309 — screenshot-driven cleanup pass #2
   Remove last beige/brown remnants, theme all consumables, raids, mutagen reward history, and improve settings icons. */

/* Shared readable icon treatment for settings/theme UI. */
html[data-theme] .mh-theme-settings .settings-section-symbol,
html[data-theme] .mh-control-trigger,
html[data-theme] .settings-section-symbol{
  background:linear-gradient(145deg,var(--t-raised-2),var(--t-field))!important;
  border:1px solid var(--t-border)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.04)!important;
}
html[data-theme] .mh-theme-settings .settings-section-symbol img,
html[data-theme] .mh-control-trigger img,
html[data-theme] .settings-section-symbol img{
  width:70%!important;
  height:70%!important;
  object-fit:contain!important;
  filter:brightness(0) invert(1) drop-shadow(0 0 8px var(--t-glow))!important;
  mix-blend-mode:normal!important;
}
html[data-theme] .mh-theme-settings .panel-head{
  position:relative!important;
  isolation:isolate!important;
}
html[data-theme] .mh-theme-settings .panel-head:before,
html[data-theme] .mh-theme-settings .panel-head:after,
html[data-theme] .mh-theme-settings:before,
html[data-theme] .mh-theme-settings:after{
  pointer-events:none!important;
}
html[data-theme] .mh-theme-settings .panel-body{
  position:relative!important;
  z-index:1!important;
  overflow:hidden!important;
}
html[data-theme] .mh-theme-card[data-mp-theme]{
  background:var(--t-card)!important;
  border-color:var(--t-border)!important;
}
html[data-theme] .mh-theme-card[data-mp-theme]::before{
  opacity:.42!important;
}
html[data-theme] .mh-theme-card[data-mp-theme] > span{
  text-shadow:0 2px 10px rgba(0,0,0,.55)!important;
}
html[data-theme] .mh-theme-card[data-mp-theme] b{color:var(--tx-title)!important}
html[data-theme] .mh-theme-card[data-mp-theme] small{color:var(--tx-body)!important}

/* Top combat counters: medkits/howl should look like the rest of the HUD, not brown chips. */
html[data-theme] .combat-header-items .combat-head-item{
  background:var(--ui-card)!important;
  border:1px solid var(--ui-line)!important;
  border-radius:16px!important;
  color:var(--tx-body)!important;
  box-shadow:0 10px 22px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.03)!important;
}
html[data-theme] .combat-header-items .combat-head-item img{
  background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--t-accent-2) 28%,transparent),transparent 70%)!important;
  border-radius:12px!important;
}
html[data-theme] .combat-header-items .combat-head-item small{color:var(--tx-muted)!important}
html[data-theme] .combat-header-items .combat-head-item strong{color:var(--tx-number)!important}

/* Settings automation rows and group containers. */
html[data-theme] .settings-v201 #settingsAutomation .settings-group,
html[data-theme] .settings-v201 #settingsAutomation .settings-group .switchrow,
html[data-theme] .settings-v201 .settings-section .switchrow,
html[data-theme] .settings-v201 .settings-group .switchrow,
html[data-theme] .settings-v201 .switchrow.compact{
  background:linear-gradient(160deg,color-mix(in srgb,var(--t-raised) 90%,rgba(255,255,255,.015)),color-mix(in srgb,var(--t-panel) 96%,#000))!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
  box-shadow:none!important;
}
html[data-theme] .settings-v201 .settings-section .switchrow b,
html[data-theme] .settings-v201 .settings-group .switchrow b,
html[data-theme] .settings-v201 .switchrow.compact b{color:var(--tx-title)!important}
html[data-theme] .settings-v201 .settings-section .switchrow small,
html[data-theme] .settings-v201 .settings-group .switchrow small,
html[data-theme] .settings-v201 .switchrow.compact small{color:var(--tx-muted)!important}

/* Combat items and heal policy: strong explicit reset so no green-beige mixes remain. */
html[data-theme] .combat-items-settings .settings-card-head,
html[data-theme] .combat-items-settings .combat-item-setting,
html[data-theme] .combat-items-settings .autobuy-card,
html[data-theme] .combat-items-settings .combat-rule,
html[data-theme] .combat-items-settings .combat-rule > div > .autobuy-card,
html[data-theme] .combat-items-settings .combat-rule .switchrow{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .combat-items-settings .settings-card-head{
  background:var(--t-head)!important;
}
html[data-theme] .combat-items-settings .combat-rule{
  background:linear-gradient(160deg,var(--t-panel-2),var(--t-panel))!important;
}
html[data-theme] .combat-items-settings .autobuy-card > img,
html[data-theme] .combat-items-settings .combat-item-setting-icon{
  background:radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--t-accent-2) 25%,transparent),var(--t-field) 72%)!important;
  border:1px solid var(--ui-line)!important;
  border-radius:14px!important;
}

/* Invitation settings cards, including selected mode. */
html[data-theme] .settings-card .settings-mode-row .invite-mode,
html[data-theme] .invite-mode,
html[data-theme] .invite-follow-summary,
html[data-theme] .invite-summary,
html[data-theme] .invite-flags label,
html[data-theme] .invite-follow-picker,
html[data-theme] .invite-boss-pick,
html[data-theme] .invite-hint{
  background:var(--ui-card)!important;
  border:1px solid var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .settings-card .settings-mode-row .invite-mode b,
html[data-theme] .invite-mode b{color:var(--tx-title)!important}
html[data-theme] .settings-card .settings-mode-row .invite-mode small,
html[data-theme] .invite-mode small{color:var(--tx-muted)!important}
html[data-theme] .settings-card .settings-mode-row .invite-mode.active,
html[data-theme] .invite-mode.active{
  background:linear-gradient(155deg,color-mix(in srgb,var(--t-accent-2) 62%,var(--t-raised)),var(--t-panel))!important;
  border-color:var(--t-accent)!important;
  box-shadow:0 0 0 1px var(--ui-line),0 0 18px var(--t-glow)!important;
}
html[data-theme] .settings-card .settings-mode-row .invite-mode.active b,
html[data-theme] .settings-card .settings-mode-row .invite-mode.active small,
html[data-theme] .invite-mode.active b,
html[data-theme] .invite-mode.active small{color:var(--tx-title)!important}

/* Profile stat auto-upgrade — force the head and cards into current theme. */
html[data-theme] .profile-subpanel.stat-upgrade-shell,
html[data-theme] .profile-subpanel.stat-upgrade-shell .profile-subpanel-head,
html[data-theme] .profile-subpanel.stat-upgrade-shell .profile-subpanel-body,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-card,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-v127-bottom > span,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-fixed-target,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-pick{
  border-color:var(--ui-line)!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .profile-subpanel-head{background:var(--t-head)!important}
html[data-theme] .profile-subpanel.stat-upgrade-shell .profile-subpanel-body{background:linear-gradient(180deg,rgba(255,255,255,.01),rgba(0,0,0,.08))!important}
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-card,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-v127-bottom > span,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-fixed-target,
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-pick{
  background:var(--ui-card)!important;
}

/* Raid target picker — the remaining beige floor tabs/header. */
html[data-theme] .raid-page .raid-catalog-heading,
html[data-theme] .raid-page .raid-filter-meta,
html[data-theme] .raid-page .raid-floor-tabs,
html[data-theme] .raid-page .raid-boss-tile{
  color:var(--tx-body)!important;
}
html[data-theme] .raid-page .raid-catalog-heading{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.22)!important;
}
html[data-theme] .raid-page .raid-catalog-heading b{color:var(--tx-title)!important}
html[data-theme] .raid-page .raid-catalog-heading small,
html[data-theme] .raid-page .raid-filter-meta{color:var(--tx-muted)!important}
html[data-theme] .raid-page .raid-floor-chip{
  background:var(--t-card-soft)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .raid-page .raid-floor-chip.active,
html[data-theme] .raid-page .raid-floor-chip:hover{
  background:var(--t-button)!important;
  border-color:var(--t-accent)!important;
  color:var(--tx-title)!important;
}

/* Mutagen chest/reward history — remove large beige container and item cards. */
html[data-theme] .mut-game-page .mut-chest-detail,
html[data-theme] .mut-game-page .mut-chest-detail-meta .meta-row,
html[data-theme] .mut-game-page .mut-reward-tabs button,
html[data-theme] .mut-game-page .mut-claim-history,
html[data-theme] .mut-game-page .mut-claim,
html[data-theme] .mut-game-page .mut-claim-item{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .mut-game-page .mut-claim-history{
  box-shadow:0 10px 24px rgba(0,0,0,.22)!important;
}
html[data-theme] .mut-game-page .mut-claim-history h4,
html[data-theme] .mut-game-page .mut-claim-item b,
html[data-theme] .mut-game-page .mut-chest-detail-art strong,
html[data-theme] .mut-game-page .mut-ornaments h4{color:var(--tx-title)!important}
html[data-theme] .mut-game-page .mut-claim time,
html[data-theme] .mut-game-page .mut-claim-item span,
html[data-theme] .mut-game-page .mut-chest-detail-art small,
html[data-theme] .mut-game-page .mut-orn small,
html[data-theme] .mut-game-page .mut-reward-note{color:var(--tx-muted)!important}
html[data-theme] .mut-game-page .mut-reward-tabs button.active{
  background:var(--t-button)!important;
  border-color:var(--t-accent)!important;
  color:var(--tx-title)!important;
}

/* Small leftover beige surfaces in mutagen/work actions and generic compact blocks. */
html[data-theme] .mut-game-page .mut-work-actions .switchrow.compact,
html[data-theme] .mut-game-page .mut-craft-status,
html[data-theme] .mut-game-page .mut-reward-mutagens,
html[data-theme] .mut-game-page .mut-ornament-list,
html[data-theme] .mut-game-page .mut-cascade-row,
html[data-theme] .mut-game-page .mut-cascade-item,
html[data-theme] .mut-game-page .mut-range-presets select{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}

/* Remove warm lines globally in screenshot-problem zones. */
html[data-theme] :where(.raid-page .raid-catalog-heading,.mut-game-page .mut-claim-history,.combat-items-settings .combat-rule,.settings-v201 .switchrow,.profile-subpanel.stat-upgrade-shell,.combat-header-items .combat-head-item){
  outline:none!important;
}

/* v310 — NO BROWN TEXT / equipment + durability final theme pass
   Last screenshot-driven cleanup. All warm legacy typography and weapon/equipment surfaces are theme-adaptive. */

/* Theme text palettes — intentionally different and high-contrast. */
html[data-theme="blood"]{
  --tx-title:#fff7f5;
  --tx-body:#f0d9da;
  --tx-muted:#c6989d;
  --tx-label:#ff6976;
  --tx-number:#ffe2d6;
  --tx-dim:#9e7378;
}
html[data-theme="surgery"]{
  --tx-title:#f1fff9;
  --tx-body:#c8eee5;
  --tx-muted:#91bdb2;
  --tx-label:#6ce4c6;
  --tx-number:#dcfff6;
  --tx-dim:#65958a;
}
html[data-theme="morgue"]{
  --tx-title:#f6fbff;
  --tx-body:#d1e4ef;
  --tx-muted:#94afbf;
  --tx-label:#8bcaef;
  --tx-number:#eaf8ff;
  --tx-dim:#6f8998;
}

/* Hard anti-brown typography reset for the UI zones that still inherited legacy colors. */
html[data-theme] main :where(
  .mode-control,.action-card,.settings-v201,.settings-card,.combat-items-settings,
  .stat-upgrade-shell,.stat-settings-unified,.equipment-auto-panel,.profile-weapons-panel,
  .weapon-card-v53,.raid-page,.mut-game-page,.boss-modes-page,.inventory-page
) :where(h1,h2,h3,h4,h5,h6,b,strong){color:var(--tx-title)!important}
html[data-theme] main :where(
  .mode-control,.action-card,.settings-v201,.settings-card,.combat-items-settings,
  .stat-upgrade-shell,.stat-settings-unified,.equipment-auto-panel,.profile-weapons-panel,
  .weapon-card-v53,.raid-page,.mut-game-page,.boss-modes-page,.inventory-page
) :where(p,small,em,label){color:var(--tx-muted)!important}
html[data-theme] main :where(
  .mode-control,.action-card,.settings-v201,.settings-card,.combat-items-settings,
  .stat-upgrade-shell,.stat-settings-unified,.equipment-auto-panel,.profile-weapons-panel,
  .weapon-card-v53,.raid-page,.mut-game-page,.boss-modes-page,.inventory-page
) :where(.eyebrow,[class*="-kicker"],[class*="-label"]){color:var(--tx-label)!important}

/* HOME mode buttons — remove special brown/orange invitation state entirely. */
html[data-theme] #homeHero :where(.mode-control,.action-card){
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
  filter:none!important;
}
html[data-theme] #homeHero .mode-control.is-on,
html[data-theme] #homeHero .mode-control.mode-invites.is-on,
html[data-theme] #homeHero .action-card.is-active{
  background:linear-gradient(155deg,color-mix(in srgb,var(--t-accent-2) 58%,var(--t-raised)),var(--t-panel))!important;
  border-color:var(--t-accent)!important;
  box-shadow:0 0 0 1px var(--ui-line),0 10px 24px rgba(0,0,0,.28),0 0 18px var(--t-glow)!important;
}
html[data-theme] #homeHero :where(.mode-control-copy b,.action-card-copy b){color:var(--tx-title)!important}
html[data-theme] #homeHero :where(.mode-control-copy small,.action-card-copy small){color:var(--tx-muted)!important}
html[data-theme] #homeHero .mode-control-state{
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-label)!important;
}
html[data-theme] #homeHero .mode-control.is-on .mode-control-state,
html[data-theme] #homeHero .mode-control.mode-invites.is-on .mode-control-state{
  background:color-mix(in srgb,var(--t-accent-2) 72%,var(--t-field))!important;
  border-color:var(--t-accent)!important;
  color:var(--tx-title)!important;
}
html[data-theme] #homeHero :where(.mode-control-icon,.action-card-icon){
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] #homeHero :where(.mode-control-icon img,.action-card-icon img){
  filter:drop-shadow(0 5px 8px rgba(0,0,0,.45)) saturate(.9)!important;
}
html[data-theme] #homeHero :where(.action-card-stop,.action-card-settings){background:var(--ui-card)!important}
html[data-theme] #homeHero :where(.action-card-stop .action-card-copy b,.action-card-settings .action-card-copy b){color:var(--tx-title)!important}

/* AUTO STAT UPGRADE — remove the last brown text/numbers and warm footer. */
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell,.stat-settings-unified){
  background:var(--ui-card-strong)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] :where(.profile-subpanel.stat-upgrade-shell .profile-subpanel-head,.stat-settings-unified .profile-subpanel-head,.stat-settings-unified .settings-card-head){
  background:var(--t-head)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] :where(.stat-upgrade-card.stat-upgrade-card-v127,.stat-v127-bottom>span,.stat-fixed-target,.stat-pick.stat-pick-compact){
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] :where(.stat-v127-title small,.stat-fixed-target small,.stat-v127-bottom small,.stat-upgrade-foot small){color:var(--tx-muted)!important}
html[data-theme] :where(.stat-v127-title b,.stat-fixed-target b,.stat-v127-bottom b){color:var(--tx-number)!important}
html[data-theme] .stat-upgrade-foot{
  border-top-color:var(--ui-line)!important;
  color:var(--tx-muted)!important;
}

/* EQUIPPED WEAPON / PET AUTO-UPGRADE — fully dark/theme-adaptive, including MAX state. */
html[data-theme] .equipment-auto-panel{
  background:var(--ui-card-strong)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .equipment-auto-panel .equipment-auto-head{
  background:var(--t-head)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .equipment-auto-panel .equipment-auto-head p{color:var(--tx-muted)!important}
html[data-theme] .equipment-max-badge{
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-label)!important;
}
html[data-theme] .equipment-tab{
  background:var(--ui-card)!important;
  color:var(--tx-muted)!important;
  border-color:var(--ui-line)!important;
  box-shadow:none!important;
}
html[data-theme] .equipment-tab.active{
  background:var(--t-button)!important;
  color:var(--tx-title)!important;
  border-color:var(--t-accent)!important;
  box-shadow:0 0 16px var(--t-glow)!important;
}
html[data-theme] .equipment-tab>i{background:var(--tx-dim)!important}
html[data-theme] .equipment-tab>i.on,
html[data-theme] .equipment-tab>i.upgrading,
html[data-theme] .equipment-tab>i.level_up,
html[data-theme] .equipment-tab>i.max{
  background:var(--t-accent)!important;
  box-shadow:0 0 12px var(--t-glow)!important;
}
html[data-theme] .equipment-auto-card,
html[data-theme] .equipment-auto-card.max{
  background:linear-gradient(155deg,var(--t-raised),var(--t-panel))!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.26),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme] .equipment-auto-card.max{
  border-color:var(--t-accent)!important;
  box-shadow:0 0 0 1px var(--ui-line),0 12px 28px rgba(0,0,0,.28),0 0 16px var(--t-glow)!important;
}
html[data-theme] .equipment-item-art{
  background:radial-gradient(circle at 50% 38%,color-mix(in srgb,var(--t-accent-2) 24%,transparent),var(--t-field) 74%)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .equipment-item-art img{filter:drop-shadow(0 10px 10px rgba(0,0,0,.5))!important}
html[data-theme] .equipment-item-main .eyebrow{color:var(--tx-label)!important}
html[data-theme] .equipment-item-main h4{color:var(--tx-title)!important}
html[data-theme] .equipment-level-line{color:var(--tx-body)!important}
html[data-theme] .equipment-level-line b{color:var(--tx-number)!important}
html[data-theme] .equipment-level-line span{color:var(--tx-label)!important}
html[data-theme] .equipment-level-bar{
  background:var(--t-field)!important;
  border:1px solid var(--ui-line)!important;
  box-shadow:inset 0 3px 8px rgba(0,0,0,.4)!important;
}
html[data-theme] .equipment-level-bar i{
  background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important;
  box-shadow:0 0 12px var(--t-glow)!important;
}
html[data-theme] .equipment-master-switch,
html[data-theme] .equipment-master-switch.done{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-muted)!important;
}
html[data-theme] .equipment-master-switch i{
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.4)!important;
}
html[data-theme] .equipment-master-switch i:after{
  background:var(--tx-muted)!important;
  box-shadow:0 2px 5px rgba(0,0,0,.35)!important;
}
html[data-theme] .equipment-master-switch input:checked+i{
  background:color-mix(in srgb,var(--t-accent-2) 72%,var(--t-field))!important;
  border-color:var(--t-accent)!important;
}
html[data-theme] .equipment-master-switch input:checked+i:after{background:var(--tx-number)!important}
html[data-theme] .equipment-status-row,
html[data-theme] .equipment-status-row.max{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .equipment-status-dot,
html[data-theme] .equipment-status-row.max .equipment-status-dot,
html[data-theme] .equipment-status-row.on .equipment-status-dot,
html[data-theme] .equipment-status-row.upgrading .equipment-status-dot,
html[data-theme] .equipment-status-row.level_up .equipment-status-dot{
  background:var(--t-accent)!important;
  box-shadow:0 0 10px var(--t-glow)!important;
}
html[data-theme] .equipment-status-row b{color:var(--tx-title)!important}
html[data-theme] .equipment-status-row small,
html[data-theme] .equipment-status-row time{color:var(--tx-muted)!important}

/* 'Итог до MAX' statistics. */
html[data-theme] .equipment-upgrade-stats{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .equipment-upgrade-stats-head b{color:var(--tx-title)!important}
html[data-theme] .equipment-upgrade-stats-head small{color:var(--tx-muted)!important}
html[data-theme] .equipment-upgrade-stats-head>span{
  background:var(--t-field)!important;
  border:1px solid var(--ui-line)!important;
  color:var(--tx-label)!important;
}
html[data-theme] .equipment-upgrade-stat-grid>div{
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .equipment-upgrade-stat-grid small{color:var(--tx-muted)!important}
html[data-theme] .equipment-upgrade-stat-grid b{color:var(--tx-number)!important}
html[data-theme] .equipment-currency-title b{color:var(--tx-title)!important}
html[data-theme] .equipment-currency-title small{color:var(--tx-muted)!important}
html[data-theme] .equipment-currency-title>span,
html[data-theme] .equipment-currency-chance{
  background:var(--t-field)!important;
  border:1px solid var(--ui-line)!important;
  color:var(--tx-label)!important;
}
html[data-theme] .equipment-currency-card,
html[data-theme] .equipment-currency-card.selected{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
  box-shadow:none!important;
}
html[data-theme] .equipment-currency-card.selected{
  border-color:var(--t-accent)!important;
  box-shadow:0 0 14px var(--t-glow)!important;
}
html[data-theme] .equipment-currency-check{
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
  color:transparent!important;
}
html[data-theme] .equipment-currency-card.selected .equipment-currency-check{
  background:var(--t-accent-2)!important;
  border-color:var(--t-accent)!important;
  color:var(--tx-title)!important;
}
html[data-theme] .equipment-currency-copy b{color:var(--tx-title)!important}
html[data-theme] .equipment-currency-copy small{color:var(--tx-muted)!important}
html[data-theme] .equipment-auto-note{
  background:var(--ui-card)!important;
  border:1px solid var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .equipment-auto-note>span{
  background:var(--t-field)!important;
  color:var(--tx-label)!important;
  border:1px solid var(--ui-line)!important;
}
html[data-theme] .equipment-auto-note p{color:var(--tx-muted)!important}
html[data-theme] .equipment-auto-note b{color:var(--tx-title)!important}

/* WEAPON ARSENAL — complete theme reset including durability. */
html[data-theme] .profile-weapons-panel,
html[data-theme] .weapon-card-v53,
html[data-theme] .weapon-card-v53 .weapon-summary,
html[data-theme] .weapon-card-v53 .weapon-card-actions,
html[data-theme] .weapon-card-v53 .weapon-upgrade{
  background:var(--ui-card-strong)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .weapon-card-v53.equipped{border-color:var(--t-accent)!important;box-shadow:0 0 0 1px var(--ui-line),0 0 16px var(--t-glow)!important}
html[data-theme] .weapon-card-v53 .weapon-art-v53{
  background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--t-accent-2) 22%,transparent),var(--t-field) 72%)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .weapon-card-v53 :where(.weapon-heading h4,.weapon-stat-grid b,.weapon-upgrade-title>span,.upgrade-option>strong){color:var(--tx-title)!important}
html[data-theme] .weapon-card-v53 :where(.weapon-heading small,.weapon-stat-grid span,.weapon-stat-grid small,.weapon-upgrade-title small,.upgrade-option>small,.repair-cost){color:var(--tx-muted)!important}
html[data-theme] .weapon-card-v53 :where(.weapon-level,.weapon-state-badge){background:var(--t-field)!important;border-color:var(--ui-line)!important;color:var(--tx-label)!important}
html[data-theme] .weapon-card-v53 .weapon-stat-grid>div{
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .weapon-card-v53 .upgrade-option{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .weapon-card-v53 .upgrade-option:hover{background:var(--t-raised-2)!important;border-color:var(--t-accent)!important}

/* Durability: the old brown block/bar is completely replaced. */
html[data-theme] .weapon-durability{
  margin-top:12px!important;
  padding:12px 13px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:13px!important;
  background:var(--ui-card)!important;
  color:var(--tx-body)!important;
}
html[data-theme] .weapon-durability>div:first-child{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:12px!important;
}
html[data-theme] .weapon-durability>div:first-child span{color:var(--tx-muted)!important}
html[data-theme] .weapon-durability>div:first-child b{color:var(--tx-number)!important}
html[data-theme] .weapon-durability>i{
  height:8px!important;
  background:var(--t-field)!important;
  border:1px solid var(--ui-line)!important;
  box-shadow:inset 0 3px 7px rgba(0,0,0,.4)!important;
}
html[data-theme] .weapon-durability>i>b{
  background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important;
  box-shadow:0 0 10px var(--t-glow)!important;
}
html[data-theme] .weapon-durability.broken>i>b{background:linear-gradient(90deg,var(--t-danger),color-mix(in srgb,var(--t-danger) 64%,#000))!important}
html[data-theme] .weapon-durability-foot{color:var(--tx-muted)!important}
html[data-theme] .weapon-durability-foot em{color:var(--t-danger)!important}
html[data-theme] .weapon-durability-foot span{color:var(--tx-muted)!important}

/* Final no-brown safeguard for visible text in core application surfaces. */
html[data-theme] main :where(.panel,.hero,.floor-card,.settings-section,.profile-subpanel,.weapon-card-v53,.equipment-auto-card,.mode-control,.action-card) :where(span:not(.mode-control-state):not(.drop-owned-check),small,p,em,label){
  color:var(--tx-muted)!important;
}
html[data-theme] main :where(.panel,.hero,.floor-card,.settings-section,.profile-subpanel,.weapon-card-v53,.equipment-auto-card,.mode-control,.action-card) :where(b,strong,h1,h2,h3,h4,h5,h6){
  color:var(--tx-title)!important;
}
/* Re-assert accent labels/numbers after the broad safeguard. */
html[data-theme] main :where(.eyebrow,[class*="-kicker"],.equipment-level-line span,.weapon-level,.equipment-max-badge){color:var(--tx-label)!important}
html[data-theme] main :where(.equipment-level-line b,.weapon-durability>div:first-child b,.equipment-upgrade-stat-grid b,.stat-v127-title b,.stat-fixed-target b,.stat-v127-bottom b){color:var(--tx-number)!important}

/* v311 — MOBILE PERFORMANCE PASS
   Same visual identity, lower paint/composite cost on touch devices. */
@media (max-width: 850px), (hover: none) and (pointer: coarse) {
  html,body{
    scroll-behavior:auto!important;
    -webkit-text-size-adjust:100%;
  }
  body,
  body.auth-page{
    background-attachment:scroll!important;
  }

  /* Expensive full-screen compositing is replaced by static theme layers. */
  .mh-horror-atmosphere:after{
    display:none!important;
    animation:none!important;
    mix-blend-mode:normal!important;
    filter:none!important;
  }
  .mh-horror-atmosphere:before{
    animation:none!important;
    filter:none!important;
    opacity:.24!important;
  }
  body:before{
    mix-blend-mode:normal!important;
    opacity:.10!important;
  }
  body:after{
    animation:none!important;
    opacity:.52!important;
  }

  /* Blur/backdrop filters force costly repaints during scroll on iOS/Android. */
  .topbar,
  .nav,
  .mobile-menu-overlay,
  .mh-auth-overlay,
  .mh-control-panel,
  .auth-frame,
  .toast{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  .mobile-menu-overlay,.mh-auth-overlay{
    background:rgba(0,0,0,.82)!important;
  }

  /* Keep the same lighting impression without continuously animated sweeps. */
  .topbar:after,
  .panel:before,
  .floor-card:before,
  .hero:before{
    animation:none!important;
    transform:none!important;
  }
  .topbar:after{opacity:.12!important;left:58%!important;width:30%!important}
  .panel:after,.floor-card:after{
    mix-blend-mode:normal!important;
    opacity:.16!important;
  }

  /* Smaller static shadows look nearly identical on mobile and are much cheaper. */
  .topbar,.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,
  .settings-section,.ug-panel,.clan-v-panel,.friend-room-card,.mut-game-shell,
  .admin-hero,.mp-hero,.mp-plan,.mobile-menu-drawer,.mh-auth-dialog{
    box-shadow:0 12px 28px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.025)!important;
  }
  .mh-control-panel{
    box-shadow:0 14px 34px rgba(0,0,0,.52),0 0 14px var(--t-glow)!important;
  }
  .mh-control-trigger{
    box-shadow:0 10px 24px rgba(0,0,0,.42),0 0 12px var(--t-glow)!important;
  }
  .toast{box-shadow:0 12px 30px rgba(0,0,0,.48)!important}

  /* Touch devices do not need hover-only GPU effects. */
  .metric:hover,.btn:hover,.mp-btn:hover,.auth-btn:hover,.mode-control:hover,.action-card:hover,
  .raid-chip:hover,.boss-card:hover,.biz-card:hover,.inventory-item:hover,.quick-boss:hover,
  .work-task:hover,.weapon-card-v53 .upgrade-option:hover,.nav .nav-links a:hover{
    transform:none!important;
    filter:none!important;
    box-shadow:inherit!important;
  }

  /* Image drop-shadows are expensive when dozens of cards are visible. */
  main :where(.boss-card,.raid-boss-tile,.item-card,.inventory-real-item,.weapon-card-v53,
    .mut-class-card,.mut-chest-pick,.mut-orn,.friend-room-card,.drop-card,.biz-card,.work-task) img,
  .metric img,.nav-icon img{
    filter:none!important;
  }

  /* Simple, short transitions keep taps feeling responsive without long compositing. */
  :where(.btn,.mp-btn,.auth-btn,.mode-control,.action-card,.raid-chip,.nav a,.mh-control-trigger,
    .mh-control-panel,.mobile-menu-drawer,.mobile-menu-overlay,.switch i,.task-toggle i,.weapon-auto-switch i){
    transition:transform .12s ease,opacity .12s ease,border-color .12s ease,background-color .12s ease!important;
  }
  :where(.xpbar i,.hp-track i,.weapon-durability>i>b,.stat-upgrade-bar i,.equipment-level-bar i){
    transition:width .18s linear!important;
  }

  /* Render long lists only when they approach the viewport. */
  main :where(.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,
    .friend-room-card,.mut-class-card,.mut-chest-pick,.mut-claim,.biz-card,.work-task,.work-task-card,
    .admin-user-card,.clan-v-room-card){
    content-visibility:auto;
    contain-intrinsic-size:auto 150px;
    contain:paint;
  }

  /* Momentum scrolling for internal lists. */
  :where(.nav-links,.friend-draft-bosses,.friend-goal-grid,.mut-recipe-items,.mut-log,
    .inventory-grid,.weapon-grid,.boss-grid,.raid-catalog-grid,.friend-available-list){
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }

  /* Constant decorative pulses are paused on touch devices. */
  .pulse-dot.on,.friend-live-dot,.mh-search-status-dot,.mh-loader-sigil{
    animation:none!important;
  }

  /* The theme picker stays visually rich but avoids image filters. */
  .mh-theme-btn:before,.mh-theme-card:before{
    filter:none!important;
  }
}

/* Extra low-power mode for narrow phones. */
@media (max-width: 520px) {
  .mh-horror-atmosphere:before{opacity:.18!important}
  body:before{opacity:.07!important}
  .panel:after,.floor-card:after{opacity:.10!important}
  main :where(.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,
    .friend-room-card,.mut-class-card,.mut-chest-pick,.mut-claim,.biz-card,.work-task,.work-task-card){
    contain-intrinsic-size:auto 130px;
  }
}

@media (max-width: 850px), (hover: none) and (pointer: coarse) {
  :where(button,a,label,input,select,textarea,[role="button"]){
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
}

/* v312 — stat upgrade cleanup + aggressive mobile smoothness pass. */
html[data-theme="blood"]{--h-page-image-mobile:url('./hospital_2_mobile.webp')}
html[data-theme="surgery"]{--h-page-image-mobile:url('./hospital_4_mobile.webp')}
html[data-theme="morgue"]{--h-page-image-mobile:url('./hospital_5_mobile.webp')}

/* AUTOSTAT: hard reset the last legacy warm/brown layer. */
html[data-theme] .profile-subpanel.stat-upgrade-shell,
html[data-theme] .stat-settings-unified{
  background:var(--t-card)!important;
  color:var(--tx-body)!important;
  border-color:var(--t-border)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.26)!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .profile-subpanel-head,
html[data-theme] .stat-settings-unified .profile-subpanel-head,
html[data-theme] .stat-settings-unified > .panel-head{
  background:var(--t-head)!important;
  color:var(--tx-title)!important;
  border-color:var(--t-border)!important;
  box-shadow:none!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .profile-subpanel-body,
html[data-theme] .stat-settings-unified .panel-body{
  background:linear-gradient(180deg,color-mix(in srgb,var(--t-panel) 94%,#000),var(--t-bg))!important;
  color:var(--tx-body)!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-card,
html[data-theme] .stat-settings-unified .stat-upgrade-card{
  background:linear-gradient(155deg,var(--t-raised),var(--t-panel))!important;
  color:var(--tx-body)!important;
  border-color:var(--t-border)!important;
  box-shadow:none!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-card.selected,
html[data-theme] .stat-settings-unified .stat-upgrade-card.selected{
  background:linear-gradient(155deg,color-mix(in srgb,var(--t-accent-2) 22%,var(--t-raised)),var(--t-panel))!important;
  border-color:var(--t-accent)!important;
  box-shadow:0 0 0 1px var(--t-border),0 0 15px var(--t-glow)!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell :where(.stat-upgrade-icon,.stat-fixed-target,.stat-pick,.stat-v127-bottom>span),
html[data-theme] .stat-settings-unified :where(.stat-upgrade-icon,.stat-fixed-target,.stat-pick,.stat-v127-bottom>span){
  background:var(--t-field)!important;
  color:var(--tx-body)!important;
  border-color:var(--t-border)!important;
  box-shadow:none!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell :where(.stat-v127-title small,.stat-fixed-target small,.stat-v127-bottom small,.stat-upgrade-foot small),
html[data-theme] .stat-settings-unified :where(.stat-v127-title small,.stat-fixed-target small,.stat-v127-bottom small,.stat-upgrade-foot small){
  color:var(--tx-muted)!important;
  text-shadow:none!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell :where(.stat-v127-title b,.stat-fixed-target b,.stat-v127-bottom b),
html[data-theme] .stat-settings-unified :where(.stat-v127-title b,.stat-fixed-target b,.stat-v127-bottom b){
  color:var(--tx-number)!important;
  text-shadow:none!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-bar,
html[data-theme] .stat-settings-unified .stat-upgrade-bar{
  background:var(--t-field)!important;
  border:1px solid var(--t-border-soft)!important;
  box-shadow:none!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-bar i,
html[data-theme] .stat-settings-unified .stat-upgrade-bar i{
  background:linear-gradient(90deg,var(--t-accent-2),var(--t-accent))!important;
  box-shadow:none!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .stat-upgrade-foot,
html[data-theme] .stat-settings-unified .stat-upgrade-foot{
  border-color:var(--t-border-soft)!important;
  background:transparent!important;
  color:var(--tx-muted)!important;
}
html[data-theme] .profile-subpanel.stat-upgrade-shell .weapon-auto-switch,
html[data-theme] .stat-settings-unified .weapon-auto-switch{color:var(--tx-body)!important}

/* MOBILE ULTRA PERFORMANCE: keep the look, remove scroll-time work. */
@media (max-width:850px), (hover:none) and (pointer:coarse){
  /* A single small composited image replaces multi-layer full-page backgrounds. */
  body,body.auth-page{
    background:var(--t-bg)!important;
    background-image:none!important;
  }
  body:before,body:after{display:none!important}
  .mh-horror-atmosphere{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:1!important;
    background:
      linear-gradient(180deg,rgba(2,4,5,.34),rgba(2,4,5,.84)),
      var(--h-page-image-mobile) center/cover no-repeat!important;
    transform:translate3d(0,0,0)!important;
    -webkit-transform:translate3d(0,0,0)!important;
    will-change:transform!important;
    contain:strict!important;
    opacity:1!important;
  }
  .mh-horror-atmosphere:before,.mh-horror-atmosphere:after{display:none!important}
  .shell{position:relative!important;z-index:5!important}

  /* content-visibility produced visible pop-in / hitching on several mobile browsers. */
  main :where(.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,
    .friend-room-card,.mut-class-card,.mut-chest-pick,.mut-claim,.biz-card,.work-task,.work-task-card,
    .admin-user-card,.clan-v-room-card){
    content-visibility:visible!important;
    contain:none!important;
    contain-intrinsic-size:none!important;
  }

  /* Borders + flat themed surfaces are much cheaper than dozens of soft shadows while scrolling. */
  :where(.topbar,.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.settings-section,
    .ug-panel,.clan-v-panel,.friend-room-card,.mut-game-shell,.admin-hero,.mp-hero,.mp-plan,
    .mode-control,.action-card,.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,
    .stat-upgrade-card,.equipment-auto-card,.combat-head-item,.mut-chest-pick,.mut-claim-item,.biz-card,.work-task-card){
    box-shadow:none!important;
  }
  :where(.page-head h2,.eyebrow,.brand h1,.madpilot-mad,.panel-head h3,.floor-head h3,
    .profile-subpanel-head h3,.settings-section h3,.weapon-heading h4,.equipment-item-main h4){
    text-shadow:none!important;
  }

  /* Avoid filter/compositing layers on all scrolling content. */
  main img,.topbar img,.nav img,.mobile-menu-drawer img,.mh-control-panel img{
    filter:none!important;
    -webkit-filter:none!important;
  }
  :where(.topbar,.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.settings-section,
    .mobile-menu-drawer,.mobile-menu-overlay,.mh-control-panel,.auth-frame,.toast){
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  /* Pseudo-lighting is static on mobile; no repainting sweeps. */
  :where(.topbar,.panel,.floor-card,.hero,.mode-control,.action-card,.btn,.mh-control-trigger)::before,
  :where(.topbar,.panel,.floor-card,.hero,.mode-control,.action-card,.btn,.mh-control-trigger)::after{
    animation:none!important;
    transition:none!important;
  }
  .panel:before,.floor-card:before,.hero:before,.topbar:after{display:none!important}
  .panel:after,.floor-card:after{opacity:.07!important;mix-blend-mode:normal!important}

  /* Disable scroll-unfriendly card transitions. Taps remain instant and crisp. */
  main :where(.metric,.btn,.mp-btn,.auth-btn,.mode-control,.action-card,.raid-chip,.boss-card,.biz-card,
    .inventory-item,.item-card,.quick-boss,.work-task,.work-task-card,.weapon-card-v53,.upgrade-option,
    .mut-class-card,.mut-chest-pick,.friend-room-card,.stat-upgrade-card,.equipment-auto-card),
  .nav a,.mobile-menu-drawer,.mobile-menu-overlay{
    transition:none!important;
    animation:none!important;
    transform:none!important;
  }
  :where(.xpbar i,.hp-track i,.weapon-durability>i>b,.stat-upgrade-bar i,.equipment-level-bar i){
    transition:width .10s linear!important;
    box-shadow:none!important;
  }
  .pulse-dot.on,.friend-live-dot,.mh-search-status-dot,.mh-loader-sigil,.xp-gain,.mh-delta{
    animation:none!important;
  }

  /* Browser can isolate large page sections without lazy paint pop-in. */
  main > section,main > .panel,main > .profile-subpanel{
    contain:layout style!important;
  }

  /* Less expensive fixed UI. */
  .mh-control-trigger{box-shadow:0 5px 12px rgba(0,0,0,.34)!important}
  .mh-control-panel,.mobile-menu-drawer,.toast{box-shadow:0 8px 20px rgba(0,0,0,.42)!important}
  .mh-theme-btn:before,.mh-theme-card:before{filter:none!important}
}

@media (max-width:520px){
  /* Reduce overdraw further on narrow phones without changing layout/content. */
  .mh-horror-atmosphere{background-position:center top!important;background-size:auto 100vh!important}
  :where(.panel,.floor-card,.hero,.profile-subpanel,.settings-section,.mode-control,.action-card,.boss-card,
    .raid-boss-tile,.weapon-card-v53,.item-card,.stat-upgrade-card,.equipment-auto-card){
    background-image:none!important;
  }
  :where(.panel,.floor-card,.hero,.profile-subpanel,.settings-section){background-color:var(--t-panel)!important}
  :where(.mode-control,.action-card,.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.stat-upgrade-card,.equipment-auto-card){background-color:var(--t-raised)!important}
}

/* v313 — MOBILE LITE MODE + compact battle result layout
   Priority: stable 60-ish FPS scrolling on phones while retaining theme identity. */

/* Battle stats / rewards: filled, padded cards that do not clip on narrow screens. */
html[data-theme] .boss-stat-sheet{
  min-width:0!important;
  overflow:visible!important;
}
html[data-theme] .invite-stats-shell{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:12px 0 0!important;
  padding:14px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:16px!important;
  background:var(--ui-card-strong)!important;
  color:var(--tx-body)!important;
  overflow:hidden!important;
  box-shadow:none!important;
}
html[data-theme] .invite-stats-board{
  min-width:0!important;
  width:100%!important;
  gap:12px!important;
}
html[data-theme] .invite-stats-title{
  width:100%!important;
  min-width:0!important;
  padding:11px 13px!important;
  margin:0!important;
  border:1px solid var(--ui-line)!important;
  border-radius:12px!important;
  background:linear-gradient(155deg,var(--t-raised),var(--t-panel))!important;
  color:var(--tx-body)!important;
  box-sizing:border-box!important;
}
html[data-theme] .invite-stats-title span{
  color:var(--tx-label)!important;
  font-size:15px!important;
  line-height:1.25!important;
}
html[data-theme] .invite-stats-title small{
  color:var(--tx-muted)!important;
  font-size:10px!important;
  line-height:1.55!important;
  margin-top:5px!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
html[data-theme] .reward-section{
  width:100%!important;
  min-width:0!important;
  margin:12px 0 0!important;
  padding:12px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:15px!important;
  background:var(--ui-card-strong)!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
html[data-theme] .reward-section-title{
  min-height:40px!important;
  margin:0 0 10px!important;
  padding:9px 11px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:10px!important;
  background:linear-gradient(155deg,var(--t-raised),var(--t-panel))!important;
  box-sizing:border-box!important;
}
html[data-theme] .reward-section-title span{
  color:var(--tx-label)!important;
  font-size:11px!important;
  line-height:1.25!important;
  letter-spacing:.12em!important;
}
html[data-theme] .reward-section-title em{
  color:var(--tx-muted)!important;
  font-size:9px!important;
  white-space:nowrap!important;
}
html[data-theme] .reward-money-grid,
html[data-theme] .reward-section .drop-grid{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  gap:8px!important;
}
html[data-theme] .reward-empty{
  width:100%!important;
  min-width:0!important;
  min-height:58px!important;
  margin:0!important;
  padding:14px 12px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid var(--ui-line)!important;
  border-radius:11px!important;
  background:var(--ui-card)!important;
  color:var(--tx-body)!important;
  box-sizing:border-box!important;
  text-align:center!important;
}
html[data-theme] .reward-empty b{color:var(--tx-title)!important}
html[data-theme] .reward-empty span{color:var(--tx-muted)!important}
html[data-theme] .reward-money,
html[data-theme] .reward-section .drop-card{
  min-width:0!important;
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  box-shadow:none!important;
}

/* Settings / Automation: remove the visual "panel inside panel". */
html[data-theme] .settings-v201 #settingsAutomation{
  padding:10px 16px 14px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html[data-theme] .settings-v201 #settingsAutomation > .settings-group{
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
html[data-theme] .settings-v201 #settingsAutomation > .settings-group > .switchrow{
  min-height:58px!important;
  margin:0!important;
  padding:10px 4px!important;
  border:0!important;
  border-bottom:1px solid var(--ui-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html[data-theme] .settings-v201 #settingsAutomation > .settings-group > .switchrow:last-child{
  border-bottom:0!important;
}
html[data-theme] .settings-v201 #settingsAutomation .switchrow b{color:var(--tx-title)!important}
html[data-theme] .settings-v201 #settingsAutomation .switchrow small{color:var(--tx-muted)!important}

/* Floating settings control: all visual effects stay inside the button. */
html[data-theme] .mh-control-trigger{
  position:relative!important;
  overflow:hidden!important;
  isolation:isolate!important;
  clip-path:inset(0 round 16px)!important;
}
html[data-theme] .mh-control-trigger:before{
  inset:0!important;
  opacity:.12!important;
  filter:none!important;
  box-shadow:none!important;
}
html[data-theme] .mh-control-trigger:after{
  width:7px!important;
  height:7px!important;
  right:7px!important;
  top:7px!important;
  box-shadow:none!important;
}

/* MOBILE LITE MODE: no fixed composited atmosphere, no continuous visual work. */
@media (max-width:850px), (hover:none) and (pointer:coarse){
  html{
    scroll-behavior:auto!important;
    background:var(--t-bg)!important;
  }
  body,body.auth-page{
    background-color:var(--t-bg)!important;
    background-image:
      linear-gradient(180deg,rgba(2,4,5,.22),rgba(2,4,5,.72)),
      var(--h-page-image-mobile)!important;
    background-position:center top!important;
    background-size:100% auto!important;
    background-repeat:no-repeat!important;
    background-attachment:scroll!important;
  }
  body:before,body:after,.mh-horror-atmosphere{display:none!important}

  /* Completely stop decorative animation/transition work on touch screens. */
  *,*::before,*::after{
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
  .shell,.topbar,.nav,main,.panel,.floor-card,.hero,.profile-subpanel,.settings-section,
  .mobile-menu-drawer,.mobile-menu-overlay,.mh-control-panel,.mh-control-trigger{
    will-change:auto!important;
    transform:none!important;
    -webkit-transform:none!important;
  }

  /* Flat surfaces substantially reduce overdraw while retaining each theme's palette. */
  :where(.topbar,.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.settings-section,
    .ug-panel,.clan-v-panel,.friend-room-card,.mut-game-shell,.admin-hero,.mp-hero,.mp-plan,
    .mode-control,.action-card,.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,
    .stat-upgrade-card,.equipment-auto-card,.combat-head-item,.mut-chest-pick,.mut-claim-item,.biz-card,.work-task-card,
    .invite-stats-shell,.reward-section,.reward-empty,.reward-money,.drop-card){
    box-shadow:none!important;
    filter:none!important;
    -webkit-filter:none!important;
  }
  :where(.topbar,.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.settings-section,
    .mobile-menu-drawer,.mobile-menu-overlay,.mh-control-panel,.auth-frame,.toast){
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  main img,.topbar img,.nav img,.mobile-menu-drawer img,.mh-control-panel img{
    filter:none!important;
    -webkit-filter:none!important;
  }

  /* Remove paint-heavy pseudo lighting from scrolling cards entirely. */
  :where(.topbar,.panel,.floor-card,.hero,.mode-control,.action-card,.btn,.boss-card,.raid-boss-tile,
    .weapon-card-v53,.item-card,.stat-upgrade-card,.equipment-auto-card,.reward-section,.invite-stats-shell)::before,
  :where(.topbar,.panel,.floor-card,.hero,.mode-control,.action-card,.btn,.boss-card,.raid-boss-tile,
    .weapon-card-v53,.item-card,.stat-upgrade-card,.equipment-auto-card,.reward-section,.invite-stats-shell)::after{
    display:none!important;
  }

  /* Avoid layout containment/re-layering while scrolling. */
  main > section,main > .panel,main > .profile-subpanel,
  main :where(.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,.friend-room-card,
    .mut-class-card,.mut-chest-pick,.mut-claim,.biz-card,.work-task,.work-task-card,.admin-user-card,.clan-v-room-card){
    contain:none!important;
    content-visibility:visible!important;
  }

  /* Fixed settings button must be almost free to composite. */
  .mh-control-trigger{
    box-shadow:none!important;
    border-color:var(--t-border)!important;
    background-color:var(--t-panel)!important;
    background-image:none!important;
    clip-path:inset(0 round 15px)!important;
  }
  .mh-control-trigger:before{display:none!important}
  .mh-control-trigger:after{
    display:block!important;
    right:7px!important;
    top:7px!important;
    width:6px!important;
    height:6px!important;
    background:var(--t-accent)!important;
    box-shadow:none!important;
  }

  /* Results fit inside the viewport with comfortable edge padding. */
  .boss-stats-panel .panel-body{padding:10px!important}
  .boss-stat-sheet{gap:10px!important}
  .invite-stats-shell{padding:10px!important;margin-top:10px!important;border-radius:13px!important}
  .invite-stats-title{padding:10px!important;border-radius:9px!important}
  .invite-stats-title span{font-size:13px!important}
  .invite-stats-title small{font-size:9px!important}
  .reward-section{padding:10px!important;margin-top:10px!important;border-radius:13px!important}
  .reward-section-title{min-height:36px!important;padding:8px 9px!important;margin-bottom:8px!important}
  .reward-money-grid,.reward-section .drop-grid{grid-template-columns:1fr!important}
  .reward-empty{min-height:54px!important;padding:12px 10px!important}

  /* Automation panel remains one clean visual layer. */
  .settings-v201 #settingsAutomation{padding:4px 12px 10px!important}
  .settings-v201 #settingsAutomation > .settings-group > .switchrow{
    min-height:54px!important;
    padding:9px 2px!important;
  }
}

@media (max-width:520px){
  body,body.auth-page{
    /* Small mobile images are already optimized; no fixed cover rasterization. */
    background-size:100% auto!important;
  }
  .invite-stats-shell,.reward-section{margin-left:0!important;margin-right:0!important}
  .boss-stats-panel .panel-body{padding-left:8px!important;padding-right:8px!important}
  .settings-v201 #settingsAutomation{padding-left:10px!important;padding-right:10px!important}
}

@media (max-width:850px), (hover:none) and (pointer:coarse){
  body{ text-rendering:optimizeSpeed!important; }
  .mh-horror-controls{will-change:auto!important;filter:none!important}
  .mh-control-panel{filter:none!important;box-shadow:none!important}
}

/* v314 — TURBO MOBILE + battle journal redesign */
html[data-theme] .invite-journal{
  min-width:0!important;
  padding:12px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:14px!important;
  background:var(--ui-card)!important;
  box-shadow:none!important;
}
html[data-theme] .invite-journal-head{
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  padding:10px 12px!important;
  margin:0 0 9px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:10px!important;
  background:linear-gradient(155deg,var(--t-raised),var(--t-panel))!important;
  color:var(--tx-title)!important;
  font-size:13px!important;
  line-height:1.2!important;
  letter-spacing:.12em!important;
}
html[data-theme] .invite-journal-list{
  min-height:82px!important;
  max-height:260px!important;
  margin:0!important;
  padding:5px!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  border:1px solid var(--ui-line)!important;
  border-radius:10px!important;
  background:var(--t-field)!important;
  scrollbar-width:thin!important;
  scrollbar-color:var(--t-accent-2) transparent!important;
}
html[data-theme] .invite-journal-row{
  grid-template-columns:24px minmax(76px,.65fr) minmax(0,1fr)!important;
  gap:8px!important;
  min-height:46px!important;
  padding:9px 8px!important;
  border:0!important;
  border-bottom:1px solid var(--ui-soft)!important;
  background:transparent!important;
  color:var(--tx-body)!important;
}
html[data-theme] .invite-journal-row:last-child{border-bottom:0!important}
html[data-theme] .invite-journal-row>span{color:var(--tx-label)!important;font-size:13px!important}
html[data-theme] .invite-journal-row b{color:var(--tx-title)!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html[data-theme] .invite-journal-row b small{color:var(--tx-muted)!important;font-size:8px!important}
html[data-theme] .invite-journal-row em{color:var(--tx-body)!important;font-size:9px!important;line-height:1.35!important;text-align:right!important;white-space:normal!important;overflow-wrap:anywhere!important}
html[data-theme] .invite-journal .invite-stats-no-data{
  min-height:70px!important;
  display:grid!important;
  place-items:center!important;
  padding:14px!important;
  color:var(--tx-muted)!important;
  text-align:center!important;
}

@media (max-width:850px), (hover:none) and (pointer:coarse){
  /* Ultra-lite mobile: theme is preserved through palette, but all expensive raster/background composition is removed. */
  html,body,body.auth-page{
    background:var(--t-bg)!important;
    background-image:none!important;
  }
  body:before,body:after,.mh-horror-atmosphere{display:none!important}
  .shell{background:transparent!important}

  /* Remove every paint-heavy visual effect on mobile. */
  *,*::before,*::after{
    animation:none!important;
    transition:none!important;
    text-shadow:none!important;
  }
  :where(.topbar,.nav,.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.settings-section,
    .mode-control,.action-card,.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,
    .stat-upgrade-card,.equipment-auto-card,.combat-head-item,.mut-chest-pick,.mut-claim-item,.biz-card,.work-task-card,
    .invite-stats-shell,.invite-journal,.reward-section,.reward-empty,.reward-money,.drop-card,.mh-control-panel,.mh-control-trigger){
    box-shadow:none!important;
    filter:none!important;
    -webkit-filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  main img,.topbar img,.nav img,.mobile-menu-drawer img,.mh-control-panel img{
    filter:none!important;
    -webkit-filter:none!important;
  }

  /* Reduce layered gradients to one inexpensive surface per block. */
  :where(.panel,.floor-card,.hero,.profile-subpanel,.character-profile-panel,.settings-section,
    .mode-control,.action-card,.boss-card,.raid-boss-tile,.weapon-card-v53,.item-card,.inventory-real-item,
    .stat-upgrade-card,.equipment-auto-card,.combat-head-item,.mut-chest-pick,.mut-claim-item,.biz-card,.work-task-card,
    .invite-stats-shell,.invite-journal,.reward-section,.reward-empty,.reward-money,.drop-card){
    background-image:none!important;
    background-color:var(--t-panel)!important;
  }
  :where(.panel-head,.floor-head,.profile-subpanel-head,.settings-section>.panel-head,.invite-journal-head,.reward-section-title){
    background-image:none!important;
    background-color:var(--t-panel-2)!important;
  }
  :where(input,textarea,select,.invite-journal-list){
    background-image:none!important;
    background-color:var(--t-field)!important;
  }

  /* No sticky/fixed decorative containers during normal page scroll. */
  main,.shell,.page-head,.topbar,.nav{contain:none!important}
  .topbar{position:relative!important;top:auto!important}

  /* Battle telemetry is compact and cheap to repaint. */
  .invite-stats-shell{padding:8px!important;border-radius:11px!important}
  .invite-stats-board{gap:8px!important}
  .invite-journal{padding:8px!important;border-radius:10px!important}
  .invite-journal-head{min-height:36px!important;padding:8px 9px!important;margin-bottom:6px!important;font-size:11px!important;border-radius:8px!important}
  .invite-journal-list{min-height:74px!important;max-height:180px!important;padding:3px!important;border-radius:8px!important}
  .invite-journal-row{grid-template-columns:20px minmax(72px,.72fr) minmax(0,1fr)!important;gap:5px!important;min-height:40px!important;padding:7px 5px!important}
  .invite-journal-row>span{font-size:11px!important}
  .invite-journal-row b{font-size:9px!important}
  .invite-journal-row b small{font-size:7px!important}
  .invite-journal-row em{font-size:8px!important}

  /* Lower paint cost on long lists. */
  .boss-grid,.catalog-floor-grid,.raid-catalog-grid,.inventory-section-grid,.mut-chest-selector,.mut-ornament-list,.friend-available-list{
    gap:8px!important;
  }
  .boss-card,.raid-boss-tile,.inventory-real-item,.item-card,.mut-chest-pick,.friend-room-card{
    border-radius:10px!important;
  }

  /* Floating settings control: simple single layer. */
  .mh-control-trigger{
    background:var(--t-panel)!important;
    border:1px solid var(--t-border)!important;
    clip-path:none!important;
    overflow:hidden!important;
  }
  .mh-control-trigger:before{display:none!important}
  .mh-control-trigger:after{box-shadow:none!important}
}

/* v315 — instant mobile sync + raid/friend-room fixes */
html[data-theme] .raid-page .raid-editor-panel .panel-body > h4{
  color:var(--tx-title)!important;
  text-shadow:none!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-note{
  color:var(--tx-body)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice,
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice.is-owned{
  background:var(--ui-card)!important;
  border-color:var(--ui-line)!important;
  color:var(--tx-body)!important;
  box-shadow:none!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice:has(input:checked){
  outline:2px solid var(--t-accent)!important;
  outline-offset:-3px!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice b,
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice.is-owned b{
  color:var(--tx-title)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice small,
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice.is-owned small{
  color:var(--tx-muted)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-drop-choice > i{
  color:var(--t-accent)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-drop-icon{
  background:var(--t-field)!important;
  border-color:var(--ui-line)!important;
  box-shadow:none!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-chip,
html[data-theme] .raid-page .raid-editor-panel .raid-chip:hover{
  background:var(--t-card-soft)!important;
  color:var(--tx-title)!important;
  border-color:var(--ui-line)!important;
  box-shadow:none!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-chip.active{
  background:var(--t-button)!important;
  color:#fff!important;
  border-color:var(--t-accent)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-friend-options label,
html[data-theme] .raid-page .raid-editor-panel .raid-friend-picker .raid-friend-filter-grid label{
  background:var(--ui-card)!important;
  color:var(--tx-title)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-friend-picker,
html[data-theme] .raid-page .raid-editor-panel .raid-friend-card,
html[data-theme] .raid-page .raid-editor-panel .raid-friend-card.chosen{
  background:var(--ui-card)!important;
  color:var(--tx-title)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-friend-copy small{
  color:var(--tx-muted)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-friend-picker .raid-friend-filter-grid input,
html[data-theme] .raid-page .raid-editor-panel .raid-friend-picker .raid-friend-filter-grid select{
  background:var(--t-field)!important;
  color:var(--tx-title)!important;
  border-color:var(--ui-line)!important;
}
html[data-theme] .raid-page .raid-editor-panel .raid-friend-picker .raid-friend-filter-grid input::placeholder{
  color:var(--tx-muted)!important;
}
html[data-theme] .raid-page .raid-editor-panel .btn.light,
html[data-theme] .raid-page .raid-editor-panel > .panel-head .btn.light{
  background:var(--t-button-soft)!important;
  color:var(--tx-title)!important;
  border-color:var(--ui-line)!important;
}

/* Friend-room boss picker never jumps to top when live data or selection repaints. */
html[data-theme] .friend-draft-bosses{
  overflow-anchor:none!important;
  overscroll-behavior:contain!important;
  scroll-behavior:auto!important;
}
html[data-theme] .friend-draft-bosses *{overflow-anchor:none!important}

/* Faster touch response and cheaper taps. */
@media (max-width:850px), (hover:none) and (pointer:coarse){
  html{-webkit-text-size-adjust:120%!important;text-size-adjust:120%!important}
  body{touch-action:pan-y!important;overscroll-behavior-y:none!important}
  :where(button,a,.btn,label,input,select,textarea,.mode-control,.action-card,.boss-card,.raid-boss-tile,.friend-goal){
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }
  .friend-draft-bosses{-webkit-overflow-scrolling:touch!important}
  .raid-page .raid-drop-grid{grid-template-columns:1fr!important}
  .raid-page .raid-drop-choice{min-height:82px!important}
  .raid-page .raid-editor-panel .panel-body{padding-left:14px!important;padding-right:14px!important}
}

/* v315 readable mobile typography: roughly +20% without hundreds of extra style rules. */
@media (max-width:850px), (hover:none) and (pointer:coarse){
  html{-webkit-text-size-adjust:120%!important;text-size-adjust:120%!important}
  .eyebrow{font-size:12px!important}
  .page-head h2{font-size:50px!important}
  .page-head p{font-size:15.5px!important}
  .panel-head h3,.floor-head h3,.profile-subpanel-head h3{font-size:24px!important}
  .head-meta{font-size:13px!important}
  .btn,.raid-chip,.collapse-button{font-size:14.5px!important}
  .metric small,.level-line small{font-size:13px!important}
  .metric strong{font-size:20px!important}
  .nav-label{font-size:12px!important}
  .nav-copy small{font-size:9px!important}
  .mode-control-copy b,.action-card-copy b{font-size:13px!important}
  .mode-control-copy small,.action-card-copy small{font-size:10px!important}
  .settings-section-heading h3{font-size:24px!important}
  .settings-section-heading p{font-size:12px!important}
  .switchrow b{font-size:14px!important}
  .switchrow small{font-size:12px!important}
  .raid-page .raid-editor-panel .panel-body>h4{font-size:20px!important}
  .raid-page .raid-editor-panel .raid-note{font-size:14px!important}
  .raid-page .raid-editor-panel .raid-drop-choice b{font-size:15.5px!important}
  .raid-page .raid-editor-panel .raid-drop-choice small{font-size:13px!important}
  .friend-create-step b{font-size:13px!important}
  .friend-create-step small{font-size:11px!important}
  .friend-goal b{font-size:11px!important}
  .friend-goal small{font-size:10px!important}
  .friend-room-player b{font-size:11px!important}
  .friend-room-player small{font-size:9px!important}
  .invite-journal-row b{font-size:11px!important}
  .invite-journal-row b small{font-size:9px!important}
  .invite-journal-row em{font-size:10px!important}
}

/* v316 — restore native mobile scrolling + desktop readability parity. */

/* Desktop gets the same ~20% typography lift introduced on mobile. */
@media (min-width:851px) and (hover:hover){
  body{font-size:120%!important}
  .eyebrow{font-size:12px!important}
  .page-head h2{font-size:50px!important}
  .page-head p{font-size:15.5px!important}
  .panel-head h3,.floor-head h3,.profile-subpanel-head h3{font-size:24px!important}
  .head-meta{font-size:13px!important}
  .btn,.raid-chip,.collapse-button{font-size:14.5px!important}
  .metric small,.level-line small{font-size:13px!important}
  .metric strong{font-size:20px!important}
  .nav-label{font-size:12px!important}
  .nav-copy small{font-size:9px!important}
  .mode-control-copy b,.action-card-copy b{font-size:13px!important}
  .mode-control-copy small,.action-card-copy small{font-size:10px!important}
  .settings-section-heading h3{font-size:24px!important}
  .settings-section-heading p{font-size:12px!important}
  .switchrow b{font-size:14px!important}
  .switchrow small{font-size:12px!important}
  .raid-page .raid-editor-panel .panel-body>h4{font-size:20px!important}
  .raid-page .raid-editor-panel .raid-note{font-size:14px!important}
  .raid-page .raid-editor-panel .raid-drop-choice b{font-size:15.5px!important}
  .raid-page .raid-editor-panel .raid-drop-choice small{font-size:13px!important}
  .friend-create-step b{font-size:13px!important}
  .friend-create-step small{font-size:11px!important}
  .friend-goal b{font-size:11px!important}
  .friend-goal small{font-size:10px!important}
  .friend-room-player b{font-size:11px!important}
  .friend-room-player small{font-size:9px!important}
  .invite-journal-row b{font-size:11px!important}
  .invite-journal-row b small{font-size:9px!important}
  .invite-journal-row em{font-size:10px!important}
}

/* Mobile: always allow the browser's native vertical pan/scroll.
   Previous touch optimizations were too aggressive on some iOS/Android WebViews. */
@media (max-width:850px), (hover:none) and (pointer:coarse){
  html{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    touch-action:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body:not(.mh-daily-modal-open):not(.mh-auth-lock){
    position:relative!important;
    height:auto!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.mobile-menu-open:not(.mh-daily-modal-open):not(.mh-auth-lock){
    position:relative!important;
    overflow-y:auto!important;
    touch-action:pan-y pinch-zoom!important;
  }
  .shell,main{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    touch-action:pan-y pinch-zoom!important;
  }
  main :where(section,article,div,.panel,.panel-body,.floor-card,.hero,.settings-section){
    touch-action:pan-y!important;
  }
  :where(button,a,.btn,label,.mode-control,.action-card,.boss-card,.raid-boss-tile,.friend-goal){
    touch-action:pan-y!important;
  }
  :where(input,select,textarea){touch-action:manipulation!important}
  :where(.friend-draft-bosses,.friend-goal-grid,.invite-stats-list,.invite-journal-list,.mobile-menu-links){
    touch-action:pan-y!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;
  }
  :where(.friend-room-loot,.mut-reward-tabs,.raid-floor-tabs){touch-action:pan-x pan-y!important}
}


/* v317 — desktop +30% typography from original base sizes. */
@media (min-width:851px) and (hover:hover){
  body{font-size:130%!important}
  .brand-mark{font-size:33.8px!important}
  .brand h1{font-size:36.4px!important}
  .brand p{font-size:16.9px!important}
  .metric small{font-size:14.3px!important}
  .metric strong{font-size:22.1px!important}
  .level-line strong{font-size:31.2px!important}
  .xptext{font-size:13px!important}
  .nav a{font-size:15.6px!important}
  .page-head h2{font-size:54.6px!important}
  .page-head p{font-size:16.9px!important}
  .eyebrow{font-size:13px!important}
  .panel-head h3,.floor-head h3{font-size:26px!important}
  .head-meta{font-size:14.3px!important}
  .collapse-button{font-size:14.3px!important}
  .hero-topline{font-size:13px!important}
  .battle-portrait span{font-size:14.3px!important}
  .battle-portrait b{font-size:40.3px!important}
  .hp-head{font-size:15.6px!important}
  .hp-head strong{font-size:19.5px!important}
  .hp-value{font-size:16.9px!important}
  .btn{font-size:15.6px!important}
  .kpi small,.stat-card small{font-size:14.3px!important}
  .kpi b,.stat-card b{font-size:35.1px!important}
  .boss-floor{font-size:13px!important}
  .boss-copy h4{font-size:20.8px!important}
  .boss-copy p{font-size:14.3px!important}
  .tag{font-size:11.7px!important}
  .mini-hp span{font-size:11.7px!important}
  .floor-head p{font-size:14.3px!important}
  .slot-empty span{font-size:29.9px!important}
  .slot-empty b{font-size:14.3px!important}
  .slot-empty small{font-size:11.7px!important}
  .biz-visual span{font-size:11.7px!important}
  .biz-top h4{font-size:20.8px!important}
  .biz-top p{font-size:13px!important}
  .biz-state{font-size:11.7px!important}
  .resource{font-size:13px!important}
  .biz-next{font-size:11.7px!important}
  .item-card h4{font-size:19.5px!important}
  .item-card p{font-size:13px!important}
  .qty{font-size:23.4px!important}
  .set-card h4{font-size:19.5px!important}
  .set-card p{font-size:11.7px!important}
  .set-meta{font-size:11.7px!important}
  .fact small{font-size:11.7px!important}
  .fact b{font-size:20.8px!important}
  .stat-card b{font-size:39px!important}
  .boss-stat small{font-size:11.7px!important}
  .boss-stat b{font-size:18.2px!important}
  .boss-stat span{font-size:11.7px!important}
  .logline{font-size:11.7px!important}
  .switchrow small{font-size:11.7px!important}
  select{font-size:15.6px!important}
  .toast{font-size:14.3px!important}
  .boss-stat-hero span{font-size:15.6px!important}
  .boss-stat-hero h4{font-size:36.4px!important}
  .boss-stat-hero p{font-size:15.6px!important}
  .boss-stat-numbers small{font-size:13px!important}
  .boss-stat-numbers strong{font-size:31.2px!important}
  .drop-title{font-size:13px!important}
  .drop-title b{font-size:15.6px!important}
  .drop-card small{font-size:11.7px!important}
  .drop-card b{font-size:19.5px!important}
  .drop-card span{font-size:16.9px!important}
  .no-drop b{font-size:19.5px!important}
  .no-drop span{font-size:13px!important}
  .inventory-scroll:after{font-size:11.7px!important}
  .work-energy-card strong{font-size:41.6px!important}
  .work-task-id{font-size:14.3px!important}
  .work-task h4{font-size:24.7px!important}
  .energy-cost b{font-size:22.1px!important}
  .work-task-progress>div:first-child{font-size:15.6px!important}
  .task-status{font-size:13px!important}
  .work-drop span,.work-drop time{font-size:15.6px!important}
  .work-floor-title>span{font-size:11.7px!important}
  .work-floor-title>b{font-size:36.4px!important}
  .work-floor-title>small{font-size:13px!important}
  .floor-pill,.department-pill{font-size:13px!important}
  .task-choice>div b{font-size:15.6px!important}
  .task-choice>div small{font-size:11.7px!important}
  .work-switch-copy b{font-size:13px!important}
  .work-switch-copy small{font-size:10.4px!important}
  .nav-emblem{font-size:23.4px!important}
  .desktop-nav-brand small{font-size:9.1px!important}
  .desktop-nav-brand b{font-size:14.3px!important}
  .nav-icon{font-size:18.2px!important}
  .nav-label{font-size:11.7px!important}
  .desktop-nav-status{font-size:11.7px!important}
  .work-drop-copy b{font-size:19.5px!important}
  .work-drop-copy small{font-size:14.3px!important}
  .server-auth-mark{font-size:39px!important}
  .server-auth-steps span{font-size:16.9px!important}
  .server-auth-input{font-size:16.9px!important}
  .server-auth-note{font-size:15.6px!important}
  .server-helper-link{font-size:16.9px!important}
  .connector-main strong{font-size:36.4px!important}
  .connector-main span{font-size:15.6px!important}
  .manual-init summary{font-size:16.9px!important}
  .connector-btn small{font-size:14.3px!important}
  .connector-icon{font-size:26px!important}
  .qr-help{font-size:15.6px!important}
  .account-profile{font-size:15.6px!important}
  .account-avatar{font-size:22.1px!important}
  .account-profile-copy small{font-size:9.1px!important}
  .account-profile-copy b{font-size:14.3px!important}
  .character-caption h3{font-size:41.6px!important}
  .character-stats b{font-size:32.5px!important}
  .weapon-auto-switch{font-size:15.6px!important}
  .weapon-notice{font-size:15.6px!important}
  .weapon-art span{font-size:13px!important}
  .weapon-title h4{font-size:27.3px!important}
  .weapon-title>b{font-size:14.3px!important}
  .weapon-bonuses span{font-size:13px!important}
  .weapon-bonuses b{font-size:16.9px!important}
  .weapon-durability{font-size:13px!important}
  .repair-cost{font-size:13px!important}
  .character-nameplate>span,.pet-card small{font-size:13px!important}
  .character-nameplate h3{font-size:44.2px!important}
  .character-nameplate p{font-size:15.6px!important}
  .pet-card b{font-size:18.2px!important}
  .profile-stat b{font-size:33.8px!important}
  .profile-stat em{font-size:13px!important}
  .profile-stat.big b{font-size:40.3px!important}
  .weapon-state-badge{font-size:13px!important}
  .weapon-heading h4{font-size:33.8px!important}
  .weapon-level{font-size:14.3px!important}
  .weapon-stat-grid span{font-size:13px!important}
  .weapon-stat-grid b{font-size:23.4px!important}
  .weapon-stat-grid small{font-size:11.7px!important}
  .weapon-durability>div:first-child{font-size:13px!important}
  .weapon-durability-foot{font-size:11.7px!important}
  .weapon-upgrade-title>span{font-size:18.2px!important}
  .weapon-upgrade-title small{font-size:11.7px!important}
  .upgrade-currency b{font-size:13px!important}
  .upgrade-option>strong{font-size:23.4px!important}
  .upgrade-option>small{font-size:11.7px!important}
  .character-unavailable{font-size:16.9px!important}
  .room-source-note{font-size:13px!important}
  .original-nameplate h3{font-size:49.4px!important}
  .boss-favorite{font-size:16.9px!important}
  .quick-boss-head b{font-size:20.8px!important}
  .quick-boss>i{font-size:24.7px!important}
  .invite-flags label{font-size:15.6px!important}
  .friend-row b{font-size:15.6px!important}
  .friend-row small{font-size:13px!important}
  .invite-hint{font-size:11.7px!important}
  .boss-favorite span{font-size:20.8px!important}
  .boss-favorite em{font-size:10.4px!important}
  .target-queue span{font-size:10.4px!important}
  .target-queue b{font-size:15.6px!important}
  .target-queue small{font-size:10.4px!important}
  .invite-summary>div:first-child span{font-size:10.4px!important}
  .invite-summary>div:first-child b{font-size:22.1px!important}
  .invite-counters span{font-size:11.7px!important}
  .invite-counters b{font-size:14.3px!important}
  .invite-mode b{font-size:14.3px!important}
  .invite-mode small{font-size:10.4px!important}
  .invite-flags span b{font-size:13px!important}
  .invite-flags span small{font-size:10.4px!important}
  .friend-copy b{font-size:14.3px!important}
  .friend-copy small{font-size:10.4px!important}
  .friend-meta em{font-size:10.4px!important}
  .friend-status{font-size:10.4px!important}
  .quick-boss-line b{font-size:18.2px!important}
  .quick-boss-copy small{font-size:13px!important}
  .quick-boss-bookmark{font-size:18.2px!important}
  .home-bookmark span{font-size:20.8px!important}
  .boss-favorite.boss-bookmark-icon span{font-size:23.4px!important}
  .boss-target-skull span{font-size:22.1px!important}
  .drop-owned-check{font-size:10.4px!important}
  .reward-section-title{font-size:11.7px!important}
  .reward-money small{font-size:10.4px!important}
  .reward-money b{font-size:15.6px!important}
  .reward-money em{font-size:16.9px!important}
  .reward-empty b{font-size:18.2px!important}
  .reward-empty span{font-size:11.7px!important}
  .boss-target-button .boss-target-icon{font-size:22.1px!important}
  .boss-target-button em{font-size:10.4px!important}
  .mh-loader-sigil{font-size:39px!important}
  .mh-loader-kicker{font-size:10.4px!important}
  .mh-loader-title{font-size:27.3px!important}
  .mh-loader-text{font-size:13px!important}
  .invite-follow-summary span,.invite-participants-head span{font-size:10.4px!important}
  .invite-follow-summary b,.invite-participants-head b{font-size:18.2px!important}
  .invite-follow-summary small,.invite-participants-head small{font-size:11.7px!important}
  .invite-rank{font-size:11.7px!important}
  .invite-player-copy b{font-size:14.3px!important}
  .invite-player-copy small{font-size:10.4px!important}
  .invite-player-damage small{font-size:9.1px!important}
  .invite-player-damage b{font-size:19.5px!important}
  .boss-stat-summary small{font-size:13px!important}
  .boss-stat-summary b{font-size:44.2px!important}
  .boss-stat-summary span{font-size:14.3px!important}
  .boss-stat-photo-grid small{font-size:13px!important}
  .boss-stat-photo-grid strong{font-size:36.4px!important}
  .work-pending-placeholder b{font-size:19.5px!important}
  .work-pending-placeholder span{font-size:13px!important}
  .boss-target-button.readable em{font-size:11.7px!important}
  .boss-target-button.readable .boss-target-icon{font-size:20.8px!important}
  .invite-wait-icon{font-size:39px!important}
  .invite-wait-card div>span{font-size:11.7px!important}
  .invite-wait-card b{font-size:35.1px!important}
  .invite-wait-card small{font-size:13px!important}
  .invite-stats-tab{font-size:13px!important}
  .invite-stats-title span{font-size:23.4px!important}
  .invite-stats-title small{font-size:13px!important}
  .invite-stats-title>b{font-size:18.2px!important}
  .invite-stats-rank{font-size:15.6px!important}
  .invite-stats-name b{font-size:14.3px!important}
  .invite-stats-name small{font-size:10.4px!important}
  .invite-stats-player>strong{font-size:20.8px!important}
  .invite-journal-head{font-size:19.5px!important}
  .invite-journal-row{font-size:11.7px!important}
  .invite-journal-row span{font-size:16.9px!important}
  .invite-stats-no-data{font-size:13px!important}
  .invite-stats-mark{font-size:26px!important}
  .invite-stats-empty b{font-size:23.4px!important}
  .invite-stats-empty small{font-size:11.7px!important}
  .invite-journal-row b small{font-size:9.1px!important}
  .profile-subpanel-head h3{font-size:31.2px!important}
  .weapon-auto-switch.compact span{font-size:13px!important}
  .stat-upgrade-icon{font-size:27.3px!important}
  .stat-upgrade-head small{font-size:13px!important}
  .stat-upgrade-head b{font-size:28.6px!important}
  .mini-target-input span{font-size:10.4px!important}
  .mini-target-input input,.settings-stat-targets input{font-size:18.2px!important}
  .stat-upgrade-meta{font-size:13px!important}
  .stat-upgrade-cost small{font-size:13px!important}
  .stat-upgrade-foot{font-size:13px!important}
  .settings-card-head h3{font-size:27.3px!important}
  .settings-pill{font-size:11.7px!important}
  .settings-inline-note{font-size:13px!important}
  .settings-stat-targets span{font-size:14.3px!important}
  .paused-mark{font-size:44.2px!important}
  .friend-star{font-size:23.4px!important}
  .combat-item-setting-icon{font-size:14.3px!important}
  .combat-item-setting-copy b{font-size:16.9px!important}
  .combat-item-setting-copy small{font-size:11.7px!important}
  .combat-rule>span{font-size:20.8px!important}
  .combat-rule b{font-size:15.6px!important}
  .combat-rule small{font-size:11.7px!important}
  .stat-pick input:checked:after{font-size:14.3px!important}
  .stat-pick span{font-size:11.7px!important}
  .invite-boss-pick .friend-copy b{font-size:15.6px!important}
  .invite-boss-pick .friend-copy small{font-size:11.7px!important}
  .admin-hero span{font-size:13px!important}
  .admin-hero h3{font-size:32.5px!important}
  .admin-hero p{font-size:15.6px!important}
  .admin-shield{font-size:36.4px!important}
  .admin-user-meta span{font-size:13px!important}
  .admin-field>span{font-size:14.3px!important}
  .admin-note{font-size:14.3px!important}
  .friend-batch-summary span{font-size:14.3px!important}
  .admin-log-user>span{font-size:13px!important}
  .catalog-floor-head h3{font-size:27.3px!important}
  .catalog-floor-grid .boss-copy h4{font-size:22.1px!important}
  .catalog-floor-grid .boss-copy p{font-size:14.3px!important}
  .catalog-floor-grid .tag{font-size:11.7px!important}
  .catalog-floor-grid .boss-favorite.boss-bookmark-icon{font-size:11.7px!important}
  .catalog-floor-grid .boss-favorite.boss-bookmark-icon span{font-size:22.1px!important}
  .combat-head-item small{font-size:10.4px!important}
  .combat-head-item strong{font-size:22.1px!important}
  .combat-item-setting-copy em{font-size:13px!important}
  .autobuy-copy b{font-size:16.9px!important}
  .autobuy-copy small{font-size:11.7px!important}
  .autobuy-fields label{font-size:10.4px!important}
  .autobuy-fields input{font-size:14.3px!important}
  .reward-popup-kicker{font-size:11.7px!important}
  .reward-popup-card h3{font-size:32.5px!important}
  .reward-popup-close{font-size:27.3px!important}
  .stat-settings-unified .profile-subpanel-head h3{font-size:27.3px!important}
  .boss-favorite.boss-bookmark-icon .bookmark-star{font-size:10.4px!important}
  .boss-favorite.boss-bookmark-icon .bookmark-star,.catalog-floor-grid .boss-favorite.boss-bookmark-icon .bookmark-star{font-size:10.4px!important}
  .stat-v127-title small{font-size:11.7px!important}
  .stat-v127-title b{font-size:28.6px!important}
  .stat-fixed-target small{font-size:9.1px!important}
  .stat-fixed-target b{font-size:20.8px!important}
  .stat-upgrade-card-v127 .stat-pick span{font-size:10.4px!important}
  .stat-v127-bottom small{font-size:9.1px!important}
  .stat-v127-bottom b{font-size:16.9px!important}
  .profile-subpanel.stat-upgrade-shell .stat-v127-title small,
.stat-settings-unified .stat-v127-title small{font-size:10.4px!important}
  .profile-subpanel.stat-upgrade-shell .stat-v127-title b,
.stat-settings-unified .stat-v127-title b{font-size:27.3px!important}
  .profile-subpanel.stat-upgrade-shell .stat-fixed-target small,
.stat-settings-unified .stat-fixed-target small{font-size:7.8px!important}
  .profile-subpanel.stat-upgrade-shell .stat-fixed-target b,
.stat-settings-unified .stat-fixed-target b{font-size:18.2px!important}
  .profile-subpanel.stat-upgrade-shell .stat-pick.stat-pick-compact input:checked:after,
.stat-settings-unified .stat-pick.stat-pick-compact input:checked:after{font-size:13px!important}
  .profile-subpanel.stat-upgrade-shell .stat-v127-bottom small,
.stat-settings-unified .stat-v127-bottom small{font-size:7.8px!important}
  .profile-subpanel.stat-upgrade-shell .stat-v127-bottom b,
.stat-settings-unified .stat-v127-bottom b{font-size:15.6px!important}
  .battle-live-reward b{font-size:13px!important}
  .battle-live-reward span{font-size:11.7px!important}
  .admin-server-kpi small{font-size:10.4px!important}
  .admin-server-kpi b{font-size:26px!important}
  .admin-server-kpi span{font-size:11.7px!important}
  .admin-chart-title b{font-size:14.3px!important}
  .admin-chart-title span{font-size:11.7px!important}
  .admin-usage-who small{font-size:10.4px!important}
  .admin-usage-metrics small,.admin-user-live-kpis small{font-size:9.1px!important}
  .admin-usage-metrics b,.admin-user-live-kpis b{font-size:16.9px!important}
  .admin-usage-detail-head h4{font-size:23.4px!important}
  .admin-usage-log-head{font-size:11.7px!important}
  .admin-usage-log-row{font-size:11.7px!important}
  .mode-control-copy b{font-size:18.2px!important}
  .mode-control-copy small{font-size:11.7px!important}
  .mode-control-state{font-size:11.7px!important}
  .action-card-copy b{font-size:18.2px!important}
  .action-card-copy small{font-size:11.7px!important}
  .scene-room-badge span{font-size:15.6px!important}
  .scene-chip-fallback{font-size:33.8px!important}
  .scene-chip-copy small{font-size:13px!important}
  .scene-chip-copy b{font-size:19.5px!important}
  .scene-chip-copy em{font-size:14.3px!important}
  .profile-shelf-head h3{font-size:28.6px!important}
  .ornament-copy small{font-size:13px!important}
  .ornament-copy b{font-size:20.8px!important}
  .ornament-copy em{font-size:14.3px!important}
  .original-nameplate p{font-size:16.9px!important}
  .inventory-section-head small{font-size:11.7px!important}
  .inventory-section-head h3{font-size:23.4px!important}
  .inventory-section-head>b{font-size:14.3px!important}
  .inventory-tab{font-size:14.3px!important}
  .inventory-tab b{font-size:13px!important}
  .mh-delta{font-size:19.5px!important}
  .raid-hero-main h3{font-size:32.5px!important}
  .raid-hero-main p{font-size:16.9px!important}
  .raid-status{font-size:14.3px!important}
  .raid-queue-copy>b{font-size:18.2px!important}
  .raid-queue-copy>small{font-size:14.3px!important}
  .raid-icon-btn{font-size:23.4px!important}
  .raid-filter-grid label{font-size:14.3px!important}
  .raid-filter-grid input,.raid-filter-grid select{font-size:15.6px!important}
  .raid-filter-meta{font-size:14.3px!important}
  .raid-boss-art span{font-size:10.4px!important}
  .raid-boss-copy>small{font-size:13px!important}
  .raid-boss-copy h4{font-size:16.9px!important}
  .raid-req span{font-size:11.7px!important}
  .raid-boss-tile>.btn{font-size:13px!important}
  .raid-editor-panel h4{font-size:20.8px!important}
  .raid-note{font-size:15.6px!important}
  .raid-drop-choice b{font-size:15.6px!important}
  .raid-drop-choice small{font-size:13px!important}
  .raid-friend-options label{font-size:15.6px!important}
  .raid-friends label{font-size:15.6px!important}
  .raid-queue-toggle{font-size:13px!important}
  .raid-catalog-heading b{font-size:19.5px!important}
  .raid-catalog-heading small,.raid-hero-hint{font-size:14.3px!important}
  .raid-friend-picker-head small{font-size:14.3px!important}
  .raid-friend-filter-grid label{font-size:14.3px!important}
  .raid-friend-copy small{font-size:13px!important}
  .raid-friend-card>i{font-size:23.4px!important}
  .raid-page .raid-editor-panel .panel-body>h4{font-size:22.1px!important}
  .raid-page .raid-editor-panel .raid-note{font-size:15.6px!important}
  .raid-page .raid-editor-panel .raid-drop-choice b{font-size:16.9px!important}
  .raid-page .raid-editor-panel .raid-drop-choice small{font-size:14.3px!important}
  .raid-page .raid-editor-panel .raid-drop-choice>i{font-size:24.7px!important}
  .raid-page .raid-editor-panel .raid-chip{font-size:15.6px!important}
  .raid-page .raid-editor-panel .raid-friend-options label{font-size:15.6px!important}
  .raid-page .raid-hero-actions .raid-start-icon{font-size:19.5px!important}
  .settings-v201 .settings-page-head p{font-size:15.6px!important}
  .settings-head-emblem{font-size:39px!important}
  .settings-v201 .settings-section-heading p{font-size:14.3px!important}
  .settings-v201 .settings-section-heading .eyebrow{font-size:11.7px!important}
  .settings-v201 .settings-section-symbol{font-size:32.5px!important}
  .settings-v201 .settings-section .switchrow b{font-size:15.6px!important}
  .settings-v201 .settings-section .switchrow small{font-size:13px!important}
  .settings-v201 .mode-visibility-text b{font-size:16.9px!important}
  .settings-v201 .mode-visibility-text small{font-size:13px!important}
  .ug-hero p{font-size:15.6px!important}
  .ug-kpis article>span{font-size:14.3px!important}
  .ug-kpis article small{font-size:13px!important}
  .ug-setting b{font-size:16.9px!important}
  .ug-setting small{font-size:13px!important}
  .ug-budgets label{font-size:14.3px!important}
  .ug-muted{font-size:14.3px!important}
  .ug-formula b{font-size:15.6px!important}
  .ug-formula p{font-size:14.3px!important}
  .ug-fighter small{font-size:13px!important}
  .ug-fighter b{font-size:19.5px!important}
  .ug-fighter span{font-size:13px!important}
  .ug-health>span{font-size:14.3px!important}
  .ug-candidate b{font-size:15.6px!important}
  .ug-candidate small{font-size:13px!important}
  .ug-history-row .ug-result{font-size:13px!important}
  .ug-history-row b{font-size:15.6px!important}
  .ug-history-row small{font-size:13px!important}
  .ug-rewards{font-size:13px!important}
  .mut-hero-copy p{font-size:19.5px!important}
  .mut-legend span{font-size:15.6px!important}
  .mut-legend i{font-size:14.3px!important}
  .mut-cat-title b{font-size:23.4px!important}
  .mut-category input[type=number],.mut-budget input{font-size:18.2px!important}
  .mut-mini-meta{font-size:14.3px!important}
  .mut-recipe-head h4{font-size:27.3px!important}
  .mut-recipe b{font-size:19.5px!important}
  .mut-chest-copy b{font-size:24.7px!important}
  .mut-chest-state{font-size:14.3px!important}
  .settings-business-badge{font-size:14.3px!important}
  .biz-upgrade-copy b{font-size:31.2px!important}
  .biz-upgrade-copy small{font-size:15.6px!important}
  .biz-upgrade-note{font-size:14.3px!important}
  .mut-tab{font-size:22.1px!important}
  .mut-side-head h3{font-size:28.6px!important}
  .mut-side-head span{font-size:14.3px!important}
  .mut-type-btn{font-size:26px!important}
  .mut-type-btn small{font-size:11.7px!important}
  .mut-ing-card b{font-size:31.2px!important}
  .mut-ing-card small{font-size:14.3px!important}
  .mut-workspace-head h3{font-size:44.2px!important}
  .mut-craft-controls input{font-size:20.8px!important}
  .mut-pills-indicator b{font-size:31.2px!important}
  .mut-recipe-level{font-size:37.7px!important}
  .mut-recipe-term b,.mut-recipe-result b{font-size:28.6px!important}
  .mut-recipe-term span,.mut-recipe-result span{font-size:18.2px!important}
  .mut-recipe-term small{font-size:14.3px!important}
  .mut-recipe-plus,.mut-recipe-arrow{font-size:41.6px!important}
  .mut-recipe-badge{font-size:18.2px!important}
  .mut-chest-pick b{font-size:23.4px!important}
  .mut-chest-pick span{font-size:14.3px!important}
  .mut-chest-detail-art strong{font-size:33.8px!important}
  .mut-ornaments h4{font-size:28.6px!important}
  .mut-orn span{font-size:23.4px!important}
  .mut-orn small{font-size:13px!important}
  .mut-game-page .mut-type-btn{font-size:24.7px!important}
  .mut-game-page .mut-type-btn small{font-size:11.7px!important}
  .mut-game-page .mut-recipe-term b,.mut-game-page .mut-recipe-result b{font-size:22.1px!important}
  .mut-game-page .mut-recipe-badge{font-size:15.6px!important}
  .mut-game-page .mut-chest-live-timer strong{font-size:39px!important}
  .mut-game-page .mut-claim-history h4{font-size:28.6px!important}
  .mut-game-page .mut-claim time{font-size:15.6px!important}
  .mut-game-page .mut-claim-item b{font-size:15.6px!important}
  .mut-game-page .mut-claim-item span{font-size:16.9px!important}
  .settings-biz-text b{font-size:24.7px!important}
  .mut-craft-item b{font-size:29.9px!important}
  .mut-craft-item small{font-size:14.3px!important}
  .mut-chain-arrow{font-size:37.7px!important}
  .mut-craft-price b{font-size:29.9px!important}
  .mut-craft-price small{font-size:14.3px!important}
  .mut-craft-afford{font-size:14.3px!important}
  .mut-reward-tabs button{font-size:18.2px!important}
  .mut-game-page .mut-craft-title b{font-size:36.4px!important}
  .mut-game-page .mut-craft-title span{font-size:33.8px!important}
  .mut-game-page .mut-craft-status{font-size:15.6px!important}
  .mut-game-page .mut-flow-op{font-size:39px!important}
  .mut-game-page .mut-flow-block strong{font-size:24.7px!important}
  .mut-game-page .mut-flow-block span{font-size:14.3px!important}
  .mut-game-page .mut-craft-meta b{font-size:22.1px!important}
  .mut-game-page .mut-ing-card b{font-size:15.6px!important}
  .settings-business-v215 .settings-biz-text b{font-size:24.7px!important}
  .settings-business-v215 .settings-biz-text small{font-size:15.6px!important}
  .biz-upgrade-landing .biz-upgrade-copy b{font-size:26px!important}
  .mut-game-page .mut-compact-item b{font-size:26px!important}
  .mut-game-page .mut-compact-item small{font-size:14.3px!important}
  .mut-game-page .mut-compact-arrow,.mut-game-page .mut-compact-equals{font-size:32.5px!important}
  .mut-game-page .mut-compact-cost b{font-size:27.3px!important}
  .mut-game-page .mut-compact-cost small{font-size:13px!important}
  .mut-game-page .mut-compact-note{font-size:13px!important}
  .mut-game-page .mut-range-status{font-size:16.9px!important}
  .stash-hint{font-size:13px!important}
  .stash-modal-head small{font-size:13px!important}
  .stash-modal-head h3{font-size:28.6px!important}
  .stash-modal-head p{font-size:15.6px!important}
  .stash-modal-head button{font-size:31.2px!important}
  .stash-ingredient small{font-size:14.3px!important}
  .stash-ingredient span{font-size:15.6px!important}
  .stash-modal-foot{font-size:15.6px!important}
  .xp-gain{font-size:15.6px!important}
  .ug-priority-intro b{font-size:16.9px!important}
  .ug-priority-intro p{font-size:14.3px!important}
  .ug-priority-card small{font-size:13px!important}
  .ug-priority-card b{font-size:23.4px!important}
  .ug-priority-card span{font-size:14.3px!important}
  .ug-fallback-copy b{font-size:16.9px!important}
  .ug-fallback-copy small{font-size:13px!important}
  .ug-fallback-input{font-size:14.3px!important}
  .ug-priority-explain{font-size:14.3px!important}
  .daily-reward-hero small{font-size:13px!important}
  .daily-reward-hero strong{font-size:40.3px!important}
  .daily-reward-hero p{font-size:14.3px!important}
  .daily-reward-gift{font-size:62.4px!important}
  .daily-reward-day small,.daily-reward-day em{font-size:13px!important}
  .daily-reward-day b{font-size:14.3px!important}
  .daily-reward-received{font-size:15.6px!important}
  .daily-reward-placeholder{font-size:15.6px!important}
  .clan-help,.clan-muted{font-size:16.9px!important}
  .clan-drop small,.clan-member small,.clan-admin-user small{font-size:15.6px!important}
  .clan-drop-icon{font-size:31.2px!important}
  .clan-status{font-size:16.9px!important}
  .clan-item{font-size:14.3px!important}
  .mh-clan-notice p{font-size:16.9px!important}
  .clan-empty-state .clan-empty-icon{font-size:50.7px!important}
  .clan-empty-state b{font-size:26px!important}
  .clan-admin-toolbar span{font-size:15.6px!important}
  .clan-invitation small{font-size:15.6px!important}
  .clan-v-kicker{font-size:13px!important}
  .clan-v-btn{font-size:16.9px!important}
  .clan-v-pill{font-size:15.6px!important}
  .clan-v-banner-stamp{font-size:67.6px!important}
  .clan-v-banner-stamp small{font-size:14.3px!important}
  .clan-v-panel-heading p{font-size:16.9px!important}
  .clan-v-avatar{font-size:27.3px!important}
  .clan-v-person-text b{font-size:16.9px!important}
  .clan-v-person-text small{font-size:14.3px!important}
  .clan-v-person-badge{font-size:13px!important}
  .clan-v-person .clan-v-btn{font-size:14.3px!important}
  .clan-v-picker-heading b,.clan-v-subheading b{font-size:19.5px!important}
  .clan-v-picker-heading small,.clan-v-subheading small{font-size:15.6px!important}
  .clan-v-picker-heading>span,.clan-v-subheading>span{font-size:15.6px!important}
  .clan-v-searchrow input,.clan-v-searchrow select,.clan-v-form-grid input,.clan-v-form-grid select{font-size:16.9px!important}
  .clan-v-chip{font-size:14.3px!important}
  .clan-v-boss-art small{font-size:11.7px!important}
  .clan-v-boss-name small{font-size:13px!important}
  .clan-v-boss-name strong{font-size:18.2px!important}
  .clan-v-boss-name em{font-size:14.3px!important}
  .clan-v-boss-check{font-size:31.2px!important}
  .clan-v-form-grid label{font-size:15.6px!important}
  .clan-v-current b{font-size:22.1px!important}
  .clan-v-current small{font-size:14.3px!important}
  .clan-v-drop-label b{font-size:15.6px!important}
  .clan-v-drop-label small{font-size:13px!important}
  .clan-v-mark{font-size:26px!important}
  .clan-v-form-footer p{font-size:15.6px!important}
  .clan-v-empty-icon{font-size:41.6px!important}
  .clan-v-empty h4{font-size:23.4px!important}
  .clan-v-empty p{font-size:16.9px!important}
  .clan-v-subtle{font-size:15.6px!important}
  .clan-v-joined small,.clan-v-invite small{font-size:15.6px!important}
  .clan-v-room-head small{font-size:14.3px!important}
  .clan-v-room-head h4{font-size:27.3px!important}
  .clan-v-room-head p{font-size:15.6px!important}
  .clan-v-room-player b{font-size:15.6px!important}
  .clan-v-room-player small{font-size:14.3px!important}
  .clan-v-room-item i{font-size:13px!important}
  .clan-v-item-preview small{font-size:13px!important}
  .clan-v-mini-items span{font-size:13px!important}
  .mh-radar-kicker{font-size:13px!important}
  .mh-radar-copy p{font-size:16.9px!important}
  .mh-radar-status{font-size:14.3px!important}
  .mh-radar-caption{font-size:11.7px!important}
  .mh-day-kpi-symbol{font-size:26px!important}
  .mh-day-kpi-date{font-size:11.7px!important}
  .mh-day-kpi small{font-size:14.3px!important}
  .mh-day-kpi-foot{font-size:11.7px!important}
  .mh-day-kpi-foot em{font-size:23.4px!important}
  .mh-daily-header small{font-size:11.7px!important}
  .mh-daily-header p{font-size:14.3px!important}
  .mh-daily-close{font-size:32.5px!important}
  .mh-daily-picker label{font-size:14.3px!important}
  .mh-daily-picker input{font-size:15.6px!important}
  .mh-daily-picker button,.mh-daily-archive button{font-size:13px!important}
  .mh-daily-archive>b{font-size:14.3px!important}
  .mh-daily-summary small{font-size:13px!important}
  .mh-daily-section-title b{font-size:23.4px!important}
  .mh-daily-section-title span{font-size:13px!important}
  .mh-daily-boss-head small{font-size:11.7px!important}
  .mh-daily-boss-head h3{font-size:19.5px!important}
  .mh-daily-boss-head p{font-size:13px!important}
  .mh-daily-boss-head>strong{font-size:24.7px!important}
  .mh-daily-boss-head>strong small{font-size:11.7px!important}
  .mh-daily-drop span b{font-size:13px!important}
  .mh-daily-drop span small{font-size:10.4px!important}
  .mh-daily-drop strong{font-size:16.9px!important}
  .mh-daily-no-drop,.mh-daily-unknown{font-size:13px!important}
  .mh-daily-empty span{font-size:42.9px!important}
  .mh-daily-empty h3{font-size:22.1px!important}
  .mh-daily-empty p{font-size:14.3px!important}
  .mh-daily-note{font-size:11.7px!important}
  #homeKpis .mh-day-kpi-symbol{font-size:24.7px!important}
  #homeKpis .mh-day-kpi-body small{font-size:13px!important}
  #homeKpis .mh-day-kpi-date{font-size:10.4px!important}
  #homeKpis .mh-day-kpi-arrow{font-size:23.4px!important}
  .mh-daily-clear-panel>b{font-size:15.6px!important}
  .mh-daily-clear-panel p{font-size:13px!important}
  .mh-daily-clear-panel button{font-size:13px!important}
  .mh-daily-metric-tabs button{font-size:14.3px!important}
  .mh-daily-focus small{font-size:13px!important}
  .mh-daily-focus span{font-size:14.3px!important}
  .mh-daily-close.mh-close-fallback:after{font-size:37.7px!important}
  .combat-items-settings .combat-rule .autobuy-fields input{font-size:18.2px!important}
  .combat-items-settings .combat-rule .switchrow>span{font-size:15.6px!important}
  .auth-session-badge{font-size:13px!important}
  .auth-session-summary small{font-size:11.7px!important}
  .auth-session-summary b{font-size:18.2px!important}
  .auth-session-summary span{font-size:13px!important}
  .mh-auth-modal-head small{font-size:11.7px!important}
  .mh-auth-modal-head h2{font-size:35.1px!important}
  .mh-auth-modal-head p{font-size:15.6px!important}
  .mh-auth-close{font-size:29.9px!important}
  .mh-auth-tab{font-size:14.3px!important}
  .mh-auth-field{font-size:15.6px!important}
  .mh-auth-message{font-size:14.3px!important}
  .mh-auth-note{font-size:14.3px!important}
  .mh-auth-warning{font-size:14.3px!important}
  .mut-game-page .mut-class-select>span{font-size:29.9px!important}
  .mut-game-page .mut-class-select b{font-size:16.9px!important}
  .mut-game-page .mut-class-select small{font-size:11.7px!important}
  .mut-game-page .mut-class-run{font-size:14.3px!important}
  .mut-game-page .mut-plan-board-head b{font-size:19.5px!important}
  .mut-game-page .mut-plan-board-head small{font-size:13px!important}
  .mut-game-page .mut-plan-chip b{font-size:22.1px!important}
  .mut-game-page .mut-plan-chip span{font-size:11.7px!important}
  .mut-game-page .mut-plan-chip small{font-size:10.4px!important}
  .mut-game-page .mut-range-presets select{font-size:18.2px!important}
  .mut-game-page .mut-range-mode-badge{font-size:14.3px!important}
  .mut-game-page .mut-class-select em{font-size:13px!important}
  .mut-game-page .mut-class-stats span{font-size:10.4px!important}
  .mut-game-page .mut-class-stats b{font-size:13px!important}
  .mut-game-page .mut-selected-kicker{font-size:11.7px!important}
  .mut-game-page .mut-ing-card .mut-ing-qty{font-size:32.5px!important}
  .mut-game-page .mut-ing-card small{font-size:11.7px!important}
  .mut-game-page .mut-cascade-head b{font-size:23.4px!important}
  .mut-game-page .mut-cascade-head small{font-size:13px!important}
  .mut-game-page .mut-cascade-head>span{font-size:11.7px!important}
  .mut-game-page .mut-cascade-item small{font-size:10.4px!important}
  .mut-game-page .mut-cascade-item b{font-size:16.9px!important}
  .mut-game-page .mut-cascade-item span{font-size:13px!important}
  .mut-game-page .mut-cascade-arrow strong{font-size:36.4px!important}
  .mut-game-page .mut-cascade-arrow small{font-size:11.7px!important}
  .mut-game-page .mut-cascade-meta b{font-size:18.2px!important}
  .mut-game-page .mut-cascade-meta small{font-size:11.7px!important}
  .mut-game-page .mut-cascade-meta span{font-size:11.7px!important}
  .mut-craft-log-code{font-size:22.1px!important}
  .mut-craft-log-title b{font-size:15.6px!important}
  .mut-craft-log-title span{font-size:10.4px!important}
  .mut-craft-log-copy small{font-size:11.7px!important}
  .mut-craft-log-row time{font-size:11.7px!important}
  .equipment-auto-head p{font-size:13px!important}
  .equipment-max-badge{font-size:13px!important}
  .equipment-tab{font-size:15.6px!important}
  .equipment-item-main h4{font-size:28.6px!important}
  .equipment-level-line b{font-size:16.9px!important}
  .equipment-level-line span{font-size:11.7px!important}
  .equipment-master-switch{font-size:13px!important}
  .equipment-status-row b{font-size:14.3px!important}
  .equipment-status-row small{font-size:11.7px!important}
  .equipment-status-row time{font-size:11.7px!important}
  .equipment-currency-title b{font-size:18.2px!important}
  .equipment-currency-title small{font-size:11.7px!important}
  .equipment-currency-title>span{font-size:11.7px!important}
  .equipment-currency-check{font-size:14.3px!important}
  .equipment-currency-copy b{font-size:14.3px!important}
  .equipment-currency-copy small{font-size:10.4px!important}
  .equipment-currency-chance{font-size:13px!important}
  .equipment-auto-note p{font-size:11.7px!important}
  .equipment-upgrade-stats-head b{font-size:15.6px!important}
  .equipment-upgrade-stats-head small{font-size:10.4px!important}
  .equipment-upgrade-stats-head>span{font-size:11.7px!important}
  .equipment-upgrade-stat-grid small{font-size:10.4px!important}
  .equipment-upgrade-stat-grid b{font-size:14.3px!important}
  .equipment-upgrade-spent>small{font-size:10.4px!important}
  .equipment-upgrade-spent span b{font-size:13px!important}
  .equipment-upgrade-spent span small{font-size:9.1px!important}
  .equipment-upgrade-spent .equipment-stat-empty{font-size:11.7px!important}
  .modes-head-status small{font-size:10.4px!important}
  .modes-head-status b{font-size:15.6px!important}
  .modes-tabs button>span{font-size:23.4px!important}
  .modes-tabs button b{font-size:18.2px!important}
  .modes-tabs button small{font-size:13px!important}
  .mode-floor-title{font-size:11.7px!important}
  .mode-floor-title b{font-size:11.7px!important}
  .mode-boss-thumb i{font-size:10.4px!important}
  .mode-boss-mini b{font-size:14.3px!important}
  .mode-boss-mini small{font-size:10.4px!important}
  .mode-boss-mini>em{font-size:18.2px!important}
  .mode-current-art span{font-size:11.7px!important}
  .mode-current-boss h3{font-size:33.8px!important}
  .mode-current-boss p{font-size:14.3px!important}
  .mode-current-meta span{font-size:11.7px!important}
  .mode-current-meta b{font-size:13px!important}
  .mode-choice b{font-size:14.3px!important}
  .mode-choice small{font-size:10.4px!important}
  .mode-flags b,.mode-wide-check b{font-size:13px!important}
  .mode-flags small,.mode-wide-check small{font-size:10.4px!important}
  .mode-friend-card b{font-size:13px!important}
  .mode-friend-card small{font-size:10.4px!important}
  .mode-filter-switch button{font-size:11.7px!important}
  .mode-all-boss-note b{font-size:14.3px!important}
  .mode-all-boss-note small{font-size:11.7px!important}
  .mode-invite-summary h3{font-size:31.2px!important}
  .mode-invite-summary p{font-size:13px!important}
  .mode-invite-counters b{font-size:26px!important}
  .mode-invite-counters small{font-size:10.4px!important}
  .mode-friend-hero h3{font-size:31.2px!important}
  .mode-friend-hero p{font-size:13px!important}
  .mode-friend-hero>span{font-size:11.7px!important}
  .friend-create-step b{font-size:14.3px!important}
  .friend-create-step small{font-size:11.7px!important}
  .friend-goal b{font-size:11.7px!important}
  .friend-goal small{font-size:10.4px!important}
  .friend-active-title p{font-size:11.7px!important}
  .friend-active-title>span{font-size:11.7px!important}
  .friend-room-head small{font-size:9.1px!important}
  .friend-room-head h4{font-size:20.8px!important}
  .friend-room-head p{font-size:10.4px!important}
  .friend-room-role{font-size:9.1px!important}
  .friend-room-player>span{font-size:11.7px!important}
  .friend-room-player b{font-size:11.7px!important}
  .friend-room-player small{font-size:9.1px!important}
  .friend-room-loot i{font-size:10.4px!important}
  .friend-room-no-goal{font-size:13px!important}
  .boss-info-hero>div>span{font-size:10.4px!important}
  .boss-info-hero h3{font-size:29.9px!important}
  .boss-info-hero p{font-size:11.7px!important}
  .boss-info-stats-grid small{font-size:10.4px!important}
  .boss-info-stats-grid b{font-size:26px!important}
  .boss-info-last b{font-size:11.7px!important}
  .boss-info-last span,.boss-info-last small{font-size:10.4px!important}
  .boss-modes-page .friend-code-join h3{font-size:26px!important}
  .boss-modes-page .friend-code-join p{font-size:13px!important}
  .boss-modes-page .friend-code-form input{font-size:22.1px!important}
  .boss-modes-page .friend-room-code small{font-size:10.4px!important}
  .boss-modes-page .friend-room-code b{font-size:28.6px!important}
  .boss-modes-page .friend-room-code span{font-size:10.4px!important}
  .boss-modes-page .friend-goal span>em{font-size:9.1px!important}
  .boss-modes-page .friend-goal b{font-size:13px!important}
  .friend-room-counters small{font-size:10.4px!important}
  .friend-room-counters b{font-size:23.4px!important}
  .friend-room-counters span{font-size:10.4px!important}
  .friend-member-remove{font-size:23.4px!important}
  .friend-registered-card b{font-size:11.7px!important}
  .friend-registered-card small{font-size:9.1px!important}
  .friend-schedule-field>span{font-size:11.7px!important}
  .friend-schedule-field small{font-size:10.4px!important}
  .friend-launch-box small,.friend-hunt-active small{font-size:10.4px!important}
  .friend-launch-box b,.friend-hunt-active b{font-size:22.1px!important}
  .friend-launch-box span{font-size:11.7px!important}
  .friend-hunt-active p{font-size:11.7px!important}
  .friend-confirm-box b{font-size:14.3px!important}
  .friend-confirm-box span{font-size:11.7px!important}
  .friend-room-journal-head small{font-size:9.1px!important}
  .friend-room-journal-head b{font-size:15.6px!important}
  .friend-room-journal-head>span{font-size:10.4px!important}
  .friend-room-journal-row b{font-size:11.7px!important}
  .friend-room-journal-row span{font-size:10.4px!important}
  .friend-room-player-mark,.friend-room-player>span{font-size:19.5px!important}
  .friend-room-player-head b{font-size:18.2px!important}
  .friend-room-player-main>small{font-size:14.3px!important}
  .friend-ready-pill{font-size:13px!important}
  .friend-room-loot-head b{font-size:14.3px!important}
  .friend-room-loot-head small{font-size:13px!important}
  .friend-room-loot-card b{font-size:15.6px!important}
  .friend-room-loot-card small{font-size:13px!important}
  .friend-room-loot-card i{font-size:18.2px!important}
  .friend-currency-goals>label>span{font-size:15.6px!important}
  .friend-currency-goals input{font-size:18.2px!important}
  .friend-currency-goals>label>small{font-size:11.7px!important}

  .mh-control-head small{font-size:10.4px!important}
  .mh-control-head b{font-size:19.5px!important}
  .mh-control-label{font-size:11.7px!important}
  .mh-theme-btn span{font-size:11.7px!important}
  .mh-lang-btn{font-size:14.3px!important}
  .mh-control-foot{font-size:10.4px!important}
  .mh-theme-card b{font-size:19.5px!important}
  .mh-theme-card small{font-size:11.7px!important}
}


/* v318 — full-width desktop + another 30% content typography.
   Top status/header typography intentionally stays exactly at v317 sizes. */
@media (min-width:851px){
  html,body{width:100%!important;max-width:none!important}
  .shell{
    width:calc(100vw - 20px)!important;
    max-width:none!important;
    margin:0 10px!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  .shell>main,.shell>.nav{font-size:130%!important}
  main{width:100%!important;max-width:none!important}
  main>.panel,main>.hero,main>.floor-card,main>.grid,main>.mut-game-shell,
  main>.profile-subpanel,main>.character-profile-panel{max-width:none!important;width:100%!important}
}
@media (min-width:1080px){
  .shell{
    grid-template-columns:280px minmax(0,1fr)!important;
    column-gap:20px!important;
  }
  .nav{width:280px!important}
  .mut-game-page .mut-game-shell{width:100%!important;max-width:none!important}
  .mut-game-page .mut-game-layout{grid-template-columns:minmax(390px,430px) minmax(0,1fr)!important;width:100%!important}
  .mut-game-page .mut-side,.mut-game-page .mut-main{min-width:0!important;max-width:none!important}
}
/* v3.29: desktop typography reduced ~22% (was +69%, now +32%) */
@media (min-width:851px) and (hover:hover){
  .nav a{font-size:15.82px!important}
  .page-head h2{font-size:55.36px!important}
  .page-head p{font-size:17.14px!important}
  .eyebrow{font-size:13.18px!important}
  .panel-head h3,.floor-head h3{font-size:26.36px!important}
  .head-meta{font-size:14.5px!important}
  .collapse-button{font-size:14.5px!important}
  .hero-topline{font-size:13.18px!important}
  .battle-portrait span{font-size:14.5px!important}
  .battle-portrait b{font-size:40.86px!important}
  .hp-head{font-size:15.82px!important}
  .hp-head strong{font-size:19.77px!important}
  .hp-value{font-size:17.14px!important}
  .btn{font-size:15.82px!important}
  .kpi small,.stat-card small{font-size:14.5px!important}
  .kpi b,.stat-card b{font-size:35.59px!important}
  .boss-floor{font-size:13.18px!important}
  .boss-copy h4{font-size:21.09px!important}
  .boss-copy p{font-size:14.5px!important}
  .tag{font-size:11.86px!important}
  .mini-hp span{font-size:11.86px!important}
  .floor-head p{font-size:14.5px!important}
  .slot-empty span{font-size:30.32px!important}
  .slot-empty b{font-size:14.5px!important}
  .slot-empty small{font-size:11.86px!important}
  .biz-visual span{font-size:11.86px!important}
  .biz-top h4{font-size:21.09px!important}
  .biz-top p{font-size:13.18px!important}
  .biz-state{font-size:11.86px!important}
  .resource{font-size:13.18px!important}
  .biz-next{font-size:11.86px!important}
  .item-card h4{font-size:19.77px!important}
  .item-card p{font-size:13.18px!important}
  .qty{font-size:23.73px!important}
  .set-card h4{font-size:19.77px!important}
  .set-card p{font-size:11.86px!important}
  .set-meta{font-size:11.86px!important}
  .fact small{font-size:11.86px!important}
  .fact b{font-size:21.09px!important}
  .stat-card b{font-size:39.55px!important}
  .boss-stat small{font-size:11.86px!important}
  .boss-stat b{font-size:18.45px!important}
  .boss-stat span{font-size:11.86px!important}
  .logline{font-size:11.86px!important}
  .switchrow small{font-size:11.86px!important}
  select{font-size:15.82px!important}
  .toast{font-size:14.5px!important}
  .boss-stat-hero span{font-size:15.82px!important}
  .boss-stat-hero h4{font-size:36.91px!important}
  .boss-stat-hero p{font-size:15.82px!important}
  .boss-stat-numbers small{font-size:13.18px!important}
  .boss-stat-numbers strong{font-size:31.64px!important}
  .drop-title{font-size:13.18px!important}
  .drop-title b{font-size:15.82px!important}
  .drop-card small{font-size:11.86px!important}
  .drop-card b{font-size:19.77px!important}
  .drop-card span{font-size:17.14px!important}
  .no-drop b{font-size:19.77px!important}
  .no-drop span{font-size:13.18px!important}
  .inventory-scroll:after{font-size:11.86px!important}
  .work-energy-card strong{font-size:42.18px!important}
  .work-task-id{font-size:14.5px!important}
  .work-task h4{font-size:25.05px!important}
  .energy-cost b{font-size:22.41px!important}
  .work-task-progress>div:first-child{font-size:15.82px!important}
  .task-status{font-size:13.18px!important}
  .work-drop span,.work-drop time{font-size:15.82px!important}
  .work-floor-title>span{font-size:11.86px!important}
  .work-floor-title>b{font-size:36.91px!important}
  .work-floor-title>small{font-size:13.18px!important}
  .floor-pill,.department-pill{font-size:13.18px!important}
  .task-choice>div b{font-size:15.82px!important}
  .task-choice>div small{font-size:11.86px!important}
  .work-switch-copy b{font-size:13.18px!important}
  .work-switch-copy small{font-size:10.55px!important}
  .nav-emblem{font-size:23.73px!important}
  .desktop-nav-brand small{font-size:9.23px!important}
  .desktop-nav-brand b{font-size:14.5px!important}
  .nav-icon{font-size:18.45px!important}
  .nav-label{font-size:11.86px!important}
  .desktop-nav-status{font-size:11.86px!important}
  .work-drop-copy b{font-size:19.77px!important}
  .work-drop-copy small{font-size:14.5px!important}
  .server-auth-mark{font-size:39.55px!important}
  .server-auth-steps span{font-size:17.14px!important}
  .server-auth-input{font-size:17.14px!important}
  .server-auth-note{font-size:15.82px!important}
  .server-helper-link{font-size:17.14px!important}
  .connector-main strong{font-size:36.91px!important}
  .connector-main span{font-size:15.82px!important}
  .manual-init summary{font-size:17.14px!important}
  .connector-btn small{font-size:14.5px!important}
  .connector-icon{font-size:26.36px!important}
  .qr-help{font-size:15.82px!important}
  .account-profile{font-size:15.82px!important}
  .account-avatar{font-size:22.41px!important}
  .account-profile-copy small{font-size:9.23px!important}
  .account-profile-copy b{font-size:14.5px!important}
  .character-caption h3{font-size:42.18px!important}
  .character-stats b{font-size:32.95px!important}
  .weapon-auto-switch{font-size:15.82px!important}
  .weapon-notice{font-size:15.82px!important}
  .weapon-art span{font-size:13.18px!important}
  .weapon-title h4{font-size:27.68px!important}
  .weapon-title>b{font-size:14.5px!important}
  .weapon-bonuses span{font-size:13.18px!important}
  .weapon-bonuses b{font-size:17.14px!important}
  .weapon-durability{font-size:13.18px!important}
  .repair-cost{font-size:13.18px!important}
  .character-nameplate>span,.pet-card small{font-size:13.18px!important}
  .character-nameplate h3{font-size:44.82px!important}
  .character-nameplate p{font-size:15.82px!important}
  .pet-card b{font-size:18.45px!important}
  .profile-stat b{font-size:34.27px!important}
  .profile-stat em{font-size:13.18px!important}
  .profile-stat.big b{font-size:40.86px!important}
  .weapon-state-badge{font-size:13.18px!important}
  .weapon-heading h4{font-size:34.27px!important}
  .weapon-level{font-size:14.5px!important}
  .weapon-stat-grid span{font-size:13.18px!important}
  .weapon-stat-grid b{font-size:23.73px!important}
  .weapon-stat-grid small{font-size:11.86px!important}
  .weapon-durability>div:first-child{font-size:13.18px!important}
  .weapon-durability-foot{font-size:11.86px!important}
  .weapon-upgrade-title>span{font-size:18.45px!important}
  .weapon-upgrade-title small{font-size:11.86px!important}
  .upgrade-currency b{font-size:13.18px!important}
  .upgrade-option>strong{font-size:23.73px!important}
  .upgrade-option>small{font-size:11.86px!important}
  .character-unavailable{font-size:17.14px!important}
  .room-source-note{font-size:13.18px!important}
  .original-nameplate h3{font-size:50.09px!important}
  .boss-favorite{font-size:17.14px!important}
  .quick-boss-head b{font-size:21.09px!important}
  .quick-boss>i{font-size:25.05px!important}
  .invite-flags label{font-size:15.82px!important}
  .friend-row b{font-size:15.82px!important}
  .friend-row small{font-size:13.18px!important}
  .invite-hint{font-size:11.86px!important}
  .boss-favorite span{font-size:21.09px!important}
  .boss-favorite em{font-size:10.55px!important}
  .target-queue span{font-size:10.55px!important}
  .target-queue b{font-size:15.82px!important}
  .target-queue small{font-size:10.55px!important}
  .invite-summary>div:first-child span{font-size:10.55px!important}
  .invite-summary>div:first-child b{font-size:22.41px!important}
  .invite-counters span{font-size:11.86px!important}
  .invite-counters b{font-size:14.5px!important}
  .invite-mode b{font-size:14.5px!important}
  .invite-mode small{font-size:10.55px!important}
  .invite-flags span b{font-size:13.18px!important}
  .invite-flags span small{font-size:10.55px!important}
  .friend-copy b{font-size:14.5px!important}
  .friend-copy small{font-size:10.55px!important}
  .friend-meta em{font-size:10.55px!important}
  .friend-status{font-size:10.55px!important}
  .quick-boss-line b{font-size:18.45px!important}
  .quick-boss-copy small{font-size:13.18px!important}
  .quick-boss-bookmark{font-size:18.45px!important}
  .home-bookmark span{font-size:21.09px!important}
  .boss-favorite.boss-bookmark-icon span{font-size:23.73px!important}
  .boss-target-skull span{font-size:22.41px!important}
  .drop-owned-check{font-size:10.55px!important}
  .reward-section-title{font-size:11.86px!important}
  .reward-money small{font-size:10.55px!important}
  .reward-money b{font-size:15.82px!important}
  .reward-money em{font-size:17.14px!important}
  .reward-empty b{font-size:18.45px!important}
  .reward-empty span{font-size:11.86px!important}
  .boss-target-button .boss-target-icon{font-size:22.41px!important}
  .boss-target-button em{font-size:10.55px!important}
  .mh-loader-sigil{font-size:39.55px!important}
  .mh-loader-kicker{font-size:10.55px!important}
  .mh-loader-title{font-size:27.68px!important}
  .mh-loader-text{font-size:13.18px!important}
  .invite-follow-summary span,.invite-participants-head span{font-size:10.55px!important}
  .invite-follow-summary b,.invite-participants-head b{font-size:18.45px!important}
  .invite-follow-summary small,.invite-participants-head small{font-size:11.86px!important}
  .invite-rank{font-size:11.86px!important}
  .invite-player-copy b{font-size:14.5px!important}
  .invite-player-copy small{font-size:10.55px!important}
  .invite-player-damage small{font-size:9.23px!important}
  .invite-player-damage b{font-size:19.77px!important}
  .boss-stat-summary small{font-size:13.18px!important}
  .boss-stat-summary b{font-size:44.82px!important}
  .boss-stat-summary span{font-size:14.5px!important}
  .boss-stat-photo-grid small{font-size:13.18px!important}
  .boss-stat-photo-grid strong{font-size:36.91px!important}
  .work-pending-placeholder b{font-size:19.77px!important}
  .work-pending-placeholder span{font-size:13.18px!important}
  .boss-target-button.readable em{font-size:11.86px!important}
  .boss-target-button.readable .boss-target-icon{font-size:21.09px!important}
  .invite-wait-icon{font-size:39.55px!important}
  .invite-wait-card div>span{font-size:11.86px!important}
  .invite-wait-card b{font-size:35.59px!important}
  .invite-wait-card small{font-size:13.18px!important}
  .invite-stats-tab{font-size:13.18px!important}
  .invite-stats-title span{font-size:23.73px!important}
  .invite-stats-title small{font-size:13.18px!important}
  .invite-stats-title>b{font-size:18.45px!important}
  .invite-stats-rank{font-size:15.82px!important}
  .invite-stats-name b{font-size:14.5px!important}
  .invite-stats-name small{font-size:10.55px!important}
  .invite-stats-player>strong{font-size:21.09px!important}
  .invite-journal-head{font-size:19.77px!important}
  .invite-journal-row{font-size:11.86px!important}
  .invite-journal-row span{font-size:17.14px!important}
  .invite-stats-no-data{font-size:13.18px!important}
  .invite-stats-mark{font-size:26.36px!important}
  .invite-stats-empty b{font-size:23.73px!important}
  .invite-stats-empty small{font-size:11.86px!important}
  .invite-journal-row b small{font-size:9.23px!important}
  .profile-subpanel-head h3{font-size:31.64px!important}
  .weapon-auto-switch.compact span{font-size:13.18px!important}
  .stat-upgrade-icon{font-size:27.68px!important}
  .stat-upgrade-head small{font-size:13.18px!important}
  .stat-upgrade-head b{font-size:29.0px!important}
  .mini-target-input span{font-size:10.55px!important}
  .mini-target-input input,.settings-stat-targets input{font-size:18.45px!important}
  .stat-upgrade-meta{font-size:13.18px!important}
  .stat-upgrade-cost small{font-size:13.18px!important}
  .stat-upgrade-foot{font-size:13.18px!important}
  .settings-card-head h3{font-size:27.68px!important}
  .settings-pill{font-size:11.86px!important}
  .settings-inline-note{font-size:13.18px!important}
  .settings-stat-targets span{font-size:14.5px!important}
  .paused-mark{font-size:44.82px!important}
  .friend-star{font-size:23.73px!important}
  .combat-item-setting-icon{font-size:14.5px!important}
  .combat-item-setting-copy b{font-size:17.14px!important}
  .combat-item-setting-copy small{font-size:11.86px!important}
  .combat-rule>span{font-size:21.09px!important}
  .combat-rule b{font-size:15.82px!important}
  .combat-rule small{font-size:11.86px!important}
  .stat-pick input:checked:after{font-size:14.5px!important}
  .stat-pick span{font-size:11.86px!important}
  .invite-boss-pick .friend-copy b{font-size:15.82px!important}
  .invite-boss-pick .friend-copy small{font-size:11.86px!important}
  .admin-hero span{font-size:13.18px!important}
  .admin-hero h3{font-size:32.95px!important}
  .admin-hero p{font-size:15.82px!important}
  .admin-shield{font-size:36.91px!important}
  .admin-user-meta span{font-size:13.18px!important}
  .admin-field>span{font-size:14.5px!important}
  .admin-note{font-size:14.5px!important}
  .friend-batch-summary span{font-size:14.5px!important}
  .admin-log-user>span{font-size:13.18px!important}
  .catalog-floor-head h3{font-size:27.68px!important}
  .catalog-floor-grid .boss-copy h4{font-size:22.41px!important}
  .catalog-floor-grid .boss-copy p{font-size:14.5px!important}
  .catalog-floor-grid .tag{font-size:11.86px!important}
  .catalog-floor-grid .boss-favorite.boss-bookmark-icon{font-size:11.86px!important}
  .catalog-floor-grid .boss-favorite.boss-bookmark-icon span{font-size:22.41px!important}
  .combat-item-setting-copy em{font-size:13.18px!important}
  .autobuy-copy b{font-size:17.14px!important}
  .autobuy-copy small{font-size:11.86px!important}
  .autobuy-fields label{font-size:10.55px!important}
  .autobuy-fields input{font-size:14.5px!important}
  .reward-popup-kicker{font-size:11.86px!important}
  .reward-popup-card h3{font-size:32.95px!important}
  .reward-popup-close{font-size:27.68px!important}
  .stat-settings-unified .profile-subpanel-head h3{font-size:27.68px!important}
  .boss-favorite.boss-bookmark-icon .bookmark-star{font-size:10.55px!important}
  .boss-favorite.boss-bookmark-icon .bookmark-star,.catalog-floor-grid .boss-favorite.boss-bookmark-icon .bookmark-star{font-size:10.55px!important}
  .stat-v127-title small{font-size:11.86px!important}
  .stat-v127-title b{font-size:29.0px!important}
  .stat-fixed-target small{font-size:9.23px!important}
  .stat-fixed-target b{font-size:21.09px!important}
  .stat-upgrade-card-v127 .stat-pick span{font-size:10.55px!important}
  .stat-v127-bottom small{font-size:9.23px!important}
  .stat-v127-bottom b{font-size:17.14px!important}
  .stat-settings-unified .stat-v127-title small{font-size:10.55px!important}
  .stat-settings-unified .stat-v127-title b{font-size:27.68px!important}
  .stat-settings-unified .stat-fixed-target small{font-size:7.91px!important}
  .stat-settings-unified .stat-fixed-target b{font-size:18.45px!important}
  .stat-settings-unified .stat-pick.stat-pick-compact input:checked:after{font-size:13.18px!important}
  .stat-settings-unified .stat-v127-bottom small{font-size:7.91px!important}
  .stat-settings-unified .stat-v127-bottom b{font-size:15.82px!important}
  .battle-live-reward b{font-size:13.18px!important}
  .battle-live-reward span{font-size:11.86px!important}
  .admin-server-kpi small{font-size:10.55px!important}
  .admin-server-kpi b{font-size:26.36px!important}
  .admin-server-kpi span{font-size:11.86px!important}
  .admin-chart-title b{font-size:14.5px!important}
  .admin-chart-title span{font-size:11.86px!important}
  .admin-usage-who small{font-size:10.55px!important}
  .admin-usage-metrics small,.admin-user-live-kpis small{font-size:9.23px!important}
  .admin-usage-metrics b,.admin-user-live-kpis b{font-size:17.14px!important}
  .admin-usage-detail-head h4{font-size:23.73px!important}
  .admin-usage-log-head{font-size:11.86px!important}
  .admin-usage-log-row{font-size:11.86px!important}
  .mode-control-copy b{font-size:18.45px!important}
  .mode-control-copy small{font-size:11.86px!important}
  .mode-control-state{font-size:11.86px!important}
  .action-card-copy b{font-size:18.45px!important}
  .action-card-copy small{font-size:11.86px!important}
  .scene-room-badge span{font-size:15.82px!important}
  .scene-chip-fallback{font-size:34.27px!important}
  .scene-chip-copy small{font-size:13.18px!important}
  .scene-chip-copy b{font-size:19.77px!important}
  .scene-chip-copy em{font-size:14.5px!important}
  .profile-shelf-head h3{font-size:29.0px!important}
  .ornament-copy small{font-size:13.18px!important}
  .ornament-copy b{font-size:21.09px!important}
  .ornament-copy em{font-size:14.5px!important}
  .original-nameplate p{font-size:17.14px!important}
  .inventory-section-head small{font-size:11.86px!important}
  .inventory-section-head h3{font-size:23.73px!important}
  .inventory-section-head>b{font-size:14.5px!important}
  .inventory-tab{font-size:14.5px!important}
  .inventory-tab b{font-size:13.18px!important}
  .mh-delta{font-size:19.77px!important}
  .raid-hero-main h3{font-size:32.95px!important}
  .raid-hero-main p{font-size:17.14px!important}
  .raid-status{font-size:14.5px!important}
  .raid-queue-copy>b{font-size:18.45px!important}
  .raid-queue-copy>small{font-size:14.5px!important}
  .raid-icon-btn{font-size:23.73px!important}
  .raid-filter-grid label{font-size:14.5px!important}
  .raid-filter-grid input,.raid-filter-grid select{font-size:15.82px!important}
  .raid-filter-meta{font-size:14.5px!important}
  .raid-boss-art span{font-size:10.55px!important}
  .raid-boss-copy>small{font-size:13.18px!important}
  .raid-boss-copy h4{font-size:17.14px!important}
  .raid-req span{font-size:11.86px!important}
  .raid-boss-tile>.btn{font-size:13.18px!important}
  .raid-editor-panel h4{font-size:21.09px!important}
  .raid-note{font-size:15.82px!important}
  .raid-drop-choice b{font-size:15.82px!important}
  .raid-drop-choice small{font-size:13.18px!important}
  .raid-friend-options label{font-size:15.82px!important}
  .raid-friends label{font-size:15.82px!important}
  .raid-queue-toggle{font-size:13.18px!important}
  .raid-catalog-heading b{font-size:19.77px!important}
  .raid-catalog-heading small,.raid-hero-hint{font-size:14.5px!important}
  .raid-friend-picker-head small{font-size:14.5px!important}
  .raid-friend-filter-grid label{font-size:14.5px!important}
  .raid-friend-copy small{font-size:13.18px!important}
  .raid-friend-card>i{font-size:23.73px!important}
  .raid-page .raid-editor-panel .panel-body>h4{font-size:22.41px!important}
  .raid-page .raid-editor-panel .raid-note{font-size:15.82px!important}
  .raid-page .raid-editor-panel .raid-drop-choice b{font-size:17.14px!important}
  .raid-page .raid-editor-panel .raid-drop-choice small{font-size:14.5px!important}
  .raid-page .raid-editor-panel .raid-drop-choice>i{font-size:25.05px!important}
  .raid-page .raid-editor-panel .raid-chip{font-size:15.82px!important}
  .raid-page .raid-editor-panel .raid-friend-options label{font-size:15.82px!important}
  .raid-page .raid-hero-actions .raid-start-icon{font-size:19.77px!important}
  .settings-v201 .settings-page-head p{font-size:15.82px!important}
  .settings-head-emblem{font-size:39.55px!important}
  .settings-v201 .settings-section-heading p{font-size:14.5px!important}
  .settings-v201 .settings-section-heading .eyebrow{font-size:11.86px!important}
  .settings-v201 .settings-section-symbol{font-size:32.95px!important}
  .settings-v201 .settings-section .switchrow b{font-size:15.82px!important}
  .settings-v201 .settings-section .switchrow small{font-size:13.18px!important}
  .settings-v201 .mode-visibility-text b{font-size:17.14px!important}
  .settings-v201 .mode-visibility-text small{font-size:13.18px!important}
  .ug-hero p{font-size:15.82px!important}
  .ug-kpis article>span{font-size:14.5px!important}
  .ug-kpis article small{font-size:13.18px!important}
  .ug-setting b{font-size:17.14px!important}
  .ug-setting small{font-size:13.18px!important}
  .ug-budgets label{font-size:14.5px!important}
  .ug-muted{font-size:14.5px!important}
  .ug-formula b{font-size:15.82px!important}
  .ug-formula p{font-size:14.5px!important}
  .ug-fighter small{font-size:13.18px!important}
  .ug-fighter b{font-size:19.77px!important}
  .ug-fighter span{font-size:13.18px!important}
  .ug-health>span{font-size:14.5px!important}
  .ug-candidate b{font-size:15.82px!important}
  .ug-candidate small{font-size:13.18px!important}
  .ug-history-row .ug-result{font-size:13.18px!important}
  .ug-history-row b{font-size:15.82px!important}
  .ug-history-row small{font-size:13.18px!important}
  .ug-rewards{font-size:13.18px!important}
  .mut-hero-copy p{font-size:19.77px!important}
  .mut-legend span{font-size:15.82px!important}
  .mut-legend i{font-size:14.5px!important}
  .mut-cat-title b{font-size:23.73px!important}
  .mut-category input[type=number],.mut-budget input{font-size:18.45px!important}
  .mut-mini-meta{font-size:14.5px!important}
  .mut-recipe-head h4{font-size:27.68px!important}
  .mut-recipe b{font-size:19.77px!important}
  .mut-chest-copy b{font-size:25.05px!important}
  .mut-chest-state{font-size:14.5px!important}
  .settings-business-badge{font-size:14.5px!important}
  .biz-upgrade-copy b{font-size:31.64px!important}
  .biz-upgrade-copy small{font-size:15.82px!important}
  .biz-upgrade-note{font-size:14.5px!important}
  .mut-tab{font-size:22.41px!important}
  .mut-side-head h3{font-size:29.0px!important}
  .mut-side-head span{font-size:14.5px!important}
  .mut-type-btn{font-size:26.36px!important}
  .mut-type-btn small{font-size:11.86px!important}
  .mut-ing-card b{font-size:31.64px!important}
  .mut-ing-card small{font-size:14.5px!important}
  .mut-workspace-head h3{font-size:44.82px!important}
  .mut-craft-controls input{font-size:21.09px!important}
  .mut-pills-indicator b{font-size:31.64px!important}
  .mut-recipe-level{font-size:38.23px!important}
  .mut-recipe-term b,.mut-recipe-result b{font-size:29.0px!important}
  .mut-recipe-term span,.mut-recipe-result span{font-size:18.45px!important}
  .mut-recipe-term small{font-size:14.5px!important}
  .mut-recipe-plus,.mut-recipe-arrow{font-size:42.18px!important}
  .mut-recipe-badge{font-size:18.45px!important}
  .mut-chest-pick b{font-size:23.73px!important}
  .mut-chest-pick span{font-size:14.5px!important}
  .mut-chest-detail-art strong{font-size:34.27px!important}
  .mut-ornaments h4{font-size:29.0px!important}
  .mut-orn span{font-size:23.73px!important}
  .mut-orn small{font-size:13.18px!important}
  .mut-game-page .mut-type-btn{font-size:25.05px!important}
  .mut-game-page .mut-type-btn small{font-size:11.86px!important}
  .mut-game-page .mut-recipe-term b,.mut-game-page .mut-recipe-result b{font-size:22.41px!important}
  .mut-game-page .mut-recipe-badge{font-size:15.82px!important}
  .mut-game-page .mut-chest-live-timer strong{font-size:39.55px!important}
  .mut-game-page .mut-claim-history h4{font-size:29.0px!important}
  .mut-game-page .mut-claim time{font-size:15.82px!important}
  .mut-game-page .mut-claim-item b{font-size:15.82px!important}
  .mut-game-page .mut-claim-item span{font-size:17.14px!important}
  .settings-biz-text b{font-size:25.05px!important}
  .mut-craft-item b{font-size:30.32px!important}
  .mut-craft-item small{font-size:14.5px!important}
  .mut-chain-arrow{font-size:38.23px!important}
  .mut-craft-price b{font-size:30.32px!important}
  .mut-craft-price small{font-size:14.5px!important}
  .mut-craft-afford{font-size:14.5px!important}
  .mut-reward-tabs button{font-size:18.45px!important}
  .mut-game-page .mut-craft-title b{font-size:36.91px!important}
  .mut-game-page .mut-craft-title span{font-size:34.27px!important}
  .mut-game-page .mut-craft-status{font-size:15.82px!important}
  .mut-game-page .mut-flow-op{font-size:39.55px!important}
  .mut-game-page .mut-flow-block strong{font-size:25.05px!important}
  .mut-game-page .mut-flow-block span{font-size:14.5px!important}
  .mut-game-page .mut-craft-meta b{font-size:22.41px!important}
  .mut-game-page .mut-ing-card b{font-size:15.82px!important}
  .settings-business-v215 .settings-biz-text b{font-size:25.05px!important}
  .settings-business-v215 .settings-biz-text small{font-size:15.82px!important}
  .biz-upgrade-landing .biz-upgrade-copy b{font-size:26.36px!important}
  .mut-game-page .mut-compact-item b{font-size:26.36px!important}
  .mut-game-page .mut-compact-item small{font-size:14.5px!important}
  .mut-game-page .mut-compact-arrow,.mut-game-page .mut-compact-equals{font-size:32.95px!important}
  .mut-game-page .mut-compact-cost b{font-size:27.68px!important}
  .mut-game-page .mut-compact-cost small{font-size:13.18px!important}
  .mut-game-page .mut-compact-note{font-size:13.18px!important}
  .mut-game-page .mut-range-status{font-size:17.14px!important}
  .stash-hint{font-size:13.18px!important}
  .stash-modal-head small{font-size:13.18px!important}
  .stash-modal-head h3{font-size:29.0px!important}
  .stash-modal-head p{font-size:15.82px!important}
  .stash-modal-head button{font-size:31.64px!important}
  .stash-ingredient small{font-size:14.5px!important}
  .stash-ingredient span{font-size:15.82px!important}
  .stash-modal-foot{font-size:15.82px!important}
  .xp-gain{font-size:15.82px!important}
  .ug-priority-intro b{font-size:17.14px!important}
  .ug-priority-intro p{font-size:14.5px!important}
  .ug-priority-card small{font-size:13.18px!important}
  .ug-priority-card b{font-size:23.73px!important}
  .ug-priority-card span{font-size:14.5px!important}
  .ug-fallback-copy b{font-size:17.14px!important}
  .ug-fallback-copy small{font-size:13.18px!important}
  .ug-fallback-input{font-size:14.5px!important}
  .ug-priority-explain{font-size:14.5px!important}
  .daily-reward-hero small{font-size:13.18px!important}
  .daily-reward-hero strong{font-size:40.86px!important}
  .daily-reward-hero p{font-size:14.5px!important}
  .daily-reward-gift{font-size:63.27px!important}
  .daily-reward-day small,.daily-reward-day em{font-size:13.18px!important}
  .daily-reward-day b{font-size:14.5px!important}
  .daily-reward-received{font-size:15.82px!important}
  .daily-reward-placeholder{font-size:15.82px!important}
  .clan-help,.clan-muted{font-size:17.14px!important}
  .clan-drop small,.clan-member small,.clan-admin-user small{font-size:15.82px!important}
  .clan-drop-icon{font-size:31.64px!important}
  .clan-status{font-size:17.14px!important}
  .clan-item{font-size:14.5px!important}
  .mh-clan-notice p{font-size:17.14px!important}
  .clan-empty-state .clan-empty-icon{font-size:51.41px!important}
  .clan-empty-state b{font-size:26.36px!important}
  .clan-admin-toolbar span{font-size:15.82px!important}
  .clan-invitation small{font-size:15.82px!important}
  .clan-v-kicker{font-size:13.18px!important}
  .clan-v-btn{font-size:17.14px!important}
  .clan-v-pill{font-size:15.82px!important}
  .clan-v-banner-stamp{font-size:68.55px!important}
  .clan-v-banner-stamp small{font-size:14.5px!important}
  .clan-v-panel-heading p{font-size:17.14px!important}
  .clan-v-avatar{font-size:27.68px!important}
  .clan-v-person-text b{font-size:17.14px!important}
  .clan-v-person-text small{font-size:14.5px!important}
  .clan-v-person-badge{font-size:13.18px!important}
  .clan-v-person .clan-v-btn{font-size:14.5px!important}
  .clan-v-picker-heading b,.clan-v-subheading b{font-size:19.77px!important}
  .clan-v-picker-heading small,.clan-v-subheading small{font-size:15.82px!important}
  .clan-v-picker-heading>span,.clan-v-subheading>span{font-size:15.82px!important}
  .clan-v-searchrow input,.clan-v-searchrow select,.clan-v-form-grid input,.clan-v-form-grid select{font-size:17.14px!important}
  .clan-v-chip{font-size:14.5px!important}
  .clan-v-boss-art small{font-size:11.86px!important}
  .clan-v-boss-name small{font-size:13.18px!important}
  .clan-v-boss-name strong{font-size:18.45px!important}
  .clan-v-boss-name em{font-size:14.5px!important}
  .clan-v-boss-check{font-size:31.64px!important}
  .clan-v-form-grid label{font-size:15.82px!important}
  .clan-v-current b{font-size:22.41px!important}
  .clan-v-current small{font-size:14.5px!important}
  .clan-v-drop-label b{font-size:15.82px!important}
  .clan-v-drop-label small{font-size:13.18px!important}
  .clan-v-mark{font-size:26.36px!important}
  .clan-v-form-footer p{font-size:15.82px!important}
  .clan-v-empty-icon{font-size:42.18px!important}
  .clan-v-empty h4{font-size:23.73px!important}
  .clan-v-empty p{font-size:17.14px!important}
  .clan-v-subtle{font-size:15.82px!important}
  .clan-v-joined small,.clan-v-invite small{font-size:15.82px!important}
  .clan-v-room-head small{font-size:14.5px!important}
  .clan-v-room-head h4{font-size:27.68px!important}
  .clan-v-room-head p{font-size:15.82px!important}
  .clan-v-room-player b{font-size:15.82px!important}
  .clan-v-room-player small{font-size:14.5px!important}
  .clan-v-room-item i{font-size:13.18px!important}
  .clan-v-item-preview small{font-size:13.18px!important}
  .clan-v-mini-items span{font-size:13.18px!important}
  .mh-radar-kicker{font-size:13.18px!important}
  .mh-radar-copy p{font-size:17.14px!important}
  .mh-radar-status{font-size:14.5px!important}
  .mh-radar-caption{font-size:11.86px!important}
  .mh-day-kpi-symbol{font-size:26.36px!important}
  .mh-day-kpi-date{font-size:11.86px!important}
  .mh-day-kpi small{font-size:14.5px!important}
  .mh-day-kpi-foot{font-size:11.86px!important}
  .mh-day-kpi-foot em{font-size:23.73px!important}
  .mh-daily-header small{font-size:11.86px!important}
  .mh-daily-header p{font-size:14.5px!important}
  .mh-daily-close{font-size:32.95px!important}
  .mh-daily-picker label{font-size:14.5px!important}
  .mh-daily-picker input{font-size:15.82px!important}
  .mh-daily-picker button,.mh-daily-archive button{font-size:13.18px!important}
  .mh-daily-archive>b{font-size:14.5px!important}
  .mh-daily-summary small{font-size:13.18px!important}
  .mh-daily-section-title b{font-size:23.73px!important}
  .mh-daily-section-title span{font-size:13.18px!important}
  .mh-daily-boss-head small{font-size:11.86px!important}
  .mh-daily-boss-head h3{font-size:19.77px!important}
  .mh-daily-boss-head p{font-size:13.18px!important}
  .mh-daily-boss-head>strong{font-size:25.05px!important}
  .mh-daily-boss-head>strong small{font-size:11.86px!important}
  .mh-daily-drop span b{font-size:13.18px!important}
  .mh-daily-drop span small{font-size:10.55px!important}
  .mh-daily-drop strong{font-size:17.14px!important}
  .mh-daily-no-drop,.mh-daily-unknown{font-size:13.18px!important}
  .mh-daily-empty span{font-size:43.5px!important}
  .mh-daily-empty h3{font-size:22.41px!important}
  .mh-daily-empty p{font-size:14.5px!important}
  .mh-daily-note{font-size:11.86px!important}
  #homeKpis .mh-day-kpi-symbol{font-size:25.05px!important}
  #homeKpis .mh-day-kpi-body small{font-size:13.18px!important}
  #homeKpis .mh-day-kpi-date{font-size:10.55px!important}
  #homeKpis .mh-day-kpi-arrow{font-size:23.73px!important}
  .mh-daily-clear-panel>b{font-size:15.82px!important}
  .mh-daily-clear-panel p{font-size:13.18px!important}
  .mh-daily-clear-panel button{font-size:13.18px!important}
  .mh-daily-metric-tabs button{font-size:14.5px!important}
  .mh-daily-focus small{font-size:13.18px!important}
  .mh-daily-focus span{font-size:14.5px!important}
  .mh-daily-close.mh-close-fallback:after{font-size:38.23px!important}
  .combat-items-settings .combat-rule .autobuy-fields input{font-size:18.45px!important}
  .combat-items-settings .combat-rule .switchrow>span{font-size:15.82px!important}
  .auth-session-badge{font-size:13.18px!important}
  .auth-session-summary small{font-size:11.86px!important}
  .auth-session-summary b{font-size:18.45px!important}
  .auth-session-summary span{font-size:13.18px!important}
  .mh-auth-modal-head small{font-size:11.86px!important}
  .mh-auth-modal-head h2{font-size:35.59px!important}
  .mh-auth-modal-head p{font-size:15.82px!important}
  .mh-auth-close{font-size:30.32px!important}
  .mh-auth-tab{font-size:14.5px!important}
  .mh-auth-field{font-size:15.82px!important}
  .mh-auth-message{font-size:14.5px!important}
  .mh-auth-note{font-size:14.5px!important}
  .mh-auth-warning{font-size:14.5px!important}
  .mut-game-page .mut-class-select>span{font-size:30.32px!important}
  .mut-game-page .mut-class-select b{font-size:17.14px!important}
  .mut-game-page .mut-class-select small{font-size:11.86px!important}
  .mut-game-page .mut-class-run{font-size:14.5px!important}
  .mut-game-page .mut-plan-board-head b{font-size:19.77px!important}
  .mut-game-page .mut-plan-board-head small{font-size:13.18px!important}
  .mut-game-page .mut-plan-chip b{font-size:22.41px!important}
  .mut-game-page .mut-plan-chip span{font-size:11.86px!important}
  .mut-game-page .mut-plan-chip small{font-size:10.55px!important}
  .mut-game-page .mut-range-presets select{font-size:18.45px!important}
  .mut-game-page .mut-range-mode-badge{font-size:14.5px!important}
  .mut-game-page .mut-class-select em{font-size:13.18px!important}
  .mut-game-page .mut-class-stats span{font-size:10.55px!important}
  .mut-game-page .mut-class-stats b{font-size:13.18px!important}
  .mut-game-page .mut-selected-kicker{font-size:11.86px!important}
  .mut-game-page .mut-ing-card .mut-ing-qty{font-size:32.95px!important}
  .mut-game-page .mut-ing-card small{font-size:11.86px!important}
  .mut-game-page .mut-cascade-head b{font-size:23.73px!important}
  .mut-game-page .mut-cascade-head small{font-size:13.18px!important}
  .mut-game-page .mut-cascade-head>span{font-size:11.86px!important}
  .mut-game-page .mut-cascade-item small{font-size:10.55px!important}
  .mut-game-page .mut-cascade-item b{font-size:17.14px!important}
  .mut-game-page .mut-cascade-item span{font-size:13.18px!important}
  .mut-game-page .mut-cascade-arrow strong{font-size:36.91px!important}
  .mut-game-page .mut-cascade-arrow small{font-size:11.86px!important}
  .mut-game-page .mut-cascade-meta b{font-size:18.45px!important}
  .mut-game-page .mut-cascade-meta small{font-size:11.86px!important}
  .mut-game-page .mut-cascade-meta span{font-size:11.86px!important}
  .mut-craft-log-code{font-size:22.41px!important}
  .mut-craft-log-title b{font-size:15.82px!important}
  .mut-craft-log-title span{font-size:10.55px!important}
  .mut-craft-log-copy small{font-size:11.86px!important}
  .mut-craft-log-row time{font-size:11.86px!important}
  .equipment-auto-head p{font-size:13.18px!important}
  .equipment-max-badge{font-size:13.18px!important}
  .equipment-tab{font-size:15.82px!important}
  .equipment-item-main h4{font-size:29.0px!important}
  .equipment-level-line b{font-size:17.14px!important}
  .equipment-level-line span{font-size:11.86px!important}
  .equipment-master-switch{font-size:13.18px!important}
  .equipment-status-row b{font-size:14.5px!important}
  .equipment-status-row small{font-size:11.86px!important}
  .equipment-status-row time{font-size:11.86px!important}
  .equipment-currency-title b{font-size:18.45px!important}
  .equipment-currency-title small{font-size:11.86px!important}
  .equipment-currency-title>span{font-size:11.86px!important}
  .equipment-currency-check{font-size:14.5px!important}
  .equipment-currency-copy b{font-size:14.5px!important}
  .equipment-currency-copy small{font-size:10.55px!important}
  .equipment-currency-chance{font-size:13.18px!important}
  .equipment-auto-note p{font-size:11.86px!important}
  .equipment-upgrade-stats-head b{font-size:15.82px!important}
  .equipment-upgrade-stats-head small{font-size:10.55px!important}
  .equipment-upgrade-stats-head>span{font-size:11.86px!important}
  .equipment-upgrade-stat-grid small{font-size:10.55px!important}
  .equipment-upgrade-stat-grid b{font-size:14.5px!important}
  .equipment-upgrade-spent>small{font-size:10.55px!important}
  .equipment-upgrade-spent span b{font-size:13.18px!important}
  .equipment-upgrade-spent span small{font-size:9.23px!important}
  .equipment-upgrade-spent .equipment-stat-empty{font-size:11.86px!important}
  .modes-head-status small{font-size:10.55px!important}
  .modes-head-status b{font-size:15.82px!important}
  .modes-tabs button>span{font-size:23.73px!important}
  .modes-tabs button b{font-size:18.45px!important}
  .modes-tabs button small{font-size:13.18px!important}
  .mode-floor-title{font-size:11.86px!important}
  .mode-floor-title b{font-size:11.86px!important}
  .mode-boss-thumb i{font-size:10.55px!important}
  .mode-boss-mini b{font-size:14.5px!important}
  .mode-boss-mini small{font-size:10.55px!important}
  .mode-boss-mini>em{font-size:18.45px!important}
  .mode-current-art span{font-size:11.86px!important}
  .mode-current-boss h3{font-size:34.27px!important}
  .mode-current-boss p{font-size:14.5px!important}
  .mode-current-meta span{font-size:11.86px!important}
  .mode-current-meta b{font-size:13.18px!important}
  .mode-choice b{font-size:14.5px!important}
  .mode-choice small{font-size:10.55px!important}
  .mode-flags b,.mode-wide-check b{font-size:13.18px!important}
  .mode-flags small,.mode-wide-check small{font-size:10.55px!important}
  .mode-friend-card b{font-size:13.18px!important}
  .mode-friend-card small{font-size:10.55px!important}
  .mode-filter-switch button{font-size:11.86px!important}
  .mode-all-boss-note b{font-size:14.5px!important}
  .mode-all-boss-note small{font-size:11.86px!important}
  .mode-invite-summary h3{font-size:31.64px!important}
  .mode-invite-summary p{font-size:13.18px!important}
  .mode-invite-counters b{font-size:26.36px!important}
  .mode-invite-counters small{font-size:10.55px!important}
  .mode-friend-hero h3{font-size:31.64px!important}
  .mode-friend-hero p{font-size:13.18px!important}
  .mode-friend-hero>span{font-size:11.86px!important}
  .friend-create-step b{font-size:14.5px!important}
  .friend-create-step small{font-size:11.86px!important}
  .friend-goal b{font-size:11.86px!important}
  .friend-goal small{font-size:10.55px!important}
  .friend-active-title p{font-size:11.86px!important}
  .friend-active-title>span{font-size:11.86px!important}
  .friend-room-head small{font-size:9.23px!important}
  .friend-room-head h4{font-size:21.09px!important}
  .friend-room-head p{font-size:10.55px!important}
  .friend-room-role{font-size:9.23px!important}
  .friend-room-player>span{font-size:11.86px!important}
  .friend-room-player b{font-size:11.86px!important}
  .friend-room-player small{font-size:9.23px!important}
  .friend-room-loot i{font-size:10.55px!important}
  .friend-room-no-goal{font-size:13.18px!important}
  .boss-info-hero>div>span{font-size:10.55px!important}
  .boss-info-hero h3{font-size:30.32px!important}
  .boss-info-hero p{font-size:11.86px!important}
  .boss-info-stats-grid small{font-size:10.55px!important}
  .boss-info-stats-grid b{font-size:26.36px!important}
  .boss-info-last b{font-size:11.86px!important}
  .boss-info-last span,.boss-info-last small{font-size:10.55px!important}
  .boss-modes-page .friend-code-join h3{font-size:26.36px!important}
  .boss-modes-page .friend-code-join p{font-size:13.18px!important}
  .boss-modes-page .friend-code-form input{font-size:22.41px!important}
  .boss-modes-page .friend-room-code small{font-size:10.55px!important}
  .boss-modes-page .friend-room-code b{font-size:29.0px!important}
  .boss-modes-page .friend-room-code span{font-size:10.55px!important}
  .boss-modes-page .friend-goal span>em{font-size:9.23px!important}
  .boss-modes-page .friend-goal b{font-size:13.18px!important}
  .friend-room-counters small{font-size:10.55px!important}
  .friend-room-counters b{font-size:23.73px!important}
  .friend-room-counters span{font-size:10.55px!important}
  .friend-member-remove{font-size:23.73px!important}
  .friend-registered-card b{font-size:11.86px!important}
  .friend-registered-card small{font-size:9.23px!important}
  .friend-schedule-field>span{font-size:11.86px!important}
  .friend-schedule-field small{font-size:10.55px!important}
  .friend-launch-box small,.friend-hunt-active small{font-size:10.55px!important}
  .friend-launch-box b,.friend-hunt-active b{font-size:22.41px!important}
  .friend-launch-box span{font-size:11.86px!important}
  .friend-hunt-active p{font-size:11.86px!important}
  .friend-confirm-box b{font-size:14.5px!important}
  .friend-confirm-box span{font-size:11.86px!important}
  .friend-room-journal-head small{font-size:9.23px!important}
  .friend-room-journal-head b{font-size:15.82px!important}
  .friend-room-journal-head>span{font-size:10.55px!important}
  .friend-room-journal-row b{font-size:11.86px!important}
  .friend-room-journal-row span{font-size:10.55px!important}
  .friend-room-player-mark,.friend-room-player>span{font-size:19.77px!important}
  .friend-room-player-head b{font-size:18.45px!important}
  .friend-room-player-main>small{font-size:14.5px!important}
  .friend-ready-pill{font-size:13.18px!important}
  .friend-room-loot-head b{font-size:14.5px!important}
  .friend-room-loot-head small{font-size:13.18px!important}
  .friend-room-loot-card b{font-size:15.82px!important}
  .friend-room-loot-card small{font-size:13.18px!important}
  .friend-room-loot-card i{font-size:18.45px!important}
  .friend-currency-goals>label>span{font-size:15.82px!important}
  .friend-currency-goals input{font-size:18.45px!important}
  .friend-currency-goals>label>small{font-size:11.86px!important}
  .mh-control-head small{font-size:10.55px!important}
  .mh-control-head b{font-size:19.77px!important}
  .mh-control-label{font-size:11.86px!important}
  .mh-theme-btn span{font-size:11.86px!important}
  .mh-lang-btn{font-size:14.5px!important}
  .mh-control-foot{font-size:10.55px!important}
  .mh-theme-card b{font-size:19.77px!important}
  .mh-theme-card small{font-size:11.86px!important}
}

/* Explicit topbar size lock: widening the desktop shell must not enlarge the header text. */
@media (min-width:851px){
  .topbar .brand-mark{font-size:33.8px!important}
  .topbar .brand h1{font-size:36.4px!important}
  .topbar .brand p{font-size:16.9px!important}
  .topbar .metric small{font-size:14.3px!important}
  .topbar .metric strong{font-size:22.1px!important}
  .topbar .level-line strong{font-size:31.2px!important}
  .topbar .xptext{font-size:13px!important}
  .topbar .combat-head-item small{font-size:10.4px!important}
  .topbar .combat-head-item strong{font-size:22.1px!important}
}

/* v319 — balanced desktop edge inset.
   Use layout width instead of 100vw so the scrollbar cannot eat the right gutter. */
@media (min-width:851px){
  .shell{
    width:auto!important;
    max-width:none!important;
    margin-left:16px!important;
    margin-right:16px!important;
  }
}

/* v320 — compact fixed-height invitation search. Same desktop footprint as active battle. */
#homeHero .mh-search-v2{
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
  padding:18px 20px 20px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
#homeHero .mh-find-stage{
  min-height:0!important;
  flex:1 1 auto!important;
  display:grid!important;
  grid-template-columns:minmax(300px,.38fr) minmax(0,.62fr)!important;
  gap:14px!important;
}
#homeHero .mh-find-console,
#homeHero .mh-find-queue{
  position:relative!important;
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid var(--t-border)!important;
  border-radius:20px!important;
  background:linear-gradient(155deg,color-mix(in srgb,var(--t-raised) 88%,transparent),var(--t-panel))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.025),0 10px 26px rgba(0,0,0,.24)!important;
}
#homeHero .mh-find-console{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  padding:20px 22px!important;
}
#homeHero .mh-find-console:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(110deg,transparent 0 38%,var(--t-glow) 48%,transparent 58%);
  opacity:.16;
}
#homeHero .mh-search-kicker{
  position:relative!important;z-index:1!important;
  display:flex!important;align-items:center!important;gap:10px!important;
  margin:0!important;color:var(--tx-label)!important;
  font-size:12px!important;letter-spacing:.13em!important;text-transform:uppercase!important;
}
#homeHero .mh-search-kicker i{
  width:9px!important;height:9px!important;border-radius:50%!important;
  flex:0 0 9px!important;background:var(--t-accent)!important;
  box-shadow:0 0 0 4px color-mix(in srgb,var(--t-accent) 14%,transparent),0 0 14px var(--t-glow)!important;
}
#homeHero .mh-find-console h3{
  position:relative!important;z-index:1!important;
  margin:10px 0 6px!important;color:var(--tx-title)!important;
  font-size:clamp(34px,3vw,50px)!important;line-height:1!important;
}
#homeHero .mh-find-console p{
  position:relative!important;z-index:1!important;
  margin:0!important;max-width:560px!important;color:var(--tx-muted)!important;
  font-size:13px!important;line-height:1.48!important;
}
#homeHero .mh-find-status{
  position:relative!important;z-index:1!important;
  display:flex!important;align-items:center!important;gap:11px!important;
  margin-top:14px!important;padding:9px 11px!important;
  border:1px solid var(--t-border-soft)!important;border-radius:12px!important;
  background:var(--t-field)!important;
}
#homeHero .mh-find-status-light{
  width:12px!important;height:12px!important;border-radius:50%!important;flex:0 0 12px!important;
  background:var(--t-accent)!important;box-shadow:0 0 15px var(--t-accent)!important;
}
#homeHero .mh-find-status small{display:block!important;color:var(--tx-label)!important;font-size:9px!important;letter-spacing:.14em!important}
#homeHero .mh-find-status b{display:block!important;margin-top:2px!important;color:var(--tx-title)!important;font-size:12px!important}
#homeHero .mh-find-pulse{
  position:relative!important;z-index:1!important;
  height:34px!important;margin:12px 0 8px!important;padding:0 5px!important;
  display:flex!important;align-items:center!important;gap:5px!important;
  overflow:hidden!important;border-left:1px solid var(--t-border-soft)!important;border-right:1px solid var(--t-border-soft)!important;
}
#homeHero .mh-find-pulse:before{
  content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:var(--t-border-soft)!important;
}
#homeHero .mh-find-pulse i{
  position:relative!important;z-index:1!important;display:block!important;flex:1 1 0!important;
  height:6px!important;max-height:30px!important;border-radius:99px!important;
  background:linear-gradient(180deg,var(--t-accent),var(--t-accent-2))!important;
  transform-origin:center!important;
  animation:mhFindWave 1.55s ease-in-out infinite!important;
  animation-delay:calc(var(--n,0) * -0.09s)!important;
  box-shadow:0 0 8px var(--t-glow)!important;
}
#homeHero .mh-find-pulse i:nth-child(1){--n:1}#homeHero .mh-find-pulse i:nth-child(2){--n:2}#homeHero .mh-find-pulse i:nth-child(3){--n:3}#homeHero .mh-find-pulse i:nth-child(4){--n:4}#homeHero .mh-find-pulse i:nth-child(5){--n:5}#homeHero .mh-find-pulse i:nth-child(6){--n:6}#homeHero .mh-find-pulse i:nth-child(7){--n:7}#homeHero .mh-find-pulse i:nth-child(8){--n:8}#homeHero .mh-find-pulse i:nth-child(9){--n:9}#homeHero .mh-find-pulse i:nth-child(10){--n:10}#homeHero .mh-find-pulse i:nth-child(11){--n:11}#homeHero .mh-find-pulse i:nth-child(12){--n:12}
@keyframes mhFindWave{0%,100%{height:5px;opacity:.42}25%{height:16px;opacity:.75}50%{height:29px;opacity:1}75%{height:11px;opacity:.62}}
#homeHero .mh-find-metrics{
  position:relative!important;z-index:1!important;
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;
}
#homeHero .mh-find-metrics>span{
  min-width:0!important;padding:8px 9px!important;border:1px solid var(--t-border-soft)!important;border-radius:11px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(0,0,0,.12))!important;
}
#homeHero .mh-find-metrics small{display:block!important;color:var(--tx-muted)!important;font-size:8px!important;letter-spacing:.1em!important}
#homeHero .mh-find-metrics b{display:block!important;margin-top:3px!important;color:var(--tx-number)!important;font-size:19px!important;line-height:1!important}

#homeHero .mh-find-queue{padding:13px!important}
#homeHero .mh-find-queue:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(0deg,transparent 0 4px,rgba(255,255,255,.012) 5px),linear-gradient(135deg,transparent 45%,var(--t-glow));
  opacity:.7;
}
#homeHero .mh-find-queue-head{
  position:relative!important;z-index:1!important;
  min-height:42px!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;
  padding:0 4px 10px!important;margin-bottom:9px!important;border-bottom:1px solid var(--t-border-soft)!important;
}
#homeHero .mh-find-queue-head small{display:block!important;color:var(--tx-label)!important;font-size:9px!important;letter-spacing:.14em!important}
#homeHero .mh-find-queue-head b{display:block!important;margin-top:3px!important;color:var(--tx-title)!important;font-size:12px!important}
#homeHero .mh-find-queue-head>span{display:flex!important;align-items:center!important;gap:7px!important;color:var(--tx-title)!important;font-size:10px!important;letter-spacing:.1em!important}
#homeHero .mh-find-queue-head>span i{width:8px!important;height:8px!important;border-radius:50%!important;background:var(--t-accent)!important;box-shadow:0 0 12px var(--t-accent)!important}
#homeHero .mh-find-target-grid{
  position:relative!important;z-index:1!important;
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:8px!important;
  height:calc(100% - 52px)!important;min-height:0!important;
}
#homeHero .mh-find-target{
  min-width:0!important;min-height:0!important;
  display:grid!important;grid-template-columns:46px minmax(0,1fr) auto!important;align-items:center!important;gap:9px!important;
  padding:7px 9px!important;border:1px solid var(--t-border-soft)!important;border-radius:13px!important;
  background:linear-gradient(150deg,rgba(255,255,255,.025),rgba(0,0,0,.16))!important;
  overflow:hidden!important;
}
#homeHero .mh-find-target.signal{border-color:var(--t-accent)!important;box-shadow:inset 3px 0 var(--t-accent),0 0 14px var(--t-glow)!important}
#homeHero .mh-find-target-art{width:44px!important;height:44px!important;border-radius:10px!important;overflow:hidden!important;border:1px solid var(--t-border)!important;background:var(--t-field)!important}
#homeHero .mh-find-target-art img{width:100%!important;height:100%!important;object-fit:cover!important;filter:none!important}
#homeHero .mh-find-target-copy{min-width:0!important}
#homeHero .mh-find-target-copy small{display:block!important;color:var(--tx-label)!important;font-size:8px!important;letter-spacing:.06em!important;white-space:nowrap!important}
#homeHero .mh-find-target-copy b{display:block!important;margin-top:3px!important;color:var(--tx-title)!important;font-size:11px!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#homeHero .mh-find-target-state{justify-self:end!important;color:var(--tx-muted)!important;font-size:8px!important;letter-spacing:.08em!important;white-space:nowrap!important}
#homeHero .mh-find-target.signal .mh-find-target-state{color:var(--t-accent)!important}
#homeHero .mh-find-empty{grid-column:1/-1!important;display:grid!important;place-items:center!important;color:var(--tx-muted)!important;border:1px dashed var(--t-border-soft)!important;border-radius:13px!important}

#homeHero .mh-search-v2 .mh-search-controls{
  flex:0 0 auto!important;margin:0!important;
}
#homeHero .mh-search-v2 .mh-search-controls .battle-mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
#homeHero .mh-search-v2 .mh-search-controls .battle-mode-secondary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}

@media(min-width:1181px){
  #homeHero .battle-layout,
  #homeHero .mh-search-v2{height:520px!important;min-height:520px!important;max-height:520px!important;box-sizing:border-box!important}
  #homeHero .battle-layout{overflow:hidden!important}
  #homeHero .mh-search-v2 .mh-search-controls .mode-control,
  #homeHero .mh-search-v2 .mh-search-controls .action-card{min-height:74px!important;height:74px!important;padding:9px 11px!important}
}

@media(max-width:1180px){
  #homeHero .mh-search-v2{display:block!important;padding:14px!important;overflow:visible!important}
  #homeHero .mh-find-stage{grid-template-columns:1fr!important;gap:10px!important}
  #homeHero .mh-find-console{padding:16px!important}
  #homeHero .mh-find-console h3{font-size:32px!important}
  #homeHero .mh-find-queue{min-height:310px!important}
  #homeHero .mh-search-v2 .mh-search-controls{margin-top:12px!important}
}
@media(max-width:700px){
  #homeHero .mh-find-target-grid{grid-template-columns:1fr!important;grid-template-rows:none!important;height:auto!important}
  #homeHero .mh-find-target{min-height:58px!important}
  #homeHero .mh-find-queue{min-height:0!important}
  #homeHero .mh-find-pulse i{animation:none!important;height:10px!important}
  #homeHero .mh-find-pulse i:nth-child(3n+1){height:22px!important}#homeHero .mh-find-pulse i:nth-child(4n+2){height:16px!important}
}

/* v321 — Observation Chamber search: one coherent stage, no clipped nested cards. */
#homeHero .mh-search-v3{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
  padding:14px 16px 16px!important;
  box-sizing:border-box!important;
  min-width:0!important;
  overflow:hidden!important;
}
#homeHero .mh-observe-deck{
  flex:1 1 auto!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) 74px!important;
  gap:10px!important;
  padding:12px!important;
  border:1px solid var(--t-border)!important;
  border-radius:22px!important;
  background:
    linear-gradient(155deg,color-mix(in srgb,var(--t-raised) 68%,transparent),var(--t-panel) 78%),
    radial-gradient(circle at 72% 30%,var(--t-glow),transparent 36%)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.03),0 14px 34px rgba(0,0,0,.26)!important;
  overflow:hidden!important;
  position:relative!important;
}
#homeHero .mh-observe-deck:before{
  content:"";
  position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(0deg,transparent 0 4px,rgba(255,255,255,.012) 5px);
  opacity:.55;
}
#homeHero .mh-observe-main{
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(300px,.34fr) minmax(0,.66fr)!important;
  gap:12px!important;
  position:relative!important;
  z-index:1!important;
}
#homeHero .mh-observe-copy,
#homeHero .mh-observe-monitor{
  min-width:0!important;
  min-height:0!important;
  border:1px solid var(--t-border-soft)!important;
  border-radius:17px!important;
  background:linear-gradient(160deg,rgba(255,255,255,.025),rgba(0,0,0,.15))!important;
  overflow:hidden!important;
}
#homeHero .mh-observe-copy{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  padding:15px 18px!important;
}
#homeHero .mh-observe-kicker{
  display:flex!important;align-items:center!important;gap:9px!important;
  color:var(--tx-label)!important;font-size:10px!important;letter-spacing:.14em!important;text-transform:uppercase!important;
}
#homeHero .mh-observe-kicker i{
  width:9px!important;height:9px!important;flex:0 0 9px!important;border-radius:50%!important;
  background:var(--t-accent)!important;
  box-shadow:0 0 0 4px color-mix(in srgb,var(--t-accent) 14%,transparent),0 0 14px var(--t-glow)!important;
}
#homeHero .mh-observe-copy h3{
  margin:9px 0 5px!important;
  color:var(--tx-title)!important;
  font-size:clamp(32px,2.5vw,46px)!important;
  line-height:1!important;
}
#homeHero .mh-observe-copy p{
  margin:0!important;color:var(--tx-muted)!important;
  font-size:12px!important;line-height:1.45!important;max-width:520px!important;
}
#homeHero .mh-observe-state{
  display:flex!important;align-items:center!important;gap:10px!important;
  margin-top:11px!important;padding:8px 10px!important;
  border:1px solid var(--t-border-soft)!important;border-radius:11px!important;
  background:var(--t-field)!important;
}
#homeHero .mh-observe-state-dot{
  width:10px!important;height:10px!important;flex:0 0 10px!important;border-radius:50%!important;background:var(--t-accent)!important;
  box-shadow:0 0 12px var(--t-accent)!important;
}
#homeHero .mh-observe-state small{display:block!important;color:var(--tx-label)!important;font-size:8px!important;letter-spacing:.12em!important}
#homeHero .mh-observe-state b{display:block!important;margin-top:2px!important;color:var(--tx-title)!important;font-size:11px!important}
#homeHero .mh-observe-metrics{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:8px!important;
}
#homeHero .mh-observe-metrics>span{
  min-width:0!important;padding:7px 8px!important;border:1px solid var(--t-border-soft)!important;border-radius:10px!important;
  background:rgba(0,0,0,.12)!important;
}
#homeHero .mh-observe-metrics small{display:block!important;color:var(--tx-muted)!important;font-size:7px!important;letter-spacing:.09em!important;white-space:nowrap!important}
#homeHero .mh-observe-metrics b{display:block!important;margin-top:2px!important;color:var(--tx-number)!important;font-size:17px!important;line-height:1!important}

#homeHero .mh-observe-monitor{
  display:grid!important;grid-template-rows:42px minmax(0,1fr)!important;
  padding:0!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--t-panel-2) 78%,transparent),color-mix(in srgb,var(--t-field) 92%,#000))!important;
}
#homeHero .mh-observe-monitor-head{
  display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;
  padding:8px 12px!important;border-bottom:1px solid var(--t-border-soft)!important;
}
#homeHero .mh-observe-monitor-head small{display:block!important;color:var(--tx-label)!important;font-size:8px!important;letter-spacing:.14em!important}
#homeHero .mh-observe-monitor-head b{display:block!important;margin-top:2px!important;color:var(--tx-title)!important;font-size:10px!important}
#homeHero .mh-observe-live{
  display:flex!important;align-items:center!important;gap:6px!important;color:var(--tx-title)!important;font-size:9px!important;letter-spacing:.12em!important;
}
#homeHero .mh-observe-live i{width:7px!important;height:7px!important;border-radius:50%!important;background:var(--t-accent)!important;box-shadow:0 0 10px var(--t-accent)!important}
#homeHero .mh-observe-screen{
  position:relative!important;min-height:0!important;overflow:hidden!important;
  color:var(--t-accent)!important;
  background:
    radial-gradient(circle at 50% 54%,color-mix(in srgb,var(--t-accent) 10%,transparent),transparent 31%),
    linear-gradient(180deg,rgba(255,255,255,.008),rgba(0,0,0,.10))!important;
}
#homeHero .mh-observe-grid{
  position:absolute!important;inset:0!important;pointer-events:none!important;
  background-image:
    linear-gradient(var(--t-border-soft) 1px,transparent 1px),
    linear-gradient(90deg,var(--t-border-soft) 1px,transparent 1px)!important;
  background-size:44px 32px!important;
  opacity:.28!important;
}
#homeHero .mh-observe-wave{
  position:absolute!important;left:3%!important;right:3%!important;top:50%!important;height:104px!important;transform:translateY(-50%)!important;
  color:var(--t-accent)!important;filter:drop-shadow(0 0 7px var(--t-glow))!important;
}
#homeHero .mh-observe-wave svg{width:100%!important;height:100%!important;display:block!important}
#homeHero .mh-observe-sweep{
  position:absolute!important;top:0!important;bottom:0!important;width:26%!important;left:-30%!important;
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--t-accent) 13%,transparent),transparent)!important;
  transform:skewX(-9deg)!important;
  animation:mhObserveSweep 3.4s linear infinite!important;
}
@keyframes mhObserveSweep{from{left:-30%}to{left:110%}}
#homeHero .mh-observe-reticle{
  position:absolute!important;left:50%!important;top:50%!important;width:86px!important;height:86px!important;transform:translate(-50%,-50%)!important;
  border:1px solid color-mix(in srgb,var(--t-accent) 40%,transparent)!important;border-radius:50%!important;
  box-shadow:0 0 22px var(--t-glow)!important;opacity:.75!important;
}
#homeHero .mh-observe-reticle:before,#homeHero .mh-observe-reticle:after{content:"";position:absolute;background:color-mix(in srgb,var(--t-accent) 45%,transparent)}
#homeHero .mh-observe-reticle:before{left:50%;top:-17px;bottom:-17px;width:1px}
#homeHero .mh-observe-reticle:after{top:50%;left:-17px;right:-17px;height:1px}
#homeHero .mh-observe-reticle i{position:absolute!important;border:1px solid color-mix(in srgb,var(--t-accent) 30%,transparent)!important;border-radius:50%!important}
#homeHero .mh-observe-reticle i:nth-child(1){inset:10px!important}#homeHero .mh-observe-reticle i:nth-child(2){inset:24px!important}#homeHero .mh-observe-reticle i:nth-child(3){inset:39px!important;background:var(--t-accent)!important;box-shadow:0 0 12px var(--t-accent)!important}
#homeHero .mh-observe-screen-label{
  position:absolute!important;left:14px!important;bottom:11px!important;z-index:2!important;
}
#homeHero .mh-observe-screen-label small{display:block!important;color:var(--tx-muted)!important;font-size:8px!important;letter-spacing:.12em!important}
#homeHero .mh-observe-screen-label strong{display:block!important;margin-top:3px!important;color:var(--tx-title)!important;font-size:11px!important;letter-spacing:.08em!important}
#homeHero .mh-search-v3.has-lock .mh-observe-reticle{animation:mhObserveLock 1.1s ease-in-out infinite!important;border-color:var(--t-accent)!important}
@keyframes mhObserveLock{0%,100%{transform:translate(-50%,-50%) scale(.92);opacity:.62}50%{transform:translate(-50%,-50%) scale(1.05);opacity:1}}

#homeHero .mh-observe-targets{
  position:relative!important;z-index:1!important;
  min-width:0!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important;
}
#homeHero .mh-observe-target{
  min-width:0!important;height:74px!important;display:grid!important;grid-template-columns:40px minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;
  padding:7px!important;border:1px solid var(--t-border-soft)!important;border-radius:12px!important;
  background:linear-gradient(155deg,rgba(255,255,255,.025),rgba(0,0,0,.14))!important;
  overflow:hidden!important;
}
#homeHero .mh-observe-target.locked{border-color:var(--t-accent)!important;box-shadow:inset 0 -2px var(--t-accent),0 0 12px var(--t-glow)!important}
#homeHero .mh-observe-target-art{width:38px!important;height:54px!important;border-radius:9px!important;overflow:hidden!important;border:1px solid var(--t-border)!important;background:var(--t-field)!important}
#homeHero .mh-observe-target-art img{width:100%!important;height:100%!important;object-fit:cover!important;filter:none!important}
#homeHero .mh-observe-target-copy{min-width:0!important}
#homeHero .mh-observe-target-copy small{display:block!important;color:var(--tx-label)!important;font-size:7px!important;letter-spacing:.05em!important;white-space:nowrap!important}
#homeHero .mh-observe-target-copy b{display:block!important;margin-top:3px!important;color:var(--tx-title)!important;font-size:9px!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#homeHero .mh-observe-target-mark{justify-self:end!important;color:var(--tx-muted)!important;font-size:8px!important;white-space:nowrap!important}
#homeHero .mh-observe-target.locked .mh-observe-target-mark{color:var(--t-accent)!important}
#homeHero .mh-observe-empty{grid-column:1/-1!important;display:grid!important;place-items:center!important;color:var(--tx-muted)!important;border:1px dashed var(--t-border-soft)!important;border-radius:12px!important}

#homeHero .mh-search-v3 .mh-search-controls{flex:0 0 auto!important;margin:0!important}
#homeHero .mh-search-v3 .mh-search-controls .battle-mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important}
#homeHero .mh-search-v3 .mh-search-controls .battle-mode-secondary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
#homeHero .mh-search-v3 .mh-search-controls .mode-control,
#homeHero .mh-search-v3 .mh-search-controls .action-card{min-height:70px!important;height:70px!important;padding:8px 10px!important}

@media (min-width:901px){
  #homeHero .mh-search-v3{
    height:520px!important;min-height:520px!important;max-height:520px!important;
  }
}
@media (max-width:1220px) and (min-width:901px){
  #homeHero .mh-observe-main{grid-template-columns:minmax(250px,.38fr) minmax(0,.62fr)!important}
  #homeHero .mh-observe-targets{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,35px)!important}
  #homeHero .mh-observe-target{height:35px!important;grid-template-columns:26px minmax(0,1fr) auto!important;padding:3px 5px!important}
  #homeHero .mh-observe-target-art{width:24px!important;height:27px!important;border-radius:6px!important}
  #homeHero .mh-observe-target-copy b{font-size:8px!important;margin-top:1px!important}
  #homeHero .mh-observe-target-copy small{font-size:6px!important}
}
@media (max-width:900px){
  #homeHero .mh-search-v3{display:block!important;padding:12px!important;overflow:visible!important}
  #homeHero .mh-observe-deck{display:block!important;padding:10px!important;overflow:visible!important}
  #homeHero .mh-observe-main{display:block!important}
  #homeHero .mh-observe-copy{padding:15px!important}
  #homeHero .mh-observe-copy h3{font-size:34px!important}
  #homeHero .mh-observe-monitor{height:190px!important;margin-top:10px!important}
  #homeHero .mh-observe-sweep,#homeHero .mh-observe-reticle{animation:none!important}
  #homeHero .mh-observe-targets{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-top:10px!important}
  #homeHero .mh-observe-target{height:62px!important}
  #homeHero .mh-search-v3 .mh-search-controls{margin-top:10px!important}
  #homeHero .mh-search-v3 .mh-search-controls .battle-mode-grid,
  #homeHero .mh-search-v3 .mh-search-controls .battle-mode-secondary{grid-template-columns:1fr!important}
  #homeHero .mh-search-v3 .mh-search-controls .mode-control,
  #homeHero .mh-search-v3 .mh-search-controls .action-card{height:auto!important;min-height:62px!important}
}

/* v322 — Search chamber polish: fix title clipping, animated ECG + radar. */
#homeHero .mh-observe-copy{
  justify-content:flex-start!important;
  padding:20px 18px 14px!important;
  overflow:visible!important;
}
#homeHero .mh-observe-copy h3{
  margin:10px 0 7px!important;
  padding-top:3px!important;
  font-size:clamp(30px,2.2vw,42px)!important;
  line-height:1.14!important;
  min-height:1.2em!important;
  overflow:visible!important;
}
#homeHero .mh-observe-copy p{
  font-size:11px!important;
  line-height:1.52!important;
}
#homeHero .mh-observe-state{margin-top:10px!important}
#homeHero .mh-observe-metrics{margin-top:7px!important}

/* ECG spans corner-to-corner and inherits the active theme color. */
#homeHero .mh-observe-wave{
  left:0!important;
  right:0!important;
  top:50%!important;
  height:126px!important;
  transform:translateY(-50%)!important;
  color:var(--t-accent)!important;
  filter:none!important;
  overflow:visible!important;
  pointer-events:none!important;
  z-index:2!important;
}
#homeHero .mh-observe-wave svg{
  width:100%!important;
  height:100%!important;
  overflow:visible!important;
}
#homeHero .mh-observe-wave .mh-ecg-base,
#homeHero .mh-observe-wave .mh-ecg-pulse{
  fill:none!important;
  stroke:currentColor!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  vector-effect:non-scaling-stroke!important;
}
#homeHero .mh-observe-wave .mh-ecg-base{
  stroke-width:2.1!important;
  opacity:.15!important;
}
#homeHero .mh-observe-wave .mh-ecg-pulse{
  stroke-width:3.4!important;
  opacity:1!important;
  stroke-dasharray:330 1550!important;
  stroke-dashoffset:0;
  filter:drop-shadow(0 0 5px var(--t-accent)) drop-shadow(0 0 12px var(--t-glow))!important;
  animation:mhEcgRun 4.5s linear infinite!important;
}
@keyframes mhEcgRun{
  from{stroke-dashoffset:250}
  to{stroke-dashoffset:-1880}
}
#homeHero .mh-ecg-cursor{
  position:absolute!important;
  top:12%!important;
  bottom:12%!important;
  left:0!important;
  width:2px!important;
  background:linear-gradient(180deg,transparent,var(--t-accent),transparent)!important;
  box-shadow:0 0 12px var(--t-accent),0 0 26px var(--t-glow)!important;
  opacity:.75!important;
  animation:mhEcgCursor 4.5s linear infinite!important;
}
@keyframes mhEcgCursor{
  0%{left:0%;opacity:0}
  6%{opacity:.72}
  92%{opacity:.72}
  100%{left:100%;opacity:0}
}

/* Compact themed radar in the upper-right monitor corner. */
#homeHero .mh-observe-radar{
  position:absolute!important;
  right:18px!important;
  top:16px!important;
  width:112px!important;
  height:112px!important;
  border:1px solid color-mix(in srgb,var(--t-accent) 44%,transparent)!important;
  border-radius:50%!important;
  background:
    radial-gradient(circle at center,color-mix(in srgb,var(--t-accent) 8%,transparent),transparent 62%),
    var(--t-field)!important;
  box-shadow:inset 0 0 28px rgba(0,0,0,.34),0 0 22px var(--t-glow)!important;
  overflow:hidden!important;
  opacity:.83!important;
  z-index:3!important;
  pointer-events:none!important;
}
#homeHero .mh-radar-grid{
  position:absolute!important;inset:0!important;border-radius:50%!important;
  background:
    linear-gradient(90deg,transparent 49.5%,color-mix(in srgb,var(--t-accent) 25%,transparent) 50%,transparent 50.5%),
    linear-gradient(0deg,transparent 49.5%,color-mix(in srgb,var(--t-accent) 25%,transparent) 50%,transparent 50.5%)!important;
}
#homeHero .mh-radar-ring{
  position:absolute!important;
  border:1px solid color-mix(in srgb,var(--t-accent) 24%,transparent)!important;
  border-radius:50%!important;
}
#homeHero .mh-radar-ring.r1{inset:14px!important}
#homeHero .mh-radar-ring.r2{inset:29px!important}
#homeHero .mh-radar-ring.r3{inset:44px!important}
#homeHero .mh-radar-sweep{
  position:absolute!important;inset:0!important;border-radius:50%!important;
  background:conic-gradient(from 0deg,transparent 0 300deg,color-mix(in srgb,var(--t-accent) 5%,transparent) 320deg,color-mix(in srgb,var(--t-accent) 42%,transparent) 358deg,transparent 360deg)!important;
  animation:mhRadarSpin 3.8s linear infinite!important;
  transform-origin:center!important;
}
@keyframes mhRadarSpin{to{transform:rotate(360deg)}}
#homeHero .mh-radar-blip{
  position:absolute!important;width:6px!important;height:6px!important;border-radius:50%!important;
  background:var(--t-accent)!important;
  box-shadow:0 0 8px var(--t-accent),0 0 16px var(--t-glow)!important;
  animation:mhRadarBlink 2.4s ease-in-out infinite!important;
}
#homeHero .mh-radar-blip.b1{left:27px!important;top:34px!important;animation-delay:.2s!important}
#homeHero .mh-radar-blip.b2{right:24px!important;top:47px!important;animation-delay:.9s!important}
#homeHero .mh-radar-blip.b3{left:56px!important;bottom:21px!important;animation-delay:1.5s!important}
@keyframes mhRadarBlink{0%,100%{opacity:.18;transform:scale(.75)}50%{opacity:1;transform:scale(1.15)}}
#homeHero .mh-observe-radar.locked{
  border-color:var(--t-accent)!important;
  opacity:1!important;
  box-shadow:inset 0 0 28px rgba(0,0,0,.34),0 0 28px var(--t-accent)!important;
}
#homeHero .mh-search-v3.has-lock .mh-ecg-pulse{animation-duration:2.9s!important}
#homeHero .mh-search-v3.has-lock .mh-radar-sweep{animation-duration:2.2s!important}

/* The new ECG replaces the old straight sweep/reticle layers. */
#homeHero .mh-observe-sweep,
#homeHero .mh-observe-reticle{display:none!important}

@media (max-width:1220px) and (min-width:901px){
  #homeHero .mh-observe-copy{padding:16px 14px 12px!important}
  #homeHero .mh-observe-copy h3{font-size:32px!important}
  #homeHero .mh-observe-copy p{font-size:9px!important}
  #homeHero .mh-observe-radar{width:92px!important;height:92px!important;right:12px!important;top:12px!important}
  #homeHero .mh-radar-ring.r1{inset:12px!important}#homeHero .mh-radar-ring.r2{inset:24px!important}#homeHero .mh-radar-ring.r3{inset:36px!important}
}
@media (max-width:900px){
  #homeHero .mh-observe-copy{overflow:hidden!important;padding:18px 15px 14px!important}
  #homeHero .mh-observe-copy h3{font-size:32px!important;line-height:1.15!important;padding-top:2px!important}
  #homeHero .mh-observe-wave{height:98px!important}
  #homeHero .mh-observe-radar{width:82px!important;height:82px!important;right:10px!important;top:10px!important}
  #homeHero .mh-radar-ring.r1{inset:10px!important}#homeHero .mh-radar-ring.r2{inset:21px!important}#homeHero .mh-radar-ring.r3{inset:32px!important}
  /* Keep the phone light: static ECG/radar, no continuous GPU work. */
  #homeHero .mh-observe-wave .mh-ecg-pulse,
  #homeHero .mh-ecg-cursor,
  #homeHero .mh-radar-sweep,
  #homeHero .mh-radar-blip{animation:none!important}
  #homeHero .mh-observe-wave .mh-ecg-pulse{stroke-dasharray:none!important;opacity:.72!important}
  #homeHero .mh-ecg-cursor{display:none!important}
}
@media (prefers-reduced-motion:reduce){
  #homeHero .mh-observe-wave .mh-ecg-pulse,
  #homeHero .mh-ecg-cursor,
  #homeHero .mh-radar-sweep,
  #homeHero .mh-radar-blip{animation:none!important}
}


/* v323 — Telegram App release: keep every main action visible in the fixed hero stage. */
@media (min-width:1181px){
  #homeHero .battle-layout,
  #homeHero .mh-search-v3{height:520px!important;min-height:520px!important;max-height:520px!important}
  #homeHero .battle-layout{padding:18px 20px!important;overflow:visible!important}
  #homeHero .battle-layout .battle-data{height:100%!important;display:flex!important;flex-direction:column!important;min-height:0!important}
  #homeHero .battle-layout .mh-home-stage-hp{flex:1 1 auto!important;min-height:0!important}
  #homeHero .battle-layout .mh-home-actions,#homeHero .mh-search-stable .mh-controls-unified{flex:0 0 auto!important;margin-top:10px!important}
  #homeHero .battle-layout .mh-home-actions .battle-mode-grid,
  #homeHero .mh-search-v3 .mh-search-controls .battle-mode-grid,#homeHero .mh-search-stable .mh-controls-unified .battle-mode-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
  #homeHero .battle-layout .mh-home-actions .battle-mode-secondary,
  #homeHero .mh-search-v3 .mh-search-controls .battle-mode-secondary,#homeHero .mh-search-stable .mh-controls-unified .battle-mode-secondary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  #homeHero .battle-layout .mh-home-actions .mode-control,
  #homeHero .battle-layout .mh-home-actions .action-card,
  #homeHero .mh-search-v3 .mh-search-controls .mode-control,
  #homeHero .mh-search-v3 .mh-search-controls .action-card,#homeHero .mh-search-stable .mh-controls-unified .mode-control,#homeHero .mh-search-stable .mh-controls-unified .action-card{height:64px!important;min-height:64px!important;max-height:64px!important;padding:7px 9px!important}
  #homeHero .battle-layout .mh-home-actions .mode-control-icon,
  #homeHero .battle-layout .mh-home-actions .action-card-icon,
  #homeHero .mh-search-v3 .mh-search-controls .mode-control-icon,
  #homeHero .mh-search-v3 .mh-search-controls .action-card-icon,#homeHero .mh-search-stable .mh-controls-unified .mode-control-icon,#homeHero .mh-search-stable .mh-controls-unified .action-card-icon{width:44px!important;height:44px!important}
  #homeHero .battle-layout .mh-home-actions .mode-control-icon img,
  #homeHero .battle-layout .mh-home-actions .action-card-icon img,
  #homeHero .mh-search-v3 .mh-search-controls .mode-control-icon img,
  #homeHero .mh-search-v3 .mh-search-controls .action-card-icon img,#homeHero .mh-search-stable .mh-controls-unified .mode-control-icon img,#homeHero .mh-search-stable .mh-controls-unified .action-card-icon img{width:39px!important;height:39px!important}
}
@media (min-width:901px) and (max-width:1180px){
  #homeHero .mh-home-actions .battle-mode-grid,
  #homeHero .mh-search-v3 .mh-search-controls .battle-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* v324 — restore combat scene + non-overlapping observation search layout. */
@media (min-width:1181px){
  /* Combat: restore the stable two-row layout that existed before v323. */
  #homeHero .battle-layout{
    box-sizing:border-box!important;
    width:100%!important;
    height:520px!important;
    min-height:520px!important;
    max-height:520px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:265px 136px!important;
    gap:10px!important;
    padding:14px!important;
    overflow:hidden!important;
    align-items:stretch!important;
  }
  #homeHero .battle-layout>.battle-data{
    display:contents!important;
    height:auto!important;
    min-height:0!important;
    background:transparent!important;
  }
  #homeHero .battle-layout .mh-home-stage-hp{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    height:265px!important;
    min-height:265px!important;
    max-height:265px!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:clamp(12px,1.3vw,20px)!important;
    align-items:center!important;
    align-content:center!important;
    overflow:visible!important;
    flex:none!important;
  }
  #homeHero .battle-layout .mh-home-actions,#homeHero .mh-search-stable .mh-controls-unified{
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    min-width:0!important;
    height:136px!important;
    min-height:136px!important;
    max-height:136px!important;
    margin:0!important;
    align-self:start!important;
    flex:none!important;
  }
  #homeHero .battle-layout .mh-home-actions>.battle-mode-panel,#homeHero .mh-search-stable .mh-controls-unified>.battle-mode-panel{
    height:100%!important;
    display:grid!important;
    grid-template-rows:64px 64px!important;
    gap:8px!important;
    margin:0!important;
  }
  #homeHero .battle-layout .mh-home-actions .battle-mode-grid,#homeHero .mh-search-stable .mh-controls-unified .battle-mode-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    min-width:0!important;
    height:64px!important;
  }
  #homeHero .battle-layout .mh-home-actions .battle-mode-secondary,#homeHero .mh-search-stable .mh-controls-unified .battle-mode-secondary{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    height:64px!important;
  }
  #homeHero .battle-layout .mh-home-actions :where(.mode-control,.action-card),#homeHero .mh-search-stable .mh-controls-unified :where(.mode-control,.action-card){
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    padding:7px 9px!important;
    overflow:hidden!important;
  }

  /* Search: same overall stage height as combat, but with independent fixed zones. */
  #homeHero .mh-search-v3{
    box-sizing:border-box!important;
    width:100%!important;
    height:520px!important;
    min-height:520px!important;
    max-height:520px!important;
    display:grid!important;
    grid-template-rows:342px 136px!important;
    gap:10px!important;
    padding:14px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-observe-deck{
    height:342px!important;
    min-height:342px!important;
    max-height:342px!important;
    display:grid!important;
    grid-template-rows:250px 64px!important;
    gap:8px!important;
    padding:10px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-observe-main{
    height:250px!important;
    min-height:250px!important;
    max-height:250px!important;
    display:grid!important;
    grid-template-columns:minmax(330px,.34fr) minmax(0,.66fr)!important;
    gap:10px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-observe-copy,
  #homeHero .mh-search-v3 .mh-observe-monitor{
    height:250px!important;
    min-height:250px!important;
    max-height:250px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-observe-copy{
    justify-content:flex-start!important;
    padding:14px 16px!important;
  }
  #homeHero .mh-search-v3 .mh-observe-copy h3{
    margin:7px 0 4px!important;
    font-size:clamp(34px,2.3vw,43px)!important;
    line-height:1.08!important;
    flex:0 0 auto!important;
  }
  #homeHero .mh-search-v3 .mh-observe-copy p{
    font-size:10px!important;
    line-height:1.35!important;
    max-height:42px!important;
    overflow:hidden!important;
    flex:0 0 auto!important;
  }
  #homeHero .mh-search-v3 .mh-observe-state{
    min-height:48px!important;
    height:48px!important;
    margin-top:8px!important;
    padding:6px 9px!important;
    flex:0 0 48px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-observe-state b{
    font-size:10px!important;
    line-height:1.2!important;
  }
  #homeHero .mh-search-v3 .mh-observe-metrics{
    height:43px!important;
    min-height:43px!important;
    max-height:43px!important;
    margin-top:7px!important;
    flex:0 0 43px!important;
    gap:5px!important;
  }
  #homeHero .mh-search-v3 .mh-observe-metrics>span{
    height:43px!important;
    min-height:43px!important;
    padding:5px 7px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-observe-metrics small{font-size:6px!important}
  #homeHero .mh-search-v3 .mh-observe-metrics b{font-size:15px!important}
  #homeHero .mh-search-v3 .mh-observe-targets{
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:6px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-observe-target{
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    grid-template-columns:34px minmax(0,1fr) auto!important;
    gap:6px!important;
    padding:5px 6px!important;
  }
  #homeHero .mh-search-v3 .mh-observe-target-art{
    width:32px!important;
    height:48px!important;
    border-radius:8px!important;
  }
  #homeHero .mh-search-v3 .mh-observe-target-copy small{font-size:6px!important}
  #homeHero .mh-search-v3 .mh-observe-target-copy b{font-size:8px!important;margin-top:2px!important}
  #homeHero .mh-search-v3 .mh-observe-target-mark{font-size:7px!important}
  #homeHero .mh-search-v3 .mh-search-controls{
    width:100%!important;
    height:136px!important;
    min-height:136px!important;
    max-height:136px!important;
    margin:0!important;
    overflow:hidden!important;
  }
  #homeHero .mh-search-v3 .mh-search-controls>.battle-mode-panel{
    display:grid!important;
    grid-template-rows:64px 64px!important;
    gap:8px!important;
    height:136px!important;
  }
  #homeHero .mh-search-v3 .mh-search-controls .battle-mode-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    height:64px!important;
  }
  #homeHero .mh-search-v3 .mh-search-controls .battle-mode-secondary{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    height:64px!important;
  }
  #homeHero .mh-search-v3 .mh-search-controls :where(.mode-control,.action-card){
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    padding:7px 9px!important;
    overflow:hidden!important;
  }
}

/* Mid-size desktop/tablet: prevent search metadata from colliding with target strip. */
@media (min-width:901px) and (max-width:1180px){
  #homeHero .mh-search-v3{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  #homeHero .mh-observe-deck{height:auto!important;min-height:0!important;max-height:none!important;grid-template-rows:auto auto!important;overflow:visible!important}
  #homeHero .mh-observe-main{height:auto!important;min-height:260px!important;max-height:none!important}
  #homeHero .mh-observe-copy,#homeHero .mh-observe-monitor{height:auto!important;min-height:260px!important;max-height:none!important}
  #homeHero .mh-observe-targets{height:auto!important;min-height:64px!important;max-height:none!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #homeHero .mh-observe-target{height:58px!important;min-height:58px!important;max-height:58px!important}
  #homeHero .mh-search-controls{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
}

/* v325 — full-width invitation search + permanently visible action rows. */
@media (min-width:1181px){
  #homeHero{
    width:100%!important;
    min-width:0!important;
  }
  #homeHero > .mh-search-v3{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr) 140px!important;
    align-items:stretch!important;
    justify-items:stretch!important;
    align-self:stretch!important;
    justify-self:stretch!important;
    width:100%!important;
    min-width:100%!important;
    max-width:none!important;
    height:520px!important;
    min-height:520px!important;
    max-height:520px!important;
    gap:10px!important;
    padding:14px!important;
    margin:0!important;
    overflow:hidden!important;
  }
  #homeHero > .mh-search-v3 > .mh-observe-deck{
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr) 66px!important;
    gap:8px!important;
    padding:10px!important;
    margin:0!important;
    overflow:hidden!important;
  }
  #homeHero .mh-observe-main{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    display:grid!important;
    grid-template-columns:minmax(380px,40%) minmax(0,60%)!important;
    gap:10px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-observe-copy,
  #homeHero .mh-observe-monitor{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  #homeHero .mh-observe-copy{
    padding:15px 17px 12px!important;
  }
  #homeHero .mh-observe-copy h3{
    margin:7px 0 5px!important;
    font-size:clamp(32px,2.2vw,42px)!important;
    line-height:1.08!important;
  }
  #homeHero .mh-observe-copy p{
    font-size:10px!important;
    line-height:1.42!important;
    max-height:44px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-observe-state{
    min-height:44px!important;
    height:44px!important;
    margin-top:7px!important;
    padding:6px 9px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-observe-metrics{
    min-height:40px!important;
    height:40px!important;
    margin-top:6px!important;
  }
  #homeHero .mh-observe-metrics>span{
    min-height:40px!important;
    height:40px!important;
    padding:4px 7px!important;
  }
  #homeHero .mh-observe-targets{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:7px!important;
    overflow:hidden!important;
  }
  #homeHero .mh-observe-target{
    min-width:0!important;
    width:100%!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
    grid-template-columns:38px minmax(0,1fr) auto!important;
    padding:5px 7px!important;
  }
  #homeHero .mh-observe-target-art{
    width:36px!important;
    height:52px!important;
  }
  #homeHero > .mh-search-v3 > .mh-search-controls{
    grid-row:2!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:140px!important;
    min-height:140px!important;
    max-height:140px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    position:relative!important;
    z-index:5!important;
  }
  #homeHero > .mh-search-v3 > .mh-search-controls > .battle-mode-panel{
    width:100%!important;
    height:140px!important;
    min-height:140px!important;
    max-height:140px!important;
    display:grid!important;
    grid-template-rows:66px 66px!important;
    gap:8px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  #homeHero .mh-search-controls .battle-mode-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    height:66px!important;
    min-width:0!important;
  }
  #homeHero .mh-search-controls .battle-mode-secondary{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    height:66px!important;
    min-width:0!important;
  }
  #homeHero .mh-search-controls :where(.mode-control,.action-card){
    width:100%!important;
    min-width:0!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
    margin:0!important;
    padding:7px 10px!important;
    overflow:hidden!important;
  }
}

@media (min-width:901px) and (max-width:1180px){
  #homeHero > .mh-search-v3{
    width:100%!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  #homeHero .mh-observe-main{
    width:100%!important;
    grid-template-columns:minmax(300px,42%) minmax(0,58%)!important;
  }
  #homeHero .mh-search-controls,
  #homeHero .mh-search-controls>.battle-mode-panel{width:100%!important;max-width:none!important}
}

/* v326 — isolated invitation-search layout. Battle CSS is intentionally untouched. */
#homeHero > .mh-search-stable{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  box-sizing:border-box!important;
  display:grid!important;
  gap:10px!important;
  padding:12px!important;
  overflow:hidden!important;
}
#homeHero .mh326-stage{
  min-width:0!important;
  min-height:0!important;
  width:100%!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) 72px!important;
  gap:9px!important;
  padding:11px!important;
  box-sizing:border-box!important;
  border:1px solid var(--t-border)!important;
  border-radius:20px!important;
  background:
    linear-gradient(155deg,color-mix(in srgb,var(--t-raised) 62%,transparent),color-mix(in srgb,var(--t-panel) 94%,#000)),
    radial-gradient(circle at 72% 32%,var(--t-glow),transparent 34%)!important;
  overflow:hidden!important;
  position:relative!important;
}
#homeHero .mh326-stage:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(0deg,transparent 0 4px,rgba(255,255,255,.012) 5px);
  opacity:.42;
}
#homeHero .mh326-main{
  min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;
  display:grid!important;
  grid-template-columns:minmax(360px,36%) minmax(0,64%)!important;
  gap:10px!important;
  position:relative!important;z-index:1!important;
}
#homeHero .mh326-info,
#homeHero .mh326-monitor{
  min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;
  border:1px solid var(--t-border-soft)!important;
  border-radius:16px!important;
  background:linear-gradient(160deg,rgba(255,255,255,.025),rgba(0,0,0,.15))!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#homeHero .mh326-info{
  display:flex!important;flex-direction:column!important;justify-content:flex-start!important;
  padding:14px 16px!important;
}
#homeHero .mh326-kicker{display:flex!important;align-items:center!important;gap:8px!important;color:var(--tx-label)!important;font-size:9px!important;letter-spacing:.13em!important;text-transform:uppercase!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#homeHero .mh326-kicker i{width:8px!important;height:8px!important;flex:0 0 8px!important;border-radius:50%!important;background:var(--t-accent)!important;box-shadow:0 0 12px var(--t-accent)!important}
#homeHero .mh326-info h3{margin:8px 0 6px!important;color:var(--tx-title)!important;font-size:clamp(36px,2.4vw,48px)!important;line-height:1.06!important;white-space:nowrap!important}
#homeHero .mh326-info p{margin:0!important;color:var(--tx-muted)!important;font-size:11px!important;line-height:1.45!important;max-width:560px!important}
#homeHero .mh326-status{display:flex!important;align-items:center!important;gap:9px!important;margin-top:auto!important;padding:8px 10px!important;min-height:48px!important;border:1px solid var(--t-border-soft)!important;border-radius:11px!important;background:var(--t-field)!important;box-sizing:border-box!important}
#homeHero .mh326-status-dot{width:9px!important;height:9px!important;flex:0 0 9px!important;border-radius:50%!important;background:var(--t-accent)!important;box-shadow:0 0 12px var(--t-accent)!important}
#homeHero .mh326-status small{display:block!important;color:var(--tx-label)!important;font-size:7px!important;letter-spacing:.12em!important}
#homeHero .mh326-status b{display:block!important;margin-top:2px!important;color:var(--tx-title)!important;font-size:10px!important;line-height:1.25!important}
#homeHero .mh326-metrics{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:7px!important}
#homeHero .mh326-metrics>span{min-width:0!important;padding:6px 8px!important;border:1px solid var(--t-border-soft)!important;border-radius:10px!important;background:rgba(0,0,0,.12)!important}
#homeHero .mh326-metrics small{display:block!important;color:var(--tx-muted)!important;font-size:7px!important;letter-spacing:.08em!important;white-space:nowrap!important}
#homeHero .mh326-metrics b{display:block!important;margin-top:2px!important;color:var(--tx-number)!important;font-size:18px!important;line-height:1!important}

#homeHero .mh326-monitor{display:grid!important;grid-template-rows:43px minmax(0,1fr)!important;background:linear-gradient(180deg,color-mix(in srgb,var(--t-panel-2) 76%,transparent),color-mix(in srgb,var(--t-field) 94%,#000))!important}
#homeHero .mh326-monitor>header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:8px 12px!important;border-bottom:1px solid var(--t-border-soft)!important}
#homeHero .mh326-monitor>header small{display:block!important;color:var(--tx-label)!important;font-size:7px!important;letter-spacing:.14em!important}
#homeHero .mh326-monitor>header b{display:block!important;margin-top:2px!important;color:var(--tx-title)!important;font-size:10px!important}
#homeHero .mh326-live{display:flex!important;align-items:center!important;gap:6px!important;color:var(--tx-title)!important;font-size:8px!important;letter-spacing:.12em!important}
#homeHero .mh326-live i{width:7px!important;height:7px!important;border-radius:50%!important;background:var(--t-accent)!important;box-shadow:0 0 10px var(--t-accent)!important}
#homeHero .mh326-screen{position:relative!important;min-width:0!important;min-height:0!important;overflow:hidden!important;background:radial-gradient(circle at 74% 50%,color-mix(in srgb,var(--t-accent) 9%,transparent),transparent 27%),linear-gradient(180deg,rgba(255,255,255,.006),rgba(0,0,0,.12))!important}
#homeHero .mh326-grid{position:absolute!important;inset:0!important;background-image:linear-gradient(var(--t-border-soft) 1px,transparent 1px),linear-gradient(90deg,var(--t-border-soft) 1px,transparent 1px)!important;background-size:48px 32px!important;opacity:.24!important;pointer-events:none!important}
#homeHero .mh326-wave{position:absolute!important;left:2.5%!important;right:2.5%!important;top:50%!important;height:118px!important;transform:translateY(-50%)!important;color:var(--t-accent)!important;filter:drop-shadow(0 0 7px var(--t-glow))!important;overflow:hidden!important}
#homeHero .mh326-wave svg{width:100%!important;height:100%!important;display:block!important;overflow:visible!important}
#homeHero .mh326-ecg-base{fill:none!important;stroke:color-mix(in srgb,var(--t-accent) 28%,transparent)!important;stroke-width:2!important;vector-effect:non-scaling-stroke!important}
#homeHero .mh326-ecg-pulse{fill:none!important;stroke:var(--t-accent)!important;stroke-width:3!important;stroke-linecap:round!important;stroke-linejoin:round!important;vector-effect:non-scaling-stroke!important;stroke-dasharray:250 950!important;animation:mh326Pulse 4.2s linear infinite!important}
@keyframes mh326Pulse{from{stroke-dashoffset:250}to{stroke-dashoffset:-1200}}
#homeHero .mh326-ecg-cursor{position:absolute!important;top:12%!important;bottom:12%!important;width:2px!important;left:0!important;background:linear-gradient(180deg,transparent,var(--t-accent),transparent)!important;box-shadow:0 0 12px var(--t-accent)!important;animation:mh326Cursor 4.2s linear infinite!important}
@keyframes mh326Cursor{0%{left:0;opacity:0}5%{opacity:1}95%{opacity:1}100%{left:100%;opacity:0}}
#homeHero .mh326-radar{position:absolute!important;right:4%!important;top:50%!important;width:118px!important;height:118px!important;transform:translateY(-50%)!important;border:1px solid color-mix(in srgb,var(--t-accent) 40%,transparent)!important;border-radius:50%!important;box-shadow:0 0 20px var(--t-glow)!important;opacity:.78!important;overflow:hidden!important}
#homeHero .mh326-radar:before,#homeHero .mh326-radar:after{content:"";position:absolute;background:color-mix(in srgb,var(--t-accent) 30%,transparent)!important}
#homeHero .mh326-radar:before{left:50%;top:0;bottom:0;width:1px}.mh326-radar:after{top:50%;left:0;right:0;height:1px}
#homeHero .mh326-radar>i{position:absolute!important;border:1px solid color-mix(in srgb,var(--t-accent) 25%,transparent)!important;border-radius:50%!important}
#homeHero .mh326-radar>.r1{inset:12px!important}#homeHero .mh326-radar>.r2{inset:28px!important}#homeHero .mh326-radar>.r3{inset:45px!important}
#homeHero .mh326-radar .sweep{position:absolute!important;left:50%!important;top:50%!important;width:50%!important;height:50%!important;transform-origin:0 0!important;background:conic-gradient(from 0deg,color-mix(in srgb,var(--t-accent) 36%,transparent),transparent 58%)!important;clip-path:polygon(0 0,100% 0,0 100%)!important;animation:mh326Radar 3.6s linear infinite!important}
@keyframes mh326Radar{to{transform:rotate(360deg)}}
#homeHero .mh326-radar>b{position:absolute!important;width:6px!important;height:6px!important;border-radius:50%!important;background:var(--t-accent)!important;box-shadow:0 0 10px var(--t-accent)!important}
#homeHero .mh326-radar>.p1{left:25%;top:34%}#homeHero .mh326-radar>.p2{right:18%;top:44%}#homeHero .mh326-radar>.p3{left:52%;bottom:18%}
#homeHero .mh326-screen-label{position:absolute!important;left:13px!important;bottom:10px!important;z-index:3!important}
#homeHero .mh326-screen-label small{display:block!important;color:var(--tx-muted)!important;font-size:7px!important;letter-spacing:.11em!important}
#homeHero .mh326-screen-label strong{display:block!important;margin-top:2px!important;color:var(--tx-title)!important;font-size:10px!important;letter-spacing:.07em!important}
#homeHero .mh-search-stable.has-lock .mh326-ecg-pulse{animation-duration:2.7s!important}
#homeHero .mh-search-stable.has-lock .mh326-radar .sweep{animation-duration:2.1s!important}

#homeHero .mh326-targets{min-width:0!important;width:100%!important;height:72px!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important;position:relative!important;z-index:2!important;overflow:hidden!important}
#homeHero .mh326-target{min-width:0!important;width:100%!important;height:72px!important;display:grid!important;grid-template-columns:40px minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;padding:6px 7px!important;box-sizing:border-box!important;border:1px solid var(--t-border-soft)!important;border-radius:11px!important;background:linear-gradient(155deg,rgba(255,255,255,.024),rgba(0,0,0,.14))!important;overflow:hidden!important}
#homeHero .mh326-target.has-signal{border-color:var(--t-accent)!important;box-shadow:inset 0 -2px var(--t-accent),0 0 12px var(--t-glow)!important}
#homeHero .mh326-target-art{width:38px!important;height:56px!important;border-radius:8px!important;overflow:hidden!important;border:1px solid var(--t-border)!important;background:var(--t-field)!important}
#homeHero .mh326-target-art img{width:100%!important;height:100%!important;object-fit:cover!important;filter:none!important}
#homeHero .mh326-target-copy{min-width:0!important}
#homeHero .mh326-target-copy small{display:block!important;color:var(--tx-label)!important;font-size:7px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#homeHero .mh326-target-copy b{display:block!important;margin-top:3px!important;color:var(--tx-title)!important;font-size:9px!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#homeHero .mh326-target-mark{color:var(--t-accent)!important;font-size:8px!important;white-space:nowrap!important}
#homeHero .mh326-target-empty{grid-column:1/-1!important;display:grid!important;place-items:center!important;color:var(--tx-muted)!important;border:1px dashed var(--t-border-soft)!important;border-radius:11px!important}

#homeHero .mh-search-stable-controls:not(.mh-controls-unified){min-width:0!important;width:100%!important;height:140px!important;overflow:visible!important}
#homeHero .mh-search-stable-controls:not(.mh-controls-unified)>.battle-mode-panel{width:100%!important;height:140px!important;display:grid!important;grid-template-rows:66px 66px!important;gap:8px!important;margin:0!important;padding:0!important}
#homeHero .mh-search-stable-controls:not(.mh-controls-unified) .battle-mode-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;width:100%!important;height:66px!important}
#homeHero .mh-search-stable-controls:not(.mh-controls-unified) .battle-mode-secondary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important;height:66px!important}
#homeHero .mh-search-stable-controls:not(.mh-controls-unified) :where(.mode-control,.action-card){min-width:0!important;width:100%!important;height:66px!important;min-height:66px!important;max-height:66px!important;margin:0!important;padding:7px 10px!important;overflow:hidden!important}

@media (min-width:1181px){
  #homeHero > .mh-search-stable{height:520px!important;min-height:520px!important;max-height:520px!important;grid-template-rows:minmax(0,1fr) 140px!important}
}
@media (min-width:901px) and (max-width:1180px){
  #homeHero > .mh-search-stable{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  #homeHero .mh326-stage{grid-template-rows:auto auto!important;overflow:visible!important}
  #homeHero .mh326-main{grid-template-columns:minmax(300px,42%) minmax(0,58%)!important;min-height:275px!important}
  #homeHero .mh326-targets{height:auto!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important}
  #homeHero .mh326-target{height:64px!important}
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified){height:auto!important}
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified)>.battle-mode-panel{height:auto!important;grid-template-rows:auto auto!important}
}
@media (max-width:900px){
  #homeHero > .mh-search-stable{display:block!important;width:100%!important;padding:9px!important;overflow:visible!important}
  #homeHero .mh326-stage{display:block!important;padding:9px!important;overflow:visible!important}
  #homeHero .mh326-main{display:block!important}
  #homeHero .mh326-info{height:auto!important;min-height:0!important}
  #homeHero .mh326-info h3{font-size:34px!important;white-space:normal!important}
  #homeHero .mh326-monitor{height:190px!important;margin-top:9px!important}
  #homeHero .mh326-wave{height:90px!important;filter:none!important}
  #homeHero .mh326-ecg-pulse,#homeHero .mh326-ecg-cursor,#homeHero .mh326-radar .sweep{animation:none!important}
  #homeHero .mh326-radar{width:84px!important;height:84px!important;filter:none!important;box-shadow:none!important}
  #homeHero .mh326-targets{height:auto!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-top:9px!important;overflow:visible!important}
  #homeHero .mh326-target{height:62px!important;grid-template-columns:34px minmax(0,1fr) auto!important}
  #homeHero .mh326-target-art{width:32px!important;height:48px!important}
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified){height:auto!important;margin-top:9px!important}
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified)>.battle-mode-panel{height:auto!important;display:block!important}
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified) .battle-mode-grid,
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified) .battle-mode-secondary{height:auto!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified) .battle-mode-secondary{margin-top:8px!important}
  #homeHero .mh-search-stable-controls:not(.mh-controls-unified) :where(.mode-control,.action-card){height:auto!important;min-height:62px!important;max-height:none!important}
}

/* v327 — session/logout controls. */
.settings-logout-panel{
  margin-top:18px!important;
  border-color:var(--t-border)!important;
  background:var(--t-panel)!important;
}
.settings-logout-panel .panel-head{
  background:linear-gradient(135deg,color-mix(in srgb,var(--t-accent-2) 32%,var(--t-raised)),var(--t-panel))!important;
}
.settings-logout-body{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
  padding:22px!important;
  background:linear-gradient(160deg,rgba(255,255,255,.018),rgba(0,0,0,.12))!important;
}
.settings-logout-copy{min-width:0!important;display:flex!important;flex-direction:column!important;gap:7px!important}
.settings-logout-copy b{color:var(--tx-title)!important;font-size:1.02em!important}
.settings-logout-copy small{max-width:820px!important;color:var(--tx-muted)!important;line-height:1.6!important}
.settings-logout-body form{flex:none!important;margin:0!important}
.settings-logout-btn{
  min-width:220px!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--t-accent-2) 72%,var(--t-raised)),color-mix(in srgb,var(--t-accent-2) 38%,var(--t-panel)))!important;
  border-color:var(--t-border)!important;
  color:var(--tx-title)!important;
}
.settings-logout-btn:hover{border-color:var(--t-accent)!important;box-shadow:0 0 18px var(--t-glow)!important}
@media(max-width:760px){
  .settings-logout-body{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;padding:16px!important}
  .settings-logout-body form,.settings-logout-btn{width:100%!important;min-width:0!important}
}
