:root {
  --paper: #f4f1e9;
  --paper-bright: #fbfaf6;
  --paper-blue: #eef5f6;
  --navy: #0e3163;
  --ink: #183b61;
  --water: #2e86ad;
  --water-soft: #d9e9ef;
  --leaf: #667b6e;
  --stone: #948b7c;
  --muted: #687783;
  --line: rgba(14, 49, 99, 0.18);
  --line-strong: rgba(14, 49, 99, 0.3);
  --surface: rgba(253, 252, 247, 0.92);
  --surface-frosted: rgba(253, 252, 247, 0.78);
  --error: #a04c3b;
  --font-sans: "Avenir Next", "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial,
    sans-serif;
  --font-display: "Avenir Next", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial,
    sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --radius-control: 12px;
  --radius-panel: 16px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.journey-page {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

.journey-backdrop,
.journey-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.journey-backdrop {
  z-index: -3;
  background-color: var(--paper);
  background-image: url("/brand/waymark-kv-background.jpg");
  background-repeat: no-repeat;
  background-position: 60% center;
  background-size: auto 100%;
}

.journey-vignette {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(250, 248, 242, 0.74) 0%, rgba(250, 248, 242, 0) 34%),
    linear-gradient(90deg, rgba(250, 248, 242, 0.52) 0%, rgba(250, 248, 242, 0) 58%),
    linear-gradient(0deg, rgba(244, 241, 233, 0.2) 0%, rgba(244, 241, 233, 0) 28%);
}

.journey-shell {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto minmax(72px, 1fr) auto;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px
    max(20px, env(safe-area-inset-bottom));
}

.journey-header {
  display: grid;
  width: min(100%, 500px);
  gap: var(--space-12);
}

.brand-logo {
  display: block;
  width: 184px;
  height: auto;
}

.event-lockup {
  display: grid;
  justify-items: start;
}

.event-eyebrow,
.imprint-statement,
.confirmation-kicker,
.event-meta,
.privacy-note,
.field-label,
.form-message {
  margin: 0;
}

.event-eyebrow {
  color: rgba(24, 59, 97, 0.68);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.event-rule {
  display: block;
  width: 80px;
  height: 3px;
  margin-top: var(--space-3);
  background: var(--water);
}

h1 {
  max-width: 9em;
  margin: var(--space-4) 0 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 52px;
  letter-spacing: 0;
}

.imprint-statement {
  margin-top: var(--space-4);
  color: rgba(24, 59, 97, 0.68);
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
}

.journey-action {
  display: grid;
  width: min(100%, 520px);
  gap: var(--space-4);
}

.event-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(14, 49, 99, 0.13);
  gap: var(--space-3);
  color: rgba(24, 59, 97, 0.68);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.event-date {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 24px;
}

.event-location {
  white-space: nowrap;
}

.confirmation-card {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-panel);
  background: var(--surface-frosted);
  box-shadow:
    0 20px 56px rgba(29, 62, 88, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px) saturate(0.88);
  -webkit-backdrop-filter: blur(18px) saturate(0.88);
}

.confirmation-card::before {
  position: absolute;
  top: 0;
  left: var(--space-6);
  width: 64px;
  height: 3px;
  background: var(--water);
  content: "";
}

.form-heading {
  display: grid;
  gap: var(--space-2);
}

.confirmation-kicker {
  color: var(--water);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.confirmation-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

.field-label {
  color: rgba(24, 59, 97, 0.68);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: var(--space-3);
}

.field-row input {
  width: 100%;
  height: 52px;
  min-width: 0;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.field-row input::placeholder {
  color: rgba(65, 83, 97, 0.5);
}

.field-row input:focus-visible {
  border-color: var(--water);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(46, 134, 173, 0.14);
}

.field-row button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-control);
  color: var(--paper-bright);
  background: var(--navy);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    opacity 160ms ease;
}

.field-row button:hover {
  background: #174b82;
}

.field-row button:active {
  transform: scale(0.98);
}

.field-row button:focus-visible {
  outline: 3px solid rgba(46, 134, 173, 0.3);
  outline-offset: 3px;
}

.field-row button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.button-arrow {
  position: relative;
  width: 18px;
  height: 18px;
}

.button-arrow::before {
  position: absolute;
  top: 5px;
  left: 3px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.form-message {
  min-height: 16px;
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  opacity: 0;
}

.form-message.is-visible {
  opacity: 1;
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.confirmation-success {
  align-items: stretch;
  min-height: 140px;
}

.success-content {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
}

.success-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(46, 134, 173, 0.4);
  border-radius: 50%;
  color: var(--navy);
  background: var(--water-soft);
}

.success-mark::before {
  position: absolute;
  width: 16px;
  height: 9px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(-45deg);
}

.success-copy {
  display: grid;
  gap: var(--space-2);
}

.privacy-note {
  color: rgba(24, 59, 97, 0.52);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
}

@media (max-width: 420px) {
  .journey-backdrop {
    background-position: 60% center;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field-row button {
    justify-content: center;
    gap: var(--space-3);
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 40px;
    line-height: 44px;
  }

  .confirmation-card {
    padding: 20px;
  }

  .confirmation-card::before {
    left: 20px;
  }
}

@media (min-width: 720px) {
  .journey-backdrop {
    background-position: center center;
  }

  .journey-vignette {
    background:
      linear-gradient(90deg, rgba(250, 248, 242, 0.9) 0%, rgba(250, 248, 242, 0.5) 44%, rgba(250, 248, 242, 0) 70%),
      linear-gradient(180deg, rgba(250, 248, 242, 0.38) 0%, rgba(250, 248, 242, 0) 32%);
  }

  .journey-shell {
    padding: max(40px, env(safe-area-inset-top)) 56px
      max(32px, env(safe-area-inset-bottom));
  }

  .brand-logo {
    width: 216px;
  }

  h1 {
    font-size: 56px;
    line-height: 56px;
  }
}

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

.admin-auth-page,
.admin-dashboard {
  min-height: 100svh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(248, 246, 239, 0.98) 0%, rgba(248, 246, 239, 0.9) 54%, rgba(248, 246, 239, 0.54) 100%),
    url("/brand/waymark-kv-background.jpg") right center / auto 100% no-repeat,
    var(--paper);
}

.admin-auth-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.admin-auth-card {
  display: grid;
  width: min(100%, 440px);
  gap: var(--space-4);
  padding: var(--space-8);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(253, 252, 247, 0.94);
  box-shadow: 0 20px 56px rgba(29, 62, 88, 0.12);
}

.admin-brand-logo {
  display: block;
  width: 184px;
  height: auto;
  margin-bottom: var(--space-8);
}

.admin-eyebrow {
  margin: 0;
  color: var(--water);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.admin-auth-card h1,
.admin-header h1 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
}

.admin-auth-card > p:not(.admin-eyebrow) {
  margin: 0 0 var(--space-2);
  color: rgba(24, 59, 97, 0.68);
  font-size: 16px;
  line-height: 24px;
}

.admin-primary-link,
.admin-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: var(--radius-control);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-decoration: none;
}

.admin-primary-link {
  color: var(--paper-bright);
  background: var(--navy);
}

.admin-secondary-link {
  border: 1px solid var(--line-strong);
  color: var(--navy);
  background: rgba(255, 255, 255, 0.62);
}

.admin-dashboard {
  padding: max(32px, env(safe-area-inset-top)) 20px
    max(48px, env(safe-area-inset-bottom));
}

.admin-header,
.admin-summary,
.admin-list {
  width: min(100%, 880px);
  margin-right: auto;
  margin-left: auto;
}

.admin-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: var(--space-8);
  width: min(100%, 880px);
  margin: var(--space-6) auto 0;
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(253, 252, 247, 0.92);
  box-shadow: 0 16px 48px rgba(29, 62, 88, 0.08);
}

