:root {
  --bg: #f3ead8;
  --panel: #fff8ee;
  --ink: #1c2740;
  --dim: #6a7590;
  --gold: #c9a227;
  --gold-hi: #a67c12;
  --navy: #243044;
  --blue: #3a6aa8;
  --line: #d4c4a4;
  --glow: 0 0 22px rgba(201, 162, 39, 0.28);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai", sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(201, 162, 39, 0.07) 1px, transparent 1px),
    radial-gradient(900px 480px at 50% -8%, #f7f1e4 0%, #efe3cf 42%, var(--bg) 78%),
    radial-gradient(520px 240px at 92% 108%, rgba(201, 162, 39, 0.14), transparent 62%);
  background-size: 100% 4px, auto, auto;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  font-size: 13px;
  line-height: 1.45;
}
.title, .play-now, .play-tag, .ticket h3, .ticket .cost, .kicker, h1, h2, .fair-badge,
.hud, .hud-chip, .split b {
  font-family: "Press Start 2P", monospace;
}
.crt {
  max-width: 1040px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-t)) 16px calc(28px + var(--safe-b));
}
.topbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: nowrap; }
.logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; background: transparent; }
.brand-text { min-width: 0; flex: 1; }
.title { font-size: 11px; letter-spacing: 1px; font-family: "Press Start 2P", monospace; color: var(--gold-hi); text-shadow: 0 0 12px rgba(240, 193, 74, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 11px; color: var(--dim); margin-top: 4px; }
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}
.lang-drop { position: relative; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  border: 2px solid var(--gold);
  padding: 6px;
  min-width: 72px;
}
.lang-menu.hidden { display: none; }
.langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.lang-btn {
  font-family: "Noto Sans", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 8px;
  min-width: 32px;
  min-height: 32px;
  cursor: pointer;
  color: var(--dim);
  background: var(--panel);
  border: 2px solid var(--line);
  touch-action: manipulation;
}
.lang-btn:hover { color: var(--ink); border-color: var(--gold); }
.bgm-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 1;
  padding: 7px 8px;
  min-width: 32px;
  min-height: 32px;
  cursor: pointer;
  color: var(--gold);
  background: var(--panel);
  border: 2px solid var(--gold);
  flex-shrink: 0;
  touch-action: manipulation;
}
.bgm-btn:hover { color: var(--ink); border-color: var(--ink); }
.bgm-btn.muted { color: var(--dim); border-color: var(--line); }
.bgm-ico { display: block; position: relative; }
.bgm-btn.muted .bgm-ico::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  border-top: 2px solid currentColor;
  transform: rotate(-28deg);
}
.wallet-btn {
  font-family: "Noto Sans", "Noto Sans SC", sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  min-height: 32px;
  cursor: pointer;
  color: #1a1204;
  background: linear-gradient(180deg, #edd078, #c9a227);
  border: 2px solid #000;
  flex-shrink: 0;
  touch-action: manipulation;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.28);
}
.swap-btn {
  font-family: "Noto Sans", "Noto Sans SC", sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  min-height: 32px;
  cursor: pointer;
  color: var(--gold);
  background: var(--panel);
  border: 2px solid var(--gold);
  flex-shrink: 0;
  touch-action: manipulation;
}
.claim-btn {
  font-family: "Noto Sans", "Noto Sans SC", sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  min-height: 32px;
  cursor: pointer;
  color: var(--blue);
  background: var(--panel);
  border: 2px solid var(--blue);
  flex-shrink: 0;
  touch-action: manipulation;
}
.claim-btn:disabled { opacity: 0.45; cursor: default; }
.swap-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(243, 234, 216, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.swap-card {
  width: min(420px, 100%);
  background:
    linear-gradient(180deg, rgba(240, 193, 74, 0.12), transparent 28%),
    var(--panel);
  border: 4px solid var(--gold);
  box-shadow: 8px 8px 0 #000, 0 0 28px rgba(240, 193, 74, 0.28);
  padding: 16px;
}
.swap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.swap-ico { width: 28px; height: 28px; image-rendering: pixelated; flex-shrink: 0; }
.swap-head h2 { margin: 0; font-size: 14px; }
.swap-note { font-size: 8px; margin: 0 0 12px; }
.swap-field { display: block; margin: 8px 0; }
.swap-field span { display: block; font-size: 8px; color: var(--gold); margin-bottom: 6px; }
.swap-in, .swap-out {
  display: flex; gap: 8px; align-items: center;
  background: var(--panel); border: 3px solid var(--line); padding: 8px;
}
.swap-in select, .swap-in input, .swap-out select, .swap-out input {
  font: inherit; font-size: 12px; color: var(--ink);
  background: transparent; border: 0; outline: none;
}
.swap-in input, .swap-out input { flex: 1; min-width: 0; }
.swap-in select, .swap-out select { color: var(--gold); }
.swap-max {
  flex-shrink: 0;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  color: #1a1204;
  background: var(--gold);
  border: 2px solid #000;
  padding: 4px 8px;
  cursor: pointer;
  touch-action: manipulation;
}
.swap-rate, .swap-slip {
  margin: 6px 0 0;
  font-size: 8px;
  color: var(--dim);
  min-height: 1.2em;
}
.swap-slip { margin-top: 4px; }
.swap-arrow { text-align: center; color: var(--gold); margin: 4px 0; }
.swap-flip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 4px 0;
  background: var(--panel);
  border: 3px solid var(--gold);
  color: var(--gold);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
}
.swap-card .primary { width: 100%; margin-top: 10px; }
.swap-card .primary:disabled { opacity: 0.45; cursor: not-allowed; }
body:not([data-lang="en"]) .swap-note,
body:not([data-lang="en"]) .swap-field span,
body:not([data-lang="en"]) .swap-rate,
body:not([data-lang="en"]) .swap-slip { font-size: 13px; }
body:not([data-lang="en"]) .swap-head h2 { font-size: 18px; }
.wallet-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  margin-bottom: 8px;
  padding: 4px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  flex-wrap: wrap;
}
#rewardPct {
  color: var(--gold-hi);
}
.lobby-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 10px;
}
.lobby-tab {
  font-family: "Noto Sans", "Noto Sans SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 6px;
  min-height: 36px;
  cursor: pointer;
  color: var(--dim);
  background: var(--panel);
  border: 2px solid var(--line);
}
.lobby-tab.on {
  color: #1a1204;
  background: linear-gradient(180deg, #edd078, #c9a227);
  border-color: #000;
}
.notice-board {
  margin: 0 0 14px;
  border: 3px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.14), transparent 42%),
    var(--panel);
  padding: 10px 12px 8px;
  box-shadow: 4px 4px 0 #000;
}
.notice-board .kicker { margin-bottom: 8px; }
.notice-viewport {
  overflow: hidden;
  width: 100%;
  border: 2px solid var(--line);
  background: var(--bg);
}
.notice-list {
  list-style: none;
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  transition: transform 0.45s ease;
  will-change: transform;
}
.notice-list li {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  color: var(--ink);
}
.notice-list b {
  display: block;
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.notice-list p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}
.notice-a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.notice-a:hover { color: var(--gold-hi); }
.notice-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.notice-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 2px solid var(--gold);
  background: transparent;
  border-radius: 0;
  cursor: pointer;
}
.notice-dots button.on {
  background: var(--gold);
}
.meme-line {
  margin: 16px 0 4px;
  text-align: center;
  color: var(--gold-hi);
  font-size: 8px;
  letter-spacing: 0.5px;
  line-height: 1.5;
}
body:not([data-lang="en"]) .meme-line {
  font-size: 13px;
  letter-spacing: 0;
}
.reward-line {
  margin: 0 0 8px;
  color: var(--gold-hi);
  font-size: 12px;
}
.free-offer {
  margin: 0 0 8px;
  color: var(--gold-hi);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}
