@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/playfair-display.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #11131b;
  --surface: #1a1d28;
  --surface-raised: #222635;
  --inset: #131620;
  --line: #2d3242;
  --ivory: #f3e8d2;
  --text: #eee7d8;
  --muted: #a6a9b8;
  --gold: #e7b65b;
  --blue: #8fbff1;
  --ruby: #f18a9e;
  --jade: #75cdb9;
  --purple: #caa5ed;
  --display: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --joker-aspect-ratio: 5 / 7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  font: 500 14px/1.45 var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--bg) radial-gradient(ellipse 1000px 660px at 50% 135px, #1c2030, transparent);
}
button, input, select { font: inherit; }
button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: default; }
button, input, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid #ffcd78; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
svg { display: block; flex: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.topbar { background: #13151ee8; border-bottom: 1px solid #292b36; }
.topbar-inner {
  max-width: 1228px;
  min-height: 67px;
  padding: 8px 24px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.publisher {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ivory);
  font: 700 16px/1 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
  white-space: nowrap;
}
.publisher img { filter: brightness(0) invert(1); }
.publisher-cursor { color: var(--gold); }
.publisher-games { color: var(--muted); font-weight: 600; }
nav, .footer-tools { display: flex; align-items: center; gap: 10px; }
.nav-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #313544;
  border-radius: 8px;
  background: #1b1e29;
  color: #e1dacc;
  font-weight: 700;
  font-size: 13px;
}
.icon-button { width: 40px; padding: 0; }
.nav-button:hover, .icon-button:hover { border-color: #7d6846; background: #292734; }
nav .nav-button svg { color: var(--gold); }
nav .icon-button { color: #b9bac7; }
nav [aria-pressed="true"] { color: var(--gold); }

.page { max-width: 1228px; margin: 0 auto; padding: 27px 24px 0; }
.marquee {
  position: relative;
  isolation: isolate;
  min-height: 225px;
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid #564530;
  border-radius: 17px;
  background: #0d1420;
}
.marquee::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #14141c 10%, #14141c 31%, #14141ced 38%, transparent 63%, transparent 88%, #11141c8c);
}
.marquee::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 6px;
  border: 1px solid #b9944e37;
  border-radius: 12px;
}
.marquee-art {
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  width: 72%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.marquee-copy { padding: 26px 44px 33px; }
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.marquee .eyebrow { color: var(--gold); letter-spacing: .25em; }
.diamond { margin-right: 4px; font-size: 14px; }
.marquee h1 {
  margin: -1px 0 5px;
  color: var(--ivory);
  font: 850 clamp(56px, 7.35vw, 102px)/1.05 var(--display);
  letter-spacing: -.074em;
  text-shadow: 0 3px 26px #090b11;
}
.marquee h1 span { color: var(--gold); }
.tagline { color: #c8bdab; font-size: 15px; letter-spacing: .06em; }
.marquee-coin {
  position: absolute;
  right: 20px;
  top: 17px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 79px;
  padding: 7px 12px;
  border: 1px solid #655033;
  border-radius: 9px;
  background: #13151eea;
  color: var(--gold);
}
.marquee-coin:empty { display: none; }
.marquee-coin svg { width: 23px; height: 23px; }
.marquee-coin strong { display: block; font-size: 19px; line-height: 1; }
.marquee-coin small { display: block; color: #c6b79a; font-size: 10px; margin-top: 2px; }
.marquee.marquee-compact { min-height: 78px; margin-bottom: 14px; border-radius: 10px; }
.marquee-compact::after { inset: 4px; border-radius: 7px; }
.marquee-compact .marquee-copy { padding: 8px 22px 12px; }
.marquee-compact .eyebrow, .marquee-compact .tagline { display: none; }
.marquee-compact h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); }
.marquee-compact .marquee-coin { top: 50%; transform: translateY(-50%); }

.table { display: grid; grid-template-columns: minmax(0, 2.34fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
#game, .sidebar { display: grid; min-width: 0; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.interlude { padding: clamp(16px, 4vw, 30px); display: grid; gap: 18px; }
.interlude h2, .interlude h3, .interlude p { margin: 0; }
.interlude h2 { font-size: clamp(26px, 5vw, 38px); }
.interlude h3 { font-size: 17px; }
.interlude p, .interlude blockquote { line-height: 1.5; }
.interlude > .button { justify-self: start; }
.bet-counter { border-color: #71572e; background: radial-gradient(ellipse at 10% 0%, #3a2c18, transparent 62%), var(--surface); }
.bet-counter .eyebrow { color: var(--gold); }
.bet-counter header > p:last-child { margin-block-start: 4px; color: var(--muted); }
.bet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 172px), 1fr)); gap: 12px; }
.bet-ticket { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 15px; background: #272318; border: 1px solid #695633; border-radius: 8px; }
.bet-ticket header { display: grid; gap: 5px; }
.bet-risk { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.bet-risk svg { width: 14px; height: 14px; }
.bet-ticket.risk-high { border-color: #a86059; background: #362121; }
.risk-high .bet-risk { color: #ffb0a7; }
.bet-ticket > p { flex: 1; }
.bet-ticket > small { color: var(--muted); }
.bet-ticket .button { width: 100%; }
.bet-terms { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding-block: 9px; border-block: 1px dashed #a389626b; }
.bet-terms dt { color: var(--muted); font-size: 12px; }
.bet-terms dd { margin: 2px 0 0; font-weight: 800; }
.bet-terms div:first-child dd { color: #a3e3bd; }
.bet-terms div:last-child dd { color: #f4b5a3; }
.active-bet { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px 18px; padding: 10px 14px; border-color: #71572e; }
.active-bet h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; color: var(--gold); }
.active-bet p, .active-bet strong { margin: 2px 0 0; font-size: 12px; }
.active-bet p { color: var(--muted); }
.active-bet .bet-previous-words { width: 100%; }
.bet-previous-words summary { cursor: pointer; color: var(--gold); font-size: .875rem; font-weight: 700; }
.bet-previous-words ul { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; padding: 2px; margin: 6px 0 0; max-block-size: 9rem; overflow: auto; }
.bet-previous-words li { border: 1px solid #695633; border-radius: 4px; padding: 3px 6px; font-size: .8125rem; }
.active-bet .bet-projection { color: var(--ivory); width: 100%; border-top: 1px dashed #71572e; padding-top: 6px; }
.bet-result { position: relative; display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid #71572e; border-radius: 8px; padding: 8px 12px; }
.bet-result.won-high { color: var(--gold); background: #3b2c15; border-color: var(--gold); box-shadow: 0 0 18px #e7b65b36; }
.bet-result.lost-high { color: #ffbab0; background: #382523; border-color: #a86059; }
.chance-meeting { --meeting-accent: #c5a5ff; border-color: color-mix(in srgb, var(--meeting-accent), #252839 65%); background: radial-gradient(ellipse at 0% 0%, #332449, transparent 66%), var(--surface); }
.meeting-blacksmith, .meeting-merchant { --meeting-accent: #f2bc8e; }
.meeting-alchemist, .meeting-librarian { --meeting-accent: #9cdbcc; }
.meeting-gambler, .meeting-collector { --meeting-accent: #f3a4c3; }
.supernatural-meeting { background: radial-gradient(ellipse at 0% 0%, var(--meeting-glow), transparent 75%), var(--surface); }
.meeting-devil { --meeting-accent: #f5bb88; --meeting-glow: #4d202b; }
.meeting-monkeys-paw { --meeting-accent: #c5b0ee; --meeting-glow: #33234e; }
.supernatural-meeting .encounter-choice { border-color: color-mix(in srgb, var(--meeting-accent), #201c2b 72%); }
.pact-panel { border-color: #725449; }
.pact-panel h2 { color: #f5bb88; }
.pact-panel ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pact-panel p { margin: 2px 0 0; color: var(--muted); }
.meeting-header { display: grid; grid-template-columns: minmax(92px, 30%) minmax(0, 1fr); align-items: center; gap: clamp(12px, 3vw, 24px); }
.meeting-header .eyebrow { color: var(--meeting-accent); }
.meeting-header h2 { font-size: clamp(22px, 4vw, 38px); overflow-wrap: anywhere; }
.meeting-header blockquote, .encounter-result blockquote { margin: 6px 0 0; color: var(--ivory); font-style: italic; }
.meeting-portrait { display: block; width: 100%; max-width: 190px; height: auto; aspect-ratio: 5 / 7; object-fit: cover;
  border: 1px solid var(--meeting-accent); border-radius: 12px 12px 12px 4px; background: #1b1722; box-shadow: 0 6px 16px #08070b88; }
.encounter-choices { display: grid; gap: 8px; }
.encounter-choice, #encounter-form, .encounter-result { display: grid; gap: 8px; padding: 14px; background: #201c2b; border: 1px solid #524263; border-radius: 9px; }
.encounter-choice > p, #encounter-form > p { color: var(--muted); }
#encounter-form > [data-encounter-error] { color: #ffbab0; }
.encounter-choice > footer, .encounter-result > .button { justify-self: start; }
.encounter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.encounter-field { display: grid; gap: 4px; font-weight: 700; min-width: 0; }
.encounter-field select { width: 100%; min-height: 44px; font: inherit; }
.encounter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.interlude .button { min-height: 44px; }
.interlude :is(h2, h3):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.loading { min-height: 170px; display: grid; align-content: center; justify-items: center; gap: 13px; color: var(--muted); }
.scoreboard { padding: 16px 21px 17px; }
.scoreboard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.round-label { display: flex; gap: 9px; align-items: center; }
.round-label .eyebrow { color: var(--gold); }
.round-type, .count, .stage-caption, .rarity-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid #373c4d;
  border-radius: 5px;
  color: #c3c4ce;
  background: #242838;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .025em;
}
.round-type svg { width: 12px; height: 12px; }
.round-score { margin: 2px 0 3px; display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.round-score strong { font-size: 36px; font-weight: 850; letter-spacing: -.05em; line-height: 1.15; }
.round-score > span { color: var(--muted); font-size: 18px; font-weight: 650; }
.resources { display: flex; align-items: center; gap: 23px; }
.resources > div { padding-left: 14px; border-left: 1px solid #333746; min-width: 77px; }
.stat-label { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.pips { display: flex; gap: 5px; }
.pips i { width: 15px; height: 5px; border-radius: 8px; background: #383d4b; }
.pips.plays .filled { background: var(--jade); }
.pips.spins .filled { background: var(--blue); }
.last-play-save .pips i:first-child { background: #ffda8f; box-shadow: 0 0 8px #e7b65b90; }
.last-play-save .resource-count { color: #ffda8f; }
progress { display: block; appearance: none; width: 100%; height: 6px; border: 0; margin-top: 10px; overflow: hidden; border-radius: 20px; background: #333847; color: var(--gold); }
progress::-webkit-progress-bar { background: #333847; border-radius: 20px; }
progress::-webkit-progress-value { background: var(--progress-fill, var(--gold)); border-radius: 20px; }
progress::-moz-progress-bar { background: var(--progress-fill, var(--gold)); border-radius: 20px; }
.boss-frame {
  --boss-accent: var(--purple);
  --boss-edge: #9674a4;
  --boss-wash: #432d50;
  --boss-shadow: #272035;
  border: 3px double var(--boss-edge);
  background: linear-gradient(150deg, var(--boss-shadow), var(--surface) 65%);
}
.boss-frame.accent-jade {
  --boss-accent: var(--jade);
  --boss-edge: #619282;
  --boss-wash: #23453f;
  --boss-shadow: #182d2a;
}
.boss-frame.accent-ruby {
  --boss-accent: var(--ruby);
  --boss-edge: #b57586;
  --boss-wash: #532d3d;
  --boss-shadow: #34212c;
}
.boss-frame.accent-sapphire {
  --boss-accent: var(--blue);
  --boss-edge: #6b93bc;
  --boss-wash: #2c4261;
  --boss-shadow: #202b41;
}
.boss-frame .boss-type { margin-bottom: 5px; color: var(--boss-accent); border-color: var(--boss-edge); background: var(--inset); }
.boss-goal-meter { position: relative; margin-top: 10px; }
.hydra-goal-label { margin-top: 8px; color: var(--muted); font-size: 11px; }
.hydra-goal-label + .boss-goal-meter { margin-top: 5px; }
.boss-goal-meter progress { --progress-fill: var(--boss-accent); margin-top: 0; }
.boss-goal-notch {
  position: absolute;
  z-index: 1;
  inset-block: -2px;
  inset-inline-start: var(--boss-near-win-mark);
  width: 2px;
  background: var(--ivory);
  box-shadow: 0 0 0 1px var(--inset);
  pointer-events: none;
}
.regen-meter .boss-goal-notch { inset-inline-start: calc(100% - var(--boss-near-win-mark)); }
.regen-restored { position: absolute; inset-block: 0; border-radius: 20px; background: #b2ece2; transform-origin: left center; pointer-events: none; }
.resource-count { display: block; color: var(--jade); font-size: 14px; line-height: 15px; white-space: nowrap; }
.round-cue {
  display: block;
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid;
  border-radius: 4px;
  line-height: 1.2;
  font-size: 11px;
}
.near-win-cue { margin-top: 7px; color: var(--boss-accent); background: var(--inset); }
.danger-cue { margin-top: 5px; color: #ffd9a1; background: #3b2b24; }
.combo-cue { margin: 5px 0 0 auto; color: #b6e8da; background: #203531; }
.boss-rule, .upcoming-boss { position: relative; display: flex; gap: 11px; align-items: center; }
.boss-inspect {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: start;
}
.boss-inspect::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.boss-inspect:focus-visible { outline: none; }
.boss-inspect:focus-visible::after { outline: 2px solid #ffcd78; outline-offset: 4px; }
.boss-inspect span {
  padding: 3px 6px;
  border: 1px solid #4d4c64;
  border-radius: 4px;
  color: #d9c5e7;
  font: 650 11px/1.15 var(--sans);
}
.boss-inspect:hover span { border-color: var(--gold); color: var(--ivory); }
.boss-rule {
  margin-bottom: 12px;
  padding: 9px;
  border: 1px solid var(--boss-edge);
  border-radius: 8px;
  background: linear-gradient(108deg, var(--boss-wash), var(--boss-shadow) 75%, var(--inset));
  color: var(--ivory);
  font-size: 13px;
}
.boss-rule h2 { color: var(--boss-accent); font: 750 23px/1.15 var(--display); margin-bottom: 4px; }
.boss-portrait { flex: none; width: 54px; height: auto; border: 1px solid var(--boss-accent, #765a54); border-radius: 6px; }
.active-boss-card {
  position: relative;
  flex: none;
  width: 86px;
  padding: 3px;
  border: 1px solid var(--boss-edge);
  border-radius: 7px;
  background: var(--inset);
}
.boss-art { position: relative; display: block; overflow: hidden; border-radius: 4px; }
.boss-art .boss-portrait { width: 100%; border: 0; border-radius: inherit; }
.encore-portrait .boss-portrait { transform: scaleX(-1); }
.boss-steps { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; }
.boss-steps li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
}
.boss-steps li svg { inline-size: 13px; block-size: 13px; }
.boss-steps small { color: inherit; font-size: 10px; }
.boss-steps .active { color: var(--ivory); border-color: var(--boss-accent, var(--gold)); }
.boss-steps .done, .boss-steps .projected { color: var(--jade); border-color: var(--jade); }
.boss-instruction { margin-block: 0 8px; color: var(--muted); font-size: 12px; }
.reels.encore-reels { grid-template-columns: repeat(auto-fit, minmax(26px, 1fr)); }
.house-letter { display: flex; align-items: center; gap: 8px; margin-block: 0 8px; color: var(--gold); font-size: 13px; font-weight: 750; }
.house-letter > span > small { display: block; color: var(--muted); font-weight: 600; }
.house-letter .tile { inline-size: 44px; min-height: 44px; --tile-top: #ffe1a3; --tile-bottom: #e7b65b; --tile-edge: #a57a35; }
.house-letter .tile-letter { font-size: 23px; }
.signal-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-block-end: 6px; }
.signal-lanes[data-reel-count="7"] { grid-template-columns: 3fr 2fr 2fr; }
.signal-lanes[data-reel-count="8"] { grid-template-columns: 3fr 3fr 2fr; }
.signal-lanes span {
  padding-block: 3px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 750;
}
.signal-lanes .active { color: var(--jade); border-color: currentColor; }
.active-reel .tile { border-color: #39836c; }
.tile-pane { position: absolute; inset-inline-start: 4px; inset-block-end: 3px; font-size: clamp(8px, 2vw, 10px); font-weight: 800; }
.boss-card-crown {
  position: absolute;
  inset-block-end: 3px;
  inset-inline-end: 3px;
  display: grid;
  place-items: center;
  padding: 2px;
  border: 1px solid var(--boss-edge);
  border-radius: 4px;
  background: var(--inset);
  color: var(--boss-accent);
}
.boss-card-crown svg { width: 12px; height: 12px; }
.cue-sheen {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(115deg, transparent 30%, #fff6db48 43%, #fff6db80 49%, #fff6db35 54%, transparent 66%);
  pointer-events: none;
}
.upcoming-boss { align-items: start; }
.upcoming-boss .boss-portrait { width: 40px; }
.upcoming-heads { margin: 5px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.boss-quote { font-style: italic; }
.upcoming-boss .boss-quote { margin-top: 6px; }
.boss-live { margin-top: 9px; color: var(--boss-accent); font-size: 13px; }
.hydra-heads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.hydra-head {
  --progress-fill: var(--ruby);
  background: #241e2b;
  border: 1px solid #554051;
  border-radius: 7px;
  padding: 7px 8px;
}
.hydra-head > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; justify-content: space-between; }
.hydra-head strong { font-size: 12px; }
.hydra-head span { white-space: nowrap; font-size: 10px; color: var(--muted); }
.hydra-head progress { margin-top: 5px; height: 5px; }
.hydra-head small { display: block; margin-top: 4px; color: #e6b4c0; font-size: 11px; }
.hydra-head.targeted { border-color: var(--ruby); }
.hydra-head.defeated { border-color: #416b61; }
.hydra-head.defeated small { color: var(--jade); }
.boss-alphabet { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; margin-top: 11px; }
.boss-alphabet span { display: grid; place-items: center; min-height: 22px; border: 1px solid #414754; border-radius: 4px; color: #a6a9b8; background: #222632; font-weight: 800; font-size: 10px; }
.boss-alphabet .collected { background: #294640; color: #bef0df; border-color: #74b8a9; }
.boss-alphabet .incoming { color: #ffdfa5; border: 1px dashed var(--gold); }
.boss-alphabet .just-collected { color: #ffdf9e; background: #473727; border-color: var(--gold); }

.cabinet { padding: 15px 16px 12px; }
.builder {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 111px;
  padding: 10px 13px;
  border: 1px solid #2b3040;
  border-radius: 8px;
  background: var(--inset);
}
#game:focus-visible:has(.builder) { outline: none; }
#game:focus-visible .builder { outline: 2px solid #ffcd78; outline-offset: 2px; }
.builder-heading, .reel-heading, .word-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.builder-heading { min-height: 20px; }
.builder-heading .eyebrow, .reel-heading .eyebrow { color: #c0c2d0; }
.word-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 34px; margin: 4px 0; }
.blank-word { display: flex; gap: 5px; }
.blank-word i {
  display: block;
  width: 28px;
  height: 31px;
  background: #191c27;
  border: 1px dashed #3c4153;
  border-radius: 4px;
}
.word-chip {
  display: grid;
  place-items: center;
  width: 32px;
  height: 33px;
  padding: 0;
  border: 1px solid #806339;
  border-radius: 5px;
  background: #3c2e22;
  color: #ffdf9c;
  font-weight: 850;
  font-size: 17px;
}
.word-chip.scored { border-color: #4b816e; color: #afe6cd; background: #253d38; }
.word-caption { min-height: 20px; font-size: 12px; color: var(--muted); }
.word-caption > span { display: flex; align-items: center; gap: 4px; }
.word-caption svg { width: 13px; height: 13px; }
.word-caption.valid { color: var(--jade); }
.word-caption.invalid { color: var(--ruby); }
.equation { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: #a3a7ba; font-weight: 700; }
.score-box {
  min-width: 65px;
  min-height: 58px;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  padding: 5px 8px;
}
.score-box span { font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.score-box strong { font-size: 20px; font-weight: 850; line-height: 1; }
.score-box.points { color: var(--blue); background: #1c2b3f; border-color: #345473; }
.score-box.mult { color: var(--ruby); background: #382431; border-color: #69404e; }
.score-box.total { position: relative; color: #f4c876; background: #392e22; border-color: #6a5232; }
button.score-box.total { cursor: pointer; border-color: #a58349; }
button.score-box.total > span { display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
button.score-box.total svg { width: 11px; height: 11px; }
button.score-box.total:hover, button.score-box.total:focus-visible { border-color: var(--gold); background: #483722; }
button.score-box.total:active { background: #554127; }
.big-score .builder { border-color: #8b6b3c; }
.big-score .score-box.total { border-color: var(--gold); }
.full-house .builder { border-color: #ae8546; }
.full-house .word-chip.scored { background: #392e22; color: #ffe0a0; border-color: #916e3a; }
.full-house-label, .result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid #98713c;
  border-radius: 4px;
  color: #ffdb91;
  background: #362a20;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.full-house-label svg, .result-badge svg { width: 12px; height: 12px; }
.word-chip-with-effects { display: flex; align-items: center; gap: 3px; }
.lucky-word-chip .word-chip.scored { color: #ffdfa0; border-color: #d0a355; background: #48362a; }
.word-chip-bonuses { display: grid; gap: 1px; text-align: center; }
.word-chip-bonuses strong { padding: 0 3px; border: 1px solid #876939; border-radius: 3px; color: #ffda89; background: #2c241d; font-size: 10px; line-height: 1.25; white-space: nowrap; }
.crystallised-word-chip .word-chip.scored, .word-chip-bonuses .crystallised-tag { color: #e7d5ff; border-color: #a482c7; background: #3d2d54; }
.crystallised-word-chip .word-chip.scored { position: relative; overflow: hidden; }
.lucky-double .word-chip.scored { box-shadow: 0 0 9px #e7b65b67; }
.score-halo { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 22px #e7b65b4d; pointer-events: none; }
.score-burst { position: absolute; inset: 0; pointer-events: none; }
.score-burst > span { position: absolute; top: 48%; left: 48%; color: var(--result-accent, #ffe39b); font-size: 12px; line-height: 1; text-shadow: 0 0 5px currentColor; }
.activation-strip { --chip-padding-block: 3px; display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 11px; }
.cabinet > .activation-strip { min-block-size: calc(1lh + 2 * var(--chip-padding-block) + 2px); }
.result-panel .activation-strip { justify-content: center; margin: 0; }
.effect-points { --effect-color: var(--blue); --effect-surface: #202e42; }
.effect-mult { --effect-color: var(--ruby); --effect-surface: #372634; }
.effect-times { --effect-color: var(--purple); --effect-surface: #332741; }
.activation-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: var(--chip-padding-block) 7px;
  border: 1px solid #474258;
  border-radius: 5px;
  background: var(--effect-surface);
  color: var(--text);
}
.activation-chip svg { width: 11px; height: 11px; color: var(--effect-color); }
.activation-chip strong { color: var(--effect-color); white-space: nowrap; }
.reel-heading { padding: 11px 2px 6px; }
.reel-tools { display: flex; gap: 10px; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 5px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.text-button:hover:not(:disabled) { color: var(--ivory); }
.text-button:disabled { opacity: .55; }
.text-button.compact { font-size: 11px; padding: 2px 0; }
.amber { color: var(--gold); }
.reel-well {
  padding: 8px;
  background: #11141d;
  border: 1px solid #33394a;
  border-radius: 8px;
  box-shadow: inset 0 3px 8px #080a0f9a;
}
.boss-frame .reel-well {
  border-color: var(--boss-edge);
  border-top-width: 3px;
  background: linear-gradient(var(--boss-wash), var(--boss-shadow) 38%, var(--inset));
}
.reels { display: grid; grid-template-columns: repeat(var(--reel-count, 7), minmax(0, 1fr)); gap: 7px; }
.reels-8 { --reel-count: 8; }
.reels-9 { --reel-count: 9; }
.reel { min-width: 0; display: grid; gap: 5px; }
.tile {
  --tile-top: #f6ecd6;
  --tile-bottom: #e6d4ae;
  --tile-edge: #a99979;
  position: relative;
  width: 100%;
  min-height: 77px;
  display: grid;
  place-items: center;
  padding: 0 4px 3px;
  overflow: hidden;
  background: linear-gradient(var(--tile-top), var(--tile-top) 12%, var(--tile-bottom) 89%);
  color: #21202a;
  border: 1px solid var(--tile-edge);
  border-bottom-width: 4px;
  border-radius: 7px;
  box-shadow: inset 0 1px #fff9e5, inset 0 -2px #130b0a13, 0 3px 5px #08080dbf;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid #6e583a30;
  border-radius: 4px;
  pointer-events: none;
}
button.tile:hover:not(:disabled) { filter: brightness(1.07); }
button.tile:active:not(:disabled) { box-shadow: inset 0 2px 5px #19110870; }
.tile.held {
  --tile-top: #b6e7d6;
  --tile-bottom: #7dbdaa;
  --tile-edge: #509784;
}
.tile.selected {
  --tile-top: #f8d58b;
  --tile-bottom: #e7b65b;
  --tile-edge: #b07a2e;
  outline: 2px solid #edba66;
  outline-offset: 1px;
}
.tile.held.selected { outline-color: var(--jade); }
.tile:focus-visible { outline: 2px solid #fff5de; outline-offset: 2px; }
.tile-letter { font: 800 clamp(25px, 4vw, 40px)/1 var(--display); }
.tile-value { position: absolute; bottom: 4px; right: 7px; font-size: 10px; font-weight: 800; }
.tile-enhancement { position: absolute; top: 5px; left: 6px; font-size: 11px; font-weight: 900; }
.tile-fortune { position: absolute; top: 5px; right: 5px; display: flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 850; }
.tile-fortune > span { font-size: 9px; }
.tile-blocked { position: absolute; bottom: 4px; left: 6px; font-size: 13px; line-height: 1; font-weight: 900; color: #572646; }
.fortune-tile::after { border-style: dashed; border-color: #503d30a8; }
.hot-tile { box-shadow: 0 0 0 2px #e8663d, 0 0 12px #e8663d66; }
.tile-hot { position: absolute; top: 5px; left: 5px; padding: 0 3px; border-radius: 3px; background: #b8432a; color: #fff4e8; font-size: 9px; font-weight: 850; line-height: 13px; text-transform: uppercase; }
.joker-placeholder { container-type: inline-size; display: grid; place-items: center; padding: 10%; border: 1px solid var(--rarity, var(--line)); text-align: center; color: var(--ivory); background: radial-gradient(circle at 50% 35%, #2b2433, #141219 70%); }
.placeholder-name { font: 700 clamp(10px, 13cqi, 22px)/1.15 var(--display); }
.placeholder-initials { display: none; font: 700 clamp(12px, 34cqi, 20px)/1 var(--display); }
@container (max-width: 90px) {
  .placeholder-name { display: none; }
  .placeholder-initials { display: block; }
}
/* Sized by class: the site CSP blocks inline style attributes. */
.consumable-placeholder.is-detailed { inline-size: 120px; block-size: 120px; font-size: 48px; }
.consumable-placeholder { inline-size: 40px; block-size: 40px; display: grid; place-items: center; font: 700 20px/1 var(--display); color: var(--gold); background: radial-gradient(circle, #2b2433, #12141e 75%); }
.enh-bonus { --tile-top: #d1e8fb; --tile-bottom: #8fbbeb; --tile-edge: #6698cd; }
.enh-mult { --tile-top: #ffd0d7; --tile-bottom: #ea899c; --tile-edge: #b15b75; }
.enh-gold { --tile-top: #ffe0a3; --tile-bottom: #dca94d; --tile-edge: #a57a35; }
.enh-steel { --tile-top: #e7edf9; --tile-bottom: #aebdd8; --tile-edge: #8390aa; }
.enh-echo { --tile-top: #f1dafd; --tile-bottom: #c4a1e1; --tile-edge: #9973be; }
.enh-glass { --tile-top: #e1f6ff; --tile-bottom: #9ccbdc; --tile-edge: #698fa7; }
.enh-lucky { --tile-top: #d6f5c6; --tile-bottom: #8dba78; --tile-edge: #5e8a56; }
.enh-diamond { --tile-top: #f0efff; --tile-bottom: #c5bbec; --tile-edge: #8e78c5; }
@media (forced-colors: active) {
  .fortune-tile::after { border-color: ButtonText; }
  .hot-tile { outline: 2px solid Highlight; box-shadow: none; }
  .tile-hot { background: Highlight; color: HighlightText; }
  .boss-goal-notch { border-inline-start: 2px solid CanvasText; }
  .tile-blocked { color: ButtonText; }
}
.hold-button {
  min-width: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px;
  background: #202534;
  border: 1px solid #343a4a;
  border-radius: 5px;
  color: #b3b7c8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hold-button svg { width: 13px; height: 13px; }
.hold-button:hover:not(:disabled) { border-color: var(--jade); color: #d4e4dc; }
.hold-button.is-held { color: #9de3ce; border-color: #508d80; background: #233b3b; }
.game-actions { display: grid; grid-template-columns: 1fr 1.24fr; gap: 9px; margin-top: 11px; }
.button {
  min-height: 42px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #3b4256;
  border-radius: 7px;
  background: #282d3d;
  color: var(--text);
  font-weight: 750;
  font-size: 13px;
  line-height: 1.15;
}
.button:hover:not(:disabled) { background: #333849; border-color: #8e7956; }
.button:disabled { color: #a6aaba; opacity: .65; }
.button.primary {
  color: #211913;
  background: linear-gradient(#f0c578, #dfaa50);
  border-color: #efc67c;
  box-shadow: inset 0 1px #ffe2aa9e, 0 2px #785324;
}
.button.primary:hover:not(:disabled) { border-color: #ffde9b; background: #f4c779; }
.button.primary.round-clear {
  color: #132c25;
  background: linear-gradient(#a5e6d3, var(--jade));
  border-color: #a5e6d3;
  box-shadow: inset 0 1px #e2fff3ad, 0 2px #407e6f;
}
.button.primary.round-clear:hover:not(:disabled) { border-color: #c1f2e4; background: #a5e6d3; }
.button.primary.round-shortfall {
  color: #321522;
  background: linear-gradient(#f6aec1, #e4839f);
  border-color: #f5adc1;
  box-shadow: inset 0 1px #ffe4eead, 0 2px #82465f;
}
.button.primary.round-shortfall:hover:not(:disabled) { border-color: #ffd1df; background: #f6aec1; }
.button.primary:disabled {
  color: #c0a983;
  border-color: #58462f;
  background: #3b3025;
  box-shadow: none;
  opacity: 1;
}
.game-actions .button { min-height: 49px; }
.game-actions .button > span { display: block; }
.game-actions small { display: block; margin-top: 2px; font-size: 10px; font-weight: 650; opacity: .86; }
.game-actions .spin-button svg { color: var(--blue); }
.keyboard-hints { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; color: #a1a5b6; margin: 9px 0 0; font-size: 11px; }
.keyboard-hints svg { width: 16px; height: 16px; margin-right: -6px; }
kbd { font: 720 10px/1 var(--sans); color: #c6c9d3; padding: 2px 4px; border: 1px solid #42485a; border-radius: 3px; background: #252937; white-space: nowrap; }

.side-panel { padding: 15px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 12px; }
.panel-heading h2 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; }
.panel-heading h2 svg { width: 17px; height: 17px; color: var(--gold); }
.stage-caption { white-space: nowrap; color: #d7c2a0; border-color: #524639; background: #302920; }
.round-track, .track-labels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 7px; }
.round-track { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.track-step { display: grid; place-items: center; min-width: 0; width: 100%; aspect-ratio: 1; border-radius: 4px; font-size: 10px; font-weight: 800; border: 1px solid #373c4c; color: #b2b5c3; background: #262a37; }
.track-step svg { width: 12px; height: 12px; }
.track-step.track-boss { color: #caa8dd; background: #30273c; border-color: #4e3e62; }
.track-step.current { color: #241a11; background: var(--gold); border-color: #f5cb85; box-shadow: 0 0 12px #e7b65b35; }
.track-step.done { color: var(--jade); border-color: #386359; background: #213835; }
.track-labels { margin-top: 7px; color: var(--muted); font-size: 10px; font-weight: 650; text-align: center; }
.joker-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: var(--joker-aspect-ratio);
  object-fit: contain;
  background: #141219;
}
.joker-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.joker-reserve { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 12px; }
.joker-reserve .side-note { margin: 0; }
.joker-sale-label {
  position: absolute;
  z-index: 2;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  padding: 2px 3px;
  border-radius: 4px;
  background: #161223;
  color: #f5dfad;
  font-size: .65rem;
  line-height: 1;
}
.joker-sale-label .coins { gap: 2px; }
.joker-sale-label .coins svg { width: 10px; height: 10px; }
.joker-edition-label {
  position: absolute;
  inset-inline: 2px;
  inset-block-end: 2px;
  padding: 2px;
  border-radius: 4px;
  background: #161223;
  color: #f5dfad;
  font-size: .65rem;
  text-align: center;
}
.joker-slot {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: var(--joker-aspect-ratio);
  place-items: center;
  padding: 0;
  min-width: 0;
  border: 1px solid #424557;
  border-radius: 6px;
  overflow: hidden;
}
.joker-slot.empty {
  background: repeating-linear-gradient(135deg, #1f2330, #1f2330 4px, #232734 4px, #232734 5px);
  color: #85899d;
  font-size: 22px;
  border-style: dashed;
}
.joker-slot.empty::before { content: ""; position: absolute; inset: 4px; border: 1px solid #46495b59; border-radius: 3px; }
.joker-slot.owned { border-color: var(--rarity); background: #222634; box-shadow: 0 2px 6px #0f101a; }
.joker-slot.owned:hover { filter: brightness(1.2); }
.joker-drag-hint { display: none; }
@media (any-hover: hover) and (any-pointer: fine) {
  .joker-drag-hint { display: inline; }
  [data-joker-reorder] .joker-slot.owned { cursor: grab; }
}
[data-joker-reorder] .joker-slot.joker-dragging { cursor: grabbing; opacity: 0.5; }
.joker-slot[data-joker-drop]::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset-block: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 0 1px #141219;
  pointer-events: none;
}
.joker-slot[data-joker-drop="before"]::after { inset-inline-start: 1px; }
.joker-slot[data-joker-drop="after"]::after { inset-inline-end: 1px; }
@media (forced-colors: active) {
  .joker-slot[data-joker-drop]::after { forced-color-adjust: none; background: Highlight; }
}
.joker-slot .joker-portrait { height: 100%; }
.joker-suppressed > :first-child { opacity: .4; }
.joker-suppressed-label { position: absolute; inset: auto 0 0; color: var(--ivory); background: #242638; font-size: .7rem; }
.joker-slot.activated { border-color: var(--effect-color); box-shadow: 0 0 0 1px var(--effect-color); }
.joker-shine {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(145deg, var(--effect-color), transparent 63%);
}
.joker-spark {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 2;
  right: 2px;
  top: 2px;
  padding: 3px;
  border-radius: 4px;
  background: #151824;
  color: var(--effect-color);
}
.joker-spark svg { width: 12px; height: 12px; }
.rarity-common { --rarity: #82c6b1; --rarity-bg: #233b36; }
.rarity-uncommon { --rarity: #f0c67e; --rarity-bg: #433423; }
.rarity-rare { --rarity: #d4a6f2; --rarity-bg: #3b2b4d; }
.rarity-legendary { --rarity: #ffab8e; --rarity-bg: #502d2e; }
.rarity-tag { color: var(--rarity); border-color: var(--rarity); background: var(--rarity-bg); text-transform: capitalize; }
.side-note { color: var(--muted); font-size: 12px; }
.jokers-panel .side-note { margin-top: 10px; }
.shop-callout {
  min-height: 118px;
  overflow: hidden;
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: center;
  background: #24201e;
  border: 1px solid #574533;
  border-radius: 12px;
  padding: 12px 15px;
}
.shop-callout::before { position: absolute; content: ""; inset: 0; z-index: -1; background: linear-gradient(90deg, #27211f 46%, #27211fb8 65%, #27211f10); }
.shop-callout img { position: absolute; z-index: -2; width: 48%; height: 100%; right: 0; inset-block: 0; object-fit: cover; object-position: center 52%; }
.shop-callout h2 { font: 750 21px/1.15 var(--display); color: var(--ivory); }
.shop-callout p { color: #d0c4b3; margin: 4px 0 8px; font-size: 13px; }
.shop-callout button svg { order: 2; width: 14px; height: 14px; }
.upcoming strong { color: var(--purple); }
.upcoming p, .word-log > div:last-child { margin-top: 4px; color: var(--muted); font-size: 12px; }
.word-log > div:last-child { display: flex; gap: 5px; flex-wrap: wrap; }
.word-log > div:last-child span { border-radius: 4px; border: 1px solid #3d4357; padding: 4px 6px; }
.coins { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--gold); }
.coins svg { width: 15px; height: 15px; }
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 11px 1px 18px;
  border-top: 1px solid #2a2e39;
}
.footer-tools { gap: 22px; flex-wrap: wrap; }
.footer .text-button { min-height: 34px; font-size: 12px; }
.footer .text-button svg { width: 15px; height: 15px; color: var(--gold); }
.footer-mark { display: flex; align-items: center; gap: 5px; min-block-size: 24px; color: #999dac; font-size: 11px; text-underline-offset: .25em; }
.footer-mark:hover { color: var(--gold); }
.footer-mark:focus-visible { outline-offset: 3px; }
.footer-mark span { color: var(--gold); }
.save-status { margin-top: 13px; color: var(--gold); }

.result-panel { min-height: 330px; padding: 22px; text-align: center; display: grid; justify-items: center; align-content: center; gap: 10px; }
.result-panel.success { background: radial-gradient(ellipse at 50% 0%, var(--result-wash), transparent 70%), var(--surface); border-color: var(--result-edge); }
.result-round { --result-accent: #a2e1cc; --result-edge: #446d60; --result-wash: #26433d; }
.result-boss { --result-accent: #dfb9f5; --result-edge: #725383; --result-wash: #3d2a51; }
.result-victory { --result-accent: #ffdf99; --result-edge: #936e3d; --result-wash: #5a4023; }
.result-emblem { position: relative; isolation: isolate; }
.result-icon { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #745b36; border-radius: 12px; background: #372a20; color: var(--gold); }
.result-icon svg { width: 32px; height: 32px; }
.success .result-icon { border-color: var(--result-edge); background: var(--result-wash); color: var(--result-accent); }
.result-round .result-icon { border-radius: 50%; }
.result-victory .result-icon { width: 70px; height: 70px; }
.result-victory .result-icon svg { width: 38px; height: 38px; }
.result-icon.boss-result-icon { position: relative; width: 78px; height: auto; padding: 3px; border-radius: 9px; }
.boss-result-icon .boss-portrait { width: 100%; border-color: var(--result-edge); }
.defeated-stamp {
  position: absolute;
  inset-inline: -5px;
  inset-block-end: 12%;
  padding: 2px;
  transform: rotate(-9deg);
  border: 2px double var(--result-accent);
  border-radius: 4px;
  background: #211b2a;
  color: var(--result-accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.result-victory .result-emblem::before { content: ""; position: absolute; z-index: -1; inset: -6px; border: 1px solid var(--result-edge); border-radius: 13px; transform: rotate(45deg); }
.loss .result-icon { color: var(--ruby); border-color: #774658; background: #382533; }
.result-panel h2, .shop-heading h2 { font: 800 35px/1.12 var(--display); letter-spacing: -.035em; }
.result-panel.success h2 { color: var(--result-accent); }
.result-panel p { color: var(--muted); }
.result-panel .word-chips, .result-badges { justify-content: center; }
.result-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.reward { display: grid; gap: 2px; text-align: center; margin: 3px 0; }
.reward strong { display: flex; gap: 5px; align-items: center; justify-content: center; }
.reward > span { font-size: 12px; color: var(--muted); }
.result-actions, .shop-actions, .dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 7px; }
.shop-panel { padding: 20px; }
.shop-heading { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-bottom: 17px; }
.shop-heading .eyebrow { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.shop-heading .eyebrow svg { width: 14px; height: 14px; }
.shop-heading > .coins { padding: 6px 9px; border: 1px solid #614e33; border-radius: 6px; background: #31281e; font-size: 17px; font-weight: 800; }
.starter-shop .shop-heading { margin-bottom: 7px; }
.starter-guide { margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.starter-guide strong { color: var(--ivory); }
.shop-notice {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid #614e33;
  border-radius: 6px;
  background: #31281e;
  color: var(--ivory);
  font-size: 13px;
}
.button.arcade-entry {
  width: 100%;
  min-block-size: 64px;
  margin-bottom: 12px;
  padding: 10px 13px;
  gap: 8px 11px;
  flex-wrap: wrap;
  border-color: #aa7d42;
  background: linear-gradient(110deg, #3a2938, #252134 78%);
  text-align: start;
  white-space: normal;
}
.button.arcade-entry:hover:not(:disabled) { border-color: #f5c981; background: #3b2c42; }
.arcade-entry-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 35px;
  aspect-ratio: 1;
  border: 1px solid #a57843;
  border-radius: 7px;
  background: #211925;
  color: var(--gold);
}
.arcade-entry-copy { display: grid; flex: 1 1 9.5rem; min-width: 0; }
.arcade-entry-copy strong { color: #fbd78f; font: 800 20px/1.15 var(--display); }
.arcade-entry-copy small { color: var(--ivory); font-size: 12px; }
.arcade-entry-action {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: auto;
  color: #fbd78f;
  font-size: 13px;
}
.shop-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shop-stock + .shop-stock { margin-block-start: 16px; }
.shop-stock > h3 { margin-block-end: 7px; }
.offer { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #45485c; border-top-color: var(--rarity, #6f5b42); border-radius: 8px; background: #232735; }
.jackpot-offer { position: relative; border-color: #ad8548; background: linear-gradient(#352d25, #232735 65%); }
.jackpot-foil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, #ffd99558 50%, transparent 70%); }
.offer-art { width: min(calc(100% - 18px), 156px); margin: 9px auto 0; }
.offer-art .joker-portrait { border: 1px solid var(--rarity); border-radius: 6px; }
.offer-body { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: 1; padding: 9px; }
.offer-body .rarity-tag { align-self: flex-start; }
.offer h3 { color: var(--ivory); font-size: 14px; line-height: 1.15; }
.offer p { color: #bac0ce; font-size: 12px; flex: 1; }
.offer .purchase { min-height: 34px; justify-content: space-between; }
.offer-sold { background: var(--inset); }
.offer-sold .offer-art { opacity: .58; }
.offer .sold-label { display: flex; align-items: center; justify-content: flex-start; gap: 6px; padding-inline: 9px; color: var(--jade); font-size: 12px; font-weight: 800; }
.sold-label svg { width: 14px; height: 14px; }
.sold-trade { visibility: hidden; }
.shop-receipt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 14px; padding: 8px; border: 1px solid #4b816e; border-radius: 8px; background: #20332f; color: #afe6cd; font-size: 13px; }
.shop-receipt > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.shop-receipt .tile { width: 34px; min-height: 36px; }
.shop-receipt .tile-letter { font-size: 18px; }
.receipt-bag { margin-inline-start: auto; }
.starter-offers .purchase .coins { color: inherit; }
.extra-offer { flex-direction: row; }
.offer-icon { padding: 9px 0 0 9px; color: var(--purple); }
.offer-icon + .offer-body { padding-inline-start: 7px; }
.consumable-title { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.consumable-art { flex: none; border: 1px solid #6f5b42; border-radius: 6px; background: #12141e; }
.shop-actions { justify-content: space-between; margin-top: 15px; }
.shop-actions .primary { margin-left: auto; }
.pack-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 15px; }
.pack-fieldset { padding: 0; border: 0; margin: 12px 0 0; min-inline-size: 0; }
.pack-fieldset legend { color: var(--ivory); }
.pack-choice { display: grid; gap: 5px; justify-items: center; padding: 10px 6px; color: var(--text); border-radius: 8px; border: 1px solid var(--line); background: var(--surface-raised); }
.pack-choice:hover, .pack-choice:has(input:checked) { border-color: var(--gold); }
.pack-choice input { min-inline-size: 24px; min-block-size: 24px; accent-color: var(--gold); }
.pack-choice .tile { width: min(100%, 72px); }
.pack-choice > span:last-child:not(.tile) { color: var(--muted); font-size: 12px; }
#pack-form .pack-choice { text-align: center; }
#pack-form .pack-choice:has(input:enabled) { cursor: pointer; }
#pack-form .pack-choice:has(input:checked) { border-color: var(--gold); background: #392e22; }
#pack-form .pack-choice:has(input:focus-visible) { outline: 2px solid #ffcd78; outline-offset: 2px; }
#pack-form .pack-choice:has(input:enabled):active { background: #483722; }
#pack-form .pack-choice:has(input:disabled) { opacity: .65; }
.consumable-panel { margin-block-start: 12px; }
.consumable-slots, .consumable-reels {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
.consumable-reels { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); margin-block: 8px 12px; }
.consumable-slot { min-block-size: 44px; justify-content: flex-start; padding-inline: 9px; text-align: start; }
.consumable-slot strong, .consumable-slot small { display: block; }
.consumable-slot small { color: var(--muted); }
.consumable-intro { display: flex; align-items: center; gap: 12px; }
.gem-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-block: 8px 12px; }
.gem-choices .pack-choice { text-align: center; cursor: pointer; }
.gem-choices .pack-choice:has(:focus-visible) { outline: 2px solid #ffcd78; }
.mechanical-proposal { display: grid; justify-items: start; gap: 8px; margin-block-start: 12px; padding: 10px 12px; background: var(--inset); border-radius: 8px; }
.mechanical-proposal h3 { color: var(--gold); font-size: 22px; }
.mechanical-proposal p { color: var(--muted); font-size: 13px; }
.dice-panel > header { margin-block-end: 12px; }
.dice-panel h2 { font: 750 20px/1.2 var(--display); }
.dice-racks { display: grid; gap: 10px; }
.dice-rack { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); background: var(--inset); border-radius: 8px; }
.dice-rack > button { justify-self: end; }
.dice-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.dice-tiles .tile { min-block-size: 46px; border-bottom-width: 2px; }
.dice-tiles .tile-letter { font-size: clamp(16px, 5vw, 25px); }
.dice-tiles .tile-value { inset-inline-end: 4px; inset-block-end: 2px; }
.dice-held { display: block; text-align: center; color: var(--jade); font-size: 10px; }
.dice-tiles .tile-fortune > span { display: none; }
#consumable-form .bag-field { margin-block: 8px; }
@media (pointer: coarse) {
  #consumable-form select, #consumable-form .pack-choice, #consumable-form button { min-block-size: 44px; }
}
.tile-picker {
  min-inline-size: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}
.tile-picker legend { padding: 0; color: var(--ivory); font-weight: 750; }
.tile-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  align-items: stretch;
  gap: 6px;
  max-block-size: clamp(9rem, 38dvh, 21rem);
  overflow-y: auto;
  overscroll-behavior-block: contain;
  scrollbar-gutter: stable;
  padding: 5px;
  margin-block-start: 4px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tile-stack { position: relative; display: flex; flex-direction: column; gap: 3px; min-inline-size: 0; }
.tile-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-block-size: 74px;
  padding: 4px 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  text-align: center;
  cursor: pointer;
}
.tile-choice-art { display: block; position: relative; inline-size: 41px; }
.tile-choice-art .tile, .tile-edit-result .tile { min-height: 35px; border-bottom-width: 2px; }
.tile-choice-art .tile-letter, .tile-edit-result .tile-letter { font-size: 21px; }
.tile-choice-art .tile-value, .tile-edit-result .tile-value { right: 3px; bottom: 2px; font-size: 9px; }
.tile-choice-art .tile-enhancement, .tile-edit-result .tile-enhancement { top: 2px; left: 3px; font-size: 9px; }
.tile-choice-check {
  visibility: hidden;
  position: absolute;
  inset: -3px -10px auto auto;
  display: grid;
  place-items: center;
  inline-size: 17px;
  block-size: 17px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--gold);
  background: var(--inset);
}
.tile-choice-check svg { inline-size: 13px; block-size: 13px; }
.tile-choice-count, .tile-choice-enhancement { font-size: 11px; line-height: 1.2; }
.tile-choice-count { color: var(--muted); }
.tile-choice-enhancement { color: var(--ivory); overflow-wrap: anywhere; }
.tile-pick-input:enabled + .tile-choice:hover { border-color: var(--gold); }
.tile-pick-input:enabled + .tile-choice:active { background: var(--inset); }
.tile-pick-input:checked + .tile-choice { border-color: var(--gold); background: #392e22; }
.tile-pick-input:checked + .tile-choice .tile-choice-check { visibility: visible; }
.tile-pick-input:focus-visible + .tile-choice { outline: 2px solid #ffcd78; outline-offset: 2px; }
.tile-pick-input:disabled + .tile-choice { opacity: .72; cursor: default; }
.tile-quantity { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 3px; text-align: center; }
.tile-quantity button {
  min-inline-size: 26px;
  min-block-size: 34px;
  padding: 0;
  background: var(--surface-raised);
  color: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
}
.tile-quantity button:hover:not([aria-disabled="true"]) { border-color: var(--gold); }
.tile-quantity button[aria-disabled="true"] { color: var(--muted); opacity: .6; cursor: default; }
.tile-quantity span { min-inline-size: 1ch; color: var(--gold); font-weight: 750; }
.tile-picker-footer { margin-block-start: 8px; }
.tile-picker-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.tile-pick-status { color: var(--muted); font-size: 13px; font-weight: 700; }
.tile-picker-footer .side-note:not(:empty) { margin-block: 4px 8px; color: #e9c993; }
.tile-edit-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-block-end: 8px; }
.tile-edit-preview > strong { color: var(--ivory); font-size: 12px; }
.tile-edit-result { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.tile-edit-result .tile { inline-size: 34px; }
.tile-quantity[hidden], .tile-edit-preview[hidden] { display: none; }
@media (max-width: 560px) {
  #consumable-form:has(.tile-picker) .consumable-intro .consumable-art { inline-size: 76px; block-size: 76px; }
  .tile-picker-grid { max-block-size: clamp(9rem, 43dvh, 21rem); }
  .tile-edit-preview > strong { flex-basis: 100%; }
}
@media (forced-colors: active) {
  .tile-pick-input:checked + .tile-choice { border-color: Highlight; }
  .tile-pick-input:focus-visible + .tile-choice { outline-color: CanvasText; }
}

dialog { max-width: min(570px, calc(100% - 26px)); width: 100%; max-height: calc(100% - 26px); padding: 0; background: #1a1d28; color: var(--text); border: 1px solid #61503a; border-radius: 14px; box-shadow: 0 20px 65px #04060cba; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: #080a11bb; overflow: hidden; overscroll-behavior: contain; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 19px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font: 770 27px/1.1 var(--display); }
.dialog-body { padding: 16px 19px 20px; }
.dialog-body p + p, .dialog-body h3 { margin-top: 10px; }
#dialog[data-kind="arcade"] {
  max-width: min(620px, calc(100% - 18px));
  border-color: #9d713f;
  background: #1a1825;
  overscroll-behavior: contain;
}
#dialog[data-kind="arcade"] .dialog-head {
  position: absolute;
  z-index: 1;
  inset-block-start: 8px;
  inset-inline-end: 10px;
  padding: 0;
  border: 0;
}
#dialog[data-kind="arcade"] .dialog-body { padding: 10px 10px 14px; }
.arcade-cabinet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.arcade-meter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-block-size: 34px;
  padding-inline-end: 44px;
  color: #efcf9d;
  font-weight: 700;
}
.arcade-face {
  --cabinet-art: url("/assets/lucky-lexicon-cabinet.webp");
  --cabinet-sign: #ffdda0;
  --cabinet-glow: #f4a34b9c;
  --cabinet-edge: #9c7546;
  --cabinet-nudge: #292237;
  --cabinet-nudge-hover: #453145;
  position: relative;
  container-type: inline-size;
  inline-size: 100%;
  aspect-ratio: 3 / 2;
  min-block-size: 250px;
  background: #171018 var(--cabinet-art) center / 100% 100% no-repeat;
  border-radius: 8px;
}
.arcade-face[data-cabinet="jade"] {
  --cabinet-art: url("/assets/lucky-lexicon-cabinet-jade.webp");
  --cabinet-sign: #fff0b9;
  --cabinet-glow: #e1b16c9c;
  --cabinet-edge: #af824b;
  --cabinet-nudge: #132f28;
  --cabinet-nudge-hover: #22483b;
}
.arcade-face[data-cabinet="cobalt"] {
  --cabinet-art: url("/assets/lucky-lexicon-cabinet-cobalt.webp");
  --cabinet-sign: #d9f6ff;
  --cabinet-glow: #68cbff9c;
  --cabinet-edge: #8299b2;
  --cabinet-nudge: #1c2a44;
  --cabinet-nudge-hover: #2a456a;
}
/* These insets follow the marquee and reel window in the cabinet artwork. */
.arcade-marquee {
  position: absolute;
  inset: 11.5% 15.5% 75%;
  display: grid;
  place-items: center;
  color: var(--cabinet-sign);
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 0 12px var(--cabinet-glow);
  font: 800 clamp(16px, 6cqi, 39px)/1.05 var(--display);
  letter-spacing: .035em;
}
.arcade-reels {
  position: absolute;
  inset: 35% 10% 20.5%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1px;
}
.arcade-reel {
  display: grid;
  flex: 1 1 0;
  max-inline-size: 84px;
  min-inline-size: 0;
  gap: 2px;
  border-radius: 6px;
  background: #14111a;
}
@container (min-width: 24rem) {
  .arcade-reels { gap: 6px; }
  .arcade-reel { padding: 3px; border: 1px solid #674a34; }
}
.arcade-letter, .arcade-nudge {
  display: grid;
  place-items: center;
  min-inline-size: 0;
  inline-size: 100%;
  border: 1px solid var(--cabinet-edge);
  border-radius: 5px;
}
.arcade-letter {
  min-block-size: clamp(44px, 10cqi, 64px);
  overflow: hidden;
  background: linear-gradient(#a87640, #f4dca7 36%, #f9e7ba 68%, #b5834b);
  color: #37221d;
  box-shadow: inset 0 0 0 2px #5a371d40;
  font: 800 clamp(22px, 7cqi, 42px)/1 var(--display);
}
.arcade-letter[aria-pressed="true"] {
  background: #f7b960;
  color: #271c27;
  box-shadow: inset 0 0 0 3px #88472e;
}
.arcade-roll-window { position: relative; }
.arcade-roll-strip { position: absolute; inset: 0; }
.arcade-roll-strip > span { display: grid; place-items: center; block-size: 100%; }
.arcade-roll-window[data-rolling] { color: #684630; }
.arcade-roll-spacer { visibility: hidden; }
.arcade-nudge {
  min-block-size: clamp(30px, 6cqi, 38px);
  white-space: nowrap;
  background: var(--cabinet-nudge);
  color: var(--cabinet-sign);
  font-size: 12px;
}
.arcade-nudge:disabled { border-color: #4b3b43; color: #c2b1ac; }
.arcade-nudge:not(:disabled):hover { background: var(--cabinet-nudge-hover); }
@media (pointer: coarse) {
  .arcade-face { min-block-size: 320px; }
  .arcade-nudge, .arcade-deck .button { min-block-size: 44px; }
}
.arcade-actions, .arcade-word {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.arcade-word { justify-content: space-between; }
.arcade-deck {
  justify-content: space-between;
  padding: 7px;
  border: 1px solid #6f523a;
  border-radius: 8px;
  background: linear-gradient(110deg, #2d2130, #211c2c);
}
.arcade-word-display { color: var(--ivory); font-weight: 750; letter-spacing: .06em; }
.arcade-prizes { display: grid; gap: 4px; }
.arcade-prizes > div, .arcade-paytable dl > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 6px 0;
  border-top: 1px solid #4b3b43;
}
.arcade-prizes small { display: block; color: var(--muted); }
.arcade-paytable { border-top: 1px solid #4b3b43; padding-top: 8px; }
.arcade-paytable summary { cursor: pointer; color: var(--gold); font-weight: 750; }
.arcade-paytable dl { margin: 8px 0; }
.arcade-paytable dd { margin: 0; color: var(--ivory); }
.arcade-status { color: var(--ivory); min-block-size: 1.45em; margin-block-start: 8px; }
@media (forced-colors: active) {
  .arcade-letter[aria-pressed="true"] { border: 3px solid Highlight; }
}
.howto { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 9px; color: #d0cddb; }
.howto li::marker { color: var(--gold); }
.howto strong { color: var(--ivory); }
.shortcut-details summary { cursor: pointer; color: var(--gold); }
.shortcut-details dl { display: grid; gap: 5px; margin: 8px 0 0; }
.shortcut-details dl > div { display: grid; grid-template-columns: 84px 1fr; align-items: baseline; }
.shortcut-details dd { margin: 0; color: var(--muted); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setting:first-child { padding-top: 0; }
.volume-control { display: flex; align-items: center; gap: 8px; width: min(50%, 190px); }
.volume-control input { min-width: 0; flex: 1; accent-color: var(--gold); }
.volume-control [data-volume] { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
select, .seed-field input { border-radius: 5px; padding: 5px 8px; border: 1px solid #55566a; color: var(--ivory); background: var(--surface-raised); }
.setting code { overflow-wrap: anywhere; }
.bag-edit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 9px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.bag-field { display: grid; gap: 4px; }
.bag-field[hidden] { display: none; }
.bag-field select { min-inline-size: 0; min-block-size: 36px; width: 100%; }
.bag-edit-form .tile-picker, .bag-edit-form .tile-picker-footer { grid-column: 1 / -1; margin-block-start: 0; }
.seed-field { display: block; margin: 12px 0 5px; }
.seed-field input { display: block; width: min(100%, 315px); margin: 5px 0; min-height: 37px; }
.seed-field small { color: var(--muted); }
.dialog-actions { margin-top: 15px; }
.bag-summary { display: grid; gap: 3px; color: var(--muted); margin: 0 0 12px; }
.bag-summary strong { color: var(--ivory); font-size: 18px; }
.bag-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.bag-grid > div { display: grid; justify-items: center; background: #292c39; border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; }
.bag-grid strong { font-size: 17px; color: var(--ivory); }
.bag-grid span { font-size: 11px; color: var(--muted); }
.enhanced-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 12px; }
.enhanced-list .tile { min-height: 58px; width: 56px; }
.collection-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.collection-heading, .collection-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.collection-heading { justify-content: space-between; margin-bottom: 8px; }
.collection-filters .button { min-height: 32px; }
.collection-filters [aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: #392e22; }
@media (pointer: coarse) {
  .collection-filters .button { min-height: 44px; }
}
@media (forced-colors: active) {
  .collection-filters [aria-pressed="true"], #pack-form .pack-choice:has(input:checked) { border-color: Highlight; }
}
.enhancement-guide { margin-bottom: 15px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; }
.enhancement-guide summary { cursor: pointer; color: var(--ivory); font-weight: 750; }
.enhancement-guide p { margin-top: 7px; }
.enhancement-guide dl { margin: 9px 0 0; }
.enhancement-guide dt { font-weight: 750; }
.enhancement-guide dd { color: var(--muted); margin: 0; }
.collection-card { display: grid; gap: 5px; align-content: start; justify-items: center; width: 100%; padding: 4px; border: 1px solid var(--rarity, #44495a); background: #252936; border-radius: 6px; font-size: 11px; color: var(--ivory); text-align: center; }
.collection-card .joker-portrait { border-radius: 3px; }
.collection-card.unknown { color: var(--muted); border-style: dashed; }
.collection-card.unknown strong { display: grid; place-items: center; width: 100%; aspect-ratio: var(--joker-aspect-ratio); color: #b5b9cb; font-size: 25px; }
.joker-detail { display: grid; grid-template-columns: minmax(106px, 34%) 1fr; align-items: start; gap: 13px; }
.joker-detail .joker-portrait { border: 1px solid var(--rarity); border-radius: 8px; }
.joker-detail p { margin: 6px 0; }
.joker-detail em { color: var(--muted); }
.joker-preview {
  position: fixed;
  inset: auto;
  z-index: 6;
  box-sizing: border-box;
  width: min(17rem, calc(100vw - 16px));
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  overscroll-behavior: contain;
  background: #1a1d28;
  color: var(--text);
  border: 1px solid var(--rarity, #61503a);
  border-radius: 8px;
  box-shadow: 0 8px 24px #04060cba;
  font-size: 0.875rem;
}
.joker-preview[hidden] { display: none; }
.joker-preview > strong { display: block; margin-bottom: 3px; }
.joker-preview p { margin: 5px 0 0; }
.boss-detail { display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); align-items: start; gap: 13px; }
.boss-detail .boss-portrait { width: 100%; border-radius: 8px; }
.boss-detail-goal { color: var(--ivory); font-weight: 750; }
.boss-multipliers { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.boss-multipliers > div { flex: 1 1 70px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; text-align: center; }
.boss-multipliers dt { color: var(--muted); font-size: 12px; }
.boss-multipliers dd { color: var(--gold); font-weight: 750; margin: 0; }
.achievement-summary { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.achievement-summary > .achievement-progress { flex: 1 1 180px; }
.achievement-filter { display: grid; gap: 4px; font-size: 12px; }
.achievement-filter select { min-height: 36px; }
.achievement-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.achievement-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}
.achievement-card.rarity-common, .achievement-token.rarity-common { --rarity: #ebad7f; --rarity-bg: #452b23; }
.achievement-card.rarity-uncommon, .achievement-token.rarity-uncommon { --rarity: #dbe3eb; --rarity-bg: #344052; }
.achievement-card.rarity-rare, .achievement-token.rarity-rare { --rarity: #f3c66e; --rarity-bg: #4a3522; }
.achievement-card.rarity-legendary, .achievement-token.rarity-legendary {
  --rarity: #e4c5ff;
  --rarity-bg: #343053;
  --token-finish: conic-gradient(#e9bda1, #ba9ce6, #8bceb9, #e7c189);
}
.achievement-token {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid var(--rarity, #586074);
  border-radius: 50%;
  color: #241d1c;
  background: var(--token-finish, radial-gradient(circle at 32% 24%, var(--ivory), var(--rarity, #767f91) 46%, var(--rarity-bg, #303649)));
  box-shadow: inset 0 0 0 3px #22223080, inset 0 0 0 5px #f1deaf58, 0 2px 4px #12131b;
}
.achievement-card.locked .achievement-token { background: var(--inset); color: #9ca5b7; border-color: #4b556a; }
.achievement-card h3 { color: var(--ivory); margin: 0 0 2px; }
.achievement-card p, .achievement-meta, .achievement-progress { font-size: 12px; color: var(--muted); }
.achievement-card .achievement-flavor { font-style: italic; color: #cfbfaa; margin-top: 3px; }
.achievement-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; }
.achievement-progress { display: grid; gap: 3px; text-align: start; }
.achievement-progress progress { margin-top: 5px; }
.achievement-card .achievement-progress { --progress-fill: var(--rarity, var(--gold)); margin-top: 5px; }
.achievement-toast {
  z-index: 5;
  position: fixed;
  inset-inline-end: 12px;
  inset-block-end: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(340px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid #926b43;
  border-radius: 10px;
  background: #242338;
  box-shadow: 0 5px 25px #080810ab;
  pointer-events: none;
}
.achievement-toast .achievement-token { flex: none; }
.achievement-toast p { color: var(--gold); font-size: 12px; }
.achievement-toast strong { color: var(--ivory); line-height: 1.3; }
@media (prefers-reduced-motion: no-preference) {
  body:not([data-motion="off"]) .achievement-toast { animation: achievement-in 180ms ease-out; }
}
@keyframes achievement-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.wild-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wild-grid button { padding: 5px; font-size: 16px; color: var(--ivory); }
.history-list { display: grid; gap: 8px; }
.history-list article { display: grid; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--muted); }
.history-list article > div { display: flex; gap: 4px; justify-content: space-between; flex-wrap: wrap; }
.history-list strong { color: var(--ivory); }
.edit-list { display: grid; gap: 6px; }
.edit-list > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.edit-list strong { color: var(--gold); font-size: 16px; min-width: 24px; }
.score-detail { display: grid; gap: 7px; }
.score-detail > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.score-detail span { color: var(--muted); }
.reel-strip { display: none; }
@property --reel-delay {
  syntax: "<time>";
  inherits: true;
  initial-value: 0ms;
}

body[data-motion="fast"] { --spin-duration: 180ms; --stagger-time: 15ms; }
@media (prefers-reduced-motion: no-preference) {
  body:not([data-motion="off"]) .rolling .tile-letter {
    animation: reel-stop var(--spin-duration, 315ms) both cubic-bezier(.2,.75,.28,1);
    animation-delay: calc(var(--sibling-index, 1) * var(--stagger-time, 26ms));
  }
  body:not([data-motion="off"]) .rolling .reel-strip {
    position: absolute;
    display: grid;
    inset: 0;
    grid-auto-rows: 100%;
    color: #34303a;
    font: 800 clamp(17px, 4vw, 40px)/1 var(--display);
    animation: reel-cycle var(--spin-duration, 315ms) both ease-in;
    animation-delay: calc(var(--sibling-index, 1) * var(--stagger-time, 26ms));
    pointer-events: none;
  }
  .reel-strip span { display: grid; place-items: center; }
  @supports (animation-delay: calc(sibling-index() * 0.1s)) {
    body:not([data-motion="off"]) .reel {
      --reel-delay: calc(sibling-index() * var(--stagger-time, 26ms));
    }
    body:not([data-motion="off"]) .rolling :is(.tile-letter, .reel-strip) {
      animation-delay: var(--reel-delay);
    }
  }
}
@keyframes reel-stop {
  0%, 58% { transform: translateY(88%); opacity: 0; }
  86% { transform: translateY(6%); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes reel-cycle {
  0% { transform: translateY(-206%); opacity: .75; }
  64% { opacity: .75; }
  80%, 100% { transform: translateY(91%); opacity: 0; }
}

@media (max-width: 930px) {
  .table { grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; }
  .page, .topbar-inner { padding-inline: 16px; }
  .side-panel { padding: 12px; }
  .round-track { gap: 4px; }
  .tile { min-height: 69px; }
  .tile-fortune > span { display: none; }
  .builder { gap: 8px; padding-inline: 8px; }
  .equation { gap: 4px; }
  .score-box { min-width: 56px; }
}
@media (max-width: 760px) {
  .table { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .marquee { min-height: 184px; margin-bottom: 15px; }
  .marquee-copy { padding: 20px 29px 24px; }
  .marquee-art { width: 77%; }
  .page { padding-top: 16px; }
  .tile { min-height: 72px; }
}
@media (max-width: 500px) {
  .page, .topbar-inner { padding-inline: 10px; }
  .topbar-inner { min-height: 58px; }
  .topbar nav { gap: 5px; }
  .nav-button { font-size: 12px; padding-inline: 7px; }
  .nav-button svg { width: 15px; }
  .icon-button { width: 37px; }
  .publisher { gap: 5px; font-size: 13px; }
  .publisher img { width: 26px; height: 26px; }
  .marquee { min-height: 143px; border-radius: 11px; }
  .marquee::after { inset: 4px; border-radius: 8px; }
  .marquee-art { width: 100%; object-position: 68% center; opacity: .72; }
  .marquee::before { background: linear-gradient(90deg, #14141ce8, #14141cbf 44%, #14141c08 100%); }
  .marquee-copy { padding: 13px 13px 19px; }
  .marquee .eyebrow { font-size: 9px; letter-spacing: .14em; }
  .marquee h1 { font-size: clamp(44px, 12.5vw, 60px); }
  .marquee.marquee-compact { min-height: 58px; margin-bottom: 9px; }
  .marquee-compact .marquee-copy { padding-inline: 13px; }
  .marquee-compact h1 { font-size: 32px; }
  .tagline { font-size: 12px; }
  .marquee-coin { right: 8px; top: 8px; min-width: 0; gap: 4px; padding: 4px 6px; }
  .marquee-coin svg { width: 18px; height: 18px; }
  .marquee-coin strong { font-size: 15px; }
  .marquee-coin small { font-size: 9px; }
  #game { gap: 9px; }
  .cabinet { padding: 8px; }
  .scoreboard { padding: 11px; }
  .boss-frame .round-score > span { font-size: 13px; white-space: normal; }
  .boss-rule { gap: 8px; padding: 7px; }
  .active-boss-card { width: 58px; padding: 2px; }
  .boss-card-crown { inset-block-end: 2px; inset-inline-end: 2px; padding: 1px; }
  .boss-rule h2 { font-size: 18px; }
  .resources { gap: 7px; }
  .resources > div { padding-left: 7px; min-width: 0; }
  .stat-label { font-size: 9px; letter-spacing: .035em; }
  .pips i { width: 11px; }
  .danger-cue { max-width: 11ch; font-size: 10px; }
  .builder { gap: 4px; grid-template-columns: 1fr; padding: 8px; }
  .score-box { min-width: 55px; min-height: 41px; gap: 2px; padding: 2px 5px; }
  .score-box strong { font-size: 16px; }
  .equation { justify-content: flex-start; }
  .combo-cue { margin-inline-start: 0; }
  .reel-well { padding: 4px; }
  .reels { gap: 3px; }
  .tile { min-height: 54px; border-radius: 5px; }
  .tile-enhancement { left: 4px; }
  .tile-fortune { right: 3px; }
  .tile-value { bottom: 2px; right: 4px; font-size: 9px; }
  .tile-blocked { bottom: 2px; left: 4px; font-size: 11px; }
  .tile-letter { font-size: clamp(17px, 5.4vw, 24px); }
  .hold-button { min-height: 36px; font-size: 9px; letter-spacing: 0; flex-direction: column; gap: 0; }
  .hold-button svg { width: 12px; height: 12px; }
  .keyboard-hints { display: none; }
  .sidebar { grid-template-columns: 1fr; }
  .round-track { gap: 6px; }
  .footer-tools { gap: 11px; }
  .shop-panel { padding: 10px; }
  .shop-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .starter-offers { grid-template-columns: 1fr; gap: 7px; }
  .starter-offers .offer { flex-direction: row; align-items: center; }
  .starter-offers .offer-art { flex: none; width: 44px; margin: 6px 0 6px 7px; }
  .starter-offers .offer-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; padding: 7px; }
  .starter-offers .offer-body > :not(.purchase) { grid-column: 1; }
  .starter-offers .rarity-tag { justify-self: start; }
  .starter-offers .purchase { grid-column: 2; grid-row: 1 / 4; min-height: 44px; padding-inline: 8px; }
  .shop-heading h2, .result-panel h2 { font-size: 27px; }
  .shop-actions .button, .result-actions .button { padding-inline: 7px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
