/* 設定6をさがせ — ゲーム固有のスタイル */

/* ---- topbar ---- */
#topbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 10px) var(--pad) 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  min-height: var(--top-h);
  flex: none;
}
.topbar-name { font-size: 11px; color: var(--ink-3); letter-spacing: .08em; white-space: nowrap; }
.topbar-date { flex: 1; text-align: center; }
.topbar-date .date-str { font-size: 13px; color: var(--ink-2); }
.topbar-special {
  display: inline-block; margin-top: 2px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--kin); color: #2a1c00; font-size: 11px; font-weight: 800;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-coins { font-family: var(--font-led); font-size: 15px; color: var(--led); cursor: pointer; white-space: nowrap; }
.topbar-coins:active { opacity: .7; }
.topbar-rank { font-size: 11px; color: var(--kin); font-weight: 700; white-space: nowrap; }
#topbar.in-machine .topbar-back {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; padding: 6px 12px; white-space: nowrap;
}
#topbar .topbar-back { display: none; }

/* ---- tabbar ---- */
#tabbar {
  display: flex; border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-bottom: var(--safe-b);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 4px; gap: 3px; cursor: pointer; color: var(--ink-3);
  border: none; background: none; min-height: var(--tab-h);
  transition: color .15s;
}
.tab-item.is-active { color: var(--kin); }
.tab-item svg { width: 22px; height: 22px; }
.tab-item .tab-label { font-size: 10px; font-weight: 700; letter-spacing: .04em; }
#tabbar.hidden { display: none; }
/* 台の画面と設定発表の画面では、下のタブを出さない(途中でほかの画面へ行けないように) */
body[data-screen="machine"] #tabbar,
body[data-screen="reveal"] #tabbar { display: none; }

/* ---- ホール画面 ---- */
#screen-hall { background: var(--bg); }
.hall-wrap { padding: var(--pad); padding-bottom: 80px; }

