:root {
  --ink: #111827;
  --muted: #667085;
  --line: #d9e2e5;
  --paper: #fbfaf4;
  --white: #ffffff;
  --pitch: #087a55;
  --pitch-dark: #07503d;
  --blue: #174ea6;
  --red: #c93636;
  --gold: #e3a929;
  --aqua: #55b5c4;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, Arial,
    sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  isolation: isolate;
  overflow: hidden;
  padding: 10px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(251, 250, 244, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.site-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: #344054;
  font-size: 0.95rem;
  font-weight: 800;
}

.site-nav a {
  text-decoration: none;
}

.dashboard-hero {
  width: min(var(--max), calc(100% - 36px));
  margin: 22px auto 0;
  text-align: center;
}

.eyebrow,
.section-title p {
  margin: 0;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: none;
  margin: 0;
  font-family: "Yu Gothic UI", "Noto Sans JP", "Yu Gothic", Meiryo, Arial, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.95rem);
  font-weight: 950;
  line-height: 1.22;
  letter-spacing: 0;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.icon-button {
  background: var(--white);
  color: var(--ink);
}

.summary-strip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: min(var(--max), calc(100% - 36px));
  margin: 10px auto 0;
}

.summary-items {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}

.summary-items article {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: auto;
  padding: 0;
  background: transparent;
  line-height: 1;
}

.summary-item::before {
  content: "";
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-right: -1px;
  background-color: transparent;
  background-image: var(--summary-icon);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.summary-item--teams {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239a855b' d='M2 1.5h1.7v13H2zM4.4 2.4c1.5-.7 2.8-.7 4.3 0 1.3.6 2.4.6 3.9-.1.5-.2 1.1.1 1.1.7v6.1c0 .4-.2.7-.6.8-1.8.8-3.4.8-5 0-1.2-.6-2.3-.6-3.7.1z'/%3E%3C/svg%3E");
}

.summary-item--matches {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%239a855b' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M8 4.7 5.5 6.5 6.5 9.4h3L10.5 6.5zM5.5 6.5 3.1 5.8M10.5 6.5l2.4-.7M6.5 9.4l-1.4 2.1M9.5 9.4l1.4 2.1M8 4.7V2.6'/%3E%3C/g%3E%3C/svg%3E");
}

.summary-item--period {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%239a855b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='3' width='11' height='10.5' rx='1.4'/%3E%3Cpath d='M5.4 1.8v2.6M10.6 1.8v2.6M2.7 6.3h10.6'/%3E%3C/g%3E%3C/svg%3E");
}

.summary-strip strong {
  display: inline;
  font-size: 0.95rem;
  line-height: 1;
}

.summary-strip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.summary-pr {
  grid-column: 3;
  align-self: end;
  justify-self: start;
  margin-left: 8px;
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.affiliate-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(var(--max), calc(100% - 36px));
  margin: 22px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(8, 122, 85, 0.18);
  border-radius: 8px;
  background: #f2f7f4;
  text-align: center;
}

.affiliate-cta p {
  margin: 0;
  color: var(--pitch-dark);
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.25;
}

.affiliate-headline {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: clamp(1rem, 2.1vw, 1.18rem);
  font-weight: 950;
  line-height: 1.25;
}

.affiliate-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  color: #344054;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  list-style: none;
}

.affiliate-points li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--white);
  color: var(--pitch-dark);
}

.price-point {
  flex-basis: 100%;
  justify-content: center;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
}

.price-arrow {
  color: var(--muted);
}

.affiliate-points strong {
  color: var(--red);
}

.affiliate-points li::before {
  display: none;
}

.affiliate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.affiliate-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.mobile-copy {
  display: none;
}

.affiliate-cta + .workspace {
  margin-top: 34px;
}

.workspace,
.legal-section {
  width: min(var(--max), calc(100% - 36px));
  margin: 86px auto 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.section-title--compact {
  display: block;
  margin-bottom: 16px;
}

.section-title--compact h2 {
  margin-top: 4px;
  font-size: 1.55rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
  display: grid;
  gap: 5px;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 900;
}

.filter-label {
  display: inline;
}

.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5d9;
  border-radius: 8px;
  background: #f8faf9;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.board-layout {
  margin-top: 22px;
}

.match-list {
  display: grid;
  gap: 12px;
}

.match-day {
  display: grid;
  gap: 7px;
}

.day-marker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 2px;
  color: var(--ink);
  line-height: 1;
}

.day-marker::after {
  content: "";
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background: rgba(17, 24, 39, 0.12);
}

.day-marker strong {
  font-size: 0.98rem;
  font-weight: 950;
  white-space: nowrap;
}

