@font-face {
  font-family: "Plumbers Display";
  src: url("../../assets/fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Plumbers Slab";
  src: url("../../assets/fonts/RobotoSlab-Variable.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Plumbers Work";
  src: url("../../assets/fonts/BarlowSemiCondensed-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: "Plumbers Work";
  src: url("../../assets/fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype");
  font-display: swap;
  font-weight: 600;
}

@font-face {
  font-family: "Plumbers Work";
  src: url("../../assets/fonts/BarlowSemiCondensed-Black.ttf") format("truetype");
  font-display: swap;
  font-weight: 900;
}

:root {
  --paper: #f1e5ce;
  --paper-deep: #ddc9a3;
  --card: #fffaf0;
  --ink: #13253a;
  --ink-soft: #586575;
  --casino: #071522;
  --casino-soft: #102b42;
  --navy: #0c2944;
  --brass: #d9a83f;
  --brass-pale: #ffe79a;
  --copper: #b96135;
  --copper-dark: #6f3017;
  --red: #b73532;
  --green: #2f9d72;
  --line: #c9b895;
  --shell: 1140px;
  --shadow: 0 22px 55px rgb(12 31 49 / 16%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgb(255 255 255 / 68%), transparent 29%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgb(64 43 23 / 2%) 6px),
    var(--paper);
  font-family: "Plumbers Work", "Arial Narrow", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgb(19 37 58 / 8%) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  content: "";
  pointer-events: none;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--brass-pale);
  outline-offset: 3px;
}
.shell, .site-header { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 9px 13px;
  color: white;
  background: var(--casino);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 86px;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--brass);
  place-items: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-family: "Plumbers Display", sans-serif; font-size: 18px; }
.brand-copy small {
  margin-top: 4px;
  color: var(--copper-dark);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.global-nav { display: flex; gap: 18px; justify-content: center; }
.global-nav a {
  padding: 7px 2px;
  border-bottom: 2px solid transparent;
  color: #405064;
  font-weight: 600;
  text-decoration: none;
}
.global-nav a:hover, .global-nav a.active { border-color: var(--copper); color: var(--ink); }
.wallet-button, .text-button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}
.wallet-button { min-width: 132px; padding: 10px 17px; }
.wallet-button:hover, .text-button:hover { color: white; background: var(--ink); }

.game-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 76% 52%, rgb(245 186 68 / 28%) 0 9%, transparent 33%),
    repeating-radial-gradient(circle at 76% 52%, transparent 0 46px, rgb(217 168 63 / 11%) 47px 50px),
    linear-gradient(120deg, #06111d 0 45%, #0d2b42 76%, #5c2c1a 140%);
}
.game-hero::after {
  position: absolute;
  top: -170px;
  right: 3%;
  width: 520px;
  height: 520px;
  border: 25px solid rgb(217 168 63 / 18%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 6px rgb(255 255 255 / 6%), 0 0 90px rgb(185 91 43 / 25%);
  content: "";
}
.game-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: end;
  min-height: 400px;
  padding-block: 70px 60px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--copper);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.game-hero .eyebrow { color: var(--brass-pale); }
