/* ============================================================
   NG9 -NGナイン-（ぺげ No.09）
   昼の球場：青い空と芝生。ストラックアウトの赤と青のパネル、紺のスコアボード
   ============================================================ */
:root {
  --sky: #4fb3ff;
  --sky-light: #c9ecff;
  --grass: #3caa4c;
  --grass-2: #46b757;
  --grass-dark: #1f6b2c;
  --navy: #14244b;
  --navy-2: #1d3366;
  --navy-deep: #0c1631;
  --red: #e2352c;
  --red-dark: #a51f18;
  --blue: #1f63d8;
  --blue-dark: #123f95;
  --yellow: #ffd23f;
  --lamp-s: #ffd23f;
  --lamp-b: #31dd7c;
  --gold: #f2b632;
  --silver: #dfe5ef;
  --ink: #1d2433;
  --sub: #5d6575;
  --paper: #ffffff;
  --paper-2: #f3f6fb;
  --shadow: 0 6px 16px rgba(12, 22, 49, .22);
  --shadow-s: 0 3px 8px rgba(12, 22, 49, .16);
  --round: 18px;
  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  --display: "Dela Gothic One", "M PLUS Rounded 1c", sans-serif;
  --en: "Anton", "Dela Gothic One", Impact, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background: var(--grass);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
/* 昼の球場：上は青い空、外野のフェンス、下は芝生（刈ったあとのしま模様）。iPhone でも動かないように固定の層 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 30%, rgba(255, 255, 255, .55) 30.6%, rgba(255, 255, 255, 0) 31.4%),
    linear-gradient(180deg, transparent 0 29.4%, #1f5a33 29.4% 31%, #f3c844 31% 31.6%, #2a7a40 31.6% 33.4%, transparent 33.4%),
    linear-gradient(180deg, #3aa4ff 0%, #6cc4ff 16%, #b6e5ff 29.4%, transparent 29.4%),
    repeating-linear-gradient(90deg, var(--grass) 0 56px, var(--grass-2) 56px 112px);
}
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
.hidden { display: none !important; }

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 14px 110px;
}
.scr { display: none; animation: fadein .25s ease; }
.scr.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 文字 ---------- */
.on-field { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.center { text-align: center; }
.title-s { font-size: 15px; font-weight: 800; margin: 0 0 8px; color: var(--navy); }
.note { font-size: 12.5px; color: var(--sub); line-height: 1.6; }
h2.head {
  font-size: 20px;
  font-weight: 800;
  margin: 6px 0 14px;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .4);
  line-height: 1.45;
}

/* ---------- カード（白い紙） ---------- */
.card {
  background: var(--paper);
  border-radius: var(--round);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 0 0 14px;
  border: 2px solid rgba(20, 36, 75, .12);
}

/* ---------- ボタン ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease, filter .15s ease, opacity .15s;
  margin: 10px 0 0;
}
.btn:active { transform: translateY(3px); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-red {
  color: #fff;
  background: linear-gradient(180deg, #f5655b, var(--red) 55%, var(--red-dark));
  border: 3px solid #fff;
  box-shadow: 0 5px 0 #7c1712, 0 8px 16px rgba(0, 0, 0, .22);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.btn-blue {
  color: #fff;
  background: linear-gradient(180deg, #4a8cf2, var(--blue) 55%, var(--blue-dark));
  border: 3px solid #fff;
  box-shadow: 0 5px 0 #0c2c6a, 0 8px 16px rgba(0, 0, 0, .22);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.btn-white {
  color: var(--navy);
  background: #fff;
  border: 3px solid var(--navy);
  box-shadow: 0 4px 0 var(--navy);
}
.btn-ghost {
  color: #fff;
  background: rgba(12, 22, 49, .28);
  border: 2px solid rgba(255, 255, 255, .7);
  min-height: 46px;
  font-size: 15px;
}
.btn-link {
  display: inline-block;
  background: none;
  border: 0;
  color: #fff;
  text-decoration: underline;
  font-size: 13.5px;
  padding: 8px 4px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.card .btn-link { color: var(--sub); text-shadow: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.btn-line { background: #06c755; color: #fff; border: 0; }
.btn-x { background: #111; color: #fff; border: 0; }
.btn-gold {
  color: #4a3206;
  background: linear-gradient(180deg, #ffe58f, #f6c445 55%, #d99a18);
  border: 3px solid #fff7d6;
  box-shadow: 0 5px 0 #8a6312, 0 8px 16px rgba(0, 0, 0, .22);
}

/* ---------- タイトル画面 ---------- */
.top-logo { width: 92%; margin: 0 auto; filter: drop-shadow(0 8px 12px rgba(12, 22, 49, .35)); }
.catch {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  margin: 6px 0 6px;
  letter-spacing: .02em;
  text-shadow: 0 3px 0 var(--navy), 0 4px 10px rgba(0, 0, 0, .35);
}
.catch-sub { text-align: center; color: #fff; font-size: 13.5px; font-weight: 800; margin: 0 0 12px; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.kv { border-radius: var(--round); border: 3px solid #fff; box-shadow: var(--shadow); width: 100%; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.steps li { position: relative; padding: 0 0 10px 34px; font-size: 14px; line-height: 1.65; }
.steps li::before {
  counter-increment: st;
  content: counter(st);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li:nth-child(even)::before { background: var(--red); }
.steps b { color: var(--red); }
.steps small { display: block; font-size: 11.5px; color: var(--sub); line-height: 1.5; margin-top: 2px; }
.pts-table { width: 100%; border-collapse: collapse; margin: 6px 0 2px; font-size: 13.5px; }
.pts-table td { padding: 6px 4px; border-bottom: 1px dashed #d8deea; }
.pts-table td:last-child { text-align: right; font-weight: 800; white-space: nowrap; }
.pts-table .plus { color: var(--blue); }
.pts-table .minus { color: var(--red); }
.premium-card { display: flex; gap: 12px; align-items: center; }
.premium-card img { width: 108px; border-radius: 12px; flex: none; }
.premium-card .txt { font-size: 13.5px; line-height: 1.6; }
.premium-card .price { color: var(--red); font-weight: 800; }
.footer { text-align: center; padding: 14px 0 0; }
.footer a { color: #fff; font-size: 13px; margin: 0 8px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.pege-mark { font-weight: 800; }

/* ---------- 入力 ---------- */
label.lb { display: block; font-size: 14px; font-weight: 800; margin: 12px 0 6px; color: var(--navy); }
input.tx {
  width: 100%;
  font: inherit;
  font-size: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid #cfd7e6;
  background: #fff;
  outline: none;
}
input.tx:focus { border-color: var(--blue); }
input.code {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: .35em;
  text-align: center;
  padding-left: .35em;
  color: var(--red);
}
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
/* アイコンの絵は、まわりに髪などのための余白があるので、少し大きく表示する */
.icon-grid button {
  border: 3px solid transparent;
  border-radius: 16px;
  background: rgba(31, 99, 216, .07);
  padding: 0;
  cursor: pointer;
  overflow: visible;
}
.icon-grid button img { width: 100%; transform: scale(1.18); }
.icon-grid button.sel { border-color: var(--red); background: rgba(226, 53, 44, .1); }
.icon-grid button[disabled] { opacity: .25; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1;
  padding: 10px 6px;
  border-radius: 14px;
  border: 2px solid #cfd7e6;
  background: #fff;
  font-weight: 800;
  font-size: 14.5px;
  color: var(--sub);
  cursor: pointer;
  line-height: 1.35;
}
.seg button small { display: block; font-size: 11.5px; font-weight: 500; }
.seg button.sel { border-color: var(--red); color: var(--red); background: #fff4f3; }

/* ---------- 待合室 ---------- */
.room-code {
  font-family: var(--display);
  font-size: 54px;
  letter-spacing: .25em;
  text-align: center;
  color: var(--red);
  margin: 2px 0 0;
  padding-left: .25em;
}
.players { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pchip { text-align: center; font-size: 13px; font-weight: 800; position: relative; }
.pchip img { width: 80%; margin: 6px auto 4px; transform: scale(1.18); }
.pchip .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip .host-tag {
  position: absolute; top: 0; left: 4px;
  background: var(--gold); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 99px;
}
.pchip.me .nm { color: var(--red); }

/* ---------- ゲームの上の帯（紺のスコアボード風） ---------- */
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border: 3px solid var(--silver);
  border-radius: 16px;
  padding: 6px 12px;
  color: #dfe8ff;
  margin-bottom: 12px;
  box-shadow: var(--shadow-s);
}
.bar .no { font-family: var(--display); font-size: 21px; color: var(--yellow); white-space: nowrap; }
.bar .info { flex: 1; font-size: 12px; line-height: 1.35; overflow: hidden; }
.bar .info b { color: #fff; font-size: 13px; }
.bar .mine { text-align: right; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.bar .mine b { font-family: var(--display); font-size: 18px; color: var(--yellow); }

/* ---------- 自分のカウント（BとSのランプ） ---------- */
.bso {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy-deep);
  border: 3px solid var(--silver);
  border-radius: 16px;
  padding: 8px 14px;
  margin: 0 0 12px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .06), var(--shadow-s);
  color: #fff;
}
.lamp-row { display: flex; align-items: center; gap: 6px; }
.lamp-row .lb { font-family: var(--en); font-size: 24px; width: 18px; text-align: center; color: #e8eefc; letter-spacing: 0; }
.lp {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a4565, #222b45 70%);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6);
}
.lp.b.on { background: radial-gradient(circle at 35% 30%, #c9ffe0, var(--lamp-b) 55%, #18a85a); box-shadow: 0 0 10px rgba(49, 221, 124, .9); }
.lp.s.on { background: radial-gradient(circle at 35% 30%, #fff7cc, var(--lamp-s) 55%, #d8a10b); box-shadow: 0 0 10px rgba(255, 210, 63, .95); }
.bso .msg { flex: 1; text-align: right; font-size: 12.5px; line-height: 1.4; font-weight: 800; color: #dfe8ff; }
.bso .msg b { display: block; font-family: var(--display); font-size: 17px; color: var(--yellow); font-weight: 400; }
.bso .msg b.fb { color: #ff8a80; }
.bso.two { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 210, 63, .35), var(--shadow-s); }

/* ---------- ストラックアウト（自分のカード） ---------- */
.target {
  position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 11px),
    linear-gradient(180deg, #172a57, var(--navy-deep));
  border-radius: 20px;
  padding: 12px;
  border: 5px solid var(--silver);
  box-shadow: inset 0 0 0 2px #8c98b3, 0 10px 22px rgba(12, 22, 49, .32);
  margin: 0 0 10px;
}
.grid9 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pn {
  position: relative;
  aspect-ratio: 1 / 1.02;
  border-radius: 10px;
  border: 3px solid #eef2fa;
  background: linear-gradient(180deg, #3a83f5, var(--blue) 58%, #1850b8);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .28), inset 0 -4px 0 rgba(0, 0, 0, .18), 0 3px 0 rgba(0, 0, 0, .35);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 4px 6px;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  transition: transform .08s ease;
}
.pn.red { background: linear-gradient(180deg, #f6625a, var(--red) 58%, #b8231c); }
button.pn:active { transform: translateY(2px) scale(.98); }
.pn .no { position: absolute; top: 3px; left: 7px; font-family: var(--en); font-size: 13px; opacity: .9; letter-spacing: 0; }
.pn .w { font-weight: 800; line-height: 1.15; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); word-break: break-all; }
.pn .w.l1 { font-size: 23px; }
.pn .w.l2 { font-size: 20px; }
.pn .w.l3 { font-size: 16.5px; }
.pn .w.l4 { font-size: 15px; }
.pn .w.l5 { font-size: 13.5px; }
.pn .ok {
  margin-top: 4px; font-size: 10px; line-height: 1.3; opacity: .92; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* ストライク：パネルが抜けて、うしろのネットが見える */
.pn.hole {
  cursor: default;
  border-color: rgba(255, 255, 255, .28);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 9px),
    #08112a;
  box-shadow: inset 0 6px 14px rgba(0, 0, 0, .7);
}
.pn.hole .w { color: rgba(255, 255, 255, .6); text-shadow: none; }
.pn.hole .no { opacity: .45; }
/* ボール：自分で言っちゃったパネルは、固まってもう抜けない */
.pn.ball {
  cursor: default;
  background: linear-gradient(180deg, #a7afbe, #848da0 60%, #6b7487);
  border-color: #cfd5e0;
}
.pn.ball .w { color: #eef1f6; }
.pn .stamp {
  position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%) rotate(-6deg);
  font-family: var(--en); font-size: 15px; letter-spacing: .04em; padding: 1px 8px; border-radius: 6px; white-space: nowrap;
}
.pn .stamp.s { background: var(--yellow); color: #3b2a00; box-shadow: 0 0 10px rgba(255, 210, 63, .7); }
.pn .stamp.b { background: var(--lamp-b); color: #053d1d; }
.pn .by { font-size: 10px; font-weight: 800; opacity: .8; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn.hole .by, .pn.ball .by { margin-bottom: 18px; }
/* 抜けたばかりのパネルが落ちていく */
.pn .flyer {
  position: absolute; inset: 0; border-radius: 7px; pointer-events: none;
  background: linear-gradient(180deg, #3a83f5, var(--blue) 58%, #1850b8);
  animation: knock .75s cubic-bezier(.4, .1, .7, 1) forwards;
}
.pn .flyer.red { background: linear-gradient(180deg, #f6625a, var(--red) 58%, #b8231c); }
@keyframes knock {
  0% { transform: none; opacity: 1; }
  25% { transform: translateY(-6%) rotate(-5deg); opacity: 1; }
  100% { transform: translateY(120%) rotate(18deg) scale(.8); opacity: 0; }
}
.pn.lock-anim { animation: lockpulse .6s ease; }
@keyframes lockpulse { 0% { filter: brightness(1.8); } 100% { filter: none; } }
/* しばらくさわらないと、言葉が隠れる（のぞき見防止） */
.target .cover {
  position: absolute; inset: 0; border-radius: 15px; display: none; z-index: 3;
  align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  background: rgba(12, 22, 49, .82); color: #fff; text-align: center; padding: 16px; cursor: pointer;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.target .cover b { font-size: 18px; }
.target .cover small { font-size: 12px; opacity: .85; line-height: 1.5; }
.target.veiled .cover { display: flex; }
.target.veiled .pn .w, .target.veiled .pn .ok, .target.veiled .pn .by { visibility: hidden; }
.hint { text-align: center; color: #fff; font-size: 13px; font-weight: 800; margin: 0 0 12px; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); line-height: 1.55; }

/* ---------- スコアボード（みんなのカウント） ---------- */
.sboard {
  background: linear-gradient(180deg, #13244e, var(--navy-deep));
  border: 3px solid var(--silver);
  border-radius: 16px;
  padding: 10px 10px 4px;
  margin: 0 0 14px;
  color: #fff;
  box-shadow: var(--shadow);
}
.sboard .ttl { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 6px; }
.sboard .ttl b { font-family: var(--en); font-size: 18px; letter-spacing: .06em; color: var(--yellow); font-weight: 400; }
.sboard .ttl small { font-size: 11px; color: #b9c6e6; }
.sboard ul { list-style: none; margin: 0; padding: 0; }
.sboard li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 4px; border-top: 1px solid rgba(255, 255, 255, .08);
}
.sboard li img { width: 40px; flex: none; transform: scale(1.18); }
.sboard .nm { flex: 1; min-width: 0; font-weight: 800; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
.sboard .nm-t { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sboard .lamps { display: flex; align-items: center; gap: 3px; flex: none; }
.sboard .lamps .lb { font-family: var(--en); font-size: 13px; color: #b9c6e6; margin: 0 1px 0 4px; }
.sboard .lp { width: 13px; height: 13px; }
.sboard .pt { width: 52px; text-align: right; font-family: var(--display); font-size: 15px; color: #fff; flex: none; }
.sboard .pt small { display: block; font-family: var(--font); font-size: 10px; color: #b9c6e6; font-weight: 700; }
.sboard li.me .nm-t { color: var(--yellow); }
.sboard li.two { background: rgba(255, 210, 63, .12); border-radius: 10px; }
.sboard li.out { opacity: .45; }
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; color: #fff;
  padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; white-space: nowrap;
}
.badge.host { background: var(--gold); }
.badge.two { background: var(--yellow); color: #3b2a00; }
.badge.fb { background: #e24a40; }
.badge.wait { background: #6f7c99; }
.badge.top { background: linear-gradient(90deg, #d99a18, #f6c445); color: #3b2a00; }
.badge.las { background: #8a8f9c; }
.badge.ks { background: #7b4be0; }
.badge.so { background: var(--blue); }

/* ---------- 実況（出た言葉） ---------- */
.feed ul { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 2px; border-bottom: 1px dashed #d8deea; font-size: 13.5px; line-height: 1.55; display: flex; gap: 8px; align-items: flex-start; }
.feed li:last-child { border-bottom: 0; }
.feed .wd { flex: none; font-weight: 800; color: #fff; background: var(--blue); padding: 1px 8px; border-radius: 8px; font-size: 13px; }
.feed .wd.self { background: #848da0; }
.feed .tx { flex: 1; min-width: 0; }
.feed .tx b { color: var(--navy); }
.feed .tx .k { color: #b8860b; font-weight: 800; }
.feed .tx .bl { color: #15934a; font-weight: 800; }
.feed .undo { flex: none; background: none; border: 1px solid #cfd7e6; color: var(--sub); border-radius: 99px; font-size: 11.5px; padding: 3px 9px; cursor: pointer; }
.feed .empty { color: var(--sub); font-size: 13px; }

/* ---------- 下から出る画面（言った人を選ぶ・外す・シェア） ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 520px; margin: 0 auto;
  background: #fff; border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 26px rgba(0, 0, 0, .3);
  padding: 16px 16px 24px; max-height: 82vh; overflow: auto;
  transform: translateY(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
}
.sheet.open { transform: none; visibility: visible; transition: transform .22s ease; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 39; display: none; }
.sheet-bg.open { display: block; }
.sheet .btn-link { display: block; margin: 8px auto 0; color: var(--sub); text-shadow: none; }
.call-word {
  margin: 2px auto 6px; display: table; padding: 6px 18px; border-radius: 12px;
  font-size: 26px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #3a83f5, var(--blue));
  border: 3px solid #eef2fa; box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}
.call-word.red { background: linear-gradient(180deg, #f6625a, var(--red)); }
.call-ok { text-align: center; font-size: 13px; color: var(--sub); margin: 0 0 2px; line-height: 1.6; }
.call-ok b { color: var(--ink); }
.call-note { text-align: center; font-size: 12.5px; color: var(--red); margin: 0 0 4px; font-weight: 700; }
.who-q { text-align: center; font-weight: 800; font-size: 17px; margin: 12px 0 10px; color: var(--navy); }
.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.who-grid button {
  border: 2px solid #d8deea; border-radius: 16px; background: var(--paper-2); padding: 8px 4px 8px; cursor: pointer;
  font-weight: 800; font-size: 13.5px; color: var(--ink); font-family: inherit;
}
.who-grid button img { width: 70%; margin: 4px auto 6px; transform: scale(1.15); }
.who-grid button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-grid button:active { transform: translateY(2px); background: #fff4f3; border-color: var(--red); }
.who-grid button small { display: block; font-size: 10.5px; color: var(--sub); font-weight: 700; }
.kick-list { display: grid; gap: 8px; }
.kick-list button { display: flex; align-items: center; gap: 10px; border: 2px solid #d8deea; border-radius: 14px; background: #fff; padding: 6px 10px; font-weight: 800; font-size: 15px; cursor: pointer; font-family: inherit; color: var(--ink); text-align: left; }
.kick-list button img { width: 44px; transform: scale(1.15); }
.kick-list button span { flex: 1; }
.kick-list button em { font-style: normal; font-size: 12px; color: var(--red); }
#share-sheet .share-go.wait { opacity: .45; pointer-events: none; }
#share-sheet .note { text-align: center; margin: 12px 0 0; }

/* ---------- 結果（三振・答え合わせ） ---------- */
.so-head { text-align: center; margin: 4px 0 12px; }
.so-en {
  font-family: var(--en); font-size: min(56px, 12.5vw); line-height: 1; margin: 0; letter-spacing: .02em; white-space: nowrap;
  color: var(--yellow); -webkit-text-stroke: 2px var(--navy);
  text-shadow: 0 4px 0 var(--navy), 0 8px 18px rgba(0, 0, 0, .35);
}
.so-head.host .so-en { color: #fff; }
.so-ja { font-family: var(--display); font-size: 22px; color: #fff; margin: 8px 0 2px; text-shadow: 0 2px 0 var(--navy), 0 3px 8px rgba(0, 0, 0, .35); line-height: 1.4; }
.so-sub { color: #fff; font-size: 13.5px; font-weight: 800; margin: 2px 0 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); line-height: 1.6; }
.so-icons { display: flex; justify-content: center; gap: 10px; margin: 6px 0 2px; }
.so-icons img { width: 86px; transform: scale(1.15); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.mycard-label { text-align: center; font-weight: 800; color: var(--navy); margin: 0 0 8px; }
.mycard-label small { display: block; font-size: 12px; color: var(--sub); }
.wait-msg { text-align: center; color: #fff; font-weight: 800; font-size: 15px; margin: 18px 0 4px; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.small-actions { text-align: center; margin-top: 4px; }

/* ---------- 空振り王（発表するだけ） ---------- */
.ks-card { text-align: center; }
.ks-title { font-family: var(--display); font-size: 26px; color: #7b4be0; margin: 2px 0 0; }
.ks-cap { font-size: 12.5px; color: var(--sub); margin: 2px 0 6px; font-weight: 800; }
.ks-icons { display: flex; justify-content: center; gap: 10px; margin: 10px 0 4px; }
.ks-icons img { width: 84px; transform: scale(1.15); }
.ks-name { font-size: 20px; font-weight: 800; margin: 8px 0 0; color: var(--ink); line-height: 1.4; }
.ks-count { font-family: var(--display); font-size: 17px; color: #7b4be0; margin: 2px 0 0; }
.ks-row {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 8px 12px;
  margin: 0 0 14px; box-shadow: var(--shadow); border: 2px solid rgba(123, 75, 224, .35);
}
.ks-row img { width: 40px; flex: none; transform: scale(1.15); }
.ks-row .ks-t { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.ks-row .ks-t b { color: #7b4be0; display: block; }
.ks-row .ks-t small { font-size: 11px; color: var(--sub); }
.ks-row .ks-n { text-align: right; font-weight: 800; font-size: 14px; line-height: 1.3; }
.ks-row .ks-n small { display: block; font-size: 11px; color: var(--sub); }

/* ---------- 最後の結果 ---------- */
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed #d8deea; }
.board li:last-child { border-bottom: 0; }
.board img { width: 48px; flex: none; transform: scale(1.18); }
.board .nm { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; row-gap: 3px; }
.board .nm-t { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .sc { font-family: var(--display); font-size: 17px; color: var(--navy); white-space: nowrap; }
.board .sc.minus { color: var(--red); }
.board .rk { width: 26px; text-align: center; font-family: var(--display); font-size: 18px; color: var(--sub); flex: none; }
.board li.me .nm-t { color: var(--red); }
.share-preview { width: 100%; border-radius: 12px; border: 2px solid #d8deea; margin: 0 0 10px; }
.reco { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reco a {
  display: block; text-align: center; background: var(--paper-2); border: 2px solid #d8deea; border-radius: 14px; padding: 10px 6px;
  color: var(--navy); font-weight: 800; text-decoration: none; font-size: 14px;
}
.reco a small { display: block; font-weight: 500; color: var(--sub); font-size: 11.5px; }

/* ---------- ルールのおさらい ---------- */
details.rule { padding: 12px 16px; }
details.rule summary { font-weight: 800; color: var(--navy); cursor: pointer; font-size: 14px; }
details.rule .body { font-size: 13px; line-height: 1.7; margin-top: 8px; }
.tools { text-align: center; margin: 6px 0 0; }
.tools .btn { margin-top: 8px; }

/* ---------- 演出 ---------- */
#fx {
  position: fixed; inset: 0; z-index: 60; display: none; overflow: hidden; isolation: isolate;
  align-items: center; justify-content: center; flex-direction: column;
  background: radial-gradient(circle at 50% 42%, rgba(29, 51, 102, .93), rgba(6, 12, 30, .96));
  text-align: center; padding: 20px;
}
#fx.show { display: flex; animation: fadein .15s ease; }
.fx-en {
  font-family: var(--en); font-size: 84px; line-height: 1; letter-spacing: .02em;
  color: var(--yellow); -webkit-text-stroke: 2px #3b2a00;
  text-shadow: 0 5px 0 #8a5b00, 0 10px 22px rgba(0, 0, 0, .5);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}
.fx-en.ball { color: var(--lamp-b); -webkit-text-stroke: 2px #053d1d; text-shadow: 0 5px 0 #0b6b34, 0 10px 22px rgba(0, 0, 0, .5); }
.fx-en.white { color: #fff; -webkit-text-stroke: 2px var(--navy); text-shadow: 0 5px 0 var(--navy), 0 10px 22px rgba(0, 0, 0, .5); }
.fx-en.red { color: #ff6b5e; -webkit-text-stroke: 2px #5a0c07; text-shadow: 0 5px 0 #7c1712, 0 10px 22px rgba(0, 0, 0, .5); }
.fx-en.big { font-size: 96px; }
.fx-ja { font-family: var(--display); font-size: 46px; color: #fff; line-height: 1.15; text-shadow: 0 4px 0 var(--red-dark), 0 8px 16px rgba(0, 0, 0, .45); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.fx-mid { font-family: var(--display); font-size: 30px; color: #fff; margin-top: 12px; animation: pop .5s .2s both; text-shadow: 0 3px 0 var(--navy); line-height: 1.3; }
.fx-mid.gold { color: var(--yellow); }
.fx-sub { color: #e6edff; font-size: 17px; font-weight: 800; margin-top: 12px; animation: fadein .3s .4s both; line-height: 1.65; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.fx-sub b { color: #fff; }
.fx-sub .w { display: inline-block; background: var(--blue); color: #fff; padding: 0 10px; border-radius: 8px; margin: 0 2px; }
.fx-sub small { font-size: 14px; color: #c9d5f2; }
.fx-pts { font-family: var(--display); font-size: 34px; color: var(--yellow); margin-top: 8px; animation: pop .45s .35s both; }
.fx-pts.minus { color: #ff8a80; }
.fx-icons { display: flex; gap: 12px; justify-content: center; margin: 14px 0 0; animation: pop .5s .45s both; }
.fx-icons img { width: 92px; transform: scale(1.15); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
#fx.fx-so { background: radial-gradient(circle at 50% 42%, rgba(30, 90, 210, .95), rgba(5, 12, 36, .97)); }
.fx-so .rays {
  position: absolute; left: 50%; top: 42%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 63, .22) 0deg 7deg, rgba(255, 210, 63, 0) 7deg 18deg);
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fx-so .fx-en { font-size: 76px; animation: pop .55s .1s cubic-bezier(.2, 1.6, .4, 1) both, shake .5s .75s both; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-7px, 3px) rotate(-2deg); }
  40% { transform: translate(7px, -3px) rotate(2deg); }
  60% { transform: translate(-4px, 2px); }
  80% { transform: translate(4px, -2px); }
}
.spark {
  position: absolute; top: -24px; width: 10px; height: 10px; border-radius: 2px; z-index: -1;
  background: var(--yellow); box-shadow: 0 0 8px rgba(255, 210, 63, .9);
  animation: fall 2s linear infinite;
}
.spark:nth-child(3n) { background: #fff; }
.spark:nth-child(4n) { background: #ff6b5e; }
@keyframes fall { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(110vh) rotate(540deg); opacity: .25; } }
@keyframes pop { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.fx-flash { position: fixed; inset: 0; background: #fff; z-index: 61; pointer-events: none; animation: flash .5s ease forwards; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.fx-tap { position: absolute; bottom: 22px; left: 0; right: 0; font-size: 12px; color: #9fb0d8; }

/* 自分に関係ない出来事は、上に細い帯で出す（会話をじゃましない） */
#ticker {
  position: fixed; left: 50%; top: 10px; z-index: 55; width: min(94vw, 500px);
  transform: translate(-50%, -160%); opacity: 0; visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s;
  background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; border: 3px solid var(--silver);
  border-radius: 16px; padding: 10px 14px; font-size: 14px; font-weight: 800; line-height: 1.55; box-shadow: var(--shadow);
}
#ticker.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .25s ease, opacity .25s ease; }
#ticker .w { display: inline-block; background: var(--blue); padding: 0 8px; border-radius: 7px; }
#ticker .k { color: var(--yellow); }
#ticker .bl { color: var(--lamp-b); }

/* ---------- 確認ダイアログ ---------- */
#modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); padding: 20px; }
#modal.show { display: flex; }
#modal .box { background: #fff; border-radius: 20px; padding: 20px; max-width: 380px; width: 100%; box-shadow: var(--shadow); border: 3px solid var(--navy); }
#modal .msg { font-size: 16px; line-height: 1.7; font-weight: 800; text-align: center; white-space: pre-line; }

/* ---------- プレミアム（ログイン・購入） ---------- */
#premium {
  position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .5); padding: 16px; overflow-y: auto;
}
#premium.show { display: flex; }
#premium .box {
  background: #fff; border-radius: 20px; padding: 18px 18px 12px; max-width: 400px; width: 100%;
  box-shadow: var(--shadow); border: 3px solid var(--navy); margin: auto;
}
.premium-kv { width: 72%; margin: 0 auto; border-radius: 14px; box-shadow: var(--shadow-s); }
.premium-title { font-family: var(--display); font-size: 22px; color: var(--navy); text-align: center; margin: 12px 0 8px; }
.premium-list { list-style: none; margin: 0; padding: 0; }
.premium-list li { font-size: 13px; line-height: 1.6; color: var(--sub); padding: 8px 0 8px 22px; position: relative; border-bottom: 1px dashed #d8deea; }
.premium-list li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #e2307a; }
.premium-list li b { display: block; font-size: 15px; color: var(--ink); }
.premium-price { font-family: var(--display); font-size: 30px; color: var(--red); text-align: center; margin: 10px 0 2px; }
.premium-price small { font-family: var(--font); font-size: 13px; font-weight: 800; color: var(--sub); margin-left: 4px; }
.premium-warn { background: #fff3d6; border-radius: 12px; padding: 8px 10px; font-size: 12.5px; line-height: 1.6; color: #7a5a12; font-weight: 800; }
.premium-owned { text-align: center; font-weight: 800; color: var(--navy); line-height: 1.7; margin: 10px 0 0; }
.premium-foot { display: flex; justify-content: center; gap: 18px; margin-top: 6px; }
#premium .btn-link { color: var(--sub); text-shadow: none; }
#premium .note { margin: 8px 0 0; }

/* ---------- 規約などのリンク ---------- */
.legal { text-align: center; margin: 14px 0 0; line-height: 2; }
.legal a { color: #fff; font-size: 11.5px; margin: 0 6px; text-decoration: underline; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font-weight: 500; }

/* ---------- お知らせ ---------- */
/* 出ていないときは、画面の上に少しも見えないようにする */
#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 200%);
  background: rgba(20, 20, 20, .88); color: #fff; font-weight: 800; font-size: 14px;
  padding: 10px 18px; border-radius: 99px; z-index: 90;
  opacity: 0; visibility: hidden; transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s;
  max-width: 92vw; text-align: center;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .25s ease, opacity .25s ease; }

.tip {
  background: rgba(12, 22, 49, .55);
  border-radius: 14px;
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.65;
  margin: 12px 0 0;
}
.tip b { color: var(--yellow); }

@media (max-width: 360px) {
  .catch { font-size: 23px; }
  .pn .w.l1 { font-size: 20px; }
  .pn .w.l2 { font-size: 17.5px; }
  .pn .w.l3 { font-size: 14.5px; }
  .pn .w.l4 { font-size: 13px; }
  .pn .w.l5 { font-size: 12px; }
  .pn .ok { font-size: 9px; }
  .fx-en { font-size: 68px; }
  .fx-so .fx-en { font-size: 62px; }
  .so-en { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-so .rays, .spark { animation: none; }
  .fx-so .fx-en { animation: pop .3s both; }
  .pn .flyer { animation-duration: .01s; }
}
