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

:root {
  --bg: #0a0705;
  --text: #e9dcc2;
  --muted: #a8977a;
  --ink: #22170e;
  --paper: #d8c6a1;
  --paper-edge: #a8916a;
  --wood: #2e1c11;
  --wood-dark: #1c110a;
  --candle: #ffcf7a;
  --skin: #6e5640;
  --tilt: 40deg;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "VT323", ui-monospace, "Courier New", monospace;
  font-size: 20px;
  line-height: 1.35;
}

a { color: var(--candle); }

.skip {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 6;
  font-size: 14px;
  color: var(--muted);
}

/* the table scene */

.scene {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 22% 52%, rgba(255, 160, 70, 0.16), transparent 40%),
    radial-gradient(ellipse at 50% 62%, rgba(255, 170, 80, 0.14), transparent 62%);
  animation: flicker 5s infinite;
  pointer-events: none;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  40% { opacity: 0.86; }
  46% { opacity: 0.96; }
  52% { opacity: 0.8; }
  70% { opacity: 0.92; }
}

.dust, .arms, .vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.dust { z-index: 4; }
.arms { z-index: 3; overflow: visible; }
.vignette {
  z-index: 2;
  background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

.dealer {
  position: absolute;
  top: 0;
  left: 50%;
  top: -9vh;
  width: min(880px, 140vw);
  transform: translate(calc(-50% + var(--px, 0) * -10px), calc(var(--py, 0) * -5px));
  transition: transform 0.4s ease-out;
}

.dealer .hood { fill: #140d08; }
.dealer .face { fill: #0a0604; }
.dealer .eye {
  fill: var(--candle);
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 7s infinite;
}

@keyframes blink {
  0%, 95%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(0.1); }
}

.sleeve { fill: #140d08; }
.sleeve-edge { fill: none; stroke: #2c1f15; stroke-width: 1.5; }
.cast { fill: rgba(0, 0, 0, 0.5); filter: blur(7px); }
.hand .back { fill: url(#skin); stroke: #22180f; stroke-width: 1.5; }
.hand .finger-shadow { fill: none; stroke: #22180f; stroke-width: 9.5; stroke-linecap: round; stroke-linejoin: round; }
.hand .fingers { fill: none; stroke: #7f6a54; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.hand .nails { fill: none; stroke: #2a2019; stroke-width: 4.5; stroke-linecap: round; }

.table {
  position: relative;
  width: 100%;
  margin-top: max(34vh, 170px);
  perspective: 720px;
  flex: 1;
}

.board {
  position: relative;
  margin: 0 auto;
  width: min(1120px, 100%);
  padding: 32px 16px 48px;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  gap: clamp(12px, 3vw, 32px);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='300'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.09 0.004' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0.05  0 0 0 0 0.03  0 0 0 0 0.01  0 0 0 -1.3 0.85'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 92px),
    var(--wood);
  background-size: 600px 300px, auto, auto;
  border-top: 6px solid var(--wood-dark);
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 40px 60px rgba(0, 0, 0, 0.45);
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--tilt) + var(--py, 0) * 2deg)) rotateY(calc(var(--px, 0) * 2.5deg));
  transform-origin: 50% 0;
  transition: transform 0.4s ease-out;
}

/* a burnt card left near the candle */

.burnt {
  position: absolute;
  right: 5%;
  bottom: 10%;
  width: 84px;
  aspect-ratio: 2 / 3;
  background: radial-gradient(ellipse at 45% 40%, #b8a37e 0 28%, #6b4e30 50%, #24170d 70%, #0d0805 85%);
  clip-path: polygon(6% 4%, 30% 0, 52% 6%, 78% 1%, 97% 9%, 92% 34%, 100% 58%, 91% 80%, 96% 97%, 70% 93%, 46% 100%, 20% 94%, 2% 98%, 7% 70%, 0 44%, 5% 22%);
  transform: rotate(14deg);
  opacity: 0.9;
}
.burnt svg { width: 100%; height: 100%; }
.burnt text { font: bold 17px Georgia, serif; fill: #2a1a0e; }
.burnt path { stroke: #5a1a10; stroke-width: 4; stroke-linecap: round; }

/* things left on the table */

.prop {
  position: absolute;
  transform: rotateX(calc(-1 * var(--tilt)));
  transform-origin: 50% 100%;
}

.books { left: 2%; top: 40%; display: grid; justify-items: start; }
.book {
  display: block;
  min-width: 120px;
  height: 18px;
  margin-left: var(--x);
  padding: 0 8px;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #e9dcc2;
  background: linear-gradient(rgba(255, 255, 255, 0.08), transparent 40%, rgba(0, 0, 0, 0.3)), var(--c);
  border-radius: 2px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}

.chips { right: 4%; top: 6%; display: flex; align-items: flex-end; gap: 4px; }
.chip-stack {
  width: 30px;
  height: var(--h);
  background: repeating-linear-gradient(to bottom, var(--c) 0 5px, rgba(0, 0, 0, 0.45) 5px 6px);
  border-radius: 15px / 5px;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.5);
}

.dice { right: 13%; top: 30%; display: flex; gap: 8px; }
.die { width: 22px; height: 22px; background-color: #e9e2d0; border-radius: 4px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.die.five {
  background-image:
    radial-gradient(circle at 25% 25%, #222 2.5px, transparent 3px), radial-gradient(circle at 75% 25%, #222 2.5px, transparent 3px),
    radial-gradient(circle at 50% 50%, #222 2.5px, transparent 3px), radial-gradient(circle at 25% 75%, #222 2.5px, transparent 3px),
    radial-gradient(circle at 75% 75%, #222 2.5px, transparent 3px);
}
.die.two {
  transform: rotate(18deg);
  background-image: radial-gradient(circle at 25% 25%, #222 2.5px, transparent 3px), radial-gradient(circle at 75% 75%, #222 2.5px, transparent 3px);
}

/* a candle standing up on the table */

.candle {
  position: absolute;
  left: 9%;
  top: 16%;
  width: 26px;
  height: 90px;
  transform: rotateX(calc(-1 * var(--tilt)));
  transform-origin: 50% 100%;
}

.wax {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 26px;
  height: 64px;
  background: linear-gradient(90deg, #b9a37c, #e6d6b2 45%, #9c8662);
  border-radius: 4px 4px 2px 2px;
  box-shadow: 0 0 40px 14px rgba(255, 160, 60, 0.18);
}

.flame {
  position: absolute;
  bottom: 62px;
  left: 6px;
  width: 14px;
  height: 26px;
  background: radial-gradient(ellipse at 50% 70%, #fff6d8, #ffcf7a 40%, rgba(255, 120, 30, 0.6) 70%, transparent 72%);
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  box-shadow: 0 0 30px 12px rgba(255, 170, 70, 0.35);
  transform-origin: 50% 100%;
  animation: burn 1.6s infinite alternate ease-in-out;
}

@keyframes burn {
  0% { transform: scale(1, 1) skewX(0); }
  30% { transform: scale(0.94, 1.08) skewX(3deg); }
  60% { transform: scale(1.04, 0.95) skewX(-2deg); }
  100% { transform: scale(0.97, 1.05) skewX(1deg); }
}

.hint {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* hud beside the table, like a poker tracker */

.hud {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 16px;
  margin: 0 16px 32px;
  padding: 12px 14px;
  min-width: 220px;
  font-family: "VT323", ui-monospace, "Courier New", monospace;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--candle);
  background: rgba(10, 7, 5, 0.75);
  border: 1px solid #3a2a1c;
  border-radius: 4px;
}

.hud dt { color: var(--muted); }
.hud dd { margin: 0; text-align: right; }
.hud .head { grid-column: 1 / -1; color: var(--text); border-bottom: 1px solid #3a2a1c; padding-bottom: 4px; }

.hud { position: absolute; left: 16px; top: 16px; margin: 0; }

@media (max-width: 700px) {
  .hud { display: none; }
}

/* cards */

.card {
  position: relative;
  width: clamp(64px, min(24vw, 15vh), 150px);
  aspect-ratio: 2 / 3;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, rgba(255, 240, 205, 0.28), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.2  0 0 0 0 0.1  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    var(--paper);
  color: var(--ink);
  border: 2px solid var(--paper-edge);
  border-radius: 6px;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(34, 23, 14, 0.45), 0 12px 18px rgba(0, 0, 0, 0.6);
  font: inherit;
  cursor: pointer;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s, opacity 0.35s;
}

.card:hover, .card:focus-visible {
  transform: translateZ(16px) translateY(-6px) rotate(var(--r, 0deg));
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(34, 23, 14, 0.45), 0 28px 30px rgba(0, 0, 0, 0.55);
}
.card:focus-visible { outline: 2px solid var(--candle); outline-offset: 3px; }

.card.picked {
  z-index: 2;
  transform: translateZ(140px) translateY(-70px) rotateX(calc(-1 * var(--tilt)));
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(34, 23, 14, 0.45), 0 60px 50px rgba(0, 0, 0, 0.45);
}

.card.pending { visibility: hidden; }
.card.undealt {
  opacity: 0;
  transform: translate(var(--dx), var(--dy)) rotate(-28deg) scale(0.5);
}
.card.no-anim { transition: none; }

.card .name {
  font-family: "VT323", ui-monospace, "Courier New", monospace;
  font-size: clamp(13px, 1.9vw, 18px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.card .sigil {
  flex: 1;
  display: grid;
  place-items: center;
}

.sigil svg {
  width: 72%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sigil svg .fill { fill: var(--ink); }

.card.face-down {
  background: linear-gradient(160deg, rgba(255, 200, 140, 0.12), transparent 55%), #3a2618;
  border-color: #5a3d27;
  box-shadow: inset 0 0 0 4px #3a2618, inset 0 0 0 5px rgba(216, 198, 161, 0.3), 0 12px 18px rgba(0, 0, 0, 0.6);
}
.card.face-down .name { color: var(--paper); }
.card.face-down svg { stroke: var(--paper-edge); }

/* opened card */

dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 28px 24px 24px;
  background: linear-gradient(160deg, rgba(255, 240, 205, 0.3), transparent 50%), var(--paper);
  color: var(--ink);
  border: 3px solid var(--paper-edge);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

dialog[open] { animation: flip-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes flip-in {
  from { transform: perspective(900px) rotateY(80deg) scale(0.6); opacity: 0; }
}

dialog::backdrop { background: rgba(0, 0, 0, 0.72); }

dialog h2 { margin: 0 0 12px; }
dialog a { color: #7a3b12; }

.close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.small { font-size: 17px; opacity: 0.8; }

/* the odds lab */

.lab canvas {
  width: 100%;
  height: auto;
  background: #e6d7b8;
  border: 1px solid var(--paper-edge);
  border-radius: 4px;
}

.lab label {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 15px;
}

.lab input { width: 100%; accent-color: #7a3b12; }
.lab output { text-align: right; }

/* swipe predictor demo */

.swipe-demo {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  gap: 8px 28px;
  margin: 12px 0;
}

.phone {
  position: relative;
  width: 150px;
  height: 260px;
  overflow: hidden;
  background: #111;
  border: 6px solid #1c1c1c;
  border-radius: 22px;
}

.profile {
  position: absolute;
  inset: 8px;
  overflow: hidden;
  background: #222;
  border-radius: 12px;
}

.profile .photo {
  height: 78%;
  filter: blur(7px);
  transform: scale(1.15);
}

.profile .bar {
  display: block;
  height: 8px;
  margin: 10px 10px 0;
  background: #444;
  border-radius: 4px;
}
.profile .bar.short { width: 45%; margin-top: 6px; }

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  font: 20px "VT323", ui-monospace, "Courier New", monospace;
  color: #fff6d8;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
}

.folders { display: grid; gap: 18px; }

.folder {
  position: relative;
  padding: 18px 12px 8px;
  min-width: 96px;
  font-size: 14px;
  background: #c9a86a;
  border-radius: 2px 6px 6px 6px;
}
.folder::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 40%;
  height: 10px;
  background: inherit;
  border-radius: 4px 4px 0 0;
}
.folder.no { background: #a99877; }
.folder b { float: right; }

.swipe-status {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  text-align: center;
  font: 18px "VT323", ui-monospace, "Courier New", monospace;
}

.thumb {
  position: absolute;
  width: 40px;
  height: 52px;
  border-radius: 4px;
  pointer-events: none;
}

/* small cards inside an opened card */

.sub-row { display: flex; justify-content: center; gap: 12px; margin: 14px 0 6px; }

.sub-card {
  min-width: 84px;
  height: 58px;
  padding: 6px 10px;
  font: 16px "VT323", ui-monospace, "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: linear-gradient(160deg, rgba(255, 240, 205, 0.35), transparent 60%), var(--paper);
  border: 1.5px solid var(--paper-edge);
  border-radius: 5px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transform: rotate(-2deg);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.sub-card:nth-child(even) { transform: rotate(2deg); }
.sub-card:hover { transform: translateY(-3px); }
.sub-card.active {
  border-color: #7a3b12;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}

/* card demos */

.demo-caption {
  margin: 6px 0 14px;
  text-align: center;
  font: 16px "VT323", ui-monospace, "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.flip-demo { perspective: 900px; margin: 12px 0 0; }

.flip {
  position: relative;
  width: min(280px, 100%);
  height: 210px;
  margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.flip.turned { transform: rotateY(180deg); }

.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  font: 13px system-ui, sans-serif;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  backface-visibility: hidden;
}

.admin { background: #f3f3f3; color: #222; }
.admin-top { display: flex; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid #ddd; }
.platform { color: var(--accent); }
.admin label { display: grid; gap: 3px; color: #666; }
.field { display: block; min-height: 26px; padding: 4px 8px; color: #111; background: #fff; border: 1px solid #ccc; border-radius: 4px; }
.save { align-self: flex-end; margin-top: auto; padding: 5px 14px; color: #fff; background: var(--accent); border-radius: 4px; transition: transform 0.15s; }
.save.pressed { transform: scale(0.9); }

.store { align-items: center; text-align: center; color: #111; background: #fff; transform: rotateY(180deg); }
.shirt { width: 78px; stroke: #222; stroke-width: 1.5; }
.store-price { color: #555; }
.cart { margin-top: auto; padding: 5px 14px; color: #fff; background: #111; border-radius: 4px; }

.board-demo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 0;
}
.board-demo .demo-caption { grid-column: 1 / -1; }
.col { min-height: 196px; padding: 8px; background: rgba(34, 23, 14, 0.08); border-radius: 6px; }
.col b { display: block; margin-bottom: 6px; font-size: 13px; }
.slot { display: grid; align-content: start; gap: 6px; }
.task {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  font-size: 12px;
  background: #fffaf0;
  border: 1px solid rgba(34, 23, 14, 0.2);
  border-radius: 4px;
}
.task i {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  font: normal 10px system-ui, sans-serif;
  color: #fff;
  background: #7a3b12;
  border-radius: 50%;
}

.ladder { margin: 12px auto 0; border-collapse: collapse; font: 18px "VT323", ui-monospace, "Courier New", monospace; }
.ladder th { font-weight: normal; opacity: 0.7; padding: 2px 10px; }
.ladder td { min-width: 58px; padding: 2px 10px; text-align: center; border-bottom: 1px solid rgba(34, 23, 14, 0.08); }
.ladder td.b { background: rgba(110, 160, 220, 0.3); }
.ladder td.l { background: rgba(230, 140, 160, 0.3); }
.ladder td.p { background: #efe6d2; }
.ladder tr.ltp td.p { background: #e8c25a; font-weight: bold; }
.ladder td.me { min-width: 170px; text-align: left; font-weight: bold; color: #7a3b12; }

.cwl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 2px; }
.cwl-group { text-align: center; font: 12px system-ui, sans-serif; }
.cwl-pips { display: flex; justify-content: center; gap: 3px; margin-bottom: 3px; }
.cwl-pips i { width: 14px; height: 14px; background: rgba(34, 23, 14, 0.15); border-radius: 3px; transition: background 0.4s, transform 0.4s; }
.cwl-pips i.on { background: var(--c); }
.cwl-pips i.now { transform: scale(1.35); box-shadow: 0 0 0 2px #e8c25a; }

.mac { display: block; width: 100%; height: auto; margin-top: 12px; border: 1px solid var(--paper-edge); border-radius: 4px; }
.poker-demo { margin: 12px 0 0; }
.felt {
  position: relative;
  height: 250px;
  color: #f3e9d2;
  background: radial-gradient(ellipse at 50% 50%, #2f6b45, #1d4a2f 70%);
  border: 6px solid #3a2414;
  border-radius: 125px;
  font-size: 17px;
}
.seat { position: absolute; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; }
.seat.villain { top: 12px; }
.seat.hero { bottom: 10px; }
.pkcards { display: flex; gap: 4px; }
.pkcard { display: grid; place-items: center; width: 28px; height: 38px; color: #111; background: #f7f1e3; border-radius: 3px; font-size: 18px; }
.pkcard.red { color: #b0302a; }
.pkcard.down { background: repeating-linear-gradient(45deg, #7a3b3b 0 4px, #5e2a2a 4px 8px); }
.v-act, .h-act { min-height: 1.2em; color: #e8c25a; }
.pk-hud { position: absolute; top: 14px; right: 26px; padding: 4px 8px; line-height: 1.15; background: rgba(0, 0, 0, 0.6); border-radius: 4px; font-size: 16px; }
.pot { position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%); opacity: 0.8; }
.freq { margin-top: 10px; }
.freq-labels { display: flex; justify-content: space-between; font-size: 18px; }
.small-labels { font-size: 15px; opacity: 0.7; }
.freq-bar { position: relative; height: 14px; background: rgba(34, 23, 14, 0.15); border-radius: 3px; }
.freq-bar i { display: block; width: 0; height: 100%; background: #7a3b12; border-radius: 3px; transition: width 0.3s; }
.freq-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #22170e; }

@media (max-width: 480px) {
  .pk-hud { right: 14px; font-size: 14px; }
  .seat.villain { left: 38%; }
}

.clan { padding: 8px; font: 13px system-ui, sans-serif; color: #eee; background: #2a2f3a; border-radius: 8px; }
.clan-row {
  display: grid;
  grid-template-columns: 22px 1fr 76px 96px 46px;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  padding: 5px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.clan-row:last-child { margin-bottom: 0; }
.clan-row.me { background: rgba(232, 194, 90, 0.22); outline: 1px solid #e8c25a; }
.clan-row .name.blur { filter: blur(4px); }
.clan-row .league { color: #c9d3e6; }
.clan-row .trophies { text-align: right; }
.crown { width: 16px; margin-right: 4px; vertical-align: -2px; fill: #e8c25a; }

.tree { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: 6px; }
.xp-demo { margin: 12px 0 0; }
.xp-top { display: flex; justify-content: space-between; font: 18px "VT323", ui-monospace, "Courier New", monospace; }
.xp-bar { height: 14px; overflow: hidden; background: #1b1410; border: 1px solid #6b5537; border-radius: 2px; }
.xp-bar i { display: block; width: 0; height: 100%; background: linear-gradient(#e9c46a, #a8741a); }
.xp-level.done { font-weight: bold; color: #a8741a; }

.gan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 300px; margin: 12px auto 0; }
.gan-grid canvas { width: 100%; border-radius: 3px; image-rendering: pixelated; }

.contact-form { display: grid; gap: 10px; }
.contact-form label { display: grid; gap: 4px; font-size: 18px; }
.contact-form input, .contact-form textarea {
  padding: 8px;
  font: inherit;
  color: var(--ink);
  background: #f3e9d2;
  border: 1px solid var(--paper-edge);
  border-radius: 4px;
}
.contact-form button {
  justify-self: start;
  padding: 8px 18px;
  font: inherit;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.form-status { margin: 0; font-size: 18px; }

@media (max-width: 480px) {
  .clan-row { grid-template-columns: 20px 1fr 70px 44px; }
  .clan-row .league { display: none; }
  .ladder td, .ladder th { padding: 2px 5px; min-width: 40px; }
  .ladder td.me { min-width: 0; font-size: 11px; }
}

/* plain version */

#plain {
  display: none;
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 16px 64px;
}

body.list #plain { display: block; }
body.list .scene { display: none; }
#plain h1 { margin: 0 0 8px; font: 36px "VT323", ui-monospace, "Courier New", monospace; letter-spacing: 0.08em; text-transform: uppercase; }
#plain h2, dialog h2 { font-family: "VT323", ui-monospace, "Courier New", monospace; font-weight: normal; font-size: 26px; letter-spacing: 0.08em; text-transform: uppercase; }

#plain h2 { margin-top: 32px; color: var(--candle); }
#plain [data-demo]:not(form), #plain .small, #plain .deck { display: none; }
#plain .facts { color: var(--muted); font-size: 18px; }

@media (max-width: 860px) {
  .board { grid-template-columns: repeat(3, auto); }
}

@media (max-width: 700px) {
  .candle, .burnt, .prop { display: none; }
}

@media (max-width: 520px) {
  :root { --tilt: 26deg; }
  .table { margin-top: max(22vh, 120px); }
  .board { padding: 24px 8px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .glow, .dealer .eye, .flame, dialog[open] { animation: none; }
  .card, .board, .dealer { transition: none; }
}
