@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Host Grotesk"; font-weight: 600; font-display: swap; src: url("/fonts/host-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Host Grotesk"; font-weight: 700; font-display: swap; src: url("/fonts/host-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
    --navy: #0F172A;
    --red: #C1121F;
    --red-hover: #A2131A;
    --muted: #647488;
    --background: #FBFAFC;
    --surface: #E2E8F0;
    --border: #CBD5E1;
    --white: #FFFFFF;
    --heading: "Host Grotesk", "Inter", sans-serif;
    --body: "Inter", system-ui, -apple-system, sans-serif;
    --radius: 12px;
    color-scheme: light;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--background);
    color: var(--navy);
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    /* No double-tap zoom: taps register immediately on a tablet. */
    touch-action: manipulation;
}

[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--heading); margin: 0; line-height: 1.15; }
h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0; }

/* ---------- Screens ---------- */

.screen {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 24px max(24px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

.welcome {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

.welcome-logo { width: 254px; height: auto; margin-bottom: 16px; }
.lead { font-size: 22px; color: var(--muted); max-width: 620px; }

.card {
    background: var(--white);
    border: 1px solid var(--surface);
    border-radius: var(--radius);
    padding: 24px;
}

.intro { text-align: left; max-width: 640px; display: grid; gap: 12px; }
.intro-strong { font-weight: 600; }

.hint { color: var(--muted); font-size: 16px; }

.outbox-status {
    margin-top: 32px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
}

.check {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: grid;
    place-items: center;
}

/* ---------- Top bar and progress ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0 32px;
}

.progress span {
    height: 6px;
    border-radius: 3px;
    background: var(--surface);
    transition: background-color 0.2s;
}

.progress span.done { background: var(--red); }

/* ---------- Steps ---------- */

.step { display: grid; gap: 24px; }
.step-count { color: var(--muted); font-size: 16px; font-weight: 600; margin-bottom: -16px; }
.step-intro { color: var(--muted); }
.required-note { color: var(--muted); font-size: 16px; margin-top: -8px; }
.req { color: var(--red); }

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

@media (min-width: 640px) {
    .grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Fields ---------- */

.field { display: grid; gap: 8px; align-content: start; }

label, .label { font-weight: 600; font-size: 17px; }

input, textarea {
    width: 100%;
    min-height: 60px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--navy);
    font: inherit;
    /* 18px stays above 16px, so iOS does not zoom into the field. */
    font-size: 18px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

textarea { resize: vertical; line-height: 1.4; }

input::placeholder, textarea::placeholder { color: #94A3B8; }

input:focus, textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.field.invalid input, .field.invalid textarea {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.12);
}

.error { color: var(--red); font-size: 16px; font-weight: 500; }
.help { color: var(--muted); font-size: 16px; }

/* ---------- Seat stepper ---------- */

.stepper {
    display: inline-grid;
    grid-template-columns: 64px 80px 64px;
    align-items: center;
    width: max-content;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    overflow: hidden;
}

.stepper output {
    text-align: center;
    font-family: var(--heading);
    font-size: 26px;
    font-weight: 700;
}

.stepper-btn {
    height: 60px;
    border: 0;
    background: var(--white);
    color: var(--navy);
    font-size: 28px;
    cursor: pointer;
}

.stepper-btn:active:not(:disabled) { background: var(--surface); }
.stepper-btn:disabled { color: var(--border); cursor: default; }

/* ---------- Users ---------- */

#users { display: grid; gap: 16px; }
.user { display: grid; gap: 20px; }
.user-head { display: flex; align-items: center; justify-content: space-between; }
.users-empty { color: var(--muted); }
.btn-add { justify-self: start; }

/* ---------- Review ---------- */

#review { display: grid; gap: 16px; }

.review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.review dl { margin: 0; display: grid; gap: 12px; }
.review dl + h4 { margin-top: 20px; }
.review h4 { margin: 0 0 8px; font-size: 16px; color: var(--muted); font-weight: 600; }

.review-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

@media (min-width: 640px) {
    .review-row { grid-template-columns: 240px 1fr; gap: 16px; }
}

.review dt { color: var(--muted); font-size: 16px; }
.review dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.review .empty { color: #94A3B8; }

.form-error {
    color: var(--red);
    font-weight: 500;
    padding: 16px;
    border: 1.5px solid var(--red);
    border-radius: 10px;
    background: #FEF2F2;
}

/* ---------- Buttons ---------- */

.actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--surface);
}

.btn {
    min-height: 60px;
    padding: 0 32px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary { background: var(--red); color: var(--white); min-width: 200px; }
.btn-primary:active:not(:disabled) { background: var(--red-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border); }
.btn-secondary:active { background: var(--surface); }

.btn-large { min-height: 72px; min-width: 320px; font-size: 22px; border-radius: 12px; }

.btn-link {
    min-height: 48px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

@media (hover: hover) {
    .btn-primary:hover:not(:disabled) { background: var(--red-hover); }
    .btn-secondary:hover { border-color: var(--muted); }
    .btn-link:hover { color: var(--navy); }
}

.btn:focus-visible, .btn-link:focus-visible, .stepper-btn:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

@media (max-width: 520px) {
    h1 { font-size: 32px; }
    h2 { font-size: 26px; }
    .actions { flex-direction: column-reverse; }
    .btn, .btn-large { width: 100%; min-width: 0; }
}
