:root {
  --teal-950: #073b39;
  --teal-800: #0f5f5b;
  --teal-650: #197973;
  --teal-100: #dff3f0;
  --teal-50: #f0faf8;
  --yellow: #ffd719;
  --ink: #172523;
  --muted: #60716e;
  --line: #cfdfdc;
  --white: #fff;
  --shadow: 0 18px 55px rgba(7, 59, 57, 0.12);
}
[hidden] {
  display: none !important;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: linear-gradient(180deg, var(--teal-50), #fff 38rem);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
.topbar {
  height: 94px;
  padding: 10px clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid rgba(15, 95, 91, 0.13);
}
.brand img {
  display: block;
  width: 86px;
  height: 74px;
  object-fit: cover;
  object-position: center 9%;
  border-radius: 4px;
}
.login {
  border: 1px solid var(--teal-800);
  background: #fff;
  color: var(--teal-800);
  font-weight: 750;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
}
main {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto 72px;
}
.intro {
  text-align: center;
  padding: 58px 12px 32px;
}
.eyebrow {
  display: inline-block;
  color: var(--teal-800);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.intro h1 {
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 14px 0;
}
.intro p {
  max-width: 590px;
  margin: auto;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}
.form-card {
  background: #fff;
  border: 1px solid rgba(15, 95, 91, 0.14);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.form-card > section {
  padding: 34px 38px;
  border-bottom: 1px solid var(--line);
}
.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 24px;
}
.section-heading > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal-800);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}
.section-heading h2 {
  font-size: 1.22rem;
  margin: 1px 0 2px;
}
.section-heading p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}
.grid {
  display: grid;
  gap: 18px;
}
.two {
  grid-template-columns: 1fr 1fr;
}
.three {
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
}
label {
  display: grid;
  gap: 7px;
  color: #314542;
  font-size: 0.83rem;
  font-weight: 750;
}
input,
select {
  width: 100%;
  min-height: 45px;
  border: 1px solid #b8cbc7;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--teal-650);
  box-shadow: 0 0 0 3px rgba(25, 121, 115, 0.14);
}
.players-title {
  align-items: center;
}
.rating {
  margin-left: auto;
  background: var(--teal-100);
  color: var(--teal-950);
  border-radius: 12px;
  padding: 8px 15px;
  text-align: right;
}
.rating small {
  display: block;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.rating strong {
  font-size: 1.35rem;
}
.players {
  display: grid;
  gap: 14px;
}
.player {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.remove {
  border: 0;
  background: transparent;
  color: #a23b35;
  cursor: pointer;
}
.player-grid {
  grid-template-columns: 1.5fr 0.7fr 0.8fr 0.6fr;
}
.license {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  font-weight: 650;
}
.license input,
.confirm input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal-650);
}
.secondary {
  margin-top: 16px;
  border: 1px dashed var(--teal-650);
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-800);
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
}
.hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 13px 0 0;
}
.confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 26px 38px 20px;
  font-weight: 600;
  line-height: 1.45;
}
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: calc(100% - 76px);
  margin: 0 38px 38px;
  border: 0;
  border-radius: 12px;
  background: var(--teal-800);
  color: #fff;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
}
.submit:hover {
  background: var(--teal-950);
}
.submit span {
  color: var(--yellow);
  font-size: 1.4rem;
}
dialog {
  width: min(440px, calc(100% - 30px));
  border: 0;
  border-radius: 20px;
  padding: 38px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}
dialog::backdrop {
  background: rgba(7, 35, 34, 0.66);
}
dialog h2 {
  margin: 13px 0 8px;
}
.check {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: auto;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 1.7rem;
  font-weight: 900;
}
.close {
  position: absolute;
  right: 16px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}
.close-action {
  width: 100%;
  margin: 24px 0 0;
}
@media (max-width: 680px) {
  .topbar {
    height: 76px;
    padding: 8px 18px;
  }
  .brand img {
    width: 67px;
    height: 58px;
  }
  .intro {
    padding: 38px 6px 24px;
  }
  .intro h1 {
    font-size: 2.55rem;
  }
  .intro p {
    font-size: 0.97rem;
  }
  .form-card {
    border-radius: 18px;
  }
  .form-card > section {
    padding: 26px 20px;
  }
  .two,
  .three,
  .player-grid {
    grid-template-columns: 1fr;
  }
  .player-grid {
    gap: 12px;
  }
  .player {
    padding: 16px;
  }
  .confirm {
    margin: 22px 20px 18px;
  }
  .submit {
    width: calc(100% - 40px);
    margin: 0 20px 25px;
  }
  .players-title {
    flex-wrap: wrap;
  }
  .rating {
    margin-left: 42px;
  }
}