.day-marker span {
  color: inherit;
  font-size: 0.98rem;
  font-weight: 950;
  white-space: nowrap;
}

.day-matches {
  display: grid;
  gap: 6px;
}

.match-row {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  touch-action: pan-y;
}

.match-row:hover {
  border-color: rgba(8, 122, 85, 0.42);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.match-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  pointer-events: none;
}

.match-top-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.match-group-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: #e9f4ef;
  color: var(--pitch-dark);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.teams {
  position: relative;
  z-index: 1;
  min-width: 0;
  pointer-events: none;
}

.match-detail-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 8px;
  color: transparent;
  text-decoration: none;
  white-space: nowrap;
  touch-action: pan-y;
}

.match-detail-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin: 0;
}

.team-side {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.team-name {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(0.82rem, 1.5vw, 1rem);
  font-weight: 900;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-center {
  min-width: 0;
  text-align: center;
}

.match-center strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.team-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 22px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 900;
}

.team-code.is-flag {
  min-width: 34px;
  min-height: 24px;
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
}

.team-code.is-flag img {
  display: block;
  width: 30px;
  max-width: 100%;
  max-height: 20px;
  object-fit: contain;
}

.match-details {
  margin-top: 2px;
  color: #475467;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.broadcast-block {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.broadcast-block::-webkit-scrollbar {
  display: none;
}

.broadcast-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}

.broadcast-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f2f7f4;
  color: var(--pitch-dark);
  font-size: 0.66rem;
  font-weight: 900;
}

.status-badge {
  display: inline-flex;
  justify-content: center;
  min-width: 44px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 0.62rem;
  font-weight: 900;
}

.status-badge.is-live {
  background: #fee4e2;
  color: var(--red);
}

.status-badge.is-final {
  background: #dcfce7;
  color: #166534;
}

body.sheet-open {
  overflow: hidden;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 24, 39, 0.42);
  opacity: 0;
  transition: opacity 180ms ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.match-sheet {
  box-sizing: border-box;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  height: min(86vh, 720px);
  max-height: min(86vh, 720px);
  padding: 10px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--white);
  box-shadow: 0 -18px 50px rgba(15, 23, 42, 0.28);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 200ms ease;
}

@supports (height: 100dvh) {
  .match-sheet {
    height: min(82dvh, 720px);
    max-height: min(82dvh, 720px);
  }
}

.match-sheet.is-open {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #d0d7dc;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.sheet-content {
  display: grid;
  gap: 14px;
  max-width: 560px;
  min-width: 0;
  margin: 0 auto;
}

.sheet-header {
  padding-right: 42px;
}

.sheet-kicker {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet-header h2 {
  margin: 3px 0 4px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.sheet-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.sheet-meta p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-attendance {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.sheet-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 10px;
  background: #f8faf9;
}

.sheet-score div {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.sheet-score strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-score > b {
  justify-self: center;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
}

.sheet-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f5f4;
}

.sheet-tab {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 950;
  cursor: pointer;
}

.sheet-tab.is-active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.sheet-panel {
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  width: min(100%, calc(100vw - 32px));
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.sheet-panel[hidden] {
  display: none;
}

.sheet-section {
  box-sizing: border-box;
  display: grid;
  gap: 9px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.sheet-section h3 {
  margin: 0;
  font-size: 0.88rem;
}

.sheet-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sheet-section-head span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  white-space: nowrap;
}

.sheet-broadcasts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sheet-broadcasts span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f2f7f4;
  color: var(--pitch-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.sheet-watch-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--white);
  font-weight: 950;
  text-decoration: none;
}

.sheet-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sheet-info-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: #f8faf9;
}

.sheet-info-grid div.is-wide {
  grid-column: 1 / -1;
}

.sheet-info-grid span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}

.sheet-info-grid strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-info-grid div.is-wide strong {
  white-space: normal;
}

.sheet-stat-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
}

.sheet-stat-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  background: #f8faf9;
}

.sheet-stat-row strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
  text-align: center;
}

.sheet-stat-row span {
  color: #475467;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.sheet-lineups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.formation-board {
  display: grid;
  gap: 7px;
}

.formation-team-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
}

.formation-team-heading.is-away {
  margin-top: 1px;
}

