:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(16, 16, 16, 0.96);
  --panel-strong: rgba(22, 22, 22, 0.98);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f1e8;
  --muted: rgba(244, 241, 232, 0.72);
  --green: #9cff00;
  --gold: #f4c96b;
  --pink: #ff6b9d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --radius: 24px;
  --radius-sm: 18px;
  --font-display: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --font-body: "Arial", "Helvetica Neue", Helvetica, sans-serif;
  --kc-focus: rgba(244, 201, 107, 0.78);
  --kc-touch-target: 44px;
  --kc-mobile-gutter: 12px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(156, 255, 0, 0.08), transparent 32%),
    radial-gradient(circle at right top, rgba(255, 107, 157, 0.08), transparent 24%),
    linear-gradient(180deg, #090909 0%, #050505 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

button,
input,
select,
textarea,
a {
  min-width: 0;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
select:not(:disabled),
input:not(:disabled),
textarea:not(:disabled) {
  min-height: var(--kc-touch-target);
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--kc-focus);
  outline-offset: 3px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
}

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

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

.order-header {
  width: min(1100px, calc(100% - 24px));
  margin: 14px auto 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand-link img {
  display: block;
  width: 120px;
  height: auto;
}

.header-copy {
  display: grid;
  gap: 2px;
  flex: 1;
}

.header-copy strong {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.order-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.order-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.order-page {
  width: min(1100px, calc(100% - 24px));
  margin: 16px auto 48px;
  display: grid;
  gap: 14px;
}

.order-form {
  display: grid;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), rgba(10, 10, 10, 0.92));
  box-shadow: var(--shadow);
}

.order-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 18px;
}

.order-hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 255, 0, 0.2), transparent 68%);
  pointer-events: none;
}

.eyebrow,
.panel-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--green);
}

.order-hero h1,
.panel-head h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 0.94;
}

.order-hero h1 {
  font-size: clamp(2.6rem, 10vw, 5.4rem);
  max-width: 11ch;
}

.hero-description,
.step-note,
.summary-note,
.hero-note,
.shell-error,
.preview-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-note {
  margin: 16px 0 0;
}

.shell-error {
  margin: 10px 0 0;
  color: var(--pink);
}

.hero-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.status-pill,
.metric-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
}

.status-pill.is-live {
  color: var(--green);
  border-color: rgba(156, 255, 0, 0.28);
  background: rgba(156, 255, 0, 0.14);
}

.order-summary {
  position: sticky;
  top: 10px;
  z-index: 10;
  padding: 16px;
  background: linear-gradient(180deg, var(--panel-strong), rgba(14, 14, 14, 0.94));
}

.summary-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.summary-header h2 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.5rem;
  line-height: 0.96;
}

.summary-freshness {
  margin: 0;
  color: var(--gold);
  line-height: 1.5;
}

