@font-face {
  font-family: "Aunor Sans";
  src: url("./assets/Poppins-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: "Aunor Sans";
  src: url("./assets/Poppins-SemiBold.ttf") format("truetype");
  font-display: swap;
  font-weight: 600;
}

@font-face {
  font-family: "Aunor Sans";
  src: url("./assets/Poppins-Bold.ttf") format("truetype");
  font-display: swap;
  font-weight: 700;
}

@font-face {
  font-family: "Aunor Display";
  src: url("./assets/Poppins-ExtraBold.ttf") format("truetype");
  font-display: swap;
  font-weight: 800;
}

:root {
  --navy-950: #10252e;
  --navy-900: #152831;
  --navy-800: #29434d;
  --blue-600: #f0473e;
  --blue-700: #d9352e;
  --blue-050: #fff0ec;
  --signal: #f0473e;
  --signal-dark: #c9342d;
  --signal-soft: #fff0ec;
  --success: #2f9070;
  --success-soft: #e5f2ed;
  --amber: #9a6818;
  --amber-soft: #fff5dc;
  --ink: #152831;
  --muted: #596b71;
  --quiet: #829095;
  --line: rgba(21, 40, 49, 0.14);
  --line-strong: rgba(21, 40, 49, 0.27);
  --paper: #fffefb;
  --ground: #f7f3eb;
  --ground-deep: #ece6db;
  --display: "Aunor Display", "Arial Narrow", sans-serif;
  --body: "Aunor Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --utility: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 2px rgba(21, 40, 49, 0.04), 0 8px 20px rgba(21, 40, 49, 0.045);
  --shadow-md: 0 24px 60px rgba(21, 40, 49, 0.15);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 15px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ground);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  font: 400 14px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
}

a,
button,
input,
select,
textarea,
summary {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(240, 71, 62, 0.28);
  outline-offset: 2px;
}

::selection {
  color: #fff;
  background: var(--blue-600);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand > span {
  display: grid;
  line-height: 1.05;
}

.brand strong {
  font: 800 19px/1 var(--display);
  letter-spacing: 0.045em;
}

.brand small {
  margin-top: 5px;
  color: currentColor;
  font: 600 9px/1 var(--utility);
  letter-spacing: 0.08em;
  opacity: 0.62;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-600);
  font: 700 10px/1.2 var(--utility);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Authentication: a field operations board paired with a quiet access card. */
.auth-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  isolation: isolate;
  overflow: hidden;
  background: var(--ground);
}

.auth-page::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 43% 0 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 72% 24%, rgba(185, 221, 209, 0.1), transparent 25%),
    linear-gradient(145deg, var(--navy-950), var(--navy-900) 67%, #29434d);
  background-size: 34px 34px, 34px 34px, auto;
}

.auth-page::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 57%;
  width: 5px;
  background: var(--signal);
}

.auth-brand {
  position: absolute;
  z-index: 3;
  top: 34px;
}

.auth-brand {
  left: clamp(30px, 5vw, 82px);
  color: #fff;
}

.auth-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
  align-self: center;
  padding: 130px clamp(34px, 7vw, 118px) 70px;
  color: #fff;
}

.auth-copy .eyebrow {
  color: #b9ddd1;
}

.auth-copy h1 {
  max-width: 650px;
  margin: 0;
  font: 800 clamp(40px, 5vw, 68px)/1.03 var(--display);
  letter-spacing: -0.045em;
}

.lede {
  max-width: 560px;
  margin: 25px 0 0;
  color: #c7d7e6;
  font-size: 17px;
  line-height: 1.75;
}

.feature-list {
  max-width: 590px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-list > div {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-list > div:first-child {
  padding-left: 0;
}

.feature-list > div:last-child {
  border-right: 0;
}

.feature-list small {
  color: #79b4f9;
  font: 700 9px/1 var(--utility);
  letter-spacing: 0.11em;
}

.feature-list span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
  color: #9eb5c8;
  font: 600 10px/1.4 var(--utility);
  letter-spacing: 0.025em;
}

.auth-status > span:first-child {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #54d4a5;
  box-shadow: 0 0 0 5px rgba(84, 212, 165, 0.11);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(430px, calc(100% - 56px));
  align-self: center;
  justify-self: center;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-top: 5px solid var(--signal);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

/* Language follows the sign-in flow instead of floating over the access card. */
.auth-locale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.auth-locale label {
  margin: 0;
  color: var(--muted);
  font: 700 10px/1.2 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-locale.locale-picker select {
  min-width: 132px;
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.auth-card-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.auth-step {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 4px;
  color: var(--blue-600);
  background: var(--blue-050);
  font: 700 9px/1 var(--utility);
  letter-spacing: 0.08em;
}

.auth-card h2 {
  margin: 0;
  font: 800 27px/1.12 var(--display);
  letter-spacing: -0.025em;
}

.auth-card-header p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.auth-steps::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14px;
  right: 16%;
  left: 16%;
  height: 1px;
  background: var(--line);
}

.auth-steps li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.auth-steps li > span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #f1b5ae;
  border-radius: 50%;
  color: var(--blue-700);
  background: var(--blue-050);
  font: 800 10px/1 var(--utility);
}

.auth-steps strong {
  max-width: 92px;
  font-size: 10px;
  line-height: 1.35;
}

.locale-picker select {
  width: auto;
  min-width: 112px;
  min-height: 40px;
  padding: 7px 34px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.98);
  font: 600 11px/1 var(--body);
  box-shadow: var(--shadow-sm);
}

label,
legend {
  display: block;
  margin: 17px 0 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #9badbb;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(240, 71, 62, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #9aa9b6;
}

textarea {
  resize: vertical;
}

.field-help,
.hint,
.tiny,
.format-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.session-note {
  position: relative;
  margin: 22px 0 0;
  padding: 12px 12px 12px 33px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: #faf7f2;
  font-size: 11px;
}

.session-note::before {
  content: "✓";
  position: absolute;
  left: 12px;
  color: var(--success);
  font-weight: 800;
}

.code-block {
  margin-top: 22px;
  padding-top: 3px;
  border-top: 1px solid var(--line);
}

.delivery-receipt {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 13px 0 2px;
  padding: 11px 12px;
  border-left: 3px solid var(--success);
  color: var(--ink);
  background: var(--success-soft);
}

.delivery-channel-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 144, 112, .27);
  color: var(--success);
  background: rgba(255,255,255,.65);
}

.delivery-channel-icon svg { width: 19px; height: 19px; }
.delivery-receipt[data-channel="email"] .delivery-icon-phone,
.delivery-receipt[data-channel="sms"] .delivery-icon-email { display: none; }
.delivery-receipt > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.delivery-receipt small { color: #39715f; font: 700 8px/1.25 var(--utility); text-transform: uppercase; }
.delivery-receipt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.delivery-receipt .text-button { color: #236b55; white-space: nowrap; }
.delivery-receipt .text-button:hover { color: var(--ink); }

/* Controls */
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.45;
}

.button-primary {
  color: #fff;
  background: var(--blue-600);
  box-shadow: 0 7px 16px rgba(240, 71, 62, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: var(--blue-700);
  box-shadow: 0 9px 22px rgba(217, 53, 46, 0.24);
}

.button-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper);
}

.button-secondary:hover:not(:disabled) {
  border-color: rgba(21, 40, 49, 0.35);
  background: #f4efe6;
}

.button-danger {
  color: #fff;
  background: var(--signal);
}

.button-danger:hover:not(:disabled) {
  background: var(--signal-dark);
}

.button-small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

.button[aria-busy="true"]::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.button[aria-busy="true"] {
  opacity: 0.78;
}

.auth-card > .button-primary,
.code-block .button-primary {
  width: 100%;
  margin-top: 17px;
}

.text-button {
  padding: 8px 9px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--ink);
}

.danger-text {
  color: var(--signal-dark);
}

.danger-outline {
  color: var(--signal-dark);
  border-color: #f2c5c7;
  background: var(--signal-soft);
}

.form-message {
  min-height: 19px;
  margin: 10px 0 0;
  color: var(--signal-dark);
  font-size: 11px;
  font-weight: 600;
}

/* Portal shell */
.portal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 22px;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(165deg, #10252e, #152831 70%, #19343d);
  background-size: 32px 32px, 32px 32px, auto;
}

.sidebar .brand {
  padding: 0 10px;
}

.account-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: 42px 0 27px;
  padding: 15px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.account-card strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: #b9ddd1;
  font: 600 9px/1.2 var(--utility);
}

.account-card small::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #52d1a1;
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--signal);
  font: 800 13px/1 var(--display);
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar .nav-link {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 7px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #9fb2c3;
  background: transparent;
  text-align: left;
  font: 600 12px/1 var(--body);
}

.nav-link::before {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  color: #86a1aa;
  font: 700 10px/1 var(--utility);
}

.nav-link[data-view="overview"]::before { content: "⌂"; }
.nav-link[data-view="tournaments"]::before { content: "◇"; }
.nav-link[data-view="events"]::before { content: "◷"; }
.nav-link[data-view="transport"]::before { content: "→"; }

.nav-link::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -18px;
  width: 3px;
  background: transparent;
}

.nav-link:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #fff;
  border-color: rgba(240, 71, 62, 0.32);
  background: rgba(240, 71, 62, 0.11);
}

.nav-link.active::before {
  border-color: rgba(240, 71, 62, 0.55);
  color: #ff9f97;
}

.nav-link.active::after {
  background: var(--signal);
}