.formation-team-heading strong {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formation-team-heading b {
  font-size: 0.88rem;
  font-weight: 950;
  white-space: nowrap;
}

.formation-pitch {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #087a55;
  background-size: 100% 80px, 80px 100%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.formation-team-tag {
  position: absolute;
  z-index: 3;
  right: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(3, 41, 32, 0.72);
  color: var(--white);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.formation-team-tag.is-away {
  bottom: 10px;
}

.formation-team-tag strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formation-team-tag b {
  font-size: 0.8rem;
  font-weight: 950;
  white-space: nowrap;
}

.formation-pitch::before,
.formation-pitch::after {
  position: absolute;
  right: 16%;
  left: 16%;
  height: 74px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  content: "";
}

.formation-pitch::before {
  top: 0;
  border-top: 0;
}

.formation-pitch::after {
  bottom: 0;
  border-bottom: 0;
}

.pitch-line,
.pitch-box,
.pitch-circle {
  position: absolute;
  pointer-events: none;
}

.pitch-line.is-half {
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.pitch-box {
  right: 31%;
  left: 31%;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.26);
}

.pitch-box.is-top {
  top: 0;
  border-top: 0;
}

.pitch-box.is-bottom {
  bottom: 0;
  border-bottom: 0;
}

.pitch-circle {
  top: 50%;
  left: 50%;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.formation-player {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 78px;
  color: var(--white);
  text-align: center;
  transform: translate(-50%, -50%);
}

.formation-player b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #08251e;
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 950;
}

.formation-player span {
  width: 100%;
  overflow: hidden;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.lineup-extra-title {
  margin: 12px 0 0;
  padding-left: 8px;
  border-left: 4px solid var(--ink);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.2;
}

.lineup-bench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.lineup-bench-card {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  background: var(--white);
}

.lineup-bench-card h4 {
  margin: 0;
  padding: 7px 6px;
  background: #f2f4f3;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
}

.lineup-bench-head,
.lineup-bench-list li {
  display: grid;
  grid-template-columns: 31px 31px minmax(0, 1fr);
  align-items: center;
}

.lineup-bench-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lineup-bench-head {
  min-height: 24px;
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 950;
  text-align: center;
}

.lineup-bench-list li {
  min-height: 34px;
  border-bottom: 1px solid #edf0f2;
  color: #344054;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.2;
}

.lineup-bench-list li:last-child {
  border-bottom: 0;
}

.bench-pos,
.bench-no {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid #edf0f2;
  color: #344054;
  font-size: 0.66rem;
  font-weight: 900;
}

.lineup-bench-list strong {
  min-width: 0;
  overflow: hidden;
  padding: 0 6px;
  color: #1570d6;
  font-size: 0.68rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.lineup-manager-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: var(--white);
}

.lineup-manager-card span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.2;
}

.lineup-manager-card strong {
  overflow: hidden;
  color: #1570d6;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-event-list {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 2px 0;
  list-style: none;
}

.sheet-event-list::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  background: #e7ecea;
  content: "";
}

.sheet-event-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.sheet-event-row.is-away {
  grid-template-columns: minmax(0, 1fr) 28px 44px;
}

.sheet-event-row.is-away time {
  grid-column: 3;
  grid-row: 1;
}

.sheet-event-row.is-away .sheet-event-icon {
  grid-column: 2;
  grid-row: 1;
}

.sheet-event-row.is-away .sheet-event-card {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}

.sheet-event-row time {
  display: grid;
  align-self: center;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: #eef0f2;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
}

.sheet-event-icon {
  display: grid;
  align-self: center;
  place-items: center;
  width: 24px;
  min-height: 24px;
  color: var(--pitch-dark);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
}

.sheet-event-row.is-sub .sheet-event-icon {
  color: var(--red);
  font-size: 0.95rem;
}

.sheet-event-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-top: 3px;
}

.sheet-event-card strong {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
}

.sheet-event-row.is-away .sheet-event-card strong {
  justify-content: flex-end;
}

.sheet-event-card strong b {
  color: var(--pitch-dark);
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
}

.sheet-event-card small,
.sheet-event-card em {
  color: #667085;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.event-in {
  color: var(--pitch-dark);
}

.event-out {
  color: var(--red);
}

.sheet-lineup-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8faf9;
}

.sheet-lineup-card strong {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-lineup-card p,
.sheet-lineup-card small,
.sheet-empty-note {
  margin: 0;
  color: #475467;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
}

.sheet-lineup-card small {
  color: var(--muted);
  font-size: 0.66rem;
}

.sheet-lineup-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet-lineup-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  min-width: 0;
  color: #344054;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.sheet-lineup-list b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e9f4ef;
  color: var(--pitch-dark);
  font-size: 0.6rem;
  font-weight: 950;
}

.sheet-lineup-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-standing-head,
.sheet-standing-row {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 22px minmax(92px, 1fr) repeat(4, 22px) 44px 32px 30px;
  gap: 3px;
  align-items: center;
  width: 100%;
}

