/* Booking wizard — /varaa-muutto/ (2026-09 redesign, v4 handoff).

   Full-height two-column app shell: the page never scrolls, only the step
   area does. Tokens and geometry are the handoff's ("Muutto365
   Varauslomake Redesign v4.html"). The second half of this file styles the
   widgets booking-app.js renders into (date picker, address/route status,
   NLP detections, photo thumbnails, the agreement modal, Stripe's card
   field, result messages) — their class names are booking-app.js's and
   booking-photos.js's, not this design's. */

:root {
    --paper: #0d0d0c;
    --panel: #161615;
    --field: #1c1c1a;
    --paper-dim: #1e1e1c;
    --on-dark: #fff;
    --dim: #d2d2cc;
    --ink: #0a0a0a;
    --mint: oklch(0.80 0.17 162);
    --mint-deep: oklch(0.48 0.14 162);
    --amber: oklch(0.72 0.14 78);
    --danger: oklch(0.52 0.19 25);
    --danger-l: oklch(0.82 0.13 25);
    --rule: rgba(255, 255, 255, .14);
    --rule-soft: rgba(255, 255, 255, .1);
    --rule-dark: rgba(255, 255, 255, .18);
    --line-light: rgba(255, 255, 255, .18);
    --font-display: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Public Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --page-x: 2.6rem;
}
@media (max-width:1200px) { :root { --page-x: 1.8rem } }
@media (max-width:700px) { :root { --page-x: 1.1rem } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; min-width: 0 }
html, body { height: 100% }
body {
    background: var(--paper); color: var(--on-dark);
    font-family: var(--font-body); font-weight: 400; line-height: 1.6; text-wrap: pretty;
    height: 100vh; height: 100dvh; overflow: hidden;
    display: flex; flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--mint); text-decoration: underline; text-underline-offset: 2px }
a:hover { color: #fff }
button { font: inherit; color: inherit }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px }
[hidden] { display: none !important }

/* Native controls the wizard renders over. Out of the layout and out of
   reach, but still in the DOM with their ids and values — booking-app.js
   and webmcp.js read and write them. */
.native {
    position: absolute !important; width: 1px !important; height: 1px !important;
    overflow: hidden !important; clip-path: inset(50%) !important; opacity: 0 !important;
    pointer-events: none !important; white-space: nowrap;
}

/* ── Top bar ── */
.book-bar {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .75rem var(--page-x); padding-top: max(.75rem, env(safe-area-inset-top));
    background: #0a0a0a; border-bottom: 1px solid var(--rule);
}
.book-bar .logo {
    font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; color: #fff; text-decoration: none;
    display: flex; align-items: baseline; gap: .3rem; letter-spacing: -.01em;
}
.book-bar .logo span { font-family: var(--font-mono); font-size: .6rem; color: var(--mint); font-weight: 400 }
.book-bar .back {
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
    color: rgba(255, 255, 255, .72); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center;
}
.book-bar .back:hover { color: var(--mint) }

.wiz { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(272px, 318px) minmax(0, 1fr) }
@media (max-width:980px) { .wiz { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) } }

/* ── Rail ── */
.rail {
    background: #0a0a0a; color: #fff; padding: 1.5rem 1.45rem 1.3rem; min-height: 0; overflow: auto;
    display: flex; flex-direction: column; border-right: 1px solid var(--rule);
}
.rail-label { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .78); margin-bottom: 1.2rem }
.rail-progress { display: flex; flex-direction: column; border-top: 1px solid var(--line-light) }
.pitem {
    display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .7rem;
    padding: .72rem .1rem; background: none; border: none; border-bottom: 1px solid var(--line-light); text-align: left;
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255, 255, 255, .82); cursor: default;
}
.pitem .idx { color: rgba(255, 255, 255, .62) }
.pitem[data-done="1"] { cursor: pointer }
.pitem[data-done="1"]:hover { color: var(--mint) }
.pitem[aria-current="step"] { color: #fff }
.pitem[aria-current="step"] .idx { color: var(--mint) }
.pitem .flag { width: 5px; height: 5px; background: transparent }
.pitem[data-done="1"][data-state="ok"] .flag { background: var(--mint) }
.pitem[data-state="warn"] .flag { background: var(--amber) }
.pitem[data-state="error"] .flag { background: var(--danger) }
.rail-sum { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.05rem }
.srow { display: flex; flex-direction: column; gap: .18rem }
.srow .sk { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mint) }
.srow .sv { font-size: .95rem; line-height: 1.45; color: #fff; overflow-wrap: anywhere }
.srow .ar { color: var(--mint); padding: 0 .15rem }
.price { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line-light) }
.price .k { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mint) }
.price .v { display: none }
.price.ready .v {
    display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.3rem; line-height: 1.05;
    letter-spacing: -.025em; color: var(--mint); margin-top: .3rem; transition: transform .2s var(--ease);
}
.price .note { font-family: var(--font-mono); font-size: .7rem; line-height: 1.65; color: rgba(255, 255, 255, .86); margin-top: .35rem }
/* booking-app.js sets the breakdown's inline display once a price exists;
   the wizard's .ready decides whether it is shown at all. */
