/* 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;
}

* { 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);
}
.tabs button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--dim); cursor: pointer; letter-spacing: 0.04em; }
.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); } }
.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; }
.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; }
.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: 23; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--safe-b)); width: min(92vw, 420px); }
.target .row .btn { flex: 1; }
.target .xbtn { flex: none; }

.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); }
.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; }
  .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: 20px; font-weight: 800; letter-spacing: 0.1em; 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; }
.s3stand img:last-child { 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; }

/* ---------- コレクション・ガチャ ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.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; }
.gbanner { position: relative; height: min(46vh, 380px); 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; align-items: flex-end; justify-content: center; }
.gbanner img { height: 96%; object-fit: contain; }
/* 字は立ち絵の上にのるので、上から暗い幕を下ろして読めるようにする（「今日のおすすめ」がフードの上で読めなかった・2026-09-29） */
.gbanner .cap { position: absolute; left: 0; top: 0; right: 0; padding: 12px 12px 28px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(180deg, rgba(11, 7, 22, 0.88), rgba(11, 7, 22, 0.6) 65%, transparent); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.gbanner .feat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #fff; }
.gbanner .feat b { padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 900; color: #2a1600; text-shadow: none; background: linear-gradient(180deg, #fff3b0, #ffc933 60%, #e0901e); box-shadow: 0 0 10px rgba(255, 201, 51, 0.5); }
/* 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) { display: flex; flex-wrap: wrap; justify-content: center; }
  .gres:not(.one) > .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; }

/* ---------- 文書 ---------- */
.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; } }
#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; }
.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; }

/* ---------- ガチャ ---------- */
.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; }
.cgrid.small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.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))); }
.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; }
}
.feedrow { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--r); background: rgba(0, 0, 0, 0.3); }
.feedrow .stepper { gap: 6px; }
.feedrow .stepper .btn { flex: 1; width: auto; min-width: 0; padding: 0 4px; }
.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; }
}

/* ================= 磨き（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 2px 6px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 255, 255, 0.28); }
.hex .when { text-shadow: 0 0 12px rgba(255, 255, 255, 0.45); }

/* 一覧の行・トースト */
.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 で付ける */
:root { --cyber-glow: 0 0 10px rgba(54, 226, 255, 0.45), 1.5px 0 0 rgba(255, 46, 151, 0.75), -1.5px 0 0 rgba(54, 226, 255, 0.65); }
.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 14px rgba(54, 226, 255, 0.55), 2px 0 0 rgba(255, 46, 151, 0.7); }
.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; }
/* 相手待ちのレーダー */
.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; }
