/* アイドル人生スロット - 王道キラキラ・ポップ系デザイン */
:root {
  --bg-page: linear-gradient(155deg, #ffe7f3 0%, #fff7fb 45%, #f3ecff 100%);
  --phone-bg: linear-gradient(180deg, #fff5fa 0%, #ffffff 42%, #fff0f7 100%);
  --ink: #4a2340;
  --ink-soft: #855a79;
  --pink: #ff4d9e;
  --pink-deep: #d62877;
  --pink-soft: #ffe3f1;
  --gold: #e6a92e;
  --gold-light: #fff3c4;
  --accent: #ff5ca8; /* 担当カラーで動的上書き可能 */
  --accent-soft: #ffe4f1;
  --card-shadow: 0 18px 44px rgba(214, 40, 119, 0.16), 0 4px 14px rgba(155, 89, 255, 0.08);
  --font-round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
  --font-serif: "Noto Serif JP", serif;
  --font-num: "Quicksand", "M PLUS Rounded 1c", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-round);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

/* ---------- 外枠ステージ & スマホ筐体 ---------- */
.stage {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px;
}

.phone {
  position: relative;
  width: min(100vw, 420px);
  height: min(100dvh - 24px, 820px);
  min-height: 620px;
  border-radius: 30px;
  overflow: hidden;
  overflow: clip;
  background: var(--phone-bg);
  border: 2.5px solid rgba(255, 198, 224, 0.95);
  box-shadow:
    0 24px 60px rgba(214, 40, 119, 0.18),
    0 0 0 6px rgba(255, 255, 255, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  isolation: isolate;
}

@media (max-width: 480px) {
  .stage { padding: 0; }
  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
}

.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 166, 212, 0.42), transparent 46%),
    radial-gradient(circle at 86% 18%, rgba(255, 225, 148, 0.36), transparent 44%),
    radial-gradient(circle at 50% 92%, rgba(210, 174, 255, 0.34), transparent 52%),
    var(--phone-bg);
}

.sparkles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 14% 22%, rgba(255, 196, 77, 0.85) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 82% 28%, rgba(255, 92, 168, 0.7) 50%, transparent 100%),
    radial-gradient(2px 2px at 26% 74%, rgba(169, 118, 255, 0.65) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 76% 68%, rgba(255, 196, 77, 0.85) 50%, transparent 100%),
    radial-gradient(1.8px 1.8px at 52% 14%, rgba(255, 92, 168, 0.6) 50%, transparent 100%),
    radial-gradient(2px 2px at 90% 82%, rgba(255, 140, 194, 0.75) 50%, transparent 100%);
  opacity: 0.7;
}

.rays {
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at 50% 45%,
    transparent 0deg,
    rgba(255, 224, 150, 0.16) 15deg,
    transparent 30deg,
    rgba(255, 162, 210, 0.14) 55deg,
    transparent 75deg,
    rgba(255, 224, 150, 0.14) 115deg,
    transparent 140deg,
    rgba(210, 178, 255, 0.14) 185deg,
    transparent 215deg,
    rgba(255, 162, 210, 0.14) 265deg,
    transparent 300deg,
    rgba(255, 224, 150, 0.15) 335deg,
    transparent 360deg
  );
  opacity: 0.8;
}

@media (prefers-reduced-motion: no-preference) {
  .rays { animation: slowSpin 38s linear infinite; }
  .sparkles { animation: twinkle 4.5s ease-in-out infinite alternate; }
}

@keyframes slowSpin { to { transform: rotate(360deg); } }
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 0.95; } }

/* 揺れ・バズRUSH時の筐体状態 */
.phone.is-rush .bg {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 206, 84, 0.48), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(255, 92, 168, 0.36), transparent 52%),
    radial-gradient(circle at 82% 76%, rgba(160, 122, 255, 0.36), transparent 52%),
    linear-gradient(180deg, #fff4d8 0%, #fff0f8 50%, #f5eaff 100%);
}

.phone.is-shake {
  animation: phoneShake 0.34s ease-out;
}
@keyframes phoneShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-4px, 3px, 0); }
  45% { transform: translate3d(4px, -3px, 0); }
  70% { transform: translate3d(-2px, 2px, 0); }
}

