/* PLIK - the blue studio, played as a boss fight. One family (Figtree), heavy lowercase set tight
   like the banner; the stick's three glossy colours are the only accents. The shell has HP, so the
   interface is a game HUD: a boss bar across the top, a power meter at the bottom, loot tags pinned
   to the shell, a kill feed, and a game menu in the corner. No side card, no tab bar. */
:root {
  --blue: #1c3dd2;
  --blue-hi: #2c52f0;
  --blue-deep: #0b1f8f;
  --ink: #06135c;
  --night: rgba(4, 12, 74, 0.72);
  --white: #ffffff;
  --mist: rgba(255, 255, 255, 0.74);
  --faint: rgba(255, 255, 255, 0.5);
  --orange: #ff7a1a;
  --lime: #9be22d;
  --pink: #ff3fa4;
  --green: #34c12a;
  --gold: #e2a91c;
  --line: rgba(255, 255, 255, 0.16);
  --gut: 16px;
  --console-w: 0px;
  --r: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--blue); }
body {
  font-family: Figtree, system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 500; font-size: 16px; line-height: 1.5; color: var(--white);
  min-height: 100dvh; overflow-x: hidden;
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
small { color: var(--faint); font-weight: 600; }
.empty { color: var(--faint); list-style: none; }
.fine { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--faint); }
.lede { margin: 0 0 12px; color: var(--mist); font-size: 14.5px; }
[data-empty] { font-weight: 600 !important; color: var(--faint) !important; letter-spacing: 0 !important; }

/* glass, used sparingly: dark blue, heavy rim, like a game HUD plate */
.glass {
  background: var(--night);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), inset 0 2px 0 rgba(255, 255, 255, 0.16), 0 24px 50px -28px rgba(2, 8, 60, 0.95);
}

/* ---- the stage ------------------------------------------------------------- */
.stage { position: fixed; inset: 0; z-index: 0; }
.stage-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 95% at 52% 46%, transparent 55%, rgba(4, 12, 80, 0.55) 100%),
    linear-gradient(180deg, rgba(4, 12, 80, 0.42), transparent 22%),
    linear-gradient(0deg, rgba(4, 12, 80, 0.4), transparent 26%);
}
body[data-page="cracks"] .vignette, body[data-page="rules"] .vignette {
  background: radial-gradient(130% 100% at 50% 40%, rgba(10, 30, 150, 0.35), rgba(4, 12, 80, 0.72));
}

/* ---- the console: brand, game menu, player slot (one block, bottom-left) ------------------- */
.menu {
  position: fixed; z-index: 25; left: max(var(--gut), env(safe-area-inset-left)); bottom: max(var(--gut), env(safe-area-inset-bottom));
}
.menu-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-bottom: 10px; }
.menu-brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 6px 18px -6px rgba(3, 10, 70, 0.8); }
.menu-brand span { font-weight: 900; font-size: 28px; letter-spacing: -0.06em; line-height: 1; margin-top: -3px; }
.menu-toggle { display: none; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.menu-list a {
  position: relative; display: flex; align-items: baseline; gap: 10px; padding: 4px 10px 4px 22px; border-radius: 10px;
  text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: var(--mist);
  text-shadow: 0 2px 12px rgba(4, 12, 80, 0.6);
}
.menu-list a b { font-size: 12px; font-weight: 900; color: var(--faint); letter-spacing: 0.04em; width: 18px; }
.menu-list a:hover { color: var(--white); }
.menu-list a[aria-current="page"] { color: var(--white); font-size: 21px; font-weight: 900; }
.menu-list a[aria-current="page"]::before {
  content: ""; position: absolute; left: 4px; top: 50%; width: 0; height: 0; margin-top: -7px;
  border-left: 11px solid var(--lime); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  filter: drop-shadow(0 0 6px rgba(155, 226, 45, 0.7));
}
.menu-list a[aria-current="page"] b { color: var(--lime); }

.player {
  position: fixed; z-index: 26; display: flex; align-items: center; gap: 6px;
}
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  border: 0; background: rgba(255, 255, 255, 0.12); color: var(--white); cursor: pointer; text-decoration: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.22); }
#mute .cross { display: none; }
#mute[data-muted="1"] .wave { display: none; }
#mute[data-muted="1"] .cross { display: inline; }
.wallet {
  height: 38px; padding: 0 16px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--white); color: var(--blue-deep); font-weight: 900; letter-spacing: -0.01em;
  box-shadow: inset 0 -3px 0 rgba(11, 31, 143, 0.16), 0 8px 20px -10px rgba(3, 10, 70, 0.8);
}
.wallet::before { content: "P1 "; font-size: 11px; letter-spacing: 0.06em; opacity: 0.55; }
.wallet.on { background: rgba(255, 255, 255, 0.14); color: var(--white); box-shadow: inset 0 0 0 2px var(--lime); }

