/* Tenno Ledger: cybersigilism.
   Base: "Dramatic" design skill (awesome-design-skills): near-black surface,
   light text, high contrast, type scale 12/14/16/20/24/32, JetBrains Mono.
   On top: thorned sigil linework, liquid chrome, chamfered edges and white glow.
   Colour only where it carries meaning: price up/down, relic tiers, factions, live. */

:root {
  --void: #050506;
  --ink: #09090b;
  --panel: #0c0c0f;
  --panel-2: #121216;
  --panel-3: #1a1a1f;
  --line: rgb(255 255 255 / 0.1);
  --line-2: rgb(255 255 255 / 0.2);
  --text: #fafafa;
  --muted: #b3b3bb;
  --faint: #868690;
  --glow: rgb(255 255 255 / 0.55);
  --rise: #7cf5c4;
  --fall: #ff7a93;
  --live: #a8ecff;
  --ducat: #e9d39a;
  --warn: #f6c86a;

  --f-gothic: 'Grenze Gotisch', serif;
  --f-head: 'Chakra Petch', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --t12: 12px; --t14: 14px; --t16: 16px; --t20: 20px; --t24: 24px; --t32: 32px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --cut: 14px;
  --rail: 76px;
  --subnav: 252px;
  --topbar: 76px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 700px at 70% -10%, #17171c 0%, transparent 60%), var(--void);
  background-attachment: fixed;
  color: var(--text); font: 400 var(--t14)/1.5 var(--f-body); min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Film grain over everything. */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: 0.06; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 3px; box-shadow: 0 0 12px var(--glow); }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s4); top: -60px; z-index: 300; background: var(--panel-3); padding: var(--s2) var(--s4); text-decoration: none; }
.skip-link:focus { top: var(--s4); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--t12); }
/* Spacing helpers win over component margins. */
.mt { margin-top: var(--s4) !important; }
.mb { margin-bottom: var(--s4) !important; }
.mb-s { margin-bottom: var(--s2) !important; }
.trend-up { color: var(--rise); }
.trend-down { color: var(--fall); }