.nav-link:disabled {
  opacity: 0.3;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-bottom .text-button {
  color: #91a8ba;
}

.portal-main {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 34px clamp(28px, 4.4vw, 66px) 84px;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
}

.portal-header h1 {
  margin: 0;
  font: 800 clamp(29px, 3.2vw, 43px)/1.06 var(--display);
  letter-spacing: -0.04em;
}

.page-summary {
  max-width: 610px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header-actions,
.heading-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.header-actions {
  flex-wrap: nowrap;
}

.portal-locale select {
  min-width: 72px;
  box-shadow: none;
}

.portal-page {
  min-height: min(670px, calc(100vh - 175px));
}

/* The operational pulse: a true context surface, not a decorative banner. */
.active-group-context {
  --group-accent: var(--signal);
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 30px;
  padding: 12px 15px;
  border: 1px solid #28404a;
  border-left: 6px solid var(--group-accent);
  border-radius: var(--radius-sm);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    var(--navy-900);
  background-size: 44px 100%, auto;
  box-shadow: var(--shadow-sm);
}

.active-group-context[data-kind="sos"] { --group-accent: #f50f28; }
.active-group-context[data-kind="family"] { --group-accent: #7c3aed; }
.active-group-context[data-kind="birthday"] { --group-accent: #f97316; }
.active-group-context[data-kind="sport"],
.active-group-context[data-kind="football"] { --group-accent: #18a94f; }
.active-group-context[data-kind="work"] { --group-accent: #2563eb; }
.active-group-context[data-kind="general"] { --group-accent: #64748b; }

.active-group-context:empty {
  display: none;
}

.context-pulse {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--group-accent);
  border-radius: 50%;
  color: var(--group-accent);
  background: #fff;
}

.context-pulse svg { width: 17px; height: 17px; }

.context-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.context-copy small {
  color: #8cbcec;
  font: 600 9px/1.2 var(--utility);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.context-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-meta {
  display: flex;
  gap: 8px;
}

.context-meta span {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: #b9c9d7;
  font: 600 9px/1 var(--utility);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

/* A true sequence: each guide explains the prerequisite and next action for
   the current module, keeping the work surface teachable without tutorials. */
.workflow-guide {
  display: grid;
  grid-template-columns: minmax(165px, 0.38fr) minmax(0, 1.62fr);
  gap: 18px;
  align-items: stretch;
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid #cfdde9;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(240, 71, 62, 0.055), transparent 32%),
    #fff;
  box-shadow: var(--shadow-sm);
}

.workflow-guide-heading {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 2px 16px 2px 2px;
  border-right: 1px solid var(--line);
}

.workflow-guide-heading > span {
  color: var(--blue-600);
  font: 700 9px/1.2 var(--utility);
  letter-spacing: 0.12em;
}

.workflow-guide-heading small {
  max-width: 220px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.workflow-guide ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-workflow ol {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.event-workflow ol,
.transport-workflow ol {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-guide li {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #faf7f2;
}

.workflow-guide li::after {
  content: "";
  position: absolute;
  top: 23px;
  right: -8px;
  width: 8px;
  height: 1px;
  background: var(--line-strong);
}

.workflow-guide li:last-child::after {
  display: none;
}

.workflow-guide li > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy-900);
  font: 700 9px/1 var(--utility);
}

.workflow-guide li > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workflow-guide li strong {
  color: var(--ink);
  font-size: 10px;
  line-height: 1.35;
}

.workflow-guide li small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.section-copy h2 {
  margin: 0;
  font: 800 23px/1.16 var(--display);
  letter-spacing: -0.025em;
}

.section-copy > p:last-child {
  max-width: 610px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.heading-actions {
  justify-content: flex-end;
}

.metric {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px;
  align-items: baseline;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.metric strong {
  color: var(--blue-600);
  font: 800 20px/1 var(--display);
}

.metric small {
  color: var(--muted);
  font: 600 9px/1 var(--utility);
}

/* Group selection and details */
.group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.group-card {
  --group-accent: #64748b;
  --group-soft: #f2f4f7;
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.group-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--group-accent);
}

.group-card[data-kind="work"] { --group-accent: #2563eb; --group-soft: #eaf1fb; }
.group-card[data-kind="sport"]::before,
.group-card[data-kind="football"]::before { background: var(--group-accent); }
.group-card[data-kind="sport"],
.group-card[data-kind="football"] { --group-accent: #18a94f; --group-soft: #ecf8ef; }
.group-card[data-kind="birthday"] { --group-accent: #f97316; --group-soft: #fff1e6; }
.group-card[data-kind="family"] { --group-accent: #7c3aed; --group-soft: #f1eaff; }
.group-card[data-kind="sos"] { --group-accent: #f50f28; --group-soft: #ffeef1; }

.group-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--group-accent) 48%, var(--line));
  box-shadow: 0 8px 18px rgba(21, 40, 49, 0.08);
}

.group-card.selected {
  border-color: var(--group-accent);
  background: color-mix(in srgb, var(--group-soft) 44%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--group-accent) 13%, transparent);
}

.group-card > button {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 16px 15px 20px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.group-type-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--group-accent) 24%, transparent);
  border-radius: 50%;
  color: var(--group-accent);
  background: var(--group-soft);
}

.group-type-mark svg { width: 23px; height: 23px; }

.group-card-body {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.group-card-top,
.group-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.group-card h3 {
  margin: 0;
  font: 800 15px/1.23 var(--display);
  letter-spacing: -0.02em;
}

.group-card-description {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.group-card-footer {
  min-width: 104px;
  display: grid;
  justify-items: end;
  gap: 5px;
  padding-left: 14px;
  border-left: 1px solid #eee8de;
  color: var(--muted);
  font: 600 9px/1 var(--utility);
}

.selected-mark {
  color: var(--group-accent);
  font-weight: 700;
}

.group-card .type-pill {
  color: var(--group-accent);
  background: var(--group-soft);
}

.group-open-arrow {
  color: var(--group-accent);
  font: 700 15px/1 var(--utility);
}

.type-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 23px;
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--blue-700);
  background: var(--blue-050);
  font: 700 9px/1 var(--utility);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.status-pill {
  color: var(--success);
  background: var(--success-soft);
}

.admin-mark {
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
}

.group-detail {
  margin-top: 18px;
}

.group-detail-card {
  --group-accent: #64748b;
  --group-soft: #f2f4f7;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--group-accent);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.group-detail-card[data-kind="sos"],
.group-workspace[data-kind="sos"] { --group-accent: #f50f28; --group-soft: #ffeef1; }
.group-detail-card[data-kind="family"],
.group-workspace[data-kind="family"] { --group-accent: #7c3aed; --group-soft: #f1eaff; }
.group-detail-card[data-kind="birthday"],
.group-workspace[data-kind="birthday"] { --group-accent: #f97316; --group-soft: #fff1e6; }
.group-detail-card[data-kind="sport"],
.group-detail-card[data-kind="football"],
.group-workspace[data-kind="sport"],
.group-workspace[data-kind="football"] { --group-accent: #18a94f; --group-soft: #ecf8ef; }
.group-detail-card[data-kind="work"],
.group-workspace[data-kind="work"] { --group-accent: #2563eb; --group-soft: #eaf1fb; }

.group-detail-card .type-pill {
  color: var(--group-accent);
  background: var(--group-soft);
}

.group-detail-primary,
.members-panel {
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
}

.members-panel {
  border-left: 1px solid var(--line);
  background: #faf7f2;
}

.group-detail-header {
  display: grid;
  gap: 15px;
}

.group-detail-header .card-actions { justify-content: flex-start; }

.group-detail h3 {
  margin: 11px 0 5px;
  font: 800 25px/1.14 var(--display);
  letter-spacing: -0.03em;
}

.group-detail-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.group-workspace {
  --group-accent: #64748b;
  --group-soft: #f2f4f7;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px 18px;
  align-items: center;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--group-accent) 20%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--group-soft) 58%, #fff);
}

.group-workspace-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-workspace .group-type-mark { flex: 0 0 auto; }

.group-workspace h4 {
  margin: 0;
  font: 800 13px/1.25 var(--display);
}

.group-workspace p {
  max-width: 520px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.group-workspace-actions {
  display: flex;
  justify-content: flex-start;
  gap: 7px;
  flex-wrap: wrap;
}

.protocol-preview {
  grid-column: auto;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--group-accent) 18%, var(--line));
  list-style: none;
}

.protocol-preview li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.protocol-preview li > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--group-accent);
  background: #fff;
  font: 800 8px/1 var(--utility);
}

.protocol-preview li > strong { font-size: 10px; }
.protocol-preview .protocol-empty { display: block; color: var(--muted); font-size: 10px; }

.invite-code {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 25px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--group-accent) 22%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--group-soft) 52%, #fff);
}

.invite-code span {
  display: grid;
  gap: 5px;
}

.invite-code small {
  color: var(--muted);
  font: 600 9px/1 var(--utility);
  text-transform: uppercase;
}

.invite-code strong {
  font: 700 18px/1 var(--utility);
  letter-spacing: 0.12em;
}

.group-detail-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.group-detail-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.group-detail-section h4 {
  margin: 0 0 12px;
  font: 700 10px/1.2 var(--utility);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.member-list,
.request-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-list li,
.request-list li {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 8px 3px;
  border-bottom: 1px solid var(--line);
}

.member-list li:last-child,
.request-list li:last-child {
  border-bottom: 0;
}

.member-list li > div,
.request-list li > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-list li > div > span:last-child {
  display: grid;
  gap: 2px;
}

.member-list strong,
.request-list strong {
  font-size: 11px;
}

.member-list small {
  color: var(--muted);
  font: 600 8px/1.2 var(--utility);
  text-transform: uppercase;
}

.member-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d6e4f0;
  border-radius: 50%;
  color: var(--blue-700);
  background: var(--blue-050);
  font: 800 11px/1 var(--display);
}

.group-detail-card .member-avatar {
  border-color: color-mix(in srgb, var(--group-accent) 25%, var(--line));
  color: var(--group-accent);
  background: var(--group-soft);
}

.member-row-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px !important;
}

.role-button { color: var(--group-accent); }

/* Content cards */
.tournament-list,
.event-list,
.route-list {
  display: grid;
  gap: 13px;
}

.tournament-card,
.event-card,
.route-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.tournament-card {
  padding: clamp(18px, 2.7vw, 28px);
}

.tournament-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tournament-card h3,
.event-card h3,
.route-card h3 {
  margin: 9px 0 0;
  font: 800 18px/1.2 var(--display);
  letter-spacing: -0.02em;
}

.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 9px;
  color: var(--muted);
  font: 600 10px/1.3 var(--utility);
}

.card-meta-line span {
  position: relative;
}

.card-meta-line span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.tournament-progress {
  display: grid;
  grid-template-columns: auto minmax(120px, 210px);
  gap: 11px;
  align-items: center;
  margin: 22px 0 4px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: #faf7f2;
}

.tournament-progress strong {
  font: 800 20px/1 var(--display);
}

.tournament-prizes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 15px;
}

.tournament-prizes > span {
  min-width: 135px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #eadcb9;
  border-radius: 6px;
  background: #fffaf0;
}

.tournament-prizes small { color: #8b6722; font: 700 8px/1.2 var(--utility); }
.tournament-prizes strong { font-size: 10px; }

.progress-copy {
  display: grid;
  gap: 4px;
}

.progress-copy small {
  color: var(--muted);
  font: 600 9px/1.2 var(--utility);
}

.progress-track,
.route-progress,
.public-route-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce5ec;
}

.progress-track span,
.route-progress span,
.public-route-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue-600);
  transition: width 300ms ease;
}

.bracket-stage {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdf9;
}

.bracket-stage summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
}

.bracket-stage summary::-webkit-details-marker {
  display: none;
}

.bracket-stage summary::after {
  content: "+";
  color: var(--blue-600);
  font: 700 18px/1 var(--utility);
}

.bracket-stage[open] summary::after {
  content: "−";
}

.stage-progress {
  margin-left: auto;
  color: var(--muted);
  font: 600 9px/1 var(--utility);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.entry {
  width: 100%;
  min-height: 84px;
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid #b6c5d1;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  text-align: left;
}

button.entry:hover:not(:disabled) {
  border-color: var(--blue-600);
  border-left-color: var(--blue-600);
}

.entry.completed {
  border-left-color: var(--success);
  background: #fbfefd;
}

.entry:disabled {
  cursor: default;
  opacity: 1;
}

.entry strong {
  font-size: 11px;
}

.entry small {
  color: var(--muted);
  font: 600 8px/1.3 var(--utility);
}

.table-shell {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.standings th,
.standings td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.standings th {
  color: var(--muted);
  background: #faf7f2;
  font: 700 9px/1 var(--utility);
  text-transform: uppercase;
}

.standings tr:last-child td {
  border-bottom: 0;
}

/* Tournament competition desk */
.tournament-overview:empty,
.tournament-toolbar:empty { display: none; }

.competition-ledger {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(230px, .85fr) minmax(420px, 1.15fr);
  align-items: stretch;
  margin: 18px 0 14px;
  border: 1px solid #24414b;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(115deg, transparent 66%, rgba(24, 169, 79, .13) 66%),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--navy-950);
  background-size: auto, 54px 100%, auto;
}

.competition-ledger-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 19px 21px;
  border-right: 1px solid rgba(255,255,255,.12);
}

.competition-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.19);
  color: #73dc95;
  background: rgba(24,169,79,.12);
}

.competition-symbol svg { width: 25px; height: 25px; }
.competition-ledger-heading .eyebrow { margin: 0 0 5px; color: #73dc95; }
.competition-ledger-heading strong { display: block; max-width: 290px; font-size: 11px; line-height: 1.45; }

.competition-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.competition-metrics > span {
  min-height: 90px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px 20px;
  border-right: 1px solid rgba(255,255,255,.12);
}

.competition-metrics > span:last-child { border-right: 0; }
.competition-metrics small { color: #b7c6ca; font: 700 8px/1.25 var(--utility); letter-spacing: .04em; text-transform: uppercase; }
.competition-metrics strong { font: 800 25px/1 var(--display); }
.competition-metrics em { color: #91a6ad; font: 400 8px/1.2 var(--body); font-style: normal; }

.tournament-toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: rgba(255,254,251,.72);
}

.tournament-toolbar > small { padding-right: 7px; color: var(--muted); font: 700 8px/1 var(--utility); text-transform: uppercase; }
.tournament-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.tournament-filter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.tournament-filter span {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: #ece9e2;
  font: 800 8px/1 var(--utility);
}

.tournament-filter:hover { color: var(--ink); background: #f4f0e8; }
.tournament-filter.active { border-color: #acd9bb; color: #0b6731; background: #edf8f0; }
.tournament-filter.active span { color: #fff; background: #18a94f; }

.tournament-zero { border-color: #bcdcc6; background: #f2faf4; }
.tournament-list { gap: 11px; }
.tournament-card { overflow: hidden; padding: 0; transition: border-color 160ms ease, box-shadow 160ms ease; }
.tournament-card.expanded { border-color: #a9cfb4; box-shadow: 0 12px 30px rgba(21,40,49,.08); }

.tournament-card > .tournament-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 20px 15px;
}

.tournament-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
}

.tournament-format-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #b7dec2;
  color: #168743;
  background: #eff9f2;
}

.tournament-format-icon[data-category="timed"] { border-color: #bad7eb; color: #236b9a; background: #eef7fc; }
.tournament-format-icon[data-category="league"] { border-color: #dccda5; color: #87621c; background: #fff9ea; }
.tournament-format-icon[data-category="special"] { border-color: #d7c3e8; color: #72439b; background: #f7f1fc; }
.tournament-format-icon svg { width: 23px; height: 23px; }
.tournament-identity h3 { margin-top: 7px; }

.tournament-command-row {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(220px, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  padding: 0 20px 18px;
}

.tournament-command-row .tournament-progress {
  min-height: 62px;
  grid-template-columns: auto minmax(110px, 1fr);
  margin: 0;
  padding: 11px 13px;
  background: #f5f2eb;
}

.tournament-command-row .progress-track span { background: #18a94f; }
.tournament-highlight {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 11px 14px;
  border-left: 3px solid #18a94f;
  background: #f1f8f3;
}

.tournament-highlight small { color: #39714c; font: 700 8px/1.25 var(--utility); text-transform: uppercase; }
.tournament-highlight strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.tournament-highlight.waiting { border-left-color: #d0a14d; background: #fff9ec; }
.tournament-highlight.waiting small { color: #8b6722; }
.tournament-primary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }

.tournament-card > .tournament-prizes {
  margin: -4px 20px 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.tournament-detail {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: #fbfaf6;
}

.competition-section + .competition-section { margin-top: 18px; }
.competition-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 11px;
}

.competition-section-heading .eyebrow { margin-bottom: 4px; color: #168743; }
.competition-section-heading h4 { margin: 0; font: 800 15px/1.2 var(--display); }
.competition-section-heading > small { max-width: 360px; color: var(--muted); font-size: 9px; text-align: right; }

.tournament-bracket {
  display: flex;
  align-items: stretch;
  gap: 34px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 4px 16px;
  scrollbar-color: #a9b9b0 transparent;
  scrollbar-width: thin;
}

.bracket-round { width: 230px; flex: 0 0 230px; display: grid; grid-template-rows: auto 1fr; }
.bracket-round > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 9px;
  border-bottom: 2px solid #18a94f;
}

.bracket-round > header strong { font: 800 10px/1.25 var(--utility); }
.bracket-round > header small { color: var(--muted); font: 700 8px/1 var(--utility); }
.bracket-round > div { display: flex; flex-direction: column; justify-content: space-around; gap: 18px; padding: 16px 0; }

.competition-match {
  position: relative;
  border: 1px solid #cad6ce;
  border-left: 3px solid #d0a14d;
  background: #fff;
  box-shadow: 0 4px 12px rgba(21,40,49,.045);
}

.bracket-round:not(:last-child) .competition-match::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -18px;
  width: 18px;
  border-top: 1px solid #9db3a4;
}

.bracket-round + .bracket-round .competition-match::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -18px;
  width: 18px;
  border-top: 1px solid #9db3a4;
}

.competition-match.completed { border-left-color: #18a94f; }
.competition-match > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line); background: #f5f7f3; }
.competition-match > header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 700 7px/1.2 var(--utility); text-transform: uppercase; }
.competition-match > header span { flex: 0 0 auto; color: #7e6a3e; font: 700 7px/1.2 var(--utility); }
.competition-match.completed > header span { color: #168743; }
.match-participants { display: grid; }
.match-participant { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line); font-size: 9px; }
.match-participant:last-child { border-bottom: 0; }
.match-participant > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-participant strong { color: #168743; font: 800 7px/1 var(--utility); text-transform: uppercase; }
.match-participant.winner { color: #0d6832; background: #eff9f2; font-weight: 700; }
.match-participant.empty { color: var(--quiet); }
.match-result-button { width: 100%; min-height: 31px; border: 0; border-top: 1px solid var(--line); color: #0d6832; background: #f4faf5; font-size: 8px; font-weight: 700; }
.match-result-button:hover { color: #fff; background: #168743; }

.tournament-stage-list { display: grid; gap: 8px; }
.competition-stage { border: 1px solid var(--line); background: #fff; }
.competition-stage > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; cursor: pointer; list-style: none; }
.competition-stage > summary::-webkit-details-marker { display: none; }
.competition-stage > summary > span:first-child { display: grid; gap: 3px; }
.competition-stage > summary strong { font-size: 10px; }
.competition-stage > summary small { color: var(--muted); font: 700 8px/1.2 var(--utility); }
.competition-stage > summary > span:last-child { color: #168743; font: 800 18px/1 var(--utility); transition: transform 150ms ease; }
.competition-stage[open] > summary > span:last-child { transform: rotate(45deg); }
.competition-match-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 8px; padding: 0 12px 12px; }

.standings-section .table-shell { margin-top: 0; background: #fff; }
.standings-section .standings tbody tr:first-child { color: #0d6832; background: #f2faf4; }
.standings-section .standings tbody tr:first-child td:first-child strong::after { content: " ·"; color: #d7a328; }

.event-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.event-card.is-attending {
  border-left: 4px solid #24a77c;
}

.event-honoree {
  margin-top: 4px !important;
  color: var(--blue-700) !important;
  font-weight: 700;
}

.event-summary { margin-bottom: 14px; }

.event-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #1d4669;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    var(--navy-900);
  background-size: 28px 100%, auto;
  box-shadow: var(--shadow-sm);
}

.event-ledger > span {
  position: relative;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 11px;
  padding: 17px 21px;
  border-right: 1px dashed rgba(255,255,255,.22);
}

.event-ledger > span:last-child { border-right: 0; }
.event-ledger small { grid-column: 1 / -1; color: #9fc4e4; font: 700 8px/1 var(--utility); letter-spacing: .08em; text-transform: uppercase; }
.event-ledger strong { font: 800 25px/1 var(--display); }
.event-ledger em { align-self: end; color: #c9d8e5; font: 600 9px/1.2 var(--utility); font-style: normal; }

.event-tabs { margin-bottom: 15px; }
.event-panel[hidden] { display: none; }

.event-location-row {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(90px, .7fr) auto;
  gap: 8px;
  margin: 8px 0 15px;
}

.honoree-option { margin-top: 12px; }

.event-detail-dialog { width: min(790px, calc(100% - 28px)); }
.event-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 4px 0 19px; }
.event-detail-hero p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.event-detail-hero time { color: var(--navy-900); font: 800 12px/1.3 var(--utility); text-align: right; }

.event-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #faf7f2;
}

.event-detail-metrics span { min-height: 67px; display: grid; align-content: center; gap: 4px; padding: 12px 14px; border-right: 1px solid var(--line); }
.event-detail-metrics span:last-child { border-right: 0; }
.event-detail-metrics span:nth-child(3):last-child { grid-column: span 2; }
.event-detail-metrics strong { font: 800 18px/1 var(--display); }
.event-detail-metrics small { color: var(--muted); font: 700 8px/1 var(--utility); text-transform: uppercase; }

.event-detail-section,
.event-weather-panel {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.event-detail-section > header,
.event-ops-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.event-detail-section h3,
.event-ops-section h3 { margin: 0; font: 800 14px/1.2 var(--display); }

.attendee-roster,
.waitlist-roster { display: flex; flex-wrap: wrap; gap: 6px; }
.attendee-roster span,
.waitlist-roster span { padding: 6px 9px; border: 1px solid #d6e5f1; border-radius: 20px; color: #31536f; background: var(--blue-050); font: 700 9px/1 var(--utility); }
.waitlist-roster { align-items: center; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.waitlist-roster strong { margin-right: 4px; font-size: 10px; }
.waitlist-roster span { color: #745a21; border-color: #eadcb9; background: #fffaf0; }

.event-weather-panel { min-height: 62px; display: flex; align-items: center; gap: 12px; color: var(--muted); background: #f8fafc; }
.event-weather-panel .transport-loading { min-height: 30px; padding: 0; }
.weather-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #8a6726; background: #fff6dc; font-size: 19px; }
.event-weather-panel div { display: grid; gap: 2px; }
.event-weather-panel strong { font: 800 17px/1 var(--display); color: var(--ink); }
.event-weather-panel p { margin: 0; font-size: 9px; }

.lineup-section { background: linear-gradient(180deg, #fffefb 0, #faf7f2 100%); }
.lineup-section > header > div { display: grid; gap: 3px; }
.lineup-section > header .eyebrow { margin: 0; }
.lineup-mode {
  padding: 5px 8px;
  border: 1px solid #c9deee;
  border-radius: 999px;
  color: #315e81;
  background: #edf7ff;
  font: 800 8px/1 var(--utility);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.team-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.team-board article { overflow: hidden; border: 1px solid #d7e2eb; border-radius: 9px; background: #fff; box-shadow: 0 5px 16px rgba(18, 48, 72, .05); }
.team-board article > header { display: flex; align-items: center; gap: 10px; padding: 11px; border-bottom: 1px solid #e4ebf1; background: #f8fafc; }
.team-board article > header div { min-width: 0; display: grid; gap: 3px; }
.team-board article > header strong { overflow: hidden; font: 800 11px/1.2 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.team-board article > header small { color: var(--muted); font-size: 8px; }
.team-number {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(8, 35, 56, .14);
  border-radius: 8px 8px 3px 3px;
  color: #fff;
  background: var(--blue-600);
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .08);
  font: 900 10px/1 var(--utility);
}
.kit-color-white { color: var(--navy-900); background: #fff; }
.kit-color-black { background: #17212b; }
.kit-color-red { background: #d73746; }
.kit-color-blue { background: #216bd8; }
.kit-color-light_blue { background: #55b8dc; }
.kit-color-green { background: #2f9b69; }
.kit-color-yellow { color: #302914; background: #f4cc3a; }
.kit-color-orange { background: #ed8a2d; }
.kit-color-purple { background: #7656bd; }
.kit-color-pink { background: #d96d9c; }
.kit-color-gray { background: #8493a0; }
.kit-color-custom { background: repeating-linear-gradient(135deg, #143d5d 0 7px, #ef4356 7px 14px); }
.kit-color-none { background: #a9b7c2; }
.team-kit-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 9px 10px 0; }
.team-kit-editor select,
.team-kit-editor input { width: 100%; min-width: 0; min-height: 32px; font-size: 9px; }
.team-board ul { min-height: 52px; margin: 0; padding: 8px 10px 6px; list-style: none; }
.team-board li { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(82px, .72fr); align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #e2e9ef; font-size: 9px; }
.team-board li:last-child { border-bottom: 0; }
.team-board li > span { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.team-board li select { width: 100%; min-width: 0; min-height: 30px; padding: 5px 25px 5px 7px; font-size: 8px; }
.team-board li.empty-lineup { display: block; color: var(--muted); }
.team-board .text-button { margin: 3px 9px 10px; }
.team-unassigned { margin: 11px 0 0; padding: 10px; border: 1px dashed #cbdbe7; border-radius: 8px; color: var(--muted); background: #f8fbfd; font-size: 9px; }
.team-unassigned > strong { display: block; margin-bottom: 5px; color: var(--navy-900); font: 800 9px/1 var(--utility); text-transform: uppercase; }
.team-unassigned > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.team-unassigned li { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(82px, .72fr); align-items: center; gap: 8px; padding: 5px 0; list-style: none; }
.team-unassigned li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-unassigned select { min-width: 0; width: 100%; min-height: 30px; padding: 5px 25px 5px 7px; font-size: 8px; }
.team-controls > div { display: grid; grid-template-columns: 78px repeat(4, max-content); align-items: center; gap: 8px; }

.bring-list,
.event-note-list { display: grid; gap: 7px; }
.bring-list article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfd; }
.bring-list article > div:first-child { display: grid; gap: 2px; }
.bring-list small { color: var(--muted); font-size: 8px; }
.bring-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.bring-people { max-width: 340px; line-height: 1.45; }
.bring-claim { display: flex; gap: 6px; }
.bring-claim input { width: 65px; min-height: 34px; }
.inline-event-form { display: grid; grid-template-columns: minmax(0, 1fr) 92px auto; gap: 8px; margin-top: 10px; }
.event-note-list article { padding: 10px; border-left: 3px solid var(--signal); background: #faf7f2; }
.event-note-list article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.event-note-list p { margin: 4px 0; font-size: 10px; }
.event-note-list small { color: var(--muted); font-size: 8px; }
.event-note-list img { width: min(100%, 440px); max-height: 320px; display: block; margin-top: 9px; border: 1px solid var(--line); border-radius: 7px; object-fit: cover; }
.event-note-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 10px; }
.external-gift-list { border-style: dashed; background: #fffdf8; }
.external-gift-list > header { margin: 0; }
.event-album-strip { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-color: #bad9ee; background: linear-gradient(110deg, #edf8ff, #fff 62%); }
.event-album-strip > div { min-width: 0; display: grid; gap: 4px; }
.event-album-strip .eyebrow { margin: 0; }
.event-album-strip h3 { max-width: 540px; color: #31536f; font: 650 10px/1.45 var(--utility); }

.event-album-dialog { width: min(920px, calc(100% - 28px)); }
.album-privacy-note { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 11px 12px; border: 1px solid #cde1ef; border-radius: 8px; color: #31536f; background: #f0f8fd; }
.album-privacy-note > span { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue-600); font-weight: 900; }
.album-privacy-note p { margin: 1px 0 0; font-size: 9px; line-height: 1.5; }
.event-album-grid { min-height: 230px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 10px; }
.event-album-grid .transport-loading,
.event-album-grid .operations-empty { grid-column: 1 / -1; }
.event-album-grid figure { min-width: 0; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.event-album-grid figure > a { aspect-ratio: 4 / 3; display: block; overflow: hidden; background: #e8eef3; }
.event-album-grid img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 180ms ease; }
.event-album-grid figure:hover img { transform: scale(1.025); }
.event-album-grid figcaption { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; }
.event-album-grid figcaption > span { min-width: 0; display: grid; gap: 2px; }
.event-album-grid figcaption strong,
.event-album-grid figcaption small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-album-grid figcaption strong { font-size: 9px; }
.event-album-grid figcaption small { color: var(--muted); font-size: 7px; }
.album-empty { min-height: 230px; display: grid; place-items: center; }
.album-actions { align-items: center; }
.file-button { position: relative; overflow: hidden; }
.file-button input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: 3px solid rgba(35, 112, 225, .23); outline-offset: 2px; }

.event-operations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.event-ops-section { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.skill-roster { display: grid; }
.skill-roster label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.skill-roster label:last-child { border-bottom: 0; }
.skill-roster span { display: grid; gap: 2px; }
.skill-roster small { color: var(--muted); font-size: 8px; }
.skill-roster select { width: 70px; }
.pickup-list { display: grid; gap: 8px; }
.pickup-list article { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafbfd; }
.pickup-list p { margin: 4px 0; font-size: 10px; }
.pickup-list small { color: var(--muted); font-size: 8px; }
.pickup-list ul { margin: 8px 0 0; padding: 8px 0 0 16px; border-top: 1px dashed var(--line); }
.pickup-list li { margin: 3px 0; font-size: 9px; }
.pickup-composer { display: grid; gap: 14px; }
.pickup-composer label { display: grid; gap: 6px; }

.event-date-block {
  min-height: 84px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--navy-900);
  text-align: center;
}

.event-date-block strong {
  font: 800 27px/1 var(--display);
}

.event-date-block span,
.event-date-block small {
  font: 600 9px/1.3 var(--utility);
  text-transform: uppercase;
}

.event-date-block span {
  margin-bottom: 5px;
  color: #8fc4fa;
}

.event-date-block small {
  margin-top: 5px;
  color: #c3d3e1;
}

.event-main,
.route-main {
  min-width: 0;
}

.event-main p,
.route-main p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.event-meta span {
  padding: 5px 8px;
  border-radius: 4px;
  color: var(--muted);
  background: #f1f5f8;
  font: 600 9px/1 var(--utility);
}

.route-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.6fr) auto;
  gap: 22px;
  align-items: center;
  padding: 20px;
}

.route-status {
  display: grid;
  gap: 9px;
}

.route-progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.route-progress-copy strong {
  font: 800 22px/1 var(--display);
}

.route-progress-copy span,
.route-percent {
  color: var(--muted);
  font: 600 9px/1.2 var(--utility);
}

.empty-state {
  position: relative;
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 7px;
  overflow: hidden;
  padding: 32px;
  border: 1px dashed #aebfcd;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.empty-state::before {
  content: "—";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue-600);
  background: #fff;
  font: 700 16px/1 var(--utility);
}

.empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-state span {
  max-width: 440px;
  font-size: 11px;
}

/* Dialogs and forms */
.dialog {
  width: min(650px, calc(100% - 28px));
  max-height: min(92vh, 850px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 95px rgba(7, 27, 45, 0.34);
}

.dialog::backdrop {
  background: rgba(7, 27, 45, 0.72);
  backdrop-filter: blur(3px);
}

.dialog form,
.dialog-form {
  max-height: min(92vh, 850px);
  padding: 26px;
  overflow-y: auto;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -26px -26px 23px;
  padding: 23px 26px 20px;
  border-top: 4px solid var(--blue-600);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.dialog-heading h2,
.confirm-dialog h2 {
  margin: 0;
  font: 800 22px/1.15 var(--display);
  letter-spacing: -0.025em;
}

.form-intro,
.selection-help {
  position: relative;
  margin: 0 0 18px;
  padding: 12px 13px 12px 38px;
  border-left: 3px solid var(--blue-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  background: var(--blue-050);
  font-size: 11px;
  line-height: 1.55;
}

.form-intro::before,
.selection-help::before {
  content: "i";
  position: absolute;
  top: 12px;
  left: 13px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue-600);
  font: 700 9px/1 var(--utility);
}

.selection-help {
  margin: 8px 0 2px;
  padding-block: 10px;
}

.selection-help::before {
  top: 10px;
}

.location-consent-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -7px 0 18px;
  padding: 11px 12px;
  border: 1px solid #c9e7dc;
  border-radius: var(--radius-sm);
  color: #315f50;
  background: #f1faf7;
  font-size: 10px;
  line-height: 1.5;
}

.location-consent-note span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: #15966f;
  font: 800 12px/1 var(--utility);
}

.location-consent-note p { margin: 1px 0 0; }

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #fff;
  font: 400 20px/1 var(--body);
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.icon-button:disabled {
  opacity: 0.32;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-grid label {
  margin-top: 13px;
}

.form-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prize-fields {
  background: #f8fbfd;
}

.timed-result-fields {
  background: #f8fbfd;
}

.timing-entry-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.timing-entry-list label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 145px;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.timing-entry-list label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}

.timing-entry-list input {
  min-height: 39px;
  font-family: var(--utility);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

fieldset {
  min-width: 0;
  margin: 20px 0 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

fieldset legend {
  padding: 0 7px;
  margin: 0;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-list label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdf9;
  font-size: 11px;
}

.check-list label:has(input:checked) {
  border-color: #accdf5;
  color: var(--blue-700);
  background: var(--blue-050);
}

.check-list input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue-600);
}

.format-recommendation {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.compact-dialog {
  width: min(480px, calc(100% - 28px));
}

.confirm-dialog .dialog-form {
  text-align: center;
}

.confirm-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: var(--signal-dark);
  background: var(--signal-soft);
  font: 800 21px/1 var(--display);
}

.confirm-message {
  max-width: 360px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 12px;
}

.confirm-dialog .dialog-actions {
  justify-content: center;
}

.share-dialog #shareLinkInput {
  margin-top: 10px;
  font: 500 11px/1.4 var(--utility);
}

.export-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.export-choice {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.export-choice:hover {
  transform: translateY(-2px);
  border-color: #a9c8ed;
  box-shadow: 0 12px 24px rgba(7, 27, 45, 0.08);
}

.export-choice:disabled {
  transform: none;
  opacity: 0.62;
}

.export-choice > span:last-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.export-choice strong {
  font-size: 12px;
}

.export-choice small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.export-file-mark {
  width: 45px;
  height: 55px;
  display: grid;
  place-items: end center;
  padding-bottom: 9px;
  border: 1px solid #f0b9bd;
  border-top: 5px solid var(--signal);
  border-radius: 4px;
  color: var(--signal-dark);
  background: var(--signal-soft);
  font: 800 8px/1 var(--utility);
  letter-spacing: 0.06em;
}

.export-file-mark.image-mark {
  border-color: #f2bbb5;
  border-top-color: var(--blue-600);
  color: var(--blue-700);
  background: var(--blue-050);
}

.route-stop-rows {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.route-stop-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f9fbfc;
}

.route-stop-row.is-origin {
  border-color: #b9d5f6;
  background: var(--blue-050);
}

.route-stop-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #b9d5f6;
  border-radius: 50%;
  color: var(--blue-700);
  background: #fff;
  font: 800 8px/1 var(--utility);
  text-align: center;
  text-transform: uppercase;
}

.route-stop-fields,
.route-stop-location-grid,
.route-stop-delivery-grid { min-width: 0; }

.route-stop-location-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(2, minmax(110px, 0.7fr));
  gap: 9px;
}

.route-stop-delivery-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(90px, 0.55fr) minmax(90px, 0.45fr) repeat(2, minmax(140px, 1fr));
  gap: 9px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.route-stop-row.is-origin .route-stop-delivery-grid { display: none; }

.route-stop-row label {
  min-width: 0;
  margin: 0;
}

.route-stop-row label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font: 600 9px/1 var(--utility);
}

.route-stop-row input,
.route-stop-row select {
  min-height: 38px;
  padding: 8px;
  background: #fff;
}

.route-stop-actions {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 5px;
}

.route-stop-actions .use-location-button {
  grid-column: 1 / -1;
}

.use-location-button {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--blue-700);
  background: #fff;
  font: 700 8px/1.15 var(--utility);
}

/* Transport dispatch center */
.transport-heading { margin-bottom: 16px; }

.transport-summary { margin-bottom: 14px; }

.transport-live-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #1b4262;
  border-radius: var(--radius-sm);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--navy-900);
  background-size: 48px 100%, auto;
}

.transport-live-strip > span {
  min-height: 72px;
  display: grid;
  align-content: center;
  padding: 13px 18px;
  border-right: 1px solid rgba(255,255,255,.12);
}

.transport-live-strip > span:last-child { border-right: 0; }
.transport-live-strip strong { font: 800 24px/1 var(--display); }
.transport-live-strip small { margin-top: 7px; color: #aec5d7; font: 700 8px/1.2 var(--utility); text-transform: uppercase; }
.transport-live-strip .dispatch-signal { position: relative; padding-left: 39px; }
.dispatch-signal i { position: absolute; top: 21px; left: 18px; width: 9px; height: 9px; border: 2px solid rgba(87,212,165,.28); border-radius: 50%; background: #57d4a5; box-shadow: 0 0 0 5px rgba(87,212,165,.1); }

.transport-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #eee8de;
  scrollbar-width: none;
}

.transport-tabs::-webkit-scrollbar { display: none; }
.transport-tab { min-height: 38px; flex: 1 0 max-content; padding: 9px 16px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font: 700 10px/1 var(--utility); }
.transport-tab.active { color: var(--navy-900); background: #fff; box-shadow: 0 1px 5px rgba(7,27,45,.11); }
.transport-panel { margin-top: 13px; }
.transport-panel[hidden] { display: none; }

.transport-loading {
  min-height: 110px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  background: rgba(255,255,255,.5);
  font-size: 11px;
}

.transport-loading > span { width: 22px; height: 22px; border: 2px solid var(--line); border-right-color: var(--blue-600); border-radius: 50%; animation: spin 800ms linear infinite; }

.dispatch-route-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid #93a8b9;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.dispatch-route-card.is-live { border-left-color: #24a77c; }
.dispatch-route-card.is-live::before { content: ""; position: absolute; top: 0; right: 0; width: 86px; height: 4px; background: #24a77c; }
.dispatch-route-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dispatch-route-card h3 { margin: 8px 0 3px; font: 800 18px/1.2 var(--display); letter-spacing: -.02em; }
.dispatch-route-card header p { margin: 0; color: var(--muted); font-size: 10px; }
.route-progress-number { color: var(--blue-700); font: 800 27px/1 var(--display); }
.route-status-pill { width: max-content; display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 3px; color: #596b71; background: #f0ebe3; font: 800 7px/1 var(--utility); letter-spacing: .08em; text-transform: uppercase; }
.route-status-pill > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.route-status-pill.active { color: #087253; background: var(--success-soft); }
.route-status-pill.completed { color: var(--blue-700); background: var(--blue-050); }
.route-status-pill.cancelled { color: var(--signal-dark); background: var(--signal-soft); }

.route-tracking-live {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #b8e1d3;
  border-radius: var(--radius-sm);
  color: #087253;
  background: var(--success-soft);
  font: 800 9px/1 var(--utility);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.route-tracking-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24a77c;
  box-shadow: 0 0 0 4px rgba(36, 167, 124, .14);
}
.dispatch-route-meta { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr; gap: 1px; margin: 16px 0 12px; border: 1px solid var(--line); background: var(--line); }
.dispatch-route-meta > span { min-width: 0; padding: 10px 12px; background: #faf7f2; }
.dispatch-route-meta small,
.route-detail-summary small,
.route-plan-summary small { display: block; margin-bottom: 4px; color: var(--quiet); font: 700 7px/1 var(--utility); text-transform: uppercase; }
.dispatch-route-meta strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.route-progress { height: 5px; overflow: hidden; border-radius: 2px; background: #ece6dc; }
.route-progress > span { display: block; height: 100%; background: var(--blue-600); }
.route-stop-line { display: flex; gap: 0; margin: 15px 0 3px; padding: 0; overflow-x: auto; list-style: none; }
.route-stop-line li { position: relative; min-width: 108px; flex: 1 0 108px; padding: 0 10px 0 24px; }
.route-stop-line li::before { content: ""; position: absolute; top: 10px; left: 0; width: 100%; height: 1px; background: var(--line-strong); }
.route-stop-line li span { position: relative; z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; margin-left: -24px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); background: #fff; font: 800 7px/1 var(--utility); }
.route-stop-line li.arrived span { border-color: #69c3a4; color: #087253; background: var(--success-soft); }
.route-stop-line li.skipped span { border-color: #e0b77c; color: var(--amber); background: var(--amber-soft); }
.route-stop-line strong { display: block; margin-top: 6px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.paperwork-flag,
.route-cancel-note { margin: 12px 0 0; padding: 8px 10px; border-left: 3px solid var(--amber); color: #79500e; background: var(--amber-soft); font-size: 9px; }
.route-cancel-note { border-left-color: var(--signal); color: var(--signal-dark); background: var(--signal-soft); }

.operations-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--line); }
.operations-metrics > span { padding: 15px; background: #fff; }
.operations-metrics strong { display: block; font: 800 23px/1 var(--display); }
.operations-metrics small { display: block; margin-top: 6px; color: var(--muted); font: 700 8px/1.2 var(--utility); }
.operations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.operations-section { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.operations-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.operations-section h3 { margin: 3px 0 0; font: 800 16px/1.1 var(--display); }
.operations-card-list,
.driving-list { display: grid; gap: 8px; }
.operations-card { padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: #fffdf9; }
.operations-card > header { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; }
.operations-card h4 { margin: 0; font-size: 11px; }
.operations-card p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.operations-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #f2c2bc; color: var(--blue-700); background: var(--blue-050); font: 800 9px/1 var(--utility); }
.operations-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 8px; }
.operations-card-meta strong { color: var(--amber); }
.incident-resolution-summary { display: grid; gap: 6px; margin-top: 9px; padding: 8px 9px; border-left: 2px solid var(--blue-600); background: var(--blue-050); }
.incident-resolution-summary span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.incident-resolution-summary small { color: var(--muted); font: 700 7px/1 var(--utility); text-transform: uppercase; }
.incident-resolution-summary strong { font-size: 8px; }
.incident-resolution-summary p { margin: 0; color: var(--ink); font-size: 8px; }
.operations-empty { padding: 18px; border: 1px dashed var(--line-strong); color: var(--muted); background: #faf7f2; font-size: 9px; text-align: center; }
.driving-section { grid-column: 1 / -1; }
.driving-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); background: #fffdf9; }
.driving-row strong,
.driving-row span { display: block; }
.driving-row strong { font-size: 10px; }
.driving-row span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.driving-score { min-width: 62px; padding: 7px 9px; border: 1px solid var(--line); color: var(--ink); background: #fff; }
.driving-score small,
.driving-score strong { display: block; text-align: center; }
.driving-score small { color: var(--quiet); font: 700 6px/1 var(--utility); }
.driving-score strong { margin-top: 3px; font: 800 17px/1 var(--display); }
.driving-score.good { border-color: #9ad3bf; color: #087253; }
.driving-score.warn { border-color: #e7c896; color: var(--amber); }
.driving-score.bad { border-color: #efb6ba; color: var(--signal-dark); }
.settings-section { grid-column: 1 / -1; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; }
.setting-toggle strong,
.setting-toggle small { display: block; }
.setting-toggle strong { font-size: 10px; }
.setting-toggle small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.setting-toggle input { width: 42px; min-height: 23px; accent-color: var(--blue-600); }

.route-dialog { width: min(960px, calc(100% - 28px)); }
.route-detail-dialog { width: min(720px, calc(100% - 28px)); }
.route-schedule { background: #faf7f2; }
.switch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.check-option { min-height: 42px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); background: #fff; font-size: 9px; }
.check-option input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--blue-600); }
.operational-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.route-detail-summary,
.route-plan-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); }
.route-detail-summary > span,
.route-plan-summary > span { min-width: 0; padding: 12px; background: #faf7f2; }
.route-detail-summary strong,
.route-plan-summary strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.route-plan-summary { grid-template-columns: repeat(3, 1fr); margin-top: 10px; }
.route-timeline { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; }
.route-timeline li { position: relative; min-height: 56px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding-bottom: 13px; }
.route-timeline li:not(:last-child)::before { content: ""; position: absolute; top: 29px; bottom: 0; left: 14px; width: 1px; background: var(--line-strong); }
.route-timeline-marker { position: relative; z-index: 1; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); background: #fff; font: 800 8px/1 var(--utility); }
.route-timeline .arrived .route-timeline-marker { border-color: #79caae; color: #087253; background: var(--success-soft); }
.route-timeline .skipped .route-timeline-marker { border-color: #e5c489; color: var(--amber); background: var(--amber-soft); }
.route-timeline strong,
.route-timeline small,
.route-timeline em { display: block; }
.route-timeline strong { font-size: 11px; }
.route-timeline small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.route-timeline em { margin-top: 4px; color: var(--amber); font-size: 8px; font-style: normal; }
.operational-note,
.cancel-route-panel { margin-top: 13px; padding: 13px; border-left: 3px solid var(--blue-600); background: var(--blue-050); font-size: 9px; }
.operational-note strong { display: block; margin-bottom: 4px; }
.cancel-route-panel p { color: var(--muted); }
.brake-review-list { display: grid; gap: 8px; }
.brake-review-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px; border: 1px solid var(--line); background: #fffdf9; }
.brake-review-list strong,
.brake-review-list span { display: block; }
.brake-review-list strong { font-size: 10px; }
.brake-review-list span,
.brake-review-list p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.vehicle-document-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.vehicle-document-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(145px, .8fr) 34px; gap: 7px; align-items: center; padding: 9px; border: 1px solid var(--line); background: #faf7f2; }
.vehicle-document-row [data-document-label] { grid-column: 1 / 3; }
.vehicle-document-row input,
.vehicle-document-row select { min-height: 38px; margin: 0; padding: 8px; background: #fff; }
.vehicle-document-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 9px 0 0; padding: 7px 8px; border-left: 2px solid var(--blue-600); color: var(--muted); background: var(--blue-050); font-size: 8px; }
.vehicle-document-status strong { color: var(--ink); }
.passenger-section { grid-column: 1 / -1; }
.passenger-section > header small { display: block; max-width: 620px; margin-top: 4px; color: var(--muted); font-size: 8px; }
.passenger-alert-list { display: grid; gap: 8px; }
.passenger-alert-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px; border: 1px solid var(--line); background: #fffdf9; }
.passenger-alert-row > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 9px; align-items: center; }
.passenger-alert-row strong { font-size: 10px; }
.passenger-alert-row small,
.passenger-alert-row p { grid-column: 2; margin: 0; color: var(--muted); font-size: 8px; }
.passenger-code-panel { padding: 16px; border: 1px solid var(--line); background: #faf7f2; }
.passenger-code-panel p { color: var(--muted); font-size: 10px; }
.passenger-code-panel input { background: #fff; }
.route-trace { margin: 13px 0; overflow: hidden; border: 1px solid var(--line); background: #faf7f2; }
.route-trace > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.route-trace header strong { font-size: 9px; }
.route-trace header span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 7px; }
.route-trace header i { width: 18px; height: 3px; display: inline-block; background: var(--blue-600); }
.route-trace header i.driven { margin-left: 5px; background: #21a279; }
.route-trace svg { width: 100%; height: auto; display: block; }
.route-grid path { fill: none; stroke: #e9e1d6; stroke-width: 1; }
.planned-line,
.driven-line { fill: none; stroke: var(--blue-600); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.driven-line { stroke: #21a279; stroke-width: 3; stroke-dasharray: 8 6; }
.route-map-marker circle { fill: #fff; stroke: var(--navy-900); stroke-width: 2; }
.route-map-marker text { fill: var(--navy-900); font: 800 7px/1 var(--utility); text-anchor: middle; }

/* Public views */
.public-page {
  min-height: 100vh;
  padding: 28px max(20px, calc((100vw - 980px) / 2)) 60px;
  background:
    linear-gradient(rgba(11, 37, 63, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 37, 63, 0.035) 1px, transparent 1px),
    var(--ground);
  background-size: 36px 36px, 36px 36px, auto;
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.public-privacy {
  color: var(--muted);
  font: 600 9px/1.3 var(--utility);
}

.public-download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 16px;
  padding: 15px 16px;
  border: 1px solid rgba(21, 40, 49, .2);
  border-left: 5px solid var(--blue-600);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.public-download-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.public-download-copy > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.public-download-copy strong {
  font-size: 12px;
}

.public-download-copy small {
  color: var(--muted);
  font-size: 9px;
}

.download-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #f2bbb5;
  border-radius: 50%;
  color: var(--blue-700);
  background: var(--blue-050);
  font: 800 17px/1 var(--utility);
}

.public-download-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.download-error {
  margin: 0;
  padding: 11px 16px;
  color: var(--signal-dark);
  background: var(--signal-soft);
  font-size: 11px;
}

.public-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy-900);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.public-card-inner {
  padding: clamp(24px, 5vw, 50px);
}

.public-live-bar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(24px, 5vw, 50px);
  color: #fff;
  background: var(--navy-900);
}

.public-live-bar .tiny {
  margin: 0;
  color: #b9c9d7;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 700 9px/1 var(--utility);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.live-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57d7a8;
  box-shadow: 0 0 0 5px rgba(87, 215, 168, 0.12);
}

.public-card h1 {
  max-width: 760px;
  margin: 11px 0 13px;
  font: 800 clamp(30px, 5vw, 50px)/1.07 var(--display);
  letter-spacing: -0.045em;
}

.public-winner {
  padding: 13px 15px;
  border-left: 4px solid var(--success);
  color: var(--success);
  background: var(--success-soft);
  font-size: 14px;
}

.public-tournament-heading {
  padding-bottom: 28px;
}

.public-title-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.format-pill {
  padding: 5px 8px;
  border: 1px solid #f0c2bc;
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
  font: 700 8px/1 var(--utility);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-progress-summary {
  max-width: 570px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 23px;
}

.public-progress-summary > span:first-child {
  display: grid;
  gap: 3px;
}

.public-progress-summary strong {
  color: var(--navy-900);
  font: 800 25px/1 var(--display);
}

.public-progress-summary small {
  color: var(--muted);
  font: 600 9px/1.4 var(--utility);
}

.public-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.public-progress-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), var(--success));
}

.public-competition-section {
  margin-top: 26px;
}

.public-competition-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}

.public-competition-section > header > span:first-child {
  display: grid;
  gap: 5px;
}

.public-competition-section > header small {
  color: var(--blue-700);
  font: 800 9px/1.2 var(--utility);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.public-competition-section > header strong {
  color: var(--muted);
  font-size: 10px;
}

.public-bracket-section {
  padding: 18px 0 10px;
  border-top: 1px solid var(--line);
}

.bracket-scroll-cue {
  width: 34px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-700);
  font: 800 15px/1 var(--utility);
  background: #fff;
}

.public-bracket-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 6px 6px 18px;
  scrollbar-color: #9bb5c9 transparent;
  scrollbar-width: thin;
}

.public-bracket-canvas {
  position: relative;
  width: max-content;
  min-width: 100%;
  display: flex;
  align-items: stretch;
  gap: 68px;
  padding: 6px 2px 16px;
}

.bracket-connectors {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.bracket-connectors path {
  fill: none;
  stroke: #9bb0c1;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.public-bracket-round {
  position: relative;
  z-index: 1;
  width: 224px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.public-bracket-round h3 {
  min-height: 38px;
  margin: 0;
  padding: 0 6px 12px;
  border-bottom: 2px solid var(--navy-900);
  color: var(--navy-900);
  font: 800 11px/1.25 var(--utility);
}

.public-bracket-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 24px;
  padding: 20px 0;
}

.bracket-match {
  position: relative;
  overflow: hidden;
  border: 1px solid #c5d3de;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(16, 43, 66, 0.07);
}

.bracket-match > small {
  display: block;
  padding: 7px 10px;
  color: var(--muted);
  background: #f3f7fa;
  font: 700 8px/1.2 var(--utility);
  text-transform: uppercase;
}

.bracket-participant {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.bracket-participant > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-participant strong {
  font: 800 9px/1 var(--utility);
}

.bracket-participant i {
  color: var(--success);
  font-style: normal;
}

.bracket-participant.winner {
  color: #0e684f;
  background: #effbf7;
  font-weight: 700;
}

.bracket-match.projected {
  border-style: dashed;
  box-shadow: none;
}

.bracket-match.projected .bracket-participant {
  color: #8ba0b1;
}

.public-podium {
  padding: 18px;
  border: 1px solid #d4e0e8;
  border-radius: 10px;
  background: linear-gradient(145deg, #f8fbfd, #edf4f8);
}

.podium-grid {
  min-height: 155px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 7px;
}

.podium-place {
  width: min(190px, 31%);
  min-height: 94px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 13px;
  border-top: 5px solid #aebbc5;
  border-radius: 7px 7px 0 0;
  color: var(--ink);
  background: #fff;
  text-align: center;
}

.podium-place.place-1 { min-height: 136px; border-color: #d7a328; }
.podium-place.place-2 { min-height: 112px; border-color: #9aa8b4; }
.podium-place.place-3 { border-color: #a9683f; }
.podium-place > span { color: var(--muted); font: 800 19px/1 var(--utility); }
.podium-place strong { font-size: 11px; }
.podium-place small { color: var(--muted); font-size: 9px; }

.public-awards {
  padding: 17px 18px;
  border-left: 4px solid #d7a328;
  border-radius: 7px;
  background: #fffaf0;
}

.award-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
}

.award-list > div {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 2px 9px;
  padding: 10px;
  border: 1px solid #eadcb9;
  border-radius: 6px;
  background: #fff;
}

.award-list > div > span {
  grid-row: 1 / 3;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7c5712;
  background: #f8e8b9;
  font: 800 11px/1 var(--utility);
}

.award-list small { color: var(--muted); font: 700 8px/1.2 var(--utility); }
.award-list strong { font-size: 10px; }

.timing-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timing-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.timing-list > div:last-child { border-bottom: 0; }
.timing-rank { color: var(--blue-700); font: 800 12px/1 var(--utility); }
.timing-list strong { font-size: 11px; }
.timing-list time { font: 800 11px/1 var(--utility); }

.public-stage-section > .public-stage {
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.result-participants {
  display: grid;
  gap: 4px;
}

.result-participants > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.result-participants .winner { color: var(--success); }
.result-participants time { font: 800 9px/1.3 var(--utility); }

.public-date {
  margin: 18px 0 7px;
  color: var(--blue-700);
  font: 700 15px/1.4 var(--body);
}

.public-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0;
}

.public-roster span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 10px;
}

.public-stage h3 {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.public-route-progress {
  height: 12px;
  margin: 30px 0 10px;
}

.public-route-progress span {
  background: linear-gradient(90deg, var(--blue-600), var(--success));
}

.public-route-total {
  color: var(--ink);
  font-size: 17px;
}

.public-note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.public-loading {
  min-height: 380px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 40px;
  text-align: center;
}

.public-loading > span {
  width: 32px;
  height: 32px;
  margin-bottom: 22px;
  border: 3px solid var(--line);
  border-right-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 17px 13px 39px;
  border-left: 4px solid #57d4a5;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--navy-950);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  font-weight: 600;
}

.toast::before {
  content: "✓";
  position: absolute;
  left: 15px;
  color: #57d4a5;
  font-weight: 800;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Domain consoles: the browser keeps the app's capabilities, but gives each
   module a desktop-native work surface instead of stacking generic cards. */
.module-command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #b9d0e2;
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.command-copy,
.command-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.command-copy > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.command-copy strong { font-size: 11px; }
.command-copy small { color: var(--muted); font-size: 9px; }
.command-index { color: var(--blue-600); font: 800 10px/1 var(--utility); }

.team-command-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  gap: 12px;
  margin-bottom: 12px;
}

.team-status-console,
.quick-checkin-console {
  min-height: 112px;
  padding: 17px;
  border-radius: var(--radius-sm);
}

.team-status-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .4fr);
  gap: 24px;
  align-items: center;
  color: #fff;
  border: 1px solid #1f4b6e;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
  background-size: 38px 100%, auto;
}

.team-status-console h3 { margin: 2px 0 4px; font: 800 19px/1.1 var(--display); }
.team-status-console p { margin: 0; max-width: 520px; color: #b9ccdb; font-size: 9px; }
.team-status-console label { display: grid; gap: 6px; color: #b9ccdb; font: 700 8px/1 var(--utility); text-transform: uppercase; }
.team-status-console select { min-height: 39px; margin: 0; border-color: rgba(255,255,255,.25); color: #fff; background: #163c5b; }

.quick-checkin-console {
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.quick-checkin-console > div:first-child { display: grid; gap: 3px; }
.quick-checkin-console strong { font-size: 11px; }
.quick-checkin-console small { color: var(--muted); font-size: 8px; }
.quick-checkin-console > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.checkin-button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #d6cdc1; border-radius: 20px; color: var(--ink); background: #faf7f2; font-size: 8px; font-weight: 700; }
.checkin-button:hover { border-color: #e58c84; color: var(--blue-700); background: var(--blue-050); }
.checkin-button span { color: var(--blue-600); font: 800 12px/1 var(--utility); }

.transport-team-section {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.transport-team-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: #fffdf9;
}

.transport-team-section > header h3 { margin: 2px 0 3px; font: 800 16px/1.1 var(--display); }
.transport-team-section > header small { display: block; max-width: 620px; color: var(--muted); font-size: 8px; }
.team-board-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.transport-team-list { display: grid; }

.transport-team-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, .65fr) minmax(170px, .72fr) minmax(260px, 1.25fr);
  gap: 18px;
  align-items: center;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.transport-team-row:last-child { border-bottom: 0; }
.team-member-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.team-member-identity > div { min-width: 0; display: grid; gap: 2px; }
.team-member-identity strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.team-member-identity small { color: var(--muted); font-size: 8px; }
.member-location-state { min-width: 0; display: grid; justify-items: start; gap: 5px; }
.member-location-state > small { color: var(--muted); font-size: 7px; }
.member-location-actions { display: flex; gap: 10px; }
.member-location-actions .text-button,
.member-location-state > .text-button { padding: 0; font-size: 8px; }

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: #f4f7f9;
  font: 700 7px/1 var(--utility);
  text-transform: uppercase;
}

.signal-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.signal-chip.online { border-color: #a9d9c8; color: #087253; background: var(--success-soft); }
.signal-chip.offline { border-color: #efb8bb; color: var(--signal-dark); background: var(--signal-soft); }
.signal-chip.paused { border-color: #e7ca99; color: #886019; background: var(--amber-soft); }

.team-member-controls { min-width: 0; display: grid; gap: 9px; }
.permission-toggle { min-width: 0; display: flex; align-items: center; gap: 9px; margin: 0; }
.permission-toggle input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--blue-600); }
.permission-toggle > span { min-width: 0; display: grid; gap: 1px; }
.permission-toggle strong { font-size: 8px; }
.permission-toggle small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.member-hours { display: grid; grid-template-columns: auto minmax(88px, 1fr) auto minmax(88px, 1fr) auto; gap: 6px; align-items: center; }
.member-hours > span:first-child { color: var(--muted); font: 700 7px/1.2 var(--utility); text-transform: uppercase; }
.member-hours input { min-height: 34px; margin: 0; padding: 6px 7px; font-size: 8px; background: #faf7f2; }
.member-hours .button { white-space: nowrap; }

.safety-notice-form {
  display: grid;
  grid-template-columns: minmax(155px, .65fr) minmax(150px, .8fr) minmax(210px, 1fr) minmax(155px, .7fr) auto;
  gap: 9px;
  align-items: end;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  background: #faf7f2;
}

.safety-form-copy { align-self: center; display: grid; gap: 3px; }
.safety-form-copy strong { font-size: 10px; }
.safety-form-copy small { color: var(--muted); font-size: 7px; }
.safety-notice-form label { display: grid; gap: 5px; margin: 0; color: var(--muted); font: 700 7px/1 var(--utility); text-transform: uppercase; }
.safety-notice-form input,
.safety-notice-form textarea { min-height: 38px; margin: 0; padding: 8px 9px; background: #fff; }
.safety-notice-form textarea { min-height: 54px; resize: vertical; }
.file-drop input { max-width: 100%; padding: 7px; font: 400 8px/1.3 var(--body); text-transform: none; }
.safety-notice-list { display: grid; }
.safety-notice {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}
.safety-notice:last-child { border-bottom: 0; }
.safety-notice-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #e8be79; border-radius: 50%; color: #84520b; background: var(--amber-soft); font: 800 13px/1 var(--utility); }
.safety-notice header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.safety-notice header > div { display: grid; gap: 2px; }
.safety-notice strong { font-size: 10px; }
.safety-notice small { color: var(--muted); font-size: 7px; }
.safety-notice p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.safety-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.safety-attachment { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #efb7b0; color: var(--blue-700); background: var(--blue-050); font-size: 7px; font-weight: 700; }

.location-history-list { display: grid; gap: 8px; }
.location-history-day { padding: 12px; border: 1px solid var(--line); background: #fffdf9; }
.location-history-day header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.location-history-day header > div:first-child { display: grid; gap: 3px; }
.location-history-day strong { font-size: 10px; }
.location-history-day small { color: var(--muted); font-size: 8px; }
.location-sparkline { height: 20px; display: flex; align-items: center; gap: 2px; margin-top: 10px; overflow: hidden; }
.location-sparkline i { width: 4px; height: calc(5px + (var(--point) * 13px)); flex: 1; max-width: 18px; border-radius: 3px 3px 0 0; background: linear-gradient(var(--blue-600), #f3a29a); }

@media (max-width: 1040px) {
  .auth-page {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.82fr);
  }

  .auth-page::before { right: 42%; }
  .auth-page::after { left: 58%; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-list > div { min-height: 60px; grid-template-columns: 32px 1fr; align-items: center; padding: 13px 0; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.13); }
  .feature-list > div:last-child { border-bottom: 0; }
  .workflow-guide { grid-template-columns: 1fr; }
  .workflow-guide-heading { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-guide-heading small { max-width: none; }
  .compact-workflow ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-guide li:nth-child(2n)::after { display: none; }
  .group-detail-card { grid-template-columns: 1fr; }
  .members-panel { border-top: 1px solid var(--line); border-left: 0; }
  .route-card { grid-template-columns: minmax(0, 1fr) minmax(220px, 0.6fr); }
  .route-card > .card-actions { grid-column: 1 / -1; }
  .transport-team-row { grid-template-columns: minmax(165px, .65fr) minmax(160px, .65fr) minmax(0, 1fr); gap: 12px; }
  .member-hours { grid-template-columns: minmax(88px, 1fr) auto minmax(88px, 1fr) auto; }
  .member-hours > span:first-child { grid-column: 1 / -1; }
  .safety-notice-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety-form-copy { grid-column: 1 / -1; }
  .safety-message-field { grid-column: 2; }
}

@media (max-width: 800px) {
  body { padding-bottom: 70px; }

  .auth-page {
    display: block;
    padding: 92px 20px 34px;
    background: var(--navy-950);
  }

  .auth-page::before {
    inset: 0 0 auto;
    height: 60%;
  }

  .auth-page::after {
    top: 58%;
    right: 20px;
    bottom: auto;
    left: 20px;
    width: auto;
    height: 4px;
  }

  .auth-brand { top: 22px; }
  .auth-brand { left: 22px; }
  .auth-brand img { width: 31px; height: 31px; }
  .auth-copy { padding: 30px 4px 45px; }
  .auth-copy h1 { font-size: clamp(36px, 11vw, 51px); }
  .lede { font-size: 15px; }
  .feature-list { margin-top: 28px; }
  .auth-status { margin-bottom: 0; }
  .auth-card { width: 100%; }

  .portal {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--navy-950);
  }

  .sidebar .brand { padding: 0; }
  .sidebar .brand img { width: 31px; height: 31px; }
  .sidebar .brand small { display: none; }
  .sidebar .account-card,
  .sidebar-bottom { display: none; }

  .sidebar nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(7, 27, 45, 0.98);
    backdrop-filter: blur(12px);
  }

  .sidebar .nav-link {
    min-height: 52px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    padding: 7px 3px;
    text-align: center;
    font-size: 9px;
  }

  .nav-link::after { inset: auto 15px -7px; width: auto; height: 3px; }
  .nav-link::before { font-size: 8px; }

  .portal-main {
    padding: 25px 18px 50px;
  }

  .portal-header {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .portal-header h1 { font-size: 31px; }
  .active-group-context { grid-template-columns: auto minmax(0, 1fr); }
  .context-meta { display: none; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .competition-ledger { grid-template-columns: 1fr; }
  .competition-ledger-heading { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .tournament-command-row { grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr); }
  .tournament-primary-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .tournament-detail { margin-right: -18px; padding-right: 18px; }
  .workflow-guide ol,
  .compact-workflow ol,
  .event-workflow ol,
  .transport-workflow ol { grid-template-columns: 1fr; }
  .workflow-guide li::after { display: none; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .event-card { grid-template-columns: 76px minmax(0, 1fr); }
  .event-card > .card-actions { grid-column: 1 / -1; }
  .event-operations-grid { grid-template-columns: 1fr; }
  .event-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-detail-metrics span:nth-child(2) { border-right: 0; }
  .event-detail-metrics span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .team-controls > div { grid-template-columns: 78px repeat(2, minmax(0, 1fr)); }
  .team-controls > div .button { width: 100%; }
  .event-album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-card { grid-template-columns: 1fr; }
  .group-detail-header { flex-direction: column; }
  .group-grid { grid-template-columns: 1fr; }
  .group-workspace { grid-template-columns: 1fr; }
  .group-workspace-actions { justify-content: flex-start; }
  .protocol-preview { grid-column: auto; }
  .transport-live-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transport-live-strip > span:nth-child(2) { border-right: 0; }
  .transport-live-strip > span:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
  .dispatch-route-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-route-meta > span:last-child { grid-column: 1 / -1; }
  .operations-grid { grid-template-columns: 1fr; }
  .driving-section,
  .settings-section { grid-column: auto; }
  .route-stop-row { grid-template-columns: 40px minmax(0, 1fr); }
  .route-stop-index { width: 36px; height: 36px; }
  .route-stop-actions { grid-column: 2; grid-template-columns: 1fr repeat(3, 34px); }
  .route-stop-actions .use-location-button { grid-column: auto; }
  .route-stop-location-grid { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(95px, .6fr)); }
  .route-stop-location-grid label:first-child { grid-column: 1 / -1; }
  .route-stop-delivery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-stop-delivery-grid label:first-child,
  .route-stop-delivery-grid label:nth-child(4),
  .route-stop-delivery-grid label:nth-child(5) { grid-column: 1 / -1; }
  .switch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-header { align-items: flex-start; }
  .public-privacy { max-width: 180px; text-align: right; }
  .public-download-panel { align-items: flex-start; flex-direction: column; }
  .public-bracket-scroll {
    margin-right: -18px;
    padding-right: 18px;
  }
  .module-command-bar { grid-template-columns: 1fr; align-items: start; }
  .command-actions { flex-wrap: wrap; }
  .team-command-deck { grid-template-columns: 1fr; }
  .transport-team-row { grid-template-columns: minmax(150px, .7fr) minmax(0, 1fr); align-items: start; }
  .team-member-controls { grid-column: 1 / -1; padding-top: 10px; border-top: 1px dashed var(--line); }
  .transport-team-section > header { align-items: flex-start; flex-direction: column; }
  .team-board-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .auth-locale { gap: 10px; }
  .auth-locale.locale-picker select { min-width: 112px; }
  .auth-brand small { display: none; }
  .auth-card { padding: 23px 20px; }
  .auth-card-header { grid-template-columns: 1fr; }
  .auth-step { width: max-content; }
  .delivery-receipt { grid-template-columns: 36px minmax(0, 1fr); }
  .delivery-receipt .text-button { grid-column: 2; justify-self: start; padding: 4px 0; }
  .portal-header { flex-direction: column; }
  .header-actions { width: 100%; justify-content: flex-end; margin-top: -6px; }
  .section-heading .button { width: 100%; }
  .heading-actions { display: grid; grid-template-columns: auto 1fr 1fr; }
  .heading-actions .button { width: 100%; padding-inline: 10px; }
  .group-grid { grid-template-columns: 1fr; }
  .group-card > button { grid-template-columns: 42px minmax(0, 1fr); padding: 14px 13px 14px 17px; }
  .group-type-mark { width: 40px; height: 40px; }
  .group-card-footer { grid-column: 2; min-width: 0; grid-template-columns: repeat(3, auto); justify-content: start; justify-items: start; padding: 9px 0 0; border-top: 1px solid #eee8de; border-left: 0; }
  .member-list li { align-items: flex-start; flex-direction: column; }
  .member-row-actions { width: 100%; justify-content: flex-start; padding-left: 42px; }
  .invite-code { grid-template-columns: 1fr; }
  .event-card { grid-template-columns: 68px minmax(0, 1fr); gap: 13px; padding: 14px; }
  .event-date-block { min-height: 76px; }
  .event-card > .card-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .event-card > .card-actions .button { width: 100%; }
  .event-ledger { grid-template-columns: 1fr; }
  .event-ledger > span { min-height: 64px; border-right: 0; border-bottom: 1px dashed rgba(255,255,255,.22); }
  .event-ledger > span:last-child { border-bottom: 0; }
  .event-location-row { grid-template-columns: 1fr 1fr; }
  .event-location-row .button { grid-column: 1 / -1; }
  .event-detail-hero { flex-direction: column; }
  .event-detail-hero time { text-align: left; }
  .team-board { grid-template-columns: 1fr; }
  .team-controls > div,
  .inline-event-form,
  .event-note-form { grid-template-columns: 1fr; }
  .team-unassigned > div { grid-template-columns: 1fr; }
  .team-controls > div .button,
  .event-note-form .button { width: 100%; }
  .bring-list article,
  .pickup-list article { align-items: flex-start; flex-direction: column; }
  .bring-actions { width: 100%; justify-content: space-between; }
  .bring-claim,
  .pickup-list .card-actions { width: 100%; }
  .bring-claim input { flex: 1; width: auto; }
  .event-album-strip { align-items: flex-start; flex-direction: column; }
  .event-album-strip .button { width: 100%; }
  .event-album-grid { grid-template-columns: 1fr; }
  .event-album-grid figure > a { aspect-ratio: 16 / 11; }
  .album-actions .button { width: 100%; }
  .tournament-card > header { flex-direction: column; }
  .tournament-card > .tournament-card-header { padding: 16px; }
  .tournament-card-header .card-actions { width: 100%; }
  .tournament-command-row { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .tournament-primary-actions { display: grid; grid-template-columns: 1fr; }
  .tournament-primary-actions .button { width: 100%; }
  .tournament-progress { grid-template-columns: auto minmax(0, 1fr); }
  .competition-metrics { grid-template-columns: 1fr; }
  .competition-metrics > span { min-height: 62px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .competition-metrics > span:last-child { border-bottom: 0; }
  .competition-metrics > span em { grid-column: 1 / -1; }
  .tournament-toolbar { align-items: flex-start; flex-direction: column; }
  .tournament-toolbar > small { padding: 0 5px 5px; }
  .tournament-filters { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tournament-filter { justify-content: center; padding-inline: 7px; }
  .tournament-detail { margin-right: 0; padding: 16px; }
  .competition-section-heading { align-items: flex-start; flex-direction: column; }
  .competition-section-heading > small { text-align: left; }
  .bracket-round { width: 212px; flex-basis: 212px; }
  .form-grid,
  .form-grid.three-columns { grid-template-columns: 1fr; }
  .check-list { grid-template-columns: 1fr; }
  .dialog form,
  .dialog-form { padding: 22px 18px; }
  .dialog-heading { margin: -22px -18px 20px; padding: 20px 18px 18px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .export-choice-grid { grid-template-columns: 1fr; }
  .transport-heading .heading-actions { grid-template-columns: 1fr 1fr; }
  .transport-live-strip > span { min-height: 62px; padding: 11px 13px; }
  .transport-live-strip .dispatch-signal { padding-left: 34px; }
  .dispatch-signal i { top: 18px; left: 13px; }
  .transport-live-strip strong { font-size: 20px; }
  .transport-tab { padding-inline: 12px; }
  .command-actions { display: grid; grid-template-columns: 1fr; }
  .command-actions .button { width: 100%; }
  .team-status-console { grid-template-columns: 1fr; gap: 14px; }
  .transport-team-row { grid-template-columns: 1fr; }
  .member-location-state { padding-left: 42px; }
  .team-member-controls { grid-column: auto; }
  .member-hours { grid-template-columns: 1fr auto 1fr; }
  .member-hours > span:first-child { grid-column: 1 / -1; }
  .member-hours .button { grid-column: 1 / -1; width: 100%; }
  .safety-notice-form { grid-template-columns: 1fr; }
  .safety-form-copy,
  .safety-message-field { grid-column: auto; }
  .safety-notice-form .button { width: 100%; }
  .safety-notice header,
  .location-history-day header { align-items: flex-start; flex-direction: column; }
  .location-history-day .card-actions { width: 100%; }
  .location-history-day .card-actions .button { flex: 1; }
  .dispatch-route-card { padding: 15px; }
  .dispatch-route-card > header { gap: 10px; }
  .route-progress-number { font-size: 21px; }
  .dispatch-route-meta { grid-template-columns: 1fr; }
  .dispatch-route-meta > span:last-child { grid-column: auto; }
  .dispatch-route-card .card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-route-card .card-actions .button { width: 100%; }
  .operations-metrics { grid-template-columns: repeat(2, 1fr); }
  .operations-section { padding: 13px; }
  .operations-section > header { align-items: flex-start; flex-direction: column; }
  .operations-section > header .button { width: 100%; }
  .driving-row,
  .brake-review-list article { align-items: flex-start; flex-direction: column; }
  .driving-score { width: 100%; }
  .setting-toggle { align-items: flex-start; }
  .route-stop-row { grid-template-columns: 1fr; padding: 12px; }
  .route-stop-index { width: max-content; min-width: 36px; height: 25px; padding: 0 9px; border-radius: 20px; }
  .route-stop-location-grid,
  .route-stop-delivery-grid { grid-template-columns: 1fr; }
  .route-stop-location-grid label:first-child,
  .route-stop-delivery-grid label:first-child,
  .route-stop-delivery-grid label:nth-child(4),
  .route-stop-delivery-grid label:nth-child(5) { grid-column: auto; }
  .route-stop-actions { grid-column: auto; grid-template-columns: 1fr repeat(3, 34px); }
  .switch-grid { grid-template-columns: 1fr; }
  .route-detail-summary,
  .route-plan-summary { grid-template-columns: 1fr; }
  .vehicle-document-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .vehicle-document-row [data-document-expiry],
  .vehicle-document-row [data-document-label] { grid-column: 1; }
  .vehicle-document-row [data-remove-document] { grid-column: 2; grid-row: 1; }
  .vehicle-document-status,
  .passenger-alert-row { align-items: flex-start; flex-direction: column; }
  .passenger-alert-row .card-actions { width: 100%; }
  .passenger-alert-row .card-actions .button { flex: 1; }
  .route-trace > header { align-items: flex-start; flex-direction: column; }
  .public-header { display: grid; }
  .public-privacy { max-width: none; text-align: left; }
  .public-download-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .public-download-actions .button { width: 100%; }
  .public-live-bar { align-items: flex-start; flex-direction: column; }
  .public-card-inner { padding: 23px 18px; }
  .public-card h1 { font-size: 32px; }
  .public-progress-summary { grid-template-columns: 1fr; gap: 10px; }
  .public-competition-section > header { align-items: flex-start; }
  .public-bracket-round { width: 205px; }
  .public-bracket-canvas { gap: 52px; }
  .podium-place { padding: 10px 5px; }
  .podium-place strong { font-size: 9px; }
  .timing-entry-list label { grid-template-columns: 1fr; gap: 6px; }
  .timing-entry-list input { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
