/* 将棋：濃い木の色・金・榧の木目。ガラス調のパネルと五角形の駒 */
:root {
  --bg0: #160505;
  --bg1: #2c0d0a;
  --bg2: #5a1a12;
  --ink: #f8eedb;
  --ink-dim: #d6c4a8;
  --ink-faint: #a58f70;
  --gold: #e0bd78;
  --gold-hi: #f7e3b0;
  --gold-lo: #a67f36;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-hi: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.13);
  --line-gold: rgba(224, 189, 120, 0.45);
  --wood-hi: #8a2a22;
  --wood-lo: #3e0f0b;
  --kaya-hi: #f3d493;
  --kaya-lo: #d9a95b;
  --piece-ink: #2a1708;
  --piece-red: #c1272d;
  --radius: 18px;
  --f-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --f-sans: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --f-latin: "Times New Roman", serif;
  /* 数字は「1」「0」がはっきり読める書体（Cormorant は古い字形で 1 が I、0 が o に見える） */
  --f-num: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg0);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-variant-numeric: lining-nums tabular-nums;
}
button, select, input { font: inherit; color: inherit; }
a { color: var(--gold); }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------------------------------------------------------------- 背景 */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, var(--bg2) 0%, var(--bg1) 45%, var(--bg0) 100%); }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.bg-glow.g1 { width: 56vmax; height: 56vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(224, 189, 120, 0.32), transparent 65%); }
.bg-glow.g2 { width: 60vmax; height: 60vmax; right: -24vmax; bottom: -26vmax; background: radial-gradient(circle, rgba(200, 60, 40, 0.42), transparent 65%); }
.bg-grain { display: none;
  position: absolute; inset: 0; opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------------------------------------------------------------- 上の帯 */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1120px; width: 100%; margin: 0 auto; padding: 14px 16px 6px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { position: relative; width: 44px; height: 44px; flex: none; border-radius: 12px; background: linear-gradient(145deg, var(--wood-hi), var(--wood-lo)); box-shadow: 0 0 0 1px var(--line-gold), 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.bm-pc { position: absolute; left: 50%; top: 50%; width: 26px; height: 30px; margin: -15px 0 0 -13px; display: grid; place-items: center; clip-path: polygon(50% 0, 90% 18%, 100% 100%, 0 100%, 10% 18%); background: linear-gradient(160deg, #f6dca0, #dcae62); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.bm-pc b { font-family: var(--f-serif); font-weight: 800; font-size: 15px; line-height: 1; color: var(--piece-ink); margin-top: 7px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-family: var(--f-serif); font-size: 22px; letter-spacing: 0.12em; font-weight: 700; }
.brand-text small { font-family: var(--f-latin); font-size: 13px; letter-spacing: 0.28em; color: var(--gold); text-transform: uppercase; }

.top-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; min-width: 0; }
.snd { display: flex; gap: 8px; }
.snd-btn {
  appearance: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-gold); background: rgba(224, 189, 120, 0.16); color: var(--gold-hi); font-size: 13px; font-weight: 700; line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.snd-btn:hover { background: rgba(224, 189, 120, 0.26); }
.snd-btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.snd-btn svg { flex: none; }
.snd-btn .slash { opacity: 0; }
.snd-state { font-family: var(--f-sans); font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--gold); color: #2a1c05; }
.snd-btn[aria-pressed="false"] { border-color: var(--line); background: var(--glass); color: var(--ink-faint); }
.snd-btn[aria-pressed="false"] .slash { opacity: 1; }
.snd-btn[aria-pressed="false"] .ic { opacity: 0.6; }
.snd-btn[aria-pressed="false"] .snd-state { background: rgba(255, 255, 255, 0.12); color: var(--ink-faint); }
.btn-logout { white-space: normal; line-height: 1.3; min-width: 0; flex: 0 1 auto; }

.me {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%;
  padding: 6px 8px 6px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line-gold);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.me-label { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.me-name { font-family: var(--f-serif); font-weight: 700; font-size: 17px; color: var(--gold-hi); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- 全体の枠 */
.stage { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 10px 16px 28px; }
.foot { display: flex; justify-content: center; gap: 18px; padding: 14px 16px 22px; font-size: 13px; color: var(--ink-faint); flex-wrap: wrap; }
.foot a { color: var(--ink-dim); }

/* ---------------------------------------------------------------- ボタン */
.btn {
  appearance: none; border: 1px solid var(--line); cursor: pointer; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; min-height: 44px; border-radius: 999px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--glass-hi); color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible, select:focus-visible, .cell:focus-visible, .seg input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn-gold {
  color: #2a1c05; border-color: rgba(255, 244, 205, 0.7);
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 52%, var(--gold-lo) 100%);
  box-shadow: 0 8px 22px rgba(166, 127, 54, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.btn-gold:hover:not(:disabled) { box-shadow: 0 10px 28px rgba(224, 189, 120, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.btn-primary { border-color: var(--line-gold); background: linear-gradient(180deg, rgba(224, 189, 120, 0.22), rgba(224, 189, 120, 0.1)); color: var(--gold-hi); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, rgba(224, 189, 120, 0.34), rgba(224, 189, 120, 0.16)); }
.btn-quiet { background: var(--glass); color: var(--ink-dim); }
.btn-quiet:hover:not(:disabled) { background: var(--glass-hi); color: var(--ink); }

/* ---------------------------------------------------------------- パネル・入力 */
.panel {
  position: relative; padding: 20px 20px 22px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel h2 { font-family: var(--f-serif); font-size: 21px; letter-spacing: 0.1em; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panel h2::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: linear-gradient(var(--gold-hi), var(--gold-lo)); }
.count { font-family: var(--f-num); font-weight: 700; font-size: 17px; color: var(--gold-hi); }
.hint-line { font-size: 14px; color: var(--ink-dim); margin-bottom: 12px; }
.empty { padding: 18px 8px; text-align: center; color: var(--ink-faint); font-size: 14px; }
.fine { margin-top: 10px; font-size: 14px; color: #ffb4a0; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.field > span { font-size: 12px; letter-spacing: 0.1em; color: var(--ink-faint); }
select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 10px 40px 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); font-size: 16px; font-weight: 500; cursor: pointer; color: var(--ink);
  background-color: rgba(22, 5, 5, 0.72);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1.5l6 6 6-6' fill='none' stroke='%23e0bd78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { background: #2c0d0a; color: var(--ink); }
select:hover { border-color: var(--line-gold); }

/* ---------------------------------------------------------------- ログイン */
.hero { text-align: center; padding: 26px 0 22px; }
.hero-title {
  font-family: var(--f-serif); font-weight: 700; letter-spacing: 0.22em; font-size: clamp(44px, 12vw, 76px); line-height: 1.15;
  background: linear-gradient(180deg, #fff6d9 0%, var(--gold) 55%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  text-shadow: none; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
  display: flex; flex-direction: column; align-items: center;
}
.hero-title span { font-size: clamp(14px, 3.6vw, 20px); letter-spacing: 0.5em; margin-top: 6px; font-weight: 500; padding-left: 0.5em; }
.hero-lead { margin-top: 14px; color: var(--ink-dim); font-size: 15px; }
.login-panel { max-width: 540px; margin: 0 auto; padding: 24px 22px 26px; }
.step { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 4px 0 12px; font-size: 15px; }
.step b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(var(--gold-hi), var(--gold-lo)); color: #2a1c05; font-family: var(--f-num); font-size: 15px; }
.select-row { display: flex; gap: 12px; }
.name-preview {
  margin: 16px 0 22px; padding: 14px 12px; text-align: center; border-radius: 14px;
  background: rgba(0, 0, 0, 0.28); border: 1px dashed var(--line-gold);
}
.name-preview > span { display: block; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.12em; }
.name-preview b { display: block; font-family: var(--f-serif); font-size: clamp(26px, 7vw, 34px); letter-spacing: 0.1em; color: var(--gold-hi); line-height: 1.3; overflow-wrap: anywhere; }
.feature-list { margin-top: 22px; display: grid; gap: 8px; }
.feature-list li { font-size: 14px; color: var(--ink-dim); padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); display: flex; gap: 10px; align-items: baseline; }
.feature-list b { color: var(--gold); min-width: 4.4em; font-family: var(--f-serif); }

/* ---------------------------------------------------------------- 待合 */
.player-list { display: grid; align-content: start; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 2px; }
.player {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.player:hover:not(.is-busy) { border-color: var(--line-gold); background: rgba(224, 189, 120, 0.08); transform: translateY(-1px); }
.player.is-busy { cursor: default; opacity: 0.75; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-serif); font-weight: 700; font-size: 19px; color: #2a1c05; background: linear-gradient(145deg, var(--gold-hi), var(--gold-lo)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 0, 0, 0.4); }
.p-info { flex: 1 1 9em; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.p-nm { font-family: var(--f-serif); font-size: 17px; letter-spacing: 0.06em; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.chip { white-space: nowrap; font-size: 12px; padding: 1px 10px; border-radius: 999px; border: 1px solid; line-height: 1.6; }
.chip-idle { color: #9fe5bd; border-color: rgba(120, 220, 160, 0.45); background: rgba(60, 170, 110, 0.14); }
.chip-game { color: #ffd59a; border-color: rgba(255, 190, 100, 0.45); background: rgba(230, 150, 40, 0.14); }
.chip-cpu { color: #b9cbff; border-color: rgba(150, 175, 255, 0.45); background: rgba(100, 130, 240, 0.14); }
.p-btn { flex: none; }

.cpu-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg legend { padding: 0; width: 100%; font-size: 12px; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 6px; float: left; }
.seg label { position: relative; flex: 1 1 0; min-width: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 10px; text-align: center; white-space: nowrap; border-radius: 12px; font-weight: 700; font-size: 15px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); color: var(--ink-dim); transition: all 0.2s;
}
.seg input:checked + span { color: #2a1c05; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: rgba(255, 244, 205, 0.7); box-shadow: 0 6px 16px rgba(166, 127, 54, 0.3); }
.mk { font-style: normal; font-family: var(--f-serif); font-weight: 800; font-size: 1.15em; line-height: 1; color: var(--gold); flex: none; }
.seg input:checked + span .mk { color: #2a1c05; }

.post-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.post-form .field:first-child { flex: 2 1 200px; }
.post-form .field { flex: 1 1 130px; }
.post-form .btn { flex: 0 0 auto; min-height: 48px; }
.post-list { display: grid; align-content: start; gap: 6px; margin-top: 12px; max-height: 380px; overflow-y: auto; padding-right: 2px; }
.post { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: baseline; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.045); border-left: 3px solid var(--gold-lo); }
.post-name { font-family: var(--f-serif); font-weight: 700; color: var(--gold-hi); font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.post-text { font-size: 15px; min-width: 0; overflow-wrap: break-word; word-break: normal; }
@supports (word-break: auto-phrase) { .post-text { word-break: auto-phrase; } }
.post-time { font-family: var(--f-num); font-size: 13px; color: var(--ink-faint); white-space: nowrap; }
@media (max-width: 420px) {
  .post { grid-template-columns: 1fr auto; }
  .post-text { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------------------------------------------------------------- 小窓・通知 */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(14, 3, 3, 0.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade 0.25s ease; }
.modal-card {
  position: relative; width: min(100%, 420px); padding: 34px 24px 24px; text-align: center; border-radius: 24px;
  background: linear-gradient(165deg, rgba(104, 28, 20, 0.97), rgba(38, 9, 7, 0.98));
  border: 1px solid var(--line-gold);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 60px rgba(224, 189, 120, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.25, 1.1);
}
.modal-kicker { font-family: var(--f-latin); font-size: 14px; letter-spacing: 0.3em; color: var(--gold); margin-top: 18px; }
.modal-card h2 { font-family: var(--f-serif); font-size: clamp(22px, 6vw, 27px); letter-spacing: 0.06em; line-height: 1.5; margin: 8px 0 14px; overflow-wrap: anywhere; }
.modal-card h2 b { color: var(--gold-hi); }
.timer { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin: 6px 6px 0; }
.timer i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width 0.25s linear; }
.modal-sub { font-size: 14px; color: var(--ink-dim); margin: 8px 0 18px; min-height: 1.2em; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.result-card .result-score { font-family: var(--f-num); font-size: 34px; font-weight: 700; color: var(--ink); letter-spacing: 0.04em; margin-bottom: 4px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: none; } }

.sending {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; width: min(calc(100% - 24px), 560px);
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 999px; font-size: 14px;
  background: rgba(42, 11, 9, 0.93); border: 1px solid var(--line-gold); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.sending > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.sending b { color: var(--gold-hi); }
.spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(224, 189, 120, 0.3); border-top-color: var(--gold-hi); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toasts { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(calc(100% - 24px), 480px); pointer-events: none; }
.toast {
  padding: 11px 16px; border-radius: 14px; font-size: 14px; text-align: center; line-height: 1.5; overflow-wrap: anywhere;
  background: rgba(42, 11, 9, 0.96); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(-10px); transition: opacity 0.35s, transform 0.35s;
}
.toast.in { opacity: 1; transform: none; }
.toast-ok { border-color: rgba(120, 220, 160, 0.55); }
.toast-warn { border-color: rgba(255, 190, 100, 0.6); }


/* ================================================================ ばくれつアリーナ固有 */
.stage, .wrap { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 10px 16px 28px; }
.brand-mark { display: grid; place-items: center; }
.brand-mark svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.hero-bombs { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.hero-bombs svg { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.hero-bombs svg:nth-child(odd) { transform: translateY(6px); }
.nm-f, .nm-b { white-space: nowrap; }
.view { min-width: 0; }
.doc-lead { color: var(--ink-dim); }

/* 待合 */
.lobby { display: grid; gap: 18px; padding-top: 10px; }
.lb-main, .lb-side { display: grid; gap: 18px; align-content: start; min-width: 0; }
.lb-main { container-type: inline-size; }
.lobby-hero { display: none; text-align: center; padding: 8px 0 4px; }
.lobby-kicker { font-family: var(--f-latin); font-size: 14px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); }
.lobby-title { margin-top: 6px; font-family: var(--f-serif); font-weight: 700; letter-spacing: 0.14em; line-height: 1.3; white-space: nowrap; font-size: clamp(28px, 3.4vw, 52px); background: linear-gradient(180deg, #fff6d9 0%, var(--gold) 55%, var(--gold-lo) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@supports (font-size: 1cqi) { .lobby-title { font-size: clamp(28px, 7.4cqi, 68px); letter-spacing: 0.1em; } }
.lobby-lead { margin-top: 10px; color: var(--ink-dim); font-size: 15px; }
@media (min-width: 900px) {
  .lobby { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .lobby-hero { display: block; }
}
.table-list { display: grid; gap: 10px; }
.tbl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.tbl-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; grid-column: 1; }
.tbl-no { font-family: var(--f-serif); font-size: 17px; margin-right: 4px; }
.tbl-seats { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.tbl-join { grid-column: 2; grid-row: 1 / span 2; }
.seat-chip { font-family: var(--f-serif); font-size: 14px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); max-width: 100%; overflow-wrap: anywhere; }
.seat-chip.is-empty { color: var(--ink-faint); border-style: dashed; }
.chip-mode { color: var(--gold-hi); border-color: var(--line-gold); background: rgba(224, 189, 120, 0.12); }
.chip-play { color: #ffd59a; border-color: rgba(255, 190, 100, 0.45); background: rgba(230, 150, 40, 0.14); }
.player { cursor: default; }
.fine-dim { color: var(--ink-faint); }

/* 部屋（始まる前） */
.room { display: grid; gap: 18px; max-width: 760px; margin: 0 auto; padding-top: 10px; }
.seat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.seat-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); min-width: 0; }
.seat-card.is-me { border-color: var(--gold); background: rgba(224, 189, 120, 0.12); }
.seat-card.is-empty { border-style: dashed; opacity: 0.75; }
.seat-no { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-num); font-weight: 700; color: #2a1c05; background: linear-gradient(var(--gold-hi), var(--gold-lo)); }
.seat-name { font-family: var(--f-serif); font-size: 16px; overflow-wrap: anywhere; line-height: 1.35; }
.seat-sub { color: var(--ink-faint); font-size: 12px; }
.seat-sub .off { color: #ffb4a0; }
.room-note { font-size: 14px; color: var(--ink-dim); margin-bottom: 14px; }
.room-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.room-actions .btn { flex: 1 1 0; }

/* 対戦の画面（待合と同じページの中の1つの画面） */
.game { display: grid; gap: 10px; justify-items: stretch; width: 100%; max-width: 760px; margin: 0 auto; padding-top: 6px; }
.watch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 14px; background: rgba(224, 189, 120, 0.1); border: 1px solid var(--line-gold); }
.watch-names { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-dim); overflow-wrap: anywhere; }
.bp-plates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pcard { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 8px 10px; min-width: 0; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.pcard.is-me { border-color: var(--gold); background: rgba(224, 189, 120, 0.12); }
.pcard.is-dead { opacity: 0.45; }
.pcard.is-dead .pname { text-decoration: line-through; }
.pdot { display: block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.2); }
.pcard.c0 .pdot { background: #ff5252; }
.pcard.c1 .pdot { background: #42a5f5; }
.pcard.c2 .pdot { background: #ffee58; }
.pcard.c3 .pdot { background: #ab47bc; }
.pinfo { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pname { font-family: var(--f-serif); font-size: 14px; overflow-wrap: anywhere; }
.pitems { font-size: 11px; color: var(--ink-faint); overflow-wrap: anywhere; }
.ptag { position: absolute; right: 6px; top: -9px; font-size: 10px; padding: 0 8px; line-height: 1.7; border-radius: 999px; background: var(--gold); color: #2a1c05; font-weight: 700; }
.bp-status { display: flex; align-items: baseline; justify-content: center; gap: 14px; min-height: 1.7em; font-family: var(--f-serif); font-size: 18px; text-align: center; }
.bp-clock { font-family: var(--f-num); font-size: 22px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.bp-msg { color: var(--ink-dim); letter-spacing: 0.04em; }
.bp-field { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-gold); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); background: #0e0303; }
#gl { width: 100%; aspect-ratio: 640 / 560; max-height: 62svh; min-height: 240px; position: relative; touch-action: none; }
#gl canvas { display: block; width: 100% !important; height: 100% !important; }
.bp-touch { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px; user-select: none; -webkit-user-select: none; }
@media (hover: none) and (pointer: coarse) { .bp-touch { display: flex; } }
.game.is-watch .bp-touch { display: none; }
.pad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 58px); gap: 4px; }
.pad button { appearance: none; border: 1px solid var(--line-gold); border-radius: 14px; background: rgba(224, 189, 120, 0.16); color: var(--gold-hi); font-size: 22px; touch-action: none; }
.pad button:active { background: rgba(224, 189, 120, 0.4); }
.pad .up { grid-column: 2; grid-row: 1; }
.pad .left { grid-column: 1; grid-row: 2; }
.pad .right { grid-column: 3; grid-row: 2; }
.pad .down { grid-column: 2; grid-row: 3; }
.act-col { display: grid; gap: 10px; }
.act-col button { appearance: none; width: 92px; height: 62px; border-radius: 18px; border: 1px solid rgba(255, 244, 205, 0.7); font-weight: 700; font-size: 16px; color: #2a1c05; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); touch-action: none; }
#detBtn { height: 46px; background: linear-gradient(180deg, #cfd8e6, #8d9db5); }
.game-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.game-actions .btn { min-width: 12em; }
.info-panel h2 { font-size: 17px; margin-bottom: 8px; }
.help-list { display: grid; gap: 6px; font-size: 14px; color: var(--ink-dim); }
.help-list li { padding-left: 1em; text-indent: -1em; }
.help-list li::before { content: "・"; }

/* ルールの説明 */
.seo { max-width: 760px; margin: 28px auto 0; padding: 20px 22px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); color: var(--ink-dim); font-size: 14px; }
.seo h2 { font-family: var(--f-serif); font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.seo h3 { font-family: var(--f-serif); font-size: 16px; color: var(--gold); margin: 16px 0 6px; }
.seo ul, .seo ol { padding-left: 1.4em; list-style: revert; }
.seo li { margin: 3px 0; }
.seo dt { font-weight: 700; color: var(--ink); margin-top: 8px; }
.seo dd { margin: 0; }
.seo b { color: var(--gold-hi); }

/* プライバシーポリシー */
.doc { max-width: 780px; margin: 10px auto 0; padding: 26px 26px 30px; }
.doc h1 { font-family: var(--f-serif); font-size: 26px; letter-spacing: 0.1em; margin: 8px 0 4px; }
.doc h2 { font-family: var(--f-serif); font-size: 18px; margin: 24px 0 8px; display: block; }
.doc h2::before { display: none; }
.doc p, .doc li { font-size: 15px; color: var(--ink-dim); }
.doc ul { list-style: disc; padding-left: 1.4em; display: grid; gap: 6px; }
.doc-date { font-size: 13px; color: var(--ink-faint); margin-bottom: 14px; }
.doc-back { display: inline-block; font-size: 14px; margin-bottom: 6px; }
.doc strong, .doc b { color: var(--gold-hi); }
@media (max-width: 760px) {
  .bp-plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .wrap, .stage { padding: 6px 12px 22px; }
  .tbl { grid-template-columns: 1fr; }
  .tbl-join { grid-column: 1; grid-row: auto; width: 100%; }
  .hero-bombs svg { width: 40px; height: 40px; }
  .doc { padding: 18px 16px 22px; }
}
