:root {
  --blue: #007fff;
  --head: #0f69f5;
  --link: #1a39c5;
  --red: #e82929;
  --text: #333;
  --line: #ccc;
  --light: #f5f5f5;
  --green: #5cb85c;
  --label-blue: #337ab7;
  --pink-bg: #f2dede;
  --pink-line: #ebccd1;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--text);
  font-family: "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", メイリオ, Meiryo, "MS ゴシック", "MS Gothic", sans-serif;
  font-size: 14px; line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { vertical-align: middle; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.bar { height: 6px; background: var(--blue); }
.container { width: 1000px; margin: 0 auto; padding: 0 15px; }
.row { display: flex; gap: 30px; align-items: flex-start; }
.col-4 { width: 300px; flex: 0 0 300px; min-width: 0; }
.col-8 { flex: 1 1 auto; min-width: 0; }
.col-6 { flex: 1 1 0; min-width: 0; }
.clearfix::after { content: ""; display: block; clear: both; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: #888; }
.small { font-size: 12px; }
.red { color: var(--red); }
.bold { font-weight: bold; }
.mt10 { margin-top: 10px; } .mt20 { margin-top: 20px; } .mt30 { margin-top: 30px; }
.mb10 { margin-bottom: 10px; } .mb20 { margin-bottom: 20px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-all; }

/* ===== ヘッダー ===== */
header.site { padding-top: 10px; }
.head-top { display: flex; align-items: flex-start; gap: 20px; }
.logo { display: block; width: 180px; height: 100px; flex: 0 0 180px; }
.logo img { width: 180px; height: 100px; object-fit: contain; }
.head-mid { flex: 1; padding-top: 14px; }
.toplinks { list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: #cfc9b7; display: flex; flex-wrap: wrap; }
.toplinks li + li::before { content: "|"; margin: 0 6px; }
.search { display: flex; width: 370px; }
.search input { flex: 1; height: 28px; border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px; padding: 3px 10px; font-size: 13px; }
.search button { height: 28px; padding: 0 12px; border-radius: 0 4px 4px 0; font-size: 13px; }
.head-right { width: 175px; flex: 0 0 175px; padding-top: 5px; }
.head-right .btn-outline { display: block; width: 100%; margin-bottom: 6px; text-align: center; font-weight: bold; font-size: 13px; padding: 3px 4px; border-radius: 4px; background: #fff; }
.btn-outline.blue { color: #1d9bf0; border: 1px solid #1d9bf0; }
.btn-outline.red { color: #e62117; border: 1px solid #e62117; }
.head-user { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 6px; }
.head-user .name { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.head-user-links { font-size: 12px; }
.head-user-links a + a::before { content: "|"; color: #cfc9b7; margin: 0 5px; }

nav.gnav { margin-top: 8px; }
nav.gnav ul { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid var(--line); border-radius: 5px; box-shadow: 2px 2px 2px #aaa; overflow: hidden; }
nav.gnav li { flex: 1; text-align: center; font-weight: bold; }
nav.gnav li + li { border-left: 1px solid #e7e7e7; }
nav.gnav a { display: block; padding: 9px 4px; color: var(--link); }
nav.gnav a:hover, nav.gnav a.active { background: #e7e7e7; text-decoration: none; }

.notice { margin: 15px 0 0; padding: 12px 15px; background: var(--pink-bg); border: 1px solid var(--pink-line); border-radius: 4px; color: #a94442; font-size: 13px; }
.notice a { text-decoration: underline; font-weight: bold; color: var(--link); }

/* ===== メイン ===== */
main { padding: 15px 0 40px; min-height: 400px; }
.breadcrumb { font-size: 12px; color: #777; margin: 8px 0 4px; padding: 0 2px; }
.breadcrumb a { color: var(--link); }
.breadcrumb span.sep { margin: 0 6px; color: #ccc; }
h1.page { color: var(--red); font-size: 26px; font-weight: 500; border-bottom: 2px solid var(--blue); padding-bottom: 5px; margin-bottom: 10px; line-height: 1.3; word-break: break-all; }
h2.box { background: var(--head); color: #fff; font-size: 20px; font-weight: bold; padding: 8px 10px; line-height: 1.3; }
h2.box small { font-size: 12px; font-weight: normal; margin-left: 8px; }
h3.sub { font-size: 16px; border-left: 5px solid var(--head); padding: 3px 8px; margin: 20px 0 10px; }
.box-body { border: 1px solid var(--line); border-top: 0; padding: 10px; font-size: 13px; }
.box-body + h2.box, .list + h2.box, .section + .section { margin-top: 20px; }
.section { margin-bottom: 20px; }
.intro { font-size: 14px; margin-bottom: 15px; }

.list { border: 1px solid var(--line); border-top: 0; }
.list-row { display: flex; align-items: center; border-top: 1px solid var(--line); padding: 8px 10px; gap: 10px; min-height: 56px; }
.list-row:first-child { border-top: 0; }
.list-row.gray { background: var(--light); }
.list-empty { padding: 15px; text-align: center; color: #888; font-size: 13px; }
.sidebox p + p { margin-top: 10px; }
.sidebox .item { padding: 8px 0; border-top: 1px solid #eee; }
.sidebox .item:first-child { border-top: 0; padding-top: 0; }

/* ラベル・ボタン */
.label { display: inline-block; padding: 1px 6px 2px; font-size: 10.5px; font-weight: bold; color: #fff; border-radius: 3px; line-height: 1.4; white-space: nowrap; }
.label.green { background: var(--green); }
.label.blue { background: var(--label-blue); }
.label.sky { background: #5bc0de; }
.label.gray { background: #999; }
.label.red { background: #d9534f; }
.label.orange { background: #f0ad4e; }
.label.stream { background: #fff; color: #e50202; border: 1px solid #e50202; font-size: 10px; padding: 0 3px; }
.btn { display: inline-block; padding: 6px 14px; border-radius: 4px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; line-height: 1.4; text-align: center; color: var(--text); }
.btn:hover { background: #f0f0f0; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: #2e6da4; color: #fff; }
.btn-primary:hover { background: #0069d9; }
.btn-success { background: var(--green); border-color: #4cae4c; color: #fff; }
.btn-success:hover { background: #449d44; }
.btn-danger { background: #d9534f; border-color: #d43f3a; color: #fff; }
.btn-danger:hover { background: #c9302c; }
.btn-warning { background: #f0ad4e; border-color: #eea236; color: #fff; }
.btn-lg { font-size: 18px; padding: 10px 16px; font-weight: bold; }
.btn-block { display: block; width: 100%; }
.btn-sm { font-size: 12px; padding: 3px 9px; }

/* フォーム */
.form-group { margin-bottom: 14px; }
.form-group > label { display: block; font-weight: bold; margin-bottom: 4px; font-size: 13px; }
.form-control { width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 14px; }
.form-control:focus { outline: none; border-color: #66afe9; box-shadow: 0 0 0 3px rgba(102,175,233,.3); }
textarea.form-control { min-height: 90px; resize: vertical; }
.help { font-size: 12px; color: #777; margin-top: 3px; }
.inline-checks label { display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; font-weight: normal; }
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; font-size: 13px; }
.alert-danger { background: var(--pink-bg); border: 1px solid var(--pink-line); color: #a94442; }
.alert-info { background: #d9edf7; border: 1px solid #bce8f1; color: #31708f; }
.alert-success { background: #dff0d8; border: 1px solid #d6e9c6; color: #3c763d; }
.alert-warning { background: #fcf8e3; border: 1px solid #faebcc; color: #8a6d3b; }

/* アバター・ファイターチップ */
.avatar { display: inline-block; flex: 0 0 auto; border-radius: 3px; overflow: hidden; background: #ccc; position: relative; vertical-align: middle; }
.avatar svg { width: 100%; height: 100%; display: block; }
.fchip { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 36px; padding: 0 4px; border-radius: 3px; font-size: 10px; font-weight: bold; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.35); white-space: nowrap; vertical-align: middle; line-height: 1; }
.fchip.lg { height: 26px; font-size: 12px; padding: 0 8px; }
.fchip.empty { background: #fff; border: 1px solid #ddd; color: #bbb; text-shadow: none; }
.uname { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.wired { color: #555; font-size: 12px; }
.pcell { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 0; }
.pcell .info { min-width: 0; flex: 1; }
.pcell .info .line { border-bottom: 1px solid #eee; padding-bottom: 2px; margin-bottom: 3px; display: flex; align-items: center; gap: 3px; min-width: 0; }
.pcell .info .line .wired { flex: 0 0 auto; }
.rowno { width: 70px; flex: 0 0 70px; text-align: center; font-weight: bold; font-size: 13px; }
.rowno .ago { font-size: 11px; color: var(--red); font-weight: bold; }

/* ランキング */
.rank-row .rank { width: 40px; flex: 0 0 40px; font-size: 20px; font-weight: bold; text-align: center; color: #333; }
.rank-row .rate { width: 60px; flex: 0 0 60px; text-align: right; font-weight: bold; color: #777; }
.rank-row.top1 .rank { color: #d4a500; } .rank-row.top2 .rank { color: #8a9aa8; } .rank-row.top3 .rank { color: #b0683a; }

/* 大会 */
.t-row { display: block; border-top: 1px solid var(--line); padding: 8px 10px; }
.t-row:first-child { border-top: 0; }
.t-row .t-title { font-weight: bold; }
.t-row .t-desc { font-size: 12px; color: #555; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.t-row .t-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 12px; margin-top: 3px; flex-wrap: wrap; }
.countdown b { font-size: 18px; color: var(--red); margin: 0 1px; }

/* 日記 */
.d-row { display: block; border-top: 1px solid var(--line); padding: 8px 10px; }
.d-row:first-child { border-top: 0; }
.d-row .d-title { font-weight: bold; }
.d-row .d-ex { font-size: 12px; color: #555; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.d-row .d-foot { text-align: right; font-size: 12px; }
.newmark { color: var(--red); font-weight: bold; font-size: 12px; margin-left: 4px; }
.diary-body { font-size: 14px; line-height: 1.8; padding: 15px; border: 1px solid var(--line); border-top: 0; white-space: pre-wrap; word-break: break-word; }

/* コメント */
.comments { border: 1px solid var(--line); border-top: 0; max-height: 420px; overflow-y: auto; background: #fafafa; }
.comment { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid #eee; }
.comment:first-child { border-top: 0; }
.comment .c-body { flex: 1; min-width: 0; }
.comment .c-head { font-size: 12px; color: #777; }
.comment .c-text { white-space: pre-wrap; word-break: break-word; }
.comment.mine { background: #eef6ff; }
.comment.system { background: #fff8e1; font-size: 12px; color: #8a6d3b; }
.comment-form { display: flex; gap: 6px; margin-top: 8px; }
.comment-form textarea { min-height: 40px; height: 40px; }
.comment-form .btn { flex: 0 0 auto; white-space: nowrap; }

/* ユーザーページ */
.u-card { display: flex; gap: 10px; align-items: flex-start; }
.u-card .u-name { font-size: 18px; font-weight: bold; word-break: break-all; }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv th, .kv td { border-top: 1px solid #eee; padding: 7px 4px; text-align: left; vertical-align: top; }
.kv tr:first-child th, .kv tr:first-child td { border-top: 0; }
.kv th { width: 40%; color: #555; font-weight: bold; }
.u-links a { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-top: 1px solid #eee; }
.u-links a:first-child { border-top: 0; }
.badge { display: inline-block; min-width: 18px; padding: 1px 6px; font-size: 11px; font-weight: bold; color: #fff; background: #777; border-radius: 10px; text-align: center; }
.graph { width: 100%; height: 260px; display: block; }
.plus { color: #1a8f2a; font-weight: bold; } .minus { color: var(--red); font-weight: bold; }

/* レート対戦ルーム */
.vs { display: flex; align-items: stretch; gap: 10px; }
.vs .player { flex: 1; border: 1px solid var(--line); padding: 10px; min-width: 0; }
.vs .player.me { background: #f4f9ff; }
.vs .mid { display: flex; align-items: center; font-size: 26px; font-weight: bold; color: var(--red); }
.player .p-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.player .p-name { font-size: 16px; font-weight: bold; word-break: break-all; }
.arena-box { border: 3px solid var(--blue); background: #f4f9ff; padding: 14px; text-align: center; margin: 15px 0; }
.arena-box .arena-id { font-size: 34px; font-weight: bold; letter-spacing: 6px; color: #003f8c; font-family: Consolas, "Courier New", monospace; }
.arena-box .pw { font-size: 16px; margin-top: 4px; }
.arena-form { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.arena-form input { width: 140px; text-transform: uppercase; font-size: 20px; text-align: center; letter-spacing: 4px; font-family: Consolas, monospace; }
.waiting-box { text-align: center; padding: 20px 10px; border: 1px solid var(--line); border-top: 0; }
.spinner { width: 36px; height: 36px; border: 4px solid #d6e6ff; border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.stages { display: flex; flex-wrap: wrap; gap: 6px; }
.stage { border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; font-size: 13px; background: #fff; }
.stage.x { background: #eee; color: #aaa; text-decoration: line-through; }
.report-btns { display: flex; gap: 8px; }
.report-btns .btn { flex: 1; font-weight: bold; }
.result-big { font-size: 22px; font-weight: bold; text-align: center; padding: 14px; }

/* ファイター一覧 */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.fcard { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 6px; font-size: 12px; border-radius: 3px; color: var(--text); }
.fcard:hover { background: #f4f9ff; text-decoration: none; }
.fcard .fname { font-weight: bold; color: var(--link); }

/* 表 */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
table.tbl th { background: #f5f5f5; }

/* 静的ページ */
.doc { font-size: 14px; line-height: 1.85; }
.doc h3 { font-size: 17px; border-left: 5px solid var(--head); padding: 2px 10px; margin: 26px 0 10px; }
.doc p, .doc ul, .doc ol { margin: 0 0 10px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc .point { background: #fff8e1; border: 1px solid #f3dfa2; padding: 10px 14px; border-radius: 4px; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }

/* フッター */
footer.site { border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; padding: 15px 0; text-align: center; font-size: 11px; color: #666; line-height: 1.7; }
footer.site a { color: var(--link); }
footer .flinks { margin-bottom: 6px; font-size: 12px; }
footer .flinks a + a::before { content: "|"; color: #ccc; margin: 0 6px; }

/* トースト */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 14px; z-index: 1000; max-width: 90vw; }
.toast.err { background: rgba(190,30,30,.92); }

/* モーダル */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 6px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; }
.modal h2.box { border-radius: 6px 6px 0 0; font-size: 17px; }
.modal .m-body { padding: 14px; }
.modal .m-foot { padding: 10px 14px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 8px; }

/* ===== スマホ ===== */
@media (max-width: 1029px) {
  .container { width: 100%; }
}
@media (max-width: 767px) {
  .container { padding: 0 10px; }
  .head-top { flex-wrap: wrap; gap: 8px; }
  .logo, .logo img { width: 120px; height: 66px; flex-basis: 120px; }
  .head-mid { order: 3; flex: 1 1 100%; padding-top: 0; }
  .toplinks { display: flex; flex-wrap: wrap; row-gap: 2px; font-size: 12px; margin: 0 0 8px; }
  .search { width: 100%; }
  .head-right { margin-left: auto; width: 150px; flex-basis: 150px; }
  nav.gnav ul { flex-wrap: wrap; }
  nav.gnav li { flex: 1 1 33.33%; border-top: 1px solid #e7e7e7; }
  nav.gnav li:nth-child(-n+3) { border-top: 0; }
  nav.gnav li:nth-child(4) { border-left: 0; }
  nav.gnav a { padding: 8px 2px; font-size: 13px; }
  .row { flex-direction: column; gap: 20px; }
  .col-4, .col-8, .col-6 { width: 100%; flex: 1 1 auto; }
  h1.page { font-size: 22px; }
  h2.box { font-size: 17px; }
  .list-row { flex-wrap: wrap; gap: 8px; }
  .rowno { width: 56px; flex-basis: 56px; }
  .vs { flex-direction: column; }
  .vs .mid { justify-content: center; font-size: 20px; }
  .arena-box .arena-id { font-size: 28px; }
}

/* 外部アカウントログイン */
.btn-outline.x { color: #000; border: 1px solid #000; }
.btn-outline.google { color: #e62117; border: 1px solid #e62117; }
.btn-outline.discord { color: #5865f2; border: 1px solid #5865f2; }
.oauth-btns { display: flex; flex-direction: column; gap: 8px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 4px; font-weight: bold; font-size: 15px; color: #fff; }
.oauth-btn:hover { text-decoration: none; opacity: .9; }
.oauth-btn.x { background: #000; }
.oauth-btn.google { background: #fff; color: #333; border: 1px solid #ccc; }
.oauth-btn.discord { background: #5865f2; }
.oauth-btn .mark { font-family: Arial, sans-serif; font-weight: 900; }
.divider { display: flex; align-items: center; gap: 10px; color: #999; font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid #ddd; }
.linked-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid #eee; }
.linked-row:first-child { border-top: 0; }

/* ファイターアイコン */
.ficon { height: 20px; width: auto; max-width: 40px; vertical-align: middle; border-radius: 2px; }
.ficon.lg { height: 30px; max-width: 56px; }
.ficon-lg { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; font-size: 13px; }
.fcard .ficon { height: 28px; max-width: 48px; }

/* 試用運用中のお知らせ（トップ） */
.trial-box { position: relative; margin: 14px 0 6px; padding: 22px 24px 20px; border: 3px solid var(--red); border-radius: 8px; background: linear-gradient(180deg, #fff6f6 0%, #fff 100%); text-align: center; }
.trial-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-weight: bold; font-size: 13px; padding: 2px 16px; border-radius: 14px; letter-spacing: 2px; }
.trial-title { font-size: 28px; font-weight: bold; color: var(--red); margin: 4px 0 10px; word-break: auto-phrase; }
.trial-body { font-size: 15px; line-height: 1.9; max-width: 760px; margin: 0 auto; }
.trial-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* お知らせバー */
.notice + .notice { margin-top: 8px; }
.notice.maint { background: #fcf8e3; border-color: #faebcc; color: #8a6d3b; font-weight: bold; }
.notice-btn { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 12px; background: var(--red); color: #fff !important; text-decoration: none !important; font-size: 12px; }

/* サイト更新のお知らせ */
.update-banner { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 1100; background: #003f8c; color: #fff; padding: 10px 16px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: 14px; max-width: calc(100vw - 32px); }
.update-banner button { background: #fff; color: #003f8c; border: 0; border-radius: 4px; padding: 3px 10px; font-weight: bold; cursor: pointer; }

/* アクセス数 */
.access { text-align: center; font-size: 11px; color: #999; margin-top: 30px; }

/* マナー・足跡 */
.manners td .warn { color: var(--red); font-weight: bold; }
.code-box { font-family: Consolas, "Courier New", monospace; font-size: 22px; font-weight: bold; letter-spacing: 2px; text-align: center; background: #f4f9ff; border: 2px dashed var(--blue); padding: 12px; margin: 10px 0; user-select: all; word-break: break-all; }
.status-done { opacity: .55; }

@media (max-width: 767px) {
  .trial-box { padding: 20px 12px 16px; }
  .trial-title { font-size: 21px; }
  .trial-body { font-size: 14px; text-align: left; }
}

/* 検索エンジン向けに最初のHTMLへ入れる本文（JavaScriptが動くとすぐ置き換わる） */
.prerender { padding: 20px 15px; }
.prerender h2 { font-size: 18px; margin: 18px 0 6px; }
.prerender ul, .prerender ol { padding-left: 22px; }

/* 通知 */
.push-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.push-wait { max-width: 560px; margin: 10px auto 0; }

/* 1戦ごとの記録 */
.games-box { border: 1px solid #e3e3e3; border-radius: 4px; padding: 8px 10px; margin-bottom: 12px; background: #fafcff; }
.games-box summary { cursor: pointer; font-weight: bold; font-size: 13px; }
.game-row { display: grid; grid-template-columns: 46px 1fr 1fr; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px dashed #e3e3e3; }
.game-row:first-of-type { border-top: 0; }
.game-row .game-no { grid-column: 1; grid-row: 1 / span 2; font-weight: bold; font-size: 12px; }
.game-row .game-result { grid-column: 2; grid-row: 1; display: flex; gap: 10px; font-size: 13px; }
.game-row select { font-size: 12px; padding: 4px 6px; min-width: 0; }
.game-row select[name$="_stage"] { grid-column: 3; grid-row: 1; }
.game-row select[name$="_my"] { grid-column: 2; grid-row: 2; }
.game-row select[name$="_opp"] { grid-column: 3; grid-row: 2; }
.game-row.dim { opacity: .45; }
.report-btns .btn.pulse { box-shadow: 0 0 0 3px rgba(0,127,255,.35); }

/* 勝率の表 */
.stat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stat-table td { padding: 4px 4px; border-top: 1px solid #f0f0f0; vertical-align: middle; }
.stat-table tr:first-child td { border-top: 0; }
.stat-table .st-label { white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.stat-table .st-bar { width: 40%; }
.stat-table .st-bar span { display: block; height: 8px; border-radius: 4px; background: #9cc3f5; }
.stat-table tr.good .st-bar span { background: #4caf7a; }
.stat-table tr.bad .st-bar span { background: #e07b7b; }
.stat-table tr.few { opacity: .6; }
.stat-table .st-pct { width: 44px; text-align: right; font-weight: bold; }
.stat-table .st-n { width: 70px; text-align: right; color: #888; font-size: 12px; }

/* トーナメント表 */
.bracket { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 10px; }
.br-col { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-width: 170px; }
.br-round { text-align: center; font-weight: bold; font-size: 12px; color: #555; }
.br-match { border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 13px; }
.br-match.bye { opacity: .55; }
.br-side { display: flex; justify-content: space-between; gap: 6px; padding: 4px 8px; border-top: 1px solid #eee; }
.br-side:first-child { border-top: 0; }
.br-side.win { font-weight: bold; background: #eef6ff; }
.br-side.lose { color: #999; }
.br-side.me { box-shadow: inset 3px 0 0 var(--blue); }
.br-side.empty { color: #bbb; }
.br-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-score { font-weight: bold; }
.br-btn { display: block; width: calc(100% - 12px); margin: 4px 6px 6px; }
.standings { margin-bottom: 10px; padding: 10px 12px; border: 1px solid #f3dfa2; background: #fff8e1; border-radius: 4px; }
.standings .st-1 { font-size: 17px; font-weight: bold; }
.standings .st-2, .standings .st-3 { font-size: 13px; margin-top: 2px; }
.host-tools { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--blue); border-radius: 4px; background: #f7fbff; }
.host-tools p { margin: 4px 0 8px; }


/* 右下の表示切り替えボタンと、ページ最下部の文字が重ならないように */
footer.site { padding-bottom: 56px; }

/* 更新履歴 */
.cl-entry { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; margin: 14px 0; background: #fff; }
.cl-entry .cl-date { font-size: 12px; color: #888; }
.cl-entry .cl-title { font-weight: bold; font-size: 16px; margin: 2px 0 6px; }
.cl-entry ul { margin: 0; padding-left: 20px; }
.cl-entry li { margin: 3px 0; }
.cl-side .cl-date { color: #888; font-size: 12px; margin-right: 4px; }
html.theme-a .cl-entry { background: var(--a-surface); border-color: var(--a-border); border-radius: 12px; box-shadow: var(--a-shadow); }
html.theme-a .cl-entry .cl-date, html.theme-a .cl-side .cl-date { color: var(--a-muted); }


/* XのID「自己申告」の目印 */
.self-tag { display: inline-block; font-size: 11px; color: #777; background: #f1f1f1; border: 1px solid #ddd; border-radius: 3px; padding: 0 5px; margin-left: 4px; line-height: 1.6; white-space: nowrap; }
html.theme-a .self-tag { border-radius: 999px; background: var(--a-surface-2); border-color: var(--a-border); color: var(--a-muted); }
.verified-tag { display: inline-block; font-size: 11px; font-weight: bold; color: #1d7a3a; background: #e6f6ea; border: 1px solid #9fd6ad; border-radius: 3px; padding: 0 5px; margin-left: 4px; line-height: 1.6; white-space: nowrap; }
html.theme-a .verified-tag { border-radius: 999px; color: #1d7a3a; background: rgba(46, 160, 67, .12); border-color: rgba(46, 160, 67, .45); }
html.theme-a.dark .verified-tag { color: #6fdc8c; }

/* ---- レーティング対戦：いまの状況 ---- */
.live-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.live-stats .ls-item { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 8px 6px; text-align: center; }
.live-stats .ls-num { display: block; font-size: 22px; font-weight: bold; color: #d9302c; line-height: 1.2; }
.live-stats .ls-label { display: block; font-size: 12px; color: #666; }
@media (max-width: 767px) { .live-stats { grid-template-columns: repeat(2, 1fr); } }
html.theme-a .live-stats .ls-item { background: var(--a-surface); border-color: var(--a-border); border-radius: var(--a-radius); box-shadow: var(--a-shadow); }
html.theme-a .live-stats .ls-num { color: var(--a-accent); }
html.theme-a .live-stats .ls-label { color: var(--a-muted); }

/* ---- 対戦後の👍 ---- */
.good-box { text-align: center; }
.good-box .btn { font-size: 15px; }
.good-sent { color: #1d7a3a; font-weight: bold; }
.mt5 { margin-top: 5px; }
html.theme-a.dark .good-sent { color: #6fdc8c; }

/* ---- トップ：配信中の対戦 ---- */
.stream-row { flex-wrap: wrap; gap: 8px; }
.stream-player { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stream-btn { white-space: nowrap; }

/* ---- キャラ相性：組み合わせの表 ---- */
.pair-table .st-label { max-width: 130px; }

/* ---- レーティングの仕様 ---- */
.formula-box { background: #f6f9ff; border: 1px solid #c9dafc; border-radius: 4px; padding: 12px 14px; line-height: 1.9; margin: 8px 0; }
.rate-table td.plus, b.plus { color: #d9302c; }
.rate-table td.minus { color: #1d5fd0; }
.rate-table { max-width: 420px; }
.tbl tr.hl td { background: #fff8e1; }
.rate-spec-box .box-body p { line-height: 1.7; }
html.theme-a .formula-box { background: var(--a-surface-2); border-color: var(--a-border); border-radius: var(--a-radius); }
html.theme-a.dark .tbl tr.hl td { background: rgba(255, 200, 0, .08); }
html.theme-a.dark .rate-table td.minus { color: #7fb0ff; }

/* ---- 2on2 ---- */
.label.orange { background: #f0883e; }
.team-name { color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.theme-a.dark .team-name { color: var(--a-muted); }

/* ---- 2on2レート ---- */
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #eee; flex-wrap: wrap; }
.team-row:first-child { border-top: 0; }
.team-row.invite { background: #fff8e6; margin: 0 -10px; padding: 10px; }
.team-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-chip { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; text-decoration: none; }
.member-chip span { font-size: 13px; }
.team-vs { align-items: stretch; }
.team-card { flex: 1; min-width: 0; border: 1px solid #ddd; border-radius: 4px; padding: 10px; background: #fff; text-align: center; }
.team-card-name { font-size: 16px; font-weight: bold; margin: 4px 0; }
.rank-no { width: 28px; text-align: center; }
.report-btns { display: flex; gap: 8px; justify-content: center; }
.report-btns .btn { flex: 1; }
html.theme-a .team-card { background: var(--a-surface); border-color: var(--a-border); border-radius: var(--a-radius); }
html.theme-a .team-row { border-color: var(--a-border); }
html.theme-a.dark .team-row.invite { background: rgba(240, 136, 62, .12); }

/* ---- お問い合わせのやり取り ---- */
.ct-thread { display: flex; flex-direction: column; gap: 10px; }
.ct-msg { border: 1px solid #ddd; border-radius: 6px; padding: 10px 12px; background: #fff; }
.ct-msg.admin { border-color: #9cc3f5; background: #f2f7ff; }
.ct-msg.mini { padding: 6px 8px; margin-top: 6px; font-size: 13px; }
.ct-head { margin-bottom: 4px; }
.ct-body { white-space: pre-wrap; word-break: break-word; }
.head-notice { margin-top: 4px; font-size: 12px; font-weight: bold; }
.head-notice a { color: #d9302c; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.theme-a .ct-msg { background: var(--a-surface); border-color: var(--a-border); }
html.theme-a .ct-msg.admin { background: rgba(21, 101, 232, .07); border-color: rgba(21, 101, 232, .35); }

/* ---- アイコン画像 ---- */
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit { display: flex; align-items: center; gap: 12px; }
.avatar-edit .btn { margin-right: 6px; }

/* ---- キャラ別の拒否ステージ・スイッチ設定 ---- */
.banstage-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #ddd; border-radius: 4px; max-height: 75vh; overflow-y: auto; }
.banstage { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 12px; }
.banstage th, .banstage td { border-bottom: 1px solid #eee; padding: 4px 6px; text-align: center; }
.banstage thead th { position: sticky; top: 0; background: #f7f7f7; z-index: 2; white-space: nowrap; }
.banstage .bs-f { text-align: left; white-space: nowrap; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 150px; }
.banstage thead .bs-f { z-index: 3; background: #f7f7f7; }
.banstage .bs-name { vertical-align: middle; }
.banstage .bs-all { display: block; font-size: 11px; color: var(--link); background: none; border: 0; padding: 2px 0 0; cursor: pointer; }
.banstage td.bs-c label { display: block; cursor: pointer; padding: 4px 0; }
.banstage td.on { background: #fde2e2; color: #c9302c; font-weight: bold; }
.bs-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.next-f { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.next-f select { max-width: 220px; }
.sw-table select { min-width: 150px; }
html.theme-a .banstage-wrap { border-color: var(--a-border); border-radius: var(--a-radius); }
html.theme-a .banstage thead th, html.theme-a .banstage thead .bs-f { background: var(--a-surface-2); }
html.theme-a .banstage .bs-f { background: var(--a-surface); }
html.theme-a .banstage th, html.theme-a .banstage td { border-color: var(--a-border); }
html.theme-a.dark .banstage td.on { background: rgba(232, 52, 74, .18); color: #ff8a98; }

/* ---- ルールチェック ---- */
.rc-form { max-width: 760px; }
.rc-q { border: 1px solid #ddd; border-radius: 4px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.rc-q.wrong { border-color: #d9302c; background: #fff4f4; }
.rc-text { margin-bottom: 6px; line-height: 1.6; }
.rc-choice { display: block; padding: 4px 0; cursor: pointer; line-height: 1.5; }
html.theme-a .rc-q { background: var(--a-surface); border-color: var(--a-border); border-radius: var(--a-radius); }
html.theme-a .rc-q.wrong { border-color: #d9302c; background: rgba(217, 48, 44, .08); }
/* ---- キャラ対策メモ ---- */
.memo-box { border: 1px solid #ddd; border-radius: 4px; padding: 8px 12px; background: #fffdf3; }
.memo-box summary { cursor: pointer; }
.memo-head { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.memo-head select { max-width: 220px; }
.memo-text { white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
html.theme-a .memo-box { background: var(--a-surface); border-color: var(--a-border); border-radius: var(--a-radius); }
/* ---- メダル ---- */
.medal-row { display: flex; flex-wrap: wrap; gap: 10px; }
.medal { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; color: #fff; font-weight: bold; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); vertical-align: middle; }
.medal.bronze { background: radial-gradient(circle at 35% 30%, #e8a873, #a8642d); }
.medal.silver { background: radial-gradient(circle at 35% 30%, #f2f2f2, #9a9a9a); color: #333; }
.medal.gold { background: radial-gradient(circle at 35% 30%, #ffe27a, #c9961a); color: #4a3500; }
.medal-n { font-size: 15px; line-height: 1; }
.medal-sub { font-size: 9px; font-weight: normal; margin-top: 2px; }
.medal-status { margin-top: 10px; }
/* ---- 日記のお気に入り・マイ対戦データ ---- */
.likers { margin-top: 8px; text-align: right; }
.likers a { margin-left: 6px; white-space: nowrap; }
.md-table td, .md-table th { white-space: nowrap; }

/* 通報のスクリーンショット（送る時のサムネイル・管理ページ） */
.report-file { display: block; margin-top: 4px; max-width: 100%; }
.report-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.report-thumbs:empty { display: none; }
.report-thumbs .rt { position: relative; }
.report-thumbs img { width: 76px; height: 76px; object-fit: cover; border: 1px solid #ccc; border-radius: 4px; display: block; }
.report-thumbs .rt-x { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: none; background: #333; color: #fff; font-size: 13px; line-height: 22px; padding: 0; cursor: pointer; }
.report-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.report-imgs img { width: 128px; height: 84px; object-fit: cover; border: 1px solid #ccc; border-radius: 3px; display: block; background: #f4f4f4; }

/* プロフィール設定の小見出し（対戦設定など） */
.form-sub { font-size: 15px; font-weight: bold; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 2px solid #e5e5e5; }
html.theme-a.dark .form-sub { border-bottom-color: rgba(255, 255, 255, .15); }

/* ユーザーページ：過去のシーズン */
.past-seasons .ps-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.past-seasons .ps-row:last-child { border-bottom: 0; }
.past-seasons .ps-name { font-weight: bold; font-size: 13px; }
.past-seasons .ps-nums { font-size: 13px; margin-top: 2px; }
.past-seasons .ps-nums b { font-size: 15px; }
.past-seasons .sep { color: #bbb; margin: 0 4px; }

/* ログイン画面：Xで本人確認してログイン */
.x-recover-btn { background: #000; color: #fff !important; border-color: #000; }
.x-recover-btn:hover { background: #222; }

/* トップ：いま対戦相手を探している人 */
.waiting-banner { border: 2px solid #d6e4ff; background: #f3f7ff; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.waiting-banner.hot { border-color: #ff9a3c; background: linear-gradient(135deg, #fff4e6, #ffe9e0); animation: wb-pulse 2.4s ease-in-out infinite; }
.waiting-banner .wb-main { font-size: 17px; font-weight: bold; }
.waiting-banner.hot .wb-main b { color: #e8590c; font-size: 20px; }
.waiting-banner .wb-sub { font-size: 13px; margin-top: 4px; }
.waiting-banner .wb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
@keyframes wb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 140, 60, .0); } 50% { box-shadow: 0 0 0 6px rgba(255, 140, 60, .18); } }
@media (prefers-reduced-motion: reduce) { .waiting-banner.hot { animation: none; } }
html.theme-a.dark .waiting-banner { background: rgba(80, 130, 255, .08); border-color: rgba(120, 160, 255, .35); }
html.theme-a.dark .waiting-banner.hot { background: rgba(255, 140, 60, .12); border-color: rgba(255, 150, 70, .6); }
html.theme-a.dark .waiting-banner.hot .wb-main b { color: #ffa94d; }

/* 「対戦相手を探している人がいる時」の通知の設定 */
.wn-box select { max-width: 320px; margin-top: 6px; }
