/* 共通部品（docs/02_screens.md 1.4 節）。mockups/index.html から移植。画面固有のスタイルは各 features の CSS へ。 */
.pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pills.tight {
  gap: 6px;
  align-items: center;
}
.pills.scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 6px 2px 10px;
  margin: -6px -2px -10px;
  scrollbar-width: none;
}
.pills.scroll::-webkit-scrollbar {
  display: none;
}
.pill {
  font-size: 0.86rem;
  color: var(--fg);
  padding: 9px 16px;
  min-height: 40px;
  white-space: nowrap;
  transition:
    box-shadow 0.15s,
    color 0.15s;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  padding: 13px 24px;
  min-height: 46px;
  white-space: nowrap;
}
.btn:active {
  box-shadow: var(--press);
}
.btn.block {
  width: 100%;
}
.court-badge {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: var(--raise-s);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--teal-ink);
  background: var(--bg);
}
.court-badge.lg {
  width: 72px;
  height: 72px;
  font-size: 2rem;
}
.court-badge.fill {
  color: var(--on-teal);
  background: linear-gradient(145deg, var(--teal), var(--teal-2));
}
.track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  box-shadow: var(--press);
  background: var(--well);
  overflow: hidden;
}
.track i {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
}
.tbl {
  overflow-x: auto;
  border-radius: var(--r-s);
  box-shadow: var(--press);
  background: var(--well);
  padding: 4px 14px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}
