:root {
  /* RELIX GRAND CASINO: Midnight x Platinum（コンセプトC、2026-11-13 ユーザー決定）
     構造色はプラチナ（銀）。金は「当たった瞬間」（--win、GOGO、当たり枠）だけに残す。
     変数名 --gold は互換のため据え置きで、中身がプラチナを指す */
  --felt: #11182b;
  --felt-dark: #0d1220;
  --panel: #161c2e;
  --line: #26304a;
  --gold: #a9b7cf;
  --gold-bright: #e8ecf4;
  --text: #e8ecf4;
  --muted: #93a0b8;
  --danger: #d9534f;
  --win: #f0c75e;
  --exec: #1e6b3a;
  --exec-bright: #2c8a4c;
  --radius: 8px;
  --font-num: "DIN Alternate", "Avenir Next", "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--felt-dark);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--felt);
  border-bottom: 2px solid var(--gold);
  position: sticky; top: 0; z-index: 10;
}
.brand { background: none; border: none; color: var(--gold-bright); font-size: 20px; font-weight: bold; cursor: pointer; letter-spacing: 0.2em; white-space: nowrap; padding: 0; }
.brand-sub { font-size: 13px; letter-spacing: 0.3em; }
.topbar-right { display: flex; gap: 10px; align-items: center; font-size: 14px; flex-shrink: 0; }
.balance { white-space: nowrap; }
.balance strong { color: var(--win); font-size: 17px; }
@media (max-width: 560px) {
  .topbar { padding: 8px 10px; }
  .brand { font-size: 14px; letter-spacing: 0.1em; }
  .brand-sub { font-size: 9px; letter-spacing: 0.18em; }
  .topbar-right { gap: 6px; font-size: 12px; }
  .balance strong { font-size: 14px; }
  .ghost, .rescue { padding: 5px 8px; }
}
button { font-family: inherit; }
/* 共通部品の土台（監査 第1段）: 素の button をなくし、役割は4種に絞る */
button {
  font-size: 14px; color: var(--text); background: var(--felt);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 16px; cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: default; }