/* ---- page frame --------------------------------------------------------------- */
.page { position: relative; z-index: 5; outline: none; pointer-events: none; }
.page > * { pointer-events: auto; }
.display {
  font-weight: 900; letter-spacing: -0.058em; line-height: 0.88; margin: 0;
  font-size: clamp(56px, 15vw, 96px); text-shadow: 0 10px 40px rgba(4, 14, 90, 0.35);
}
.kicker {
  margin: 0 0 6px; font-size: 12px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime);
}
.hud-sub { margin: 12px 0 0; font-size: 17px; font-weight: 600; color: var(--mist); max-width: 34ch; }
.screen-head.center { text-align: center; }
.screen-head.center .hud-sub { margin-inline: auto; }

/* ---- shared controls ------------------------------------------------------------ */
.field {
  display: flex; align-items: center; gap: 10px; padding: 4px 14px; border-radius: 14px; min-width: 0;
  background: rgba(2, 8, 60, 0.55); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.field > span { font-size: 12.5px; color: var(--faint); font-weight: 800; white-space: nowrap; }
.field input, .field output {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none; text-align: right;
  font-size: 24px; font-weight: 900; letter-spacing: -0.03em; padding: 6px 0; color: var(--white);
}
.field input::placeholder { color: rgba(255, 255, 255, 0.3); }
.field em { font-style: normal; font-weight: 800; color: var(--mist); }
.field:focus-within { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55); }
.mine { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; color: var(--mist); font-size: 14px; }
.mine b { color: var(--white); font-weight: 800; }
.cap {
  display: inline-block; width: 28px; height: 13px; border-radius: 999px; background: var(--c); flex: none;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 4px rgba(0, 0, 0, 0.18);
}