.price .breakdown { margin-top: .9rem; flex-direction: column }
.price:not(.ready) .breakdown { display: none !important }
.brow {
    display: flex; justify-content: space-between; gap: 1rem;
    font-family: var(--font-mono); font-size: .74rem; padding: .4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14); color: #fff;
}
.brow.hi span:first-child, .brow.discount span { color: var(--mint) }
.brow.vat { border-bottom: none }
.btotal {
    display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
    border-top: 1px solid var(--line-light); margin-top: .4rem; padding-top: .7rem;
    font-family: var(--font-mono); font-size: .78rem;
}
.btotal span:last-child { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--mint) }
.rail-features { margin-top: auto; padding-top: 1.6rem; display: flex; flex-direction: column; gap: .45rem }
.rail-features div { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; color: rgba(255, 255, 255, .85); display: flex; gap: .55rem; align-items: baseline }
.rail-features div::before { content: ''; width: 4px; height: 4px; background: var(--mint); flex: 0 0 auto; transform: translateY(-2px) }

@media (max-width:980px) {
    .rail { overflow: visible; flex-direction: row; align-items: center; gap: 1rem; padding: .55rem var(--page-x); flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--rule) }
    .rail-label, .rail-sum, .rail-features { display: none }
    .rail-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; flex: 1; min-width: 210px; border-top: none }
    .pitem { grid-template-columns: 1fr; justify-items: center; min-height: 38px; gap: .25rem; border-bottom: none; border-top: 2px solid rgba(255, 255, 255, .18); padding: .35rem .2rem }
    .pitem[data-done="1"][data-state="ok"] { border-top-color: var(--mint) }
    .pitem[data-state="warn"] { border-top-color: var(--amber) }
    .pitem[data-state="error"] { border-top-color: var(--danger) }
    .pitem[aria-current="step"] { border-top-color: var(--mint) }
    .pitem .pl, .pitem .flag { display: none }
    .price { margin: 0; padding: 0; border-top: none; display: flex; align-items: baseline; gap: .5rem }
    .price:not(.ready) { display: none }
    .price .note { display: none }
    .price.ready .v { font-size: 1.25rem; margin: 0 }
    .price .breakdown { display: none !important }
}

/* ── Pane ── */
.pane {
    position: relative; padding: 2.1rem var(--page-x) 1.2rem; padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
    min-height: 0; display: flex; flex-direction: column; overflow: hidden; color: var(--on-dark);
}
.pane::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(900px 640px at 6% 0%, color-mix(in oklab, var(--mint) 22%, transparent), transparent 66%),
        radial-gradient(640px 520px at 98% 98%, color-mix(in oklab, var(--mint) 11%, transparent), transparent 70%);
}
.pane::after {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px) 0 0/24px 24px; opacity: .05;
}
.inner { position: relative; z-index: 1; width: 100%; max-width: 980px; display: flex; flex-direction: column; min-height: 0; flex: 1 }
.wiz-head { flex: 0 0 auto; margin-bottom: 1.2rem }
.wiz-head .count { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--mint) }
.wiz-head h1 { font-family: var(--font-display); font-weight: 700; font-size: 2.3rem; letter-spacing: -.03em; line-height: 1.04; margin-top: .4rem }
.wiz-head h1:focus { outline: none }
.steps {
    flex: 0 1 auto; min-height: 0; overflow: auto; padding: 2px .3rem 0 0;
    mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
    -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
}
.steps.at-end { mask-image: none; -webkit-mask-image: none }
.step { display: none; grid-template-columns: 1fr 1fr; column-gap: 2.2rem; row-gap: 1.2rem; align-content: start; padding-bottom: .4rem }
.step.active { display: grid }
.full { grid-column: 1/-1 }
@media (max-width:760px) { .step, .step.active { grid-template-columns: 1fr } .full { grid-column: auto } }

