/* ============================================================
   IVANOPOL — vintage board-game personal site
   ============================================================ */

:root {
  /* Palette */
  --paper:    #f3ead4;
  --tile:     #f8f1de;
  --ink:      #2a2622;
  --ink-2:    #4a4035;
  --felt:     #1d3a2c;
  --felt-lo:  #15291f;
  --red:      #d83a26;
  --red-deep: #b62b1c;
  --money:    #2c6e4a;
  --money-lo: #1d4d33;
  --cream-edge: #e3d6b3;

  /* Group colours */
  --g-brown:     #7a4f2e;
  --g-lightblue: #9ad3e8;
  --g-pink:      #d24f96;
  --g-orange:    #e2872c;
  --g-red:       #c5392f;
  --g-yellow:    #f0c021;
  --g-green:     #2f8a4f;
  --g-navy:      #2b3f7a;

  /* Geometry — board scales fluidly */
  --board-size: min(820px, calc(100vw - 28px));
  --board-min: 320px;
  --frame: max(8px, calc(var(--board-size) * 0.018));
  --edge:   calc(var(--board-size) / 12.1);
  --corner: calc(var(--edge) * 1.55);

  /* Type scales (relative to board) */
  --t-tile:   clamp(5px, calc(var(--edge) * 0.19), 9px);
  --t-price:  calc(var(--edge) * 0.13);
  --t-deed:   calc(var(--edge) * 0.09);
  --t-corner: calc(var(--edge) * 0.14);
  --t-icon:   calc(var(--edge) * 0.40);

  --shadow-board: 0 28px 60px -20px rgba(0,0,0,.55),
                  0 6px 18px rgba(0,0,0,.35),
                  inset 0 0 0 1px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--felt-lo);
  color: var(--ink);
  font-family: "Lora", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  min-height: 100%;
  color-scheme: dark;
  background-color: var(--felt-lo);
  background-image:
    radial-gradient(ellipse at 50% 30%,
      rgba(255,255,255,0.04) 0%,
      rgba(0,0,0,0) 50%),
    radial-gradient(ellipse at 50% 50%,
      var(--felt) 0%,
      var(--felt-lo) 70%,
      #0c1a13 100%);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  position: relative;
  overflow-x: hidden;
}

/* Subtle felt grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .8 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Vignette */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ============================================================
   STAGE
   ============================================================ */

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 14px 32px;
  gap: 18px;
  min-height: 100vh;
}

/* Top bar: brand + escape hatch */
.topbar {
  width: min(820px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--paper);
}
.topbar .marque {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: 0.04em;
  color: var(--paper);
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.topbar .marque .dot { color: var(--red); margin: 0 .35ch; }
.topbar .marque .sub {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 0.62em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243,234,212,.6);
  margin-left: .8ch;
}

.see-all {
  appearance: none;
  border: 1.5px solid rgba(243,234,212,.55);
  background: rgba(243,234,212,.06);
  color: var(--paper);
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 9px 14px 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.see-all:hover { background: rgba(243,234,212,.14); border-color: var(--paper); }
.see-all:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.see-all .arr { font-size: 13px; opacity: .9; }

/* ============================================================
   BOARD
   ============================================================ */

.board-wrap {
  position: relative;
  width: var(--board-size);
  height: var(--board-size);
  min-width: var(--board-min);
  min-height: var(--board-min);
}

.board {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--paper);
  border: var(--frame) solid var(--ink);
  border-radius: 4px;
  box-shadow: var(--shadow-board);
  display: grid;
  grid-template-columns: 1.55fr repeat(9, 1fr) 1.55fr;
  grid-template-rows:    1.55fr repeat(9, 1fr) 1.55fr;
  overflow: hidden;
}

/* Paper grain inside the board */
.board::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='2'/><feColorMatrix values='0 0 0 0 .1  0 0 0 0 .08  0 0 0 0 .05  0 0 0 .14 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================================
   TILES
   ============================================================ */

