/* Menu art pass. Existing DOM, wallets, handlers and cosmetic renderer stay authoritative. */
:is(#armory-screen,#meta-screen,#dex-screen,#tarot-screen,#clan-screen,#map-screen,#system-screen){--toxic:#e4bc78;--font-head:'Courier New',monospace;--font-mono:Arial,sans-serif;color:#eadbd1;background:#09080df5}
:is(#armory-screen,#meta-screen,#dex-screen,#tarot-screen,#clan-screen,#map-screen,#system-screen) .panel-card{background:linear-gradient(160deg,#24101c,#100b12 42%);border:1px solid #753449;border-radius:4px;box-shadow:inset 0 3px #ae4054,0 12px 28px #0007;padding-bottom:30px}
:is(#armory-screen,#meta-screen,#dex-screen,#tarot-screen,#clan-screen,#map-screen,#system-screen) :is(h2,h3,.r-name){font-family:'Courier New',monospace;font-weight:900;letter-spacing:-.6px;text-shadow:none;color:#f2dfcf!important}
:is(#armory-screen,#meta-screen,#dex-screen,#tarot-screen,#clan-screen,#map-screen,#system-screen) :is(.subtitle,.r-sub,small,p){font-family:Arial,sans-serif;line-height:1.5;letter-spacing:.1px}
#armory-screen .wpn-row{background:#160e17;border:1px solid #613044;border-left:3px solid #9c3b50;border-radius:3px;box-shadow:inset 0 1px #ffffff08;padding:14px;gap:12px}
#armory-screen .wpn-row.locked{opacity:1;filter:none;border-left-color:#48343e}
#armory-screen .shop-state,#armory-screen .shop-rarity{color:#dbb879!important;background:none;letter-spacing:.8px;font-size:10px}
#armory-screen .wpn-row button,#meta-screen .meta-card button,#clan-screen button,#map-screen button{background:#702239!important;color:#f6dfc9!important;border:1px solid #b8556c!important;border-radius:3px;min-height:42px;font:bold 12px 'Courier New',monospace;box-shadow:inset 0 2px #cb607133}
#armory-screen .wpn-row button:disabled,#meta-screen button:disabled,#map-screen button:disabled{background:#251c24!important;color:#ab929e!important;border-color:#513440!important;box-shadow:none}
#armory-screen .armory-tabs{gap:4px;padding:6px;background:#100b12;border:1px solid #593043;border-radius:4px}
#armory-screen .armory-tab{border-radius:2px;color:#c1a1ae;font:bold 10px Arial;min-height:64px}
#armory-screen .armory-tab[aria-selected=true]{background:#42192a;border:1px solid #c05b70;color:#ffe0cb}
#armory-screen .armory-glyph,#armory-screen .skin-swatch{width:88px;height:88px;min-width:88px;border-radius:2px;background:#100c15;border:1px solid #845063;box-shadow:inset 0 0 0 3px #20101b;filter:none}
#armory-screen .armory-glyph svg,#armory-screen .skin-swatch svg{width:80px;height:80px;filter:none}
#armory-screen .progress-strip i{background:#d5aa69!important}
#style-mirror-preview{border-radius:3px;border:2px solid #a74d64;background:#130b14;box-shadow:0 5px 0 #08070a;height:300px}
#armory-style-section .style-picker{border-radius:3px;background:#1b0f1a;border-color:#6c354a;padding:12px}
#armory-style-section .style-picker span{font:bold 11px 'Courier New',monospace;color:#e4bd80}
#armory-style-section .style-picker button{min-height:48px;background:#522036;border:1px solid #b55169;color:#ffe1ce;font:bold 13px 'Courier New',monospace;border-radius:2px}
#tarot-screen .tarot-card{border-radius:3px;border:1px solid #b77b75;background:#1b101b;box-shadow:inset 0 0 0 4px #2e1625,inset 0 0 0 5px #6c394b;min-height:210px;padding:18px 12px}
#tarot-screen .sigil{font:bold 40px 'Courier New',monospace;text-shadow:none;color:#e7c389;min-height:64px;display:grid;place-items:center}
#tarot-screen .tarot-card b{font:bold 14px 'Courier New',monospace;letter-spacing:1px}
#tarot-screen .tarot-card small{font:12px/1.5 Arial;color:#c8a8b5}
#tarot-screen .tarot-table,#skill-training{background:#180e19;border-radius:3px;border-color:#663447}
#meta-screen .skill-node,#meta-screen .meta-card{--skill:#e1b477!important;--meta:#ddac77!important;background:#190f19;border:1px solid #643447;border-radius:3px;box-shadow:none}
#workbench-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:100%;margin:12px 0 6px;padding:5px;background:#090b11;border:1px solid #764256}
#workbench-filters button{min-width:0;padding:9px 3px;background:#221520!important;color:#c6a6aa!important;border:1px solid #674354!important;font:900 10px 'Courier New',monospace;cursor:pointer;border-radius:0}
#workbench-filters button[aria-pressed=true]{background:#6c293e!important;color:#ffe5c5!important;border:1px solid #e1ad7b!important;box-shadow:inset 0 -3px #431b28}
#workbench-info{width:100%;text-align:left;color:#d7b58d;font:700 10px monospace;letter-spacing:.05em;margin-bottom:8px}
#meta-screen #skill-training{box-shadow:none;border:2px solid #84576a;border-radius:2px;background:#130e17}
#meta-screen #skill-list{gap:6px}
#meta-screen .skill-node{padding:10px;min-width:0;background:#211420;border-left:3px solid #bd9a77}
#meta-screen .skill-node-head b{font:900 12px 'Courier New',monospace;color:#ffe6cf}
#meta-screen .skill-node-head span{font:900 9px 'Courier New',monospace}
#meta-screen .skill-node-title{display:flex;align-items:center;gap:6px;min-width:0}
#meta-screen .skill-node-title .dt-pixel{width:27px;height:27px;flex:none}
#meta-screen .skill-node button{min-height:36px!important;padding:6px;font-size:11px!important}
#meta-screen #meta-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#meta-screen .meta-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px;align-items:start;padding:10px;border-left:3px solid #bd947c;min-width:0}
#meta-screen .meta-card .meta-icon{width:44px;height:44px;border:1px solid #725365;background:#121019;border-radius:2px;box-shadow:none}
#meta-screen .meta-card .meta-icon .dt-pixel{width:34px;height:34px}
#meta-screen .meta-name{font:900 13px 'Courier New',monospace;letter-spacing:0}
#meta-screen .meta-name span{font-size:9px}
#meta-screen .meta-tag{font:900 9px monospace;color:#e4bc8b}
#meta-screen .meta-desc{font-size:10px;line-height:1.4;color:#cbbcc0}
#meta-screen .meta-card button{grid-column:1/-1;font-size:11px!important;min-height:38px!important}
@media(max-width:520px){#workbench-filters button{font-size:8px;padding:9px 2px}#meta-screen #meta-list{grid-template-columns:1fr}#meta-screen #skill-list{grid-template-columns:repeat(2,minmax(0,1fr))}#meta-screen .skill-node-head{align-items:flex-start;flex-wrap:wrap}}
@media(max-width:350px){#meta-screen #skill-list{grid-template-columns:1fr}}

#meta-screen .skill-node button{background:#692238;color:#ffe3cf;font:bold 12px 'Courier New',monospace;min-height:44px;border-radius:2px}
#clan-land-preview{background:#130b14;border-color:#784052;padding:10px}
#clan-land-owner,#clan-land-meta span{font:bold 11px 'Courier New',monospace;color:#e9c79c;border-color:#79404f;border-radius:2px;background:#21111e}
#territory-detail{color:#e1b57f}#territory-detail button{font-size:11px}
.dt-menu-portrait{shape-rendering:crispEdges;image-rendering:pixelated}
.dt-tarot-emblem{display:grid;place-items:center;width:104px;height:120px;border:3px double #c89480;background:#2c1424;box-shadow:inset 0 0 0 5px #120b13}
.dt-tarot-emblem .dt-pixel{width:80px;height:80px}
@media(max-width:620px){#armory-screen .armory-row-name{grid-template-columns:88px minmax(0,1fr)}#armory-screen .r-name{font-size:17px}#armory-screen .r-sub{font-size:12px}#tarot-screen .tarot-cards{gap:12px}#style-mirror-preview{height:240px}}
:root{--bg-2:#160e15;--line:#542735}
#start-screen{background:#08070bed}
#start-screen .panel-card{background:radial-gradient(ellipse at 50% 20%,#32121f 0,transparent 65%),#100b12;border-color:#532838;max-width:760px;padding:18px 18px 0}
#start-screen .title{display:flex;justify-content:center;align-items:center;gap:10px;font-size:44px;text-shadow:none;margin:0}
.dt-skull{width:58px;height:58px;object-fit:contain;image-rendering:pixelated}
#smex-menu-brand,#start-screen .subtitle,#menu-build-corner,.field-controls,.panel-stencil,.loadout-serial{display:none!important}
#build-version{font:10px Arial,sans-serif!important;color:#ac939e;margin:5px 0 12px}
#start-screen .resource-ledger{background:#180f18;border:1px solid #542735;border-radius:6px;padding:10px;margin:10px 0}
#scrap-row{font:700 16px Arial,sans-serif;gap:12px}#menu-gold{color:#efca82}#acct-xp-numbers,#acct-next-unlock{font:11px Arial,sans-serif;letter-spacing:0}
#safehouse{border-color:#753348;background:#180d17;margin-top:10px}#safehouse-art{filter:none}
.dt-menu-fold{margin:9px 0;border:1px solid #502737;background:#170e18;border-radius:5px;text-align:left}
.dt-menu-fold>summary{cursor:pointer;padding:13px;font:700 12px Arial,sans-serif;color:#e8d4cc;letter-spacing:.6px}
#expedition-map,#lower-command-deck{margin:0;border:0;background:none;padding:8px}
#mission-card{border-color:#542735;background:#180f18;margin:10px 0}#mission-weapon{font-size:22px}
#start-btn{min-height:70px;display:flex;align-items:center;justify-content:center;gap:12px;background:linear-gradient(#c52b46,#8c1b32);border:1px solid #ee6981;box-shadow:inset 0 2px #f46b7b,inset 0 -4px #5e1021;margin:12px 0;font-size:28px;letter-spacing:.5px}
#start-btn .dt-pixel{width:48px;height:48px;filter:none;flex-shrink:0}
.dt-main-nav{position:sticky;bottom:0;z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;background:#100b12f5;border-top:1px solid #713048;padding:7px 0 max(8px,env(safe-area-inset-bottom));margin-top:15px}
.dt-main-nav button{background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:4px;font:700 10px Arial,sans-serif;min-height:58px;color:#d9c3c8;padding:3px}.dt-main-nav button:hover{background:#371723}
.dt-pixel{shape-rendering:crispEdges;image-rendering:pixelated;width:32px;height:32px;filter:none!important;stroke:none!important}
.armory-tab .dt-pixel{width:28px;height:28px}.hub-hotspot .dt-pixel{width:23px;height:23px}.u-icon .dt-pixel{width:56px;height:56px;background:#1a101b;border:1px solid #754052;border-radius:4px}
#active-combat .power-emblem{width:38px;height:38px;filter:none}#active-combat{touch-action:none}
#clan-land-scene{background:#150b17;border:1px solid #70334a;image-rendering:pixelated}#clan-land-meta{display:flex;flex-wrap:wrap;gap:8px}#clan-land-meta span{background:#251120;padding:10px;border:1px solid #5a2c42;font:700 11px Arial,sans-serif}
#land-craft-ammo-btn,#land-upgrade-ammo-btn{min-height:48px;background:#5e1d32;border:1px solid #a44a61}#ammo-works-building svg{shape-rendering:crispEdges}
#start-screen .panel-card{gap:0!important;align-items:stretch!important}
#start-screen .resource-ledger{display:block;padding:8px;margin:8px 0}
#start-screen #scrap-row{display:flex;flex-wrap:wrap;border:0;background:none;padding:0;min-height:24px;font:700 13px Arial;gap:7px;justify-content:flex-start}
#start-screen #menu-gold{margin:0;padding:0;border:0;font:700 13px Arial}#acct-lv-badge{margin-left:auto;font:700 10px Arial;padding:3px}
#start-screen .ledger-xp{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:center;background:none;border:0;padding:4px 0 0}
#start-screen #acct-next-unlock{display:none}#start-screen #acct-xp-numbers{font:10px Arial}#start-screen #acct-xp-track{margin:0;height:5px}
#start-screen #build-version{box-shadow:none;background:none;border:0;padding:2px;margin:0 0 4px;align-self:center}
#start-screen .dt-menu-fold{width:100%;margin:6px 0}#start-screen #active-loadout{padding:0;margin:4px 0;border-color:#542735}#active-loadout>summary{padding:12px;font:700 11px Arial}
#start-screen #mission-card{grid-template-columns:52px minmax(0,1fr);padding:6px;gap:8px;min-height:80px;margin:6px 0}
#start-screen #operator-portrait{width:52px;height:70px;min-height:0}#start-screen .mission-kicker,#start-screen .slot-mark,#start-screen .slot-label,#start-screen .operator-tag{display:none}
#start-screen .loadout-slot{background:none;border:0;padding:0;min-height:25px;gap:5px}#start-screen #mission-weapon{font:700 14px Arial;white-space:normal;text-overflow:clip}#start-screen #mission-weapon-icon{width:46px;flex-shrink:0}#start-screen #mission-weapon-icon svg{width:46px;height:30px}#start-screen .operator-line{margin:0}#start-screen #mission-operator{font:700 11px Arial;color:#c9a8b6}
#start-screen .mission-loadout{grid-template-columns:46px minmax(0,1fr)}
#start-screen .support-slot{grid-template-columns:minmax(0,1fr)}
#start-screen .mission-copy,#start-screen #mission-weapon,#start-screen #mission-companion{min-width:0}
#start-screen #start-btn{padding:8px;min-height:64px;margin:8px 0}#start-screen #start-btn::before,#start-screen #start-btn::after{display:none}#start-screen #start-btn-label{font:28px 'Bebas Neue',sans-serif;white-space:normal}
#start-screen .dt-main-nav{width:100%;margin:6px 0 0;box-sizing:border-box;flex-shrink:0}
#active-combat::before{content:'TAP TO CAST · DRAG TO AIM'!important;font:9px Arial!important;left:auto!important;right:0!important;transform:none!important}
/* Build 143 compact pixel combat dock: all four controls share one bottom lane. */
#active-combat{position:fixed!important;left:auto!important;right:calc(10px + env(safe-area-inset-right))!important;bottom:calc(12px + env(safe-area-inset-bottom))!important;transform:none!important;display:flex!important;flex-direction:row;align-items:flex-end;gap:5px!important;width:auto!important;max-width:calc(100vw - 104px);z-index:45}
#active-combat[hidden]{display:none!important}
#active-combat::before{content:none!important}
#active-combat>button{box-sizing:border-box;border-radius:2px!important;box-shadow:3px 3px 0 #040407,inset 0 2px #ffffff13!important;image-rendering:pixelated;flex-shrink:1;touch-action:none}
#active-combat>#auto-run-toggle,#active-combat>#backshoot-btn{position:relative!important;inset:auto!important;width:48px!important;min-width:42px!important;height:59px!important;min-height:59px!important;padding:4px 2px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#1b1b23!important;border:2px solid #6c6571!important;color:#f1d4bd;font:800 8px 'Courier New',monospace!important;letter-spacing:0!important;line-height:1.05;text-align:center}
#active-combat>#auto-run-toggle[aria-pressed=true]{background:#18372f!important;border-color:#7ad0a2!important;color:#baf5d1}
#active-combat>#auto-run-toggle .dock-icon{font:900 21px monospace;line-height:1}
#active-combat>#backshoot-btn{border-color:#c65e64!important;background:#36151d!important;color:#ffe2c8}
#active-combat>#backshoot-btn.held,#active-combat>#backshoot-btn:active{background:#a43c48!important;border-color:#ffd8ae!important;transform:translateY(2px)}
#active-combat>#backshoot-btn svg{height:25px!important;width:25px!important;display:block;flex:none}
#active-combat>#backshoot-btn span{font-size:8px!important;font-weight:900}
#active-combat>#active-ability,#active-combat>#active-ultimate{width:58px!important;min-width:48px!important;height:64px!important;min-height:64px!important;padding:3px!important;border:2px solid #a47c66!important;background:#18141e!important}
#active-combat>#active-ability svg,#active-combat>#active-ultimate svg{height:36px!important;width:36px!important}
#active-combat>#active-ability span,#active-combat>#active-ultimate span{font-size:7px!important}
#active-combat>#active-ability small,#active-combat>#active-ultimate small{font-size:9px!important}
@media(max-width:375px){#active-combat{gap:3px!important;right:5px!important;max-width:calc(100vw - 94px)}#active-combat>#auto-run-toggle,#active-combat>#backshoot-btn{width:42px!important;min-width:37px!important;height:55px!important;min-height:55px!important}#active-combat>#active-ability,#active-combat>#active-ultimate{width:50px!important;min-width:44px!important;height:58px!important;min-height:58px!important}#active-combat>#active-ability svg,#active-combat>#active-ultimate svg{height:29px!important;width:29px!important}}
@media(orientation:landscape) and (max-height:540px){#active-combat{bottom:calc(6px + env(safe-area-inset-bottom))!important}#active-combat>button{height:49px!important;min-height:49px!important}#active-combat>#active-ability svg,#active-combat>#active-ultimate svg{height:25px!important;width:25px!important}}

@media(max-width:620px){#start-screen .panel-card{padding:12px 12px 0;width:100%}#start-screen .title{font-size:36px}.dt-skull{width:48px;height:48px}#start-btn{font-size:24px}#active-combat{right:16px!important;bottom:calc(108px + env(safe-area-inset-bottom))!important;gap:8px!important}#active-combat button{width:62px!important;height:68px!important;min-width:62px!important}#active-combat .power-hint{max-width:160px;white-space:normal}#mission-companion{font:11px Arial,sans-serif}}
@media(orientation:landscape) and (max-height:540px){#active-combat{right:18px!important;bottom:calc(90px + env(safe-area-inset-bottom))!important}#active-combat button{width:56px!important;min-width:56px!important;height:60px!important}}
/* Solo records keep their own visual rhythm without another menu layer. */
#leaderboard-screen .board-caption{font:700 10px/1.4 monospace;letter-spacing:.13em;color:#bda58e;margin:3px 0 12px}
#leaderboard-screen .board-mine{padding:12px 14px;margin-bottom:12px;border:1px solid #c59655;background:#241a18;color:#f5d99b;font:700 12px/1.4 monospace;letter-spacing:.07em}
#leaderboard-screen .board-row{border-radius:2px;background:#171519;border-color:#393038;padding:11px 13px}
#leaderboard-screen .board-row.is-podium{border-left:3px solid #d0a45d}
#leaderboard-screen .board-row.is-you{border-color:#f0c36e;background:#30211d}
#leaderboard-screen .board-row .r-val{color:#f2d8a9}

/* Build143 HUD refinement: two powers, RUN far right, mini FIRE BACK above RUN. */
#active-combat{
  position:fixed!important;left:auto!important;right:calc(10px + env(safe-area-inset-right,0px))!important;
  bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;transform:none!important;
  display:grid!important;grid-template-columns:58px 58px 50px;grid-template-rows:44px 64px;
  width:max-content!important;max-width:calc(100vw - 110px)!important;
  gap:4px!important;align-items:stretch!important;justify-items:stretch!important;
  z-index:45;pointer-events:auto;
}
#active-combat[hidden]{display:none!important}
#active-combat::before{display:none!important}
#active-combat>#active-ability{
  grid-column:1;grid-row:2;
  width:58px!important;min-width:0!important;height:64px!important;min-height:64px!important;
  align-self:stretch!important
}
#active-combat>#active-ultimate{
  grid-column:2;grid-row:2;
  width:58px!important;min-width:0!important;height:64px!important;min-height:64px!important;
  align-self:stretch!important
}
#active-combat>#auto-run-toggle{
  grid-column:3;grid-row:2;inset:auto!important;
  width:50px!important;min-width:0!important;height:64px!important;min-height:64px!important;
  padding:4px 2px!important;gap:3px!important;
  border:2px solid #6eaa8d!important;border-bottom:3px solid #37624e!important;
  background:#122d2b!important;color:#e3efdc!important;
  box-shadow:3px 3px 0 #090d13,inset 0 2px #8addac55!important;
  transform:none!important
}
#active-combat>#auto-run-toggle[aria-pressed=false]{
  border-color:#6a5761!important;border-bottom-color:#42323a!important;
  background:#211d27!important;color:#b6a6ac!important
}
#active-combat>#auto-run-toggle .dock-run-pixel{
  display:block!important;width:28px!important;height:28px!important;
  flex:none!important;stroke:none!important;fill:initial!important;filter:none!important
}
#active-combat>#auto-run-toggle .dock-label{
  display:block!important;white-space:nowrap!important;font:900 9px/1 'Courier New',monospace!important;
  color:inherit!important;overflow:visible!important;letter-spacing:0!important
}
#active-combat>#backshoot-btn{
  grid-column:3;grid-row:1;position:relative!important;inset:auto!important;
  align-self:stretch!important;justify-self:stretch!important;
  width:50px!important;min-width:0!important;height:44px!important;min-height:44px!important;
  padding:3px 1px!important;gap:0!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  border:2px solid #b96068!important;border-bottom:3px solid #60232f!important;
  border-radius:2px!important;background:#311720!important;color:#ffdfc7!important;
  box-shadow:3px 3px 0 #080911,inset 0 2px #e08f8250!important;
  transform:none!important;touch-action:none!important
}
#active-combat>#backshoot-btn.held,#active-combat>#backshoot-btn:active{
  background:#852f41!important;border-color:#ffd49b!important;
  transform:translateY(2px)!important
}
#active-combat>#backshoot-btn .dock-back-pixel{
  display:block!important;width:23px!important;height:24px!important;
  stroke:none!important;fill:initial!important;flex:none!important;filter:none!important
}
#active-combat>#backshoot-btn span{
  font:900 7px/1 'Courier New',monospace!important;white-space:nowrap!important;
  color:inherit!important;overflow:visible!important
}
/* Radar belongs ABOVE the stacked fire control, not underneath a tappable button. */
@media(max-width:620px){
  #active-combat{grid-template-columns:54px 54px 48px;grid-template-rows:43px 60px;right:calc(8px + env(safe-area-inset-right,0px))!important;bottom:calc(9px + env(safe-area-inset-bottom,0px))!important;gap:3px!important}
  #active-combat>#active-ability,#active-combat>#active-ultimate{width:54px!important;height:60px!important;min-height:60px!important;min-width:0!important}
  #active-combat>#auto-run-toggle{width:48px!important;height:60px!important;min-height:60px!important}
  #active-combat>#backshoot-btn{width:48px!important;height:43px!important;min-height:43px!important}
  #radar{right:calc(11px + env(safe-area-inset-right,0px))!important;bottom:calc(173px + env(safe-area-inset-bottom,0px))!important}
  #radar-label{right:calc(11px + env(safe-area-inset-right,0px))!important;bottom:calc(228px + env(safe-area-inset-bottom,0px))!important}
}
@media(max-width:375px){
  #active-combat{grid-template-columns:48px 48px 43px;grid-template-rows:42px 56px;gap:3px!important;right:calc(5px + env(safe-area-inset-right,0px))!important}
  #active-combat>#active-ability,#active-combat>#active-ultimate{width:48px!important;height:56px!important;min-height:56px!important;min-width:0!important}
  #active-combat>#auto-run-toggle{width:43px!important;height:56px!important;min-height:56px!important}
  #active-combat>#backshoot-btn{width:43px!important;height:42px!important;min-height:42px!important}
  #active-combat>#auto-run-toggle .dock-label{font-size:8px!important}
}
@media(orientation:landscape) and (max-height:540px){
  #active-combat{grid-template-rows:39px 52px;bottom:calc(5px + env(safe-area-inset-bottom,0px))!important}
  #active-combat>#backshoot-btn{height:39px!important;min-height:39px!important}
  #active-combat>#auto-run-toggle,#active-combat>#active-ability,#active-combat>#active-ultimate{height:52px!important;min-height:52px!important}
  #active-combat>#auto-run-toggle .dock-run-pixel{width:22px!important;height:22px!important}
  #radar{bottom:calc(155px + env(safe-area-inset-bottom,0px))!important}
  #radar-label{bottom:calc(210px + env(safe-area-inset-bottom,0px))!important}
}

/* DEAD TIDE field UI: compact edge-aligned combat and slim sightline-friendly HUD. */
#active-combat{
  right:calc(2px + env(safe-area-inset-right,0px))!important;
  bottom:calc(4px + env(safe-area-inset-bottom,0px))!important;
  grid-template-columns:53px 53px 44px!important;grid-template-rows:38px 56px!important;
  gap:3px!important;max-width:calc(100vw - 104px)!important
}
#active-combat>#active-ability,#active-combat>#active-ultimate{
  width:53px!important;height:56px!important;min-height:56px!important;min-width:0!important;
  border:2px solid #88694e!important;border-bottom:4px solid #493324!important;
  border-radius:0!important;box-shadow:2px 3px 0 #07080c,inset 0 2px #bfa58e45!important
}
#active-combat>#auto-run-toggle{
  width:44px!important;height:56px!important;min-height:56px!important;min-width:0!important;
  border-radius:0!important;border:2px solid #a75d66!important;border-bottom:4px solid #5b2b3d!important;
  background:#281a24!important;color:#ffe8d4!important;
  box-shadow:2px 3px 0 #07080c,inset 0 2px #ffb9ad3a!important
}
#active-combat>#auto-run-toggle[aria-pressed=true]{
  border-color:#7abdac!important;border-bottom-color:#315b54!important;
  background:#182b30!important;color:#d6f7e8!important
}
#active-combat>#backshoot-btn{
  width:44px!important;height:38px!important;min-height:38px!important;min-width:0!important;
  border-radius:0!important;border:2px solid #a75d66!important;border-bottom:3px solid #61303b!important;
  background:#241820!important;box-shadow:2px 3px 0 #07080c,inset 0 2px #ffb9ad2b!important
}
#active-combat>#auto-run-toggle .dt-pixel{
  width:27px!important;height:27px!important;display:block!important;flex:none!important;
  stroke:none!important;filter:none!important;image-rendering:pixelated!important
}
#active-combat>#backshoot-btn .dt-pixel{
  width:22px!important;height:22px!important;display:block!important;flex:none!important;
  stroke:none!important;filter:none!important;image-rendering:pixelated!important
}
#active-combat>#auto-run-toggle .dock-label{font-size:8px!important}
#active-combat>#backshoot-btn span{font-size:7px!important}
#hud{top:calc(5px + env(safe-area-inset-top,0px));left:5px;right:5px;gap:5px}
#stats-panel{
  min-width:0!important;width:clamp(170px,30vw,224px)!important;max-width:42vw!important;
  padding:5px 7px!important;border-radius:2px!important;
  background:rgba(10,10,15,.71)!important;border:1px solid #6b344355!important;
  box-shadow:none!important;backdrop-filter:none!important
}
#stats-panel .bar-row{margin-bottom:2px!important;gap:4px!important}
#stats-panel .bar-track{height:5px!important;border-radius:0!important}
#stats-panel .bar-fill{border-radius:0!important}
#stats-panel .hud-glyph{width:12px!important;height:12px!important;font-size:8px!important;border-radius:0!important}
#stats-panel .bar-label{width:15px!important}
#stats-panel .bar-val{font-size:8px!important;width:41px!important}
#stats-panel #weapon-row{margin-top:3px!important;padding-top:3px!important;gap:4px!important}
#stats-panel #weapon-icon{width:22px!important;height:16px!important;border-radius:0!important}
#stats-panel #weapon-name{font:900 9px 'Courier New',monospace!important}
#stats-panel #run-tags{gap:2px!important;margin-top:2px!important}
#stats-panel .run-tag{font-size:7px!important;padding:1px 2px!important}
#stats-panel #perk-strip{margin-top:2px!important;padding-top:1px!important;max-height:15px!important;font-size:7px!important}
#right-panel{
  min-width:0!important;padding:4px 6px!important;
  border-radius:2px!important;background:rgba(10,10,15,.70)!important;
  border:1px solid #6b344355!important;box-shadow:none!important
}
#right-panel #timer{font-size:17px!important;line-height:1!important}
#right-panel #biome-label{font-size:8px!important;margin-top:2px!important}
#right-panel #wave-label{font-size:8px!important;line-height:1.1!important;margin-top:1px!important}
#right-panel #kill-label{font-size:8px!important;margin-top:1px!important}
#right-panel #combat-meter{margin-top:2px!important;padding-top:2px!important}
@media(max-width:520px){
  #hud{top:calc(3px + env(safe-area-inset-top,0px));left:3px;right:3px;gap:4px}
  #stats-panel{width:clamp(146px,42vw,180px)!important;max-width:43vw!important;padding:4px 5px!important}
  #stats-panel .bar-val{font-size:7px!important;width:35px!important}
  #right-panel{padding:4px 5px!important;max-width:43vw!important}
  #right-panel #timer{font-size:16px!important}
  #active-combat{right:calc(2px + env(safe-area-inset-right,0px))!important;bottom:calc(4px + env(safe-area-inset-bottom,0px))!important;grid-template-columns:51px 51px 44px!important;grid-template-rows:38px 55px!important}
  #active-combat>#active-ability,#active-combat>#active-ultimate{width:51px!important;height:55px!important;min-height:55px!important}
  #active-combat>#auto-run-toggle{width:44px!important;height:55px!important;min-height:55px!important}
  #active-combat>#backshoot-btn{width:44px!important;height:38px!important;min-height:38px!important}
}
@media(max-width:350px){#active-combat{grid-template-columns:45px 45px 42px!important}#active-combat>#active-ability,#active-combat>#active-ultimate{width:45px!important}#active-combat>#auto-run-toggle,#active-combat>#backshoot-btn{width:42px!important}}
@media(orientation:landscape) and (max-height:540px){
  #active-combat{right:calc(2px + env(safe-area-inset-right,0px))!important;bottom:calc(3px + env(safe-area-inset-bottom,0px))!important;grid-template-rows:34px 48px!important}
  #active-combat>#active-ability,#active-combat>#active-ultimate,#active-combat>#auto-run-toggle{height:48px!important;min-height:48px!important}
  #active-combat>#backshoot-btn{height:34px!important;min-height:34px!important}
  #active-combat>#auto-run-toggle .dt-pixel{height:20px!important;width:20px!important}
}

/* RIFT CORE collectible contract: small, crisp reward disclosure. */
#rift-reveal{
  position:fixed;z-index:58;top:calc(65px + env(safe-area-inset-top,0px));
  left:50%;transform:translateX(-50%);
  width:min(310px,calc(100vw - 34px));pointer-events:none;text-align:center;
  padding:9px 12px 10px;background:#0c1019f5;
  border:2px solid var(--rift-a,#51d9da);border-bottom:4px solid var(--rift-b,#de68b7);
  box-shadow:4px 4px 0 #09080d,inset 0 2px #fef1d433;
  font:900 10px/1.3 'Courier New',monospace;color:#fff4d9;
  animation:rift-contract-pop .23s steps(4,end) both;
}
#rift-reveal[hidden]{display:none!important}
#rift-reveal .rift-reveal-kicker{font-size:8px;letter-spacing:.1em;color:var(--rift-a,#77eded)}
#rift-reveal .rift-reveal-name{display:block;font-size:19px;letter-spacing:.05em;margin:3px 0;color:#fff2d5;text-shadow:2px 2px #100d14}
#rift-reveal .rift-reveal-boon{color:#b3ffba;font-size:11px;letter-spacing:.02em}
#rift-reveal .rift-reveal-risk{color:#ff516a;font-size:11px;letter-spacing:.04em;margin-top:4px}
#rift-reveal .rift-reveal-risk.rift-clean{color:#74d9a8}
@keyframes rift-contract-pop{from{opacity:0;transform:translate(-50%,-8px) scale(.92)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
/* Build145: ink frames, ivory hierarchy and category materials. No animated filters. */
:is(#armory-screen,#meta-screen,#dex-screen,#tarot-screen,#clan-screen,#map-screen,#system-screen){--panel-accent:#b96979;--panel-ink:#11131c}
#clan-screen{--panel-accent:#80b8c7}#meta-screen{--panel-accent:#c9aa72}
#tarot-screen{--panel-accent:#b397dd}#dex-screen{--panel-accent:#8caf9f}
#map-screen{--panel-accent:#c5b499}
:is(#armory-screen,#meta-screen,#dex-screen,#tarot-screen,#clan-screen,#map-screen,#system-screen) .panel-card{
 background:linear-gradient(145deg,#1c1925 0%,#101018 42%,#0c0d13 100%);
 border:1px solid #49414c;border-top:3px solid var(--panel-accent);border-radius:2px;
 box-shadow:inset 0 1px #f4e8ce35,0 5px 0 #06070b;padding-top:16px;
}
#armory-screen .wpn-row,#meta-screen .meta-card{
 background:linear-gradient(115deg,#21202b,#11131c 60%);border-color:#45424d;
 border-left-color:var(--panel-accent);box-shadow:inset 0 1px #eee4d316,0 3px 0 #07080c;
}
#armory-screen .armory-glyph,#armory-screen .skin-swatch,#meta-screen .meta-card .meta-icon{
 background:linear-gradient(135deg,#292735,#12141e);border-color:#716778;
 box-shadow:inset 0 0 0 3px #10121b,inset 0 0 0 4px #b5a28c50;
 image-rendering:pixelated;
}
#armory-screen .armory-glyph svg,#armory-screen .skin-swatch svg,.dt-tarot-emblem svg{
 shape-rendering:crispEdges;image-rendering:pixelated;filter:none!important;
}
#armory-screen .armory-tabs{background:#0d1017;border-color:#393947}
#armory-screen .armory-tab[aria-selected=true]{background:#302536;border-color:#cda27f;color:#fff0d4;box-shadow:inset 0 -3px #cda27f}
#tarot-screen .tarot-card{background:linear-gradient(150deg,#282039,#111420);border-color:#9d83bb;box-shadow:inset 0 0 0 3px #12131d,inset 0 0 0 4px #816992}
.dt-tarot-emblem{background:#171c2a;border-color:#b9a0cf;box-shadow:inset 0 0 0 5px #0d111b}
:is(#armory-screen,#meta-screen,#clan-screen,#map-screen) button:focus-visible{outline:2px solid #f3d79b;outline-offset:3px}
@media(prefers-reduced-motion:reduce){#rift-reveal{animation:none}}
@media(max-width:520px){
  #rift-reveal{top:calc(55px + env(safe-area-inset-top,0px));width:min(268px,calc(100vw - 24px));padding:6px 9px}
  #rift-reveal .rift-reveal-name{font-size:15px}
  #rift-reveal .rift-reveal-boon,#rift-reveal .rift-reveal-risk{font-size:9px}
}