/* ── Fields ── */
.fg { display: flex; flex-direction: column; gap: .35rem }
.fg > label, .cap, .mini > span, .dp-group > span {
    font-family: var(--font-mono); font-size: .63rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark);
}
.req { color: var(--mint) }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, .dp-trigger {
    width: 100%; font-family: var(--font-body); font-size: 1.04rem; color: #fff; background: var(--field);
    border: 1px solid var(--rule); border-radius: 10px; padding: .7rem .9rem; min-height: 48px;
    transition: border-color .18s var(--ease), background .18s var(--ease);
}
input:focus, select:focus, .dp-trigger:focus-visible, .dp-trigger[aria-expanded="true"] {
    outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px color-mix(in oklab, var(--mint) 24%, transparent);
}
input:disabled { opacity: .6 }
input::placeholder, textarea::placeholder { color: #9c9c95 }
textarea {
    width: 100%; font-family: var(--font-body); font-size: 1.02rem; color: #fff; background: var(--field);
    border: 1px solid var(--rule); border-radius: 10px; padding: .8rem .9rem; min-height: 92px; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px color-mix(in oklab, var(--mint) 24%, transparent) }
input[type="number"] { -moz-appearance: textfield; appearance: textfield }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0 }
.hint { font-family: var(--font-mono); font-size: .74rem; line-height: 1.7; color: var(--dim) }
.hint.warn { color: var(--danger-l) }
.hint a, .next-steps a, .disclaimer a, .notice a { color: var(--mint) }

/* ── Address panels ── */
.ledger { grid-column: 1/-1; display: grid; gap: .9rem }
.ledger-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem }
.vrule { display: none }
.leg { background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 1.25rem 1.3rem 1.2rem; display: flex; flex-direction: column; gap: .85rem }
.leg-k { display: flex; align-items: baseline; gap: .7rem; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mint) }
.leg-k .n { color: #fff }
.leg h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.15; margin-top: -.4rem; color: #fff }
.mini { display: flex; flex-direction: column; gap: .35rem }
.leg .street input { font-size: 1.1rem }
.addr-sub { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: .7rem }
.addr-sub input { font-size: .98rem; min-height: 44px }
.band {
    background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; color: #fff;
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: .8rem 1.3rem; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
}
.band .ar { color: var(--mint); padding: 0 .5rem }
.band .m { color: var(--dim); letter-spacing: .1em }
@media (max-width:760px) {
    .ledger-grid { grid-template-columns: 1fr; gap: 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 16px }
    .vrule { display: block; height: 1px; background: var(--rule) }
    .leg { background: transparent; border: 0; border-radius: 0; padding: 1.2rem 1.1rem }
    .band { padding: .85rem 1.1rem }
}

/* Address / route / NLP status lines (booking-app.js). */
.addr-status, .route-status {
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; line-height: 1.6;
    color: var(--dim); display: flex; gap: .5rem; align-items: baseline; margin-top: -.2rem;
}
.addr-status.hidden, .route-status.hidden { display: none }
.addr-status.success { color: var(--mint) }
.addr-status.success::before { content: '✓' }
.addr-status.error, .route-status.error { color: var(--danger-l) }
.route-status { margin-top: 0 }
input.addr-error { border-color: var(--danger-l) }

/* ── Cards ── */
.card { grid-column: 1/-1; background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: 1.05rem }
.card-h { display: flex; align-items: baseline; gap: .7rem; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mint) }
.card-h .n { color: #fff }
.row { display: flex; flex-wrap: wrap; gap: 1.6rem; align-items: flex-start }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem }
@media (max-width:600px) { .twocol { grid-template-columns: 1fr } }
.w-sm input { width: 160px }
.w-md { width: 220px }
.grow { flex: 1 1 320px; min-width: 0 }
.checks.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem }
@media (max-width:600px) { .checks.twocol { grid-template-columns: 1fr } }
@media (max-width:760px) { .row { gap: 1.1rem } .w-sm input { width: 140px } .w-md { width: 100% } }