.summary-stack {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-row:last-of-type {
  border-bottom: 0;
}

.summary-row span {
  color: var(--muted);
}

.summary-note {
  margin: 4px 0 0;
}

.order-flow {
  display: grid;
  gap: 14px;
}

.order-flow > .panel {
  padding: 18px;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.cookie-grid,
.pickup-grid,
.state-grid {
  display: grid;
  gap: 10px;
}

.choice-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.group-note {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.cookie-card,
.pickup-chip,
.state-chip {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.cookie-card,
.pickup-chip {
  min-height: 104px;
  padding: 16px;
  text-align: left;
  display: grid;
  gap: 6px;
}

.cookie-card {
  cursor: pointer;
  position: relative;
  align-content: start;
}

.pickup-chip {
  cursor: pointer;
  position: relative;
  align-content: start;
}

.cookie-card:focus-within,
.pickup-chip:focus-within {
  border-color: rgba(156, 255, 0, 0.38);
  box-shadow: 0 0 0 1px rgba(156, 255, 0, 0.14);
}

.cookie-card strong,
.pickup-chip strong {
  font-size: 1.02rem;
}

.choice-input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green);
}

.choice-input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.cookie-card__top,
.pickup-chip__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cookie-card__body,
.pickup-chip__body {
  display: grid;
  gap: 6px;
}

.cookie-card__badge,
.cookie-card__meta,
.cookie-card__price,
.pickup-chip span,
.pickup-chip em {
  color: var(--muted);
}

.cookie-card.is-selected,
.pickup-chip.is-selected {
  border-color: rgba(156, 255, 0, 0.32);
  box-shadow: 0 0 0 1px rgba(156, 255, 0, 0.12);
}

.cookie-card.is-inactive,
.pickup-chip.is-inactive {
  opacity: 0.58;
  filter: grayscale(0.2);
}

.field-error {
  display: block;
  margin-top: 10px;
  min-height: 1.2em;
  color: var(--pink);
}

.quantity-shell {
  display: grid;
  gap: 10px;
}

.qty-control {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 10px;
}

.qty-btn {
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
}

.quantity-shell input,
.field input,
.field textarea {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 16px;
}

.quantity-shell input[aria-invalid="true"],
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: rgba(255, 107, 157, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 107, 157, 0.12);
}

.qty-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

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

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

.consent-row {
  min-height: 56px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.consent-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.preview-panel p {
  min-height: 60px;
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(244, 201, 107, 0.28);
  background: rgba(244, 201, 107, 0.08);
  color: var(--text);
}

.state-chip {
  min-height: 52px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
}

.state-chip.is-muted {
  opacity: 0.58;
}

.state-error {
  border-color: rgba(255, 107, 157, 0.35);
  background: rgba(255, 107, 157, 0.1);
}

.state-loading {
  border-color: rgba(244, 201, 107, 0.35);
  background: rgba(244, 201, 107, 0.08);
}

.state-disabled {
  border-color: rgba(255, 255, 255, 0.08);
}

.state-sent {
  border-color: rgba(156, 255, 0, 0.35);
  background: rgba(156, 255, 0, 0.1);
}

.submit-button {
  min-height: 72px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--green), #7edc00);
  color: #050505;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 16px 30px rgba(156, 255, 0, 0.2);
}

.submit-button.is-disabled {
  opacity: 0.62;
  box-shadow: none;
}

.submit-button.is-loading {
  background: linear-gradient(180deg, var(--gold), #d8a74a);
}

.submit-button.is-preview-ready {
  background: linear-gradient(180deg, #d8d4ff, #a8a4ff);
}

.form-actions {
  display: grid;
  gap: 10px;
}

.secondary-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(244, 201, 107, 0.28);
  background: rgba(244, 201, 107, 0.08);
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.checkout-return-banner {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.55;
  font-weight: 800;
}

.checkout-return-banner.is-success {
  border-color: rgba(156, 255, 0, 0.32);
  background: rgba(156, 255, 0, 0.12);
  color: var(--green);
}

.checkout-return-banner.is-cancelled {
  border-color: rgba(244, 201, 107, 0.32);
  background: rgba(244, 201, 107, 0.1);
  color: var(--gold);
}

body[data-checkout-return="success"] .form-actions,
body[data-checkout-return="cancelled"] .form-actions {
  display: none;
}

body[data-checkout-return="success"] .order-summary,
body[data-checkout-return="cancelled"] .order-summary {
  margin-bottom: 0;
}

.test-checkout-card {
  padding: 18px;
}

.test-checkout-page {
  max-width: 860px;
}

.test-checkout-hero {
  border-color: rgba(244, 201, 107, 0.28);
}

.test-checkout-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.test-checkout-secondary {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(244, 201, 107, 0.32);
  color: var(--gold);
  background: rgba(244, 201, 107, 0.08);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.test-checkout-status {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.test-checkout-debug {
  margin: 14px 0 0;
  overflow-x: auto;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: var(--green);
}

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

@media (min-width: 920px) {
  .order-page {
    gap: 18px;
  }

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

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

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

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

  .field-grid .consent-row,
  .field-grid .field:nth-last-child(1) {
    grid-column: 1 / -1;
  }

  .order-form {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .order-hero,
  .order-flow {
    grid-column: 1;
  }

  .order-summary {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 760px) {
  body {
    background: #050505;
  }

  .order-header {
    width: min(100%, calc(100% - 16px));
    padding: 12px 14px;
    align-items: flex-start;
    background: #0d0d0d;
    backdrop-filter: none;
  }

  .order-nav {
    display: none;
  }

  .order-page {
    width: min(100%, calc(100% - 16px));
    margin-bottom: 32px;
  }

  .panel,
  .order-summary {
    background: #101010;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  }

  .order-hero::after {
    display: none;
  }

  .order-summary {
    position: static;
    top: auto;
    z-index: auto;
    padding: 14px;
  }

  .order-flow > .panel {
    padding: 16px;
  }

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

  .summary-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }

  .summary-row strong {
    line-height: 1.25;
  }

  .summary-note {
    grid-column: 1 / -1;
  }

  .summary-header h2 {
    font-size: 1.25rem;
  }

  .form-actions {
    position: static;
    z-index: auto;
    margin: 4px 0 0;
    padding: 0 0 max(8px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .submit-button,
  .secondary-action {
    width: 100%;
    min-height: 60px;
    border-radius: 18px;
    text-align: center;
  }

  .secondary-action {
    background: #1b160c;
    color: var(--gold);
  }
}
