/* サンダーハート V2 を遊べる試作（11-26）。本番の game.css の上に、特化ゾーンの演出（試作 zone.html と同じ）とデモの帯だけを足す */

/* ── デモの帯（この画面の中だけの数え上げ） ── */
.demo-bar { position: relative; z-index: 300; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: center;
  padding: 4px 10px; background: rgba(14, 4, 26, .94); border-bottom: 1px solid rgba(255, 214, 102, .35);
  color: #e9dcff; font: 600 11px/1.4 "Yu Gothic", "Hiragino Sans", Meiryo, system-ui, sans-serif; }
.demo-bar b { color: #ffe08a; font-weight: 700; }
.demo-bar .demo-tag { flex: none; color: #2a0f3f; background: #f3c24a; border-radius: 999px; padding: 1px 7px; font-weight: 800; }
.demo-bar .demo-stats { flex: 0 1 auto; min-width: 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar button { flex: none; font: 700 11px/1 inherit; font-family: inherit; color: #ffe08a; background: transparent; border: 1px solid rgba(255, 214, 102, .6);
  border-radius: 999px; padding: 4px 9px; cursor: pointer; white-space: nowrap; }
.demo-bar details { flex: none; }
.demo-bar button.is-on { color: #2a0f3f; background: linear-gradient(180deg, #fff3c2, #f3c24a); border-color: transparent; }
.demo-bar details { position: relative; }
.demo-bar summary { cursor: pointer; list-style: none; color: #c9b8e8; }
.demo-bar summary::-webkit-details-marker { display: none; }
.demo-bar .demo-menu { position: absolute; right: 0; top: calc(100% + 6px); display: grid; gap: 6px; padding: 10px; min-width: 220px;
  background: rgba(20, 6, 36, .97); border: 1px solid rgba(255, 214, 102, .4); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.demo-bar .demo-menu p { margin: 0; color: #c9b8e8; font-weight: 500; }

/* PC で見るとき: 本番の画面（スマホの幅）を真ん中に置く */
@media (min-width: 700px) {
  #main-body .app-shell { max-width: 480px; margin-left: auto; margin-right: auto; }
}

/* ── 層: 背景の上（0）・中身（1）・効果（60） ── */
.game-shell > .game-title, .game-shell > .game-screen, .game-shell > .action-row { position: relative; z-index: 1; }
.stage-dim, .zone-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; }
.stage-dim { background: #07020f; }
/* ゾーンのステージ（仮）: 今の背景と同じ構図のまま夜の嵐へ。本番は描き起こし */
.zone-stage { overflow: hidden; --fx: 50%; }
.zone-stage > * { position: absolute; pointer-events: none; }
.zs-sky { inset: 0; background:
    linear-gradient(180deg, rgba(4, 4, 18, .88) 0%, rgba(8, 8, 32, .45) 30%, rgba(10, 10, 40, .12) 62%, rgba(4, 4, 16, .4) 100%),
    url("live/image/background/background.png") center / cover no-repeat;
  filter: hue-rotate(-62deg) saturate(.62) brightness(.44) contrast(1.16); }
.zs-glow { left: 0; right: 0; bottom: 0; height: 36%; mix-blend-mode: screen;
  background: linear-gradient(0deg, rgba(168, 206, 255, .42) 0%, rgba(118, 160, 255, .16) 30%, transparent 100%); }
.zs-clouds, .zs-lit { left: -6%; right: -6%; top: 2%; height: 50%; width: 112%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 52%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 52%, transparent 100%); }
.zs-clouds { filter: blur(1.2px); }
.zs-lit { opacity: 0; mix-blend-mode: screen; filter: blur(2px);
  -webkit-mask-image: radial-gradient(ellipse 38% 62% at var(--fx) 46%, #000 0%, rgba(0, 0, 0, .6) 48%, transparent 100%);
  mask-image: radial-gradient(ellipse 38% 62% at var(--fx) 46%, #000 0%, rgba(0, 0, 0, .6) 48%, transparent 100%); }
.tbolt { position: absolute; z-index: 2; pointer-events: none; opacity: 0; background-repeat: no-repeat; mix-blend-mode: screen;
  filter: grayscale(1) contrast(3.2) brightness(1.1) sepia(1) hue-rotate(176deg) saturate(3.2) drop-shadow(0 0 4px rgba(150, 205, 255, .95));
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 52%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 52%, transparent 100%);
  transition: opacity 400ms ease; }
body.is-zone .tbolt { opacity: .5; }
/* ゾーン中は盤面の紫の板を半透明の紺にして、奥に嵐の空を透かす */
body.is-zone .board { background:
    repeating-linear-gradient(90deg, transparent 0 calc(16.6667% - 1px), rgba(255, 217, 120, .26) calc(16.6667% - 1px) 16.6667%),
    linear-gradient(180deg, rgba(10, 12, 40, .22), rgba(8, 8, 30, .42) 45%, rgba(6, 6, 26, .55) 75%, rgba(4, 4, 18, .64)) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 247, 193, .38), inset 0 -18px 36px rgba(0, 0, 0, .34) !important; }
.fx { position: absolute; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.fx-cloud { background: linear-gradient(180deg, rgba(3, 2, 12, .96) 0%, rgba(6, 4, 22, .82) 34%, rgba(8, 6, 30, .35) 62%, transparent 82%);
  transform: translateY(-100%); opacity: 0; }
.fx-bolts { mix-blend-mode: screen; }
.fx-white { background: #f4f6ff; opacity: 0; }
.bolt { position: absolute; background: url("live/image/effects/lightning_sprite.png") no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28%, #000 72%, transparent 100%), linear-gradient(180deg, #000 0, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 28%, #000 72%, transparent 100%), linear-gradient(180deg, #000 0, #000 84%, transparent 100%);
  mask-composite: intersect; }
.bolt.giant { -webkit-mask-image: none; mask-image: none; }
body.is-zone .game-screen::after { opacity: .22 !important; }

/* ── ゾーンの盤面（本番の盤面の上に重ねる。ゾーン中は本番の盤面を隠す） ── */
.zone-board { position: absolute; display: none; z-index: 2; }
body.is-zone .zone-board { display: grid; }
body.is-zone #board { visibility: hidden; }
.zone-board .cell.is-mult .cell-art { scale: 1.3; }
.cell.is-empty::before, .cell.is-empty::after { content: none; }

/* ── 結晶（最初の盤面に落ちる岩・仮の絵）: 王冠と同じ 1.16倍 ── */
.cell.symbol-crystal .cell-art { transform: translateZ(0) scale(1.16); }
body.is-climax .cell.symbol-crystal { filter: none !important; z-index: 3; }

/* 25・30・50 の玉（仮）: 本番の HUD の金と虹の玉＋本番の数字の絵 */
.zorb-cell { container-type: inline-size; }
.cell.is-mult .cell-art.zorb { background-position: center; background-size: contain; background-repeat: no-repeat; display: grid; place-items: center; }
.zorb.is-gold { background-image: url("live/image/game/multipliers/hud_gold_t.png"); }
.zorb.is-rainbow { background-image: url("live/image/game/multipliers/hud_rainbow_t.png"); }
.zorb-num { font-size: 13cqw; line-height: 1; white-space: nowrap; filter: drop-shadow(0 1px 0 rgba(40, 6, 20, .8)); }
/* 玉から数字だけが抜けて倍率の玉へ飛ぶ */
.zfly { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; white-space: nowrap; line-height: 1;
  filter: drop-shadow(0 2px 0 rgba(40, 6, 20, .85)) drop-shadow(0 0 7px rgba(255, 214, 120, .75)); will-change: transform, opacity; }
.zfly .num-plus { height: 1.35em; background-size: 2.18em 1.963em; background-position: -0.437em -0.31em; width: 1.3em; }
.cell.is-mult.is-spent .cell-art { filter: brightness(.78) saturate(.8); transition: filter 200ms ease; }
/* ゾーン中の残り回転: 稲妻を青白に寄せて「ゾーンの回転」と分ける */
body.is-zone .spins-pip.is-lit { filter: saturate(.2) brightness(1.5) hue-rotate(180deg) drop-shadow(0 0 4px rgba(170, 220, 255, .95)) drop-shadow(0 0 10px rgba(120, 190, 255, .5)); }

/* 終わりの札（仮） */
.zone-result { position: absolute; left: 50%; top: 56%; z-index: 30; transform: translate(-50%, -50%) scale(.9); opacity: 0;
  padding: 12px 22px 14px; text-align: center; border-radius: 18px; pointer-events: none; transition: opacity 260ms ease, transform 260ms ease;
  border: 1.5px solid rgba(255, 226, 152, .85); background: linear-gradient(180deg, rgba(64, 26, 96, .92), rgba(26, 8, 42, .96));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45), 0 8px 30px rgba(0, 0, 0, .5); color: #fff1c9;
  font: 700 13px/1.5 "Yu Gothic", "Hiragino Sans", Meiryo, system-ui, sans-serif; white-space: nowrap; }
.zone-result.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.zone-result .big { display: block; font-size: 26px; line-height: 1.25; margin: 4px 0 2px; }
.zone-result .zr-row { display: flex; align-items: center; justify-content: center; gap: 2px; margin: 4px 0 2px; }
.zone-result .zr-from { font-size: 15px; opacity: .78; filter: saturate(.75); }
.zone-result .zr-arrow { display: inline-block; width: 9px; height: 12px; margin: 0 7px 0 5px; background: linear-gradient(180deg, #fff1bf, #d49a2e);
  clip-path: polygon(0 0, 100% 50%, 0 100%); filter: drop-shadow(0 1px 0 rgba(40, 6, 20, .8)); }
.zone-result .zr-row .big { margin: 0; }