/* ── Compact controls ── */
.aux { grid-column: 1/-1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2.2rem; row-gap: 1rem; border-top: 1px solid var(--rule-dark); padding-top: 1rem }
.aux-h { grid-column: 1/-1; font-family: var(--font-mono); font-size: .63rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mint); margin-bottom: -.3rem }
.side { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 1.4rem; row-gap: .7rem; align-items: start }
.side > .tag {
    grid-column: 1/-1; justify-self: start; display: inline-flex; align-items: center;
    font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
    color: var(--ink); background: var(--mint); border-radius: 999px; padding: .34rem .9rem;
}
.ctrl { display: flex; flex-direction: column; gap: .4rem; position: relative }
@media (max-width:760px) { .aux { grid-template-columns: 1fr } }
@media (max-width:420px) { .side { grid-template-columns: auto } }
.stepper {
    display: inline-flex; align-items: center; gap: 2px; width: 132px; height: 46px; padding: 3px;
    border: 1px solid var(--rule); background: var(--field); border-radius: 999px;
}
.stepper button {
    width: 38px; height: 38px; border-radius: 50%; background: transparent; border: none; cursor: pointer;
    font-family: var(--font-mono); font-size: 1.05rem; line-height: 1; color: #fff; flex: 0 0 auto;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.stepper button:hover { background: rgba(255, 255, 255, .12) }
.stepper button:active { background: var(--mint); color: var(--ink) }
.stepper .val { flex: 1; text-align: center; font-family: var(--font-mono); font-size: .98rem; color: #fff }
.seg {
    display: inline-flex; align-items: center; gap: 2px; width: 168px; height: 46px; padding: 3px;
    border: 1px solid var(--rule); background: var(--field); border-radius: 999px;
}
.seg button {
    flex: 1; height: 38px; padding: 0; border-radius: 999px; background: transparent; border: none; cursor: pointer;
    color: #fff; font-family: var(--font-body); font-size: .93rem; transition: background .15s var(--ease), color .15s var(--ease);
}
.seg button:hover { background: rgba(255, 255, 255, .1) }
.seg button[aria-pressed="true"] { background: var(--mint); color: var(--ink); font-weight: 600 }
.seg button[aria-pressed="true"]:hover { background: var(--mint) }
#from-elevator-size-wrap, #to-elevator-size-wrap { margin-top: .2rem }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .45rem }
.choices.tight { display: flex; flex-wrap: wrap; width: auto; gap: .35rem }
.choices.four { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.choice {
    background: var(--field); color: #fff; border: 1px solid var(--rule); border-radius: 10px;
    padding: .6rem .8rem; min-height: 46px; cursor: pointer; text-align: center; font-size: .97rem;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.choices.tight .choice {
    flex: 0 0 auto; min-height: 34px; padding: .3rem .85rem;
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px;
}
.choices.tight .choice small { display: none }
.choice small { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--dim); margin-top: .1rem }
.choice:hover { border-color: rgba(255, 255, 255, .4) }
.choice[aria-pressed="true"] { background: var(--mint); color: var(--ink); border-color: var(--mint); font-weight: 600 }
.choice[aria-pressed="true"] small { color: var(--ink) }
.choice[disabled] { background: var(--paper-dim); color: var(--dim); border-color: var(--rule); cursor: not-allowed; text-decoration: line-through }
.choice[disabled] small { text-decoration: none }
.checks { display: flex; flex-direction: column; gap: .4rem }
.check {
    display: grid; grid-template-columns: 18px 1fr; gap: .8rem; align-items: start;
    border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); color: #fff;
    padding: .8rem 1rem; cursor: pointer; font-size: .98rem; position: relative;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.check:hover { border-color: rgba(255, 255, 255, .4) }
.check input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none }
.check .box { width: 18px; height: 18px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 4px; position: relative; margin-top: .22rem }
.check:has(input:focus-visible) { outline: 2px solid var(--mint); outline-offset: 2px }
.check:has(input:checked) { border-color: var(--mint) }
.check:has(input:checked) .box { background: var(--mint); border-color: var(--mint-deep) }
.check:has(input:checked) .box::after {
    content: ''; position: absolute; left: 5px; top: 3px; width: 5px; height: 9px;
    border: 2px solid var(--ink); border-top: none; border-left: none; transform: rotate(45deg);
}
.check .sub { display: block; font-family: var(--font-mono); font-size: .74rem; color: var(--dim); margin-top: .25rem; line-height: 1.6 }
.notice {
    grid-column: 1/-1; border: 1px solid var(--rule); border-left: 2px solid var(--mint); background: var(--panel); color: #fff;
    border-radius: 12px; padding: .9rem 1.1rem; font-family: var(--font-mono); font-size: .78rem; line-height: 1.7;
}
.notice.warn { border-left-color: var(--danger-l) }
.notice strong { font-weight: 500 }
.reveal-wrap { grid-column: 1/-1; display: flex; flex-direction: column; gap: .35rem }

/* NLP detections (booking-app.js _renderDetectedItems). */
.detected-items-section { display: flex; flex-direction: column; gap: .6rem }
.detected-items-title { font-family: var(--font-mono); font-size: .63rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mint) }
.detected-items-list { display: flex; flex-wrap: wrap; gap: .35rem }
.detected-item-pill {
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em;
    padding: .3rem .75rem; border-radius: 999px; background: var(--field); border: 1px solid var(--rule); color: #fff;
}
.detected-item-pill.detected-item-blocking { border-color: var(--danger-l); color: var(--danger-l) }

/* ── Photos ── */
.photos { color: #fff; gap: .8rem }
.photo-cats { display: flex; gap: .4rem; flex-wrap: wrap }
.photo-cats button {
    font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
    padding: .5rem 1rem; min-height: 42px; border-radius: 999px; background: var(--field); color: #fff; border: 1px solid var(--rule); cursor: pointer;
}
.photo-cats button[aria-pressed="true"] { background: var(--mint); color: var(--ink); border-color: var(--mint) }
.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    min-height: 90px; padding: 1rem; cursor: pointer; color: #fff; background: var(--field);
    border: 1px dashed rgba(255, 255, 255, .35); border-radius: 12px; text-align: center;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--mint) }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--mint); outline-offset: 2px }