.sheet-standing-head {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.sheet-standings {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet-standing-row {
  min-height: 40px;
  padding: 0 6px;
  border-radius: 8px;
  background: #f8faf9;
  font-size: 0.8rem;
  font-weight: 850;
}

.sheet-standing-row.is-active {
  background: #e9f4ef;
  box-shadow: inset 3px 0 0 var(--pitch);
}

.sheet-standing-row > span,
.sheet-standing-row em,
.sheet-standing-row b {
  text-align: center;
}

.sheet-standing-team {
  display: flex;
  align-items: center;
  min-width: 0;
  font-weight: 950;
}

.sheet-standing-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-standing-row em {
  font-style: normal;
  font-weight: 900;
}

.sheet-standing-row b {
  font-size: 0.86rem;
  font-weight: 950;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.empty-state,
.latest-card {
  min-height: 168px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  align-content: center;
}

.empty-state h3,
.latest-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.empty-state p,
.latest-card p {
  margin: 0;
  color: #475467;
  font-weight: 700;
}

.latest-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.latest-card a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.group-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.group-table h3 {
  margin: 0;
  padding: 10px 12px;
  background: var(--pitch-dark);
  color: var(--white);
  font-size: 1rem;
  line-height: 1;
}

.group-table table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.group-table th,
.group-table td {
  padding: 8px 5px;
  border-bottom: 1px solid #edf1f2;
  text-align: left;
}

.group-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.group-table tr:last-child td {
  border-bottom: 0;
}

.group-table th:nth-child(1),
.group-table td:nth-child(1) {
  width: 26px;
  text-align: center;
}

.group-table th:nth-child(2),
.group-table td:nth-child(2) {
  width: auto;
}

.group-table th:nth-child(3),
.group-table td:nth-child(3),
.group-table th:nth-child(4),
.group-table td:nth-child(4),
.group-table th:nth-child(5),
.group-table td:nth-child(5),
.group-table th:nth-child(6),
.group-table td:nth-child(6) {
  width: 28px;
  text-align: center;
}

.group-table th:nth-child(7),
.group-table td:nth-child(7) {
  width: 46px;
  text-align: right;
}

.group-table th:nth-child(8),
.group-table td:nth-child(8),
.group-table th:nth-child(9),
.group-table td:nth-child(9) {
  width: 34px;
  text-align: right;
}

.group-table th:nth-child(9),
.group-table td:nth-child(9) {
  padding-right: 10px;
}

.group-table .team-code {
  flex: 0 0 auto;
  min-width: 30px;
  min-height: 22px;
  font-size: 0.66rem;
}

.group-table .team-code.is-flag {
  min-width: 32px;
  min-height: 24px;
  font-size: 1.06rem;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.team-cell span:last-child {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-section {
  margin-top: 74px;
  margin-bottom: 74px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.legal-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.legal-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.25;
}

.legal-card p {
  margin: 0;
  color: #475467;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.65;
}

.legal-card p + p {
  margin-top: 8px;
}

.legal-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.legal-card dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}

.legal-card dt,
.legal-card dd {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
}

.legal-card dt {
  color: var(--muted);
  font-weight: 900;
}

.legal-card dd {
  color: #344054;
  font-weight: 800;
}

.legal-card a {
  color: var(--pitch-dark);
  font-weight: 950;
  text-decoration: none;
}

.error-page {
  display: grid;
  gap: 14px;
  width: min(680px, calc(100% - 36px));
  margin: 80px auto 110px;
  text-align: center;
}

.error-page h1 {
  margin: 0;
}

.error-page p:not(.eyebrow) {
  margin: 0;
  color: #475467;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.7;
}

.error-page .icon-button {
  justify-self: center;
  background: var(--ink);
  color: var(--white);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px clamp(18px, 4vw, 54px);
  border-top: 1px solid var(--line);
  background: #111827;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.site-footer a {
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 980px) {
  .filter-bar,
  .latest-grid,
  .group-grid,
  .legal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .match-list,
  .empty-state {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-block: 9px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .dashboard-hero,
  .summary-strip,
  .affiliate-cta,
  .workspace,
  .legal-section {
    width: min(100% - 28px, var(--max));
  }

  .summary-strip {
    grid-template-columns: 1fr;
    justify-items: center;
    width: min(100% - 28px, var(--max));
    margin-top: 8px;
  }

  .summary-items {
    grid-column: 1 / -1;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .summary-items article {
    justify-content: center;
    flex: 0 0 auto;
    gap: 2px;
    min-width: 0;
    white-space: nowrap;
  }

  .summary-item::before {
    width: 12px;
    height: 12px;
    margin-right: 0;
  }

  .summary-strip span {
    font-size: 0.6rem;
    font-weight: 900;
  }

  .summary-strip strong {
    font-size: 0.82rem;
    font-weight: 950;
  }

  .summary-pr {
    position: absolute;
    right: 0;
    bottom: 0;
    grid-column: auto;
    margin-left: 0;
    font-size: 0.54rem;
    white-space: nowrap;
  }

  .affiliate-cta {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    padding: 9px 10px 10px;
  }

  .affiliate-cta + .workspace {
    margin-top: 24px;
  }

  .desktop-copy {
    display: none;
  }

  .mobile-copy {
    display: inline;
  }

  .affiliate-cta p {
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1.15;
    -webkit-text-stroke: 0.16px currentColor;
    text-shadow: 0.012em 0 0 currentColor;
    white-space: nowrap;
  }

  .affiliate-headline {
    margin-top: 3px;
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.15;
    -webkit-text-stroke: 0.16px currentColor;
    text-shadow: 0.012em 0 0 currentColor;
    white-space: nowrap;
  }

  .affiliate-points {
    gap: 5px;
    margin-top: 7px;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1.1;
  }

  .affiliate-points li {
    min-height: 22px;
    padding: 0 7px;
    white-space: nowrap;
  }

  .affiliate-actions a {
    min-height: 40px;
    padding: 0 17px;
    border-radius: 10px;
    box-shadow: 0 9px 20px rgba(17, 24, 39, 0.22);
    font-size: 0.82rem;
    font-weight: 950;
    -webkit-text-stroke: 0.12px currentColor;
    text-shadow: 0.012em 0 0 currentColor;
  }

  @media (max-width: 380px) {
    .summary-items {
      gap: 6px;
    }

    .summary-item::before {
      width: 10px;
      height: 10px;
    }

    .summary-strip span {
      font-size: 0.54rem;
    }

    .summary-strip strong {
      font-size: 0.74rem;
    }

    .summary-pr {
      margin-left: 4px;
      font-size: 0.5rem;
    }

    .affiliate-cta p {
      font-size: 0.78rem;
    }

    .affiliate-headline {
      font-size: 0.86rem;
    }

    .affiliate-points {
      gap: 4px;
      font-size: 0.58rem;
    }

    .affiliate-points li {
      min-height: 20px;
      padding: 0 5px;
    }

    .affiliate-actions a {
      padding: 0 12px;
      font-size: 0.76rem;
    }
  }

  .latest-grid,
  .group-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .filter-bar label {
    gap: 0;
    font-size: 0;
  }

  .filter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .filter-bar select {
    height: 48px;
    min-height: 48px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.15;
  }

  .filter-bar select {
    text-overflow: ellipsis;
  }

  .icon-button {
    min-width: 0;
    width: 100%;
  }

  .match-list {
    gap: 14px;
  }

  .match-day {
    gap: 7px;
  }

  .day-marker strong {
    font-size: 0.9rem;
  }

  .day-marker span {
    font-size: 0.9rem;
  }

  .match-row {
    gap: 4px 6px;
    padding: 7px 8px;
  }

  .match-sheet {
    height: min(82vh, 680px);
    max-height: min(82vh, 680px);
  }

  @supports (height: 100dvh) {
    .match-sheet {
      height: min(78dvh, 680px);
      max-height: min(78dvh, 680px);
    }
  }

  .match-topline {
    gap: 6px;
  }

  .match-group-label {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.66rem;
  }

  .matchup {
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    gap: 4px;
  }

  .team-side {
    gap: 4px;
  }

  .team-name {
    font-size: 0.78rem;
    line-height: 1.18;
  }

  .team-code {
    min-width: 25px;
    min-height: 19px;
    border-radius: 5px;
    font-size: 0.58rem;
  }

  .team-code.is-flag {
    min-width: 29px;
    min-height: 21px;
    font-size: 1rem;
  }

  .match-center strong {
    font-size: 0.76rem;
  }

  .match-details {
    font-size: 0.66rem;
    line-height: 1.15;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .match-stage-name {
    display: none;
  }

  .broadcast-block {
    gap: 5px;
    max-width: 70%;
  }

  .broadcast-label {
    font-size: 0.62rem;
  }

  .broadcast-chip {
    min-height: 20px;
    padding: 0 6px;
    font-size: 0.61rem;
  }

  .status-badge {
    justify-self: end;
    min-width: 44px;
    padding: 4px 7px;
    font-size: 0.62rem;
  }
}