.go {
  background: linear-gradient(180deg, var(--exec-bright), var(--exec));
  color: #f2f7ee; border: 1px solid var(--exec-bright); border-radius: var(--radius);
  padding: 10px 20px; font-weight: bold; cursor: pointer;
}
.go:disabled { opacity: 0.45; cursor: default; }
.danger {
  background: none; border: 1px solid #a4443f; color: #e89a94;
  border-radius: var(--radius); padding: 9px 16px; cursor: pointer;
}
input, select, textarea {
  font: inherit; color: var(--text); background: var(--felt-dark);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px;
}
input[type="color"] { padding: 2px; width: 52px; height: 34px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; align-items: center; }
/* ヘッダーとタブ（監査 第2段） */
.balance-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  border: 1px solid rgba(169, 183, 207, 0.65); border-radius: 999px;
  padding: 4px 13px 4px 9px; background: rgba(169, 183, 207, 0.08);
}
.coin-dot {
  width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #f6e3ac, #c9a227 68%, #8a6d1f);
  box-shadow: inset 0 0 0 2px rgba(110, 82, 16, 0.55);
}
.balance-pill strong { color: var(--win); font-size: 16px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.user-name { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabbar {
  display: flex; gap: 2px; padding: 0 10px; background: var(--felt);
  border-bottom: 1px solid var(--line);
}
.tab {
  background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--muted); padding: 11px 14px 9px; font-size: 14px;
}
.tab.is-active { color: var(--gold-bright); border-bottom-color: var(--gold); font-weight: bold; }
.site-footer {
  max-width: 960px; margin: 28px auto 0; padding: 18px 16px 32px;
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 12px; text-align: center; line-height: 1.9;
}
/* 筐体型・卓型の枠（監査 第3段） */
.cabinet {
  border: 1px solid rgba(169, 183, 207, 0.5); border-radius: 16px;
  background: linear-gradient(180deg, #10231a 0%, #0a1710 60%, #060f09 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(236, 210, 154, 0.14);
  padding: 16px 14px;
}
.cabinet-plate {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  border-bottom: 1px solid rgba(169, 183, 207, 0.45); padding: 0 4px 10px; margin-bottom: 14px;
}
.plate-brand { font-size: 10px; letter-spacing: 0.4em; color: var(--gold); white-space: nowrap; }
.plate-name { font-size: 19px; letter-spacing: 0.1em; color: var(--gold-bright); font-weight: bold; text-align: right; }
.table-frame {
  border-radius: 18px; padding: 10px;
  background: linear-gradient(160deg, #4a3220, #2b1c0f 60%, #3a2817);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}
.table-illust {
  height: 84px; border-radius: 10px 10px 0 0;
  background-size: cover; background-position: center 35%;
  box-shadow: inset 0 -20px 26px rgba(4, 22, 13, 0.9);
}
.felt-body {
  background: radial-gradient(120% 100% at 50% 0%, #175733 0%, #0e4023 55%, #072716 100%);
  border-radius: 0 0 10px 10px; padding: 16px 14px;
  box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.5);
}
/* ロビーの情報設計（監査 第4段） */
.entrance { margin-bottom: 18px; }
.welcome { color: var(--muted); font-size: 13px; margin: 4px 0 2px; }
.lobby-q { border: none; padding: 0; font-size: 22px; margin: 0 0 14px; }
.entrance-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entrance-card {
  text-align: left; padding: 16px; border-radius: 12px; font-size: 17px; font-weight: bold;
  display: flex; flex-direction: column; gap: 5px;
}
.entrance-card span { font-size: 12px; font-weight: normal; opacity: 0.85; line-height: 1.6; }
.entrance-card.casino { background: linear-gradient(180deg, #33527c, #1a2c47); border-color: #7fa8c9; color: #eef4fb; }
.entrance-card.jansou { background: linear-gradient(180deg, #8e2f28, #671f1a); border-color: #a4443f; color: #fbeeec; }
.today-line { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.filter-chips { display: flex; gap: 8px; margin: 16px 0 4px; flex-wrap: wrap; }
.grid.lobby-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.lobby-grid .card { padding: 12px; }
.lobby-grid .gname { font-size: 15px; margin-bottom: 4px; }
.gdesc { font-size: 12.5px; line-height: 1.65; color: var(--text); }
.gmeta2 { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.more-btn { width: 100%; margin-top: 12px; }
.open-table-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; margin-bottom: 8px;
}
.open-table-row .ot-meta { color: var(--muted); font-size: 12px; }
/* 台データパネルと筐体（監査 第5段） */
.machine-data { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; }
.md-cell { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 6px; padding: 6px 3px; text-align: center; }
.md-cell span { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; }
.md-cell strong { display: block; font-size: 17px; color: var(--text); font-family: var(--font-num); font-variant-numeric: tabular-nums; margin-top: 2px; }
.md-cell strong.big-count { color: var(--gold-bright); }
.slot-cabinet {
  border-radius: 16px; padding: 14px;
  background: linear-gradient(180deg, #1c1214, #0d0a0c 55%, #070708);
  border: 1px solid rgba(169, 183, 207, 0.45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(236, 210, 154, 0.12);
}
.slot-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.slot-no { font-size: 11px; color: var(--muted); letter-spacing: 0.15em; font-family: var(--font-num); white-space: nowrap; }
.slot-title { font-size: 17px; font-weight: bold; letter-spacing: 0.1em; color: var(--gold-bright); }
.gogo-lamp {
  min-width: 64px; text-align: center; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: bold;
  letter-spacing: 0.2em; background: rgba(0, 0, 0, 0.4); transition: all 0.25s;
}
.gogo-lamp.lit {
  background: radial-gradient(circle at 50% 35%, #fff3c4, #f5c542 60%, #c98f1b);
  color: #4a2f00; border-color: #f5c542; box-shadow: 0 0 18px rgba(245, 197, 66, 0.8);
}
.data-panel { margin: 12px 0 4px; }
.at-cabinet {
  border-radius: 16px; padding: 14px;
  background: linear-gradient(180deg, #221014, #120a0c 55%, #0a0708);
  border: 1px solid rgba(164, 68, 63, 0.55);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.at-stops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
/* 5色チップと賭け金ロック（監査 第7段） */
.bet-row { flex-direction: column; align-items: flex-start; gap: 10px; }
.bet-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.betchip {
  width: 52px; height: 52px; border-radius: 50%; padding: 0;
  border: 3px dashed rgba(255, 255, 255, 0.75);
  font-weight: bold; font-size: 13px; color: #fff; font-family: var(--font-num);
  display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 0 0 3px rgba(0, 0, 0, 0.18);
}
.betchip.c10 { background: #b03030; }
.betchip.c50 { background: #1e7d46; }
.betchip.c100 { background: #2456a6; }
.betchip.c500 { background: #6d3ba8; }
.betchip.c1000 { background: radial-gradient(circle at 38% 32%, #f4e2ac, #d9b45c 65%, #a37f27); color: #4a2f00; }
.betchip.active { outline: 2px solid var(--gold-bright); outline-offset: 2px; transform: translateY(-2px); }
.betchip:disabled { opacity: 0.4; transform: none; }
.bet-custom { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.bet-custom input { width: 120px; }
/* 対人卓の操作バーと席（監査 第6段） */
.action-bar {
  position: sticky; bottom: 8px; z-index: 5;
  background: rgba(12, 12, 15, 0.94); backdrop-filter: blur(4px);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-top: 12px;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35);
}
.action-bar .btn-row { margin: 0; }
.poker-table {
  background: radial-gradient(120% 100% at 50% 0%, #175733, #0e4023 55%, #072716);
  border: 8px solid #3a2817; border-radius: 24px; padding: 12px; margin: 12px 0;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.45);
}
.poker-seats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.seat {
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; flex: 1 1 128px; min-width: 128px; max-width: 220px;
}
.seat.me { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); max-width: none; }
.seat.turn-now { border-color: var(--gold-bright); background: rgba(127, 168, 201, 0.18); }
.seat-name { font-size: 13px; margin-bottom: 4px; }
.seat-meta { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.poker-center { text-align: center; margin: 12px 0 6px; }
.pot-line { color: var(--gold-bright); font-weight: bold; margin-top: 6px; }
.my-seat-row { margin-top: 10px; }
.hand-cards { flex-wrap: nowrap; overflow-x: auto; padding: 12px 2px 6px; }
.hand-cards .hand-card { margin-left: -15px; }
.hand-cards .hand-card:first-child { margin-left: 0; }
.hand-cards .hand-card.sel { transform: translateY(-9px); }
/* ルーレットのレイアウト表（監査 第8段） */
div.roulette-board { display: grid; grid-template-columns: 32px repeat(12, 1fr); gap: 4px; margin: 12px 0; }
.roulette-board .rnum { width: 100%; height: 38px; font-size: 12.5px; padding: 0; position: relative; border-radius: 8px; }
.roulette-board .rnum[data-n="0"] { grid-row: 1 / span 3; height: auto; }
.roulette-board .rnum.has-bet { box-shadow: inset 0 0 0 2px var(--gold); }
.roulette-board .rnum.has-bet::after {
  content: ""; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f4e2ac, #c9a227 70%, #8a6d1f);
}
/* 記録ページ（監査 第9段） */
.stat-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stat-box { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; text-align: center; }
.stat-box span { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.stat-box strong { display: block; font-size: 21px; margin-top: 4px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.daily-chart { display: flex; align-items: flex-end; gap: 2px; height: 84px; margin: 10px 0 4px; }
.daily-bar { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: #7d8aa5; }
.daily-bar.plus { background: var(--exec-bright); }
.daily-bar.minus { background: #a4443f; }
.daily-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; margin-bottom: 8px; }
.best-win { border: 1px solid rgba(201, 164, 92, 0.6); border-radius: 10px; padding: 12px 14px; margin: 12px 0; background: rgba(201, 162, 39, 0.07); }
/* アーケード盤面の描画（監査 第10段） */
.plinko-board {
  position: relative; aspect-ratio: 10 / 8.4; margin: 12px 0 6px; overflow: hidden;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 12px;
}
.plinko-pin {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); opacity: 0.85; transform: translate(-50%, -50%);
}
.plinko-ball {
  position: absolute; width: 16px; height: 16px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #ffffff, #d9d9d9 55%, #9a9a9a);
  transform: translate(-50%, -50%); transition: left 0.15s ease-in, top 0.15s ease-in;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
.plinko-pockets { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.plinko-pocket {
  text-align: center; font-size: 11px; padding: 6px 0; border-radius: 5px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); font-family: var(--font-num);
}
.plinko-pocket.big { color: #e89a94; }
.plinko-pocket.hot { border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 0 10px rgba(201, 162, 39, 0.55); }
.wheel-label {
  position: absolute; left: 50%; top: 50%; width: 24px; margin-left: -12px;
  text-align: center; font-size: 12px; font-weight: bold; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); pointer-events: none;
}
.duck-lane { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.duck-num { width: 30px; text-align: right; font-family: var(--font-num); color: var(--muted); font-size: 12px; }
.duck-track {
  position: relative; flex: 1; height: 30px; overflow: hidden;
  background: rgba(58, 124, 165, 0.13); border: 1px solid var(--line); border-radius: 999px;
}
.duck-track::after {
  content: ""; position: absolute; right: 7px; top: 3px; bottom: 3px; width: 3px;
  background: repeating-linear-gradient(180deg, var(--gold) 0 4px, transparent 4px 8px);
}
.duck { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 20px; }
.duck-rank { width: 34px; font-size: 12px; color: var(--gold-bright); font-weight: bold; }
.crash-chart {
  width: 100%; height: 120px; margin-top: 10px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px;
}
.crash-chart path { fill: none; stroke: var(--gold); stroke-width: 1.6; }
.crash-chart.crashed path { stroke: var(--danger); }
.crash-chart circle { fill: var(--gold-bright); }
.crash-chart.crashed circle { fill: var(--danger); }
.craps-rolls { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.craps-roll { text-align: center; }
.craps-roll .roll-sum { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ghost { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.rescue { background: var(--gold); border: none; color: #221a00; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-weight: bold; }
.hidden { display: none !important; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
h2 { font-size: 18px; border-left: 4px solid var(--gold); padding-left: 8px; }
.resume-banner {
  background: var(--panel); border: 1px solid var(--gold); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 14px; cursor: pointer; font-size: 14px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; cursor: pointer; text-align: left; color: var(--text);
}
.card:hover { border-color: var(--gold); }
.card .gname { font-size: 17px; font-weight: bold; margin-bottom: 6px; }
.card .gmeta { font-size: 12px; color: var(--muted); line-height: 1.7; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.bet-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.bet-row input[type="number"] {
  width: 110px; padding: 8px; font-size: 16px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--felt-dark); color: var(--text);
}
.chip { background: var(--felt); border: 1px solid var(--gold); color: var(--gold-bright); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.primary {
  background: var(--gold); color: #221a00; border: none; border-radius: 8px;
  padding: 12px 28px; font-size: 16px; font-weight: bold; cursor: pointer;
}
.primary:disabled { opacity: 0.45; cursor: default; }
.secondary { background: var(--felt); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 20px; cursor: pointer; }
.result { margin-top: 14px; font-size: 16px; min-height: 24px; }
.result .win { color: var(--win); font-weight: bold; }
.result .lose { color: var(--muted); }
.note { font-size: 12px; color: var(--muted); line-height: 1.8; }
table { border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid var(--line); padding: 4px 8px; text-align: right; }
th { background: var(--felt); }
/* マイン */
.mines-grid { display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; margin: 14px 0; }
.mine-cell {
  width: 52px; height: 52px; font-size: 20px; border-radius: 8px; cursor: pointer;
  background: var(--felt); border: 1px solid var(--line); color: var(--text);
}
.mine-cell.open { background: var(--felt-dark); color: var(--win); cursor: default; }
.mine-cell.boom { background: var(--danger); cursor: default; }
/* クラッシュ */
.crash-num { font-size: 56px; font-weight: bold; text-align: center; margin: 26px 0 6px; color: var(--win); font-variant-numeric: tabular-nums; }
.crash-num.crashed { color: var(--danger); }
/* ペンギン・タワー */
.lanes { display: flex; gap: 6px; margin: 14px 0; }
.lane { flex: 1; text-align: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--felt); }
.lane.done { border-color: var(--gold); color: var(--win); }
.lane.now { outline: 2px solid var(--gold-bright); }
.tower-row { display: flex; gap: 6px; margin: 5px 0; align-items: center; }
.tower-row .floor-label { width: 44px; font-size: 12px; color: var(--muted); }
.tower-cell { flex: 1; padding: 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--felt); color: var(--text); cursor: pointer; }
.tower-cell:disabled { opacity: 0.4; cursor: default; }
.tower-cell.bad { background: var(--danger); }
/* ポーカー */
.cards { display: flex; gap: 10px; margin: 16px 0; }
.pcard {
  width: 74px; height: 104px; border-radius: 8px; color: #1c1c1c;
  background: linear-gradient(150deg, #fffef9 0%, #f6f2e6 55%, #e9e2cd 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(120, 100, 40, 0.25);
  position: relative; display: inline-block;
  font-weight: bold; cursor: pointer; border: 3px solid transparent; user-select: none;
}
.pcard.red { color: #b01e28; }
.pcard.held { border-color: var(--gold-bright); transform: translateY(-6px); box-shadow: 0 8px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(236, 210, 154, 0.35); }
.pcard .pc-corner { position: absolute; top: 4px; left: 6px; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.pcard .pc-rank { font-size: 17px; }
.pcard .pc-suit { font-size: 13px; }
.pcard .pc-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; opacity: 0.92; }
.pcard .hold-label { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 11px; color: #71809c; font-weight: bold; }
.cards.small .pcard .pc-center { font-size: 26px; }
.cards.small .pcard .pc-rank { font-size: 13px; }
.cards.small .pcard .pc-suit { font-size: 10px; }
.cards.big-card .pcard .pc-center { font-size: 52px; }
/* ケノ */
.keno-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin: 12px 0; }
.keno-num { padding: 8px 0; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: var(--felt); cursor: pointer; font-size: 14px; }
.keno-num.sel { background: var(--gold); color: #221a00; font-weight: bold; }
.keno-num.hit { outline: 3px solid var(--win); }
/* その他 */
.seg-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.seg-buttons button { border: 1px solid var(--line); background: var(--felt); color: var(--text); border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.seg-buttons button.sel { border-color: var(--gold-bright); background: var(--gold); color: #221a00; font-weight: bold; }
.wheel {
  width: 220px; height: 220px; border-radius: 50%; margin: 16px auto;
  border: 4px solid var(--gold); position: relative; transition: transform 1s ease-out;
}
.wheel-pointer { text-align: center; font-size: 20px; color: var(--gold-bright); }
.path-view { font-size: 22px; letter-spacing: 0.3em; text-align: center; margin: 14px 0; min-height: 30px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #1c1c1c; color: var(--text); border: 1px solid var(--gold);
  padding: 10px 18px; border-radius: 8px; font-size: 14px; z-index: 50;
}
.history-item { border-bottom: 1px solid var(--line); padding: 8px 2px; font-size: 14px; display: flex; justify-content: space-between; }
.back-link { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0; margin-bottom: 8px; }

/* ロビーのヒーロー帯（大理石と金は入口の皮にだけ使う） */
.hero {
  border: 1px solid var(--gold);
  background: #0c0c0f;
  text-align: center;
  padding: 30px 18px 26px;
  margin-bottom: 18px;
}
.hero .brand-small { letter-spacing: 0.55em; color: var(--gold); font-size: 12px; margin-left: 0.55em; }
.hero h1 { font-size: 30px; letter-spacing: 0.16em; margin: 10px 0 4px; font-weight: bold; }
.hero .rule { width: 72px; height: 1px; background: var(--gold); margin: 14px auto; }
.hero .tag { color: var(--muted); font-size: 13px; letter-spacing: 0.12em; }

.hero { background: #0c0c0f url("/img/hero.webp") center / cover no-repeat; padding: 0; }
.hero-inner { background: rgba(5, 5, 8, 0.62); padding: 34px 18px 28px; }
.card { overflow: hidden; }
.card-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: -14px -14px 10px; width: calc(100% + 28px); }
@media (max-width: 480px) {
  .hero h1 { font-size: 23px; }
  .hero .tag { font-size: 11px; letter-spacing: 0.04em; }
  .hero-inner { padding: 24px 12px 20px; }
  .brand { font-size: 14px; letter-spacing: 0.12em; }
}

/* 第2期の部品 */
.cards.small .pcard { width: 52px; height: 72px; font-size: 15px; }
.cards.big-card { justify-content: center; }
.cards.big-card .pcard { width: 84px; height: 116px; font-size: 24px; }
.seg.wrap { flex-wrap: wrap; }
.chip.active { background: var(--gold); color: #1a1a1a; font-weight: bold; }
.roulette-board { display: grid; grid-template-columns: repeat(3, 52px); gap: 4px; margin: 10px 0; }
.rnum { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 50%; width: 52px; height: 40px; cursor: pointer; }
.rnum.red { background: #7e1d22; }
.rnum.black { background: #1c1c20; }
.rnum.green { background: #1e6b3a; }
.rnum.sel { outline: 3px solid var(--gold); outline-offset: -1px; }
.big-num { display: inline-block; font-size: 44px; font-weight: bold; border-radius: 50%; width: 84px; height: 84px; line-height: 84px; text-align: center; margin-top: 12px; border: 2px solid var(--gold); }
.big-num.red { background: #7e1d22; }
.big-num.black { background: #1c1c20; }
.big-num.green { background: #1e6b3a; }
.dice { font-size: 44px; letter-spacing: 6px; }
.othello-board { display: grid; grid-template-columns: repeat(8, 38px); gap: 3px; margin: 10px 0; }
.ocell { width: 38px; height: 38px; background: #14532d; border: 1px solid #0b3520; color: #eee; font-size: 18px; cursor: default; padding: 0; }
.ocell.black { color: #111; }
.ocell.white { color: #f5f5f5; }
.ocell.legal { cursor: pointer; color: rgba(255, 255, 255, 0.55); }
.ocell.legal:hover { background: #1c6b3c; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.seg button { border: 1px solid var(--line); background: var(--felt); color: var(--text); border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.seg button.active { border-color: var(--gold-bright); background: var(--gold); color: #221a00; font-weight: bold; }

/* 第3期: スロット */
.slump { display: inline-flex; align-items: flex-end; gap: 1px; height: 18px; vertical-align: middle; }
.slump-bar { display: inline-block; width: 3px; background: var(--gold); }
.slump-bar.down { background: #55555e; }
.gogo { text-align: center; font-size: 22px; font-weight: bold; letter-spacing: 0.4em; color: #3a3a42; border: 1px solid var(--line); border-radius: 999px; padding: 6px 0 6px 0.4em; margin: 8px auto 14px; max-width: 240px; }
.gogo.lit { color: #221a00; background: var(--gold-bright); border-color: var(--gold-bright); box-shadow: 0 0 18px rgba(236, 210, 154, 0.55); }
.slot-window { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.reel { display: flex; flex-direction: column; gap: 6px; }
.cell { width: 92px; height: 56px; display: flex; align-items: center; justify-content: center; background: #101014; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-weight: bold; color: var(--muted); }
.cell.sym-seven { color: #ff5347; font-size: 30px; }
.cell.sym-bar { color: var(--text); background: #26262c; }
.cell.sym-bell { color: var(--gold-bright); }
.cell.sym-pierrot { color: #c39bd3; }
.cell.sym-grape { color: #9ccc65; }
.cell.sym-cherry { color: #ff7b93; }
.cell.sym-replay { color: #7fb3e8; }
.cell.win-cell { border-color: var(--gold-bright); box-shadow: 0 0 10px rgba(236, 210, 154, 0.5); }
.slot-stops { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }

/* 第4期: 対人卓 */
.seat-row { padding: 4px 0; }
.mp-hand { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.mp-hand.turn-now { border-color: var(--gold-bright); }
.pcard.back { background: #2a2a30; color: var(--gold-bright); }
.dice.small { font-size: 22px; letter-spacing: 2px; }
.chat-list { max-height: 220px; overflow-y: auto; margin-bottom: 8px; }
.chat-msg { padding: 3px 0; font-size: 14px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }
.table-card { text-align: left; width: 100%; }

/* 質感の底上げ（第4.5期） */
body {
  background:
    radial-gradient(1200px 500px at 50% -80px, rgba(236, 210, 154, 0.07), transparent 60%),
    radial-gradient(900px 600px at 85% 110%, rgba(120, 90, 20, 0.06), transparent 60%),
    linear-gradient(180deg, #0b0b0e 0%, #08080a 100%);
  min-height: 100vh;
}
.panel {
  background: linear-gradient(180deg, #17171c 0%, #111114 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(236, 210, 154, 0.08);
}
button.primary {
  background: linear-gradient(180deg, #eef1f8 0%, #b9c4d8 55%, #8b98b0 100%);
  color: #131a29;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.06s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
button.primary:hover:not(:disabled) { filter: brightness(1.06); }
button.primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.card { transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.55); border-color: rgba(199, 206, 222, 0.45); }
.pcard.back {
  background:
    repeating-linear-gradient(45deg, rgba(199, 206, 222, 0.16) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(-45deg, rgba(199, 206, 222, 0.16) 0 6px, transparent 6px 12px),
    linear-gradient(150deg, #1c2740, #0e1524);
  color: transparent;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(199, 206, 222, 0.35);
}
/* CSSサイコロ */
.dice-set { display: inline-flex; gap: 6px; vertical-align: middle; }
.die {
  width: 34px; height: 34px; border-radius: 7px; padding: 4px;
  background: linear-gradient(145deg, #fffef9, #e8e2cf);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(120, 100, 40, 0.3);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
}
.die .pip { border-radius: 50%; }
.die .pip.on { background: radial-gradient(circle at 35% 30%, #4c4c55, #101013 75%); }
/* オセロの石に立体感 */
.ocell { position: relative; }
.ocell.black, .ocell.white { color: transparent; }
.ocell.black::after, .ocell.white::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
}
.ocell.black::after { background: radial-gradient(circle at 35% 30%, #55555f, #060607 72%); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6); }
.ocell.white::after { background: radial-gradient(circle at 35% 30%, #ffffff, #cfc9b8 78%); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.55); }
.sym-img { width: 52px; height: 52px; border-radius: 50%; display: block; }
.cell { padding: 2px; }

/* ゲーム画面のバナー */
.game-banner {
  height: 108px; border-radius: 10px; margin: 8px 0 14px;
  background-size: cover; background-position: center 38%;
  border: 1px solid rgba(169, 183, 207, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  position: relative; overflow: hidden;
}
.game-banner-inner {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 7, 0.82) 0%, rgba(5, 5, 7, 0.45) 55%, rgba(5, 5, 7, 0.1) 100%);
  display: flex; align-items: flex-end; padding: 12px 16px;
}
.game-banner h2 { margin: 0; font-size: 22px; letter-spacing: 0.08em; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }

/* 島の台カード */
.machine-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.machine-icons { display: inline-flex; gap: 4px; }
.sym-mini { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); }
.big-count { color: var(--gold-bright); font-weight: bold; }
.slump.big { height: 28px; }
.slump.big .slump-bar { width: 4px; }

/* ルーレットの円盤 */
.wheel-wrap { position: relative; width: 290px; height: 290px; margin: 14px auto; }
.wheel-pointer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); color: var(--gold-bright); font-size: 18px; z-index: 3; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); }
.roulette-wheel {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, #20232a 0 52px, #14151a 53px 100%);
  border: 6px solid #8b98b0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), inset 0 0 0 3px rgba(236, 210, 154, 0.35), inset 0 0 34px rgba(0, 0, 0, 0.8);
}
.pocket {
  position: absolute; top: 50%; left: 50%; width: 22px; height: 26px; margin: -13px 0 0 -11px;
  border-radius: 4px; display: flex; align-items: flex-start; justify-content: center;
  font-size: 11px; font-weight: bold; color: #f2ead2; padding-top: 2px;
  box-shadow: inset 0 0 0 1px rgba(236, 210, 154, 0.25);
}
.pocket.red { background: #7e1d22; }
.pocket.black { background: #1d1d22; }
.pocket.green { background: #1e6b3a; }
.wheel-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 13px; letter-spacing: 0.35em; margin-left: 0.35em; color: var(--gold);
  border: 1px solid rgba(236, 210, 154, 0.4); border-radius: 50%;
  width: 86px; height: 86px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 35%, #26262c, #101013 75%);
}

/* 第5期の卓 */
.board-cards { display: flex; gap: 8px; min-height: 96px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.hole-backs { font-size: 30px; color: var(--gold); letter-spacing: 2px; }
.raise-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.raise-row input { width: 110px; }
.hand-cards { display: flex; flex-wrap: wrap; gap: 4px; }
.hand-card { background: none; border: none; padding: 0; cursor: pointer; }
.hand-card .pcard { transition: transform 0.12s ease; }
.hand-card.sel .pcard { transform: translateY(-12px); border-color: var(--gold-bright); box-shadow: 0 0 0 2px var(--gold), 0 10px 18px rgba(0, 0, 0, 0.5); }
.pcard.joker { color: #b388ff; }
.draw-card { cursor: pointer; font-size: 34px; }
.draw-card:hover { transform: translateY(-6px); }

/* AT機 */
.mode-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-bright); }
.mode-badge.at { background: rgba(201, 162, 39, 0.25); color: #ffe9a8; }
.mode-badge.cz { border-color: #c0453e; color: #ff9d94; }
.at-banner {
  text-align: center; font-size: 19px; letter-spacing: 0.14em; padding: 12px;
  border: 1px solid rgba(169, 183, 207, 0.35); border-radius: 10px; margin-bottom: 12px;
  background: linear-gradient(180deg, #17171c, #0d0d10);
}
.at-banner.cz { border-color: #c0453e; color: #ffb3ab; box-shadow: 0 0 18px rgba(192, 69, 62, 0.35); }
.at-banner.at { border-color: var(--gold-bright); color: #ffe9a8; box-shadow: 0 0 22px rgba(236, 210, 154, 0.4); }
.at-window { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.at-cell {
  width: 84px; height: 96px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--gold-bright);
  background: radial-gradient(circle at 50% 35%, #26262e, #101013 78%);
  border: 1px solid rgba(236, 210, 154, 0.45);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.7);
}
.at-log { margin-top: 8px; }

/* 競馬 */
.keiba-horses { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.keiba-horse {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; text-align: left;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.keiba-horse.sel { border-color: var(--gold-bright); box-shadow: 0 0 0 1px var(--gold); }
.keiba-no { grid-row: span 2; font-size: 20px; font-weight: bold; color: var(--gold-bright); display: flex; align-items: center; }
.keiba-name { font-weight: bold; }
.keiba-meta { grid-column: 2; color: var(--muted); font-size: 12px; }
.keiba-odds { grid-row: span 2; display: flex; align-items: center; color: var(--gold-bright); font-size: 13px; }
.stable-color { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(255, 255, 255, 0.3); }

/* 麻雀 */
.mj-tile {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 34px; padding: 0 3px; margin: 1px;
  background: linear-gradient(180deg, #fdfdf8, #e8e4d4);
  color: #22242a; border-radius: 4px; font-size: 12px; font-weight: bold;
  border: 1px solid #b9b39a; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  vertical-align: middle;
}
.mj-tile.man { color: #23386e; }
.mj-tile.pin { color: #8c2b3f; }
.mj-tile.sou { color: #1e6e3e; }
.mj-tile.honor { color: #22242a; }
.mj-tile.red { background: linear-gradient(180deg, #ffe9e4, #f6c9bd); color: #b3231b; }
.mj-discard { max-width: 240px; margin: 4px 0; }
.mj-discard .mj-tile { min-width: 20px; height: 27px; font-size: 10px; }
.mj-meld { display: inline-block; margin-right: 8px; padding: 2px; border: 1px dashed rgba(169, 183, 207, 0.4); border-radius: 5px; }
.mj-hand { display: flex; flex-wrap: wrap; gap: 2px; margin: 6px 0; }
.mj-tile-btn { padding: 0; background: none; border: none; cursor: pointer; }
.mj-tile-btn:hover .mj-tile { filter: brightness(1.12); transform: translateY(-2px); }
.mj-tile-btn.drawn { margin-left: 10px; }
.mj-tile-btn .mj-tile { min-width: 30px; height: 40px; font-size: 13px; }
.mj-back {
  display: inline-block; width: 20px; height: 27px; margin: 1px; border-radius: 3px;
  background: linear-gradient(135deg, #2c2416, #57451c 55%, #2c2416);
  border: 1px solid rgba(236, 210, 154, 0.55); vertical-align: middle;
}
