/* team-captions.css */
/* Full names are the default, including narrow cards and tournament diagrams.
   A saved, explicit preference is the only way to show abbreviations. */
.team-caption{display:block;min-width:0;width:100%;max-width:100%;flex:1 1 0;white-space:normal}
.team-caption-content{display:block;min-width:0;max-width:100%;white-space:normal}
.team-caption-name{display:block;min-width:0;white-space:normal;overflow-wrap:anywhere}
.team-caption-tag{display:none;white-space:nowrap}
.team-caption-tag-text{font-family:Arial,sans-serif;letter-spacing:0}
:root[data-team-names="short"] .team-caption-content.has-tag>.team-caption-name{display:none}
:root[data-team-names="short"] .team-caption-content.has-tag>.team-caption-tag{display:block}
.team-caption-inline{display:inline-block;width:auto;flex:0 1 auto;vertical-align:baseline}
.roster-team-caption.team-caption{white-space:normal}
.draw-team-token>.waiting-team-label{flex:1 1 0;min-width:0}
.graph-draw-crest-label{flex:1 1 100%;width:100%}
.graph-draw-team>.team-caption{min-width:0}
.list-outcomes>.result-tag{display:inline-flex;align-items:center;max-width:100%;gap:.4em}
.list-outcomes>.result-tag>.team-caption{flex:0 1 auto;width:auto}
.list-outcomes>.result-tag>span:last-child{flex:none}
.profile-event-match>a>.team-caption{font:inherit;color:inherit;padding:0}
/* Undo the old one-line clipping without changing scores or team links. */
:root:not([data-team-names="short"]) .fixture-card .match-team-name,
:root:not([data-team-names="short"]) .schedule-page .tournament-graph .graph-match .fixture-card .match-team-name{white-space:normal;overflow:visible;text-overflow:clip}
:root:not([data-team-names="short"]) .schedule-page .tournament-graph .graph-fixture>.graph-match{height:auto;min-height:var(--graph-card-height)}
:root:not([data-team-names="short"]) .schedule-page .tournament-graph .graph-match .fixture-card .match-team{flex-direction:row;flex-wrap:nowrap}
:root:not([data-team-names="short"]) .schedule-page .tournament-graph .graph-match .fixture-card .match-team-name{min-height:0;order:0}
:root:not([data-team-names="short"]) .schedule-page .tournament-graph.swiss-presentation{--graph-column:300px;--graph-outcome:240px;--graph-board-width:calc(5 * var(--graph-column) + var(--graph-outcome) + 5 * var(--graph-gap));--graph-card-height:64px;--graph-unit:36px}
:root:not([data-team-names="short"]) .schedule-page .tournament-graph.playoff-presentation{--graph-column:300px;--playoff-column:300px;--playoff-card-height:var(--graph-card-height)}
:root:not([data-team-names="short"]) .schedule-page .tournament-graph.playoff-presentation .playoff-board{width:var(--graph-board-width)}
:root:not([data-team-names="short"]) .schedule-page .swiss-presentation .outcome-team{height:auto}
.team-name-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;gap:5px;min-width:44px;min-height:44px;padding:6px 9px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text);font-family:inherit;font-size:12px;font-weight:600;line-height:1.2;cursor:pointer;white-space:nowrap}
.team-name-toggle:hover{background:var(--surface-3)}
.team-name-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.team-name-toggle-prefix{color:var(--muted);font-weight:400}
.team-name-controls{display:flex;align-items:center;gap:8px;margin-left:auto}
.team-name-controls>.team-name-toggle{min-height:36px}
@media(min-width:851px) and (max-width:1100px){
 .site-header .header-inner{gap:12px;padding-inline:16px}
 .site-header .header-identity{flex-basis:190px;min-width:0}
 .site-header .main-nav{gap:6px}
 .site-header .main-nav>a{font-size:14px;padding-inline:4px}
 .site-header .header-tools{gap:8px}
 .header-tools>.team-name-toggle .team-name-toggle-prefix{display:none}
}
/* Retain the compact four-letter fallback when viewers choose abbreviations. */
:root[data-team-names="short"] .schedule-page .tournament-graph .graph-match .fixture-card .match-team{flex-direction:row;flex-wrap:nowrap}
@media(min-width:901px){
 :root[data-team-names="short"] .schedule-page .swiss-presentation .swiss-round{container:swiss-column / inline-size}
 :root[data-team-names="short"] .schedule-page .swiss-presentation .graph-match .fixture-card .match-teams:has(.team-caption-content[data-tag-length="4"]){grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);gap:2px}
 :root[data-team-names="short"] .schedule-page .swiss-presentation .graph-match .fixture-card .match-team:has(.team-caption-content[data-tag-length="4"]){gap:1px}
 :root[data-team-names="short"] .schedule-page .swiss-presentation .graph-match .fixture-card .match-team:has(.team-caption-content[data-tag-length="4"]) .team-mark{width:24px;height:24px;flex-basis:24px}
 @container swiss-column (max-width:190px){
  :root[data-team-names="short"] .schedule-page .swiss-presentation .graph-match .fixture-card:has(.team-caption-content[data-tag-length="4"]){padding-inline:1px}
  :root[data-team-names="short"] .schedule-page .swiss-presentation .graph-match .fixture-card .match-team:has(.team-caption-content[data-tag-length="4"]) .team-mark{width:22px;height:22px;flex-basis:22px}
 }
}
@container playoff-stage (max-width:225px){
 :root[data-team-names="short"] .schedule-page .playoff-presentation .graph-match .fixture-card:has(.team-caption-content[data-tag-length="4"]){padding-inline:2px}
 :root[data-team-names="short"] .schedule-page .playoff-presentation .graph-match .fixture-card .match-teams:has(.team-caption-content[data-tag-length="4"]){grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);gap:4px}
 :root[data-team-names="short"] .schedule-page .playoff-presentation .graph-match .fixture-card .match-team:has(.team-caption-content[data-tag-length="4"]){gap:1px}
 :root[data-team-names="short"] .schedule-page .playoff-presentation .graph-match .fixture-card .match-team:has(.team-caption-content[data-tag-length="4"]) .team-mark{width:24px;height:24px;flex-basis:24px}
}
@media(max-width:600px){.header-tools>.team-name-toggle{padding-inline:6px}.header-tools>.team-name-toggle .team-name-toggle-prefix{display:none}.schedule-stagebar{flex-wrap:wrap}.schedule-stagebar>.stage-tabs{width:100%;flex:1 1 100%}.team-name-controls{width:100%;margin-left:0;justify-content:space-between;flex-wrap:wrap}}