.tile {
  position: relative;
  background: var(--tile);
  border: 1px solid var(--ink);
  margin: -0.5px;            /* collapse hairlines */
  padding: 0;
  cursor: pointer;
  outline: none;
  font: inherit;
  color: var(--ink);
  overflow: hidden;
  transition: background .15s, transform .22s cubic-bezier(.4,0,.2,1), box-shadow .2s;
}
.tile:hover {
  background: #fbf5e2;
  transform: scale(1.06);
  z-index: 4;
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}
.tile.is-corner:hover { transform: scale(1.04); }
.tile:focus-visible { background: #fbf5e2; box-shadow: inset 0 0 0 3px var(--red); }
.tile.is-current { background: #fff7df; }
@media (prefers-reduced-motion: reduce) {
  .tile { transition: background .15s; }
  .tile:hover { transform: none; }
}

/* Inner content layer (we rotate this, not the cell) */
.tile-inner {
  position: absolute;
  top: 50%; left: 50%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  transform-origin: center center;
  pointer-events: none;
}

/* By default (bottom row) inner matches cell: */
.tile .tile-inner {
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
}
/* Top row: rotate 180 */
.tile.side-top .tile-inner {
  width: 100%; height: 100%;
  transform: translate(-50%, -50%) rotate(180deg);
}
/* Left column: swap dims (inner = edge × corner), rotate 90 (band faces center) */
.tile.side-left .tile-inner {
  width:  var(--edge);
  height: var(--corner);
  transform: translate(-50%, -50%) rotate(90deg);
}
/* Right column: swap dims, rotate -90 (band faces center) */
.tile.side-right .tile-inner {
  width:  var(--edge);
  height: var(--corner);
  transform: translate(-50%, -50%) rotate(-90deg);
}
/* Corners */
.tile.is-corner .tile-inner {
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
}

/* Property tile structure */
.prop-band {
  flex: 0 0 auto;
  height: calc(var(--edge) * 0.30);
  border-bottom: 1.5px solid var(--ink);
  position: relative;
}
.prop-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--edge) * 0.10) calc(var(--edge) * 0.05) calc(var(--edge) * 0.08);
  text-align: center;
  gap: calc(var(--edge) * 0.06);
}
.prop-name {
  font-family: "Bungee", sans-serif;
  font-weight: 700;
  font-size: var(--t-tile);
  line-height: 1.0;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  word-break: break-word;
  text-wrap: balance;
  hyphens: auto;
}
.prop-price {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: var(--t-price);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.prop-deed { display: none; }

/* Link underline mark — small red line above the price */
.has-link + .prop-price::before,
.prop-name.has-link::after {
  content: "";
}
.prop-name.has-link::after {
  display: block;
  width: 18%;
  height: 2px;
  background: var(--red);
  margin: calc(var(--edge) * 0.05) auto 0;
  border-radius: 2px;
}

/* Brand star */
.prop-star {
  position: absolute;
  top: calc(var(--edge) * 0.06);
  right: calc(var(--edge) * 0.06);
  width: calc(var(--edge) * 0.16);
  height: calc(var(--edge) * 0.16);
  color: var(--red);
}

/* Special tiles (chance, chest, tax, station, utility) */
.spec {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--edge) * 0.08) calc(var(--edge) * 0.05);
  gap: calc(var(--edge) * 0.07);
  text-align: center;
}
.spec-label {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: var(--t-tile);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-wrap: balance;
}
.spec-icon {
  width: var(--t-icon);
  height: var(--t-icon);
  color: var(--ink);
}
.spec-icon.is-red { color: var(--red); }
.spec-amount {
  font-family: "Oswald", sans-serif;
  font-size: var(--t-price);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}