/* Complete logo treatment and landing page */
.brand {
  display: block;
  background: #fff;
}
.brand img {
  width: 130px;
  height: 72px;
  object-fit: contain;
  object-position: center;
}
.login {
  display: inline-block;
  text-decoration: none;
}
.home-page {
  background: #fff;
}
.home {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 64px;
}
.hero {
  text-align: center;
  padding: 38px 12px 46px;
}
.hero-logo {
  display: block;
  width: min(310px, 72vw);
  height: 300px;
  object-fit: contain;
  margin: 0 auto 22px;
  background: #fff;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 16px 0 22px;
}
.hero p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.primary-link,
.portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 12px;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.primary-link {
  gap: 14px;
  background: var(--teal-800);
  color: #fff;
  border: 1px solid var(--teal-800);
}
.primary-link span {
  color: var(--yellow);
  font-size: 1.35rem;
}
.portal-link {
  background: #fff;
  color: var(--teal-800);
  border: 1px solid var(--teal-800);
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--teal-950);
  color: #fff;
  border-radius: 22px;
  overflow: hidden;
}
.facts article {
  display: grid;
  text-align: center;
  padding: 30px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.facts article:last-child {
  border: 0;
}
.facts strong {
  color: var(--yellow);
  font-size: 2.15rem;
}
.facts span {
  font-size: 0.83rem;
}
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 45px;
  align-items: center;
  padding: 64px 40px;
}
.about h2 {
  font-size: 2rem;
  margin: 9px 0;
}
.about p {
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 680px) {
  .brand img {
    width: 100px;
    height: 58px;
  }
  .hero {
    padding: 25px 5px 34px;
  }
  .hero-logo {
    height: 240px;
    margin-bottom: 12px;
  }
  .hero h1 {
    font-size: 2.55rem;
  }
  .hero-actions {
    display: grid;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .facts article {
    grid-template-columns: 70px 1fr;
    text-align: left;
    align-items: center;
    padding: 17px 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  .facts strong {
    font-size: 1.7rem;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 44px 12px;
  }
}
.admin-main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 70px;
}
.admin-login {
  width: min(430px, 100%);
  margin: 70px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.admin-login h1,
.admin-title h1 {
  font-size: 2.2rem;
  margin: 8px 0;
}
.admin-login p {
  color: var(--muted);
}
.admin-login .submit {
  width: 100%;
  margin: 20px 0 0;
}
.error {
  color: #a23b35 !important;
}
.admin-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 45px 0 24px;
}
.admin-actions {
  display: flex;
  gap: 8px;
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.summary article {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 18px 22px;
  background: var(--teal-950);
  color: #fff;
  border-radius: 14px;
}
.summary strong {
  font-size: 1.8rem;
  color: var(--yellow);
}
.team-list {
  display: grid;
  gap: 14px;
}
.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 25px rgba(7, 59, 57, 0.07);
}
.team-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.team-top h2 {
  margin: 7px 0 2px;
}
.team-top p {
  color: var(--muted);
  margin: 0;
}
.status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--teal-100);
  color: var(--teal-950);
  padding: 4px 8px;
  border-radius: 999px;
}
.paid {
  display: flex;
  align-items: center;
  gap: 8px;
}
.paid input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--teal-650);
}
.captain {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 20px 0;
  padding: 14px;
  background: var(--teal-50);
  border-radius: 10px;
}
.captain a {
  color: var(--teal-800);
}
details summary {
  cursor: pointer;
  font-weight: 750;
}
.admin-players {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.admin-players div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.admin-players span {
  color: var(--muted);
  font-size: 0.85rem;
}
.note {
  margin-top: 15px;
}
.note textarea {
  min-height: 65px;
  border: 1px solid #b8cbc7;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}
@media (max-width: 680px) {
  .admin-title {
    display: grid;
    gap: 18px;
  }
  .admin-actions {
    display: grid;
  }
  .summary {
    grid-template-columns: 1fr;
  }
  .team-top {
    align-items: flex-start;
  }
  .captain {
    display: grid;
  }
  .admin-players div {
    display: grid;
    gap: 3px;
  }
}
.status-select {
  width: auto;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-950);
  font-size: 0.72rem;
  font-weight: 800;
}
.remove-team {
  margin-top: 16px;
  border: 0;
  background: transparent;
  color: #a23b35;
  padding: 4px 0;
  font-weight: 750;
  cursor: pointer;
}
.registration-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 20px;
  align-items: start;
}
.event-info {
  background: var(--teal-950);
  color: #fff;
  border-radius: 20px;
  padding: 28px;
  position: sticky;
  top: 20px;
}
.event-info h2 {
  margin-top: 0;
}
.event-info ul {
  padding-left: 20px;
  line-height: 1.55;
}
.event-info li {
  margin-bottom: 10px;
}
.event-info p {
  color: #cbe2df;
  font-size: 0.88rem;
  line-height: 1.55;
}
.compact-form > section {
  padding: 28px;
}
.portal-code {
  display: inline-block;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--teal-800);
  padding: 8px;
}
.portal-main {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto 70px;
}
.portal-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 45px 0 24px;
}
.portal-title h1 {
  font-size: 2.4rem;
  margin: 7px 0 2px;
}
.portal-title p {
  margin: 0;
  color: var(--muted);
}
.locked {
  background: #fff3c4;
  color: #664f00;
  border: 1px solid #eed66e;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.admin-settings {
  display: flex;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.admin-settings label,
.team-flags {
  display: flex;
  gap: 9px;
  align-items: center;
}
.admin-settings input {
  width: 19px;
  min-height: 19px;
  accent-color: var(--teal-650);
}
.team-flags {
  align-items: flex-end;
  flex-direction: column;
}
@media (max-width: 680px) {
  .registration-layout {
    grid-template-columns: 1fr;
  }
  .event-info {
    position: static;
  }
  .portal-title {
    display: grid;
    gap: 18px;
  }
  .admin-settings {
    display: grid;
    gap: 12px;
  }
  .team-flags {
    align-items: flex-end;
  }
}
.admin-settings {
  display: grid;
  gap: 18px;
}
.admin-settings > label,
.club-permissions label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: center;
}
.club-permissions {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.club-permissions > div {
  display: grid;
  gap: 9px;
}
.team-flags {
  display: grid;
  gap: 9px;
  align-items: start;
}
.team-flags label {
  display: grid;
  grid-template-columns: 22px 95px;
  gap: 7px;
  align-items: center;
}
.team-flags input {
  width: 19px;
  min-height: 19px;
}
.forgot-link {
  display: block;
  text-align: center;
  color: var(--teal-800);
  font-weight: 700;
  margin-top: 17px;
}
.success-message {
  color: var(--teal-800);
  font-weight: 700;
  line-height: 1.5;
}
.admin-nav {
  display: flex;
  gap: 6px;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}
.admin-nav a {
  padding: 13px 17px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.admin-nav a.active {
  color: var(--teal-800);
  border-color: var(--yellow);
}
.setup-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 25px rgba(7, 59, 57, 0.07);
}
.setup-card h2 {
  margin: 0 0 6px;
}
.setup-fields {
  display: grid;
  grid-template-columns: 180px 180px auto;
  gap: 14px;
  align-items: end;
}
.setup-fields .primary-link {
  min-height: 45px;
}
.round-times-card .setup-fields {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) auto;
}
.round-times-card .setup-fields > label {
  min-width: 0;
}
.round-times-card input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.round-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf9;
}
.round-time-row:last-child {
  margin-bottom: 0;
}
.round-time-status {
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
}
.round-time-value {
  color: var(--teal-950);
  font-size: 1.05rem;
  font-weight: 800;
}
.round-time-value.pending {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}
.round-time-controls {
  display: flex;
  align-items: end;
  gap: 12px;
}
.round-time-controls button {
  min-height: 42px;
}
.round-time-pause input {
  max-width: 100px;
}
@media (max-width: 900px) {
  .round-times-card .setup-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .round-times-card .setup-fields .primary-link {
    grid-column: auto;
    justify-self: start;
  }
}
@media (max-width: 600px) {
  .round-time-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .round-time-controls {flex-wrap:wrap}
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.card-heading p,
.muted {
  margin: 5px 0;
  color: var(--muted);
  line-height: 1.5;
}
.button-row {
  display: flex;
  gap: 9px;
  flex: 0 0 auto;
}
.danger-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid #b6463f;
  border-radius: 12px;
  background: #fff;
  color: #9b312b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.inline-message {
  min-height: 1.3em;
  margin: 12px 0 0;
  color: var(--teal-800);
  font-weight: 700;
}
.pool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.pool-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.pool-card h3 {
  margin: 0;
  padding: 13px 15px;
  background: var(--teal-950);
  color: #fff;
}
.seed-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}
.seed-row:last-child {
  border: 0;
}
.seed-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-950);
  font-weight: 850;
}
.seed-row small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.seed-row b {
  color: var(--teal-800);
}
.unassigned h3 {
  background: #705f1b;
}
.compact-empty {
  grid-column: 1/-1;
  padding: 18px;
}
.round-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}
.round-table {
  width: 100%;
  border-collapse: collapse;
}
.round-table th,
.round-table td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.round-table th {
  background: var(--teal-50);
  color: var(--teal-950);
}