/* ---------- 画面共通 ---------- */
.scr {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  padding: 18px 18px 16px;
}
.scr.is-on { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .scr.is-in { animation: scrFade 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
@keyframes scrFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 共通メインボタン ---------- */
.btn-main {
  width: 100%;
  padding: 13px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7eb8 0%, #ff4696 52%, #e0287a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px solid rgba(255, 240, 200, 0.9);
  box-shadow:
    0 8px 20px rgba(230, 46, 127, 0.34),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.14s ease, filter 0.14s ease, opacity 0.14s ease;
}
.btn-main:hover:not(:disabled) { filter: brightness(1.04); }
.btn-main:active:not(:disabled) { transform: scale(0.97) translateY(1px); }
.btn-main:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-main b { font-size: 17px; font-weight: 900; letter-spacing: 0.04em; text-shadow: 0 1px 4px rgba(145, 14, 72, 0.45); }
.btn-main small { font-size: 11px; font-weight: 700; opacity: 0.94; }

.btn-sub {
  flex: 1;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid #f4bdd7;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(214, 40, 119, 0.08);
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn-sub:hover { background: #fff6fa; }
.btn-sub:active { transform: scale(0.97); }

/* ---------- 1. タイトル画面 ---------- */
.scr-title {
  justify-content: space-between;
  padding-top: 20px;
}

.tt-top { text-align: center; }
.tt-lead {
  display: inline-block;
  margin: 0 0 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #f5c3da;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--pink-deep);
  letter-spacing: 0.06em;
}
.tt-crown { height: 36px; display: flex; justify-content: center; margin-bottom: -4px; }

.tt-logo {
  margin: 0;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0.03em;
}
.tt-logo .w { position: relative; display: inline-block; }
.tt-logo .w-s, .tt-logo .w-f { font-style: normal; display: block; }
.tt-logo .w-s {
  color: #fff;
  -webkit-text-stroke: 8px #fff;
  filter: drop-shadow(0 5px 10px rgba(219, 44, 123, 0.28));
}
.tt-logo .w-f {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ff7ab8 0%, #ff3d90 52%, #c92074 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tt-sub {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.tt-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 198, 224, 0.9);
  border-radius: 22px;
  padding: 15px 14px;
  box-shadow: 0 10px 28px rgba(214, 40, 119, 0.1);
}

.tt-field { display: flex; flex-direction: column; gap: 6px; }
.tt-field > span {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-soft);
  padding-left: 2px;
}
.tt-field input {
  width: 100%;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1.5px solid #f4c6dc;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.tt-field input::placeholder { color: #ba9ab0; font-weight: 500; font-size: 12.5px; }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.seg button {
  padding: 9px 8px;
  border-radius: 14px;
  border: 1.5px solid #f4c6dc;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.seg button b { font-size: 13px; font-weight: 900; }
.seg button small { font-size: 10px; color: var(--ink-soft); font-weight: 700; }
.seg button.on {
  border-color: var(--pink);
  background: linear-gradient(180deg, #fff0f7, #ffe0f0);
  box-shadow: 0 4px 12px rgba(255, 77, 158, 0.2);
}
.seg button.on b { color: var(--pink-deep); }

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.chip {
  padding: 7px 4px;
  border-radius: 12px;
  border: 1.5px solid #f3d0e1;
  background: #fff;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}
.chip i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.chip.on {
  border-color: var(--chip-c, var(--pink));
  background: var(--chip-bg, var(--pink-soft));
  box-shadow: 0 3px 10px rgba(214, 40, 119, 0.15);
  transform: translateY(-1px);
}

.tt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 0;
  font-size: 12px;
}
.tt-link {
  font-size: 12px;
  font-weight: 800;
  color: var(--pink-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tt-best { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); }

/* ---------- 2. スロット画面 ---------- */
.scr-slot {
  padding: 14px 14px 14px;
  justify-content: space-between;
  gap: 10px;
}

.hud { display: flex; flex-direction: column; gap: 8px; }
.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.year { display: flex; flex-direction: column; min-width: 0; }
.year-main {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
}
.year-team {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--pink-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.role {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  background: #fff;
  border: 1.5px solid #f3c2d9;
  color: var(--ink-soft);
  box-shadow: 0 2px 8px rgba(214, 40, 119, 0.08);
}
.role[data-kind="senbatsu"] { background: #e8f7ff; border-color: #6bc4ff; color: #0c74b8; }
.role[data-kind="front"] { background: #fff5d6; border-color: #f3b532; color: #9c6100; }
.role[data-kind="center"] {
  background: linear-gradient(90deg, #ff5ca8, #ffb648, #a26bff);
  border-color: #fff;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.snd {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid #f4c6dc;
  display: grid;
  place-items: center;
  color: var(--pink-deep);
}
.snd .snd-off { display: none; }
.snd.is-off .snd-on { display: none; }
.snd.is-off .snd-off { display: block; }
.snd.is-off { color: #b193a7; }

/* ステージ別プログレスレール（地下6期 / 地上6期 / メジャー6期） */
.rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.rail.is-extra { grid-template-columns: repeat(3, 1fr); }
.lamp {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(235, 198, 217, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.lamp.is-rush::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: -5px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff5ca8 0%, #ffd24d 35%, #42e3b8 70%, #8f6bff 100%);
  box-shadow: 0 0 6px rgba(255, 92, 168, 0.55);
}
.lamp.cur {
  background: var(--pink);
  box-shadow: 0 0 0 2px rgba(255, 77, 158, 0.26);
  transform: scaleY(1.25);
}
.lamp.t0 { background: #c5bac4; }
.lamp.t1 { background: #f2a9ca; }
.lamp.t2 { background: #56c4ff; }
.lamp.t3 { background: #3dd598; }
.lamp.t4 { background: #ff528e; }
.lamp.t5 { background: linear-gradient(90deg, #ffcf4a, #ffa629); }
.lamp.t6 { background: linear-gradient(90deg, #ff66b2, #ffd646, #56e0c2, #9e7bff); }
.lamp.disband { background: #6b636e; border-color: #d6cdd8; }
.lamp.crisis { background: linear-gradient(90deg, #b81d38, #ff4d4d); border-color: #ffd0d8; }

/* スロット筐体 */
.cab {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fff6fb 100%);
  border: 2.5px solid #f4c868;
  box-shadow:
    0 12px 30px rgba(214, 40, 119, 0.14),
    inset 0 0 0 3px #fff,
    inset 0 0 24px rgba(255, 182, 216, 0.28);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phone.is-rush .cab {
  border-color: #ff5ca8;
  box-shadow:
    0 0 26px rgba(255, 166, 77, 0.45),
    0 0 0 2px #ffd86b,
    inset 0 0 24px rgba(255, 214, 102, 0.35);
}

.marquee {
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff0f7, #fff7db, #fff0f7);
  border: 1px solid #f6cc86;
  font-size: 12px;
  font-weight: 900;
  color: var(--pink-deep);
  letter-spacing: 0.04em;
}
.phone.is-rush .marquee {
  background: linear-gradient(90deg, #ff5ca8, #ffb83f, #ff5ca8);
  border-color: #fff;
  color: #fff;
  text-shadow: 0 1px 3px rgba(155, 18, 79, 0.45);
}

.reels {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
}
.reels.is-5 {
  grid-template-columns: repeat(3, 1fr);
}
.reels.is-5 .reel:nth-child(4) { grid-column: 1 / span 1; }

.reel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}
.reel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px;
  gap: 3px;
}
.reel-name {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ab-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 3.5px;
  border-radius: 5px;
  color: #fff;
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.reel-good {
  display: inline-block;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 4px;
  background: #ffe680;
  color: #8a5600;
  font-size: 9px;
  font-weight: 900;
  vertical-align: middle;
}
.reel-val {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.reel-grade {
  font-size: 12px;
  font-weight: 900;
}

.reel-win {
  position: relative;
  flex: 1;
  min-height: 92px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff5fa 0%, #ffffff 50%, #fff5fa 100%);
  border: 2px solid #f4cce0;
  overflow: hidden;
  box-shadow: inset 0 12px 16px rgba(214, 40, 119, 0.12), inset 0 -12px 16px rgba(214, 40, 119, 0.12);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.reel-win::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 232, 244, 0.55) 0%, transparent 24%, transparent 76%, rgba(255, 232, 244, 0.55) 100%);
  z-index: 2;
}
.reel-win.is-spinning {
  border-color: #ff8dc4;
  box-shadow: inset 0 14px 18px rgba(255, 77, 158, 0.16), inset 0 -14px 18px rgba(255, 77, 158, 0.16);
}
.reel-win.is-reach-4 {
  border-color: #ff4788;
  box-shadow: 0 0 18px rgba(255, 71, 136, 0.55), inset 0 0 14px rgba(255, 130, 180, 0.35);
}
.reel-win.is-reach-5 {
  border-color: #f6b926;
  box-shadow: 0 0 24px rgba(246, 185, 38, 0.72), inset 0 0 18px rgba(255, 224, 115, 0.5);
  transform: scale(1.03);
}
.reel-win.is-reach-6 {
  border-color: #ff5ca8;
  box-shadow: 0 0 28px rgba(255, 92, 168, 0.78), 0 0 16px rgba(80, 210, 255, 0.65);
  transform: scale(1.05);
}
.reel-win.hit-t2 { border-color: #4cc2ff; box-shadow: 0 0 12px rgba(76, 194, 255, 0.32); }
.reel-win.hit-t3 { border-color: #32c987; box-shadow: 0 0 12px rgba(50, 201, 135, 0.34); }
.reel-win.hit-t4 { border-color: #ff4788; box-shadow: 0 0 16px rgba(255, 71, 136, 0.42); }
.reel-win.hit-t5 {
  border-color: #f6b926;
  box-shadow: 0 0 20px rgba(246, 185, 38, 0.58), inset 0 0 14px rgba(255, 224, 115, 0.45);
}
.reel-win.hit-t6 {
  border-color: #ff5ca8;
  box-shadow: 0 0 22px rgba(255, 92, 168, 0.6), 0 0 12px rgba(130, 196, 255, 0.5);
}

.reel-strip {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.reel-win.is-spinning .reel-strip {
  justify-content: flex-start;
  height: auto;
  bottom: auto;
  animation: stripSpin 0.095s linear infinite;
}
.reel-win.is-spinning .cell {
  min-height: 76px;
  height: 76px;
  border-bottom: 1px dashed rgba(244, 194, 218, 0.55);
  filter: blur(0.9px);
}
.reel-win.is-reach-5 .reel-strip,
.reel-win.is-reach-6 .reel-strip {
  animation-duration: 0.16s;
}
@keyframes stripSpin {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* 筐体全体の期待度ハイライト（高能力ポイント予告の躍動感） */
.cab.is-hot-4 {
  border-color: #ff4788;
  box-shadow: 0 0 22px rgba(255, 71, 136, 0.45), inset 0 0 18px rgba(255, 110, 175, 0.25);
}
.cab.is-hot-5 {
  border-color: #f6b926;
  box-shadow: 0 0 30px rgba(246, 185, 38, 0.68), inset 0 0 24px rgba(255, 224, 115, 0.42);
}
.cab.is-hot-6 {
  border-color: #ff5ca8;
  box-shadow: 0 0 34px rgba(255, 92, 168, 0.72), 0 0 22px rgba(80, 220, 255, 0.55), inset 0 0 26px rgba(255, 224, 140, 0.45);
}
@media (prefers-reduced-motion: no-preference) {
  .cab.is-hot-4,
  .cab.is-hot-5,
  .cab.is-hot-6 {
    animation: cabPulse 0.48s ease-in-out infinite alternate;
  }
}
@keyframes cabPulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.012); filter: brightness(1.06); }
}

.cell.pop {
  animation: reelLand 0.32s cubic-bezier(0.22, 1.45, 0.36, 1) both;
}
@keyframes reelLand {
  0% { transform: translateY(-28%) scale(1.06); }
  55% { transform: translateY(7%) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

.cell {
  width: 100%;
  height: 100%;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-num);
  font-weight: 900;
}
.cell.idle {
  font-size: 30px;
  color: #e4b5cb;
}
.cell b {
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.cell small {
  font-family: var(--font-round);
  font-size: 9.5px;
  font-weight: 800;
  margin-top: 3px;
  opacity: 0.9;
}

/* ティアごとの数字＆背景デザイン */
.cell.t0 { color: #9c8f99; background: linear-gradient(180deg, #f5f2f5, #ece7ec); }
.cell.t1 { color: #b5658b; background: linear-gradient(180deg, #fffafc, #ffeef6); }
.cell.t2 { color: #0f88d6; background: linear-gradient(180deg, #f0faff, #d8f2ff); }
.cell.t3 { color: #0f9d63; background: linear-gradient(180deg, #edfff6, #d0fae6); }
.cell.t4 { color: #e6226b; background: linear-gradient(180deg, #fff0f6, #ffd1e5); }
.cell.t5 {
  color: #a85e00;
  background: linear-gradient(160deg, #fffbe0 0%, #ffe078 52%, #ffc038 100%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.cell.t6 {
  color: #fff;
  background: linear-gradient(135deg, #ff66b2 0%, #ffbe4f 34%, #4fe3b8 68%, #9b70ff 100%);
  text-shadow: 0 2px 6px rgba(132, 22, 92, 0.55);
}
.cell.neg {
  color: #b81d38;
  background: linear-gradient(180deg, #fff0f2 0%, #ffd5dc 100%);
}

/* 下部コンソール */
.console {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}
.total { display: flex; flex-direction: column; align-items: flex-start; padding-left: 4px; }
.total .k { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.total-num {
  font-family: var(--font-num);
  font-size: 32px;
  line-height: 1.05;
  font-weight: 900;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.total-num.is-surge {
  color: var(--pink-deep);
  animation: totalSurge 0.42s cubic-bezier(0.22, 1.45, 0.36, 1);
}
@keyframes totalSurge {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.total-delta {
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
  color: var(--pink);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.total-delta.on { opacity: 1; }

.spin {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 16px rgba(214, 40, 119, 0.34));
  transition: transform 0.1s ease, filter 0.14s ease;
}
.spin:hover:not(:disabled) { filter: drop-shadow(0 10px 20px rgba(255, 77, 158, 0.48)) brightness(1.03); }
.spin:active:not(:disabled) { transform: scale(0.93) translateY(2px); }
.spin.is-busy { filter: saturate(0.85) drop-shadow(0 4px 10px rgba(214, 40, 119, 0.2)); }
.spin-md { width: 96px; height: 96px; display: block; }
.md-label { font-family: var(--font-round); font-size: 34px; font-weight: 900; }

.total-rank {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 4px;
  text-align: right;
  line-height: 1.18;
  gap: 2px;
}
.total-rank span { font-size: 9.5px; font-weight: 800; color: var(--ink-soft); }
.total-rank b { font-size: 15.5px; font-weight: 900; color: var(--pink-deep); }
.surv-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 77, 158, 0.11);
  border: 1px solid rgba(255, 77, 158, 0.28);
  font-size: 9px;
  font-weight: 900;
  color: var(--pink-deep);
  white-space: nowrap;
}

/* ---------- 3. 分かれ道画面 ---------- */
.scr-fork { justify-content: space-between; gap: 10px; }
.fork-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fork-stage {
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff5ca8, #ff9d5c);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.fork-ov {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
}
.fork-ov b { font-family: var(--font-num); font-size: 19px; color: var(--pink-deep); }

.fork-call {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #f7c768;
  box-shadow: 0 10px 24px rgba(230, 169, 46, 0.16);
}
.fork-kicker { margin: 0 0 3px; font-size: 11px; font-weight: 900; color: #c47d00; }
.fork-title { margin: 0 0 5px; font-size: 17px; line-height: 1.3; font-weight: 900; color: var(--ink); white-space: pre-line; }
.fork-say { margin: 0; font-size: 12px; line-height: 1.45; font-weight: 700; color: var(--pink-deep); white-space: pre-line; }

.fork-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 10px 14px;
  border-radius: 20px;
  background: #fff;
  border: 2px solid #f3c8dc;
  text-align: left;
  box-shadow: 0 8px 20px rgba(214, 40, 119, 0.09);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.fcard-art {
  width: 100%;
  height: 76px;
  border-radius: 13px;
  overflow: hidden;
  display: block;
  margin-bottom: 2px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 12px rgba(214, 40, 119, 0.08);
}
.fcard-art svg {
  width: 100%;
  height: 100%;
  display: block;
}
.fcard-elite { background: linear-gradient(180deg, #fffdf4 0%, #fff0f7 100%); border-color: #f6c453; }
.fcard.is-picked {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 77, 158, 0.28), 0 12px 24px rgba(214, 40, 119, 0.2);
  transform: translateY(-3px);
}
.fcard-tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-deep);
}
.fcard-elite .fcard-tag { background: #fff0bd; color: #9c6100; }
.fcard-name { font-size: 14.5px; line-height: 1.3; font-weight: 900; color: var(--ink); min-height: 38px; }
.fcard-row { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.fcard-row em { font-style: normal; width: 34px; }
.fcard-note { font-size: 11px; font-weight: 700; color: var(--pink-deep); margin-top: -3px; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 9px; height: 9px; border-radius: 50%; background: #ff6aa8; display: block; }
.pips-hot i { background: #f5aa1c; }
.pips i.off { background: #eadbe3; }
.heads { display: inline-flex; gap: 3px; }
.heads i { width: 10px; height: 10px; border-radius: 50%; background: #e8dae2; display: block; }
.heads i.on { background: #ff4d9e; }
.fcard-stamp {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffe6f2;
  color: var(--pink-deep);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.fcard.is-picked .fcard-stamp { opacity: 1; transform: scale(1); }

.fork-foot { margin: 0; text-align: center; font-size: 12px; font-weight: 800; color: var(--ink-soft); }

/* ---------- 4. 節目ステージ・フェス画面 ---------- */
.scr-cup { justify-content: space-between; gap: 10px; }
.cup-head { text-align: center; }
.cup-head span {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--pink-deep);
}
.cup-head h2 { margin: 4px 0 2px; font-size: 22px; font-weight: 900; color: var(--ink); }

.num {
  text-align: center;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffdf2, #ffe8f3);
  border: 2px solid #f6c453;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.num.is-rolling {
  box-shadow: 0 0 22px rgba(255, 77, 158, 0.35);
}
.num.is-reveal {
  animation: numReveal 0.42s cubic-bezier(0.22, 1.45, 0.36, 1);
  box-shadow: 0 10px 26px rgba(246, 185, 38, 0.42);
}
.num.is-hot {
  background: linear-gradient(135deg, #fff7d1 0%, #ffe0f0 55%, #f0e4ff 100%);
  border-color: #ff5ca8;
}
@keyframes numReveal {
  0% { transform: scale(0.86); }
  55% { transform: scale(1.07); }
  100% { transform: scale(1); }
}
.ladder.is-wait,
.cup-result.is-wait {
  opacity: 0;
  transform: translateY(8px);
}
.ladder,
.cup-result {
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.num p { margin: 0; font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.num b { font-family: var(--font-num); font-size: 30px; line-height: 1.15; color: var(--pink-deep); display: block; }
.num span { font-size: 12.5px; font-weight: 900; color: #a86500; }
.form-grid {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(244, 182, 60, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.form-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.form-row em {
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  color: var(--ink-soft);
  width: 54px;
  text-align: right;
}
.form-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 96px;
}
.form-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e6d5e0;
  display: block;
}
.form-dots i.me {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #ff4d9e, #ffbe3b);
  box-shadow: 0 0 0 3px rgba(255, 77, 158, 0.28);
}

.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ladder li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid #f2d4e3;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-soft);
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.ladder li.is-win {
  opacity: 1;
  background: linear-gradient(90deg, #fff7db, #ffe6f2);
  border-color: #f4b63c;
  color: var(--ink);
  transform: scale(1.02);
}
.ladder li.is-lose {
  opacity: 1;
  background: #f5eff3;
  border-color: #d6c2ce;
  color: #8b7382;
}
.ladder li em { font-style: normal; font-size: 12px; font-weight: 900; }
.ladder li.is-win em { color: var(--pink-deep); }

.cup-result {
  text-align: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid #f4c6dc;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.cup-result b { font-size: 18px; font-weight: 900; color: var(--pink-deep); }
.cup-result small { font-size: 12px; font-weight: 700; color: var(--ink-soft); }

/* ---------- 5. 運命の進路画面 ---------- */
.scr-path { justify-content: space-between; text-align: center; padding-top: 28px; }
.path-k {
  margin: 0 auto;
  padding: 5px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid #f4c6dc;
  font-size: 12px;
  font-weight: 900;
  color: var(--pink-deep);
}
.path-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 16px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #f6c453;
  box-shadow: var(--card-shadow);
}
.path-badge {
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(90deg, #ff5ca8, #ffb845);
  color: #fff;
}
.path-title { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 900; color: var(--ink); }
.path-agency { margin: 0; font-size: 13.5px; font-weight: 900; color: var(--pink-deep); }
.path-copy { margin: 0; font-size: 13.5px; line-height: 1.6; font-weight: 700; color: var(--ink-soft); white-space: pre-line; }

/* ---------- 6. レジェンド延長編 ---------- */
.scr-pro { justify-content: space-between; gap: 10px; }
.pro-head {
  text-align: center;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff4d2, #ffe3f2);
  border: 2px solid #f6c453;
}
.pro-head span { display: block; font-size: 11px; font-weight: 800; color: #9c6100; }
.pro-head b { font-size: 20px; font-weight: 900; color: var(--pink-deep); }

.pro-list {
  list-style: none;
  margin: 0;
  padding: 4px 2px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pro-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid #f3cce0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pro-item.hot5 { border-color: #f5b633; background: linear-gradient(90deg, #fffbef, #fff0f7); }
.pro-item.hot6 {
  border-color: #ff5ca8;
  background: linear-gradient(90deg, #fff0f8, #fff8d9, #eef9ff);
  box-shadow: 0 4px 14px rgba(255, 92, 168, 0.22);
}
.pro-item-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 900; }
.pro-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.pro-flag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  background: var(--pink-soft);
  color: var(--pink-deep);
}
.pro-item.hot6 .pro-flag { background: linear-gradient(90deg, #ff5ca8, #ffa638); color: #fff; }

.pro-total {
  text-align: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid #f6c453;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}

/* ---------- 7. 結果トレーディングカード ---------- */
.scr-result { padding: 12px 14px; }
.res-scroll {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #f3b8d6 transparent;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-bottom: 8px;
}

.card-wrap { perspective: 900px; }
.card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  padding: 15px 15px 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--card-shadow);
  transition: transform 0.18s ease-out;
}
.card-bg { position: absolute; inset: 0; z-index: 0; }
.card-in { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.card-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 24px;
  pointer-events: none;
  border: 4px solid #e6d5df;
}
.card-holo {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background: linear-gradient(125deg, transparent 22%, rgba(255, 255, 255, 0.72) 48%, transparent 72%);
  mix-blend-mode: overlay;
}

/* レアリティ別カード枠 */
.card[data-tier="n"] .card-bg { background: linear-gradient(160deg, #ffffff 0%, #f8f2f6 100%); }
.card[data-tier="n"] .card-frame { border-color: #d9c8d3; }

.card[data-tier="r"] .card-bg { background: linear-gradient(160deg, #f3fbff 0%, #ffffff 48%, #e4f3ff 100%); }
.card[data-tier="r"] .card-frame { border-color: #63c5ff; box-shadow: inset 0 0 18px rgba(99, 197, 255, 0.28); }

.card[data-tier="sr"] .card-bg { background: linear-gradient(155deg, #fffdf0 0%, #fff4f9 52%, #ffeeb8 100%); }
.card[data-tier="sr"] .card-frame { border-color: #f3b838; box-shadow: inset 0 0 22px rgba(243, 184, 56, 0.35); }

.card[data-tier="ssr"] .card-bg {
  background: linear-gradient(145deg, #ffe3f4 0%, #fff7d6 35%, #e3fff7 68%, #efe3ff 100%);
}
.card[data-tier="ssr"] .card-frame {
  border-color: #ff69b4;
  box-shadow: inset 0 0 26px rgba(255, 105, 180, 0.38), inset 0 0 10px rgba(255, 224, 102, 0.55);
}

.card[data-tier="ur"] { color: #fff6fa; }
.card[data-tier="ur"] .card-bg {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 92, 168, 0.44), transparent 50%),
    radial-gradient(circle at 82% 85%, rgba(255, 212, 92, 0.36), transparent 50%),
    linear-gradient(150deg, #1b1026 0%, #2d1438 52%, #190e24 100%);
}
.card[data-tier="ur"] .card-frame {
  border-color: #ffcf66;
  box-shadow: inset 0 0 28px rgba(255, 92, 168, 0.5), inset 0 0 12px rgba(255, 214, 102, 0.65);
}

.card-top {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 900;
  opacity: 0.82;
}
.card-hero { display: flex; align-items: center; gap: 10px; }
.card-emblem { color: var(--gold); flex-shrink: 0; }
.card-tier-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: var(--pink);
  color: #fff;
  margin-bottom: 2px;
}
.card[data-tier="n"] .card-tier-badge { background: #a5929f; }
.card[data-tier="r"] .card-tier-badge { background: #26a0f2; }
.card[data-tier="sr"] .card-tier-badge { background: #e69d18; }
.card[data-tier="ssr"] .card-tier-badge { background: linear-gradient(90deg, #ff4d9e, #f7b731, #38c9b9); }
.card[data-tier="ur"] .card-tier-badge { background: linear-gradient(90deg, #ff5ca8, #ffd666); color: #360c22; }

.card-title { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 900; }
.card-name {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.card-color-pill {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  background: rgba(255, 92, 168, 0.14);
  color: var(--pink-deep);
}
.card[data-tier="ur"] .card-color-pill { background: rgba(255, 214, 102, 0.22); color: #ffe08a; }

.card-score {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 8px;
}
.cs {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(235, 185, 212, 0.65);
}
.card[data-tier="ur"] .cs { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 214, 102, 0.35); }
.cs span { display: block; font-size: 10px; font-weight: 800; opacity: 0.78; }
.cs b { font-family: var(--font-num); font-size: 24px; line-height: 1.1; font-weight: 900; }
.cs em { font-style: normal; color: var(--pink-deep); }
.card[data-tier="ur"] .cs em { color: #ffd666; }
.cs small { font-size: 12px; margin-left: 2px; }

.card-mid {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: 8px;
}
.radar { width: 128px; height: 128px; }
.card-abil {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-abil li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}
.card[data-tier="ur"] .card-abil li { background: rgba(255, 255, 255, 0.08); }
.card-abil .ab-g { font-family: var(--font-num); font-weight: 900; margin-right: 4px; }

.card-hist {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card[data-tier="ur"] .card-hist { background: rgba(255, 255, 255, 0.09); }
.card-hist li {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
}
.card-hist li span:first-child { opacity: 0.72; }
.card-hist li span:last-child { color: var(--pink-deep); }
.card[data-tier="ur"] .card-hist li span:last-child { color: #ffd666; }

.card-stat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.st-box {
  text-align: center;
  padding: 6px 4px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}
.card[data-tier="ur"] .st-box { background: rgba(255, 255, 255, 0.09); }
.st-box span { display: block; font-size: 9.5px; font-weight: 800; opacity: 0.75; }
.st-box b { font-size: 12.5px; font-weight: 900; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  padding-top: 2px;
}
.card-set { display: flex; align-items: center; gap: 5px; }
.setpips { display: inline-flex; gap: 3px; }
.setpips i { width: 7px; height: 7px; border-radius: 50%; background: rgba(180, 140, 165, 0.35); display: block; }
.setpips i.on { background: var(--pink); }
.card[data-tier="ur"] .setpips i.on { background: #ffd666; }

.after {
  margin: 0;
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1.5px solid #f4c6dc;
  font-size: 12.5px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
}

.res-actions { display: flex; gap: 8px; }
.res-foot { text-align: center; padding-bottom: 4px; }

/* ---------- パーティクル＆オーバーレイ演出 ---------- */
.fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
}

.ov {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
}
.ov-flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(255, 194, 224, 0.65));
  transition: opacity 0.25s ease;
}
.ov-flash.on { opacity: 0.78; }
.ov-flash.gold { background: radial-gradient(circle, rgba(255, 252, 220, 0.95), rgba(255, 198, 66, 0.65)); }
.ov-flash.rainbow { background: linear-gradient(135deg, rgba(255, 105, 180, 0.72), rgba(255, 220, 82, 0.72), rgba(102, 232, 205, 0.72)); }

.ov-edge {
  position: absolute;
  inset: 0;
  opacity: 0;
  box-shadow: inset 0 0 42px 8px rgba(255, 188, 66, 0.85);
  transition: opacity 0.2s ease;
}
.ov-edge.on { opacity: 1; }
.ov-edge.edge-4 {
  box-shadow: inset 0 0 46px 10px rgba(255, 71, 136, 0.78);
}
.ov-edge.edge-5 {
  box-shadow: inset 0 0 56px 14px rgba(255, 196, 46, 0.9), inset 0 0 18px 4px rgba(255, 250, 200, 0.75);
}
.ov-edge.edge-6 {
  box-shadow: inset 0 0 60px 15px rgba(255, 92, 168, 0.85), inset 0 0 36px 8px rgba(72, 224, 255, 0.75);
}
@media (prefers-reduced-motion: no-preference) {
  .ov-edge.on {
    animation: edgePulse 0.46s ease-in-out infinite alternate;
  }
}
@keyframes edgePulse {
  from { opacity: 0.42; }
  to { opacity: 1; }
}

.ov-cut {
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  transform: translateY(-50%) translateX(-110%);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}
.ov-cut.on { transform: translateY(-50%) translateX(0); opacity: 1; }
.ov-cut-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(224, 34, 122, 0.94), rgba(255, 152, 66, 0.92), rgba(168, 85, 247, 0.9));
  border-top: 2px solid #fff3b8;
  border-bottom: 2px solid #fff3b8;
}
.ov-cut.sns-tiktok .ov-cut-bg {
  background: linear-gradient(90deg, #11131a 0%, #fe2c55 52%, #25f4ee 100%);
  border-color: #25f4ee;
}
.ov-cut.sns-x .ov-cut-bg {
  background: linear-gradient(90deg, #0f1419 0%, #1d2b3a 60%, #1d9bf0 100%);
  border-color: #71c9f8;
}
.ov-cut.sns-instagram .ov-cut-bg {
  background: linear-gradient(90deg, #f58529 0%, #dd2a7b 48%, #8134af 100%);
  border-color: #ffe29f;
}
.ov-cut-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--pink);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}
.ov-cut p { margin: 0; font-size: 15px; font-weight: 900; text-shadow: 0 2px 6px rgba(105, 8, 52, 0.5); }

.ov-word {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  z-index: 6;
  transform: translateY(-50%) scale(0.7);
  text-align: center;
  opacity: 0;
  padding: 18px 8px;
  transition: transform 0.28s cubic-bezier(0.22, 1.35, 0.36, 1), opacity 0.22s ease;
}
.ov-word.on { opacity: 1; transform: translateY(-50%) scale(1); }
.ov-word.is-mega {
  background: linear-gradient(90deg, rgba(255, 77, 158, 0.0) 0%, rgba(255, 77, 158, 0.92) 14%, rgba(255, 174, 43, 0.95) 50%, rgba(255, 77, 158, 0.92) 86%, rgba(255, 77, 158, 0.0) 100%);
  border-top: 3px solid #fff6c2;
  border-bottom: 3px solid #fff6c2;
  box-shadow: 0 12px 40px rgba(214, 40, 119, 0.55);
  padding: 24px 8px;
}
.ov-word.is-mega.is-rebound {
  background: linear-gradient(90deg, rgba(184, 29, 56, 0.0) 0%, rgba(196, 20, 62, 0.95) 14%, rgba(255, 138, 36, 0.96) 50%, rgba(196, 20, 62, 0.95) 86%, rgba(184, 29, 56, 0.0) 100%);
  border-color: #ffe28a;
  box-shadow: 0 14px 46px rgba(196, 20, 62, 0.65);
}
.ov-word .w { position: relative; display: inline-block; font-size: 36px; font-weight: 900; letter-spacing: 0.04em; line-height: 1.1; }
.ov-word.is-mega .w { font-size: 56px; letter-spacing: 0.06em; }
.ov-word .w i { font-style: normal; display: block; }
.ov-word .w-o { color: #fff; -webkit-text-stroke: 10px #fff; filter: drop-shadow(0 6px 14px rgba(190, 24, 98, 0.45)); }
.ov-word.is-mega .w-o { -webkit-text-stroke: 14px #fff; filter: drop-shadow(0 8px 20px rgba(120, 10, 48, 0.68)); }
.ov-word .w-s { position: absolute; inset: 0; color: #ff4d9e; -webkit-text-stroke: 4px #ff4d9e; }
.ov-word.is-mega .w-s { -webkit-text-stroke: 6px #c9185a; }
.ov-word .w-f {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fff9d6 0%, #ffd24d 55%, #ff6eb4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ov-word small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(105, 8, 52, 0.8);
}
.ov-word.is-mega small {
  margin-top: 10px;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.ov-black {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #14081d;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ov-black.on { opacity: 0.92; }
.ov-spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 232, 248, 0.45), rgba(255, 166, 212, 0.14) 36%, transparent 62%);
}

/* 公式「重要なお知らせ」＆ 緊急炎上アラートカード */
.ov-crisis {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 14, 24, 0.62);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.ov-crisis.on { opacity: 1; }
.ov-crisis-card {
  width: 100%;
  max-width: 340px;
  padding: 20px 18px;
  border-radius: 14px;
  background: #ffffff;
  color: #1c191d;
  border: 2px solid #2b262d;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.42);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.24s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.ov-crisis.on .ov-crisis-card { transform: scale(1); }
.ov-crisis-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 4px;
  background: #1c191d;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.ov-crisis-card h3 {
  margin: 10px 0 8px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.3;
}
.ov-crisis-card p {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 700;
  color: #3d3640;
}
.ov-crisis-card small {
  display: block;
  padding-top: 8px;
  border-top: 1px dashed #d6ccd8;
  font-size: 11.5px;
  font-weight: 800;
  color: #b81d38;
}
.ov-crisis-card.is-flame {
  background: linear-gradient(180deg, #2a0d16 0%, #1b0910 100%);
  color: #fff5f7;
  border-color: #ff4d6d;
}
.ov-crisis-card.is-flame .ov-crisis-badge { background: #e62246; }
.ov-crisis-card.is-flame p { color: #ffd9e0; }
.ov-crisis-card.is-flame small { border-color: rgba(255, 120, 145, 0.35); color: #ff8fa3; }
.ov-crisis-card.is-recovered {
  background: linear-gradient(180deg, #fffdf0 0%, #fff0f8 100%);
  color: var(--ink);
  border-color: #f4b63c;
}
.ov-crisis-card.is-recovered .ov-crisis-badge { background: linear-gradient(90deg, #ff5ca8, #f5aa1c); }
.ov-crisis-card.is-recovered small { color: var(--pink-deep); border-color: #f3c4dc; }

/* トースト */
.toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(14px);
  z-index: 12;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(74, 35, 64, 0.92);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- ネイティブ <dialog> モーダル（確率と出典） ---------- */
.sheet-dialog {
  width: min(92vw, 400px);
  max-height: 82dvh;
  padding: 0;
  border: 2px solid #f4bdd7;
  border-radius: 24px;
  background: #fff9fc;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(74, 35, 64, 0.28);
  overflow: hidden;
}
.sheet-dialog[open] {
  display: flex;
  flex-direction: column;
}
.sheet-dialog:modal {
  overscroll-behavior: contain;
}
.sheet-dialog::backdrop {
  background: rgba(54, 18, 44, 0.45);
  backdrop-filter: blur(3px);
  overflow: hidden;
  overscroll-behavior: contain;
}
.sheet-in { display: flex; flex-direction: column; max-height: 82dvh; }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f5d6e6;
  background: #fff;
}
.sheet-head h1 { margin: 0; font-size: 16px; font-weight: 900; color: var(--pink-deep); }
.sheet-close {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 900;
}
.sheet-body {
  padding: 14px 16px 18px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.65;
}
.sheet-body h2 { margin: 12px 0 6px; font-size: 13.5px; color: var(--pink-deep); }
.sheet-body h2:first-child { margin-top: 0; }
.sheet-body p { margin: 0 0 8px; }
.prob-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.prob-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f5d6e6;
  font-weight: 800;
}
.prob-list li span:last-child { color: var(--pink-deep); }

/* ---------- デバッグ確認用メニュー (?demo) ---------- */
.demo { display: none; }
body.is-demo .demo {
  display: block;
  width: 260px;
  max-height: 820px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #f4c6dc;
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--card-shadow);
}
.demo-toggle { display: none; }
.demo h2 { margin: 0 0 6px; font-size: 14px; color: var(--pink-deep); }
.demo h3 { margin: 10px 0 5px; font-size: 11.5px; color: var(--ink-soft); }
.demo-note { margin: 0 0 8px; font-size: 11px; color: var(--ink-soft); line-height: 1.45; }
.demo-row { display: flex; flex-wrap: wrap; gap: 5px; }
.demo-row button {
  padding: 6px 9px;
  border-radius: 9px;
  background: #fff;
  border: 1.5px solid #f1c4da;
  font-size: 11.5px;
  font-weight: 800;
}
.demo-row button:hover { background: var(--pink-soft); border-color: var(--pink); }
@media (max-width: 740px) {
  body.is-demo .demo {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 30;
    width: auto;
    padding: 8px;
  }
  body.is-demo .demo-toggle {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--pink);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
  }
  body.is-demo .demo:not(.open) .demo-body { display: none; }
  body.is-demo .demo.open { width: min(88vw, 280px); }
}