/* Corner tiles */
.corner-cell {
  position: relative;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--corner) * 0.10);
  gap: calc(var(--corner) * 0.05);
  background: var(--tile);
  overflow: hidden;
}
.corner-cell::before {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  z-index: 0;
}
.corner-go::before {
  bottom: 0; right: 0;
  background: linear-gradient(135deg, #f6dab0 0%, #f0c98c 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.corner-jail::before {
  bottom: 0; left: 0;
  background: linear-gradient(225deg, #c8dfe9 0%, #a8c8d8 100%);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.corner-parking::before {
  top: 0; left: 0;
  background: linear-gradient(315deg, #cbe2c0 0%, #a8caa3 100%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.corner-inbox::before {
  top: 0; right: 0;
  background: linear-gradient(45deg, #f4c8d0 0%, #ec9eb0 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.corner-cell > * { position: relative; z-index: 1; }

.corner-label {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: var(--t-corner);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: var(--ink);
}
.corner-sub {
  font-family: "Oswald", sans-serif;
  font-size: calc(var(--t-deed) * 1.1);
  text-transform: uppercase;
  letter-spacing: 0.20em;
  color: rgba(42,38,34,.55);
  line-height: 1.2;
  max-width: 90%;
}
.corner-art {
  width: calc(var(--corner) * 0.34);
  height: calc(var(--corner) * 0.34);
  color: var(--ink);
}

/* GO */
.corner-go .corner-label { color: var(--red); font-size: calc(var(--t-corner) * 1.9); }
.corner-go .corner-art { color: var(--red); width: calc(var(--corner) * 0.42); height: calc(var(--corner) * 0.42); }

/* GO TO INBOX */
.corner-inbox .corner-label { font-size: calc(var(--t-corner) * 0.88); }
.corner-inbox .corner-art { color: var(--ink); }

/* JUST VISITING */
.corner-jail .corner-label { font-size: calc(var(--t-corner) * 0.78); }
.corner-jail .jail-art {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: calc(var(--corner) * 0.32);
  height: calc(var(--corner) * 0.32);
}
.corner-jail .jail-art span {
  background: var(--ink);
  border-radius: 1px;
}

/* FREE PARKING — circular P badge */
.corner-parking .park-badge {
  width: calc(var(--corner) * 0.38);
  height: calc(var(--corner) * 0.38);
  border: 3px solid var(--money);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: calc(var(--corner) * 0.22);
  color: var(--money);
  background: var(--tile);
}

/* ============================================================
   CENTER CREST
   ============================================================ */

.crest {
  position: absolute;
  inset: var(--corner) var(--corner) var(--corner) var(--corner);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--edge) * 0.35);
  gap: calc(var(--edge) * 0.22);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  isolation: isolate;
}

/* Hypnotic sunburst rays — repeating conic gradient, slowly rotating */
.crest::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 245, 215, 0.55) 0deg 9deg,
    transparent 9deg 18deg
  );
  opacity: 0.85;
  mask: radial-gradient(circle at center, black 12%, rgba(0,0,0,.85) 60%, transparent 95%);
  -webkit-mask: radial-gradient(circle at center, black 12%, rgba(0,0,0,.85) 60%, transparent 95%);
  animation: sunspin var(--sunspin-dur, 120s) linear infinite;
  animation-play-state: var(--sunspin-state, running);
  transform-origin: 50% 50%;
}
@keyframes sunspin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .crest::before { animation: none; }
}
/* Soft cream wash in the very center so kicker text reads clean */
.crest::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(243,234,212,0.55) 0%, transparent 65%);
}

.crest-kicker {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: calc(var(--edge) * 0.18);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--money);
  margin-bottom: calc(var(--edge) * 0.04);
}

.ribbon-wrap {
  position: relative;
  display: inline-block;
  width: min(calc(var(--edge) * 7.2), 78%);
  aspect-ratio: 5.6 / 1;
  transform: rotate(-2deg);
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.35));
  margin: calc(var(--edge) * 0.06) 0;
}
.ribbon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.ribbon-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: calc(var(--edge) * 0.78);
  letter-spacing: 0.02em;
  color: var(--paper);
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0,0,0,.22);
  pointer-events: none;
  padding: 0 calc(var(--edge) * 0.6); /* clear the notches */
}