.admin-access h2 {
  margin: var(--space-2) 0 0;
  color: var(--navy);
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

.admin-access > div > p:last-child {
  margin: var(--space-3) 0 0;
  color: rgba(24, 59, 97, 0.62);
  font-size: 14px;
  line-height: 20px;
}

.admin-access form {
  display: grid;
  align-content: start;
  gap: var(--space-2);
}

.admin-access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: var(--space-3);
}

.admin-access-row input,
.admin-access-row button,
.admin-list-actions button {
  min-height: 48px;
  border-radius: var(--radius-control);
  font: inherit;
}

.admin-access-row input {
  min-width: 0;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 24px;
}

.admin-access-row input:focus-visible {
  border-color: var(--water);
  box-shadow: 0 0 0 3px rgba(46, 134, 173, 0.14);
}

.admin-access-row button,
.admin-list-actions button {
  border: 0;
  color: var(--paper-bright);
  background: var(--navy);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.admin-access-row button:active,
.admin-list-actions button:active {
  transform: scale(0.98);
}

.admin-state {
  min-height: 16px;
  margin: 0;
  color: rgba(24, 59, 97, 0.58);
  font-size: 12px;
  line-height: 16px;
}

.admin-state.is-error {
  color: var(--error);
}

.admin-list-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.admin-list-actions button {
  min-height: 36px;
  padding: 0 var(--space-4);
}

.admin-list-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.admin-summary strong.is-loading {
  opacity: 0.42;
}

[hidden] {
  display: none !important;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.admin-header .admin-brand-logo {
  margin-bottom: var(--space-8);
}

.admin-header .admin-eyebrow {
  margin-bottom: var(--space-2);
}

.admin-actions {
  display: flex;
  gap: var(--space-4);
  padding-bottom: var(--space-1);
}

.admin-actions a {
  color: rgba(24, 59, 97, 0.68);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
}

.admin-actions a:hover {
  color: var(--navy);
}

.admin-summary {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: var(--space-16);
  padding: var(--space-8);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(253, 252, 247, 0.92);
  box-shadow: 0 16px 48px rgba(29, 62, 88, 0.09);
}

.admin-summary p {
  align-self: center;
  margin: 0 auto 0 0;
  color: rgba(24, 59, 97, 0.68);
  font-size: 16px;
  line-height: 24px;
}

.admin-summary strong {
  color: var(--water);
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  line-height: 72px;
}

.admin-summary span {
  color: rgba(24, 59, 97, 0.58);
  font-size: 16px;
  line-height: 24px;
}

.admin-list {
  margin-top: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(253, 252, 247, 0.92);
  box-shadow: 0 16px 48px rgba(29, 62, 88, 0.08);
  overflow: hidden;
}

.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6);
  border-bottom: 1px solid var(--line);
}

