:root {
  color-scheme: dark;
  --ink: #edf5ff;
  --muted: #9cacc2;
  --canvas: #060c16;
  --canvas-deep: #030812;
  --surface: #0d192a;
  --surface-raised: #122239;
  --surface-soft: #101d30;
  --surface-hover: #172b46;
  --line: #253b59;
  --line-strong: #386080;
  --cyan: #25c7ff;
  --cyan-soft: #25c7ff24;
  --lime: #b8ff2c;
  --lime-strong: #a1ea19;
  --gold: #f5c451;
  --danger: #ff6577;
  --danger-soft: #ff65771f;
  --shadow: #00000059;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% -12%, #15577940, transparent 27rem),
    radial-gradient(circle at -5% 30%, #10385238, transparent 29rem),
    linear-gradient(150deg, var(--canvas-deep), var(--canvas) 44%, #081321);
}

button, input, select, textarea { font: inherit; }
button, select, input { -webkit-tap-highlight-color: transparent; }
button { transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
button:not(:disabled):active { transform: translateY(1px); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: .65rem .8rem;
  color: #06111d;
  background: var(--lime);
  border-radius: .55rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.25rem;
  padding: .8rem clamp(1rem, 4vw, 4rem);
  color: white;
  background: #07111ee8;
  border-bottom: 1px solid #254461;
  box-shadow: 0 10px 30px #02071142;
  backdrop-filter: blur(18px);
}

.brand-wrap { display: flex; align-items: center; gap: .75rem; }
.brand-logo {
  display: block;
  width: 3.65rem;
  height: 3.65rem;
  padding: .16rem;
  border: 1px solid #55718a;
  border-radius: .5rem;
  background: #f8fafc;
  object-fit: contain;
  filter: drop-shadow(0 2px 7px #00000080);
}

h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.1rem, 3vw, 1.45rem); letter-spacing: -.025em; }
h2, h3 { letter-spacing: -.025em; }
.eyebrow {
  margin-bottom: .3rem;
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.site-header .eyebrow { color: #9eb6cd; }

.page-layout { width: min(1240px, calc(100% - 2rem)); margin: 1.35rem auto 4rem; }
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.55rem, 4vw, 3.15rem);
  border: 1px solid #2b5372;
  border-radius: 1.1rem;
  color: white;
  background: linear-gradient(115deg, #0d3150 0%, #0a1c33 57%, #11142e 100%);
  box-shadow: 0 20px 44px var(--shadow), inset 0 1px #ffffff14;
}
.hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .55;
  background-image: linear-gradient(#75c7ed12 1px, transparent 1px), linear-gradient(90deg, #75c7ed12 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, black, transparent 74%);
}
.hero > * { position: relative; }
.hero h2 { margin-bottom: .6rem; font-size: clamp(2rem, 7vw, 3.65rem); line-height: 1; }
.hero > p:not(.eyebrow) { max-width: 58ch; margin-bottom: 1rem; color: #d7e8f9; line-height: 1.55; }
.hero .eyebrow { color: var(--lime); }
.sync-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: .4rem .72rem;
  border: 1px solid #65ae5c73;
  border-radius: 99px;
  color: #eaffde;
  background: #a5ef2830;
  font-size: .83rem;
}
.sync-status::before { width: .45rem; height: .45rem; border-radius: 50%; content: ""; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.install-hint {
  max-width: 60ch;
  margin: .85rem 0 0;
  padding: .55rem .7rem;
  border: 1px solid #3a7092;
  border-radius: .55rem;
  color: #d7efff;
  background: #071727a8;
  font-size: .84rem;
  line-height: 1.45;
}

.section-nav {
  display: flex;
  gap: .35rem;
  margin: 1rem 0;
  padding: .35rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: #081321c9;
}
.nav-button, .install-button, .header-button, .primary-button, .secondary-button, .table-action {
  border: 1px solid transparent;
  border-radius: .55rem;
  cursor: pointer;
  font-weight: 750;
}
.nav-button { position: relative; padding: .65rem .85rem; color: #b9c8da; background: transparent; text-decoration: none; white-space: nowrap; }
.nav-button:hover, .nav-button:focus-visible { color: var(--ink); background: var(--surface-hover); }
.nav-button.is-active { color: #04101a; background: var(--cyan); box-shadow: 0 0 0 1px #84e5ff42, 0 4px 16px #0db4ed32; }
.install-button { padding: .6rem .8rem; color: #091302; background: var(--lime); box-shadow: 0 4px 14px #b8ff2c2e; }
.install-button:hover, .install-button:focus-visible { background: #d0ff71; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; flex-wrap: wrap; }
.header-button { padding: .58rem .8rem; color: #d8ecff; background: #15304b; border-color: #305576; }
.header-button:hover, .header-button:focus-visible { color: #04101a; background: var(--cyan); border-color: var(--cyan); }
.header-button-secondary { color: #ffd9de; background: #3b1b2a; border-color: #823748; }
.header-button-secondary:hover, .header-button-secondary:focus-visible { color: white; background: #743143; border-color: #9f4660; }
.user-chip { max-width: 18rem; overflow: hidden; color: #c9d8e8; font-size: .83rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.content-card {
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(145deg, #101e31, var(--surface));
  box-shadow: 0 14px 34px #01060e35, inset 0 1px #ffffff08;
}
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin-bottom: 0; }
.public-result-status { min-height: 1.4rem; margin: 1.2rem 0 0; color: var(--muted); font-size: .9rem; }
.public-result-status.is-error { color: #ff9ba8; }
.public-result-group, .public-competition-results { margin-top: 1.5rem; overflow: hidden; border: 1px solid var(--line); border-radius: .8rem; background: #091524; }
.public-result-heading { padding: 1.05rem 1.15rem; border-bottom: 1px solid var(--line); background: #12243a; }
.public-result-heading h3, .final-result-block h4 { margin-bottom: .35rem; }
.public-result-heading p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.public-result-table { min-width: 42rem; }
.public-result-table .zero-score { color: #9fabb9; }
.public-result-table .strike-score { color: #ffe08c; background: #f5c45120; font-weight: 750; }
.public-result-table .total-cell { color: var(--lime); font-weight: 850; }
.public-result-table .final-qualified { color: var(--cyan); font-weight: 750; }
.final-result-block { margin: 1.2rem; overflow: hidden; border: 1px solid #315875; border-radius: .65rem; background: #0d1c2e; }
.final-result-block h4 { padding: .9rem 1rem; border-bottom: 1px solid #315875; background: #142b42; }
.archive-season-list { display: grid; gap: .75rem; margin-top: 1.25rem; }
.archive-season-button { padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; cursor: pointer; color: #d9e9f8; background: #0d1b2c; font-weight: 750; text-align: left; }
.archive-season-button:hover, .archive-season-button:focus-visible { border-color: var(--cyan); background: var(--surface-hover); }
.public-event-list { display: grid; gap: .9rem; margin-top: 1.25rem; }
.public-event-card { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(13rem, 1fr) auto; align-items: start; gap: 1.25rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: .8rem; background: linear-gradient(110deg, #10233a, #0c1727); }
.public-event-card:hover { border-color: #3a7092; box-shadow: 0 10px 22px #02091438; }
.public-event-card h3 { margin-bottom: .35rem; }
.event-host { margin: 0; color: #c7d8e9; font-weight: 700; }
.event-details { display: grid; grid-template-columns: auto 1fr; gap: .35rem .75rem; margin: 0; color: var(--muted); font-size: .9rem; }
.event-details dt { color: #c4d5e7; font-weight: 750; }
.event-details dd { margin: 0; }
.event-card-actions, .competition-result-actions { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.event-card-actions { justify-content: flex-end; }
.event-link { display: inline-flex; align-items: center; text-decoration: none; }
.competition-button-list { display: flex; flex-wrap: wrap; gap: .65rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.competition-result-button { padding: .65rem .75rem; border: 1px solid #365774; border-radius: .55rem; cursor: pointer; color: #d7e9fb; background: #10243a; font-weight: 750; text-align: left; }
.competition-result-button:hover, .competition-result-button:focus-visible { border-color: var(--cyan); color: var(--cyan); background: #133451; }
.competition-result-actions { padding: 1rem 1rem 0; }
#public-competition-result .table-wrap { margin-top: 1rem; }

label { display: grid; gap: .3rem; color: #c5d3e3; font-size: .85rem; font-weight: 700; }
select, input, textarea { border: 1px solid #395673; border-radius: .5rem; color: var(--ink); background: #091727; outline: none; }
select { min-width: 9rem; padding: .6rem .65rem; }
select:hover, input:hover { border-color: #547895; }
select:focus, input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #25c7ff23; }
select:disabled, input:disabled { color: #a7b5c7; background: #111c2b; opacity: 1; }

.auth-dialog { width: min(31rem, calc(100% - 2rem)); padding: 0; border: 1px solid #365978; border-radius: 1rem; color: var(--ink); background: #0d1a2b; box-shadow: 0 24px 70px #01050dc7; }
.auth-dialog::backdrop { background: #020713ba; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.5rem 1rem; }
.dialog-heading h2 { margin-bottom: 0; }
.dialog-close { width: 2.25rem; height: 2.25rem; border: 1px solid #365978; border-radius: 50%; cursor: pointer; color: var(--cyan); background: #11263c; font-size: 1.5rem; line-height: 1; }
.dialog-close:hover, .dialog-close:focus-visible { color: #06111c; background: var(--cyan); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 1.5rem 1.25rem; padding: .25rem; border-radius: .65rem; background: #091727; }
.auth-tab { padding: .6rem; border: 0; border-radius: .45rem; cursor: pointer; color: #b5c5d7; background: transparent; font-weight: 700; }
.auth-tab.is-active { color: #05121f; background: var(--cyan); box-shadow: 0 2px 8px #00000035; }
.auth-form { display: grid; gap: 1rem; padding: 0 1.5rem; }
.auth-form label { color: #d5e5f5; }
.auth-form input { width: 100%; padding: .7rem .75rem; }
.auth-form small { color: var(--muted); font-weight: 500; }
.text-button { justify-self: start; padding: 0; border: 0; color: var(--cyan); background: transparent; text-decoration: underline; }
.text-button:hover, .text-button:focus-visible { color: #c8f3ff; outline-color: var(--cyan); }

.primary-button { padding: .75rem 1rem; color: #071202; background: var(--lime); box-shadow: 0 4px 15px #b8ff2c25; }
.primary-button:hover, .primary-button:focus-visible { background: #d1ff78; box-shadow: 0 6px 19px #b8ff2c42; }
.secondary-button { padding: .75rem 1rem; color: #cbeeff; background: #15324b; border-color: #315876; }
.secondary-button:hover, .secondary-button:focus-visible { color: #06121d; background: var(--cyan); border-color: var(--cyan); }
.danger-button { padding: .75rem 1rem; border: 1px solid #a9364d; border-radius: .6rem; cursor: pointer; color: white; background: #7a2638; font-weight: 700; }
.danger-button:hover, .danger-button:focus-visible { background: #a7344d; }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled, .header-button:disabled { cursor: wait; opacity: .52; transform: none; }

.form-note { margin: 0; padding: .7rem; border: 1px solid #314c68; border-radius: .5rem; color: var(--muted); background: #0b1828; font-size: .85rem; }
.form-status { min-height: 1.4rem; margin: .85rem 1.5rem 1.4rem; color: var(--cyan); font-size: .9rem; }
.form-status.is-error { color: #ff9ba8; }
.empty-state { max-width: 44rem; margin: 1.5rem 0 .25rem; padding: 1.25rem; border: 1px solid #35536e; border-left: 4px solid var(--cyan); border-radius: .55rem; background: #0c1a2a; }
.empty-state h3 { margin-bottom: .45rem; }
.empty-state p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.status-badge, .count-badge, .record-status { display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; font-size: .78rem; font-weight: 800; }
.status-badge { gap: .35rem; padding: .4rem .7rem; color: #e7f9ca; background: #85c71824; border: 1px solid #8dce3d70; }
.status-badge::before { width: .4rem; height: .4rem; border-radius: 50%; content: ""; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.count-badge { min-width: 2rem; min-height: 2rem; padding: .25rem .55rem; color: #05121e; background: var(--cyan); box-shadow: 0 2px 11px #25c7ff2b; }
.admin-notice { margin: 1.25rem 0 0; padding: 1rem; border: 1px solid #936e20; border-left: 4px solid var(--gold); border-radius: .55rem; color: #ffe6aa; background: #3b2c112e; line-height: 1.5; }

.admin-grid { display: grid; grid-template-columns: minmax(17rem, .82fr) minmax(24rem, 1.4fr); gap: 1.5rem; margin-top: 1.5rem; }
.season-management, .event-management, .event-results-management, .event-cash-management, .event-final-management, .test-reset-management, .management-form, .management-list, .user-assignment { border: 1px solid var(--line); border-radius: .85rem; background: #0a1727; }
.management-form, .management-list { min-width: 0; }
.season-management, .event-management, .competition-management, .event-results-management, .event-cash-management, .event-final-management, .test-reset-management { margin-top: 1.5rem; padding: 1.25rem; background: linear-gradient(145deg, #112136, #0b1727); }
.management-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.management-form { display: grid; align-content: start; gap: 1rem; padding: 1.25rem; box-shadow: inset 0 1px #ffffff06; }
.management-form h3, .management-list h3, .user-assignment h3 { margin-bottom: 0; }
.management-form label { min-width: 0; }
.management-form input:not([type="checkbox"]), .management-form select { width: 100%; max-width: 100%; min-width: 0; min-height: 2.75rem; padding: .7rem .75rem; }
.management-form input[type="file"] { padding: .45rem; cursor: pointer; background: #10243a; }
.management-form input[type="file"]::file-selector-button { margin-right: .75rem; padding: .45rem .7rem; border: 1px solid #5683a2; border-radius: .4rem; color: #06121d; background: var(--cyan); font-weight: 750; cursor: pointer; }
.individual-shot-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr)); gap: .55rem; margin: 0; padding: .85rem; border: 1px solid #31526e; border-radius: .65rem; background: #081625; }
.individual-shot-fields legend { padding: 0 .3rem; color: var(--cyan); font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.individual-shot-fields label { display: grid; gap: .25rem; color: #9fb0c4; font-size: .76rem; font-weight: 750; }
.individual-shot-fields input { width: 100%; min-width: 0; min-height: 2.75rem; padding: .55rem; border: 1px solid #416581; border-radius: .45rem; color: #f1faff; background: #13283d; font-weight: 800; text-align: center; }
.individual-shot-fields input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px #b8ff2c24; }
.date-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
.competition-rule { min-height: 2.8rem; margin: 0; padding: .7rem .8rem; border: 1px solid #31536f; border-left: 3px solid var(--cyan); border-radius: .45rem; color: #b7c8d9; background: #0a1929; line-height: 1.4; }
.cash-total { margin: 0; padding: .8rem; border: 1px solid #709b2c; border-radius: .5rem; color: #edffd0; background: #b8ff2c16; font-size: 1.05rem; font-weight: 850; }
.checkbox-label { display: flex; align-items: center; gap: .55rem; color: #e1edf8; }
.checkbox-label input { width: 1.1rem; height: 1.1rem; accent-color: var(--lime); }
.season-ranking-class-fields { display: grid; gap: .75rem; margin: 0; padding: .85rem; border: 1px solid #31526e; border-radius: .65rem; background: #081625; }
.season-ranking-class-fields legend { padding: 0 .3rem; color: var(--cyan); font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.season-ranking-class-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; }
.season-ranking-class-group { display: grid; gap: .45rem; padding: .7rem; border: 1px solid #244560; border-radius: .5rem; background: #0d2033; }
.season-ranking-class-group h4 { margin: 0; color: #d7edf9; font-size: .9rem; }
.season-ranking-class-group .checkbox-label { align-items: flex-start; font-size: .88rem; }
.season-ranking-class-group .checkbox-label input { flex: 0 0 auto; margin-top: .1rem; }
.form-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.inline-status { min-height: 1.35rem; margin: 0; color: var(--cyan); font-size: .9rem; line-height: 1.4; }
.inline-status.is-error, .error-text { color: #ff9ba8; }

.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--line); }
.table-wrap { position: relative; max-width: 100%; min-width: 0; overflow-x: auto; }
.management-table { width: 100%; border-collapse: collapse; }
.management-table th, .management-table td { padding: .85rem 1rem; border-bottom: 1px solid #203854; text-align: left; vertical-align: middle; }
.management-table th { color: #93a9c0; background: #0d1d2f; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.management-table tbody tr { transition: background .16s ease; }
.management-table tbody tr:hover { background: #162b43; }
.management-table tbody tr:last-child td { border-bottom: 0; }
.management-table td:last-child { text-align: right; }
.cell-detail { display: block; margin-top: .2rem; color: var(--muted); font-size: .82rem; }
.record-status { padding: .3rem .55rem; }
.record-status.is-active, .record-status.is-open { color: #ecffd0; background: #86c91a27; border: 1px solid #82c12b73; }
.record-status.is-inactive { color: #d0d6dd; background: #7280962e; border: 1px solid #71809761; }
.record-status.is-draft, .record-status.is-planned { color: #ffe5a3; background: #e3a72a21; border: 1px solid #d59c2770; }
.record-status.is-archived, .record-status.is-locked { color: #cad3df; background: #63748d2a; border: 1px solid #65748b62; }
.record-status.is-uploaded { color: #c9f3ff; background: #25c7ff1c; border: 1px solid #25c7ff62; }
.table-action { padding: .5rem .65rem; color: #d1f1ff; background: #15354f; border-color: #315a79; }
.table-action:hover, .table-action:focus-visible { color: #04111d; background: var(--cyan); border-color: var(--cyan); }
.table-action.danger-action { margin-left: .4rem; color: #ffd7dc; background: var(--danger-soft); border-color: #a73a4e; }
.table-action.danger-action:hover, .table-action.danger-action:focus-visible { color: white; background: #9d3147; border-color: #d94a62; }

.user-assignment { margin-top: 1.5rem; padding: 1.25rem; }
.section-copy { margin: .45rem 0 0; color: var(--muted); line-height: 1.5; }
.assignment-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); align-items: end; gap: .85rem; margin-top: 1.25rem; }
.assignment-form select, .assignment-form input:not([type="hidden"]) { width: 100%; min-height: 2.75rem; }
.assignment-form button { justify-self: start; }
.edit-form { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.25rem; }
.edit-form input:not([type="checkbox"]), .edit-form select { width: 100%; min-width: 0; min-height: 2.75rem; padding: .7rem .75rem; }
.edit-form .form-actions, .edit-form .inline-status { grid-column: 1 / -1; }
.participant-search-form { display: grid; grid-template-columns: minmax(14rem, 1fr) auto; align-items: end; gap: .85rem; margin-top: 1.25rem; }
.participant-search-form input { width: 100%; min-height: 2.75rem; padding: .7rem .75rem; }
.participant-picker-field { position: relative; }
.participant-picker-field label { display: grid; gap: .35rem; }
.participant-suggestions { position: absolute; z-index: 10; top: calc(100% + .25rem); left: 0; right: 0; max-height: 15rem; overflow-y: auto; padding: .3rem; border: 1px solid var(--line); border-radius: .55rem; background: #102338; box-shadow: 0 .65rem 1.25rem #0006; }
.participant-suggestion { display: block; width: 100%; padding: .6rem .7rem; border: 0; border-radius: .35rem; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.participant-suggestion:hover, .participant-suggestion:focus { background: #1b405d; outline: none; }
.participant-suggestion-empty { margin: .4rem; color: var(--muted); font-size: .9rem; }
.user-assignment .inline-status { margin-top: .8rem; }
.test-reset-form { max-width: 48rem; margin-top: 1.2rem; }
.test-reset-warning { border-color: #a73a4e; color: #ffd7dc; background: #671d2d2e; }
.reset-category-fields { display: grid; gap: .65rem; margin: 0; padding: .85rem; border: 1px solid #754152; border-radius: .65rem; background: #200f1a; }
.reset-category-fields legend { padding: 0 .3rem; color: #ffd7dc; font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.reset-category-fields .checkbox-label { align-items: flex-start; padding: .65rem; border: 1px solid #553143; border-radius: .5rem; background: #321522; }
.reset-category-fields .checkbox-label input { flex: 0 0 auto; margin-top: .15rem; }
.reset-category-fields .checkbox-label span { display: grid; gap: .2rem; }
.reset-category-fields .checkbox-label small { color: #dfbbc5; font-size: .8rem; font-weight: 500; line-height: 1.35; }

.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 1.25rem clamp(1rem, 4vw, 4rem); color: #a8bed2; background: #030812; border-top: 1px solid #1e3650; font-size: .85rem; }
.site-footer > :last-child { justify-self: end; }
.footer-meta { white-space: nowrap; }
.footer-credit { color: #d5e3ef; text-align: center; }
.event-toolbar { display: grid; grid-template-columns: minmax(16rem, 1fr) auto; align-items: end; gap: 1rem; margin-top: 1.5rem; }
.event-toolbar select { width: 100%; min-height: 2.75rem; }
.event-admin-grid, .event-results-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .8fr); gap: 1.5rem; margin-top: 1.5rem; }
.event-admin-side { display: grid; align-content: start; gap: 1.5rem; min-width: 0; }
.event-admin-side .management-form { min-width: 0; }
.event-admin-side .secondary-button, .event-admin-side .primary-button { justify-self: start; }
.event-admin-grid .management-list { min-width: 0; }
.management-tabs { display: flex; gap: .45rem; margin-top: 1.5rem; padding: .4rem; overflow-x: auto; border: 1px solid #403767; border-radius: .7rem; background: #151126; }
.management-tab { flex: 0 0 auto; padding: .65rem .85rem; border: 1px solid transparent; border-radius: .5rem; cursor: pointer; color: #cac3e5; background: transparent; font-weight: 800; }
.management-tab:hover, .management-tab:focus-visible { border-color: #7769ad; color: #f1efff; background: #282143; }
.management-tab.is-active { color: #fff; background: #6958bb; box-shadow: 0 3px 11px #8e7ae63d; }
.event-configuration-management { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .85rem; background: linear-gradient(145deg, #112136, #0b1727); }
.event-configuration-form { max-width: 48rem; margin-top: 1.2rem; }
.competition-choice-fields { display: grid; gap: .65rem; margin: 0; padding: .85rem; border: 1px solid #31526e; border-radius: .65rem; background: #081625; }
.competition-choice-fields legend { padding: 0 .3rem; color: var(--cyan); font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.competition-choice { display: grid !important; grid-template-columns: auto minmax(10rem, 1fr) minmax(9rem, .7fr); align-items: center; gap: .7rem; padding: .7rem; border: 1px solid #244560; border-radius: .5rem; color: #e1edf8; background: #0d2033; }
.competition-choice input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--lime); }
.competition-choice span { display: grid; gap: .2rem; }
.competition-choice small { color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.35; }
.competition-choice input[type="number"] { width: 100%; min-width: 0; min-height: 2.45rem; padding: .5rem .6rem; }

@media (max-width: 820px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .assignment-form, .participant-search-form, .edit-form { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .event-admin-grid, .event-results-grid { grid-template-columns: minmax(0, 1fr); }
  .public-event-card { grid-template-columns: 1fr; }
  .event-card-actions { justify-content: flex-start; }
  .competition-choice { grid-template-columns: auto 1fr; }
  .competition-choice > span:last-child { grid-column: 2; }
}

@media (max-width: 550px) {
  .site-header { align-items: flex-start; flex-direction: column; min-height: auto; }
  .brand-wrap, .header-actions { min-width: 0; max-width: 100%; }
  .brand-logo { width: 3.35rem; height: 3.35rem; }
  .header-actions { justify-content: flex-start; }
  .user-chip { max-width: 100%; }
  .page-layout { width: min(100% - 1rem, 1240px); margin-top: .8rem; }
  .hero { border-radius: .85rem; }
  .install-hint { font-size: .8rem; }
  .section-heading, .management-section-heading { align-items: stretch; flex-direction: column; }
  .date-fields { grid-template-columns: 1fr; }
  .event-toolbar { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; gap: .45rem; text-align: center; }
  .site-footer > :last-child { justify-self: center; }
  select { width: 100%; min-width: 0; max-width: 100%; }
  .content-card.admin-view { padding: 1rem; }
  .management-table th, .management-table td { padding: .75rem .65rem; }
  .individual-shot-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.print-result-sheet { display: none; }

@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body.printing-results { color: #000; background: #fff; }
  body.printing-results > :not(.print-result-sheet) { display: none !important; }
  body.printing-results .print-result-sheet { display: block; }
  .print-result-sheet h1 { margin-bottom: .25rem; font-size: 18pt; }
  .print-result-sheet p { margin-bottom: 1rem; color: #333; }
  .print-result-sheet table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .print-result-sheet th, .print-result-sheet td { padding: 5pt; border: 1px solid #777; text-align: left; vertical-align: top; }
  .print-result-sheet th { color: #000; background: #eee; }
  .print-result-sheet th:first-child, .print-result-sheet td:first-child { width: 10%; text-align: center; }
  .print-result-sheet tr { break-inside: avoid; }
}
