@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root,
[data-theme="derbysign"] {
  color-scheme: light;
  --color-base-100: oklch(100% 0 0);
  --color-base-200: oklch(97.4% 0.01 240);
  --color-base-300: oklch(93.2% 0.018 240);
  --color-base-content: oklch(26% 0.05 250);
  --color-primary: oklch(42% 0.11 250);
  --color-primary-content: oklch(99% 0.01 250);
  --color-secondary: oklch(62% 0.1 230);
  --color-secondary-content: oklch(18% 0.04 240);
  --color-accent: oklch(58% 0.12 220);
  --color-accent-content: oklch(99% 0.01 220);
  --color-neutral: oklch(32% 0.05 250);
  --color-neutral-content: oklch(98% 0.01 250);
  --color-info: oklch(62% 0.1 230);
  --color-info-content: oklch(18% 0.04 240);
  --color-success: oklch(52% 0.12 155);
  --color-success-content: oklch(99% 0.01 155);
  --color-warning: oklch(80% 0.14 85);
  --color-warning-content: oklch(28% 0.05 85);
  --color-error: oklch(54% 0.18 25);
  --color-error-content: oklch(99% 0.01 25);
  --radius-selector: 1.1rem;
  --radius-field: 0.95rem;
  --radius-box: 1.25rem;
  --size-selector: 0.28rem;
  --size-field: 0.32rem;
  --border: 1.5px;
  --depth: 1;
  --noise: 0;

  --ink: #0e243c;
  --muted: #5a718a;
  --line: #d7e4f2;
  --paper: #ffffff;
  --wash: #f4f8fc;
  --navy: #0e4a7c;
  --navy-deep: #0a365c;
  --blue: #1b6db8;
  --sky: #eaf3fb;
  --touch: 56px;
  --shadow: 0 10px 30px rgba(14, 54, 92, 0.08);
  --shadow-lg: 0 18px 50px rgba(14, 54, 92, 0.12);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: var(--wash);
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(80% 48% at 50% -8%, rgba(27, 109, 184, 0.14), transparent 58%),
    linear-gradient(180deg, #eaf3fb 0%, var(--wash) 38%, #eef4fa 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

.btn {
  font-family: inherit !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  border-radius: 14px !important;
  min-height: var(--touch);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #fff !important;
  box-shadow: none;
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--navy-deep) !important;
  border-color: var(--navy-deep) !important;
}

.btn-success {
  background: #157a4a !important;
  border-color: #157a4a !important;
  color: #fff !important;
  box-shadow: none;
}

.btn-outline,
.btn-ghost {
  background: #fff !important;
  border: 1.5px solid var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
}

.kiosk {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(10px + var(--safe-t)) calc(22px + var(--safe-r)) calc(12px + var(--safe-b)) calc(22px + var(--safe-l));
}

.kiosk-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto 12px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--line);
}

.brand {
  justify-self: start;
}

.header-label {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  position: relative;
  padding-bottom: 8px;
}

.header-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4rem;
  height: 3px;
  border-radius: 99px;
  background: var(--navy);
  transform: translateX(-50%);
}

.header-promoter {
  justify-self: end;
}

.brand img,
.header-promoter {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.is-home .kiosk-header {
  display: none;
}

.kiosk-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 14px 8px 2px;
  color: var(--muted);
}

.product-credit {
  width: min(1180px, 100%);
  margin: 4px auto 0;
  padding-top: 8px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.product-credit a {
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand,
.presented {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}

.brand-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.kiosk-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.home-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.kiosk-hero {
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 10px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  position: relative;
}

.hero-kicker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4rem;
  height: 3px;
  border-radius: 99px;
  background: var(--navy);
  transform: translateX(-50%);
}

.kiosk-hero-logo {
  height: clamp(150px, 28vh, 240px);
  width: auto;
  max-width: min(460px, 86%);
  object-fit: contain;
  margin: 0 auto;
}

.hero-presented {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
}

.hero-presented img {
  height: 72px;
  width: auto;
}

.home-heading {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 20px 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tile:active {
  transform: scale(0.99);
}

.tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--navy);
}

.tile-pit::before {
  background: var(--blue);
}

.tile-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--sky);
  color: var(--navy);
  font-size: 1.2rem;
}

.tile-copy {
  flex: 1;
  min-width: 0;
}

.tile h2 {
  margin: 0 0 4px;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.tile-go {
  color: #9bb0c6;
  font-size: 0.95rem;
}

.age-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding-bottom: 12px;
}

.age-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  letter-spacing: -0.04em;
}

.age-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.age-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 188px;
  padding: 28px 20px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.age-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.age-card strong {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.age-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1.02rem;
}

.age-back {
  align-self: center;
  min-width: 160px;
}