/* the action button IS the stick: three glossy segments */
.stickbtn {
  position: relative; display: block; width: 100%; height: 60px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, var(--orange) 0 33.4%, var(--lime) 33.4% 66.7%, var(--pink) 66.7% 100%);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.16), 0 14px 26px -12px rgba(255, 63, 164, 0.55), 0 14px 26px -16px rgba(255, 122, 26, 0.6);
  transition: transform 0.12s ease, filter 0.2s ease;
}
.stickbtn::before { content: ""; position: absolute; left: 24px; right: 24px; top: 8px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.62); }
.stickbtn span { position: relative; font-weight: 900; font-size: 22px; letter-spacing: -0.04em; color: var(--ink); }
.stickbtn:hover:not(:disabled) { transform: translateY(-2px) rotate(-0.6deg); }
.stickbtn:active:not(:disabled) { transform: scale(0.97, 0.92); }
.stickbtn:disabled { cursor: not-allowed; opacity: 0.85; box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.16); }
.stickbtn.busy span { opacity: 0.85; }
.stickbtn.nudge { animation: nudge 0.5s ease; }
@keyframes nudge { 30% { transform: translateX(-6px) rotate(-1.5deg); } 60% { transform: translateX(4px) rotate(1deg); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 24px; width: 100%;
  border-radius: 14px; border: 0; cursor: pointer; background: var(--white); color: var(--blue-deep);
  font-weight: 900; font-size: 18px; letter-spacing: -0.02em; margin-top: 12px;
  box-shadow: inset 0 -4px 0 rgba(11, 31, 143, 0.14);
}
.btn:hover:not(:disabled) { background: #eef2ff; }
.btn:disabled { cursor: not-allowed; background: rgba(255, 255, 255, 0.16); color: var(--mist); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.btn.small { height: 36px; width: auto; font-size: 14px; padding: 0 14px; margin: 0; }
.kv { margin: 0; display: grid; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--mist); font-size: 14px; }
.kv dd { margin: 0; font-weight: 800; text-align: right; }
select { background: rgba(2, 8, 60, 0.55); border: 0; border-radius: 10px; padding: 4px 8px; font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: rgba(255, 255, 255, 0.1); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ============================================================================================
   `/` - the boss fight
   ============================================================================================ */
.boss { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name num" "bar bar"; gap: 6px 18px; align-items: end; }
.boss-name { grid-area: name; min-width: 0; }
.boss h1 { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; line-height: 1; }
.plate { font-weight: 900; font-size: 40px; letter-spacing: -0.05em; text-shadow: 0 6px 24px rgba(4, 14, 90, 0.45); }
.plate b { font-weight: 900; }
.boss-sub { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--mist); }
.boss-stats { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 14px; color: var(--mist); }
.boss-stats b { color: var(--white); font-weight: 800; }
.hp-num { grid-area: num; margin: 0; text-align: right; white-space: nowrap; color: var(--mist); font-weight: 700; font-size: 15px; }
.hp-num b { font-size: 34px; font-weight: 900; letter-spacing: -0.04em; color: var(--white); margin-right: 6px; }
.hp {
  grid-area: bar; position: relative; height: 30px; border-radius: 9px; overflow: hidden;
  background: linear-gradient(180deg, rgba(1, 5, 40, 0.85), rgba(4, 12, 74, 0.85));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 0 0 6px rgba(4, 12, 74, 0.55), 0 16px 40px -14px rgba(2, 8, 60, 0.9);
}
.hp i {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--hp, 0%);
  background: linear-gradient(90deg, var(--orange) 0 33.3%, var(--lime) 33.3% 66.6%, var(--pink) 66.6% 100%);
  background-size: var(--full, 100%) 100%;
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hp i::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 6px; background: rgba(255, 255, 255, 0.5); }
.hp s { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 3px), rgba(1, 5, 40, 0.75) calc(5% - 3px) 5%); }

