/* ============================================================
   LET IT RIDE — staging. Five-tone palette shared with
   other hakoniwa tools. Gold/amber accent theme.
   #50514F charcoal · #F25F5C coral/red · #FFE066 gold
   #247BA0 blue · #70C1B3 teal
   ============================================================ */
:root {
  --c-dark:   #50514F;
  --c-red:    #F25F5C;
  --c-yellow: #FFE066;
  --c-blue:   #247BA0;
  --c-teal:   #70C1B3;

  /* neutrals / surfaces */
  --bg:        #f4f6f5;
  --surface:   #ffffff;
  --surface-2: #eef1f0;
  --ink:       #50514F;
  --muted:     #8c8e8b;
  --line:      rgba(80, 81, 79, 0.16);
  --line-soft: rgba(80, 81, 79, 0.08);

  /* semantic — gold/amber accent for Let It Ride */
  --accent:    #c4920a;
  --accent-dk: #a37508;
  --win:       #3aa893;
  --lose:      #e8483f;

  /* felt — deep green classic casino table */
  --felt:   #1e4d3a;
  --felt-2: #163828;

  /* card */
  --card-bg:  #ffffff;
  --card-ink: #2c2d2b;

  --shadow:      0 14px 30px -20px rgba(40, 42, 41, 0.45);
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: radial-gradient(120% 70% at 50% -8%, #fff 0%, #f2f4f3 60%, #e7eae9 100%) fixed;
  color: var(--ink);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(24px + var(--safe-bottom));
}
h1, h2, h3 { font-family: 'Cinzel', serif; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* ---- header ---- */
.topbar { text-align: center; padding: calc(16px + var(--safe-top)) 16px 8px; }
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.brand h1 {
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(1.2rem, 6vw, 2rem); letter-spacing: 0.14em;
  margin: 0; color: var(--c-dark);
}
/* Let It Ride pip in gold */
.pip { font-size: 1.2rem; color: var(--accent); }
.tagline { color: var(--muted); font-size: 0.82rem; margin: 4px 0 12px; font-style: italic; }

/* ---- tabs ---- */
.tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border-radius: 100px; margin: 6px 0 10px;
}
.tab {
  font-family: 'Cinzel', serif; font-size: 0.78rem; letter-spacing: 0.06em;
  border: none; background: transparent; color: var(--muted);
  padding: 8px 20px; border-radius: 100px; cursor: pointer; transition: 0.2s;
}
/* Let It Ride: active tab uses gold accent */
.tab.is-active { color: #fff; background: var(--accent); box-shadow: 0 3px 10px -3px rgba(196, 146, 10, 0.55); }

/* ---- panels ---- */
.panel { display: none; max-width: 560px; margin: 0 auto; padding: 0 12px; }
.panel.is-active { display: block; animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- tool links bar ---- */
.play-tools { display: flex; gap: 8px; margin: 6px 0 10px; justify-content: center; }
.tool-btn {
  flex: 1; max-width: 200px; display: flex; align-items: center; justify-content: center;
  text-align: center; text-decoration: none; line-height: 1.2;
  font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; padding: 9px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.tool-btn:active { background: var(--surface-2); }

/* ---- stats rail (balance / current-bet / result) ---- */
.rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.chip-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 7px 8px; text-align: center;
}
.chip-stat .ck { display: block; font-size: 0.56rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
/* Let It Ride: stat value in gold accent */
.chip-stat .cv { font-weight: 600; font-size: 0.95rem; color: var(--accent); display: block; }
.chip-stat .cv.gold { color: var(--c-yellow); background: var(--c-dark); padding: 0 6px; border-radius: 8px; display: inline-block; }
.chip-stat .cv.win  { color: var(--win); }
.chip-stat .cv.lose { color: var(--lose); }

/* ---- felt table area ---- */
.felt {
  position: relative;
  border-radius: 26px 26px 90px 90px / 26px 26px 50px 50px;
  background: radial-gradient(120% 100% at 50% 0%, var(--felt) 0%, var(--felt-2) 82%);
  border: 1px solid rgba(80, 81, 79, 0.12);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 16px 12px 22px;
  min-height: 42dvh;
  display: flex; flex-direction: column; justify-content: space-between;
  margin-bottom: 10px;
}
/* inner border ring */
.felt::before {
  content: ''; position: absolute; inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px 20px 80px 80px / 20px 20px 44px 44px;
  pointer-events: none;
}

/* ---- community card row ---- */
.community-area { z-index: 1; text-align: center; }
.seat-label {
  font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55); margin: 4px 0;
}
.community-row { display: flex; gap: 10px; justify-content: center; min-height: 70px; align-items: center; }

/* ---- felt mark ---- */
.felt-mark { text-align: center; pointer-events: none; padding: 4px 0; }
.arc { font-family: 'Cinzel', serif; font-size: 0.6rem; letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.35); white-space: nowrap; }

/* ---- 3 bet spots ---- */
.bet-spots {
  display: flex; gap: 8px; justify-content: center; align-items: flex-end;
  margin: 6px 0 4px; z-index: 1; flex-wrap: wrap;
}
.bet-spot {
  position: relative;
  width: 76px; min-height: 90px;
  border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.07);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  padding: 8px 4px 6px;
}
.bet-spot:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(196, 146, 10, 0.7); }
.bet-spot:active { background: rgba(255, 255, 255, 0.18); }
.bet-spot[data-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; }
/* ride spot: gold border to indicate permanence */
.bet-spot.is-ride { border-color: rgba(196, 146, 10, 0.55); border-style: solid; }
.bet-spot-label {
  font-family: 'Cinzel', serif; font-size: 0.54rem; letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65); text-transform: uppercase; text-align: center;
  margin-top: 4px;
}
.bet-spot-sub {
  font-family: 'JetBrains Mono', monospace; font-size: 0.44rem;
  color: rgba(255, 255, 255, 0.4); text-align: center; margin-top: 2px;
}
.bet-spot.is-active { border-color: var(--accent); background: rgba(196, 146, 10, 0.14); border-style: solid; }
.bet-spot.spot-win { border-color: var(--c-teal) !important; box-shadow: 0 0 0 3px rgba(112, 193, 179, 0.45); }
.bet-spot.spot-pulled { opacity: 0.35; border-style: dashed; }
.bet-spot.spot-lose { opacity: 0.5; }