th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}
td.n,
th.n {
  text-align: right;
  font-family: var(--f-display);
  font-variant-numeric: tabular-nums;
}
tr.me td {
  color: var(--teal-ink);
  font-weight: 700;
}
.note {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}
.empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.updated {
  text-align: center;
  padding-top: 8px;
}
/* ヒーロー・進行状況 */
.hero {
  gap: 16px;
}
.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero .meta {
  font-size: 0.9rem;
}
.conds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.conds li {
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--press);
  background: var(--well);
  font-size: 0.84rem;
  font-weight: 500;
}
.conds b {
  font-family: var(--f-display);
  color: var(--teal-ink);
  font-weight: 700;
}
.progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.progress .line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--muted);
}
.progress .line b {
  font-family: var(--f-display);
  font-size: 1.1rem;
  color: var(--fg);
}
.well.high {
  border-left: 4px solid var(--warn);
}
/* スコアボード */
.board {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
}
.brow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 56px;
  gap: 8px;
  align-items: center;
}
.brow .bname {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brow.win .bname {
  color: var(--teal-ink);
}
.brow .bsets {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.35rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.brow .bpts {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.6rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--teal-ink);
}
.brow .bpts.dim {
  color: var(--muted);
  font-size: 1.1rem;
}
.bhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 56px;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: center;
}
.bhead span:first-child {
  text-align: left;
}
.bhead span:last-child {
  text-align: right;
}
.lc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.lc-top .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ref {
  font-size: 0.82rem;
  color: var(--muted);
}
.ref b {
  color: var(--fg);
  font-weight: 500;
}
.live-card {
  cursor: pointer;
}
/* 試合行 */
.slot-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
}
.slot-head h3 {
  font-size: 1rem;
  font-weight: 700;
}
.slot-head .time {
  color: var(--muted);
  font-size: 0.84rem;
}
.slot-head .st {
  margin-left: auto;
}
.mrow {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.mrow .mmain {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.mrow .pair {
  font-weight: 700;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
  line-height: 1.35;
}
.mrow .pair .vs {
  font-family: var(--f-display);
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
}
.mrow .pair .me {
  color: var(--teal-ink);
}
.mrow .mside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.mrow .score {
  font-weight: 700;
  font-size: 1.05rem;
}
.mlist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
/* 星取表 */
.ox td,
.ox th {
  text-align: center;
}
.ox td:first-child,
.ox th:first-child {
  text-align: left;
  font-weight: 700;
}
.ox .o {
  color: var(--teal-ink);
  font-weight: 900;
}
.ox .x {
  color: #a9afb6;
  font-weight: 900;
}
.ox td small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
}
.ox td.self {
  background: var(--line);
}
/* タブバー（スマホ：下部固定、860px 以上：上部ピル） */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
.tabbar .inner {
  max-width: 560px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--raise);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  min-height: 52px;
  justify-content: center;
}
.tab svg {
  width: 20px;
  height: 20px;
}
.tab[aria-current='page'] {
  box-shadow: var(--press);
  background: var(--well);
  color: var(--teal-ink);
}
@media (min-width: 860px) {
  body {
    padding-block: 0 40px;
  }
  .tabbar {
    position: sticky;
    top: 0;
    bottom: auto;
    padding: 14px 0;
  }
  .tabbar .inner {
    max-width: 1080px;
    grid-template-columns: repeat(4, max-content);
    justify-content: start;
  }
  .tab {
    flex-direction: row;
    gap: 8px;
    padding: 8px 18px;
    min-height: 44px;
    font-size: 0.86rem;
  }
}
/* 順位表・マイチーム・試合詳細 */
.rank {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: var(--raise-s);
  font-family: var(--f-display);
  font-weight: 700;
  background: var(--bg);
}
.rank.top {
  color: var(--on-teal);
  background: linear-gradient(145deg, var(--teal), var(--teal-2));
}
.st.ok {
  color: var(--teal-ink);
}
td.wrap-cell {
  white-space: normal;
  min-width: 7em;
}
.next-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.next-card .when {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
}
.next-card .when-time {
  font-size: 1rem;
}
.next-card .when small {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  font-family: var(--f-body);
}
.next-card .opp {
  font-size: 1.05rem;
  font-weight: 700;
}
.num.big {
  font-size: 1.4rem;
  font-weight: 700;
}
.num.strong {
  font-weight: 700;
}
label.f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  min-width: 0;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn.ghost {
  color: var(--fg);
}
.pill.back {
  align-self: flex-start;
}
.sethist {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sethist .set {
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: var(--press);
  background: var(--well);
  font-family: var(--f-display);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}
.sethist .set b {
  color: var(--teal-ink);
}
/* 全体俯瞰（枠 × コート） */
.ov-wrap {
  padding: 0;
}
table.ov {
  min-width: 100%;
}
table.ov th,
table.ov td {
  vertical-align: top;
  white-space: normal;
  min-width: 9.5em;
  padding: 8px 8px;
}
table.ov th.ov-slot,
table.ov td.ov-slot {
  position: sticky;
  left: 0;
  background: var(--well);
  z-index: 1;
  min-width: 6em;
}
table.ov th.ov-slot small {
  display: block;
  font-weight: 400;
}
table.ov tr.past td,
table.ov tr.past th {
  opacity: 0.6;
}
table.ov tr.current th.ov-slot {
  color: var(--teal-ink);
}
.ov-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.35;
}
.ov-cell .pair {
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}
.ov-cell .vs {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 400;
}
.ov-cell .ref {
  font-size: 0.74rem;
  color: var(--muted);
}
.ov-cell .hl {
  background: #fff3c4;
  border-radius: 6px;
  padding: 0 4px;
}
.ov-cell .me {
  color: var(--teal-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
table.ov td.hl-play {
  background: #fff3c4;
  box-shadow: inset 0 0 0 2px #e0b300;
}
table.ov td.hl-ref {
  background: #fff8e1;
  box-shadow: inset 0 0 0 2px #f0d060;
}
table.ov td.hl-mine {
  background: #dff5f3;
  box-shadow: inset 0 0 0 2px var(--teal);
}
table.ov td.hl-mine-ref {
  background: #ecf8f7;
  box-shadow: inset 0 0 0 2px #8fd3cf;
}
table.ov td.hl-play.hl-mine {
  background: linear-gradient(135deg, #fff3c4 50%, #dff5f3 50%);
}
table.ov td.live .tag {
  color: var(--on-teal);
  background: linear-gradient(145deg, var(--teal), var(--teal-2));
  box-shadow: none;
}
.ov-legend .lg {
  display: inline-block;
  width: 1em;
  border-radius: 3px;
  margin-right: 2px;
}
.ov-legend .lg.hl-play {
  color: #e0b300;
}
.ov-legend .lg.hl-ref {
  color: #f0d060;
}
.ov-legend .lg.hl-mine {
  color: var(--teal);
}
.ov-legend .lg.hl-mine-ref {
  color: #8fd3cf;
}
.ov-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}
.ov-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.ov-summary {
  gap: 8px;
}
/* マイチーム見出しの変更ボタン */
.myteam-head {
  align-items: center;
}
.myteam-head .pill.small {
  margin-left: auto;
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.8rem;
}
/* 星取表の勝数セル */
.ox td.n small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 400;
}
.ox td:first-child {
  position: sticky;
  left: 0;
  background: var(--well);
  z-index: 1;
}
