*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f7fafc;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
button, input, select { font-family: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.topbar,
header.site-header { display: none !important; }
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.header-inner, header.header > .header-inner { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; min-height: 64px; height: auto; gap: 0.75rem !important; padding: 0.4rem 1rem !important; flex-wrap: nowrap !important; max-width: none !important; width: 100% !important; }
.logo { display: flex; align-items: center; text-decoration: none; min-width: 0; flex: 0 0 auto; }
.logo-img { height: 48px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.header-actions { display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 0.35rem; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.header-actions .tabs { display: contents; }
.header-actions .btn, .header-actions .btn-admin, .header-actions .tab { min-height: 40px; padding: 0.4rem 0.7rem; font-size: 0.88rem; white-space: nowrap; flex: 0 0 auto; }
.header-actions .who { display: inline-flex; align-items: center; min-height: 40px; padding: 0.4rem 0.75rem; font-weight: 800; color: #0c2460; white-space: nowrap; }
.menu-toggle { display: none; }
.nav-lineup-long, .nav-lineup-note { display: none; }
.btn-admin { flex: 0 0 auto; white-space: nowrap; }
.page { padding-top: var(--header-h, 72px); }

.hero { position: relative; background: #071433; color: #fff; padding: 0 0 1.25rem; text-align: center; }
.hero-poster { display: block; width: 100%; height: auto; }
.hero-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.btn-hero-alt {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0.85rem 1.75rem; border-radius: 8px;
  background: #fff; color: #0c2460; font-size: 1.15rem; font-weight: 700;
  text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.btn-hero-alt:hover { background: #e7f4fb; color: #0c2460; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.btn-hero {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0.85rem 1.75rem; border-radius: 8px;
  background: #24a8e4; color: #fff; font-size: 1.15rem; font-weight: 700;
  text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.btn-hero:hover { background: #1896d4; color: #fff; }

.tabs, .subtabs { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar, .subtabs::-webkit-scrollbar { display: none; }
.tab, .subtab {
  flex: 0 0 auto; border: 1px solid rgba(12, 74, 138, 0.35); background: #fff; color: #0c2460;
  border-radius: 8px; padding: 0.65rem 0.9rem; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; min-height: 44px;
}
.tab[aria-selected="true"], .subtab[aria-pressed="true"] { background: #0c4a8a; border-color: #0c4a8a; color: #fff; }
.subtabs { padding-top: 0; margin-bottom: 0.65rem; justify-content: center; flex-wrap: wrap; }

.admin-bar { background: #e7f4fb; border-bottom: 1px solid rgba(12, 74, 138, 0.15); }
.admin-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.85rem 0; }
.admin-bar p { margin: 0; color: #0c2460; font-weight: 600; font-size: 0.95rem; }
.save-status { font-weight: 500; color: #555; font-size: 0.88rem; margin-top: 0.15rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.panel { padding: 2.5rem 0 4rem; }
.section-title {
  font-family: 'Archivo Black', sans-serif; font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.02em; text-align: center; margin: 0 0 0.75rem; font-weight: 400;
}
.section-intro { text-align: center; color: #555; max-width: 42rem; margin: 0 auto 1.75rem; }
.intro-card, .rule-card, .team-card, .day-card, .standings-card {
  background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.intro-card { padding: 1.5rem 1.5rem 0.5rem; margin-bottom: 1.5rem; }
.intro-card h2 { font-family: 'Archivo Black', sans-serif; font-size: 1.35rem; margin: 0 0 0.6rem; font-weight: 400; }
.stat-grid, .rule-grid, .team-grid { display: grid; gap: 1rem; }
.stat-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 1.5rem; }
.stat { text-align: center; padding: 1.25rem 1rem; background: linear-gradient(135deg, #0c4a8a, #0c2460); color: #fff; border-radius: 12px; }
.stat-num { display: block; font-family: 'Archivo Black', sans-serif; font-size: 2.2rem; line-height: 1; margin-bottom: 0.3rem; }
.rule-grid { grid-template-columns: repeat(2, 1fr); margin-bottom: 1.5rem; }
.rule-card { padding: 1.35rem 1.4rem; }
.rule-card h3 { margin: 0 0 0.5rem; color: #0c2460; font-size: 1.15rem; }
.rule-card p { margin: 0 0 0.7rem; color: #333; }
.rule-card ul { margin: 0; padding-left: 1.15rem; color: #333; }
.rule-card li { margin-bottom: 0.35rem; }
.rule-card .btn { margin-top: 0.35rem; }
.rule-card a { color: #0c4a8a; font-weight: 700; }
.rule-card a.btn-primary, .rule-card a.btn-primary:hover { color: #fff; }
.settings-card { max-width: 40rem; margin: 0 auto 1rem; }
.settings-card label { display: block; font-weight: 600; margin: 0.85rem 0 0.25rem; color: #0c2460; }
.settings-card input[type="text"] { width: 100%; min-height: 44px; border: 1px solid #c9dced; border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 16px; }
.settings-card .hint { color: #555; font-size: 0.92rem; margin: 0.7rem 0; }
.captain-pass { display: grid; grid-template-columns: 1fr; gap: 0.2rem; margin-bottom: 0.85rem; }
.captain-pass strong { color: #0c2460; }
.captain-pass .hint { margin: 0 0 0.2rem; }
@media (min-width: 700px) {
  .captain-pass { grid-template-columns: 1fr 14rem; align-items: end; gap: 0.75rem; }
}
.dinner-cta { text-align: center; margin: -0.5rem 0 1.5rem; }

.table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); background: #fff; margin-bottom: 1.25rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th, .data-table td { padding: 0.75rem 0.7rem; text-align: right; border-bottom: 1px solid #eee; white-space: nowrap; }
.data-table th { background: #0c4a8a; color: #fff; font-weight: 600; }
.data-table td:first-child, .data-table th:first-child,
.data-table td:nth-child(2), .data-table th:nth-child(2) { text-align: left; }
.data-table tbody tr:last-child td { border-bottom: none; }
#statsRoot .table-wrap { overflow: visible; }
.stats-table { border-collapse: separate; border-spacing: 0; }
.stats-table thead th { position: sticky; top: var(--header-h, 72px); z-index: 4; background: #0c4a8a; }
.stats-table td:first-child, .stats-table th:first-child { position: sticky; left: 0; }
.stats-table th:first-child { z-index: 5; background: #0c4a8a; }
.stats-table td:first-child { z-index: 2; background: #fff; }
.legend { color: #555; font-size: 0.88rem; text-align: center; margin: 0.2rem 0 1rem; }
.sort-caption { text-align: center; margin: 0 0 0.75rem; color: #0c2460; font-weight: 600; }
.stats-table th { padding: 0; }
.sort-btn {
  display: block; width: 100%; min-height: 44px; padding: 0.65rem 0.55rem;
  border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600;
  text-align: inherit; cursor: pointer;
}
.sort-btn.is-on { background: #08386a; }
.rank-n { display: inline-block; min-width: 1.7rem; margin-right: 0.35rem; color: #0c4a8a; font-weight: 700; }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.highlight {
  background: #fff; border-radius: 12px; padding: 0.9rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.highlight span { display: block; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: #0c4a8a; font-weight: 700; }
.highlight strong { color: #0c2460; }
.best-player {
  background: #fff; border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); border-left: 4px solid #0c4a8a;
}
.best-player span { display: block; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: #0c4a8a; font-weight: 700; }
.best-player strong { font-size: 1.25rem; color: #0c2460; }
.best-player p { margin: 0.2rem 0 0; color: #555; }
.filter-row { display: flex; justify-content: center; margin-bottom: 1rem; }
.filter-row select { min-height: 44px; border: 1px solid #c9dced; border-radius: 8px; padding: 0.45rem 0.7rem; font-size: 16px; }

.team-grid { grid-template-columns: repeat(3, 1fr); }
.team-card { overflow: hidden; }
.team-head { padding: 0.9rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.team-head h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.player-list { list-style: none; margin: 0; padding: 0; }
.player-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0.7rem; border-bottom: 1px solid #f2f2f2; font-size: 0.95rem; }
.is-captain { color: #c1121f; font-weight: 800; }
.rank { font-weight: 700; color: #0c2460; min-width: 2.4rem; text-align: right; }
.rank.is-35 { color: #9b2226; }
.group-label { margin: 0.35rem 0.7rem 0; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: #0c4a8a; font-weight: 700; }
.edit-row { display: grid; grid-template-columns: 4.4rem 5.6rem minmax(0, 1fr) auto; gap: 0.35rem; padding: 0.35rem 0.5rem; align-items: center; }
.edit-row .edit-name { grid-column: 1 / -1; }
.captain-pick { display: flex; align-items: center; gap: 0.3rem; min-height: 44px; font-size: 0.82rem; font-weight: 800; color: #c1121f; white-space: nowrap; }
.edit-row .captain-pick input { width: 1.15rem; min-width: 1.15rem; min-height: 1.15rem; padding: 0; }
.edit-row input, .edit-row select, .field input, .field select, .modal input, .modal select {
  width: 100%; min-height: 44px; border: 1px solid #c9dced; border-radius: 8px;
  padding: 0.45rem 0.6rem; font-size: 16px; background: #fff; color: #1a1a1a;
}
.team-name-input { margin: 0.7rem 0.7rem 0.2rem; }
.icon-btn { min-width: 44px; min-height: 44px; border: none; background: #e7f4fb; color: #0c2460; border-radius: 8px; cursor: pointer; font-weight: 700; }
.add-player { margin: 0.4rem 0.7rem 0.2rem; }

.day-list { display: flex; flex-direction: column; gap: 1.25rem; }
.month-title { font-family: 'Archivo Black', sans-serif; font-size: 1.15rem; margin: 0.4rem 0; color: #0c2460; font-weight: 400; }
.day-card { padding: 1rem 1rem 0.4rem; }
.next-evening { border: 2px solid #0c4a8a; }
.next-label { margin: 0 0 0.15rem; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #0c4a8a; font-weight: 700; }
.day-date { margin: 0 0 0.7rem; font-weight: 700; text-transform: capitalize; color: #0c2460; }
.match { border: 1px solid #d5e6f2; border-radius: 12px; padding: 0.85rem; margin-bottom: 0.75rem; background: #f7fafc; overflow-x: auto; }
.match-top { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.55rem; color: #555; font-size: 0.88rem; font-weight: 600; }
.sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.4rem; align-items: center; }
.side { font-weight: 700; line-height: 1.3; padding: 0.35rem 0.5rem; border-radius: 8px; }
.side.right { text-align: right; }
.vs { color: #777; font-size: 0.85rem; font-weight: 700; }
.score-line { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.65rem; }
.lineup-admin { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.55rem; font-size: 0.92rem; }
.lineup-done { color: #1b4332; font-weight: 800; }
.modal form label { display: block; font-weight: 600; margin: 0.7rem 0 0.25rem; color: #0c2460; }
.modal form input[type="text"], .modal form input[type="password"] { width: 100%; min-height: 44px; border: 1px solid #c9dced; border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 16px; }
.lineup-admin p { margin: 0; }
.result-grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 1.05rem; table-layout: fixed; }
.result-grid .c-tag { width: 5%; }
.result-grid .c-num { width: 8%; }
.result-grid .c-name { width: 32%; }
.result-grid .c-set { width: 15%; }
.result-grid th, .result-grid td { border: 1px solid #d5e6f2; padding: 0.45rem 0.4rem; vertical-align: middle; }
.result-grid .tag { color: #0c2460; font-weight: 700; text-align: center; font-size: 0.85rem; }
.result-grid .num { font-family: 'Archivo Black', sans-serif; font-weight: 400; text-align: center; font-size: 1.4rem; line-height: 1; color: #0c2460; white-space: nowrap; padding-left: 0.1rem; padding-right: 0.1rem; }
.result-grid .team-name { font-weight: 700; font-size: 1.28rem; text-align: right; overflow-wrap: anywhere; }
.result-grid .team-name.away { text-align: left; }
.result-grid td.who { display: table-cell; font-weight: 600; line-height: 1.25; text-align: right; white-space: normal; }
.result-grid td.who.away { text-align: left; }
.result-grid .pair-name { display: block; margin: 0; font-size: 1.24rem; white-space: nowrap; line-height: 1.35; }
.result-grid .set-stack { padding: 0; background: #f4f8fb; text-align: center; font-weight: 700; color: #0c2460; }
.result-grid .set-stack.head { font-size: 0.75rem; letter-spacing: 0.04em; color: #0c4a8a; font-family: 'Outfit', sans-serif; }
.result-grid .set-stack span { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr); align-items: center; gap: 0.15rem; padding: 0.18rem 0.28rem; border-top: 1px solid #d5e6f2; }
.result-grid .set-stack span:first-child { border-top: 0; }
.result-grid .set-stack i { font-style: normal; color: #0c4a8a; font-size: 0.82rem; text-align: left; }
.result-grid .set-stack b { font-weight: 700; font-size: 1.28rem; text-align: center; }
.result-grid .set-stack .is-empty { color: #c5d0dc; font-weight: 600; }
.result-grid .set-stack.in-corso { font-weight: 800; color: #7a5b00; background: #fff3cd; letter-spacing: 0.02em; }
.result-grid .set-stack.is-live { background: #fffdf5; }
.result-grid .set-stack span.is-live-label { display: block; grid-template-columns: none; background: #fff3cd; color: #7a5b00; font-weight: 800; text-align: center; }
.mini-rank { color: #0c4a8a; font-weight: 700; margin-left: 0.15rem; white-space: nowrap; }
.match-top .btn { min-height: 36px; padding: 0.3rem 0.7rem; }
@media (max-width: 640px) { .lineup-admin { grid-template-columns: 1fr; } }
.score { font-family: 'Archivo Black', sans-serif; font-size: 1.25rem; color: #0c2460; }
.badge { display: inline-block; background: rgba(12, 74, 138, 0.12); color: #0c2460; border-radius: 6px; padding: 0.15rem 0.45rem; font-size: 0.75rem; font-weight: 700; }
.badge-wait { background: #eee; color: #555; }
.badge-draft { background: #fff3cd; color: #7a5b00; }
.rubber-lines { margin: 0.55rem 0 0; padding: 0; list-style: none; color: #444; font-size: 0.9rem; }
.summary { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 1rem; }
.summary span { background: #fff; border-radius: 999px; padding: 0.35rem 0.8rem; box-shadow: 0 2px 10px rgba(0,0,0,0.05); font-weight: 600; color: #0c2460; font-size: 0.92rem; }
.pos { font-weight: 700; color: #0c2460; }
.row-qual td { background: #e7f6fc; }
.cut td { border-bottom: 3px solid #0c4a8a; }
.team-pill { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 6px; font-weight: 700; white-space: normal; }
button.team-pill { border: 0; cursor: pointer; font: inherit; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 0.12em; }
button.team-pill:hover { filter: brightness(0.92); }
.team-scoreline { margin: 0.35rem 0 0.55rem; font-weight: 800; color: #0c2460; }
.note { display: block; font-size: 0.78rem; font-weight: 600; color: #0c4a8a; }
.ko-round { margin: 0 0 1.4rem; }
.ko-round h3 { font-family: 'Archivo Black', sans-serif; font-weight: 400; color: #0c2460; margin: 0 0 0.55rem; }
.ko-card { background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); padding: 0.9rem; margin-bottom: 0.75rem; }
.ko-card .match-top span:last-child { font-weight: 500; text-align: right; }
.ko-wait { background: #eef3f8; color: #607080; text-align: center; }
.ko-champion { margin: 0 0 0.55rem; font-family: 'Archivo Black', sans-serif; font-weight: 400; color: #0c2460; text-align: center; }
.bracket { margin-top: 1.25rem; background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); padding: 1.2rem 1.3rem; }
.bracket h3 { margin: 0 0 0.4rem; color: #0c2460; }
.bracket p { margin: 0 0 0.8rem; color: #555; }
.btn, .btn-admin {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0.55rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; text-decoration: none; border: 2px solid transparent;
}
.btn-primary { background: #0c4a8a; color: #fff; border-color: #0c4a8a; }
.btn-primary:hover { background: #0c2460; }
.btn-outline { background: #fff; color: #0c4a8a; border-color: #0c4a8a; }
.btn-outline:hover { background: #0c4a8a; color: #fff; }
.btn-admin { background: #fff; color: #0c2460; border: 2px solid #0c4a8a; }
.btn-ghost { background: transparent; color: #0c2460; border: none; font-weight: 700; cursor: pointer; min-height: 44px; }
.player-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: #0c2460; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 0.15em; }
.player-link:hover { color: #0c4a8a; }
.player-stack { display: inline; }
.player-teamline { display: none; }
.player-panel {
  background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 1rem 1rem 1.2rem; margin-bottom: 1.25rem;
}
.player-panel h2 {
  font-family: 'Archivo Black', sans-serif; font-size: 1.35rem; font-weight: 400;
  margin: 0.8rem 0 0.45rem; color: #0c2460;
}
.player-cards { display: none; }
.player-card { border: 1px solid #d5e3ef; border-radius: 12px; padding: 0.75rem 0.85rem; margin-bottom: 0.65rem; }
.player-card-top { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 800; }
.player-card dl { margin: 0.45rem 0 0; }
.player-card dt { margin-top: 0.35rem; font-size: 0.75rem; font-weight: 700; color: #0c4a8a; }
.player-card dd { margin: 0; }
.player-card .won, .player-sheet .won { color: #1b4332; font-weight: 800; }
.player-card .lost, .player-sheet .lost { color: #9b2226; font-weight: 800; }
.player-team { margin: 0 0 0.7rem; }
.player-sheet { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.92rem; }
.player-sheet th, .player-sheet td { padding: 0.45rem 0.4rem; text-align: left; vertical-align: top; border-bottom: 1px solid #d5e3ef; overflow-wrap: break-word; }
.player-sheet th { color: #0c4a8a; font-size: 0.78rem; font-weight: 700; }
.player-sheet td:nth-child(1) { width: 6.6rem; white-space: nowrap; }
.player-sheet td:nth-child(5), .player-sheet th:nth-child(5) { width: 5.2rem; }
.player-sheet td:nth-child(6) { width: 11rem; white-space: nowrap; }

.modal { position: fixed; inset: 0; z-index: 200; background: rgba(7, 20, 51, 0.55); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; width: min(640px, 100%); max-height: min(92dvh, 920px); overflow: auto; border-radius: 16px 16px 0 0; padding: 1.2rem 1.1rem calc(1.4rem + env(safe-area-inset-bottom)); }
.modal-card-wide { width: min(760px, 100%); }
.modal-card h2 { font-family: 'Archivo Black', sans-serif; font-size: 1.25rem; margin: 0 0 0.4rem; font-weight: 400; }
.field { margin-bottom: 0.8rem; }
.field label, .modal form > label { display: block; font-weight: 600; margin-bottom: 0.25rem; color: #0c2460; }
.rubber-box { background: #e7f4fb; border-radius: 12px; padding: 0.8rem; margin-bottom: 0.75rem; }
.rubber-box h3 { margin: 0 0 0.55rem; font-size: 1rem; color: #0c2460; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; }
.doubles-pair { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; grid-auto-flow: column; gap: 0.55rem 0.75rem; }
.doubles-pair .field { margin-bottom: 0; }
.sets { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.35rem; }
.set-line { display: flex; align-items: center; gap: 0.35rem; background: #fff; border-radius: 8px; padding: 0.25rem 0.45rem; }
.set-line span { font-size: 0.82rem; font-weight: 700; color: #0c4a8a; }
.set-line input { width: 3rem; min-height: 44px; text-align: center; padding: 0.2rem; }
.set-hint { margin: 0.45rem 0 0; font-size: 0.82rem; color: #355; }
.preview { background: #fff; border-radius: 8px; padding: 0.55rem 0.7rem; margin-top: 0.5rem; font-weight: 600; color: #0c2460; }
.form-error { color: #9b2226; font-weight: 600; margin: 0.3rem 0; }
.modal-actions, .forfeit-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.total-line { margin-top: 0.4rem; font-family: 'Archivo Black', sans-serif; font-size: 1.15rem; }
.footer { background: #1a1a1a; color: rgba(255,255,255,0.8); padding: 2rem 0; text-align: center; }
.footer-logo { font-family: 'Archivo Black', sans-serif; font-size: 1rem; color: #fff; margin: 0 0 0.25rem; }
.footer-legal { font-size: 0.9rem; margin: 0; }

@media (min-width: 760px) {
  .modal { align-items: center; padding: 1.5rem; }
  .modal-card { border-radius: 16px; }
}
@media (max-width: 900px) {
  .team-grid, .highlights { grid-template-columns: 1fr 1fr; }
  #statsRoot .table-wrap { overflow-x: auto; }
  .stats-table thead th { position: static; top: auto; }
  .stats-table thead th:first-child { position: sticky; left: 0; top: auto; }
  .players-table { font-size: 0.78rem; }
  .players-table td { padding: 0.22rem 0.35rem; line-height: 1.15; }
  .players-table .sort-btn { min-height: 0; padding: 0.35rem 0.28rem; font-size: 0.7rem; }
  .players-table th:nth-child(2), .players-table td:nth-child(2) { display: none; }
  .players-table .rank-n { min-width: 1.15rem; margin-right: 0.15rem; vertical-align: top; font-size: 0.75rem; }
  .players-table .player-stack { display: inline-block; vertical-align: top; }
  .players-table .player-link { font-size: 0.82rem; line-height: 1.15; }
  .players-table .player-teamline { display: block; margin-top: 0.05rem; font-size: 0.68rem; font-weight: 700; line-height: 1.15; white-space: normal; }
  .player-sheet { width: max-content; min-width: 100%; table-layout: auto; }
  .player-sheet th, .player-sheet td { white-space: nowrap; }
}
@media (max-width: 700px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: 0.75rem; flex: 1 1 auto; min-height: 54px; padding: 0.7rem 1.25rem;
    border: 2px solid #0c4a8a; border-radius: 8px; background: #0c4a8a; color: #fff;
    font-weight: 800; font-size: 1.25rem; letter-spacing: 0.04em; cursor: pointer;
    box-shadow: 0 3px 10px rgba(12, 74, 138, 0.35);
  }
  .header-inner { justify-content: flex-start; }
  .header-actions {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0.22rem; overflow: auto; max-height: calc(100dvh - 72px);
    background: #fff; padding: 0.4rem 0.7rem; border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 14px 28px rgba(7, 20, 51, 0.16);
  }
  .header.is-open .header-actions { display: flex; }
  .header-actions .tabs { display: flex; flex-direction: column; width: 100%; }
  .header-actions .btn, .header-actions .btn-admin, .header-actions .tab,
  .header-actions .who { width: 100%; justify-content: flex-start; min-height: 32px; padding: 0.22rem 0.65rem; font-size: 0.84rem; }
  .nav-lineup-short { display: none; }
  .nav-lineup-long { display: inline; }
  .header-actions .nav-lineup {
    order: -2; background: #c1121f; border-color: #c1121f; color: #fff;
    font-size: 1rem; font-weight: 800; min-height: 40px; padding: 0.3rem 0.65rem; justify-content: center;
  }
  .nav-lineup-note {
    display: block; order: -1; margin: 0 0 0.1rem; color: #0c2460;
    font-size: 0.78rem; font-weight: 700; line-height: 1.25;
  }
  .stat-grid, .rule-grid, .team-grid, .highlights { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .sides { grid-template-columns: 1fr; }
  .side.right { text-align: left; }
  .vs { display: none; }
  .edit-row { grid-template-columns: 1fr 1fr auto auto; }
  .edit-row .edit-name { grid-column: 1 / -1; }
  .modal-card { padding: 0.85rem 0.6rem calc(1rem + env(safe-area-inset-bottom)); }
  .rubber-box { padding: 0.6rem 0.45rem; }
  .field label { font-size: 0.78rem; line-height: 1.2; }
  .sets { flex-wrap: nowrap; gap: 0.25rem; }
  .set-line { flex: 1 1 0; min-width: 0; gap: 0.12rem; padding: 0.15rem 0.2rem; }
  .set-line span { font-size: 0.62rem; }
  .set-line input { width: 1.55rem; min-width: 0; min-height: 36px; padding: 0.05rem; }
  .match { padding: 0.55rem 0.4rem; overflow-x: auto; }
  .result-grid { min-width: 34rem; font-size: 0.72rem; }
  .result-grid th, .result-grid td { padding: 0.28rem 0.2rem; }
  .result-grid .num { font-size: 0.82rem; }
  .result-grid .team-name { font-size: 0.72rem; }
  .result-grid .pair-name { font-size: 0.72rem; line-height: 1.3; }
  .result-grid .set-stack b { font-size: 0.72rem; }
  .result-grid .set-stack span { grid-template-columns: 0.95rem minmax(0, 1fr); gap: 0.05rem; padding: 0.12rem 0.12rem; }
  .result-grid .set-stack i { font-size: 0.58rem; }
  .mini-rank { margin-left: 0.08rem; }
}