/* loot tags pinned to the shell */
.tags { position: relative; }
.lt {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 12px; white-space: nowrap;
  background: rgba(4, 12, 74, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c, #fff) 70%, transparent), 0 12px 26px -14px rgba(2, 8, 60, 0.9);
  font-size: 14px;
}
.lt .sym { font-weight: 900; letter-spacing: -0.02em; }
.lt .amt { font-weight: 800; }
.lt .val { color: var(--mist); font-weight: 700; }
.lt .val:not(:empty):not([data-empty])::after { content: " ETH"; color: var(--faint); }
.lt-sum { --c: #ffffff; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 14px; }
.lt-sum > span:first-child { font-size: 12px; color: var(--faint); font-weight: 800; }
.lt-sum > b { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }
.lt-sum .loose { font-size: 12.5px; color: var(--mist); }
.lt-sum .loose b { color: var(--white); }

/* kill feed */
.killfeed h2 { margin: 0 0 6px; font-size: 12px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.swings { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.swings li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0 10px; align-items: baseline; padding: 6px 12px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(4, 12, 74, 0.0), rgba(4, 12, 74, 0.66) 30%); font-size: 14px;
}
.swings li.empty { background: none; padding: 0; }
.swings .who { font-weight: 800; }
.swings .amt { font-weight: 900; text-align: right; grid-column: 3; }
.swings .when { color: var(--faint); font-size: 12px; grid-column: 1 / 3; grid-row: 2; }
.swings .tag { grid-column: 3; grid-row: 2; justify-self: end; font-size: 11.5px; font-weight: 900; padding: 0 8px; border-radius: 999px; background: var(--white); color: var(--blue-deep); }

/* the power meter */
.swingbar { padding: 16px 18px 14px; border-radius: 26px; }
.swingbar { background: var(--night); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), inset 0 2px 0 rgba(255, 255, 255, 0.16), 0 24px 50px -28px rgba(2, 8, 60, 0.95); }
.swing-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.swing-top h2 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.power { position: relative; display: grid; grid-template-columns: 1fr 1.25fr 1.6fr 1.15fr; gap: 0; border-radius: 14px; overflow: hidden; margin-bottom: 12px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16); background: rgba(2, 8, 60, 0.55); }
.power-track { display: none; }
.preset {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 9px 12px 12px; min-height: 56px;
  border: 0; cursor: pointer; text-align: left; background: transparent; color: var(--white);
  border-right: 2px solid rgba(255, 255, 255, 0.12);
}
.preset:last-child { border-right: 0; }
.preset::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--c, #fff); opacity: 0.85; }
.preset b { font-weight: 900; font-size: 15px; letter-spacing: -0.02em; }
.preset span { font-size: 12px; color: var(--mist); font-weight: 700; }
.preset:hover { background: color-mix(in srgb, var(--c, #fff) 18%, transparent); }
.preset[aria-pressed="true"] { background: var(--c, #fff); color: var(--ink); }
.preset[aria-pressed="true"] span { color: rgba(6, 19, 92, 0.75); }
.preset.crack { --c: #ffffff; }
.swing-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(200px, 0.9fr); gap: 12px; align-items: center; }
.preview { display: grid; gap: 2px; font-size: 13px; color: var(--mist); }
.preview p { margin: 0; display: flex; justify-content: space-between; gap: 10px; }
.preview b { color: var(--white); font-weight: 800; text-align: right; }
.swingbar .fine { margin-top: 8px; font-size: 12px; }

/* ============================================================================================
   `/inside` - the loot screen
   ============================================================================================ */
.slots { list-style: none; margin: 0; padding: 0; display: contents; }
.slot { padding: 16px 16px 14px; border-radius: 22px; position: relative; overflow: hidden; }
.slot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--c); }
.slot-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; }
.slot-head .cap { width: 40px; height: 18px; }
.slot h3 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -0.045em; line-height: 1; }
.slot .nm { color: var(--faint); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-big { margin: 0 0 8px; }
.slot-big b { display: block; font-size: 30px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.05; overflow-wrap: anywhere; }
.slot-big > span { font-size: 13px; color: var(--mist); }
.slot dl { margin: 0; display: grid; gap: 4px; }
.slot dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.slot dt { color: var(--faint); font-weight: 600; }
.slot dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.fill { padding: 16px; border-radius: 22px; }
.fill h2 { margin: 0 0 6px; font-size: 24px; font-weight: 900; letter-spacing: -0.05em; line-height: 1.05; }
.fill .kv > div { padding: 5px 0; }
.fill .kv dt, .fill .kv dd { font-size: 13.5px; }
.slot, .fill { background: var(--night); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), inset 0 2px 0 rgba(255, 255, 255, 0.16), 0 24px 50px -28px rgba(2, 8, 60, 0.95); }
.fill { box-shadow: inset 0 0 0 2px rgba(155, 226, 45, 0.5), 0 24px 50px -28px rgba(2, 8, 60, 0.95); }

/* ============================================================================================
   `/cracks` - the scoreboard
   ============================================================================================ */
.score { margin: 18px 0 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-radius: 22px; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16); background: rgba(2, 8, 60, 0.55); }
.score > div { padding: 14px 18px; text-align: center; border-right: 2px solid rgba(255, 255, 255, 0.1); }
.score > div:last-child { border-right: 0; }
.score dt { font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.score dd { margin: 4px 0 0; font-size: 40px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.board-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sheet { padding: 16px 18px; border-radius: 22px; background: var(--night); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 24px 50px -28px rgba(2, 8, 60, 0.95); }
.sheet h2 { margin: 0 0 10px; font-size: 13px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.cols { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 12px; margin: 0 0 4px; padding: 0 12px; font-size: 11.5px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.round { border-radius: 12px; }
.round:nth-child(odd) { background: rgba(255, 255, 255, 0.04); }
.round > button {
  width: 100%; display: grid; grid-template-columns: 70px 1fr 1fr; gap: 6px 12px; align-items: center;
  padding: 10px 12px; background: none; border: 0; cursor: pointer; text-align: left; border-radius: 12px;
}
.round > button:hover { background: rgba(255, 255, 255, 0.08); }
.round .no { font-size: 22px; font-weight: 900; letter-spacing: -0.04em; }
.round .meta { color: var(--mist); font-size: 13px; line-height: 1.35; }
.round .loot { display: flex; gap: 4px; flex-wrap: wrap; }
.board { list-style: none; margin: 0; padding: 0 14px 12px 82px; display: grid; gap: 2px; counter-reset: b; }
.board li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; font-size: 14px; padding: 4px 0; counter-increment: b; }
.board li::before { content: counter(b); color: var(--faint); font-weight: 800; }
.board .brk { font-size: 11px; font-weight: 900; padding: 0 7px; border-radius: 999px; background: var(--white); color: var(--blue-deep); margin-left: 6px; }
.claims { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.claims li { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.claims input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--lime); }
.claims .no { font-weight: 900; font-size: 17px; letter-spacing: -0.03em; }
.claims .what { color: var(--mist); font-size: 13.5px; }
.claims .loot { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
#owed { margin-top: 12px; display: grid; gap: 8px; }
#owed p { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }

/* ============================================================================================
   `/stick` - the shop counter
   ============================================================================================ */
.pricetags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pricetags li {
  position: relative; display: grid; padding: 9px 14px 10px 26px; border-radius: 6px 14px 14px 6px; min-width: 120px;
  background: var(--white); color: var(--ink); box-shadow: 0 14px 28px -16px rgba(2, 8, 60, 0.9);
  transform: rotate(var(--tilt, -1.5deg));
}
.pricetags li:nth-child(2) { --tilt: 1.2deg; } .pricetags li:nth-child(3) { --tilt: -0.6deg; } .pricetags li:nth-child(4) { --tilt: 1.8deg; }
.pricetags li::before { content: ""; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--blue); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.pricetags span { font-size: 11.5px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(6, 19, 92, 0.6); }
.pricetags b { font-size: 19px; font-weight: 900; letter-spacing: -0.03em; }
.pricetags small { color: rgba(6, 19, 92, 0.55); }
.pricetags [data-empty] { color: rgba(6, 19, 92, 0.45) !important; }
.counter {
  display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) minmax(220px, 0.8fr); gap: 14px; align-items: start;
  padding: 18px 20px 16px; border-radius: 26px 26px 18px 18px; position: relative;
  background: var(--night); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), inset 0 7px 0 rgba(255, 255, 255, 0.92), 0 30px 60px -30px rgba(2, 8, 60, 0.95);
}
.counter::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; border-radius: 26px 26px 0 0;
  background: linear-gradient(90deg, var(--orange) 0 33.4%, var(--lime) 33.4% 66.7%, var(--pink) 66.7% 100%); }
.counter .arrow { align-self: center; text-align: center; font-weight: 900; font-size: 24px; color: var(--faint); padding-top: 28px; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(2, 8, 60, 0.55); margin: 4px 0 10px; }
.sides button { height: 38px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-weight: 900; font-size: 16px; color: var(--mist); }
.sides button[aria-pressed="true"] { background: var(--white); color: var(--blue-deep); }
.counter-a .mine { margin-top: 10px; }
.counter-b { padding-top: 52px; }
.counter-b .kv { margin-top: 8px; }
.counter-c { padding-top: 52px; }
.field.out output { font-size: 22px; }

/* ============================================================================================
   `/rules` - the manual
   ============================================================================================ */
.cards { list-style: none; margin: 22px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: c; }
.cards li {
  counter-increment: c; position: relative; padding: 46px 16px 16px; border-radius: 22px; color: var(--mist); font-size: 14px;
  background: var(--night); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 24px 50px -28px rgba(2, 8, 60, 0.95);
}
.cards li::before {
  content: counter(c, decimal-leading-zero); position: absolute; left: 16px; top: 14px; font-weight: 900; font-size: 13px;
  color: var(--ink); background: var(--c); padding: 2px 9px; border-radius: 999px; letter-spacing: 0.04em;
}
.cards b { display: block; color: var(--white); font-weight: 900; font-size: 20px; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 6px; }
.cards p { margin: 0; }
.manual-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.manual-cols .sheet:last-child { grid-column: 1 / -1; }
.consts { width: 100%; border-collapse: collapse; font-size: 14px; }
.consts th { text-align: left; font-weight: 700; color: var(--mist); padding: 7px 12px 7px 0; vertical-align: top; width: 36%; }
.consts td { padding: 7px 0; font-weight: 700; }
.consts tr + tr th, .consts tr + tr td { border-top: 1px solid rgba(255, 255, 255, 0.09); }
.risks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--mist); font-size: 14px; }
.risks b { color: var(--white); }
.addrs { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.addrs > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); font-size: 13.5px; }
.addrs dt { color: var(--mist); }
.addrs dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.addrs a { text-decoration-color: rgba(255, 255, 255, 0.4); }