.crest-tagline {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: calc(var(--edge) * 0.26);
  color: var(--ink);
  max-width: 75%;
  line-height: 1.25;
  margin-top: calc(var(--edge) * 0.06);
}
.crest-bio {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: calc(var(--edge) * 0.16);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-2);
  max-width: 88%;
  line-height: 1.4;
  padding: calc(var(--edge) * 0.06) 0 0;
}

.crest-flourish {
  width: calc(var(--edge) * 1.4);
  height: calc(var(--edge) * 0.25);
  color: var(--ink-2);
  opacity: .45;
  margin-top: calc(var(--edge) * 0.04);
}

/* ============================================================
   TOKEN (game piece)
   ============================================================ */

.token {
  position: absolute;
  z-index: 3;
  width: calc(var(--edge) * 0.45);
  height: calc(var(--edge) * 0.45);
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
  transition: transform .28s cubic-bezier(.4,.0,.2,1);
  will-change: transform;
}

/* ============================================================
   PLAY BAR (dice + roll)
   ============================================================ */

.playbar {
  width: min(820px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 12px 4px 0;
  color: var(--paper);
}

.dice {
  display: flex;
  gap: 12px;
}
.die {
  width: 52px;
  height: 52px;
  background: var(--tile);
  border-radius: 9px;
  position: relative;
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,.10),
    inset 0 0 0 2px var(--cream-edge),
    0 4px 0 rgba(0,0,0,.35),
    0 8px 14px rgba(0,0,0,.45);
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 8px;
  gap: 2px;
}
.die.shaking { animation: shake 0.09s linear infinite; }
@keyframes shake {
  0%   { transform: translate(0,0) rotate(0); }
  25%  { transform: translate(-3px,1px) rotate(-8deg); }
  50%  { transform: translate(3px,-2px) rotate(6deg); }
  75%  { transform: translate(-2px,-3px) rotate(-4deg); }
  100% { transform: translate(2px,3px) rotate(7deg); }
}
.die .pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  align-self: center;
  justify-self: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.roll-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--red);
  color: var(--paper);
  font-family: "Bungee", "Oswald", sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 32px 18px;
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.15),
    0 6px 0 var(--red-deep),
    0 12px 22px rgba(0,0,0,.4);
  transition: transform .1s, box-shadow .1s, background .15s;
  position: relative;
}
.roll-btn:hover { background: #e3432e; }
.roll-btn:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.15),
    0 2px 0 var(--red-deep),
    0 4px 10px rgba(0,0,0,.35);
}
.roll-btn:disabled { opacity: .65; cursor: not-allowed; }

.playhint {
  font-family: "Lora", serif;
  font-style: italic;
  color: rgba(243,234,212,.7);
  font-size: 15px;
  text-align: center;
  grid-column: 1 / -1;
  order: 99;
  padding: 2px 0 0;
}
@media (max-width: 620px) {
  .playbar { grid-template-columns: auto 1fr auto; gap: 14px; }
  .playhint { font-size: 13px; }
  .roll-btn { padding: 14px 22px 16px; font-size: 14px; }
  .die { width: 46px; height: 46px; padding: 6px; }
}

/* ============================================================
   FOOTER BANKNOTE
   ============================================================ */

.banknote {
  margin-top: 8px;
  width: min(540px, calc(100vw - 40px));
  min-height: 75px;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.12) 0 2px,
      transparent 2px 6px),
    linear-gradient(180deg, #e8efd9 0%, #d6dfbe 100%);
  border: 2px solid var(--money-lo);
  outline: 1px solid var(--money-lo);
  outline-offset: 4px;
  color: var(--money-lo);
  padding: 14px 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  font-family: "Oswald", sans-serif;
  position: relative;
  border-radius: 3px;
  box-shadow: 0 4px 0 rgba(0,0,0,.18), 0 16px 32px -10px rgba(0,0,0,.5);
}
.banknote .bn-num {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: 26px;
  line-height: 1;
  color: var(--money);
}
.banknote .bn-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.banknote .bn-title {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--money-lo);
}
.banknote .bn-sub {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--money);
}

/* ============================================================
   DEAL TAB — link to the Deal page (under the banknote)
   ============================================================ */