.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: 20px;
  padding: 18px 22px 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h1,
.panel > h1 {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.steps-bar {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 6px 10px;
  min-height: 40px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 12px;
}

.step-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
}

.step-btn.is-active {
  color: var(--navy);
  background: var(--sky);
}

.step-btn.is-active .step-num {
  background: var(--navy);
  color: #fff;
}

.step-btn.is-done {
  color: var(--muted);
}

.form-section {
  margin-bottom: 22px;
}

.form-section h2 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}

.pill-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.pill-row label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.pill-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-row label:has(input:checked) {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.photo-capture {
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-capture input {
  display: none;
}

.photo-capture .photo-preview {
  width: 56px;
  height: 56px;
}

.photo-capture input {
  display: none;
}

.photo-capture .photo-preview {
  width: 72px;
  height: 72px;
}

.photo-capture .btn {
  flex: 0 0 auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.span-2 {
  grid-column: span 2;
}

.field.span-3 {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.req {
  color: #c62828;
}

.field input,
.field select,
.field textarea,
.field .input,
.field .select,
.kiosk-input {
  min-height: var(--touch);
  width: 100%;
  padding: 0 16px;
  border: 1.5px solid #c9d9ea;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.field textarea {
  min-height: 110px;
  padding: 12px 16px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--navy) 50%),
    linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 24px,
    calc(100% - 12px) 24px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(14, 74, 124, 0.14);
}

.field select optgroup {
  font-weight: 700;
  color: var(--navy);
}

.photo-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  padding: 10px;
  border: 1.5px dashed #9ab6d3;
  border-radius: 16px;
  background: linear-gradient(180deg, #f4f9fd 0%, #eaf3fb 100%);
}

.photo-box input {
  display: none;
}

.photo-preview {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.form-dock {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px -22px -10px;
  padding: 12px 22px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: #fff;
  position: sticky;
  bottom: 0;
}

.turnstile-slot {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  min-height: 72px;
}

.form-dock .btn {
  min-width: 140px;
  font-size: 1.02rem;
}

.sign-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.legal-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100dvh - 220px);
  max-height: calc(100dvh - 220px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.legal-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 28px 28px;
  -webkit-overflow-scrolling: touch;
}

.legal-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(transparent, #fff 70%);
  pointer-events: none;
}

.legal-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
  pointer-events: none;
}

.legal-shell.is-end .legal-fade,
.legal-shell.is-end .legal-cue {
  opacity: 0;
}

.legal-doc {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.7;
}

.legal-doc h1,
.legal-doc h2 {
  text-align: center;
  margin: 0 0 6px;
  color: var(--ink);
}

.legal-doc h1 {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.legal-doc h2 {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.legal-doc p {
  margin: 0.9rem 0;
}

.legal-doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.1rem 0;
}

.sign-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "kicker actions"
    "frame frame"
    "agree agree";
  gap: 10px 12px;
  min-width: 0;
  margin-top: 28px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--line);
}

.sign-kicker {
  grid-area: kicker;
  align-self: center;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.sign-frame {
  grid-area: frame;
  position: relative;
  height: 168px;
  min-height: 168px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d5e2ef;
  border-radius: 12px;
  background: #fff;
}

.sign-pad {
  width: 100%;
  height: 168px;
  min-height: 168px;
  border: 0;
  border-radius: 0;
  background: #fff;
  touch-action: none;
}

.sign-line {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 44px;
  height: 1px;
  background: #c3d3e4;
  pointer-events: none;
  z-index: 1;
}

.sign-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 52px;
  z-index: 1;
  text-align: center;
  color: #8aa0b6;
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
}

.sign-hint.is-hidden {
  opacity: 0;
}

.sign-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.check-stack {
  grid-area: agree;
  display: grid;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.98rem;
  line-height: 1.35;
}

.check-row input {
  width: 28px;
  height: 28px;
  margin-top: 1px;
  accent-color: var(--navy);
  flex: 0 0 auto;
}

.fine-print {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 14px;
}

.confirm-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.confirm-done h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.confirm-name {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.confirm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.confirm-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
}

.confirm-action {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.confirm-next {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 22px 22px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.confirm-next::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--navy);
}

.confirm-next .tile-icon {
  flex: 0 0 auto;
  margin-top: 2px;
}