.lobby-pane.hidden { display: none !important; }

@media (min-width: 901px) {
  .pane-more:not(.hidden) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .pane-more .ctas,
  .pane-more .admin {
    grid-column: 1 / -1;
  }
}
.rules-jump {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-hi);
  background: var(--panel);
  border: 2px solid var(--gold);
  cursor: pointer;
}
.how-note {
  margin: 0 0 12px;
  color: var(--gold-hi);
  font-size: 13px;
  line-height: 1.5;
}
#freeLeft { color: var(--gold-hi); }
#freeLeft:empty { display: none; }
.chain-link { color: var(--blue); }
.chain-banner {
  border: 3px solid var(--gold);
  background: var(--panel);
  padding: 10px;
  margin-bottom: 12px;
  font-size: 8px;
  line-height: 1.7;
}
.chain-banner button { margin-top: 8px; }
.admin {
  margin-top: 14px;
  border: 3px dashed var(--gold);
  padding: 12px;
}
.row.left { justify-content: flex-start; flex-wrap: wrap; }
.ticket-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 8px;
}
.ticket-edit input,
.ticket-edit select {
  width: 72px;
  background: var(--panel);
  color: var(--ink);
  border: 2px solid var(--line);
  padding: 8px;
  font: inherit;
}
.ticket-edit select {
  width: auto;
  min-width: 96px;
}
.tx-line { font-size: 8px; color: var(--gold); min-height: 1.6em; margin: 8px 0 0; }
.tx-line a { color: var(--blue); }
#swapStatus.ok {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--gold-hi);
  padding: 10px 8px;
  border: 3px solid var(--gold);
  background: var(--panel);
}
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(92vw, 420px);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  color: #1a1204;
  background: linear-gradient(180deg, #edd078, #c9a227);
  border: 3px solid #000;
  box-shadow: 6px 6px 0 #000;
}
body[data-lang="zh"] { font-family: "Noto Sans SC", "Press Start 2P", sans-serif; }
body[data-lang="ja"] { font-family: "Noto Sans JP", "Press Start 2P", sans-serif; }
body[data-lang="ko"] { font-family: "Noto Sans KR", "Press Start 2P", sans-serif; }
body[data-lang="th"] { font-family: "Noto Sans Thai", "Press Start 2P", sans-serif; }
body[data-lang="vi"],
body[data-lang="ru"] { font-family: "Noto Sans", "Press Start 2P", sans-serif; }
body:not([data-lang="en"]) .kicker,
body:not([data-lang="en"]) h1,
body:not([data-lang="en"]) .lede,
body:not([data-lang="en"]) li,
body:not([data-lang="en"]) .hint,
body:not([data-lang="en"]) .sub,
body:not([data-lang="en"]) p,
body:not([data-lang="en"]) .result,
body:not([data-lang="en"]) .hud,
body:not([data-lang="en"]) .stat-k,
body:not([data-lang="en"]) .stat-s,
body:not([data-lang="en"]) .cta-s,
body:not([data-lang="en"]) .eligible,
body:not([data-lang="en"]) .posted,
body:not([data-lang="en"]) .auto-body,
body:not([data-lang="en"]) .play-now {
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.55;
  font-family: inherit;
}
body:not([data-lang="en"]) .kicker,
body:not([data-lang="en"]) h1,
body:not([data-lang="en"]) .stat-k,
body:not([data-lang="en"]) .play-now,
body:not([data-lang="en"]) .fair-badge {
  font-family: inherit;
}
body:not([data-lang="en"]) h1 { font-size: 22px; line-height: 1.35; }
body:not([data-lang="en"]) .kicker,
body:not([data-lang="en"]) .stat-k,
body:not([data-lang="en"]) .cta-k { font-size: 12px; }
body:not([data-lang="en"]) button.primary,
body:not([data-lang="en"]) button.ghost,
body:not([data-lang="en"]) .ticket,
body:not([data-lang="en"]) .cta-t,
body:not([data-lang="en"]) .claim-btn,
body:not([data-lang="en"]) .swap-btn,
body:not([data-lang="en"]) .wallet-btn { font-size: 13px; }
body:not([data-lang="en"]) .ticket h3 { font-size: 15px; }
body:not([data-lang="en"]) .ticket p,
body:not([data-lang="en"]) .ticket .meta,
body:not([data-lang="en"]) .hint,
body:not([data-lang="en"]) .board-list { font-size: 12px; }
body:not([data-lang="en"]) .stat-v { font-size: 20px; font-family: "Noto Sans SC", "Noto Sans", sans-serif; }