.admin-list-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

.admin-list-header span {
  color: rgba(24, 59, 97, 0.56);
  font-size: 14px;
  line-height: 20px;
}

.admin-list ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
  padding: 0 var(--space-6);
  border-bottom: 1px solid rgba(14, 49, 99, 0.1);
}

.admin-list li:last-child {
  border-bottom: 0;
}

.admin-index,
.admin-list time {
  color: rgba(24, 59, 97, 0.5);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.admin-list strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.admin-empty {
  margin: 0;
  padding: var(--space-16) var(--space-6);
  color: rgba(24, 59, 97, 0.56);
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

@media (max-width: 560px) {
  .admin-auth-page,
  .admin-dashboard {
    background:
      linear-gradient(180deg, rgba(248, 246, 239, 0.9) 0%, rgba(248, 246, 239, 0.72) 100%),
      url("/brand/waymark-kv-background.jpg") 60% center / auto 100% no-repeat,
      var(--paper);
  }

  .admin-header {
    display: grid;
  }

  .admin-header .admin-brand-logo {
    margin-bottom: var(--space-6);
  }

  .admin-summary {
    margin-top: var(--space-12);
    padding: var(--space-6);
  }

  .admin-summary strong {
    font-size: 56px;
    line-height: 56px;
  }

  .admin-list li {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }

  .admin-list time {
    grid-column: 2;
  }

  .admin-access {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding: var(--space-6);
  }

  .admin-access-row {
    grid-template-columns: 1fr;
  }

  .admin-list-header {
    align-items: flex-start;
  }

  .admin-list-actions {
    display: grid;
    justify-items: end;
    gap: var(--space-2);
  }
}