.dropzone .dl { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem }
.dropzone .dh { font-family: var(--font-mono); font-size: .72rem; color: var(--dim) }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0 }
.photo-thumb-grid { display: flex; flex-wrap: wrap; gap: .5rem }
.photo-thumb-grid:empty { display: none }
.photo-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--rule) }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block }
.photo-thumb-status {
    position: absolute; right: 3px; bottom: 3px; min-width: 18px; padding: 0 4px; border-radius: 4px;
    font-family: var(--font-mono); font-size: .65rem; text-align: center; color: var(--dim); background: rgba(0, 0, 0, .7);
}
.photo-thumb-status.done { color: var(--mint) }
.photo-thumb-status.error { color: var(--danger-l) }
.photo-status-msg { display: none; font-family: var(--font-mono); font-size: .72rem; color: var(--dim) }
.photo-error-msg { display: none; font-family: var(--font-mono); font-size: .72rem; color: var(--danger-l) }

/* ── Date picker (booking-app.js) ── */
.dp-group { position: relative; display: flex; flex-direction: column; gap: .35rem }
.dp-trigger { text-align: left; cursor: pointer }
.dp-trigger.dp-error { border-color: var(--danger-l) }
.dp-popover {
    position: absolute; top: calc(100% + .5rem); left: 0; z-index: 30; width: 320px; max-width: calc(100vw - 2 * var(--page-x));
    padding: 1rem; background: #121211; border: 1px solid var(--rule-dark); border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.dp-popover.hidden { display: none }
.dp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem }
.dp-month-label { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #fff }
.dp-nav {
    background: var(--field); border: 1px solid var(--rule); color: var(--mint); width: 2.2rem; height: 2.2rem; border-radius: 50%;
    font-size: 1.1rem; line-height: 1; cursor: pointer; transition: border-color .15s var(--ease);
}
.dp-nav:hover:not(:disabled) { border-color: var(--mint) }
.dp-nav:disabled { opacity: .25; cursor: not-allowed }
.dp-weekdays, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px }
.dp-weekdays { margin-bottom: .4rem }
.dp-weekdays span { text-align: center; font-family: var(--font-mono); font-size: .6rem; color: var(--dim); text-transform: uppercase }
.dp-day {
    appearance: none; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0;
    font-family: var(--font-mono); font-size: .8rem; color: #fff; background: var(--field);
    border: 1px solid transparent; border-radius: 8px; cursor: pointer; transition: border-color .15s var(--ease);
}
.dp-day:hover:not(.dp-day-disabled):not(.dp-day-blocked) { border-color: var(--mint) }
.dp-day-outside { color: rgba(255, 255, 255, .3); background: transparent }
.dp-day-disabled { color: rgba(255, 255, 255, .3); background: transparent; cursor: not-allowed; opacity: .5 }
.dp-day-pending { opacity: .5 }
.dp-day-busy { background: color-mix(in oklab, var(--danger) 22%, transparent); color: var(--danger-l); border-color: color-mix(in oklab, var(--danger-l) 35%, transparent) }
.dp-day-blocked {
    background: repeating-linear-gradient(135deg, var(--field), var(--field) 5px, rgba(255, 255, 255, .18) 5px, rgba(255, 255, 255, .18) 6px);
    color: rgba(255, 255, 255, .4); cursor: not-allowed;
}
.dp-day-today { font-weight: 600; border-color: var(--rule-dark) }
.dp-day-selected { background: var(--mint); color: var(--ink); border-color: var(--mint); font-weight: 600 }
.dp-legend { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; font-family: var(--font-mono); font-size: .66rem; color: var(--dim) }
.dp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0 }
.dp-dot-busy { background: var(--danger-l) }
.dp-dot-blocked { background: rgba(255, 255, 255, .35) }
.dp-load-error { margin-top: .65rem; font-family: var(--font-mono); font-size: .68rem; line-height: 1.5; color: var(--danger-l) }
.dp-load-error.hidden { display: none }