.panel {
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.08), transparent 18%),
    var(--panel);
  border: 3px solid var(--gold);
  box-shadow: 6px 6px 0 #d4c4a4, 0 0 18px rgba(201, 162, 39, 0.16);
  padding: 14px;
}
.hidden { display: none !important; }
.kicker { font-size: 11px; color: var(--gold); margin: 0 0 8px; line-height: 1.5; font-weight: 700; }
h1 { font-size: 16px; line-height: 1.6; margin: 0 0 14px; }
.lede, p, li { font-size: 13px; line-height: 1.5; color: var(--dim); }
.rules { padding: 0; margin: 0 0 16px; list-style: none; }
.rules li { color: var(--ink); margin: 8px 0; padding-left: 14px; position: relative; }
.rules li::before { content: ">"; position: absolute; left: 0; color: var(--gold); }
.pane-rules { min-width: 0; }
.rules-card {
  border: 3px solid var(--gold);
  background: var(--panel);
  padding: 14px;
  box-shadow: 4px 4px 0 #000;
}
.rules-card h2 { margin: 0 0 10px; font-size: 16px; line-height: 1.4; }
.rules.full { margin: 0; }
.rules.full li { margin: 10px 0; line-height: 1.55; color: var(--ink); }
.public-fund { display: none !important; }

