.cup-season, .cup-help, .cup-round__header p { color: var(--fp-muted); font-size: .875rem; }
.cup-draw { margin-bottom: 2rem; }
.cup-toolbar, .cup-team-finder { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.cup-toolbar { justify-content: space-between; margin-bottom: 1rem; }
.cup-toolbar[hidden], .cup-help[hidden] { display: none; }
.cup-fullscreen { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; border: 1px solid var(--fp-line); border-radius: 8px; padding: .5rem .75rem; background: var(--fp-panel); color: var(--fp-ink); font-size: .875rem; cursor: pointer; }
.cup-fullscreen[hidden] { display: none; }
.cup-fullscreen:hover { background: var(--fp-raised); }
.cup-view-switch { display: flex; border: 1px solid var(--fp-line); border-radius: 8px; padding: .25rem; background: var(--fp-panel); }
.cup-view-switch button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; border-radius: 6px; padding: .5rem .75rem; color: var(--fp-muted); font-size: .875rem; cursor: pointer; }
.cup-view-switch button[aria-pressed="true"] { background: var(--fp-brand-deep); color: #fff; }
.cup-view-switch button:hover:not([aria-pressed="true"]) { background: var(--fp-raised); color: var(--fp-ink); }
.cup-view-switch .material-symbols-outlined { font-size: 20px; }
.cup-team-finder { color: var(--fp-muted); font-size: .875rem; }
.cup-team-finder select { width: 15rem; max-width: 100%; min-height: 44px; border: 1px solid var(--fp-line); border-radius: 8px; padding: .5rem 2rem .5rem .75rem; background: var(--fp-panel); color: var(--fp-ink); font: inherit; cursor: pointer; }
.cup-round-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; border-bottom: 1px solid var(--fp-line); margin-bottom: .75rem; }
.cup-round-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 0; color: var(--fp-muted); font-size: .875rem; text-decoration: none; }
.cup-round-nav a[aria-current] { box-shadow: inset 0 -2px var(--fp-ink); color: var(--fp-ink); font-weight: 700; }
.cup-round-nav a:hover { color: var(--fp-ink); text-decoration: underline; }
.cup-help { margin-bottom: 1rem; line-height: 1.6; }
.cup-viewport { min-width: 0; scroll-padding: 5rem 1rem; }
.cup-rounds { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 2rem; isolation: isolate; }
.cup-round { min-width: 0; scroll-margin-top: 1rem; }
.cup-round__header { position: relative; z-index: 2; min-height: 64px; padding: .5rem 0 .75rem; background: var(--fp-surface); }
.cup-round__header h2 { font-size: 1.125rem; font-weight: 750; }
.cup-round__header p { margin-top: .25rem; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.cup-round__matches { display: grid; align-content: start; gap: 1rem; }
.cup-tie { position: relative; z-index: 1; border: 1px solid var(--fp-line); border-radius: var(--fp-radius); background: var(--fp-panel); color: var(--fp-ink); scroll-margin: 5rem 1rem; }
.cup-tie__heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .75rem .25rem; color: var(--fp-muted); font-size: .75rem; }
.cup-tie__heading h3 { font-size: inherit; font-weight: 600; font-variant-numeric: tabular-nums; }
.cup-tie__heading > span { text-align: right; }
.cup-tie__teams { padding: .25rem .75rem; }
.cup-team { display: flex; align-items: center; gap: .5rem; min-height: 32px; font-size: .875rem; line-height: 1.4; }
.cup-team img { flex: none; width: 24px; height: 24px; object-fit: contain; }
.cup-team__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
a.cup-team__name { display: flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.cup-team--winner { font-weight: 750; }
.cup-team--unknown { color: var(--fp-muted); }
.cup-tie--bye .cup-team--unknown { display: none; }
.cup-team__winner { flex: none; font-size: 16px; }
.cup-team__score { min-width: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; }
.cup-tie__details { display: flex; flex-direction: column; padding: .25rem .75rem .5rem; color: var(--fp-muted); font-size: .75rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.cup-tie__details a { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-height: 28px; text-decoration: underline; text-underline-offset: 3px; }
.cup-tie__details a:hover { color: var(--fp-ink); }
.cup-tie__aggregate { margin-bottom: .25rem; }
.cup-tie__next { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; border-top: 1px solid var(--fp-line); border-radius: 0 0 var(--fp-radius) var(--fp-radius); padding: .5rem .75rem; font-size: .75rem; text-decoration: none; }
.cup-tie__next:hover { background: var(--fp-raised); text-decoration: underline; }
.cup-tie__next .material-symbols-outlined { font-size: 18px; }
.cup-connections { display: none; }
.cup-fit-help, .cup-fit-bye, .cup-tie__inspect { display: none; }
.cup-champion { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; font-size: 1.125rem; }
.cup-champion .material-symbols-outlined { color: var(--fp-brand); }
html.dark .cup-champion .material-symbols-outlined { color: var(--fp-accent); }
.cup-empty { max-width: 65ch; padding-block: 1rem; color: var(--fp-muted); }
.cup-draw.is-bracket .cup-viewport { max-height: 72vh; max-height: 72dvh; overflow: auto; overscroll-behavior: contain; border-block: 1px solid var(--fp-line); scrollbar-color: var(--fp-muted) var(--fp-surface); }
.cup-draw.is-bracket .cup-rounds { display: flex; gap: 2rem; width: max-content; min-width: 100%; padding: 0 1rem 1rem; }
.cup-draw.is-bracket .cup-round { flex: none; width: 13rem; }
.cup-draw.is-bracket .cup-round__header { position: sticky; top: 0; }
.cup-draw.is-bracket .cup-round__matches { display: block; position: relative; }
.cup-draw.is-bracket .cup-tie { position: absolute; width: 100%; }
.cup-draw.is-bracket .cup-connections { display: block; position: absolute; inset: 0; z-index: 0; overflow: visible; pointer-events: none; }
.cup-connections path { fill: none; stroke: var(--fp-muted); stroke-opacity: .8; stroke-width: 1.5; }
.cup-connections path.is-highlighted { stroke: var(--fp-brand); stroke-opacity: 1; stroke-width: 3; }
html.dark .cup-connections path.is-highlighted { stroke: #93c5fd; }
.cup-draw.has-selection .cup-tie.is-highlighted { border-color: var(--fp-brand); background: var(--fp-raised); }
html.dark .cup-draw.has-selection .cup-tie.is-highlighted { border-color: #93c5fd; }
.cup-draw.is-rounds .cup-rounds { display: block; max-width: 48rem; }
.cup-draw.is-rounds .cup-round:not(.is-current) { display: none; }
.cup-draw.is-rounds .cup-round__matches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cup-draw.is-rounds .cup-help__scroll { display: none; }
.cup-draw :is(button, select, a, .cup-viewport, .cup-tie, h2):focus-visible { outline: 2px solid var(--fp-brand); outline-offset: 3px; }
html.dark .cup-draw :is(button, select, a, .cup-viewport, .cup-tie, h2):focus-visible { outline-color: #93c5fd; }
.cup-draw ::selection { background: var(--fp-brand-deep); color: #fff; }
.cup-draw.is-fit { scroll-margin-top: 1rem; }
.cup-draw.is-fit :is(.cup-round-nav, [data-cup-help], .cup-tie__heading, .cup-tie__details, .cup-tie__next) { display: none; }
.cup-draw.is-fit .cup-fit-help { display: block; margin-bottom: .75rem; color: var(--fp-muted); font-size: .875rem; }
.cup-draw.is-fit .cup-viewport { position: relative; max-height: none; overflow: hidden; scroll-padding: 0; }
.cup-draw.is-fit .cup-rounds { position: absolute; inset: 0 auto auto 0; min-width: 0; gap: 1.5rem; transform-origin: top left; }
.cup-draw.is-fit .cup-round { width: 12rem; }
.cup-draw.is-fit .cup-round__header { position: static; min-height: 36px; padding: .5rem 0; }
.cup-draw.is-fit .cup-round__header h2 { font-size: .875rem; }
.cup-draw.is-fit .cup-round__header p { display: none; }
.cup-draw.is-fit .cup-tie__teams { padding: .125rem .5rem; }
.cup-draw.is-fit .cup-team { min-height: 20px; gap: .25rem; font-size: .8125rem; line-height: 1.3; }
.cup-draw.is-fit .cup-team img { width: 16px; height: 16px; }
.cup-draw.is-fit a.cup-team__name { min-height: 20px; text-decoration: none; }
.cup-draw.is-fit .cup-team__winner { font-size: 12px; }
.cup-draw.is-fit .cup-fit-bye { display: inline; flex: none; color: var(--fp-muted); font-size: .625rem; }
.cup-draw.is-fit .cup-tie__inspect { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: inherit; background: transparent; cursor: zoom-in; }
.cup-draw.is-fit .cup-tie__inspect:hover { background: rgb(128 145 177 / .12); }
.cup-draw:fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0; padding: 1rem; overflow: auto; background: var(--fp-surface); color: var(--fp-ink); }
.cup-draw:fullscreen .cup-viewport { flex: 1; min-height: 0; max-height: none; }
.cup-draw.is-fit:fullscreen .cup-viewport { flex: none; }
@media (max-width: 599px) {
    .cup-toolbar { align-items: stretch; gap: 1rem; }
    .cup-team-finder { width: 100%; justify-content: space-between; }
    .cup-team-finder select { flex: 1; max-width: 17rem; }
    .cup-draw.is-rounds .cup-round__matches { grid-template-columns: minmax(0, 1fr); }
    .cup-draw.is-bracket:not(.is-fit) .cup-round { width: 15rem; }
    .cup-round-nav { gap: 0 1rem; }
    .cup-view-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .cup-view-switch button { min-width: 0; padding-inline: .5rem; }
    .cup-view-switch .material-symbols-outlined { display: none; }
}
