/* =============================================================
   Roundnet Hub — スタイル
   スマホ優先 / PC幅ではサイドナビ。チームカラーを --brand に反映
   ============================================================= */
:root {
  --bg: #F2F4F8; --card: #FFFFFF; --ink: #0D1424; --sub: #5A6478; --mute: #8A93A6; --line: #E4E8EF;
  --nav: #0B1222; --nav-ink: #C9D1E3;
  --brand: #BC002D; --brand-ink: #fff; --accent: #FFD60A; --ok: #12B886; --warn: #F59F00; --ng: #E03131; --info: #2F6BFF;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgba(13,20,36,.06), 0 4px 16px rgba(13,20,36,.05);
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --nav-h: 64px; --head-h: 56px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; }
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0; }
img { max-width: 100%; display: block; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- レイアウト ---------- */
.app { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--head-h); display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--nav); color: #fff; border-bottom: 3px solid var(--brand); }
.team-sw { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; padding: 6px 8px; border-radius: 12px; }
.team-sw:hover { background: rgba(255,255,255,.06); }
.team-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 12px; letter-spacing: .02em; color: #fff; background: var(--brand); flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.team-sw .tn { min-width: 0; text-align: left; }
.team-sw .tn b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-sw .tn small { display: block; font-size: 11px; color: var(--nav-ink); }
.top-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; }
.top-btn:hover { background: rgba(255,255,255,.08); }
.dot-badge { position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #111; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--nav); }
main { padding: 14px 14px calc(var(--nav-h) + 90px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
.sidenav { display: none; }

.bnav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); }
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: var(--mute); position: relative; }
.bnav a .ic { width: 23px; height: 23px; }
.bnav a.on { color: var(--ink); }
.bnav a.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.bnav .nb { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; font-size: 10px; padding: 0 4px; background: var(--ng); color: #fff; display: grid; place-items: center; }
.fab { position: fixed; z-index: 31; right: 16px; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: #111; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 4px rgba(255,214,10,.25); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.6; }

@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: 248px 1fr; }
  .sidenav { display: block; position: sticky; top: var(--head-h); height: calc(100vh - var(--head-h)); overflow: auto; background: var(--card); border-right: 1px solid var(--line); padding: 12px 10px 40px; }
  .sidenav .grp { font-size: 11px; color: var(--mute); font-weight: 800; letter-spacing: .08em; padding: 14px 10px 4px; }
  .sidenav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--sub); }
  .sidenav a:hover { background: var(--bg); }
  .sidenav a.on { background: color-mix(in srgb, var(--brand) 10%, white); color: var(--brand); }
  .sidenav a .badge { margin-left: auto; }
  .bnav { display: none; }
  .fab { bottom: 28px; right: 28px; }
  main { padding: 22px 28px 120px; max-width: 980px; }
}