.play-lead { font-size: 8px; color: var(--dim); margin: 0 0 10px; line-height: 1.7; }
.rules-fold {
  margin: 0 0 14px;
  border: 2px solid var(--line);
  padding: 8px 10px;
  background: var(--panel);
}
.rules-fold summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 8px;
  list-style: none;
}
.rules-fold summary::-webkit-details-marker { display: none; }
.rules-fold summary::before { content: "> "; }
.rules-fold[open] summary::before { content: "v "; }
.rules-fold .rules { margin: 8px 0 0; }
.dead-line { font-size: 8px; margin: 0 0 8px; word-break: break-all; }
.dead-line a { color: #ff8a7a; }
.board-list a { color: var(--blue); font-size: inherit; }
.board-list li.empty { color: var(--dim); border: 0; justify-content: flex-start; }
.tx-line.burn-tx { color: #ff8a7a; }
.burn-log { min-height: 0; margin-bottom: 16px; }

.boards {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.boards.two { grid-template-columns: 1fr 1fr; }
.boards.three { grid-template-columns: 1fr 1fr 1fr; }
.invite-bar {
  display: grid;
  grid-template-columns: 48px 1.4fr 0.6fr;
  gap: 10px;
  margin-bottom: 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 10px;
  align-items: center;
}
.invite-ico { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; background: transparent; }
.invite-lead { font-size: 8px; margin: 0 0 8px; }
.invite-link-row { display: flex; gap: 6px; }
.invite-link-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--line);
  padding: 8px;
  font: inherit;
  font-size: 8px;
}
.invite-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.invite-pts, .claimable { font-size: 8px; color: var(--dim); }
.invite-pts strong, .claimable strong { display: block; color: var(--gold); margin-top: 4px; font-size: 12px; }
.crew {
  margin: 0 0 12px;
  padding: 10px;
  border: 2px solid var(--gold);
  background: var(--panel);
}
.pane-play .crew { margin-top: 14px; }
.crew-k {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 8px;
}
.crew-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 8px;
}
.crew-slot {
  display: block;
  height: 28px;
  border: 2px dashed var(--line);
  background: var(--bg);
}
.crew-slot.on {
  border-style: solid;
  border-color: var(--gold);
  background: var(--gold);
}
.crew-cta {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 8px;
  line-height: 1.45;
}
.crew [data-crew-btn] { width: 100%; }
.crew-invite {
  margin: 0 0 8px;
  padding: 8px;
}
.hud-chip.friend {
  color: var(--gold-hi);
  border-color: var(--gold);
}
.over-share {
  margin: 10px 0;
  padding: 10px;
  border: 2px solid var(--gold);
  background: var(--panel);
}
.over-share-hook {
  margin: 0 0 6px;
  color: var(--gold-hi);
  font-size: 10px;
  line-height: 1.4;
}
.over-share-next {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 8px;
}
.over-share .row { margin: 0; }
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.split {
  border: 2px solid var(--line);
  padding: 8px;
  background: var(--panel);
  font-size: 12px;
  color: var(--dim);
}
.split img {
  width: 48px; height: 48px; object-fit: contain; display: block; margin-bottom: 6px;
  image-rendering: pixelated; background: transparent;
}
.split b { display: block; color: var(--gold); font-size: 12px; margin-bottom: 4px; }
.stat-k {
  display: flex; align-items: center; gap: 8px;
}
.stat-k img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; flex-shrink: 0; background: transparent; }
.split.week { border-color: var(--blue); }
.split.burn { border-color: #d94b3a; }
.split.invite { border-color: var(--gold); }
.split i { display: block; color: var(--ink); margin-top: 4px; font-style: normal; }
.split-note, .split-live {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--dim);
  font-weight: 600;
}
.split-claim {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  min-height: 28px;
}
.split-claim:disabled {
  opacity: 0.45;
  cursor: default;
}
.split-claim[hidden] {
  display: none;
}
.split-live { color: var(--gold-hi); }
.stat.burn-stat { border-color: #d94b3a; }
.stat.invite-stat { border-color: var(--gold); }
.stat.burn-stat .stat-k { color: #ff8a7a; }
.stat.invite-stat .stat-k { color: var(--gold); }
.stat {
  background: var(--panel);
  border: 2px solid var(--line);
  padding: 8px;
  min-height: 0;
  box-shadow: none;
}
.stat.pool { border-color: var(--gold); }
.stat.board { border-color: var(--blue); }
.stat-k {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  color: var(--gold);
  margin: 0 0 8px;
}
.stat.board .stat-k { color: var(--blue); }
.stat-v {
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 8px;
  line-height: 1.4;
}
.stat-s { font-size: 7px; margin: 0; }
.board-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 7px;
  color: var(--ink);
  line-height: 1.7;
}
.board-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  margin: 0;
  padding: 2px 0;
  border-bottom: 1px solid #1c2a3e;
}
.board-list li.you { color: var(--gold); }
.board-list .tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .board-pts { flex-shrink: 0; white-space: nowrap; }
.board-list li.board-head {
  color: var(--dim);
  border-bottom-color: var(--line);
  font-weight: 700;
}
.board-list li.board-more {
  border: 0;
  justify-content: center;
  padding-top: 8px;
}
.board-list .board-more button {
  width: 100%;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-hi);
  background: transparent;
  border: 2px solid var(--gold);
  padding: 6px 8px;
  cursor: pointer;
}
.board-lookup {
  margin: 0 0 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 10px;
}
.board-lookup-note {
  margin: 0 0 8px;
  font-size: 8px;
  color: var(--dim);
}
.board-lookup-row { display: flex; gap: 6px; align-items: stretch; }
.board-lookup-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--line);
  padding: 8px;
  font: inherit;
  font-size: 8px;
}
.board-lookup-out {
  margin: 8px 0 0;
  font-size: 9px;
  color: var(--gold);
  min-height: 1.2em;
  word-break: break-all;
}
.board-lookup-out.dim { color: var(--dim); }
.board-lookup-out.bad { color: #c45b4a; }

.tickets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 4px 0 12px; }
.ticket {
  position: relative;
  background:
    linear-gradient(180deg, rgba(240, 193, 74, 0.1), transparent 36%),
    var(--panel);
  color: var(--ink); border: 3px solid var(--blue);
  font: inherit; text-align: left; padding: 12px 10px 36px; cursor: pointer;
  touch-action: manipulation;
  overflow: hidden;
  box-shadow: 4px 4px 0 #000;
}
.ticket::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.16) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: foil 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes foil {
  0%, 55% { transform: translateX(-130%); }
  80%, 100% { transform: translateX(130%); }
}
.ticket:hover {
  border-color: var(--gold);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 6px 8px 0 #000, 0 0 22px rgba(240, 193, 74, 0.35);
}
.ticket.t0 { border-color: #5ad0a0; }
.ticket .ticket-mascot { animation: mascot-bob 1.8s ease-in-out infinite; }
.ticket .cost { color: var(--gold); font-size: 11px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.ticket .cost img { width: 18px; height: 18px; object-fit: contain; image-rendering: pixelated; background: transparent; }
.ticket h3 { font-size: 10px; margin: 0 0 4px; }
.ticket p, .ticket .meta { font-size: 12px; font-family: "Noto Sans", "Noto Sans SC", sans-serif; color: var(--dim); margin: 0; line-height: 1.4; }
.ticket-mascot {
  width: 56px; height: 56px; object-fit: contain; display: block; margin: 0 auto 6px;
  image-rendering: pixelated; background: transparent; border: 2px solid var(--line);
}
.ticket.t0 { border-color: #5ad0a0; }
.ticket.t0 .ticket-mascot { border-color: #5ad0a0; filter: none; }
.ticket.t1 { border-color: #5aa6ff; }
.ticket.t1 .ticket-mascot { border-color: #5aa6ff; filter: none; }
.ticket.t2 { border-color: #9b7dff; }
.ticket.t2 .ticket-mascot { border-color: #9b7dff; filter: none; }
.ticket.t3 { border-color: var(--gold); }
.ticket.t3 .ticket-mascot { border-color: var(--gold); filter: none; }
.play-tag {
  position: absolute; left: 0; right: 0; bottom: 0;
  text-align: center; background: linear-gradient(180deg, #edd078, #c9a227); color: #1a1204;
  font-size: 9px; padding: 6px 0; font-weight: 700;
  animation: play-pulse 1.5s ease-in-out infinite;
}
.ticket-coin {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px;
  object-fit: contain; image-rendering: pixelated;
}
.ticket .free-badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  font-size: 11px; font-family: "Noto Sans", sans-serif; font-weight: 700;
  color: #1a1204; background: var(--gold);
  padding: 3px 6px;
}
.wallet-line #freeLeft { color: var(--gold); white-space: nowrap; }

.ctas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.cta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 12px;
  border: 3px solid var(--line);
  background: var(--panel);
  min-height: 88px;
}
.cta.x { border-color: #4a5a70; }
.cta.tg { border-color: #2a9bd6; }
.cta.portal { border-color: #2f6b8a; }
.cta:hover { border-color: var(--gold); }
.cta-k { font-size: 11px; color: var(--gold); }
.cta-t { font-size: 13px; color: var(--ink); line-height: 1.4; }
.cta-s { font-size: 12px; color: var(--dim); line-height: 1.45; }
.ctas.mini { margin: 12px 0 0; }
.ctas.mini .cta { min-height: 0; }
.eligible {
  display: inline-block;
  font-size: 7px;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: 6px 8px;
  margin: 0 0 8px;
}
.posted { font-size: 8px; color: var(--gold); margin: 0 0 8px; }

.meter-preview {
  display: flex; gap: 10px; align-items: center; margin: 16px 0;
  border: 3px dashed var(--line); padding: 10px;
}
.meter-preview img { width: 48px; height: 48px; object-fit: cover; image-rendering: pixelated; }
.row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
button.primary, button.ghost {
  font-family: "Noto Sans", "Noto Sans SC", sans-serif;
  font-size: 13px; font-weight: 700; padding: 10px 14px; cursor: pointer; border: 3px solid #000;
  min-height: 42px; touch-action: manipulation;
}
.primary { background: linear-gradient(180deg, #edd078, #c9a227); color: #1a1204; box-shadow: 0 0 14px rgba(201, 162, 39, 0.28); }
.ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.game { padding: 12px; display: flex; flex-direction: column; }
.play-stage {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.hud {
  display: flex; justify-content: space-between; gap: 8px; font-size: 8px; color: var(--gold); margin-bottom: 8px;
  align-items: stretch;
}
.hud-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background: var(--panel);
  border: 2px solid var(--gold);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.18);
  padding: 4px 8px;
  min-width: 0;
}
.hud-chip.tier { flex: 1.2; }
.hud-chip.score, .hud-chip.grab { flex: 0.9; text-align: right; }
.hud-chip.grab {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  text-align: left;
}
.hud-chip.grab img {
  width: 18px;
  height: 18px;
  image-rendering: auto;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(240, 193, 74, 0.7));
}
.hud-chip.grab small, .hud-chip.grab b { line-height: 1.15; }
.hud-chip small { color: var(--dim); font-size: 6px; letter-spacing: 1px; }
.hud-chip b { color: var(--gold-hi); font-weight: 700; }
.bar { height: 10px; background: var(--panel); border: 3px solid var(--gold); margin-bottom: 8px; box-shadow: 0 0 10px rgba(240, 193, 74, 0.18); }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c49a4a, var(--gold-hi)); box-shadow: 0 0 8px rgba(255, 224, 138, 0.5); }
.stage {
  position: relative;
  background: linear-gradient(180deg, #cfe0f2 0%, #dde8f4 52%, #f6ead4 100%);
  box-shadow:
    inset 0 0 0 2px #ead9b8,
    0 0 0 3px var(--gold),
    0 0 0 6px #e8dcc4,
    0 0 28px rgba(201, 162, 39, 0.22);
}
#cv {
  width: 100%;
  height: auto;
  display: block;
  background: #cfe0f2;
  image-rendering: pixelated;
  touch-action: none;
}
.hint { text-align: center; font-size: 7px; margin: 10px 0 0; color: var(--dim); }
.run-note {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 5;
  margin: 0;
  padding: 6px 10px;
  max-width: 92%;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #1a1204;
  background: linear-gradient(180deg, #edd078, #c9a227);
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  pointer-events: none;
}
.run-note.hidden { display: none !important; }
.hud-chip.x2 b { color: var(--gold-hi); text-shadow: 0 0 8px rgba(240, 193, 74, 0.7); }
.hud-chip.x2 small::after { content: " ×2"; color: var(--gold); }
#claimWhen { color: var(--gold); font-size: 11px; }
.result { font-size: 8px; line-height: 1.9; color: var(--ink); margin: 12px 0; }

.rotate-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(243, 234, 216, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.rotate-card { text-align: center; max-width: 280px; }
.rotate-card p { color: var(--ink); font-size: 10px; line-height: 1.7; }
.phone {
  width: 46px;
  height: 28px;
  margin: 0 auto 14px;
  border: 3px solid var(--gold);
  border-radius: 4px;
  animation: flip 1.4s ease-in-out infinite;
}
@keyframes flip {
  0%, 40% { transform: rotate(90deg); }
  60%, 100% { transform: rotate(0deg); }
}

@media (max-width: 900px) {
  .crt { padding: calc(8px + var(--safe-t)) 8px calc(16px + var(--safe-b)); }
  .tickets { grid-template-columns: 1fr 1fr; gap: 6px; }
  .boards, .ctas, .boards.three, .boards.two, .invite-bar, .split-row { grid-template-columns: 1fr; }
  h1 { font-size: 13px; }
  .title { font-size: 13px; letter-spacing: 0; font-family: "Noto Sans", sans-serif; font-weight: 800; }
  .sub { display: none; }
  .logo { width: 28px; height: 28px; }
  .topbar { margin-bottom: 6px; gap: 6px; }
  .lang-btn, .wallet-btn, .swap-btn, .claim-btn, .bgm-btn {
    min-height: 30px; min-width: 28px; padding: 5px 6px; font-size: 11px;
  }
  .panel { padding: 10px; }
  .ticket { padding: 8px 8px 28px; }
  .ticket-mascot { width: 44px; height: 44px; }
  .ticket p { display: none; }
  .hero-art { height: 112px; }
  .hero-arcade { min-height: 112px; margin-bottom: 6px; }
  .hero-mascot { width: 48px; height: 48px; }
  .hero-copy h1 { font-size: 12px; }
  body:not([data-lang="en"]) .hero-copy h1 { font-size: 15px; }
  .play-now { font-size: 10px; margin: 0 0 6px; }
  .auto-steps { display: none; }
  .auto-body { display: none; }
  .invite-ico { width: 40px; height: 40px; }
}

/* Phone landscape: fill the screen, canvas takes remaining height */
@media (orientation: landscape) and (max-height: 560px) {
  html, body { height: 100%; overflow: hidden; }
  .crt {
    max-width: none;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: calc(4px + var(--safe-t)) calc(8px + var(--safe-r)) calc(4px + var(--safe-b)) calc(8px + var(--safe-l));
  }
  .topbar { margin-bottom: 4px; flex-shrink: 0; }
  .logo { width: 28px; height: 28px; }
  .title { font-size: 9px; }
  .sub { display: none; }
  .lang-btn, .wallet-btn, .swap-btn, .claim-btn, .bgm-btn { min-height: 28px; padding: 4px 6px; font-size: 10px; }
  .langs { max-width: none; }
  .panel {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px;
    box-shadow: 4px 4px 0 #000;
  }
  .panel.game {
    overflow: hidden;
    padding: 4px 6px;
  }
  .boards, .boards.three { grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
  .stat { min-height: 0; padding: 8px; }
  .tickets { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .ticket { padding: 6px 6px 24px; }
  .ctas { grid-template-columns: 1fr 1fr; }
  .cta { min-height: 0; padding: 8px; }
  .lede, .rules-fold, .hero-arcade, .auto-card { display: none; }
  .kicker { margin-bottom: 4px; }
  h1 { font-size: 11px; margin-bottom: 6px; }
  .hint { display: none; }
  .hud { margin-bottom: 2px; font-size: 7px; }
  .bar { margin-bottom: 2px; height: 6px; }
  .stage { flex: 1; min-height: 0; display: flex; }
  #cv { height: 100%; width: 100%; object-fit: contain; }
  .row { margin-top: 8px; }
  button.primary, button.ghost { min-height: 36px; padding: 8px 12px; }
  .swap-card { max-height: calc(100dvh - 16px); overflow: auto; }
  .rotate-gate { display: none !important; }
  .rotate-soft { display: none !important; }
}

html.wallet-dapp .rotate-gate,
body.wallet-dapp .rotate-gate { display: none !important; }

/* TokenPocket / wallet webview is locked portrait. During a run, CSS-rotate
   the play stage 90° so the canvas is landscape without OS rotate. */
html.force-landscape,
body.force-landscape {
  overflow: hidden;
  height: 100%;
  width: 100%;
}
body.playing.force-landscape {
  overflow: hidden;
  touch-action: none;
}
body.playing.force-landscape .crt {
  height: 100dvh;
  max-width: none;
  padding: 0;
  overflow: hidden;
}
body.playing.force-landscape .panel.game {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
body.playing.force-landscape .play-stage {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 8px 10px;
  background: var(--bg);
  overflow: hidden;
  touch-action: none;
}
body.playing.force-landscape .play-stage .hud {
  flex-shrink: 0;
  margin-bottom: 4px;
  font-size: 7px;
}
body.playing.force-landscape .play-stage .bar {
  flex-shrink: 0;
  height: 6px;
  margin-bottom: 4px;
  border-width: 2px;
}
body.playing.force-landscape .play-stage .stage {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.playing.force-landscape .play-stage #cv {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}
body.playing.force-landscape .rotate-soft { display: none !important; }

.rotate-soft {
  margin: 0 0 4px;
  font-size: 7px;
  line-height: 1.5;
  color: var(--dim);
  text-align: center;
  pointer-events: none;
}
body:not([data-lang="en"]) .rotate-soft { font-size: 11px; letter-spacing: 0; }

body.playing {
  overflow: hidden;
  height: 100dvh;
  user-select: none;
  overscroll-behavior: none;
  touch-action: none;
}
body.playing .crt {
  height: 100dvh;
  max-width: none;
  display: flex;
  flex-direction: column;
  padding: calc(6px + var(--safe-t)) calc(8px + var(--safe-r)) calc(6px + var(--safe-b)) calc(8px + var(--safe-l));
}
body.playing .topbar { display: none; }
body.playing .sub { display: none; }
body.playing .hint { display: none; }
body.playing .panel.game {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 4px 6px;
}
body.playing .play-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.playing .hud {
  margin-bottom: 4px;
  font-size: 7px;
}
body.playing .bar {
  height: 6px;
  margin-bottom: 4px;
  border-width: 2px;
}
body.playing .stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
body.playing #cv {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 100%;
}
body.playing .lang-drop,
body.playing .swap-btn,
body.playing .claim-btn { display: none; }

.hero-arcade {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 #d4c4a4;
  min-height: 118px;
  margin: 0 0 8px;
  background: #efe3cf;
}
.hero-art {
  width: 100%;
  height: 118px;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  image-rendering: pixelated;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 18, 32, 0.42) 0%, rgba(12, 18, 32, 0.12) 48%, transparent 78%);
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  inset: 0;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.hero-mascot {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
  border: 2px solid var(--gold);
  flex-shrink: 0;
  box-shadow: 3px 3px 0 #d4c4a4;
  animation: mascot-bob 1.6s ease-in-out infinite;
}
.hero-text { flex: 1; min-width: 0; }
.hero-copy h1 {
  color: #fff8ee;
  text-shadow: 0 2px 0 #1c2740, 0 0 14px rgba(0, 0, 0, 0.55);
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
body:not([data-lang="en"]) .hero-copy h1 {
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
}
.marquee-wrap {
  overflow: hidden;
  margin: 0 0 6px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee {
  display: inline-block;
  margin: 0;
  color: var(--gold-hi);
  font-size: 8px;
  letter-spacing: 1px;
  white-space: nowrap;
  padding-left: 100%;
  animation: marquee-run 14s linear infinite;
  text-shadow: 0 0 8px rgba(240, 193, 74, 0.5);
}
@keyframes marquee-run {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.hero-copy .play-lead { color: var(--ink); margin: 0; }
@keyframes blink {
  50% { opacity: 0.35; }
}
.auto-card {
  border: 3px solid #3d8dff;
  background:
    linear-gradient(180deg, rgba(61, 141, 255, 0.12), transparent 40%),
    var(--panel);
  padding: 12px;
  margin: 0 0 14px;
  box-shadow: 6px 6px 0 #000;
}
.auto-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.auto-head img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
}
.auto-card h2 {
  margin: 0;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
}
.auto-body {
  margin: 0 0 10px;
  color: var(--ink);
}
.auto-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.auto-step {
  border: 2px solid var(--line);
  background: var(--bg);
  padding: 8px 6px;
  text-align: center;
  font-size: 7px;
  color: var(--gold);
}
.auto-step img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  display: block;
  margin: 0 auto 6px;
  image-rendering: pixelated;
}
.auto-steps i { color: var(--gold); font-style: normal; }
.fair-badge {
  display: inline-block;
  margin: 0;
  color: #1a1204;
  background: var(--gold);
  border: 2px solid #000;
  padding: 6px 8px;
  font-size: 8px;
}
.play-now {
  color: var(--gold);
  font-size: 10px;
  margin: 0 0 8px;
  letter-spacing: 1px;
}
body:not([data-lang="en"]) .marquee,
body:not([data-lang="en"]) .auto-body,
body:not([data-lang="en"]) .auto-step,
body:not([data-lang="en"]) .fair-badge,
body:not([data-lang="en"]) .play-now,
body:not([data-lang="en"]) .play-tag { font-size: 13px; letter-spacing: 0; }
body:not([data-lang="en"]) .auto-card h2 { font-size: 18px; }

@media (max-width: 900px) {
  .invite-ico { width: 40px; height: 40px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .hero-art { height: 100px; }
  .hero-arcade { min-height: 100px; margin-bottom: 8px; }
  .hero-mascot { display: none; }
  .auto-steps { display: none; }
  .ticket-mascot { width: 40px; height: 40px; }
  .play-tag { font-size: 7px; padding: 4px 0; }
}

.auto-card {
  box-shadow: 6px 6px 0 #000, 0 0 20px rgba(77, 157, 255, 0.22);
}
.auto-step {
  border-color: var(--blue);
  box-shadow: 0 0 10px rgba(77, 157, 255, 0.15);
}
.fair-badge {
  background: linear-gradient(180deg, #edd078, #c9a227);
  animation: play-pulse 2s ease-in-out infinite;
}
.play-now {
  color: var(--gold-hi);
  text-shadow: 0 0 12px rgba(240, 193, 74, 0.45);
  animation: blink 1.6s steps(2, end) infinite;
}

.how-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0 0 12px;
}
.panel.game .how-strip,
.panel.game .hint {
  display: none !important;
}
.over-why {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--gold-hi);
  background: var(--panel);
  border: 3px solid var(--gold);
  box-shadow: 4px 4px 0 #000;
}
.over-why.dieBlock,
.over-why.dieLight,
.over-why.dieGap {
  border-color: #d94b3a;
  color: #b83a2a;
}
.over-why.encore,
.over-why.encore.dieBlock,
.over-why.encore.dieLight,
.over-why.encore.dieGap {
  border-color: var(--gold);
  color: var(--gold-hi);
}
.over-panel.cap .kicker {
  color: var(--gold-hi);
}
.over-panel h1 {
  font-size: 16px;
  line-height: 1.3;
}
.how-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  background: var(--panel);
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 #d4c4a4;
  padding: 8px 4px;
  font-size: 6px;
  color: var(--gold-hi);
  line-height: 1.4;
}
body:not([data-lang="en"]) .how-item {
  font-size: 11px;
  letter-spacing: 0;
}
.how-item span {
  font-family: "Noto Sans", "Noto Sans SC", sans-serif;
  font-weight: 700;
}
.how-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
}
.how-glyph {
  width: 28px;
  height: 28px;
  display: block;
  position: relative;
  image-rendering: pixelated;
}
.how-glyph.light {
  background: linear-gradient(180deg, #ffe08a 0%, rgba(255, 210, 80, 0.15) 100%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.how-glyph.pipe {
  background: #d94b3a;
  box-shadow: inset 0 -6px 0 #e6b84c, 0 0 0 2px #152238;
}
.how-glyph.gap {
  background: var(--bg);
  border: 2px solid var(--gold);
  box-shadow: inset 0 -10px 0 #c4b49c;
}

.pay-stub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--panel);
  border: 2px solid var(--gold);
}
.meter-preview {
  display: flex; gap: 8px; align-items: center; margin: 10px 0;
  border: 0; padding: 0; background: transparent;
}
.eligible {
  display: inline-block;
  font-size: 12px;
  color: var(--blue);
  border: 0;
  padding: 0;
  margin: 0 0 8px;
}
.pay-stub-l h1 { margin: 0; color: var(--gold-hi); text-shadow: 0 0 12px rgba(240, 193, 74, 0.4); }
.pay-stub-art { display: flex; gap: 8px; align-items: center; }
.pay-stub-art img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
  border: 3px solid var(--gold);
  box-shadow: 3px 3px 0 #d4c4a4;
}
.meter-preview {
  border-color: var(--gold);
  background: rgba(240, 193, 74, 0.06);
}

.pulse-cta {
  animation: play-pulse 1.6s ease-in-out infinite;
}
@keyframes play-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 193, 74, 0.55); }
  50% { box-shadow: 0 0 16px 3px rgba(240, 193, 74, 0.38); }
}
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.cta {
  box-shadow: 4px 4px 0 #000;
}
.cta:hover { box-shadow: 4px 4px 0 #000, 0 0 14px rgba(240, 193, 74, 0.25); }

.ticket .free-badge {
  box-shadow: 0 0 10px rgba(240, 193, 74, 0.45);
  animation: play-pulse 1.4s ease-in-out infinite;
}

.tut-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.tut-layer.hidden { display: none !important; }
.tut-skip {
  pointer-events: auto;
  position: absolute;
  top: 8px;
  right: 8px;
  font: inherit;
  font-size: 8px;
  color: #1a1204;
  background: linear-gradient(180deg, #edd078, #c9a227);
  border: 3px solid #000;
  padding: 8px 10px;
  min-height: 36px;
  z-index: 7;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 3px 3px 0 #000, 0 0 12px rgba(240, 193, 74, 0.4);
}

body:not([data-lang="en"]) .tut-skip { font-size: 13px; }
body:not([data-lang="en"]) .hud-chip small { font-size: 11px; letter-spacing: 0; }
body:not([data-lang="en"]) .hud-chip { font-size: 12px; }

body.playing .hud-chip { padding: 3px 6px; }
body.playing .hud-chip small { font-size: 5px; }
body.playing.force-landscape .tut-skip {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 7px;
  top: 4px;
  right: 4px;
}
body.playing.force-landscape .hud-chip { padding: 2px 5px; }

#over h1 { color: var(--gold-hi); text-shadow: 0 0 14px rgba(240, 193, 74, 0.4); }
#over .kicker { letter-spacing: 1px; }
.over-stub {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background:
    linear-gradient(90deg, rgba(240, 193, 74, 0.14), transparent 55%),
    var(--panel);
  border: 3px solid var(--gold);
  box-shadow: 6px 6px 0 #000, 0 0 18px rgba(240, 193, 74, 0.22);
}
.over-stub img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
  border: 3px solid var(--gold);
  box-shadow: 3px 3px 0 #d4c4a4;
}
.coin-logo {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 50%;
  object-fit: contain !important;
  background: transparent !important;
  image-rendering: auto !important;
}
.over-stub h1 { margin: 0; }
.over-stub .kicker { margin: 0 0 4px; }
.over-panel .result {
  border: 3px solid var(--line);
  background: var(--panel);
  padding: 10px;
  box-shadow: inset 0 0 16px rgba(77, 157, 255, 0.08);
}

.fund-box {
  margin: 0 0 12px;
  padding: 10px;
  border: 3px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(240, 193, 74, 0.1), transparent 40%),
    var(--panel);
}
.fund-amt {
  color: var(--gold-hi);
  font-size: 14px;
  margin: 0 0 8px;
  text-shadow: 0 0 10px rgba(240, 193, 74, 0.4);
}
.fund-hint { margin: 0 0 8px; }
.fund-box .invite-link-row { margin-bottom: 8px; }
.fund-box .ticket-edit { margin-top: 6px; }

.pay-panel {
  background:
    linear-gradient(180deg, rgba(240, 193, 74, 0.1), transparent 22%),
    var(--panel);
}

@media (max-width: 900px) {
  .pay-stub-art img { width: 44px; height: 44px; }
  .over-stub img { width: 40px; height: 40px; }
}