/* Samlet turneringsadministrasjon */
.admin-workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 28px 0 18px;
}
.admin-workspace-actions {
  display: flex;
  gap: 10px;
}
.admin-workspace-actions kbd {
  margin-left: 9px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--teal-50);
  font: inherit;
  font-size: 0.7rem;
}
.all-tournaments {
  color: var(--teal-800);
  font-weight: 800;
  text-decoration: none;
}
.admin-section-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 22px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(7, 59, 57, 0.08);
  backdrop-filter: blur(10px);
}
.admin-section-nav h1 {
  margin: 0 13px 3px;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-section-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.admin-section-links a,
.admin-section-links button {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.admin-section-nav a.active,
.admin-section-nav a:hover,
.admin-section-nav button:hover {
  background: var(--teal-100);
  color: var(--teal-950);
}
/* The same section links become a dropdown on phones. */
.admin-section-menu { display: contents; }
.admin-section-links #adminMenuToggle { display: none; }
@media (max-width: 600px) {
  .admin-section-links { overflow: visible; align-items: center; }
  .admin-section-links #adminMenuToggle { display: block; margin-left: auto; font-size: 1.25rem; padding: 7px 13px; }
  .admin-section-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 14px 14px; box-shadow: 0 8px 20px rgba(7,59,57,.15); max-height: 70vh; overflow-y: auto; }
  .admin-section-nav.menu-open .admin-section-menu { display: grid; gap: 4px; }
  .admin-section-menu a.active { box-shadow: inset 4px 0 var(--teal-950); }
}
.admin-area {
  scroll-margin-top: 82px;
  margin-bottom: 38px;
}
.admin-area-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 0 4px 14px;
}
.admin-area-heading h2 {
  margin: 4px 0 0;
  font-size: 1.55rem;
}
.admin-area-heading p {
  margin: 5px 0 0;
  color: var(--muted);
}
.admin-overview {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.admin-next-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 18px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--teal-950);
  color: #fff;
}
.admin-next-action div {
  display: grid;
  gap: 3px;
}
.admin-next-action small {
  color: var(--yellow);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-next-action strong {
  font-size: 1.16rem;
}
.admin-next-action p {
  margin: 0;
  color: #d6e8e5;
}
.admin-next-action button,
.admin-checklist button,
.admin-warning button {
  border: 1px solid currentColor;
  border-radius: 9px;
  background: #fff;
  color: var(--teal-800);
  padding: 9px 12px;
  font-weight: 850;
  cursor: pointer;
}
.admin-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.admin-checklist article {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-checklist article > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-weight: 950;
}
.admin-checklist .complete > span {
  background: #dff2e8;
  color: #17653b;
}
.admin-checklist .incomplete > span {
  background: #fff0c2;
  color: #755800;
}
.admin-checklist article div {
  display: grid;
  gap: 2px;
}
.admin-checklist small {
  color: var(--muted);
}
.admin-warning-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.admin-warning {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid;
}
.admin-warning p {
  margin: 3px 0 0;
}
.admin-warning.blocker {
  background: #fff0ef;
  border-color: #e2aaa6;
  color: #782923;
}
.admin-warning.warning {
  background: #fff8d9;
  border-color: #ead373;
  color: #695000;
}
.setup-card {
  position: relative;
  scroll-margin-top: 84px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.setup-card[data-status="blocker"] {
  border-left: 4px solid #b6463f;
}
.setup-card[data-status="warning"] {
  border-left: 4px solid #d4a600;
}
.admin-collapse {
  position: absolute;
  z-index: 2;
  right: 16px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal-800);
  padding: 6px 9px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}
.setup-card > .card-heading:first-of-type {
  padding-right: 82px;
}
.setup-card > h2:first-of-type {
  padding-right: 82px;
}
.card-collapsed {
  min-height: 66px;
}
.card-collapsed > :not(.admin-collapse):not(.card-heading):not(h2) {
  display: none !important;
}
.card-collapsed > .card-heading > div > p,
.card-collapsed > .card-heading > :not(div) {
  display: none !important;
}
.card-collapsed > .card-heading {
  min-height: 22px;
}
.admin-card-highlight {
  border-color: var(--yellow) !important;
  box-shadow:
    0 0 0 4px rgba(242, 201, 0, 0.24),
    var(--shadow) !important;
}
.admin-search-dialog {
  width: min(650px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  text-align: left;
  overflow: hidden;
}
.admin-search-dialog form {
  padding: 18px;
}
.admin-search-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.admin-search-head label {
  font-size: 1.05rem;
}
.admin-search-head button {
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}
.admin-search-dialog input {
  font-size: 1rem;
}
.admin-search-results {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  max-height: 55vh;
  overflow: auto;
}
.admin-search-results button {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.admin-search-results button:hover,
.admin-search-results button.selected {
  background: var(--teal-50);
}
.admin-search-results span {
  color: var(--muted);
  font-size: 0.8rem;
}
.admin-team-card .admin-toolbar {
  margin-top: 18px;
}
.admin-team-card .team-list {
  margin-top: 16px;
}
.admin-area-cards > #schedule {
  margin-top: 16px;
}
@media (max-width: 760px) {
  .admin-workspace-header {
    display: grid;
    align-items: start;
  }
  .admin-workspace-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .admin-section-nav {
    top: 0;
    margin-inline: -8px;
    border-radius: 0;
  }
  .admin-section-nav h1 {
    font-size: 0.875rem;
  }
  .admin-checklist {
    grid-template-columns: 1fr;
  }
  .admin-next-action,
  .admin-warning {
    align-items: stretch;
    display: grid;
  }
  .admin-collapse span {
    display: none;
  }
  .setup-card > .card-heading:first-of-type,
  .setup-card > h2:first-of-type {
    padding-right: 45px;
  }
}

.admin-card-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.admin-card-title-row h2 {
  margin: 0 0 6px;
}
.setup-card > .admin-card-title-row:first-of-type {
  padding-right: 82px;
}
.admin-save-state {
  display: grid;
  place-items: center;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  margin-bottom: 5px;
  border: 2px solid #aebdb9;
  border-radius: 50%;
  color: #7a8985;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
}
.admin-save-state[data-state="saved"] {
  border-color: #2d8a58;
  background: #e0f3e8;
  color: #17653b;
}
.admin-save-state[data-state="dirty"] {
  border-color: #d09800;
  background: #fff4c7;
  color: #a27600;
  font-size: 0.55rem;
}
.admin-save-state[data-state="saving"] {
  border-color: #458799;
  background: #e2f1f4;
  color: #246575;
  animation: admin-save-pulse 0.8s ease-in-out infinite alternate;
}
.admin-save-state[data-state="error"] {
  border-color: #bd4a42;
  background: #fff0ef;
  color: #972f29;
}
@keyframes admin-save-pulse {
  to {
    transform: scale(0.86);
    opacity: 0.55;
  }
}
.card-collapsed
  > :not(.admin-collapse):not(.card-heading):not(.admin-card-title-row) {
  display: none !important;
}
.card-collapsed > .admin-card-title-row.admin-card-title-row {
  display: flex !important;
}
.autosave-enabled #tournamentMessage:not(.error) {
  display: none;
}
@media (max-width: 760px) {
  .setup-card > .admin-card-title-row:first-of-type {
    padding-right: 45px;
  }
}
@media (max-width: 760px) {
  .admin-nav {
    overflow-x: auto;
  }
  .admin-nav a {
    white-space: nowrap;
  }
  .setup-fields {
    grid-template-columns: 1fr 1fr;
  }
  .setup-fields .primary-link {
    grid-column: 1/-1;
  }
  .card-heading {
    display: grid;
  }
  .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .pool-grid {
    grid-template-columns: 1fr;
  }
  .setup-card {
    padding: 19px;
  }
}
.tournament-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.tournament-fields label {
  display: grid;
  gap: 7px;
  font-weight: 750;
  color: var(--teal-950);
}
.tournament-fields input,
.tournament-fields select,
.tournament-fields textarea {
  width: 100%;
  box-sizing: border-box;
}
.tournament-fields textarea {
  resize: vertical;
}
.tournament-fields .wide-field {
  grid-column: 1/-1;
}
.tournament-fields .check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  min-height: 45px;
}
.tournament-fields .check-field input {
  width: auto;
}
.tournament-fields input[type="color"] {
  min-height: 45px;
  padding: 4px;
}
.tournament-fields input[readonly] {
  background: var(--teal-50);
  color: var(--muted);
}
@media (max-width: 760px) {
  .tournament-fields {
    grid-template-columns: 1fr;
  }
  .tournament-fields .wide-field {
    grid-column: auto;
  }
}
.roster-status {
  display: grid;
  gap: 3px;
  margin-bottom: 16px;
  padding: 15px 18px;
  border: 1px solid #e3c56a;
  border-radius: 12px;
  background: #fff6d8;
  color: #66500b;
}
.roster-status.ready {
  border-color: #8fc7b7;
  background: #e9f7f2;
  color: var(--teal-950);
}
.roster-status span {
  font-size: 0.9rem;
  line-height: 1.45;
}
.team-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.team-card-actions .remove-team {
  margin-top: 0;
}
.test-portal {
  border: 1px solid var(--teal-800);
  border-radius: 9px;
  background: var(--teal-50);
  color: var(--teal-800);
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}
.refund-team {
  border: 1px solid #b6463f;
  border-radius: 9px;
  background: #fff;
  color: #9b312b;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}
.refund-team:disabled {
  opacity: 0.65;
  cursor: wait;
}
.refund-status {
  color: #17643d;
  font-weight: 800;
}
.refund-status.warning {
  color: #805f00;
}
.lineup-open-fields {
  grid-template-columns: minmax(200px, 320px) auto;
  margin-top: 18px;
}
.lineup-section {
  margin-top: 20px;
}
.lineup-section > .section-heading {
  padding: 24px 8px 4px;
}
.lineup-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.lineup-save {
  width: 100%;
  margin: 22px 0 0;
}
.previous-lineups {
  display: grid;
  gap: 12px;
}
.previous-lineups article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.previous-lineups article > strong {
  display: block;
  color: var(--teal-800);
  margin-bottom: 10px;
}
.previous-lineups article > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.previous-lineups span {
  display: grid;
  gap: 2px;
  color: var(--muted);
}
.previous-lineups b {
  color: var(--ink);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 680px) {
  .lineup-open-fields,
  .lineup-fields,
  .previous-lineups article > div {
    grid-template-columns: 1fr;
  }
  .lineup-open-fields .primary-link {
    grid-column: auto;
  }
  .lineup-section > .section-heading {
    padding-inline: 2px;
  }
}
.score-label {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 4px 0 8px rgba(15, 95, 91, 0.08);
}
.score-grid {
  overflow: visible !important;
}
.confirm-result {
  display: block;
  width: min(100%, 650px);
  margin: 12px auto 0;
  padding: 15px;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.confirm-result:disabled {
  opacity: 0.55;
  cursor: wait;
}
.result-confirmed .score-cell {
  cursor: not-allowed;
  opacity: 0.7;
}
.result-confirmed .match-status {
  background: var(--teal-950);
}
.round-editor select {
  min-width: 125px;
  padding: 10px 34px 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}
.round-editor tbody th {
  white-space: nowrap;
  color: var(--teal-950);
}
.schedule-round {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(7, 59, 57, 0.07);
}
.schedule-round-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 20px;
  background: var(--teal-950);
  color: #fff;
}
.schedule-round-head div {
  display: grid;
  gap: 4px;
}
.schedule-round-head span {
  font-size: 1.35rem;
  font-weight: 900;
}
.schedule-round-head strong {
  font-size: 0.86rem;
  color: #d9eeea;
}
.schedule-round-head small {
  align-self: center;
  color: var(--yellow);
  font-weight: 800;
}
.schedule-pools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 15px;
}
.schedule-pool {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.schedule-pool h3 {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 12px 14px;
  background: var(--teal-50);
}
.schedule-pool h3 small {
  color: var(--muted);
}
.schedule-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
}
.schedule-match b:last-child {
  text-align: right;
}
.schedule-match span {
  color: var(--muted);
  font-size: 0.8rem;
}
.schedule-bye {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
@media (max-width: 760px) {
  .schedule-pools {
    grid-template-columns: 1fr;
  }
  .schedule-round-head {
    display: grid;
  }
}
.schedule-team {
  display: grid;
}
.schedule-team small {
  color: var(--teal-800);
  font-size: 0.72rem;
}
.schedule-match .schedule-team:last-child small {
  text-align: right;
}
.schedule-bye .schedule-team {
  display: inline-grid;
  margin-right: 4px;
}
.scheduled-match {
  border-top: 1px solid var(--line);
}
.schedule-match-title {
  padding: 9px 13px 8px;
}
.schedule-match-title > small {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-800);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}
.schedule-match-title .schedule-match {
  padding: 0;
  border: 0;
}
.match-holes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px dashed var(--line);
  background: #fbfdfc;
}
.match-holes span {
  display: grid;
  gap: 2px;
  padding: 8px 6px;
  text-align: center;
  font-size: 0.76rem;
}
.match-holes b {
  font-size: 0.68rem;
  color: var(--muted);
}
.match-holes span + span {
  border-left: 1px solid var(--line);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-logout {
  display: none;
}
.admin-ready .admin-logout {
  display: inline-block;
}
.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 18px 0 14px;
}
@media (max-width: 520px) {
  .top-actions .login {
    padding: 8px 12px;
    font-size: 0.84rem;
  }
}
.score-main {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto 60px;
}
.score-save {
  color: var(--teal-800);
  font-weight: 750;
}
.score-heading {
  text-align: center;
  padding: 38px 0 22px;
}
.score-totals {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 1fr) 1fr;
  align-items: end;
  max-width: 650px;
  margin: 18px auto 0;
}
.score-totals > div {
  display: grid;
  gap: 2px;
}
.score-totals span {
  font-weight: 850;
}
.score-totals > div > strong {
  font-size: clamp(3.8rem, 14vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.total-a {
  color: var(--teal-800);
}
.total-b {
  color: #9a7600;
}
.score-summary {
  align-self: center;
  color: var(--ink);
}
.score-summary strong {
  font-size: 1.15rem !important;
  letter-spacing: 0 !important;
}
.score-summary span {
  font-size: 0.82rem;
  color: var(--muted);
}
.match-status {
  margin: 23px auto 0;
  max-width: 650px;
  padding: 16px;
  border-radius: 14px;
  background: var(--teal-800);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
}
.match-status.winner-b {
  background: #f2c900;
  color: var(--ink);
}
.match-finished .score-main {
  background: linear-gradient(180deg, #e1f2ee 0, transparent 430px);
  border-radius: 0 0 28px 28px;
}
.score-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 15px;
  align-items: center;
  margin-bottom: 16px;
}
.score-teams article {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 128px;
  padding: 19px;
  border: 2px solid transparent;
  border-radius: 16px;
}
.score-teams .side-a {
  background: #e5f4f1;
  border-color: #b8ddd6;
}
.score-teams .side-b {
  justify-content: flex-end;
  text-align: right;
  background: #fff6cc;
  border-color: #f0dd7e;
}
.team-letter {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  height: 54px;
  border-radius: 14px;
  font-size: 1.8rem !important;
  font-weight: 950 !important;
}
.side-a .team-letter {
  background: var(--teal-800);
  color: #fff !important;
}
.side-b .team-letter {
  background: var(--yellow);
  color: var(--ink) !important;
}
.score-teams h2 {
  margin: 0 0 2px;
  font-size: 1.25rem;
}
.score-teams p {
  margin: 0;
  color: var(--muted);
}
.versus {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}
.score-card {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.score-grid {
  display: grid;
  grid-template-columns: 72px repeat(var(--score-holes, 9), minmax(48px, 1fr));
  min-width: var(--score-desktop-min, 560px);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.score-grid > * {
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.score-grid > .score-cell {
  border-bottom: 0;
}
.score-grid > .score-label:nth-last-of-type(1) {
  border-bottom: 0;
}
.score-label {
  justify-content: start !important;
  padding-left: 12px;
  background: var(--teal-50);
  font-weight: 850;
}
.score-number {
  font-weight: 750;
}
.score-cell {
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
}
.score-cell.value-A {
  background: var(--teal-800);
  color: #fff;
}
.score-cell.value-B {
  background: var(--yellow);
  color: var(--ink);
}
.score-cell.value-- {
  background: #e8eeec;
}
.score-cell:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}
.score-help {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 15px 0 0;
}
@media (max-width: 600px) {
  .score-heading {
    padding-top: 25px;
  }
  .score-totals {
    grid-template-columns: 1fr 105px 1fr;
  }
  .score-teams {
    gap: 8px;
  }
  .score-teams article {
    min-height: 118px;
    padding: 12px;
    gap: 10px;
  }
  .team-letter {
    flex-basis: 42px;
    height: 42px;
    font-size: 1.4rem !important;
  }
  .score-teams h2 {
    font-size: 1rem;
  }
  .score-card {
    padding: 10px;
  }
  .score-grid {
    grid-template-columns: 62px repeat(var(--score-holes, 9), 45px);
    min-width: var(--score-mobile-min, 467px);
  }
}
.home-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 8px clamp(20px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.home-topbar img {
  display: block;
  width: 92px;
  height: 60px;
  object-fit: contain;
}
.home-topbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.home-topbar nav a,
.home-footer a {
  color: var(--teal-800);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}
.event-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--teal-950);
  color: #fff;
  border-radius: 22px;
  overflow: hidden;
}
.event-strip article {
  display: grid;
  gap: 5px;
  padding: 25px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.event-strip article:last-child {
  border: 0;
}
.event-strip small {
  color: #bcd9d5;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.event-strip strong {
  color: var(--yellow);
  font-size: 1.08rem;
}
.home-section {
  padding: 74px 42px;
}
.home-section h2,
.deadline-card h2,
.criteria h2,
.registered-section h2 {
  margin: 8px 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}
.intro-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 70px;
}
.intro-grid p,
.format-section p {
  color: var(--muted);
  line-height: 1.7;
}
.intro-grid p:first-child {
  margin-top: 0;
}
.deadline-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 34px;
  align-items: center;
  padding: 34px 38px;
  background: var(--teal-50);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.deadline-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.deadline-list article {
  display: grid;
  gap: 3px;
  padding: 17px;
  background: #fff;
  border-radius: 13px;
}
.deadline-list strong {
  color: var(--teal-800);
  font-size: 1.15rem;
}
.deadline-list span {
  color: var(--muted);
  font-size: 0.8rem;
}
.format-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.points-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  background: var(--teal-950);
  color: #fff;
  border-radius: 20px;
}
.points-card h3,
.points-card p {
  grid-column: 1/-1;
  margin: 0;
  padding: 20px 22px;
}
.points-card h3 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.points-card > div {
  display: grid;
  text-align: center;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.points-card > div:nth-of-type(3) {
  border: 0;
}
.points-card strong {
  color: var(--yellow);
  font-size: 2rem;
}
.points-card p {
  color: #cbe2df;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  line-height: 1.55;
}
.criteria {
  padding: 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.registration-closed #fullInfoSection {
  margin-top: 34px;
  margin-bottom: 28px;
}
.registration-closed #fullInfoSection h2 {
  margin: 0;
  color: var(--teal-950);
}
.criteria ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 42px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}
.document-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--teal-800);
  font-weight: 850;
}
.registered-section {
  padding: 74px 0 34px;
}
.registered-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.registered-head h2 {
  margin-bottom: 0;
}
.compact-link {
  min-height: 44px;
  padding: 9px 17px;
}
.public-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.public-teams article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 17px 19px;
  background: var(--teal-50);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.public-teams article > span {
  color: var(--teal-650);
  font-weight: 900;
}
.public-teams article div {
  display: grid;
  gap: 3px;
}
.public-teams small {
  color: var(--muted);
}
.empty-public {
  grid-column: 1/-1;
  padding: 26px;
  background: var(--teal-50);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}