.confirm-next-copy h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.confirm-next-copy p {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.confirm-next-warn {
  margin-top: 12px !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  color: var(--navy) !important;
}

.confirm-redirect {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.confirm-home {
  align-self: stretch;
  justify-content: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.summary-card {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.summary-card h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-card p {
  margin: 0 0 8px;
}

.audit-block {
  margin-top: 18px;
}

.audit-block code {
  font-size: 0.78rem;
  word-break: break-all;
}

.audit-table {
  margin-top: 12px;
}

.note-card {
  grid-column: 1 / -1;
  background: var(--sky);
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  color: var(--muted);
  font-weight: 600;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid #d5e4f2;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.toast-stack {
  position: fixed;
  top: calc(16px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(520px, calc(100% - 32px));
}

.toast-stack .alert {
  border-radius: 16px;
  font-weight: 700;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.admin-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--wash);
}

.admin-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  padding-left: calc(20px + var(--safe-l));
  padding-right: calc(20px + var(--safe-r));
  background: var(--navy);
  color: #fff;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  min-height: 48px;
}

.admin-brand img {
  height: 42px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 4px 6px;
}

.admin-brand strong {
  display: block;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-brand em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c5d8ec;
}

.admin-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.admin-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 12px;
  color: #dceaf8;
  font-weight: 700;
}

.admin-links a.is-active,
.admin-links a:active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.admin-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 8px;
  min-width: 0;
}

.admin-actor {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c5d8ec;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tool {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: transparent;
  color: #e8f1fa;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.admin-tool.is-active,
.admin-tool:hover,
.admin-tool:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.admin-switch {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.admin-main {
  padding: 24px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.stat-card h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card p {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.04em;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.table-wrap .table {
  width: 100%;
}

.table-wrap thead {
  background: var(--sky);
  color: var(--navy);
}

.table-wrap th,
.table-wrap td {
  padding: 14px 16px;
  font-size: 0.98rem;
}

.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
}

.footer-venue {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-brand img {
  height: 32px;
}

@media (orientation: landscape) and (min-width: 900px) {
  .home-stage {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .kiosk-hero {
    flex: 0 0 42%;
    text-align: left;
  }

  .kiosk-hero-logo {
    margin: 0;
    max-width: 100%;
    height: clamp(180px, 38vh, 280px);
  }

  .home-actions {
    flex: 1;
  }

  .hero-kicker {
    text-align: left;
  }

  .hero-kicker::after {
    left: 0;
    transform: none;
  }

  .hero-presented {
    justify-content: flex-start;
  }

  .confirm-stage {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .confirm-done {
    flex: 0 0 42%;
  }

  .confirm-action {
    flex: 1;
  }
}

@media (max-width: 899px), (orientation: portrait) {
  .kiosk-header {
    grid-template-columns: 1fr 1fr;
  }

  .header-label {
    display: none;
  }

  .home-stage {
    justify-content: flex-start;
  }

  .tile-grid,
  .stat-grid,
  .summary-grid,
  .field-grid,
  .sign-stage,
  .age-split {
    grid-template-columns: 1fr;
  }

  .field.span-2,
  .field.span-3 {
    grid-column: auto;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .sign-stage {
    min-height: 0;
  }

  .kiosk-footer,
  .admin-top,
  .toolbar {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.desk-shell .admin-main {
  width: min(1280px, 100%);
  padding: 20px 24px 48px;
}

.desk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}

.desk-kicker {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desk-head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.desk-hint {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
}

.desk-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.desk-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 88px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.desk-stat span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desk-stat strong {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.desk-stat.is-on {
  border-color: var(--navy);
  background: var(--sky);
  box-shadow: 0 0 0 2px rgba(14, 74, 124, 0.18);
}

.desk-search {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.desk-search > i {
  position: absolute;
  left: 24px;
  color: var(--muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.desk-search input {
  flex: 1;
  min-height: 56px;
  width: 100%;
  padding: 0 16px 0 52px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.desk-find {
  min-height: 52px;
  min-width: 108px;
  font-size: 1.05rem;
}

.desk-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.desk-seg,
.desk-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desk-seg {
  padding: 4px;
  border-radius: 16px;
  background: var(--sky);
}

.desk-chip {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.desk-chip.is-on {
  background: var(--navy);
  color: #fff;
}

.desk-pills .desk-chip {
  border: 1px solid var(--line);
  background: var(--paper);
}

.desk-pills .desk-chip.is-on {
  border-color: var(--navy);
  background: var(--navy);
}

.desk-count {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
}

.desk-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.desk-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.desk-row:focus-visible {
  outline: 3px solid rgba(27, 109, 184, 0.35);
}

.desk-row.is-in {
  background: #f3faf6;
  border-color: #c6e6d3;
}

.desk-car {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.desk-car.is-empty {
  background: var(--sky);
  color: var(--navy);
  font-size: 1rem;
}

.desk-who h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.desk-who p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.desk-guardian {
  color: var(--ink) !important;
}

.desk-job {
  font-size: 0.9rem;
}

.desk-job.is-bad {
  color: #b42318;
}

.desk-row-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.desk-status {
  min-width: 76px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desk-status.is-out {
  background: #fde7e7;
  color: #9b1c1c;
}

.desk-status.is-in {
  background: #d9f2e3;
  color: #0f6b3c;
}

.desk-row-action {
  min-height: 52px;
  min-width: 118px;
  font-weight: 800;
}

.desk-row-action.is-in {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.desk-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--navy);
  font-weight: 800;
}

.desk-empty {
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  background: var(--paper);
  text-align: center;
  color: var(--muted);
}

.desk-empty i {
  font-size: 1.6rem;
  color: var(--blue);
}

.desk-empty h2 {
  margin: 12px 0 6px;
  color: var(--navy);
}

.desk-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 700;
}

.desk-drawer {
  width: min(520px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--paper);
  box-shadow: -18px 0 50px rgba(14, 54, 92, 0.18);
}

.desk-drawer::backdrop {
  background: rgba(14, 36, 60, 0.38);
}

.desk-drawer-inner {
  height: 100%;
  overflow: auto;
  padding: 20px 22px 40px;
}

.desk-close {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--sky);
  color: var(--navy);
  cursor: pointer;
}

.desk-photo {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 8px 0 18px;
  padding: 12px;
  border-radius: 20px;
  background: #0e243c;
}

.desk-photo img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 12px;
  object-fit: contain;
}

.desk-drawer-head h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.desk-car-line {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.desk-cta {
  width: 100%;
  min-height: 60px;
  margin: 18px 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
}

.desk-in-banner {
  margin: 18px 0 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #d9f2e3;
  color: #0f6b3c;
  font-weight: 800;
}

.desk-undo {
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
}

.desk-facts {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.desk-fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.desk-fact span {
  color: var(--muted);
  font-weight: 700;
}

.desk-fact strong {
  text-align: right;
  font-weight: 700;
}

.desk-sign {
  margin: 8px 0 16px;
  padding: 12px;
  border-radius: 16px;
  background: var(--sky);
}

.desk-sign p {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--navy);
}

.desk-sign img {
  display: block;
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
}

.desk-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.desk-technical {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.desk-technical summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--muted);
}

.desk-technical .audit-block {
  margin-top: 12px;
  font-size: 0.88rem;
}

.desk-technical code {
  word-break: break-all;
}

.desk-danger {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.desk-delete {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e2b4b0;
  background: #fff;
  color: #9b1c1c;
  font-weight: 800;
}

.desk-confirm-panel {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #fde7e7;
}

.desk-confirm-panel p {
  margin: 0 0 14px;
  font-weight: 700;
  color: #7a1b1b;
}

.desk-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desk-confirm-actions .btn {
  flex: 1;
  min-height: 48px;
  font-weight: 800;
}

.desk-delete-forever {
  border: 0;
  background: #9b1c1c;
  color: #fff;
}

.settings-main {
  width: min(920px, 100%);
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.settings-card h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 800;
}

.settings-card .muted {
  margin-bottom: 14px;
}

.settings-card .field {
  margin-bottom: 12px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.settings-class {
  grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 1.4fr) minmax(8rem, 1fr) minmax(8rem, 1fr) auto;
  align-items: end;
}

.settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  color: var(--ink);
}

.settings-preview {
  display: block;
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
}

.settings-preview.is-empty {
  display: none;
}

.office-shell {
  background: #e8eef4;
}

.office-shell [data-admin-nav] {
  background: var(--navy);
}

.admin-top.is-office {
  width: min(880px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.office-main {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 28px 24px 56px;
  display: grid;
  gap: 18px;
}

.office-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 4px;
}

.office-head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.office-head .desk-hint {
  max-width: 44ch;
}

.office-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.office-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.office-card-top h2,
.office-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 800;
}

.office-card-top .btn {
  min-height: 44px;
  flex: 0 0 auto;
}

.office-card .muted {
  margin-bottom: 14px;
}

.office-card .field {
  margin-bottom: 12px;
}

.office-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.office-mail {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.office-mail h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--navy);
}

@media (max-width: 899px) {
  .admin-top {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .admin-links,
  .admin-tools,
  .admin-actor {
    justify-self: start;
  }

  .admin-tools {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .settings-row,
  .settings-class,
  .office-grid {
    grid-template-columns: 1fr;
  }

  .office-card-top {
    flex-wrap: wrap;
  }

  .desk-head,
  .desk-row,
  .desk-stats {
    grid-template-columns: 1fr;
  }

  .desk-head {
    display: block;
  }

  .desk-hint {
    margin-top: 8px;
  }

  .desk-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .desk-row-side {
    justify-content: space-between;
  }

  .desk-search {
    flex-wrap: wrap;
  }

  .desk-find {
    width: 100%;
  }
}