/* ---- toast ------------------------------------------------------------------------------- */
.toast {
  position: fixed; z-index: 40; left: 50%; top: 120px; transform: translate(-50%, -16px);
  max-width: min(520px, calc(100vw - 32px)); padding: 12px 20px; border-radius: 16px;
  background: var(--white); color: var(--blue-deep); font-weight: 800; font-size: 15px; text-align: center;
  box-shadow: 0 20px 40px -18px rgba(2, 8, 60, 0.9); opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--pink); color: var(--white); }
.toast.ok { background: var(--lime); color: var(--ink); }

/* ============================================================================================
   desktop: everything is pinned around the shell; nothing scrolls but the scoreboard and manual
   ============================================================================================ */
@media (min-width: 980px) {
  :root { --gut: 26px; --console-w: 210px; }
  body { overflow: hidden; height: 100dvh; }
  .page { position: fixed; inset: 0; padding: 0; }
  .menu { width: var(--console-w); }
  .player { left: max(var(--gut), env(safe-area-inset-left)); bottom: max(var(--gut), env(safe-area-inset-bottom)); }
  .menu { bottom: calc(var(--gut) + 50px); }
  .region { left: calc(var(--gut) + var(--console-w) + 20px); right: var(--gut); }

  /* shell */
  .boss { position: absolute; top: 20px; left: var(--gut); right: var(--gut); }
  .loot .tags { position: static; }
  .lt { position: fixed; left: 0; top: 0; opacity: 0; transition: opacity 0.25s ease; will-change: transform; }
  .lt.on { opacity: 1; }
  .killfeed { position: absolute; right: var(--gut); top: 150px; width: 300px; }
  .killfeed .swings li:nth-child(n + 7) { display: none; }
  .swingbar {
    position: absolute; bottom: var(--gut); left: calc(var(--gut) + var(--console-w) + 20px); right: calc(var(--gut) + 0px);
    width: min(900px, calc(100vw - 2 * var(--gut) - var(--console-w) - 20px)); margin-inline: auto;
  }

  /* inside */
  .screen-head { position: absolute; top: 26px; left: var(--gut); max-width: 520px; }
  .lootband {
    position: absolute; bottom: var(--gut); left: calc(var(--gut) + var(--console-w) + 20px); right: var(--gut);
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(250px, 1.15fr); gap: 12px; align-items: end;
  }

  /* cracks + rules: a scrolling sheet in the region right of the console */
  .board-wrap, .manual {
    position: absolute; top: 0; bottom: 0; left: calc(var(--gut) + var(--console-w) + 20px); right: 0;
    overflow-y: auto; overscroll-behavior: contain; padding: 30px var(--gut) 40px 0;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  }
  .board-wrap > *, .manual > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
  .board-wrap .screen-head, .manual .screen-head { position: static; }
  .board-wrap .display, .manual .display { font-size: clamp(64px, 6vw, 96px); }

  /* stick */
  .pricetags { position: absolute; top: 236px; left: var(--gut); max-width: 520px; }
  .counter { position: absolute; bottom: var(--gut); left: calc(var(--gut) + var(--console-w) + 20px); right: var(--gut); }
}
@media (min-width: 980px) and (max-width: 1279px) {
  .killfeed { width: 250px; top: 140px; }
  .swing-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .swing-row .stickbtn { grid-column: 1 / -1; }
  .lootband { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lootband .fill { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 220px; gap: 4px 16px; align-items: center; }
  .lootband .fill .kv { grid-row: 1 / 3; grid-column: 2; }
  .lootband .fill .fine { display: none; }
  .slot dl { display: none; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .counter { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); }
  .counter-c { grid-column: 1 / -1; padding-top: 0; }
  .pricetags { max-width: 330px; }
}
@media (min-width: 980px) and (max-height: 820px) {
  .plate { font-size: 34px; }
  .swingbar .fine { display: none; }
  .slot dl { display: none; }
  .lootband .fine { display: none; }
}

/* ============================================================================================
   phones and tablets: one column that scrolls; the shell hangs in the gap under the boss bar
   ============================================================================================ */
@media (max-width: 979px) {
  .page { padding: 0 var(--gut) 110px; }
  .menu { left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 10px var(--gut) max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(0deg, rgba(4, 12, 74, 0.92), rgba(4, 12, 74, 0.6) 70%, transparent); }
  .menu-brand { margin: 0; }
  .menu-brand span { font-size: 24px; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border: 0; border-radius: 12px; cursor: pointer;
    background: rgba(255, 255, 255, 0.14); font-weight: 900; letter-spacing: -0.01em;
  }
  .menu-toggle i { width: 14px; height: 12px; background: linear-gradient(var(--white) 0 2px, transparent 2px 5px, var(--white) 5px 7px, transparent 7px 10px, var(--white) 10px 12px); }
  .menu-list {
    position: fixed; inset: 0; z-index: -1; display: none; align-content: center; justify-items: start; gap: 6px;
    padding: 80px 28px 120px; background: rgba(6, 18, 110, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .menu.open .menu-list { display: grid; }
  .menu-list a { font-size: 34px; letter-spacing: -0.05em; padding: 6px 10px 6px 30px; }
  .menu-list a b { font-size: 14px; }
  .menu-list a[aria-current="page"] { font-size: 40px; }
  .menu-list a[aria-current="page"]::before { left: 6px; border-left-width: 14px; border-top-width: 9px; border-bottom-width: 9px; margin-top: -9px; }
  .player { right: var(--gut); bottom: max(10px, env(safe-area-inset-bottom)); z-index: 27; }

  .boss { position: sticky; top: 0; z-index: 6; margin: 0 calc(-1 * var(--gut)); padding: 12px var(--gut) 14px;
    background: linear-gradient(180deg, rgba(4, 12, 74, 0.75), rgba(4, 12, 74, 0.35) 75%, transparent); }
  .plate { font-size: 30px; }
  .boss-sub { font-size: 15px; }
  .boss-stats { font-size: 12.5px; gap: 0 12px; }
  .hp-num b { font-size: 24px; }
  .hp { height: 22px; }
  .loot { min-height: 52svh; display: flex; align-items: flex-end; padding-bottom: 10px; }
  .tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .lt { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 10px; font-size: 13px; }
  .lt .cap { width: 22px; height: 10px; }
  .lt-sum { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .lt-sum > b { font-size: 18px; }
  .swingbar { margin-top: 6px; }
  .killfeed { margin-top: 22px; }

  .screen-head { padding-top: 26px; }
  .page-inside .screen-head, .page-stick .screen-head { margin-bottom: 44svh; }
  .lootband { display: grid; gap: 10px; }
  .slots { display: grid; gap: 10px; }
  .page-stick .screen-head { margin-bottom: 16px; }
  .page-stick .pricetags { margin-bottom: 38svh; }
  .counter > * { min-width: 0; }
  .counter { grid-template-columns: 1fr; margin-top: 12px; }
  .counter .arrow { display: none; }
  .counter-b, .counter-c { padding-top: 0; }
  .board-wrap { padding-top: 26px; }
  .score dd { font-size: 30px; }
  .board-cols, .manual-cols { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  :root { --gut: 14px; }
  .swing-row { grid-template-columns: 1fr; }
  .power { grid-template-columns: 1fr 1fr; }
  .preset:nth-of-type(2) { border-right: 0; }
  .preset:nth-of-type(-n + 2) { border-bottom: 2px solid rgba(255, 255, 255, 0.12); }
  .preset { min-height: 50px; }
  .swing-top h2 { font-size: 22px; }
  .score { grid-template-columns: 1fr 1fr; }
  .score > div:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 2px solid rgba(255, 255, 255, 0.1); }
  .score dd { font-size: 26px; }
  .cols { display: none; }
  .round > button { grid-template-columns: 54px 1fr; }
  .round .loot { grid-column: 1 / -1; }
  .board { padding-left: 14px; }
  .cards { grid-template-columns: 1fr; }
  .addrs { grid-template-columns: 1fr; }
  .wallet { padding: 0 12px; font-size: 14px; }
  .icon-btn { width: 34px; height: 34px; }
  .menu-brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
