:root {
  color-scheme: dark;
  --ink: #f6f2ff;
  --muted: #bbb0ce;
  --paper: #0c0715;
  --surface: #1a102d;
  --line: #50366e;
  --accent: #d897ff;
  --accent-dark: #edcaff;
  --good: #80e5c2;
  --bad: #ffa0ab;
  --pending: #e6cd8c;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--accent-dark); }
button, input, textarea, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: absolute; top: -80px; z-index: 10; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 8px; left: 8px; }
.site-header { border-bottom: 1px solid var(--line); background: #0c0812; }
.header-inner, main { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 1.25rem; font-weight: 800; text-decoration: none; letter-spacing: .06em; }
.brand::before { content: ""; width: 14px; height: 24px; border: 3px solid var(--accent); transform: skew(-18deg); }
nav { display: flex; gap: 28px; }
.site-header nav a { color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
main { padding: 40px 0 80px; }
h1, h2, h3 { line-height: 1.35; overflow-wrap: anywhere; }
h1 { margin: 0 0 24px; font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.025em; }
h2 { margin: 0 0 20px; font-size: 1.25rem; }
h3 { margin: 0; }
p { overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: .9rem; }
.page-heading, .section-heading, .match-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1, .section-heading h2 { margin: 0; }
.page-heading > div { min-width: 0; flex: 1 1 260px; }
.page-heading p { color: var(--muted); margin: 12px 0 0; }
.event-heading { align-items: flex-start; align-content: flex-start; padding: 36px; border: 1px solid #69418b; background: #27103e; }
.section-heading { margin-bottom: 20px; }
.section-nav { border-bottom: 1px solid var(--line); margin-bottom: 32px; gap: 32px; }
.section-nav a { padding: 4px 0 16px; color: var(--ink); font-weight: 700; text-decoration: none; border: 1px solid transparent; }
.section-nav a:hover, .section-nav a:focus-visible { border-color: var(--accent); color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.match-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.card { border: 1px solid var(--line); border-radius: 0; padding: 28px; background: var(--surface); }
.card + .card, .section { margin-top: 32px; }
.grid > .card + .card { margin-top: 0; }
.day-card { display: flex; flex-direction: column; gap: 16px; color: inherit; text-decoration: none; }
.day-card h2, .day-card h3, .day-card p { margin: 0; }
.day-card:hover, .match-card:hover { border-color: var(--accent); color: var(--ink); background-color: #2b1745; }
.series-card { position: relative; min-height: 240px; padding: 36px; justify-content: flex-start; border-color: var(--line); background: #27103e; }
.series-card h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); padding-right: 0; }
.series-card > p { color: var(--muted); }
.match-card { display: flex; flex-direction: column; padding: 0; text-decoration: none; color: var(--ink); overflow: hidden; }
.match-card-top, .match-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; color: var(--muted); font-size: .8rem; }
.match-card-bottom { border-top: 1px solid var(--line); margin-top: auto; background: #10091caa; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.open { color: var(--good); }
.status.closed { color: var(--muted); }
.versus { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); align-items: center; gap: 12px; padding: 24px 20px 32px; font-size: 1.1rem; }
.team { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.team-mark { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 64px; height: 70px; border: 1px solid #b95ee7; background: #27103e; color: #f0caff; font-size: 1.4rem; font-weight: 800; letter-spacing: .02em; border-radius: 8px 8px 22px 22px; }
.team:last-child .team-mark { border-color: #b3764d; color: #ffcf9c; background: #27103e; }
.versus-label { color: var(--muted); font-size: .8rem; font-weight: 500; text-align: center; }
.match-caption { text-align: center; color: var(--muted); font-size: .85rem; margin: 0 20px 20px; }
.match-meta { justify-content: flex-start; color: var(--muted); font-size: .85rem; }
.match-heading { padding: 28px 0; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.match-heading h1 { margin-bottom: 16px; }
.match-heading .versus-label { padding: 0 10px; font-size: 1.1rem; }
.match-heading p { margin-bottom: 0; }
form.card { max-width: 760px; }
form.vote-form { max-width: none; padding: 32px; }
.vote-form > .field { max-width: 440px; }
.match { padding: 0; margin: 24px 0; min-width: 0; border: 0; }
.match legend { font-weight: 700; padding: 0 0 16px; }
.choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 20px; min-height: 224px; align-items: center; justify-content: center; padding: 28px 20px; cursor: pointer; text-align: center; background: #130a22; border: 1px solid #68497f; border-radius: 0; font-size: 1.2rem; font-weight: 700; overflow-wrap: anywhere; }
.choice:hover { border-color: var(--accent); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.choice:has(input:checked) { border-color: var(--accent); background: #431263; }
.field { margin-bottom: 20px; }
.field label { display: grid; gap: 8px; font-size: .9rem; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; border: 1px solid #75588b; border-radius: 0; padding: 12px; color: var(--ink); background: #0e0819; }
.button-row, .admin-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button, button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 1px solid transparent; border-radius: 0; padding: 11px 22px; color: #200b30; background: var(--accent); font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: var(--accent-dark); color: #200b30; }
.button.secondary, button.secondary { color: var(--ink); background: #2b1b3d; border-color: #725288; }
.button.danger, button.danger { background: #3b2029; color: #ffb3be; border-color: #80505c; }
.vote-form > button { min-width: 200px; margin-top: 8px; }
.notice, .error { padding: 14px 18px; border: 1px solid; border-radius: 0; margin: 20px 0; }
.notice { color: #a5ecd4; background: #122d28; border-color: #2d6556; }
.error { color: #ffc0c7; background: #351d25; border-color: #80434f; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .9rem; }
th, td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); background: #421371; white-space: nowrap; font-size: .8rem; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #2b1745; }
.ranking td:first-child { color: var(--accent); font-weight: 800; }
.ranking td:nth-child(3) { font-weight: 800; font-size: 1.1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0; }
summary { cursor: pointer; }
details[open] > summary { margin-bottom: 20px; }
.correct { color: var(--good); font-weight: 700; }
.incorrect { color: var(--bad); font-weight: 700; }
.pending { color: var(--pending); }
.inline-form { display: inline; }
@media (max-width: 620px) {
  .header-inner, main { width: calc(100% - 32px); }
  .header-inner { min-height: 72px; gap: 12px; flex-wrap: wrap; padding: 16px 0; }
  .brand { font-size: 1.05rem; }
  nav { gap: 16px; }
  .site-header nav a { font-size: .8rem; }
  main { padding-top: 24px; }
  .event-heading { padding: 24px; }
  .card, form.vote-form { padding: 20px; }
  .match-card { padding: 0; }
  .series-card { min-height: 200px; padding: 28px; }
  .choices { gap: 12px; }
  .choice { min-height: 210px; padding: 20px 12px; font-size: 1rem; }
  .team-mark { width: 56px; height: 62px; font-size: 1.2rem; }
  .vote-form > button { width: 100%; }
  th, td { padding: 12px; }
  .section { margin-top: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button, .choice { transition: border-color .15s, background-color .15s, color .15s; }
}

.distinct-confirm:not([hidden]) { display: block; margin: 16px 0; color: var(--muted); }
.reset-code { display: block; overflow-wrap: anywhere; user-select: all; font-size: 1.1rem; }
[data-candidates]:not(:empty) { padding: 12px 16px; border: 1px solid var(--line); margin-bottom: 20px; }
[data-candidates] p { margin: 0; }
.site-search { display: flex; gap: 10px; margin-bottom: 28px; }
.site-search input { flex: 1; min-width: 0; padding: 10px 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 0; font: inherit; }

/* Shared heading panels, action groups and contained navigation. */
.heading-actions, .parent-links, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.page-heading > .heading-actions { flex: 0 1 auto; justify-content: flex-end; }
.parent-links { margin-top: 16px; }
.parent-links .button, .meta-chip { min-height: 40px; padding: 8px 14px; font-size: .85rem; }
.meta-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--muted); }
.match-heading.event-heading { padding: 36px; border-bottom: 1px solid #69418b; }
.match-heading.event-heading h1 { margin: 0; }
.section-title, main > h1 { padding: 20px 24px; border: 1px solid #69418b; background: #27103e; border-radius: 0; }
.section-nav { padding: 14px; gap: 12px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); flex-wrap: wrap; }
.section-nav a.button { padding: 10px 20px; border: 1px solid #725288; }
main a:not(.card):not(.button):not(.card a):not(.table-wrap a) { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid #725288; border-radius: 0; color: var(--ink); background: #2b1b3d; font-weight: 700; text-decoration: none; }
main a:not(.card):not(.button):not(.card a):not(.table-wrap a):hover { border-color: var(--accent); background: #422058; }
main > p, .section > p { padding: 18px 24px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); }
.site-header nav { gap: 8px; flex-wrap: wrap; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); }
.site-header nav a:hover { border-color: var(--accent); }
.empty-state { margin: 0; }
.pagination { margin-top: 24px; justify-content: center; }
@media (max-width: 620px) {
 .page-heading > .heading-actions { flex: 1 1 100%; justify-content: flex-start; }
 .heading-actions .button { flex: 1 1 auto; }
 .match-heading.event-heading { padding: 24px; }
 .section-title, main > h1 { padding: 18px 20px; }
 .site-header nav a { padding: 8px 10px; }
}


.series-grid { row-gap: 16px; }
.series-grid > .series-card { display: grid; grid-template-rows: subgrid; grid-template-columns: minmax(0,1fr); justify-content: stretch; grid-row: span 3; align-content: start; min-height: 0; padding: 24px; gap: 16px; }
.series-card h2, .series-card .card-description { margin: 0; }
.card-description:empty { display: block; }
.card-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0; }
.card-metrics > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 12px 8px; border: 1px solid #684580; border-radius: 0; background: #120a24; }
.card-metrics dt { color: var(--muted); font-size: .75rem; }
.card-metrics dd { margin: 0; font-size: 1.3rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.match-grid > .match-card { display: flex; flex-direction: column; min-width: 0; }
.versus { align-items: start; }
.versus > .versus-label { padding-top: 24px; }
.match-caption { align-self: start; }
.match-card-bottom { margin-top: auto; align-self: stretch; flex-shrink: 0; }
.match-card.is-open { border: 1px solid var(--line); background: #1b102e; }
.match-card.is-closed { border: 1px solid var(--line); background: #171020; }
.status { padding: 5px 9px; border: 1px solid; border-radius: 0; }
.status.open { color: #a5f3ce; background: #174737; border-color: #377b60; }
.status.closed { color: #d2d9e4; background: #2c3440; border-color: #566276; }
.status.closed::before { border-radius: 1px; }
@media (max-width:620px) {
 .series-grid > .series-card { padding: 20px; }
 .card-metrics { gap: 6px; }
 .card-metrics > div { padding: 10px 6px; }
}

.match-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.match-result { overflow-wrap: anywhere; }

.match-card.is-resolved { border: 1px solid var(--line); background: #24182e; }
.status.resolved { color: #ffe6a4; background: #554318; border-color: #b79947; }
.is-resolved .match-result { color: #ffe6a4; font-weight: 700; }

/* Values have stable, bounded areas regardless of digit count. */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(140px,100%),1fr)); gap: 12px; margin: 0 0 24px; }
.stat-tile { min-width: 0; border: 1px solid #684580; border-radius: 0; background: #120a24; padding: 12px; }
.stat-tile dt { min-height: 2.8em; color: var(--muted); font-size: .8rem; }
.stat-tile dd { margin: 0; height: 3em; line-height: 2; white-space: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-metrics { width: 100%; min-width: 0; align-self: end; }
.card-metrics > div { min-width: 0; height: 102px; justify-content: center; }
.card-metrics dd { width: 100%; height: 50px; line-height: 30px; text-align: center; white-space: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; overflow-wrap: normal; }
.card-metrics dt { white-space: nowrap; }
.count-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 0; background: #120a24; font-size: .8rem; }
.count-badge strong { display: inline-block; width: 8ch; max-width: 8ch; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.match-card > * { flex-shrink: 0; min-width: 0; }
.match-card-top { flex-wrap: wrap; }
.match-card .match-result { margin: 0 20px 20px; padding: 12px; border: 1px solid #b79947; border-radius: 0; line-height: 1.6; }
.dashboard-section > h2 { margin-bottom: 20px; }
.dashboard-section .section-heading { min-height: 46px; }
/* Notifications never occupy space in the document layout. */
.toast-stack { position: fixed; z-index: 1000; top: 16px; right: 16px; width: min(420px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; display: grid; gap: 12px; pointer-events: none; }
.toast { display: flex; align-items: start; gap: 12px; padding: 14px 16px; border: 1px solid; border-radius: 0; box-shadow: 0 8px 28px #0008; pointer-events: auto; overflow-wrap: anywhere; }
.toast > span { min-width: 0; flex: 1; }
.toast-success { color: #a5ecd4; background: #122d28; border-color: #2d6556; }
.toast-error { color: #ffc0c7; background: #351d25; border-color: #80434f; }
.toast .toast-close { flex: 0 0 32px; min-height: 32px; padding: 0; color: inherit; background: transparent; border-color: currentColor; }
@media (max-width:620px) { .card-metrics > div { height: 96px; } }

/* Reserve two text lines so participant names never move the following content. */
.match-card .team { min-width: 0; }
.match-card .participant-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  width: 100%;
  height: 3em;
  line-height: 1.5;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.deadline-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #120a24;
  font-variant-numeric: tabular-nums;
}
.deadline-chip time { min-width: 0; overflow-wrap: anywhere; }
.stats-group { min-width: 0; }
.stats-group + .stats-group { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.stats-group > h3 { margin: 0 0 20px; }
.stats-group > .stats-grid { margin-bottom: 0; }

.match-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.match-filters [aria-current="page"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.my-vote { align-self: flex-start; margin: 0 20px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 0; font-size: .8rem; }
.my-vote.voted { color: var(--good); }
.my-vote.unvoted { color: var(--muted); }
.match-card.is-invalid { border: 1px solid var(--line); }
.status.invalid { color: var(--muted); }

.ranking-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ranking-bars li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 16px; align-items: center; }
.ranking-bars li > a { overflow-wrap: anywhere; }
.ranking-bar-track { height: 20px; border-left: 1px solid var(--muted); background: #120a24; }
.ranking-bar-track > span { display: block; height: 100%; background: var(--accent); }
@media(max-width:620px) {
 .ranking-bars li { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
 .ranking-bars li > a { grid-column: 1 / -1; }
}

.site-footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.site-footer p { margin: 0; text-align: center; }

.site-header nav .account-menu { gap: 10px; max-width: 100%; min-width: 0; flex-wrap: wrap; }
.account-name { display: inline-block; max-width: 16rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: var(--paper); overflow-wrap: anywhere; }
.vote-help { margin: 12px 0 0; }

.site-header nav a.admin-session { border-color: var(--accent); color: var(--accent); background: #4a176c; }

/* SF6-inspired visual language: ink, violet light, hard-edged panels. */
body {
  background: var(--paper);
  min-height: 100vh;
}
.site-header { background: #27103e; border-bottom: 1px solid var(--line); }
.brand { font-weight: 900; letter-spacing: -.035em; white-space: nowrap; }
.brand::before { width: 20px; height: 28px; border: 3px solid #f6f2ff; transform: skewX(-12deg); box-shadow: 0 0 9px #b54ded, inset 0 0 5px #b54ded; }
.site-header nav a { background: transparent; border-color: var(--line); color: var(--ink); }
.site-header nav a:hover { background: #ffffff12; border-color: #b675df; }
h1 { font-weight: 900; letter-spacing: -.045em; }
h2, h3 { font-weight: 800; }
.event-heading, .match-heading.event-heading {
  border: 1px solid #805099;
  background: #27103e;
  box-shadow: 0 0 12px #b137db26;
}
.section-title, main > h1 { background: #27103e; border-color: #805099; }
.card { box-shadow: 0 6px 20px #0002; }
.series-card { background: #27103e; border-color: var(--line); }
.series-grid > .series-card { display: flex; flex-direction: column; grid-row: auto; }
.series-card .card-metrics { margin-top: auto; }
.card:hover:is(a) { box-shadow: inset 0 0 0 1px #c77aef, 0 0 16px #ad4fdb55; }
.team-mark, .team:last-child .team-mark { position: relative; isolation: isolate; border: 0; border-radius: 0; background: transparent; transform: none; box-shadow: none; }
.team-mark::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: skewX(-12deg); background: #321347; border: 1px solid #b95ee7; box-shadow: 0 0 9px #b95ee733, inset 0 0 8px #b95ee722; }
.team:last-child .team-mark::before { background: #38201b; border-color: #d28d57; box-shadow: 0 0 9px #d28d5733, inset 0 0 8px #d28d5722; }
.versus-label { color: #dfb0fa; font-weight: 900; font-style: italic; letter-spacing: -.06em; }
.button, button { color: #21102e; background: #f5effa; border-color: #f5effa; box-shadow: 0 0 10px #d897ff30; }
.button:hover, button:hover { color: #180b26; background: #e5b4ff; border-color: #e5b4ff; }
.button.secondary, button.secondary { box-shadow: none; }
.button.secondary:hover, button.secondary:hover { background: #482061; border-color: #d897ff; color: #fff; }
.button.danger, button.danger { box-shadow: none; }
.match-filters { gap: 0; }
.match-filters .button { flex: 1 1 120px; box-shadow: none; border-color: #704187; }
.match-filters [aria-current="page"] { background: #70219d; color: #fff; outline: none; border-color: #e5b4ff; box-shadow: inset 0 0 12px #da89ff55, 0 0 12px #b137db66; }
.choice:has(input:checked) { box-shadow: inset 0 0 24px #a42dea33; }
th { color: #f1e5ff; background: #27103e; font-weight: 700; }
td, th { border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
td:last-child, th:last-child { border-right: 0; }
tbody tr:nth-child(even) { background: #25103c; }
tbody tr:hover { background: #381952; }
.ranking-bar-track > span { background: #27103e; }
.field input:focus, .field textarea:focus, .field select:focus, .site-search input:focus { border-color: #dfafff; }
.site-footer { border-top-color: #684580; }
@media(max-width:620px) {
  .header-inner { gap: 18px; }
  .site-header nav { width: 100%; gap: 6px; }
  .site-header nav a { justify-content: center; padding: 8px; flex: 1 1 auto; border: 1px solid #50366e; }
  .event-heading { gap: 24px; }
  .event-heading > .button { width: 100%; }
  .match-filters .button { flex-basis: 50%; }
}

.button:hover, button:hover, .field input:focus, .field textarea:focus, .field select:focus, .site-search input:focus { box-shadow: 0 0 12px #d897ff55; }
.ranking-bar-track > span { background: #b85ce5; box-shadow: 0 0 8px #b85ce555; }

.bulk-match { min-width: 0; margin: 24px 0; }
.bulk-match .choice { min-height: 120px; padding: 20px; overflow-wrap: anywhere; min-width: 0; }
.bulk-match .choice:has(input:disabled) { cursor: default; opacity: .7; }
.bulk-reset { margin-left: auto; min-height: 32px; padding: 6px 12px; font-size: inherit; }
.bulk-match > .match-meta { margin: 0 0 16px; }
.bulk-reset[hidden] { display: inline-flex; visibility: hidden; }
.bulk-save { position: sticky; bottom: 12px; z-index: 5; }
.bulk-save button { width: 100%; }
@media(max-width: 600px) { .bulk-match .choice { padding: 12px; } }

form.display-name-form { max-width: none; width: 100%; }
.account-heading > .heading-actions { justify-content: flex-end; }

th.points-number, td.points-number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.has-inline-votes { padding-bottom: 150px; }
.inline-vote-bar { position: fixed; z-index: 20; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); padding: 16px; border: 1px solid var(--line); background: #27103e; box-shadow: 0 0 20px #0008; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.inline-vote-bar .count-badge { width: 140px; flex-shrink: 0; }
.inline-vote-bar .count-badge > span { white-space: nowrap; flex-shrink: 0; }
.inline-vote-bar .count-badge strong { flex: 1; min-width: 0; }
.inline-vote-bar .count-badge strong { overflow: auto; font-variant-numeric: tabular-nums; }
.inline-vote-bar button { flex: 1; }
.inline-choices { border: 0; padding: 20px; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; min-width: 0; }
.inline-choices .choice { padding: 16px 8px; min-width: 0; min-height: 140px; overflow-wrap: anywhere; }
.inline-choices .choice:has(input:disabled) { cursor: default; }
.card-edition { margin: 0 20px 12px; overflow-wrap: anywhere; }
.inline-reset { margin: 0 20px 16px; align-self: flex-start; }
.match-card.has-selection { border-color: #dfafff; box-shadow: 0 0 12px #d897ff55; }
.match-card-bottom > a { flex-shrink: 0; }
button:disabled { opacity: .5; cursor: default; }
@media(max-width: 600px) { .inline-vote-bar { gap: 8px; padding: 12px; bottom: 8px; } .inline-vote-bar button { min-width: 0; padding: 12px 8px; } }

.choice-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.5; height: 3em; min-height: 3em; width: 100%; overflow: hidden; overflow-wrap: anywhere; }

.ranking-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; width: 100%; max-width: none; margin-bottom: 32px; }
.ranking-selector { min-width: 0; }
.ranking-selector h2 { font-size: 1rem; margin: 0 0 12px; }
.ranking-options { display: block; box-sizing: content-box; height: 240px; overflow-y: auto; border: 1px solid var(--line); }
main .ranking-options a { text-decoration: none; display: block !important; height: 48px; min-height: 48px; padding: 12px !important; box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent !important; background: transparent !important; }
main .ranking-options a:nth-child(even) { background: #ffffff06 !important; }
main .ranking-options a[aria-current="true"] { background: #431263 !important; border-color: var(--accent) !important; }
main .ranking-options a:hover { background: #422058 !important; }
@media(max-width: 700px) { .ranking-filters { grid-template-columns: minmax(0,1fr); } }

#matches .section-title a.edition-date-link { display: inline; min-height: 0; padding: 0; border: 0; color: var(--ink); background: transparent; text-decoration: underline; text-underline-offset: .2em; }
#matches .section-title a.edition-date-link:hover { color: var(--ink); background: transparent; }