.game-hero h1, h2, h3 { margin: 0; line-height: 0.96; }
.game-hero h1 {
  max-width: 680px;
  font-family: "Plumbers Display", sans-serif;
  font-size: clamp(72px, 11vw, 150px);
  letter-spacing: -0.055em;
  text-transform: uppercase;
}
.game-hero__lede { max-width: 590px; margin: 24px 0 0; color: #cfdae4; font-size: 21px; }
.hero-rule-card {
  display: grid;
  min-width: 220px;
  border: 1px solid rgb(255 231 154 / 35%);
  border-radius: 8px;
  background: rgb(4 13 23 / 55%);
  box-shadow: 0 18px 40px rgb(0 0 0 / 22%);
  backdrop-filter: blur(8px);
}
.hero-rule-card span {
  padding: 12px 20px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-rule-card span:last-child { border-bottom: 0; }
.deployment-notice {
  padding: 12px 20px;
  color: white;
  background: var(--red);
  text-align: center;
  font-weight: 900;
}

.game, .wallet-vault, .history, .rules { padding-block: 72px; }
.section-heading {
  display: flex;
  gap: 25px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-heading h2 { font-family: "Plumbers Slab", serif; font-size: clamp(38px, 5vw, 64px); }
.section-heading--compact h2 { font-size: clamp(32px, 4vw, 48px); }
.round-chip {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 250 240 / 65%);
}
.round-chip span { color: var(--green); font-weight: 900; text-transform: uppercase; }
.round-chip strong { padding-left: 15px; border-left: 1px solid var(--line); }

.game-board { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(330px, 0.78fr); gap: 24px; }
.gauge-panel, .entry-panel {
  border: 1px solid #a78e66;
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.gauge-panel {
  padding: 24px;
  color: white;
  background:
    radial-gradient(circle at 50% 44%, #163650, #091824 60%, #061019 100%);
}
.gauge-readout { display: flex; justify-content: space-between; }
.gauge-readout div { display: grid; }
.gauge-readout div:last-child { text-align: right; }
.gauge-readout span, .round-stats span { color: #8fa9bc; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.gauge-readout strong { color: var(--brass-pale); font-size: 24px; }

.pressure-gauge {
  --needle-angle: 151.2deg;
  position: relative;
  width: min(100%, 510px);
  aspect-ratio: 1;
  margin: 6px auto 18px;
  border: 13px solid #7d431f;
  border-radius: 50%;
  background:
    radial-gradient(circle, #102b3e 0 41%, transparent 42%),
    conic-gradient(from -1.8deg, #0c2335 0 24%, #17394f 24% 49%, #0b2538 49% 74%, #183b50 74% 100%);
  box-shadow:
    inset 0 0 0 7px #d4a246,
    inset 0 0 0 12px #5b321a,
    inset 0 0 45px rgb(0 0 0 / 72%),
    0 8px 25px rgb(0 0 0 / 42%);
}
.gauge-rim {
  position: absolute;
  inset: 4.5%;
  border: 1px solid rgb(255 231 154 / 35%);
  border-radius: 50%;
  pointer-events: none;
}
.gauge-ticks { position: absolute; inset: 0; }
.gauge-tick {
  --tick-angle: calc(var(--tick) * 3.6deg);
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 7px 7px 3px 3px;
  color: transparent;
  background: #456073;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
  cursor: pointer;
  opacity: 0.68;
  transform: translate(-50%, -50%) rotate(var(--tick-angle)) translateY(-205px);
}
.gauge-tick:nth-child(5n + 1) { height: 34px; background: #7891a2; opacity: 0.95; }
.gauge-tick:hover { background: var(--brass-pale); opacity: 1; }
.gauge-tick.is-occupied { background: var(--brass); opacity: 1; box-shadow: 0 0 10px rgb(244 200 74 / 70%); }
.gauge-tick.is-mine { background: #74b9df; box-shadow: 0 0 11px rgb(116 185 223 / 85%); }
.gauge-tick.is-selected { background: var(--red); box-shadow: 0 0 13px rgb(220 81 68 / 90%); opacity: 1; }
.gauge-tick.is-winner { background: #4ed69b; box-shadow: 0 0 16px rgb(78 214 155 / 100%); opacity: 1; }
.gauge-label {
  position: absolute;
  color: #e0edf5;
  font-weight: 900;
  pointer-events: none;
}
.gauge-label--00 { top: 12%; left: 50%; transform: translateX(-50%); }
.gauge-label--25 { top: 50%; right: 12%; transform: translateY(-50%); }
.gauge-label--50 { bottom: 12%; left: 50%; transform: translateX(-50%); }
.gauge-label--75 { top: 50%; left: 12%; transform: translateY(-50%); }
.gauge-needle {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 8px;
  height: 37%;
  border-radius: 100% 100% 3px 3px;
  background: linear-gradient(90deg, #7c1c20, #ef695d 42%, #8f2022);
  box-shadow: 0 0 15px rgb(220 81 68 / 50%);
  pointer-events: none;
  transform: translateX(-50%) rotate(var(--needle-angle));
  transform-origin: 50% 100%;
  transition: transform 850ms cubic-bezier(.2,.8,.2,1);
}
.gauge-needle.is-spinning {
  transition-duration: 3800ms;
  transition-timing-function: cubic-bezier(.08,.72,.14,1);
}
.gauge-needle.is-idling { animation: gauge-idle-needle 3.8s ease-in-out infinite; }
.gauge-needle.is-resetting { transition: none !important; }
.pressure-gauge.is-idle .gauge-rim { animation: gauge-idle-rim 3.8s ease-in-out infinite; }
.pressure-gauge.is-revealing {
  box-shadow:
    inset 0 0 0 7px #d4a246,
    inset 0 0 0 12px #5b321a,
    inset 0 0 60px rgb(0 0 0 / 78%),
    0 0 34px rgb(244 200 74 / 32%),
    0 8px 25px rgb(0 0 0 / 42%);
}
.pressure-gauge.is-revealing .gauge-hub { animation: gauge-charge 720ms ease-in-out infinite alternate; }
.pressure-gauge.is-landed .gauge-hub { animation: gauge-land 420ms ease-out both; }
.gauge-needle::after {
  position: absolute;
  bottom: -14px;
  left: 50%;
  width: 29px;
  height: 29px;
  border: 5px solid #7f491d;
  border-radius: 50%;
  background: var(--brass);
  content: "";
  transform: translateX(-50%);
}
.gauge-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 42%;
  aspect-ratio: 1;
  align-content: center;
  border: 1px solid rgb(255 231 154 / 30%);
  border-radius: 50%;
  background: rgb(4 15 24 / 91%);
  box-shadow: inset 0 0 24px rgb(0 0 0 / 70%);
  text-align: center;
  transform: translate(-50%, -50%);
}
.gauge-hub small { color: #8fa9bc; letter-spacing: 0.12em; text-transform: uppercase; }
.gauge-hub strong { color: var(--brass-pale); font-family: "Plumbers Display", sans-serif; font-size: clamp(52px, 8vw, 82px); line-height: 1; }
.gauge-hub span { color: #9db1c0; font-size: 14px; }

.round-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 7px;
}
.round-stats div { display: grid; padding: 12px; border-right: 1px solid rgb(255 255 255 / 12%); }
.round-stats div:last-child { border-right: 0; }
.round-stats strong { font-size: 21px; }

.entry-panel { padding: 27px; }
.entry-panel__heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 25px; }
.entry-panel__heading h3 { font-family: "Plumbers Slab", serif; font-size: 31px; }
.entry-panel__heading > span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.entry-panel > label, .round-lookup label { display: block; margin: 18px 0 6px; color: var(--ink-soft); font-weight: 900; }
.number-control { display: grid; grid-template-columns: 52px 1fr 52px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.number-control button {
  border: 0;
  color: var(--ink);
  background: var(--paper-deep);
  cursor: pointer;
  font-size: 25px;
  font-weight: 900;
}
.number-control button:hover { background: var(--brass-pale); }
.number-control input {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 0;
  border-inline: 1px solid var(--line);
  color: var(--ink);
  background: white;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  -moz-appearance: textfield;
}
.number-control input::-webkit-inner-spin-button { appearance: none; }
.number-control--pressure input { color: var(--red); font-family: "Plumbers Display", sans-serif; font-size: 28px; }
.entry-receipt { margin: 24px 0 0; border-top: 1px solid var(--line); }
.entry-receipt div { display: flex; gap: 14px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e4d9c3; }
.entry-receipt dt { color: var(--ink-soft); }
.entry-receipt dd { margin: 0; font-weight: 900; text-align: right; }
.reserve-meter { margin: 18px 0; }
.reserve-meter > span { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: #d8cbb2; }
.reserve-meter i { display: block; width: 0; height: 100%; background: var(--green); transition: width 350ms ease; }
.reserve-meter p { margin: 7px 0 0; color: var(--ink-soft); font-size: 14px; }
.wallet-balance { display: flex; justify-content: space-between; margin: 20px 0 10px; color: var(--ink-soft); }
.wallet-balance strong { color: var(--ink); }
.button {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.035em;
}
.button:disabled { cursor: not-allowed; filter: grayscale(0.35); opacity: 0.54; }
.button--enter { color: white; background: linear-gradient(180deg, #cf7041, #913b24); box-shadow: inset 0 1px rgb(255 255 255 / 30%); }
.button--enter:not(:disabled):hover { background: linear-gradient(180deg, #e1804e, #a54528); }
.button--lifecycle { margin-top: 15px; color: #122232; background: linear-gradient(180deg, #ffe891, #ca9131); }
.button--lifecycle:not(:disabled):hover { background: linear-gradient(180deg, #fff0ac, #dda840); }
.micro-status, .action-status { min-height: 21px; margin: 9px 0 0; color: var(--ink-soft); font-size: 14px; }
.gauge-panel .micro-status { color: #9eb5c5; }
.micro-status.error, .action-status.error { color: #c73734; }
.micro-status.success, .action-status.success { color: var(--green); }

.wallet-vault { border-top: 1px solid rgb(126 93 55 / 24%); }
.text-button { padding: 8px 14px; }
.vault-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.outcome-card, .history-card, .empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 250 240 / 72%);
}
.empty-state { grid-column: 1 / -1; color: var(--ink-soft); text-align: center; }
.outcome-card { display: grid; gap: 8px; }
.outcome-card header, .history-card header { display: flex; align-items: center; justify-content: space-between; }
.outcome-card h3, .history-card h3 { font-family: "Plumbers Slab", serif; font-size: 22px; }
.state-badge { padding: 4px 7px; border-radius: 999px; color: white; background: var(--green); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.state-badge.refund { background: var(--copper); }
.outcome-card strong { font-size: 20px; }
.outcome-card button { margin-top: 5px; }
.round-lookup { display: grid; grid-template-columns: auto minmax(130px, 220px) auto; gap: 8px; align-items: end; margin-top: 18px; }
.round-lookup label { margin: 0; }
.round-lookup input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: white; }

.history { padding-top: 26px; }
.history-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.history-card { display: grid; gap: 10px; }
.history-card dl { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; margin: 0; }
.history-card dt { color: var(--ink-soft); }
.history-card dd { margin: 0; font-weight: 900; text-align: right; }
.pressure-result { color: var(--red); font-family: "Plumbers Display", sans-serif; font-size: 38px; }
.history-replay {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #b89c6c;
  border-radius: 5px;
  color: var(--ink);
  background: #fff3ca;
  cursor: pointer;
  font-weight: 900;
}
.history-replay:hover { background: var(--brass-pale); }

@keyframes gauge-charge {
  from { box-shadow: inset 0 0 24px rgb(0 0 0 / 70%), 0 0 0 rgb(244 200 74 / 0%); }
  to { box-shadow: inset 0 0 18px rgb(0 0 0 / 54%), 0 0 24px rgb(244 200 74 / 24%); }
}
@keyframes gauge-idle-rim {
  0%, 100% { border-color: rgb(255 231 154 / 25%); box-shadow: inset 0 0 0 rgb(244 200 74 / 0%); }
  50% { border-color: rgb(255 231 154 / 52%); box-shadow: inset 0 0 24px rgb(244 200 74 / 9%); }
}
@keyframes gauge-idle-needle {
  0%, 100% { filter: brightness(0.95); box-shadow: 0 0 11px rgb(220 81 68 / 38%); }
  50% { filter: brightness(1.15); box-shadow: 0 0 21px rgb(220 81 68 / 68%); }
}
@keyframes gauge-land {
  0% { transform: translate(-50%, -50%) scale(1); }
  48% { transform: translate(-50%, -50%) scale(1.06); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.rules {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 45px;
  border-top: 1px solid rgb(126 93 55 / 24%);
}
.rules h2 { font-family: "Plumbers Slab", serif; font-size: clamp(38px, 5vw, 58px); }
.rules > div > p:not(.eyebrow) { color: var(--ink-soft); font-size: 18px; }
.rules ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: rules; }
.rules li { display: grid; grid-template-columns: auto 1fr; gap: 4px 13px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: rgb(255 250 240 / 56%); counter-increment: rules; }
.rules li::before { grid-row: 1 / 3; color: var(--copper); content: counter(rules, decimal-leading-zero); font-family: "Plumbers Display", sans-serif; font-size: 28px; }
.rules li span { color: var(--ink-soft); }
.funding-rule { grid-column: 1 / -1; padding: 18px 20px; border-left: 5px solid var(--brass); background: #fff4cc; }
.funding-rule p { margin: 4px 0 0; color: var(--ink-soft); }

.site-footer { display: flex; justify-content: space-between; padding-block: 28px 45px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.site-footer a { color: var(--ink); font-weight: 900; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .global-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding-bottom: 15px; overflow-x: auto; }
  .game-hero__inner { grid-template-columns: 1fr; }
  .hero-rule-card { grid-template-columns: repeat(2, 1fr); }
  .hero-rule-card span:nth-child(2) { border-right: 0; }
  .game-board, .rules { grid-template-columns: 1fr; }
  .vault-list { grid-template-columns: repeat(2, 1fr); }
  .history-grid { grid-template-columns: repeat(2, 1fr); }
  .funding-rule { grid-column: auto; }
}

@media (max-width: 600px) {
  .shell, .site-header { width: min(calc(100% - 24px), var(--shell)); }
  .site-header { gap: 12px; min-height: 72px; }
  .brand-copy small { display: none; }
  .wallet-button { min-width: 0; padding-inline: 12px; }
  .global-nav { gap: 13px; font-size: 14px; }
  .game-hero__inner { min-height: 360px; padding-block: 52px 40px; }
  .game-hero h1 { font-size: clamp(58px, 18.5vw, 76px); }
  .game-hero__lede { font-size: 18px; }
  .hero-rule-card { min-width: 0; }
  .game, .wallet-vault, .history, .rules { padding-block: 48px; }
  .section-heading { display: grid; align-items: start; }
  .round-chip { justify-self: start; }
  .gauge-panel, .entry-panel { padding: 15px; }
  .pressure-gauge { border-width: 9px; }
  .gauge-tick { width: 10px; height: 20px; transform: translate(-50%, -50%) rotate(var(--tick-angle)) translateY(-40vw); }
  .gauge-tick:nth-child(5n + 1) { height: 26px; }
  .gauge-hub { width: 46%; }
  .gauge-hub strong { font-size: 54px; }
  .gauge-hub span { display: none; }
  .round-stats strong { font-size: 17px; }
  .round-stats span { font-size: 12px; }
  .entry-panel__heading > span { display: none; }
  .vault-list, .history-grid { grid-template-columns: 1fr; }
  .round-lookup { grid-template-columns: 1fr auto; }
  .round-lookup label { grid-column: 1 / -1; }
  .site-footer { display: grid; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
