:root {
  color-scheme: light;
  --danger: #b83b2f;
  --success: #25764d;
  --success-contrast: #ffffff;
  --warning: #b86b00;
  --shadow: 0 18px 45px rgba(29, 49, 32, 0.14);
  --shadow-soft: 0 10px 28px rgba(16, 24, 18, 0.08);
  --shadow-card: 0 1px 0 rgba(16, 24, 18, 0.04), 0 14px 34px rgba(16, 24, 18, 0.09);
  --radius: 8px;
  --admin-nav-width: 238px;
  --admin-nav-collapsed-width: 72px;
  --admin-header-height: 76px;
  --font-scale: 1;
  --app-font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  --brand-primary: var(--theme-light-primary, #2d2d2d);
  --brand-accent: var(--theme-light-accent, #f58200);
  --brand-contrast: var(--theme-light-brand-contrast, #ffffff);
  --accent-contrast: var(--theme-light-accent-contrast, #111111);
  --hero-contrast: var(--theme-light-hero-contrast, #ffffff);
  --bg: var(--theme-light-bg, #f4f6f4);
  --surface: var(--theme-light-surface, #ffffff);
  --surface-2: var(--theme-light-surface-2, #edf2ee);
  --surface-3: var(--theme-light-surface-3, #dde7df);
  --ink: var(--theme-light-ink, #172019);
  --muted: var(--theme-light-muted, #627062);
  --line: var(--theme-light-line, #d7e0d8);
  --ui-scale: 1;
  --density-control: 1;
  --density-space: 1;
}

body[data-density="compact"] {
  --ui-scale: 0.92;
  --density-control: 0.92;
  --density-space: 0.9;
}

body[data-density="large"] {
  --ui-scale: 1.08;
  --density-control: 1.1;
  --density-space: 1.12;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --brand-primary: var(--theme-dark-primary, #2d2d2d);
  --brand-accent: var(--theme-dark-accent, #f58200);
  --brand-contrast: var(--theme-dark-brand-contrast, #ffffff);
  --accent-contrast: var(--theme-dark-accent-contrast, #111111);
  --hero-contrast: var(--theme-dark-hero-contrast, #ffffff);
  --bg: var(--theme-dark-bg, #101410);
  --surface: var(--theme-dark-surface, #171d18);
  --surface-2: var(--theme-dark-surface-2, #202a22);
  --surface-3: var(--theme-dark-surface-3, #2a362c);
  --ink: var(--theme-dark-ink, #f3f7f3);
  --muted: var(--theme-dark-muted, #afbcaf);
  --line: var(--theme-dark-line, #344236);
  --danger: #ff7b6e;
  --success: #78d59a;
  --success-contrast: #10200b;
  --warning: #ffbd66;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 36px rgba(0, 0, 0, 0.32);
}

body.is-admin {
  font-size: calc(14px * var(--ui-scale) * var(--font-scale));
}

body.is-admin h1,
body.is-admin .page-title {
  font-size: calc(24px * var(--ui-scale) * var(--font-scale));
  font-weight: 700;
  margin-bottom: 16px;
}

body.is-admin h2,
body.is-admin .section-title {
  font-size: calc(20px * var(--ui-scale) * var(--font-scale));
  font-weight: 650;
  margin-bottom: 12px;
}

body.is-admin h3,
body.is-admin .subsection-title {
  font-size: calc(16px * var(--ui-scale) * var(--font-scale));
  font-weight: 650;
  margin-bottom: 8px;
}

body.is-admin small,
body.is-admin .form-hint,
body.is-admin .muted,
body.is-admin .timestamp {
  font-size: calc(12px * var(--ui-scale) * var(--font-scale));
}

body.is-admin td,
body.is-admin th {
  font-size: calc(14px * var(--ui-scale) * var(--font-scale));
  padding: calc(12px * var(--density-space)) calc(16px * var(--density-space));
}

body.is-admin tr {
  min-height: 48px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 82%, var(--bg)) 0, var(--bg) 320px),
    var(--bg);
  color: var(--ink);
  font-family: var(--app-font-family);
  font-size: calc(16px * var(--ui-scale) * var(--font-scale));
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

.page-skeleton {
  align-items: flex-start;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: clamp(5.5rem, 12vh, 8rem) 1rem 1rem;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 120;
}

.page-skeleton-panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  max-width: 720px;
  padding: 1rem;
  width: min(100%, 720px);
}

.skeleton-line,
.skeleton-grid span {
  animation: skeleton-pulse 1.15s ease-in-out infinite;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 220% 100%;
  border-radius: 0.26rem;
  display: block;
  min-height: 0.9rem;
}

.skeleton-line {
  width: 62%;
}

.skeleton-line.wide {
  min-height: 1.25rem;
  width: 84%;
}

.skeleton-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skeleton-grid span {
  aspect-ratio: 3 / 1.35;
  border-radius: var(--radius);
}

@keyframes skeleton-pulse {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

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

th,
table thead td,
.btn,
.button,
button,
[role="columnheader"],
.table-header,
.column-header {
  white-space: nowrap !important;
}

.table-responsive,
.table-container,
.table-scroll,
.table-wide {
  overflow-x: auto;
  max-width: 100%;
}

.step-label,
.wizard-step-label,
.booking-step,
.booking-steps span,
.booking-steps label,
.step-indicator span,
.progress-step span,
[class*="step"] > span,
[class*="step"] > label {
  white-space: nowrap !important;
}

img,
svg,
video {
  height: auto;
  max-width: 100%;
}

h1,
h2,
h3,
p,
a,
button,
label,
strong,
span,
td,
th,
.pill,
.badge,
.panel,
.booking-card,
.ticket {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
th,
.brand-title,
.tabs a,
.nav a,
.nav button,
.badge,
.pill {
  overflow-wrap: normal;
  word-break: normal;
}

button,
a.button {
  align-items: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-size: calc(14px * var(--ui-scale) * var(--font-scale));
  font-weight: 600;
  gap: 0.45rem;
  justify-content: center;
  line-height: 1.15;
  max-width: 100%;
  min-height: calc(2.75rem * var(--density-control));
  overflow-wrap: normal;
  padding: calc(10px * var(--density-space)) calc(20px * var(--density-space));
  text-align: center;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
  white-space: normal;
  text-wrap: pretty;
}

.btn-primary,
.primary {
  background-color: var(--brand-primary);
  color: var(--brand-contrast);
}

.btn-secondary,
.secondary {
  background-color: transparent;
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary);
}

.btn-danger,
.danger {
  background-color: var(--danger);
  color: #ffffff;
}

.button-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.button-icon svg {
  fill: none;
  height: 1.05rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 1.05rem;
}

@media (hover: hover) {
  button:hover,
  a.button:hover,
  .tabs a:hover,
  .guide-card:hover {
    transform: translateY(-1px);
  }
}

button:active,
a.button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--brand-primary);
}

body[data-theme="dark"] a {
  color: var(--brand-accent);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-accent) 64%, transparent);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  min-width: 0;
  overflow-x: clip;
  padding-top: var(--admin-header-height);
}

.topbar {
  align-items: center;
  background: var(--brand-primary);
  color: var(--brand-contrast);
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.25rem);
  grid-template-columns: minmax(320px, 1fr) minmax(220px, auto) auto;
  left: 0;
  min-height: 76px;
  padding: 0.7rem clamp(1rem, 3vw, 2.4rem);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 70;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand-contrast) 14%, transparent), 0 14px 34px rgba(0, 0, 0, 0.16);
  width: 100%;
}

.brand {
  align-items: center;
  color: var(--brand-contrast);
  display: flex;
  gap: 0.85rem;
  grid-column: 1;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  display: block;
  max-height: 50px;
  max-width: min(150px, 24vw);
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  overflow: hidden;
}

.brand-title {
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  font-weight: 850;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-claim {
  color: color-mix(in srgb, var(--brand-contrast) 82%, transparent);
  font-size: 0.85rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-context {
  align-self: center;
  border: 1px solid color-mix(in srgb, var(--brand-contrast) 18%, transparent);
  border-radius: var(--radius);
  color: var(--brand-contrast);
  display: grid;
  gap: 0.1rem;
  grid-column: 2;
  min-width: 0;
  padding: 0.45rem 0.7rem;
}

.top-context span {
  color: color-mix(in srgb, var(--brand-contrast) 76%, transparent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-context strong {
  font-size: 0.9rem;
  line-height: 1.15;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-event-switch {
  margin: 0;
}

.top-event-switch div {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  min-width: 0;
}

.top-event-switch select {
  background: color-mix(in srgb, var(--brand-contrast) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand-contrast) 22%, transparent);
  color: var(--brand-contrast);
  font-size: 0.86rem;
  min-height: 2.1rem;
  min-width: 0;
  padding: 0.36rem 0.5rem;
}

.top-event-switch option {
  color: #111111;
}

.top-event-switch button {
  min-height: 2.1rem;
  padding: 0.36rem 0.55rem;
}

.header-progress {
  align-items: center;
  color: var(--brand-contrast);
  display: inline-flex;
  gap: 0.45rem;
  min-width: 0;
  text-decoration: none;
}

.header-progress span {
  background: color-mix(in srgb, var(--brand-contrast) 22%, transparent);
  border-radius: 999px;
  display: block;
  flex: 0 0 120px;
  height: 6px;
  overflow: hidden;
  position: relative;
}

.header-progress span::before {
  background: var(--brand-accent);
  border-radius: inherit;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: var(--progress, 0%);
}

.header-progress strong {
  font-size: 0.82rem;
  white-space: nowrap;
}

.top-actions,
.nav {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.top-actions {
  grid-column: 3;
  justify-content: flex-end;
}

.language-switcher {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 244, 250, 0.96)),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 30%, #c4d2df);
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(7, 22, 45, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
}

.language-switcher a {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #18304f;
  display: inline-flex;
  gap: 0.36rem;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  min-height: 2rem;
  padding: 0.38rem 0.62rem;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.language-switcher a:hover,
.language-switcher a:focus-visible {
  background: rgba(15, 44, 82, 0.08);
  border-color: rgba(15, 44, 82, 0.14);
  color: #06172d;
  outline: none;
}

.language-switcher a.active {
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 74%, #000));
  border-color: color-mix(in srgb, var(--brand-primary) 72%, #ffffff);
  box-shadow: 0 8px 18px rgba(7, 22, 45, 0.22);
  color: #ffffff;
}

.language-flag {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(7, 22, 45, 0.12);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  display: inline-flex;
  font-size: 0;
  height: 1.14rem;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  position: relative;
  width: 1.72rem;
}

.language-flag span {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.language-flag[data-lang="de"] {
  background: linear-gradient(#111111 0 33.333%, #dd0000 33.333% 66.666%, #ffce00 66.666% 100%);
}

.language-flag[data-lang="en"] {
  background-color: #012169;
  background-image:
    linear-gradient(32deg, transparent 0 42%, #ffffff 42% 49%, #c8102e 49% 53%, #ffffff 53% 60%, transparent 60%),
    linear-gradient(-32deg, transparent 0 42%, #ffffff 42% 49%, #c8102e 49% 53%, #ffffff 53% 60%, transparent 60%),
    linear-gradient(90deg, transparent 0 38%, #ffffff 38% 45%, #c8102e 45% 55%, #ffffff 55% 62%, transparent 62%),
    linear-gradient(0deg, transparent 0 34%, #ffffff 34% 43%, #c8102e 43% 57%, #ffffff 57% 66%, transparent 66%);
}

.language-switcher a.active .language-flag {
  border-color: rgba(255, 255, 255, 0.4);
}

.language-code {
  background: rgba(7, 22, 45, 0.08);
  border-radius: 3px;
  color: inherit;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0;
  opacity: 1;
  padding: 0.18rem 0.32rem;
}

.language-switcher a.active .language-code {
  background: rgba(255, 255, 255, 0.18);
}

body[data-theme="dark"] .language-switcher {
  background:
    linear-gradient(180deg, rgba(17, 31, 48, 0.96), rgba(8, 17, 30, 0.96)),
    #091320;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .language-switcher a {
  color: #dbeafe;
}

body[data-theme="dark"] .language-switcher a:hover,
body[data-theme="dark"] .language-switcher a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

body[data-theme="dark"] .language-switcher a.active {
  background: linear-gradient(135deg, var(--brand-accent), color-mix(in srgb, var(--brand-accent) 72%, #ffefe0));
  border-color: rgba(255, 255, 255, 0.2);
  color: #07162b;
}

body[data-theme="dark"] .language-switcher a.active .language-code {
  background: rgba(7, 22, 45, 0.11);
}

.nav {
  flex-wrap: wrap;
  grid-column: 2;
  justify-content: flex-end;
  min-width: 0;
}

.nav-title {
  display: none;
}

.nav-head {
  display: none;
}

.nav a,
.nav button {
  background: color-mix(in srgb, var(--brand-contrast) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-contrast) 13%, transparent);
  border-radius: 4px;
  color: var(--brand-contrast);
  font-size: clamp(0.78rem, 0.72vw, 0.94rem);
  min-height: 2.25rem;
  padding: 0.52rem clamp(0.48rem, 0.72vw, 0.75rem);
  text-decoration: none;
}

.nav a.active {
  background: var(--brand-accent);
  border-color: color-mix(in srgb, var(--brand-accent) 70%, var(--brand-contrast));
  color: var(--accent-contrast);
}

.topbar a,
.topbar button {
  color: var(--brand-contrast);
}

.topbar .language-switcher a {
  color: #18304f;
}

.topbar .language-switcher a:hover,
.topbar .language-switcher a:focus-visible {
  color: #06172d;
}

.topbar .language-switcher a.active {
  color: #ffffff;
}

body[data-theme="dark"] .topbar .language-switcher a {
  color: #dbeafe;
}

body[data-theme="dark"] .topbar .language-switcher a:hover,
body[data-theme="dark"] .topbar .language-switcher a:focus-visible {
  color: #ffffff;
}

body[data-theme="dark"] .topbar .language-switcher a.active {
  color: #07162b;
}

.topbar .theme-toggle {
  color: #18304f;
}

.topbar .theme-choice {
  color: #18304f;
}

.topbar .theme-choice-light {
  color: #07162d;
}

body[data-theme="dark"] .topbar .theme-toggle,
body[data-theme="dark"] .topbar .theme-choice {
  color: #dbeafe;
}

body[data-theme="dark"] .topbar .theme-choice-dark {
  color: #07162d;
}

.nav form {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

.nav a:hover,
.nav button:hover {
  background: rgba(255, 255, 255, 0.2);
}

body.is-admin .topbar {
  grid-template-columns: minmax(300px, 1.25fr) minmax(190px, auto) minmax(8rem, auto) minmax(220px, 340px) auto;
  grid-template-rows: auto auto;
}

body.is-admin .top-actions {
  grid-column: 5;
}

body.is-admin .global-search {
  grid-column: 4;
}

body.is-admin .header-progress {
  grid-column: 3;
}

.admin-quickbar {
  align-items: center;
  background: #1d2327;
  border-top: 1px solid #101517;
  color: #c3c4c7;
  display: flex;
  gap: 0.35rem;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin: 0 calc(-1 * clamp(1rem, 3vw, 2.4rem)) -0.7rem;
  min-height: 32px;
  min-width: 0;
  overflow: visible;
  padding: 0.1rem clamp(1rem, 3vw, 2.4rem) 0.1rem calc(var(--admin-nav-width) + clamp(1rem, 3vw, 2.4rem));
  position: relative;
  scrollbar-width: none;
  white-space: nowrap;
}

.quickbar-left,
.quickbar-right {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  min-width: 0;
}

.quickbar-left {
  flex: 1 1 auto;
}

.quickbar-right {
  flex: 0 0 auto;
  margin-left: auto;
}

.quickbar-logout {
  display: flex;
  margin: 0;
}

.admin-quickbar::-webkit-scrollbar {
  display: none;
}

.admin-quickbar .quickbar-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #c3c4c7;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  gap: 0.38rem;
  height: 26px;
  justify-content: center;
  line-height: 1;
  min-height: 26px;
  min-width: 0;
  padding: 0 0.5rem;
  position: relative;
  text-decoration: none;
}

.admin-quickbar .quickbar-button:hover,
.admin-quickbar .quickbar-button:focus-visible {
  background: #2c3338;
  border-color: #3c434a;
  color: #ffffff;
}

.admin-quickbar svg {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.admin-quickbar .update-indicator {
  cursor: pointer;
}

.admin-quickbar .update-indicator.has-update {
  color: #facc15;
}

.admin-quickbar .notification-indicator.has-update {
  background: #2c3338;
  border-color: #3c434a;
  color: #facc15;
}

.admin-quickbar .health-ok {
  color: #86efac;
}

.admin-quickbar .health-warn {
  color: #facc15;
}

.admin-quickbar .health-block {
  color: #fca5a5;
}

.admin-quickbar .theme-toggle {
  background: transparent;
  border-radius: 3px;
  font-size: 0.78rem;
  justify-content: center;
  min-width: 0;
  padding: 0 0.62rem;
  width: auto;
}

.admin-quickbar .theme-toggle .theme-icon {
  background: #c3c4c7;
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px #50575e;
  height: 0.72rem;
  margin-left: 0.08rem;
  position: relative;
  transform: none;
  width: 1.32rem;
}

.admin-quickbar .theme-toggle .theme-icon::after {
  background: #ffffff;
  border-radius: 2px;
  content: "";
  height: 0.5rem;
  left: 0.11rem;
  position: absolute;
  top: 0.11rem;
  transition: transform 160ms ease;
  width: 0.5rem;
}

body[data-theme="dark"] .admin-quickbar .theme-toggle .theme-icon {
  background: #f59e0b;
  box-shadow: inset 0 0 0 2px #92400e;
  transform: none;
}

body[data-theme="dark"] .admin-quickbar .theme-toggle .theme-icon::after {
  transform: translateX(0.6rem);
}

.admin-quickbar strong {
  background: #50575e;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  min-width: 1.15rem;
  padding: 0.16rem 0.32rem;
  text-align: center;
}

.admin-quickbar .has-update strong {
  background: #d63638;
}

.quickbar-menu {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  margin: 0;
  padding: 0;
  position: relative;
}

.quickbar-menu.is-open > .quickbar-button {
  background: #2c3338;
  border-color: #3c434a;
  color: #ffffff;
}

.quickbar-dropdown {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  display: none;
  left: 0;
  min-width: 190px;
  overflow: hidden;
  padding: 0.25rem;
  position: absolute;
  top: calc(100% + 0.35rem);
  z-index: 220;
}

.quickbar-menu.is-open .quickbar-dropdown {
  display: grid;
}

.quickbar-dropdown[hidden] {
  display: none;
}

.quickbar-dropdown a {
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.55rem 0.65rem;
  text-decoration: none;
}

.quickbar-dropdown a:hover,
.quickbar-dropdown a:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}

.global-search {
  align-items: center;
  background: color-mix(in srgb, var(--brand-contrast) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-contrast) 22%, transparent);
  border-radius: 999px;
  display: flex;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.32rem 0.45rem 0.32rem 0.8rem;
}

.global-search input {
  background: transparent;
  border: 0;
  color: var(--brand-contrast);
  min-height: 2rem;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.global-search input::placeholder {
  color: color-mix(in srgb, var(--brand-contrast) 72%, transparent);
}

.global-search span {
  border: 1px solid color-mix(in srgb, var(--brand-contrast) 28%, transparent);
  border-radius: 6px;
  color: color-mix(in srgb, var(--brand-contrast) 82%, transparent);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.18rem 0.38rem;
}

body.is-admin .nav {
  align-content: start;
  align-items: stretch;
  background: #1d2327;
  border-right: 1px solid #101517;
  bottom: 0;
  box-shadow: none;
  color: #c3c4c7;
  display: grid;
  gap: 0;
  grid-column: auto;
  grid-template-columns: 1fr;
  justify-content: stretch;
  left: 0;
  max-height: calc(100vh - var(--admin-header-height));
  overflow-y: auto;
  padding: 0.35rem 0 0.7rem;
  position: fixed;
  top: var(--admin-header-height);
  width: var(--admin-nav-width);
  z-index: 54;
  overscroll-behavior: contain;
  scrollbar-color: #50575e #1d2327;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

body.is-admin .nav::-webkit-scrollbar {
  width: 0.55rem;
}

body.is-admin .nav::-webkit-scrollbar-track {
  background: #1d2327;
}

body.is-admin .nav::-webkit-scrollbar-thumb {
  background: #50575e;
  border-radius: 999px;
}

body.is-admin .nav-head {
  display: none;
}

body.is-admin .nav a,
body.is-admin .nav button {
  background: transparent;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0;
  color: #c3c4c7;
  display: flex;
  font-size: calc(0.95rem * var(--font-scale));
  font-weight: 750;
  gap: 0.72rem;
  justify-content: flex-start;
  min-height: calc(2.72rem * var(--density-control));
  padding: calc(0.62rem * var(--density-space)) calc(0.78rem * var(--density-space));
  position: relative;
  text-align: left;
  width: 100%;
}

body.is-admin .nav a:hover,
body.is-admin .nav button:hover {
  background: #2c3338;
  color: #ffffff;
}

body.is-admin .nav a.active {
  background: #1d2327;
  border-left-color: #72aee6;
  color: #ffffff;
}

body.is-admin .nav-parent.active {
  background: transparent;
  border-left-color: #72aee6;
  color: #ffffff;
}

body.is-admin .nav form {
  width: 100%;
}

body.is-admin .nav-group {
  display: grid;
  gap: 0;
  min-width: 0;
}

body.is-admin .nav-group.active {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

body.is-admin .nav-parent {
  font-weight: 850;
}

body.is-admin .nav-icon {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #a7aaad;
  display: inline-flex;
  flex: 0 0 1.72rem;
  font-size: 1rem;
  font-weight: 900;
  height: 1.72rem;
  justify-content: center;
  line-height: 1;
  width: 1.72rem;
}

body.is-admin .nav-icon svg,
.nav-icon svg {
  display: block;
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1rem;
}

body.is-admin .nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-admin .nav-chevron {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  flex: 0 0 0.5rem;
  height: 0.5rem;
  margin-left: auto;
  opacity: 0.72;
  transform: rotate(45deg);
  transition: transform 160ms ease;
  width: 0.5rem;
}

body.is-admin .nav-group.collapsed .nav-chevron {
  transform: rotate(-45deg);
}

body.is-admin .nav-sub {
  display: grid;
  gap: 0;
  min-width: 0;
  padding-left: 0;
}

body.is-admin .nav-group.collapsed .nav-sub {
  display: none;
}

body.is-admin .nav-sub a {
  color: #b8c0c8;
  font-size: calc(0.86rem * var(--font-scale));
  font-weight: 650;
  min-height: calc(2.24rem * var(--density-control));
  padding: calc(0.48rem * var(--density-space)) calc(0.68rem * var(--density-space)) calc(0.48rem * var(--density-space)) calc(2.7rem * var(--density-space));
}

body.is-admin .nav-sub-label {
  color: #8c969f;
  font-size: calc(0.68rem * var(--font-scale));
  font-weight: 900;
  letter-spacing: 0;
  padding: calc(0.7rem * var(--density-space)) calc(0.68rem * var(--density-space)) calc(0.12rem * var(--density-space)) calc(2.7rem * var(--density-space));
  text-transform: uppercase;
}

body.is-admin .nav-sub a.active {
  background: #2c3338;
  border-left-color: #72aee6;
  color: #ffffff;
}

body.is-admin .nav-sub a.active::after {
  display: none;
}

body.is-admin .nav a.active .nav-icon {
  color: #ffffff;
}

body.is-admin .nav-parent.active .nav-icon {
  color: #72aee6;
}

body.is-admin .nav-logout {
  border-top: 1px solid #2c3338;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

body.is-admin .nav-logout button {
  background: transparent;
  color: #f4b8b3;
}

body.is-admin .nav-collapse-toggle {
  border-top: 1px solid #2c3338;
  margin-top: 0.25rem;
}

body.is-admin.admin-nav-collapsed {
  --admin-nav-width: var(--admin-nav-collapsed-width);
}

body.is-admin.admin-nav-collapsed .nav {
  width: var(--admin-nav-collapsed-width);
}

body.is-admin.admin-nav-collapsed .nav a,
body.is-admin.admin-nav-collapsed .nav button {
  justify-content: center;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

body.is-admin.admin-nav-collapsed .nav-label,
body.is-admin.admin-nav-collapsed .nav-chevron,
body.is-admin.admin-nav-collapsed .nav-sub,
body.is-admin.admin-nav-collapsed .nav-sub-label {
  display: none;
}

body.is-admin.admin-nav-collapsed .nav-icon {
  flex-basis: 2rem;
  width: 2rem;
}

body.is-admin.admin-nav-collapsed .nav-sub a.active::after {
  display: none;
}

body.is-admin .page,
body.is-admin .app-footer {
  margin-left: var(--admin-nav-width);
  margin-right: 0;
  max-width: none;
  width: calc(100% - var(--admin-nav-width));
}

.menu-toggle {
  background: color-mix(in srgb, var(--brand-contrast) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-contrast) 24%, transparent);
  color: var(--brand-contrast);
  display: none;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
}

.menu-toggle i,
.menu-toggle i::before,
.menu-toggle i::after {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  transition: transform 160ms ease, opacity 160ms ease;
  width: 1.15rem;
}

.menu-toggle i {
  position: relative;
}

.menu-toggle i::before,
.menu-toggle i::after {
  content: "";
  position: absolute;
}

.menu-toggle i::before {
  transform: translateY(-6px);
}

.menu-toggle i::after {
  transform: translateY(6px);
}

body.nav-open .menu-toggle i {
  background: transparent;
}

body.nav-open .menu-toggle i::before {
  transform: rotate(45deg);
}

body.nav-open .menu-toggle i::after {
  transform: rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

.theme-toggle {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 244, 250, 0.96)),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 30%, #c4d2df);
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(7, 22, 45, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #18304f;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 850;
  gap: 0.34rem;
  justify-content: flex-start;
  min-height: 2.4rem;
  min-width: 0;
  padding: 0.22rem 0.24rem;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  width: auto;
}

.nav .theme-toggle {
  padding: 0.22rem;
}

.theme-icon {
  background:
    radial-gradient(circle at 62% 34%, rgba(255, 255, 255, 0.72) 0 16%, transparent 17%),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 62%, #000));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  display: inline-block;
  flex: 0 0 auto;
  height: 1.38rem;
  width: 1.38rem;
}

body[data-theme="dark"] .theme-icon {
  background:
    radial-gradient(circle at 64% 34%, rgba(255, 255, 255, 0.88) 0 17%, transparent 18%),
    linear-gradient(135deg, var(--brand-accent), color-mix(in srgb, var(--brand-accent) 56%, #301400));
}

.theme-toggle-text {
  background: rgba(7, 22, 45, 0.08);
  border-radius: 4px;
  display: inline-flex;
  gap: 0.12rem;
  line-height: 1;
  padding: 0.12rem;
}

.theme-choice {
  align-items: center;
  border-radius: 3px;
  color: #18304f;
  display: inline-flex;
  min-height: 1.64rem;
  padding: 0.34rem 0.5rem;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.theme-choice-light {
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(7, 22, 45, 0.14);
  color: #07162d;
}

body[data-theme="dark"] .theme-toggle {
  background:
    linear-gradient(180deg, rgba(17, 31, 48, 0.96), rgba(8, 17, 30, 0.96)),
    #091320;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #dbeafe;
}

body[data-theme="dark"] .theme-toggle-text {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .theme-choice {
  color: #dbeafe;
}

body[data-theme="dark"] .theme-choice-light {
  background: transparent;
  box-shadow: none;
  color: #dbeafe;
}

body[data-theme="dark"] .theme-choice-dark {
  background: linear-gradient(135deg, var(--brand-accent), color-mix(in srgb, var(--brand-accent) 72%, #ffefe0));
  box-shadow: 0 5px 14px rgba(255, 107, 15, 0.24);
  color: #07162d;
}

.admin-quickbar .theme-toggle {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  box-shadow: none;
  color: #c3c4c7;
  gap: 0.38rem;
  height: 26px;
  justify-content: center;
  min-height: 26px;
  padding: 0 0.62rem;
}

.admin-quickbar .theme-toggle:hover,
.admin-quickbar .theme-toggle:focus-visible {
  background: #2c3338;
  border-color: #3c434a;
  color: #ffffff;
}

.admin-quickbar .theme-toggle .theme-icon {
  background: #c3c4c7;
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px #50575e;
  flex-basis: auto;
  height: 0.72rem;
  margin-left: 0.08rem;
  position: relative;
  transform: none;
  width: 1.32rem;
}

.admin-quickbar .theme-toggle .theme-icon::after {
  background: #ffffff;
  border-radius: 2px;
  content: "";
  height: 0.5rem;
  left: 0.11rem;
  position: absolute;
  top: 0.11rem;
  transition: transform 160ms ease;
  width: 0.5rem;
}

body[data-theme="dark"] .admin-quickbar .theme-toggle {
  color: #c3c4c7;
}

body[data-theme="dark"] .admin-quickbar .theme-toggle .theme-icon {
  background: #f59e0b;
  box-shadow: inset 0 0 0 2px #92400e;
  transform: none;
}

body[data-theme="dark"] .admin-quickbar .theme-toggle .theme-icon::after {
  transform: translateX(0.6rem);
}

.page {
  margin: 0 auto;
  max-width: 1200px;
  padding: calc(clamp(1rem, 3vw, 2.4rem) * var(--density-space));
  width: 100%;
}

.app-footer {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 750;
  gap: 0.5rem 1rem;
  justify-content: center;
  padding: 0 1rem 1.25rem;
  text-align: center;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.page > *,
.hero > *,
.grid > *,
.manual-layout > *,
.manual-content,
.manual-section,
.panel,
.booking-card,
.ticket,
.legal-page,
.table-wrap {
  min-width: 0;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  margin-bottom: 1.35rem;
}

.event-choice {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.event-choice h2 {
  margin: 0.1rem 0 0.35rem;
}

.event-choice-list {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.event-choice-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.85rem;
  text-decoration: none;
}

.event-choice-card.active {
  background: color-mix(in srgb, var(--brand-accent) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-accent) 72%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 16%, transparent);
}

.event-choice-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.hero-main {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 94%, #000 6%), color-mix(in srgb, var(--brand-primary) 82%, #000 18%)),
    var(--brand-primary);
  color: var(--hero-contrast);
  display: grid;
  align-content: center;
  min-height: 330px;
  padding: clamp(1.35rem, 4vw, 3rem);
}

.hero-main,
.panel,
.stat,
.booking-card,
.ticket,
.login-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.hero-main h1 {
  --fit-max: 54;
  --fit-min: 28;
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0 0 1rem;
  max-width: min(980px, 100%);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.hero-main p {
  color: color-mix(in srgb, var(--hero-contrast) 86%, transparent);
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  line-height: 1.55;
  margin: 0;
  max-width: 820px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.3rem;
}

.pill {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 750;
  gap: 0.35rem;
  max-width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
}

.hero-main .pill {
  background: color-mix(in srgb, var(--hero-contrast) 12%, transparent);
  border-color: color-mix(in srgb, var(--hero-contrast) 18%, transparent);
  color: var(--hero-contrast);
}

.accent {
  color: var(--brand-accent);
}

.app-kicker {
  color: color-mix(in srgb, currentColor 70%, transparent);
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.panel,
.booking-card,
.ticket,
.login-box {
  background: var(--surface);
}

.code-panel {
  align-self: center;
  display: grid;
  gap: 0.9rem;
}

.code-panel h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  margin-bottom: 0;
}

.code-form {
  gap: 0.85rem;
}

.code-input {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.code-form .primary,
.booking-actions .primary {
  min-height: 3.15rem;
}

.code-form .primary {
  width: 100%;
}

.inline-error {
  background: rgba(184, 59, 47, 0.12);
  border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--line));
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  padding: 0.75rem 0.85rem;
}

.booking-window-notice {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
  line-height: 1.4;
  padding: 0.85rem 0.95rem;
}

.booking-window-notice strong {
  font-size: 1rem;
}

.booking-window-notice span {
  color: var(--muted);
}

.booking-window-notice.inline-error span {
  color: inherit;
}

.mini-steps {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-steps span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0.45rem 0.25rem;
  text-align: center;
}

.booking-app {
  display: grid;
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.booking-head {
  margin-bottom: 0;
}

.booking-progress {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-progress span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0.55rem;
  text-align: center;
}

.booking-progress span.active {
  background: color-mix(in srgb, var(--brand-accent) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-accent) 38%, var(--line));
  color: var(--ink);
}

.student-booking-form,
.form-section {
  display: grid;
  gap: 0.8rem;
}

.form-section h3 {
  margin: 0;
}

.student-fields {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
}

.student-fields input[readonly] {
  background: color-mix(in srgb, var(--surface-2) 72%, var(--line));
  border-color: color-mix(in srgb, var(--brand-primary) 20%, var(--line));
  color: var(--ink);
}

.round-card {
  position: relative;
}

.round-card header {
  align-items: center;
}

.round-index {
  align-items: center;
  background: var(--brand-primary);
  border-radius: 50%;
  color: var(--brand-contrast);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 1.8rem;
  justify-content: center;
  width: 1.8rem;
}

.booking-actions {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-left: -1px;
  margin-right: -1px;
  padding-top: 1rem;
}

.panel {
  padding: clamp(1rem, 2vw, 1.25rem);
}

.panel h2,
.panel h3,
.booking-card h2,
.ticket h2,
.login-box h2 {
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0 0 0.85rem;
}

.panel p,
.form-hint,
.muted {
  color: var(--muted);
}

.panel p {
  line-height: 1.55;
  margin: 0 0 0.85rem;
}

body:not(.is-admin) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-primary) 9%, var(--bg)) 0, var(--bg) 380px),
    var(--bg);
}

body:not(.is-admin) .page {
  max-width: min(1180px, 100%);
}

body:not(.is-admin) .hero {
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

body:not(.is-admin) .hero-main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 96%, #000 4%), color-mix(in srgb, var(--brand-primary) 72%, var(--brand-accent) 28%));
  border-color: color-mix(in srgb, var(--brand-primary) 32%, var(--line));
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-card);
  min-height: 304px;
  overflow: hidden;
  position: relative;
}

body:not(.is-admin) .hero-main::before {
  background: var(--brand-accent);
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

body:not(.is-admin) .hero-main h1 {
  font-weight: 850;
  max-width: 930px;
}

body:not(.is-admin) .hero-main p {
  max-width: 700px;
}

body:not(.is-admin) .hero-meta .pill {
  backdrop-filter: blur(8px);
  min-height: 2.25rem;
}

body:not(.is-admin) .event-choice,
body:not(.is-admin) .code-panel,
body:not(.is-admin) .booking-card,
body:not(.is-admin) .ticket,
body:not(.is-admin) .login-box,
body:not(.is-admin) .stat {
  border-color: color-mix(in srgb, var(--brand-primary) 14%, var(--line));
}

body:not(.is-admin) .code-panel,
body:not(.is-admin) .booking-card,
body:not(.is-admin) .ticket,
body:not(.is-admin) .login-box {
  position: relative;
}

body:not(.is-admin) .code-panel::before,
body:not(.is-admin) .booking-card::before,
body:not(.is-admin) .ticket::before,
body:not(.is-admin) .login-box::before {
  background: linear-gradient(90deg, var(--brand-accent), color-mix(in srgb, var(--brand-primary) 72%, var(--brand-accent)));
  border-radius: calc(var(--radius) + 1px) calc(var(--radius) + 1px) 0 0;
  content: "";
  display: block;
  height: 4px;
  left: -1px;
  position: absolute;
  right: -1px;
  top: -1px;
}

body:not(.is-admin) .code-panel {
  align-content: center;
  align-self: stretch;
  padding-top: clamp(1.2rem, 2.4vw, 1.55rem);
}

body:not(.is-admin) .code-panel h2,
body:not(.is-admin) .booking-card h2,
body:not(.is-admin) .ticket h2 {
  letter-spacing: 0;
}

body:not(.is-admin) .mini-steps,
body:not(.is-admin) .booking-progress {
  gap: 0.5rem;
}

body:not(.is-admin) .mini-steps span,
body:not(.is-admin) .booking-progress span {
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  border-radius: 999px;
  font-size: clamp(0.7rem, 0.78vw, 0.78rem);
  min-height: 2.15rem;
  padding: 0.48rem 0.55rem;
  white-space: nowrap;
}

body:not(.is-admin) .booking-progress span.active {
  background: color-mix(in srgb, var(--brand-primary) 92%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-primary) 82%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 13%, transparent);
  color: var(--brand-contrast);
}

body:not(.is-admin) .student-fields,
body:not(.is-admin) .round-card,
body:not(.is-admin) .privacy-consent,
body:not(.is-admin) .ticket-mail,
body:not(.is-admin) .ticket-share,
body:not(.is-admin) .ticket-survey-note {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-primary) 13%, var(--line));
}

body:not(.is-admin) .round-card {
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

body:not(.is-admin) .round-card header {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 9%, var(--line));
  border-radius: calc(var(--radius) - 1px);
  padding: 0.58rem 0.68rem;
}

body:not(.is-admin) .round-index {
  background: var(--brand-accent);
  color: var(--accent-contrast);
}

body:not(.is-admin) .ticket {
  max-width: min(940px, 100%);
}

body:not(.is-admin) .ticket-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 96%, #000 4%), color-mix(in srgb, var(--brand-primary) 72%, var(--brand-accent) 28%));
  padding: clamp(1rem, 2.6vw, 1.45rem);
}

body:not(.is-admin) .ticket-body {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.6vw, 1.45rem);
}

body:not(.is-admin) .ticket-share {
  background: color-mix(in srgb, var(--brand-accent) 9%, var(--surface));
}

body:not(.is-admin) .ticket-mail-form {
  align-items: end;
}

body:not(.is-admin) .stat {
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

body:not(.is-admin) .stat::before {
  background: color-mix(in srgb, var(--brand-accent) 82%, var(--brand-primary));
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.legal-page {
  display: grid;
  gap: 1rem;
}

.legal-summary .definition-grid span {
  white-space: pre-line;
}

.legal-text {
  max-width: 920px;
}

.legal-copy {
  color: var(--ink);
  font-size: clamp(0.92rem, 1.4vw, 1rem);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.legal-editor {
  min-height: 22rem;
}

.privacy-consent {
  background: var(--surface-2);
  border-style: dashed;
}

.consent-line {
  align-items: flex-start;
  gap: 0.7rem;
  line-height: 1.5;
}

.consent-line input {
  margin-top: 0.2rem;
}

.consent-line span {
  color: var(--ink);
  font-weight: 700;
}

.check-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.token-output {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  font-size: clamp(0.78rem, 2vw, 0.95rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
  padding: 0.9rem;
}

.api-token-once {
  border-color: var(--accent);
}

.quick-form {
  display: grid;
  gap: 0.75rem;
}

.filter-bar {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.breadcrumbs {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.86rem;
  gap: 0.42rem;
  margin: 0 0 1rem;
}

.breadcrumbs a {
  color: var(--brand-primary);
  font-weight: 800;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs strong {
  color: var(--muted);
}

.event-status-banner {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.8rem 1rem;
}

.event-status-banner strong {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.55rem;
}

.event-status-banner.draft {
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
}

.event-status-banner.draft strong {
  background: var(--warning);
  color: #111111;
}

.event-status-banner.active {
  background: color-mix(in srgb, var(--success) 11%, var(--surface));
}

.event-status-banner.active strong {
  background: var(--success);
  color: var(--success-contrast);
}

.event-status-banner.closed,
.event-status-banner.archived {
  background: var(--surface-2);
}

.event-status-banner.closed strong,
.event-status-banner.archived strong {
  background: var(--muted);
  color: var(--surface);
}

.search-page {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(220px, 1fr) auto;
}

.search-list {
  display: grid;
  gap: 0.5rem;
}

.search-quick-actions,
.quick-action-grid {
  display: grid;
  gap: 0.85rem;
}

.quick-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.search-result {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  text-decoration: none;
}

.search-result span {
  color: var(--muted);
  font-size: 0.9rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.color-field input[type="color"] {
  padding: 0.2rem;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: calc(1rem * var(--font-scale));
  max-width: 100%;
  min-height: calc(3rem * var(--density-control));
  padding: calc(0.72rem * var(--density-space)) calc(0.8rem * var(--density-space));
  width: 100%;
}

select {
  text-overflow: ellipsis;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 20%, transparent);
  outline: none;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 800;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

.primary {
  background: var(--brand-accent);
  border: 1px solid color-mix(in srgb, var(--brand-accent) 72%, var(--ink));
  color: var(--accent-contrast) !important;
}

.primary:hover {
  background: var(--brand-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 18%, transparent), var(--shadow-soft);
  color: var(--accent-contrast) !important;
}

.secondary {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink) !important;
}

.secondary:hover,
.ghost:hover {
  background: var(--surface-3);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink) !important;
}

.full-width {
  justify-content: center;
  width: 100%;
}

button.is-loading,
input.is-loading,
.button.is-loading {
  cursor: progress;
  opacity: 0.82;
}

button.is-loading::before {
  animation: spin 0.8s linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
  height: 0.9rem;
  width: 0.9rem;
}

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

[data-tooltip] {
  position: relative;
}

.info-tip {
  align-items: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 900;
  height: 1.1rem;
  justify-content: center;
  margin-left: 0.25rem;
  vertical-align: middle;
  width: 1.1rem;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  background: #1f2937;
  border-radius: 6px;
  bottom: calc(100% + 0.45rem);
  color: var(--surface);
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 750;
  left: 50%;
  line-height: 1.25;
  max-width: min(18rem, 70vw);
  padding: 0.45rem 0.55rem;
  position: absolute;
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  z-index: 90;
}

.table-wrap .ghost {
  overflow-wrap: anywhere;
  white-space: normal;
}

.danger {
  background: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 70%, var(--ink));
  color: #ffffff !important;
}

.success {
  background: rgba(37, 118, 77, 0.13);
  color: var(--success);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-stack {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.admin-stack > .panel {
  min-width: 0;
}

.event-create-panel {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(15rem, 0.75fr) minmax(0, 1.25fr);
  margin-bottom: 1rem;
  scroll-margin-top: 1rem;
}

.event-create-panel h3 {
  margin-bottom: 0.35rem;
}

.event-create-form {
  align-items: end;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.event-guide-option {
  grid-column: 1 / -1;
}

.setup-guide {
  background: color-mix(in srgb, var(--brand-accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 32%, var(--line));
  border-radius: var(--radius);
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1rem, 2vw, 1.25rem);
}

.setup-guide-head {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.setup-guide-head h3 {
  margin: 0.15rem 0 0.35rem;
}

.setup-guide-head p {
  color: var(--muted);
  margin: 0;
}

.setup-steps {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.setup-steps a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
  min-height: 9.4rem;
  padding: 0.72rem;
  text-decoration: none;
}

.setup-steps li.current a {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 16%, transparent);
}

.setup-steps li.done a {
  background: color-mix(in srgb, var(--success) 11%, var(--surface));
}

.setup-step-number {
  align-items: center;
  background: var(--brand-primary);
  border-radius: 50%;
  color: var(--brand-contrast);
  display: inline-flex;
  font-weight: 900;
  height: 1.65rem;
  justify-content: center;
  width: 1.65rem;
}

.setup-steps li.done .setup-step-number {
  background: var(--success);
  color: var(--success-contrast);
}

.setup-steps small {
  color: var(--muted);
  line-height: 1.35;
  max-width: 300px;
}

.workflow-assistant {
  background: color-mix(in srgb, var(--brand-primary) 5%, var(--surface));
}

.workflow-assistant .setup-steps {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.workflow-assistant .setup-steps a {
  min-height: 7.2rem;
}

.changelog-list {
  display: grid;
  gap: 0.85rem;
}

.changelog-entry {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem;
}

.changelog-entry header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.changelog-entry small {
  color: var(--muted);
  font-weight: 750;
}

.feature-map-head {
  align-items: start;
}

.feature-map-shell {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.7fr);
}

.feature-map-canvas {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-height: calc(100vh - 7rem);
  overflow: auto;
  position: sticky;
  top: 5.8rem;
}

.feature-map-root {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 90%, #111), color-mix(in srgb, var(--brand-accent) 34%, var(--brand-primary))),
    var(--brand-primary);
  border: 1px solid color-mix(in srgb, var(--brand-contrast) 22%, transparent);
  border-radius: var(--radius);
  color: var(--brand-contrast);
  display: grid;
  gap: 0.35rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  position: relative;
}

.feature-map-root::after {
  background: var(--brand-accent);
  border-radius: 999px;
  bottom: -0.55rem;
  content: "";
  height: 1.1rem;
  left: clamp(1.2rem, 4vw, 2rem);
  position: absolute;
  width: 1.1rem;
}

.feature-map-root strong {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.05;
}

.feature-map-root small {
  color: color-mix(in srgb, var(--brand-contrast) 82%, transparent);
  font-weight: 750;
  line-height: 1.4;
}

.feature-layer-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-layer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.95rem;
}

.feature-layer header {
  display: grid;
  gap: 0.25rem;
}

.feature-layer h3,
.feature-layer p {
  margin: 0;
}

.feature-layer p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.feature-node-list {
  display: grid;
  gap: 0.5rem;
}

.feature-node-group {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.feature-node {
  align-items: start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 0.2rem;
  justify-content: stretch;
  min-height: 4.3rem;
  padding: 0.7rem 0.8rem;
  position: relative;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.feature-node::before {
  background: var(--brand-primary);
  border-radius: 999px;
  content: "";
  height: 0.55rem;
  left: 0.8rem;
  position: absolute;
  top: 0.82rem;
  width: 0.55rem;
}

.feature-node span,
.feature-node strong {
  padding-left: 1rem;
}

.feature-node span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-node strong {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.18;
}

.feature-node.active {
  background: color-mix(in srgb, var(--brand-accent) 13%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-accent) 72%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 16%, transparent);
}

.feature-node.active::before {
  background: var(--brand-accent);
}

.feature-detail {
  display: block;
  position: sticky;
  top: 5.8rem;
  max-height: calc(100vh - 7rem);
  overflow: auto;
}

.feature-inline-detail {
  display: none;
}

.feature-detail-panel {
  display: grid;
  gap: 0.85rem;
}

.feature-detail-panel[hidden] {
  display: none;
}

.feature-detail-panel h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.05;
  margin: 0;
}

.feature-detail-panel p {
  line-height: 1.55;
  margin: 0;
}

.feature-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.feature-detail-list span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.45rem 0.65rem;
}

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

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

.stat {
  background: var(--surface);
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  min-height: 104px;
}

.stat strong {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  letter-spacing: 0;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.section {
  margin-top: 1.25rem;
}

.section-head {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  min-width: 0;
}

.section-head h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.18;
  margin: 0;
}

.section-head p {
  margin: 0.25rem 0 0;
}

.page > .section-head {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(16, 24, 18, 0.08);
  padding: clamp(1rem, 2vw, 1.25rem);
}

.admin-page-head {
  align-items: flex-start;
}

.admin-page-head > div:first-child {
  min-width: 0;
}

.admin-page-actions {
  align-items: flex-end;
  display: grid;
  gap: 0.55rem;
  justify-items: end;
  min-width: min(100%, 22rem);
}

.screen-options {
  max-width: min(100%, 36rem);
  position: relative;
  width: max-content;
}

.screen-options > summary {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 850;
  gap: 0.45rem;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.screen-options > summary:hover {
  background: var(--surface-3);
}

.screen-options[open] > summary {
  border-color: color-mix(in srgb, var(--brand-primary) 34%, var(--line));
}

.screen-options-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  min-width: min(86vw, 36rem);
  padding: 0.85rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 40;
}

.screen-options-grid {
  display: grid;
  gap: 0.45rem 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-options .checkline {
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0;
  min-width: 0;
  padding: 0.65rem;
}

.screen-options .checkline span {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.screen-options .checkline strong {
  font-size: 0.9rem;
}

.screen-options .checkline small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.config-context {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.config-context > div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.config-context strong {
  font-size: 1.05rem;
}

.eyebrow,
.tab-group-title {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.event-switcher {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.event-switcher select {
  min-width: min(360px, 68vw);
}

.event-cockpit {
  display: grid;
  gap: 1rem;
}

.event-cockpit-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.event-cockpit-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
  min-height: 7.2rem;
  padding: 0.95rem;
  text-decoration: none;
}

.event-cockpit-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.event-cockpit-card strong {
  font-size: 1rem;
}

.event-cockpit-card em {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  margin-top: 0.12rem;
}

.event-cockpit-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.status-widget {
  border-left: 4px solid var(--brand-primary);
}

.onboarding-panel {
  border-color: color-mix(in srgb, var(--brand-primary) 22%, var(--line));
}

.onboarding-steps {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.onboarding-steps a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.onboarding-steps a:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-soft);
}

.onboarding-steps span {
  color: var(--muted);
}

.empty-state {
  align-items: center;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  padding: 2rem 1rem;
  text-align: center;
}

.empty-state-icon {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 2rem;
  height: 80px;
  justify-content: center;
  width: 80px;
}

.empty-state strong {
  font-size: calc(16px * var(--ui-scale));
}

.empty-state p {
  color: var(--muted);
  margin: 0;
}

.cockpit-stack {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.cockpit-stack > .panel {
  min-width: 0;
}

.config-tabs {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.tab-group {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  min-width: 0;
}

.tabs a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: clamp(0.84rem, 0.78vw, 1rem);
  font-weight: 800;
  min-height: 2.55rem;
  padding: 0.62rem 0.82rem;
  text-decoration: none;
  white-space: normal;
}

.tabs a.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-contrast);
}

.tab-group .tabs {
  margin: 0;
}

.config-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.settings-form {
  display: grid;
  gap: 0.9rem;
}

.settings-form[data-settings-tabs] {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.settings-form[data-settings-tabs] .settings-savebar {
  grid-column: 1 / -1;
}

.settings-form[data-settings-tabs] .config-section-nav {
  align-self: start;
  background: color-mix(in srgb, var(--surface-2) 62%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.55rem;
  position: sticky;
  top: 5.8rem;
  z-index: 9;
}

.settings-form[data-settings-tabs] .settings-section {
  grid-column: 1;
  min-width: 0;
}

.settings-form[data-settings-tabs] .settings-section summary {
  cursor: default;
}

.settings-savebar {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: space-between;
  padding: 0.85rem;
  position: sticky;
  top: 5.7rem;
  z-index: 18;
}

.settings-savebar h3,
.settings-savebar p {
  margin: 0;
}

.email-test-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  min-width: 0;
}

.email-test-actions input,
.email-test-actions select {
  min-width: min(100%, 14rem);
}

.config-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.config-section-nav a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 850;
  min-height: 2.4rem;
  align-items: center;
  padding: 0.52rem 0.78rem;
  text-decoration: none;
}

.config-section-nav a:hover,
.config-section-nav a.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-contrast);
}

.admin-workspace {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.admin-workspace-content {
  min-width: 0;
}

.admin-side-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0.65rem;
  position: sticky;
  overflow-x: visible;
  top: 5.8rem;
  z-index: 2;
}

.admin-side-nav-head {
  display: none;
}

.admin-side-nav-head strong {
  font-size: 0.98rem;
}

.admin-side-nav-head span,
.admin-side-nav a span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.admin-side-nav a span {
  display: none;
}

.admin-side-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-side-nav a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  display: flex;
  flex: 0 0 auto;
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
  min-height: 2.65rem;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.admin-side-nav a:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.admin-side-nav a.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-contrast);
}

.admin-side-nav a.active span {
  color: color-mix(in srgb, var(--brand-contrast) 76%, transparent);
}

.settings-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: 1rem;
  box-shadow: 0 1px 0 rgba(16, 24, 18, 0.04);
}

.settings-section summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  min-height: 4.1rem;
  padding: 0.95rem 1rem;
  transition: background-color 140ms ease;
}

.settings-section summary::-webkit-details-marker {
  display: none;
}

.settings-section summary::after {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "+";
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 1.85rem;
  justify-content: center;
  margin-left: 0.75rem;
  width: 1.85rem;
}

.settings-section summary:hover {
  background: color-mix(in srgb, var(--brand-accent) 5%, var(--surface));
}

.settings-section[open] summary::after {
  content: "-";
}

.settings-section[open] > summary {
  background: color-mix(in srgb, var(--brand-accent) 7%, var(--surface));
  border-bottom: 1px solid var(--line);
}

.settings-section summary span {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.settings-section summary strong {
  font-size: 1rem;
}

.settings-section summary small {
  color: var(--muted);
  line-height: 1.35;
}

.settings-section-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

a.stat {
  color: var(--ink);
  text-decoration: none;
}

a.stat:hover,
a.stat.active {
  border-color: color-mix(in srgb, var(--brand-accent) 62%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 14%, transparent), var(--shadow-card);
}

.cockpit-kpis {
  align-items: stretch;
}

.event-cockpit-sections {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
}

.event-cockpit-section {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.85rem;
}

.event-cockpit-section header {
  display: grid;
  gap: 0.18rem;
}

.event-cockpit-section h4 {
  margin: 0;
}

.nested-settings {
  background: color-mix(in srgb, var(--surface-2) 64%, var(--surface));
  box-shadow: none;
  margin: 0;
}

.nested-settings .settings-section-body {
  gap: 0.85rem;
}

.settings-grid,
.settings-color-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-color-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.settings-subsection {
  display: grid;
  gap: 0.75rem;
}

.settings-subsection h4 {
  font-size: 0.92rem;
  margin: 0;
}

.theme-preset-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
}

.theme-preset-picker {
  align-items: stretch;
  background: color-mix(in srgb, var(--surface-2) 78%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
  padding: 0.85rem;
}

.theme-preset-status {
  align-items: center;
  background: color-mix(in srgb, var(--brand-accent) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 34%, var(--line));
  border-radius: var(--radius);
  color: var(--ink);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  min-height: 2.85rem;
  min-width: 0;
  padding: 0.7rem 0.85rem;
}

.theme-preset-card {
  appearance: none;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 68%, transparent), transparent),
    var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  display: grid;
  gap: 0.7rem;
  justify-content: stretch;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  padding: 0.85rem;
  position: relative;
  text-align: left;
  color: var(--ink);
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
  white-space: normal;
  width: 100%;
}

.theme-preset-card:hover,
.theme-preset-card.active,
.theme-preset-card[aria-pressed="true"] {
  background: color-mix(in srgb, var(--brand-accent) 10%, var(--surface));
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 16%, transparent), var(--shadow-soft);
}

.theme-preset-card.active .theme-preset-check,
.theme-preset-card[aria-pressed="true"] .theme-preset-check {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

.theme-preset-card.active .theme-preset-check::after,
.theme-preset-card[aria-pressed="true"] .theme-preset-check::after {
  opacity: 1;
}

.theme-preset-check {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  height: 1.15rem;
  justify-content: center;
  justify-self: end;
  width: 1.15rem;
}

.theme-preset-check::after {
  border: solid var(--accent-contrast);
  border-width: 0 2px 2px 0;
  content: "";
  height: 0.42rem;
  opacity: 0;
  transform: rotate(45deg) translate(-1px, -1px);
  width: 0.22rem;
}

.theme-preset-head {
  display: grid;
  gap: 0.22rem;
}

.theme-preset-head strong {
  font-size: 0.95rem;
}

.theme-preset-head span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.theme-swatch-row {
  display: grid;
  gap: 0.34rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.theme-swatch-row i {
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 999px;
  display: block;
  height: 1rem;
  min-width: 0;
}

.theme-swatch-row.custom i:nth-child(1) {
  background: var(--brand-primary);
}

.theme-swatch-row.custom i:nth-child(2) {
  background: var(--brand-accent);
}

.theme-swatch-row.custom i:nth-child(3) {
  background: var(--surface);
}

.theme-swatch-row.custom i:nth-child(4) {
  background: var(--ink);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  bottom: 0.75rem;
  z-index: 16;
}

.settings-actions button {
  box-shadow: var(--shadow-soft);
}

.config-help-panel {
  display: grid;
  gap: 0.8rem;
  position: static;
}

.settings-help-list {
  display: grid;
  gap: 0.55rem;
}

.settings-help-list span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem;
}

.settings-help-list strong {
  color: var(--ink);
}

.soft-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}

.event-day-list {
  display: grid;
  gap: 0.75rem;
}

.event-day-row,
.event-day-edit {
  align-items: end;
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.event-day-row {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.75rem;
}

.event-day-edit {
  grid-template-columns: minmax(160px, 1fr) minmax(145px, 0.65fr) auto auto auto;
}

.event-day-edit .field {
  margin: 0;
}

.danger-zone {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 26%, var(--line));
  border-radius: var(--radius);
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
}

.danger-zone h3,
.danger-zone p {
  margin: 0;
}

.delete-summary {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.delete-summary li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem;
}

.delete-summary strong {
  font-size: 1.25rem;
  line-height: 1;
}

.delete-summary span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.manual-hero {
  align-items: end;
  background: var(--brand-primary);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--brand-contrast);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.manual-hero.student-help {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 82%, #111), color-mix(in srgb, var(--brand-accent) 38%, var(--brand-primary))),
    var(--brand-primary);
}

.manual-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 0.15rem 0 0.55rem;
}

.manual-hero p {
  color: color-mix(in srgb, var(--brand-contrast) 84%, transparent);
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}

.manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.help-search {
  align-items: end;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 0.75fr) minmax(260px, 1fr);
  margin-bottom: 1rem;
}

.help-search h2,
.help-search p {
  margin: 0;
}

.help-search .field {
  margin: 0;
}

.help-search-results {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  grid-column: 1 / -1;
  padding-top: 0.75rem;
}

.help-search-result {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.22rem;
  padding: 0.72rem 0.85rem;
  text-decoration: none;
}

.help-search-result:hover,
.help-search-result:focus-visible {
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--brand-accent) 42%, var(--line));
}

.help-search-result strong {
  color: var(--ink);
}

.help-search-result span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.manual-section[hidden] {
  display: none;
}

.manual-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: 220px minmax(0, 1fr);
}

.manual-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem;
  position: sticky;
  top: 5.8rem;
  max-height: none;
  overflow: visible;
}

.manual-nav-toggle {
  display: none;
}

.manual-nav-links {
  display: grid;
  gap: 0.2rem;
}

.manual-nav-links a {
  border-radius: 7px;
  color: var(--ink);
  font-weight: 750;
  padding: 0.45rem 0.55rem;
  text-decoration: none;
}

.manual-nav-links a:hover {
  background: var(--surface-2);
}

.manual-content,
.manual-section {
  display: grid;
  gap: 1rem;
}

.manual-section {
  scroll-margin-top: 1rem;
}

.manual-section h2 {
  margin: 0;
}

.guide-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
  text-decoration: none;
}

.guide-card p {
  margin: 0;
}

.invitation-mail-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0.85rem 0 1rem;
}

.invitation-mail-grid .guide-card {
  align-content: start;
  background: color-mix(in srgb, var(--brand-primary) 5%, var(--surface));
}

.invitation-sendbar {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-top: 0.85rem;
  padding: 0.9rem;
}

.invitation-sendbar .checkbox-inline {
  justify-self: end;
}

.guide-number {
  align-items: center;
  background: var(--brand-accent);
  border-radius: 50%;
  color: var(--accent-contrast);
  display: inline-flex;
  font-weight: 900;
  height: 1.8rem;
  justify-content: center;
  width: 1.8rem;
}

.manual-figure {
  display: grid;
  gap: 0.55rem;
}

.mock-screen {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.mock-top {
  background: var(--brand-primary);
  color: var(--brand-contrast);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem;
}

.mock-top span {
  background: color-mix(in srgb, var(--brand-contrast) 14%, transparent);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.3rem 0.55rem;
}

.mock-body {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.8rem;
}

.mock-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 70px;
}

.mock-panel.wide {
  grid-column: 1 / -1;
  min-height: 48px;
}

.figure-caption {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.definition-grid,
.role-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.definition-grid div,
.role-grid div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
}

.definition-grid span,
.role-grid span {
  color: var(--muted);
}

.flow-strip {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.flow-step {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.35rem;
  min-height: 126px;
  padding: 0.8rem;
}

.flow-step span {
  align-items: center;
  background: var(--brand-primary);
  border-radius: 50%;
  color: var(--brand-contrast);
  display: inline-flex;
  font-weight: 900;
  height: 1.7rem;
  justify-content: center;
  width: 1.7rem;
}

.flow-step small {
  color: var(--muted);
  line-height: 1.35;
}

.guide-note {
  background: color-mix(in srgb, var(--brand-accent) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 35%, var(--line));
  border-radius: var(--radius);
  padding: 0.85rem;
}

.guide-note.warn-note {
  background: color-mix(in srgb, #f5a524 14%, var(--surface));
  border-color: color-mix(in srgb, #f5a524 42%, var(--line));
}

.guide-note.warning {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
}

.required-mark {
  color: var(--danger);
  font-weight: 900;
}

.required-note {
  color: var(--ink);
}

.import-result details {
  margin-top: 0.55rem;
}

.code-visual {
  align-items: center;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.code-card {
  background: #111;
  border-radius: var(--radius);
  color: #fff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 900;
  letter-spacing: 0;
  padding: 1.1rem;
  text-align: center;
}

.code-arrow {
  color: var(--muted);
  font-size: 1.7rem;
  font-weight: 900;
}

.code-result {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
}

.code-result span {
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.2rem;
}

details {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: visible;
}

.table-wrap th {
  white-space: normal;
}

.table-wrap td {
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: top;
}

.table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.localization-table input {
  min-width: 0;
  width: 100%;
}

.localization-table td strong,
.localization-table td small {
  display: block;
}

.localization-table .badge + small {
  margin-top: 0.35rem;
}

.table-actions form {
  margin: 0;
}

.table-actions .button,
.table-actions button {
  font-size: 0.82rem;
  min-height: 2.25rem;
  overflow-wrap: anywhere;
  padding: 0.52rem 0.7rem;
  white-space: normal;
}

.resource-table {
  table-layout: fixed;
}

.resource-table th:nth-child(1) {
  width: 17%;
}

.resource-table th:nth-child(2) {
  width: 9%;
}

.resource-table th:nth-child(3) {
  width: 14%;
}

.resource-table th:nth-child(4) {
  width: 17%;
}

.resource-table th:nth-child(5) {
  width: 18%;
}

.resource-table th:nth-child(6) {
  width: 9%;
}

.resource-table th:nth-child(7) {
  width: 16%;
}

.resource-table td {
  overflow-wrap: anywhere;
}

.resource-table .table-actions {
  align-items: stretch;
  display: grid;
  gap: 0.35rem;
}

.resource-table .table-actions .button,
.resource-table .table-actions button {
  justify-content: center;
  min-height: 2rem;
  padding: 0.42rem 0.55rem;
}

.mini-table {
  margin-top: 1rem;
}

table {
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  padding: 0.72rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.flash-stack {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.flash {
  border-radius: var(--radius);
  font-weight: 750;
  padding: 0.85rem 1rem;
}

.flash.info {
  background: var(--surface-2);
}

.flash.success {
  background: rgba(37, 118, 77, 0.14);
  color: var(--success);
}

.flash.error {
  background: rgba(184, 59, 47, 0.13);
  color: var(--danger);
}

.flash.warning {
  background: rgba(245, 130, 0, 0.16);
  color: #7a3b00;
}

.toast-stack {
  bottom: 1rem;
  display: grid;
  gap: 0.55rem;
  pointer-events: none;
  position: fixed;
  right: 1rem;
  width: min(24rem, calc(100vw - 2rem));
  z-index: 120;
}

.toast {
  background: var(--ink);
  border: 1px solid color-mix(in srgb, var(--surface) 16%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--surface);
  font-weight: 800;
  line-height: 1.35;
  opacity: 1;
  padding: 0.82rem 0.95rem;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.success {
  background: var(--success);
  color: var(--success-contrast);
}

.toast.error {
  background: var(--danger);
  color: #ffffff;
}

.toast.leaving {
  opacity: 0;
  transform: translateY(0.5rem);
}

.booking-card {
  padding: clamp(1rem, 3vw, 1.4rem);
}

.round-list {
  display: grid;
  gap: 0.9rem;
}

.round-card {
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.round-card header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.round-card strong {
  font-size: 1rem;
}

.ticket {
  margin: 0 auto;
  max-width: 860px;
  overflow: hidden;
}

.ticket-head {
  align-items: center;
  background: var(--brand-primary);
  color: var(--brand-contrast);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.2rem;
}

.ticket-head h1 {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.15;
  margin: 0 0 0.25rem;
}

.ticket-body {
  padding: 1.2rem;
}

.ticket-code {
  align-items: center;
  display: grid;
  flex: 0 0 auto;
  gap: 0.35rem;
  justify-items: center;
  max-width: 128px;
}

.ticket-code span {
  color: var(--brand-contrast);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.qr-code {
  background: #fff;
  border: 6px solid #fff;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  display: grid;
  height: auto;
  width: 112px;
}

.qr-code.mini {
  border-width: 4px;
  border-radius: 6px;
  box-shadow: none;
  width: 58px;
}

.qr-mini {
  display: inline-grid;
  place-items: center;
}

.ticket-mail {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.9fr);
  margin-top: 1rem;
  padding: 1rem;
}

.ticket-share {
  background: color-mix(in srgb, var(--brand-accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 28%, var(--line));
  border-radius: var(--radius);
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr) minmax(240px, auto);
  margin-top: 1rem;
  padding: 1rem;
}

.share-help {
  background: color-mix(in srgb, var(--surface) 88%, var(--brand-accent));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 24%, var(--line));
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
  margin-top: 0.7rem;
  padding: 0.75rem;
}

.share-help strong {
  font-size: 0.92rem;
}

.share-help ol {
  color: var(--ink);
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1.2rem;
}

.share-help li,
.share-help span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.ticket-mail h2,
.ticket-share h2 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.ticket-mail-form {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ticket-share-actions {
  align-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  min-width: 0;
}

.ticket-share-actions .button,
.ticket-share-actions button {
  min-width: 0;
}

.survey-ticket {
  max-width: 980px;
}

.ticket-survey-note {
  background: color-mix(in srgb, var(--brand-accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 24%, var(--line));
  border-radius: var(--radius);
  margin-top: 1rem;
  padding: 1rem;
}

.ticket-survey-note h2 {
  font-size: 1.05rem;
  margin: 0.2rem 0 0.25rem;
}

.survey-summary,
.survey-form-panel {
  margin-top: 1rem;
}

.survey-form {
  display: grid;
  gap: 0.9rem;
}

.survey-question {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.65rem;
  margin: 0;
  min-width: 0;
  padding: 0.95rem;
}

.survey-question legend {
  color: var(--ink);
  float: left;
  font-weight: 850;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  max-width: 100%;
  padding: 0;
  white-space: pre-line;
  width: 100%;
}

.survey-question legend + * {
  clear: both;
}

.choice-stack {
  display: grid;
  gap: 0.45rem;
}

.survey-question .choice-stack .checkline {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 2.8rem;
  padding: 0.68rem 0.75rem;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.rating-row label {
  cursor: pointer;
  display: inline-flex;
  min-width: 0;
  position: relative;
}

.rating-row input {
  opacity: 0;
  position: absolute;
  inset: 0;
}

.rating-row span {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 850;
  line-height: 1.15;
  min-height: 2.45rem;
  min-width: 2.45rem;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  text-align: center;
  width: auto;
}

.rating-row input:checked + span {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-contrast);
}

.rating-row input:focus-visible + span {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 28%, transparent);
}

.survey-question-admin,
.survey-result-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
}

.survey-workspace-head {
  gap: 0.8rem;
}

.survey-workspace-head .tabs {
  margin: 0;
}

.survey-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  min-width: 0;
}

.survey-quick-stats span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.45rem 0.7rem;
  white-space: nowrap;
}

.survey-quick-stats strong {
  color: var(--ink);
}

.survey-question-admin {
  overflow: hidden;
}

.survey-question-admin summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 0.55rem 0.8rem;
  justify-content: space-between;
  list-style: none;
  min-width: 0;
}

.survey-question-admin summary::-webkit-details-marker {
  display: none;
}

.survey-question-admin summary span {
  font-weight: 850;
  min-width: 0;
  overflow-wrap: anywhere;
}

.survey-question-admin summary small {
  color: var(--muted);
  flex: 0 0 auto;
  font-weight: 800;
  white-space: nowrap;
}

.survey-question-admin[open] summary {
  border-bottom: 1px solid var(--line);
  margin: -0.1rem -0.1rem 0.2rem;
  padding-bottom: 0.75rem;
}

.survey-question-list,
.survey-results,
.survey-response-list {
  display: grid;
  gap: 0.8rem;
}

.survey-export-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.survey-filter-form {
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin-bottom: 1rem;
}

.survey-filter-actions {
  grid-column: 1 / -1;
}

.survey-response-detail {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.survey-response-detail summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  padding: 0.85rem;
}

.survey-response-detail summary span {
  color: var(--muted);
}

.survey-response-detail .definition-grid {
  padding: 0.85rem;
}

.survey-response-actions {
  padding: 0 0.85rem 0.85rem;
}

.survey-result-card h4 {
  margin: 0;
}

.survey-bars {
  display: grid;
  gap: 0.55rem;
}

.survey-bar-row {
  display: grid;
  gap: 0.25rem;
}

.survey-bar-row span,
.survey-bar-row strong {
  font-size: 0.9rem;
}

.survey-bar-row i {
  background:
    linear-gradient(90deg, var(--brand-accent) var(--bar-width), var(--surface) var(--bar-width));
  border: 1px solid var(--line);
  border-radius: 999px;
  display: block;
  height: 0.7rem;
}

.ticket-admin-line {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  min-width: 0;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.compact-actions .button,
.compact-actions button {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.action-button {
  align-items: center;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1rem;
}

.code-flow-overview {
  margin-bottom: 1rem;
}

.code-flow-steps {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.code-flow-steps a {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: flex;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.75rem;
  text-decoration: none;
}

.code-flow-steps a:hover {
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--brand-primary) 28%, var(--line));
}

.code-flow-steps strong {
  align-items: center;
  background: var(--brand-primary);
  border-radius: 999px;
  color: var(--brand-contrast);
  display: inline-flex;
  flex: 0 0 1.8rem;
  height: 1.8rem;
  justify-content: center;
}

.code-flow-steps span {
  font-weight: 850;
  min-width: 0;
  overflow-wrap: anywhere;
}

.participant-code-action,
.decision-actions {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.decision-actions form,
.participant-code-action form {
  margin: 0;
}

.decision-actions .action-button {
  width: 100%;
}

.participant-export-form {
  display: grid;
  gap: 1rem;
}

.participant-export-fields {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
}

.participant-export-fields h4 {
  margin: 0;
}

.participant-export-fields .check-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.participant-export-fields .checkline {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0.65rem 0.75rem;
}

.compact-section-head {
  border-top: 1px solid var(--line);
  margin-top: 1.25rem;
  padding-top: 1.1rem;
}

.booking-export-form {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
}

.live-booking-stats {
  overflow: hidden;
}

.live-stat-summary {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 0.15rem 0.65rem;
  grid-template-columns: auto auto;
  padding: 0.75rem 0.9rem;
  white-space: nowrap;
}

.live-stat-summary strong {
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
}

.live-stat-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.live-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.live-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  padding: 1rem;
}

.live-stat-card h4 {
  margin: 0 0 0.85rem;
}

.live-stat-bars {
  display: grid;
  gap: 0.7rem;
}

.live-stat-row {
  display: grid;
  gap: 0.35rem 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.live-stat-row div {
  min-width: 0;
}

.live-stat-row strong,
.live-stat-row span {
  display: block;
  overflow-wrap: anywhere;
}

.live-stat-row strong {
  color: var(--text);
  font-size: 0.92rem;
}

.live-stat-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.live-stat-row b {
  color: var(--brand-primary);
  font-size: 0.95rem;
}

.live-stat-row i {
  background: color-mix(in srgb, var(--brand-accent) 18%, var(--line));
  border-radius: 999px;
  grid-column: 1 / -1;
  height: 0.46rem;
  overflow: hidden;
  position: relative;
}

.live-stat-row i::before {
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-primary));
  border-radius: inherit;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: var(--bar, 0%);
}

.booking-demand-panel {
  margin-top: 1.2rem;
}

.demand-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demand-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-accent) 8%, transparent), transparent 46%),
    var(--surface-2);
}

.demand-list {
  display: grid;
  gap: 0.65rem;
}

.demand-row {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.75rem 0.8rem;
}

.demand-row.soldout {
  border-color: color-mix(in srgb, var(--brand-accent) 45%, var(--line));
}

.demand-row strong,
.demand-row span,
.demand-row small {
  display: block;
  overflow-wrap: anywhere;
}

.demand-row strong {
  color: var(--text);
  font-size: 0.92rem;
}

.demand-row span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.demand-row small {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.demand-row b {
  background: color-mix(in srgb, var(--brand-accent) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 35%, var(--line));
  border-radius: var(--radius-sm);
  color: var(--brand-primary);
  font-size: 0.78rem;
  padding: 0.32rem 0.48rem;
  white-space: nowrap;
}

.demand-row b.neutral {
  background: color-mix(in srgb, var(--muted) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--muted) 26%, var(--line));
  color: var(--muted);
}

@media (max-width: 1120px) {
  .live-stat-grid,
  .demand-grid {
    grid-template-columns: 1fr;
  }

  .live-stat-summary {
    justify-self: start;
  }
}

.code-batch-list {
  background: color-mix(in srgb, var(--brand-accent) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 30%, var(--line));
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.code-batch-list h4 {
  margin: 0;
}

.batch-chip-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.batch-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
}

.batch-chip:hover {
  border-color: var(--brand-accent);
  box-shadow: 0 12px 26px var(--shadow);
  transform: translateY(-1px);
}

.batch-chip span {
  color: var(--muted);
  font-size: 0.86rem;
}

.import-decision {
  border-color: color-mix(in srgb, var(--brand-accent) 42%, var(--line));
}

.live-list-tools {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 0.85rem;
}

.round-preview,
.dirty-state {
  background: color-mix(in srgb, var(--brand-accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 24%, var(--line));
  border-radius: var(--radius);
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem;
}

.dirty-state {
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--warning) 30%, var(--line));
  color: var(--ink);
  font-weight: 850;
  margin: 0;
}

.round-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.round-preview-list span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  padding: 0.45rem 0.65rem;
}

.capacity-meter {
  display: grid;
  gap: 0.25rem;
  min-width: min(100%, 13rem);
}

.capacity-meter span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: block;
  height: 0.72rem;
  overflow: hidden;
}

.capacity-meter i {
  background: var(--success);
  display: block;
  height: 100%;
  width: var(--meter-width);
}

.capacity-meter.warn i {
  background: var(--warning);
}

.capacity-meter.full i {
  background: var(--danger);
}

.capacity-meter strong,
.capacity-meter small {
  font-size: 0.78rem;
  line-height: 1.25;
}

.capacity-meter small {
  color: var(--muted);
  font-weight: 800;
}

.theme-live-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.theme-live-header {
  align-items: center;
  background: var(--brand-primary);
  color: var(--brand-contrast);
  display: flex;
  justify-content: space-between;
  min-height: 3.6rem;
  padding: 0.75rem 0.9rem;
}

.theme-live-header span {
  color: color-mix(in srgb, var(--brand-contrast) 74%, transparent);
  font-size: 0.82rem;
  font-weight: 850;
}

.theme-live-body {
  background: var(--surface);
  color: var(--ink);
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
}

.theme-live-body h4,
.theme-live-body p {
  margin: 0;
}

.side-drawer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.25);
  color: var(--ink);
  height: 100dvh;
  margin: 0 0 0 auto;
  max-height: none;
  max-width: min(92vw, 520px);
  padding: 0;
  width: min(92vw, 520px);
}

.dialog-open {
  overflow: hidden;
}

.side-drawer::backdrop {
  background: rgba(0, 0, 0, 0.38);
}

.side-drawer-close {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0.8rem 0.9rem 0;
}

.side-drawer-content {
  display: grid;
  gap: 0.9rem;
  max-height: calc(100dvh - 3.5rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.6rem 1rem 1.2rem;
}

.drawer-timeline {
  display: grid;
  gap: 0.55rem;
}

.drawer-timeline div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
}

.drawer-timeline span {
  color: var(--muted);
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
}

.badge.open {
  background: rgba(37, 118, 77, 0.14);
  color: var(--success);
}

.badge.full {
  background: rgba(184, 59, 47, 0.13);
  color: var(--danger);
}

.badge.warn {
  background: rgba(184, 107, 0, 0.14);
  color: var(--warning);
}

.badge.muted-badge {
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  color: var(--muted);
}

.logo-preview {
  align-items: center;
  background: var(--brand-primary);
  border-radius: var(--radius);
  display: flex;
  min-height: 86px;
  padding: 0.7rem;
}

.logo-preview img {
  max-height: 64px;
  max-width: 260px;
  object-fit: contain;
}

.company-logo {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.company-logo img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.split-form {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  gap: 0.35rem;
}

.checkline {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.checkline input {
  min-height: auto;
  width: auto;
}

.toggle-cell {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  min-width: max-content;
}

.toggle-cell input {
  accent-color: var(--brand-primary);
  min-height: auto;
  width: auto;
}

.toggle-cell span {
  color: var(--muted);
  font-size: 0.8rem;
}

.login-box {
  margin: 2rem auto;
  max-width: 440px;
  padding: 1.2rem;
}

.two-factor-box {
  max-width: 640px;
}

.two-factor-setup {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 1rem 0;
}

.two-factor-qr {
  display: grid;
  place-items: center;
}

.qr-code.authenticator {
  border-width: 8px;
  box-shadow: none;
  width: min(220px, 58vw);
}

.two-factor-manual {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.secret-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.82rem, 2.5vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  padding: 0.7rem;
}

.empty {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
  line-height: 1.45;
  padding: 1rem;
}

.shortcut-help-button {
  background: color-mix(in srgb, var(--brand-contrast) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-contrast) 34%, transparent);
  color: var(--brand-contrast);
  flex: 0 0 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  width: 2.75rem;
}

.shortcut-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  max-width: min(92vw, 640px);
  padding: 1rem;
  width: 640px;
}

.shortcut-dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.shortcut-dialog-close {
  display: flex;
  justify-content: flex-end;
}

.shortcut-dialog-close .shortcut-dialog-button {
  background: var(--brand-accent);
  border: 1px solid color-mix(in srgb, var(--brand-accent) 74%, var(--ink));
  color: var(--accent-contrast) !important;
  min-width: 8rem;
}

.confirm-dialog {
  background: transparent;
  border: 0;
  color: var(--ink);
  max-width: min(92vw, 460px);
  padding: 0;
  width: 460px;
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

.confirm-dialog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.confirm-dialog-card strong {
  display: block;
  font-size: 1.05rem;
}

.confirm-dialog-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.confirm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

body.dialog-open {
  overflow: hidden;
}

.welcome-dialog {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: min(92vw, 500px);
  padding: 0;
}

.welcome-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.welcome-dialog article {
  background: var(--surface);
  color: var(--ink);
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
}

.welcome-close {
  justify-self: end;
}

.shortcut-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shortcut-grid div {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 8rem minmax(0, 1fr);
  padding: 0.75rem;
}

kbd {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 -1px 0 var(--line);
  color: var(--ink);
  font-weight: 900;
  padding: 0.28rem 0.42rem;
  text-align: center;
}

.slot-calendar-board {
  display: grid;
  gap: 1rem;
}

.slot-calendar-grid {
  align-items: stretch;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.slot-calendar-day {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.75rem;
}

.slot-calendar-day header {
  display: grid;
  gap: 0.15rem;
}

.slot-calendar-day header span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.slot-dropzone {
  display: grid;
  gap: 0.6rem;
  min-height: 5.5rem;
}

.slot-calendar-card {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: grab;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.7rem;
}

.slot-calendar-card.dragging {
  opacity: 0.55;
}

.slot-calendar-card strong,
.slot-calendar-card small {
  grid-column: 2;
}

.slot-calendar-card .button {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.drag-handle {
  color: var(--muted);
  font-weight: 900;
  grid-row: 1 / span 2;
  line-height: 1;
  padding-top: 0.2rem;
}

.drop-zone {
  align-items: center;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--surface));
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  display: grid;
  gap: 0.55rem;
  min-height: 7.25rem;
  padding: 1rem;
  text-align: center;
}

.drop-zone.dragover {
  background: color-mix(in srgb, var(--brand-accent) 14%, var(--surface));
  border-color: var(--brand-accent);
}

.drop-zone input {
  margin-inline: auto;
}

.drop-zone span {
  display: grid;
  gap: 0.25rem;
}

.drop-zone small {
  color: var(--muted);
}

.import-template-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.import-template-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
}

.import-template-card header {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
}

.export-profile-panel,
.design-system-showcase {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.export-profile-grid,
.quality-check-grid,
.role-matrix {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.export-profile-card,
.quality-check-card,
.role-matrix article {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.85rem;
}

.role-matrix article.active {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 16%, transparent);
}

.export-profile-card span,
.quality-check-card p,
.role-matrix span,
.role-matrix small {
  color: var(--muted);
  line-height: 1.38;
  margin: 0;
}

.quality-check-card.ok {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
}

.quality-check-card.warn {
  border-color: color-mix(in srgb, var(--warning) 46%, var(--line));
}

.quality-check-card.block {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
}

.export-profile-save {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
}

.import-correction {
  margin-top: 0.45rem;
}

.import-correction-form {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding-top: 0.75rem;
}

.import-correction-form button {
  align-self: end;
}

.component-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
}

.template-columns {
  display: grid;
  gap: 0.45rem;
}

.template-columns span,
.placeholder-token {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 0.25rem;
  justify-items: start;
  min-width: 0;
  overflow: hidden;
  padding: 0.55rem;
  text-align: left;
}

.template-columns small,
.placeholder-token span {
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.placeholder-token code {
  overflow-wrap: anywhere;
}

.placeholder-list {
  display: grid;
  gap: 0.45rem;
}

.email-template-editor textarea {
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.email-template-editor {
  min-width: 0;
}

.email-template-editor .settings-grid {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.email-template-editor details.settings-subsection {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.85rem;
}

.email-template-editor details.settings-subsection > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: space-between;
  list-style: none;
  min-width: 0;
}

.email-template-editor details.settings-subsection > summary::-webkit-details-marker {
  display: none;
}

.email-template-editor details.settings-subsection > summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.email-template-editor details.settings-subsection > .field,
.email-template-editor details.settings-subsection > .form-hint {
  min-width: 0;
}

.email-template-editor textarea,
.email-template-editor input,
.email-template-editor select {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.config-help-panel,
.config-help-panel details,
.config-help-panel .email-preview,
.placeholder-list {
  min-width: 0;
}

.email-preview {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #111827;
  max-height: 28rem;
  overflow: auto;
  padding: 1rem;
}

.email-preview table {
  width: 100%;
}

.mail-status-cell {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.mail-status-cell small,
.mail-log-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.checkbox-inline {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  line-height: 1.3;
}

.checkbox-inline input {
  flex: 0 0 auto;
}

.documentation-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
}

.documentation-list {
  position: sticky;
  top: 1rem;
}

.documentation-list nav {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.documentation-list a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  text-decoration: none;
}

.documentation-list a.active {
  background: color-mix(in srgb, var(--brand-primary) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-primary) 44%, var(--line));
}

.documentation-list a span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.documentation-panel {
  min-width: 0;
}

.documentation-viewer {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.7rem;
  max-height: 72vh;
  overflow: auto;
  padding: 1rem;
}

.documentation-viewer h2,
.documentation-viewer h3,
.documentation-viewer h4,
.documentation-viewer h5,
.documentation-viewer p,
.documentation-viewer ul {
  margin: 0;
}

.documentation-viewer h2,
.documentation-viewer h3 {
  padding-top: 0.35rem;
}

.documentation-viewer p,
.documentation-viewer li {
  line-height: 1.55;
}

.documentation-viewer pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0;
  overflow-x: auto;
  padding: 0.8rem;
  white-space: pre-wrap;
}

.documentation-viewer code {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .code-flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  :root {
    --admin-nav-width: 214px;
  }

  body.is-admin .page {
    padding-inline: 1rem;
  }

  body.is-admin .grid.four,
  body.is-admin .grid.three,
  body.is-admin .event-cockpit-sections,
  body.is-admin .settings-grid,
  body.is-admin .guide-grid,
  body.is-admin .definition-grid,
  body.is-admin .split-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-admin .config-layout,
  body.is-admin .documentation-layout,
  body.is-admin .grid.two,
  body.is-admin .manual-layout,
  body.is-admin .feature-map-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body.is-admin .table-wrap {
    border: 0;
    overflow: visible;
  }

  body.is-admin .table-wrap table {
    border-collapse: separate;
    border-spacing: 0 0.65rem;
    min-width: 0;
    width: 100%;
  }

  body.is-admin .table-wrap thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  body.is-admin .table-wrap tbody,
  body.is-admin .table-wrap tr,
  body.is-admin .table-wrap td {
    display: block;
    width: 100%;
  }

  body.is-admin .table-wrap tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    padding: 0.7rem;
  }

  body.is-admin .table-wrap td {
    align-items: start;
    border-bottom: 0;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(8rem, 28%) minmax(0, 1fr);
    overflow-wrap: anywhere;
    padding: 0.45rem 0;
  }

  body.is-admin .table-wrap td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  body.is-admin .table-actions,
  body.is-admin .compact-actions {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .code-flow-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  body:not(.is-admin) .hero {
    grid-template-columns: 1fr;
  }

  body:not(.is-admin) .code-panel {
    order: -1;
  }

  body.is-admin .page,
  body.is-admin .app-footer {
    margin-left: 0;
    max-width: 1200px;
    width: 100%;
  }

  body.is-admin.admin-nav-collapsed {
    --admin-nav-width: min(88vw, 380px);
  }

  .admin-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-side-nav {
    box-shadow: none;
    overflow-x: visible;
    position: static;
  }

  .admin-side-nav nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .admin-side-nav a {
    width: auto;
  }

  .hero,
  .grid.two,
  .grid.three,
  .grid.four,
  .split-form,
  .event-create-panel,
  .event-create-form,
  .event-cockpit-sections,
  .slot-calendar-grid,
  .shortcut-grid,
  .setup-guide-head,
  .setup-steps,
  .config-layout,
  .documentation-layout,
  .settings-form[data-settings-tabs],
  .settings-grid,
  .theme-preset-picker,
  .manual-layout,
  .help-search,
  .event-day-row,
  .event-day-edit,
  .feature-map-shell,
  .feature-layer-grid,
  .guide-grid,
  .guide-grid.compact,
  .definition-grid,
  .role-grid,
  .flow-strip,
  .code-visual,
  .two-factor-setup {
    grid-template-columns: 1fr;
  }

  .live-list-tools {
    grid-template-columns: 1fr;
  }

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

  .feature-detail {
    display: none;
  }

  .feature-map-canvas {
    max-height: none;
    overflow: visible;
    position: static;
  }

  .feature-inline-detail {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .feature-inline-detail[hidden] {
    display: none;
  }

  .feature-inline-detail h3,
  .feature-inline-detail p {
    margin: 0;
  }

  .student-fields {
    grid-template-columns: 1fr;
  }

  .setup-guide-head {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-nav {
    display: grid;
    gap: 0.55rem;
    max-width: 100%;
    overflow: visible;
    padding: 0.65rem;
    position: sticky;
    top: 0.65rem;
    z-index: 12;
  }

  .config-section-nav {
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: visible;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .settings-form[data-settings-tabs] .config-section-nav {
    display: flex;
    position: sticky;
    top: 0.65rem;
  }

  .settings-form[data-settings-tabs] .settings-section {
    grid-column: 1;
  }

  .config-section-nav a {
    flex: 1 1 10rem;
    white-space: normal;
  }

  .config-help-panel {
    position: static;
  }

  .documentation-list {
    position: static;
  }

  .documentation-viewer {
    max-height: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .manual-nav-label {
    display: none;
  }

  .manual-nav-toggle {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    min-height: 3rem;
    padding: 0.65rem 0.75rem;
    text-align: left;
    width: 100%;
  }

  .manual-nav-toggle span {
    font-weight: 900;
  }

  .manual-nav-toggle small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .manual-nav-toggle::after {
    content: "+";
    font-size: 1.2rem;
    font-weight: 900;
    margin-left: 0.65rem;
  }

  .manual-nav.open .manual-nav-toggle::after {
    content: "-";
  }

  .manual-nav-links {
    display: none;
    gap: 0.45rem;
  }

  .manual-nav.open .manual-nav-links {
    display: grid;
  }

  .manual-nav-links a {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    min-height: 2.85rem;
    padding: 0.68rem 0.75rem;
    white-space: normal;
    width: 100%;
  }

  .topbar {
    align-items: center;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    padding: 0.75rem 1rem;
  }

  body:not(.is-admin) .topbar {
    grid-template-areas:
      "brand menu"
      "theme lang";
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  body:not(.is-admin) .brand {
    grid-area: brand;
    min-width: 0;
    padding-right: 0.25rem;
  }

  body:not(.is-admin) .top-actions {
    display: contents;
  }

  body:not(.is-admin) .public-theme-toggle {
    grid-area: theme;
    justify-self: start;
    max-width: 100%;
  }

  body:not(.is-admin) .language-switcher {
    grid-area: lang;
    justify-self: end;
    max-width: 100%;
  }

  body:not(.is-admin) .menu-toggle {
    grid-area: menu;
    justify-self: end;
    position: relative;
    z-index: 2;
  }

  body.is-admin .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .global-search,
  body.is-admin .global-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .header-progress,
  body.is-admin .header-progress {
    grid-column: 1 / -1;
    order: 2;
  }

  .admin-quickbar {
    flex-wrap: wrap;
    grid-column: 1 / -1;
    order: 4;
    gap: 0.5rem;
    justify-content: flex-start;
    min-height: 34px;
    overflow: visible;
    padding: 0.16rem 1rem;
    white-space: normal;
    width: 100%;
  }

  .quickbar-left,
  .quickbar-right {
    flex: 1 1 100%;
    flex-wrap: wrap;
    min-width: 0;
  }

  .quickbar-right {
    margin-left: 0;
  }

  .header-progress span {
    flex-basis: min(45vw, 120px);
  }

  .brand {
    width: auto;
  }

  .top-context {
    display: none;
  }

  .brand img {
    max-height: 38px;
    max-width: min(240px, 58vw);
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .brand-claim {
    display: none;
  }

  .config-context {
    align-items: stretch;
    flex-direction: column;
  }

  .event-switcher {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: flex-start;
    width: 100%;
  }

  .search-page,
  .event-status-banner {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .event-switcher select {
    min-width: 0;
  }

  .top-actions,
  body.is-admin .top-actions {
    grid-column: 2;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    align-content: start;
    align-items: stretch;
    background: var(--surface);
    border-left: 1px solid var(--line);
    bottom: 0;
    box-shadow: -22px 0 46px rgba(0, 0, 0, 0.22);
    color: var(--ink);
    display: grid;
    gap: 0.55rem;
    grid-template-columns: 1fr;
    justify-content: stretch;
    max-width: min(88vw, 380px);
    overflow-y: auto;
    padding: calc(0.9rem + env(safe-area-inset-top)) 0.9rem calc(1rem + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: transform 180ms ease;
    width: min(88vw, 380px);
    z-index: 80;
  }

  body.is-admin .nav {
    border-left: 1px solid var(--line);
    border-right: 0;
    bottom: 0;
    box-shadow: -22px 0 46px rgba(0, 0, 0, 0.22);
    left: auto;
    max-width: min(88vw, 380px);
    padding: calc(0.9rem + env(safe-area-inset-top)) 0.9rem calc(1rem + env(safe-area-inset-bottom));
    right: 0;
    top: 0;
    transform: translateX(105%);
    width: min(88vw, 380px);
    z-index: 80;
  }

  body.is-admin.admin-nav-collapsed .nav {
    width: min(88vw, 380px);
  }

  body.is-admin.admin-nav-collapsed .nav-label,
  body.is-admin.admin-nav-collapsed .nav-chevron,
  body.is-admin.admin-nav-collapsed .nav-sub-label {
    display: block;
  }

  body.is-admin.admin-nav-collapsed .nav-sub {
    display: grid;
  }

  body.is-admin.admin-nav-collapsed .nav-group.collapsed .nav-sub {
    display: none;
  }

  body.is-admin.nav-open .nav {
    transform: translateX(0);
  }

  body.is-admin .nav-head {
    display: flex;
  }

  body.nav-open .nav {
    transform: translateX(0);
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-title {
    color: var(--muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0.25rem 0 0.35rem;
    text-transform: uppercase;
  }

  .nav-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .nav-close {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
  }

  body.is-admin .nav-collapse-toggle {
    display: none;
  }

  .nav a,
  .nav button {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    justify-content: flex-start;
    min-height: 3.15rem;
    padding: 0.78rem 0.9rem;
    width: 100%;
  }

  .nav a.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-contrast);
  }

  .nav form {
    width: 100%;
  }

  .nav .nav-close {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--ink);
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    width: auto;
  }

  .nav-backdrop {
    background: rgba(0, 0, 0, 0.38);
    border: 0;
    border-radius: 0;
    bottom: 0;
    cursor: default;
    display: block;
    left: 0;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 180ms ease;
    z-index: 60;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .tabs {
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: visible;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .tabs a {
    flex: 1 1 10rem;
    white-space: normal;
  }

  .page {
    padding: 0.85rem;
  }

  .hero {
    gap: 0.85rem;
  }

  .code-panel {
    order: -1;
  }

  .hero-main {
    min-height: auto;
    padding: 1.15rem;
  }

  .hero-main h1 {
    --fit-max: 30;
    --fit-min: 22;
    font-size: clamp(1.35rem, 5.8vw, 1.9rem);
    line-height: 1.1;
  }

  .hero-meta,
  .mini-steps,
  .booking-progress {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    display: grid;
  }

  .panel,
  .booking-card,
  .ticket,
  .login-box {
    box-shadow: 0 10px 24px rgba(16, 24, 18, 0.08);
  }

  .section-head,
  .booking-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page > .section-head {
    gap: 0.85rem;
  }

  .section-head .compact-actions {
    width: 100%;
  }

  .section-head .compact-actions .button,
  .section-head .compact-actions button {
    flex: 1 1 12rem;
  }

  .admin-page-actions,
  .admin-page-actions .compact-actions,
  .screen-options {
    justify-items: stretch;
    width: 100%;
  }

  .screen-options > summary {
    width: 100%;
  }

  .screen-options-panel {
    min-width: 0;
    position: static;
    width: 100%;
  }

  .screen-options-grid {
    grid-template-columns: 1fr;
  }

  .code-form .primary,
  .booking-actions .primary,
  .booking-actions .secondary {
    width: 100%;
  }

  .round-card header {
    align-items: flex-start;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .round-card header .muted {
    grid-column: 2;
  }

  .booking-actions {
    bottom: 0;
    box-shadow: 0 -12px 26px rgba(16, 24, 18, 0.08);
    margin-bottom: -0.85rem;
    position: sticky;
    z-index: 5;
  }
}

@media (max-width: 720px) {
  .topbar {
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
  }

  body:not(.is-admin) .topbar {
    grid-template-areas:
      "brand menu"
      "theme theme"
      "lang lang";
  }

  body:not(.is-admin) .public-theme-toggle,
  body:not(.is-admin) .language-switcher {
    justify-self: stretch;
    width: 100%;
  }

  body:not(.is-admin) .public-theme-toggle {
    justify-content: center;
  }

  body:not(.is-admin) .language-switcher {
    justify-content: center;
  }

  body:not(.is-admin) .language-switcher a {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }

  .brand {
    gap: 0.65rem;
  }

  .brand img {
    max-height: 34px;
    max-width: min(128px, 34vw);
  }

  .brand-title {
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .brand-claim {
    display: none;
  }

  .nav {
    margin-inline: 0;
    max-width: min(90vw, 360px);
    width: min(90vw, 360px);
  }

  .nav a,
  .nav button {
    border-radius: 4px;
    min-height: 3.15rem;
    padding: 0.78rem 0.9rem;
  }

  .theme-toggle {
    flex-basis: auto;
    min-width: 0;
    width: auto;
  }

  .top-actions {
    gap: 0.35rem;
  }

  .language-switcher a {
    padding-inline: 0.5rem;
  }

  .page {
    padding: 0.75rem;
  }

  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .event-switcher {
    grid-template-columns: 1fr;
  }

  .event-switcher button {
    width: 100%;
  }

  .settings-savebar {
    align-items: stretch;
    flex-direction: column;
    position: static;
  }

  .settings-savebar button,
  .settings-actions button {
    width: 100%;
  }

  .settings-actions {
    position: static;
  }

  .invitation-mail-grid,
  .invitation-sendbar {
    grid-template-columns: 1fr;
  }

  .invitation-sendbar .checkbox-inline {
    justify-self: start;
  }

  .settings-section summary {
    align-items: flex-start;
    min-height: 0;
  }

  .hero-main,
  .manual-hero,
  .panel,
  .booking-card,
  .ticket,
  .login-box {
    border-radius: var(--radius);
  }

  .hero-main {
    padding: 1rem;
  }

  .hero-main h1,
  .manual-hero h1 {
    --fit-max: 30;
    --fit-min: 22;
    font-size: clamp(1.35rem, 5.8vw, 1.9rem);
    line-height: 1.08;
  }

  .manual-hero {
    gap: 0.9rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
  }

  .manual-actions {
    width: 100%;
  }

  .manual-actions .button,
  .manual-actions button {
    flex: 1 1 11rem;
    min-width: 0;
  }

  .manual-layout,
  .manual-content,
  .manual-section {
    gap: 0.75rem;
  }

  .manual-nav {
    border-radius: var(--radius);
    margin-inline: 0;
    top: 0.5rem;
  }

  .guide-card,
  .definition-grid div,
  .role-grid div,
  details,
  .round-card,
  .student-fields {
    border-radius: var(--radius);
  }

  .mock-body {
    grid-template-columns: 1fr;
  }

  .delete-summary {
    grid-template-columns: 1fr;
  }

  .flow-step {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
    padding: 0.75rem;
  }

  .flow-step small {
    grid-column: 2;
  }

  .code-visual {
    align-items: stretch;
  }

  .code-arrow {
    display: none;
  }

  .code-card {
    font-size: clamp(1rem, 7vw, 1.35rem);
    overflow-wrap: anywhere;
    padding: 0.9rem;
  }

  .booking-card {
    padding: 0.9rem;
  }

  .booking-progress span {
    text-align: left;
  }

  .student-fields {
    padding: 0.75rem;
  }

  .round-card {
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .round-card header {
    gap: 0.45rem 0.65rem;
  }

  .booking-actions {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    margin-inline: -0.9rem;
    padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom));
  }

  .table-wrap {
    border: 0;
    overflow: visible;
  }

  .table-wrap table {
    border-collapse: separate;
    border-spacing: 0 0.65rem;
    min-width: 0;
    width: 100%;
  }

  .table-wrap thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(16, 24, 18, 0.06);
    overflow: hidden;
    padding: 0.65rem;
  }

  .table-wrap td {
    align-items: start;
    border-bottom: 0;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(5.9rem, 34%) minmax(0, 1fr);
    overflow-wrap: anywhere;
    padding: 0.42rem 0;
  }

  .table-wrap td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .table-wrap td:empty {
    display: none;
  }

  .compact-actions {
    width: 100%;
  }

  .compact-actions .button,
  .compact-actions button {
    flex: 1 1 10rem;
  }

  .table-actions {
    min-width: 0;
    width: 100%;
  }

  .table-actions .button,
  .table-actions button {
    flex: 1 1 9rem;
  }

  .ticket-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticket-code {
    align-items: start;
    justify-items: start;
    max-width: 100%;
  }

  .ticket-mail,
  .ticket-share,
  .ticket-mail-form,
  .ticket-admin-line {
    grid-template-columns: 1fr;
  }

  .ticket-share-actions {
    justify-content: stretch;
  }

  .ticket-share-actions .button,
  .ticket-share-actions button {
    flex: 1 1 9rem;
  }

  .slot-calendar-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .slot-calendar-card .button {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }

  .shortcut-grid div {
    grid-template-columns: 1fr;
  }

  .ticket-admin-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .survey-question-admin summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .survey-question-admin summary small,
  .survey-quick-stats span {
    white-space: normal;
  }

  .survey-form {
    gap: 0.75rem;
  }

  .survey-question {
    gap: 0.8rem;
    padding: 1rem;
  }

  .survey-question legend {
    font-size: clamp(1rem, 4.2vw, 1.14rem);
    line-height: 1.35;
    margin-bottom: 0.85rem;
  }

  .survey-question .choice-stack .checkline {
    min-height: 3.1rem;
    padding: 0.78rem 0.85rem;
  }

  .rating-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  }

  .rating-row label,
  .rating-row span {
    width: 100%;
  }

  .rating-row span {
    border-radius: 7px;
    min-height: 3.1rem;
    padding-inline: 0.75rem;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  body:not(.is-admin) .brand-text {
    display: none;
  }

  .mini-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-nav-links a,
  .tabs a,
  .nav a,
  .nav button,
  button,
  a.button {
    font-size: clamp(0.76rem, 3.2vw, 0.88rem);
  }

  .table-wrap td {
    gap: 0.12rem;
    grid-template-columns: 1fr;
  }

  .booking-actions {
    flex-direction: column;
  }

  .booking-actions .button,
  .booking-actions button {
    width: 100%;
  }
}

.license-alert {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--surface);
}

.license-alert strong {
  display: block;
  font-size: 1.05rem;
}

.license-alert p {
  margin: 4px 0;
}

.license-alert ul,
.license-restrictions ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.license-alert.expired {
  border-color: #fda29b;
  background: #fff1f3;
  color: #7a271a;
}

.license-alert.expires_soon,
.license-alert.warn {
  border-color: #fdb022;
  background: #fffaeb;
  color: #7a2e0e;
}

.license-alert.update {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--ink);
}

.update-available-panel {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.license-restrictions {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  background: var(--surface-2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 1rem;
}

.dashboard-card strong,
.dashboard-card span {
  display: block;
}

.dashboard-card strong {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1;
}

.dashboard-card span {
  margin-top: .45rem;
  font-weight: 800;
}

.dashboard-card p {
  margin: .35rem 0 0;
  color: var(--muted);
}

.support-thread {
  display: grid;
  gap: .85rem;
  margin: 1rem 0;
}

.support-message {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 1rem;
  overflow-wrap: anywhere;
}

.support-message.portal {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.support-message header {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  color: var(--muted);
  font-size: .9rem;
}

.support-message header strong {
  color: var(--ink);
}

.support-message p {
  margin: .75rem 0 0;
}

.notification-list {
  display: grid;
  gap: .75rem;
}

.notification-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  display: grid;
  gap: .8rem;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  min-width: 0;
  padding: .9rem 1rem;
  text-decoration: none;
}

.notification-card:hover,
.notification-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
}

.notification-card .notification-icon {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.notification-card svg {
  fill: none;
  height: 1.2rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1.2rem;
}

.notification-card strong,
.notification-card small {
  display: block;
  overflow-wrap: anywhere;
}

.notification-card small {
  color: var(--muted);
  margin-top: .2rem;
}

.notification-body {
  min-width: 0;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .65rem;
}

.notification-actions form {
  margin: 0;
}

.status-list .notification-card {
  background: var(--surface-2);
}

.notification-card em {
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
  min-width: 2rem;
  padding: .25rem .55rem;
  text-align: center;
}

.notification-card.info .notification-icon,
.notification-card.info em {
  background: rgba(59, 130, 246, .14);
  color: #1d4ed8;
}

.notification-card.warn .notification-icon,
.notification-card.warn em {
  background: rgba(250, 204, 21, .22);
  color: #92400e;
}

.notification-card.block .notification-icon,
.notification-card.block em {
  background: rgba(239, 68, 68, .14);
  color: #b91c1c;
}

@media (max-width: 760px) {
  .license-alert {
    display: grid;
  }
}

@media print {
  @page {
    margin: 8mm;
    size: A4 portrait;
  }

  .topbar,
  .compact-actions,
  .tabs,
  .no-print,
  .manual-nav,
  .nav {
    display: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #111;
    font-size: 10.5pt;
  }

  .page {
    padding: 0;
    max-width: none;
  }

  .ticket,
  .panel,
  .table-wrap,
  .manual-hero {
    box-shadow: none;
  }

  .ticket {
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ticket-head {
    align-items: start;
    display: grid;
    gap: 6mm;
    grid-template-columns: 1fr auto;
    margin: 0 0 4mm !important;
    padding: 0 !important;
  }

  .ticket-head h1,
  .ticket h2,
  .ticket h3 {
    margin-top: 0 !important;
  }

  .ticket-code {
    max-width: 31mm;
  }

  .ticket-code .qr-code,
  .ticket-code svg {
    height: 27mm !important;
    width: 27mm !important;
  }

  .ticket-body,
  .ticket .grid,
  .definition-grid {
    gap: 3mm !important;
  }

  .ticket .panel,
  .ticket .section,
  .guide-note,
  .privacy-consent {
    margin: 3mm 0 !important;
    padding: 3mm !important;
  }

  .ticket table,
  .ticket th,
  .ticket td {
    font-size: 9.5pt;
    padding: 2mm;
  }

  .ticket * {
    break-inside: avoid;
  }

  .manual-layout,
  .guide-grid,
  .definition-grid,
  .role-grid,
  .flow-strip,
  .code-visual {
    grid-template-columns: 1fr;
  }
}