/* Override a pre-existing shared bundle while rolling between releases. */
.team-caption{container:none}
:root:not([data-team-names="short"]) .tournament-graph .team-caption-content.has-tag>.team-caption-name{display:block}

/* Per-event presentation only: keep qualification and draw-pool crests. */
:root[data-match-crests="hidden"] .fixture-card .match-team > .team-mark,
:root[data-match-crests="hidden"] .training-card-team > .team-mark,
:root[data-match-crests="hidden"] .graph-pending-team > .graph-pending-mark {display:none !important}

/* The optional combined mode is configured by the event organizer. */
:root[data-team-names="both"] .team-caption-content.has-tag>.team-caption-tag{display:inline}
:root[data-team-names="both"] .team-caption-content.has-tag>.team-caption-name{display:inline}
:root[data-team-names="both"] .team-caption-tag::before{content:"（"}
:root[data-team-names="both"] .team-caption-tag::after{content:"）"}

/* Long alphanumeric abbreviations wrap inside each team column, never into the score. */
:root[data-team-names="short"] .team-caption-tag,
:root[data-team-names="short"] .team-caption-tag-text{white-space:normal;overflow-wrap:anywhere;word-break:break-word}

/* Keep unusually long names within the team column and reserve room for scores. */
.schedule-page .tournament-graph .graph-fixture > .graph-match {height:auto;min-height:var(--graph-card-height)}
.schedule-page .tournament-graph .graph-match > .fixture-card {height:auto;min-height:var(--graph-card-height);padding-bottom:12px}
.schedule-page .tournament-graph .graph-match .team-caption-name,
.schedule-page .tournament-graph .graph-match .team-caption-tag {display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
:root[data-team-names="short"] .schedule-page .tournament-graph .graph-match .team-caption-content.has-tag > .team-caption-name{display:none}
:root[data-team-names="full"] .schedule-page .tournament-graph .graph-match .team-caption-tag{display:none}

:root[data-team-names="short"] .schedule-page .tournament-graph .graph-match .team-caption-content.has-tag > .team-caption-tag{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.schedule-page .tournament-graph .graph-fixture > .graph-match > .fixture-card{height:auto;min-height:var(--graph-card-height);padding-bottom:12px}

.schedule-page .tournament-graph .graph-fixture > .graph-match,
.schedule-page .tournament-graph .graph-fixture > .graph-match > .fixture-card{height:auto!important;min-height:var(--graph-card-height)}
.schedule-page .tournament-graph .graph-fixture > .graph-match > .fixture-card{padding-bottom:12px!important}

:root[data-team-names="full"] .schedule-page .tournament-graph .graph-match .team-caption-content > .team-caption-name{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}

:root[data-team-names="both"] .schedule-page .tournament-graph .graph-match .team-caption-content{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
:root[data-team-names="both"] .schedule-page .tournament-graph .graph-match .team-caption-content > .team-caption-name,
:root[data-team-names="both"] .schedule-page .tournament-graph .graph-match .team-caption-content.has-tag > .team-caption-tag{display:inline;white-space:normal;overflow-wrap:anywhere;word-break:break-word}


/* upgrade-gate.css */
.upgrade-gate-dialog{box-sizing:border-box;width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:0;overflow:auto;border:1px solid color-mix(in srgb,var(--accent,#d1b16f) 48%,var(--line,#655247));border-radius:16px;background:var(--surface,#281d20);color:var(--text,#f3eade);box-shadow:0 24px 90px #0008}
.upgrade-gate-dialog:not([open]){display:none}.upgrade-gate-dialog::backdrop{background:#0b090db8;backdrop-filter:blur(5px)}
.upgrade-gate-content{padding:30px 30px 24px;text-align:center;background:radial-gradient(ellipse at top,color-mix(in srgb,var(--accent,#d1b16f) 9%,transparent),transparent 70%)}
.upgrade-gate-mark{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 16px;border:1px solid color-mix(in srgb,var(--accent,#d1b16f) 52%,var(--line,#655247));border-radius:50%;color:var(--accent,#d1b16f);background:color-mix(in srgb,var(--accent,#d1b16f) 7%,transparent)}
.upgrade-gate-mark svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.upgrade-gate-dialog h2{margin:0 0 14px;font-size:22px;line-height:1.35;font-weight:650;letter-spacing:.02em}.upgrade-gate-dialog p{margin:0;font-size:15px;line-height:1.8;overflow-wrap:anywhere}.upgrade-gate-dialog .upgrade-gate-eta{margin-top:12px;color:var(--accent,#d1b16f);font-size:15px;font-weight:650}.upgrade-gate-dialog .upgrade-gate-note{margin-top:12px;color:var(--muted,#bfb3aa);font-size:13px;line-height:1.7}
.upgrade-gate-dialog footer{display:flex;justify-content:center;padding:0 30px 24px}.upgrade-gate-dialog button{min-width:144px;min-height:44px;padding:10px 22px;border:1px solid color-mix(in srgb,var(--accent,#d1b16f) 55%,var(--line,#655247));border-radius:8px;background:var(--surface-2,#382329);color:var(--text,#f3eade);font:inherit;font-size:15px;font-weight:600;line-height:1.4;cursor:pointer}.upgrade-gate-dialog button:hover{background:color-mix(in srgb,var(--accent,#d1b16f) 12%,var(--surface-2,#382329))}.upgrade-gate-dialog button:focus-visible{outline:2px solid var(--accent,#d1b16f);outline-offset:3px}
@media(max-width:480px){.upgrade-gate-content{padding:26px 22px 22px}.upgrade-gate-dialog footer{padding:0 22px 22px}.upgrade-gate-dialog h2{font-size:20px}.upgrade-gate-dialog button{width:100%}}
@media(prefers-reduced-transparency:reduce){.upgrade-gate-dialog::backdrop{backdrop-filter:none;background:#100b10e8}}
@media(forced-colors:active){.upgrade-gate-dialog,.upgrade-gate-mark,.upgrade-gate-dialog button{border-color:CanvasText}.upgrade-gate-dialog::backdrop{background:Canvas;backdrop-filter:none}}


/* vote-feedback.css */
.vote-feedback-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:100000;display:flex;align-items:center;gap:12px;width:max-content;max-width:calc(100vw - 32px);margin:0;padding:13px 14px;border:1px solid var(--gold,#c8aa6e);border-radius:12px;background:var(--surface,#241f20);color:var(--text,#f1e8e7);box-shadow:0 12px 40px #0006;font-family:inherit;font-weight:500;font-size:15px;line-height:1.5;text-align:left;box-sizing:border-box}
.vote-feedback-toast-mark{flex:none;display:grid;place-items:center;width:24px;height:24px;border:1px solid currentColor;border-radius:50%;color:var(--gold,#c8aa6e);font-weight:800}
.vote-feedback-toast-message{min-width:0;overflow-wrap:anywhere}
.vote-feedback-toast-close{flex:none;display:grid;place-items:center;min-width:32px;min-height:32px;margin:-4px -4px -4px 0;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;font-size:23px;line-height:1;cursor:pointer}
.vote-feedback-toast-close:hover{background:color-mix(in srgb,currentColor 10%,transparent)}
.vote-feedback-toast-close:focus-visible{outline:2px solid var(--gold,#c8aa6e);outline-offset:2px}
@media(max-width:600px){.vote-feedback-toast{bottom:16px;gap:9px;padding:10px 12px;font-size:14px}.vote-feedback-toast-close{min-width:40px;min-height:40px}}

