/* BABEL — 塔 × 雷 × ネオン。色は Figma の紫の夜・マゼンタ・水色・金だけ */
:root {
  --bg: #0b0716;
  --bg2: #140b26;
  --panel: rgba(24, 14, 46, 0.86);
  --panel2: rgba(40, 24, 74, 0.9);
  --line: rgba(190, 150, 255, 0.18);
  --text: #f1ecff;
  --muted: #a99bd0;
  --dim: #6f6392;
  --mag: #ff2e97;
  --mag2: #c21d78;
  --cyan: #36e2ff;
  --gold: #ffd34d;
  --bad: #ff5a5a;
  --good: #3dffa8;
  --r: 6px;
  --cut: 12px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabs-h: 64px;
  --top-h: 56px;
  --rar-N: #9aa3b8;
  --rar-R: #4fa8ff;
  --rar-SR: #c070ff;
  --rar-SSR: #ffd34d;
  --rar-UR: #ff4fd8;
  --rar-base: #6f6392;
  --rar-SECRET: #6dffd8; /* 絆 Lv8 のひみつの服 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; overscroll-behavior: none; }
body {
  font-family: "Chakra Petch", "IBM Plex Sans JP", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-weight: 500; font-size: 16px; line-height: 1.6;
  font-feature-settings: "palt"; letter-spacing: 0.02em;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  background:
    radial-gradient(120% 60% at 50% 110%, rgba(255, 46, 151, 0.22), transparent 60%),
    radial-gradient(90% 50% at 50% -10%, rgba(54, 226, 255, 0.12), transparent 60%),
    var(--bg);
}
button, input, select { font: inherit; color: inherit; }
input { font-size: 16px; -webkit-user-select: text; user-select: text; }
b, strong, h1, h2, h3 { font-weight: 800; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hide { display: none !important; }

#app { position: fixed; inset: 0; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
#layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
#tapfx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 95; }
#layer > * { pointer-events: auto; }
#toasts { position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }

/* ---------- 背景 ---------- */
.bgart { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.bgart::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 7, 22, 0.35), rgba(11, 7, 22, 0.8) 70%, var(--bg)); }
.bg-tower { background-image: url(/img/ui/home_bg_portrait.webp), linear-gradient(180deg, #1b0c34, #0b0716); }
@media (min-aspect-ratio: 1/1) { .bg-tower { background-image: url(/img/ui/home_bg.webp), linear-gradient(180deg, #1b0c34, #0b0716); } }
.bg-grid { background-image: url(/img/ui/stage1_grid_bg_portrait.webp); }
@media (min-aspect-ratio: 1/1) { .bg-grid { background-image: url(/img/ui/stage1_grid_bg.webp); } }
.bg-corridor { background-image: url(/img/ui/stage3_corridor_bg.webp); background-position: center 30%; }

/* ---------- 画面の骨組み ---------- */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; }
.scr > .bgart { position: absolute; }
.top {
  position: relative; z-index: 3; display: flex; align-items: center; gap: 8px;
  height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 12px 0;
  background: linear-gradient(180deg, rgba(11, 7, 22, 0.95), rgba(11, 7, 22, 0.6));
  border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 20px; letter-spacing: 0.08em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; font-size: 22px; color: var(--muted); cursor: pointer; }
.body { position: relative; z-index: 2; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 16px 16px calc(24px + var(--safe-b)); }
.scr.has-tabs .body { padding-bottom: calc(var(--tabs-h) + 24px + var(--safe-b)); }
.col { width: 100%; max-width: 560px; margin: 0 auto; }
.wide { width: 100%; max-width: 960px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
h2.sec { font-size: 14px; letter-spacing: 0.16em; color: var(--muted); margin: 8px 0 0; display: flex; align-items: center; gap: 8px; }
h2.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- 通貨 ---------- */
.wallet { display: flex; gap: 6px; }
.coin { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px 0 6px; border-radius: 15px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.coin i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex: none; }
.coin.gold i { background: radial-gradient(circle at 35% 35%, #fff3b0, var(--gold) 45%, #b8860b); }
.coin.bits i { background: linear-gradient(135deg, #b8fbff, var(--cyan) 50%, #1a7fd1); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border-radius: 0; }
.coin.add { cursor: pointer; }

/* ---------- ボタン ---------- */
.btn {
  --c: var(--mag); --c2: var(--mag2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; cursor: pointer;
  font-weight: 800; font-size: 16px; letter-spacing: 0.06em; color: #fff;
  background: linear-gradient(135deg, var(--c), var(--c2));
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: filter 0.12s, transform 0.08s;
}
.btn:active { transform: scale(0.97); filter: brightness(1.25); }
.btn[disabled] { filter: grayscale(0.9) brightness(0.55); cursor: default; }
.btn.cyan { --c: #1fb8e0; --c2: #1662b8; }
.btn.gold { --c: #ffc933; --c2: #d1811a; color: #2a1600; }
.btn.ghost { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.btn.dark { --c: #2a1c4c; --c2: #1a1030; }
.btn.big { min-height: 64px; font-size: 20px; padding: 0 28px; }
.btn.sm { min-height: 44px; font-size: 14px; padding: 0 14px; --cut: 8px; }
.row > .btn.sm { flex: none; white-space: nowrap; }
.row > input { min-width: 0; flex: 1; }
.btn.block { display: flex; width: 100%; }
.btn small { font-weight: 500; font-size: 12px; opacity: 0.85; }
.btn .sub { display: block; font-size: 12px; font-weight: 500; opacity: 0.85; letter-spacing: 0.02em; }
.linkbtn { background: none; border: 0; color: var(--cyan); text-decoration: underline; cursor: pointer; padding: 8px 4px; min-height: 44px; }
a.linkbtn { display: inline-flex; align-items: center; font-size: 13px; }
.legalrow { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: -8px; }
.legalrow.center { justify-content: center; margin-top: 0; }

/* ---------- 箱 ---------- */
.panel {
  position: relative; background: var(--panel); padding: 16px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: inset 0 0 0 1px var(--line);
}
.panel.tight { padding: 12px; }
.panel.hl { box-shadow: inset 0 0 0 1px rgba(255, 46, 151, 0.55), inset 0 0 24px rgba(255, 46, 151, 0.12); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r); min-height: 56px; }
.item.me { box-shadow: inset 0 0 0 1px var(--cyan); }
.item .ttl { font-weight: 800; }
.item .sub { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 800; line-height: 20px; background: var(--mag); color: #fff; }
.badge.cyan { background: var(--cyan); color: #001a22; }
.badge.gold { background: var(--gold); color: #2a1600; }
.badge.dim { background: rgba(255, 255, 255, 0.12); color: var(--muted); }
.dot { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--mag); box-shadow: 0 0 8px var(--mag); }
.bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--mag), var(--cyan)); border-radius: 4px; }
.tabs2 { display: flex; gap: 4px; padding: 4px; background: rgba(0, 0, 0, 0.35); border-radius: var(--r); }
.tabs2 button { position: relative; flex: 1; min-width: 0; min-height: 44px; padding: 0 4px; line-height: 1.3; border: 0; background: none; border-radius: 4px; font-weight: 800; color: var(--muted); cursor: pointer; }
.tabs2 button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 -2px 0 var(--mag); }
/* 空のときの表示は半透明の板にのせる。塔の絵の上に灰色の字を直に置くと読めなかった（ランキング・2026-09-29） */
.empty { padding: 26px 16px; text-align: center; color: var(--text); font-weight: 800; background: rgba(8, 5, 20, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); text-wrap: balance; word-break: auto-phrase; }
.empty .dim { margin-top: 6px; font-weight: 500; color: var(--muted); text-wrap: balance; word-break: auto-phrase; }
.empty .btn { margin-top: 16px; }
.ontop { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.85); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- 下のタブ ---------- */
.tabs {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(0deg, rgba(11, 7, 22, 0.98), rgba(20, 11, 38, 0.94));
  border-top: 1px solid var(--line);
}
/* 名前は1行のまま。幅が狭い端末では字を小さくする（「コレクショ／ン」と折れた・2026-09-29） */
.tabs button { position: relative; min-width: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: min(11px, 2.8vw); font-weight: 800; color: var(--dim); cursor: pointer; letter-spacing: 0.02em; white-space: nowrap; }
.tabs button svg { width: 26px; height: 26px; }
.tabs button.on { color: var(--text); }
.tabs button.on::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--mag); box-shadow: 0 0 12px var(--mag); }
.tabs button.main { color: #fff; }
.tabs button.main .hexi { width: 52px; height: 46px; margin-top: -18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--mag), #7a1bff); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }

/* ---------- 入力 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.input { min-height: 48px; padding: 0 14px; border: 0; border-radius: var(--r); background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 1px var(--line); outline: none; width: 100%; }
.input:focus { box-shadow: inset 0 0 0 2px var(--cyan); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: rgba(0, 0, 0, 0.3); border-radius: var(--r); cursor: pointer; }
.check input { width: 24px; height: 24px; flex: none; accent-color: var(--mag); margin: 0; }
.range { width: 100%; accent-color: var(--mag); height: 32px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 48px; height: 48px; border: 0; border-radius: var(--r); background: var(--panel2); font-size: 22px; font-weight: 800; cursor: pointer; }
.stepper .v { flex: 1; text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- 重ねる層（モーダル・シート・トースト） ---------- */
.veil { position: fixed; inset: 0; background: rgba(5, 2, 12, 0.72); display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); animation: fadein 0.18s ease-out; }
.veil.sheet { align-items: flex-end; padding: 0; }
.modal { width: min(100%, 440px); max-height: 100%; overflow-y: auto; }
.modal h3 { margin: 0 0 8px; font-size: 20px; }
.modal .acts { display: flex; gap: 8px; margin-top: 16px; }
.modal .acts .btn { flex: 1; }
.veil.sheet .modal { width: min(100%, 560px); max-height: 88%; padding-bottom: calc(16px + var(--safe-b)); animation: up 0.22s ease-out; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%, 0 var(--cut)); }
.x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; z-index: 2; }
.toast { padding: 12px 16px; border-radius: var(--r); background: rgba(24, 14, 46, 0.96); box-shadow: inset 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, 0.5); font-size: 14px; animation: drop 0.22s ease-out; }
.toast.err { box-shadow: inset 0 0 0 1px var(--bad), 0 8px 24px rgba(0, 0, 0, 0.5); }
.toast.good { box-shadow: inset 0 0 0 1px var(--good), 0 8px 24px rgba(0, 0, 0, 0.5); }
@keyframes fadein { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pulse { 50% { opacity: 0.45; } }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

/* ---------- キャラ ---------- */
.face { display: inline-block; vertical-align: middle; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg2); box-shadow: 0 0 0 2px var(--ring, var(--line)); }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; clip-path: circle(50%); }
.face.sm { width: 36px; height: 36px; }
.face.lg { width: 72px; height: 72px; }
.stand { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.stand img { max-height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 0 24px rgba(255, 46, 151, 0.25)); }
.rar { font-weight: 800; letter-spacing: 0.04em; }
.rar-N { color: var(--rar-N); } .rar-R { color: var(--rar-R); } .rar-SR { color: var(--rar-SR); } .rar-SSR { color: var(--rar-SSR); } .rar-UR { color: var(--rar-UR); } .rar-base { color: var(--rar-base); }

/* ---------- タイトル ---------- */
.title-scr { align-items: center; justify-content: flex-end; text-align: center; cursor: pointer; }
.logo { position: relative; z-index: 2; font-size: clamp(56px, 18vw, 120px); font-weight: 800; letter-spacing: 0.24em; margin: 0 0 0 0.24em; line-height: 1; color: #fff; text-shadow: 0 0 18px var(--mag), 0 0 42px rgba(255, 46, 151, 0.6), 0 0 2px #fff; }
.logo-sub { position: relative; z-index: 2; margin: 12px 0 0; color: var(--muted); letter-spacing: 0.3em; font-size: 13px; }
.tap { position: relative; z-index: 2; margin: 48px 0 calc(64px + var(--safe-b)); font-size: 16px; letter-spacing: 0.3em; animation: pulse 1.6s ease-in-out infinite; }
.title-foot { position: absolute; z-index: 2; bottom: calc(12px + var(--safe-b)); left: 0; right: 0; font-size: 11px; color: var(--dim); }

/* ---------- プロフィール作成 ---------- */
.pick-stage { position: relative; height: min(52vh, 460px); display: flex; align-items: flex-end; justify-content: center; }
.pick-stage img { height: 100%; max-width: 100%; object-fit: contain; object-position: bottom; }
.pick-name { position: absolute; left: 0; bottom: 16px; z-index: 2; padding: 8px 16px 8px 12px; background: linear-gradient(90deg, var(--c, var(--mag)), transparent); font-size: 28px; font-weight: 800; letter-spacing: 0.12em; }
.pick-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; }
.pick-row button { flex: none; border: 0; padding: 0; background: none; cursor: pointer; scroll-snap-align: center; }
.pick-row button.on .face { box-shadow: 0 0 0 3px var(--mag), 0 0 16px var(--mag); }
.pick-row .locked .face img { filter: brightness(0) ; }

/* ---------- ホーム ---------- */
.home { position: absolute; inset: 0; }
.home-stand { position: absolute; left: 0; right: 0; bottom: calc(var(--tabs-h) + var(--safe-b)); top: calc(var(--top-h) + var(--safe-t) + 40px); display: flex; justify-content: center; align-items: flex-end; pointer-events: none; z-index: 1; }
.home-stand img { pointer-events: auto; cursor: pointer; height: 100%; max-width: 92%; object-fit: contain; object-position: bottom; animation: breathe 5s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 0 32px rgba(255, 46, 151, 0.28)); }
/* 動く立ち絵（rig.js）。最初のコマを描けたら img と入れ替える。img は透明のままタップを受ける */
.rig-cv { position: absolute; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.rig-cv.on { opacity: 1; }
img.rigged { opacity: 0 !important; animation: none !important; transition: opacity 0.4s; }
@keyframes breathe { 50% { transform: translateY(-4px) scale(1.006); } }
/* 1枚絵の弾み（soft.js）で WebGL が無い端末: 絵そのものを足元から弾ませる */
img.poyo { animation: poyo 0.75s cubic-bezier(0.3, 0.6, 0.4, 1) 1 !important; transform-origin: 50% 100%; }
@keyframes poyo { 0% { transform: scale(1, 1); } 18% { transform: scale(1.06, 0.92); } 40% { transform: scale(0.97, 1.05); } 62% { transform: scale(1.025, 0.975); } 82% { transform: scale(0.992, 1.01); } 100% { transform: scale(1, 1); } }
.bubble { position: absolute; z-index: 3; left: 16px; right: 96px; top: calc(var(--top-h) + var(--safe-t) + 64px); max-width: 320px; padding: 12px 14px; background: rgba(255, 255, 255, 0.94); color: #1a1030; border-radius: 14px 14px 14px 4px; font-size: 15px; line-height: 1.6; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); word-break: keep-all; overflow-wrap: anywhere; animation: pop 0.3s ease-out; }
.side { position: absolute; z-index: 4; right: 8px; top: calc(var(--top-h) + var(--safe-t) + 12px); display: flex; flex-direction: column; gap: 8px; }
.side button, .sidel button { position: relative; width: 60px; min-height: 60px; padding: 4px 2px; white-space: nowrap; border: 0; border-radius: 10px; background: rgba(11, 7, 22, 0.72); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 800; color: var(--text); cursor: pointer; }
.side svg, .sidel svg { width: 24px; height: 24px; }
.sidel { position: absolute; z-index: 4; left: 8px; bottom: calc(var(--tabs-h) + var(--safe-b) + 96px); display: flex; flex-direction: column; gap: 8px; }
.home-cta { position: absolute; z-index: 4; left: 16px; right: 16px; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); display: flex; gap: 8px; justify-content: center; }
.home-cta .btn { flex: 1; max-width: 300px; }
/* 縦向きは吹き出しが顔にかぶる。「対戦へ」の上（脚のあたり）に出し、左下の「観戦」と右の列は避ける */
@media (orientation: portrait) {
  .bubble { top: auto; bottom: calc(var(--tabs-h) + var(--safe-b) + 96px); left: 80px; right: 76px; border-radius: 14px 14px 4px 14px; }
}
.prof { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; flex: 1; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.prof .nm { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof .rk { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (orientation: landscape) and (max-height: 520px) {
  .home-stand { left: 20%; right: 20%; top: calc(var(--top-h) + var(--safe-t)); }
  .bubble { top: calc(var(--top-h) + var(--safe-t) + 12px); right: auto; width: 30%; }
  .sidel { bottom: auto; top: calc(var(--top-h) + var(--safe-t) + 110px); }
  .home-cta { left: auto; right: 80px; width: 300px; }
}

/* ---------- 六角形のメニュー ---------- */
.hexgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hex {
  position: relative; border: 0; cursor: pointer; padding: 18px 14px; min-height: 132px; text-align: left; color: #fff;
  background: linear-gradient(145deg, var(--c, #3a1a70), var(--c2, #160a2c));
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
}
.hex:active { filter: brightness(1.2); }
.hex .h { font-size: 20px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.3; }
.hex .s { font-size: 13px; opacity: 0.9; }
.hex .when { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hex.full { grid-column: 1 / -1; min-height: 148px; }
.hex.m100 { --c: #ff2e97; --c2: #5a0d68; }
.hex.m20 { --c: #8a3dff; --c2: #26105a; }
.hex.m1 { --c: #17a7d6; --c2: #0f2c5c; }
.hex.mc { --c: #3a2b66; --c2: #1a1030; }
.hex.mt { --c: #1d6b5e; --c2: #0e2a2c; }
.hex[disabled] { filter: grayscale(0.8) brightness(0.6); }

/* ---------- 待合室 ---------- */
.count { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: 0.04em; }
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.faces .m { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); min-width: 0; }
.faces .m span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keybox { font-size: 40px; font-weight: 800; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; color: var(--cyan); }

/* ---------- 試合の共通 ---------- */
.game { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
body:has(.game) { background: var(--bg); }
.hud { position: absolute; z-index: 20; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + 8px) 12px 8px; display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, rgba(11, 7, 22, 0.92), rgba(11, 7, 22, 0)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud .stg { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); line-height: 1.2; }
.hud .stg b { display: block; font-size: 16px; color: var(--text); letter-spacing: 0.06em; }
.hud .clock { margin-left: auto; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(54, 226, 255, 0.6); }
.hud .clock.warn { color: var(--mag); text-shadow: 0 0 12px var(--mag); }
.hud .menu { width: 44px; height: 44px; border: 0; background: rgba(0, 0, 0, 0.4); border-radius: 50%; color: var(--muted); font-size: 20px; cursor: pointer; }
.stampbar { position: absolute; z-index: 25; right: 12px; bottom: calc(12px + var(--safe-b)); }
.stampbtn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(24, 14, 46, 0.9); box-shadow: inset 0 0 0 1px var(--line); font-size: 20px; cursor: pointer; }
.stamps { position: absolute; right: 0; bottom: 56px; display: grid; grid-template-columns: repeat(3, auto); gap: 6px; padding: 8px; background: rgba(24, 14, 46, 0.96); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.stamps button { min-height: 44px; padding: 0 10px; border: 0; border-radius: 20px; background: var(--panel2); font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.says { position: absolute; z-index: 24; left: 12px; bottom: calc(72px + var(--safe-b)); display: flex; flex-direction: column-reverse; gap: 6px; pointer-events: none; max-width: 70%; }
.say { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; background: rgba(24, 14, 46, 0.9); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; animation: drop 0.2s ease-out; }
.say b { font-size: 11px; color: var(--muted); font-weight: 500; }

.cut { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; pointer-events: none; background: rgba(5, 2, 12, 0.55); animation: fadein 0.2s ease-out; }
.cut .big { font-size: clamp(36px, 11vw, 88px); font-weight: 800; letter-spacing: 0.12em; line-height: 1.15; text-shadow: 0 0 18px var(--mag), 0 0 48px rgba(255, 46, 151, 0.6); animation: pop 0.45s ease-out; padding: 0 16px; }
.cut .small { margin-top: 12px; font-size: 16px; color: var(--muted); letter-spacing: 0.2em; }
/* 画面が持つ効果のキャンバス（vfx.playOn）。カットインの帯・優勝のオーラ・タイトルの雷・待合室の輪 */
.ownfx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cut > :not(.ownfx) { position: relative; }
.cut .big { text-shadow: 0 2px 0 rgba(5, 2, 12, 0.9), 0 0 18px var(--mag), 0 0 48px rgba(255, 46, 151, 0.6); }
.title-scr > .ownfx { z-index: 1; }
.rclock > .rpulse { inset: -30%; width: 160%; height: 160%; z-index: -1; }
.intro { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: calc(var(--safe-t) + 64px) 16px calc(var(--safe-b) + 24px); text-align: center; background: rgba(8, 4, 18, 0.78); overflow-y: auto; }
.intro .n { font-size: 14px; letter-spacing: 0.4em; color: var(--cyan); }
.intro h2 { font-size: clamp(32px, 9vw, 56px); margin: 8px 0 16px; letter-spacing: 0.1em; text-shadow: 0 0 20px var(--mag); }
.intro ol { text-align: left; max-width: 460px; margin: 0; padding-left: 1.4em; line-height: 1.8; }
.intro .t { margin-top: 20px; font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* ルール説明の間の実況。中ほどの帯（.subtitle.band）はルールに重なるので、この間は隠してここに出す */
.intro .isay { margin: 0 0 14px; max-width: 560px; padding: 6px 14px; font-size: 15px; font-weight: 800; line-height: 1.5; color: #fff; text-shadow: 0 0 12px rgba(255, 46, 151, 0.75); border-top: 1px solid rgba(255, 46, 151, 0.55); border-bottom: 1px solid rgba(54, 226, 255, 0.55); animation: dropy 0.25s ease-out; }
.intro .isay:empty { display: none; }
body:has(#app .game > .intro:not(.hide)) #layer > .subtitle.band, body:has(#app .game > .opening) #layer > .subtitle.band { visibility: hidden; }
.intro > :first-child { margin-top: auto; }
.intro > :last-child { margin-bottom: auto; }

.result { position: fixed; inset: 0; z-index: 68; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); background: rgba(5, 2, 12, 0.86); overflow-y: auto; }
.result .rcard { width: min(100%, 440px); margin: auto; text-align: center; }
.result .place { font-size: clamp(64px, 20vw, 120px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; animation: pop 0.5s ease-out; }
.result .place small { font-size: 0.3em; margin-left: 4px; color: var(--muted); }
.result .gets { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
@media (orientation: landscape) and (max-height: 520px) {
  .result .rcard { width: min(100%, 720px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; text-align: left; }
  .result .gets { justify-content: flex-start; }
}

/* ---------- 1回戦 ---------- */
.s1map { position: absolute; inset: 0; touch-action: none; }
.s1map canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.s1me { position: absolute; z-index: 21; left: 12px; right: 72px; top: calc(var(--safe-t) + 64px); display: flex; gap: 8px; pointer-events: none; }
.s1me .st { padding: 6px 12px; background: rgba(11, 7, 22, 0.8); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--muted); line-height: 1.3; }
.s1me .st b { display: block; font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.s1me .st.wins b { color: var(--gold); }
.s1act { position: absolute; z-index: 22; left: 12px; right: 72px; bottom: calc(12px + var(--safe-b)); display: flex; gap: 8px; }
.s1act .btn { flex: 1; }
.target { position: absolute; z-index: 27; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--safe-b)); width: min(92vw, 420px); }
.target .row .btn { flex: 1; }
.target .xbtn { flex: none; }
/* 後ろの吹き出しや顔が透けて見えないように、不透明にする（2026-09-29） */
.target.panel { background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 42%), #140c28; }

.duel { position: absolute; z-index: 14; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: calc(var(--safe-t) + 64px) 12px calc(var(--safe-b) + 16px); background: radial-gradient(80% 60% at 50% 50%, rgba(40, 10, 70, 0.9), rgba(8, 4, 18, 0.96)); }
.duel .vs { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; max-width: 480px; }
.duel .who { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.duel .who .nm { font-weight: 800; font-size: 14px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel .who .pt { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.duel .role { font-size: 13px; letter-spacing: 0.2em; color: var(--cyan); }
/* 交渉のひとこと。2行ぶんの場所を先に取る（26文字まで・tools/voice/gen_deal_lines.mjs） */
.duel .who .dsay { position: relative; width: 100%; min-height: calc(2 * 1.45em + 8px); margin-top: 6px; padding: 4px 8px; border-radius: 10px; font-size: 12px; font-weight: 800; line-height: 1.45; text-align: center; overflow-wrap: anywhere; word-break: auto-phrase; text-wrap: balance; visibility: hidden; }
.duel .who .dsay.on { visibility: visible; background: rgba(5, 2, 12, 0.84); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.5), 0 0 14px rgba(54, 226, 255, 0.22); animation: sayin 0.22s ease-out; }
.duel .who .dsay.on::before { content: ""; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px; margin-left: -5px; background: rgba(5, 2, 12, 0.92); box-shadow: -1px -1px 0 rgba(54, 226, 255, 0.5); transform: rotate(45deg); }
.duel .msg { min-height: 1.6em; font-weight: 800; text-align: center; }
.dirs { position: relative; width: min(84vw, 44vh, 340px); aspect-ratio: 1; }
.dir { position: absolute; width: 30%; aspect-ratio: 1; border: 0; cursor: pointer; transform: translate(-50%, -50%); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); background: linear-gradient(145deg, #4b2a8a, #1d0f3a); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; }
.dir .v { font-size: clamp(20px, 6vw, 30px); line-height: 1; font-variant-numeric: tabular-nums; }
.dir .a { font-size: 18px; line-height: 1; opacity: 0.8; }
.dir.pick { background: linear-gradient(145deg, var(--mag), #7a1bff); box-shadow: 0 0 24px var(--mag); }
.dir.dead { background: #120a22; color: var(--dim); cursor: default; }
.dir.hitA { background: linear-gradient(145deg, #1fb8e0, #1662b8); }
.dir.hitR { background: linear-gradient(145deg, #ffc933, #d1811a); color: #2a1600; }
.dirs .core { position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 2px var(--line); }
.dlog { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 12px; color: var(--muted); }
.deal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (orientation: landscape) and (max-height: 520px) {
  .duel { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 20px; row-gap: 6px; align-items: center; justify-items: center; align-content: center; padding: calc(var(--safe-t) + 52px) 16px calc(var(--safe-b) + 8px); }
  .duel > .vs { grid-column: 1; grid-row: 1; }
  .duel > .role { grid-column: 1; grid-row: 2; }
  .duel > .msg { grid-column: 1; grid-row: 3; align-self: start; }
  .duel > .dlog { grid-column: 1; grid-row: 4; }
  .duel > .dirs { grid-column: 2; grid-row: 1 / 5; width: min(46vw, calc(100vh - var(--safe-t) - var(--safe-b) - 64px), 300px); }
  .duel .who .face.lg { width: 56px; height: 56px; }
  .duel.deal { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: none; grid-auto-rows: auto; row-gap: 8px; }
  .duel.deal > .vs { grid-column: 1; grid-row: 1 / 6; flex-direction: column; gap: 6px; }
  .duel.deal > :not(.vs) { grid-column: 2; grid-row: auto; }
  /* 横向きの交渉: 顔の右に名前・点・ひとことを並べる（縦に積むと 390 の高さからはみ出した） */
  .duel.deal .who { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; justify-items: start; text-align: left; width: 100%; }
  .duel.deal .who > .face { grid-row: 1 / 4; }
  .duel.deal .who .dsay { margin-top: 2px; padding: 3px 8px; min-height: calc(2 * 1.4em + 6px); line-height: 1.4; text-align: left; }
  .duel.deal .who .dsay.on::before { left: 16px; }
  .duel.deal > .vs { gap: 2px; }
  .dirs .core { font-size: 22px; }
}

/* ---------- 2回戦 ---------- */
.s2 { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 60px) 8px calc(var(--safe-b) + 8px); gap: 8px; }
.seats { display: flex; gap: 4px; overflow-x: auto; flex: none; padding: 2px; }
.seat { flex: 1 0 54px; max-width: 72px; padding: 4px 2px; border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10px; line-height: 1.3; position: relative; }
.seat .nm { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.seat .cn { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.seat.turn { box-shadow: inset 0 0 0 2px var(--mag), 0 0 16px rgba(255, 46, 151, 0.6); }
.seat.me { background: rgba(54, 226, 255, 0.12); }
.seat.out { opacity: 0.4; }
.seat.win { box-shadow: inset 0 0 0 2px var(--gold); }
.seat.zero .cn { color: var(--bad); }
.board { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 3px; container-type: size; }
.brow { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; align-items: stretch; }
.card { position: relative; padding: 0; border-radius: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; background: #f4efff; color: #1a1030; font-size: clamp(9px, min(3cqw, 6cqh), 18px); }
.card .su { font-size: 0.75em; }
.card.red { color: #d0145f; }
.card.alt { background: #e7fbff; }
.card.empty { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); color: transparent; }
.card.seven { box-shadow: inset 0 0 0 2px var(--gold); }
.card.new { animation: pop 0.35s ease-out; box-shadow: 0 0 12px var(--cyan); }
.card.can { box-shadow: inset 0 0 0 2px var(--cyan); background: rgba(54, 226, 255, 0.18); color: transparent; }
.hand { flex: none; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 4px; overflow-x: hidden; overflow-y: auto; padding: 8px 2px 4px; min-height: 76px; max-height: 142px; }
/* 札は押しやすさのため44px幅のまま。入りきらない分は2段目に折り返す */
.hand .card { width: 44px; height: 62px; flex: none; font-size: 17px; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: transform 0.1s; }
.hand .card.ok { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--cyan), 0 0 14px var(--cyan); }
.hand .card.no { filter: brightness(0.55); }
.hand .card.shown::after { content: "公開"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 9px; background: var(--mag); color: #fff; padding: 0 4px; border-radius: 4px; }
.card.joker { background: linear-gradient(145deg, #2a0f4a, #ff2e97); color: #fff; font-size: 13px; }
.hand .card.joker { font-size: 11px; letter-spacing: 0; }
.s2bar { flex: none; display: flex; gap: 8px; align-items: center; padding-right: 60px; }
.s2bar .btn { flex: none; min-width: 112px; }
.s2info { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.s2info b { color: var(--text); font-variant-numeric: tabular-nums; }
.tablesw { display: flex; gap: 6px; }
@media (orientation: landscape) and (max-height: 520px) {
  .s2 { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; padding: calc(var(--safe-t) + 52px) calc(env(safe-area-inset-right, 0px) + 8px) calc(var(--safe-b) + 8px) calc(env(safe-area-inset-left, 0px) + 8px); }
  .s2 > * { min-width: 0; }
  .s2info { grid-column: 2; grid-row: 1; }
  .tablesw { grid-column: 2; grid-row: 2; flex-wrap: wrap; }
  .seats { grid-column: 1; grid-row: 1; }
  .board { grid-column: 1; grid-row: 2 / 5; }
  .hand { grid-column: 2; grid-row: 2 / 4; min-height: 0; max-height: none; justify-content: flex-start; }
  .hand .card { width: 44px; height: 58px; font-size: 16px; }
  .s2bar { grid-column: 2; grid-row: 4; flex-wrap: wrap; row-gap: 4px; }
  .s2bar .s2hint { flex: 1 1 100%; font-size: 12px; }
  .seat { flex: none; max-width: none; width: auto; min-width: 92px; min-height: 44px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 4px; row-gap: 0; align-items: center; justify-items: start; padding: 3px 5px; text-align: left; }
  .seat .face { grid-row: 1 / 3; width: 28px; height: 28px; }
  .seat .nm { grid-column: 2; grid-row: 1; max-width: 56px; }
  .seat .cn { grid-column: 3; grid-row: 1; }
  .seat .bk { grid-column: 2; grid-row: 2; }
  .seat .ps { grid-column: 3; grid-row: 2; min-height: 0; }
}

/* ---------- 3回戦 ---------- */
.s3 { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 60px) 12px calc(var(--safe-b) + 68px); gap: 12px; }
.s3 .duo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; width: 100%; max-width: 560px; }
.s3 .p { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.s3 .p .nm { font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s3 .p .sc { font-size: 48px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.s3 .vsx { font-size: 32px; font-weight: 800; color: var(--mag); text-shadow: 0 0 16px var(--mag); }
.hands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 420px; }
.handbtn { aspect-ratio: 1; border: 0; cursor: pointer; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4b2a8a, #1d0f3a); box-shadow: inset 0 0 0 2px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; }
.handbtn .pt { font-size: 11px; color: var(--muted); font-weight: 500; }
.handbtn.on { background: radial-gradient(circle at 40% 35%, var(--mag), #5a0d68); box-shadow: 0 0 24px var(--mag); }
.s3 .phase { font-size: clamp(15px, 4.6vw, 20px); font-weight: 800; letter-spacing: 0.08em; text-align: center; }
.s3 .rule { font-size: 12px; color: var(--muted); text-align: center; max-width: 420px; }
.s3stand { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; opacity: 0.35; }
.s3stand img { height: 78%; max-width: 50%; object-fit: contain; }
/* 向かい合わせ。動く立ち絵（.rig-cv）は img のすぐ後ろに入るので、同じく裏返す */
.s3stand > .flip, .s3stand > .flip + .rig-cv { transform: scaleX(-1); }

/* ---------- 観戦・BET ---------- */
.betpanel { position: absolute; z-index: 26; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); }
.cands { display: flex; flex-direction: column; gap: 6px; }
.cand { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; width: 100%; text-align: left; border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; min-height: 56px; }
.cand.on { box-shadow: inset 0 0 0 2px var(--mag); }
.cand .odds { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cand .odds b { display: block; color: var(--gold); font-size: 16px; }
.ai { padding: 12px 14px; border-radius: var(--r); background: linear-gradient(90deg, rgba(54, 226, 255, 0.14), rgba(54, 226, 255, 0.02)); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.35); font-size: 14px; }
.ai b { color: var(--cyan); margin-right: 6px; }

/* ---------- コレクション・ガチャ ---------- */
/* コレクションは2列で大きく（3列だと小さい・社長 2026-09-30）。キャラ一覧は頭から太ももまで、服の一覧は全身 */
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (orientation: landscape) and (max-height: 520px) { .cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cgrid .ccard .lb { padding: 6px 10px; font-size: 14px; }
.cgrid .ccard .rb { top: 6px; left: 6px; padding: 1px 8px; font-size: 13px; }
.cgrid .ccard .lock { width: 40px; height: 40px; }
.cgrid.cos .ccard { aspect-ratio: 5 / 8; }
.cgrid.cos .ccard img { inset: 4% 3% 13%; width: 94%; height: 83%; }
.cgrid.cos .ccard.art { grid-column: span 2; aspect-ratio: 4 / 3; }
.cgrid.cos .ccard.art img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.cgrid.cos .ccard.art::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--rc), inset 0 0 16px var(--rc); pointer-events: none; }
.cgrid.cos .ccard.art .rb, .cgrid.cos .ccard.art .lb, .cgrid.cos .ccard.art::after { z-index: 2; }
.cgrid.chars .ccard img { inset: auto; left: 50%; top: 3%; width: auto; height: 140%; max-width: none; object-fit: fill; transform: translateX(-50%); }
.ccard { position: relative; border: 0; padding: 0; cursor: pointer; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: linear-gradient(180deg, #25154a, #0f0820); box-shadow: inset 0 0 0 2px var(--rc, var(--line)); color: var(--text); }
.ccard img { position: absolute; inset: 6% 4% 18%; width: 92%; height: 76%; object-fit: contain; object-position: bottom; }
.ccard .lb { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, 0.6); text-align: left; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .rb { position: absolute; top: 4px; left: 4px; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.6); color: var(--rc); }
.ccard.off img { filter: brightness(0); opacity: 0.55; }
.ccard.eq::after { content: "装備中"; position: absolute; top: 4px; right: 4px; font-size: 10px; font-weight: 800; padding: 0 6px; border-radius: 8px; background: var(--cyan); color: #001a22; }
/* 字の帯と立ち絵の場所を分ける。字を絵の上にのせると、服やキャラによって顔・フードにかぶった（社長のスクショ・2026-09-29） */
.gbanner { position: relative; height: min(50vh, 420px); overflow: hidden; border-radius: var(--r); background: radial-gradient(80% 80% at 50% 100%, rgba(255, 46, 151, 0.35), transparent 70%), linear-gradient(180deg, #1c0b38, #0b0716); display: flex; flex-direction: column; }
.gbanner .cap { position: relative; z-index: 1; flex: none; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(180deg, rgba(11, 7, 22, 0.94), rgba(11, 7, 22, 0.8)); border-bottom: 1px solid rgba(255, 46, 151, 0.35); }
.gcap-rate { font-size: 13px; }
.gcap-term { font-size: 12px; font-weight: 700; color: var(--gold); }
/* 企画の切り替え（開いている企画が2つ以上のときだけ出る）。増えたら横に送る。確率と値段はどの企画も同じなので、札の見た目に差をつけない
   2026-09-30 社長「ガチャは企画、イベントに分けて複数作りたい」 */
.gtabs { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.gtabs::-webkit-scrollbar { display: none; }
.gtab { flex: 1 0 auto; min-width: 132px; max-width: 78%; min-height: 48px; padding: 6px 12px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; text-align: left; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.gtab b { font-size: 14px; line-height: 1.25; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gtab small { font-size: 11px; color: var(--dim); }
.gtab.on { border-color: var(--mag); color: var(--text); background: linear-gradient(180deg, rgba(255, 46, 151, 0.22), rgba(255, 46, 151, 0.06)); box-shadow: 0 0 12px rgba(255, 46, 151, 0.35); }
.gtab.on small { color: var(--gold); }
.grates dd small { display: block; font-size: 11px; color: var(--dim); }
/* 看板の見せ場: 今日の注目の一枚絵を札の舞台（cards.css の .tc-stage）に敷き、着たときの効果をギラギラの数字で見せる。約4.5秒ごとに UR → SSR → キャラ枠と替わる
   2026-09-30 社長「ガチャのところは特にギラギラとレア装飾感とそのキャラで得られる効果もギラギラPRする感じで、引きたい！当てたい！と思わせて」
   字は絵の下の暗い帯にまとめる（顔にかぶせない）。数字はカタログから作る（screens/gacha.js の prPlate） */
.gshow { flex: 1; min-height: 0; cursor: pointer; border-radius: 0 0 var(--r) var(--r); -webkit-tap-highlight-color: transparent; }
.gshow > .gs-art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 16%; }
.gshow.stand > .gs-art { inset: auto; left: 50%; top: 4%; width: auto; height: 175%; translate: -50% 0; object-fit: contain; filter: drop-shadow(0 0 18px var(--tc-cc, var(--tc-c))); }
.gshow.in > .gs-art { animation: gsart 0.5s cubic-bezier(0.15, 0.85, 0.3, 1) both; }
@keyframes gsart { from { opacity: 0; scale: 1.12; } to { opacity: 1; scale: 1; } }
.gshow > .gs-glint { inset: 0; overflow: hidden; }
.gshow > .gs-glint::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 46%; transform: skewX(-20deg); background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0)); mix-blend-mode: screen; opacity: 0; }
.gshow.in > .gs-glint::before { animation: gsglint 0.9s ease-out 0.12s both; }
@keyframes gsglint { from { left: -60%; opacity: 1; } 99% { opacity: 1; } to { left: 120%; opacity: 0; } }
.gshow > .gs-pr { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 44px calc(var(--tc-bw) + 12px) calc(var(--tc-bw) + 16px); background: linear-gradient(180deg, rgba(6, 3, 16, 0), rgba(6, 3, 16, 0.78) 38%, rgba(6, 3, 16, 0.95)); pointer-events: none; }
.gshow.in > .gs-pr > * { animation: sayin 0.3s ease-out 0.18s both; }
.gs-chip { padding: 1px 9px; border-radius: 6px; font-size: 11px; font-weight: 900; letter-spacing: 0.06em; color: #2a1600; background: linear-gradient(180deg, #fff3b0, #ffc933 60%, #e0901e); box-shadow: 0 0 10px rgba(255, 201, 51, 0.55); }
.gs-name { max-width: 100%; font-size: 15px; font-weight: 900; line-height: 1.25; color: #fff; text-shadow: 0 0 10px var(--tc-c), 0 1px 4px #000; overflow-wrap: anywhere; }
.gshow > .gs-dots { position: absolute; right: calc(var(--tc-bw) + 10px); bottom: calc(var(--tc-bw) + 6px); display: flex; gap: 5px; pointer-events: none; }
.gs-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.gs-dots i.on { width: 16px; border-radius: 3px; background: #fff; box-shadow: 0 0 8px var(--tc-c); }
/* 効果のギラギラの板（看板・発表・最後の1枚で共通）。金の抜き文字に光の筋が流れる。UR とキャラは虹 */
.gpr { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; line-height: 1.08; font-family: "Chakra Petch", "IBM Plex Sans JP", sans-serif; }
.gpr small { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: #ffe9a8; text-shadow: 0 1px 3px #000, 0 0 8px rgba(255, 190, 50, 0.6); }
.gpr-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; font-weight: 900; font-style: italic; }
.gpr-big > span, .gpr-big > em {
  padding: 0 0.14em 0 0.02em;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.96) 50%, rgba(255, 255, 255, 0) 58%) 100% 0 / 300% 100% no-repeat, linear-gradient(180deg, #fffbe2 0%, #ffe27a 38%, #f0a81c 58%, #fff0a8 78%, #d98a10 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 #4a2500) drop-shadow(0 0 7px rgba(255, 190, 50, 0.8));
  animation: gprsheen 2.8s ease-in-out infinite;
}
.gpr-big > span { font-size: 17px; letter-spacing: 0.02em; }
.gpr-big > em { font-size: 40px; letter-spacing: 0.01em; }
.gpr.ur .gpr-big > span, .gpr.ur .gpr-big > em {
  background-image: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.96) 50%, rgba(255, 255, 255, 0) 58%), linear-gradient(90deg, #ff8ae8, #ffe36b 28%, #8dffc8 52%, #8fe2ff 74%, #d0adff);
  filter: drop-shadow(0 1px 0 #2a0038) drop-shadow(0 0 7px rgba(255, 79, 216, 0.85));
}
@keyframes gprsheen { 0%, 45% { background-position: 100% 0, 0 0; } 100% { background-position: 0 0, 0 0; } }
.gpr-sub { font-size: 12px; font-weight: 800; font-style: normal; color: #fff; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, 0.8); }
/* 発表と最後の1枚では真ん中寄せ。後ろに暗い帯を敷いて、絵の上でも読めるようにする */
.gpr.rev, .gpr.sm { align-items: center; text-align: center; padding: 5px 26px 6px; background: linear-gradient(90deg, rgba(5, 2, 12, 0), rgba(5, 2, 12, 0.82) 16%, rgba(5, 2, 12, 0.82) 84%, rgba(5, 2, 12, 0)); animation: sayin 0.3s ease-out 0.6s both; }
.gpr.rev .gpr-big, .gpr.sm .gpr-big { justify-content: center; }
.gpr.rev .gpr-big > em { font-size: clamp(30px, 9vw, 42px); }
.gpr.sm { animation-delay: 0s; }
.gpr.sm .gpr-big > span { font-size: 15px; }
.gpr.sm .gpr-big > em { font-size: 30px; }
@media (orientation: landscape) and (max-height: 520px) {
  /* 横向きは背が低い。絵は右、字は左に分ける（重ねると顔が字に隠れた） */
  .gshow > .gs-art { left: 38%; width: 62%; -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 24%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 24%); }
  .gshow.stand > .gs-art { left: 70%; width: auto; -webkit-mask-image: none; mask-image: none; }
  .gshow > .gs-pr { top: 0; right: auto; width: 64%; justify-content: flex-end; gap: 2px; padding: 0 8px calc(var(--tc-bw) + 8px) calc(var(--tc-bw) + 10px); background: linear-gradient(90deg, rgba(6, 3, 16, 0.92), rgba(6, 3, 16, 0.78) 60%, rgba(6, 3, 16, 0)); }
  /* 長い服の名前が2行になると、低い看板では上の札に重なった。1行にして、入らない分は「…」で切る。
     期間は右の切り替えの札に出ているので、看板の中の行は出さない（1行増えると絵の場所が減って字が上にはみ出た・幅667で確認） */
  .gshow > .gs-pr > .gs-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gachacol.has-gtabs .gcap-term { display: none; }
  .gpr-big > em { font-size: 34px; }
  .gpr.rev, .gpr.sm { padding: 3px 18px 4px; }
  .gpr.rev .gpr-big > span, .gpr.sm .gpr-big > span { font-size: 14px; }
  .gpr.rev .gpr-big > em, .gpr.sm .gpr-big > em { font-size: 26px; }
}
/* 高さ410以下の横向きでは「今日の注目」の札が左上のレアの札の裏にもぐった（幅844×高さ390で確認）。置き場が無いので出さない（レアの札と名前で足りる） */
@media (orientation: landscape) and (max-height: 410px) {
  .gshow > .gs-pr > .gs-chip { display: none; }
}
/* 幅720以下の横向き（iPhone SE など）は左の列が310しかなく、効果の数字が2行に折れて名前がレアの札の裏にもぐった（幅667×高さ375で確認）。
   字の場所を看板いっぱいに広げて数字を1行にし、「着て戦うと」の行は出さない */
@media (orientation: landscape) and (max-height: 410px) and (max-width: 720px) {
  .gshow > .gs-pr { width: 100%; background: linear-gradient(90deg, rgba(6, 3, 16, 0.92), rgba(6, 3, 16, 0.7) 55%, rgba(6, 3, 16, 0.15)); }
  .gshow > .gs-pr .gpr > small { display: none; }
  .gshow > .gs-pr .gpr-big > span { font-size: 15px; }
  .gshow > .gs-pr .gpr-big > em { font-size: 28px; }
}
/* 1回と10連のボタンは高さをそろえる */
.gbtns { align-items: stretch; }
.gbanner .cap h3 { margin: 0; font-size: 24px; letter-spacing: 0.08em; text-shadow: 0 0 16px var(--mag); }
.gres { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gres .ccard { animation: pop 0.4s ease-out both; }
/* ガチャの札の名前は2行（キャラ名／服の名前）。スマホ縦は4列にして、余った札は真ん中に寄せる（5列だと名前が全部切れた・2026-09-29） */
.gcard img { height: 66%; }
.gcard .lb { display: flex; flex-direction: column; padding: 3px 4px 4px; white-space: normal; line-height: 1.25; }
.gcard .lb small, .gcard .lb b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.05em; } /* 服の名前は最長7文字。スマホ縦の幅83pxで切れないように */
.gcard .lb small { font-size: 10px; font-weight: 700; color: var(--rc, var(--muted)); }
@media (max-width: 440px) and (orientation: portrait) {
  .gres:not(.one):not(.sum) { display: flex; flex-wrap: wrap; justify-content: center; }
  .gres:not(.one):not(.sum) > .ccard { width: calc((100% - 18px) / 4); }
}
.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sitem { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.sitem .nm { font-weight: 800; font-size: 14px; line-height: 1.4; min-height: 2.8em; }
.sitem img { width: 100%; height: 120px; object-fit: contain; object-position: bottom; }
/* 服の札: 立ち絵を頭から膝まで大きく。格付けの色で縁と背景を付ける（2026-09-29 社長「キャラ画像をもっと目立たせて」） */
.shopgrid.cosgrid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; }
button.sitem.cos { position: relative; padding: 0 0 10px; gap: 6px; overflow: hidden; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rc) 70%, transparent), 0 6px 18px rgba(0, 0, 0, 0.35); }
.sitem.cos .cart { position: relative; display: block; height: clamp(210px, 58vw, 280px); overflow: hidden; background: radial-gradient(90% 70% at 50% 35%, color-mix(in srgb, var(--rc) 45%, transparent), transparent 72%), linear-gradient(180deg, #24104a, #0d0820); }
.sitem.cos .cart img { width: 100%; height: auto; min-height: 100%; object-fit: cover; object-position: 50% 4%; }
.sitem.cos .cart::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(0deg, var(--panel), transparent); }
.sitem.cos .rtag { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 1px 8px; border-radius: 6px; font: italic 800 13px/1.4 "Chakra Petch", sans-serif; color: #0b0716; background: var(--rc); box-shadow: 0 0 10px var(--rc); }
.sitem.cos .nm { display: flex; flex-direction: column; min-height: 0; padding: 0 10px; line-height: 1.3; }
.sitem.cos .nm b { font-size: 16px; }
.sitem.cos .nm small { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sitem.cos > .coin, .sitem.cos > .badge { margin: 0 10px; }
@media (min-width: 700px) { .sitem.cos .cart { height: 260px; } }

/* ---------- 文書 ---------- */
.doc { font-size: 15px; line-height: 1.9; -webkit-user-select: text; user-select: text; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc li { margin: 0 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.doc th { width: 34%; color: var(--muted); font-weight: 500; }

/* ---------- 共通の小物 ---------- */
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttl { font-weight: 800; }
.btn.danger { --c: #ff4d6a; --c2: #a3122e; }
.xbtn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.xbtn:active { background: rgba(255, 255, 255, 0.16); }
.spin { width: 36px; height: 36px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--mag); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.boot .btn { max-width: 280px; }
.when { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gold-t { color: var(--gold); }
.row > .dot { position: static; flex: none; }
.titles { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 800; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.on { background: linear-gradient(135deg, var(--mag), #7a1bff); box-shadow: 0 0 12px rgba(255, 46, 151, 0.5); }
.modal .acts .btn { min-width: 0; }

/* 字幕・回線の知らせ（#layer の中） */
.subtitle { position: fixed; left: 50%; top: calc(var(--safe-t) + 68px); transform: translateX(-50%); width: max-content; max-width: min(92vw, 560px); padding: 8px 14px; border-radius: var(--r); background: rgba(5, 2, 12, 0.84); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.4), 0 6px 18px rgba(0, 0, 0, 0.4); font-size: 15px; font-weight: 800; line-height: 1.5; text-align: center; overflow-wrap: anywhere; animation: dropc 0.2s ease-out; }
/* drop は transform を上書きするので、真ん中寄せ（translateX(-50%)）が外れて右へ半分はみ出していた */
@keyframes dropc { from { transform: translate(-50%, -12px); opacity: 0; } }
/* 真ん中に並べただけの物（flex の中の行）には横の -50% を付けない（dropc は left:50% で置く物のため。.intro .isay が動きの途中で左に半分ずれて切れた。2026-09-29） */
@keyframes dropy { from { transform: translateY(-12px); opacity: 0; } }
#layer > .subtitle, #layer > .netbar { pointer-events: none; }
.netbar { position: fixed; left: 50%; top: calc(var(--safe-t) + 4px); transform: translateX(-50%); padding: 4px 14px; border-radius: 14px; background: rgba(200, 40, 60, 0.94); color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }

/* 一覧の行 */
button.item { border: 0; width: 100%; text-align: left; color: var(--text); cursor: pointer; }
button.item:active { filter: brightness(1.2); }
.item.hl { box-shadow: inset 0 0 0 1px var(--gold), inset 0 0 18px rgba(255, 211, 77, 0.12); }
.item .msg { margin-top: 4px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.item > .btn, .item > .badge, .item > .sub { flex: none; }
.rrow .rk { width: 32px; flex: none; text-align: center; font-weight: 800; font-size: 18px; color: var(--muted); }
.rrow.top1 .rk { color: var(--gold); text-shadow: 0 0 10px rgba(255, 211, 77, 0.6); }
.rrow.top2 .rk { color: #dfe6f5; }
.rrow.top3 .rk { color: #e39a5b; }
.rrow .rp { flex: none; font-weight: 800; }
.codebig { font-size: 24px; letter-spacing: 0.12em; color: var(--cyan); overflow-wrap: anywhere; min-width: 0; }
.linkrow { text-decoration: none; color: var(--text); }
.chev { flex: none; font-size: 24px; line-height: 1; color: var(--muted); }
ul.notes { margin: 0; padding-left: 1.2em; font-size: 13px; line-height: 1.7; color: var(--muted); }
ul.notes li + li { margin-top: 4px; }

/* ---------- タイトル・ホーム・キャラ選び ---------- */
.title-logo { position: relative; z-index: 2; width: min(84vw, 560px); }
.title-logo img { display: block; width: 100%; height: auto; max-height: 36vh; object-fit: contain; filter: drop-shadow(0 0 18px rgba(255, 46, 151, 0.6)); }
.home-scr .top { z-index: 5; }
.home-top { background: linear-gradient(180deg, rgba(11, 7, 22, 0.9), rgba(11, 7, 22, 0.2)); border-bottom: 0; }
.home-top .wallet { flex: none; }
.pick-info { min-height: 3.4em; text-align: center; overflow-wrap: anywhere; }
@media (orientation: landscape) and (max-height: 520px) {
  /* 横向きは右の小ボタンを3列にして、「対戦へ」をその下に置く（キャラの脚にかぶらない） */
  .side { display: grid; grid-template-columns: repeat(3, 60px); }
  .home-cta { right: 8px; width: 196px; }
  .pick-stage { height: 46vh; }
}

/* ---------- チュートリアル ---------- */
.tut-stand { position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--top-h) + var(--safe-t)); bottom: 0; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.tut-stand img { height: 94%; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 28px rgba(255, 46, 151, 0.3)); }
.tut-wrap { position: relative; z-index: 2; margin-top: auto; align-self: center; width: 100%; max-width: 640px; padding: 0 12px calc(12px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }
.tut-tag { align-self: flex-start; padding: 2px 16px 2px 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; background: linear-gradient(90deg, var(--mag), transparent); }
.tut-box { cursor: pointer; background: rgba(16, 9, 32, 0.94); }
.tut-name { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--cyan); }
.tut-text { min-height: 5.1em; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.tut-dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.tut-dots i.done { background: var(--muted); }
.tut-dots i.on { background: var(--mag); box-shadow: 0 0 8px var(--mag); }
.tut-acts { display: flex; gap: 8px; }
.tut-acts .btn { flex: 1; min-width: 0; }
@media (orientation: landscape) and (max-height: 520px) {
  .tut-stand { right: 50%; }
  .tut-wrap { align-self: flex-end; width: 54%; }
  .tut-text { min-height: 3.4em; }
}

/* ---------- 試合の追加 ---------- */
.stage-layer { position: absolute; inset: 0; }
.fxc { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none; }
.gbg::after { background: linear-gradient(180deg, rgba(11, 7, 22, 0.45), rgba(11, 7, 22, 0.72)); }
.hud .betbtn { min-width: 64px; }
.hud .betbtn.shut { filter: grayscale(0.85); opacity: 0.72; }
.s1pend { position: absolute; z-index: 22; left: 12px; right: 72px; bottom: calc(76px + var(--safe-b)); display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: var(--r); background: rgba(11, 7, 22, 0.9); box-shadow: inset 0 0 0 1px var(--mag); font-size: 13px; }
.busy .s1me, .busy .s1act, .busy .target, .busy .s1pend { display: none; }
button.seat { border: 0; color: var(--text); cursor: pointer; }
.seat .bk { font-size: 10px; color: var(--muted); }
.seat .ps { font-size: 10px; color: var(--mag); min-height: 1.3em; }
.cards-mini { display: flex; flex-wrap: wrap; gap: 3px; }
.cards-mini .card { width: 30px; height: 42px; flex: none; font-size: 13px; }
.s2hint { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.rules { margin: 0; padding-left: 1.4em; line-height: 1.8; }
.cand { color: var(--text); }
.cand .ttl { font-size: 14px; }
.cand .sub { font-size: 12px; color: var(--muted); }
.cut.champ { background: radial-gradient(60% 50% at 50% 45%, rgba(255, 211, 77, 0.22), rgba(5, 2, 12, 0.82)); }
.champimg { height: min(56vh, 520px); max-width: 90vw; object-fit: contain; margin-bottom: -40px; animation: pop 0.5s ease-out; filter: drop-shadow(0 0 32px rgba(255, 211, 77, 0.55)); }
.cut.champ .big { position: relative; color: #fff7d6; text-shadow: 0 0 18px var(--gold), 0 0 48px rgba(255, 211, 77, 0.6); }
.cut.champ .small { position: relative; color: var(--text); font-weight: 800; }
/* 優勝の演出は押すまで残す（2.5秒後にボタン）。低い横画面でも、ボタンが下にはみ出さないよう立ち絵を縮める */
.cut.champ.hold { pointer-events: auto; padding: calc(8px + var(--safe-t)) 16px calc(14px + var(--safe-b)); }
.cut.champ.hold .champimg { height: min(52vh, 500px); }
.champnext { position: relative; margin-top: 16px; min-width: 210px; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease-out, transform 0.4s ease-out; pointer-events: none; }
.cut.champ.ready .champnext { opacity: 1; transform: none; pointer-events: auto; }
@media (max-height: 500px) { .cut.champ.hold .champimg { height: min(44vh, 400px); margin-bottom: -24px; } .cut.champ.hold .big { font-size: clamp(30px, 8vh, 56px); } .champnext { margin-top: 8px; } }

/* ---------- ガチャ ---------- */
.gshow { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: calc(var(--safe-t) + 16px) 12px calc(var(--safe-b) + 16px); overflow-y: auto; background: radial-gradient(70% 50% at 50% 45%, rgba(60, 20, 100, 0.92), rgba(5, 2, 12, 0.97)); animation: fadein 0.2s ease-out; }
.gshow > :first-child { margin-top: auto; }
.gshow > :last-child { margin-bottom: auto; }
.gorb { flex: none; width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, var(--rc, var(--mag)) 42%, transparent 72%); box-shadow: 0 0 60px var(--rc, var(--mag)), 0 0 120px var(--rc, var(--mag)); animation: orb 0.6s ease-in-out infinite alternate; }
@keyframes orb { to { transform: scale(1.16); filter: brightness(1.4); } }
.gshow .gres { width: 100%; max-width: 520px; }
.gshow .row .btn { min-width: 0; }
.gres.one { grid-template-columns: 1fr; max-width: 220px; }
.gtag { position: absolute; top: 4px; right: 4px; font-size: 10px; font-weight: 800; padding: 0 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.6); color: var(--muted); }
.gtag.new { background: var(--mag); color: #fff; }
/* SSR・UR の実況の見出し（札の真上。レア度の色で光らせる） */
.ghead { flex: none; max-width: 100%; font-size: 24px; font-weight: 900; letter-spacing: 0.06em; text-align: center; color: #fff; text-shadow: 0 0 10px var(--rc), 0 0 26px var(--rc), 0 2px 0 rgba(0, 0, 0, 0.6); animation: headin 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
/* clip-path の cutin だと光のにじみが四角く切れて、見出しに暗い箱が見えた */
@keyframes headin { from { opacity: 0; transform: scale(1.5); } to { opacity: 1; transform: none; } }

/* ---------- キャラ ---------- */
.ccard .lock { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 28px; height: 28px; color: var(--muted); }
.ccard .lock svg { display: block; width: 100%; height: 100%; }
.ccard.use { box-shadow: inset 0 0 0 2px var(--cyan), 0 0 14px rgba(54, 226, 255, 0.45); }
.ccard.use::after { content: "使用中"; position: absolute; top: 4px; right: 4px; font-size: 10px; font-weight: 800; padding: 0 6px; border-radius: 8px; background: var(--cyan); color: #001a22; }
.ccard.eq { box-shadow: inset 0 0 0 2px var(--cyan); }
.ccard[disabled] { cursor: default; }
.cd-hero { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--panel); background: radial-gradient(80% 60% at 50% 30%, color-mix(in srgb, var(--cc, var(--mag)) 28%, transparent), transparent 70%), var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.cd-stand { height: min(46vh, 420px); display: flex; justify-content: center; align-items: flex-end; }
.cd-stand img { height: 100%; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 22px var(--cc, var(--mag))); }
/* 立ち絵の後ろは札の舞台（cards.css の .tc-stage）。上の余白は、さわって弾んだときに頭が切れないように */
.cd-stand.tc-stage { padding: 22px 12px 0; }
.cd-stand img.off { filter: brightness(0) drop-shadow(0 0 12px rgba(255, 46, 151, 0.5)); }
.cd-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cd-name { font-size: 26px; font-weight: 800; letter-spacing: 0.1em; line-height: 1.2; text-shadow: 0 0 16px var(--cc, var(--mag)); }
.cd-line { font-size: 15px; overflow-wrap: anywhere; }
@media (min-width: 700px), (orientation: landscape) and (max-height: 520px) {
  .cd-hero { flex-direction: row; align-items: center; }
  .cd-stand { flex: 0 0 40%; height: min(70vh, 360px); }
  .cd-meta { flex: 1; }
}
.stepper output { flex: 1; min-width: 2.5em; text-align: center; font-size: 20px; font-weight: 800; }

/* ---------- ショップ ---------- */
button.sitem { border: 0; color: var(--text); text-align: left; cursor: pointer; align-items: stretch; }
button.sitem:active:not([disabled]) { filter: brightness(1.2); }
.sitem[disabled] { cursor: default; opacity: 0.72; }
.sitem > .coin, .sitem > .badge { align-self: flex-start; }
.sitem .sub { font-size: 12px; color: var(--muted); }
/* アプリ版の Bits の値段（Apple の priceString をそのまま出す） */
.sitem .price { align-self: stretch; text-align: center; font-weight: 900; font-size: 15px; line-height: 1.2; padding: 9px 8px; border-radius: 999px; color: #2a1600; background: linear-gradient(180deg, #fff1b8, #ffc933 55%, #d1811a); box-shadow: 0 2px 0 #7a4a08, 0 0 14px rgba(255, 201, 51, 0.35); }
button.sitem.buyable { box-shadow: inset 0 0 0 1px rgba(255, 211, 77, 0.6), 0 6px 18px rgba(0, 0, 0, 0.35); }
button.sitem.buyable:active:not([disabled]) { transform: scale(0.97); transition: transform 0.1s; }
.sart { position: relative; height: 120px; display: grid; place-items: center; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.08), transparent); }
.sart::before { content: ""; width: 56px; height: 56px; }
.sart.bits::before { background: linear-gradient(135deg, #b8fbff, var(--cyan) 50%, #1a7fd1); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sart.rare::before { background: linear-gradient(135deg, #ffe0ff, var(--rar-UR) 50%, #7a1bff); clip-path: polygon(50% 0, 100% 38%, 80% 100%, 20% 100%, 0 38%); }
.sart.common::before { background: linear-gradient(135deg, #e9f0ff, var(--rar-R) 50%, #1d3f8a); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.sart.ticket::before { width: 76px; height: 44px; border-radius: 6px; background: linear-gradient(135deg, #fff3b0, var(--gold) 45%, #d1811a); clip-path: polygon(0 0, 100% 0, 100% 36%, 92% 50%, 100% 64%, 100% 100%, 0 100%, 0 64%, 8% 50%, 0 36%); }
.sart.stamp::before { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--mag) 55%, #5a0d68); }
/* Bits の包み。t0→t4 で宝石・光・枠を強める。数字はぬりの色＋text-shadow（23 §7-23: background-clip:text は使わない） */
.pack { --pk-top: rgba(54, 226, 255, 0.1); --pk-line: rgba(54, 226, 255, 0.4); --pk-glow: rgba(54, 226, 255, 0.4); --pk-num: #eafcff; }
.pack.t1 { --pk-top: rgba(54, 226, 255, 0.2); --pk-line: rgba(54, 226, 255, 0.7); --pk-glow: rgba(54, 226, 255, 0.5); }
.pack.t2 { --pk-top: rgba(255, 211, 77, 0.2); --pk-line: rgba(255, 211, 77, 0.8); --pk-glow: rgba(255, 211, 77, 0.5); --pk-num: #ffe89a; }
.pack.t3 { --pk-top: rgba(255, 46, 151, 0.26); --pk-line: rgba(255, 120, 200, 0.9); --pk-glow: rgba(255, 46, 151, 0.55); --pk-num: #ffd2ec; }
.pack.t4 { --pk-top: rgba(255, 211, 77, 0.28); --pk-line: transparent; --pk-glow: rgba(255, 211, 77, 0.65); --pk-num: #fff0b3; }
button.sitem.pack { position: relative; overflow: hidden; isolation: isolate; gap: 6px; padding: 8px 12px 12px; background: linear-gradient(180deg, var(--pk-top), transparent 70%), var(--panel); box-shadow: inset 0 0 0 1.5px var(--pk-line), 0 6px 18px rgba(0, 0, 0, 0.4); }
button.sitem.pack:active:not([disabled]) { transform: scale(0.96); filter: brightness(1.25); transition: transform 0.1s, filter 0.1s; }
/* いちばん大きい包みは虹の縁 */
.pack.t4::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 2px; background: linear-gradient(120deg, #ffd34d, #ff2e97 30%, #36e2ff 60%, #b56bff 80%, #ffd34d); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
/* 光の帯が4秒に1回ななめに通る（点めつではない） */
.pack::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: 2; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transform: translateX(-140%) skewX(-20deg); animation: shine 4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.35s); }
.pack[disabled]::after { display: none; }
.pack-art { position: relative; height: 112px; }
.pack-art .halo { position: absolute; inset: 8% 14%; border-radius: 50%; background: radial-gradient(closest-side, var(--pk-glow), transparent); }
.pack-art .rays { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; opacity: 0.8; background: repeating-conic-gradient(var(--pk-glow) 0 7deg, transparent 7deg 22deg); -webkit-mask: radial-gradient(closest-side, #000 15%, transparent 100%); mask: radial-gradient(closest-side, #000 15%, transparent 100%); animation: spin 26s linear infinite; }
.pack-art .gems { position: absolute; inset: 0; filter: drop-shadow(0 0 6px rgba(120, 235, 255, 0.7)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.5)); }
.pack-art .gems i { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--s) * 1px); height: calc(var(--s) * 1.15px); transform: translate(-50%, -50%) rotate(calc(var(--r) * 1deg)); clip-path: polygon(50% 0, 100% 42%, 50% 100%, 0 42%); background: conic-gradient(from 0deg at 50% 42%, #f2feff 0 90deg, #5fe0ff 90deg 180deg, #127ccf 180deg 270deg, #a8f4ff 270deg); }
.pack-art .sp { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; background: #fff; clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); opacity: 0; animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
.pack .ribbon { position: absolute; top: 10px; right: -30px; z-index: 4; width: 110px; padding: 2px 0; transform: rotate(35deg); text-align: center; font-size: 12px; font-weight: 900; letter-spacing: 0.04em; color: #2a1600; background: linear-gradient(180deg, #fff3b0, #ffc933 60%, #e0901e); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }
.pack .pinfo { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.pack .pinfo > .badge { align-self: flex-start; }
.pack .amt { display: flex; align-items: baseline; gap: 4px; font-weight: 900; line-height: 1.1; }
.pack .amt b { font-size: 26px; color: var(--pk-num); text-shadow: 0 0 12px var(--pk-glow), 0 2px 0 rgba(0, 0, 0, 0.55); }
.pack .amt small { font-size: 13px; font-weight: 800; color: var(--muted); }
/* 日本語の句の途中で折り返さない（「購入で／きます」になった） */
.kp { display: inline-block; }
/* 包みはスマホ縦で2列・広い画面で4列（3列だと1枚だけ取り残される）。最後の包みは下に横長の特大の札 */
.shopgrid.packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .shopgrid.packs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* 最後の包みは横長の特大の札 */
.sitem.pack.wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 12px 16px; }
.pack.wide .pack-art { height: 136px; }
.pack.wide .amt b { font-size: 32px; }
.pack.wide .ribbon { right: auto; left: -30px; transform: rotate(-35deg); } /* 帯は宝石の側に置いて数字から離す */
.lowfx .pack-art .rays, .lowfx .pack-art .sp, .lowfx .pack::after { animation: none; }
.lowfx .pack-art .sp { opacity: 0.8; }

/* ---------- ミッション ---------- */
.chests { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.chest { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 8px 2px; border-radius: var(--r); background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.chest .cn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.08); font-size: 14px; font-weight: 800; }
.chest .cg { font-size: 11px; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.chest.got { opacity: 0.55; }
.chest.got .cn { background: var(--good); color: #002a18; }
.chest.next { box-shadow: inset 0 0 0 2px var(--gold), 0 0 12px rgba(255, 211, 77, 0.35); }
.chest.next .cn { background: var(--gold); color: #2a1600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .gachacol { max-width: 880px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; row-gap: 12px; align-content: start; }
  .gachacol > .gbanner { grid-column: 1; grid-row: 1 / 5; height: calc(100vh - var(--top-h) - var(--tabs-h) - var(--safe-t) - var(--safe-b) - 40px); min-height: 200px; }
  .gachacol > :not(.gbanner) { grid-column: 2; }
  .gachacol > .linkbtn { justify-self: start; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .modescol { max-width: 920px; gap: 12px; }
  .modescol .hexgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .modescol .hex { min-height: 112px; padding: 12px; }
  .modescol .hex.full { grid-column: span 2; min-height: 112px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .s3 { display: grid; grid-template-columns: minmax(0, 1fr) min(42vw, 330px); grid-template-rows: minmax(0, 1fr) auto; column-gap: 20px; row-gap: 4px; align-items: center; justify-items: center; padding: calc(var(--safe-t) + 52px) calc(env(safe-area-inset-right, 0px) + 72px) calc(var(--safe-b) + 10px) calc(env(safe-area-inset-left, 0px) + 16px); }
  .s3 > :first-child { grid-column: 1; grid-row: 1; }
  .s3 > .rule { grid-column: 1; grid-row: 2; }
  .s3 > :last-child { grid-column: 2; grid-row: 1 / 3; width: 100%; }
  .s3 .p .sc { font-size: 40px; }
  .s3 .phase { font-size: 17px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .pick-body > .col { max-width: 860px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: 1fr auto auto 1fr; column-gap: 16px; row-gap: 10px; }
  .pick-body > .col > .pick-stage { grid-column: 1; grid-row: 1 / 5; height: calc(100vh - var(--top-h) - var(--safe-t) - var(--safe-b) - 32px); min-height: 220px; }
  .pick-body > .col > :not(.pick-stage) { grid-column: 2; min-width: 0; }
  .pick-body > .col > .pick-info { grid-row: 1; align-self: end; }
  .pick-body > .col > .pick-row { grid-row: 2; }
  .pick-body > .col > .btn { grid-row: 3; }
  .pick-body .pick-name { font-size: 22px; bottom: 8px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .intro { padding-top: calc(var(--safe-t) + 56px); padding-bottom: calc(var(--safe-b) + 12px); }
  .intro h2 { font-size: 30px; margin: 2px 0 8px; }
  .intro ol { max-width: 640px; font-size: 14px; line-height: 1.5; }
  .intro .t { margin-top: 8px; font-size: 28px; }
  .intro .isay { margin-bottom: 8px; padding: 3px 12px; font-size: 13px; }
}

/* ================= 磨き（2026-09-29・NIKKE 寄りに派手）=================
   ボタン: 上の光沢・内側の細い縁・下の影・文字の影。主なボタンだけ4秒ごとに光が走る（点めつではなく横切るだけ）
   枠: 色の付いた縁と角の飾り。見出し: 斜めの差し色と光る線。clip-path の外は描けないので、光は内側か親に置く */
.btn:not(.ghost) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.06) 46%, rgba(0, 0, 0, 0) 54%, rgba(0, 0, 0, 0.16)),
    linear-gradient(135deg, var(--c), var(--c2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.22), inset 0 0 18px rgba(255, 255, 255, 0.08);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.btn.gold { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn.big:not(.ghost) {
  background:
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.12) 0 3px, transparent 3px 9px) right / 30% 100% no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.06) 46%, rgba(0, 0, 0, 0) 54%, rgba(0, 0, 0, 0.16)),
    linear-gradient(135deg, var(--c), var(--c2));
  letter-spacing: 0.14em;
}
.btn.ghost { background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 0 0 1px rgba(190, 150, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn.big:not([disabled])::after, .btn.gold:not([disabled])::after, .hex:not([disabled])::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 50%; pointer-events: none;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, 0.5) 50%, transparent 85%);
  transform: translateX(-140%) skewX(-20deg);
  animation: shine 4.2s ease-in-out infinite;
}
.hexgrid > :nth-child(2n)::after { animation-delay: 1.3s; }
.hexgrid > :nth-child(3n)::after { animation-delay: 2.6s; }
@keyframes shine { 0%, 70% { transform: translateX(-140%) skewX(-20deg); } 100% { transform: translateX(320%) skewX(-20deg); } }

/* 箱: 上の薄い光・色の縁・角の飾り（切った角は細い斜め線、切らない角は L 字） */
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 42%), var(--panel);
  box-shadow: inset 0 0 0 1px rgba(190, 150, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  --k: calc(var(--cut) * 0.7071);
  background:
    linear-gradient(135deg, transparent calc(var(--k) - 0.5px), var(--mag) calc(var(--k) - 0.5px), var(--mag) calc(var(--k) + 1.5px), transparent calc(var(--k) + 1.5px)) top left / calc(var(--cut) * 2) calc(var(--cut) * 2) no-repeat,
    linear-gradient(315deg, transparent calc(var(--k) - 0.5px), var(--cyan) calc(var(--k) - 0.5px), var(--cyan) calc(var(--k) + 1.5px), transparent calc(var(--k) + 1.5px)) bottom right / calc(var(--cut) * 2) calc(var(--cut) * 2) no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top right / 16px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top right / 2px 16px no-repeat,
    linear-gradient(var(--mag), var(--mag)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--mag), var(--mag)) bottom left / 2px 16px no-repeat;
  opacity: 0.85;
}
.tut-box::before { opacity: 0.6; }

/* モーダル: 濃い紫のガラス・マゼンタの縁・見出しの光る下線。出るときは少し大きくなって止まる */
.veil { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal {
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 46, 151, 0.16), transparent 62%), linear-gradient(180deg, rgba(42, 25, 78, 0.97), rgba(18, 10, 36, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 46, 151, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 32px rgba(255, 46, 151, 0.1);
  animation: modalin 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes modalin { from { transform: scale(0.92); opacity: 0; } }
.modal h3 { position: relative; padding: 0 40px 10px 0; margin-bottom: 12px; letter-spacing: 0.06em; text-shadow: 0 0 14px rgba(255, 46, 151, 0.55); }
.modal h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 2px; background: linear-gradient(90deg, var(--mag), var(--cyan)); box-shadow: 0 0 8px var(--mag); }

/* 上の帯と見出し */
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 46, 151, 0.9) 18%, rgba(54, 226, 255, 0.7) 62%, transparent); box-shadow: 0 0 8px rgba(255, 46, 151, 0.6); }
.home-top::after { display: none; }
.top h1 { text-shadow: 0 0 12px rgba(255, 46, 151, 0.5); }
.top h1::before { content: ""; display: inline-block; width: 5px; height: 0.9em; margin: 0 10px 0 2px; vertical-align: -0.1em; background: linear-gradient(180deg, var(--mag), var(--cyan)); transform: skewX(-18deg); box-shadow: 0 0 8px var(--mag); }
h2.sec { color: var(--text); font-size: 13px; letter-spacing: 0.18em; }
h2.sec::before { content: ""; flex: none; width: 4px; height: 14px; background: var(--mag); box-shadow: 0 0 8px var(--mag); transform: skewX(-20deg); }
h2.sec::after { height: 1px; background: linear-gradient(90deg, rgba(255, 46, 151, 0.6), rgba(54, 226, 255, 0.22) 45%, transparent); }

/* 通貨 */
.coin { background: linear-gradient(180deg, rgba(44, 26, 84, 0.88), rgba(0, 0, 0, 0.55)); border-color: rgba(190, 150, 255, 0.34); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.35); }
.coin.gold i { box-shadow: 0 0 6px rgba(255, 211, 77, 0.8); }
.coin.bits i { filter: drop-shadow(0 0 4px rgba(54, 226, 255, 0.9)); }

/* 下のタブ: 上の縁が光る。選んだタブは上から光が落ちる。真ん中の六角はゆっくり明るくなる（2.4秒に1回） */
.tabs { border-top: 0; box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.45); }
.tabs::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--mag) 28%, var(--cyan) 72%, transparent); opacity: 0.75; }
.tabs button.on { background: radial-gradient(70% 90% at 50% 0%, rgba(255, 46, 151, 0.3), transparent 72%); text-shadow: 0 0 10px rgba(255, 46, 151, 0.8); }
.tabs button.on svg { filter: drop-shadow(0 0 6px rgba(255, 46, 151, 0.9)); }
.tabs button.main { filter: drop-shadow(0 0 8px rgba(255, 46, 151, 0.6)); }
.tabs button.main.on::before { display: none; }
.tabs button.main .hexi { background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 52%), linear-gradient(135deg, var(--mag), #7a1bff); animation: hexpulse 2.4s ease-in-out infinite; }
@keyframes hexpulse { 50% { filter: brightness(1.3); } }

/* ホームの横のボタン: 光る縁 */
.side button, .sidel button {
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(46, 27, 88, 0.92), rgba(12, 7, 26, 0.9)) padding-box, linear-gradient(160deg, rgba(255, 46, 151, 0.95), rgba(54, 226, 255, 0.6) 55%, rgba(190, 150, 255, 0.25)) border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 12px rgba(255, 46, 151, 0.22);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transition: transform 0.08s, filter 0.12s;
}
.side button:active, .sidel button:active { transform: scale(0.94); filter: brightness(1.3); }
.side svg, .sidel svg { filter: drop-shadow(0 0 4px rgba(54, 226, 255, 0.75)); }

/* 六角形のメニュー: 内側の縁・上の光沢・右下の斜め線・題の光 */
.hex {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 40%),
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.08) 0 3px, transparent 3px 10px) right bottom / 42% 56% no-repeat,
    linear-gradient(145deg, var(--c, #3a1a70), var(--c2, #160a2c));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -28px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.08s, filter 0.12s;
}
.hex:active { transform: scale(0.98); }
/* 白い字に白い光を足すと、にじんで見えた。暗い影で輪郭を立てる */
.hex .h { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.5); }
.hex .when { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 0 10px rgba(54, 226, 255, 0.35); }

/* 一覧の行・トースト */
.item { background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 60%), var(--panel); }
button.item { box-shadow: inset 3px 0 0 var(--mag), inset 0 0 0 1px var(--line); transition: filter 0.12s, transform 0.08s; }
button.item:active { transform: scale(0.99); }
.toast { background: linear-gradient(90deg, rgba(44, 26, 84, 0.97), rgba(20, 11, 38, 0.97)); border-left: 3px solid var(--cyan); }
.toast.err { border-left-color: var(--bad); }
.toast.good { border-left-color: var(--good); }

/* ホーム: 「対戦へ」の後ろに光だまり。立ち絵の足もとに床の光 */
.home-cta::before { content: ""; position: absolute; z-index: -1; left: 10%; right: 10%; top: -6px; bottom: -6px; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 46, 151, 0.6), transparent); filter: blur(8px); animation: ctaglow 2.4s ease-in-out infinite; }
@keyframes ctaglow { 50% { opacity: 0.55; transform: scaleX(1.06); } }
.home-stand::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: min(70%, 320px); height: 28px; transform: translateX(-50%); pointer-events: none; background: radial-gradient(closest-side, rgba(255, 46, 151, 0.55), rgba(54, 226, 255, 0.18) 60%, transparent); filter: blur(2px); z-index: -1; }
.bubble { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 46, 151, 0.35); }

/* 画面に入るとき: 中身を 50ms ずつずらして下から出す（合計 400ms 以内。core.js が .enter を 0.7 秒だけ付ける） */
.scr.enter .body > .col > *, .scr.enter .body > .wide > *, .scr.enter .side > *, .scr.enter .home-cta { animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.scr.enter .body > * > :nth-child(2), .scr.enter .side > :nth-child(2) { animation-delay: 50ms; }
.scr.enter .body > * > :nth-child(3), .scr.enter .side > :nth-child(3) { animation-delay: 100ms; }
.scr.enter .body > * > :nth-child(4), .scr.enter .side > :nth-child(4) { animation-delay: 150ms; }
.scr.enter .body > * > :nth-child(n+5), .scr.enter .side > :nth-child(n+5), .scr.enter .home-cta { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
/* 7-40: 「対戦へ」が足もとに重なっていた。立ち絵を「対戦へ」の上に立たせる（横長の低い画面は「対戦へ」が右にあるので今までどおり） */
.home-stand { bottom: calc(var(--tabs-h) + var(--safe-b) + 84px); }
@media (orientation: landscape) and (max-height: 520px) { .home-stand { bottom: calc(var(--tabs-h) + var(--safe-b)); } }
/* 宝箱のラベルは「名前」「数」の2行。行頭の「、」やひとり残りの「ん。」を出さない（23 §7） */
.chest .cg { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.chest .cg b { font-size: 11px; color: var(--text); }
.bubble { word-break: normal; line-break: strict; }
p, .bubble, .tut-text, .item .msg, .modal h3, .pick-info, .cd-line { text-wrap: pretty; }
/* 日本語は文節で折り返す（Chrome 119+。Safari は無視して今までどおり）。最後の行が「せん。」だけになるのを防ぐ */
p, .bubble, .tut-text, .item .msg, .modal h3, .pick-info, .cd-line, .rules, .ann { word-break: auto-phrase; }

/* ---- 2026-09-29 試合の画面の磨き ---- */
/* 実況: 画面の中ほどに横長の帯（上の欄＝席・持ち点に重ねない） */
.subtitle.band { left: 0; right: 0; top: 40%; transform: none; width: auto; max-width: none; border-radius: 0; padding: 12px 28px; font-size: 18px; font-weight: 900; letter-spacing: 0.08em; background: linear-gradient(90deg, transparent, rgba(10, 4, 26, 0.9) 16%, rgba(10, 4, 26, 0.9) 84%, transparent); box-shadow: none; text-shadow: 0 0 14px rgba(255, 46, 151, 0.75), 0 2px 0 rgba(0, 0, 0, 0.6); animation: cutin 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.subtitle.band::before, .subtitle.band::after { content: ""; position: absolute; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, transparent, var(--mag) 30%, var(--cyan) 70%, transparent); box-shadow: 0 0 10px var(--mag); }
.subtitle.band::before { top: 0; }
.subtitle.band::after { bottom: 0; }
@keyframes cutin { from { opacity: 0; clip-path: inset(0 50% 0 50%); letter-spacing: 0.3em; } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@media (orientation: landscape) and (max-height: 520px) { .subtitle.band { top: 46%; font-size: 16px; padding: 8px 28px; } }

/* 予告じゃんけん: 立ち絵をもう少し見せ、真ん中に暗い帯を敷いて文字を読めるようにする */
.s3stand { opacity: 0.6; }
.s3stand::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 45%, rgba(8, 3, 20, 0.72), rgba(8, 3, 20, 0.2) 70%, transparent); }
.s3 .p .face { box-shadow: 0 0 18px rgba(255, 46, 151, 0.35); }
.s3 .p .nm { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8); }
.s3 .p .sc { text-shadow: 0 0 18px rgba(54, 226, 255, 0.7), 0 2px 0 rgba(0, 0, 0, 0.7); }
.s3 .vsx { font-style: italic; font-size: 36px; text-shadow: 0 0 18px var(--mag), 0 0 4px #fff; }
.s3 .phase { padding: 6px 18px; background: linear-gradient(90deg, transparent, rgba(10, 4, 26, 0.78) 15%, rgba(10, 4, 26, 0.78) 85%, transparent); text-shadow: 0 0 12px rgba(255, 46, 151, 0.7), 0 2px 0 rgba(0, 0, 0, 0.7); }
/* 予告・手の欄: 小さなガラスの札にして、立ち絵の上でも読めるようにする */
/* ルールの文: 暗い札の上に。色を明るく */
.s3 .rule { padding: 8px 14px; background: rgba(10, 4, 26, 0.8); box-shadow: inset 0 0 0 1px rgba(155, 92, 255, 0.35); color: #d6cdee; line-height: 1.6; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.s3 .rule b { color: #fff; }
/* 手のボタン: 縁の光と押したときの沈み */
.handbtn { position: relative; background: radial-gradient(circle at 40% 30%, #6a3cc0, #2a1250 60%, #150a2c); box-shadow: inset 0 0 0 2px rgba(155, 92, 255, 0.7), inset 0 6px 14px rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(155, 92, 255, 0.35); transition: transform 0.1s, box-shadow 0.2s; }
.handbtn::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed rgba(54, 226, 255, 0.35); pointer-events: none; }
.handbtn .pt { color: #cfc4ec; }
.handbtn:not([disabled]):active { transform: scale(0.93); }
.handbtn.on { box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px var(--mag), 0 0 28px var(--mag); }
.handbtn.on::before { border-color: rgba(255, 255, 255, 0.6); animation: spin 6s linear infinite; }
.handbtn[disabled]:not(.on) { filter: saturate(0.5) brightness(0.75); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 七並べ: 席の札と手札を少し豪華に */
.seat { background: linear-gradient(180deg, rgba(58, 34, 106, 0.9), rgba(22, 12, 44, 0.92)); box-shadow: inset 0 0 0 1px rgba(155, 92, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.hand .card { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.hand .card:active { transform: translateY(-2px) scale(0.96); }
/* 広い画面では手札を大きく（指ではなくマウスでも狙いやすく） */
@media (min-width: 1000px) and (min-height: 760px) {
  .hand .card { width: 54px; height: 76px; font-size: 20px; }
  .hand { max-height: 180px; }
}

/* ---- 2026-09-29 キャラのセリフを絵に重ねない ---- */
/* 詳しい画面: 決めゼリフの欄が、話すあいだだけ吹き出しになる（2行ぶんの高さを取っておき、下の欄が跳ねないように） */
.cd-line { position: relative; min-height: 3em; padding: 6px 12px; border-radius: 12px; line-height: 1.5; transition: background 0.2s, box-shadow 0.2s; }
.cd-line.talk { background: rgba(5, 2, 12, 0.78); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.5), 0 0 16px rgba(54, 226, 255, 0.2); font-weight: 800; animation: sayin 0.22s ease-out; }
.cd-line.talk::before { content: ""; position: absolute; left: 22px; top: -7px; width: 12px; height: 12px; background: rgba(5, 2, 12, 0.9); box-shadow: -1px -1px 0 rgba(54, 226, 255, 0.5); transform: rotate(45deg); }
@media (min-width: 700px), (orientation: landscape) and (max-height: 520px) {
  .cd-line.talk::before { left: -7px; top: 14px; box-shadow: -1px 1px 0 rgba(54, 226, 255, 0.5); }
}
@keyframes sayin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* ガチャの結果: カードとボタンのあいだの吹き出し（場所は先に取っておく） */
.gsay { flex: none; width: 100%; max-width: 520px; min-height: 2.4em; padding: 6px 14px; border-radius: 12px; font-size: 14px; font-weight: 800; line-height: 1.5; text-align: center; visibility: hidden; text-wrap: balance; } /* 2行を同じくらいの長さに（「…お楽しみで／す。」と1文字だけ落ちた） */
.gsay.on { visibility: visible; background: rgba(5, 2, 12, 0.84); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.5), 0 0 16px rgba(54, 226, 255, 0.25); animation: sayin 0.22s ease-out; }
/* 横向きの低い画面: 2段のカードとセリフとボタンが1画面に収まるよう、カードの幅を高さから決める */
@media (orientation: landscape) and (max-height: 520px) {
  .gshow { gap: 8px; padding-top: calc(var(--safe-t) + 8px); padding-bottom: calc(var(--safe-b) + 8px); }
  .gshow .gres { max-width: min(520px, calc((100dvh - var(--safe-t) - var(--safe-b) - 124px) * 15 / 8 + 12px)); }
  .gshow .gres.one { max-width: min(220px, calc((100dvh - 124px) * 3 / 4)); }
  .gshow.has-head .gres { max-width: min(520px, calc((100dvh - var(--safe-t) - var(--safe-b) - 160px) * 15 / 8 + 12px)); } /* 見出しの分（約36px）だけ札を小さく */
  .gshow.has-head .gres.one { max-width: min(220px, calc((100dvh - 160px) * 3 / 4)); }
  .ghead { font-size: 18px; }
  .gsay { font-size: 13px; padding: 4px 12px; min-height: 2em; }
}
/* 広い画面: 結果のカードを大きく */
@media (min-width: 1000px) and (min-height: 760px) {
  .gshow .gres { max-width: 760px; gap: 10px; }
  .gshow .gres .ccard .lb { font-size: 13px; }
  .gshow .gres .gcard .lb small { font-size: 11px; }
  .gsay, .gshow > .row { max-width: 760px !important; }
}
/* 広い画面（PC・タブレット縦）: 予告じゃんけんの顔・点・ボタンを大きく。真ん中に寄せて余白を減らす */
@media (min-width: 1000px) and (min-height: 760px), (min-width: 700px) and (min-height: 960px) {
  .s3 { justify-content: center; gap: 28px; }
  .s3 .duo { max-width: 760px; }
  .s3 .p .face.lg { width: 112px; height: 112px; }
  .s3 .p .nm { font-size: 20px; }
  .s3 .p .sc { font-size: 72px; }
  .s3 .vsx { font-size: 56px; }
  .s3 .phase { font-size: 26px; }
  .s3 .rule { max-width: 640px; font-size: 15px; }
  .hands { max-width: 560px; gap: 22px; }
  .handbtn .pt { font-size: 14px; }
}

/* ---- 2026-09-29 結果の画面と狭い画面の予告じゃんけん ---- */
/* 結果パネルが出ている間は、実況の帯を隠す（帯は #layer 70・パネルは 68 で、ボタンに重なる） */
body:has(#app .result) #layer > .subtitle.band { visibility: hidden; }
/* 結果パネルの中の実況のひと言 */
.result .rsay { margin: 10px 0 0; padding: 8px 12px; font-size: 16px; font-weight: 900; letter-spacing: 0.06em; color: #fff; text-align: center; background: linear-gradient(90deg, transparent, rgba(255, 46, 151, 0.18) 20%, rgba(54, 226, 255, 0.14) 80%, transparent); text-shadow: 0 0 12px rgba(255, 46, 151, 0.7), 0 2px 0 rgba(0, 0, 0, 0.6); }
/* 結果パネルは横にスクロールさせない（844x390 で横スクロールが出た）。横向きの低い画面は余白を詰める */
.result { overflow-x: hidden; }
@media (orientation: landscape) and (max-height: 520px) {
  .result { padding-top: calc(8px + var(--safe-t)); padding-bottom: calc(8px + var(--safe-b)); }
  .result .gets { margin: 8px 0; }
  .result .rsay { margin-top: 4px; padding: 6px 10px; font-size: 15px; }
}
/* 点の増減（+3・−1）は札の右上のバッジにする。並びに入れると、幅によって片方だけ2段になり左右の高さがずれた */
.s3 .p .slots > b { position: absolute; top: -12px; right: -6px; padding: 0 8px; border-radius: 999px; background: rgba(10, 4, 26, 0.94); box-shadow: inset 0 0 0 1px currentColor, 0 0 10px currentColor; font-size: 15px !important; line-height: 1.5; font-variant-numeric: tabular-nums; animation: pop 0.35s ease-out; }
@media (prefers-reduced-motion: reduce) { .s3 .p .slots > b { animation: none; } }

/* ---- 2026-09-29 書体: 丸い M PLUS 1 をやめ、英数は Chakra Petch・和文は IBM Plex Sans JP（社長「サイバー世界のようなデジタル的なかっこいい字体に」） ---- */
/* 見出しは右に傾け、シアンの光とマゼンタのずれ（色収差）を付ける。
   動きで transform を使う見出し（pop・headin）は skew が最後に跳ねるので、傾きは italic で付ける */
/* 色ずれ（左右に1.5px ずらしたマゼンタとシアンの影）は、iPhone では字が二重に見えて「ボケている」と言われた（2026-09-29）。
   光は後ろにぼかして置き、輪郭は下に1px の暗い影で締める。色ずれは大きなロゴとオープニングの大文字だけに残す */
:root { --cyber-glow: 0 0 8px rgba(54, 226, 255, 0.35), 0 1px 0 rgba(0, 0, 0, 0.7); }
.top h1, h2.sec, .modal h3, .hex .h, .s3 .phase, .gbanner .cap h3, .cd-name, .pick-name, .intro h2, .tut-tag {
  transform: skewX(-8deg); text-shadow: var(--cyber-glow);
}
.top h1 { transform-origin: left center; letter-spacing: 0.1em; }
h2.sec { transform-origin: left center; letter-spacing: 0.2em; }
.modal h3 { transform-origin: left center; }
.pick-name, .tut-tag { transform-origin: left bottom; }
/* 数字: 角の切れた Chakra Petch を傾け、光らせる */
.count, .hud .clock, .s3 .p .sc, .intro .t, .when, .hex .when, .keybox, .codebig, .stepper .v {
  font-family: "Chakra Petch", "IBM Plex Sans JP", sans-serif; transform: skewX(-8deg);
}
.count, .s3 .p .sc, .intro .t { text-shadow: 0 0 12px rgba(54, 226, 255, 0.5), 0 2px 0 rgba(0, 0, 0, 0.6); }
.logo, .result .place, .cut .big, .ghead { font-style: italic; }
.logo { letter-spacing: 0.2em; text-shadow: 0 0 18px var(--mag), 0 0 42px rgba(255, 46, 151, 0.6), 3px 0 0 rgba(54, 226, 255, 0.8), -3px 0 0 rgba(255, 46, 151, 0.9); }
/* ボタンの文字は字間を広げて硬く見せる */
.btn { letter-spacing: 0.1em; }
.btn.big { letter-spacing: 0.14em; }
.tabs button, .side button, .sidel button { letter-spacing: 0.08em; }

/* ---- 2026-09-29 予告じゃんけんの札と手のボタン（社長「相手が予告した手などが小さく薄く見にくい」「パーとグーが見分けにくい」） ----
   手は形と色で分ける: グー＝赤・チョキ＝黄・パー＝青。札は 44px の丸 → 絵 56px＋名前の札。
   手を出す時間の相手の予告（.hot）は、ひと回り大きくして光らせる */
.slot, .handbtn { --hc: #8f84b8; --hca: rgba(143, 132, 184, 0.35); }
.slot.g, .handbtn.g { --hc: #ff5a48; --hca: rgba(255, 74, 61, 0.45); }
.slot.c, .handbtn.c { --hc: #ffd23a; --hca: rgba(255, 207, 46, 0.42); }
.slot.p, .handbtn.p { --hc: #45bcff; --hca: rgba(53, 180, 255, 0.45); }
.s3 .p .slots { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 8px; max-width: 100%; }
.slot { position: relative; width: 72px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 3px 5px;
  border-radius: 10px; background: linear-gradient(180deg, rgba(26, 14, 54, 0.94), rgba(8, 4, 20, 0.94)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 4px 12px rgba(0, 0, 0, 0.45); }
.slot .tg { align-self: stretch; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: 0.14em; color: #bfe9ff; border-radius: 6px 6px 3px 3px; background: rgba(54, 226, 255, 0.14); }
.slot .hv { width: 56px; height: 56px; display: grid; place-items: center; }
.slot .hv svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.slot .hv.st { font-size: 12px; font-weight: 700; color: #d6cdee; text-align: center; line-height: 1.3; }
.slot .hn { min-height: 1.3em; font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: 0.06em; color: var(--hc); text-shadow: 0 0 8px var(--hca), 0 1px 0 rgba(0, 0, 0, 0.8); }
.slot.has { background: radial-gradient(110% 80% at 50% 42%, var(--hca), rgba(8, 4, 20, 0.95) 72%); box-shadow: inset 0 0 0 2px var(--hc), 0 0 14px var(--hca), 0 4px 12px rgba(0, 0, 0, 0.45); animation: slotin 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes slotin { from { transform: scale(0.6); opacity: 0; } }
.slot.hot { width: 90px; }
.slot.hot .hv { width: 72px; height: 72px; }
.slot.hot .hn { font-size: 18px; }
.slot.hot .tg { color: #fff; background: linear-gradient(90deg, var(--mag), #b21bff); }
.slot.hot .tg::before { content: "相手の"; letter-spacing: 0.04em; }
.slot.hot { animation: slotin 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3), slothot 1.4s ease-in-out 0.3s infinite; }
@keyframes slothot { 50% { box-shadow: inset 0 0 0 2px #fff, 0 0 26px var(--hc), 0 4px 12px rgba(0, 0, 0, 0.45); } }
.s3 .p .slots > b { top: -14px; right: -8px; z-index: 2; }
/* 手のボタン: 丸の中に大きな手・下に色の付いた名前 */
.handbtn { gap: 0; }
.handbtn .hv { width: 58%; height: 58%; display: grid; place-items: center; }
.handbtn .hv svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.55)); }
.handbtn .hn { font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: 0.08em; color: var(--hc); text-shadow: 0 0 8px var(--hca), 0 1px 0 rgba(0, 0, 0, 0.9); }
.handbtn { box-shadow: inset 0 0 0 2px var(--hc), inset 0 6px 14px rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px var(--hca); background: radial-gradient(circle at 50% 38%, var(--hca), #2a1250 58%, #120824); }
.handbtn::before { border-color: var(--hca); }
.handbtn.on { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--hc), 0 0 30px var(--hc); }
@media (prefers-reduced-motion: reduce) { .slot, .slot.hot { animation: none; } }
/* 狭い画面（375幅）: 札をひと回り小さく */
@media (max-width: 400px) {
  .s3 .p .slots { gap: 5px; }
  .slot { width: 64px; }
  .slot .hv { width: 48px; height: 48px; }
  .slot.hot { width: 76px; }
  .slot.hot .hv { width: 60px; height: 60px; }
  .slot.hot .hn { font-size: 16px; }
  .handbtn .hn { font-size: 14px; }
}
/* 横向きの低い画面: 縦が足りないので札を詰める */
@media (orientation: landscape) and (max-height: 520px) {
  .s3 .p { gap: 2px; }
  .s3 .p .face.lg { width: 54px; height: 54px; }
  .s3 .p .nm { font-size: 14px; line-height: 1.3; }
  .s3 .p .sc { font-size: 34px; }
  .s3 .phase { padding: 3px 14px; }
  .slot { width: 62px; padding-bottom: 3px; }
  .slot .hv { width: 40px; height: 40px; }
  .slot .hn { font-size: 13px; }
  .slot.hot { width: 74px; }
  .slot.hot .hv { width: 50px; height: 50px; }
  .slot.hot .hn { font-size: 15px; }
}
/* 大きい画面 */
@media (min-width: 1000px) and (min-height: 760px) {
  .slot { width: 92px; }
  .slot .tg { font-size: 13px; }
  .slot .hv { width: 72px; height: 72px; }
  .slot .hn { font-size: 18px; }
  .slot.hot { width: 116px; }
  .slot.hot .hv { width: 94px; height: 94px; }
  .slot.hot .hn { font-size: 22px; }
  .handbtn .hn { font-size: 19px; }
}
/* ルールは2行に分ける（1つの文だと 375 幅で「勝/ち+1」と語の途中で折れた） */
.s3 .rule span { display: block; }
@media (min-width: 1000px) and (min-height: 760px) { .slot .hv.st { font-size: 15px; } }

/* ---- 2026-09-29 待合室・相手待ち（社長「待機部屋の様子が、のぺっとして陳腐」） ----
   右に自分のキャラの立ち絵、左に残り時間の輪。下に試合の流れの札。人数は出さない */
.rhero { position: relative; height: clamp(300px, 52vh, 460px); margin: -4px -16px 0; padding: 0 16px; overflow: hidden;
  /* 光は枠の中で透明まで落とす。枠の端で色が残ると、横向きと大きい画面で四角い箱が見えた（2026-09-29） */
  background: radial-gradient(closest-side at 66% 62%, rgba(255, 46, 151, 0.3), transparent), radial-gradient(closest-side at 24% 38%, rgba(54, 226, 255, 0.16), transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }
/* 床の格子 */
.rhero::before { content: ""; position: absolute; left: -20%; right: -20%; bottom: 0; height: 42%; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(54, 226, 255, 0.28) 0 1px, transparent 1px 44px), repeating-linear-gradient(0deg, rgba(255, 46, 151, 0.3) 0 1px, transparent 1px 26px);
  transform: perspective(260px) rotateX(58deg); transform-origin: 50% 100%; -webkit-mask-image: radial-gradient(52% 100% at 50% 100%, #000 35%, transparent); mask-image: radial-gradient(52% 100% at 50% 100%, #000 35%, transparent); }
.rstand { position: absolute; right: -6%; bottom: 0; height: 100%; max-width: 72%; object-fit: contain; object-position: right bottom; pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(255, 46, 151, 0.55)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.6)); animation: rbreath 4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes rbreath { 50% { transform: translateY(-4px) scale(1.008); } }
.rclock { position: absolute; left: 12px; top: 18px; width: min(46vw, 200px); aspect-ratio: 1; display: grid; place-items: center; z-index: 2; }
.rring, .rring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rring svg { overflow: visible; }
.rring .trk { fill: rgba(8, 3, 20, 0.78); stroke: rgba(54, 226, 255, 0.16); stroke-width: 8; }
.rring .bar { fill: none; stroke: var(--cyan); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--cyan)); transition: stroke-dashoffset 0.25s linear; }
.rring .bar.warn { stroke: var(--mag); filter: drop-shadow(0 0 6px var(--mag)); }
.rring .tick { fill: none; stroke: rgba(255, 46, 151, 0.7); stroke-width: 1.5; stroke-dasharray: 2 7; transform-origin: 60px 60px; animation: spin 24s linear infinite; }
.rc-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.rc-lb { font-size: 12px; font-weight: 700; letter-spacing: 0.24em; color: #bfe9ff; }
.rclock .count { font-size: clamp(34px, 11vw, 50px); line-height: 1.05; color: #fff; }
.rclock .count.warn { color: #ff7ab8; }
.rmeta { position: absolute; left: 12px; bottom: 30px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 58%; }
.rentry { display: inline-flex; align-items: stretch; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: #001a22; background: var(--cyan); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); box-shadow: 0 0 14px rgba(54, 226, 255, 0.6); }
.rentry { padding: 3px 0 3px 14px; }
.rentry b { margin-left: 10px; padding: 0 16px 0 10px; font-size: 13px; letter-spacing: 0.08em; color: #fff; background: rgba(8, 3, 20, 0.9); white-space: nowrap; }
.rat, .rq-t { font-size: 18px; font-weight: 700; letter-spacing: 0.06em; color: #fff; text-shadow: 0 0 10px rgba(54, 226, 255, 0.5), 0 2px 0 rgba(0, 0, 0, 0.8); }
.rtier { font-size: 13px; font-weight: 700; color: var(--gold); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8); }
.rq-t .count { display: inline; font-size: 22px; }
.rsteps { display: flex; align-items: center; justify-content: center; gap: 4px; }
.rstep { flex: 1; min-width: 0; max-width: 170px; display: flex; flex-direction: column; align-items: center; padding: 8px 6px; text-align: center;
  background: linear-gradient(180deg, rgba(40, 20, 80, 0.92), rgba(10, 5, 24, 0.92)); box-shadow: inset 0 0 0 1px rgba(155, 92, 255, 0.5), 0 0 12px rgba(155, 92, 255, 0.2);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.rstep .no { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--cyan); }
.rstep .nm { font-size: 14px; font-weight: 700; line-height: 1.35; color: #fff; word-break: keep-all; overflow-wrap: anywhere; }
.rmeta { max-width: none; }
@media (max-width: 400px) { .rentry b { letter-spacing: 0.04em; padding-right: 12px; } }
/* 枠が画面の端でない広い画面では、立ち絵を枠の中に収める（靴の先が画面の途中で切れて見えた） */
@media (min-width: 600px) { .rstand { right: 0; } }
.rsteps .arr { flex: none; font-size: 22px; font-weight: 700; color: var(--mag); text-shadow: 0 0 8px var(--mag); }
.rnote { margin: 0; font-size: 13px; line-height: 1.7; color: #d6cdee; text-align: center; }
.rnote.rremind { font-size: 12px; color: #9fe3f5; }
.rnote.rremind:empty { display: none; }
/* 相手待ちのレーダー */
.radar { position: absolute; left: 12px; top: 18px; width: min(46vw, 200px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; z-index: 2; overflow: hidden;
  background: repeating-radial-gradient(circle, transparent 0 22%, rgba(54, 226, 255, 0.35) 22% calc(22% + 1px)), rgba(8, 3, 20, 0.8); box-shadow: inset 0 0 0 2px rgba(54, 226, 255, 0.6), 0 0 22px rgba(54, 226, 255, 0.35); }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(54, 226, 255, 0.55), transparent 28%); animation: spin 2.4s linear infinite; }
.radar .blip { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--mag); box-shadow: 0 0 10px var(--mag); opacity: 0; animation: blip 2.4s ease-out infinite; }
.radar .b1 { left: 24%; top: 30%; } .radar .b2 { left: 70%; top: 22%; animation-delay: 0.8s; } .radar .b3 { left: 62%; top: 72%; animation-delay: 1.6s; }
@keyframes blip { 0% { opacity: 0; transform: scale(0.4); } 10% { opacity: 1; transform: scale(1.2); } 70% { opacity: 0; } 100% { opacity: 0; } }
.radar .face { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .rstand, .rring .tick, .radar .sweep, .radar .blip { animation: none; } }
/* 横向きの低い画面: 輪と文字を左、立ち絵を右に。高さは画面に合わせる */
@media (orientation: landscape) and (max-height: 520px) {
  .rhero { height: calc(100vh - var(--top-h) - var(--safe-t) - 40px); min-height: 230px; }
  .rclock, .radar { width: 150px; top: 8px; }
  .rclock .count { font-size: 36px; }
  .rmeta { bottom: 16px; left: 180px; }
  .rstand { right: 0; }
}
/* 大きい画面 */
@media (min-width: 1000px) and (min-height: 760px) {
  .rclock, .radar { width: 240px; }
  .rclock .count { font-size: 60px; }
  .rat, .rq-t { font-size: 22px; }
}

/* ---- 2026-09-29 GPT の絵（tools/art/gen_ui.py → img/ui/gen/）。社長「Bits やボタンのイラスト、待機部屋の様子がのぺっとして陳腐」 ---- */
img.gi, img.hi { display: block; object-fit: contain; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
/* 通貨の印: 金の硬貨と青いひし形の結晶 */
.coin.gold i, .coin.bits i { width: 22px; height: 22px; border-radius: 0; clip-path: none; box-shadow: none; background: center / contain no-repeat; }
.coin.gold i { background-image: url(/img/ui/gen/cur_gold.webp); filter: drop-shadow(0 0 4px rgba(255, 211, 77, 0.55)); }
.coin.bits i { background-image: url(/img/ui/gen/cur_bits.webp); filter: drop-shadow(0 0 4px rgba(54, 226, 255, 0.7)); }
/* 下のタブ: 選んでいないタブは少し沈め、選んだタブは光らせて少し大きく */
.tabs button img.gi { width: 34px; height: 34px; margin-top: -2px; filter: saturate(0.85) brightness(0.88); transition: filter 0.15s, transform 0.15s; }
.tabs button.on img.gi { filter: drop-shadow(0 0 6px rgba(255, 46, 151, 0.85)); transform: scale(1.1); }
/* 真ん中の対戦: 桃色の六角の縁の中を暗くして、剣の絵を浮かせる */
.tabs button.main .hexi { position: relative; }
.tabs button.main .hexi::before { content: ""; position: absolute; inset: 2.5px; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: radial-gradient(circle at 50% 40%, #44187a, #12072a 78%); }
.tabs button.main .hexi img.gi { position: relative; width: 38px; height: 38px; filter: drop-shadow(0 0 5px rgba(255, 46, 151, 0.9)); transform: none; }
/* ホームの横のボタン */
.side img.gi, .sidel img.gi { width: 36px; height: 36px; margin-bottom: -1px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
/* じゃんけんの手 */
.slot .hv img.hi, .handbtn .hv img.hi { width: 100%; height: 100%; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.handbtn .hv { width: 64%; height: 64%; }
/* ショップ: Bits の包みと Bits の品 */
.pack-art .gem { position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; object-fit: contain; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
.sart::before { display: none; }
.sart img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(54, 226, 255, 0.5)); }
.sart.rare img, .sart.stamp img { filter: drop-shadow(0 0 10px rgba(255, 46, 151, 0.5)); }
.sart.ticket img { filter: drop-shadow(0 0 10px rgba(255, 211, 77, 0.5)); }
/* 対戦の札: 絵を敷き、題の側（左）を暗くして文字を読めるようにする。下の縁にモードの色 */
.hex.art {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 38%),
    linear-gradient(90deg, rgba(8, 4, 20, 0.86), rgba(8, 4, 20, 0.5) 48%, rgba(8, 4, 20, 0.08) 86%),
    linear-gradient(0deg, rgba(8, 4, 20, 0.7), rgba(8, 4, 20, 0) 55%),
    var(--art) center / cover no-repeat,
    linear-gradient(145deg, var(--c, #3a1a70), var(--c2, #160a2c));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -3px 0 var(--c, #8a3dff);
}
.hex.art.mw { --c: #ffb020; }
.hex.art .h, .hex.art .s, .hex.art .when { text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9); }
/* 待合室・相手待ち: 部屋の絵（縦長の画面は縦の絵、横長は横の絵） */
.bgart.roomart { background-image: var(--p); background-position: center 30%; }
@media (min-aspect-ratio: 1/1) { .bgart.roomart { background-image: var(--w); background-position: center; } }
.bgart.roomart::after { background: linear-gradient(180deg, rgba(11, 7, 22, 0.25), rgba(11, 7, 22, 0.35) 45%, rgba(11, 7, 22, 0.86) 78%, var(--bg)); }
/* 部屋の床が絵にあるので、描いた格子は薄くする */
.roomart ~ .body .rhero::before { opacity: 0.4; }

/* ---- 決勝のオープニング（match.js の opening。見本は公式の sample.mp4: 白い斜めの切り替え→流れる光→大きな英字→目元の帯と名前の札） ---- */
.opening { position: absolute; inset: 0; z-index: 60; overflow: hidden; background: #05020c; font-family: "Chakra Petch", "IBM Plex Sans JP", sans-serif; }
.opbox, .opsc { position: absolute; inset: 0; overflow: hidden; }
.opsc.c0 { --hc: var(--cyan); --hb: #0b3b73; }
.opsc.c1 { --hc: var(--mag); --hb: #6a0c49; }
.opskip { position: absolute; z-index: 5; top: calc(var(--safe-t) + 12px); right: 12px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; background: rgba(5, 2, 12, 0.55); color: #fff; font: inherit; font-size: 13px; letter-spacing: 0.1em; cursor: pointer; }
.opstreaks { position: absolute; inset: 0; pointer-events: none; }
.opstreaks i { position: absolute; left: 100%; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff 40%, var(--hc, var(--cyan))); opacity: 0.75; animation: opstreak linear infinite; }
@keyframes opstreak { to { transform: translateX(-260vw); } }
.opburst { position: absolute; inset: -60%; pointer-events: none; background: repeating-conic-gradient(from 0deg, transparent 0 3deg, rgba(255, 255, 255, 0.13) 3deg 3.5deg, transparent 3.5deg 7deg);
  -webkit-mask: radial-gradient(circle, transparent 0 16%, #000 42%); mask: radial-gradient(circle, transparent 0 16%, #000 42%); animation: spin 14s linear infinite; }
/* FINAL */
.optitle { display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(70% 60% at 50% 50%, #3a1570, #05020c 75%); }
.opttl { position: relative; font-size: clamp(64px, min(26vw, 30vh), 260px); font-weight: 700; font-style: italic; letter-spacing: 0.08em; line-height: 1; color: #fff;
  text-shadow: 0 0 22px var(--mag), 0 0 60px rgba(255, 46, 151, 0.7), 4px 4px 0 var(--cyan); animation: opslam 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
.opsub { position: relative; margin-top: 10px; font-size: clamp(14px, 3.6vw, 24px); letter-spacing: 0.3em; color: var(--gold); animation: fadein 0.3s 0.25s both; }
@keyframes opslam { from { transform: scale(2.4) skewX(-14deg); opacity: 0; filter: blur(8px); } to { transform: none; opacity: 1; filter: none; } }
/* 紹介 */
.opslot .opbg { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 55%, var(--hb), #05020c 78%); }
.opslot .opbg::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 4px); }
.opname { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; white-space: nowrap; pointer-events: none;
  font-size: min(calc(150vw / var(--n)), 34vh); font-weight: 700; font-style: italic; line-height: 0.86; color: rgba(255, 255, 255, 0.93);
  text-shadow: 0 0 30px var(--hc); animation: opname 0.5s 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15) both, opdim 0.4s 1.5s forwards; }
.opname.ghost { color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, 0.28); text-shadow: none; animation: opdrift 4s linear both; }
.opname.ghost.up { top: 16%; }
.opname.ghost.dn { top: 84%; animation-direction: reverse; }
@keyframes opname { from { transform: translateY(-50%) scaleX(1.8); opacity: 0; letter-spacing: 0.4em; } to { transform: translateY(-50%); opacity: 1; } }
@keyframes opdim { to { opacity: 0.22; } }
@keyframes opdrift { from { transform: translate(18%, -50%); } to { transform: translate(-18%, -50%); } }
.opbody { position: absolute; bottom: 0; left: 50%; height: 94%; transform: translateX(-50%); animation: opbodyin 0.55s 0.3s cubic-bezier(0.2, 0.9, 0.3, 1) both, opbodyc0 0.5s 1.4s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
.opslot.c1 .opbody { animation-name: opbodyin, opbodyc1; }
/* 立ち絵の縦横比はキャラごとに違う（0.34〜0.72）。箱は絵の幅に合わせ、動く立ち絵の canvas がぴったり重なるようにする */
.opbody > img { display: block; height: 100%; width: auto; filter: drop-shadow(0 0 22px rgba(0, 0, 0, 0.6)); }
@keyframes opbodyin { from { opacity: 0; transform: translateX(-50%) translateY(6%) scale(1.08); } }
@keyframes opbodyc0 { from { transform: translateX(-50%); } to { transform: translateX(-12%); } }
@keyframes opbodyc1 { from { transform: translateX(-50%); } to { transform: translateX(-88%); } }
.opeyes { position: absolute; z-index: 2; top: 24%; left: 0; width: min(74%, 680px); aspect-ratio: 4.4; background-size: 100% auto; background-position: 0 56%; background-repeat: no-repeat;
  border-top: 3px solid var(--hc); border-bottom: 3px solid var(--hc); box-shadow: 0 0 28px var(--hc); clip-path: polygon(0 0, 100% 0, 93% 100%, 0 100%); animation: opeyes 0.45s 1.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.opeyes::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(5, 2, 12, 0.18) 0 1px, transparent 1px 3px); }
.opslot.c1 .opeyes { left: auto; right: 0; clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%); animation-name: opeyes1; }
@keyframes opeyes { from { transform: translateX(-100%); } }
@keyframes opeyes1 { from { transform: translateX(100%); } }
.opplate { position: absolute; z-index: 3; left: 4%; bottom: calc(var(--safe-b) + 7%); max-width: 70%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 26px 12px 18px;
  background: linear-gradient(90deg, rgba(5, 2, 12, 0.92) 60%, rgba(5, 2, 12, 0)); border-left: 5px solid var(--hc); animation: opplate 0.4s 1.7s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.opplate .tag { font-size: 11px; letter-spacing: 0.3em; color: var(--hc); }
.opplate b { font-family: "IBM Plex Sans JP", sans-serif; font-size: clamp(20px, 5.6vw, 34px); line-height: 1.15; color: #fff; overflow-wrap: anywhere; }
.opplate small { font-size: 13px; color: var(--muted); letter-spacing: 0.1em; }
.opslot.c1 .opplate { left: auto; right: 4%; align-items: flex-end; text-align: right; padding: 10px 18px 12px 26px; border-left: 0; border-right: 5px solid var(--hc); background: linear-gradient(270deg, rgba(5, 2, 12, 0.92) 60%, rgba(5, 2, 12, 0)); }
@keyframes opplate { from { opacity: 0; transform: translateY(16px); } }
.opsay { position: absolute; z-index: 3; left: 4%; right: 4%; top: calc(var(--safe-t) + 58px); text-align: left; font-family: "IBM Plex Sans JP", sans-serif; font-size: clamp(14px, 3.8vw, 20px); font-weight: 700; color: #fff; text-shadow: 0 2px 6px #000, 0 0 14px var(--hc); animation: fadein 0.3s both; }
.opsay:empty { display: none; }
.opslot.c1 .opsay { text-align: right; }
.opwipe { position: absolute; inset: -20% -70%; z-index: 4; background: #fff; pointer-events: none; animation: opwipe 0.7s cubic-bezier(0.7, 0, 0.3, 1) both; }
.opslot.c1 .opwipe { animation-direction: reverse; }
@keyframes opwipe { from { transform: skewX(-24deg) translateX(-140%); } 45% { transform: skewX(-24deg) translateX(0); } to { transform: skewX(-24deg) translateX(140%); } }
/* VS */
.opvs { display: flex; background: #05020c; }
.opvside { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(160deg, var(--hb), #05020c 80%); animation: opvsl 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.opvside.c0 { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); margin-right: -6%; }
.opvside.c1 { clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); margin-left: -6%; animation-name: opvsr; }
.opvside img { width: min(34vw, 42vh, 240px); aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--hc); box-shadow: 0 0 26px var(--hc); object-fit: cover; }
.opvside b { max-width: 80%; font-family: "IBM Plex Sans JP", sans-serif; font-size: clamp(14px, 3.6vw, 22px); color: #fff; text-align: center; overflow-wrap: anywhere; }
@keyframes opvsl { from { transform: translateX(-100%); } }
@keyframes opvsr { from { transform: translateX(100%); } }
.opvsx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; font-size: clamp(56px, min(22vw, 26vh), 200px); font-weight: 700; font-style: italic; color: #fff;
  text-shadow: 0 0 18px var(--gold), 0 0 50px rgba(255, 211, 77, 0.7), 3px 3px 0 var(--mag); animation: opslam 0.4s 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.opvs > .ownfx { z-index: 1; }
.opvs > .opvsx { z-index: 2; }
/* 横向き: 目元の帯と札を小さめに */
@media (orientation: landscape) and (max-height: 500px) {
  .opeyes { top: 18%; width: min(56%, 520px); }
  .opplate { bottom: calc(var(--safe-b) + 5%); padding: 6px 20px 8px 14px; }
  .opplate b { font-size: 22px; }
  .opsay { top: calc(var(--safe-t) + 50px); max-width: 60%; }
  .opslot.c1 .opsay { left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .opening *, .opening *::after { animation: none !important; }
  .opwipe, .opstreaks { display: none; }
  .opslot .opbody { transform: translateX(-12%); }
  .opslot.c1 .opbody { transform: translateX(-88%); }
}

/* ---- サポート（よくある質問・お問い合わせ）2026-09-29 ---- */
textarea, select { font: inherit; color: inherit; font-size: 16px; -webkit-user-select: text; user-select: text; }
textarea.input { min-height: 132px; padding: 12px 14px; line-height: 1.6; resize: vertical; display: block; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: rgba(0, 0, 0, 0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2336e2ff' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
select.input option { background: #140b26; color: #fff; }
.input[readonly] { color: var(--muted); }
.form-err { margin: 0; min-height: 1.4em; color: #ff7aa8; font-size: 14px; font-weight: 700; }
.form-err:empty { min-height: 0; }
.contact .acts { margin-top: 4px; }
.faq { display: flex; flex-direction: column; gap: 6px; }
.faq-cat { margin: 10px 0 2px; font-size: 13px; letter-spacing: 0.12em; color: var(--cyan); }
.faq-cat:first-child { margin-top: 0; }
.faq-item { border-radius: var(--r); background: rgba(0, 0, 0, 0.38); box-shadow: inset 0 0 0 1px var(--line); }
.faq-item summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 10px 40px 10px 14px; position: relative; font-weight: 700; font-size: 15px; line-height: 1.5; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--cyan); font-weight: 800; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] { box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.45); }
.faq-item p { margin: 0; padding: 0 14px 14px; font-size: 14px; line-height: 1.8; color: #e6defa; -webkit-user-select: text; user-select: text; }
.faq-note { margin: 10px 0 0; font-size: 13px; line-height: 1.7; }
.kv dd { overflow-wrap: anywhere; }

.input[aria-invalid="true"] { border-color: #ff5c9a; box-shadow: 0 0 0 1px #ff5c9a, 0 0 12px rgba(255, 46, 151, 0.35); }
.field > .form-err { margin-top: 6px; }

/* BET: 何人にでも（自分がかけている候補は金の縁） */
.cand.bet { box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px rgba(255, 211, 77, 0.45); background: linear-gradient(90deg, rgba(255, 211, 77, 0.10), rgba(255, 211, 77, 0) 60%), var(--panel); }
.cand.bet.on { box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 2px var(--mag); }
.cand > .badge { flex: none; }
button.item.me { box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px rgba(255, 211, 77, 0.45); }
/* BET: 額と BET のボタンは窓の下に貼り付ける（候補が100人いても押せる） */
.betbar { position: sticky; bottom: calc(-16px - var(--safe-b)); z-index: 2; display: grid; gap: 8px; margin: 0 -16px; padding: 10px 16px calc(12px + var(--safe-b)); isolation: isolate; background: linear-gradient(180deg, #1a0e33, #0e081c); box-shadow: 0 -1px 0 rgba(255, 46, 151, 0.45), 0 -10px 18px rgba(5, 2, 12, 0.6); }
.betbar > .btn:not(.sm) { min-height: 48px; letter-spacing: 0.04em; line-height: 1.25; text-wrap: balance; }
.betbar > .sm { justify-self: center; }
@media (min-width: 520px) { .betbar { grid-template-columns: minmax(180px, 220px) 1fr; align-items: center; } .betbar > .sm { grid-column: 1 / -1; } }

/* ---------- お知らせ（2026-09-29 マインドマップ「見出しの一覧→タッチで右側に全文・閉じる」「起動時: OK＋以後表示しない」） ---------- */
.badge.red { background: var(--bad); color: #fff; }
.veil.sheet .modal.news-modal { width: min(100%, 880px); }
/* 高さの決まった列の中でも、行は中身の高さのまま（auto の行は min-height まで縮んで重なる。2026-09-29 844x390 で実際に重なった） */
.news-list { display: grid; gap: 8px; align-content: start; grid-auto-rows: max-content; }
.news-row { position: relative; display: grid; gap: 6px; width: 100%; min-height: 64px; padding: 10px 14px; border: 0; border-radius: var(--r); background: rgba(0, 0, 0, 0.38); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.news-row .row { gap: 8px; align-items: center; }
.news-row .row > .dot { margin-left: auto; }
.news-row .ttl { font-weight: 700; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; word-break: auto-phrase; text-wrap: pretty; }
.news-row.on { background: rgba(54, 226, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.6), inset 3px 0 0 var(--cyan); }
.news-row:active { filter: brightness(1.25); }
.news-detail { display: none; gap: 10px; align-content: start; grid-auto-rows: max-content; outline: none; }
.news.reading .news-list { display: none; }
.news.reading .news-detail { display: grid; }
.news-back { justify-self: start; }
.news-ttl { margin: 0; font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; word-break: auto-phrase; text-wrap: pretty; }
.news-body { font-size: 14px; line-height: 1.85; color: #e6defa; white-space: pre-line; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
/* 長い本文は普通に折り返す（p に付けた pretty と auto-phrase では、段落の終わりで行が早く折れて右が空いた） */
.news-body p { margin: 0 0 0.9em; text-wrap: wrap; word-break: normal; line-break: strict; }
.news-body p:last-child { margin-bottom: 0; }
/* 起動時の窓: 低い画面では本文だけが縮んでスクロールし、「以後表示しない」と OK は常に見える（2026-09-29 844x390 で OK が下に切れた） */
.modal.news-popm { display: flex; flex-direction: column; }
.modal.news-popm > * { flex: none; }
.modal.news-popm > .news-pop { flex: 0 1 auto; min-height: 0; }
.news-pop > * { flex: none; }
.news-pop .news-body { flex: 0 1 auto; min-height: 52px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
@media (orientation: landscape) and (max-height: 520px) { .modal.news-popm { width: min(100%, 620px); } .modal.news-popm .acts { margin-top: 10px; } .news-pop .check { padding: 8px 12px; min-height: 44px; align-items: center; } }
@media (min-width: 720px) {
  /* 広い画面は左に見出し・右に全文（それぞれの列だけが動く） */
  .news { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; height: clamp(160px, calc(88vh - 160px), 560px); }
  .news .news-list, .news.reading .news-list { display: grid; overflow-y: auto; padding-right: 4px; }
  .news .news-detail { display: grid; overflow-y: auto; padding: 14px 16px; border-radius: var(--r); background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px var(--line); }
  .news-back { display: none; }
}

/* タイトル: 右上の「お知らせ」「よくある質問」と、下の版 */
.title-tools { position: absolute; z-index: 3; top: calc(12px + var(--safe-t)); right: 12px; display: flex; gap: 8px; }
.title-tools .btn { cursor: pointer; background: linear-gradient(180deg, rgba(40, 24, 74, 0.82), rgba(11, 7, 22, 0.82)); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.55), 0 0 12px rgba(54, 226, 255, 0.25); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); gap: 6px; padding: 0 12px 0 8px; }
.title-tools .btn img.gi { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.title-foot .ver { margin-left: 0.8em; }
/* 音と演出（設定の画面・タイトルの設定の窓） */
.prefs { display: flex; flex-direction: column; gap: 12px; }
.prefs-vol, .prefs-chk { gap: 12px; }
.prefs .check .note { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.6; color: var(--muted); word-break: auto-phrase; text-wrap: pretty; }
@media (orientation: landscape) and (max-height: 520px) {
  .modal.prefsm { width: min(100%, 760px); }
  .modal.prefsm h3 { margin-bottom: 8px; }
  .modal.prefsm .prefs { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px 20px; align-items: start; }
  .modal.prefsm .prefs-vol { gap: 6px; }
  .modal.prefsm .acts { margin-top: 10px; }
}
.title-tools .btn.only-ic { width: 44px; min-width: 44px; padding: 0; justify-content: center; }
.title-tools .btn.only-ic img.gi, .title-tools .btn.only-ic svg { width: 28px; height: 28px; }

/* ---------- 規約・プライバシー・特商法をアプリの中の窓で読む（2026-09-29 社長「ウェブに飛ばされずにアプリ内でページ表示」） ---------- */
.veil.sheet .modal.legal-modal { width: min(100%, 760px); }
.legal { display: grid; gap: 12px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.legal-tabs .chip { min-height: 40px; font-size: 12px; }
.legal-doc { font-size: 14px; line-height: 1.85; color: #e6defa; outline: none; -webkit-user-select: text; user-select: text; overflow-wrap: anywhere; }
.legal-doc > :first-child { margin-top: 0; }
.legal-doc h2 { margin: 24px 0 8px; padding-left: 10px; border-left: 3px solid var(--cyan); font-size: 15px; line-height: 1.5; color: var(--text); scroll-margin-top: 12px; }
.legal-doc p { margin: 0 0 10px; }
.legal-doc ol, .legal-doc ul { margin: 0 0 10px; padding-left: 1.4em; }
.legal-doc li + li { margin-top: 4px; }
.legal-doc a { color: var(--cyan); }
.legal-doc .date { color: var(--muted); font-size: 12px; }
.legal-doc .note { padding: 10px 12px; border-radius: var(--r); background: rgba(0, 0, 0, 0.38); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.legal-doc .tbd { color: var(--mag); }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 13px; }
.legal-doc th, .legal-doc td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.legal-doc th { width: 34%; color: var(--muted); font-weight: 500; }
@media (max-width: 480px) { .legal-doc th, .legal-doc td { display: block; width: auto; padding: 4px 0; } .legal-doc th { border-bottom: 0; padding-top: 10px; } }
.legal-doc footer { margin-top: 16px; color: var(--muted); font-size: 12px; }

/* ---------- OP ムービー（マインドマップ「起動時: OPムービー・右下に Skip」。横長の動画は縦の画面では上下を黒で埋める） ---------- */
.opmv { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; align-items: center; justify-content: center; animation: fadein 0.3s ease-out; transition: opacity 0.25s ease-out; }
.opmv.out { opacity: 0; pointer-events: none; }
.opmv-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.opmv-wait { position: absolute; left: 50%; top: 50%; margin: -18px 0 0 -18px; }
.opmv-skip, .opmv-unmute { position: absolute; bottom: calc(16px + var(--safe-b)); min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: rgba(10, 6, 22, 0.62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); color: #fff; font: 800 14px/1 "Chakra Petch", "IBM Plex Sans JP", sans-serif; letter-spacing: 0.12em; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.opmv-skip { right: calc(16px + env(safe-area-inset-right, 0px)); display: inline-flex; align-items: center; gap: 8px; }
.opmv-skip span { font-size: 10px; letter-spacing: -0.1em; color: var(--cyan); }
.opmv-unmute { left: calc(16px + env(safe-area-inset-left, 0px)); letter-spacing: 0.04em; }
.opmv-skip:active, .opmv-unmute:active { filter: brightness(1.4); }

/* ---------- ホーム（2026-09-29 社長「マインドマップと Figma が正しい」→ Figma「BABEL開発」のホームの配置） ----------
   上の帯＝顔・ランク名・pt と棒／Gold・Bits（＋）／設定・受信箱・お知らせ。その下に EVENT（左）と mission（右・少し下）。
   左に六角（チャット・ランキング）、右に縦の枠（フレンド・対戦履歴・訓練所）、左下に SHOP。試合に戻る・待合室は右下 */
.home-top { gap: 6px; padding-left: 8px; padding-right: 8px; }
.home-top .prof { flex: 1 1 auto; gap: 6px; min-height: 44px; }
.home-top .prof .face { width: 34px; height: 34px; flex: none; }
.prof .pinfo { display: flex; flex-direction: column; min-width: 0; gap: 1px; line-height: 1.15; }
.prof .pinfo .rk { font-size: 11px; font-weight: 800; color: var(--text); letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; }
.prof .pinfo .pt { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.prof .pbar { display: block; width: 100%; max-width: 110px; height: 3px; margin-top: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.prof .pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mag), var(--cyan)); box-shadow: 0 0 6px var(--mag); }
.hright { display: flex; align-items: center; gap: 6px; flex: none; }
.home-top .wallet { gap: 4px; }
.hbtns { display: flex; gap: 0; }
.hbtn { position: relative; width: 34px; height: 44px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.hbtn img.gi { width: 30px; height: 30px; filter: drop-shadow(0 0 4px rgba(54, 226, 255, 0.45)); }
.hbtn:active { transform: scale(0.9); filter: brightness(1.3); }
.hbtn > .dot, .hexb > .dot, .home-frame button > .dot { top: 4px; right: 2px; }
/* Bits の「＋」（数を押すとショップの「Bits を買う」へ） */
button.coin { font: inherit; font-size: 14px; font-weight: 800; color: var(--text); cursor: pointer; }
button.coin:active { filter: brightness(1.3); }
.coin .plus { display: grid; place-items: center; width: 16px; height: 16px; margin-left: 2px; margin-right: -4px; border-radius: 50%; background: linear-gradient(135deg, var(--mag), #7a1bff); color: #fff; font: 900 13px/1 "Chakra Petch", sans-serif; box-shadow: 0 0 6px rgba(255, 46, 151, 0.8); }
@media (max-width: 400px) {
  .home-top .coin { height: 28px; padding: 0 7px 0 4px; gap: 3px; font-size: 12px; }
  .home-top .coin.gold i, .home-top .coin.bits i { width: 18px; height: 18px; }
  .home-top .coin .plus { width: 14px; height: 14px; font-size: 11px; }
  .hbtn { width: 30px; }
  .hbtn img.gi { width: 27px; height: 27px; }
  .home-top .prof .face { width: 30px; height: 30px; }
}

/* 立ち絵は床（タブの上）に立たせる。左右のボタンの列は避けない（Figma もボタンが手前） */
.home-scr .home-stand { top: calc(var(--top-h) + var(--safe-t) + 34px); bottom: calc(var(--tabs-h) + var(--safe-b) + 2px); }

/* EVENT と mission の札: 斜めに切った金属の札。EVENT は開催中のイベントがあると光る */
.home-plates { position: absolute; z-index: 4; left: 0; right: 0; top: calc(var(--top-h) + var(--safe-t) + 4px); pointer-events: none; }
.plate { position: absolute; pointer-events: auto; display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 4px 22px 4px 14px; border: 0; color: #fff; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%), linear-gradient(100deg, rgba(58, 34, 104, 0.95), rgba(20, 11, 40, 0.9));
  box-shadow: inset 0 0 0 1px rgba(190, 150, 255, 0.35), 0 4px 14px rgba(0, 0, 0, 0.45); transition: transform 0.08s, filter 0.12s; }
.plate:active { transform: scale(0.97); filter: brightness(1.3); }
.plate .pl { font: italic 800 20px/1 "Chakra Petch", sans-serif; letter-spacing: 0.08em; text-shadow: 0 0 10px rgba(255, 46, 151, 0.7); }
.plate.ev { left: 0; width: min(46%, 240px); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); border-left: 3px solid var(--gold); }
.plate.ev .ev-sub { max-width: 100%; margin-top: 3px; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate.ev.live { background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 55%), linear-gradient(100deg, rgba(138, 38, 110, 0.95), rgba(40, 14, 60, 0.92)); }
.plate.ev.live .pl { color: var(--gold); text-shadow: 0 0 12px rgba(255, 211, 77, 0.8); }
.plate.ev.live .ev-sub { color: #fff; }
.plate.ms { right: 0; top: 22px; width: min(36%, 190px); padding: 4px 14px 4px 24px; align-items: flex-end; clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%); border-right: 3px solid var(--cyan); }
.plate.ms .pl { font-size: 18px; text-shadow: 0 0 10px rgba(54, 226, 255, 0.8); }
.plate > .dot { top: 6px; right: auto; left: 18px; }
.plate.ev > .dot { left: auto; right: 22px; }

/* 左の六角（チャット・ランキング） */
.home-hex { position: absolute; z-index: 4; left: 6px; top: calc(var(--top-h) + var(--safe-t) + 84px); display: flex; flex-direction: column; gap: 6px; }
.hexb { position: relative; width: 64px; height: 64px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform 0.08s, filter 0.12s; }
.hexb .hx { position: absolute; inset: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  background: linear-gradient(160deg, rgba(255, 46, 151, 0.95), rgba(54, 226, 255, 0.7) 60%, rgba(190, 150, 255, 0.4)); display: grid; place-items: center; }
.hexb .hx::before { content: ""; position: absolute; inset: 2px; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 45%), radial-gradient(circle at 50% 40%, #3b1a70, #12072a 80%); }
.hexb .hx img.gi { position: relative; width: 34px; height: 34px; margin-top: -10px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.hexb .lb { position: relative; margin-top: 30px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); }
.hexb:active { transform: scale(0.93); filter: brightness(1.3); }

/* 右の縦の枠（フレンド・対戦履歴・訓練所） */
.home-frame { position: absolute; z-index: 4; right: 6px; top: calc(var(--top-h) + var(--safe-t) + 104px); display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border: 1px solid transparent; border-radius: 14px;
  background: linear-gradient(180deg, rgba(46, 27, 88, 0.9), rgba(12, 7, 26, 0.88)) padding-box, linear-gradient(170deg, rgba(255, 46, 151, 0.95), rgba(54, 226, 255, 0.6) 55%, rgba(190, 150, 255, 0.25)) border-box;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 46, 151, 0.25); }
.home-frame::before, .home-frame::after { content: ""; position: absolute; left: 50%; width: 22px; height: 3px; transform: translateX(-50%); background: var(--mag); box-shadow: 0 0 8px var(--mag); border-radius: 2px; }
.home-frame::before { top: -2px; }
.home-frame::after { bottom: -2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.home-frame button { position: relative; width: 56px; min-height: 58px; padding: 2px 0; border: 0; background: none; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 9.5px; font-weight: 800; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); cursor: pointer; transition: transform 0.08s, filter 0.12s; }
.home-frame button + button { border-top: 1px solid rgba(190, 150, 255, 0.18); }
.home-frame img.gi { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.home-frame button:active { transform: scale(0.93); filter: brightness(1.3); }

/* 左下の SHOP の札 */
.shopplate { position: absolute; z-index: 4; left: 0; bottom: calc(var(--tabs-h) + var(--safe-b) + 18px); display: flex; align-items: center; gap: 8px; min-width: 170px; min-height: 58px; padding: 4px 30px 4px 12px; border: 0; color: #fff; cursor: pointer; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%), linear-gradient(100deg, #c2187a, #7a1bff 70%, #3a1590);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); transition: transform 0.08s, filter 0.12s; }
.shopplate::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 45%, transparent 60%) -200% 0 / 200% 100% no-repeat; animation: shopshine 3.2s ease-in-out infinite; }
@keyframes shopshine { 0%, 55% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.shopplate .si img.gi { width: 44px; height: 44px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.shopplate .st { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.shopplate .st b { font: italic 800 26px/1 "Chakra Petch", sans-serif; letter-spacing: 0.06em; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
.shopplate .st small { margin-top: 3px; font-size: 10px; font-weight: 800; letter-spacing: 0.3em; opacity: 0.9; }
.shopplate:active { transform: scale(0.97); filter: brightness(1.2); }

/* 試合に戻る・待合室へ・相手待ち（右下。SHOP と並ぶ） */
.home-scr .home-cta { left: auto; right: 12px; width: min(48%, 260px); bottom: calc(var(--tabs-h) + var(--safe-b) + 18px); }
.home-scr .home-cta .btn { max-width: none; }

/* 吹き出し: 縦は脚のあたり（左右のボタンの列と SHOP の上）。横は立ち絵の左 */
.home-scr .bubble { left: 78px; right: 78px; top: auto; bottom: calc(var(--tabs-h) + var(--safe-b) + 90px); max-width: none; width: auto; border-radius: 14px 14px 4px 14px; }
@media (min-aspect-ratio: 1/1) {
  .home-scr .home-stand { left: 22%; right: 22%; }
  .home-scr .bubble { left: 84px; right: auto; width: min(30%, 320px); top: calc(var(--top-h) + var(--safe-t) + 150px); bottom: auto; border-radius: 14px 14px 14px 4px; }
  .home-frame { top: calc(var(--top-h) + var(--safe-t) + 74px); }
  .home-hex { top: calc(var(--top-h) + var(--safe-t) + 62px); }
  .home-scr .home-cta { right: 84px; width: min(30%, 280px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .home-plates { top: calc(var(--top-h) + var(--safe-t) + 2px); }
  .plate { min-height: 38px; }
  .plate .pl { font-size: 17px; }
  .plate.ms { top: 0; }
  .home-hex { top: calc(var(--top-h) + var(--safe-t) + 48px); flex-direction: row; }
  .hexb { width: 58px; height: 58px; }
  .home-frame { top: calc(var(--top-h) + var(--safe-t) + 46px); flex-direction: row; padding: 2px 6px; }
  .home-frame button { min-height: 54px; }
  .home-frame button + button { border-top: 0; border-left: 1px solid rgba(190, 150, 255, 0.18); }
  .home-scr .home-stand { bottom: calc(var(--tabs-h) + var(--safe-b)); }
  .shopplate { min-height: 50px; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px); }
  .shopplate .si img.gi { width: 38px; height: 38px; }
  .shopplate .st b { font-size: 22px; }
  .home-scr .bubble { top: calc(var(--top-h) + var(--safe-t) + 110px); left: 12px; width: min(36%, 300px); padding: 8px 12px; font-size: 13px; line-height: 1.5; }
  .home-scr .home-cta { right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px); }
}
.scr.enter .home-hex > *, .scr.enter .home-frame, .scr.enter .plate, .scr.enter .shopplate { animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.scr.enter .home-hex > :nth-child(2), .scr.enter .plate.ms { animation-delay: 50ms; }
.scr.enter .home-frame, .scr.enter .shopplate { animation-delay: 100ms; }

/* ---- チャット（2026-09-29 マインドマップ「チャット: フレンド・キャラ」） ---- */
.chatrow { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; border: 0; }
.chatrow .grow { min-width: 0; }
.chatrow .fwrap { position: relative; flex: none; display: inline-flex; }
.on-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--bg2), 0 0 8px var(--good); }
.chatrow .cnt { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--mag); color: #fff; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; box-shadow: 0 0 10px rgba(255, 46, 151, 0.6); }
.tabs2 button > .dot { top: 6px; right: 8px; }
.top .menu { flex: none; min-width: 44px; padding: 0 10px; font-size: 20px; letter-spacing: 0.1em; }
.top h1 .st { display: block; margin-top: 1px; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); text-shadow: none; transform: none; }
.top h1 .st.on { color: var(--good); }
.chat-scr .top h1 { line-height: 1.15; }
.chatbody { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chatlog { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 14px max(16px, calc((100% - 640px) / 2)) 10px; }
.chatlog > .empty { margin: auto 0; }
.cday { align-self: center; padding: 2px 12px; border-radius: 10px; background: rgba(8, 5, 20, 0.7); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; }
.cmsg { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.cmsg.mine { flex-direction: row-reverse; }
.cmsg .face.xs { width: 30px; height: 30px; align-self: flex-start; }
.cmsg .cb { position: relative; max-width: min(78%, 420px); padding: 9px 12px 7px; border-radius: 14px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; word-break: normal; }
.cmsg .ct { white-space: pre-wrap; }
.cmsg.them .cb { background: rgba(28, 18, 54, 0.92); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.35), 0 0 12px rgba(54, 226, 255, 0.12); border-top-left-radius: 4px; }
.cmsg.mine .cb { background: linear-gradient(135deg, rgba(255, 46, 151, 0.92), rgba(160, 30, 140, 0.92)); color: #fff; box-shadow: 0 0 14px rgba(255, 46, 151, 0.35); border-bottom-right-radius: 4px; }
.cmsg .tm { display: block; margin-top: 2px; font-size: 10px; opacity: 0.7; text-align: right; }
.cmsg .dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.cmsg .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: cdots 1s infinite ease-in-out; }
.cmsg .dots i:nth-child(2) { animation-delay: 0.15s; }
.cmsg .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes cdots { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chatnote { padding: 0 16px; text-align: center; font-size: 12px; color: var(--muted); }
.chatnote:empty { display: none; }
.chatnote.warn { color: var(--gold); }
.chatnote b { color: var(--cyan); }
.chatbar { display: flex; align-items: flex-end; gap: 8px; padding: 8px max(12px, calc((100% - 640px) / 2)) calc(8px + var(--safe-b)); background: rgba(8, 5, 20, 0.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 -1px 0 rgba(255, 46, 151, 0.45); }
.chatinw { position: relative; min-width: 0; }
textarea.input.chatin { display: block; width: 100%; min-height: 44px; height: 44px; max-height: 104px; resize: none; padding: 10px 12px; line-height: 1.5; font-size: 16px; }
.chatcnt { position: absolute; right: 8px; top: -18px; font-size: 11px; }
.chatcnt.over { color: var(--bad); }
.chatsend { flex: none; min-height: 44px; }
.btn.ghost.danger { color: #ff8095; }
@media (prefers-reduced-motion: reduce) { .cmsg .dots i { animation: none; opacity: 0.8; } }

/* ---- フレンド・マイページ・カード（2026-09-29 Figma「マイページ」・マインドマップ「フレンド」） ---- */
.badge.mag { background: var(--mag); color: #fff; }
.tabs2 .tcnt { display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--mag); color: #fff; font-size: 11px; line-height: 20px; vertical-align: 1px; }
.item.frow { padding: 8px 8px 8px 0; gap: 8px; }
.item.frow > .who { background: none; box-shadow: none; padding: 4px 0 4px 12px; min-height: 48px; min-width: 0; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.item.frow > .who .grow { min-width: 0; }
.item.frow .fwrap { position: relative; flex: none; display: inline-flex; }
.item.frow > .btn, .item.frow > .act, .item.frow > .sub { flex: none; }
.btn.talk { position: relative; }
.btn.talk > .dot { top: -4px; right: -4px; }
.card-x { justify-content: flex-end; gap: 8px; }
.card-x .btn { flex: none; }
.pf-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--cyan); background: rgba(54, 226, 255, 0.07); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.mypage { position: relative; gap: 12px; }
.mypage > * { position: relative; }
.mypage > .pf-art { position: absolute; top: -64px; right: -8px; width: 150px; height: 170px; object-fit: cover; object-position: center 8%; pointer-events: none; opacity: 0.9; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); z-index: 0; }
.mypage > :not(.pf-art) { position: relative; z-index: 1; }
.pf-top { display: flex; align-items: center; gap: 12px; padding-right: 118px; }
.pf-who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pf-name { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 20px; font-weight: 800; cursor: pointer; text-align: left; }
.pf-name .ell { min-width: 0; }
.pf-name .ed, .pf-memo .ed { flex: none; display: inline-flex; color: var(--cyan); }
.pf-id { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; letter-spacing: 0.06em; cursor: pointer; }
.pf-id small { color: var(--cyan); font-size: 11px; }
.pf-pt { font-size: 13px; color: var(--text); }
.pf-pt small { margin-left: 8px; color: var(--gold); font-size: 12px; font-weight: 800; }
.pf-lb { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: var(--muted); margin-bottom: -6px; }
.pf-memo { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(190, 150, 255, 0.45); color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pf-memo .ell { flex: 1; min-width: 0; }
.pf-memo .ph { color: var(--dim); }
.pf-seen { font-size: 13px; color: var(--muted); }
.rec { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; border-radius: 4px; background: rgba(8, 5, 20, 0.55); box-shadow: inset 0 0 0 1px rgba(190, 150, 255, 0.35); }
.rec > .rec-none { grid-column: 1 / -1; }
.rec-col { min-width: 0; }
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.25); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.rec-nav { width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--cyan); font-size: 16px; cursor: pointer; }
.rec-nav:disabled { opacity: 0.25; cursor: default; }
.rec-row { display: flex; justify-content: space-between; gap: 6px; padding: 6px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); font-size: 11px; white-space: nowrap; }
.rec-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.rec-none { padding: 14px 4px; text-align: center; font-size: 12px; color: var(--dim); }
.btn.pf-invite { background: linear-gradient(90deg, #c21d78, var(--mag) 50%, #c21d78); min-height: 52px; font-size: 17px; }
.pf-kv { font-size: 13px; }
@media (max-width: 360px) { .rec { grid-template-columns: 1fr; } .pf-top { padding-right: 86px; } .mypage > .pf-art { width: 110px; height: 130px; } }

/* AI チャットのはじめの顔（2026-09-29） */
.empty .chat-hello { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chat-hello .face.lg { width: 96px; height: 96px; box-shadow: 0 0 0 2px var(--cyan), 0 0 24px rgba(0, 229, 255, 0.35); }
.chat-hello b { font-size: 17px; color: var(--text); }
.chat-hello .dim { font-size: 12px; }
/* 横向きなど背の低い画面では、声の切り替えの行のぶん、はじめのカードの顔を小さくして上まで見せる */
@media (max-height: 460px) { .chatlog > .empty { padding: 12px 16px; } .empty .chat-hello { gap: 4px; } .chat-hello .face.lg { width: 56px; height: 56px; } }
/* キャラとのチャット: 文字／声の切り替えと、声の返事（2026-09-29 社長「テキストのみモードから音声モード選べたらいいかも」） */
.ico-voice { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; vertical-align: -3px; margin-right: 4px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.aimode { display: flex; align-items: center; gap: 8px; padding: 6px max(12px, calc((100% - 640px) / 2)); background: rgba(8, 5, 20, 0.72); box-shadow: 0 -1px 0 rgba(54, 226, 255, 0.25); }
.aimode:empty { display: none; }
.aiseg { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(0, 0, 0, 0.45); }
.aiseg button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap; }
.aiseg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 -2px 0 var(--mag); }
.aiseg button.on:has(.ico-voice) { color: var(--cyan); box-shadow: inset 0 -2px 0 var(--cyan), 0 0 12px rgba(54, 226, 255, 0.25); }
.aiseg button[disabled] { opacity: 0.4; cursor: default; }
.aiinfo { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.aiinfo b { color: var(--cyan); }
.aiinfo b.gold { color: var(--gold); }
.aiinfo .nw { white-space: nowrap; }
.aimode .aipass { flex: none; min-height: 36px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.cmsg .tm { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.cplay { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(54, 226, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.6); cursor: pointer; }
.cplay i { width: 0; height: 0; margin-left: 2px; border-left: 8px solid var(--cyan); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.cplay::after { content: ""; position: absolute; inset: -9px; }
.cplay { position: relative; }
.cmsg.voiced .cb { box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.7), 0 0 16px rgba(54, 226, 255, 0.25); }
.cmsg.typing small { font-size: 12px; }

/* ---- ガチャの演出（2026-09-30）: 動画（塔・カード・予告じゃんけんからランダム）→ SR 以上を1枚ずつ発表 → 一覧 ---- */
.gwrap { position: absolute; inset: 0; z-index: 50; overflow: hidden; background: #000; animation: fadein 0.15s ease-out; }
/* 演出の間、下の画面（一覧・タブ）は描かない。見えない層を持ち続けないため */
.scr.g-on > :not(.gwrap) { visibility: hidden; }
.gprod, .grev { position: absolute; inset: 0; overflow: hidden; }
.gvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter 0.25s ease-out; }
/* 色が変わる＝当たりの予告。動画は青で描いてあり、色相を回して紫・金・虹にする（mix-blend は iPhone の動画の上で効かないことがある） */
.gprod.t-sr .gvid { filter: hue-rotate(58deg) saturate(1.35); }
.gprod.t-gold .gvid { filter: hue-rotate(185deg) saturate(1.6) brightness(1.08); }
.gprod.t-ur .gvid { animation: ghue 0.9s linear infinite; }
@keyframes ghue { from { filter: hue-rotate(0deg) saturate(1.8) brightness(1.1); } to { filter: hue-rotate(360deg) saturate(1.8) brightness(1.1); } }
.gwhite { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; }
.gwhite.on { animation: gwhite var(--d, 0.35s) ease-out both; }
@keyframes gwhite { from { opacity: var(--a, 0.85); } to { opacity: 0; } }
.gskip { position: absolute; top: calc(var(--safe-t) + 10px); right: 12px; z-index: 6; min-height: 36px; padding: 6px 16px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); cursor: pointer; }
.gfall { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(70% 50% at 50% 45%, rgba(60, 20, 100, 0.92), rgba(5, 2, 12, 0.97)); }
/* 予告じゃんけん: ホログラムの手。グー＝R 以下・チョキ＝SR・パー＝SSR とキャラ・虹のパー＝UR */
.gcall { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 12%); z-index: 2; text-align: center; font-size: clamp(26px, 8vw, 54px); font-weight: 900; font-style: italic; letter-spacing: 0.12em; color: #fff; text-shadow: 0 0 10px #2ee6ff, 0 0 30px #2ee6ff, 0 3px 0 rgba(0, 0, 0, 0.6); animation: gslam 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; pointer-events: none; }
.ghands { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ghand { --hs: min(40vw, 30vh, 260px); position: absolute; left: 50%; top: 47%; width: var(--hs); height: var(--hs); margin: calc(var(--hs) / -2) 0 0 calc(var(--hs) / -2); filter: drop-shadow(0 0 8px #7ff3ff) drop-shadow(0 0 22px rgba(46, 230, 255, 0.8)); animation: ghandin 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.ghand img { display: block; width: 100%; height: 100%; opacity: 0.93; }
.ghand b { position: absolute; left: -50%; right: -50%; top: 100%; text-align: center; font-size: clamp(24px, 7vw, 44px); font-weight: 900; font-style: italic; letter-spacing: 0.1em; color: #fff; text-shadow: 0 0 10px #2ee6ff, 0 0 26px #2ee6ff, 0 3px 0 rgba(0, 0, 0, 0.6); }
.ghand.fin { --hs: min(54vw, 40vh, 360px); animation: ghandfin 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
.gprod.t-sr .ghand.fin { filter: drop-shadow(0 0 10px #e2b8ff) drop-shadow(0 0 30px var(--rar-SR)); }
.gprod.t-sr .ghand.fin b { text-shadow: 0 0 10px var(--rar-SR), 0 0 26px var(--rar-SR), 0 3px 0 rgba(0, 0, 0, 0.6); }
.gprod.t-gold .ghand.fin { filter: drop-shadow(0 0 10px #fff0b0) drop-shadow(0 0 32px var(--rar-SSR)); }
.gprod.t-gold .ghand.fin b { text-shadow: 0 0 10px var(--rar-SSR), 0 0 26px var(--rar-SSR), 0 3px 0 rgba(0, 0, 0, 0.6); }
.ghand.fin.ur { animation: ghandfin 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.25) both, ghandhue 1s linear 0.3s infinite; }
@keyframes ghandin { from { opacity: 0; transform: scale(0.5); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes ghandfin { from { opacity: 0; transform: scale(2.2); } 60% { opacity: 1; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes ghandhue { from { filter: drop-shadow(0 0 12px #ff9ef0) drop-shadow(0 0 32px #ff4fd8) hue-rotate(0deg); } to { filter: drop-shadow(0 0 12px #ff9ef0) drop-shadow(0 0 32px #ff4fd8) hue-rotate(360deg); } }
@keyframes gslam { from { opacity: 0; transform: scale(2.4); } 60% { opacity: 1; transform: scale(0.95); } to { opacity: 1; transform: none; } }
/* 1枚ずつの発表。SSR・UR は横に広がった一枚絵、それ以外は立ち絵を大きく（2026-09-30 社長「当たったキャラの画像も大きく迫力ある感じで」） */
.grev { --cx: 50%; --cy: 42%; --s: min(124vw, 84vh, 1100px); background: #05020c; cursor: pointer; }
/* ぼかした背景と回る光の筋は canvas（.gfx・gacha2.css）に描く */
.grev-art { position: absolute; left: var(--cx); top: var(--cy); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); max-width: none; object-fit: cover; -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent); mask-image: radial-gradient(closest-side, #000 80%, transparent); animation: gartin 0.6s cubic-bezier(0.15, 0.85, 0.3, 1) both; }
.grev-full { position: absolute; left: 0; right: 0; margin: 0 auto; top: calc(var(--safe-t) + 4%); height: 64%; width: auto; max-width: none; filter: drop-shadow(0 0 16px var(--rc)); animation: gfullin 0.5s cubic-bezier(0.15, 0.85, 0.3, 1) both; }
@keyframes gartin { from { opacity: 0; transform: scale(1.3); filter: brightness(2.4) blur(6px); } 45% { opacity: 1; } to { opacity: 1; transform: none; filter: none; } }
@keyframes gfullin { from { opacity: 0; transform: translateY(6%) scale(1.12); } to { opacity: 1; transform: none; } }
.grev-info { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 12px); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 14px; pointer-events: none; }
.grev-info button { pointer-events: auto; }
.grev-rar { font-size: clamp(46px, 14vw, 88px); line-height: 1; font-weight: 900; font-style: italic; letter-spacing: 0.04em; padding: 0 0.12em; color: #fff; text-shadow: 0 0 10px var(--rc), 0 0 30px var(--rc), 0 4px 0 rgba(0, 0, 0, 0.6); animation: gslam 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.25s both; }
.k-ur .grev-rar { color: transparent; text-shadow: none; background: linear-gradient(100deg, #ff4fd8, #ffd34d 30%, #6dffb4 50%, #4fa8ff 70%, #c070ff); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 8px rgba(255, 79, 216, 0.9)) drop-shadow(0 3px 0 rgba(0, 0, 0, 0.6)); }
.grev-name { display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 100%; text-align: center; animation: sayin 0.3s ease-out 0.45s both; }
.grev-name small { font-size: 14px; font-weight: 800; color: var(--rc); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }
.grev-name b { max-width: 100%; font-size: clamp(20px, 6vw, 30px); font-weight: 900; line-height: 1.2; color: #fff; text-shadow: 0 0 12px var(--rc), 0 2px 6px rgba(0, 0, 0, 0.9); overflow-wrap: anywhere; }
.grev-name .gtag { position: static; margin-top: 2px; font-size: 12px; padding: 1px 10px; }
.grev-say { width: 100%; max-width: 520px; min-height: 2.4em; padding: 6px 14px; border-radius: 12px; font-size: 14px; font-weight: 800; line-height: 1.5; text-align: center; text-wrap: balance; visibility: hidden; }
.grev-say.on { visibility: visible; background: rgba(5, 2, 12, 0.84); box-shadow: inset 0 0 0 1px rgba(54, 226, 255, 0.5), 0 0 16px rgba(54, 226, 255, 0.25); animation: sayin 0.22s ease-out; }
.grev-foot { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 520px; min-height: 48px; }
.grev-foot .gacts { width: 100%; animation: sayin 0.25s ease-out; }
.grev-foot .gacts .btn { min-width: 0; }
.grev-hint { font-size: 13px; font-weight: 800; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 4px #000; animation: sayin 0.25s ease-out, pulse 1.6s ease-in-out 0.3s infinite; }
.grev-head { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 56px); z-index: 2; padding: 0 12px; font-size: clamp(20px, 6vw, 30px); font-weight: 900; font-style: italic; letter-spacing: 0.06em; text-align: center; color: #fff; text-shadow: 0 0 10px var(--rc), 0 0 26px var(--rc), 0 2px 0 rgba(0, 0, 0, 0.6); animation: headin 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; pointer-events: none; }
/* スマホ縦で低い画面（SE など）: 絵を少し小さく上へ */
@media (orientation: portrait) and (max-height: 700px) {
  .grev { --cy: 38%; --s: min(116vw, 74vh, 1100px); }
  .grev-full { height: 58%; }
  .grev-rar { font-size: clamp(40px, 12vw, 72px); }
}
@media (orientation: portrait) and (max-height: 600px) {
  .grev-full { height: 54%; }
  .ghead { font-size: clamp(18px, 6vw, 24px); }
}
/* 横向き: 絵は左、名前とセリフは右 */
@media (orientation: landscape) {
  .grev { --cx: 36%; --cy: 50%; --s: min(96vh, 62vw, 1100px); }
  .grev-full { right: 26%; top: calc(var(--safe-t) + 3%); height: 94%; }
  .grev-info { left: auto; right: 0; top: 0; bottom: 0; width: min(44%, 440px); justify-content: center; padding: calc(var(--safe-t) + 8px) calc(env(safe-area-inset-right, 0px) + 16px) calc(var(--safe-b) + 8px) 8px; }
  .grev-head { left: auto; right: 0; width: min(44%, 440px); top: calc(var(--safe-t) + 50px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .grev-rar { font-size: clamp(38px, 11vh, 60px); }
  .grev-name b { font-size: 20px; }
  .grev-say { font-size: 13px; padding: 4px 12px; min-height: 2em; }
  .grev-head { font-size: 18px; }
}
/* 一覧: 3列で大きく。SSR・UR は一枚絵を2列ぶんの横長の札で */
.gres.sum { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row dense; }
.gres.sum .gcard.big { grid-column: span 2; aspect-ratio: 3 / 2; }
.gres.sum .gcard.big img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.gres.sum .gcard.big::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--rc), inset 0 0 14px var(--rc); pointer-events: none; }
.gres.sum.one .gcard.big { grid-column: auto; aspect-ratio: 3 / 4; }
.gshow .gacts { position: sticky; bottom: 0; z-index: 2; width: 100%; max-width: 520px; flex: none; }
.gshow .gacts .btn { min-width: 0; }
@media (min-width: 600px) { .gres.sum:not(.one) { grid-template-columns: repeat(5, 1fr); } }
@media (orientation: landscape) and (max-height: 520px) {
  .gres.sum:not(.one) { grid-template-columns: repeat(5, 1fr); }
  .gres.sum .gcard.big { grid-column: auto; aspect-ratio: 3 / 4; }
}
@media (min-width: 1000px) and (min-height: 760px) {
  .gshow .gacts { max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
  .gprod.t-ur .gvid, .ghand.fin.ur, .grev-hint { animation: none; }
  .grev-art, .grev-full, .grev-rar, .grev-name, .gcall, .ghand { animation-duration: 0.01s; }
}

/* 幅360以下（iPhone SE など）: 戻る・見出し・所持欄が1行に入らず「コレクション」「ミッション」が「…」で切れた（2026-09-30 320×568 で実測）。
   所持欄の丸と見出しを一回り小さくして、見出しを全部見せる */
@media (max-width: 360px) {
  .top { gap: 4px; padding-left: 6px; padding-right: 8px; }
  .top .back { width: 36px; }
  .top h1 { font-size: 16px; letter-spacing: 0.04em; }
  .top h1::before { margin: 0 6px 0 1px; }
  .top .wallet { gap: 3px; }
  .top .coin { height: 26px; padding: 0 7px 0 4px; gap: 3px; font-size: 12px; }
  .top .coin i { width: 14px; height: 14px; }
  .top .coin.ticket img { width: 18px; height: 18px; }
}

/* ガチャの画面の所持欄に並べるガチャチケット（2026-09-30 社長「ガチャのページに保有チケットが表示されてないかも」） */
.coin.ticket { padding-left: 3px; }
.coin.ticket img { width: 24px; height: 24px; object-fit: contain; flex: none; filter: drop-shadow(0 0 4px rgba(255, 46, 151, 0.6)); }

/* ==== ガチャのパチンコ風演出（2026-09-30 社長「もっと過激にパチンコのように派手に」「キャラをタッチすると拡大」）====
   光の点滅は1秒に3回まで（リーチの赤の明滅は1秒に1回） */
.gwrap.shake > .gprod, .gwrap.shake > .grev { animation: gshake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes gshake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-8px, 3px); } 40%, 60% { transform: translate(8px, -3px); } }
/* ステップアップ: 保留の色 青→緑→赤→金→虹 */
.gstep { --sc: #2e8bff; --sc2: #0a2a66; position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; overflow: hidden; }
.gstep[data-c="green"] { --sc: #34e07a; --sc2: #06401f; }
.gstep[data-c="red"] { --sc: #ff3b4f; --sc2: #4a0610; }
.gstep[data-c="gold"] { --sc: #ffd34d; --sc2: #5a3a00; }
.gstep[data-c="rainbow"] { --sc: #ff4fd8; --sc2: #3a0a52; }
.gstep-bg { position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% 48%, var(--sc2), #05020c 82%); }
.gstep[data-c="rainbow"] .gstep-bg { background: radial-gradient(60% 45% at 50% 48%, #7a1bff, #05020c 82%); animation: ghue 1.2s linear infinite; }
.gstep-rays { position: absolute; left: 50%; top: 48%; width: 200vmax; height: 200vmax; margin: -100vmax 0 0 -100vmax; opacity: 0.32; background: repeating-conic-gradient(from 0deg, var(--sc) 0deg 6deg, transparent 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 50%); mask-image: radial-gradient(circle, #000 8%, transparent 50%); animation: spin 7s linear infinite; pointer-events: none; }
.gstep-lamps { position: relative; display: flex; gap: 12px; }
.gstep-lamps i { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28); }
.gstep-lamps i.on { animation: gorbpop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
.gstep-lamps i.on:nth-child(1) { background: #2e8bff; box-shadow: 0 0 12px #2e8bff; }
.gstep-lamps i.on:nth-child(2) { background: #34e07a; box-shadow: 0 0 12px #34e07a; }
.gstep-lamps i.on:nth-child(3) { background: #ff3b4f; box-shadow: 0 0 12px #ff3b4f; }
.gstep-lamps i.on:nth-child(4) { background: #ffd34d; box-shadow: 0 0 14px #ffd34d; }
.gstep-lamps i.on:nth-child(5) { background: conic-gradient(#ff4fd8, #ffd34d, #6dffb4, #4fa8ff, #c070ff, #ff4fd8); box-shadow: 0 0 16px #ff4fd8; }
.gstep-orb { position: relative; width: min(46vw, 34vh, 280px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff 0 7%, var(--sc) 32%, var(--sc2) 80%); box-shadow: 0 0 30px var(--sc), 0 0 90px var(--sc), inset 0 -12px 30px rgba(0, 0, 0, 0.45); }
.gstep-orb.pop { animation: gorbpop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
.gstep[data-c="rainbow"] .gstep-orb { background: radial-gradient(circle at 36% 30%, #fff 0 7%, transparent 30%), conic-gradient(#ff4fd8, #ffd34d, #6dffb4, #4fa8ff, #c070ff, #ff4fd8); }
.gstep[data-c="rainbow"] .gstep-orb.pop { animation: gorbpop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4) both, spin 1.6s linear 0.4s infinite; }
@keyframes gorbpop { from { transform: scale(0.55); filter: brightness(2.2); } to { transform: none; filter: none; } }
.gstep-word { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 1.6em; text-align: center; pointer-events: none; }
.gstep-word.in { animation: gslam 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.gstep-word small { font-size: clamp(16px, 4.5vw, 24px); font-weight: 900; letter-spacing: 0.2em; color: #fff; text-shadow: 0 0 8px var(--sc), 0 2px 0 rgba(0, 0, 0, 0.6); }
.gstep-word b { font-size: clamp(38px, min(13vw, 15vh), 92px); line-height: 1.1; font-weight: 900; font-style: italic; letter-spacing: 0.04em; color: #fff; text-shadow: 0 0 10px var(--sc), 0 0 34px var(--sc), 0 4px 0 rgba(0, 0, 0, 0.6); }
.gstep[data-c="rainbow"] .gstep-word b { color: transparent; text-shadow: none; background: linear-gradient(100deg, #ff4fd8, #ffd34d 30%, #6dffb4 50%, #4fa8ff 70%, #c070ff); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 8px rgba(255, 79, 216, 0.9)) drop-shadow(0 3px 0 rgba(0, 0, 0, 0.6)); }
/* 役物: 塔の紋章が上から落ちてくる（激アツ） */
.gyaku { --yw: min(60vw, 40vh, 340px); position: absolute; left: 50%; top: 0; z-index: 2; width: var(--yw); margin-left: calc(var(--yw) / -2); aspect-ratio: 2.4; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(180deg, #fff6c8, #ffd34d 42%, #b8860b); box-shadow: 0 0 0 3px #fff, 0 0 34px #ffd34d, 0 12px 30px rgba(0, 0, 0, 0.6); animation: gyaku 0.8s cubic-bezier(0.3, 0, 0.4, 1) both; pointer-events: none; }
.gyaku b { font-size: calc(var(--yw) * 0.19); font-weight: 900; font-style: italic; letter-spacing: 0.12em; color: #3a2200; text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55); }
/* 止まる位置はスキップのボタン（上から10〜46px）の下。320×568 で「BABEL」がスキップに重なった */
@keyframes gyaku { 0% { transform: translateY(-120%) rotate(-10deg); } 50% { transform: translateY(calc(var(--safe-t) + 54px)) rotate(3deg); } 66% { transform: translateY(calc(var(--safe-t) + 38px)) rotate(-1deg); } 82%, 100% { transform: translateY(calc(var(--safe-t) + 54px)) rotate(0deg); } }
@media (orientation: landscape) { .gyaku { left: 15%; } }
/* スロット（4本目の演出） */
.gslot { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vh; overflow: hidden; }
.gslot-bg { position: absolute; inset: 0; background: radial-gradient(70% 50% at 50% 50%, #3a0a52, #05020c 85%); }
.gslot.reach .gslot-bg { background: radial-gradient(70% 50% at 50% 50%, #7a0a22, #05020c 85%); animation: greachbg 0.5s ease-in-out infinite alternate; }
.gslot.win .gslot-bg { animation: none; background: radial-gradient(70% 50% at 50% 50%, color-mix(in srgb, var(--wc, #c070ff) 55%, #05020c), #05020c 85%); }
.gslot.t-sr { --wc: var(--rar-SR); } .gslot.t-gold { --wc: var(--rar-SSR); } .gslot.t-ur { --wc: var(--rar-UR); }
.gslot.t-ur .gslot-bg { animation: ghue 1.2s linear infinite; }
@keyframes greachbg { from { opacity: 0.7; } to { opacity: 1; } }
.gslot-title { position: relative; font-size: clamp(22px, min(7vw, 9vh), 44px); font-weight: 900; font-style: italic; letter-spacing: 0.14em; color: #fff; text-shadow: 0 0 10px #ff2e97, 0 0 30px #ff2e97, 0 3px 0 rgba(0, 0, 0, 0.6); }
.gslot-frame { position: relative; display: flex; gap: 8px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, #2a1a3a, #0e0618); box-shadow: 0 0 0 3px #ffd34d, 0 0 0 6px #7a4a00, 0 0 30px rgba(255, 211, 77, 0.5); }
.gslot.win .gslot-frame { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--wc), 0 0 50px var(--wc), 0 0 110px var(--wc); }
.greel { --rh: min(26vw, 20vh, 150px); position: relative; width: var(--rh); height: calc(var(--rh) * 1.25); overflow: hidden; border-radius: 10px; background: linear-gradient(180deg, #0a0410, #231433 50%, #0a0410); box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.8), inset 0 -8px 14px rgba(0, 0, 0, 0.8); }
.greel-strip { display: flex; flex-direction: column; }
.gsym { flex: none; display: grid; place-items: center; height: calc(var(--rh) * 1.25); font-size: calc(var(--rh) * 0.4); font-weight: 900; font-style: italic; color: #fff; text-shadow: 0 0 8px var(--sc), 0 0 20px var(--sc), 0 3px 0 rgba(0, 0, 0, 0.6); }
.greel.run .greel-strip { animation: greel 0.36s linear infinite; }
.greel.crawl .greel-strip { animation: greel 1s linear infinite; }
.greel.run .gsym, .greel.crawl .gsym { filter: blur(1.2px); }
.greel.halt .greel-strip { animation: greelstop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.gslot.reach .greel.crawl { box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.8), inset 0 -8px 14px rgba(0, 0, 0, 0.8), 0 0 0 3px #ff3b4f, 0 0 26px #ff3b4f; }
.gslot.win .gsym { animation: gsymwin 0.5s ease-in-out infinite alternate; }
@keyframes greel { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes greelstop { from { transform: translateY(-35%); } to { transform: none; } }
@keyframes gsymwin { to { transform: scale(1.1); } }
.gslot-call { position: relative; min-height: 1.3em; font-size: clamp(34px, min(11vw, 13vh), 76px); line-height: 1.2; text-align: center; }
.gslot-call b { display: block; font-weight: 900; font-style: italic; letter-spacing: 0.06em; color: #fff; text-shadow: 0 0 10px #ff3b4f, 0 0 30px #ff3b4f, 0 4px 0 rgba(0, 0, 0, 0.6); animation: gslam 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.gslot.win .gslot-call b { text-shadow: 0 0 10px var(--wc), 0 0 34px var(--wc), 0 4px 0 rgba(0, 0, 0, 0.6); }
.gslot-call b.miss { font-size: 0.55em; color: #b8b0cc; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); }
/* SSR 以上の発表: コインと紙吹雪 */
.gburst { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.gburst .coin { position: absolute; left: 50%; top: 55%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8d0 0 18%, #ffd34d 42%, #b8860b 92%); box-shadow: 0 0 8px rgba(255, 211, 77, 0.8); animation: gcoin var(--d, 1.4s) cubic-bezier(0.2, 0.6, 0.4, 1) both; }
.gburst.ur .coin { background: radial-gradient(circle at 35% 30%, #fff 0 18%, #ff9ef0 42%, #7a1bff 92%); box-shadow: 0 0 10px rgba(255, 79, 216, 0.85); }
@keyframes gcoin { 0% { transform: translate(0, 0) rotateY(0deg) scale(0.4); } 45% { transform: translate(calc(var(--x) * 0.8), var(--y)) rotateY(calc(var(--r) * 0.5)) scale(1); } 100% { transform: translate(var(--x), 70vh) rotateY(var(--r)) scale(1); opacity: 0.85; } }
.gburst .conf { position: absolute; top: -4vh; width: 8px; height: 14px; border-radius: 2px; background: hsl(var(--h, 45) 95% 60%); animation: gconf var(--d, 2.4s) linear both; }
@keyframes gconf { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(var(--sx, 0), 112vh) rotate(var(--r, 360deg)); } }
/* 発表の画面の「拡大」 */
.grev-zoom { position: absolute; top: calc(var(--safe-t) + 10px); left: 12px; z-index: 6; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 16px 6px 12px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); cursor: pointer; }
.grev-zoom::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 5px 5px 0 -3px currentColor; }
/* 拡大の画面 */
.gzoom { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 8px; padding: calc(var(--safe-t) + 56px) 12px calc(var(--safe-b) + 12px); background: rgba(5, 2, 12, 0.95); animation: fadein 0.15s ease-out; }
.gzoom-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; border-radius: 14px; }
.gzoom-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; transition: transform 0.25s ease-out; cursor: zoom-in; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gzoom-stage.big img { transform: scale(2.2); cursor: grab; touch-action: none; }
.gzoom-info { --rc: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 10px; text-align: center; }
.gzoom-rar { font-size: 22px; font-weight: 900; font-style: italic; color: #fff; text-shadow: 0 0 8px var(--rc), 0 0 20px var(--rc); }
.gzoom-info b { font-size: 18px; font-weight: 900; overflow-wrap: anywhere; }
.gzoom-info small { flex-basis: 100%; font-size: 13px; font-weight: 800; color: var(--rc); }
.gzoom-tabs { display: flex; justify-content: center; gap: 8px; }
.gzoom-tabs button { min-height: 36px; padding: 4px 18px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); cursor: pointer; }
.gzoom-tabs button.on { background: var(--mag); box-shadow: none; }
.gzoom-x { position: absolute; top: calc(var(--safe-t) + 8px); right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; font: inherit; font-size: 24px; font-weight: 900; line-height: 1; color: #fff; background: rgba(255, 255, 255, 0.14); cursor: pointer; }
.gzoom-hint { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
@media (orientation: landscape) and (max-height: 520px) {
  .gzoom { padding: calc(var(--safe-t) + 8px) calc(env(safe-area-inset-right, 0px) + 64px) calc(var(--safe-b) + 8px) calc(env(safe-area-inset-left, 0px) + 64px); gap: 4px; }
  .gzoom-hint { display: none; }
}
/* 一覧: 札はタップで拡大。重なりの印と絆の行（重なった服があれば、同じ行に合成へのボタン） */
.gbond:has(.gdup) { padding: 5px 6px 1px 12px; } /* 上を空ける（360×640 で「絆 +64」の行が枠の線に接した） */
.gdup { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.gbond .gdup b { padding: 4px 10px; border-radius: 999px; background: linear-gradient(90deg, #ffd34d, #ff9f1c); color: #2a1600; font-size: 12px; white-space: nowrap; }
.gdup:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 10px; }
.gshow3.has-dup { --gsum-rest: 264px; --gsum-rest-l: 233px; } /* 360×640 でセリフの枠がボタンに約2px かかった（2026-10-01） */
.gshow3.has-dup.has-head { --gsum-rest: 309px; --gsum-rest-l: 273px; }
.gres.sum .gcard { cursor: pointer; }
.gres.sum .gcard:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gtag.up { background: linear-gradient(90deg, #ffd34d, #ff9f1c); color: #2a1600; }
.gtag.up.max { background: linear-gradient(90deg, #ff4fd8, #ffd34d, #6dffb4, #4fa8ff); color: #1a0820; }
.gbond { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 10px; width: 100%; max-width: 520px; padding: 6px 12px; border-radius: 12px; font-size: 13px; font-weight: 800; background: rgba(255, 46, 151, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 46, 151, 0.4); }
.gbond b { color: var(--rar-UR); }
.gbond .dim { font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
  .gwrap.shake > .gprod, .gwrap.shake > .grev, .gstep-rays, .gstep-bg, .gstep-orb, .gslot-bg, .greel-strip, .gsym, .gyaku { animation: none !important; }
  .gzoom-stage img { transition: none; }
}

/* ---- コレクション: 着ている服の Lv・装備ボーナス・絆（2026-09-30 社長「当たるメリットが薄い」→ 効果は Gold・経験値・RP だけ。勝ちやすさは変えない） ---- */
.ccard.secret.off img { filter: brightness(0) drop-shadow(0 0 10px var(--rar-SECRET)); opacity: 0.85; }
.ccard.secret .lock { color: var(--rar-SECRET); }
.ccard .secl { position: absolute; left: 50%; top: calc(42% + 30px); transform: translateX(-50%); padding: 1px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.6); color: var(--rar-SECRET); font-size: 12px; font-weight: 800; white-space: nowrap; text-shadow: 0 0 8px var(--rar-SECRET); }
.cd-bond { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: rgba(255, 79, 163, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.45); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cd-bond:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cd-bond .bar { margin: 6px 0; }
.bar.bond > i { background: linear-gradient(90deg, #ff4fa3, var(--gold)); }
.cd-bnext { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.cd-bnext .more { flex: none; color: var(--cyan); font-weight: 800; }
.cd-eq { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 60%, transparent); font-size: 13px; }
.cd-eqn { color: var(--rc); font-weight: 800; }
.cd-eq .stars { color: var(--gold); letter-spacing: 0.02em; }
.cd-eqt { flex-basis: 100%; color: var(--muted); font-size: 12px; line-height: 1.4; }
.cd-eqlv { flex-basis: 100%; display: flex; align-items: baseline; gap: 4px; margin-top: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
.cd-eqlv b { font-size: 18px; line-height: 1.1; }
.cd-eq .bar { flex-basis: 100%; margin: 2px 0 4px; }
.cd-eq .bar > i { background: linear-gradient(90deg, var(--gold), #ff9f1c); }

/* ---- 合成（服を育てる）: 重なった服をエサにえらぶシートと、合成のあとの演出 ----
   2026-09-30 社長「合成は自分でコレクションからしてレベルがあがるほうがいい」→ いらない服をエサにする形 */
.mg-pv { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.32); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 60%, transparent); }
.mg-lv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-variant-numeric: tabular-nums; }
.mg-a { color: var(--muted); font-size: 16px; font-weight: 800; }
.mg-ar { color: var(--dim); font-size: 11px; }
.mg-b { font-size: 26px; line-height: 1.1; }
.mg-b.up { color: var(--gold); text-shadow: 0 0 12px rgba(255, 211, 77, 0.7); }
.mg-cap { margin-left: auto; padding: 0 8px; border-radius: 11px; background: rgba(255, 255, 255, 0.1); color: var(--muted); font-size: 12px; font-weight: 800; line-height: 22px; white-space: nowrap; }
.mg-cap.up { background: linear-gradient(90deg, #ffd34d, #ff9f1c); color: #2a1600; }
.bar.mg { height: 10px; border-radius: 5px; }
.bar.mg > i { background: linear-gradient(90deg, var(--gold), #ff9f1c); transition: width 0.35s ease-out; }
.mg-eff { font-size: 13px; font-weight: 700; line-height: 1.4; }
.mg-eff span, .mgr-eff span { display: inline-block; margin-right: 0.8em; }
.mg-eff span:last-child, .mgr-eff span:last-child { margin-right: 0; }
.mg-note { min-height: 1.45em; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mg-tools { font-size: 13px; }
.mg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 10px; max-height: max(176px, 36vh); margin: 0 -4px; padding: 10px 8px 12px 4px; overflow-y: auto; overscroll-behavior: contain; }
.mg-cell { position: relative; }
.mg-cell .tc { display: block; width: 100%; }
.mg-cell.on .tc-body { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(255, 211, 77, 0.7); }
.mg-n { position: absolute; left: 50%; top: 40%; translate: -50% -50%; padding: 0 8px; border-radius: 12px; background: rgba(8, 4, 20, 0.88); box-shadow: 0 0 0 1px var(--gold); color: var(--gold); font-size: 14px; font-weight: 800; line-height: 24px; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.mg-n:empty { display: none; }
.mg-minus { position: absolute; right: -8px; bottom: -10px; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; background: none; font-size: 0; cursor: pointer; }
.mg-minus::before { content: "−"; position: absolute; inset: 8px; border-radius: 50%; background: #d8345f; box-shadow: 0 0 0 2px rgba(8, 4, 20, 0.92), 0 2px 6px rgba(0, 0, 0, 0.6); color: #fff; font-size: 20px; font-weight: 800; line-height: 26px; text-align: center; }
.mg-minus[hidden] { display: none; }
.mg-minus:focus-visible::before { outline: 2px solid #fff; outline-offset: 1px; }
.mg .acts { margin-top: 6px; }
.mgr { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow: hidden; text-align: center; }
.mgr-art { position: relative; width: min(46%, 168px); margin: 6px 0; }
.mgr-art .tc { position: relative; z-index: 1; display: block; width: 100%; animation: mgrpop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.mgr-rays { position: absolute; left: 50%; top: 50%; width: 270%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 60%, transparent) 0 8deg, transparent 8deg 20deg); -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 74%); mask: radial-gradient(closest-side, #000 18%, transparent 74%); opacity: 0.8; animation: mgrspin 9s linear infinite; pointer-events: none; }
.mgr-lv { display: flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.mgr-a { color: var(--muted); font-size: 18px; font-weight: 800; }
.mgr-b { display: inline-block; color: var(--gold); font-size: 40px; line-height: 1; text-shadow: 0 0 16px rgba(255, 211, 77, 0.8), 0 2px 0 #7a4a00; }
.mgr-b.pop { animation: mgrnum 0.16s ease-out; }
.mgr .bar { width: 100%; }
.mgr-chip { padding: 2px 14px; border-radius: 14px; background: linear-gradient(90deg, #ff4fd8, #ffd34d, #6dffb4, #4fa8ff); color: #1a0820; font-size: 14px; font-weight: 800; animation: mgrpop 0.5s 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.mgr-eff { font-size: 14px; font-weight: 800; line-height: 1.4; }
.mgr-sub { color: var(--muted); font-size: 12px; line-height: 1.45; }
@keyframes mgrpop { from { transform: scale(0.6); opacity: 0; } }
@keyframes mgrspin { to { rotate: 360deg; } }
@keyframes mgrnum { from { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) {
  .mgr-art .tc, .mgr-rays, .mgr-b.pop, .mgr-chip { animation: none; }
  .bar.mg > i { transition: none; }
}
.bondlist { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bondrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 13px; line-height: 1.4; }
.bondrow .bl { flex: none; width: 3.4em; color: #ff8cc6; }
.bondrow .bs { flex: none; color: var(--muted); font-size: 11px; text-align: right; }
.bondrow.got { opacity: 0.62; }
.bondrow.got .bs { color: var(--cyan); }
.bondrow.wait .bs { color: var(--gold); }
.bondrow.next { background: rgba(255, 79, 163, 0.14); box-shadow: inset 0 0 0 1px #ff4fa3; }
.bondrow.next .bs { color: #ff8cc6; font-weight: 800; }
.bondrow.lock { color: var(--muted); }

/* ---- 試合: 服のレアの演出（決勝のカットイン・優勝）・装備ボーナス・絆（2026-09-30） ---- */
.opslot.rx .opbg { background: radial-gradient(90% 70% at 50% 55%, color-mix(in srgb, var(--rc) 50%, #05020c), #05020c 80%); }
.opslot .opart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; mix-blend-mode: screen; }
.opslot.rx .opbody > img { filter: drop-shadow(0 0 16px var(--rc)) drop-shadow(0 0 40px color-mix(in srgb, var(--rc) 55%, transparent)); }
.opplate .oprar { color: var(--rc, #fff); font-weight: 800; letter-spacing: 0.04em; }
.cut.champ.rx { overflow: hidden; background: radial-gradient(60% 50% at 50% 45%, color-mix(in srgb, var(--rc) 32%, transparent), rgba(5, 2, 12, 0.86)); }
.cut.champ > .champbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.42; pointer-events: none; animation: champbg 5s ease-out both; }
@keyframes champbg { from { opacity: 0; transform: scale(1.14); } 20% { opacity: 0.42; } to { opacity: 0.42; transform: scale(1); } }
.cut.champ.rx .champimg { filter: drop-shadow(0 0 26px var(--rc)) drop-shadow(0 0 60px color-mix(in srgb, var(--rc) 55%, transparent)); }
/* 虹は画面と同じ大きさの層で、色のほうを回す（180vmax の層を回すと iPhone で1枚 100MB になる。ガチャの発表で落ちたのと同じ型） */
.cut.champ.r-ur::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg at 50% 50%, #ff4fd8, #ffd34d, #3dffa8, #36e2ff, #c070ff, #ff4fd8); opacity: 0.14; pointer-events: none; animation: rxhue 8s linear infinite; }
.cut.champ.r-ur .ownfx { animation: rxhue 3s linear infinite; }
@keyframes rxhue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
.champrar { color: var(--rc, var(--gold)); font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-shadow: 0 0 10px var(--rc, var(--gold)); }
.rbonus { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; margin: 0; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent); font-size: 13px; line-height: 1.5; }
.rbonus b { color: var(--rc); }
.rbond { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 79, 163, 0.1); font-size: 13px; line-height: 1.5; }
.rbond b { color: #ff8cc6; }
.rbond.up { box-shadow: inset 0 0 0 1px #ff4fa3; animation: pop 0.4s ease-out; }
@media (orientation: landscape) and (max-height: 520px) { .rbonus, .rbond { justify-content: flex-start; } }
@media (prefers-reduced-motion: reduce) { .cut.champ.r-ur::before, .cut.champ.r-ur .ownfx, .cut.champ > .champbg, .rbond.up { animation: none; } }

/* ---- AI チャット: 絆で開く話題・絆の増え方（2026-09-30） ---- */
.aitopics { display: flex; align-items: center; gap: 6px; padding: 6px max(12px, calc((100% - 640px) / 2)); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; background: rgba(8, 5, 20, 0.72); box-shadow: 0 -1px 0 rgba(255, 79, 163, 0.3); }
.aitopics::-webkit-scrollbar { display: none; }
.aitopics[hidden] { display: none; }
.aitl { flex: none; color: #ff8cc6; font-size: 12px; font-weight: 800; white-space: nowrap; }
.aitopic { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: rgba(255, 79, 163, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.6); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.aitopic:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.aitopic:disabled { opacity: 0.45; cursor: default; }
.aitopic.lock { background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); color: var(--muted); font-weight: 700; }
.aitopic .lk { display: inline-block; width: 13px; height: 13px; }
.aitopic .lk svg { display: block; width: 100%; height: 100%; }
.aitopic small { color: #ff8cc6; font-size: 11px; }
.cbond { align-self: center; display: inline-flex; gap: 8px; padding: 2px 12px; border-radius: 10px; background: rgba(255, 79, 163, 0.14); color: #ff8cc6; font-size: 11px; font-weight: 800; }
.cbond.up { box-shadow: inset 0 0 0 1px #ff4fa3; animation: pop 0.4s ease-out; }
.cbond.up b { color: var(--gold); }
@media (orientation: landscape) and (max-height: 520px) { .aitopics { padding-top: 4px; padding-bottom: 4px; } .aitopic { min-height: 32px; } }
@media (prefers-reduced-motion: reduce) { .cbond.up { animation: none; } }