.deal-tab {
  margin: 14px auto 0;
  width: min(540px, calc(100vw - 40px));
  max-width: 100%;
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 22px 14px;
  background:
    repeating-linear-gradient(-45deg,
      rgba(216,58,38,.0) 0 6px,
      rgba(216,58,38,.08) 6px 7px),
    rgba(216,58,38,.33);
  border: 1.5px dashed var(--red);
  color: var(--paper);
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border-radius: 9px;
  transition: background .18s, border-style .18s, transform .12s, color .18s;
}
.deal-tab-text {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.deal-tab:hover {
  background: var(--red);
  color: var(--paper);
  border-style: solid;
  transform: translateY(-1px);
}
.deal-tab:active { transform: translateY(1px); }
.deal-tab-mark {
  color: var(--red);
  font-size: 16px;
  line-height: 1;
  transition: color .18s;
}
.deal-tab:hover .deal-tab-mark { color: var(--paper); }
.deal-tab-arr {
  font-family: "Bungee", sans-serif;
  font-size: 13px;
  color: var(--red);
  transition: color .18s;
}
.deal-tab:hover .deal-tab-arr { color: var(--paper); }
@media (max-width: 480px) {
  .deal-tab { padding: 10px 16px 12px; gap: 8px; }
  .deal-tab-text { font-size: 12px; }

  /* Banknote: shrink it so the centre text isn't crushed */
  .banknote {
    min-height: 0;
    padding: 12px 16px;
    gap: 10px;
  }
  .banknote .bn-num   { font-size: 19px; }
  .banknote .bn-title { font-size: 13px; text-wrap: balance; }
  .banknote .bn-sub   { font-size: 8px; letter-spacing: 0.12em; }
}

/* ============================================================
   MODAL CARD
   ============================================================ */

.backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 18, 13, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: bd-in .18s ease;
}
@keyframes bd-in { from { opacity: 0; } to { opacity: 1; } }

.card {
  width: min(420px, 100%);
  background: var(--tile);
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.05);
  font-family: "Oswald", serif;
  color: var(--ink);
  position: relative;
  animation: card-in .26s cubic-bezier(.4,0,.2,1);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card-header {
  padding: 22px 22px 18px;
  text-align: center;
  border-bottom: 2px solid var(--ink);
  position: relative;
  background: var(--card-color, var(--g-navy));
  color: var(--card-fg, var(--paper));
}
.card-header .kicker {
  font-family: "Oswald", sans-serif;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 6px;
}
.card-header .title {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.card-header .star {
  position: absolute;
  top: 12px; right: 14px;
  font-family: "Bungee", sans-serif;
  font-size: 18px;
  opacity: .85;
}
.card-close {
  position: absolute;
  top: 10px; left: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,.18);
  color: inherit;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  display: grid; place-items: center;
  transition: background .15s;
}
.card-close:hover { background: rgba(0,0,0,.32); }

.card-body {
  padding: 20px 24px 22px;
  text-align: center;
}
.card-body .desc {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 18px;
  color: var(--ink-2);
}
.card-body .amount {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: 32px;
  color: var(--red);
  margin: 6px 0 14px;
  letter-spacing: .03em;
}
.card-body .price {
  font-family: "Oswald", sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 12px;
}
.card-body .pos {
  font-family: "Oswald", sans-serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(42,38,34,.5);
  margin-top: 14px;
}
.card-cta {
  appearance: none;
  border: 0;
  background: var(--red);
  color: var(--paper);
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--red-deep);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform .1s, background .15s;
}
.card-cta:hover { background: #e3432e; }
.card-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--red-deep); }
.card-soon {
  font-family: "Oswald", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(42,38,34,.45);
  padding: 12px 0;
}

/* The chance/chest deck mark */
.deck-mark {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: 38px;
  color: var(--paper);
  text-align: center;
  margin: 4px 0 14px;
}
.deck-mark.is-chance { color: var(--red); }
.deck-mark.is-chest  { color: var(--money); }