/* ── Summary step ── */
.recap { grid-column: 1/-1; border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule) }
@media (max-width:760px) { .recap { grid-template-columns: 1fr } }
.recap .rc { background: var(--panel); color: #fff; padding: 1rem 1.1rem }
.recap .rk { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mint) }
.recap .rv { font-size: 1rem; margin-top: .25rem; overflow-wrap: anywhere }
.next-steps { grid-column: 1/-1; font-size: .98rem; color: var(--on-dark); max-width: 66ch }
.disclaimer { grid-column: 1/-1; border-top: 1px solid var(--rule); padding-top: .9rem; font-family: var(--font-mono); font-size: .72rem; line-height: 1.7; color: var(--dim) }

/* Done view */
.is-finished .rail-sum, .is-finished .price { display: none !important }
.step[data-step="done"] { grid-template-columns: 1fr }
.done-msg { display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; max-width: 66ch }
.done-msg .notice { font-size: .9rem }
.btn.done-home { margin-left: 0; display: inline-flex; align-items: center; justify-content: center; text-decoration: none }

/* ── Messages + spinner (booking-app.js) ── */
.form-message {
    font-family: var(--font-mono); font-size: .78rem; line-height: 1.6; border-radius: 12px;
    padding: .8rem 1rem; margin-top: .8rem; border: 1px solid var(--rule); background: var(--panel); color: #fff;
}
.form-message.hidden { display: none }
.form-message.success { border-left: 2px solid var(--mint); color: var(--mint) }
.form-message.warning { border-left: 2px solid var(--amber); color: var(--amber) }
.form-message.error { border-left: 2px solid var(--danger-l); color: var(--danger-l) }
.loading-spinner {
    display: none; width: 22px; height: 22px; flex: 0 0 auto;
    border: 2px solid var(--rule); border-top-color: var(--mint); border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ── Nav row ── */
.nav { flex: 0 0 auto; display: flex; align-items: center; gap: 1.2rem; border-top: 1px solid var(--rule-dark); margin-top: 1rem; padding-top: 1rem }
.btn { cursor: pointer; border-radius: 999px; transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease) }
.btn-ghost {
    background: none; border: none; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
    color: rgba(255, 255, 255, .85); padding: .6rem 0; min-height: 44px;
}
.btn-ghost:hover { color: var(--mint) }
.btn-next {
    margin-left: auto; background: var(--mint); border: 1px solid var(--mint); color: var(--ink);
    font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; min-width: 296px; min-height: 56px; padding: 0 1.6rem;
}
.btn-next:hover { background: #fff; border-color: #fff; color: var(--ink) }
.btn-next:active { background: var(--mint-deep); color: #fff }
.btn-next:disabled { opacity: .55; cursor: progress }
.err { font-family: var(--font-mono); font-size: .76rem; line-height: 1.5; color: var(--danger-l); max-width: 28rem }
.err:empty { display: none }

/* ── Invalid ── */
input.invalid, textarea.invalid, select.invalid, input.invalid:focus, .dp-trigger.invalid {
    border-color: var(--danger-l) !important; box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger-l) 25%, transparent) !important;
}
.choices.invalid .choice:not([aria-pressed="true"]):not([disabled]) { border-color: var(--danger-l) }
.check.invalid { border-color: var(--danger-l) }
.stepper.invalid, .seg.invalid { border-color: var(--danger-l) }
.fg:has(.invalid) > label, .fg:has(.invalid) > .cap, .mini:has(.invalid) > span, .ctrl:has(.invalid) > .cap, .dp-group:has(.invalid) > span { color: var(--danger-l) }
@keyframes nudge { 0%, 100% { transform: translateX(0) } 15% { transform: translateX(-6px) } 30% { transform: translateX(5px) } 45% { transform: translateX(-3px) } 60% { transform: translateX(2px) } }
.shake { animation: nudge .4s var(--ease) }
@media (prefers-reduced-motion:reduce) { .shake { animation: none } }