/* ---------- 汎用 ---------- */
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; } .row.gap4 { gap: 4px; } .row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.col { display: flex; flex-direction: column; }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--sub); } .mute { color: var(--mute); } .small { font-size: 12.5px; } .xs { font-size: 11.5px; }
.b { font-weight: 700; } .nowrap { white-space: nowrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .grid4 { grid-template-columns: repeat(4, 1fr); } .grid2-md { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid2-md > * + * { margin-top: 0 !important; } }
.hr { height: 1px; background: var(--line); margin: 12px 0; }

.phead { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; }
.phead h1 { font-size: 22px; font-weight: 900; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.phead p { font-size: 12.5px; color: var(--sub); margin-top: 2px; }
.phead-t { flex: 1; min-width: 0; }
.phead-r { display: flex; gap: 6px; }
.kicker { font-size: 11px; font-weight: 900; font-style: italic; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.sec-t { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.sec-t h2 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.sec-t a, .link-btn { font-size: 12.5px; font-weight: 700; color: var(--brand); }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.tap { transition: transform .12s; display: block; }
.card.tap:active { transform: scale(.985); }
.card-t { font-size: 13px; font-weight: 800; color: var(--sub); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
a.li:active, button.li:active { background: var(--bg); }
button.li { width: 100%; text-align: left; }
.li .ic.chev { color: var(--mute); width: 18px; }
.li-main { flex: 1; min-width: 0; }
.li-main b { display: block; font-size: 14.5px; }
.li-main small { display: block; font-size: 12px; color: var(--sub); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 800; font-size: 14px; background: var(--bg); color: var(--ink); white-space: nowrap; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.dark { background: var(--nav); color: #fff; }
.btn.accent { background: var(--accent); color: #111; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.danger { background: var(--ng); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--ng); border-color: color-mix(in srgb, var(--ng) 30%, white); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--sub); }
.icon-btn:hover { background: rgba(0,0,0,.05); }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }
.badge.live { background: #E6F8F1; color: #0B7A57; }
.badge.partial { background: #FFF4DB; color: #9A6200; }
.badge.sample { background: #EEF0FF; color: #4651C9; }
.badge.planned { background: #EEF0F4; color: var(--mute); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 700; background: var(--bg); color: var(--sub); white-space: nowrap; }
.tag.red { background: #FFE8E8; color: #C92A2A; } .tag.blue { background: #E7EFFF; color: #2950C9; } .tag.green { background: #E6F8F1; color: #0B7A57; } .tag.yellow { background: #FFF6CC; color: #8A6A00; } .tag.dark { background: var(--nav); color: #fff; } .tag.brand { background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); }
.tag .ic { width: 13px; height: 13px; }
.sample-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #EEF0FF; color: #3640A8; font-size: 12.5px; margin-bottom: 12px; }
.sample-note .ic { width: 16px; height: 16px; margin-top: 2px; }
.info-note { display: flex; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #FFF8E1; color: #7A5600; font-size: 12.5px; margin-bottom: 12px; }
.empty { text-align: center; padding: 28px 16px; color: var(--mute); font-size: 13.5px; }
.empty .ic { width: 28px; height: 28px; margin: 0 auto 6px; }
.empty .btn { margin-top: 10px; }

.av { width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * .44); flex: none; box-shadow: 0 0 0 2px var(--card); }
.av.more { background: var(--line); color: var(--sub); font-size: 10px; }
.avstack { display: inline-flex; }
.avstack .av + .av { margin-left: -7px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: #E7EAF0; border-radius: 13px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--sub); white-space: nowrap; }
.tab.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 34px; padding: 0 12px; border-radius: 17px; border: 1.5px solid var(--line); background: var(--card); font-size: 13px; font-weight: 700; color: var(--sub); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, white); color: var(--brand); }
.chips.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; background: #E7EAF0; border-radius: 12px; padding: 3px; }
.chips.seg .chip { border: 0; background: transparent; border-radius: 9px; justify-content: center; }
.chips.seg .chip.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { flex-shrink: 0; white-space: nowrap; }

.search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; background: var(--card); border-radius: 12px; border: 1.5px solid var(--line); margin-bottom: 12px; }
.search input { border: 0; outline: 0; flex: 1; background: transparent; min-width: 0; }
.search .ic { color: var(--mute); }
.pbar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .4s; }

/* ---------- フォーム / モーダル ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-bg { position: absolute; inset: 0; background: rgba(8,12,24,.5); opacity: 0; transition: opacity .2s; }
.modal { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--card); border-radius: 22px 22px 0 0; transform: translateY(30px); opacity: 0; transition: transform .22s, opacity .22s; padding-bottom: var(--safe-b); }
.modal.wide { max-width: 760px; }
.modal-wrap.show .modal-bg { opacity: 1; }
.modal-wrap.show .modal { transform: none; opacity: 1; }
@media (min-width: 700px) { .modal-wrap { align-items: center; } .modal { border-radius: 22px; } }
.sheet-head { position: sticky; top: 0; z-index: 2; background: var(--card); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-size: 17px; font-weight: 800; }
.sheet-head p { font-size: 12px; color: var(--sub); }
.sheet-body { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 0 12px; }
.sheet-foot { position: sticky; bottom: 0; background: var(--card); display: flex; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.sheet-foot .btn.primary { min-width: 120px; }
.field { width: 100%; margin-bottom: 14px; }
.field.half { width: calc(50% - 6px); }
.flabel { display: block; font-size: 12.5px; font-weight: 800; color: var(--sub); margin-bottom: 6px; }
.flabel em { color: var(--ng); font-style: normal; }
.fhint { font-size: 11.5px; color: var(--mute); margin-top: 4px; }
.field input:not([type=checkbox]), .field select, .field textarea, .inp { width: 100%; height: 46px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #FAFBFD; outline: 0; font-size: 16px; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { border-color: var(--brand); background: #fff; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { display: none; }
.switch span { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { left: 21px; }
.switch b { font-size: 14px; font-weight: 600; }
.imgpick { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--sub); cursor: pointer; flex-wrap: wrap; font-size: 13px; }
.imgpick img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; }
.confirm { padding: 22px 18px 18px; }
.confirm p { font-size: 15px; margin-bottom: 18px; white-space: pre-line; }
.confirm .btn { flex: 1; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(var(--nav-h) + 90px); transform: translate(-50%, 10px); opacity: 0; background: var(--nav); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; transition: all .25s; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- グラフ ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 3; }
.chart .axis { font-size: 10px; fill: var(--mute); }
.chart .val { font-size: 12px; font-weight: 800; fill: var(--ink); }
.chart .val.sm { font-size: 10px; fill: var(--sub); }
.donut-v { font-size: 17px; font-weight: 900; fill: var(--ink); }
.donut-l { font-size: 9px; fill: var(--mute); font-weight: 700; }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.heat i, .heat-leg i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--line); }
.heat i.l1, .heat-leg i.l1 { background: color-mix(in srgb, var(--brand) 25%, white); }
.heat i.l2, .heat-leg i.l2 { background: color-mix(in srgb, var(--brand) 50%, white); }
.heat i.l3, .heat-leg i.l3 { background: color-mix(in srgb, var(--brand) 75%, white); }
.heat i.l4, .heat-leg i.l4 { background: var(--brand); }
.heat-leg { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: 10px; color: var(--mute); margin-top: 6px; }
.heat-leg i { width: 10px; }

/* ---------- ダッシュボード ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 16px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 85%, black) 0%, var(--nav) 62%); box-shadow: 0 10px 30px rgba(11,18,34,.25); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 18px solid rgba(255,214,10,.16); box-shadow: inset 0 0 0 14px rgba(255,255,255,.04); }
.hero .kicker { color: var(--accent); }
.hero h2 { font-size: 19px; font-weight: 900; margin: 4px 0 6px; position: relative; z-index: 1; }
.hero .meta { font-size: 12.5px; color: #C9D1E3; display: flex; flex-wrap: wrap; gap: 4px 12px; position: relative; z-index: 1; }
.hero .meta span { display: inline-flex; align-items: center; gap: 4px; }
.hero .meta .ic { width: 14px; height: 14px; }
.countdown { position: absolute; right: 16px; top: 14px; z-index: 1; text-align: right; }
.countdown b { display: block; font-size: 38px; line-height: 1; font-weight: 900; font-style: italic; color: var(--accent); letter-spacing: -.02em; }
.countdown small { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: #C9D1E3; }
.hero-actions { display: flex; gap: 8px; margin-top: 14px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-actions .btn { height: 36px; font-size: 12.5px; background: rgba(255,255,255,.12); color: #fff; }
.hero-actions .btn.accent { background: var(--accent); color: #111; }
.kpi { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; }
.kpi small { display: block; font-size: 11.5px; font-weight: 700; color: var(--sub); }
.kpi b { display: block; font-size: 28px; font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi b span { font-size: 13px; font-style: normal; font-weight: 700; color: var(--sub); margin-left: 2px; }
.kpi .delta { font-size: 11.5px; font-weight: 800; color: var(--ok); }
.kpi .delta.down { color: var(--ng); }
.quickpost { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); width: 100%; text-align: left; border: 1.5px solid transparent; }
.quickpost:hover { border-color: var(--line); }
.quickpost .q { flex: 1; min-width: 0; color: var(--mute); font-size: 14px; }
.quickpost .q b { display: block; color: var(--ink); font-size: 13px; }
.preset-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; padding-bottom: 2px; }
.preset-row::-webkit-scrollbar { display: none; }
.preset { flex: none; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.preset:active { background: var(--accent); }

/* イベント行 */
.ev { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev-date { width: 46px; flex: none; text-align: center; border-radius: 11px; background: var(--bg); padding: 5px 0; }
.ev-date small { display: block; font-size: 10px; font-weight: 800; color: var(--sub); }
.ev-date b { display: block; font-size: 19px; font-weight: 900; line-height: 1.1; }
.ev-date.pub { background: #E6F8F1; }
.ev-date.tour { background: #FFF6CC; }
.rsvp { display: inline-flex; gap: 4px; }
.rsvp button { height: 30px; min-width: 40px; padding: 0 8px; border-radius: 9px; font-size: 12px; font-weight: 800; background: var(--bg); color: var(--sub); }
.rsvp button.on.yes { background: var(--ok); color: #fff; }
.rsvp button.on.no { background: var(--ng); color: #fff; }
.rsvp button.on.maybe { background: var(--warn); color: #fff; }
.rsvp.lg button { height: 44px; flex: 1; font-size: 14px; border-radius: 12px; }
.rsvp.lg { display: flex; width: 100%; }

/* フィード */
.feed-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .body { flex: 1; min-width: 0; font-size: 13.5px; }
.feed-item .body small { color: var(--mute); font-size: 11.5px; }

/* ダイアリー */
.post { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; }
.post + .post { margin-top: 10px; }
.post-h { display: flex; align-items: center; gap: 10px; }
.post-h b { font-size: 14px; }
.post-h small { color: var(--mute); font-size: 11.5px; }
.post-text { margin: 8px 0 0; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.post-img { margin-top: 10px; border-radius: 12px; max-height: 360px; width: 100%; object-fit: cover; }
.reacts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.react { height: 30px; padding: 0 10px; border-radius: 15px; background: var(--bg); font-size: 13px; font-weight: 700; color: var(--sub); display: inline-flex; align-items: center; gap: 4px; }
.react.on { background: #FFF1CC; color: #7A5600; box-shadow: inset 0 0 0 1.5px #FFD60A; }
.comments { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.cmt { display: flex; gap: 8px; font-size: 13px; padding: 4px 0; }
.cmt .bub { background: var(--bg); border-radius: 12px; padding: 6px 10px; flex: 1; min-width: 0; }
.cmt .bub b { font-size: 12px; margin-right: 6px; }
.cmt-form { display: flex; gap: 6px; margin-top: 6px; }
.cmt-form input { flex: 1; height: 36px; border-radius: 18px; border: 1.5px solid var(--line); padding: 0 12px; outline: 0; font-size: 14px; background: #FAFBFD; min-width: 0; }
.composer { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; font-size: 16px; min-height: 64px; background: transparent; }
.composer-q { font-weight: 900; font-size: 15px; margin-bottom: 2px; }
.day-sep { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--mute); margin: 16px 0 8px; }
.streak { display: flex; align-items: center; gap: 10px; }
.streak b { font-size: 24px; font-weight: 900; font-style: italic; }
.week-dots { display: flex; gap: 5px; }
.week-dots i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-style: normal; font-weight: 800; background: var(--bg); color: var(--mute); }
.week-dots i.on { background: var(--accent); color: #111; }

/* カレンダー */
.cal { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.cal-h b { font-size: 16px; font-weight: 900; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-g .wd { text-align: center; font-size: 11px; font-weight: 800; color: var(--mute); padding: 4px 0; }
.cal-g .wd:first-child { color: var(--ng); } .cal-g .wd:last-child { color: var(--info); }
.cal-d { aspect-ratio: 1 / 1.05; border-radius: 10px; display: flex; flex-direction: column; align-items: center; padding-top: 5px; font-size: 13px; font-weight: 700; position: relative; }
.cal-d.out { color: #C3C9D5; }
.cal-d.today span { background: var(--nav); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; margin-top: -2px; }
.cal-d.sel { background: color-mix(in srgb, var(--brand) 10%, white); }
.cal-d .dots { display: flex; gap: 2px; margin-top: 3px; }
.cal-d .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.cal-d .dots i.pub { background: var(--ok); }
.cal-d .dots i.tour { background: var(--warn); }

/* 割り勘 */
.bal-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bal-row:last-child { border-bottom: 0; }
.amt { font-weight: 900; font-variant-numeric: tabular-nums; }
.amt.plus { color: var(--ok); } .amt.minus { color: var(--ng); }
.xfer { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.xfer:last-child { border-bottom: 0; }
.xfer .arrow { color: var(--mute); }
.big-amt { font-size: 34px; font-weight: 900; text-align: center; letter-spacing: -.02em; }
.amount-input { display: flex; align-items: center; justify-content: center; gap: 4px; border-bottom: 2px solid var(--line); padding: 8px 0 4px; margin-bottom: 4px; }
.amount-input span { font-size: 26px; font-weight: 900; color: var(--mute); }
.amount-input input { border: 0 !important; background: transparent !important; font-size: 36px !important; font-weight: 900; text-align: center; height: 52px !important; width: 100%; max-width: 280px; padding: 0 !important; }
.share-list { width: 100%; }
.share-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.share-row input { width: 110px !important; height: 38px !important; text-align: right; }
.share-row .grow { font-size: 14px; font-weight: 600; }
.sum-line { font-size: 12.5px; font-weight: 800; padding-top: 8px; text-align: right; }
.sum-line.ng { color: var(--ng); } .sum-line.ok { color: var(--ok); }

/* 大会 */
.tour-card { display: block; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; position: relative; overflow: hidden; }
.tour-card + .tour-card { margin-top: 10px; }
.tour-card h3 { font-size: 15.5px; font-weight: 800; margin: 6px 0 4px; }
.tour-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--sub); }
.tour-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.tour-card .meta .ic { width: 14px; height: 14px; }
.flag { font-size: 18px; line-height: 1; }
.match { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.match:last-child { border-bottom: 0; }
.match .t { font-weight: 900; font-size: 15px; text-align: center; }
.match .t small { display: block; font-size: 10px; color: var(--mute); font-weight: 700; }
.res { font-size: 11px; font-weight: 900; padding: 3px 8px; border-radius: 6px; }
.res.win { background: #E6F8F1; color: #0B7A57; } .res.lose { background: #FFE8E8; color: #C92A2A; } .res.tbd { background: var(--bg); color: var(--mute); }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item::before { content: ""; position: absolute; left: -20px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); }
.tl-item.past::before { border-color: var(--mute); }
.tl-item.big::before { width: 16px; height: 16px; left: -22px; background: var(--accent); border-color: var(--nav); }
.tl-item small { font-size: 11.5px; color: var(--mute); font-weight: 700; }
.tl-item b { display: block; font-size: 14.5px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.check-item:last-child { border-bottom: 0; }
.cbox { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: #fff; }
.cbox.on { background: var(--ok); border-color: var(--ok); }
.cbox .ic { width: 16px; height: 16px; stroke-width: 3; }
.check-item.done .li-main b { text-decoration: line-through; color: var(--mute); }

/* 動画 */
.vgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .vgrid { grid-template-columns: 1fr 1fr; } }
.vcard { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: block; }
.vthumb { position: relative; aspect-ratio: 16/9; background: #111 center/cover; }
.vthumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.vthumb .play span { width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.vthumb .vis { position: absolute; left: 8px; top: 8px; }
.vcard .vb { padding: 10px 12px 12px; }
.vcard .vb b { font-size: 14px; display: block; }
.player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r); overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 掲示板 */
.ann { display: block; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; position: relative; }
.ann + .ann { margin-top: 10px; }
.ann.imp { box-shadow: var(--shadow), inset 4px 0 0 var(--ng); }
.ann.unread::after { content: ""; position: absolute; right: 14px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--info); }
.ann h3 { font-size: 15.5px; font-weight: 800; margin: 4px 0; padding-right: 18px; }
.poll-opt { display: block; width: 100%; position: relative; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line); margin-bottom: 8px; overflow: hidden; }
.poll-opt i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--brand) 10%, white); z-index: 0; }
.poll-opt span { position: relative; z-index: 1; display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; gap: 8px; }
.poll-opt.on { border-color: var(--brand); }
.attach { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 13.5px; font-weight: 700; margin-top: 8px; }

/* プロフィール */
.prof-head { display: flex; gap: 14px; align-items: center; }
.prof-head h2 { font-size: 21px; font-weight: 900; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat3 div { background: var(--bg); border-radius: 12px; padding: 8px; text-align: center; }
.stat3 b { display: block; font-size: 20px; font-weight: 900; font-style: italic; }
.stat3 small { font-size: 11px; color: var(--sub); font-weight: 700; }

/* メニュー */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 560px) { .menu-grid { grid-template-columns: repeat(4, 1fr); } }
.menu-item { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 800; position: relative; }
.menu-item .mi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 10%, white); color: var(--brand); }
.menu-item .mi .ic { width: 24px; height: 24px; }
.menu-item .badge { position: absolute; top: 6px; right: 6px; height: 16px; font-size: 9px; padding: 0 5px; }
.menu-item.off { opacity: .45; }
.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 18px 22px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-align: center; padding: 12px 4px; border-radius: 16px; background: var(--bg); }
.qa .mi { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); }
.qa .mi .ic { width: 24px; height: 24px; }

/* 参加フォーム（招待URL） */
.join { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(100% 70% at 50% 0%, color-mix(in srgb, var(--brand) 70%, black), var(--nav) 70%); }
.join-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 24px; padding: 26px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.join-card .team-logo { width: 56px; height: 56px; font-size: 16px; border-radius: 16px; margin-bottom: 12px; }
.join-card h1 { font-size: 21px; font-weight: 900; }
.persona { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); width: 100%; text-align: left; margin-bottom: 8px; }
.persona.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, white); }

.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: var(--warn); color: #111; font-size: 12px; font-weight: 800; text-align: center; padding: 3px; }

/* 割り勘（磨き込み） */
.toast { display: flex; align-items: center; gap: 12px; }
.toast-undo { color: var(--accent); font-weight: 800; font-size: 13px; white-space: nowrap; }
.cur-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; height: 52px; border-radius: 12px; background: var(--bg); font-size: 22px; font-weight: 900; color: var(--sub); line-height: 1; flex: none; }
.cur-btn small { font-size: 9.5px; font-weight: 800; margin-top: 3px; }
.calc-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.calc-key { width: 40px; height: 34px; border-radius: 10px; background: var(--bg); font-size: 17px; font-weight: 800; color: var(--sub); }
.calc-key:active { background: var(--accent); color: #111; }
.rate-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.rate-row .inp { width: 90px; height: 36px; text-align: right; font-size: 15px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 10px; padding: 2px; }
.stepper button { width: 32px; height: 30px; border-radius: 8px; font-size: 16px; font-weight: 800; }
.stepper button:active { background: var(--card); }
.stepper b { min-width: 30px; text-align: center; font-size: 14px; }
.share-row .pp { width: 78px; text-align: right; font-size: 13px; font-weight: 800; color: var(--sub); }
.sum-line .ok { color: var(--ok); } .sum-line .ng { color: var(--ng); }
.my-settle { margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.bal-row .bw { width: 76px; text-align: right; flex: none; }
@media (max-width: 380px) { .bal-row .bw { width: 66px; } }
[hidden] { display: none !important; }
.rate-row > span { white-space: nowrap; }
.rate-row .inp { width: 76px; padding: 0 8px; }
.fw-frame { position: relative; min-height: 460px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.fw-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fw-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); font-size: 13px; font-weight: 700; }

/* 暗証番号パッド */
.pinpad { padding: 16px 18px 22px; text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 8px 0 6px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--sub); }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 20px; font-size: 12.5px; font-weight: 700; color: var(--ng); margin-bottom: 8px; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px 22px; justify-content: center; }
.pin-keys button { width: 72px; height: 72px; border-radius: 50%; background: var(--bg); font-size: 26px; font-weight: 700; }
.pin-keys button:active { background: var(--line); }

/* Fwango 日本語化 */
.fw-lang { margin-bottom: 12px; max-width: 260px; }
.ja-card { border: 1.5px solid color-mix(in srgb, var(--info) 25%, white); }
.ja-text { font-size: 14px; line-height: 1.8; white-space: normal; word-break: break-word; }
.ja-text.src { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 12.5px; color: var(--sub); }
.guide-step { padding: 10px 12px; border-radius: 12px; background: var(--bg); margin-bottom: 10px; }
.guide-step ol { margin: 6px 0 0; padding-left: 18px; line-height: 1.8; }

/* 出欠（参加・不参加・検討中） */
.rsvp3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.rsvp3 button { height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--sub); font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 4px; transition: background .15s, color .15s, border-color .15s; }
.rsvp3 button .ic { width: 17px; height: 17px; stroke-width: 3; }
.rsvp3 button:active { transform: scale(.97); }
.rsvp3 button.on { color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.rsvp3 button.on.yes { background: var(--ok); border-color: var(--ok); }
.rsvp3 button.on.no { background: var(--ng); border-color: var(--ng); }
.rsvp3 button.on.maybe { background: var(--warn); border-color: var(--warn); }
.rsvp3.lg button { height: 52px; font-size: 15.5px; border-radius: 14px; }
.ev:has(+ .ev-rsvp) { border-bottom: 0; padding-bottom: 6px; }
.ev-rsvp { padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.ev-rsvp:last-child { border-bottom: 0; }

/* 大会管理：試合カード */
.mcard { display: block; width: 100%; text-align: left; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 14px 12px; margin-bottom: 10px; }
.mcard:active { transform: scale(.99); }
.ms-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 800; color: var(--mute); margin-bottom: 6px; }
.ms-side { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.ms-side + .ms-side { border-top: 1px dashed var(--line); }
.ms-av { display: inline-flex; } .ms-av .av + .av { margin-left: -6px; }
.ms-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-score { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.ms-side.win .ms-name, .ms-side.win .ms-score { color: var(--ink); } .ms-side.win .ms-score { color: var(--ok); }
.ms-side.lose { opacity: .55; }
/* 結果入力 */
.sc-entry { padding: 14px 18px; }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sc-name { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; } .sc-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-ctrl { display: flex; align-items: center; gap: 6px; flex: none; }
.sc-ctrl button { width: 46px; height: 46px; border-radius: 14px; background: var(--bg); font-size: 22px; font-weight: 900; }
.sc-ctrl input { width: 64px; height: 50px; border-radius: 12px; border: 1.5px solid var(--line); text-align: center; font-size: 26px; font-weight: 900; outline: 0; }
.sc-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 6px; }
.sc-quick button { height: 34px; border-radius: 10px; background: var(--bg); font-size: 12px; font-weight: 800; color: var(--sub); }
/* 順位表 */
.stand .st-row { display: grid; grid-template-columns: 28px 1fr 30px 30px 40px 40px; gap: 6px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.stand .st-row span:not(.ellipsis), .stand .st-row b:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.stand .st-h { font-size: 11px; font-weight: 800; color: var(--mute); padding: 8px 14px; }
.stand .st-row.top b:first-child { color: var(--brand); }
/* トーナメント表 */
.bracket { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.br-col { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; min-width: 170px; }
.br-h { font-size: 12px; font-weight: 800; color: var(--mute); text-align: center; }
.br-m { display: block; width: 100%; text-align: left; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.br-m div { display: flex; justify-content: space-between; gap: 6px; padding: 8px 10px; font-size: 13px; }
.br-m div + div { border-top: 1px solid var(--line); }
.br-m div.w { font-weight: 900; background: #E6F8F1; }
/* スコアボード */
.sb { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; height: min(62vh, 520px); }
.sb-side { position: relative; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; user-select: none; }
.sb-side.a { background: linear-gradient(160deg, var(--brand), color-mix(in srgb, var(--brand) 60%, black)); }
.sb-side.b { background: linear-gradient(160deg, #2F6BFF, #1B3C99); }
.sb-side:active:not(:disabled) { filter: brightness(1.12); }
.sb-side:disabled { opacity: .55; } .sb-side.won { opacity: 1; box-shadow: 0 0 0 4px var(--accent); }
.sb-name { font-size: 15px; font-weight: 800; opacity: .9; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-num { font-size: 96px; font-weight: 900; font-style: italic; line-height: 1; font-variant-numeric: tabular-nums; }
.sb-tag { position: absolute; top: 12px; right: 14px; background: var(--accent); color: #111; font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 10px; }
.sb-tag.gp { background: rgba(255,255,255,.2); color: #fff; }
/* AI試合分析 */
.an-sum { display: grid; gap: 10px; } @media (min-width: 700px) { .an-sum { grid-template-columns: 1fr 1fr; } }
.an-kv { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.an-kv small { display: block; font-size: 10.5px; color: var(--mute); font-weight: 700; } .an-kv b { font-size: 16px; font-weight: 900; }
.an-ev { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.an-ev:last-child { border-bottom: 0; }
.an-ev.low { background: #FFF8E1; }
.an-t { flex: none; height: 32px; padding: 0 10px; border-radius: 9px; background: var(--nav); color: #fff; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== スコア（ラウンドネット専用） ===== */
.rs-score { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; } /* コートの下＝親指が届く位置 */
.rs-team { --tc: #2563EB; position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 6px 12px; border-radius: 18px; background: var(--card); border: 3px solid color-mix(in srgb, var(--tc) 30%, transparent); box-shadow: var(--shadow); min-height: 140px; touch-action: manipulation; user-select: none; transition: transform .08s; }
.rs-team.B { --tc: #EA580C; }
.rs-team:active:not(:disabled) { transform: scale(.97); background: color-mix(in srgb, var(--tc) 8%, var(--card)); }
.rs-team.serving { border-color: var(--tc); }
.rs-team.won { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 10%, var(--card)); }
.rs-team:disabled { cursor: default; }
.rs-tname { font-size: 13px; font-weight: 800; color: var(--tc); display: flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rs-num { font-size: 64px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.rs-plus { font-size: 13px; font-weight: 800; color: #fff; background: var(--tc); border-radius: 20px; padding: 3px 14px; }
.rs-ball { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFF7B0, #FACC15 60%, #CA8A04); box-shadow: 0 0 0 1.5px #fff; flex: none; }

.rs-court { position: relative; width: min(100%, 330px); aspect-ratio: 1; margin: 12px auto 0; border-radius: 22px; background: color-mix(in srgb, #12B886 9%, var(--card)); box-shadow: var(--shadow); overflow: hidden; }
.rs-court.editing { outline: 3px dashed var(--info); outline-offset: -3px; }
.rs-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rs-bg line { stroke: color-mix(in srgb, var(--ink) 22%, transparent); stroke-width: .6; stroke-dasharray: 2 1.6; }
.rs-bg .rim { fill: #fff; stroke: #1F2937; stroke-width: 2.2; }
.rs-bg .net { fill: none; stroke: #9CA3AF; stroke-width: .5; stroke-dasharray: 1.2 1; }
.rs-tok { --tc: #2563EB; position: absolute; width: 50%; height: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; z-index: 1; }
.rs-tok.B { --tc: #EA580C; }
.rs-tok.TL { left: 0; top: 0; } .rs-tok.TR { left: 50%; top: 0; } .rs-tok.BL { left: 0; top: 50%; } .rs-tok.BR { left: 50%; top: 50%; }
.rs-av { position: relative; width: 58px; height: 58px; border-radius: 50%; background: var(--tc); color: #fff; font-size: 24px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.18); border: 3px solid #fff; letter-spacing: -1px; }
.rs-tok.server .rs-av { border-color: #FACC15; box-shadow: 0 0 0 4px rgba(250,204,21,.45), 0 2px 8px rgba(0,0,0,.2); }
.rs-av .rs-ball { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,.3); }
.rs-nm { font-size: 13px; font-weight: 800; background: var(--card); border-radius: 8px; padding: 0 7px; max-width: 92%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rs-rv { font-size: 10px; font-weight: 800; color: var(--sub); border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 0 6px; }
.rs-tok.moved .rs-av { animation: rs-pulse .9s ease; }
@keyframes rs-pulse { 0%,100% { transform: scale(1); } 40% { transform: scale(1.12); } }
.rs-court.editing .rs-tok { cursor: pointer; }
.rs-court.editing .rs-av { outline: 2px dashed color-mix(in srgb, var(--tc) 60%, transparent); outline-offset: 3px; }
.rs-tok.picked .rs-av { outline: 3px solid var(--info); outline-offset: 3px; transform: scale(1.08); }
.rs-mode { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--info); color: #fff; font-size: 13px; font-weight: 800; border-radius: 12px; padding: 6px 6px 6px 12px; }
.rs-mode button { background: #fff; color: var(--info); border-radius: 9px; padding: 6px 12px; font-weight: 800; }
.rs-ev { margin: 10px auto 0; max-width: 330px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--sub); min-height: 2.6em; }
.rs-ev b { color: var(--ink); }
.rs-rot { display: inline-block; margin-left: 4px; color: #7C3AED; font-weight: 800; }
.rs-ctrl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.rs-ctrl .btn { height: 46px; padding: 0 6px; font-size: 13px; }
.rs-timer { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; align-items: center; margin-top: 10px; background: var(--card); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.rs-timer .btn { height: 44px; }
.rs-tl { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: var(--sub); padding: 0 4px; }
.rs-timer.on { grid-template-columns: auto 1fr auto auto; }
.rs-tleft { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; padding: 0 6px; min-width: 84px; }
.rs-tbar { display: block; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.rs-tbar b { display: block; height: 100%; background: var(--info); transition: width .2s linear; }
.rs-timer.done { background: color-mix(in srgb, var(--ng) 10%, var(--card)); }
.rs-timer.done .rs-tleft { color: var(--ng); }
.rs-target { margin-top: 12px; display: grid; gap: 6px; }
.rs-target .chip { height: 40px; font-size: 14px; padding: 0 4px; }
.rs-win { margin-top: 12px; text-align: center; display: grid; gap: 8px; font-size: 17px; }
.rs-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--sub); }
.rs-legend i { width: 12px; height: 12px; border-radius: 50%; background: #2563EB; } .rs-legend i.B { background: #EA580C; margin-left: 10px; }
body:has(.rs-score) .fab, body:has(.rs-court) .fab { display: none; } /* 試合中は操作ボタンと重ならないよう非表示 */
.rs-court { width: min(100%, 300px); margin-top: 10px; }
.rs-team { min-height: 124px; padding: 8px 6px 10px; }
.rs-num { font-size: 58px; }
.rs-av { width: 54px; height: 54px; font-size: 22px; }

/* ホーム：次の練習 */
.home-prac-main { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; margin-bottom: 12px; min-width: 0; }
.home-prac-main .li-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.home-prac-main small { display: flex; align-items: center; gap: 4px; color: var(--sub); }
.home-prac-main small .ic { width: 14px; height: 14px; flex: none; }
.br-m.bye { box-shadow: none; border: 1.5px dashed var(--line); background: transparent; }

/* ===== 大会管理：セット入力・内訳・トーナメント表 ===== */
.ms-sets { display: inline-flex; gap: 4px; font-size: 11.5px; color: var(--mute); font-variant-numeric: tabular-nums; }
.ms-sets i { font-style: normal; min-width: 18px; text-align: right; }
.ms-sets i.w { color: var(--ink); font-weight: 800; }
.set-grid { display: grid; grid-template-columns: 74px 1fr 1fr; gap: 8px; align-items: center; }
.sg-team { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; font-size: 13px; }
.sg-team .av + .av { margin-left: -6px; }
.sg-team > b { max-width: 100%; }
.sg-team { flex-wrap: wrap; }
.sg-l { font-size: 12px; font-weight: 800; color: var(--sub); }
.sg-in { width: 100%; height: 50px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); text-align: center; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--ink); }
.sg-in:focus { outline: none; border-color: var(--brand); }
.md-body { padding: 4px 18px 8px; }
.md-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.md-x { align-self: center; font-size: 11px; font-weight: 800; color: var(--mute); }
.md-team { background: var(--bg); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.md-team.win { background: #E6F8F1; }
.md-team.lose { opacity: .7; }
.md-name { font-weight: 900; font-size: 15px; word-break: break-all; }
.md-mem { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--sub); align-items: center; }
.md-mem span { display: inline-flex; align-items: center; gap: 5px; }
.md-big { font-size: 40px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.md-team.win .md-big { color: var(--ok); }
.md-tbl { padding: 2px 0; }
.md-row { display: grid; grid-template-columns: 88px 1fr 1fr; gap: 8px; padding: 9px 14px; align-items: center; font-size: 14px; }
.md-row + .md-row { border-top: 1px solid var(--line); }
.md-row b { text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--mute); }
.md-row b.w { color: var(--ink); }
.md-row span { font-size: 12.5px; font-weight: 700; color: var(--sub); }
.md-h span { text-align: center; font-size: 12px; } .md-h span:first-child { text-align: left; }
.md-sum { background: var(--bg); } .md-sum b { color: var(--ink); }
/* トーナメント表 */
.bk-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px 8px; -webkit-overflow-scrolling: touch; }
.bk { position: relative; }
.bk-h { position: absolute; top: 0; text-align: center; font-size: 12px; font-weight: 800; color: var(--mute); }
.bk-h small { margin-left: 4px; font-weight: 700; font-size: 10px; }
.bk-lines { position: absolute; inset: 0; pointer-events: none; }
.bk-lines path { fill: none; stroke: var(--line); stroke-width: 2; }
.bk-lines path.won { stroke: var(--ok); stroke-width: 2.5; }
.bk-m { position: absolute; display: flex; flex-direction: column; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; border: 1.5px solid transparent; cursor: pointer; }
.bk-m.done { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.bk-m:active { transform: scale(.98); }
.bk-m.bye, .bk-m.tbd { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); cursor: default; }
.bk-t { flex: 1; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 13px; min-width: 0; }
.bk-t + .bk-t { border-top: 1px solid var(--line); }
.bk-t.w { background: #E6F8F1; font-weight: 900; }
.bk-t.l { color: var(--mute); }
.bk-t > b { min-width: 16px; text-align: right; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.bk-t.w > b { color: var(--ok); }
.bk-n { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.bk-n .ellipsis { text-decoration: underline dotted color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.bk-seed { flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; background: var(--bg); color: var(--sub); font-size: 10px; font-weight: 900; }
.bk-g { display: inline-flex; gap: 3px; font-size: 10.5px; color: var(--mute); font-variant-numeric: tabular-nums; font-weight: 600; }
.bk-g i { font-style: normal; min-width: 14px; text-align: right; } .bk-g i.w { color: var(--ink); font-weight: 800; }
.bk-champ { position: absolute; width: 130px; height: 52px; border-radius: 12px; border: 1.5px dashed var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; font-size: 13.5px; }
.bk-champ.on { border: 0; background: linear-gradient(135deg, #FFF4C2, #FFE08A); font-weight: 900; color: #5C4300; box-shadow: var(--shadow); }
.bk-champ span:first-child { font-size: 18px; }