/* ---------- Liquid chrome ---------- */
.chrome {
  background: linear-gradient(178deg, #ffffff 0%, #ececef 26%, #7a7a82 46%, #1e1e22 52%, #c9c9cf 66%, #ffffff 82%, #9a9aa2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgb(255 255 255 / 0.18));
}
/* Flowing chrome on the big gothic titles. Two layers clipped to the text:
   a bright ripple with dark edges that sweeps left to right, over the base
   chrome whose dark horizon drifts slowly up and down, like light moving
   across liquid metal. */
@property --sweep { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
@property --drift { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.hero-title.chrome, .page-title.chrome, .subnav-title .chrome {
  background-image:
    linear-gradient(105deg, transparent 0 38%, rgb(16 16 20 / 0.55) 44%, rgb(255 255 255 / 0.98) 49%, #fff 50%, rgb(255 255 255 / 0.98) 51%, rgb(16 16 20 / 0.55) 56%, transparent 62% 100%),
    linear-gradient(178deg, #ffffff 0%, #ececef 22%, #7a7a82 42%, #1e1e22 50%, #c9c9cf 62%, #ffffff 78%, #9a9aa2 100%);
  background-size: 260% 100%, 100% 170%;
  background-position: var(--sweep) 0, 0 var(--drift);
  background-repeat: no-repeat;
  width: fit-content;
  animation: chrome-sweep 7s cubic-bezier(0.55, 0, 0.25, 1) infinite, chrome-drift 9s ease-in-out infinite alternate;
}
.subnav-title .chrome { animation-delay: 2.2s, 0s; }
@keyframes chrome-sweep { 0% { --sweep: 100%; } 55%, 100% { --sweep: 0%; } }
@keyframes chrome-drift { from { --drift: 22%; } to { --drift: 78%; } }

.sheen { position: relative; overflow: hidden; display: inline-block; }
.sheen-bar {
  position: absolute; top: -20%; bottom: -20%; left: 0; width: 22%; pointer-events: none; mix-blend-mode: overlay; will-change: transform;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.85), transparent); transform: translateX(-150%) skewX(-18deg);
}

/* ---------- Chamfered frame: metal edge around a dark core ---------- */
.frame {
  --c: var(--cut);
  position: relative; padding: 1px; min-width: 0;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  background: linear-gradient(155deg, rgb(255 255 255 / 0.42), rgb(255 255 255 / 0.07) 32%, rgb(255 255 255 / 0.05) 70%, rgb(255 255 255 / 0.3));
}
.frame > .core {
  position: relative; height: 100%; padding: var(--s5); background: linear-gradient(180deg, var(--panel-2), var(--panel));
  clip-path: polygon(calc(var(--c) - 0.5px) 0, 100% 0, 100% calc(100% - var(--c) + 0.5px), calc(100% - var(--c) + 0.5px) 100%, 0 100%, 0 calc(var(--c) - 0.5px));
}
.frame.lit { background: linear-gradient(155deg, #fff, rgb(255 255 255 / 0.2) 30%, rgb(255 255 255 / 0.08) 70%, rgb(255 255 255 / 0.6)); filter: drop-shadow(0 0 14px rgb(255 255 255 / 0.12)); }
.frame .orn { position: absolute; right: 0; bottom: 0; width: 84px; height: 84px; color: rgb(255 255 255 / 0.16); pointer-events: none; transform: rotate(180deg); }
.frame > .core > :not(.orn) { position: relative; }

.label, .section-label { font: 500 var(--t12)/1.2 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin: 0 0 var(--s2); }
.tag, .pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none;
  font: 500 var(--t12)/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 10px; border: 1px solid var(--line-2); color: var(--muted);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
a.tag:hover { color: #fff; border-color: #fff; }
.tag.live, .pill-live { color: var(--live); border-color: rgb(168 236 255 / 0.45); }
.tag.live::before, .pill-live::before { content: ''; width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); box-shadow: 0 0 8px currentColor; }
.plat, .plat-sm { font-family: var(--f-mono); font-weight: 700; color: var(--text); }
.plat { font-size: var(--t20); }
.plat::after, .plat-sm::after { content: 'p'; font-size: 0.7em; color: var(--faint); margin-left: 1px; }
.badges { display: flex; flex-wrap: wrap; gap: var(--s1); }
.badge {
  display: inline-block; font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1px 7px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle;
}
.badge-ducat { color: var(--ducat); border-color: rgb(233 211 154 / 0.4); }
.badge-vault { color: var(--warn); border-color: rgb(246 200 106 / 0.45); }
.badge-daily { color: var(--live); border-color: rgb(168 236 255 / 0.4); }
.badge-weekly { color: #d9ccff; border-color: rgb(217 204 255 / 0.4); }
.badge-elite, .badge-dev { color: var(--warn); border-color: rgb(246 200 106 / 0.45); }
.cost { font: 500 var(--t12)/1.2 var(--f-mono); color: var(--muted); }
.cost-ducat { color: var(--ducat); }
.empty, .empty-inline { color: var(--muted); border: 1px dashed var(--line-2); padding: var(--s5); text-align: center; margin: 0; }
.empty-inline { padding: var(--s4); }
.notice { color: var(--faint); font-size: var(--t12); margin-top: var(--s6); max-width: 90ch; }
.item-link { color: var(--text); text-decoration: none; border-bottom: 1px dotted rgb(255 255 255 / 0.4); }
.item-link:hover { border-bottom: 1px solid #fff; text-shadow: 0 0 8px var(--glow); }
.sigil, .page-sigil, .hero-sigil, .drawer-sigil { pointer-events: none; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--rail) var(--subnav) minmax(0, 1fr); min-height: 100vh; }
.app.no-subnav { grid-template-columns: var(--rail) minmax(0, 1fr); }
.app.no-subnav .subnav { display: none; }

.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--s4) 0; background: linear-gradient(180deg, #0b0b0e, #060607); border-right: 1px solid var(--line); z-index: 20;
}
.rail a {
  position: relative; width: 50px; height: 50px; display: grid; place-items: center; color: var(--faint); text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: color 0.35s ease, background 0.35s ease;
}
.rail a svg { width: 24px; height: 24px; }
.rail .rail-logo { width: 56px; height: 56px; margin-bottom: var(--s4); color: var(--text); clip-path: none; }
.rail .rail-logo img { width: 48px; height: 48px; display: block; filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.25)); transition: filter 0.4s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.rail .rail-logo:hover { background: transparent; }
.rail .rail-logo:hover img { filter: drop-shadow(0 0 12px rgb(255 255 255 / 0.55)); transform: rotate(90deg); }
.rail a:hover { color: var(--text); background: rgb(255 255 255 / 0.05); }
.rail a[aria-current='page'] { color: #fff; }
.rail a svg { transition: filter 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.rail a:hover svg { transform: scale(1.08); }
.rail a[aria-current='page'] svg { filter: drop-shadow(0 0 6px #fff); }
/* One highlight that glides between icons (see glideRail in app.js). */
.rail-glider {
  position: absolute; left: 13px; top: 0; width: 50px; height: 50px; pointer-events: none; opacity: 0; will-change: transform;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0.04));
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.rail-glider::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, transparent, #fff, transparent); box-shadow: 0 0 10px #fff;
}
.rail .tip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rail-tip {
  position: fixed; z-index: 60; pointer-events: none; white-space: nowrap; transform: translateY(-50%);
  font: 500 var(--t12)/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text);
  background: var(--panel-3); border: 1px solid var(--line-2); padding: 8px 10px; box-shadow: 0 0 12px rgb(255 255 255 / 0.1);
}
.rail .spacer { flex: 1; }

.subnav {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: var(--s5) var(--s4); border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0a0a0d, #070708); z-index: 10; scrollbar-width: thin;
}
.subnav-sections { display: none; margin-bottom: var(--s5); }
.subnav-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 var(--s5); }
.subnav-title b { font: 400 32px/1 var(--f-gothic); }
.navlist { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: 2px; }
.navlist a, .navlist button {
  width: 100%; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: 9px var(--s3);
  color: var(--muted); text-decoration: none; background: transparent; border: 0; cursor: pointer; text-align: left;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color 0.3s ease, background 0.3s ease;
}
.navlist a > *, .navlist button > * { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.navlist a:hover > span:not(.count), .navlist button:hover > span:not(.count) { transform: translateX(3px); }
.navlist svg { width: 18px; height: 18px; opacity: 0.85; transition: filter 0.4s ease; }
.navlist a:hover, .navlist button:hover { color: var(--text); background: rgb(255 255 255 / 0.04); }
.navlist [aria-current='page'], .navlist [aria-current='true'] { color: #fff; background: linear-gradient(90deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0.02)); box-shadow: inset 1px 0 0 #fff; }
.navlist [aria-current='page'] svg, .navlist [aria-current='true'] svg { filter: drop-shadow(0 0 5px #fff); }
/* With a glider, the current item's background is drawn by the glider. */
.subnav-own { position: relative; isolation: isolate; }
.has-glider .navlist [aria-current='true'] { background: transparent; box-shadow: none; }
.nav-glider {
  position: absolute; z-index: -1; pointer-events: none; will-change: transform;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0.02)); box-shadow: inset 1px 0 0 #fff;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.navlist .count { font: 500 var(--t12)/1 var(--f-mono); color: var(--faint); }

.main-col { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 15; height: var(--topbar);
  background: linear-gradient(180deg, rgb(5 5 6 / 0.96), rgb(5 5 6 / 0.78)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
/* Same centred column as .view-inner, so the bar lines up with the page. */
.topbar-inner {
  height: 100%; max-width: 1640px; margin: 0 auto; padding: 0 var(--s6);
  display: grid; grid-template-columns: minmax(132px, 1fr) minmax(0, 640px) minmax(132px, 1fr); grid-template-areas: 'menu search meta'; align-items: center; gap: var(--s4);
}
.topbar-inner .menu-btn { grid-area: menu; justify-self: start; }
.topbar-inner .search { grid-area: search; }
.topbar-inner .topbar-meta { min-width: 0; overflow: hidden; }
#topbar-meta { overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; width: 44px; height: 44px; flex: none; place-items: center; background: var(--panel-2); border: 1px solid var(--line-2); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
.search {
  width: 100%; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); height: 44px; min-width: 0;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.search svg { width: 18px; height: 18px; flex: none; }
.search-icon { display: grid; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); }
.search input:focus, .search input:focus-visible { outline: none; box-shadow: none; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: invert(1); cursor: pointer; }
.search:focus-within { border-color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.3), 0 0 16px rgb(255 255 255 / 0.18); }
.search kbd { font: 500 11px/1 var(--f-mono); color: var(--faint); border: 1px solid var(--line-2); padding: 4px 6px; }
.topbar-meta { display: flex; gap: var(--s3); align-items: center; color: var(--faint); font-size: var(--t12); white-space: nowrap; }

.view { min-height: calc(100vh - var(--topbar)); }
.view-inner { padding: var(--s6); max-width: 1640px; margin: 0 auto; }

/* Page headings: gothic chrome title with a sigil behind it */
.page-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); padding-left: 64px; min-height: 96px; }
.page-sigil { position: absolute; left: -24px; top: -40px; width: 110px; height: 200px; color: rgb(255 255 255 / 0.18); }
.page-title { margin: 0; font: 400 64px/0.9 var(--f-gothic); }
.page-head .label { margin-bottom: var(--s1); }
.head-tools { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.head-tools .seg { height: 44px; align-items: stretch; background: var(--panel-2); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }

/* ---------- Home ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s6); align-items: center; padding: var(--s3) 0 var(--s6); }
.hero-sigil { position: absolute; left: -48px; top: -36px; width: 220px; height: 520px; color: rgb(255 255 255 / 0.16); }
.hero-text { position: relative; padding-left: 120px; }
.hero-title { margin: 0; font: 400 clamp(56px, 7vw, 104px)/0.92 var(--f-gothic); }
.hero p { color: var(--muted); max-width: 46ch; margin: var(--s4) 0 0; font-size: var(--t16); }
.baro { display: block; text-align: center; position: relative; text-decoration: none; }
.chrome-crest { width: 100%; max-width: 440px; height: auto; display: block; margin: 0 auto var(--s3); }
.baro .count { font: 700 clamp(40px, 4.4vw, 64px)/1 var(--f-mono); letter-spacing: 0.02em; }
.baro .where { color: var(--muted); margin-top: var(--s2); }
.baro:hover .chrome-crest { filter: drop-shadow(0 0 18px rgb(255 255 255 / 0.25)); }

/* Card size system: rows of small x6, medium x3, large x2. */
.row { display: grid; gap: var(--s4); margin-bottom: var(--s4); align-items: stretch; }
.row-s { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.row-m { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row-l { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-s, .card-m, .card-l { min-width: 0; display: flex; text-decoration: none; color: inherit; }
.card-s > .frame, .card-m > .frame, .card-l > .frame { flex: 1; display: flex; }
.card-s > .frame > .core, .card-m > .frame > .core, .card-l > .frame > .core { flex: 1; display: flex; flex-direction: column; }
.card-s > .frame > .core { padding: var(--s3) var(--s4); justify-content: center; }
.card-m > .frame > .core { min-height: 340px; }
a.card-s:hover > .frame { background: linear-gradient(155deg, #fff, rgb(255 255 255 / 0.2) 30%, rgb(255 255 255 / 0.1) 70%, #fff); }
.push { flex: 1; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.h-card { font: 600 var(--t20)/1.15 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; margin: 0; }
.h-card a { text-decoration: none; }
.h-card a:hover { text-shadow: 0 0 10px var(--glow); }
.big-t { font: 600 var(--t24)/1.1 var(--f-head); text-transform: uppercase; letter-spacing: 0.04em; }
.dial { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s3); align-items: center; }
.dial svg { width: 56px; height: 56px; color: #fff; }
.dial .ring-bg { stroke: rgb(255 255 255 / 0.1); }
.dial .ring { stroke: #fff; filter: drop-shadow(0 0 4px rgb(255 255 255 / 0.7)); transition: stroke-dashoffset 1s linear; }
.dial b { display: block; font: 600 var(--t16)/1.1 var(--f-head); letter-spacing: 0.03em; text-transform: uppercase; }
.dial .where { color: var(--faint); font-size: var(--t12); }
.dial .t { font: 500 var(--t14)/1.2 var(--f-mono); color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rows > li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 10px var(--s3); min-height: 58px;
  background: rgb(255 255 255 / 0.025); border-left: 1px solid var(--line-2);
}
.rows > li:hover { background: rgb(255 255 255 / 0.05); border-left-color: #fff; }
.rows.compact > li { min-height: 0; padding: 8px var(--s3); }
.main-t { font-weight: 500; }
.sub-t { color: var(--faint); font-size: var(--t12); }
.rows .right { text-align: right; display: grid; justify-items: end; gap: 2px; }
.rows > li:has(> .mover) { display: block; padding: 0; }
.mover { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 10px var(--s3); min-height: 58px; text-decoration: none; color: inherit; }
.mover img { width: 40px; height: 40px; object-fit: contain; }
.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.divider { height: 14px; margin: var(--s4) 0; color: rgb(255 255 255 / 0.4); }
.divider svg { width: 100%; height: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.steps > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.step-n { position: relative; width: 30px; height: 30px; display: grid; place-items: center; font: 600 var(--t14)/1 var(--f-head); color: var(--text); }
.step-n::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--line-2); transform: rotate(45deg); }
.step-n > span { position: relative; }
.modifier { margin-top: 6px; line-height: 1.45; }
.shard { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0 0 var(--s3); }
.shard-gem { width: 10px; height: 14px; clip-path: polygon(50% 0, 100% 38%, 78% 100%, 22% 100%, 0 38%); background: currentColor; box-shadow: 0 0 10px currentColor; display: inline-block; }
.shard-azure { color: #7ab8ff; } .shard-crimson { color: #ff7a93; } .shard-amber { color: #f6c86a; }
.tier { display: inline-block; font: 600 var(--t12)/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 7px; border: 1px solid currentColor; vertical-align: middle; }
.rows .tier { margin: 0 6px 6px 0; }
.tier-lith { color: #d8b892; } .tier-meso { color: #c9d1de; } .tier-neo { color: #f0d27a; } .tier-axi { color: #fff1c2; } .tier-requiem { color: #ff8a9c; } .tier-omnia { color: #c9b6ff; }

/* ---------- Market ---------- */
.select {
  height: 44px; padding: 0 var(--s4); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.select:focus-visible { border-color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.chip {
  border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 6px var(--s4); min-height: 36px; cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.chip:hover { color: var(--text); border-color: rgb(255 255 255 / 0.5); }
.chip[aria-pressed='true'], .chip[aria-selected='true'] { color: var(--ink); background: linear-gradient(180deg, #fff, #c9c9cf); border-color: #fff; box-shadow: 0 0 12px rgb(255 255 255 / 0.3); }
.chip[aria-pressed='true'] .faint { color: #3a3a40; }
.chips-sm { gap: 6px; margin-bottom: var(--s4); }
.chips-sm .chip { min-height: 32px; padding: 3px var(--s3); font-size: var(--t14); }
.result-meta { color: var(--muted); font-size: var(--t14); margin: 0 0 var(--s4); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s4); }
.card { display: block; min-width: 0; text-decoration: none; color: inherit; }
.card > .frame { height: 100%; }
.card > .frame > .core { padding: var(--s4); display: grid; gap: var(--s2); align-content: start; }
.card-art { height: 110px; display: grid; place-items: center; background: radial-gradient(closest-side, rgb(255 255 255 / 0.08), transparent); margin-bottom: var(--s1); }
.card-art img { max-height: 104px; width: auto; max-width: 100%; object-fit: contain; transition: transform 0.3s ease, filter 0.3s ease; }
.card-big .card-art { height: 160px; }
.card-big .card-art img { max-height: 152px; }
.card:hover .card-art img { transform: translateY(-3px); filter: drop-shadow(0 0 14px rgb(255 255 255 / 0.25)); }
.card:hover > .frame, .card:focus-visible > .frame { background: linear-gradient(155deg, #fff, rgb(255 255 255 / 0.2) 30%, rgb(255 255 255 / 0.1) 70%, #fff); filter: drop-shadow(0 0 14px rgb(255 255 255 / 0.18)); }
.card-name { margin: 0; font: 600 var(--t14)/1.2 var(--f-head); letter-spacing: 0.05em; text-transform: uppercase; overflow-wrap: anywhere; }
.card-big .card-name { font-size: var(--t16); }
.card-price { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.card-meta { display: flex; justify-content: space-between; gap: var(--s2); color: var(--faint); font-size: var(--t12); }
.sentinel { height: 1px; }

/* ---------- Item drawer ---------- */
.drawer-scrim, .menu-scrim { position: fixed; inset: 0; background: rgb(0 0 0 / 0.62); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 100vw); z-index: 41; overflow-y: auto; will-change: transform;
  background: linear-gradient(180deg, #0e0e12, #08080a); border-left: 1px solid var(--line-2); padding: var(--s5);
}
.drawer-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: start; margin-bottom: var(--s4); }
.drawer-art { grid-column: 1 / -1; position: relative; height: 220px; display: grid; place-items: center; margin-bottom: var(--s2); }
.drawer-art img { max-height: 210px; width: auto; max-width: 100%; position: relative; object-fit: contain; }
.drawer-sigil { position: absolute; inset: 0; width: 100%; height: 100%; color: rgb(255 255 255 / 0.18); }
.drawer-head h2 {
  margin: 0 0 var(--s2); font: 400 40px/0.95 var(--f-gothic);
  background: linear-gradient(178deg, #fff 0%, #ececef 30%, #7a7a82 48%, #2a2a2e 54%, #d4d4d8 70%, #fff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.icon-btn { position: absolute; top: var(--s4); right: var(--s4); z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--line-2); cursor: pointer; }
.icon-btn:hover { border-color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }
.back-link { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: var(--s2); color: var(--muted); text-decoration: none; font: 500 var(--t12)/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.back-link:hover { color: #fff; text-shadow: 0 0 8px var(--glow); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-bottom: var(--s5); }
.stat { padding: var(--s3) var(--s4); background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.stat .label { margin-bottom: 4px; }
.stat .value { font: 700 var(--t24)/1.15 var(--f-mono); }
.stat .value .plat-sm { font-size: inherit; }
.parts { margin-bottom: var(--s5); }
.part-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.part { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); background: rgb(255 255 255 / 0.03); border-left: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.part img { width: 48px; height: 48px; object-fit: contain; filter: brightness(1.15); }
.part:hover { background: rgb(255 255 255 / 0.06); border-left-color: #fff; }
.part:hover img { filter: brightness(1.2) drop-shadow(0 0 6px rgb(255 255 255 / 0.45)); }
.part-name { display: grid; gap: 2px; min-width: 0; }
.part-name b { font-weight: 500; }
.part-price { display: grid; justify-items: end; gap: 2px; text-align: right; white-space: nowrap; }
.part-price .plat-sm { font-size: var(--t16); }
.parts-total { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); padding: var(--s3); border: 1px dashed var(--line-2); font-weight: 500; }
.parts .panel-sub a { color: var(--text); }
.chart { padding: var(--s4); margin-bottom: var(--s5); border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel-2), var(--panel)); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.chart svg { width: 100%; height: 160px; display: block; overflow: visible; }
.chart .line { fill: none; stroke: #fff; stroke-width: 1.6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgb(255 255 255 / 0.6)); }
.chart .area { fill: url(#metal); opacity: 0.18; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; font-size: var(--t12); color: var(--faint); margin-top: var(--s2); }
.link-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.btn {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--line-2); background: var(--panel-2);
  color: var(--text); text-decoration: none; cursor: pointer; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn:hover { border-color: #fff; }
.btn-primary { color: var(--ink); background: linear-gradient(180deg, #fff, #c4c4ca); border-color: #fff; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 0 16px rgb(255 255 255 / 0.35); }

/* ---------- Set vs parts tool ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.toolbar h1 { margin: 0 var(--s4) 0 0; font: 400 56px/0.95 var(--f-gothic); background: linear-gradient(178deg, #fff 0%, #ececef 30%, #7a7a82 48%, #2a2a2e 54%, #d4d4d8 70%, #fff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tool-lede { color: var(--muted); max-width: 72ch; margin: 0 0 var(--s4); }
.tool-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.tool-controls .chips { margin: 0; }
.tool-options { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px var(--s3); cursor: pointer; min-height: 32px; font-size: var(--t14); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { color: var(--ink); background: linear-gradient(180deg, #fff, #c9c9cf); }
.check { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: var(--t14); }
.check input { width: 18px; height: 18px; accent-color: #fafafa; }
.stat-strip { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }
.stat-chip {
  display: grid; gap: 2px; min-width: 150px; padding: var(--s2) var(--s4); background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2);
  color: var(--text); text-decoration: none; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.stat-chip > span:first-child { font: 500 11px/1.3 var(--f-mono); color: var(--faint); text-transform: uppercase; letter-spacing: 0.12em; }
.stat-chip b { font-weight: 500; font-size: var(--t16); }
.stat-chip > span:not(:first-child) { font-size: var(--t14); }
.stat-chip > span.faint { font-size: var(--t12); }
.stat-link:hover { border-color: #fff; }
.set-list { display: grid; gap: var(--s2); }
details.set-row { border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel-2), var(--panel)); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
details.set-row:hover, details.set-row[open] { border-color: rgb(255 255 255 / 0.55); }
details.set-row > summary { list-style: none; cursor: pointer; display: grid; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); grid-template-columns: 56px minmax(0, 1.6fr) repeat(4, minmax(84px, 0.6fr)); }
details.set-row > summary::-webkit-details-marker { display: none; }
.set-thumb { width: 56px; height: 56px; object-fit: contain; }
.set-name { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.set-name b { font: 600 var(--t16)/1.15 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; }
.set-num { display: grid; gap: 1px; justify-items: end; text-align: right; }
.set-num .label { margin: 0; font-size: 11px; }
.set-num .gap { font-weight: 700; }
.move { font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 1px var(--s2); border: 1px solid; }
.move-parts { color: var(--rise); border-color: rgb(124 245 196 / 0.45); }
.move-set { color: var(--warn); border-color: rgb(246 200 106 / 0.45); }
.move-even { color: var(--muted); border-color: var(--line-2); }
.liq { font-size: var(--t14); font-weight: 500; }
.liq-high { color: var(--rise); } .liq-mid { color: var(--warn); } .liq-low { color: var(--fall); }
.set-detail { padding: 0 var(--s4) var(--s4); }

/* ---------- Activities ---------- */
.act-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.act-grid > .panel { grid-column: span 6; }
.panel { scroll-margin-top: calc(var(--topbar) + var(--s4)); }
.act-grid > .panel.panel-wide { grid-column: 1 / -1; }
.act-grid > .panel.panel-7 { grid-column: span 7; }
.act-grid > .panel.panel-half { grid-column: span 6; }
.act-grid > .panel.panel-third { grid-column: span 4; }
.act-grid > .panel.panel-two-thirds { grid-column: span 8; }
.panel-col { grid-column: span 5; display: grid; gap: var(--s4); min-width: 0; align-content: start; }
.panel-col.col-4 { grid-column: span 4; } .panel-col.col-6 { grid-column: span 6; } .panel-col.col-8 { grid-column: span 8; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2) var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.panel-title { margin: 0; font: 600 var(--t20)/1.15 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; }
.panel-sub { color: var(--muted); font-size: var(--t14); margin: var(--s1) 0 0; }
.countdown { font: 700 var(--t32)/1.1 var(--f-mono); letter-spacing: 0.02em; background: linear-gradient(178deg, #fff 0%, #ececef 30%, #7a7a82 48%, #2a2a2e 54%, #d4d4d8 70%, #fff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vendor-list, .mini-list, .rotation, .fissure-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vendor-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); min-height: 44px;
  background: rgb(255 255 255 / 0.025); border-left: 1px solid var(--line-2);
}
.vendor-row:hover { background: rgb(255 255 255 / 0.05); border-left-color: #fff; }
.vendor-row > a { justify-self: start; }
.vendor-row .right { display: flex; gap: var(--s3); align-items: baseline; justify-content: flex-end; flex-wrap: wrap; text-align: right; }
.vendor-list.compact .vendor-row { min-height: 36px; padding: 6px var(--s3); }
.challenge { display: grid; gap: 2px; }
.challenge small { color: var(--faint); }
.mini-list li { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t14); padding: 6px var(--s3); background: rgb(255 255 255 / 0.025); border-left: 1px solid var(--line-2); }
.rotation li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s3); background: rgb(255 255 255 / 0.025); border-left: 1px solid var(--line-2); color: var(--muted); }
.rotation li.now { color: #fff; background: linear-gradient(90deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0.02)); border-left-color: #fff; }
.rotation li.now::after { content: 'This week'; font: 500 var(--t12)/1.4 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; text-shadow: 0 0 8px var(--glow); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t14); }
table.data th { text-align: left; font: 500 var(--t12)/1.2 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line-2); }
table.data th button { all: unset; cursor: pointer; }
table.data th button:hover { color: #fff; }
table.data td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
table.data td.r, table.data th.r { text-align: right; }
table.data tr:hover td { background: rgb(255 255 255 / 0.03); }
table.data tr.total-row td { border-top: 1px solid var(--line-2); font-weight: 500; }
table.descendia td { vertical-align: top; }
table.descendia .boss-row td { background: linear-gradient(90deg, rgb(255 255 255 / 0.1), transparent); }
.cycle { display: grid; gap: var(--s2); }
.cycle-state { display: flex; align-items: center; gap: var(--s3); font: 600 var(--t20)/1.1 var(--f-head); text-transform: uppercase; letter-spacing: 0.04em; }
.cycle-icon { width: 34px; height: 34px; flex: none; filter: grayscale(1) brightness(1.6) drop-shadow(0 0 6px rgb(255 255 255 / 0.5)); }
.bar { height: 3px; background: rgb(255 255 255 / 0.1); overflow: hidden; }
.bar > i { display: block; height: 100%; background: #fff; box-shadow: 0 0 8px #fff; transform-origin: left; }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag-list .tag { color: var(--text); text-transform: none; letter-spacing: 0; font: 500 var(--t14)/1 var(--f-body); padding: 9px 12px; }
details.more > summary, details.job > summary { cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker, details.job > summary::-webkit-details-marker { display: none; }
details.more > summary {
  display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); min-height: 40px; border: 1px solid var(--line-2); color: var(--text);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
details.more > summary:hover { border-color: #fff; }
details.more > summary::before, details.job > summary::after { content: '▸'; transition: transform 0.2s ease; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more[open] > summary { margin-bottom: var(--s3); }
.faction { display: inline-block; font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 7px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle; }
.f-grineer { color: #f6c86a; border-color: rgb(246 200 106 / 0.45); }
.f-corpus { color: #8fc4ff; border-color: rgb(143 196 255 / 0.45); }
.f-infested { color: #7cf5c4; border-color: rgb(124 245 196 / 0.4); }
.f-orokin { color: #e9d39a; border-color: rgb(233 211 154 / 0.45); }
.f-narmer, .f-murmur { color: #ff7a93; border-color: rgb(255 122 147 / 0.45); }
.f-scaldra { color: #ffa36b; border-color: rgb(255 163 107 / 0.45); }
.f-techrot { color: #b9f07a; border-color: rgb(185 240 122 / 0.45); }
.rewards { display: flex; flex-wrap: wrap; gap: 6px; }
.rewards.end { justify-content: flex-end; }
.reward { display: inline-flex; align-items: baseline; gap: 6px; font-size: var(--t12); padding: 4px var(--s2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; background: rgb(255 255 255 / 0.03); }
a.reward:hover { border-color: #fff; box-shadow: 0 0 10px rgb(255 255 255 / 0.18); }
.fissure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); }
.tier-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.tier-head a { color: var(--muted); font-size: var(--t12); }
.tier-head a:hover { color: #fff; }
.fissure-list li { padding: var(--s2) var(--s3); background: rgb(255 255 255 / 0.025); border-left: 1px solid var(--line-2); display: grid; gap: 2px; }
.fissure-list li:hover { border-left-color: #fff; }
.row-sub { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--t12); color: var(--faint); }
.invasion-grid, .alert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s3); }
.invasion, .alert, .event { padding: var(--s4); border: 1px solid var(--line-2); background: rgb(255 255 255 / 0.02); display: grid; gap: var(--s2); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.event + .event { margin-top: var(--s3); }
.inv-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.inv-sides { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.inv-sides .rewards { margin-top: 6px; }
.inv-sides .r { text-align: right; }
.tug { height: 4px; background: rgb(255 255 255 / 0.25); overflow: hidden; }
.tug > i { display: block; height: 100%; background: #fff; box-shadow: 0 0 8px #fff; transform-origin: left; }
.job-list { display: grid; gap: var(--s2); }
details.job { border: 1px solid var(--line-2); background: rgb(255 255 255 / 0.02); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
details.job[open] { border-color: rgb(255 255 255 / 0.5); }
details.job > summary { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 16px; align-items: center; gap: var(--s3); padding: var(--s3); min-height: 56px; }
details.job[open] > summary::after { transform: rotate(90deg); }
details.job .table-wrap { padding: 0 var(--s3) var(--s3); }
.job-name { display: grid; gap: 2px; }
.syndicate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); }
.syndicate { display: grid; gap: var(--s2); }
.syndicate > b { font: 600 var(--t16)/1.2 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; }
.pool + .pool { margin-top: var(--s3); }
.deal-name { font-size: var(--t20); font-weight: 500; margin: 0 0 var(--s2); }
.deal-price { margin: 0 0 var(--s3); }
.big-line { font: 600 var(--t20)/1.2 var(--f-head); text-transform: uppercase; letter-spacing: 0.04em; margin: 0; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.cal-legend { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--t12); color: var(--muted); margin-bottom: var(--s3); }
.cal-dot { width: 9px; height: 9px; display: inline-block; transform: rotate(45deg); margin-left: var(--s2); }
.cal-dot:first-child { margin-left: 0; }
.calendar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); }
.cal-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3); border: 1px solid var(--line-2); background: rgb(255 255 255 / 0.02); }
.cal-date { display: grid; justify-items: center; padding: var(--s2) 0; border: 1px solid var(--line-2); }
.cal-date b { font-size: 22px; line-height: 1; }
.cal-date span { font: 500 11px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.cal-events { display: grid; gap: var(--s2); align-content: start; }
.cal-event { display: grid; gap: 2px; padding-left: var(--s2); border-left: 2px solid var(--line-2); }
.cal-event.cal-todo { border-color: var(--live); } .cal-dot.cal-todo { background: var(--live); }
.cal-event.cal-override { border-color: #d9ccff; } .cal-dot.cal-override { background: #d9ccff; }
.cal-event.cal-prize { border-color: var(--ducat); } .cal-dot.cal-prize { background: var(--ducat); }

/* ---------- Phone tab bar ---------- */
.tabbar { display: none; }

/* ---------- Responsive ---------- */

/* ---------- Watchlist ---------- */
.btn-sm { min-height: 36px; padding: 0 var(--s3); font-size: var(--t14); }

/* Item cards sit in a cell so the star can be a real button beside the link. */
.card-cell { position: relative; min-width: 0; display: grid; }
.card-cell > .card { height: 100%; }
.star-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  background: rgb(9 9 11 / 0.72); border: 1px solid var(--line-2); color: var(--faint); cursor: pointer; opacity: 0;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: opacity 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.star-btn svg, .watch-toggle svg, .nav-star svg, .h-star svg, .inline-star, .empty-star { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.star-btn svg { width: 18px; height: 18px; }
.card-cell:hover .star-btn, .star-btn:focus-visible, .star-btn[aria-pressed='true'] { opacity: 1; }
.star-btn:hover { color: var(--text); border-color: #fff; transform: scale(1.08); }
.star-btn[aria-pressed='true'] { color: var(--ducat); border-color: rgb(233 211 154 / 0.55); }
.star-btn[aria-pressed='true'] svg, .watch-toggle.on svg { fill: currentColor; filter: drop-shadow(0 0 6px rgb(233 211 154 / 0.6)); }

/* ---------- Arsenal ---------- */
.ars-head .head-tools .btn svg { width: 16px; height: 16px; }
.ars-notice { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid rgb(233 211 154 / 0.5); color: var(--ducat); background: rgb(233 211 154 / 0.06); font-size: var(--t14); overflow-wrap: anywhere; }
.ars-pickbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.ars-search { width: min(360px, 100%); height: 40px; }
.ars-weapons { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3); }
.ars-wcard { padding: 1px; border: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.ars-wcard > .core { display: grid; gap: 4px; padding: var(--s3); min-height: 100%; }
.ars-wcard:hover, .ars-wcard:focus-visible { background: linear-gradient(155deg, #fff, rgb(255 255 255 / 0.2) 30%, rgb(255 255 255 / 0.1) 70%, #fff); }
.ars-wimg { height: 72px; display: grid; place-items: center; }
.ars-wimg img { max-height: 70px; max-width: 100%; object-fit: contain; }
.ars-wname { font: 600 var(--t14)/1.2 var(--f-head); letter-spacing: 0.05em; text-transform: uppercase; }

/* The upgrade screen: stats | slots | arcane */
.ars-screen { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(190px, 230px); gap: var(--s5); align-items: start; margin-bottom: var(--s5); }
.ars-stats > .core { padding: var(--s4); display: grid; gap: var(--s3); }
.ars-cap { display: grid; grid-template-columns: 1fr auto; gap: 6px var(--s3); align-items: baseline; }
.ars-cap b { font: 700 var(--t20)/1 var(--f-mono); }
.ars-capbar { grid-column: 1 / -1; height: 3px; background: rgb(255 255 255 / 0.12); }
.ars-capbar i { display: block; height: 100%; background: linear-gradient(90deg, #fff, var(--ducat)); box-shadow: 0 0 8px rgb(233 211 154 / 0.6); }
.ars-cap.over b { color: var(--fall); }
.ars-cap.over .ars-capbar i { background: var(--fall); }
.ars-attack { display: grid; gap: 4px; }
.ars-attack .select { height: 36px; }
.ars-table { width: 100%; border-collapse: collapse; font-size: var(--t14); }
.ars-table th, .ars-table td { padding: 5px 0; border-bottom: 1px solid var(--line); text-align: right; font-weight: 400; }
.ars-table thead th { font: 500 11px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.ars-table th[scope='row'], .ars-table thead th:first-child { text-align: left; color: var(--muted); }
.ars-table td { padding-left: var(--s3); white-space: nowrap; }
.ars-table td.up { color: var(--faint); }
.ars-table td.down { color: var(--faint); }
.ars-table tbody td:nth-child(2) { color: var(--text); font-weight: 600; }
.ars-table tr.dtype th { padding-left: var(--s2); }
.dt-ico { display: inline-block; width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 6px; }
.ars-table tr.dtype th, .ars-bar-l, .ars-stackrow .label { white-space: nowrap; }
.dt { display: inline-block; width: 8px; height: 8px; margin-right: 8px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 6px var(--c); vertical-align: 1px; }

.ars-slots { display: grid; gap: var(--s3); min-width: 0; }
.ars-toprow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.ars-toprow > :first-child { grid-column: 2; }
.ars-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
/* Mod slots hold a collapsed mod card, like the game's grid. */
.slot { position: relative; cursor: pointer; outline: none; border-radius: 4px; }
.slot-ghost { visibility: hidden; }
.slot.empty { border: 0; padding: 0; margin: 0; text-align: left; color: inherit; }
.slot:focus-visible .mod, .slot.is-sel .mod { filter: drop-shadow(0 0 10px rgb(255 255 255 / 0.45)); }
.slot.is-over .mod { filter: drop-shadow(0 0 12px rgb(233 211 154 / 0.8)); }
.slot.empty:hover .mod { --dim: 0.75; }
.slot-pol { position: absolute; top: -2px; left: -2px; width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgb(9 9 11 / 0.85); color: var(--muted); cursor: pointer; z-index: 3; opacity: 0; transition: opacity 0.2s ease; }
.slot:hover .slot-pol, .slot:focus-within .slot-pol, .slot.is-sel .slot-pol, .slot.empty .slot-pol { opacity: 1; }
.slot.empty .slot-pol { left: auto; right: 3%; top: 3%; border-color: transparent; background: transparent; color: rgb(255 255 255 / 0.5); }
.slot-pol:hover { color: var(--text); border-color: #fff; }
.pol { display: inline-grid; width: 18px; height: 18px; }
.pol svg { width: 100%; height: 100%; }
.pol-none { font: 600 16px/18px var(--f-mono); text-align: center; color: var(--faint); }
.slot-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: rgb(9 9 11 / 0.9); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; z-index: 3; opacity: 0; transition: opacity 0.2s ease; }
.slot:hover .slot-x, .slot:focus-within .slot-x, .slot.is-sel .slot-x { opacity: 1; }
.slot-x:hover { color: var(--fall); border-color: var(--fall); }

/* ---------- Arcanes ---------- */
.arc-emblem { --rim: url(#modrim-rare); position: relative; display: block; width: 100%; aspect-ratio: 240 / 150; }
.arc-emblem.rar-common { --rim: url(#modrim-common); }
.arc-emblem.rar-uncommon { --rim: url(#modrim-uncommon); }
.arc-emblem.rar-legendary { --rim: url(#modrim-legendary); }
.arc-emblem.rar-empty { --rim: url(#modrim-empty); opacity: 0.6; }
.arc-dome { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arc-dome .ad-band, .arc-dome .ad-base, .arc-dome .ad-flange, .arc-dome .ad-studs rect { fill: var(--rim); }
.arc-dome .ad-inner { fill: #0b0d12; }
.arc-emblem.rar-legendary .arc-dome { filter: drop-shadow(0 0 5px rgb(200 225 255 / 0.5)); }
.arc-emblem.rar-rare .arc-dome { filter: drop-shadow(0 0 4px rgb(246 214 140 / 0.35)); }
.arc-glyph { position: absolute; left: 30%; top: 10%; width: 40%; aspect-ratio: 1; background: #4ff0ff;
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; filter: drop-shadow(0 0 6px rgb(79 240 255 / 0.8)); }
.arc-icon { position: absolute; inset: -6% -2% -14%; width: 104%; height: 120%; object-fit: contain; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.55)); }
.arc-emblem.has-icon .arc-fallback { display: none; }
.arc-emblem.has-icon { aspect-ratio: 464 / 338; }
.arc-emblem.has-icon .arc-icon { inset: 0; width: 100%; height: 100%; }
.arc-emblem.xs { width: 34px; }
.arc-emblem.lg { width: min(260px, 80%); margin: 0 auto; }
.arc-name { display: block; text-align: center; font: 600 var(--t14)/1.2 var(--f-body); color: #8fb4ff; text-shadow: 0 0 8px rgb(110 150 255 / 0.4); text-wrap: balance; }
.arc-name.ghost { font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); text-shadow: none; }
.arc-pips { display: flex; justify-content: center; gap: 5px; }
.arc-pips i, .arc-pips button { width: 9px; height: 9px; padding: 0; border: 1px solid rgb(143 180 255 / 0.7); background: transparent; transform: rotate(45deg); }
.arc-pips button { cursor: pointer; }
.arc-pips i.on, .arc-pips button.on { background: #8fb4ff; box-shadow: 0 0 6px rgb(143 180 255 / 0.8); }
.arc-pips button:hover { outline: 1px solid #fff; }

/* The slot on the build screen */
.arc-slot { position: relative; display: grid; gap: var(--s2); justify-items: center; padding: var(--s3); border: 0; background: transparent; color: inherit; font: inherit; text-align: center; }
.arc-slot.empty { cursor: pointer; }
.arc-slot.empty .arc-emblem { width: 78%; }
.arc-slot.empty:hover .arc-emblem { opacity: 0.9; }
.arc-open { display: grid; gap: var(--s2); justify-items: center; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.arc-open .arc-emblem { width: 78%; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.arc-open:hover .arc-emblem { transform: translateY(-3px); }
.arc-fx { font-size: var(--t12); color: var(--muted); line-height: 1.4; }
.arc-x { top: 4px; right: 4px; opacity: 0; }
.arc-slot:hover .arc-x, .arc-slot:focus-within .arc-x { opacity: 1; }

/* ---------- Arsenal: Warframes ---------- */
.ars-arcane.two { gap: var(--s3); }
.ars-table tr.sum th, .ars-table tr.sum td { color: var(--text); font-weight: 600; }
.ars-table tr.gap td { padding: 4px 0; border: 0; }
.ars-frame-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: var(--s5); align-items: start; }
.ars-frame-info > :only-child { grid-column: 1 / -1; }
.ars-abilities > .core { padding: var(--s5); display: grid; gap: var(--s4); }
.ars-ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.ars-ab { display: grid; gap: var(--s2); align-content: start; padding: var(--s4); border: 1px solid var(--line); background: rgb(255 255 255 / 0.02);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.ars-ab p { margin: 0; color: var(--muted); font-size: var(--t14); line-height: 1.5; }
.ars-ab-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; }
.ars-ab-head > div { display: grid; gap: 2px; min-width: 0; }
.ars-ab-head .label { margin: 0; }
.ars-ab-head b { font: 600 var(--t16)/1.2 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; }
.ars-ab-ico { width: 48px; height: 48px; object-fit: contain; display: block; filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.3)); }
.ars-ab-cost { display: grid; justify-items: end; gap: 2px; }
.ars-ab-cost .num { font: 700 var(--t20)/1 var(--f-mono); color: #8fd8ff; }
.ars-passive { padding-top: var(--s3); border-top: 1px solid var(--line); }
.ars-passive p { margin: var(--s1) 0 0; color: var(--muted); }

/* ---------- Archon Shards and Helminth ---------- */
.shard-crimson { --sh: #ff5a6e; } .shard-amber { --sh: #ffc24a; } .shard-azure { --sh: #5ab8ff; }
.shard-emerald { --sh: #4fe39a; } .shard-topaz { --sh: #ff9a3c; } .shard-violet { --sh: #b98cff; }
.ars-shards { display: grid; gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.ars-shards .label { margin: 0; }
.shard-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.shard-slot { aspect-ratio: 1; width: 100%; padding: 3px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / 0.05), transparent 70%); color: var(--faint); cursor: pointer; transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.shard-slot.empty { font: 600 18px/1 var(--f-mono); }
.shard-slot:hover { border-color: #fff; }
.shard-slot.filled { border-color: color-mix(in srgb, var(--sh) 70%, transparent); background: radial-gradient(circle, color-mix(in srgb, var(--sh) 22%, transparent), transparent 72%); box-shadow: 0 0 10px color-mix(in srgb, var(--sh) 35%, transparent); }
.shard-slot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 6px var(--sh)); }
.shard-slot.tau img { filter: drop-shadow(0 0 10px var(--sh)) brightness(1.15); }
.shard-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--t12); color: var(--muted); }
.shard-list li b { color: var(--sh); }
.shard-dialog { width: min(640px, 100%); }
.shard-colors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); }
.shard-color { display: grid; justify-items: center; gap: 4px; padding: var(--s2); border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 var(--t12)/1 var(--f-body); cursor: pointer; }
.shard-color img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 0 6px var(--sh)); }
.shard-color[aria-pressed='true'] { border-color: var(--sh); color: var(--text); background: color-mix(in srgb, var(--sh) 12%, transparent); }
.shard-opts { display: grid; gap: var(--s2); }
.shard-opt { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px var(--s3); align-items: center; padding: var(--s3); text-align: left; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.shard-opt b { font: 700 var(--t16)/1 var(--f-mono); color: var(--sh); grid-row: span 2; }
.shard-opt:hover:not(:disabled), .shard-opt.is-pick { border-color: var(--sh); }
.shard-opt:disabled { opacity: 0.4; cursor: not-allowed; }
.ars-ab.is-helm { border-color: rgb(196 120 255 / 0.55); background: linear-gradient(160deg, rgb(196 120 255 / 0.08), transparent 60%); }
.helm-tag { color: #d6a8ff !important; font: 500 var(--t12)/1.3 var(--f-mono) !important; letter-spacing: 0.08em; text-transform: uppercase; }
.ars-ab-actions { margin-top: auto; }
.helm-dialog { width: min(980px, 100%); }
.helm-dialog .search { height: 40px; }
.helm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s2); }
.helm-ab { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); text-align: left; border: 1px solid var(--line); background: var(--panel-2); color: inherit; font: inherit; cursor: pointer; }
.helm-ab:hover:not(:disabled) { border-color: #d6a8ff; }
.helm-ab:disabled { opacity: 0.45; cursor: not-allowed; }
.helm-ab img, .helm-noimg { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 0 5px rgb(255 255 255 / 0.3)); }
.helm-t { display: grid; gap: 2px; min-width: 0; }
.helm-t b { font: 600 var(--t14)/1.2 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; }
.helm-t .mc-block { position: static; text-align: left; text-shadow: none; }

/* Images that failed to load (see app.js) */
img.img-missing { background: radial-gradient(circle at 50% 45%, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.02) 60%, transparent 72%); border-radius: 6px; min-width: 24px; min-height: 24px; }
.mod-body img.img-missing { background: linear-gradient(160deg, rgb(255 255 255 / 0.06), transparent 60%); border-radius: 0; }

/* Damage test: Warframe link */
.ars-link { display: grid; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.ars-link p { margin: 0; }
.ars-link .helm-tag { font-size: 10px !important; }


.ars-auras { display: grid; gap: var(--s2); }
.ars-auras .label { margin: 0; }
.aura-line { gap: 2px var(--s2); }
.aura-line.off { opacity: 0.5; }
.ars-squad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.ars-squad .select { width: 100%; height: 36px; padding: 0 var(--s2); font-size: var(--t12); }
.ars-squad .label { font-size: 10px; letter-spacing: 0.1em; }
@media (max-width: 520px) { .ars-squad { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 600px) { .shard-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (max-width: 1100px) { .ars-frame-info { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .ars-ab-grid { grid-template-columns: minmax(0, 1fr); } }

@media (hover: none) { .arc-x { opacity: 1; } }

/* The arcane window */
.arc-window { width: min(1180px, 100%); max-height: calc(100vh - 2 * var(--s4)); display: flex; }
.arc-window > .core { width: 100%; min-height: 0; max-height: calc(100vh - 2 * var(--s4)); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0; overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 75% 20%, rgb(79 240 255 / 0.05), transparent 70%), linear-gradient(180deg, #0e0f14, #08080b); }
.arc-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.arc-title { margin: 0; font: 500 var(--t20)/1 var(--f-mono); letter-spacing: 0.3em; text-transform: uppercase; color: #bfe9ff; }
.arc-title span { margin: 0 0.4em; color: var(--faint); }
.arc-search { width: min(260px, 100%); height: 38px; margin-left: auto; }
.arc-head { position: relative; padding-right: calc(var(--s5) + 48px) !important; }
.arc-head .icon-btn { position: absolute; top: 50%; right: var(--s4); transform: translateY(-50%); }
.arc-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); min-height: 0; overflow: hidden; }
.arc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s3); align-content: start; padding: var(--s5); overflow-y: auto; scrollbar-width: thin; }
.arc-tile { position: relative; display: grid; gap: 6px; justify-items: center; padding: var(--s3) var(--s2); border: 1px solid transparent; background: transparent; color: inherit; font: inherit; cursor: pointer; transition: background 0.25s ease, border-color 0.25s ease; }
.arc-tile:hover { background: rgb(143 180 255 / 0.06); }
.arc-tile.is-pick { border-color: rgb(143 180 255 / 0.6); background: rgb(143 180 255 / 0.08); }
.arc-tile .arc-emblem { width: 86%; }
.arc-tile .arc-name { font-size: var(--t12); }
.arc-tile .arc-pips i { width: 7px; height: 7px; }
.arc-equipped { position: absolute; top: 34%; left: 50%; transform: translateX(-50%); z-index: 2; padding: 3px 8px; font: 600 10px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; background: rgb(9 9 11 / 0.85); border: 1px solid var(--line-2); }
.arc-detail { display: grid; gap: var(--s3); align-content: start; padding: var(--s5); border-left: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.arc-detail-n { margin: 0; text-align: center; font: 600 var(--t20)/1.2 var(--f-head); letter-spacing: 0.05em; text-transform: uppercase; }
.arc-detail-t { margin: 0; text-align: center; }
.arc-ranks { display: grid; gap: 4px; }
.arc-rank { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); text-align: left; border: 1px solid transparent; background: transparent; color: #a9c4ff; font: 400 var(--t14)/1.4 var(--f-body); cursor: pointer; }
.arc-rank:hover { background: rgb(143 180 255 / 0.05); }
.arc-rank.is-pick { border-color: rgb(143 180 255 / 0.55); background: rgb(143 180 255 / 0.08); }
.arc-rank-t { color: #ff9bd8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 4px; }
.arc-rank-ico { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgb(255 255 255 / 0.3); transform: rotate(45deg); }
.arc-rank-ico > * { transform: rotate(-45deg); }
.arc-rank-ico b { position: absolute; font: 700 11px/1 var(--f-mono); color: #fff; bottom: 2px; right: 3px; }
.arc-rank-ico .arc-emblem.xs { width: 30px; }
.arc-actions { display: flex; flex-wrap: wrap; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.arc-actions .btn { flex: 1; justify-content: center; }
@media (max-width: 860px) {
  .arc-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .arc-grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .arc-detail { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .arc-search { margin-left: 0; order: 3; width: 100%; }
  .arc-head .icon-btn { top: var(--s4); transform: none; }
}

@media (hover: none) { .slot-x, .slot.filled .slot-pol { opacity: 1; } }

/* The mod card. Sizes follow the card's own width (container units). */
.mod { --rim: url(#modrim-uncommon); --ink-name: #eef0f4; --dim: 1; position: relative; display: block; width: 100%; aspect-ratio: 460 / 214; container-type: inline-size; user-select: none; }
.mod.rar-common { --rim: url(#modrim-common); --ink-name: #f3d9bd; }
.mod.rar-uncommon { --rim: url(#modrim-uncommon); --ink-name: #f1f3f7; }
.mod.rar-rare { --rim: url(#modrim-rare); --ink-name: #f6e7bf; }
.mod.rar-legendary { --rim: url(#modrim-legendary); --ink-name: #ffffff; }
.mod.rar-amalgam, .mod.rar-peculiar { --rim: url(#modrim-amalgam); --ink-name: #ece4ff; }
.mod.rar-empty { --rim: url(#modrim-empty); }
.mod-body { position: absolute; left: 4.6%; right: 4.6%; top: 12%; bottom: 20%; overflow: hidden; border-radius: 3% / 7%; background: #0b0c10; }
.mod-body img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; opacity: 0.72; filter: saturate(0.85); }
.mod-body::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(8 8 12 / 0.15), rgb(8 8 12 / 0.55) 70%, rgb(8 8 12 / 0.75)); }
.rar-rare .mod-body::after { background: linear-gradient(180deg, rgb(40 30 8 / 0.2), rgb(20 14 4 / 0.6) 70%, rgb(14 10 2 / 0.8)); }
.rar-legendary .mod-body::after { background: linear-gradient(180deg, rgb(30 44 56 / 0.15), rgb(12 20 28 / 0.55) 70%, rgb(8 12 18 / 0.78)); }
.rar-common .mod-body::after { background: linear-gradient(180deg, rgb(40 22 10 / 0.2), rgb(22 12 6 / 0.6) 70%, rgb(16 8 4 / 0.8)); }
.rar-empty .mod-body { background: linear-gradient(180deg, rgb(255 255 255 / 0.03), rgb(255 255 255 / 0.01)); }
.rar-empty .mod-body::after { display: none; }
.mod-frame { position: absolute; left: 0; top: 0; width: 100%; height: 88.8%; overflow: visible; }
.mod-frame .mf-rim, .mod-frame .mf-lip { fill: var(--rim); }
.mod-frame .mf-dots circle { fill: var(--rim); }
.mod-frame .mf-hook { fill: none; stroke: var(--rim); stroke-width: 4; stroke-linecap: round; }
.rar-legendary .mod-frame { filter: drop-shadow(0 0 4px rgb(200 225 255 / 0.55)); }
.rar-rare .mod-frame { filter: drop-shadow(0 0 3px rgb(246 214 140 / 0.35)); }
.rar-empty .mod-frame { opacity: calc(0.55 * var(--dim)); }
.mod-tab { position: absolute; top: 4%; right: 2.4%; height: 15.5%; min-width: 22%; padding: 0 4.5% 0 6%; display: flex; align-items: center; justify-content: flex-end; gap: 2.2%; z-index: 2;
  color: #f4f4f6; background: linear-gradient(180deg, #16161b, #08080b); border: 1px solid rgb(255 255 255 / 0.45);
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 16% 100%, 0 50%); font: 700 6.4cqw/1 var(--f-head); letter-spacing: 0.02em; }
.mod-tab .pol { width: 6.4cqw; height: 6.4cqw; }
.mod-tab .pol svg { stroke-width: 2; }
.mod-tab.match { color: #8ff0c0; border-color: rgb(124 245 196 / 0.7); }
.mod-tab.mismatch { color: #ff98aa; border-color: rgb(255 122 147 / 0.7); }
.mod-tab.ghost { min-width: 0; padding: 0 3% 0 5%; background: transparent; border-color: transparent; color: rgb(255 255 255 / 0.4); }
.mod-name { position: absolute; left: 8%; right: 8%; top: 22%; bottom: 31%; display: grid; place-items: center; text-align: center; z-index: 1;
  font: 500 7.6cqw/1.08 var(--f-body); letter-spacing: 0.005em; color: var(--ink-name); text-shadow: 0 1px 2px rgb(0 0 0 / 0.9), 0 0 10px rgb(0 0 0 / 0.6); text-wrap: balance; overflow-wrap: anywhere; }
.mod-name.ghost { font: 500 4.2cqw/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: rgb(255 255 255 / 0.32); text-shadow: none; }
.mod-pips { position: absolute; left: 22%; right: 22%; bottom: 0; height: 9.5%; display: flex; align-items: center; justify-content: center; gap: 1.1cqw; padding: 0 2%;
  background: linear-gradient(180deg, #0f1b2a, #070c14); border: 1px solid rgb(120 170 220 / 0.25); border-radius: 2px; }
.rar-empty .mod-pips { background: transparent; border-color: transparent; }
.mod-pips i, .mod-pips button { flex: 0 1 auto; width: 2.4cqw; height: 2.4cqw; padding: 0; border: 0; transform: rotate(45deg); background: rgb(110 150 190 / 0.28); }
.mod-pips button { cursor: pointer; }
.mod-pips i.on, .mod-pips button.on { background: #6fd2ff; box-shadow: 0 0 1.4cqw #2fb4ff; }
.mod-pips button:hover { outline: 1px solid #fff; }


/* Picker cards */
.ars-slotbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.ars-slotbar .btn { margin-left: auto; }

.ars-arcane { display: grid; gap: var(--s2); align-content: start; }
/* Mod picker: two rows that scroll sideways, like the game */
.ars-picker { margin-bottom: var(--s5); }
.ars-picker > .core { padding: var(--s4); }
.ars-mods { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 210px; gap: var(--s4) var(--s3); padding-top: 4px; overflow-x: auto; padding-bottom: var(--s2); scrollbar-width: thin; }
.mcard { position: relative; display: block; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: grab; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease; }
.mcard:hover, .mcard:focus-visible { transform: translateY(-3px); filter: drop-shadow(0 0 10px rgb(255 255 255 / 0.25)); outline: none; }
.mcard.blocked { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.6); }
.mc-tag { position: absolute; top: 2px; left: 6%; z-index: 2; font: 600 9px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--live); text-shadow: 0 1px 2px #000; }
.mc-block { position: absolute; left: 0; right: 0; bottom: 14%; z-index: 2; text-align: center; font: 600 10px/1.2 var(--f-mono); color: var(--fall); text-shadow: 0 1px 2px #000; }
.mc-name { font: 600 var(--t14)/1.15 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); overflow-wrap: anywhere; }
.mc-fx { font-size: var(--t12); color: var(--muted); line-height: 1.35; }
.ars-info { min-height: 44px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); padding: var(--s2) var(--s3); border-left: 2px solid var(--line-2); font-size: var(--t14); color: var(--muted); }
.ars-info b { font: 600 var(--t14)/1.2 var(--f-head); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); }

/* Damage test */
.ars-test { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.ars-target > .core, .ars-results > .core { padding: var(--s5); display: grid; gap: var(--s4); }
.ars-form { display: grid; gap: var(--s3); }
.ars-field { display: grid; gap: 4px; }
.ars-field .label { margin: 0; display: flex; justify-content: space-between; gap: var(--s2); }
.ars-enemy .select { width: 100%; }
.ars-num { width: 100%; height: 36px; padding: 0 var(--s3); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font: 600 var(--t14)/1 var(--f-mono); }
.ars-num:focus { outline: none; border-color: #fff; }
.ars-num:disabled { color: var(--faint); }
.ars-range input { width: 100%; accent-color: #fafafa; }
.ars-conds, .ars-stacks { display: grid; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.cond { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.cond .check { align-items: flex-start; }
.cond-stacks { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cond-stacks .ars-num { width: 64px; }
.ars-stackrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.ars-stackrow .label { justify-content: flex-start; font-size: 10px; letter-spacing: 0.08em; }
.ars-enemyline { margin: 0; }
.ars-bigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.ars-big { display: grid; gap: 2px; min-width: 0; }
.ars-big .label { margin: 0; }
.ars-big b { font: 700 clamp(22px, 2.4vw, 30px)/1.1 var(--f-mono); overflow-wrap: anywhere; }
.ars-enemystats { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); padding: var(--s3) 0; border-block: 1px solid var(--line); }
.ars-enemystats > span { display: grid; gap: 2px; }
.ars-enemystats .label { margin: 0; }
.ars-enemystats b { font: 700 var(--t16)/1 var(--f-mono); }
.ars-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.ars-bars { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: 6px; }
.ars-bars li { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; font-size: var(--t12); }
.ars-bar-l { color: var(--muted); white-space: nowrap; }
.ars-bar { height: 6px; background: rgb(255 255 255 / 0.06); }
.ars-bar i { display: block; height: 100%; background: var(--c); box-shadow: 0 0 6px var(--c); transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.ars-bars .num { white-space: nowrap; }

.ars-dialog { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: var(--s4); background: rgb(0 0 0 / 0.7); }
.ars-dialog-box { width: min(760px, 100%); max-height: calc(100vh - 2 * var(--s4)); display: flex; }
.ars-dialog-box > .core { position: relative; min-height: 0; max-height: calc(100vh - 2 * var(--s4)); width: 100%; padding: var(--s5); overflow-y: auto; display: grid; gap: var(--s4); align-content: start; }
.ars-dialog-box .icon-btn { position: static; }
.ars-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.ars-saved li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px) 36px; gap: var(--s2); align-items: center; }
.ars-load { display: grid; gap: 2px; text-align: left; padding: var(--s2) var(--s3); border: 1px solid var(--line-2); background: var(--panel-2); color: inherit; font: inherit; cursor: pointer; }
.ars-load:hover { border-color: #fff; }
.ars-rename { height: 36px; padding: 0 var(--s3); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font: 500 var(--t14)/1 var(--f-body); min-width: 0; width: 100%; }
.ars-codebox { display: grid; gap: var(--s2); }
.ars-codebox .w-code-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }

@media (hover: none) { .star-btn { opacity: 1; } }
.nav-star { display: grid; place-items: center; }
.nav-star svg { width: 18px; height: 18px; }
.inline-star { width: 1em; height: 1em; vertical-align: -0.12em; color: var(--ducat); }

/* Top bar bell */
.topbar-right { grid-area: meta; justify-self: end; display: flex; align-items: center; gap: var(--s4); min-width: 0; max-width: 100%; }
.topbar-right .bell { order: 2; }
.topbar-right .topbar-meta { flex: 0 1 auto; }
#topbar-meta { min-width: 0; white-space: nowrap; }
.topbar-inner .topbar-meta { min-width: 0; overflow: hidden; }
.bell { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-2); background: var(--panel-2);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: color 0.3s ease, border-color 0.3s ease; }
.bell:hover { color: var(--text); border-color: #fff; }
.bell-icon { display: grid; transform-origin: 50% 10%; }
.bell-icon svg { width: 20px; height: 20px; }
.bell.has-alerts { color: var(--ducat); border-color: rgb(233 211 154 / 0.55); }
.bell.has-alerts .bell-icon svg { filter: drop-shadow(0 0 6px rgb(233 211 154 / 0.7)); }
.bell-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center;
  font: 700 10px/1 var(--f-mono); color: var(--ink); background: var(--ducat); box-shadow: 0 0 8px rgb(233 211 154 / 0.8); }

/* Alert cards */
.toasts { position: fixed; right: var(--s5); bottom: var(--s5); z-index: 70; display: flex; flex-direction: column; gap: var(--s3); width: min(380px, calc(100vw - 2 * var(--s4))); pointer-events: none; }
.toast { pointer-events: auto; background: linear-gradient(155deg, #fff, rgb(255 255 255 / 0.25) 30%, rgb(255 255 255 / 0.1) 70%, rgb(233 211 154 / 0.8)); filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.6)) drop-shadow(0 0 16px rgb(255 255 255 / 0.12)); }
.toast > .core { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s4); padding: var(--s4); background: linear-gradient(180deg, #121216, #0a0a0d); }
.toast-art { width: 72px; height: 72px; display: grid; place-items: center; background: radial-gradient(closest-side, rgb(255 255 255 / 0.12), transparent); }
.toast-art img { max-width: 72px; max-height: 72px; object-fit: contain; }
.toast-body { min-width: 0; padding-right: var(--s5); }
.toast-kicker { display: flex; align-items: center; gap: var(--s2); color: var(--ducat); margin-bottom: var(--s1); }
.toast-dot { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); box-shadow: 0 0 8px currentColor; }
.toast-name { margin: 0 0 var(--s2); font: 600 var(--t16)/1.2 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; overflow-wrap: anywhere; }
.toast-prices { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.toast-was .plat-sm { color: var(--faint); text-decoration: line-through; text-decoration-color: rgb(255 122 147 / 0.7); }
.toast-arrow { color: var(--faint); }
.toast-now .plat { font-size: var(--t24); text-shadow: 0 0 12px rgb(255 255 255 / 0.35); }
.toast-sub { margin: var(--s1) 0 0; color: var(--muted); font-size: var(--t12); }
.toast-actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
.toast .core > .toast-close { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; }
.toast-close:hover { color: var(--text); }
.toast .core > .toast-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--ducat), #fff); transform-origin: left; }
.toast-note > .core { grid-template-columns: 48px minmax(0, 1fr); align-items: center; padding: var(--s3) var(--s4); }
.toast-note .toast-art, .toast-note .toast-art img { width: 48px; height: 48px; max-width: 48px; max-height: 48px; }
.toast-note .toast-name { font-size: var(--t14); margin: 0; }
.toast-note .toast-actions { margin-top: var(--s2); }

/* Drawer watch controls */
.watch-box { margin: 0 0 var(--s5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.watch-toggle svg { width: 18px; height: 18px; }
.watch-toggle.on { color: var(--ducat); border-color: rgb(233 211 154 / 0.55); }
.watch-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); width: 100%; }
.watch-line { margin: 0; width: 100%; }
.w-target { display: grid; gap: 4px; }
.w-target .label { margin: 0; }
.input-plat { justify-self: start; width: max-content; display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line-2); background: var(--panel-2); padding: 0 var(--s3); gap: 4px; }
.input-plat:focus-within { border-color: #fff; box-shadow: 0 0 12px rgb(255 255 255 / 0.15); }
.input-plat input { width: 72px; background: transparent; border: 0; outline: none; color: var(--text); font: 700 var(--t14)/1 var(--f-mono); }
.input-plat input::placeholder { color: var(--faint); font-weight: 400; }
.input-plat > span { color: var(--faint); font: 500 var(--t12)/1 var(--f-mono); }

/* Watchlist page */
.w-settings { margin-bottom: var(--s5); }
.w-settings > .core { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) var(--s5); padding: var(--s5); }
.w-set { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); align-content: start; }
.w-set .label { width: 100%; margin: 0; }
.w-codes { grid-column: 1 / -1; display: grid; gap: var(--s2); }
.w-codes .label { margin: 0; }
.w-code { width: 100%; resize: vertical; padding: var(--s3); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font: 500 var(--t12)/1.5 var(--f-mono); word-break: break-all; }
.w-code:focus { outline: none; border-color: #fff; }
.w-code-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.w-note { grid-column: 1 / -1; margin: 0; }
.w-count { margin-bottom: var(--s3); }
.w-list { display: grid; gap: var(--s3); }
.w-row > .core { display: grid; grid-template-columns: 64px minmax(0, 1.6fr) minmax(90px, 0.7fr) auto minmax(120px, 0.8fr) 36px; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); }
.w-row.is-hit { background: linear-gradient(155deg, rgb(124 245 196 / 0.9), rgb(255 255 255 / 0.1) 35%, rgb(255 255 255 / 0.06) 70%, rgb(124 245 196 / 0.6)); }
.w-art { width: 64px; height: 56px; display: grid; place-items: center; background: radial-gradient(closest-side, rgb(255 255 255 / 0.08), transparent); }
.w-art img { max-width: 60px; max-height: 52px; object-fit: contain; }
.w-name { display: grid; gap: 2px; min-width: 0; }
.w-name a { font: 600 var(--t14)/1.25 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; overflow-wrap: anywhere; }
.w-name a:hover { text-shadow: 0 0 10px var(--glow); }
.w-price { display: grid; gap: 4px; }
.w-price .label { margin: 0; }
.w-status { font: 500 var(--t12)/1.3 var(--f-mono); color: var(--faint); }
.w-status.hit { color: var(--rise); text-shadow: 0 0 10px rgb(124 245 196 / 0.5); text-transform: uppercase; letter-spacing: 0.14em; }
.w-status.above { color: var(--muted); }
.w-remove { width: 36px; height: 36px; border: 1px solid var(--line-2); background: transparent; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; }
.w-remove:hover { color: var(--fall); border-color: var(--fall); }
.w-empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s6) var(--s5); }
.w-empty p { margin: 0; }
.empty-star { width: 40px; height: 40px; color: var(--ducat); filter: drop-shadow(0 0 10px rgb(233 211 154 / 0.5)); }

/* Home watchlist row */
.row-w { grid-template-columns: minmax(0, 1fr); }
.h-star { display: inline-grid; vertical-align: -3px; margin-right: var(--s2); color: var(--ducat); }
.h-star svg { width: 20px; height: 20px; fill: currentColor; }
.w-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
.w-tile { display: grid; gap: 4px; justify-items: start; padding: var(--s3); border: 1px solid var(--line); background: rgb(255 255 255 / 0.02); text-decoration: none; color: inherit; min-width: 0;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: border-color 0.3s ease, background 0.3s ease; }
.w-tile:hover { border-color: rgb(255 255 255 / 0.5); background: rgb(255 255 255 / 0.05); }
.w-tile.is-hit { border-color: rgb(124 245 196 / 0.6); background: rgb(124 245 196 / 0.06); }
.w-tile img { width: 56px; height: 48px; object-fit: contain; justify-self: center; margin-bottom: var(--s1); }
.w-tile-name { font: 600 var(--t12)/1.25 var(--f-head); letter-spacing: 0.04em; text-transform: uppercase; overflow-wrap: anywhere; }
.w-tile-price { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }

@media (max-width: 1180px) {
  .row-s { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row-m, .row-l { grid-template-columns: minmax(0, 1fr); }
  .card-m > .frame > .core { min-height: 0; }
  .hero { grid-template-columns: 1fr; }
  .act-grid > .panel, .act-grid > .panel.panel-7, .act-grid > .panel.panel-half, .act-grid > .panel.panel-third, .act-grid > .panel.panel-two-thirds,
  .panel-col, .panel-col.col-4, .panel-col.col-6, .panel-col.col-8 { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .app, .app.no-subnav { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .subnav {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(320px, 86vw); height: auto; z-index: 45;
    transform: translateX(-102%); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); border-right: 1px solid var(--line-2);
  }
  .app.no-subnav .subnav { display: block; }
  .app.menu-open .subnav { transform: none; }
  .menu-scrim { z-index: 44; }
  .subnav-sections { display: block; }
  .menu-btn { display: grid; }
  .split-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1560px) {
  #topbar-meta { display: none; }
}
@media (max-width: 1280px) {
  .ars-screen { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
  .ars-arcane { grid-column: 1 / -1; width: min(300px, 100%); justify-self: center; }
  .ars-test { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .w-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .w-settings > .core { grid-template-columns: minmax(0, 1fr); }
  .w-row > .core { grid-template-columns: 56px minmax(0, 1fr) auto 36px; grid-template-areas: 'art name price rm' 'art target state rm'; }
  .w-art { grid-area: art; } .w-name { grid-area: name; } .w-price { grid-area: price; } .w-target { grid-area: target; } .w-state { grid-area: state; justify-self: end; } .w-remove { grid-area: rm; }
}
@media (max-width: 900px) {
  .ars-screen { grid-template-columns: minmax(0, 1fr); }
  .ars-arcane { grid-template-columns: minmax(0, 1fr); }
  .ars-bigs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ars-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ars-grid, .ars-toprow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ars-toprow > :first-child { grid-column: auto; }
  .ars-toprow .slot-ghost { display: none; }
  .ars-stackrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ars-saved li { grid-template-columns: minmax(0, 1fr) 36px; }
  .ars-saved .ars-rename { grid-column: 1; grid-row: 2; }
  .ars-mods { grid-auto-columns: 170px; }
  .topbar-right { grid-area: bell; }
  .w-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toasts { right: var(--s4); bottom: calc(var(--s4) + 64px); }
  :root { --topbar: 64px; }
  .app, .app.no-subnav { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar-inner { padding: 0 var(--s4); gap: var(--s3); grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'menu search bell'; }
  .topbar-meta, .search kbd { display: none; }
  .view-inner { padding: var(--s4) var(--s4) 110px; }
  .hero-sigil { left: -80px; width: 160px; height: 380px; }
  .hero-text { padding-left: 56px; }
  .hero-title { font-size: 60px; }
  .row-s { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dial { grid-template-columns: 44px minmax(0, 1fr); }
  .dial svg { width: 44px; height: 44px; }
  .dial .t { font-size: var(--t12); }
  .dial b { font-size: var(--t14); }
  .page-head { padding-left: 40px; min-height: 76px; }
  .page-sigil { left: -40px; }
  .page-title { font-size: 46px; }
  .toolbar h1 { font-size: 44px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .card > .frame > .core { padding: var(--s3); }
  .card-big .card-art { height: 120px; } .card-big .card-art img { max-height: 112px; }
  .frame > .core { padding: var(--s4); }
  .drawer { padding: var(--s4); }
  details.set-row > summary { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2) var(--s3); padding: var(--s3); }
  .set-thumb { width: 48px; height: 48px; grid-row: span 3; }
  .set-name { grid-column: 2 / -1; }
  .set-num { justify-items: start; text-align: left; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
    background: rgb(12 12 15 / 0.94); backdrop-filter: blur(12px); border: 1px solid var(--line-2);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 4px; padding: 10px 0 8px; color: var(--faint); text-decoration: none; background: none; border: 0; cursor: pointer; font: 500 10px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar [aria-current='page'], .tabbar button.on { color: #fff; }
  .tabbar [aria-current='page'] svg, .tabbar button.on svg { filter: drop-shadow(0 0 6px #fff); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .hero-title.chrome, .page-title.chrome, .subnav-title .chrome { animation: none !important; --sweep: 100%; --drift: 30%; }
}

/* Damage Lab */
.linkbtn { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.ars-labhint { margin: 0; }
.lab-loadout { margin-bottom: var(--s5); }
.lab-loadout > .core { padding: var(--s5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
.lab-pick { display: grid; gap: var(--s3); align-content: start; min-width: 0; }
.lab-pick .ars-link { border-bottom: 0; padding-bottom: 0; }
.lab-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3); border: 1px solid var(--line); border-radius: 10px; }
.lab-card .ars-wimg { width: 72px; height: 56px; }
.lab-card .ars-wimg img { width: 100%; height: 100%; object-fit: contain; }
.lab-card-t { display: grid; gap: 2px; min-width: 0; }
.lab-card-t .muted { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .lab-loadout > .core { grid-template-columns: minmax(0, 1fr); padding: var(--s4); }
  .lab-card { grid-template-columns: 56px minmax(0, 1fr); }
  .lab-card .btn { grid-column: 1 / -1; justify-self: start; }
}

/* Arsenal menu */
.hub-part { display: grid; gap: var(--s4); margin-bottom: var(--s6); }
.hub-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.hub-head > div { flex: 1 1 260px; }
.hub-head .h-card, .hub-head p { margin: 0; }
.hub-num { font-family: var(--f-gothic); font-size: 34px; line-height: 1; color: var(--muted); min-width: 36px; text-align: center; text-shadow: 0 0 14px var(--glow); }
.hub-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.hub-tile { padding: 1px; border: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.hub-tile > .core { display: grid; grid-template-rows: auto 1fr; gap: var(--s3); padding: var(--s4); min-height: 100%; }
.hub-tile:hover, .hub-tile:focus-visible { background: linear-gradient(155deg, #fff, rgb(255 255 255 / 0.2) 30%, rgb(255 255 255 / 0.1) 70%, #fff); }
.hub-tile-img { height: 150px; display: grid; place-items: center; }
.hub-tile-img img { max-height: 148px; max-width: 100%; object-fit: contain; transition: transform 0.35s ease; }
.hub-tile:hover .hub-tile-img img, .hub-tile:focus-visible .hub-tile-img img { transform: translateY(-4px) scale(1.04); }
.hub-tile-t { display: grid; gap: 4px; align-content: start; }
.hub-tile-t b { font-family: var(--f-head); font-size: 20px; letter-spacing: 0.04em; }
.hub-builds > .core { padding: var(--s5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
.hub-list { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s2); }
.hub-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: var(--s2) var(--s3) var(--s2) var(--s2); }
.hub-row.on { border-color: var(--line-2); background: var(--panel-2); }
.hub-row:hover { border-color: var(--line-2); }
.hub-use { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.hub-use .ars-wimg { width: 64px; height: 48px; }
.hub-use .ars-wimg img { max-height: 46px; }
.hub-row-t { display: grid; gap: 2px; min-width: 0; }
.hub-row-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-tag { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--live); white-space: nowrap; }
.hub-empty { margin: var(--s2) 0 0; }
@media (max-width: 1100px) { .hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hub-builds > .core { grid-template-columns: minmax(0, 1fr); padding: var(--s4); }
  .hub-tile-img { height: 96px; }
  .hub-tile-img img { max-height: 94px; }
  .hub-tile > .core { padding: var(--s3); }
  .hub-use { grid-template-columns: 52px minmax(0, 1fr); }
  .hub-use .ars-wimg { width: 52px; }
  .hub-tag { grid-column: 2; }
}
.hub-acts { display: flex; align-items: center; gap: var(--s2); }
.hub-del { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--faint); font: inherit; font-size: 13px; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.hub-del:hover, .hub-del:focus-visible { color: var(--fall); border-color: var(--fall); }
.hub-del .hub-del-q { display: none; }
.hub-del.ask { color: var(--void); background: var(--fall); border-color: var(--fall); }
.hub-del.ask .hub-del-x { display: none; }
.hub-del.ask .hub-del-q { display: inline; font-weight: 600; }

/* Riven Mods */
.mod.rar-riven { --rim: url(#modrim-riven); --ink-name: #efe6ff; }
.rar-riven .mod-body { background: radial-gradient(120% 90% at 50% 40%, #6b3fc4 0%, #2b1356 45%, #0f0720 100%); display: grid; place-items: center; }
.rar-riven .mod-body::after { background: linear-gradient(180deg, rgb(30 10 60 / 0.05), rgb(16 6 34 / 0.5) 70%, rgb(10 4 22 / 0.75)); }
.riven-glyph { width: 34%; height: auto; filter: drop-shadow(0 0 8px rgb(200 160 255 / 0.8)); }
.riven-glyph path { fill: none; stroke: #e9dcff; stroke-width: 6; stroke-linejoin: round; }
.riven-glyph .rg-i { fill: #f4ecff; stroke: none; }

.rv-root { display: grid; gap: var(--s4); }
.riven-page { display: grid; gap: var(--s4); }
.riven-bar > .core { padding: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s4); align-items: end; }
.riven-weapon { flex: 1 1 260px; max-width: 420px; }
.riven-bar .faint { flex-basis: 100%; }

.riven-stage { position: relative; overflow: hidden; border-radius: 14px; min-height: 640px; display: grid; place-items: center; padding: var(--s6) var(--s4); background: radial-gradient(120% 80% at 50% 30%, #2a0f55 0%, #12062a 45%, #06020e 100%); border: 1px solid rgb(170 130 255 / 0.25); box-shadow: inset 0 0 120px rgb(120 60 230 / 0.25); isolation: isolate; }
.riven-stage-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.rs-shard { fill: hsl(268 70% var(--l)); stroke: hsl(270 100% 88% / 0.6); stroke-width: 1.4; filter: drop-shadow(0 0 10px rgb(160 110 255 / 0.35)); opacity: 0.9; }
.rs-core-tri { fill: #c9a8ff; filter: drop-shadow(0 0 30px #b48cff); }
.rs-core-in { fill: #faf5ff; opacity: 0.9; }
.rs-ring { fill: none; stroke: rgb(150 90 255 / 0.45); stroke-width: 14; filter: blur(3px); }
.rs-bolt { fill: none; stroke: #f3eaff; stroke-width: 2.2; stroke-linejoin: round; opacity: 0.85; }
.rs-mote { fill: #e3d2ff; opacity: 0.8; }
.riven-stage-in { display: grid; gap: var(--s4); justify-items: center; width: 100%; }
.riven-cards { display: flex; gap: var(--s5); justify-content: center; flex-wrap: wrap; perspective: 1200px; }
.riven-acts { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; align-items: center; }
.riven-acts .btn { backdrop-filter: blur(6px); }
.riven-acts .kuva { margin-left: 6px; opacity: 0.75; font-family: var(--f-mono); font-size: 12px; }
.riven-kuva { margin: 0; text-align: center; color: #d9c8ff; }
.riven-empty { display: grid; justify-items: center; gap: var(--s3); color: #e7dcff; text-align: center; }
.riven-empty .rcard-veil { width: 140px; }

/* The card: a violet metal frame with crystal spikes, artwork, name, stats. */
.rcard { --rc-edge: #b28cff; position: relative; width: 300px; max-width: 100%; padding: 10px; border-radius: 16px 16px 12px 12px; background: linear-gradient(160deg, #e9ddff 0%, #9c78e6 18%, #3b2170 46%, #8a65d8 74%, #e2d4ff 100%); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.25), 0 0 40px rgb(150 100 255 / 0.55), 0 24px 60px rgb(0 0 0 / 0.6); color: #efe6ff; }
.rcard-in { position: relative; display: grid; grid-template-rows: auto 190px auto auto; border-radius: 10px; overflow: hidden; background: #140a26; box-shadow: inset 0 0 0 1px rgb(200 170 255 / 0.35); }
.rcard-top { position: absolute; inset: 8px 10px auto; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.rcard-glyph { width: 34px; margin: 0 auto; color: #f3ebff; filter: drop-shadow(0 0 6px #c29bff); }
.rcard-drain { position: absolute; right: 0; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgb(210 185 255 / 0.6); background: rgb(30 14 60 / 0.85); font-size: 15px; }
.rcard-drain .pol svg { width: 14px; height: 14px; }
.rcard-art { position: relative; overflow: hidden; background: radial-gradient(90% 80% at 50% 45%, #6c3fd0 0%, #241048 60%, #12081f 100%); display: grid; place-items: center; }
.rcard-art img { width: 92%; height: 86%; object-fit: contain; filter: saturate(0.9) hue-rotate(-12deg) drop-shadow(0 6px 18px rgb(0 0 0 / 0.6)); }
.rcard-glitch { position: absolute; inset: 0; background:
  linear-gradient(90deg, transparent 8%, rgb(190 140 255 / 0.18) 8% 14%, transparent 14% 62%, rgb(255 190 120 / 0.12) 62% 66%, transparent 66%),
  linear-gradient(0deg, transparent 20%, rgb(150 100 255 / 0.14) 20% 24%, transparent 24% 70%, rgb(150 100 255 / 0.1) 70% 76%, transparent 76%);
  mix-blend-mode: screen; pointer-events: none; }
.rcard-veil { width: 70%; display: block; filter: drop-shadow(0 0 22px #d2b4ff); }
.rcard-veil svg { width: 100%; height: auto; display: block; }
.rcard-veil .rv-o { fill: rgb(210 185 255 / 0.25); stroke: #efe5ff; stroke-width: 4; }
.rcard-veil .rv-m { fill: rgb(230 215 255 / 0.55); }
.rcard-veil .rv-i { fill: #ffffff; }
.rcard-text { padding: 12px 14px 10px; text-align: center; background: linear-gradient(180deg, #1b0f33, #120a22); display: grid; gap: 6px; min-height: 150px; align-content: start; }
.rcard-name { font-family: var(--f-head); font-size: 21px; line-height: 1.15; color: #d9c4ff; text-shadow: 0 0 12px rgb(180 140 255 / 0.5); }
.rcard-flavor { margin: 0; color: #cdbbff; font-size: 15px; line-height: 1.35; }
.rcard-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 16px; color: #d6c2ff; }
.rcard-stats li.neg { color: #ff9fb6; }
.rcard-stats li.nosim { opacity: 0.8; }
.rcard-bar { display: flex; justify-content: space-between; align-items: center; margin: 0 10px 10px; padding: 5px 14px; border-radius: 999px; border: 1px solid rgb(205 180 255 / 0.55); background: rgb(36 18 70 / 0.9); font-family: var(--f-head); font-size: 15px; color: #e3d4ff; }
.rcard-rolls { display: inline-flex; align-items: center; gap: 5px; }
.rcard-rolls svg { width: 15px; height: 15px; }
.rcard-veiledtag { flex: 1; text-align: center; letter-spacing: 0.12em; text-transform: uppercase; }
.rcard-stars { display: flex; justify-content: center; gap: 4px; padding: 8px 0 2px; }
.rcard-stars span { width: 11px; height: 11px; color: #4b3a6b; }
.rcard-stars span.on { color: #9fe6ff; filter: drop-shadow(0 0 4px #7fd7ff); }
.rcard-stars svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.rcard-crystals i { position: absolute; width: 18px; height: 30px; background: linear-gradient(160deg, #ffffff, #b99cff 50%, #5b38a8); clip-path: polygon(50% 0, 100% 40%, 60% 100%, 0 60%); filter: drop-shadow(0 0 6px rgb(200 170 255 / 0.8)); }
.rcard-crystals i:nth-child(1) { left: -9px; top: 22%; transform: rotate(-30deg); }
.rcard-crystals i:nth-child(2) { right: -9px; top: 30%; transform: rotate(28deg); }
.rcard-crystals i:nth-child(3) { left: -6px; bottom: 16%; transform: rotate(-60deg) scale(0.8); }
.rcard-crystals i:nth-child(4) { right: -7px; bottom: 22%; transform: rotate(55deg) scale(0.85); }
.rcard-crystals i:nth-child(5) { left: 18%; top: -12px; transform: rotate(-10deg) scale(0.7); }
.rcard-crystals i:nth-child(6) { right: 16%; bottom: -12px; transform: rotate(170deg) scale(0.75); }
.rcard.veiled .rcard-text { min-height: 150px; }
.rcard-label { position: absolute; top: -28px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #e5d8ff; }
.riven-cards.two { padding-top: 28px; }
.rcard.is-new { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35), 0 0 60px rgb(190 140 255 / 0.85), 0 24px 60px rgb(0 0 0 / 0.6); }

.riven-custom > .core { padding: var(--s5); }
.rc-form { display: grid; gap: var(--s3); }
.rc-form > p { margin: 0; }
.rc-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s3); align-items: end; }
.rc-row.neg .label { color: var(--fall); }
.rc-range { padding-bottom: 10px; }
.rc-range.warn { color: var(--warn); }
.rc-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s2); }
.riven-notice { padding: var(--s3) var(--s4); border: 1px solid rgb(170 130 255 / 0.5); border-radius: 10px; background: rgb(60 30 120 / 0.35); color: #eee3ff; }
.riven-savedbox > .core { padding: var(--s5); display: grid; gap: var(--s2); }
.rv-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.rv-saved-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: var(--s2) var(--s3) var(--s2) var(--s2); }
.rv-open { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s3); align-items: center; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.rv-open .ars-wimg { width: 64px; height: 48px; }
.rv-open .ars-wimg img { max-height: 46px; }
.hub-rivens > .core { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) {
  .riven-stage { min-height: 560px; padding: var(--s5) var(--s3); }
  .rcard { width: 270px; }
  .riven-cards.two .rcard { width: 100%; max-width: 300px; }
  .rc-row { grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
  .rc-row .rc-range { padding-bottom: 0; }
  .rc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-saved-row { grid-template-columns: minmax(0, 1fr); }
  .rv-open { grid-template-columns: 52px minmax(0, 1fr); }
}
