/* 年収スロット — 夜のオフィス、琥珀のLED、朱肉の判子 */
:root {
  --night: #16213A;
  --night-deep: #0F182B;
  --panel: #1C2944;
  --panel-line: #2B3A5C;
  --steel: #5E6B7D;
  --steel-light: #8D99AB;
  --text: #E9EDF4;
  --text-dim: #A6B1C3;
  --led: #FFB23F;
  --led-glow: rgba(255, 178, 63, 0.55);
  --led-ghost: rgba(255, 178, 63, 0.08);
  --led-housing: #0D1322;
  --shu: #E0402F;
  --shu-dark: #A12A1E;
  --paper: #F4F2EC;
  --paper-line: #DAD6CB;
  --ink: #1E1E24;
  --ink-dim: #5C5C66;
  --t0: #C3C9D3;
  --t1: #8F99A8;
  --t2: #3C7BD9;
  --t3: #23A26B;
  --t4: #E0402F;
  --t5: #D9A51C;
  --holo: linear-gradient(135deg, #FF5E8A 0%, #FFD24A 28%, #4AE0B5 55%, #5AA8FF 78%, #C77DFF 100%);
  --good: #3FD08A;
  --bad: #FF7A6B;
  --font-led: 'DotGothic16', ui-monospace, 'Osaka-Mono', monospace;
  --font-ui: system-ui, -apple-system, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', Meiryo, sans-serif;
  --font-paper: 'Hiragino Mincho ProN', 'Yu Mincho', YuMincho, 'Noto Serif JP', 'Noto Serif CJK JP', serif;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--night-deep);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
a { color: var(--led); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--led); outline-offset: 3px; border-radius: 6px; }

/* ---------- 背景(夜のビルの窓) ---------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

#app {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
}

/* ---------- 上のバー ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; height: 48px; gap: 8px; }
.brand { font-weight: 800; font-size: 15px; letter-spacing: 0.06em; color: var(--text); text-decoration: none; }
.bar-actions { display: flex; gap: 6px; }
.chip-btn {
  height: 32px; padding: 0 12px; border-radius: 16px;
  border: 1px solid var(--panel-line); background: rgba(28, 41, 68, 0.7);
  color: var(--text-dim); font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip-btn[aria-pressed="false"] { opacity: 0.6; }
.chip-btn svg { width: 16px; height: 16px; }

.screen { flex: 1; display: flex; flex-direction: column; }

/* ---------- ボタン ---------- */
.btn-primary {
  display: block; width: 100%; min-height: 54px;
  border: none; border-radius: 12px; cursor: pointer;
  background: var(--shu); color: #fff;
  font-size: 17px; font-weight: 800; letter-spacing: 0.08em;
  box-shadow: 0 4px 0 var(--shu-dark), 0 10px 24px rgba(224, 64, 47, 0.28);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shu-dark), 0 4px 12px rgba(224, 64, 47, 0.25); }
.btn-ghost {
  display: block; width: 100%; min-height: 48px; border-radius: 12px; cursor: pointer;
  background: transparent; border: 1px solid var(--panel-line); color: var(--text);
  font-size: 15px; font-weight: 700;
}
.btn-paper {
  min-height: 52px; border-radius: 10px; cursor: pointer; width: 100%;
  border: 1.5px solid var(--ink); background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 800; letter-spacing: 0.04em;
}
.btn-paper.primary { background: var(--ink); color: var(--paper); }
.btn-paper:active { transform: translateY(2px); }

/* ---------- タイトル ---------- */
#screen-title { justify-content: center; gap: 20px; padding: 8px 0 12px; }
.marquee {
  font-family: var(--font-led); color: var(--led); font-size: 15px;
  background: var(--led-housing); border-radius: 8px; padding: 6px 0; overflow: hidden; white-space: nowrap;
  box-shadow: inset 0 0 0 1px #24314f;
  text-shadow: 0 0 6px var(--led-glow);
}
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 14s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