.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 64px);
  background: var(--teal-950);
  color: #cbe2df;
  font-size: 0.82rem;
}
.home-footer a {
  color: #fff;
}
.disabled-link {
  pointer-events: none;
  opacity: 0.65;
}
@media (max-width: 760px) {
  .home-topbar nav a:nth-last-child(n + 3) {
    display: none;
  }
  .home-topbar nav {
    gap: 14px;
  }
  .hero {
    padding-top: 30px;
  }
  .event-strip {
    grid-template-columns: 1fr 1fr;
  }
  .event-strip article:nth-child(2) {
    border-right: 0;
  }
  .event-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
  .home-section {
    padding: 52px 12px;
  }
  .intro-grid,
  .format-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .deadline-card {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }
  .deadline-list {
    grid-template-columns: 1fr;
  }
  .criteria {
    padding: 28px 22px;
  }
  .criteria ul,
  .public-teams {
    grid-template-columns: 1fr;
  }
  .registered-section {
    padding-top: 52px;
  }
  .registered-head {
    display: grid;
    align-items: start;
  }
  .registered-head .compact-link {
    justify-self: start;
  }
  .home-footer {
    display: grid;
  }
}
.vipps-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: center;
  margin: 16px 0 64px;
  padding: 28px 34px;
  background: #fff;
  border: 2px solid #ff5b24;
  border-radius: 22px;
}
.vipps-number {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 18px;
  background: #ff5b24;
  color: #fff;
  border-radius: 16px;
  text-align: center;
}
.vipps-number small {
  font-weight: 800;
}
.vipps-number strong {
  font-size: 2.25rem;
}
.vipps-card h2 {
  margin: 0 0 8px;
  font-size: 1.55rem;
}
.vipps-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.format-section {
  padding-top: 0;
}
.format-section h2 {
  margin: 8px 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}