/* フロアタブ: 4つを同じ幅で並べる(上に「1F」、下に「低レート ×1」) */
.floor-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.floor-tab {
  position: relative; min-height: 52px; padding: 6px 4px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--bg-2);
  cursor: pointer; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  white-space: nowrap;
}
.floor-tab .tab-head { font-size: 16px; font-weight: 900; line-height: 1.15; }
.floor-tab .tab-sub { font-size: 10px; font-weight: 700; opacity: .8; }
.floor-tab.is-active { background: var(--shu); border-color: var(--shu-deep); color: #fff; }
.floor-tab.is-locked { color: var(--ink-3); cursor: default; }
.floor-tab .tab-lock { position: absolute; top: 4px; right: 5px; line-height: 0; }

/* 特定日の帯 */
.special-banner {
  margin-bottom: 10px; padding: 8px 12px; border-radius: var(--r-s);
  background: linear-gradient(90deg, var(--kin-deep) 0%, var(--kin) 100%);
  color: #2a1c00; font-weight: 800; font-size: 13px;
}

/* ヒント */
.hint-box {
  margin-bottom: 14px; padding: 10px 14px; border-radius: var(--r-m);
  background: var(--bg-2); border: 1px solid var(--kin);
  font-size: 13px; color: var(--kin);
}
.hint-box .hint-label { font-size: 10px; color: var(--kin-deep); font-weight: 700; margin-bottom: 2px; }

/* 台の一覧: 1台1行の表(見出しは上に1回だけ) */
.unit-table { display: flex; flex-direction: column; gap: 4px; }
.ut-machine { font-size: 13px; font-weight: 800; color: var(--ink-2); margin: 0 2px 4px; }
.ut-head, .ut-row {
  display: grid; align-items: center; column-gap: 4px;
  grid-template-columns: 34px 26px 26px 56px 58px 44px minmax(0, 1fr);
}
.ut-head { padding: 0 8px; font-size: 10px; font-weight: 700; color: var(--ink-3); }
.ut-head span { text-align: right; }
.ut-head span:first-child { text-align: left; }
.ut-head span:last-child { text-align: center; }
.ut-row {
  min-height: 46px; padding: 4px 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-s);
  cursor: pointer;
}
.ut-row:active { background: var(--bg-3); }
.ut-row.is-mine { border-color: var(--shu); box-shadow: inset 4px 0 0 var(--shu); }
.ut-row.is-closed { cursor: default; background: var(--bg); }
.ut-no { display: flex; flex-direction: column; line-height: 1.1; }
.ut-no b { font-size: 18px; font-weight: 400; }
.ut-no small { font-size: 9px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.ut-row.is-mine .ut-no small { color: var(--shu); }
.ut-v { font-size: 14px; text-align: right; white-space: nowrap; }
.ut-last { min-width: 0; height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.ut-graph { width: 100%; height: 30px; display: block; }
/* 設定が発表された台: 設定の札と判定 */
.mc-setting-badge {
  font-family: var(--font-ui); font-size: 13px; font-weight: 900; line-height: 1;
  padding: 5px 7px; border-radius: var(--r-s); white-space: nowrap;
  color: #0b0d16; background: var(--set-color, var(--led));
}
.mc-setting-badge[data-setting="6"] { background: var(--tier-rainbow-stripes); color: #0b0d16; }
.mc-grade { font-size: 18px; color: var(--kin); }

/* ホール下部ボタン */
.hall-actions {
  display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
}
.hall-actions .btn { flex: 1; min-width: 80px; font-size: 13px; padding: 10px 8px; }

/* はじめて説明 */
.hall-howto {
  margin-bottom: 14px; padding: 10px 12px; border-radius: var(--r-m);
  background: var(--bg-3); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2);
}
.hall-howto summary { cursor: pointer; color: var(--ink); font-weight: 700; }

/* ---- 台の画面 ---- */
#screen-machine {
  --cell: 80px;            /* リールの1コマ。machineview の fitReelSize が画面の高さに合わせて決める */
  background: var(--bg);
  display: flex; flex-direction: column;
}

/* データカウンター(上帯) */
.data-counter {
  flex: none; background: var(--led-bg); border-bottom: 2px solid var(--led-dim);
  padding: 8px var(--pad) 6px;
}
.dc-row1 { display: flex; gap: 8px; align-items: flex-end; justify-content: space-between; margin-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.dc-row1::-webkit-scrollbar { display: none; }
.dc-item { flex: none; text-align: center; }
.dc-item .dc-label { font-size: 10.5px; color: #b8923a; letter-spacing: .04em; display: block; }
.dc-item .dc-val { font-family: var(--font-led); font-size: 17px; color: var(--led); display: block; }
.dc-item.dc-big .dc-val { font-size: 22px; }
.dc-sep { flex: none; width: 1px; background: var(--led-dim); align-self: stretch; }
.dc-graph-wrap { margin-top: 6px; height: 32px; }
.dc-graph { width: 100%; height: 32px; display: block; }

/* 小役カウンター */
.koban-counter {
  flex: none; padding: 5px var(--pad);
  display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--line); font-size: 12px;
}
.kc-item { display: flex; align-items: center; gap: 4px; }
.kc-item .kc-sym { font-size: 14px; }
.kc-item .kc-val { font-family: var(--font-led); color: var(--led); font-size: 13px; }
.kc-item .kc-prob { color: var(--ink-3); font-size: 11px; }

/* 筐体 */
.machine-cabinet {
  flex: 1; min-height: 0;
  background: var(--shu);
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 10px 8px;
  border-left: 4px solid var(--kin);
  border-right: 4px solid var(--kin);
  overflow: hidden;
}
.cabinet-top-trim {
  width: 100%; height: 5px; background: var(--kin); border-radius: 3px 3px 0 0;
  flex: none; margin-bottom: 6px;
}
/* 機種名プレート */
.cabinet-head { display: flex; align-items: stretch; justify-content: center; gap: 6px; margin-bottom: 8px; flex: none; max-width: 100%; }
.cabinet-nameplate {
  font-size: 14px; font-weight: 900; color: var(--kin);
  letter-spacing: .15em; text-align: center;
  border: 2px solid var(--kin); border-radius: var(--r-s);
  padding: 3px 18px; flex: none;
  background: rgba(0,0,0,.3);
}
/* 連チャンの札: 前のボーナスから100G以内のあいだだけ、機種名のとなりに出す。色は次に届く連チャン数の段階 */
.chain-plate {
  display: flex; align-items: baseline; gap: 1px; flex: none; white-space: nowrap;
  font-size: 13px; font-weight: 800; color: #fff;
  border: 2px solid var(--set-color, var(--tier-blue)); border-radius: var(--r-s);
  padding: 3px 10px; background: #0b0d16;
}
.chain-plate[hidden] { display: none; }
.chain-plate b { color: var(--set-color, var(--tier-blue)); font-weight: 900; }
.chain-plate b.led { font-family: var(--font-led); font-weight: 400; font-size: 15px; margin-left: 2px; }
.chain-plate[data-setting="6"] { border-color: transparent; background: linear-gradient(#0b0d16, #0b0d16) padding-box, var(--tier-rainbow) border-box; }
.chain-plate[data-setting="6"] b { color: var(--tier-yellow); }
.cabinet-bottom-trim {
  width: 100%; height: 5px; background: var(--kin); border-radius: 0 0 3px 3px;
  flex: none; margin-top: 6px;
}
/* LED パネル(リール下: CREDIT / BET / PAYOUT 横並び) */
/* リールの下の段: 左にだるまランプ、右に LED パネル */
.cabinet-bottom-row {
  display: flex; gap: 8px; align-items: stretch;
  width: 100%; flex: none; margin-top: 8px;
}
.led-panel {
  display: flex; gap: 0; flex: 1; min-width: 0;
  background: var(--led-bg, #0a0d14); border: 2px solid var(--kin);
  border-radius: var(--r-m); overflow: hidden;
}
.led-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 4px; border-right: 1px solid rgba(232,184,74,.25);
}
.led-cell:last-child { border-right: none; }
.led-cell-label { font-size: 10px; letter-spacing: .1em; color: #b8923a; display: block; }
.led-cell-val { font-family: var(--font-led); font-size: 24px; line-height: 1.2; color: var(--led); display: block; }

/* リール窓: 濃い茶の枠の中に、生成りの帯が3本 */
.reel-window {
  flex: none;
  background: #2b1a12;
  border: 3px solid var(--kin);
  border-radius: var(--r-m);
  padding: 5px;
  display: flex; gap: 4px;
  position: relative; overflow: hidden;
}
#reel-container { display: flex; gap: 5px; position: relative; }
.reel-wrap {
  width: var(--cell); overflow: hidden; position: relative;
  border-radius: 4px; background: #f6eeda;
}
.reel-win { height: calc(var(--cell) * 3); overflow: hidden; position: relative; }
/* 上下の端を一段暗くして、帯が回りこんでいるように見せる(ぼかしは使わない) */
.reel-win::before, .reel-win::after {
  content: ''; position: absolute; left: 0; right: 0; height: 9px;
  background: rgba(43, 26, 18, .16); z-index: 2; pointer-events: none;
}
.reel-win::before { top: 0; }
.reel-win::after { bottom: 0; }
.reel-strip { position: absolute; top: 0; left: 0; width: 100%; }
.reel-cell {
  width: var(--cell); height: var(--cell); position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #f6eeda; box-shadow: inset 0 -1px 0 #e8dfc6;
}
.reel-cell svg { width: calc(var(--cell) * .875); height: calc(var(--cell) * .875); display: block; }
/* 揃ったライン(reels.js が SVG で線と枠を描く) */
.win-line-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  opacity: 0; transition: opacity .1s;
}
.win-line-overlay svg { position: absolute; left: 0; top: 0; overflow: visible; }
.win-line-overlay.is-flash { opacity: 1; animation: lineFlash 1.2s steps(2) forwards; }
@keyframes lineFlash {
  0%,100% { opacity: 1; }
  50% { opacity: .35; }
}

/* 大リール(第3リールの演出): 第3リールの3コマをそのまま大きくして回す。幕は暗くせず、台の色の平塗り */
.big-reel-panel {
  position: absolute; inset: 0; z-index: 20;
  background: #a3261d;
  display: flex; align-items: center; justify-content: center;
  animation: bigReelIn .18s ease;
}
@keyframes bigReelIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.big-reel-panel.is-out { animation: bigReelOut .28s ease forwards; }
@keyframes bigReelOut { to { opacity: 0; transform: scale(1.04); } }
.big-reel-window {
  width: calc(var(--big-cell, 110px) * 1.36); height: calc(var(--big-cell, 110px) * 3 + 12px); overflow: hidden; position: relative;
  background: #f6eeda; border: 6px solid #2b1a12; border-radius: var(--r-m);
}
.big-reel-inner { display: flex; flex-direction: column; will-change: transform; }
.big-reel-cell {
  flex: none; width: 100%; height: var(--big-cell, 110px);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #e8dfc6;
}
.big-reel-cell svg { width: calc(var(--big-cell, 110px) * .9); height: calc(var(--big-cell, 110px) * .9); }
.big-reel-cell.is-target { background: #ffe14d; box-shadow: inset 0 0 0 4px #2b1a12; }

/* だるまランプ: リールの下の左。消灯は沈んだ色、点灯で窓が黄色に光り、だるまが本来の色になる(にじみ・放射線なし) */
.daruma-lamp {
  flex: none; width: 104px; height: 104px;
  display: flex; align-items: center; justify-content: center;
  background: #120c0a; border: 3px solid var(--kin); border-radius: var(--r-m);
}
.daruma-lamp-svg { width: 96px; height: 96px; display: block; }
.daruma-lamp .dl-body { fill: #4a2626; stroke: #120c0a; }
.daruma-lamp .dl-face { fill: #5e5e66; stroke: #120c0a; }
.daruma-lamp .dl-ink { stroke: #120c0a; }
.daruma-lamp .dl-belly { stroke: #5c4a20; }
.daruma-lamp .daruma-eye-l,
.daruma-lamp .daruma-eye-r { fill: #3a3a42; stroke: #120c0a; }
.daruma-lamp.is-lit { background: #ffe45c; border-color: #2b1a12; }
.daruma-lamp.is-lit .dl-body { fill: #d83a2e; stroke: #2b1a12; }
.daruma-lamp.is-lit .dl-face { fill: #f6eeda; stroke: #2b1a12; }
.daruma-lamp.is-lit .dl-ink { stroke: #2b1a12; }
.daruma-lamp.is-lit .dl-belly { stroke: #e8b84a; }
.daruma-lamp.is-lit .daruma-eye-l,
.daruma-lamp.is-lit .daruma-eye-r { fill: #fffdf5; stroke: #2b1a12; }
/* 目の色 */
.daruma-lamp[data-color="red"]     { --lamp-color: #e5332a; }
.daruma-lamp[data-color="blue"]    { --lamp-color: #3f7df0; }
.daruma-lamp[data-color="yellow"]  { --lamp-color: #ffe600; }
.daruma-lamp[data-color="green"]   { --lamp-color: #22b14c; }
.daruma-lamp[data-color="gold"]    { --lamp-color: #c8961e; }
.daruma-lamp[data-color="rainbow"] { --lamp-color: #e5332a; }
/* 片目(BIG か REG)は左目だけ、両目(BIG 確定)は両方に色が入る */
.daruma-lamp.is-lit[data-eyes="1"] .daruma-eye-l,
.daruma-lamp.is-lit[data-eyes="2"] .daruma-eye-l,
.daruma-lamp.is-lit[data-eyes="2"] .daruma-eye-r { fill: var(--lamp-color, #e5332a); }
/* 虹: 窓は虹のしま、目の色をなめらかに回す(点滅ではなく色の移りかわり) */
.daruma-lamp.is-rainbow { background: var(--tier-rainbow-stripes); }
.daruma-lamp.is-rainbow .daruma-eye-l,
.daruma-lamp.is-rainbow .daruma-eye-r { animation: lampHue 2.4s linear infinite; }
@keyframes lampHue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .daruma-lamp.is-rainbow .daruma-eye-l,
  .daruma-lamp.is-rainbow .daruma-eye-r { animation: none; }
}

/* .credit-display は led-panel に置き換え済み(互換のため空定義) */
.credit-display { display: none; }

/* 回すボタン・AUTO */
.machine-controls {
  flex: none; padding: 10px var(--pad) 10px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-2); border-top: 1px solid var(--line);
}
.btn-spin {
  display: block; width: 100%; min-height: 60px;
  background: var(--shu); border: 2px solid var(--kin); border-radius: var(--r-m);
  font-size: 20px; font-weight: 900; color: #fff; letter-spacing: .1em;
  cursor: pointer; transition: transform .1s, opacity .15s;
}
.btn-spin:active { transform: translateY(2px); }
.btn-spin:disabled { opacity: .4; cursor: default; }
.btn-spin.is-spinning { background: var(--shu-deep); }
.ctrl-row { display: flex; gap: 8px; align-items: center; }
.btn-auto {
  min-height: 44px; padding: 0 10px 0 14px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-m);
  color: var(--ink-2); font-size: 13px; font-weight: 800; cursor: pointer;
}
.btn-auto .auto-state {
  min-width: 34px; padding: 2px 6px; border-radius: 999px; text-align: center;
  font-size: 11px; font-weight: 900; background: #0b0d16; color: var(--ink-3);
}
.btn-auto.is-on { background: var(--kin); border-color: var(--kin-deep); color: #2a1c00; }
.btn-auto.is-on .auto-state { background: #2a1c00; color: var(--kin); }
.speed-btns { display: flex; gap: 4px; }
.btn-speed {
  min-height: 36px; min-width: 48px; padding: 0 10px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-s);
  color: var(--ink-3); font-size: 12px; cursor: pointer;
}
.btn-speed.is-active { background: var(--bg-2); border-color: var(--kin); color: var(--kin); }
.btn-speed.is-locked { position: relative; padding-right: 20px; }
.btn-speed.is-locked::after {
  content: '';
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23888'%3E%3Cpath d='M8 1a3 3 0 00-3 3v2H3v9h10V6h-2V4a3 3 0 00-3-3zm0 1.5A1.5 1.5 0 019.5 4v2h-3V4A1.5 1.5 0 018 2.5zM4.5 7.5h7v6h-7v-6z'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
.quit-row { display: flex; justify-content: flex-end; }
.btn-quit { background: none; border: none; color: var(--ink-3); font-size: 13px; padding: 6px 0; cursor: pointer; }

/* 設定推測グラフ(会員のみ) */
.estimate-row {
  margin-top: 4px; padding: 8px var(--pad);
  background: var(--bg-3); border-radius: var(--r-s);
}
.est-label { font-size: 10px; color: var(--ink-3); margin-bottom: 4px; }
.est-bars { display: flex; gap: 2px; align-items: flex-end; height: 36px; }
.est-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.est-bar { width: 100%; background: var(--set-color, var(--tier-gray)); border-radius: 2px 2px 0 0; min-height: 2px; }
.est-no { font-size: 9px; color: var(--ink-3); }
.est-lock { font-size: 11px; color: var(--ink-3); padding: 4px 0; }

/* PUSH ボタン */
.push-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  min-width: 140px; min-height: 60px; border-radius: var(--r-l);
  background: var(--shu); border: 3px solid var(--kin);
  color: #fff; cursor: pointer; z-index: 30; pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; animation: pushAppear .2s ease;
  padding: 14px 26px;
}
@keyframes pushAppear { from { transform: translate(-50%,-50%) scale(0.75); opacity: 0; } }
.push-btn b { font-size: 30px; letter-spacing: .15em; }
.push-btn small { font-size: 13px; color: #fff; white-space: nowrap; }
.push-btn.pressed { animation: pushPress .24s ease forwards; }
@keyframes pushPress { to { transform: translate(-50%,-50%) scale(1.12); opacity: 0; } }

/* ボーナス終了: 台全体は暗くせず、台の上に結果の札を出す */
.bonus-end-panel {
  position: absolute; left: 14px; right: 14px; top: 50%; transform: translateY(-50%);
  background: var(--bg-2); border: 3px solid var(--kin); border-radius: var(--r-l);
  padding: 16px 12px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; z-index: 25; cursor: pointer;
  animation: beIn .24s ease;
}
@keyframes beIn { from { opacity: 0; } }
.bonus-end-panel.is-out { animation: beOut .26s ease forwards; }
@keyframes beOut { to { opacity: 0; } }
.be-title { font-size: 15px; color: var(--ink-2); font-weight: 700; letter-spacing: .1em; }
.be-total { font-size: 48px; color: var(--led); font-family: var(--font-led); }
.be-total .be-unit { font-size: 20px; }
.be-hint { font-size: 13px; color: var(--ink-2); }
.be-hint[data-color="rainbow"] span { background: linear-gradient(90deg,#ff4d4d,#f2c230,#37c871,#4f8cff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.be-hint[data-color="gold"] span { color: var(--tier-gold); }
.be-hint[data-color="red"] span { color: var(--tier-red); }
.be-hint[data-color="green"] span { color: var(--tier-green); }
.be-hint[data-color="purple"] span { color: #b77cf0; }
.be-hint[data-color="pink"] span { color: #ff8ab8; }
.be-daruma svg { display: block; }
.be-tap { font-size: 13px; color: var(--ink-2); }
@keyframes tapBlink {
  0%,100% { opacity: 1; } 50% { opacity: .3; }
}
@media (prefers-reduced-motion: reduce) {
  .be-tap { animation: none; }
}

/* ---- 台シート(ホールから選ぶ) ---- */
.machine-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(4,5,10,.78);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 70; animation: sheetIn .22s ease;
}
@keyframes sheetIn { from { opacity: 0; } }
.machine-sheet {
  width: 100%; max-width: 480px; max-height: 86vh;
  background: var(--bg-2); border-radius: var(--r-l) var(--r-l) 0 0;
  overflow-y: auto; padding: 16px var(--pad) calc(var(--safe-b) + 16px);
  animation: sheetSlide .22s ease;
}
@keyframes sheetSlide { from { transform: translateY(60px); } }
.sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-title { font-size: 17px; font-weight: 800; }
.sheet-close { background: none; border: none; font-size: 20px; color: var(--ink-3); cursor: pointer; padding: 4px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.sheet-data { background: var(--led-bg); border-radius: var(--r-s); padding: 10px 12px; margin-bottom: 12px; }
.sheet-data-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 6px; margin-bottom: 8px; }
.sdi { text-align: center; }
.sdi .sdi-label { font-size: 10.5px; color: #b8923a; display: block; }
.sdi .sdi-val { font-family: var(--font-led); font-size: 15px; color: var(--led); display: block; white-space: nowrap; }
.sheet-graph { height: 48px; margin-top: 4px; }
.sheet-graph canvas { width: 100%; height: 48px; display: block; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---- 設定発表画面 ---- */
#screen-reveal { background: var(--bg); display: flex; flex-direction: column; }
.reveal-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: var(--pad); gap: 16px; overflow-y: auto;
}
.reveal-title { font-size: 15px; color: var(--ink-2); font-weight: 700; margin-top: 20px; }
.reveal-summary { width: 100%; background: var(--bg-2); border-radius: var(--r-m); padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rs-item .rs-label { font-size: 10px; color: var(--ink-3); }
.rs-item .rs-val { font-family: var(--font-led); font-size: 16px; color: var(--led); }

/* 予想ボタン */
.guess-title { font-size: 14px; font-weight: 700; margin-top: 8px; text-align: center; }
.guess-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.btn-guess {
  min-height: 60px; border-radius: var(--r-m); border: 2px solid var(--set-color, var(--line));
  background: var(--bg-2); color: var(--set-color, var(--ink));
  font-family: var(--font-led); font-size: 24px; font-weight: 900;
  cursor: pointer;
}
.btn-guess:active { transform: scale(.96); }
/* 6 は虹(枠は虹の帯、数字は白) */
.btn-guess[data-setting="6"] {
  border-color: transparent; color: #fff;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--tier-rainbow) border-box;
}
.setting-slot-cell[data-setting="6"],
.reveal-result-number[data-setting="6"] {
  background: var(--tier-rainbow); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn-no-guess {
  grid-column: span 3; min-height: 44px; border-radius: var(--r-m);
  background: var(--bg-3); border: 1px solid var(--line); color: var(--ink-3);
  font-size: 13px; cursor: pointer;
}

/* 設定発表のリール: 幅いっぱいの窓に、生成りの札を縦に並べて回す。止まったら窓の地が設定の色になる */
.sr-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.sr-stage.is-dark { position: relative; z-index: 60; }      /* 設定6の暗転のあいだも、リールだけは見える */
/* 暗転の幕(z-index 50)の上にこの画面ごと出し、中はリール以外を隠す(iPhone でもリールが見えるように) */
#screen-reveal.is-dark { z-index: 60; background: #000; }
#screen-reveal.is-dark .reveal-wrap > *:not(.sr-stage) { visibility: hidden; }
.sr-label { font-size: 14px; font-weight: 900; color: var(--ink-2); letter-spacing: .3em; }
.sr-stage.is-dark .sr-label { color: #fff; }
.sr-window {
  position: relative; width: 100%; height: 200px; overflow: hidden;
  background: #05060b; border: 4px solid var(--kin); border-radius: var(--r-l);
}
.sr-strip { position: absolute; left: 0; right: 0; top: 0; }
.sr-cell { height: 200px; display: flex; align-items: center; justify-content: center; }
.sr-plate {
  width: 148px; height: 172px; border-radius: 16px;
  background: #f5edd8; border: 4px solid #0b0d16; color: #0b0d16;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.sr-plate small { font-size: 18px; font-weight: 900; letter-spacing: .25em; margin-left: .25em; }
.sr-plate b { font-family: var(--font-ui); font-size: 116px; font-weight: 900; line-height: 1; margin-top: -2px; }
.sr-window.is-stopped { border-color: #0b0d16; }
.sr-window[data-setting="1"] { background: var(--tier-gray); }
.sr-window[data-setting="2"] { background: var(--tier-blue); }
.sr-window[data-setting="3"] { background: var(--tier-green); }
.sr-window[data-setting="4"] { background: var(--tier-red); }
.sr-window[data-setting="5"] { background: var(--tier-gold); }
.sr-window[data-setting="6"] { background: var(--tier-rainbow-stripes); }

/* 判定表示 */
.reveal-grade-display {
  font-size: 48px; display: flex; align-items: center; gap: 16px;
  animation: gradeIn .3s ease;
}
@keyframes gradeIn { from { transform: scale(0.6); opacity: 0; } }
.reveal-grade-label { font-size: 15px; color: var(--ink-2); }

/* ランクアップ・称号などの知らせ(カードの下に短く並べる) */
.reveal-notes { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.rn-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px; border-radius: var(--r-s);
  background: var(--bg-2); border-left: 4px solid var(--kin);
}
.rn-item b { color: var(--kin); font-size: 12px; font-weight: 900; }
.rn-item span { color: var(--ink); font-size: 14px; font-weight: 700; }

/* 看破アイコン */
.grade-exact { color: var(--tier-gold); }
.grade-near  { color: var(--tier-green); }
.grade-miss  { color: var(--tier-gray); }
.grade-none  { color: var(--ink-3); }

/* ---- 結果カード ---- */
.card-preview {
  margin: 4px 0; border-radius: var(--r-m); overflow: hidden;
  border: 2px solid var(--line);
  width: 100%; flex-shrink: 0;
}
.card-preview canvas { display: block; width: 100%; height: auto; aspect-ratio: auto 1200 / 675; }
.card-share-row { display: flex; gap: 8px; }
.card-share-row .btn { flex: 1; }

/* ---- 効果音・揺れアニメ ---- */
.fx-shake { animation: fxShake .4s ease; }
.fx-shake-big { animation: fxShakeBig 1.1s ease; }
@keyframes fxShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}
@keyframes fxShakeBig {
  0%,100% { transform: translateX(0) translateY(0); }
  10%     { transform: translateX(-6px) translateY(-3px); }
  20%     { transform: translateX(6px) translateY(2px); }
  30%     { transform: translateX(-5px) translateY(-2px); }
  40%     { transform: translateX(5px) translateY(3px); }
  50%     { transform: translateX(-4px) translateY(-1px); }
  60%     { transform: translateX(4px) translateY(2px); }
  70%     { transform: translateX(-3px) translateY(-1px); }
  80%     { transform: translateX(2px) translateY(1px); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-shake, .fx-shake-big { animation: none; }
}

/* ---- ショップ・記録・設定画面 ---- */
/* メタ担当が meta.css で書く。ここでは最低限の画面枠だけ */
#screen-shop, #screen-records, #screen-settings {
  padding: var(--pad); padding-bottom: 80px;
}

/* チュートリアルカード */
.tutorial-card {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(4,5,10,.88);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tutorial-inner {
  width: 100%; max-width: 380px; background: var(--bg-2);
  border-radius: var(--r-l); border: 1px solid var(--line);
  padding: 24px 20px; display: flex; flex-direction: column; gap: 14px;
}
.tutorial-step { text-align: center; }
.tutorial-icon { height: 64px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; color: var(--kin); }
.tutorial-icon svg { width: 64px; height: 64px; display: block; }
.tutorial-heading { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.tutorial-desc { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.tutorial-dots { display: flex; justify-content: center; gap: 6px; }
.tutorial-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tutorial-dot.is-active { background: var(--kin); }
.tutorial-nav { display: flex; gap: 8px; }
.tutorial-nav .btn { flex: 1; }

/* ---- ボーナス進捗バー(item 3) ---- */
.bonus-progress {
  width: 100%; height: 6px; background: rgba(0,0,0,.35);
  border-radius: 3px; overflow: hidden; flex: none;
  margin-bottom: 6px;
}
.bonus-progress-fill {
  height: 100%; width: 0%; background: var(--kin);
  border-radius: 3px; transition: width .3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .bonus-progress-fill { transition: none; }
}

/* ---- ボーナスの揃い: 台は暗くしない(暗転は本当の大当たりだけ)。リールの上に平たい帯を1本出す ---- */
.bonus-align-banner {
  position: absolute; inset: 0; z-index: 28; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: none;
}
.bab-band {
  width: 100%; padding: 10px 8px 12px; text-align: center;
  border-top: 4px solid #2b1a12; border-bottom: 4px solid #2b1a12;
  animation: babIn .18s ease;
}
@keyframes babIn { from { transform: scaleY(.2); } }
.bonus-align-banner.is-big .bab-band { background: #ffe14d; color: #2b1a12; }
.bonus-align-banner.is-reg .bab-band { background: #3f7df0; color: #fff; }
.bonus-align-banner.is-out { animation: beOut .24s ease forwards; }
.bab-title { font-size: 36px; font-weight: 900; letter-spacing: .05em; line-height: 1.1; }
.bab-sub { font-size: 14px; font-weight: 800; margin-top: 2px; }

/* ---- ボーナス終了画面 追加スタイル ---- */
.be-hint-note { font-size: 11px; color: var(--ink-3); }
.be-total-num { font-family: var(--font-led); font-size: 48px; color: var(--led); }

/* ---- やめる画面 追加 ---- */
.reveal-title-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin-top: 20px;
}
.btn-reveal-back {
  background: none; border: 1px solid var(--line); border-radius: var(--r-s);
  color: var(--ink-3); font-size: 12px; padding: 6px 12px; cursor: pointer;
  min-height: 36px;
}
.reveal-summary { grid-template-columns: repeat(3, 1fr); }
.guess-area { width: 100%; display: flex; flex-direction: column; gap: 12px; }

/* ---- 背の低い画面(iPhone SE など): リール以外を詰めて、リールに高さを回す ---- */
@media (max-height: 740px) {
  .data-counter { padding: 6px var(--pad) 4px; }
  .dc-item .dc-val { font-size: 15px; }
  .dc-item.dc-big .dc-val { font-size: 19px; }
  .dc-graph-wrap, .dc-graph { height: 20px; }
  .dc-graph-wrap { margin-top: 3px; }
  .koban-counter { padding: 3px var(--pad); }
  .machine-cabinet { padding: 6px 8px 6px; }
  .cabinet-top-trim, .cabinet-bottom-trim { height: 4px; }
  .cabinet-top-trim { margin-bottom: 4px; }
  .cabinet-bottom-trim { margin-top: 4px; }
  .cabinet-head { margin-bottom: 5px; }
  .cabinet-nameplate { padding: 1px 12px; font-size: 13px; }
  .chain-plate { padding: 1px 8px; font-size: 12px; }
  .chain-plate b.led { font-size: 14px; }
  .cabinet-bottom-row { margin-top: 6px; }
  .daruma-lamp { width: 82px; height: 82px; }
  .daruma-lamp-svg { width: 76px; height: 76px; }
  .led-cell-val { font-size: 21px; }
  .estimate-row { margin-top: 0; padding: 4px var(--pad); }
  .machine-controls { padding: 7px var(--pad); gap: 6px; }
  .btn-spin { min-height: 50px; font-size: 19px; }
  .btn-auto { min-height: 40px; }
  .btn-speed { min-height: 34px; }
}

/* ---- 点検2回目で足したもの ---- */
/* 台の画面: 小判・梅の段は「今回」のぶん。右に今回のゲーム数と、発表まであと何Gか */
.kc-head { font-size: 11px; font-weight: 800; color: var(--ink-3); }
.kc-session { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-family: var(--font-led); }
.kc-left { margin-left: 6px; font-family: var(--font-ui); color: var(--ink-3); font-weight: 700; }
.kc-ready { margin-left: 6px; font-family: var(--font-ui); font-size: 11px; font-weight: 900; color: #2a1c00; background: var(--kin); padding: 1px 7px; border-radius: 999px; }
/* 50G に届いたら「やめて発表」を目立たせる */
#topbar.in-machine .topbar-back.is-ready { background: var(--kin); border-color: var(--kin-deep); color: #2a1c00; font-weight: 900; }
/* 大きな第3リール: 幕は台と同じ色(暗くしない)。上に何を見る場面かを1行 */
.big-reel-panel { flex-direction: column; gap: 8px; background: var(--shu); }
.big-reel-cap { font-size: 12px; font-weight: 900; color: #fff; background: #2b1a12; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
/* 設定発表のまとめ: 「今回」と「この台の今日」 */
.rs-block { width: 100%; }
.rs-head { font-size: 11px; font-weight: 800; color: var(--ink-2); margin: 0 2px 4px; }
.reveal-summary.is-4 { grid-template-columns: repeat(4, 1fr); }
.rs-val.is-plus { color: var(--tier-green); }
.rs-val.is-minus { color: var(--tier-red); }
/* ホールの「設定6」の札: 小さくても虹の6色が全部見えるよう、虹の枠に生成りの地 */
.mc-setting-badge[data-setting="6"] {
  color: #0b0d16; border: 3px solid transparent; padding: 2px 5px;
  background: linear-gradient(#f5edd8, #f5edd8) padding-box,
    linear-gradient(90deg, #e5332a 0 17%, #ff9a2e 17% 33%, #ffe600 33% 50%, #22b14c 50% 67%, #3f7df0 67% 83%, #8e5cf0 83%) border-box;
}
/* 確認の文の中のリンクは、押せると分かるよう下線 */
.modal-box a { text-decoration: underline; }
/* 細い画面(iPhone SE など)の台の画面: 「やめて発表」が入るよう、上の帯のアプリ名は省く */
@media (max-width: 389px) { #topbar.in-machine .topbar-name { display: none; } }


/* ============ 連チャン・看破ボーナス・答え合わせ・はじめての案内(2026-12-03 夜) ============ */

/* ボーナスの帯の中の「N連チャン」 */
.bab-chain {
  display: inline-block; margin-bottom: 4px; padding: 3px 14px; border-radius: 99px;
  background: #0b0d16; color: var(--set-color, var(--tier-blue));
  font-size: 17px; font-weight: 900; letter-spacing: .08em; line-height: 1.2;
}
.bab-chain[data-setting="6"] { background: var(--tier-rainbow-stripes); color: #0b0d16; }

/* ボーナス終了画面の連チャンの行 */
.be-chain {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-top: 2px; padding: 6px 12px; border-radius: var(--r-s);
  border: 2px solid var(--set-color, var(--tier-blue)); background: #0b0d16;
  font-size: 13px; font-weight: 700; color: #fff;
}
.be-chain b { color: var(--set-color, var(--tier-blue)); font-weight: 900; }
.be-chain .be-chain-now { font-size: 16px; }
.be-chain[data-setting="6"] { border-color: transparent; background: linear-gradient(#0b0d16, #0b0d16) padding-box, var(--tier-rainbow) border-box; }
.be-chain[data-setting="6"] b { color: var(--tier-yellow); }

/* ホールの上: きょうの目当て(設定6の看破賞)と来店スタンプ */
.hall-info {
  margin-bottom: 10px; border-radius: var(--r-m); overflow: hidden;
  border: 1px solid var(--kin); background: var(--bg-2);
}
.hi-row {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px;
  padding: 6px 12px; text-align: left; color: var(--ink); background: none; border: 0;
  font-family: var(--font-ui);
}
.hi-row + .hi-row { border-top: 1px solid var(--line); }
.hi-kanpa { cursor: pointer; }
.hi-kanpa:active { background: var(--bg-3); }
.hi-label { font-size: 12px; font-weight: 900; color: var(--kin); white-space: nowrap; }
.hi-val { display: inline-flex; align-items: baseline; gap: 1px; white-space: nowrap; }
.hi-val b { font-family: var(--font-led); font-weight: 400; font-size: 22px; color: var(--led); line-height: 1; }
.hi-unit { font-size: 12px; font-weight: 800; color: var(--led); }
.hi-sub { font-size: 11.5px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.hi-more { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--ink-2); text-decoration: underline; white-space: nowrap; }
.hi-dots { display: inline-flex; gap: 3px; }
.hi-dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--kin-deep); background: none; }
.hi-dots i.is-on { background: var(--shu); border-color: var(--shu); }

/* 看破ボーナスのしくみ */
.kanpa-info { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.ki-block { padding: 8px 10px; border-radius: var(--r-s); background: var(--bg-3); }
.ki-block b { display: block; font-size: 12px; font-weight: 900; color: var(--kin); }
.ki-block p { margin: 2px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.55; }
.ki-block p:last-child { margin-bottom: 0; }
.ki-list span { white-space: nowrap; }
.ki-note { margin: 0; font-size: 11.5px !important; font-weight: 500 !important; color: var(--ink-2) !important; line-height: 1.55; }

/* はじめての人への案内 */
.guide-box { display: flex; flex-direction: column; gap: 10px; }
.guide-big {
  margin: 0; padding: 12px 8px; text-align: center; border-radius: var(--r-s);
  background: #f5edd8; color: #0b0d16; font-size: 16px; font-weight: 800; border: 3px solid #0b0d16;
}
.guide-big b { font-size: 24px; font-weight: 900; color: var(--shu-deep); }
.ut-row.is-guide { border-color: var(--kin); box-shadow: inset 4px 0 0 var(--kin); }
.ut-row.is-guide .ut-no small { color: var(--kin); }
.sheet-guide { margin: 8px 0 0; padding: 6px 10px; border-radius: var(--r-s); background: #f5edd8; color: #0b0d16; font-size: 13px; font-weight: 800; text-align: center; }

/* 台の一覧・台シート: 連チャンの圏内 */
.ut-ham { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.ut-zone { font-family: var(--font-ui); font-size: 9px; font-weight: 900; color: var(--set-color, var(--tier-blue)); white-space: nowrap; }
.ut-zone[data-setting="6"] { color: var(--tier-yellow); }
.sheet-zone {
  margin: 8px 0 0; padding: 6px 10px; border-radius: var(--r-s); text-align: center;
  border: 2px solid var(--set-color, var(--tier-blue)); background: #0b0d16; color: #fff; font-size: 13px; font-weight: 700;
}
.sheet-zone b { color: var(--set-color, var(--tier-blue)); font-weight: 900; }
.sheet-zone[data-setting="6"] { border-color: var(--tier-yellow); }
.sheet-zone[data-setting="6"] b { color: var(--tier-yellow); }

/* きのうの答え合わせ */
.recap-card {
  margin-bottom: 10px; padding: 10px 12px 12px; border-radius: var(--r-m);
  background: #f5edd8; color: #0b0d16; border: 3px solid #0b0d16;
}
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rc-head b { font-size: 13px; font-weight: 900; color: var(--shu-deep); }
.rc-close { width: 32px; height: 32px; margin: -6px -6px -6px 0; border: 0; background: none; color: #0b0d16; font-size: 20px; line-height: 1; cursor: pointer; }
.rc-main { margin: 4px 0 2px; font-size: 16px; font-weight: 800; }
.rc-main b { font-size: 22px; font-weight: 900; color: var(--shu-deep); }
.rc-mine { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #3a3226; }
.rc-all { width: 100%; min-height: 40px; font-size: 13px; background: #0b0d16; color: #f5edd8; border-color: #0b0d16; }
.recap-table { display: flex; flex-direction: column; gap: 3px; max-height: 56vh; overflow-y: auto; }
.rt-row {
  display: grid; align-items: center; column-gap: 4px;
  grid-template-columns: 22px 50px minmax(0, 1.2fr) 26px 26px minmax(0, 1.3fr);
  min-height: 34px; padding: 2px 6px; border-radius: var(--r-s); background: var(--bg-3);
  font-size: 13px; color: var(--ink);
}
.rt-row > * { text-align: right; white-space: nowrap; }
.rt-row > :first-child { text-align: left; }
.rt-row > .mc-setting-badge { text-align: center; font-size: 12px; padding: 4px 4px; }
.rt-row.is-mine { box-shadow: inset 3px 0 0 var(--shu); }
/* 設定6の行は、虹のふちで囲む(答え合わせでいちばん知りたい行) */
.rt-row.is-six { border: 2px solid transparent; background: linear-gradient(var(--bg-3), var(--bg-3)) padding-box, var(--tier-rainbow) border-box; }
.rt-row .led { font-family: var(--font-led); color: var(--led); }
.rt-head { min-height: 20px; background: none; font-size: 10px; font-weight: 700; color: var(--ink-3); }
.rt-you { font-size: 12px; font-weight: 800; }

/* 設定発表: 予想の欄の案内と、看破ボーナスの行 */
.guess-note { margin: 8px 0 0; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); grid-column: span 3; }
.guess-note b { color: var(--kin); font-weight: 900; }
.guess-note b.led { font-family: var(--font-led); font-weight: 400; font-size: 16px; color: var(--led); margin: 0 1px; }
.reveal-kanpa {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-m);
  background: var(--bg-2); border: 2px solid var(--kin);
}
.rk-label { font-size: 13px; font-weight: 900; color: var(--kin); }
.rk-val { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.rk-val b { font-family: var(--font-led); font-weight: 400; font-size: 30px; color: var(--led); line-height: 1; }
.rk-unit { font-size: 14px; font-weight: 800; color: var(--led); }
.reveal-kanpa.is-six { background: #f5edd8; border: 4px solid #0b0d16; }
.reveal-kanpa.is-six .rk-label { color: var(--shu-deep); font-size: 14px; }
.reveal-kanpa.is-six .rk-val b { color: #0b0d16; font-size: 38px; }
.reveal-kanpa.is-six .rk-unit { color: #0b0d16; }
.reveal-kanpa-note, .reveal-tomorrow { margin: 0; width: 100%; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }


/* ============ 絵のセット(スキン): 図柄・ランプ・筐体の飾りを絵のファイルにする ============ */
.reel-cell .sym-img { width: calc(var(--cell) * .9); height: calc(var(--cell) * .9); display: block; object-fit: contain; }
.big-reel-cell .sym-img { width: calc(var(--big-cell, 110px) * .9); height: calc(var(--big-cell, 110px) * .9); display: block; object-fit: contain; }

/* 筐体の上の飾り。左右の空きに機種名を入れる */
[data-skin] .cabinet-top-trim { display: none; }
[data-skin] .cabinet-nameplate { display: none; }
.cabinet-banner { position: relative; flex: none; width: calc(100% + 20px); margin: -10px -10px 8px; border-bottom: 3px solid var(--kin); }
.cabinet-banner img { display: block; width: 100%; aspect-ratio: 5 / 1; object-fit: cover; }
.cb-title {
  position: absolute; top: 50%; transform: translate(-50%, -50%); white-space: nowrap;
  color: #f5edd8; font-weight: 900; font-size: 23px; letter-spacing: .08em;
  text-shadow: 2px 2px 0 #0b0d16, -1px -1px 0 #0b0d16, 1px -1px 0 #0b0d16, -1px 1px 0 #0b0d16;   /* ぼかさない、かたい影とふち */
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}
.cb-l { left: 26%; }
.cb-r { left: 75%; }
/* 連チャンの札は、飾りとリールのあいだにまたがらせる(出ても消えても、台の高さが変わらないように) */
[data-skin] .cabinet-head { height: 0; margin: 0; position: relative; z-index: 3; align-self: stretch; }
[data-skin] .chain-plate { position: absolute; left: 50%; top: -4px; transform: translate(-50%, -50%); }

/* ランプ: 消灯は目なしの絵を暗く、片目・両目は絵を入れかえる。金と虹は窓の色で見せる */
.daruma-lamp .dl-img { width: 88px; height: 88px; display: none; object-fit: contain; }
.daruma-lamp .dl-0 { display: block; filter: brightness(.4) saturate(.5); }
.daruma-lamp.is-lit .dl-0 { display: none; }
.daruma-lamp.is-lit[data-eyes="1"] .dl-1 { display: block; }
.daruma-lamp.is-lit[data-eyes="2"] .dl-2 { display: block; }
[data-skin] .daruma-lamp.is-lit[data-color="gold"] { background: var(--tier-gold); }
@media (max-height: 740px) {
  /* 低い画面では飾りを出さず、機種名の札に戻す(リールの大きさを優先) */
  .cabinet-banner { display: none; }
  [data-skin] .cabinet-top-trim { display: block; }
  [data-skin] .cabinet-nameplate { display: block; }
  [data-skin] .cabinet-head { height: auto; margin-bottom: 5px; position: static; align-self: auto; }
  [data-skin] .chain-plate { position: static; transform: none; }
  .daruma-lamp .dl-img { width: 74px; height: 74px; }
}

/* 低い画面(iPhone SE など): ボーナス終了の札は、連チャンの行が入っても台の枠におさまるように詰める */
@media (max-height: 740px) {
  .bonus-end-panel { padding: 10px 10px 8px; gap: 4px; }
  .be-title { font-size: 13px; }
  .be-total, .be-total-num { font-size: 38px; }
  .be-total .be-unit { font-size: 16px; }
  .be-daruma svg { width: 60px; height: 60px; }
  .be-chain { padding: 4px 10px; font-size: 12px; gap: 0; }
  .be-chain .be-chain-now { font-size: 14px; }
  .be-tap { font-size: 12px; }
}

/* 作風に絵があるとき: 店長の顔(ホールの「店長のひとこと」と、はじめての案内)と、ボーナス終了のだるま */
.hint-box.has-face { display: flex; align-items: center; gap: 10px; padding-left: 10px; }
.hint-face { flex: none; width: 54px; height: 54px; object-fit: contain; }
.hint-body { flex: 1; min-width: 0; }
.guide-face { display: block; width: 88px; height: 88px; margin: 0 auto; object-fit: contain; }
.be-daruma-img { display: block; width: 96px; height: 96px; object-fit: contain; }
@media (max-height: 740px) { .be-daruma-img { width: 60px; height: 60px; } }
/* 金・虹のランプ: 色替えの絵がある作風では、片目・両目の絵を、金や虹のだるまに入れかえる */
.daruma-lamp.has-color-art.is-lit[data-color="gold"] .dl-1, .daruma-lamp.has-color-art.is-lit[data-color="gold"] .dl-2,
.daruma-lamp.has-color-art.is-lit[data-color="rainbow"] .dl-1, .daruma-lamp.has-color-art.is-lit[data-color="rainbow"] .dl-2 { display: none; }
.daruma-lamp.has-color-art.is-lit[data-color="gold"][data-eyes="1"] .dl-g1,
.daruma-lamp.has-color-art.is-lit[data-color="gold"][data-eyes="2"] .dl-g2,
.daruma-lamp.has-color-art.is-lit[data-color="rainbow"][data-eyes="1"] .dl-r1,
.daruma-lamp.has-color-art.is-lit[data-color="rainbow"][data-eyes="2"] .dl-r2 { display: block; }
