:root {
    color-scheme: light dark;
    --bg: #f4f6fb;
    --bg-grad-1: #eef3ff;
    --bg-grad-2: #f7f5ff;
    --panel: #ffffff;
    --panel-alt: #fbfcfe;
    --ink: #141b2d;
    --ink-soft: #33405a;
    --muted: #64708a;
    --line: #e2e7f1;
    --line-strong: #cdd5e6;
    --brand: #1f4dd8;
    --brand-dark: #1739a8;
    --brand-ink: #ffffff;
    --soft: #e9f0ff;
    --accent: #7a5cff;
    --danger: #c02b1d;
    --danger-soft: #fdecea;
    --success: #05754c;
    --success-soft: #dff5ea;
    --warn-soft: #fff6e8;
    --warn-ink: #8a4b12;
    --shadow-sm: 0 2px 8px rgba(20, 27, 45, 0.05);
    --shadow-md: 0 18px 44px rgba(20, 27, 45, 0.08);
    --radius: 18px;
    --radius-sm: 13px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1017;
        --bg-grad-1: #121826;
        --bg-grad-2: #161327;
        --panel: #161b26;
        --panel-alt: #1b212e;
        --ink: #f2f5fb;
        --ink-soft: #d6ddec;
        --muted: #9aa5bd;
        --line: #262d3c;
        --line-strong: #333c4f;
        --brand: #5f86ff;
        --brand-dark: #4a6ff0;
        --brand-ink: #0d1017;
        --soft: #1c2740;
        --accent: #9d86ff;
        --danger: #ff8a7d;
        --danger-soft: #2a1a18;
        --success: #6ee0ac;
        --success-soft: #17281f;
        --warn-soft: #2a2216;
        --warn-ink: #f0c48a;
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.45);
    }
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(1200px 600px at 8% -10%, var(--bg-grad-1), transparent 60%),
        radial-gradient(1000px 500px at 100% 0%, var(--bg-grad-2), transparent 55%),
        var(--bg);
    color: var(--ink);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

.page-shell {
    width: 100%;
    max-width: 680px;
    min-width: 0;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 40px) max(16px, env(safe-area-inset-right)) 56px max(16px, env(safe-area-inset-left));
    overflow: hidden;
}

body.has-booking-dock .page-shell {
    padding-bottom: calc(116px + env(safe-area-inset-bottom));
}

/* ---------- Hero ---------- */

.hero {
    padding: 6px 4px clamp(18px, 4vw, 26px);
    text-align: center;
    min-width: 0;
}

.brand-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: -0.02em;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    flex: 0 0 auto;
    transition: width 160ms ease, height 160ms ease, border-radius 160ms ease;
}

.brand-badge.has-logo {
    width: clamp(88px, 22vw, 118px);
    height: clamp(88px, 22vw, 118px);
    border: 1px solid var(--line-strong);
    border-radius: clamp(18px, 5vw, 26px);
    background: #171717;
    box-shadow: var(--shadow-md);
}