@media (max-width:760px) {
    .wiz-head h1 { font-size: 1.95rem }
    input[type="text"], input[type="email"], input[type="tel"], input[type="number"], .dp-trigger { font-size: 1.06rem; min-height: 50px }
    .leg .street input { font-size: 1.06rem }
    .addr-sub { grid-template-columns: 6.4rem minmax(0, 1fr); gap: .6rem }
    .choice { min-height: 50px; font-size: 1.02rem }
    .choices.four .choice { padding: .7rem .2rem; font-family: var(--font-mono); font-size: .84rem }
    .check { font-size: 1.02rem; grid-template-columns: 22px 1fr }
    .check .box { width: 22px; height: 22px }
    .check:has(input:checked) .box::after { left: 6px; top: 4px; width: 6px; height: 10px }
    .stepper { width: 144px; height: 52px }
    .stepper button { width: 44px; height: 44px }
    .seg { width: 184px; height: 52px }
    .seg button { height: 44px; font-size: 1rem }
    .nav { flex-wrap: wrap; gap: .7rem }
    .btn-next { min-width: 0; width: 100%; margin-left: 0; order: 3 }
    .btn-ghost { order: 4 }
    .loading-spinner { order: 2 }
    .err { order: 1; flex-basis: 100%; max-width: none }
    .pane { padding-top: 1.4rem }
}

/* ── Phones: the form is the screen ──
   On a phone every pixel of chrome comes out of the step area, which is
   the only thing that scrolls. Measured at 390×844 before this block: bar
   61 + progress 57 + title 56 + nav 128 left the form 466 px (55 %). Here
   the bar, progress strip and title shrink, and the nav is one compact row
   pinned to the bottom edge (back is a small pill, the primary button takes
   the rest of the row), so the form gets roughly three quarters of the
   screen. */
@media (max-width:760px) {
    .book-bar { padding: .45rem var(--page-x); padding-top: max(.45rem, env(safe-area-inset-top)) }
    .book-bar .logo { font-size: 1.08rem }
    .book-bar .back { min-height: 32px; font-size: .6rem; letter-spacing: .14em }
    .rail { padding: .3rem var(--page-x) .35rem; gap: .6rem }
    .rail-progress { gap: .25rem }
    .pitem { min-height: 28px; padding: .2rem .1rem 0; font-size: .62rem }
    .price.ready .v { font-size: 1.05rem }
    .price .k { font-size: .56rem }
    /* Bottom gap under the button row: edge swipes and grip-touches near the
       screen's bottom edge must not land on it. On phones with a home
       indicator the safe-area inset is added on top, not used instead. */
    .pane { padding: .75rem var(--page-x) calc(.9rem + env(safe-area-inset-bottom, 0px)) }
    .wiz-head { margin-bottom: .55rem }
    .wiz-head .count { font-size: .58rem; letter-spacing: .2em }
    .wiz-head h1 { font-size: 1.45rem; margin-top: .1rem; letter-spacing: -.02em }
    .steps { padding-right: 0; mask-image: linear-gradient(#000 calc(100% - 14px), transparent); -webkit-mask-image: linear-gradient(#000 calc(100% - 14px), transparent) }
    .step { row-gap: .8rem }
    .card { padding: .95rem 1rem 1rem; gap: .85rem; border-radius: 14px }
    .leg { padding: 1rem 1rem .95rem; gap: .7rem }
    .aux { padding-top: .8rem; row-gap: .8rem }
    .nav { flex-wrap: wrap; gap: .5rem; margin-top: .35rem; padding-top: .5rem }
    .err { order: 0; flex-basis: 100%; font-size: .7rem }
    .form-message { margin-top: .4rem; padding: .6rem .8rem; font-size: .72rem }
    .btn-ghost {
        order: 1; flex: 0 0 auto; min-height: 42px; padding: 0 .9rem;
        border: 1px solid var(--rule-dark); border-radius: 999px; font-size: .62rem; letter-spacing: .12em;
    }
    .btn-next { order: 2; flex: 1 1 0; width: auto; min-width: 0; min-height: 42px; margin-left: 0; font-size: .96rem; padding: 0 1rem }
    .loading-spinner { order: 3 }
}
@media (max-width:760px) and (max-height:700px) {
    .wiz-head .count { display: none }
    .wiz-head h1 { font-size: 1.3rem }
}

/* ── Agreement modal (booking-app.js) ── */
.agreement-modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, .82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
}
.agreement-modal.open { display: flex }
.agreement-modal-inner {
    background: var(--paper); border: 1px solid var(--rule-dark); border-radius: 16px;
    max-width: 880px; width: 95vw; max-height: 92vh; display: flex; flex-direction: column;
    overflow-y: auto; min-width: 0;
}
.agreement-modal-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.3rem; border-bottom: 1px solid var(--rule); flex-shrink: 0;
}
.agreement-modal-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.015em }
.agreement-modal-close {
    background: var(--field); border: 1px solid var(--rule); color: #fff; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    cursor: pointer; font-size: .95rem; line-height: 1;
}
.agreement-modal-close:hover { border-color: var(--mint); color: var(--mint) }
.agreement-iframe { width: 100%; flex: 1 1 auto; min-height: 50vh; border: 0; background: #f4f4f1 }
.agreement-modal-footer { padding: 1.1rem 1.3rem 1.3rem; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: .9rem; flex-shrink: 0 }
.agreement-download-link { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--mint) }
.agreement-accept-row {
    display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; font-size: .98rem;
    border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); padding: .8rem 1rem;
}
.agreement-accept-row:has(input:checked) { border-color: var(--mint) }
.agreement-accept-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--mint); flex-shrink: 0 }
.booking-choice-group { display: flex; flex-direction: column; gap: .55rem }
.booking-choice-btn {
    display: flex; flex-direction: column; gap: .2rem; text-align: left; cursor: pointer;
    padding: .9rem 1.1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--rule); color: #fff;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.booking-choice-btn:hover { border-color: var(--mint) }