/* ============================================================
   LIST VIEW (escape hatch)
   ============================================================ */

.list-overlay {
  position: fixed; inset: 0;
  background: var(--felt-lo);
  z-index: 60;
  overflow-y: auto;
  animation: bd-in .2s ease;
  color: var(--paper);
}
.list-inner {
  max-width: 820px;
  width: min(820px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 80px;
}
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}
.list-back {
  appearance: none;
  border: 1.5px solid rgba(243,234,212,.55);
  background: rgba(243,234,212,.06);
  color: var(--paper);
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 9px 14px 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.list-back:hover { background: rgba(243,234,212,.14); border-color: var(--paper); }
.list-mark {
  font-family: "Bungee", "Oswald", sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: 0.04em;
  color: var(--paper);
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.list-mark .dot { color: var(--red); margin: 0 .35ch; }
.list-mark .sub {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 0.62em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243,234,212,.6);
  margin-left: .8ch;
}

.list-hero {
  border-top: 1px solid rgba(243,234,212,.18);
  border-bottom: 1px solid rgba(243,234,212,.18);
  padding: 18px 0;
  margin-bottom: 30px;
}
.list-hero .name {
  font-family: "Bungee", sans-serif;
  font-size: clamp(28px, 7vw, 40px);
  color: var(--paper);
  line-height: 1;
}
.list-hero .tag {
  font-family: "Lora", serif;
  font-style: italic;
  color: rgba(243,234,212,.7);
  margin-top: 8px;
  font-size: 16px;
}

.list-group { margin-bottom: 30px; }
.list-group h3 {
  font-family: "Oswald", sans-serif;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 4px;
}
.list-group .sub {
  font-family: "Lora", serif;
  font-style: italic;
  color: rgba(243,234,212,.55);
  font-size: 14px;
  margin: 0 0 14px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--paper);
  border: 1px solid rgba(243,234,212,.12);
  background: rgba(243,234,212,.03);
  margin-bottom: 8px;
  transition: background .15s, border-color .15s, transform .15s;
}
.list-row:hover {
  background: rgba(243,234,212,.08);
  border-color: rgba(243,234,212,.3);
}
.list-row .l-name {
  font-family: "Oswald", sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.list-row .l-desc {
  font-family: "Lora", serif;
  color: rgba(243,234,212,.65);
  font-size: 14px;
  line-height: 1.35;
  margin-top: 2px;
}
.list-row .l-arr {
  font-family: "Bungee", sans-serif;
  color: var(--red);
  font-size: 18px;
}
.list-row.is-inactive {
  opacity: 0.55;
  border-style: dashed;
  cursor: default;
}
.list-row.is-inactive .l-arr {
  font-family: "Oswald", sans-serif;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(243,234,212,.5);
}
.list-row.is-skill {
  cursor: default;
  border-color: rgba(216,58,38,.25);
  background: rgba(216,58,38,.04);
}
.list-row.is-skill:hover {
  background: rgba(216,58,38,.08);
  border-color: rgba(216,58,38,.45);
}
.list-row .l-num {
  font-family: "Bungee", "Oswald", sans-serif;
  color: rgba(243,234,212,.4);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.list-foot {
  text-align: center;
  padding: 20px 0 0;
  color: rgba(243,234,212,.45);
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 13px;
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-family: "Oswald", sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--red);
  z-index: 70;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  animation: toast-in .22s ease, toast-out .25s ease 1.6s forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translate(-50%, 8px); }
}

/* ============================================================
   DEAL-IN: tile staged entrance
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .tile.deal-in {
    animation: deal-in .55s cubic-bezier(.2,.7,.2,1) both;
    animation-delay: calc(var(--deal-i, 0) * 18ms);
  }
  @keyframes deal-in {
    from {
      opacity: 0;
      transform: translateY(8px) scale(.85);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .die.shaking { animation: none; }
  .token { transition: none; }
  .tile.deal-in { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  :root {
    --board-size: min(calc(100vw - 16px), calc(100vh - 280px));
  }
  .prop-deed, .prop-price { display: none; }
}