.tenant-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.brand-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.01em;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    max-width: 100%;
    margin-top: 10px;
    font-size: clamp(1.9rem, 8vw, 2.55rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.hero p,
.step-header p,
.status-panel p,
.form-message {
    color: var(--muted);
    line-height: 1.5;
}

.hero p {
    margin-top: 10px;
    font-size: clamp(0.94rem, 3.8vw, 1rem);
    text-wrap: balance;
}

/* ---------- Layout blocks ---------- */

.flow,
.confirmation {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.booking-progress {
    display: grid;
    gap: 8px;
    padding: 0 4px 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.progress-track {
    height: 5px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

#progress-bar {
    display: block;
    width: 25%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: width 220ms ease;
}

.step,
.status-panel,
.confirmation {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 0;
}

.step,
.status-panel {
    padding: 18px;
}

.step {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    scroll-margin-top: 14px;
}

.step:focus-within {
    border-color: var(--line-strong);
}

.step.is-active {
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
    box-shadow: 0 18px 44px color-mix(in srgb, var(--brand) 11%, transparent);
}

.step.is-complete:not(.is-active) {
    padding-block: 14px;
    background: color-mix(in srgb, var(--soft) 32%, var(--panel));
    box-shadow: var(--shadow-sm);
}

.step.is-pending:not(.is-active) {
    padding-block: 14px;
    box-shadow: none;
    opacity: 0.72;
}

.step-header {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.step.is-complete:not(.is-active) .step-header,
.step.is-pending:not(.is-active) .step-header {
    margin-bottom: 0;
}

.step-header > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--soft);
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 800;
    border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}

.step h2,
.confirmation h2 {
    font-size: 1.06rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.step-header p {
    margin-top: 3px;
    font-size: 0.9rem;
}

.step.is-complete:not(.is-active) .step-heading p,
.step.is-pending:not(.is-active) .step-heading p {
    display: none;
}

.step-body {
    min-width: 0;
}

.step-edit,
.list-toggle {
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: var(--soft);
    color: var(--brand);
    padding: 0 12px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 850;
    cursor: pointer;
}

.step-summary {
    margin: 10px 0 0 44px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.4;
    font-weight: 700;
}

.service-search {
    display: block;
    margin-bottom: 10px;
}

.service-search input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: var(--panel-alt);
    color: var(--ink);
    padding: 11px 14px;
    outline: none;
}

.service-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.list-toggle {
    width: 100%;
    margin-top: 10px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
    background: transparent;
}

.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;
}

/* ---------- Options / slots ---------- */

.option-list,
.slots-list {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.option-card,
.slot-button {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel-alt);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, transform 0.08s ease;
}

.option-card:hover,
.slot-button:hover {
    border-color: var(--brand);
}

.option-card:active,
.slot-button:active {
    transform: scale(0.99);
}

.option-card {
    padding: 14px 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.option-card strong {
    min-width: 0;
    line-height: 1.3;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
}

.option-meta {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.option-card.is-selected,
.slot-button.is-selected {
    border-color: var(--brand);
    background: var(--soft);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.option-card[aria-pressed="true"],
.slot-button[aria-pressed="true"] {
    border-color: var(--brand);
}

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

.field {
    display: grid;
    gap: 7px;
    margin-top: 13px;
}

.field span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--panel-alt);
    color: var(--ink);
    padding: 11px 13px;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.field textarea {
    min-height: 74px;
    resize: vertical;
    line-height: 1.45;
}

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

.field-hint {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

#professional-mode-hint {
    margin: 8px 0 0;
    line-height: 1.45;
}

.date-choice-field {
    min-width: 0;
    margin: 16px 0 0;
    padding: 0;
    border: 0;
}

.date-choice-field legend {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.date-quick-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74px, 1fr);
    gap: 8px;
    margin-top: 8px;
    padding: 2px 2px 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
}

.date-chip {
    min-height: 64px;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: var(--panel-alt);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    scroll-snap-align: start;
}

.date-chip span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: capitalize;
}

.date-chip strong {
    font-size: 0.95rem;
}

.date-chip.is-selected,
.date-chip[aria-pressed="true"] {
    border-color: var(--brand);
    background: var(--soft);
    color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.date-fallback-field {
    margin-top: 8px;
}

.step-continue {
    margin-top: 16px;
}

.slots-list {
    gap: 14px;
}

.slot-period {
    display: grid;
    gap: 8px;
}

.slot-period h3 {
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.slot-button {
    min-height: 48px;
    text-align: center;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
}

.booking-review {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
    border-radius: 13px;
    background: color-mix(in srgb, var(--brand) 6%, var(--panel));
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.4;
}

.booking-review strong {
    color: var(--ink);
    font-size: 0.95rem;
}

.booking-dock {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(calc(100% - 24px), 640px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    box-shadow: 0 16px 46px rgba(8, 12, 24, 0.24);
    backdrop-filter: blur(16px);
}

.booking-dock div {
    min-width: 0;
}

.booking-dock span,
.booking-dock strong {
    display: block;
}

.booking-dock span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.booking-dock strong {
    margin-top: 2px;
    overflow: hidden;
    color: var(--ink);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-dock button {
    min-height: 40px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 11px;
    background: var(--soft);
    color: var(--brand);
    padding: 0 13px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    cursor: pointer;
}

.slot-assignment-note,
.next-date-note {
    grid-column: 1 / -1;
    margin: 0;
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
    background: color-mix(in srgb, var(--brand) 7%, var(--panel));
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 650;
}

.next-date-note {
    display: grid;
    gap: 10px;
}

.next-date-button {
    width: 100%;
    min-height: 42px;
    border: 1px solid color-mix(in srgb, var(--brand) 36%, var(--line));
    border-radius: 12px;
    background: var(--soft);
    color: var(--brand);
    font-weight: 850;
    cursor: pointer;
}

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

.primary-button,
.secondary-button,
.ghost-button {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.14s ease, opacity 0.14s ease, transform 0.08s ease;
    -webkit-tap-highlight-color: transparent;
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active {
    transform: scale(0.99);
}

.primary-button {
    margin-top: 16px;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--accent)));
    color: var(--brand-ink);
    box-shadow: var(--shadow-sm);
}

.primary-button:hover {
    background: var(--brand-dark);
}

.primary-button:disabled {
    background: color-mix(in srgb, var(--muted) 40%, var(--line));
    color: color-mix(in srgb, var(--muted) 90%, #fff);
    cursor: not-allowed;
    box-shadow: none;
}

.secondary-button {
    background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--brand) 10%, var(--panel)));
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line-strong));
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}

.secondary-button:hover {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, var(--panel));
}

.ghost-button {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    min-height: 44px;
    font-weight: 700;
}