.booking-choice-btn:disabled { opacity: .4; cursor: not-allowed }
.booking-choice-btn:disabled:hover { border-color: var(--rule) }
.booking-choice-btn--primary { background: var(--mint); border-color: var(--mint); color: var(--ink) }
.booking-choice-btn--primary:hover { background: #fff; border-color: #fff }
.booking-choice-btn--primary:disabled:hover { background: var(--mint); border-color: var(--mint) }
.booking-choice-title { font-family: var(--font-body); font-weight: 600; font-size: 1.02rem }
.booking-choice-desc { font-family: var(--font-mono); font-size: .72rem; line-height: 1.6; color: var(--dim) }
.booking-choice-btn--primary .booking-choice-desc { color: rgba(10, 10, 10, .72) }
.agreement-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem }
.agreement-confirm-btn {
    background: var(--mint); color: var(--ink); border: 1px solid var(--mint); border-radius: 999px;
    font-family: var(--font-body); font-weight: 600; font-size: 1rem; min-height: 50px; padding: 0 1.5rem; cursor: pointer;
}
.agreement-confirm-btn:hover { background: #fff; border-color: #fff }
.agreement-confirm-btn:disabled { opacity: .35; cursor: not-allowed }
.agreement-cancel-btn {
    background: none; border: 1px solid var(--rule-dark); border-radius: 999px; color: rgba(255, 255, 255, .85);
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
    min-height: 44px; padding: 0 1.2rem; cursor: pointer; align-self: flex-start;
}
.agreement-cancel-btn:hover { border-color: var(--mint); color: var(--mint) }
.quote-saved-state { display: flex; flex-direction: column; gap: .5rem }
.quote-saved-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--mint) }
.card-step-label { font-size: .92rem; line-height: 1.65; color: var(--dim) }
.card-step-label strong { color: #fff; font-weight: 600 }
/* Stripe renders its card field in an iframe with its own (dark) text; a
   light well keeps it legible on this dark modal without restyling Stripe. */
.stripe-card-element { padding: .95rem 1rem; background: #fff; border: 1px solid var(--rule); border-radius: 10px }
.stripe-card-element--focus { border-color: var(--mint); box-shadow: 0 0 0 3px color-mix(in oklab, var(--mint) 24%, transparent) }
@media (max-width:600px) {
    .agreement-modal-inner { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: none; border-radius: 0 }
    .agreement-modal-header { padding: max(.75rem, env(safe-area-inset-top)) 1rem .75rem }
    .agreement-modal-footer { padding: .9rem 1rem max(1rem, env(safe-area-inset-bottom)) }
}