@media (max-width: 600px) {
  .vipps-card {
    grid-template-columns: 1fr;
    margin-bottom: 44px;
    padding: 22px;
  }
  .vipps-number {
    min-height: 95px;
  }
  .format-section {
    padding-top: 0;
  }
  .points-card > div {
    padding: 17px 10px;
  }
}
.contact-section {
  margin: 10px 0 34px;
  padding: 38px;
  background: var(--teal-50);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
}
.contact-section h2 {
  margin: 8px 0 10px;
  font-size: 1.8rem;
}
.contact-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.contact-section a {
  color: var(--teal-800);
  font-weight: 850;
}
.registration-contact {
  margin-top: 24px;
}
@media (max-width: 600px) {
  .contact-section {
    padding: 28px 20px;
  }
}
.test-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  border-bottom: 2px solid #d7b500;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}
.test-banner span {
  font-weight: 750;
  letter-spacing: 0;
}
.test-banner + .home-topbar {
  top: 41px;
}
.admin-score-links {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.admin-score-match {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.admin-score-match > header {
  padding: 13px 15px;
  background: var(--teal-100);
}
.admin-score-match > header div {
  display: grid;
  gap: 3px;
}
.admin-score-match > header small {
  color: var(--muted);
}
.admin-score-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  background: var(--teal-50);
}
.admin-score-link > div {
  display: grid;
  gap: 3px;
}
.admin-score-link small {
  color: var(--muted);
}
.score-link-actions {
  display: flex;
  gap: 7px;
}
.score-link-actions a,
.copy-score-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--teal-800);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-800);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.score-link-actions a {
  background: var(--teal-800);
  color: #fff;
}
.admin-mode.result-confirmed .score-cell {
  cursor: pointer;
  opacity: 1;
}
@media (max-width: 600px) {
  .test-banner span {
    display: none;
  }
  .admin-score-link {
    grid-template-columns: 1fr;
  }
  .score-link-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
.results-page {
  background: #f6fbfa;
}
.results-main {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto 70px;
}
.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 24px;
}
.results-heading h1 {
  margin: 8px 0 5px;
  font-size: clamp(2.35rem, 6vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.results-heading p {
  margin: 0;
  color: var(--muted);
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-800);
  font-size: 0.8rem;
  font-weight: 800;
}
.live-indicator span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1d9d67;
  box-shadow: 0 0 0 5px rgba(29, 157, 103, 0.12);
}
.result-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.result-summary article {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--teal-950);
  color: #fff;
}
.result-summary strong {
  font-size: 1.9rem;
  color: var(--yellow);
}
.result-controls {
  display: flex;
  gap: 12px;
  margin: 14px 0 30px;
}
.result-controls label {
  min-width: 170px;
}
.results-section {
  margin-top: 38px;
}
.results-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.results-section-head h2 {
  margin: 5px 0 0;
  font-size: 1.8rem;
}
.results-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.standings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.standings-card {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.standings-card h3 {
  margin: 0;
  padding: 15px 17px;
  background: var(--teal-950);
  color: #fff;
}
.standing-row {
  display: grid;
  grid-template-columns: 24px minmax(105px, 1fr) 82px 68px 82px 40px;
  gap: 6px;
  min-width: 450px;
  align-items: center;
  min-height: 43px;
  padding: 7px 11px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}
.standing-row > span:nth-child(n + 3),
.standing-row > b {
  text-align: center;
}
.standing-row > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.standing-head {
  min-height: 35px;
  border: 0;
  background: var(--teal-50);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}
.live-match-list {
  display: grid;
  gap: 12px;
}
.live-match {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(7, 59, 57, 0.06);
}
.live-match.live {
  border: 2px solid var(--teal-650);
}
.live-match summary {
  padding: 18px 20px;
  list-style: none;
}
.live-match summary::-webkit-details-marker {
  display: none;
}
.live-match summary::after {
  content: "Vis detaljer";
  display: block;
  margin-top: 12px;
  color: var(--teal-800);
  font-size: 0.76rem;
  font-weight: 850;
}
.live-match[open] summary::after {
  content: "Skjul detaljer";
}
.match-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.match-meta strong {
  color: var(--teal-800);
}
.match-score {
  display: grid;
  grid-template-columns: 1fr 105px 1fr;
  gap: 12px;
  align-items: center;
}
.match-score > div {
  display: grid;
  gap: 4px;
}
.match-score > div:last-child {
  text-align: right;
}
.match-score > div small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}
.match-score > div b {
  font-size: 1.05rem;
}
.match-score > span {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  text-align: center;
}
.match-score > span strong {
  font-size: 1.8rem;
}
.match-score > span i {
  font-style: normal;
  color: var(--muted);
}
.match-score > span small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
}
.live-games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  background: var(--teal-50);
  border-top: 1px solid var(--line);
}
.live-game {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.live-game-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.live-game-title > div {
  display: grid;
  gap: 3px;
}
.live-game-title small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-state {
  align-self: start;
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf2f1;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
}
.game-state.live {
  background: var(--teal-100);
  color: var(--teal-950);
}
.game-state.confirmed {
  background: var(--teal-950);
  color: #fff;
}
.live-game-score {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  align-items: center;
  margin: 14px 0;
  text-align: center;
}
.live-game-score b {
  font-size: 1.7rem;
  color: var(--teal-800);
}
.live-game-score b:last-child {
  color: #9a7600;
}
.live-game-score span {
  font-size: 0.7rem;
  font-weight: 800;
}
.hole-trail {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.hole-result {
  display: grid;
  min-width: 0;
  text-align: center;
  border-right: 1px solid var(--line);
}
.hole-result:last-child {
  border: 0;
}
.hole-result small {
  padding: 3px 1px;
  color: var(--muted);
  font-size: 0.55rem;
}
.hole-result b {
  padding: 4px 1px;
  font-size: 0.65rem;
}
.hole-result.hole-A b {
  background: var(--teal-800);
  color: #fff;
}
.hole-result.hole-B b {
  background: var(--yellow);
}
.hole-result.hole-- b {
  background: #e8eeec;
}
.results-empty {
  display: grid;
  gap: 5px;
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}
.results-empty strong {
  color: var(--ink);
}
@media (max-width: 850px) {
  .standings-grid {
    grid-template-columns: 1fr;
  }
  .live-games {
    grid-template-columns: 1fr;
  }
  .results-heading {
    align-items: start;
  }
  .match-score {
    grid-template-columns: 1fr 85px 1fr;
  }
}
@media (max-width: 600px) {
  .results-heading {
    display: grid;
    padding-top: 28px;
  }
  .live-indicator {
    justify-self: start;
  }
  .result-summary article {
    display: grid;
    gap: 1px;
    padding: 14px;
  }
  .result-summary strong {
    font-size: 1.55rem;
  }
  .result-summary span {
    font-size: 0.72rem;
  }
  .result-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .result-controls label {
    min-width: 0;
  }
  .results-section-head {
    display: grid;
    gap: 4px;
  }
  .live-match summary {
    padding: 15px;
  }
  .match-score {
    gap: 7px;
  }
  .match-score > div b {
    font-size: 0.9rem;
  }
  .live-games {
    padding: 8px;
  }
  .live-game {
    padding: 12px;
  }
}
.captain-editor {
  margin-top: 0;
}
.captain-fields {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1.2fr;
  gap: 14px;
  margin: 18px 0;
}
.captain-fields label {
  display: grid;
  gap: 7px;
  font-weight: 750;
  color: var(--teal-950);
}
.captain-fields input {
  width: 100%;
  box-sizing: border-box;
}
.save-state {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff3c4;
  color: #664f00;
  font-size: 0.78rem;
  font-weight: 800;
}
.captain-admin {
  margin: 18px 0;
}
.captain-admin[open] {
  padding: 16px;
  background: var(--teal-50);
  border-radius: 12px;
}
.captain-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.captain-actions .primary-link {
  min-height: 42px;
  padding: 9px 14px;
}
.captain-actions .inline-message {
  margin: 0;
}
@media (max-width: 680px) {
  .captain-fields {
    grid-template-columns: 1fr;
  }
  .captain-actions {
    display: grid;
  }
}
.team-color-card {
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}
.team-color-card h2,
.team-color-card p {
  margin: 0;
}
.team-color-card p {
  color: var(--muted);
}
.team-colors {
  display: grid;
  grid-template-columns: repeat(9, minmax(58px, 1fr));
  gap: 8px;
}
.team-color {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px 4px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f6f9f8;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.team-color span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.team-color small {
  font-size: 0.66rem;
}
.team-color.selected {
  border-color: var(--swatch);
  background: #fff;
}
.team-color.selected span {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--swatch);
}
.payment-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 22px;
  align-items: center;
  margin: 0 0 20px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}
.payment-card h2 {
  margin: 6px 0 3px;
}
.payment-card p {
  margin: 0;
  color: var(--muted);
}
.payment-card.paid {
  border-color: #85bea0;
  background: #f4fbf7;
}
.payment-card.paid h2 {
  color: #17643d;
}
.payment-card .inline-message {
  grid-column: 1/-1;
}
.vipps-button {
  border: 0;
  border-radius: 12px;
  background: #ff5b24;
  color: #fff;
  padding: 14px 20px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.vipps-button:hover {
  background: #e94c17;
}
.vipps-button:disabled {
  cursor: wait;
  opacity: 0.7;
}
@media (max-width: 680px) {
  .payment-card {
    grid-template-columns: 1fr;
  }
  .vipps-button {
    width: 100%;
  }
}
.total-a {
  color: var(--team-a, var(--teal-800));
}
.total-b {
  color: var(--team-b, #9a7600);
}
.match-status {
  background: var(--team-a, var(--teal-800));
  color: var(--team-a-text, #fff);
}
.match-status.winner-b {
  background: var(--team-b, #f2c900);
  color: var(--team-b-text, var(--ink));
}
.score-teams .side-a {
  background: color-mix(in srgb, var(--team-a, var(--teal-800)) 14%, white);
  border-color: color-mix(in srgb, var(--team-a, var(--teal-800)) 42%, white);
}
.score-teams .side-b {
  background: color-mix(in srgb, var(--team-b, #f2c900) 14%, white);
  border-color: color-mix(in srgb, var(--team-b, #f2c900) 42%, white);
}
.side-a .team-letter {
  background: var(--team-a, var(--teal-800));
  color: var(--team-a-text, #fff) !important;
}
.side-b .team-letter {
  background: var(--team-b, var(--yellow));
  color: var(--team-b-text, var(--ink)) !important;
}
.score-cell.value-A {
  background: var(--team-a, var(--teal-800));
  color: var(--team-a-text, #fff);
}
.score-cell.value-B {
  background: var(--team-b, var(--yellow));
  color: var(--team-b-text, var(--ink));
}

.score-help-button {
  position: fixed;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 20;
  border: 1px solid var(--teal-800);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--teal-800);
  padding: 9px 13px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow: 0 4px 18px rgba(7, 35, 34, 0.14);
  cursor: pointer;
}
.score-help-dialog {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 28px 26px 24px;
}
.score-help-dialog h2 {
  font-size: 1.35rem;
}
#scoreActionDialog .score-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.score-help-dialog > p {
  margin: 8px 0 16px;
  color: var(--muted);
}
.score-help-close {
  top: 8px;
  right: 11px;
}
.score-help-demo {
  position: relative;
  display: grid;
  grid-template-columns: auto 64px;
  gap: 6px 14px;
  align-items: center;
  width: min(260px, 100%);
  margin: 14px auto;
  padding: 16px;
  border-radius: 15px;
  background: var(--teal-50);
  border: 1px solid var(--line);
  text-align: left;
}
.score-help-hole {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}
.score-help-cell {
  grid-row: 1/3;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-size: 1.35rem;
  font-weight: 950;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}
.score-help-cell.value-A {
  background: var(--team-a, var(--teal-800));
  color: var(--team-a-text, #fff);
  transform: scale(1.05);
}
.score-help-cell.value-B {
  background: var(--team-b, var(--yellow));
  color: var(--team-b-text, var(--ink));
  transform: scale(1.05);
}
.score-help-cell.value-- {
  background: #e8eeec;
  transform: scale(1.05);
}
.score-help-tap {
  position: absolute;
  right: 4px;
  bottom: -10px;
  font-size: 1.7rem;
  animation: help-tap 1.1s ease-in-out infinite;
}
.score-help-sequence {
  font-size: 0.86rem;
  line-height: 1.45;
}
.score-help-dismiss {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 0.9rem;
}
.score-help-dismiss input {
  width: 19px;
  min-height: 19px;
  accent-color: var(--teal-650);
}
.score-help-ok {
  width: 100%;
  margin: 18px 0 0;
}
.score-help-dialog::backdrop {
  background: rgba(7, 35, 34, 0.58);
}
@keyframes help-tap {
  0%,
  100% {
    transform: translateY(3px) scale(0.92);
  }
  45% {
    transform: translateY(-4px) scale(1);
  }
}
@media (max-width: 600px) {
  .score-help-dialog {
    padding: 24px 18px 18px;
  }
  .score-help-dialog h2 {
    font-size: 1.2rem;
    margin-right: 20px;
  }
  .score-help-demo {
    margin: 10px auto;
  }
  .score-help-button {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .score-help-tap {
    animation: none;
  }
  .score-help-cell {
    transition: none;
  }
}
.live-match summary {
  cursor: pointer;
}
.live-match.confirmed {
  border-color: #92b9a7;
  background: #e8f4ed;
}
.live-match.confirmed summary {
  background: #e8f4ed;
}
.match-team-a {
  padding-left: 10px;
  border-left: 7px solid var(--team-a);
}
.match-team-b {
  padding-right: 10px;
  border-right: 7px solid var(--team-b);
}
.match-team-a b {
  color: var(--team-a);
}
.match-team-b b {
  color: var(--team-b);
}
.live-game.finished,
.live-game.confirmed {
  border-color: #a8c9b9;
  background: #edf7f1;
}
.live-game-score b {
  color: var(--team-a);
}
.live-game-score b:last-child {
  color: var(--team-b);
}
.hole-result.hole-A b {
  background: var(--team-a);
  color: var(--team-a-text);
}
.hole-result.hole-B b {
  background: var(--team-b);
  color: var(--team-b-text);
}
@media (max-width: 700px) {
  .team-colors {
    grid-template-columns: repeat(6, 1fr);
  }
}
@media (max-width: 460px) {
  .team-colors {
    grid-template-columns: repeat(3, 1fr);
  }
}
.caddybook-controls {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.caddybook-controls label {
  min-width: 180px;
}
.caddybook-controls input {
  display: block;
  margin-top: 0.35rem;
}
.caddybook-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #f3f7f6;
  border-radius: 10px;
}
.hole-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.hole-map-card {
  overflow: hidden;
  border: 1px solid #d6e1df;
  border-radius: 10px;
  background: #fff;
}
.hole-map-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #edf2f1;
}
.hole-map-card div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem;
  font-size: 0.85rem;
}
.hole-map-card span {
  color: #5b6866;
}
@media (max-width: 600px) {
  .caddybook-current {
    align-items: flex-start;
    flex-direction: column;
  }
  .caddybook-controls {
    align-items: stretch;
  }
  .caddybook-controls > * {
    width: 100%;
  }
  .hole-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.pdga-results {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.pdga-row {
  display: grid;
  grid-template-columns: 1fr 1fr 60px;
  gap: 14px;
  align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}
.pdga-row span {
  display: grid;
  gap: 2px;
}
.pdga-row small {
  color: var(--muted);
  font-size: 0.75rem;
}
.pdga-row a {
  color: var(--teal-800);
  font-weight: 750;
}
.pdga-row b {
  text-align: right;
  color: var(--teal-800);
}
.pdga-row.warning {
  background: #fff6d8;
}
@media (max-width: 600px) {
  .pdga-row {
    grid-template-columns: 1fr 1fr 44px;
    font-size: 0.86rem;
  }
}
.registration-full-notice,
.registration-status {
  padding: 18px 22px;
  border: 1px solid #d7b500;
  border-radius: 14px;
  background: #fff4b8;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}
.registration-full-notice {
  margin: 0 0 18px;
}
.registration-full-notice a,
.registration-status a {
  color: var(--teal-800);
}
.registration-status {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 20px;
}
.score-finalization {
  min-height: 121px;
}

/* Kompakt scorekort og livesøk */
.score-heading {
  padding-bottom: 28px;
}
.score-heading > .eyebrow {
  display: block;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  letter-spacing: 0.08em;
}
.score-heading .score-teams {
  margin: 24px 0 14px;
}
.score-heading .score-totals {
  margin-top: 12px;
  align-items: center;
}
.score-totals .total-a,
.score-totals .total-b {
  display: flex;
  align-items: center;
}
.score-totals .total-b {
  justify-content: flex-end;
}
.score-totals .total-a strong,
.score-totals .total-b strong {
  display: block;
  color: var(--team-a, var(--teal-800));
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.score-totals .total-b strong {
  color: var(--team-b, #b47b00);
}
.score-summary strong {
  font-size: 1.35rem !important;
}
.score-summary span {
  font-size: 0.95rem;
  font-weight: 750;
}
.score-finalization {
  min-height: 0;
}
.score-grid > :nth-child(-n + 20) {
  background: var(--teal-50);
  color: var(--ink);
  font-weight: 850;
}
.score-card .confirm-result {
  margin-top: 18px;
}
.confirm-result[hidden] {
  display: none !important;
}
.live-player-search {
  position: relative;
}
.player-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(54vh, 420px);
  overflow: auto;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(7, 35, 34, 0.18);
}
.player-search-results:empty {
  display: none;
}
.player-search-results .scoring-choice {
  border-radius: 8px;
}
.live-player-search > .submit {
  margin-top: 10px;
}
@media (max-width: 600px) {
  .score-heading {
    padding-bottom: 22px;
  }
  .score-heading > .eyebrow {
    font-size: 1.15rem;
  }
  .score-heading .score-teams {
    margin-top: 18px;
  }
  .score-summary strong {
    font-size: 1.2rem !important;
  }
  .score-summary span {
    font-size: 0.88rem;
  }
  .score-totals .total-a strong,
  .score-totals .total-b strong {
    font-size: 3rem;
  }
}
.score-heading {
  padding-bottom: 28px;
}
.score-heading > .eyebrow {
  display: block;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  letter-spacing: 0.08em;
}
.score-heading .score-teams {
  margin: 24px 0 14px;
}
.score-heading .score-totals {
  margin-top: 12px;
  align-items: center;
}
.score-totals .total-a,
.score-totals .total-b {
  display: flex;
  align-items: center;
}
.score-totals .total-b {
  justify-content: flex-end;
}
.score-totals .total-a strong,
.score-totals .total-b strong {
  display: block;
  color: var(--team-a, var(--teal-800));
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.score-totals .total-b strong {
  color: var(--team-b, #b47b00);
}
.score-summary strong {
  font-size: 1.35rem !important;
}
.score-summary span {
  font-size: 0.95rem;
  font-weight: 750;
}
.score-finalization {
  min-height: 0;
}
.score-grid > :nth-child(-n + 20) {
  background: var(--teal-50);
  color: var(--ink);
  font-weight: 850;
}
.score-card .confirm-result {
  margin-top: 18px;
}
.confirm-result[hidden] {
  display: none !important;
}
.active-hole-map {
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.active-hole-map[hidden] {
  display: none !important;
}
.active-hole-map figcaption {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}
.active-hole-map figcaption strong {
  color: var(--ink);
  font-size: 1.05rem;
}
.active-hole-map img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--teal-50);
}
.live-player-search {
  position: relative;
}
.player-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(54vh, 420px);
  overflow: auto;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(7, 35, 34, 0.18);
}
.player-search-results:empty {
  display: none;
}
.player-search-results .scoring-choice {
  border-radius: 8px;
}
.live-player-search > .submit {
  margin-top: 10px;
}
@media (max-width: 600px) {
  .score-heading {
    padding-bottom: 22px;
  }
  .score-heading > .eyebrow {
    font-size: 1.15rem;
  }
  .score-heading .score-teams {
    margin-top: 18px;
  }
  .score-summary strong {
    font-size: 1.2rem !important;
  }
  .score-summary span {
    font-size: 0.88rem;
  }
  .score-totals .total-a strong,
  .score-totals .total-b strong {
    font-size: 3rem;
  }
  .active-hole-map {
    margin-top: 18px;
    padding-top: 15px;
  }
}
.email-admin {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid #c9d8d6;
  border-radius: 12px;
  background: #f7fbfa;
}
.email-admin h2 {
  margin-top: 0;
}
.email-controls {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}
.email-controls label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
}
.email-controls input {
  width: 9rem;
  padding: 0.55rem;
  border: 1px solid #9cb5b2;
  border-radius: 6px;
}
.email-log {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.email-log > div {
  display: grid;
  grid-template-columns: 10rem 5rem minmax(10rem, 1fr) 2fr;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid #dce8e6;
}
.email-log small {
  grid-column: 2/-1;
  color: #a33;
}
@media (max-width: 720px) {
  .email-log > div {
    grid-template-columns: 1fr;
  }
  .email-log small {
    grid-column: auto;
  }
}
.criteria summary {
  cursor: pointer;
  list-style: none;
}
.criteria summary::-webkit-details-marker {
  display: none;
}
.rich-info {
  margin-top: 24px;
  color: var(--muted);
  line-height: 1.7;
}
.rich-info h2,
.rich-info h3 {
  color: var(--teal-950);
}
.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.external-links:empty {
  display: none;
}
/* Tournament branding uploads */
.branding-upload {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--teal-50);
}
.branding-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 12px;
  border: 1px dashed #aac7c3;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}
.branding-preview img {
  display: block;
  width: min(100%, 360px);
  height: 120px;
  object-fit: contain;
}
.branding-preview.favicon-preview {
  min-height: 82px;
}
.branding-preview.favicon-preview img {
  width: 64px;
  height: 64px;
}
.branding-upload .button-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.sponsor-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--teal-50);
}
.sponsor-form .button-row {
  grid-column: 1/-1;
}
.sponsor-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.sponsor-admin-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.sponsor-admin-row img {
  display: block;
  width: 120px;
  height: 62px;
  object-fit: contain;
}
.sponsor-admin-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.sponsor-order {
  display: flex;
  gap: 6px;
}
.sponsor-order button {
  min-width: 42px;
  min-height: 42px;
  padding: 8px;
}
.sponsor-section {
  padding: 64px 0;
  text-align: center;
  border-top: 1px solid var(--line);
}
.sponsor-section h2 {
  margin: 8px 0 30px;
  font-size: clamp(2rem, 4vw, 3rem);
}
.main-sponsor {
  display: flex;
  justify-content: center;
  margin: 0 auto 38px;
}
.main-sponsor a,
.main-sponsor span,
.sponsor-grid a,
.sponsor-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-sponsor img {
  display: block;
  width: min(100%, 420px);
  height: 190px;
  object-fit: contain;
}
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px;
  align-items: center;
}
.sponsor-grid img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: contain;
}
@media (max-width: 760px) {
  .sponsor-form {
    grid-template-columns: 1fr;
  }
  .sponsor-form .button-row {
    grid-column: auto;
  }
  .sponsor-admin-row {
    grid-template-columns: 82px 1fr;
  }
  .sponsor-admin-row img {
    width: 82px;
    height: 52px;
  }
  .sponsor-order {
    grid-column: 1/-1;
    justify-content: flex-end;
  }
  .main-sponsor img {
    height: 145px;
  }
  .sponsor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .sponsor-grid img {
    height: 82px;
  }
}
.social-mode {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.social-mode label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.social-upload {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--teal-50);
}
.social-upload label,
.social-description {
  display: grid;
  gap: 7px;
  font-weight: 750;
  color: var(--teal-950);
}
.social-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1200/630;
  max-width: 720px;
  margin: 16px 0;
  border: 1px dashed #aac7c3;
  border-radius: 12px;
  background: #f4f8f7;
  color: var(--muted);
  overflow: hidden;
}
.social-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.social-description {
  max-width: 720px;
  margin: 16px 0;
}
.social-description textarea {
  resize: vertical;
}
.social-upload .button-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.scoring-login-page {
  min-height: 100vh;
  background: var(--teal-50);
}
.scoring-login-main {
  width: min(620px, calc(100% - 24px));
  margin: 0 auto;
  padding: 38px 0 80px;
}
.scoring-step {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.scoring-step h1 {
  margin: 8px 0;
  font-size: clamp(2rem, 8vw, 3.1rem);
}
.scoring-step > p {
  color: var(--muted);
}
.scoring-step form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.scoring-step label {
  display: grid;
  gap: 7px;
  font-weight: 850;
}
.scoring-step input {
  width: 100%;
  min-height: 58px;
  padding: 12px 15px;
  border: 2px solid #9cb5b2;
  border-radius: 11px;
  font: inherit;
  font-size: 1.15rem;
}
.scoring-step .submit {
  min-height: 56px;
  font-size: 1rem;
}
.scoring-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.scoring-choice {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--teal-50);
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.scoring-choice strong {
  font-size: 1.02rem;
}
.scoring-choice span,
.scoring-choice small {
  color: var(--muted);
}
.scoring-choice.completed {
  order: 2;
  opacity: 0.7;
  background: #edf2f1;
}
.scoring-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  padding: 15px;
  border-radius: 13px;
  background: var(--teal-50);
}
.scoring-player div {
  display: grid;
  gap: 3px;
}
.scoring-player span,
.scoring-player small {
  color: var(--muted);
  font-size: 0.8rem;
}
@media (max-width: 600px) {
  .scoring-login-main {
    padding-top: 16px;
  }
  .scoring-step {
    border-radius: 16px;
  }
  .scoring-player {
    align-items: stretch;
    flex-direction: column;
  }
  .scoring-player .portal-link {
    width: 100%;
  }
}
.test-banner[hidden] + .home-topbar {
  top: 0;
}
.tournament-format-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.composition-rules {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.composition-rule {
  display: grid;
  grid-template-columns: 90px minmax(240px, 1fr) minmax(150px, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.8rem;
  background: #f4f8f7;
  border-radius: 8px;
}
.composition-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.composition-classes label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
}
.composition-rule .danger-link {
  margin-bottom: 0.1rem;
}
@media (max-width: 700px) {
  .composition-rule {
    grid-template-columns: 1fr;
  }
  .composition-rule .danger-link {
    justify-self: start;
  }
}
.open-tournament .second-team {
  display: none;
}
.club-admin {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.club-admin-form {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.club-admin-form label {
  min-width: min(100%, 320px);
}
.club-admin-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}
.club-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7faf9;
}
.club-admin-row button {
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .club-admin-form > * {
    width: 100%;
  }
}

.pilot-error-panel{position:fixed;right:1rem;bottom:1rem;z-index:10000;width:min(28rem,calc(100vw - 2rem));max-height:45vh;overflow:auto;background:#fff4f4;color:#651b1b;border:2px solid #bd3333;border-radius:.65rem;box-shadow:0 12px 32px #0003;padding:.8rem 1rem;font:14px/1.4 system-ui,sans-serif}
.pilot-error-head{display:flex;justify-content:space-between;align-items:center;gap:1rem}
.pilot-error-actions{display:flex;gap:.4rem;flex-shrink:0}
.pilot-error-head button{background:transparent;border:1px solid currentColor;border-radius:.35rem;color:inherit;cursor:pointer;padding:.2rem .5rem}
.pilot-error-list p{margin:.6rem 0 0;overflow-wrap:anywhere;white-space:pre-wrap}

/* Round progress and scoring states */
#roundProgress .admin-score-match{margin:1rem 0;padding:.6rem;border-radius:12px}
#roundProgress summary{padding:1rem;display:flex;flex-wrap:wrap;gap:.65rem 1.5rem;align-items:center;cursor:pointer}
#roundProgress summary strong{flex:1 1 12rem;font-size:1rem}
#roundProgress .round-start-time{font-weight:800;color:var(--teal-950)}
#roundProgress .seed-row{padding:1rem;gap:1rem;flex-wrap:wrap}
.round-state{font-weight:600;white-space:nowrap}
.score-start-time{font-size:1rem;font-weight:600;margin:.7rem 0 1.1rem}
.score-countdown{display:inline-block;margin:0 0 1rem;padding:.65rem .85rem;border-radius:9px;background:var(--teal-50);color:var(--teal-950);font-weight:800;font-variant-numeric:tabular-nums}
.score-countdown[hidden]{display:none}
.score-lineup-status{margin:.25rem 0 .7rem;color:var(--muted);font-size:.9rem;font-weight:600}
.score-lineup-status[hidden]{display:none}
.score-messages{margin:1rem 0;padding:1rem;border:2px solid var(--teal-650);border-radius:12px;background:var(--teal-50)}
.score-messages[hidden]{display:none}
.score-messages h2{margin:0 0 .5rem;font-size:1.05rem}
.score-messages article{padding:.75rem 0;border-top:1px solid var(--line)}
.score-messages article:first-child{border-top:0}
.score-messages small{color:var(--muted)}
.score-messages p{white-space:pre-wrap;margin:.4rem 0 .65rem;font-weight:600}
#scoreMessageDialog{width:min(560px,calc(100vw - 2rem));max-width:calc(100vw - 2rem)}
#scoreMessageDialog label{display:grid;gap:.4rem}
#scoreMessageDialog textarea{box-sizing:border-box;width:100%;resize:vertical;font:inherit}
.score-grid .hole-scored{background-color:color-mix(in srgb,var(--seal,#0f6b66) 10%,white)}
.score-grid .hole-active{
  background-color:color-mix(in srgb,var(--seal,#0f6b66) 20%,white);
  border-right:0;
  border-bottom:0;
  box-shadow:inset 2px 0 var(--seal,#0f6b66),inset -2px 0 var(--seal,#0f6b66);
}
.score-grid .score-order.hole-active{
  box-shadow:inset 2px 0 var(--seal,#0f6b66),inset -2px 0 var(--seal,#0f6b66),inset 0 2px var(--seal,#0f6b66);
}
.score-grid .score-cell.hole-active{
  position:relative;
  border:0;
  background-color:#fff;
  box-shadow:inset 2px 0 var(--seal,#0f6b66),inset -2px 0 var(--seal,#0f6b66),inset 0 -2px var(--seal,#0f6b66);
}
.score-grid .score-cell.hole-active::after{
  content:"";
  position:absolute;
  inset:6px;
  border:2px solid var(--seal,#0f6b66);
  border-radius:5px;
  pointer-events:none;
}
.score-grid .score-cell.hole-active,.score-grid .score-cell.hole-scored{color:#102421}
@media(max-width:600px){#roundProgress summary{padding:.7rem;gap:.6rem}#roundProgress .button-row{flex-wrap:wrap}dialog{max-width:calc(100vw - 2rem)}}

#roundProgress .round-actions{padding:.5rem 1rem 1rem;flex-wrap:wrap}
#roundProgress .round-match{margin:0 1rem 1rem;border:1px solid var(--line);border-radius:10px;overflow:hidden}
#roundProgress .round-match-head{display:block;padding:1rem}
#roundProgress .round-match-head>div{min-width:0;overflow-wrap:break-word}
#roundProgress .round-match-head strong{display:block;font-size:1rem}
#roundProgress .round-match-head small{display:block;margin-top:.4rem;color:var(--muted)}
#roundProgress .match-actions{padding:.5rem 1rem;flex-wrap:wrap}
#roundProgress .admin-score-link{grid-template-columns:minmax(0,1fr) auto}
#roundProgress .admin-score-link>div{min-width:0;overflow-wrap:break-word}
#roundProgress .score-link-actions{flex-wrap:wrap;justify-content:flex-end}
#roundStartDialog label{display:grid;gap:.5rem;margin:1rem 0}
#roundStartDialog input{font:inherit;padding:.6rem;max-width:100%}
@media(max-width:600px){#roundProgress .round-match{margin:0 .3rem .8rem}#roundProgress .admin-score-link{grid-template-columns:minmax(0,1fr)}#roundProgress .score-link-actions{justify-content:flex-start}}

.score-other-matches {display:flex;flex-wrap:wrap;gap:.25rem .8rem;margin:.4rem 0 .65rem;font-size:.875rem;line-height:1.45;color:var(--muted, #526460);}
.score-other-matches[hidden] {display:none;}
.score-other-matches > span {overflow-wrap:anywhere;}

/* Unified tournament flow */
#schedule[hidden],.setup-card[hidden],#saveSetup[hidden]{display:none!important}
#roundProgress .round-actions{align-items:center;flex-wrap:wrap}
#roundProgress .lineup-lock-status{font-size:.875rem;color:#52635f}
#roundProgress > details > details,#roundProgress .round-time-row{margin:1rem 0}
#roundProgress .playoff-place{display:block}

#roundProgress .schedule-pools{grid-template-columns:minmax(0,1fr);padding:1rem}
#roundProgress .schedule-pool>.round-match{margin:1rem}

/* Keep score status beside the editable holes and reduce the header height. */
.score-page .topbar{height:64px;padding:.4rem 1rem}
.score-page .brand img{width:94px;height:50px}
.score-embedded .topbar{display:none}
.score-page .score-heading{padding:1rem 0 .6rem}
.score-page .score-start-time{margin:.35rem 0 .6rem}
.score-page .score-heading .score-teams{margin:.6rem 0}
.score-page .score-teams article{min-height:84px;padding:.7rem;gap:.6rem}
.score-page .score-heading .score-totals{margin-top:.5rem}
.score-page .score-card{padding:.8rem}
.score-page .score-card .score-save{margin:0 0 .6rem;font-size:.875rem;line-height:1.4}
.score-page .match-status{margin:.6rem auto 0;padding:.7rem}

.score-other-section{margin:.4rem 0 .8rem;padding:.7rem .8rem;border:1px solid var(--line);border-radius:12px;background:#fff}
.score-other-section[hidden]{display:none}
.score-other-section h2{margin:0 0 .5rem;font-size:1rem}
.score-other-section #otherMatchesNotice{margin:0;font-size:.875rem;color:var(--muted)}
.score-other-section .score-other-matches{margin:0;gap:.5rem;color:var(--ink);font-size:1rem}
.score-other-section .score-other-matches>span{flex:1 1 220px;padding:.6rem;border-radius:8px;background:var(--teal-50);font-weight:650}

.score-other-section .score-other-matches>span{white-space:pre-line;font-size:.875rem;line-height:1.5;min-width:0}

/* Progress fills the entire status header for each match. */
.match-meta {
  position: relative;
  isolation: isolate;
  flex-wrap: nowrap;
  align-items: center;
  margin: -18px -20px 12px;
  padding: 6px 20px;
}
.match-progress {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.match-progress > span {
  display: block;
  width: var(--match-progress, 0%);
  height: 100%;
  background: rgba(15, 107, 102, .12);
}

@media (max-width: 600px) {
  .match-meta { margin: -15px -15px 12px; padding: 6px 15px; gap: 6px 12px; }
  .match-meta > strong { margin-left: auto; }
}

.match-meta .live-match-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: normal;
}
.live-match-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c94a4a;
}
.live-match-status.live > span { background: #d5a216; }
.live-match-status.confirmed > span { background: #32915b; }

.match-meta > span:not(.match-progress) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-meta .live-match-status { margin: 0 0 0 auto; padding: 0; background: none; white-space: nowrap; }

/* Shared plain status indicators for matches and games in Livescore. */
.live-game .game-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.live-game .game-state > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c94a4a;
}
.live-game .game-state.live > span,
.live-game .game-state.decided > span,
.live-match-status.decided > span { background: #d5a216; }
.live-game .game-state.confirmed > span { background: #32915b; }
.results-page .result-summary { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) {
  .results-page .result-summary { grid-template-columns: repeat(2, 1fr); }
}

/* Tournament phase view: the same results component as resultater.html. */
.tournament-live-home{background:#f3f6f4}
.tournament-podium{max-width:900px;margin:0 auto 2rem;border-radius:24px;overflow:hidden;box-shadow:0 16px 50px #12253622;background:#172a36}
.tournament-podium svg{display:block;width:100%;height:auto}
.podium-roster{display:none;list-style:none;margin:0;padding:1rem;color:#fff2dc}
.podium-roster li{padding:.65rem 0;border-bottom:1px solid #ffffff24}
.podium-roster li:last-child{border:0}
.podium-roster strong,.podium-roster span{display:block}
.podium-roster span{font-size:.9rem;line-height:1.5;margin-top:.25rem}
@media(max-width:600px){.tournament-podium{border-radius:14px}.podium-roster{display:block}.tournament-live-home .home-topbar nav a{display:inline-flex}}