.ghost-button:hover {
    color: var(--ink);
    border-color: var(--muted);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.next-date-button:focus-visible,
.step-edit:focus-visible,
.list-toggle:focus-visible,
.date-chip:focus-visible,
.booking-dock button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent);
    outline-offset: 2px;
}

/* ---------- Status panel ---------- */

.status-panel {
    text-align: left;
}

.status-panel strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--ink);
}

.status-panel .secondary-button {
    margin-top: 14px;
}

.status-panel.is-error {
    border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
    background: var(--danger-soft);
}

.form-message {
    min-height: 20px;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-message.is-error,
.status-panel.is-error strong {
    color: var(--danger);
}

.form-message.is-info {
    color: var(--brand);
}

.form-message.is-success {
    color: var(--success);
}

/* ---------- Confirmation ---------- */

.confirmation {
    padding: 26px 18px;
    text-align: center;
}

.success-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    font-weight: 900;
    font-size: 1.4rem;
}

.confirmation > h2 {
    margin-top: 4px;
}

.confirmation > p.confirm-lead {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.94rem;
}

.confirmation dl {
    display: grid;
    gap: 0;
    margin: 16px 0 0;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.confirmation dl div {
    padding: 12px 14px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.confirmation dl div + div {
    border-top: 1px solid var(--line);
}

.confirmation dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.confirmation dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
    color: var(--ink);
}

.confirmation .new-booking-row {
    margin-top: 16px;
}

.manage-link {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 14px;
    min-width: 0;
    height: auto;
    padding-block: 10px;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* ---------- Post-booking signup card ---------- */

.signup-card {
    margin-top: 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--accent) 7%, var(--panel));
    text-align: left;
    overflow: hidden;
}

.signup-card summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.signup-card summary::-webkit-details-marker {
    display: none;
}

.signup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    color: #fff;
    font-weight: 900;
    flex-shrink: 0;
}

.signup-card summary strong {
    display: block;
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.25;
}

.signup-card summary span.signup-sub {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
}

.signup-card summary .chev {
    margin-left: auto;
    color: var(--muted);
    font-weight: 900;
    transition: transform 0.15s ease;
}

.signup-card[open] summary .chev {
    transform: rotate(90deg);
}

.signup-body {
    padding: 4px 16px 16px;
    border-top: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
}

.consent-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    flex-shrink: 0;
    accent-color: var(--brand);
}

.consent-row label {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}

.consent-row a {
    color: var(--brand);
    font-weight: 700;
}

.signup-done {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 11px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
}

/* ---------- Misc ---------- */

.empty-note {
    grid-column: 1 / -1;
    padding: 13px 14px;
    border-radius: 12px;
    background: var(--warn-soft);
    color: var(--warn-ink);
    line-height: 1.45;
    font-size: 0.88rem;
    font-weight: 600;
}

.availability-loading {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 2px;
}

.page-foot {
    margin-top: 26px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
}

.page-foot strong {
    color: var(--ink-soft);
    font-weight: 700;
}

@media (min-width: 640px) {
    .page-shell {
        padding-top: 40px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .step,
    .status-panel,
    .confirmation {
        padding: 24px;
    }

    .step-header {
        grid-template-columns: 34px 1fr;
    }

    .step-header > span {
        width: 34px;
        height: 34px;
    }
}

@media (min-width: 760px) {
    .brand-badge.has-logo {
        width: 124px;
        height: 124px;
    }

    .date-quick-list {
        grid-auto-flow: initial;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        overflow: visible;
    }
}

@media (max-width: 520px) {
    .option-card {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .option-meta {
        justify-self: start;
        text-align: left;
    }

    .step-summary {
        margin-left: 44px;
    }
}

@media (max-width: 420px) {
    .page-shell {
        padding-top: 20px;
        padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
    }

    .step,
    .status-panel,
    .confirmation {
        padding: 16px;
    }

    h1 {
        overflow-wrap: anywhere;
    }

    .option-card {
        gap: 8px;
        padding: 13px 14px;
    }

    .option-meta {
        font-size: 0.82rem;
    }

    .step-header {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .step-header > span {
        width: 30px;
        height: 30px;
    }

    .step-summary {
        margin-left: 40px;
    }

    .booking-dock {
        width: calc(100% - 20px);
    }
}

@media (max-width: 360px) {
    .option-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .option-meta {
        justify-self: start;
        text-align: left;
    }

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

    .step-edit {
        padding-inline: 9px;
    }

    .booking-dock span {
        display: none;
    }
}

@media (max-height: 700px) and (max-width: 520px) {
    .page-shell {
        padding-top: 12px;
    }

    .hero {
        padding-bottom: 14px;
    }

    .brand-row {
        margin-bottom: 10px;
    }

    .brand-badge.has-logo {
        width: 78px;
        height: 78px;
        border-radius: 17px;
    }
}

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