.seal-logo {
  align-self: center; position: relative;
  width: 188px; height: 188px; margin: 6px 0 2px;
  display: grid; place-items: center;
  color: var(--shu);
  transform: rotate(-4deg);
}
.seal-logo .ring { position: absolute; inset: 0; border: 7px solid var(--shu); border-radius: 18px; }
.seal-logo .ring::after { content: ""; position: absolute; inset: 7px; border: 2px solid var(--shu); border-radius: 10px; }
.seal-logo .ink {
  margin: 0; font-family: var(--font-paper); font-weight: 900; line-height: 1;
  display: flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: 8px;
}
.seal-logo .ink span { display: block; writing-mode: vertical-rl; text-orientation: upright; }
.seal-logo .ink .big { font-size: 58px; letter-spacing: 0.06em; }
/* 「年収番付」の4文字の印。右の列に「年収」、左の列に「番付」を同じ大きさで並べる */
.seal-logo .ink .small { font-size: 58px; letter-spacing: 0.06em; }
.seal-logo::after {
  /* 朱肉のかすれ */
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, var(--night-deep) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 64%, var(--night-deep) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 40% 86%, var(--night-deep) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 88% 14%, var(--night-deep) 0 1px, transparent 2px),
    radial-gradient(circle at 60% 34%, var(--night-deep) 0 1px, transparent 2px);
  opacity: 0.9;
}
.seal-logo.stamping { animation: logoStamp 0.42s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes logoStamp { 0% { transform: rotate(-4deg) scale(1); } 35% { transform: rotate(-4deg) scale(0.9); } 100% { transform: rotate(-4deg) scale(1); } }

.lead { margin: 0; font-size: 16px; line-height: 1.75; text-align: center; word-break: auto-phrase; }
.lead-sub { margin: -8px 0 0; font-size: 13px; color: var(--text-dim); text-align: center; }
.name-field { display: grid; gap: 6px; font-size: 13px; color: var(--text-dim); }
.name-field input {
  height: 48px; border-radius: 10px; border: 1px solid var(--panel-line);
  background: rgba(13, 19, 34, 0.8); color: var(--text); font-size: 17px; padding: 0 14px;
  font-family: var(--font-paper);
}
.name-field input::placeholder { color: #66728a; }
.records { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-dim); }
.records button { background: none; border: none; padding: 0; color: var(--led); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.foot-links { display: flex; justify-content: center; gap: 18px; font-size: 12px; padding: 8px 0 4px; }
.foot-links a { color: var(--text-dim); }

/* ---------- 入社ガチャ ---------- */
#screen-join { justify-content: center; gap: 18px; text-align: center; }
.join-title { margin: 0; font-size: 20px; font-weight: 800; }
.join-note { margin: -8px 0 0; font-size: 13px; color: var(--text-dim); }
.join-window {
  position: relative; height: 86px; overflow: hidden; border-radius: 12px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--paper-line), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.join-window::before, .join-window::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 2; pointer-events: none;
}
.join-window::before { left: 0; background: linear-gradient(90deg, var(--paper), rgba(244, 242, 236, 0)); }
.join-window::after { right: 0; background: linear-gradient(-90deg, var(--paper), rgba(244, 242, 236, 0)); }
.join-marker { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 132px; transform: translateX(-50%); border: 2px solid var(--shu); border-radius: 8px; z-index: 3; pointer-events: none; }
.join-strip { position: absolute; left: 0; top: 0; height: 100%; display: flex; will-change: transform; }
.join-cell {
  flex: 0 0 132px; height: 100%; display: grid; place-items: center;
  font-family: var(--font-paper); font-weight: 800; font-size: 20px; color: var(--ink);
}
.join-cell small { display: block; font-family: var(--font-ui); font-size: 11px; font-weight: 600; color: var(--ink-dim); }
.join-odds { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 12px; color: var(--text-dim); }
.join-result { min-height: 112px; display: grid; gap: 6px; justify-items: center; }
.join-result .co { font-family: var(--font-paper); font-size: 28px; font-weight: 800; }
.join-result .pay { font-family: var(--font-led); color: var(--led); font-size: 22px; text-shadow: 0 0 6px var(--led-glow); }

/* ---------- プレイ画面 ---------- */
#screen-main { gap: 10px; padding-bottom: 6px; }
.status { display: flex; align-items: center; gap: 12px; }
.avatar-wrap { position: relative; width: 60px; height: 60px; flex: 0 0 60px; border-radius: 50%; background: var(--panel); overflow: hidden; box-shadow: inset 0 0 0 2px var(--panel-line); }
.avatar-wrap img { width: 100%; height: 100%; display: block; }
.avatar-wrap.pop { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }
.status-text { flex: 1; min-width: 0; line-height: 1.3; }
.status-age { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.status-age small { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-left: 6px; }
.status-co { font-size: 13px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-badge {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 4px;
  background: var(--paper); color: var(--ink); font-family: var(--font-paper); font-weight: 800; font-size: 12px;
}
.zone-badge {
  font-family: var(--font-led); font-size: 13px; color: #1a1205; background: var(--led);
  padding: 2px 8px; border-radius: 4px; box-shadow: 0 0 12px var(--led-glow);
}

.led {
  position: relative; border-radius: var(--radius); background: var(--led-housing);
  padding: 8px 14px 8px; box-shadow: inset 0 0 0 1px #24314f, inset 0 4px 16px rgba(0, 0, 0, 0.55);
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; column-gap: 8px;
}
.led::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(rgba(13, 19, 34, 0) 0.9px, rgba(13, 19, 34, 0.5) 1.2px);
  background-size: 3px 3px;
}
.led-label { font-size: 12px; color: var(--steel-light); align-self: start; padding-top: 4px; }
.led-num {
  position: relative; justify-self: end;
  font-family: var(--font-led); font-size: 54px; line-height: 1.05; color: var(--led);
  text-shadow: 0 0 6px var(--led-glow), 0 0 20px rgba(255, 140, 30, 0.3);
  letter-spacing: 0.02em; white-space: nowrap;
}
.led-num .ghost { position: absolute; right: 0; top: 0; color: var(--led-ghost); text-shadow: none; }
.led-num .val { position: relative; }
.led-unit { font-family: var(--font-led); color: var(--led); font-size: 18px; padding-bottom: 8px; text-shadow: 0 0 6px var(--led-glow); }
.led-sub {
  grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--font-led); font-size: 14px; color: var(--led); opacity: 0.92; min-height: 20px;
}
.led-sub .delta.up { color: #9CFFB8; text-shadow: 0 0 6px rgba(80, 255, 150, 0.5); }
.led-sub .delta.down { color: #FF9C8A; text-shadow: 0 0 6px rgba(255, 110, 90, 0.5); }
.led.bump .led-num { animation: ledBump 0.45s ease; }
@keyframes ledBump { 30% { transform: scale(1.08); } 100% { transform: scale(1); } }

.ticker {
  height: 30px; border-radius: 8px; background: var(--led-housing); overflow: hidden;
  display: flex; align-items: center; padding: 0 12px; box-shadow: inset 0 0 0 1px #24314f;
  font-family: var(--font-led); font-size: 14px; color: var(--steel-light); white-space: nowrap;
}
.ticker span { overflow: hidden; text-overflow: ellipsis; }
.ticker.h1 { color: var(--text); box-shadow: inset 0 0 0 1px #4a5a80; }
.ticker.h2 { color: #FFE08A; box-shadow: inset 0 0 0 2px #D9A51C; }
.ticker.h3 { color: #fff; background: #4a1410; box-shadow: inset 0 0 0 2px var(--shu); animation: tickerHot 0.5s steps(2) infinite; }
.ticker.grade { color: var(--led); text-shadow: 0 0 6px var(--led-glow); }
@keyframes tickerHot { 50% { box-shadow: inset 0 0 0 2px #ff8a6a; } }

/* リール */
.reels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.reel { display: grid; gap: 4px; text-align: center; }
.reel-label { font-size: 12px; color: var(--text-dim); font-weight: 700; }
.reel-window {
  position: relative; height: 66px; overflow: hidden; border-radius: 9px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--paper-line), inset 0 8px 10px -8px rgba(0, 0, 0, 0.45), inset 0 -8px 10px -8px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.2s ease;
}
.reel-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.reel-strip.spinning { filter: blur(1.1px); }
.reel-cell { height: 66px; display: grid; place-items: center; }
.reel.reach .reel-window { box-shadow: inset 0 0 0 3px var(--led), 0 0 18px var(--led-glow); animation: reachPulse 0.45s ease-in-out infinite alternate; }
@keyframes reachPulse { to { box-shadow: inset 0 0 0 3px #fff3c4, 0 0 26px var(--led-glow); } }
.reel.landed-4 .reel-window, .reel.landed-5 .reel-window, .reel.landed-6 .reel-window { animation: cellHit 0.35s ease; }
@keyframes cellHit { 0% { transform: scale(1.12); } 100% { transform: scale(1); } }
.reel-tag {
  position: absolute; left: 50%; top: 2px; transform: translateX(-50%); z-index: 2;
  font-size: 10px; font-weight: 800; color: #fff; background: var(--shu); padding: 0 6px; border-radius: 3px; white-space: nowrap;
}
.reel-stat { font-family: var(--font-led); font-size: 15px; color: var(--text); line-height: 1.2; position: relative; }
.reel-bar { height: 4px; border-radius: 2px; background: #26324d; overflow: hidden; }
.reel-bar i { display: block; height: 100%; width: 0; background: var(--steel-light); transition: width 0.5s ease; }
.reel-gain {
  position: absolute; left: 50%; top: -4px; transform: translateX(-50%);
  font-family: var(--font-led); font-size: 15px; color: #9CFFB8; pointer-events: none;
  text-shadow: 0 0 6px rgba(80, 255, 150, 0.6); animation: gainUp 1.1s ease forwards;
}
@keyframes gainUp { 0% { opacity: 0; transform: translate(-50%, 6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -22px); } }

/* 評価のハンコ */
.stamp {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-paper); font-weight: 900; font-size: 25px; line-height: 1; color: #fff;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.stamp.t0 { background: transparent; color: #9AA3B2; box-shadow: inset 0 0 0 2px var(--t0); font-family: var(--font-ui); font-weight: 700; }
.stamp.t1 { background: var(--t1); }
.stamp.t2 { background: var(--t2); }
.stamp.t3 { background: var(--t3); }
.stamp.t4 { background: var(--t4); }
.stamp.t5 { background: var(--t5); font-size: 21px; color: #2a1d00; }
.stamp.t6 { background: var(--holo); font-size: 27px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.reel.landed-6 .stamp.t6 { animation: holo 1.2s linear infinite; background-size: 200% 200%; }
@keyframes holo { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.stamp.slam { animation: slam 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes slam { 0% { transform: rotate(-6deg) scale(1.9); opacity: 0.3; } 100% { transform: rotate(-6deg) scale(1); opacity: 1; } }
.reel.reviving .reel-window { animation: glitch 0.12s steps(2) 3; }
@keyframes glitch { 0% { transform: translateX(-2px); } 50% { transform: translateX(2px); } 100% { transform: translateX(0); } }

/* 回すボタン(判子) */
.spin-row { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 6px 0 2px; }
.btn-seal {
  position: relative; width: 108px; height: 108px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--shu); color: #fff; font-family: var(--font-paper); font-weight: 900; font-size: 30px; line-height: 1.1;
  box-shadow: 0 7px 0 var(--shu-dark), 0 14px 30px rgba(224, 64, 47, 0.32),
    inset 0 0 0 5px rgba(255, 255, 255, 0.2), inset 0 0 0 7px var(--shu), inset 0 0 0 9px rgba(255, 255, 255, 0.16);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.2s ease;
}
.btn-seal small { display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 700; opacity: 0.92; letter-spacing: 0.04em; }
.btn-seal:active, .btn-seal.pressed { transform: translateY(5px); box-shadow: 0 2px 0 var(--shu-dark), 0 6px 14px rgba(224, 64, 47, 0.3), inset 0 0 0 5px rgba(255, 255, 255, 0.2), inset 0 0 0 7px var(--shu), inset 0 0 0 9px rgba(255, 255, 255, 0.16); }
.btn-seal:disabled { filter: saturate(0.4) brightness(0.75); cursor: default; }
.btn-seal.ready::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(224, 64, 47, 0.6);
  animation: ripple 1.6s ease-out infinite;
}
@keyframes ripple { 0% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.side-note { width: 84px; font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.side-note.right { text-align: right; }
.side-note b { display: block; color: var(--text); font-size: 15px; }

/* 進み具合(タイムカード) */
.progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.progress li {
  height: 24px; border-radius: 3px; background: #1b2640; color: #5d6a85;
  font-family: var(--font-led); font-size: 11px; display: grid; place-items: center;
}
.progress li.done { background: #2a3a5e; color: var(--text-dim); }
.progress li.now { background: var(--led); color: #1a1205; box-shadow: 0 0 10px var(--led-glow); }
.progress li.event::after { content: ""; position: absolute; }

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--text-dim); min-height: 66px; }
.log li { display: flex; gap: 8px; align-items: baseline; }
.log li .a { font-family: var(--font-led); color: var(--steel-light); flex: 0 0 34px; }
.log li.good { color: var(--text); }
.log li.bad { color: #f0b3aa; }

/* ゾーン */
body.zone .led { box-shadow: inset 0 0 0 2px var(--led), 0 0 26px rgba(255, 178, 63, 0.35), inset 0 4px 16px rgba(0, 0, 0, 0.55); }
body.zone .reel-window { box-shadow: inset 0 0 0 2px rgba(255, 178, 63, 0.8), inset 0 8px 10px -8px rgba(0, 0, 0, 0.45); }
body.zone .btn-seal { background: #F06A2C; }

.callout {
  position: fixed; left: 50%; top: 38%; z-index: 40; transform: translate(-50%, -50%);
  font-family: var(--font-led); font-size: 44px; color: var(--led); white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 8px var(--led-glow), 0 0 30px rgba(255, 140, 30, 0.6);
  animation: callout 1.5s ease forwards;
}
.callout.white { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.7), 0 0 30px rgba(120, 170, 255, 0.6); }
@keyframes callout { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }

/* ---------- イベントの紙 ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(7, 11, 20, 0.62); padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  position: relative; width: 100%; max-width: 408px; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--paper); color: var(--ink); border-radius: 14px; padding: 18px 18px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: sheetIn 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-icon { width: 52px; height: 52px; flex: 0 0 52px; }
.sheet-kicker { font-size: 12px; color: var(--ink-dim); }
.sheet h2 { margin: 0; font-family: var(--font-paper); font-size: 21px; line-height: 1.35; font-weight: 800; word-break: auto-phrase; }
.sheet-body { margin: 12px 0 0; font-size: 15px; line-height: 1.75; }
.sheet-body p { margin: 0 0 6px; }
.odds { margin: 12px 0 0; }
.odds-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.odds-bar { margin-top: 6px; height: 10px; border-radius: 5px; background: #E3DFD4; overflow: hidden; display: flex; }
.odds-bar i { display: block; height: 100%; }
.odds-bar .up { background: var(--t3); }
.odds-bar .same { background: #B7B2A6; }
.odds-bar .down { background: var(--t4); }
.odds-bar .p { background: var(--shu); }
.odds-legend { display: flex; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--ink-dim); }
.odds-legend b { color: var(--ink); }
.real-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-dim); border-left: 3px solid var(--paper-line); padding-left: 8px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 16px; }
.sheet-actions.two { grid-template-columns: 1fr 1fr; }
.sheet-result { position: relative; margin-top: 12px; padding: 12px 92px 0 0; min-height: 96px; border-top: 1px dashed var(--paper-line); font-size: 15px; }
.pay-change { font-family: var(--font-led); font-size: 22px; margin-top: 4px; }
.pay-change .up { color: #158a52; }
.pay-change .down { color: #c13a2a; }
.gain-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gain-chips span { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: #E6E2D7; }

.big-stamp {
  position: absolute; right: 0; top: 8px; width: 84px; height: 84px; border-radius: 50%;
  border: 4px solid var(--shu); color: var(--shu); display: grid; place-items: center; text-align: center;
  font-family: var(--font-paper); font-weight: 900; font-size: 19px; line-height: 1.1;
  transform: rotate(-14deg); opacity: 0; pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--shu);
}
.big-stamp.blue { border-color: #3a5e9a; color: #3a5e9a; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px #3a5e9a; }
.big-stamp.on { animation: stampIn 0.34s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
@keyframes stampIn { 0% { transform: rotate(-14deg) scale(2.6); opacity: 0; } 55% { opacity: 1; } 100% { transform: rotate(-14deg) scale(1); opacity: 0.94; } }

/* 辞令(縦書き) */
.jirei {
  writing-mode: vertical-rl; font-family: var(--font-paper); font-size: 19px; line-height: 2.1; letter-spacing: 0.14em;
  height: 232px; margin: 10px auto 0; padding: 8px 10px; border: 1px solid var(--paper-line);
  background: repeating-linear-gradient(90deg, transparent 0 39px, rgba(0, 0, 0, 0.04) 39px 40px);
}
.jirei .h { font-size: 24px; font-weight: 900; margin-left: 14px; }
.jirei p { margin: 0; }
.jirei .t { font-weight: 800; }
.jirei .co { font-size: 15px; color: var(--ink-dim); }
.jirei .tcy { text-combine-upright: all; -webkit-text-combine: horizontal; }

/* ---------- フリーズ ---------- */
#freeze {
  position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-items: center;
  color: #fff; text-align: center; font-family: var(--font-paper); font-size: 22px; letter-spacing: 0.2em;
}
#freeze .line { opacity: 0; animation: fadeLine 1.2s ease forwards; }
@keyframes fadeLine { to { opacity: 1; } }

/* ---------- 結果 ---------- */
#screen-result { gap: 16px; padding: 4px 0 20px; }
.rarity-reveal {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(7, 11, 20, 0.92);
  font-family: var(--font-led); pointer-events: none;
}
.rarity-reveal b { font-size: 120px; line-height: 1; animation: rarityIn 0.7s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes rarityIn { 0% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.r-N { color: #B9C2CF; }
.r-R { color: #6FA3F0; }
.r-SR { color: #FF7A62; }
.r-SSR { color: #F2C84B; text-shadow: 0 0 20px rgba(242, 200, 75, 0.6); }
.r-UR { background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.35)); }

.meishi-wrap { perspective: 900px; }
.meishi {
  position: relative; aspect-ratio: 91 / 55; border-radius: 6px; overflow: hidden;
  background: var(--paper); color: var(--ink);
  padding: 14px 16px 12px 30px; display: grid; grid-template-rows: auto 1fr auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: cardIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes cardIn { from { transform: rotateY(-70deg) translateY(10px); opacity: 0; } }
.meishi .foil { position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: #B9C2CF; }
.meishi[data-rarity="R"] .foil { background: var(--t2); }
.meishi[data-rarity="SR"] .foil { background: var(--t4); }
.meishi[data-rarity="SSR"] .foil { background: linear-gradient(180deg, #F7DE8A, #C9941A 50%, #F7DE8A); }
.meishi[data-rarity="UR"] .foil { background: var(--holo); }
.meishi[data-rarity="UR"]::after, .meishi[data-rarity="SSR"]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 45%, transparent 60%);
  background-size: 250% 100%; animation: shine 2.8s ease-in-out infinite;
}
@keyframes shine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
.meishi-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; font-size: 12px; color: var(--ink-dim); }
.meishi-rarity { font-family: var(--font-led); font-size: 18px; color: var(--ink); line-height: 1; }
.meishi-mid { align-self: center; }
.meishi-pos { font-size: 12px; color: var(--ink-dim); }
.meishi-name { font-family: var(--font-paper); font-size: 30px; font-weight: 700; letter-spacing: 0.14em; line-height: 1.25; }
.meishi-bottom { display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.meishi-title { font-size: 12px; font-weight: 700; color: var(--ink); }
.meishi-pay { font-family: var(--font-led); font-size: 20px; color: var(--ink); white-space: nowrap; }
.meishi-pay small { font-size: 11px; color: var(--ink-dim); font-family: var(--font-ui); margin-right: 4px; }

.result-hero { text-align: center; display: grid; gap: 2px; }
.result-hero .label { font-size: 13px; color: var(--text-dim); }
.result-hero .big { font-family: var(--font-led); font-size: 46px; color: var(--led); line-height: 1.1; text-shadow: 0 0 8px var(--led-glow); }
.result-hero .rank { font-size: 17px; font-weight: 800; }
.result-hero .rank em { font-style: normal; font-family: var(--font-led); font-size: 26px; color: var(--led); margin: 0 2px; }
.result-hero .rank small { display: inline-block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 2px; }
.next-hint small { font-size: 12px; font-weight: 500; color: var(--text-dim); margin-left: 4px; }
.result-hero .src { font-size: 11px; color: var(--text-dim); }

.result-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { background: rgba(28, 41, 68, 0.75); border: 1px solid var(--panel-line); border-radius: var(--radius); padding: 10px 12px; }
.fact .k { font-size: 12px; color: var(--text-dim); }
.fact .v { font-size: 17px; font-weight: 800; line-height: 1.35; }
.fact .v small { font-size: 12px; font-weight: 600; color: var(--text-dim); }

.title-block { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.title-block .k { font-size: 12px; color: var(--ink-dim); }
.title-block .name { font-family: var(--font-paper); font-size: 22px; font-weight: 800; }
.title-block .comment { font-size: 14px; color: var(--ink-dim); margin-top: 2px; }
.title-block .new { position: absolute; right: 12px; top: 12px; font-size: 11px; font-weight: 800; color: #fff; background: var(--shu); padding: 2px 8px; border-radius: 4px; }
.title-block .also { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.title-block .also span { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: #E6E2D7; }
.title-block .also span.new-t { background: #FBE0DA; color: #9e2a1f; font-weight: 700; }

.section-h { margin: 6px 0 -6px; font-size: 14px; font-weight: 800; color: var(--text-dim); }
.radar-box { display: flex; justify-content: center; }
.radar { width: 100%; max-width: 300px; height: auto; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--panel-line); margin-left: 6px; }
.timeline li { position: relative; padding: 4px 0 8px 16px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.timeline li.good::before { background: var(--good); }
.timeline li.bad::before { background: var(--bad); }
.timeline .a { font-family: var(--font-led); color: var(--led); margin-right: 6px; }

.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share .x { grid-column: 1 / -1; background: #fff; color: #000; box-shadow: none; }
.share .x:active { transform: translateY(2px); }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: fadeIn 0.2s ease;
}

.cta { position: relative; background: #fff; color: var(--ink); border-radius: var(--radius); padding: 16px; }
.cta .pr { position: absolute; right: 12px; top: 12px; font-size: 11px; font-weight: 800; color: var(--ink-dim); border: 1px solid #c9c4b8; border-radius: 3px; padding: 0 5px; }
.cta h3 { margin: 0 44px 6px 0; font-size: 17px; line-height: 1.5; }
.cta p { margin: 0 0 12px; font-size: 14px; line-height: 1.7; color: #3e3e46; }
.cta .cta-btn {
  display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 10px;
  background: var(--t3); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; text-align: center; padding: 8px 12px;
}
.cta .cta-btn.disabled { background: #c9c4b8; color: #fff; pointer-events: none; }
.cta .cta-btn + .cta-btn { margin-top: 8px; }
.cta .fine { margin: 10px 0 0; font-size: 11px; color: var(--ink-dim); }

/* ---------- 称号コレクション ---------- */
.coll-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.coll-list li { display: grid; gap: 0; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--paper-line); }
.coll-list li b { font-family: var(--font-paper); font-size: 15px; }
.coll-list li span { font-size: 12px; color: var(--ink-dim); }
.coll-list li.locked { background: transparent; border-style: dashed; color: #9c978b; }
.coll-list li.locked b { color: #9c978b; }

/* ---------- 演出レイヤー ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 44; pointer-events: none; }
.flash { position: fixed; inset: 0; z-index: 43; pointer-events: none; opacity: 0; }
.flash.on { animation: flash 0.5s ease; }
@keyframes flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.shake { animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
.shake-big { animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) 2; }
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 1px, 0); }
  40%, 60% { transform: translate3d(5px, -1px, 0); }
}

/* ---------- 横に広い画面 ---------- */
@media (min-width: 720px) {
  .sheet-backdrop { align-items: center; }
}
@media (max-height: 700px) {
  .led-num { font-size: 46px; }
  .btn-seal { width: 96px; height: 96px; font-size: 27px; }
  .reel-window, .reel-cell { height: 58px; }
  .stamp { width: 42px; height: 42px; font-size: 22px; }
  .log { min-height: 0; }
  #screen-main { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee span { animation: none; padding-left: 0; }
}

/* ---------- 小さな知らせ(止まらないイベント) ---------- */
.notice {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 35; transform: translateX(-50%);
  width: min(408px, calc(100% - 32px)); display: flex; gap: 10px; align-items: center;
  background: var(--paper); color: var(--ink); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); border-left: 6px solid var(--steel);
  animation: noticeIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.notice.good { border-left-color: var(--t3); }
.notice.bad { border-left-color: var(--t4); }
.notice img { width: 40px; height: 40px; flex: 0 0 40px; }
.notice b { display: block; font-family: var(--font-paper); font-size: 16px; }
.notice span { display: block; font-size: 13px; color: var(--ink-dim); }
.notice.out { transition: opacity 0.3s ease, transform 0.3s ease; opacity: 0; transform: translate(-50%, 12px); }
@keyframes noticeIn { from { opacity: 0; transform: translate(-50%, 16px); } }

/* 確率バーの針 */
.odds-bar { position: relative; overflow: visible; }
.odds-bar > i:first-child { border-radius: 5px 0 0 5px; }
.odds-bar > i:last-of-type { border-radius: 0 5px 5px 0; }
.needle {
  position: absolute; top: -6px; left: 0; width: 4px; height: 22px; margin-left: -2px;
  background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--paper);
}

button, a, input { touch-action: manipulation; }

/* ---------- 予告のカットイン(届くメッセージ) ---------- */
.reels { position: relative; }
.cutin {
  position: absolute; left: -4px; right: -4px; top: 16px; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: #fff; color: var(--ink);
  border-left: 8px solid var(--cut, var(--t2));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  animation: cutIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.cutin.h1 { --cut: var(--t2); }
.cutin.h2 { --cut: var(--t4); }
.cutin.h3 { --cut: var(--t5); background: #FFF6DA; animation: cutIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.25), cutGlow 0.45s ease-in-out 0.32s 3 alternate; }
.cutin.h4 { border-left-color: transparent; border-image: var(--holo) 1; border-left-width: 8px; border-left-style: solid; }
.cutin .who {
  flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cut, var(--t2)); color: #fff; font-family: var(--font-paper); font-weight: 900; font-size: 18px;
}
.cutin.h4 .who { background: var(--holo); }
.cutin .from { font-size: 12px; color: var(--ink-dim); line-height: 1.3; }
.cutin .msg { font-family: var(--font-paper); font-weight: 800; font-size: 17px; line-height: 1.35; }
.cutin.out { animation: cutOut 0.22s ease forwards; }
@keyframes cutIn { from { transform: translateX(110%); } }
@keyframes cutOut { to { transform: translateX(-110%); opacity: 0; } }
@keyframes cutGlow { to { box-shadow: 0 0 0 3px var(--t5), 0 0 30px rgba(217, 165, 28, 0.6), 0 14px 34px rgba(0, 0, 0, 0.5); } }

.ticker.reach { color: #fff; background: #3a2a05; box-shadow: inset 0 0 0 2px var(--led); animation: tickerReach 0.4s steps(2) infinite; }
@keyframes tickerReach { 50% { box-shadow: inset 0 0 0 2px #fff3c4; } }

/* ---------- 到達の知らせ(年収◯万円突破・上位◯%入り) ---------- */
.ms-banner {
  position: fixed; left: 50%; top: 34%; z-index: 41; transform: translate(-50%, -50%);
  min-width: 260px; padding: 14px 22px; border-radius: 12px; text-align: center; pointer-events: none;
  background: var(--led-housing);
  box-shadow: inset 0 0 0 2px var(--led), 0 0 40px rgba(255, 178, 63, 0.45), 0 20px 50px rgba(0, 0, 0, 0.5);
  font-family: var(--font-led); color: var(--led); text-shadow: 0 0 8px var(--led-glow);
  animation: msIn 1.7s ease forwards;
}
.ms-banner .l1 { font-size: 30px; line-height: 1.2; white-space: nowrap; }
.ms-banner .l2 { font-size: 22px; letter-spacing: 0.3em; margin-top: 2px; }
@keyframes msIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  20% { transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -56%); }
}

/* ---------- 結果発表(レア度が段階的に上がる) ---------- */
.rarity-reveal { pointer-events: auto; align-content: center; gap: 4px; text-align: center; cursor: pointer; }
.rv-label { font-family: var(--font-ui); font-size: 14px; color: var(--text-dim); }
.rv-pay { font-family: var(--font-led); font-size: 52px; color: var(--led); text-shadow: 0 0 10px var(--led-glow); line-height: 1.1; }
.rv-pay small { font-size: 20px; margin-left: 4px; }
.rarity-reveal .rv-rarity { font-size: 120px; line-height: 1; margin-top: 14px; opacity: 0; animation: none; }
.rarity-reveal .rv-rarity.show { opacity: 1; animation: rarityIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
.rarity-reveal .rv-rarity.up { opacity: 1; animation: rankUp 0.42s cubic-bezier(0.2, 1.6, 0.4, 1); }
.rarity-reveal .rv-rarity.final { opacity: 1; animation: rankFinal 0.8s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes rankUp { 0% { transform: scale(1.5); filter: brightness(2.2); } 100% { transform: scale(1); filter: none; } }
@keyframes rankFinal { 0% { transform: scale(2.2) rotate(-6deg); filter: brightness(2.5); } 60% { transform: scale(0.94); } 100% { transform: scale(1); filter: none; } }
.rv-skip { position: absolute; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); font-family: var(--font-ui); font-size: 12px; color: var(--text-dim); }
#fx { z-index: 47; }
.flash { z-index: 46; }

/* 惜しい・次のレア度まで */
.near { display: inline-block; color: var(--shu); font-size: 20px; font-weight: 900; margin-right: 6px; animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.next-hint { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--led); }
.next-hint b { font-family: var(--font-led); font-size: 18px; margin: 0 2px; }

/* ---------- 伸び幅のハンコ(±0〜+20) ---------- */
.stamp { font-family: var(--font-ui); font-weight: 900; font-size: 19px; letter-spacing: -0.02em; }
.stamp.t0 { font-family: var(--font-ui); font-size: 16px; }
.stamp.t5 { font-size: 19px; color: #2a1d00; }
.stamp.t6 { font-size: 20px; }

/* ---------- 能力のランク(G〜S) ---------- */
.reel-stat { display: flex; justify-content: center; align-items: center; gap: 4px; }
.rk {
  display: inline-block; min-width: 18px; padding: 0 4px; border-radius: 4px;
  font-family: var(--font-ui); font-weight: 900; font-size: 13px; line-height: 18px; text-align: center;
  color: #fff; background: var(--rk, #59627A);
}
.rk-G { --rk: #59627A; }
.rk-F { --rk: #7C8799; }
.rk-E { --rk: #3C7BD9; }
.rk-D { --rk: #23A26B; }
.rk-C { --rk: #7FA82A; }
.rk-B { --rk: #D98A1C; }
.rk-A { --rk: #E0402F; }
.rk-S { background: var(--holo); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.rk.rankup { animation: rankPop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1); box-shadow: 0 0 12px rgba(255, 255, 255, 0.6); }
@keyframes rankPop { 0% { transform: scale(2); filter: brightness(2.2); } 100% { transform: scale(1); filter: none; } }

/* ---------- ゾーンの継続率と継続抽選 ---------- */
.ms-banner.rate .l1 { font-size: 52px; line-height: 1.1; }
.ms-banner.rate .l2 { letter-spacing: 0.2em; }
.ms-banner.rate.lv0 .l1 { color: #E9EDF4; text-shadow: 0 0 8px rgba(255, 255, 255, 0.5); }
.ms-banner.rate.lv1 .l1 { color: #6FE3A2; text-shadow: 0 0 10px rgba(80, 255, 150, 0.6); }
.ms-banner.rate.lv2 .l1 { color: #FF7A62; text-shadow: 0 0 12px rgba(255, 100, 80, 0.7); }
.ms-banner.rate.lv3 .l1 { background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4)); }
.ms-banner.rate.lv0, .ms-banner.rate.lv1, .ms-banner.rate.lv2, .ms-banner.rate.lv3 { animation: rankFinalBanner 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) !important; }
@keyframes rankFinalBanner { 0% { transform: translate(-50%, -50%) scale(1.3); } 100% { transform: translate(-50%, -50%) scale(1); } }
.ms-banner.judge .l1 { font-size: 28px; min-width: 8em; }
.ms-banner.judge .l2 { font-size: 14px; letter-spacing: 0.05em; }
.zone-badge { white-space: nowrap; font-size: 12px; }


/* ---------- コース選択(入社ガチャのあとに1回だけ) ---------- */
.course-pick { display: grid; gap: 10px; }
.course-q { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; word-break: auto-phrase; }
.course-btn { min-height: 62px; }
.course-btn small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; opacity: 0.85; }

/* ---------- 止まらないイベントのカード ---------- */
.stage { position: relative; display: grid; gap: 10px; }
.evpanel {
  position: absolute; left: -6px; right: -6px; top: 0; z-index: 9; min-height: 100%;
  background: var(--paper); color: var(--ink); border-radius: 14px; padding: 14px 16px 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); cursor: pointer;
  animation: panelIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.evpanel.big { box-shadow: 0 0 0 3px var(--t5), 0 0 40px rgba(217, 165, 28, 0.45), 0 18px 50px rgba(0, 0, 0, 0.55); }
.evpanel.out { animation: panelOut 0.2s ease forwards; }
@keyframes panelIn { from { transform: translateY(14px) scale(0.98); opacity: 0; } }
@keyframes panelOut { to { transform: translateY(-10px); opacity: 0; } }
.evpanel .sheet-head h2 { font-size: 19px; word-break: auto-phrase; }
.evpanel .sheet-icon { width: 44px; height: 44px; flex-basis: 44px; }
.evpanel .ev-body { margin-top: 6px; font-size: 14px; line-height: 1.6; }
.evpanel .ev-body p { margin: 0 0 4px; }
.evpanel .odds { margin-top: 8px; }
.evpanel .real-note { margin-top: 6px; font-size: 11px; }
.evpanel .ev-result:not(:empty) { position: relative; margin-top: 10px; padding: 10px 84px 0 0; min-height: 84px; border-top: 1px dashed var(--paper-line); font-size: 15px; }
.evpanel .ev-result .big-stamp { width: 74px; height: 74px; font-size: 17px; top: 6px; }
.evpanel .ev-tap { position: absolute; right: 12px; bottom: 6px; font-size: 10px; color: var(--ink-dim); opacity: 0.7; }
.evpanel .jirei { height: 168px; font-size: 16px; margin-top: 6px; }
.evpanel .jirei .h { font-size: 20px; }

/* 演出中の回すボタン = 早送り */
.btn-seal.busy { filter: saturate(0.65) brightness(0.88); }
.btn-seal.busy small { letter-spacing: 0.12em; }


/* ---------- リール: 回り続けて、1本ずつ止まる ---------- */
.reel-strip.spinning { animation: reelLoop 0.3s linear infinite; filter: blur(1.1px); }
.reel.reach .reel-strip.spinning { animation-duration: 0.9s; filter: blur(0.6px); }
@keyframes reelLoop { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.reel-window.land .reel-strip { animation: reelLand 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes reelLand { 0% { transform: translateY(-22%); } 100% { transform: translateY(0); } }
.reel-window.dying { filter: grayscale(1) brightness(0.55); animation: glitch 0.1s steps(2) 6; }

/* ---------- 大きな文字 ---------- */
.word { position: fixed; left: 50%; top: 36%; z-index: 43; transform: translate(-50%, -50%); text-align: center; pointer-events: none; animation: wordIn 1.9s ease forwards; }
.word .w {
  font-family: var(--font-ui); font-weight: 900; font-size: clamp(46px, 17vw, 76px); line-height: 1.02; letter-spacing: 0.02em; white-space: nowrap;
  filter: drop-shadow(3px 0 0 #2a0500) drop-shadow(-3px 0 0 #2a0500) drop-shadow(0 3px 0 #2a0500) drop-shadow(0 -3px 0 #2a0500) drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55));
}
.word.gold .w { background: linear-gradient(180deg, #FFF6C9 0%, #FFD24A 45%, #D9A51C 56%, #FFE27A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.word.rainbow .w { background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: holo 1.2s linear infinite; }
.word.white .w { color: #fff; }
.word .ws { margin-top: 8px; font-weight: 800; font-size: 16px; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85); letter-spacing: 0.04em; white-space: nowrap; }
@keyframes wordIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(0.92); }
  16% { transform: translate(-50%, -50%) scale(1); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1); }
}

/* ---------- 画面のふちが光る ---------- */
#app.glow-gold { box-shadow: inset 0 0 0 3px rgba(255, 210, 74, 0.95), inset 0 0 46px rgba(255, 190, 60, 0.45); animation: glowPulse 0.8s ease-in-out infinite alternate; }
#app.glow-rainbow { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.95), inset 0 0 56px rgba(170, 120, 255, 0.5), inset 0 0 110px rgba(80, 220, 200, 0.35); animation: glowPulse 0.5s ease-in-out infinite alternate; }
@keyframes glowPulse { to { filter: brightness(1.08); } }

/* ---------- テレビが切れる(復活の前) ---------- */
.crt-off { position: fixed; inset: 0; z-index: 48; background: #000; pointer-events: none; }
.crt-off::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: #fff; box-shadow: 0 0 24px #fff; animation: crt 0.55s ease forwards; }
@keyframes crt { 0% { transform: scaleX(1); opacity: 1; } 70% { transform: scaleX(0.02); opacity: 1; } 100% { transform: scaleX(0); opacity: 0; } }

/* ---------- キャラのカットイン ---------- */
.chara-cut {
  /* 帯はゲームの列(#app、最大440px)の幅にそろえる。広い画面で画面いっぱいに伸びないように */
  position: fixed; left: max(0px, calc(50% - 220px)); right: max(0px, calc(50% - 220px)); top: 28%; z-index: 42; display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 16, 30, 0.97), rgba(15, 24, 43, 0.9));
  border-top: 3px solid var(--cc, #3C7BD9); border-bottom: 3px solid var(--cc, #3C7BD9);
  animation: ccIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.chara-cut img { flex: 0 0 104px; width: 104px; height: 104px; border-radius: 14px; background: var(--cc, #3C7BD9); }
.chara-cut .cc-name { font-weight: 900; font-size: 15px; color: var(--cc, #3C7BD9); letter-spacing: 0.06em; }
.chara-cut .cc-line { font-family: var(--font-paper); font-weight: 800; font-size: 22px; color: #fff; line-height: 1.35; word-break: auto-phrase; }
.chara-cut.lv0 { --cc: #5AA0FF; }
.chara-cut.lv1 { --cc: #3FD08A; }
.chara-cut.lv2 { --cc: #FF6A55; }
.chara-cut.lv3 { --cc: #FFD24A; }
.chara-cut.lv4 { --cc: #FFFFFF; }
.chara-cut.lv4 img { background: var(--holo); }
.chara-cut.out { animation: ccOut 0.25s ease forwards; }
@keyframes ccIn { from { transform: translateX(100%); } }
@keyframes ccOut { to { transform: translateX(-100%); opacity: 0; } }

/* だれが来るかのルーレット */
.chara-roulette {
  position: fixed; left: 50%; top: 36%; z-index: 42; transform: translate(-50%, -50%);
  width: 220px; padding: 14px; border-radius: 16px; text-align: center; pointer-events: none;
  background: var(--led-housing); box-shadow: inset 0 0 0 2px var(--led), 0 0 40px rgba(255, 178, 63, 0.4);
}
.chara-roulette img { display: block; width: 120px; height: 120px; margin: 0 auto 6px; }
.chara-roulette .cr-name { font-weight: 900; font-size: 18px; color: #fff; }
.chara-roulette .cr-rate { font-family: var(--font-led); font-size: 26px; color: var(--led); min-height: 32px; }
.chara-roulette.land { animation: crLand 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
.chara-roulette.lv3 { box-shadow: inset 0 0 0 3px #FFD24A, 0 0 60px rgba(255, 210, 74, 0.6); }
.chara-roulette.lv4 { box-shadow: inset 0 0 0 3px #fff, 0 0 70px rgba(255, 255, 255, 0.6); }
@keyframes crLand { 0% { transform: translate(-50%, -50%) scale(1.25); } 100% { transform: translate(-50%, -50%) scale(1); } }

/* 予告の顔、継続抽選の顔 */
.cutin .who-img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--cut, var(--t2)); }
.judge-face { width: 28px; height: 28px; border-radius: 50%; vertical-align: middle; margin-right: 6px; background: #1C2944; }

/* LEDの順位 */
.led-sub b { font-weight: 400; font-size: 17px; }
.led-sub .rk-up { color: #9CFFB8; margin-left: 4px; text-shadow: 0 0 6px rgba(80, 255, 150, 0.6); }
.led-sub .rank-flash { animation: rankFlash 0.6s ease; }
#led-top.rank-flash { animation: rankFlash 0.6s ease; }
@keyframes rankFlash { 0% { filter: brightness(2.2); transform: scale(1.08); } 100% { filter: none; transform: none; } }

/* 結果: 隠し特性 */
.traits { background: rgba(28, 41, 68, 0.75); border: 1px solid var(--panel-line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; animation: cardIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.2s both; }
.traits .k { font-size: 12px; color: var(--text-dim); }
.trait { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.trait .tk { font-size: 12px; color: var(--text-dim); flex: 0 0 7.5em; }
.trait .tv { font-weight: 800; font-size: 16px; color: var(--led); }
.trait small { font-size: 12px; color: var(--text-dim); }
.met-row { display: inline-flex; gap: 6px; }
.met-row img { width: 36px; height: 36px; border-radius: 50%; background: #1C2944; }
.met-row .unk { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: #141d33; color: #4b5873; font-weight: 800; }

/* 図鑑のキャラ */
.coll-chars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.coll-chars figure { margin: 0; text-align: center; font-size: 10px; color: var(--ink-dim); }
.coll-chars img { width: 100%; aspect-ratio: 1; border-radius: 10px; background: #fff; border: 1px solid var(--paper-line); }
.coll-chars .locked span { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 10px; border: 1px dashed var(--paper-line); color: #9c978b; font-weight: 800; font-size: 18px; }

.status-age { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-badge { flex: 0 0 auto; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 生成した絵 ---------- */
.avatar-wrap { background: radial-gradient(circle at 50% 40%, #2B3A5C, #1C2944); }
.avatar-wrap img { object-fit: cover; }
.result-portrait { display: block; width: 168px; height: 168px; margin: 0 auto -6px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5)); animation: cardIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
.chara-cut img { object-fit: cover; }
/* 絵はドット絵。拡大・縮小でぼかさない */
.avatar-wrap img, .chara-cut img, .chara-roulette img, .judge-face, .cutin .who-img, .met-row img,
.coll-chars img, .result-portrait, .sheet-icon, .notice img { image-rendering: pixelated; }

/* ---------- 赤・金・虹: その能力だけの大きなスロット ---------- */
.reel { transition: opacity 0.18s ease, filter 0.18s ease; }
.reels.si-focus .reel:not(.si-target) { opacity: 0.38; filter: saturate(0.4); }
.reel.si-target .reel-window { box-shadow: inset 0 0 0 3px #fff, 0 0 16px rgba(255, 255, 255, 0.55); }
.slotin { position: fixed; z-index: 49; transform: translate(-50%, -50%) scale(var(--s, 1)); pointer-events: none; }
.si-box {
  width: 176px; padding: 8px 10px 10px; border-radius: 16px; text-align: center;
  background: var(--led-housing);
  box-shadow: inset 0 0 0 2px #3A4A6E, 0 16px 36px rgba(0, 0, 0, 0.6);
  animation: siIn 0.22s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.si-label { font-weight: 900; font-size: 15px; line-height: 20px; color: #fff; letter-spacing: 0.08em; margin-bottom: 6px; }
.si-window {
  position: relative; height: 124px; overflow: hidden; border-radius: 12px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--paper-line);
}
/* 上下の端は暗く(筒が回っているように) */
.si-window::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 24, 43, 0.55) 0%, rgba(15, 24, 43, 0) 22%, rgba(15, 24, 43, 0) 78%, rgba(15, 24, 43, 0.55) 100%);
}
.si-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.si-strip.fast { filter: blur(1.8px); }
.si-cell { height: 92px; display: grid; place-items: center; }
.si-cell .stamp, .stamp.si-fly { width: 100px; height: 80px; border-radius: 16px; font-size: 46px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35); }
.si-cell .stamp.t0 { font-size: 34px; box-shadow: inset 0 0 0 3px var(--t0); }
.si-cell .stamp.t5, .stamp.si-fly.t5 { font-size: 46px; }
.si-cell .stamp.t6, .stamp.si-fly.t6 { font-size: 46px; background-size: 200% 200%; animation: holo 1.2s linear infinite; }
.si-cell .stamp.slam { animation: siSlam 0.34s cubic-bezier(0.3, 1.6, 0.5, 1); }
.si-cell .stamp.t6.slam { animation: siSlam 0.34s cubic-bezier(0.3, 1.6, 0.5, 1), holo 1.2s linear infinite; }
.stamp.si-fly { position: fixed; z-index: 49; margin: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(-6deg) scale(var(--s, 1)); }
@keyframes siIn { from { transform: scale(0.6); opacity: 0; } }
@keyframes siSlam { 0% { transform: rotate(-6deg) scale(1.7); filter: brightness(1.8); } 100% { transform: rotate(-6deg) scale(1); filter: none; } }
/* いったん止まったとき(すべる前) */
.slotin.halt .si-box { animation: siHalt 0.16s ease; }
@keyframes siHalt { 50% { transform: translateY(3px); } }
/* 決まったとき: 枠がその色に光る */
.slotin.hit .si-box { animation: siHit 0.36s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes siHit { 0% { transform: scale(1.14); } 100% { transform: scale(1); } }
.slotin.hit-4 .si-box { box-shadow: inset 0 0 0 3px var(--t4), 0 0 34px rgba(224, 64, 47, 0.65), 0 16px 36px rgba(0, 0, 0, 0.6); }
.slotin.hit-5 .si-box { box-shadow: inset 0 0 0 3px #FFD24A, 0 0 48px rgba(255, 210, 74, 0.75), 0 16px 36px rgba(0, 0, 0, 0.6); }
.slotin.hit-6 .si-box { box-shadow: inset 0 0 0 3px #fff, 0 0 60px rgba(199, 125, 255, 0.75), 0 0 110px rgba(74, 224, 181, 0.5); }
.slotin.hit-4 .si-label { color: #FF8A78; }
.slotin.hit-5 .si-label { color: #FFD24A; }
.slotin.hit-6 .si-label { background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: holo 1.2s linear infinite; }
/* 暗闇の中のスロット(虹) */
.slotin.in-dark .si-box { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 0 50px rgba(255, 255, 255, 0.18); }
.slotin.out .si-box { transition: opacity 0.16s ease; opacity: 0; }
/* 暗転(虹のときだけ)。紙吹雪(#fx)より上、大きなスロットより下 */
.si-dark { position: fixed; inset: 0; z-index: 48; background: #000; opacity: 0; transition: opacity 0.12s linear; pointer-events: none; }
.si-dark.on { opacity: 0.95; }
.si-dark.on.off { opacity: 0; transition: opacity 0.25s ease; }

/* ---------- 分かれ道(人生で3回だけ、自分で選ぶ) ---------- */
.evpanel.fork, .evpanel.fork-done { box-shadow: 0 0 0 3px var(--t5), 0 0 44px rgba(217, 165, 28, 0.5), 0 18px 50px rgba(0, 0, 0, 0.55); }
.evpanel.fork { cursor: default; padding-bottom: 14px; }
.fork-kicker { font-size: 12px; font-weight: 800; color: #9A6B00; letter-spacing: 0.04em; }
.fork-title { margin: 2px 0 8px; font-family: var(--font-paper); font-weight: 900; font-size: 21px; line-height: 1.35; word-break: auto-phrase; }
.fork-say {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--paper-line);
  font-weight: 700; font-size: 14px; line-height: 1.45; word-break: auto-phrase;
}
.fork-say img { flex: 0 0 32px; width: 32px; height: 32px; image-rendering: pixelated; }
.fork-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.fcard {
  appearance: none; display: grid; justify-items: center; align-content: start; gap: 3px;
  padding: 10px 8px; border: 2px solid var(--paper-line); border-radius: 12px; background: #fff;
  color: var(--ink); font: inherit; text-align: center; cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, opacity 0.2s ease, box-shadow 0.12s ease;
}
.fcard img { width: 40px; height: 40px; image-rendering: pixelated; }
.fcard b { font-size: 17px; font-weight: 900; }
.fcard small { font-size: 11px; line-height: 1.45; color: var(--ink-dim); word-break: auto-phrase; }
.fcard .fc-odds { display: grid; gap: 3px; width: 100%; margin-top: 4px; }
.fcard .fc-odds .odds-bar { margin: 0; height: 8px; }
.fcard .fc-legend { font-size: 11px; color: var(--ink-dim); white-space: nowrap; letter-spacing: -0.02em; }
.fcard .fc-legend b { color: var(--ink); }
.fcard .fc-src { font-size: 10px; color: var(--ink-dim); opacity: 0.85; }
.fcard .fc-gain { margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--t3); }
.fcard:focus-visible, .fork-go:focus-visible { outline: 3px solid var(--led); outline-offset: 2px; }
.fcard.sel { border-color: var(--shu); box-shadow: 0 0 0 3px rgba(224, 64, 47, 0.22), 0 8px 18px rgba(0, 0, 0, 0.12); transform: translateY(-3px); }
.fcard.unsel { opacity: 0.6; }
.fcard.picked { border-color: var(--shu); transform: translateY(-3px); animation: fcPick 0.36s cubic-bezier(0.3, 1.6, 0.5, 1); }
.fcard.lost { opacity: 0.25; filter: grayscale(1); transform: scale(0.96); }
@keyframes fcPick { 0% { transform: translateY(-3px) scale(1.08); } 100% { transform: translateY(-3px) scale(1); } }
.fork-go {
  display: block; width: 100%; margin-top: 10px; padding: 12px; border: none; border-radius: 12px;
  background: var(--shu); color: #fff; font: inherit; font-weight: 900; font-size: 16px; cursor: pointer;
  box-shadow: 0 4px 0 var(--shu-dark);
}
.fork-go:disabled { background: #CFC9BC; box-shadow: none; cursor: default; }
.fork-go.ready { animation: pop 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.evpanel.fork .real-note { margin-top: 8px; }
/* 進み具合の帯: 分かれ道のある年に、金の印 */
.progress li { position: relative; }
.progress li[data-fork]::before {
  content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px;
  background: var(--led); transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 6px var(--led-glow);
}

/* ---------- 人生の設定(1〜6): 示唆のトロフィー、確定した設定のバッジ、結果での発表 ---------- */
.trophy-banner {
  /* 紙吹雪(#fx は 47)より前に出して、色と「設定◯以上確定」を読めるようにする */
  position: fixed; left: 50%; top: 36%; z-index: 48; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 14px; min-width: 272px; padding: 14px 20px; border-radius: 14px; pointer-events: none;
  background: var(--led-housing);
  box-shadow: inset 0 0 0 2px var(--tb, #E8A877), 0 0 40px var(--tbg, rgba(192, 122, 67, 0.45)), 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: tbIn 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.trophy-banner.out { animation: tbOut 0.25s ease forwards; }
.trophy-banner .trophy-svg { width: 66px; height: 72px; flex: 0 0 66px; }
.tb-k { font-size: 12px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.06em; }
.tb-name { font-family: var(--font-paper); font-weight: 900; font-size: 20px; color: #fff; line-height: 1.3; white-space: nowrap; }
.tb-sure { font-family: var(--font-led); font-size: 20px; color: var(--tb); text-shadow: 0 0 8px var(--tbg); white-space: nowrap; }
.trophy-banner.t0 { --tb: #E8A877; --tbg: rgba(192, 122, 67, 0.45); }
.trophy-banner.t1 { --tb: #E6ECF2; --tbg: rgba(200, 210, 220, 0.45); }
.trophy-banner.t2 { --tb: #FFD24A; --tbg: rgba(255, 210, 74, 0.55); }
.trophy-banner.t3 { --tb: #DCEBFF; --tbg: rgba(180, 210, 255, 0.65); }
.trophy-banner.t4 { --tb: #FFFFFF; --tbg: rgba(199, 125, 255, 0.65); }
.trophy-banner.t4 .tb-sure {
  background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; animation: holo 1.2s linear infinite;
}
@keyframes tbIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes tbOut { to { opacity: 0; } }
.set-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; vertical-align: middle; white-space: nowrap;
  font-family: var(--font-ui); font-size: 11px; font-weight: 800; color: #1a1205; background: var(--led);
}
.set-badge.s5 { background: #DCEBFF; }
.set-badge.s6 { background: var(--holo); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.set-badge.pop { animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.rv-set { margin-top: 18px; display: grid; justify-items: center; gap: 2px; }
.rv-set-k { font-family: var(--font-ui); font-size: 13px; color: var(--text-dim); }
.rv-set-v { font-family: var(--font-led); font-size: 72px; line-height: 1; color: #fff; }
.rv-set-v.land { animation: rankFinal 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
.rv-set-v.s4 { color: #FFD24A; text-shadow: 0 0 12px rgba(255, 210, 74, 0.7); }
.rv-set-v.s5 { color: #DCEBFF; text-shadow: 0 0 14px rgba(180, 210, 255, 0.85); }
.rv-set-v.s6 {
  background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rankFinal 0.6s cubic-bezier(0.2, 1.4, 0.4, 1), holo 1.2s linear infinite;
}
.traits .set-v { font-family: var(--font-led); font-size: 18px; }
.traits .set-v.s4 { color: #FFD24A; }
.traits .set-v.s5 { color: #DCEBFF; }
.traits .set-v.s6 { background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: holo 1.2s linear infinite; }

/* ---------- 転職・独立: 期待度の色(青・緑・赤・金・虹)と、内定通知、提示年収のスロット ---------- */
.kitai-pill {
  display: inline-block; padding: 1px 9px; border-radius: 999px; vertical-align: middle;
  font-family: var(--font-ui); font-weight: 900; font-size: 12px; color: #fff; background: var(--kc, #3C7BD9);
}
.kitai-pill.k0, .pr-letter.k0 { --kc: #3C7BD9; }
.kitai-pill.k1, .pr-letter.k1 { --kc: #23A26B; }
.kitai-pill.k2, .pr-letter.k2 { --kc: #E0402F; }
.kitai-pill.k3, .pr-letter.k3 { --kc: #D9A51C; }
.kitai-pill.k3 { color: #2a1d00; }
.kitai-pill.k4 { background: var(--holo); background-size: 200% 100%; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); animation: holo 1.2s linear infinite; }
.kitai-pill.up { animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.kitai-pill.k4.up { animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1), holo 1.2s linear infinite; }
.fcard .fc-kitai { display: grid; justify-items: center; gap: 3px; width: 100%; margin-top: 4px; }
.fcard .fc-k-label { font-size: 11px; color: var(--ink-dim); }
.fcard .fc-kitai .kitai-pill { font-size: 15px; padding: 3px 14px; }
.pay-reveal { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.pr-letter {
  position: relative; flex: 0 0 74px; height: 92px; border-radius: 6px; background: #fff; display: grid; place-items: center;
  box-shadow: inset 0 0 0 3px var(--kc, #3C7BD9), 0 6px 14px rgba(0, 0, 0, 0.15);
}
.pr-letter.k4 { box-shadow: inset 0 0 0 3px #C77DFF, 0 0 18px rgba(199, 125, 255, 0.6); }
.pr-seal {
  width: 46px; height: 46px; margin-bottom: 12px; border-radius: 50%; display: grid; place-items: center; transform: rotate(-8deg);
  font-family: var(--font-paper); font-weight: 900; font-size: 15px; color: #fff; background: var(--kc, #3C7BD9);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}
.pr-letter.k3 .pr-seal { color: #2a1d00; }
.pr-letter.k4 .pr-seal { background: var(--holo); background-size: 200% 200%; animation: holo 1.2s linear infinite; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.pr-doc { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 10px; color: var(--ink-dim); }
.pr-letter.up { animation: prUp 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes prUp { 0% { transform: scale(1.18); filter: brightness(1.8); } 100% { transform: scale(1); filter: none; } }
.pr-right { flex: 1; min-width: 0; display: grid; gap: 5px; }
.pr-kitai { font-size: 12px; font-weight: 700; color: var(--ink-dim); }
.pr-drum { position: relative; height: 56px; overflow: hidden; border-radius: 10px; background: var(--led-housing); box-shadow: inset 0 0 0 2px #2B3A5C; }
.pr-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.pr-strip.fast { filter: blur(1.4px); }
.pr-cell { height: 56px; display: grid; place-items: center; grid-auto-flow: column; justify-content: center; align-items: baseline; font-family: var(--font-led); font-size: 32px; line-height: 56px; color: var(--led); text-shadow: 0 0 8px var(--led-glow); }
.pr-cell small { font-size: 14px; margin-left: 3px; }
.pr-cell.up { color: #9CFFB8; text-shadow: 0 0 10px rgba(80, 255, 150, 0.7); }
.pr-cell.down { color: #FF8A78; text-shadow: 0 0 10px rgba(255, 100, 80, 0.6); }
.pr-cell.same { color: #E9EDF4; text-shadow: none; }
.pr-drum.land { animation: cellHit 0.35s ease; }
.pr-drum.land.up { box-shadow: inset 0 0 0 2px #3FD08A, 0 0 18px rgba(63, 208, 138, 0.5); }
.pr-drum.land.down { box-shadow: inset 0 0 0 2px #FF7A6B; }
.pr-diff { min-height: 20px; text-align: right; font-family: var(--font-led); font-size: 18px; }
.pr-diff.up { color: var(--t3); }
.pr-diff.down { color: var(--t4); }
.pr-diff.same { color: var(--ink-dim); }

/* ---------- 昇進の判定: 「◯◯に昇進/見送り」の文字のスロット ---------- */
.pr-cell.pc-word { font-size: 26px; }
.pr-cell.pc-word small { font-size: 13px; }
.pr-cell.pc-word.yes { color: #FFD24A; text-shadow: 0 0 8px rgba(255, 210, 74, 0.6); }
.pr-cell.pc-word.no { color: #8D99AB; text-shadow: none; }
.pr-drum.halt { animation: siHalt 0.16s ease; }
.promo-reveal .pr-drum.land.up { box-shadow: inset 0 0 0 2px #FFD24A, 0 0 18px rgba(255, 210, 74, 0.55); }
.pr-drum.land.no { box-shadow: inset 0 0 0 2px #5E6B7D; }

/* ---------- 希望の職種と配属ガチャ ---------- */
#screen-jobpick { justify-content: center; gap: 16px; text-align: center; }
#screen-jobpick .join-note { margin: -6px 0 0; line-height: 1.6; word-break: auto-phrase; }
.job-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.job-btn {
  appearance: none; display: grid; gap: 2px; align-content: center; min-height: 64px; padding: 8px 4px; border-radius: 12px;
  border: 2px solid var(--panel-line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-align: center;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.job-btn b { font-size: 14px; font-weight: 900; line-height: 1.25; word-break: auto-phrase; }
.job-btn small { font-size: 10px; color: var(--text-dim); line-height: 1.3; word-break: auto-phrase; }
.job-btn:hover { border-color: var(--led); }
.job-btn:active { transform: scale(0.97); }
.job-btn:focus-visible { outline: 3px solid var(--led); outline-offset: 2px; }
.job-btn.last { border-color: var(--led); box-shadow: 0 0 0 1px var(--led) inset; }
.haizoku { display: grid; gap: 8px; }
.hz-title { font-size: 16px; font-weight: 800; }
.hz-title small { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.hz-window { height: 72px; }
.hz-window .join-cell { font-size: 17px; }
.join-cell.hope small { color: var(--shu); font-weight: 800; }
.hz-result { min-height: 46px; display: grid; gap: 2px; justify-items: center; }
.hz-ok { font-family: var(--font-paper); font-weight: 900; font-size: 20px; color: var(--led); text-shadow: 0 0 8px var(--led-glow); animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.hz-ng { font-family: var(--font-paper); font-weight: 900; font-size: 18px; color: #9FB4CF; animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.hz-sub { font-size: 12px; color: var(--text-dim); }

/* ---------- 先読み(保留): 年齢の帯の下に、次の2回ぶんの予告の色(青→赤→金) ---------- */
.progress li[data-hold]::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 8px; height: 8px; border-radius: 50%;
  transform: translateX(-50%); background: var(--hc); box-shadow: 0 0 6px var(--hc);
}
.progress li[data-hold="1"] { --hc: #3C7BD9; }
.progress li[data-hold="2"] { --hc: #E0402F; }
.progress li[data-hold="3"] { --hc: #FFD24A; }
.progress li[data-hold="3"]::after { animation: holdHot 0.5s steps(2) infinite; }
.progress li.hold-up::after { animation: holdUp 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes holdHot { 50% { box-shadow: 0 0 12px 2px var(--hc); } }
@keyframes holdUp { 0% { transform: translateX(-50%) scale(2.6); filter: brightness(2); } 100% { transform: translateX(-50%) scale(1); filter: none; } }

/* ---------- 擬似連: リールがいったん「次」で止まる ---------- */
.stamp.tnext { background: #fff; color: var(--shu); box-shadow: inset 0 0 0 3px var(--shu); font-family: var(--font-paper); font-weight: 900; font-size: 24px; }

/* ---------- 多段フリーズ: 大きなスロットのロック ---------- */
.slotin.lock .si-box { box-shadow: inset 0 0 0 3px #fff, 0 0 46px rgba(255, 255, 255, 0.35), 0 16px 36px rgba(0, 0, 0, 0.6); }

/* ---------- PUSHボタン: 大きな結果の直前だけ ---------- */
.push-btn {
  position: fixed; left: 50%; top: 70%; z-index: 56; transform: translate(-50%, -50%);
  width: 118px; height: 118px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-content: center; gap: 2px;
  background: radial-gradient(circle at 50% 38%, #FF7A66 0%, var(--shu) 55%, #9e2a1f 100%);
  color: #fff; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--shu), 0 0 40px rgba(224, 64, 47, 0.8), 0 10px 0 #6e1c14;
  animation: pushIn 0.3s cubic-bezier(0.3, 1.6, 0.5, 1), pushPulse 0.7s ease-in-out 0.3s infinite;
}
.push-btn b { font-family: var(--font-ui); font-weight: 900; font-size: 26px; line-height: 1.05; letter-spacing: 0.02em; }
.push-btn small { position: absolute; left: 50%; top: calc(100% + 18px); transform: translateX(-50%); white-space: nowrap; font-size: 11px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.push-btn.pressed { animation: pushPressed 0.26s ease forwards; }
.push-btn:focus-visible { outline: 3px solid var(--led); outline-offset: 6px; }
@keyframes pushIn { from { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } }
@keyframes pushPulse { 50% { box-shadow: 0 0 0 4px #fff, 0 0 0 10px var(--shu), 0 0 60px rgba(224, 64, 47, 0.95), 0 10px 0 #6e1c14; } }
@keyframes pushPressed { 0% { transform: translate(-50%, calc(-50% + 8px)) scale(0.94); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--shu), 0 2px 0 #6e1c14; } 100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; } }

/* ---------- 上乗せ: ゾーン中は年収の伸びを小刻みに数える ---------- */
.uwanose {
  position: absolute; right: 14px; top: -4px; z-index: 3; pointer-events: none; white-space: nowrap;
  font-family: var(--font-led); font-size: 17px; color: #9CFFB8; text-shadow: 0 0 8px rgba(80, 255, 150, 0.7);
  animation: uwaUp 0.95s ease forwards;
}
@keyframes uwaUp { 0% { opacity: 0; transform: translateY(14px) scale(1.4); } 20% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-26px); } }

/* ---------- 後告知(後ペカ): 静かになってから光るランプ ---------- */
.peka-lamp {
  position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(circle, #fff 0%, #FFF3C4 30%, #FFD24A 62%, #D9A51C 100%);
  box-shadow: 0 0 30px 10px rgba(255, 210, 74, 0.85), 0 0 80px 24px rgba(255, 210, 74, 0.4);
  animation: pekaIn 0.22s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.peka-lamp span { font-family: var(--font-paper); font-weight: 900; font-size: 19px; color: #5a3a00; }
.peka-lamp.out { transition: opacity 0.35s ease; opacity: 0; }
@keyframes pekaIn { 0% { transform: translate(-50%, -50%) scale(0.2); filter: brightness(3); } 100% { transform: translate(-50%, -50%) scale(1); filter: none; } }

/* ---------- 覚醒ゾーン(上位ゾーン) ---------- */
body.zone-upper .led { box-shadow: inset 0 0 0 2px #fff, 0 0 30px rgba(199, 125, 255, 0.55), 0 0 60px rgba(74, 224, 181, 0.3), inset 0 4px 16px rgba(0, 0, 0, 0.55); }
body.zone-upper .reel-window { box-shadow: inset 0 0 0 2px rgba(199, 125, 255, 0.9), inset 0 8px 10px -8px rgba(0, 0, 0, 0.45); }
.zone-badge.upper { background: var(--holo); background-size: 200% 100%; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55); box-shadow: 0 0 14px rgba(199, 125, 255, 0.7); animation: holo 1.2s linear infinite; }

/* ---------- 景気ガチャ ---------- */
.era-box { display: grid; gap: 6px; }
.era-line { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; }
.era-roll {
  min-width: 132px; padding: 8px 14px; border-radius: 8px; text-align: center;
  font-family: var(--font-paper); font-weight: 900; font-size: 20px; background: #1b2640; color: var(--text);
  box-shadow: inset 0 0 0 2px #2a3a5e;
}
.era-roll.era-boom { color: #2a1d00; background: linear-gradient(180deg, #FFE27A, #D9A51C); box-shadow: 0 0 14px rgba(255, 210, 74, 0.5); }
.era-roll.era-normal { color: var(--text); }
.era-roll.era-slump { color: #C9D6EA; background: #2b3550; }
.era-roll.era-ice { color: #E8F6FF; background: linear-gradient(180deg, #5AA8FF, #2F5E9E); }
.era-roll.stop { animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.era-result { font-size: 14px; font-weight: 700; color: var(--text-dim); }
.era-result .era-boom { color: var(--led); text-shadow: 0 0 8px var(--led-glow); }
.era-result .era-ice { color: #9FC8FF; }

/* ---------- ボイス示唆: 設定を匂わせるひと言 ---------- */
.chara-cut .cc-line.hint { color: #FFE27A; text-shadow: 0 0 12px rgba(255, 210, 74, 0.75); }

/* ---------- もう1回(結果画面の右下) ---------- */
.again-fab {
  position: fixed; right: max(16px, calc(50% - 204px)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 29;
  min-height: 52px; padding: 0 20px; border: 0; border-radius: 26px; cursor: pointer;
  font-family: var(--font-paper); font-weight: 900; font-size: 17px; color: #fff; background: var(--shu);
  box-shadow: 0 6px 0 #9e2a1f, 0 10px 24px rgba(0, 0, 0, 0.45);
}
.again-fab:active { transform: translateY(4px); box-shadow: 0 2px 0 #9e2a1f, 0 6px 16px rgba(0, 0, 0, 0.45); }
.again-fab:focus-visible { outline: 3px solid var(--led); outline-offset: 3px; }
#screen-result { padding-bottom: 88px; }

/* ---------- 結果: まだ持っていない称号のヒント ---------- */
.title-block .locked-hint { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #CFC9BC; font-size: 12px; color: var(--ink-dim); }
.title-block .locked-hint small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .push-btn, .progress li[data-hold="3"]::after, .zone-badge.upper { animation: none; }
}
.era-box .hz-title small { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 2px 0 0; }
.era-box .hz-title small span { white-space: nowrap; }

/* ---------- 負け筋(スランプ・転落・減額・パンク・うわさ・勝因と敗因) ---------- */
/* スランプ: 色が抜けて、冷たい影が寄る。リールと大きなスロットは色を残す(逆転の赤を見せるため) */
#screen-main .status, #led, #ticker, #screen-main .spin-row, #screen-main .progress, #screen-main .log { transition: filter 0.6s ease; }
body.slump #screen-main .status,
body.slump #led,
body.slump #ticker,
body.slump #screen-main .spin-row,
body.slump #screen-main .progress,
body.slump #screen-main .log { filter: saturate(0.2) brightness(0.88); }
body.slump::after {
  content: ''; position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(120% 85% at 50% 42%, transparent 48%, rgba(24, 38, 62, 0.55) 100%);
  animation: fadeIn 0.6s ease;
}
.zone-badge.slump { background: #5E6B7D; color: #EEF2F7; box-shadow: 0 0 10px rgba(120, 150, 190, 0.45); }
.word.slump .w { color: #B9C7D8; text-shadow: 0 0 18px rgba(110, 140, 180, 0.6); }
.word.fall .w { color: #9DB2CC; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); }
.word.slump .ws, .word.fall .ws { color: #DDE5EF; }
/* 転落・大きな負け: 画面の色が一瞬抜ける(暗転は虹だけ) */
body.fallflash::before {
  content: ''; position: fixed; inset: 0; z-index: 39; pointer-events: none;
  -webkit-backdrop-filter: grayscale(0.9) brightness(0.8); backdrop-filter: grayscale(0.9) brightness(0.8);
  background: rgba(30, 45, 70, 0.18);
  animation: fallFlash 1.3s ease forwards;
}
@keyframes fallFlash { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
/* ゾーンのキャラが去る */
.chara-leave {
  position: fixed; left: max(8px, calc(50% - 200px)); top: 46%; z-index: 42; width: 120px; height: 120px; pointer-events: none;
  animation: charaLeave 1.6s ease-in forwards;
}
.chara-leave img { width: 100%; height: 100%; border-radius: 16px; filter: grayscale(0.6); }
@keyframes charaLeave {
  0% { opacity: 1; transform: translateX(0); }
  30% { opacity: 1; transform: translateX(6px); }
  100% { opacity: 0; transform: translateX(-160px); filter: grayscale(1); }
}
/* 年収が大きく下がる: 年収の表示が青く沈んで揺れる */
#led.fall { animation: ledFall 0.9s ease; }
@keyframes ledFall {
  0% { box-shadow: none; }
  20% { box-shadow: inset 0 0 0 2px #7FA4D6, 0 0 22px rgba(90, 130, 190, 0.6); transform: translateY(3px); }
  40% { transform: translateY(-2px); }
  100% { box-shadow: none; transform: none; }
}
/* 提示年収・昇進のスロット: 転落すべりとパンク */
.pr-drum.land.fall { box-shadow: inset 0 0 0 2px #7FA4D6, 0 0 18px rgba(90, 130, 190, 0.55); }
.pr-drum.punk { box-shadow: inset 0 0 0 2px #9AA6B6; animation: punkDrum 0.5s ease; }
@keyframes punkDrum { 0% { transform: scale(1); } 30% { transform: scale(1.04, 0.92); } 60% { transform: scale(0.98, 1.03); } 100% { transform: none; } }
.big-stamp.punk { border-color: #5E6B7D; color: #5E6B7D; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px #5E6B7D; font-size: 17px; }
/* 負けの自虐の一行 */
.loss-line { display: block; margin-top: 6px; font-family: var(--font-paper); font-size: 14px; font-style: normal; color: #5a6578; }
.notice .loss-line { margin-top: 2px; font-size: 12px; }
/* うわさ(前兆) */
.rumor {
  position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); z-index: 47; transform: translateX(-50%);
  width: min(392px, calc(100% - 32px)); display: flex; gap: 10px; align-items: center;
  background: #1A2236; color: var(--text); border: 1px solid #34425e; border-radius: 12px; padding: 9px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); animation: rumorIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.rumor .rm-k { flex: 0 0 auto; font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: #34425e; color: #cdd6e4; }
.rumor .rm-t { font-family: var(--font-paper); font-size: 15px; line-height: 1.4; }
.rumor.real { border-color: var(--led); box-shadow: 0 0 18px var(--led-glow); }
.rumor.real .rm-k { background: var(--led); color: #1a1205; }
.rumor.gase .rm-k { background: #5E6B7D; color: #fff; }
.rumor.gase .rm-t { color: #b9c3d2; }
.rumor.out { transition: opacity 0.3s ease, transform 0.3s ease; opacity: 0; transform: translate(-50%, -10px); }
@keyframes rumorIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* 結果: 勝因・敗因 */
.causes { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.causes .ck { font-size: 12px; font-weight: 900; padding: 2px 10px; border-radius: 999px; }
.causes.win .ck { background: var(--led); color: #1a1205; }
.causes.lose .ck { background: #5E6B7D; color: #fff; }
.causes b { font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  body.fallflash::before, .chara-leave { display: none; }
  #led.fall, .pr-drum.punk, .rumor { animation: none; }
}