/* chip badge placed on a bet spot */
.placed {
  position: absolute; top: -8px; right: -6px; min-width: 30px; height: 30px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; font-weight: 700; color: #fff;
  border: 2px dashed rgba(255, 255, 255, 0.75); box-shadow: 0 2px 6px -1px rgba(40, 42, 41, 0.5);
}
.placed.c1   { background: #b9c3c7; color: var(--c-dark); }
.placed.c5   { background: var(--c-blue); }
.placed.c25  { background: var(--c-teal); }
.placed.c100 { background: var(--c-dark); border-color: var(--c-yellow); color: var(--c-yellow); }
.placed.c500 { background: #7E57C2; }

/* ---- player hand row ---- */
.player-area { z-index: 1; text-align: center; }
.hand-3, .hand-2 { display: flex; gap: 6px; justify-content: center; align-items: center; min-height: 80px; flex-wrap: nowrap; }

/* ---- cards ---- */
.card {
  width: 52px; height: 78px; border-radius: 8px;
  background: var(--card-bg); color: var(--card-ink);
  box-shadow: 0 6px 14px -8px rgba(20, 30, 28, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  position: relative; flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
}
/* deal-in animation */
.card.deal-in { animation: dealIn 0.42s cubic-bezier(0.2, 0.74, 0.24, 1) both; }
@keyframes dealIn {
  0%   { opacity: 0; transform: translate(46px, -58px) rotate(13deg) scale(0.8); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
}
.card.deal-in:nth-child(2) { animation-delay: 0.08s; }
.card.deal-in:nth-child(3) { animation-delay: 0.16s; }
.card.deal-in:nth-child(4) { animation-delay: 0.24s; }
.card.deal-in:nth-child(5) { animation-delay: 0.32s; }
.card.flip-in { animation: flipIn 0.4s ease both; }
@keyframes flipIn { 0% { transform: rotateY(90deg) scale(0.96); } 100% { transform: rotateY(0) scale(1); } }

.card .corner { position: absolute; font-weight: 600; line-height: 1; }
.card .tl { top: 5px; left: 6px; text-align: center; }
.card .br { bottom: 5px; right: 6px; transform: rotate(180deg); text-align: center; }
.card .rank { font-size: 0.82rem; display: block; }
.card .suit { font-size: 0.7rem; display: block; }
.card .pip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; opacity: 0.92; }
.card.red { color: var(--c-red); }
/* card back: amber/gold — Let It Ride theme */
.card.back {
  background: #c8912a;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.10) 0 6px, rgba(255,255,255,0) 6px 12px);
  box-shadow: 0 6px 14px -8px rgba(20, 30, 28, 0.55), inset 0 0 0 2px rgba(255,255,255,0.5), inset 0 0 0 5px #c8912a;
}
.card.back::after { content: '♦'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.85); font-size: 1.6rem; }
/* community card placeholder (face-down slot) */
.comm-slot {
  width: 52px; height: 78px; border-radius: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.comm-slot-label {
  font-family: 'Cinzel', serif; font-size: 0.45rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35); text-align: center; line-height: 1.3;
}

/* ---- round message ---- */
.message { text-align: center; min-height: 2em; font-size: 0.9rem; padding: 10px 8px; border-radius: 10px; margin: 8px 0; color: var(--muted); }
.message.win  { background: rgba(58,168,147,0.12); color: var(--win);  border: 1px solid rgba(58,168,147,0.35); font-weight: 600; }
.message.lose { background: rgba(232,72,63,0.10);  color: var(--lose); border: 1px solid rgba(232,72,63,0.30); font-weight: 600; }
.message.push { background: rgba(80,81,79,0.07); color: var(--muted); border: 1px solid var(--line); font-weight: 600; }
.message.bonus { background: rgba(255,224,102,0.18); color: var(--c-dark); border: 1px solid rgba(255,224,102,0.55); font-weight: 700; }
.message.hint  { background: rgba(196,146,10,0.08); color: var(--accent); border: 1px solid rgba(196,146,10,0.3); }

/* ---- bet section ---- */
.bet-section { margin: 10px 0; }

/* ---- chip spec C1: 56px round, white dashed border, inner ring shadow ---- */
.chip-betline { margin: 8px 0; }
.chiprow { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.chip {
  box-sizing: border-box;
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.7);
  color: #fff;
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.12s;
  box-shadow: 0 5px 12px -5px rgba(40, 42, 41, 0.5), inset 0 0 0 4px rgba(255, 255, 255, 0.12);
}
.chip:active { transform: scale(0.92); }
.chip:disabled { opacity: 0.35; cursor: default; transform: none; }
/* C1 chip colours — canonical spec */
.chip.c1   { background: #b9c3c7; color: var(--c-dark); }
.chip.c5   { background: var(--c-blue); }
.chip.c25  { background: var(--c-teal); }
.chip.c100 { background: var(--c-dark); border-color: var(--c-yellow); color: var(--c-yellow); }
/* C1-追記2: hidden $500 chip */
.chip.c500 { background: #7E57C2; }
/* active / selected chip — gold ring */
.chip.is-active { transform: scale(1.12); box-shadow: 0 0 0 3px var(--c-yellow), inset 0 0 0 4px rgba(255, 255, 255, 0.12); }

.chip-hint { text-align: center; font-size: 0.66rem; color: var(--muted); margin-bottom: 6px; }

/* clear button */
.bet-actions { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.bet-act-btn {
  font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; font-weight: 600;
  padding: 5px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.bet-act-btn:disabled { opacity: 0.35; cursor: default; }
.bet-act-btn:active:not(:disabled) { background: var(--surface-2); }

/* ---- action buttons ---- */
.action {
  font-family: 'Cinzel', serif; letter-spacing: 0.1em; font-size: 0.92rem;
  padding: 15px 10px; border-radius: 14px; cursor: pointer; border: none;
  color: #fff; background: var(--accent);
  box-shadow: 0 6px 16px -8px rgba(196, 146, 10, 0.6);
  transition: transform 0.1s, filter 0.2s;
}
.action:active { transform: translateY(1px) scale(0.99); }
.action:hover  { filter: brightness(1.06); }
.action:disabled { opacity: 0.4; filter: grayscale(0.4); box-shadow: none; cursor: default; }
.action.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.action.deal { width: 100%; }

/* action button grids */
.action-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.result-bar { display: grid; grid-template-columns: 1fr; gap: 10px; }
.bet-bar    { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* pull-back button — muted ghost style */
.action.pull-back { background: transparent; color: var(--muted); border: 1px solid var(--line); box-shadow: none; font-size: 0.78rem; }
/* let-ride button — gold accent */
.action.let-ride { background: var(--accent); }

/* ---- game-level controls ---- */
.game-controls {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.gc-label {
  display: block; font-family: 'Cinzel', serif;
  font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; text-align: center;
}
.gc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gc-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 11px 4px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; cursor: pointer; transition: 0.15s;
}
.gc-btn:active { background: var(--surface-2); transform: scale(0.97); }
.gc-btn.warn { color: var(--lose); border-color: rgba(232, 72, 63, 0.32); }
.gc-btn.warn:active { background: rgba(232, 72, 63, 0.08); }

/* ---- outcome / win-lose flash ---- */
.pos { color: var(--win); }
.neg { color: var(--lose); }

/* ---- history ---- */
.history-section { margin: 16px 0 8px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.history-title { font-family: 'Cinzel', serif; font-size: 0.82rem; letter-spacing: 0.04em; }
.link-btn { background: none; border: none; color: var(--c-blue); font-size: 0.72rem; cursor: pointer; font-family: inherit; }
.history-strip { display: flex; flex-direction: column; gap: 5px; max-height: 280px; overflow-y: auto; padding-bottom: 4px; }
.hp-entry { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 0.78rem; }
.hp-win  { border-color: rgba(58,168,147,0.4); background: rgba(58,168,147,0.06); }
.hp-lose { border-color: rgba(232,72,63,0.25); background: rgba(232,72,63,0.05); }
.hp-push { border-color: var(--line); background: var(--surface-2); }
.hp-bonus { border-color: rgba(255,224,102,0.5); background: rgba(255,224,102,0.08); }
.hp-cards { font-weight: 700; color: var(--ink); flex: 0 0 auto; min-width: 100px; font-size: 0.7rem; }
.hp-bet   { flex: 1; color: var(--muted); font-size: 0.72rem; }
.hp-right { flex: 0 0 auto; text-align: right; }
.hp-net   { display: block; font-weight: 700; font-size: 0.86rem; }
.hp-bal   { display: block; font-size: 0.62rem; color: var(--muted); }
.hp-empty { font-size: 0.72rem; color: var(--muted); text-align: center; padding: 10px 0; margin: 0; }

/* ---- rules / payout reference table ---- */
.pay-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; margin-top: 10px; }
.pay-table th, .pay-table td { padding: 7px 8px; border: 1px solid var(--line); text-align: left; }
.pay-table th { background: var(--surface-2); font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.04em; }
.pay-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); }
.pay-table tr.bonus-row td { background: rgba(255,224,102,0.09); }
.pay-table tr.bonus-row td:last-child { color: var(--c-yellow); }

/* ---- bottom sheet (modal) ---- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: rgba(50, 52, 50, 0.42); backdrop-filter: blur(2px);
}
.sheet-backdrop.is-open { display: block; animation: fade 0.2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-width: 560px; margin: 0 auto; max-height: 88dvh; overflow-y: auto;
  padding: 8px 16px calc(20px + var(--safe-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px -24px rgba(40, 42, 41, 0.5);
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-backdrop.is-open .sheet { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; border-radius: 100px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-family: 'Cinzel', serif; color: var(--c-dark); font-size: 1.15rem; letter-spacing: 0.08em; margin: 0; }
.sheet-x { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 0.9rem; }
.sheet-note { color: var(--muted); font-size: 0.8rem; text-align: center; margin: 10px 4px 0; font-style: italic; }
.x { background: none; border: none; font-size: 1.5rem; color: var(--muted); cursor: pointer; line-height: 1; }

/* ---- form blocks (sim / settings tab) ---- */
.block {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 16px; padding: 14px; margin-bottom: 14px;
  box-shadow: 0 2px 8px -6px rgba(40, 42, 41, 0.25);
}
.block-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.block-title { font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); flex: 1; min-width: 0; }
.field > span { font-size: 0.72rem; color: var(--muted); }
.field-row { display: flex; gap: 12px; margin-bottom: 12px; }
.field-row:last-child { margin-bottom: 0; }
.field select, .field input[type="number"] {
  font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; width: 100%;
  appearance: none; -webkit-appearance: none;
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(196, 146, 10, 0.2); }

/* ---- sim progress / results charts ---- */
.sim-form { margin-bottom: 18px; }
.sim-intro { font-size: 0.82rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 11px 13px; margin-bottom: 14px; }
.sim-progress { margin: 12px 0; display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 100px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.1s; }
.prog-text { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--accent); min-width: 3.2em; text-align: right; }

.sim-results { margin-top: 14px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 8px; text-align: center; }
.stat .sk { display: block; font-size: 0.56rem; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 3px; }
.stat .sv { font-size: 1rem; font-weight: 600; color: var(--accent); }
.sv.pos { color: var(--win); }
.sv.neg { color: var(--lose); }
/* sim chart */
.chart-wrap { margin-top: 14px; }
.chart-wrap h3 { font-size: 0.82rem; color: var(--muted); margin: 0 0 6px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; }
canvas { width: 100%; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.sim-meta { font-size: 0.72rem; color: var(--muted); margin-top: 10px; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px); z-index: 95;
  background: var(--c-dark); color: #fff; padding: 10px 18px; border-radius: 100px;
  font-size: 0.85rem; max-width: 90vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 10px 28px -12px rgba(40, 42, 41, 0.6);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- footer ---- */
.foot {
  max-width: 560px; margin: 30px auto 0; padding: 18px 16px;
  text-align: center; color: var(--muted); font-size: 0.74rem;
  border-top: 1px solid var(--line);
}

/* ---- responsive: max-width 400px ---- */
@media (max-width: 400px) {
  .action-bar { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .sv { font-size: 0.9rem; }
  .rail { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .chip-stat .cv { font-size: 0.82rem; }
  .felt { min-height: 36dvh; padding: 12px 8px 16px; }
  .chiprow { gap: 7px; }
  .chip { width: 50px; height: 50px; font-size: 0.82rem; }
  .bet-spots { gap: 5px; }
  .bet-spot { width: 66px; min-height: 80px; }
  .card { width: 46px; height: 70px; }
  .card .rank { font-size: 0.72rem; }
  .card .suit { font-size: 0.62rem; }
  .card .pip { font-size: 1.2rem; }
  .comm-slot { width: 46px; height: 70px; }
}
@media (max-width: 360px) {
  .brand h1 { font-size: 1.1rem; }
  .action-bar { grid-template-columns: 1fr 1fr; gap: 6px; }
  .rail { gap: 4px; }
  .chip { width: 46px; height: 46px; font-size: 0.78rem; }
  .gc-row { grid-template-columns: 1fr 1fr; }
  .bet-spot { width: 58px; min-height: 74px; }
  .bet-spot-label { font-size: 0.48rem; }
  .card { width: 42px; height: 64px; }
  .comm-slot { width: 42px; height: 64px; }
}
