/* Customer App showcase — additive layer for the end-customer mobile screen.
   Kept OUT of app.css (which is locked). Uses the app's design tokens so it
   stays on-brand and follows any future theming (the app is light-only; no
   OS prefers-color-scheme override here, to match the rest of the page). */

/* ===========================================================================
   Reference design language.

   The customer screens follow laundry/admin/branch_access_codes.php. That page
   does NOT load app.css - _layout.php:239 is skipped because the page passes
   'include_app_css' => false - it loads laundry/public/assets/auth/preview.css,
   the same stylesheet as the sign-in screen. So the look being matched here is
   preview.css's, and its literal values are reproduced below.

   preview.css and admin-shell.css cannot simply be linked from this page:
   preview.css carries unscoped global rules (* , html, body, table) and a :root
   block redeclaring --ink/--line/--shadow, which would silently repaint every
   app.css rule; admin-shell.css scopes everything to .admin-shell-image-a.

   app.css is entirely token-driven (app.css:1447-1509), so re-pointing its base
   tokens on .customer-page repaints every card, border, button and shadow on
   the customer surface at once, without editing the locked file and without
   touching the admin pages. Values from preview.css:17-32.
   =========================================================================== */

.customer-page {
    --color-brand-primary: #55eca4;      /* preview.css:24 --mint */
    --color-brand-primary-hover: #3fd991;
    --color-brand-primary-soft: #e4fbef;
    --color-mint: #55eca4;
    --color-mint-soft: #e4fbef;
    --color-ink: #111820;                /* preview.css:19 --ink */
    --color-text-secondary: #68717d;     /* preview.css:20 --muted */
    --color-text-muted: #697079;
    /* app.css:1516 declares --muted and --ink-soft as var(--color-text-secondary)
       on :root, and a custom property is substituted where it is DECLARED - so
       the line above cannot reach them and the two aliases keep whatever :root
       holds. Before 2026-09-03 both sides happened to be a similar grey and the
       split was invisible; the moment the admin's secondary grey was darkened to
       #484c47 the customer screen would have carried two tones for one role -
       .program-desc at #68717d beside every <p class="muted"> at #484c47. These
       two lines re-point the aliases inside this scope, so the customer palette
       stays exactly as approved and moves as one. */
    --muted: var(--color-text-secondary);
    --ink-soft: var(--color-text-secondary);
    --color-border: #dfe4e8;             /* preview.css:21 --line */
    --color-background: #f7f9fa;
    --color-success: #137b51;            /* preview.css:25 --mint-dark */
    --color-success-soft: #e4fbef;
    --radius-medium: 14px;               /* preview.css:596 .preview-panel */
    --shadow-card: 0 12px 34px rgba(22, 35, 48, 0.08);   /* preview.css:30 */
    --shadow-hover: 0 12px 34px rgba(22, 35, 48, 0.08);  /* one shadow only */
    --success: #137b51;

    /* Flat canvas. app.css:4765 lays a teal-to-blue gradient over --bg; the
       reference page is a single #f7f9fa field (preview.css:382-387). */
    background: #f7f9fa;
}

/* preview.css:213 - the small uppercase label above a heading. app.css:4989
   paints it with --brand, which would now be mint on white and too pale.
   Scoped to the customer surface so the admin definition is untouched. */
.customer-page .eyebrow {
    color: #137b51;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

/* The customer's own points, in the reference's .preview-panel shape
   (preview.css:594-599) with the .summary-card number treatment
   (preview.css:1040-1049). Revealed by JS once the balance arrives. */
.customer-points {
    display: grid;
    gap: 4px;
    padding: 18px 20px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(22, 35, 48, 0.08);
}

.customer-points[hidden] {
    display: none;
}

.customer-points-value {
    margin: 0;
    color: #111820;
    line-height: 1.1;
}

.customer-points-value strong {
    font-size: 2.125rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #137b51;
}

.customer-points-value span {
    margin-left: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #68717d;
}

.customer-points-note {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #68717d;
}

.customer-points-note:empty {
    display: none;
}

/* ---------------------------------------------------------------------------
   The journey bar.

   The steps in screen order, on every screen, replacing both the old
   three-item .journey-steps list inside the dark panel and the per-card
   <span>1</span> numbers that disagreed with it.

   Laid out as equal columns rather than a flex row so every step keeps the same
   width whatever the label length - Thai "ใช้แต้มส่วนลด" and English
   "Redeem points" are very different, and a row that reflows between languages
   looks broken rather than translated.

   The column count is NOT written down. It used to say repeat(4, 1fr), from
   when there was a "เลือกเครื่อง" step; that step went away on 2026-07-23
   because the QR now names the machine, and the fourth column stayed behind -
   empty, on the right, pushing the three real steps off centre on every screen
   a customer sees. Letting the columns come from the number of <li> means the
   bar cannot drift again the next time a step is added or removed.
   --------------------------------------------------------------------------- */

.customer-steps {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.customer-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 0 2px;
    text-align: center;
}

/* The connector runs BEHIND the numbers, from the middle of one to the middle
   of the next, so it never pokes out past the first or last step. */
.customer-step::before {
    content: "";
    position: absolute;
    top: 13px;
    right: 50%;
    left: -50%;
    height: 2px;
    background: #dfe4e8;
}

.customer-step:first-child::before {
    display: none;
}

.customer-step.is-done::before,
.customer-step.is-current::before {
    background: #55eca4;
}

.customer-step-no {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #dfe4e8;
    background: #ffffff;
    /* 3.07 on white as #8b94a0. A step the customer has not reached yet is
       still text they read to know what is coming. */
    color: #6a707a;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.customer-step-label {
    /* 12px floor for the whole customer page (29/09/2026 review); was 10px. */
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: #6a707a;   /* 2.91 on the wash as #8b94a0 */
}

.customer-step.is-done .customer-step-no {
    border-color: #55eca4;
    background: #55eca4;
    color: #0a121b;
}

.customer-step.is-current .customer-step-no {
    border-color: #137b51;
    background: #137b51;
    color: #ffffff;
}

.customer-step.is-done .customer-step-label {
    color: #68717d;
}

.customer-step.is-current .customer-step-label {
    color: #111820;
    font-weight: 800;
}

/* ---------------------------------------------------------------------------
   Spending points as a discount.

   Same .preview-panel shape as .customer-points above (white card, hairline,
   14px radius, one shadow) so the two points surfaces read as one feature.
   Revealed by JS only once the server has quoted a spendable amount.
   --------------------------------------------------------------------------- */

.customer-redeem {
    display: grid;
    gap: 0;
    margin: 18px 0;
    padding: 20px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(22, 35, 48, 0.08);
}

.customer-redeem[hidden] {
    display: none;
}

/* app.css:4821 gives this `display: grid`, which beats the `hidden` attribute -
   the UA rule for [hidden] is only `display: none` at zero specificity. Without
   this the picker stayed on screen behind the points card after the order was
   already created. */
.customer-page .customer-journey-shell[hidden] {
    display: none;
}

.customer-redeem-title {
    margin: 0 0 2px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111820;
}

.customer-redeem-order {
    margin: 0;
    font-size: 0.75rem;
    color: #68717d;
}

/* The balance, in the .summary-card number treatment the points card already
   uses (preview.css:1040-1049), on the soft-mint panel that marks it as the
   customer's own money rather than the shop's price. */
.customer-redeem-balance {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid #b7f0d3;
    border-radius: 10px;
    background: #e4fbef;
}

.customer-redeem-balance-value strong {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #137b51;
    font-variant-numeric: tabular-nums;
}

.customer-redeem-balance-value span {
    margin-left: 5px;
    font-size: 0.813rem;
    font-weight: 700;
    color: #68717d;
}

.customer-redeem-rate {
    font-size: 0.75rem;
    font-weight: 700;
    color: #137b51;
}

.customer-redeem-slider {
    margin: 16px 0 0;
}

/* app.css:1596 sets `input, select, textarea { min-height: 42px; padding: 9px 11px }`.
   min-height CLAMPS height whatever the specificity, so setting height alone
   left the track 42px tall with 11px of dead padding either side - the thumb
   could not reach the ends of its own rail. Both have to be reset here, not
   just overridden. */
.customer-redeem-slider input[type="range"] {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    /* The whole control is the target on a phone, so it is given a real height
       rather than the 4px the platform default paints. */
    height: 26px;
    min-height: 26px;
    accent-color: #55eca4;
    background: transparent;
}

.customer-redeem-ends {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #68717d;
    font-variant-numeric: tabular-nums;
}

.customer-redeem-use {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: #137b51;
    font-variant-numeric: tabular-nums;
}

.customer-redeem-total {
    display: grid;
    gap: 6px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #dfe4e8;
    font-variant-numeric: tabular-nums;
}

.customer-redeem-total div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.customer-redeem-total dt,
.customer-redeem-total dd {
    margin: 0;
    font-size: 0.813rem;
    color: #68717d;
}

.customer-redeem-total .is-off {
    color: #137b51;
    font-weight: 700;
}

.customer-redeem-total .is-due {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #dfe4e8;
}

.customer-redeem-total .is-due dt,
.customer-redeem-total .is-due dd {
    font-size: 0.938rem;
    font-weight: 800;
    color: #111820;
}

.customer-redeem-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

/* .pay-button is already restyled for this surface further down the file, so
   the primary action here inherits it and needs no colour of its own. Only the
   disabled state is new: nothing else on the customer page has one.

   Deliberately over-specified at (0,4,1). `.customer-page .pay-button` further
   down this file is only (0,2,0), so on paper a shorter selector would win -
   but this is the same family of trap as app.css:5716, where a rule that looks
   weaker keeps repainting the button, and the house fix in admin-shell.css is
   to out-specify it rather than argue with it. The element type and :disabled
   are here to buy specificity as much as to select. */
.customer-page .customer-redeem-actions button.pay-button:disabled {
    border-color: #dfe4e8;
    background: #f0f3f4;
    color: #8b94a0;
    box-shadow: none;
    cursor: not-allowed;
}

.customer-redeem-done {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 13px 14px;
    border: 1px solid #b7f0d3;
    border-radius: 10px;
    background: #e4fbef;
}

.customer-redeem-done[hidden] {
    display: none;
}

.customer-redeem-tick {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #137b51;
    color: #ffffff;
    font-size: 0.813rem;
    font-weight: 800;
    line-height: 1;
}

.customer-redeem-done-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.customer-redeem-done-text strong {
    font-size: 0.813rem;
    font-weight: 700;
    color: #111820;
}

.customer-redeem-done-text span {
    font-size: 0.75rem;
    color: #68717d;
}

/* Points can be spent on an order once, so once they have been the controls do
   not come back - the card becomes a statement of what happened. */
.customer-redeem.is-done .customer-redeem-balance,
.customer-redeem.is-done .customer-redeem-slider,
.customer-redeem.is-done .customer-redeem-use,
.customer-redeem.is-done .customer-redeem-actions {
    display: none;
}

/* ---------------------------------------------------------------------------
   Program rows.

   The row used to be one bold name over "4 pulses". It now carries a tone icon,
   the temperature in words, and who the program is for. The tone colours are
   SEMANTIC and deliberately outside the mint brand palette: mint means "this is
   the OOO product", and a temperature is information, not branding. Cool to hot
   reads blue -> amber -> red, which is the one colour metaphor a customer needs
   no legend for. The word is always present next to the icon, so the meaning
   never rests on colour alone.
   --------------------------------------------------------------------------- */

.customer-page .program-content {
    align-items: flex-start;
    gap: 13px;
}

.customer-page .program-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    border: 1px solid currentColor;
    /* The border and the glyph share currentColor; only the wash is set per
       tone below, so a new tone needs two values instead of three. */
    background: #eef2f5;
    color: #5a6b7a;
}

.customer-page .program-icon-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.customer-page .program-icon.is-cold     { color: #1c6fb8; background: #e9f3fc; }
.customer-page .program-icon.is-warm     { color: #a86a10; background: #fdf4e4; }
.customer-page .program-icon.is-hot      { color: #bb4630; background: #fdece8; }
.customer-page .program-icon.is-quick    { color: #137b51; background: #e4fbef; }
.customer-page .program-icon.is-dry-low  { color: #5a6b7a; background: #eef2f5; }
.customer-page .program-icon.is-dry-mid  { color: #a86a10; background: #fdf4e4; }
.customer-page .program-icon.is-dry-high { color: #bb4630; background: #fdece8; }
.customer-page .program-icon.is-topup    { color: #5a6b7a; background: #eef2f5; }

.customer-page .program-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* Name on the left, price hard right, on one line. baseline alignment rather
   than centre so the two different type sizes sit on the same footing instead
   of the price floating. */
.customer-page .program-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

/* app.css:5085 sets this to 18px, which wrapped the longer Thai labels onto a
   second line inside a 78px row. */
.customer-page .program-content .program-text strong {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: #111820;
    /* The names are two or three syllables by design, so holding them on one
       line costs nothing and keeps every row the same height. */
    white-space: nowrap;
}

/* app.css:5089 paints every <small> in the row bold. The description is the one
   line meant to be read rather than glanced at, so it is set back to normal
   weight and given room to breathe. */
.customer-page .program-content .program-desc {
    margin-top: 3px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    color: #68717d;
}

.customer-page .program-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.customer-page .program-chip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #dfe4e8;
    border-radius: 999px;
    background: #f6f8f9;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.6;
    color: #68717d;
    /* A chip that breaks across two lines stops looking like a chip. They are
       short enough to hold, and the row wraps between chips instead. */
    white-space: nowrap;
}

/* A price promotion is the one chip worth the brand colour - it is the only one
   that changes what the customer pays. */
.customer-page .program-chip.is-promo {
    border-color: #b7f0d3;
    background: #e4fbef;
    color: #137b51;
}

/* The price is what the customer is deciding on, so it is the largest thing in
   the row. app.css:5095 gave it min-width 86px and right alignment for the old
   third column; both are dropped now that it sits inline, and nowrap is what
   stops "40 บาท" splitting across two lines the way it did at 355px. */
.customer-page .program-content .program-price {
    flex: 0 0 auto;
    min-width: 0;
    font-size: 1.438rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #111820;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* SALE-GUARD-R2-DS-B item 2 (Sonnet SG-3): the sale-name sentence is not a
   price and must not be laid out like one.

   SALE-NAME-GUARD-20261022-1 item 2 put it in the same <b class="program-price">
   as the price, and this rule gave that class nowrap at 1.438rem/900. Measured
   at 375px with one guarded slot: the English sentence was 838px wide, the row
   979px and the layout 1029px - the programme cards sat off-screen to the
   right. The Thai sentence overflowed the 325px row too. Its own class wraps
   at reading size and takes the space left beside the name, so the page keeps
   its 375px width whether one slot waits for the panel or none does. */
.customer-page .program-content .program-price.program-unavailable {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    white-space: normal;
    text-align: right;
    /* SALE-GUARD-R3-DS item 4 (Opus SG2-7): the sentence is the one thing a
       blocked customer must be able to read. It used #8b94a0 inside a row at
       opacity 0.6, which is about 1.9:1 on the card's #fff. On #fff this is
       7.5:1, and the row is no longer dimmed as a whole. */
    color: #4b5563;
    font-variant-numeric: normal;
}

/* The slot cannot be sold, but its name stays readable: the customer is told
   WHICH programme is waiting for the panel. Only the icon and the name are
   dimmed (SALE-GUARD-R3-DS item 4, Opus SG2-7) - a row-wide opacity would take
   the refusal sentence down with them, and that sentence is the whole point. */
.customer-page .program-option.is-unavailable .program-icon,
.customer-page .program-option.is-unavailable .program-content .program-text strong {
    opacity: 0.6;
}

/* The struck-through original, when a promotion is running. Sits before the
   live price on the same line rather than above it. */
.customer-page .program-content .program-price .old-price {
    display: inline;
    margin-right: 5px;
    font-size: 0.813rem;
    font-weight: 700;
    color: #8b94a0;
    text-decoration: line-through;
}

@media (max-width: 640px) {
    .customer-page .program-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .customer-page .program-icon-svg {
        width: 20px;
        height: 20px;
    }

    .customer-page .program-content .program-text strong {
        font-size: 0.938rem;
    }

    .customer-page .program-content .program-price {
        font-size: 1.313rem;
    }
}

/* ---------------------------------------------------------------------------
   The panel sale card - Kim, 13 Sep 2026.

   On a machine behind an X1 panel the customer picks the programme AT THE
   MACHINE, and this card is the one thing on the page they can buy
   (public/index.php customer_panel_sale_card). It reuses .program-content from
   the programme list above, so both kinds of machine read as one product, and it
   is drawn in the list's selected state because it IS the selection.
   --------------------------------------------------------------------------- */

.customer-page .panel-sale {
    display: grid;
    gap: 10px;
}

/* .program-content and the price parts set display themselves, and .pay-total
   is a flex row, so the UA's zero-specificity [hidden] loses to every one of
   them - the trap the redeem card documents above. The script hides and shows
   these as the panel moves. */
.customer-page .panel-sale [hidden],
.customer-page .pay-total[hidden] {
    display: none !important;
}

.customer-page .panel-sale-card.program-content {
    border-color: var(--brand);
    background: #ecfffb;
    box-shadow: 0 0 0 3px rgba(0, 212, 198, 0.16);
}

.customer-page .panel-sale-card .panel-sale-slot {
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    color: #137b51;
}

.customer-page .panel-sale-message {
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #dfe4e8;
    border-radius: 10px;
    background: #f6f8f9;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
    color: #3c4650;
}

/* Green only when the card is selling: every other state is an instruction. */
.customer-page .panel-sale[data-state="ready"] .panel-sale-message {
    border-color: #b7f0d3;
    background: #e4fbef;
    color: #137b51;
}

.customer-page .panel-sale-notice {
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #f3c9a8;
    border-radius: 10px;
    background: #fff4ec;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
    color: #8a3d0c;
}

/* A02-1.8: the inline create_order refusal on a machine with no panel. Same
   surface as .panel-sale-notice, because it is the same kind of message; the
   head carries the server's reason, the next line the next step. */
.customer-page .order-refusal-notice {
    margin: 12px 0 0;
    padding: 11px 13px;
    border: 1px solid #f3c9a8;
    border-radius: 10px;
    background: #fff4ec;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #8a3d0c;
}

.customer-page .order-refusal-head {
    margin: 0;
    font-weight: 700;
}

.customer-page .order-refusal-next {
    margin: 6px 0 0;
}

/* The same refusal as a popup (index.php #order-refusal-dialog, Kim 25/09/2026).
   A white card on the payment sheet's dimmed backdrop colour; the two lines keep
   the notice's orange so the popup and the box it leaves behind read as one
   message. The padding sits on the body and the actions, not the dialog, so a tap
   on the dialog element itself can only be a tap on the backdrop. */
/* Centred on the viewport by its own rules, not by the browser's default
   `dialog:modal` box: on Kim's phone (25/09/2026, the page scrolled to the Pay
   button) the first build's popup was not where he was looking. Fixed + 50 % +
   translate is the one centring every engine agrees on, and it cannot stretch
   the box the way inset: 0 without a fit-content height would. On Kim's phone
   (14/10/2026, CUST-POPUP-VIEWPORT-1) it still did not hold: the sheet rule
   (`.customer-steps + section ~ :not(.payment-modal)`) overrode `position` with
   relative, which a modal dialog turns into absolute, so the card scrolled away
   with the page. That rule now excludes the dialog. */
.customer-page .order-refusal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: min(420px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100% - 48px);
    overflow: auto;
    margin: 0;
    padding: 0;
    border: 1px solid #f3c9a8;
    border-radius: 16px;
    background: #ffffff;
    color: #8a3d0c;
    box-shadow: 0 18px 48px rgba(8, 15, 24, 0.28);
}

.customer-page .order-refusal-dialog::backdrop {
    background: rgba(8, 15, 24, 0.55);
}

/* Centred text (Kim, 25/09/2026: "ข้อความจัดกึ่งกลางด้วย"). */
.customer-page .order-refusal-dialog-body {
    padding: 22px 20px 4px;
    font-size: 1rem;
    line-height: 1.55;
    text-align: center;
}

.customer-page .order-refusal-dialog-body .order-refusal-head {
    font-size: 1.0625rem;
}

.customer-page .order-refusal-dialog-body .order-refusal-next {
    margin-top: 10px;
    font-size: 0.9375rem;
}

.customer-page .order-refusal-dialog-actions {
    display: flex;
    padding: 18px 20px 20px;
}

.customer-page .order-refusal-dialog-actions .pay-button {
    flex: 1;
    min-height: 48px;
}

/* No frame around OK, ever (Kim, 25/09/2026: "ปุ่มสีน้ำเงินไม่ต้องมีขอบ", and
   again on the preview after a Tab: "ปุ่มยังมีขอบอยู่เลย"). The ring was app.css's
   global `:focus-visible` outline. index.php focuses the dialog itself, so OK
   starts unfocused; when a keyboard does reach OK, the cue is the button's own
   hover colour instead of a ring. */
.customer-page .order-refusal-dialog:focus,
.customer-page .order-refusal-dialog:focus-visible,
.customer-page .order-refusal-dialog-actions .pay-button:focus,
.customer-page .order-refusal-dialog-actions .pay-button:focus-visible {
    outline: none;
}

.customer-page .order-refusal-dialog-actions .pay-button:focus-visible {
    background: linear-gradient(180deg, #2150c2 0%, var(--hero-navy-low) 100%);
}

/* Only ever in the admin preview, and it must look like a label on the sample
   rather than part of the product. */
.customer-page .panel-sale-sample {
    margin: 0;
    padding: 8px 12px;
    border: 1px dashed #aeb7c0;
    border-radius: 10px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #55606b;
}

.customer-showcase {
    margin-top: 22px;
}

.customer-showcase-title {
    margin: 0 0 12px;
    font-size: 0.938rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--color-ink);
}

.customer-showcase-grid {
    display: grid;
    gap: 10px;
}

.customer-showcase-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-medium, 16px);
    background: var(--color-success-soft);
    border: 1px solid var(--color-border);
}

.customer-showcase-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-success);
    color: #fff;
    font-size: 0.813rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.customer-showcase-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.customer-showcase-body strong {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-ink);
}

.customer-showcase-body small {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------------------
   Two languages in the markup, one on screen.

   The promotion lines carry the branch's own numbers, so the dictionary can
   never match them, and PHP has no idea which language the phone asked for -
   only the browser does. So both are rendered and one is hidden here, keyed off
   the lang attribute that i18n.js keeps up to date. That means switching
   language needs no JavaScript at all for these lines.
   --------------------------------------------------------------------------- */
html[lang="en"] .customer-page .lang-th,
html[lang="th"] .customer-page .lang-en {
    display: none;
}

/* The reward is the reason to read the card, so it carries the brand colour and
   the weight; the condition sits under it in plain muted text because it is the
   small print, and dressing small print up as a promise is how a customer ends
   up feeling misled. */
.customer-page .customer-showcase-reward {
    display: block;
    margin-top: 1px;
    font-size: 0.781rem;
    font-weight: 700;
    color: #137b51;
}

.customer-page .customer-showcase-condition {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    color: #68717d;
}

/* Three lines instead of two, so the row can no longer be vertically centred
   against a 42px icon without the text drifting below it. */
.customer-page .customer-showcase-card {
    align-items: flex-start;
}

.customer-page .customer-showcase-icon {
    margin-top: 1px;
}

/* ---------------------------------------------------------------------------
   Header wordmark + machine cards.

   Every rule below OVERRIDES one that lives in app.css, which is hash-pinned
   and must never be edited. This file is linked after app.css, so equal
   specificity wins on source order.

   The overridden mobile rules sit inside @media (max-width: 640px) in app.css
   (app.css:5474-5492). A media query adds no specificity, so the plain rules
   here would otherwise beat them at EVERY width and flatten the responsive
   sizes - hence the matching @media block at the end of this file.
   --------------------------------------------------------------------------- */

/* --- Dark topbar -----------------------------------------------------------
   Colours sampled from the sign-in screen (auth/preview.css): --dark #0a121b,
   --dark-soft #111c27, --mint #55eca4, brand text #f7fafc. app.css:4770 paints
   this bar near-white, so everything sitting in it has to be re-inverted here.
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   The dark bar.

   No safe-area padding here, and that is the second answer to the same question.
   A 1cm top pad was added on 2026-07-22 to clear the Dynamic Island, then
   removed the same day: this page is reached by scanning a QR code, so it opens
   inside the LINE in-app browser, and that browser already draws its own header
   bar below the Island. Padding for the Island underneath a bar that has already
   cleared it just stacked empty space on top of ours and pushed the wordmark and
   the back button to the bottom edge of the black.

   index.php also no longer sends viewport-fit=cover, so every env() inset
   resolves to 0. Do not re-add either without testing inside LINE first.
   --------------------------------------------------------------------------- */

.customer-topbar {
    background: #0a121b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* The bar carries one control now, so it can be tighter than the admin bar it
   inherits from. app.css:1614 gives .topbar-inner a 56px floor and a 32px side
   inset; on a 375px phone that inset is most of a machine tile.

   The symmetric padding is what centres the brand and the button in the black
   rather than letting them sit against its bottom edge - app.css centres them
   inside this row, so the row itself has to be evenly inset from the bar. */
.customer-page .topbar-inner {
    width: min(1040px, calc(100% - 24px));
    min-height: 52px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 12px;
}

/* Wordmark over tagline. app.css:1624 lays .brand out inline at 18px, which put
   the two side by side and let the Thai tagline wrap to three lines. */
.customer-page .customer-brand {
    display: grid;
    gap: 2px;
    align-content: center;
    min-width: 0;
}

.customer-brand-tagline {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.2;
    color: #9fb0bf;
    /* Thai renders this as ร้านซักอบอัจฉริยะ, which is long. Holding it on one
       line is what keeps the bar one height on every device. */
    white-space: nowrap;
}

/* The nav is a single button now; without this it keeps the wrap behaviour it
   needed when it held three things. */
.customer-page .customer-topbar .nav {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
}

/* Matches the sign-in wordmark (auth/preview.css:196 .auth-brand), which is
   text and not an image. app.css:4796 .brand-mark is left untouched and unused.

   Weight 700, not 900: the sign-in screen uses 700, and at 900 the browser
   picks the Heavy/ExtraBold cut whose glyphs are wide enough to collide once
   the -0.05em tracking is applied at this much smaller size. The tracking is
   eased off for the same reason - it is a proportion of a 20px em here, not
   of the 42-66px em the sign-in screen sets it against. */
.customer-brand-wordmark {
    /* 19px, down from 21px: the wordmark now has a tagline sitting under it, so
       the pair reads as one block and the block should not be taller than the
       back button beside it. */
    font-size: 1.188rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.05;
    color: #f7fafc;
    white-space: nowrap;
}

/* auth/preview.css:204 .auth-brand strong, same mint. Now on the dark bar it
   was designed for, so it reads properly instead of washing out. */
.customer-brand-wordmark strong {
    font-weight: 700;
    color: #55eca4;
}

.customer-brand {
    color: #f7fafc;
}

.customer-topbar .nav a {
    color: #f7fafc;
}

/* Same treatment as the sign-in language pill (auth/preview.css .language-control:
   #0d1721 on a #33404c hairline). */
.customer-back,
.customer-topbar .language-switch {
    border-color: #33404c;
    background: #111c27;
    color: #f7fafc;
}

/* Nothing sized this button, so it took the UA's absolute 13.3333px and was one
   of only two things on the customer screen that ignored the reader's text-size
   setting. 0.833rem is that same size today and scales from here. */
.customer-back {
    font-size: 0.833rem;
}

/* app.css:1588 sets this to var(--color-text-secondary), which on this page is
   the customer palette's #68717d and disappears against the dark pill. */
.customer-topbar .language-switch button {
    color: #9fb0bf;
}

/* Restore the pressed state. The rule above ties on specificity with app.css:1567
   .language-switch button[aria-pressed="true"] and, loading later, was winning -
   which painted the selected language in muted grey on its own mint pill. This
   selector carries one more class than that rule, so it takes the tie back. */
.customer-topbar .language-switch button[aria-pressed="true"] {
    color: var(--color-ink);
}

/* position: relative creates the containing block the number is pinned to;
   app.css:4920 has no positioning of its own. */
/* position: relative creates the containing block the number is pinned to;
   app.css:4920 has no positioning of its own.

   The fixed first row is what keeps the grid tidy: the images below are given
   different heights on purpose, so without it a shorter machine would pull its
   label upwards and the captions would not line up across a row. Pinning the
   row and bottom-aligning the image also stands every machine on one floor. */
.customer-machine-tile {
    position: relative;
    grid-template-rows: 180px auto;
    align-content: center;
    gap: 10px;
    min-height: 276px;
    padding: 30px 12px 18px;
}

/* Telling washers from dryers, 2026-07-23.
   -----------------------------------------------------------------------------
   First attempt filled the whole card with Kim's blue and amber. It separated
   the two kinds perfectly and looked bad: fourteen saturated blocks fight the
   product photographs that are the actual content, leave the eye nowhere to
   rest, and turn the mint number badge into an unrelated third colour.

   So the colour moves off the card and behind the machine: a soft disc, the
   shape shops use to stand a product on, plus a number badge in the same
   family. The card stays white, the photograph sits on its own colour, and the
   grid reads calm again.

   Colour is still only the second signal — the artwork differs and both label
   lines name the machine in words. `.is-unavailable` dims by opacity rather
   than repainting, so an out-of-service machine keeps its type. */
/* A rounded panel rather than a disc — Kim, 2026-07-23. It frames the tall
   machines better than a circle did, which had to be wide enough to clear the
   artwork's height and so left a lot of colour either side of a narrow machine.

   Sized against the card, not in fixed pixels: at a flat 158px the shape left
   6px of margin on a 170px card and would have burst out of the rounded corners
   on a 320px phone. */
/* A wide, low bar the machine STANDS ON rather than a frame that contains it —
   Kim's reference, 2026-07-23. The artwork deliberately breaks out above and
   below, which is what stops the panel reading as a box round the photo.

   The artwork occupies 32-212px of the 276px card. The bar is a little over
   half that height and centred on it, so it never reaches the badge at the top
   or the label at the bottom. */
.customer-machine-tile::before {
    content: "";
    position: absolute;
    top: 76px;
    left: 50%;
    width: min(188px, 88%);
    height: 92px;
    transform: translateX(-50%);
    border-radius: 16px;
    background: #f1f4f7;
    z-index: 0;
}

/* The artwork, badge and labels all sit above the disc. */
.customer-machine-icon,
.customer-machine-number,
.customer-machine-label {
    position: relative;
    z-index: 1;
}

.customer-machine-tile.is-washer::before {
    background: #dceafd;
}

.customer-machine-tile.is-dryer::before {
    background: #ffeecd;
}

/* White, not a tint of the type colour. The panel now reaches under the badge,
   and a pale blue badge on a pale blue panel all but vanished — the number is
   the one thing a customer standing in front of the machines is hunting for.
   White holds against both the card and the panel; the border and the numeral
   carry the colour. */
/* A soft filled disc, no outline — Kim's reference. It can be a plain tint now
   because the bar sits low on the card and the badge sits on white, so the two
   never touch; the earlier outlined version existed only because a full-height
   panel reached under the badge and swallowed it. */
.customer-machine-tile.is-washer .customer-machine-number,
.customer-machine-tile.is-dryer .customer-machine-number {
    width: 38px;
    min-width: 0;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
}

.customer-machine-tile.is-washer .customer-machine-number {
    background: #dceafd;
    color: #1b4f8f;
}

.customer-machine-tile.is-dryer .customer-machine-number {
    background: #ffeecd;
    color: #8a5a06;
}

/* Sized by height with the width left to follow, so the artwork fills the card
   instead of being letterboxed inside a square.

   Each PNG draws its machine at a different height inside the same 180x240
   canvas - measured content heights are hc 201, hxc 201, dc/de 203, wdc 208,
   sdc 216. One shared size therefore renders the stacked dryers ~7.5% taller
   than the washers. The per-file heights below are 240 x (150 / contentHeight),
   which lands every machine at the same ~150px drawn height. Re-measure if the
   images are ever re-cut. */
.customer-machine-icon {
    width: auto;
    height: 180px;
    max-width: 100%;
    align-self: end;
}

.customer-machine-icon.is-dc,
.customer-machine-icon.is-de {
    height: 177px;
}

.customer-machine-icon.is-wdc {
    height: 173px;
}

.customer-machine-icon.is-sdc {
    height: 167px;
}

/* Pulled out of the grid flow into the top-right corner, and restyled as the
   reference's soft chip (preview.css:721-756 .status-pill) rather than a solid
   brand-filled pill. */
.customer-machine-number {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 34px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid #b7f0d3;
    background: #e4fbef;
    color: #137b51;
    font-size: 0.938rem;
    font-weight: 700;
}

/* --- The dark panels become cards ------------------------------------------
   The reference page has no dark hero: every block is a white .preview-panel
   on the flat canvas (preview.css:594-599, :653-658).

   Two separate app.css rules paint the customer surface dark - .branch-picker-head
   (app.css:4895, background var(--ink)) on the branch grid, and .journey-panel
   (app.css:4828, background var(--ink), color #fff) on BOTH the machine/program
   screen (index.php:298) and the order-status screen (index.php:168). Their
   headings clamp up to 64px (app.css:4903), far past anything on the reference. */
.customer-page .branch-picker-head,
.customer-page .journey-panel {
    padding: 20px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
    color: #111820;
    box-shadow: 0 12px 34px rgba(22, 35, 48, 0.08);
}

.customer-page .branch-picker-head h1,
.customer-page .journey-panel h1 {
    font-size: clamp(1.625rem, 5vw, 2.125rem);
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: #111820;
}

/* The machine screen is NOT a landing screen: the customer has already read the
   branch name on the previous one and is here to pick a program. At the shared
   26px the same branch name broke onto two lines and the panel stood 421px tall
   against 190px on the branch screen, which is what made the two look like
   different products.

   The line that actually mattered is `max-width: none`. app.css:4903 caps this
   heading at `11ch` - about eleven characters - which was sized for the old dark
   hero where the name was meant to stack. "KHT Demo Branch" is fifteen, so it
   wrapped no matter what font size was set, and max-width clamps width whatever
   the specificity, exactly like the min-height trap on the range input above.
   text-wrap: balance was tried here first and made it worse: it was doing its
   job on a box that was only ever 147px wide. */
.customer-page .journey-panel h1 {
    max-width: none;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* app.css:4828 gives this panel `min-height: 360px`, `gap: 28px` and
   `justify-content: space-between` - all sized for the old full-height dark hero
   it used to be. min-height is the third constraint property today that beat a
   sizing rule regardless of specificity; see the range input and the 11ch
   heading cap above. */
.customer-page .journey-panel {
    min-height: 0;
    gap: 6px;
    justify-content: flex-start;
    padding: 16px 18px;
}

/* ---------------------------------------------------------------------------
   The chosen machine.

   Kim, 2026-07-22: this card used to carry the branch code and the branch name,
   both of which the customer had just read on the previous screen. It now
   answers the only question they actually have standing in front of the machine
   - did I tap the right one - so the artwork is large and the number sits on it
   the way it does on the tile they came from.
   --------------------------------------------------------------------------- */

.customer-page .journey-panel.chosen-machine {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 18px;
}

.chosen-machine-art {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: end center;
    width: 104px;
    height: 118px;
}

/* Each PNG draws its machine at a different height inside the same canvas, so
   the per-file heights below land them all on the same drawn size - the same
   normalisation the branch tiles use, scaled down. Re-measure if the images are
   ever re-cut. */
/* A02-7.4: the <picture> wrapper only chooses webp vs png; it must not become
   the grid item, or the icon loses the align-self below. */
.chosen-machine-art > picture { display: contents; }

.chosen-machine-icon {
    width: auto;
    height: 118px;
    max-width: 100%;
    align-self: end;
}

.chosen-machine-icon.is-dc,
.chosen-machine-icon.is-de { height: 116px; }
.chosen-machine-icon.is-wdc { height: 113px; }
.chosen-machine-icon.is-sdc { height: 109px; }

/* The number badge, matching the branch tile so the customer recognises it as
   the same machine they just tapped. */
.chosen-machine-no {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 32px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0 9px;
    border: 1px solid #b7f0d3;
    border-radius: 999px;
    background: #e4fbef;
    color: #137b51;
    font-size: 0.938rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.chosen-machine-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.chosen-machine-line {
    font-size: 1.063rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #111820;
}

.chosen-machine-time {
    font-size: 0.781rem;
    font-weight: 400;
    line-height: 1.4;
    color: #68717d;
}

.chosen-machine-status {
    justify-self: start;
    margin-top: 3px;
}

@media (max-width: 380px) {
    .chosen-machine-art {
        width: 94px;
        height: 104px;
    }

    .chosen-machine-icon { height: 104px; }
    .chosen-machine-icon.is-dc,
    .chosen-machine-icon.is-de { height: 102px; }
    .chosen-machine-icon.is-wdc { height: 100px; }
    .chosen-machine-icon.is-sdc { height: 96px; }

    .chosen-machine-line {
        font-size: 0.938rem;
    }
}

/* Was stacked with generous spacing to fill the old dark hero. It is three
   short facts, so it reads better as one wrapped line. */
.customer-page .machine-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 8px;
    font-size: 0.781rem;
}

/* app.css:4841, :4848 and :5007 set these to translucent white for the dark
   panel; on the card they would be invisible. */
.customer-page .branch-picker-head .muted,
.customer-page .journey-panel .muted,
.customer-page .journey-panel p,
.customer-page .machine-summary {
    color: #68717d;
}

/* The step list inside the panel was drawn entirely in translucent white
   (app.css:4866-4868 border and text, :4877 the dot, :4883 the active label) -
   invisible now that the panel is white. Repainted as the reference's hairline
   rows with a soft-mint active state. */
.customer-page .journey-steps li {
    border-color: #dfe4e8;
    background: #ffffff;
    color: #68717d;
}

.customer-page .journey-steps li::before {
    background: #dfe4e8;
}

.customer-page .journey-steps li.active {
    border-color: #b7f0d3;
    background: #e4fbef;
    color: #111820;
}

/* app.css:5123-5129 paints this as a gradient with white text. The reference
   has no gradients and puts dark text on mint (preview.css:633 .mint-button);
   white on #55eca4 would be about 2:1 and fail to read. */
.customer-page .pay-button {
    border-color: #55eca4;
    background: #55eca4;
    color: #0a121b;
    box-shadow: 0 12px 34px rgba(22, 35, 48, 0.08);
}

/* preview.css:1029-1038 .summary-card - white on a hairline, not a colour wash.
   Overrides the mint-tinted card this file set at the top. */
.customer-showcase-card {
    border-radius: 10px;
    background: #ffffff;
    border-color: #dfe4e8;
}

.customer-showcase-icon {
    background: #f6f8f9;
    color: #137b51;
}

.customer-machine-label {
    display: grid;
    gap: 2px;
    text-align: center;
    line-height: 1.25;
}

.customer-machine-label-en {
    font-size: 0.875rem;
    font-weight: 900;
    color: var(--color-ink);
}

.customer-machine-label-th {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

@media (max-width: 640px) {
    .customer-machine-tile {
        grid-template-rows: 143px auto;
        min-height: 228px;
        padding: 26px 10px 14px;
    }

    /* Same normalisation as above, scaled to a ~120px drawn machine height. */
    .customer-machine-icon {
        height: 143px;
    }

    .customer-machine-icon.is-dc,
    .customer-machine-icon.is-de {
        height: 142px;
    }

    .customer-machine-icon.is-wdc {
        height: 138px;
    }

    .customer-machine-icon.is-sdc {
        height: 133px;
    }

    .customer-machine-number {
        top: 8px;
        right: 8px;
        min-width: 30px;
        height: 26px;
        padding: 0 8px;
        font-size: 0.938rem;
    }

    /* The rule above sets a height but no width, which would stretch the typed
       badge from a circle into an oval on a phone. Both axes, together. */
    .customer-machine-tile.is-washer .customer-machine-number,
    .customer-machine-tile.is-dryer .customer-machine-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    /* The bar tracks the shorter artwork row on a phone: 26px of padding then a
       143px row, so 58 + 78 keeps it centred on the machine. */
    .customer-machine-tile::before {
        top: 58px;
        height: 78px;
    }

    .customer-machine-label-en {
        font-size: 0.813rem;
    }

    .customer-machine-label-th {
        font-size: 0.75rem;
    }
}

/* ---------------------------------------------------------------------------
   While the machine runs.

   Shown on the order screen only once the device has acknowledged the start.
   Carries the one thing the customer actually wants at that moment — when to
   come back — plus how to treat this load and, after a wash, where to go next.
   --------------------------------------------------------------------------- */

.order-running {
    display: grid;
    gap: 10px;
    margin: 16px 0 4px;
    padding: 18px 20px;
    border: 1px solid #b7f0d3;
    border-radius: 14px;
    background: #e4fbef;
}

.order-running[hidden] {
    display: none;
}

.order-collect {
    margin: 0;
    color: #0a121b;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.order-care {
    margin: 0;
    color: #245c42;
    font-size: 0.813rem;
    line-height: 1.5;
}

.order-care[hidden] {
    display: none;
}

.order-next-step {
    justify-self: start;
    margin-top: 2px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #137b51;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.order-next-step[hidden] {
    display: none;
}

/* ---------------------------------------------------------------------------
   Rail states beyond done/failed.

   The base rules live in app.css and are not touched: that file is shared with
   admin and login and is SHA-256 pinned in LOCAL-TOOLS/Sandbox-Common.ps1.
   These are customer-only and this sheet loads second.

   `stopped` is deliberately grey, not pink: a payment window running out is not
   a failure and not anybody's fault. `current` cannot be green, because green
   already means finished on this rail - painting the step you are STANDING on
   green is the whole bug this change exists to fix.
   --------------------------------------------------------------------------- */

/* app.css sets .customer-progress{display:grid} in an author rule, which beats
   the UA's zero-specificity [hidden]{display:none}. Without this, hiding the
   rail does nothing at all. */
.customer-progress[hidden] {
    display: none;
}

.customer-progress span.is-current {
    border-color: rgba(19, 123, 81, 0.35);
    background: #f2fbf6;
    color: #0f5c3d;
}

.customer-progress span.is-current b {
    background: #137b51;
    color: #ffffff;
}

.customer-progress span.is-stopped {
    border-color: #d6dade;
    background: #f4f5f6;
    color: #3d444d;
}

.customer-progress span.is-stopped b {
    background: #6a707a;
    color: #ffffff;
}

/* Reached by nobody and never will be on this order - dimmer than `todo`,
   which is still expected to happen. */
.customer-progress span.is-blocked {
    border-color: #e8eaec;
    background: #fafbfb;
    color: #6a707a;
}

.customer-progress span.is-blocked b {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #d6dade;   /* not a border: the pip keeps its size */
    color: #6a707a;
}

/* Colour is not the only signal. This project has no shared sr-only utility -
   .receipt-text below and .admin-work-tabs-status in app.css each carry their
   own copy - so this is a third copy on purpose. */
.customer-progress .rail-state {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   The order notice.

   The counterpart of .order-running above: that one says what to do while the
   machine runs, this one says what happened to the money and what to do now, on
   every screen where the happy path did not happen. Same shape deliberately.
   --------------------------------------------------------------------------- */

.order-notice {
    display: grid;
    gap: 8px;
    margin: 16px 0 4px;
    padding: 18px 20px;
    border: 1px solid #d6dade;
    border-radius: 14px;
    background: #f4f5f6;
}

.order-notice[hidden] {
    display: none;
}

.order-notice-money {
    margin: 0;
    color: #0a121b;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.order-notice-head {
    margin: 0;
    color: #0a121b;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.order-notice-line {
    margin: 0;
    color: #3d444d;
    font-size: 0.875rem;
    line-height: 1.55;
}

/* The one screen here carrying good news: the value really is already back.
   Painting that red would undercut the thing it is trying to say. */
.order-notice.is-good {
    border-color: #b7f0d3;
    background: #e4fbef;
}

.order-notice.is-good .order-notice-line {
    color: #245c42;
}

.order-notice.is-stopped {
    border-color: #f5b7b1;
    background: #fff5f4;
}

.order-notice.is-stopped .order-notice-head {
    color: #7a1c14;
}

/* Reuses the pill .order-running already ships; only the touch target grows. */
.order-notice .order-next-step {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* customer-money-1 (02/11/2026): the no_code card's "try again" is a button,
   which keeps the browser's own font and border unless told. */
button.order-next-step {
    border: 0;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

button.order-next-step:disabled {
    opacity: 0.6;
    cursor: default;
}

.order-notice .order-next-step:focus-visible {
    outline: 3px solid #0a121b;
    outline-offset: 2px;
}

/* The codes staff look up, under the number the customer can read. */
.support-facts dd small {
    display: block;
    margin-top: 3px;
    color: #6a707a;
    font-size: 0.75rem;
    font-weight: 700;
}

/* The notice replaces this line when it is showing; an empty <p class="muted">
   still occupies its margins. */
#status-message[hidden] {
    display: none;
}

/* ---------------------------------------------------------------------------
   The receipt.

   Drawn as a canvas so the slip on screen and the slip that gets saved are the
   same pixels. The text twin beside it carries the same content for screen
   readers and for anyone who wants to select and copy it.
   --------------------------------------------------------------------------- */

.receipt-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid #dfe4e8;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(22, 35, 48, 0.08);
}

.receipt-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: pre;
}

.receipt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 380px) {
    .receipt-actions {
        grid-template-columns: 1fr;
    }
}

/* The thank-you wrapper around the slip. */
.promptpay-head[hidden] {
    display: none;
}

/* The processing view opens under the navy header band, which gives it its own
   top edge. The success view hides that band, so without a top inset here the
   "payment complete" line sat hard against the top of the sheet with the
   sub-line crowded under it. */
.receipt-thanks {
    display: grid;
    gap: 6px;
    margin-top: 22px;
    margin-bottom: 18px;
    padding: 0 4px;
    text-align: center;
}

.receipt-thanks-title {
    margin: 0;
    color: #111820;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.receipt-thanks-sub {
    margin: 0;
    color: #68717d;
    font-size: 0.813rem;
}

.receipt-advice {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid #b7f0d3;
    border-radius: 14px;
    background: #e4fbef;
}

.receipt-advice[hidden],
.receipt-advice-care[hidden],
.receipt-line[hidden],
.receipt-line-button[hidden] {
    display: none;
}

.receipt-advice-collect {
    margin: 0;
    color: #0a121b;
    font-size: 1.063rem;
    font-weight: 800;
}

.receipt-advice-collect:empty {
    display: none;
}

.receipt-advice-care {
    margin: 0;
    color: #245c42;
    font-size: 0.813rem;
    line-height: 1.5;
}

.receipt-line {
    display: grid;
    gap: 10px;
    justify-items: center;
    margin-top: 14px;
    padding: 16px 18px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
    text-align: center;
}

.receipt-line-text {
    margin: 0;
    color: #68717d;
    font-size: 0.813rem;
}

.receipt-line-button {
    padding: 10px 22px;
    border-radius: 999px;
    background: #06c755;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

/* ---------------------------------------------------------------------------
   The PromptPay screen.

   Written for a customer in their fifties standing at a machine: the amount
   first and large, one green button, then the steps numbered in the order the
   thumb performs them. No bank chooser — a PromptPay QR is read by every bank
   app, and offering a list would imply only those banks work.
   --------------------------------------------------------------------------- */

.pay-amount-label {
    margin: 0;
    color: #68717d;
    font-size: 0.813rem;
    text-align: center;
}

.pay-amount {
    margin: 2px 0 14px;
    color: #111820;
    text-align: center;
    line-height: 1.1;
}

.pay-amount strong {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.pay-amount span {
    font-size: 1rem;
    font-weight: 700;
    color: #68717d;
}

/* Navy, matching the band above it, so the button reads as part of the Thai QR
   flow rather than as this app asking for something separate. */
.pay-save-button {
    display: block;
    width: 100%;
    margin: 16px 0 0;
    padding: 16px 20px;
    border: 0;
    border-radius: 999px;
    background: #12395c;
    color: #ffffff;
    font-size: 1.063rem;
    font-weight: 800;
    cursor: pointer;
}

/* The main action on the payment sheet. Without the guard a touch screen left
   it in its darkened hover state after the tap, so the one button the customer
   is meant to press looked stuck down for the rest of the session. */
@media (hover: hover) and (pointer: fine) {
    .pay-save-button:hover {
        background: #0d2c48;
    }
}

.pay-save-note {
    margin: 10px 0 0;
    color: #245c42;
    font-size: 0.813rem;
    text-align: center;
}

.pay-save-note[hidden] {
    display: none;
}

.pay-steps {
    margin: 18px 0 0;
    padding-left: 22px;
    color: #111820;
    font-size: 0.938rem;
    line-height: 1.65;
}

.pay-steps li {
    margin-bottom: 6px;
}

.pay-amount-locked {
    margin: 6px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #e4fbef;
    color: #245c42;
    font-size: 0.813rem;
    text-align: center;
}

/* Offered when the customer comes back to a page that has lost their order —
   most often because Android killed LINE while they were in their bank app.
   Amber rather than red: it is an unfinished errand, not an error. */
.resume-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid #f2c98a;
    border-left: 4px solid #e79c2f;
    border-radius: 12px;
    background: #fff8ec;
}

.resume-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.resume-banner-text strong {
    color: #7a4a06;
    font-size: 0.938rem;
}

.resume-banner-text span {
    color: #99702f;
    font-size: 0.813rem;
}

.resume-banner-action {
    flex-shrink: 0;
    padding: 9px 20px;
    border-radius: 999px;
    background: #e79c2f;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

/* ---------------------------------------------------------------------------
   The PromptPay sheet.

   None of these classes had any CSS. The markup called itself a modal but had
   no positioning, so it stacked underneath the payment panel, the close button
   sat loose at the left, and the detail list fell back to a browser default
   <dl> — which is why "เหลือเวลา" and its value landed left-aligned in a
   column of their own.

   Palette is the one the app already uses: #137b51 for the action the customer
   is meant to take, the #e4fbef/#245c42 mint that already marks a settled fact,
   and the #e79c2f/#fff8ec amber introduced for the resume banner, reused here
   because a countdown is the same kind of signal — pay attention, nothing is
   wrong yet.
   --------------------------------------------------------------------------- */

.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
    /* Room above the sheet so it never reaches the very top of the screen. */
    padding: 24px 0 0;
}

/* ---------------------------------------------------------------------------
   Press feedback.

   Nothing on the customer page acknowledged a tap. On a phone on a shop's
   wifi, a button that does not visibly react is a button people press again -
   and one of these creates an order. The scale is small on purpose: enough to
   register as "heard you", not enough to look like a toy.

   transition on the element, not on :active, so the release eases back instead
   of snapping. Only transform is animated - it skips layout and paint.
   --------------------------------------------------------------------------- */

.customer-page .pay-save-button,
.customer-page .promptpay-actions > *,
.customer-page .promptpay-close,
.customer-page .program-chip,
.customer-page button[type="submit"] {
    transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.customer-page .pay-save-button:active,
.customer-page .promptpay-actions > *:active,
.customer-page .promptpay-close:active,
.customer-page .program-chip:active,
.customer-page button[type="submit"]:active {
    transform: scale(0.97);
}

/* ---------------------------------------------------------------------------
   Motion on the payment sheet.

   This sheet used to appear with no transition at all: one frame the customer
   is choosing a programme, the next a full-screen panel is covering everything.
   That reads as the screen breaking rather than as a new step, and it happens
   at the exact moment the customer is deciding whether to hand over money.

   It is a bottom sheet (the modal is a flex container with align-items:
   flex-end), so it comes up from the bottom - the direction it lives in. The
   curve is Ionic's iOS drawer curve; the duration sits at the fast end of the
   200-500ms a drawer gets, because this is a step in a payment, not a flourish.

   Written in CSS rather than JS on purpose. `display` is what hides this sheet,
   and @starting-style plus `transition-behavior: allow-discrete` is what lets
   display-based show/hide animate without a single line of script - so there is
   no timer that can leave the sheet stuck on screen if it fails to fire. On a
   browser too old for either, every rule here is ignored and the sheet appears
   instantly, which is exactly what it does today.

   Exit is deliberately faster than enter (200ms vs 320ms): opening introduces a
   screen, closing is the system getting out of the way.

   No prefers-reduced-motion block is needed - app.css:6875 already clamps
   transition-duration to 0.01ms globally for anyone who asks for less motion.
   --------------------------------------------------------------------------- */

.payment-modal {
    opacity: 1;
    transition: opacity 200ms ease, display 200ms allow-discrete;
}

.payment-modal[hidden] {
    display: none;
    opacity: 0;
}

@starting-style {
    .payment-modal:not([hidden]) {
        opacity: 0;
    }
}

.payment-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 15, 24, 0.55);
}

/* The card carries its own slide so the backdrop can fade on a shorter,
   plainer curve underneath it - the dark comes in first, the sheet follows. */
.payment-modal .promptpay-card {
    transform: translateY(0);
    transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.payment-modal[hidden] .promptpay-card {
    transform: translateY(100%);
    /* Matches the 200ms the modal itself takes to go, so the sheet is not still
       sliding when the thing containing it has already been removed. */
    transition-duration: 200ms;
}

@starting-style {
    .payment-modal:not([hidden]) .promptpay-card {
        transform: translateY(100%);
    }
}

.promptpay-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-width: 460px;
    /* Against the fixed parent, not vh. The in-app browsers this runs in
       resize their toolbars mid-session, and a vh-sized sheet either overflows
       or leaves a gap when they do. */
    max-height: 100%;
    overflow-y: auto;
    padding: 0 20px 24px;
    border-radius: 22px 22px 0 0;
    background: #ffffff;
    box-shadow: 0 -14px 40px rgba(8, 15, 24, 0.28);
}

@media (min-width: 520px) {
    .payment-modal {
        align-items: center;
        padding: 24px;
    }

    .promptpay-card {
        border-radius: 22px;
    }
}

/* The navy band from the standard Thai QR slip. It is the one part of this
   screen a customer has seen a hundred times before - at a market stall, in a
   hospital, on a donation poster - so it says "this is the payment you already
   know how to make" faster than any wording could. */
.promptpay-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -20px 16px;
    padding: 16px 20px;
    background: #12395c;
    text-align: left;
}

.promptpay-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.promptpay-brand-mark {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
}

.promptpay-brand-text strong {
    display: block;
    color: #ffffff;
    font-size: 0.938rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.promptpay-brand-text > span {
    display: block;
    margin-top: 2px;
    color: #a9c4dc;
    font-size: 0.75rem;
}

/* 44px, not 36. This is the only way out of a sheet that covers the whole
   screen, it sits in the top-right corner - the hardest place on a phone for a
   thumb to reach - and at 36x40 it was the smallest target on the page. The
   circle still LOOKS 36px: the padding does the growing, so the hit area is
   44x44 while the ring stays the size the design wants. */
.promptpay-close {
    position: relative;
    flex-shrink: 0;
    /* Kim, 16 Sep 2026, from an iPhone: "ตัวX มันเบี้ยวผิดสัดส่วน". A button
       keeps the browser's own padding and appearance unless told otherwise, so
       the 36px ring was not guaranteed to be 36 by 36, and the letter x inside
       it sat on the text baseline, low and off-centre. The ring is now pinned
       square with nothing added, and the cross is a drawn SVG centred by grid. */
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    aspect-ratio: 1;
    margin: 0 0 0 auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    line-height: 0;
    cursor: pointer;
}

/* 🪤 The actual cause of the oval. The pointer: coarse floor near the end of
   this file gives every button on the page min-height: 44px at specificity
   (0,2,1), and on a phone that stretched this 36px ring to 36 wide by 44 tall -
   measured in the browser with touch emulation. The 44px TARGET is the ::after
   below; the ring itself stays square, at (0,3,0). */
.customer-page .promptpay-head .promptpay-close {
    min-height: 36px;
}

/* margin-left: auto above keeps the ring at the right-hand end of the band
   when the brand beside it is hidden - which is the receipt, where it used to
   jump to the left-hand corner. */
.promptpay-close svg {
    display: block;
    width: 14px;
    height: 14px;
    pointer-events: none;
}

/* The ring stays 36px because that is what the design wants; the TARGET grows
   to 44x44, the minimum a thumb can hit reliably. A transparent pseudo-element
   is part of the button for hit-testing, so this costs nothing visually.
   It matters here more than anywhere else on the page: this is the only way out
   of a sheet that covers the whole screen, and it sits in the top-right corner,
   the furthest point from a thumb. */
.promptpay-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
}
/* Stated as a size rather than `inset: -4px`, because inset is measured from
   the PADDING box: with the ring's 1px border that gave 3px of extra target,
   not 4, and the corner tap still missed. Caught by hit-testing the corner in a
   browser, not by reading the rule. */

/* A touch screen fires :hover on tap and leaves it stuck until the next tap
   somewhere else, so on the LINE in-app browser this button stayed lit as if it
   were still being pressed. Gate it behind a real pointer. */
@media (hover: hover) and (pointer: fine) {
    .promptpay-close:hover::before {
        background: rgba(255, 255, 255, 0.24);
    }
}

/* Sits above the QR the way the wordmark does on the printed slip. */
.promptpay-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 16px;
    border: 2px solid #12395c;
    border-radius: 4px;
    color: #12395c;
    font-size: 0.938rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* Everything centres except the instructions, which need a common left edge. */
.promptpay-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.promptpay-body[hidden] {
    display: none;
}

.promptpay-body > * {
    width: 100%;
}

.promptpay-qr-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2e7ec;
    border-radius: 16px;
    background: #ffffff;
}

.promptpay-qr-shell img {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
}

/* Emphasis 1 of 2. Bigger than body text because this is the part a customer
   in their fifties has to follow while holding a basket. */
.pay-steps {
    margin: 18px 0 0;
    padding: 16px 18px 16px 52px;
    border-radius: 14px;
    background: #f4f8fb;
    color: #111820;
    font-size: 1.063rem;
    line-height: 1.55;
    text-align: left;
    list-style: none;
    counter-reset: pay-step;
}

.pay-steps li {
    position: relative;
    margin-bottom: 12px;
    counter-increment: pay-step;
}

.pay-steps li:last-child {
    margin-bottom: 0;
}

.pay-steps li::before {
    content: counter(pay-step);
    position: absolute;
    left: -36px;
    top: 1px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #137b51;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1;
}

.pay-steps b {
    font-weight: 800;
    white-space: nowrap;
}

/* Emphasis 2 of 2. It was a row in the detail list, which put the only number
   on this screen that moves next to two that never do. */
.pay-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 14px 0 0;
    padding: 12px 16px;
    border: 1px solid #f2c98a;
    border-radius: 14px;
    background: #fff8ec;
}

.pay-countdown-label {
    /* A02-5.5, 17 Sep 2026: #99702f on the card's #fff8ec measured 4.22:1.
       #916827 is the same amber two steps down, at 4.72:1. This is the label
       that counts the customer's payment window down, so it is the last text on
       the page that should be hard to read. */
    color: #916827;
    font-size: 0.813rem;
    font-weight: 700;
}

.pay-countdown-value {
    color: #7a4a06;
    font-size: 2.125rem;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    /* Digits keep their column as the seconds tick, so the number does not
       jitter once a second for ten minutes. */
    font-variant-numeric: tabular-nums;
}

/* Under two minutes. Red is held back until then so it still means something. */
.pay-countdown.is-urgent {
    border-color: #f0b4ac;
    background: #fdf0ee;
}

.pay-countdown.is-urgent .pay-countdown-label {
    color: #a3382b;
}

.pay-countdown.is-urgent .pay-countdown-value {
    color: #8f2c20;
}

.promptpay-detail {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f7fafc;
}

.promptpay-detail > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    text-align: left;
}

.promptpay-detail dt {
    flex-shrink: 0;
    color: #68717d;
    font-size: 0.813rem;
}

.promptpay-detail dd {
    margin: 0;
    color: #111820;
    font-size: 0.813rem;
    font-weight: 700;
    text-align: right;
    /* break-all put the line break wherever it landed, so the order number came
       out as ...-HC3 / 0-1-661974 and read as two different numbers. This is the
       one line a customer reads out to staff when a machine eats their money.
       Normal word breaking already uses the hyphens the order number is full of,
       so the break lands between parts; break-word stays as a backstop for any
       value that has no hyphen at all. */
    word-break: normal;
    overflow-wrap: break-word;
}

.promptpay-processing-bar {
    margin: 14px 0 0;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eef1f4;
    /* A02-5.5, 17 Sep 2026: #68717d on #eef1f4 measured 4.36:1, under the 4.5
       every other pair in this palette keeps. #646d79 is the same hue two steps
       down, at 4.62:1. Set here rather than by moving --color-text-secondary,
       which is used on several other backgrounds that already passed. */
    color: #646d79;
    font-size: 0.813rem;
    font-weight: 700;
}

.promptpay-help {
    margin: 10px 0 0;
    color: #68717d;
    font-size: 0.813rem;
    line-height: 1.5;
}

.promptpay-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 0;
}

/* 44px minimum. app.css gives every button min-height: 40px, which is four
   pixels under what a thumb hits reliably, and these two sit at the bottom of a
   full-screen payment sheet where a mis-tap costs the customer their place. */
.promptpay-actions > * {
    flex: 1 1 auto;
    min-width: 120px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Outlined in the band's navy rather than filled with it. Three solid navy
   buttons would each look as important as the one the customer is actually
   meant to press, and one of them only exists in the sandbox. */
.promptpay-actions .secondary,
.promptpay-actions a.button {
    border: 1px solid #b9cddf;
    background: #ffffff;
    color: #12395c;
    font-weight: 700;
}

/* Touch screens fire :hover on tap and leave it stuck until the next tap
   elsewhere, so on a phone these two stayed lit as if still being pressed. */
@media (hover: hover) and (pointer: fine) {
    .promptpay-actions .secondary:hover,
    .promptpay-actions a.button:hover {
        border-color: #12395c;
        background: #f2f7fb;
    }
}

/* Marketing opt-in card (LINE promotions consent). Hidden until the LIFF JS
   reveals it for an identified customer. Matches the customer-page card look. */
.customer-consent {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #d7e3ee;
    border-radius: 14px;
    background: #f7fbff;
}
.consent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #123245;
    cursor: pointer;
}
.consent-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    accent-color: #0a7d33;
}
.consent-note {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: #6a7a88;
}

/* ===========================================================================
   Referral cards (parts a + b). ONE .customer-referral shell serves the invite
   SHARE card (#customer-referral, home view) and the pre-payment ENTRY card
   (#referral-entry, machine view). They never render on the same screen. Same
   white card as .customer-points; both ship hidden, JS reveals only its own.
   Light-only, matching this file. IDs carry per-card differences so the two can
   never diverge.
   =========================================================================== */
.customer-referral {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(22, 35, 48, 0.08);
}

.customer-referral[hidden] {
    display: none;
}

.customer-referral-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #111820;
}

.customer-referral-note {
    margin: 0;
    font-size: 0.781rem;
    line-height: 1.45;
    color: #68717d;
}

/* --- Part (a) share: caller's own code chip (written by JS) --------------- */
.customer-referral-code {
    margin: 4px 0 2px;
    padding: 10px 14px;
    border: 1px solid #b7f0d3;
    border-radius: 10px;
    background: #e4fbef;
    color: #137b51;
    font-size: 0.938rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.customer-referral-code:empty {
    display: none;
}

#customer-referral .pay-button {
    margin-top: 8px;
}

/* --- Part (b) entry: claim form, input, result line ---------------------- */
.customer-referral-form {
    display: grid;      /* stacked; robust on a narrow phone and across TH/EN button text */
    gap: 10px;
    margin-top: 8px;
}

.customer-referral-input {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #cfd6dc;
    border-radius: 10px;
    background: #f7f9fa;
    color: #111820;
    font-size: 1.125rem;    /* >=16px so iOS does not zoom on focus */
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.customer-referral-input:focus {
    outline: none;
    border-color: #137b51;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(19, 123, 81, 0.15);
}

.customer-referral-input:disabled {
    color: #8a939d;
    background: #eef1f3;
}

.customer-referral-msg {
    margin: 0;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 0.813rem;
    font-weight: 600;
    line-height: 1.35;
}

.customer-referral-msg[hidden] {
    display: none;
}

.customer-referral-msg.is-success {
    border: 1px solid #b7f0d3;
    background: #e4fbef;
    color: #0f5c3c;
}

.customer-referral-msg.is-error {
    border: 1px solid #f2c2c2;
    background: #fdecec;
    color: #9c2a2a;
}

.customer-referral.is-done .customer-referral-form {
    opacity: 0.55;
}

/* ── prefers-contrast / prefers-reduced-transparency (2026-07-28) ─────────────
   The customer page's half of the pair added to admin-shell.css on the same
   day; admin-shell.css is not loaded here, so the rules have to be restated
   rather than shared. Same measured token replacements - the tokens live on
   :root in the hash-pinned app.css and are overridden on the body class, which
   is all the cascade needs.

   This page is where it matters most: it is the one surface a member of the
   public meets, on their own phone, in whatever light the laundromat has. */

@media (prefers-contrast: more) {
    .customer-page {
        --color-text-secondary: #3a3e38;   /* 4.94:1 -> 10.90:1 on white */
        --color-text-muted: #4a4f48;       /* 2.98:1 ->  8.39:1 */
        --color-border: #6b7169;           /* 1.25:1 ->  5.01:1 */
    }

    .customer-page :focus-visible {
        outline: 3px solid var(--color-ink);
        outline-offset: 2px;
    }

    /* Solid, and the SAME solid the bar already is. These two blocks were written
       when the bar was the near-white rgba(255,255,255,0.94) app.css still gives
       it, and they were not revisited when the bar became #0a121b. Everything in
       the bar - the wordmark, the tagline, the back button - is light-on-dark, so
       repainting the bar white left the OOO- half of the wordmark white on white
       and simply gone. Windows switches "Transparency effects" off by default on
       plenty of machines, so this was not a corner case: it is what Kim's own PC
       renders, and it hid the logo on the one screen a customer ever sees. */
    .customer-page .customer-topbar {
        background: #0a121b;
        backdrop-filter: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .customer-page .customer-topbar {
        background: #0a121b;
        backdrop-filter: none;
    }
}

/* Paid add-on under the programme list (2026-07-29, Primus idea #3). Same card
   language as .program-option but visually subordinate - it is an option ON the
   choice above it, not a sibling choice. Dryers only; the block for a programme
   with no add-ons never renders. */
.addon-area { margin-top: 10px; }
.addon-block { display: grid; gap: 8px; }
.addon-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px dashed #9db8a9;
    border-radius: 12px;
    background: #f4faf6;
    cursor: pointer;
}
.addon-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #1f7a53;
    flex: none;
}
.addon-option:has(input:checked) {
    border-style: solid;
    border-color: #1f7a53;
    background: #e8f6ee;
}
.addon-text { display: flex; flex: 1; align-items: baseline; justify-content: space-between; gap: 8px; }
.addon-text strong { font-size: 0.938rem; color: #14281d; }
.addon-price { font-size: 0.938rem; font-weight: 900; color: #1f7a53; white-space: nowrap; }

/* ── touch targets on the one screen the public actually uses (2026-09-03) ───
   admin-shell.css has carried a `@media (pointer: coarse)` 44px floor for a long
   time, and every rule in it is scoped to `.admin-shell-image-a`. The customer
   page's body class is `customer-page`, so none of it has ever applied here — on
   the only surface that is guaranteed to be held in a hand. Measured at 375px
   before this: the brand link 35px and the back button 39px. */
@media (pointer: coarse) {
    .customer-page :is(
        button,
        .button,
        [role="button"],
        input[type="submit"],
        a.customer-back,
        .receipt-line-button,
        .language-switch button
    ) {
        min-height: 44px;
    }

    /* The brand is a link in the top bar; it is the way back to the branch list. */
    .customer-page .topbar-inner .brand {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
    }

    /* Same iOS rule as the admin: anything under 16px zooms the page on focus. */
    .customer-page :is(input, select, textarea) {
        font-size: 1rem;
    }
}

/* ---------------------------------------------------------------------------
   `hidden` has to mean hidden.

   The UA rule is `[hidden] { display: none }` at zero specificity, so any author
   rule that sets `display` on the same element wins - and app.css sets
   `display: inline-flex` on `.button` and on bare `button`, and this file sets
   `display: grid` on `.addon-block`. Measured on 2026-09-08: #bank-payment-link
   was painted after the payment sheet closed although nothing ever un-hides it,
   and the two "จำลองจ่ายสำเร็จ" buttons stayed on screen with hidden=true - so
   the provider gate that hides them on a real gateway, and the reload path that
   hides them when the single-use token is gone, both did nothing at all.

   The file already carries four one-off overrides written each time this was
   discovered again (lines 83, 243, 251, 420, 1356, 1376, 1392, 1412). This is
   the rule they were each a piece of. Scoped to the customer surface, so the
   admin cascade is untouched, and !important because it exists precisely to beat
   an author `display`.
   --------------------------------------------------------------------------- */
.customer-page [hidden] {
    display: none !important;
}

/* ── The total, on the screen where the customer commits to it ───────────────
   Measured in the 2026-09-06 audit: the prices lived in the programme rows and
   nowhere else, so on a 390px phone the selected row sat about 745px above the
   pay button, and at 320px the whole list was below the fold under three
   loyalty cards. Ticking an add-on then made the biggest number on the screen -
   the row price - describe a total that no longer existed, because nothing
   added them up anywhere. Causes 3 and L9. */
.customer-page .pay-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding: 12px 14px;
    border: 1px solid var(--color-ink, #111);
    border-radius: 14px;
    background: #fff;
}

.customer-page .pay-total-label {
    font-size: 0.9rem;
    font-weight: 700;
}

.customer-page .pay-total-amount {
    font-size: 1.35rem;
    font-weight: 900;
    white-space: nowrap;
}

/* ── Skip link and footer (W3, W8) ───────────────────────────────────────────
   The customer page repeats a header and a three-step rail above the thing the
   customer came to do. Off-screen until focused, so it costs one Tab and
   nothing to anyone else. */
/* Clipped rather than pushed off with `top: -100%`. Measured 2026-09-09: a
   percentage offset on an element whose containing block is the initial one
   computed to 0px in Chrome, so the link sat visibly at the top of every admin
   page. Clipping to 1x1 does not depend on resolving a percentage against
   anything, and it is the same technique .visually-hidden uses - the difference
   is that this one un-clips when it takes focus. */
.customer-page .skip-link {
    position: absolute;
    top: 0;
    left: 12px;
    z-index: 1000;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    background: #fff;
    color: var(--color-ink, #111);
    font-weight: 800;
    text-decoration: none;
}

.customer-page .skip-link:focus,
.customer-page .skip-link:focus-visible {
    width: auto;
    height: auto;
    padding: 10px 16px;
    overflow: visible;
    clip-path: none;
    border: 2px solid var(--color-ink, #111);
    border-radius: 0 0 12px 12px;
}

.customer-page main[tabindex="-1"]:focus {
    outline: none;
}

.customer-footer {
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    color: #6b7480;
    font-size: 0.75rem;
    text-align: center;
}

.customer-footer p {
    margin: 0;
}

/* ── Validation feedback, after the user has committed (W5) ──────────────────
   See the note in admin-shell.css: :user-invalid waits until the field is left
   or a submit is refused, where :invalid shouts from the first keystroke. The
   border weight changes as well as its colour so the state is not carried by
   hue alone. */
.customer-page :is(input, select, textarea):user-invalid {
    border: 2px solid #b3261e;
    background-color: #fdecea;
}

.customer-page :is(input, select, textarea):user-valid {
    border-color: #1b6b3a;
}

/* ── The branch's LINE, as a button ──────────────────────────────────────────
   Kim, 2026-09-10: a customer whose machine ate their money had nowhere to go.
   Rendered only when the branch has a LINE on file (customer_branch_line_button),
   so this block is never an empty card.

   LINE green on purpose: it is the one colour a Thai customer recognises without
   reading, and this button has to be findable by someone who is already annoyed. */
.branch-line-contact {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #d7e6d7;
    border-radius: 14px;
    background: #f4faf4;
    text-align: center;
}

.branch-line-contact-note {
    margin: 0;
    font-size: 0.875rem;
    color: #4a5a4a;
}

.branch-line-contact-button {
    display: block;
    padding: 14px 18px;
    border-radius: 12px;
    background: #06c755;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.branch-line-contact-button:active {
    background: #05a648;
}

.branch-line-contact-id {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7a6b;
}

/* On the order screen it sits under the support facts, where the customer
   already is when something has gone wrong, so it needs less framing. */
.branch-line-contact--support {
    margin-top: 14px;
    background: #fff;
}

/* ── The shop's character ────────────────────────────────────────────────────
   Kim asked for a mascot on 2026-09-10. There is no drawing yet, and
   customer_mascot() renders nothing until one exists - so these rules apply to
   an element that is simply absent today, and the surrounding layout must not
   depend on it being there. That is why there is no fixed height and no
   reserved margin on the parent: the space appears with the art and closes
   without it.

   96px because that is what the brief asks the illustrator to draw for: big
   enough to read a silhouette on a phone at arm's length, small enough that it
   never pushes the thing the customer came to do below the fold. */
.customer-mascot {
    display: flex;
    justify-content: center;
    margin: 0 0 12px;
}

.customer-mascot img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

/* On the machine screen the character sits beside the flow rather than on top
   of it - the customer came here to start a wash, not to look at a drawing. */
.customer-mascot--wait {
    margin-bottom: 8px;
}

.customer-mascot--wait img {
    width: 72px;
    height: 72px;
}

/* The apology pose is never bigger than the message beside it. Somebody reading
   this screen has just lost money to a machine. */
.customer-mascot--sorry img {
    width: 64px;
    height: 64px;
}

/* ── "ของฉัน" ────────────────────────────────────────────────────────────────
   Kim, 2026-09-10. A drawer on the machine screen, not a step in front of it:
   the customer who came to wash clothes never walks past it, and the customer
   whose machine ate their money has one place with their history, their points
   and the shop's LINE.

   Ships hidden. The opener appears only once LINE has said who this is - an
   anonymous visitor has no washes - and the sheet opens on a press. */
.my-washes-open {
    margin: 12px 0;
}

.my-washes-open button {
    width: 100%;
}

.my-washes-sheet {
    margin: 12px 0 18px;
    padding: 16px;
    border: 1px solid var(--line, #ddddda);
    border-radius: 14px;
    background: #fff;
}

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

.my-washes-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.my-washes-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f0f0ee;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.my-washes-points {
    margin: 0 0 10px;
    font-weight: 700;
}

.my-washes-list {
    display: grid;
    gap: 10px;
}

/* One wash, one card. The date and the amount lead because those are what a
   customer scans for when they are looking for the one that went wrong. */
.my-wash {
    padding: 12px;
    border: 1px solid #e6e6e2;
    border-left-width: 4px;
    border-radius: 10px;
    background: #fcfcfb;
}

.my-wash-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.my-wash-amount {
    font-weight: 700;
}

.my-wash-where,
.my-wash-line,
.my-wash-ref {
    margin: 4px 0 0;
    font-size: 0.8125rem;
}

.my-wash-where {
    color: #6b6b66;
}

.my-wash-ref {
    color: #9a9a94;
    font-size: 0.75rem;
}

/* The left edge carries the outcome, so a customer scrolling sees the one that
   went wrong without reading a word. Colour is never the only signal - the
   sentence under it says the same thing. */
.my-wash.tone-done { border-left-color: #06c755; }
.my-wash.tone-working { border-left-color: #3b82f6; }
.my-wash.tone-failed { border-left-color: #e11d48; }
.my-wash.tone-failed_paid_back { border-left-color: #f59e0b; }
.my-wash.tone-refunded { border-left-color: #8b5cf6; }
.my-wash.tone-unpaid,
.my-wash.tone-pending { border-left-color: #c7c7c2; }

/* ── ประวัติแต้ม (T-CUST-POINTS-HISTORY-1, Kim, 2026-09-23) ───────────────────
   The customer's own points movements, under ประวัติการซัก on ของฉัน. Same card
   shape and metrics as .my-wash above, because these two lists sit one after the
   other and are read in the same pass; the first card the customer's eye lands
   on must not change shape between them.

   The sign is written into the text by the script ("+50" / "−30"), so the left
   edge is decoration and never the message: a reader who cannot tell the two
   colours apart reads exactly what a colour-sighted reader reads. Nothing here
   animates or transitions, so prefers-reduced-motion has nothing to switch off.
   Both text colours clear 4.5:1 on #fcfcfb (#6b6b66 = 5.2:1, the label in the
   page's own ink = 16.8:1). */
.my-points-list {
    display: grid;
    gap: 8px;
}

.my-points-row {
    padding: 12px;
    border: 1px solid #e6e6e2;
    border-left-width: 4px;
    border-radius: 10px;
    background: #fcfcfb;
}

.my-points-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.my-points-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.my-points-label,
.my-points-where,
.my-points-ref {
    margin: 4px 0 0;
    font-size: 0.8125rem;
}

.my-points-where {
    color: #6b6b66;
}

.my-points-ref {
    color: #6b6b66;
    font-size: 0.75rem;
}

.my-points-row.is-plus { border-left-color: #06c755; }
.my-points-row.is-minus { border-left-color: #e11d48; }
.my-points-row.is-zero { border-left-color: #c7c7c2; }

/* ── The four approved items (Kim, 2026-09-13: "เอาทุกข้อ") ───────────────────
   ก bottom tab bar, ข free machines, ค shortcuts, plus the ของฉัน page that
   replaces the drawer above. Sizes come from the approved preview, which was
   drawn on a 320px screen, scaled to a real 390px phone; every tap target stays
   at 48px or more because the shortcuts exist for older customers.

   Tokens are the preview's: mint #55eca4, ink #111820, muted #68717d,
   mint-deep #137b51, mint-soft #e4fbef, border #dfe4e8. */

/* ก The bar. Fixed, and BELOW the payment sheet (z-index 60) and anything else
   modal; it is hidden outright while paying anyway (hideTabBarForPayment). No
   env(safe-area-inset-bottom): the page deliberately has no viewport-fit=cover,
   so inside LINE it would resolve to 0 (see the <meta viewport> note). */
.customer-tabbar-spacer {
    height: 72px;
}

.customer-page .customer-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 64px;
    padding: 4px max(6px, calc((100% - 560px) / 2));
    border-top: 1px solid #dfe4e8;
    background: #ffffff;
    box-shadow: 0 -6px 18px rgba(17, 24, 32, 0.05);
}

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

/* Reset the app-wide button and link looks: a tab is neither. */
.customer-page .customer-tab {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 56px;
    margin: 0;
    padding: 0 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    color: #68717d;
    font: inherit;
    /* 13px, up from 11px: nothing on the customer page is under 12px (29/09/2026
       review). The label inherits this size. */
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.customer-page .customer-tab-icon {
    box-sizing: content-box;
    width: 24px;
    height: 24px;
    padding: 2px 10px;
    border-radius: 999px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.customer-page .customer-tab-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-page .customer-tab.is-active {
    color: #137b51;
    font-weight: 700;
}

.customer-page .customer-tab.is-active .customer-tab-icon {
    background: #e4fbef;
}

/* The middle tab is the hero - the filled mint pill สแกน used to wear (Kim,
   2026-09-15: three tabs, the middle one standing out). It is a link, never
   "active": ติดต่อร้าน leaves the page and อ่านป้ายผ้า sits under หน้าร้าน. */
.customer-page .customer-tab--hero .customer-tab-icon {
    background: #55eca4;
    color: #111820;
}

.customer-page :is(.customer-tab, .customer-shortcut):focus-visible {
    outline: 2px solid #137b51;
    outline-offset: 2px;
}

/* hideTabBarAtPress() hides the bar and keeps the spacer, so pressing pay at
   the bottom of the page does not jump it 72px (2026-09-13). The rule above
   sets display: grid, which the UA's zero-specificity [hidden] loses to. */
.customer-page .customer-tabbar[hidden] {
    display: none;
}

/* ค Shortcuts on the branch home. */
.customer-page .customer-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
}

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

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

.customer-page .customer-shortcut {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 88px;
    margin: 0;
    padding: 4px 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    color: #111820;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.customer-page .customer-shortcut-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    background: #e4fbef;
}

.customer-page .customer-shortcut-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #137b51;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ข The full card on the branch home. */
.customer-page .customer-avail {
    padding: 14px 16px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
}

.customer-page .customer-avail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 10px;
}

.customer-page .customer-avail-head h2 {
    margin: 0;
    color: #111820;
    font-size: 1rem;
    font-weight: 800;
}

.customer-page .customer-avail-head small {
    color: #68717d;
    font-size: 0.75rem;
}

.customer-page .customer-avail-sample {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff4e5;
    color: #7a3d06;
    font-size: 0.75rem;
    line-height: 1.45;
}

.customer-page .customer-avail-row {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
}

.customer-page .customer-avail-row + .customer-avail-row {
    border-top: 1px solid #dfe4e8;
}

.customer-page .customer-avail-name {
    color: #68717d;
    font-size: 0.875rem;
}

.customer-page .customer-avail-count {
    margin: 0;
    color: #111820;
    font-size: 0.9375rem;
}

.customer-page .customer-avail-count b {
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.customer-page .customer-avail-count.is-no-signal {
    font-size: 0.875rem;
    font-weight: 700;
}

.customer-page .customer-avail-slots {
    display: grid;
    grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr));
    gap: 3px;
    margin-top: 6px;
}

.customer-page .customer-avail-slots i {
    height: 10px;
    border-radius: 3px;
    background: #55eca4;
}

.customer-page .customer-avail-slots :is(i.is-busy, i.is-laundry-left, i.is-fault) {
    background: #111820;
}

.customer-page .customer-avail-slots i.is-repair {
    background: repeating-linear-gradient(135deg, #e8a33d 0 3px, #fff4e5 3px 6px);
}

/* Silence is drawn as an empty outline, never as a colour that means something. */
.customer-page .customer-avail-slots i.is-unknown {
    background: #ffffff;
    box-shadow: inset 0 0 0 1.5px #b9c2c9;
}

.customer-page .customer-avail-why {
    margin: 3px 0 0;
    color: #68717d;
    font-size: 0.75rem;
    line-height: 1.4;
}

.customer-page .customer-avail-stamp {
    margin: 2px 0 0;
    color: #68717d;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ข The machine screen's one line. */
.customer-page .customer-avail-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
    color: #111820;
    font-size: 0.875rem;
}

.customer-page .customer-avail-line-label {
    color: #68717d;
}

.customer-page .customer-avail-line b {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.customer-page .customer-avail-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #55eca4;
    vertical-align: 1px;
}

/* ของฉัน as a full page. */
.customer-page .my-page {
    display: grid;
    gap: 12px;
}

/* Measured in the 2026-09-13 screenshot: the shared eyebrow's 0.16em tracking
   pulls the tone marks of "บัญชี LINE ของคุณ" away from their letters. The care
   guide resets it for the same reason. */
.customer-page .my-page-head .eyebrow {
    letter-spacing: 0;
}

.customer-page .my-page-head h1 {
    margin: 2px 0 0;
    color: #111820;
    font-size: clamp(1.625rem, 5vw, 2.125rem);
    line-height: 1.2;
}

.customer-page .my-page-content {
    display: grid;
    gap: 12px;
}

/* The preview draws the balance on the dark shell colour. Only here: the same
   card stays white on the machine screen, where it sits among other cards. */
.customer-page .my-page .customer-points {
    border: 0;
    background: #0a121b;
    box-shadow: none;
}

.customer-page .my-page .customer-points .eyebrow,
.customer-page .my-page .customer-points-value span,
.customer-page .my-page .customer-points-note {
    color: #aab4bd;
}

.customer-page .my-page .customer-points-value strong {
    color: #55eca4;
}

.customer-page .my-page-points-hint {
    margin: -6px 2px 0;
    color: #68717d;
    font-size: 0.8125rem;
}

/* The hint belongs to the balance; no balance, no hint. */
.customer-page .my-page .customer-points[hidden] + .my-page-points-hint {
    display: none;
}

/* ช่วยคุณคุ้มขึ้น (03/10/2026): the branch's promotions as savings, then the
   customer's own points. One quiet card per tip; the one running right now is
   tinted green because acting on it is possible this minute. No coloured side
   edge on a rounded card (Kim's rule, memory feedback-no-curved-colour-brackets). */
.customer-page .value-tips {
    display: grid;
    gap: 10px;
}

.customer-page .value-tips[hidden] {
    display: none;
}

.customer-page .value-tips-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.customer-page .value-tip {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #e6e6e2;
    border-radius: 12px;
    background: #fcfcfb;
}

.customer-page .value-tip[hidden] {
    display: none;
}

.customer-page .value-tip.is-on {
    border-color: #bfe8cf;
    background: #eefaf2;
}

.customer-page .value-tip strong {
    color: #111820;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
}

.customer-page .value-tip small {
    color: #68717d;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.customer-page .value-tip.is-on small {
    color: #177943;
}

.customer-page .my-page-section-title {
    margin: 6px 2px 0;
    color: #111820;
    font-size: 1.0625rem;
    font-weight: 800;
}

.customer-page .my-page-state {
    margin: 0;
    padding: 16px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    background: #ffffff;
    color: #111820;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.customer-page .my-page-state p {
    margin: 0;
}

.customer-page .my-page-open-line {
    display: block;
    margin-top: 12px;
    padding: 14px 18px;
    border-radius: 999px;
    background: #06c755;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.customer-page .my-page-state .pay-button {
    width: 100%;
    margin-top: 12px;
}

.customer-page .my-page .branch-line-contact {
    margin-top: 0;
}



/* ---------------------------------------------------------------------------
   Navy hero (Kim, 22/09/2026, reference "B", second pass).

   The top of every customer screen is one deep royal-blue surface with soft
   white light in it: the topbar, the step rail and the FIRST card all sit on
   the navy, and that card turns into frosted glass with white text (the
   reference's "safe to spend" card). The rest of the page then continues on a
   light sheet whose top corners are rounded and ride up over the navy.

   Colour and layout only: no markup changes, no new controls. The navy under
   the first card and the sheet's rounded lip are the card's own ::before and
   ::after, sized from the card, so the band always ends just below whatever
   height the card turns out to be (Thai/English, one or two lines).
   --------------------------------------------------------------------------- */

.customer-page {
    --hero-navy-top: #0a1d5a;
    --hero-navy-mid: #10308a;
    --hero-navy-low: #1a44ad;
    --hero-glow: rgba(255, 255, 255, 0.24);
    --hero-glow-soft: rgba(150, 190, 255, 0.30);
    --hero-sheet: #f7f9fa;                 /* the page wash (customer-app.css --color-background) */
    --hero-radius: 30px;
    overflow-x: clip;
}

/* --- topbar -------------------------------------------------------------- */
.customer-page .customer-topbar {
    position: relative;
    border-bottom: 0;
    background:
        radial-gradient(240px 56px at 88% 0%, var(--hero-glow) 0%, transparent 100%),
        radial-gradient(200px 48px at 8% 0%, var(--hero-glow-soft) 0%, transparent 100%),
        linear-gradient(180deg, var(--hero-navy-top) 0%, var(--hero-navy-mid) 100%);
}

.customer-page .customer-brand-tagline { color: rgba(226, 235, 255, 0.72); }

.customer-page .customer-brand-wordmark strong {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

.customer-page .customer-back,
.customer-page .customer-topbar .language-switch {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Screens with no known first card (closed shop, unknown machine, care
   labels): the topbar alone is the band, with the sheet's rounded lip. */
.customer-page .customer-topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: var(--hero-radius);
    border-radius: var(--hero-radius) var(--hero-radius) 0 0;
    background: var(--hero-sheet);
}

.customer-page:has(.customer-main > .customer-steps) .customer-topbar::after,
.customer-page:has(.customer-main > .branch-picker) .customer-topbar::after,
.customer-page:has(.customer-main > .my-page) .customer-topbar::after {
    display: none;
}

.customer-page:not(:has(.customer-main > .customer-steps)):not(:has(.customer-main > .branch-picker)):not(:has(.customer-main > .my-page)) .customer-topbar .topbar-inner {
    padding-bottom: calc(8px + var(--hero-radius) - 6px);
}

/* --- the step rail: full-bleed navy, no edge of its own ------------------ */
.customer-page .customer-main > .customer-steps {
    position: relative;
    z-index: 2;                            /* above the first card's navy ::before */
    margin-top: -18px;                     /* cancels .customer-main's 18px top inset */
    margin-bottom: 0;
    margin-inline: calc(50% - 50vw);
    padding: 20px calc(50vw - 50%) 10px;
    /* Transparent: the first block's navy ::before reaches up under the rail,
       so topbar -> rail -> machine is one surface with no seam. */
    background: none;
}

.customer-page .customer-steps .customer-step::before { background: rgba(255, 255, 255, 0.22); }
.customer-page .customer-steps .customer-step.is-done::before,
.customer-page .customer-steps .customer-step.is-current::before { background: rgba(255, 255, 255, 0.85); }

.customer-page .customer-steps .customer-step-no {
    border-color: rgba(255, 255, 255, 0.40);
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.85);
}

.customer-page .customer-steps .customer-step-label { color: rgba(226, 235, 255, 0.78); }

.customer-page .customer-steps .customer-step.is-done .customer-step-no,
.customer-page .customer-steps .customer-step.is-current .customer-step-no {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--hero-navy-top);
}

.customer-page .customer-steps .customer-step.is-current .customer-step-no {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18), 0 0 22px rgba(255, 255, 255, 0.45);
}

.customer-page .customer-steps .customer-step.is-done .customer-step-label { color: rgba(255, 255, 255, 0.88); }
.customer-page .customer-steps .customer-step.is-current .customer-step-label { color: #ffffff; }

/* --- the first card: frosted glass on the navy ---------------------------- */
/* Which element is "the first card", per screen:
   machine / order screens  -> the first panel after the rail
   branch home              -> the branch card
   "Me"                     -> the heading block (no card; it just sits on navy) */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child,
.customer-page .customer-main > .branch-picker > .branch-picker-head,
.customer-page .customer-main > .my-page > .my-page-head {
    /* position without z-index: the ::before/::after below then join the
       parent section's stacking context and paint UNDER this card's own
       glass background instead of over it. */
    position: relative;
    margin-bottom: 40px;                   /* room for the navy below it and the sheet lip */
}

.customer-page .customer-main > .customer-steps + section,
.customer-page .customer-main > .branch-picker,
.customer-page .customer-main > .my-page {
    position: relative;
    z-index: 1;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child,
.customer-page .customer-main > .branch-picker > .branch-picker-head {
    /* Kim, second review: no card on the navy at all. The block keeps its
       place and its content, and loses its box. */
    border: 0;
    background: none;
    box-shadow: none;
    color: #ffffff;
}

/* The navy behind the first card: from above it (under the rail/topbar)
   to 40px below it, full-bleed. */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child::before,
.customer-page .customer-main > .branch-picker > .branch-picker-head::before,
.customer-page .customer-main > .my-page > .my-page-head::before {
    content: "";
    position: absolute;
    z-index: -2;
    top: -280px;
    bottom: -40px;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    background:
        radial-gradient(55% 60% at 10% 85%, var(--hero-glow) 0%, transparent 70%),
        radial-gradient(45% 50% at 95% 20%, var(--hero-glow-soft) 0%, transparent 70%),
        linear-gradient(180deg, var(--hero-navy-mid) 0%, var(--hero-navy-low) 100%);
    pointer-events: none;
}

/* The sheet's rounded top lip, riding over the navy's last 30px. */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child::after,
.customer-page .customer-main > .branch-picker > .branch-picker-head::after,
.customer-page .customer-main > .my-page > .my-page-head::after {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: -41px;
    height: var(--hero-radius);
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    border-radius: var(--hero-radius) var(--hero-radius) 0 0;
    background: var(--hero-sheet);
    pointer-events: none;
}

/* Text on the glass. */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child :is(h1, h2, h3, p, .muted, dt, dd),
.customer-page .customer-main > .branch-picker > .branch-picker-head :is(h1, h2, h3, p, .muted),
.customer-page .customer-main > .my-page > .my-page-head :is(h1, p) {
    color: #ffffff;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child :is(p, .muted),
.customer-page .customer-main > .branch-picker > .branch-picker-head p:not(.eyebrow),
.customer-page .customer-main > .my-page > .my-page-head .eyebrow {
    color: rgba(226, 235, 255, 0.82);
}

.customer-page .customer-main > .branch-picker > .branch-picker-head .eyebrow {
    color: rgba(226, 235, 255, 0.82);
    letter-spacing: 0.08em;
}

/* The chosen-machine card writes its lines in .lang-th/.lang-en spans that
   carry their own colours; on the glass they follow the line they sit in. */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child :is(strong, small, .lang-th, .lang-en) {
    color: inherit;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child strong {
    color: #ffffff;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child small {
    color: rgba(226, 235, 255, 0.85);
}

/* Branch home and "Me" have no rail: the topbar grows and the page slides up
   under it, so the first card/heading sits on the navy too. */
.customer-page:has(.customer-main > .branch-picker) .customer-topbar,
.customer-page:has(.customer-main > .my-page) .customer-topbar {
    padding-bottom: 64px;
}

.customer-page:has(.customer-main > .branch-picker) .customer-main,
.customer-page:has(.customer-main > .my-page) .customer-main {
    position: relative;
    z-index: 11;                           /* the topbar is z-index 10 (app.css) */
    margin-top: -64px;
}

.customer-page .customer-main > .my-page > .my-page-head { padding: 4px 4px 6px; }

@media (prefers-reduced-transparency: reduce) {
    .customer-page .customer-back,
    .customer-page .customer-topbar .language-switch { background: var(--hero-navy-low); }
}

/* The chosen machine, standing on the navy (Kim: "take the washer out of its
   card and put it on the blue, with a nice shadow"). The picture grows and
   centres, a soft floor shadow and a white halo sit under it, and the text
   follows centred below. This is also what makes the navy take about half
   the screen, as it does in the reference. */
.customer-page .customer-main > .customer-steps + section > .chosen-machine {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 6px 0 10px;
    text-align: center;
}

.customer-page .chosen-machine .chosen-machine-art {
    position: relative;
    width: auto;
    height: auto;
    padding: 6px 28px 18px;
}

/* halo behind, floor shadow under */
.customer-page .chosen-machine .chosen-machine-art::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -18% -30% 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.customer-page .chosen-machine .chosen-machine-art::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 18%;
    right: 18%;
    bottom: 6px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(2, 8, 36, 0.60), rgba(2, 8, 36, 0) 100%);
    filter: blur(2px);
    pointer-events: none;
}

.customer-page .chosen-machine .chosen-machine-icon {
    position: relative;
    z-index: 1;
    width: auto;
    height: clamp(150px, 42vw, 190px);
    filter:
        drop-shadow(0 18px 18px rgba(2, 8, 36, 0.45))
        drop-shadow(0 0 24px rgba(255, 255, 255, 0.18));
}

.customer-page .chosen-machine .chosen-machine-no {
    z-index: 2;
    box-shadow: 0 6px 16px rgba(2, 8, 36, 0.35);
}

.customer-page .chosen-machine .chosen-machine-text {
    justify-items: center;
    gap: 6px;
}

.customer-page .chosen-machine .chosen-machine-line {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* The line is the page's H1 now (29/09/2026 review: the first heading a screen
   reader met was "Rewards at this branch"); it was a <strong>. The rules that
   size a heading in the old dark hero (app.css `.journey-panel h1`: a 12px/16px
   margin and an 11ch cap; `.customer-page .journey-panel h1` above: heading
   colour) would move it, so the ones the <strong> never had are put back. Size,
   tracking and leading already come from the rule above, which out-ranks them;
   the colour on the navy comes from the hero rules. Margin and cap are the two
   that had to be reset, and the weight is the strong's, not the UA's 700. */
.customer-page .journey-panel.chosen-machine h1.chosen-machine-line {
    margin: 0;
    max-width: none;
    font-weight: 800;
}

.customer-page .chosen-machine .chosen-machine-status {
    justify-self: center;
    margin-top: 4px;
}

/* Branch home and "Me": the page sits above the topbar (z-index 11), so the
   navy behind their first block must start below the topbar's own content,
   or it paints over the wordmark and the back button. The topbar's extra
   bottom padding is navy already, so the two meet on the same colour. */
.customer-page .customer-main > .branch-picker > .branch-picker-head::before,
.customer-page .customer-main > .my-page > .my-page-head::before {
    top: -26px;
}

/* --- Kim, third review (22/09/2026) ------------------------------------- */

/* 1. The machine fills the space he marked; the text below stays where it
      was. The picture grows by taking the art block's own padding and the
      gaps above it, not by pushing the text down. */
.customer-page .customer-main > .customer-steps + section > .chosen-machine {
    gap: 8px;
    padding-top: 0;
}

.customer-page .chosen-machine .chosen-machine-art {
    margin-top: -18px;                     /* the picture has empty space above the machine */
    padding: 0 18px 4px;
}

.customer-page .chosen-machine .chosen-machine-icon {
    height: clamp(190px, 56vw, 230px);
}

/* 2. The branch's LINE contact card renders as an empty green box when the
      branch has no LINE on file (KHT demo branch). With nothing inside it,
      it is removed rather than left as a blank bar. */
.customer-page .branch-line-contact:not(:has(*)) {
    display: none;
}

/* 3. Buttons: the mint/green action buttons become the band's navy, so the
      page reads as one theme. Kim: buttons that go to LINE stay LINE green
      (receipt-to-LINE, contact-the-shop-on-LINE, open-in-LINE), and so do the
      status colours (free/busy dots, the "done" stripe): data, not buttons. */
.customer-page .pay-button,
.customer-page .order-next-step {
    border-color: transparent;
    background: linear-gradient(180deg, var(--hero-navy-low) 0%, var(--hero-navy-mid) 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(16, 48, 138, 0.28);
}

.customer-page :is(.pay-button, .order-next-step):hover {
    background: linear-gradient(180deg, #2150c2 0%, var(--hero-navy-low) 100%);
    color: #ffffff;
}

.customer-page :is(.pay-button, .order-next-step) :is(span, strong, svg) {
    color: inherit;
    fill: currentColor;
}

/* The tab bar's highlighted tab uses the same navy instead of mint. */
.customer-page .customer-tab--hero .customer-tab-icon {
    background: var(--hero-navy-mid);
    color: #ffffff;
}

.customer-page .customer-tab.is-active {
    color: var(--hero-navy-mid);
}

.customer-page .customer-tab.is-active .customer-tab-icon {
    background: #e6edff;
}

/* The machine-number tag rode up into the rail's "Pay" label once the art
   was pulled up; it sits on the machine's shoulder instead. */
.customer-page .chosen-machine .chosen-machine-no {
    top: 26px;
}

/* Kim, fourth review: the block under the machine (title, sheet and the page
   below it) moves up and overlaps the machine's floor shadow, so the space
   above and below the machine balances. */
.customer-page .chosen-machine .chosen-machine-art {
    margin-bottom: -26px;
}

.customer-page .chosen-machine .chosen-machine-text {
    position: relative;
    z-index: 2;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child {
    margin-bottom: 34px;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child::before {
    bottom: -34px;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child::after {
    bottom: -35px;
}

/* --- Kim, fifth review (22/09/2026): the navy and the machine stay put, and
       the white sheet is the top layer that slides over them on scroll. -----

   Machine and order screens (the ones with the step rail):
   - the topbar, the rail and the first block (the machine / the status head,
     with the navy behind it) are sticky at their own natural offsets, so at
     the top of the page nothing moves, and on scroll they hold still;
   - everything after the first block is the "sheet": raised above them, with
     a full-bleed page-wash box-shadow clipped to the half-gaps around each
     card, so the cards and the space between them read as one sheet sliding
     up over the navy. The first card of the sheet carries the rounded top
     edge (clip-path round) in place of the lip.
   The offsets are the measured heights at 375 px (topbar 60, rail 74). If a
   device renders them taller, the hero moves by that difference before it
   holds; it never overlaps the sheet wrongly, because the sheet always wins
   on z-index. */
.customer-page:has(.customer-main > .customer-steps) {
    --hero-topbar-h: 60px;
    --hero-rail-h: 74px;
}

.customer-page:has(.customer-main > .customer-steps) .customer-topbar {
    position: sticky;
    top: 0;
}

.customer-page .customer-main > .customer-steps {
    position: sticky;
    top: var(--hero-topbar-h, 60px);
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child {
    position: sticky;
    top: calc(var(--hero-topbar-h, 60px) + var(--hero-rail-h, 74px));
    z-index: 0;
}

/* The old lip rode on the machine block; the sheet now brings its own. */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child::after {
    display: none;
}

/* The sheet: every block after the hero, in this section and after it. */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child ~ *,
.customer-page .customer-main > .customer-steps + section ~ :not(.payment-modal):not(.order-refusal-dialog) {
    /* never the payment modal: a clip-path on it would clip its fixed sheet. Nor the
       refusal dialog: this rule's position: relative and 100vmax shadow pinned it to the
       page top and drew a white band under it (Kim's HC40-1 bench, 14/10/2026, CUST-POPUP-VIEWPORT-1) */
    position: relative;
    z-index: 3;
    box-shadow: 0 0 0 100vmax var(--hero-sheet);
    /* The wash reaches DOWN only (120px, more than any gap between two
       blocks here), and the next block paints over it. Reaching up as well
       covered the bottom of the card above: the next block is later in the
       DOM at the same z-index. */
    clip-path: inset(0 calc((100vw - 100%) / -2) -120px calc((100vw - 100%) / -2));
}

/* The sheet's first VISIBLE block, whichever it is on this branch (LINE
   contact card, availability line, points card or rewards): the first
   sibling after the hero that is shown and is not preceded by another shown
   sibling. It reaches up to the hero and carries the rounded top corners. A
   block counts as hidden when it has [hidden] or is the empty LINE card.
   (Kim, 22/09 22:12: on production the LINE card and the points card are
   present, and the fixed selector list missed them.) */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child ~ :not([hidden]):not(.branch-line-contact:not(:has(*))):not(.journey-panel:first-child ~ :not([hidden]):not(.branch-line-contact:not(:has(*))) ~ *) {
    clip-path: inset(-52px calc((100vw - 100%) / -2) -120px calc((100vw - 100%) / -2) round var(--hero-radius) var(--hero-radius) 0 0);
}

/* Sheet blocks that have no card background of their own (the rewards
   section is a heading plus a grid) take the page wash, or the navy and the
   machine would show through between their cards. */
.customer-page .customer-main > .customer-steps + section > .customer-showcase,
.customer-page .customer-main > .customer-steps + section > .customer-consent,
.customer-page .customer-main > .customer-steps + section > .customer-referral {
    background-color: var(--hero-sheet);
}

/* Layer order on the rail screens, top to bottom: topbar (10) > sheet (3) >
   rail (2) > hero (0). The section around them must NOT be a stacking
   context, or its z-index caps the sheet below the rail and the step numbers
   float over the cards on a long scroll. The hero is its own context (z 0),
   so its navy ::before (z -2) still paints under the machine. */
.customer-page .customer-main > .customer-steps + section {
    z-index: auto;
}

/* The navy runs on well under the sheet, so the sheet's rounded top corners
   have navy behind them to show against (it ended 34px below the machine,
   which left the corners with nothing under them). */
.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child::before {
    bottom: -140px;
}

/* Kim, 22/09 22:2x: "ease the card to a stop when it slides". Two resting
   points only: the page top (hero fully visible) and the sheet's top edge
   just under the topbar (sheet fully up). Proximity, not mandatory: a scroll
   that ends near one of them glides the last bit and settles there; a scroll
   that ends in the middle of the long program list stays where the reader
   left it. Motion comes from the browser's own snap scroll, which reduced-
   motion settings already tame, so no animation is added here. */
html:has(body.customer-page .customer-main > .customer-steps) {
    scroll-snap-type: y proximity;
}

.customer-page:has(.customer-main > .customer-steps) .customer-topbar {
    scroll-snap-align: start;
}

.customer-page .customer-main > .customer-steps + section > .journey-panel:first-child ~ :not([hidden]):not(.branch-line-contact:not(:has(*))):not(.journey-panel:first-child ~ :not([hidden]):not(.branch-line-contact:not(:has(*))) ~ *) {
    scroll-snap-align: start;
    scroll-margin-top: calc(var(--hero-topbar-h, 60px) + 12px);
}

/* ---------------------------------------------------------------------------
   A dryer's list follows its panel (Kim, 24/09/2026 ~10:05).

   "ให้หน้ามือถือเลือกตามโปรแกรมที่แผงเลือกไว้ ทำเอฟเฟกขอบใส+สีรุ้งวิ่งแบบนี้ที่ปุ่ม
   บนมือถือให้ตรงกับที่แผงเลือก ให้ลูกค้ากดเปลี่ยนเอง", pointing at the admin's
   Run machine button (admin-shell.css, "a clear rim, the rainbow seen THROUGH
   it"). The row the panel has selected carries that rim whichever row is
   ticked, and says so in words (.program-panel-badge), so the meaning never
   rests on colour or motion alone. Same three layers as the button, inside the
   card's own stacking context:
     ::before  the rainbow, 6px past the card, blurred, turned once every 10 s;
     ::after   the card's face with the glass over the rainbow;
     the row's content above both.
   --------------------------------------------------------------------------- */
@property --ooo-panel-rainbow-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes ooo-panel-rainbow-turn {
    to {
        --ooo-panel-rainbow-angle: 360deg;
    }
}

.customer-page .program-option.is-panel-choice .program-content {
    position: relative;
    isolation: isolate;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.customer-page .program-option.is-panel-choice .program-content::before {
    content: "";
    position: absolute;
    inset: -8px;
    z-index: -2;
    border-radius: 16px;
    background: conic-gradient(from var(--ooo-panel-rainbow-angle), #d896ff, #78a0ff, #6ee0e2, #9be8a8, #e8e46e, #ff9a8c, #d896ff);
    filter: blur(7px);
    opacity: 0.9;
    animation: ooo-panel-rainbow-turn 10s linear infinite;
    pointer-events: none;
}

.customer-page .program-option.is-panel-choice .program-content::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.95),
        0 0 0 4px rgba(255, 255, 255, 0.22);
    outline: 1px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
    pointer-events: none;
}

/* Ticked as well: the ticked row's own mint face and brand edge, under the rim. */
.customer-page .program-option.is-panel-choice input:checked + .program-content::after {
    background: #ecfffb;
    box-shadow:
        0 0 0 1px var(--brand),
        0 0 0 4px rgba(255, 255, 255, 0.22);
}

.customer-page .program-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: #e4fbef;
    color: #137b51;                        /* 4.9:1 on #e4fbef */
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.4;
}

.customer-page .program-panel-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* The payment sheet's line for a dryer: which heat, and where to change it. */
.customer-page .pay-dryer-hint {
    margin: 10px 0 0;
    padding: 11px 13px;
    border: 1px solid #b9d3f2;
    border-radius: 10px;
    background: #eef6ff;
    color: #1d4f86;                        /* 7.2:1 on #eef6ff */
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
}

/* The step rail's labels are written for the navy under the first card. When
   that card's section is hidden - the points step and the payment step close
   it - the rail sat on the page wash in white: Kim's phone, 24/09/2026 10:15,
   showed "1 2 3" and nothing readable. The rail carries its own navy then. */
.customer-page .customer-main > .customer-steps:has(+ section[hidden]) {
    padding-bottom: 18px;
    border-radius: 0 0 var(--hero-radius) var(--hero-radius);
    background: linear-gradient(180deg, var(--hero-navy-mid) 0%, var(--hero-navy-low) 100%);
}

/* The resume card sits on the white sheet now, above the first card there
   (placeResumeBanner() in public/index.php), not wedged between the topbar
   and the hero (Kim, 24/09/2026: "การ์ดสีส้มมันแทรกแปลกๆ"). */
.customer-page .branch-picker-head + .resume-banner,
.customer-page .journey-panel:first-child + .resume-banner,
.customer-page .my-page-head + .resume-banner {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .customer-page .program-option.is-panel-choice .program-content::before {
        animation: none;
    }
}

@media (prefers-contrast: more) {
    /* No blur, no glass: a solid 3px edge in the page's ink carries the mark. */
    .customer-page .program-option.is-panel-choice .program-content::before {
        inset: -3px;
        filter: none;
        opacity: 1;
        background: var(--color-ink, #0a121b);
        animation: none;
    }

    .customer-page .program-option.is-panel-choice .program-content::after {
        outline: none;
        box-shadow: none;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .customer-page .program-option.is-panel-choice .program-content::before {
        filter: none;
        opacity: 1;
    }

    .customer-page .program-option.is-panel-choice .program-content::after {
        box-shadow: 0 0 0 1px #ffffff;
        outline: none;
    }
}

/* ---------------------------------------------------------------------------
   The landing: the first screen after a scan (Kim, 24/09/2026 ~12:0x, on a
   sample picture, approved on a preview ~12:2x): the scanned model's own
   picture on blue with room around it, what the machine is, a two-line title,
   one sentence, and two buttons. index.php $showLanding draws it in front of
   the machine screen, which renders underneath; setUpLanding() makes the rest
   inert while it shows and dismissLanding() takes it away.
   --------------------------------------------------------------------------- */
/* :has(), so <body> keeps the one class care_guide.php shares with this page;
   a browser without it scrolls the covered page, which nobody can see. */
body.customer-page:has(> .customer-landing) {
    overflow: hidden;
}

.customer-page .customer-landing {
    --landing-top: #0a2260;
    --landing-mid: #173f9e;
    --landing-deep: #07142f;
    --landing-glow: rgba(96, 156, 255, 0.42);
    --landing-ink: #0b1f4d;
    --landing-text-soft: rgba(255, 255, 255, 0.78);
    --landing-gutter: 1.75rem;
    position: fixed;
    inset: 0;
    z-index: 70;                           /* above the payment sheet (60) and the tab bar */
    display: flex;
    flex-direction: column;
    overflow: hidden auto;
    isolation: isolate;
    color: #ffffff;
    background: radial-gradient(130% 75% at 50% 30%, var(--landing-mid) 0%, var(--landing-top) 52%, var(--landing-deep) 100%);
}

.customer-page .customer-landing-hero {
    position: absolute;
    inset: 0;
    display: grid;
    justify-items: center;
    align-content: start;
    z-index: -1;
    pointer-events: none;
}

.customer-page .customer-landing-hero::before {
    content: "";
    position: absolute;
    top: 13%;
    left: 50%;
    width: 78vw;
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--landing-glow), transparent);
    transform: translateX(-50%);
    filter: blur(10px);
}

.customer-page .customer-landing-hero img {
    position: relative;
    height: min(47vh, 440px);
    height: min(47svh, 440px);
    width: auto;
    max-width: 78vw;
    margin-top: 13vh;
    margin-top: 13svh;
    object-fit: contain;
    filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.42));
}

/* The words sit on a wash that darkens toward the bottom, so they read over
   the lower half of the machine the way the sample's words sit on its photo. */
.customer-page .customer-landing-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 58%;
    background: linear-gradient(to bottom, rgba(7, 20, 47, 0) 0%, rgba(7, 20, 47, 0.5) 28%, rgba(7, 20, 47, 0.9) 55%, var(--landing-deep) 76%);
}

.customer-page .customer-landing-brand {
    align-self: center;
    max-width: calc(100% - 2 * var(--landing-gutter));
    margin-top: max(1.25rem, env(safe-area-inset-top));
    padding: 0.5rem 1.1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-page .customer-landing-copy {
    margin-top: auto;
    padding: 0 var(--landing-gutter);
}

.customer-page .customer-landing-eyebrow {
    margin: 0 0 0.9rem;
    color: var(--landing-text-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

html[lang="en"] .customer-page .customer-landing-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.customer-page .customer-landing-title {
    margin: 0;
    color: #ffffff;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.005em;
}

html[lang="en"] .customer-page .customer-landing-title {
    font-size: 2.35rem;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.customer-page .customer-landing-lede {
    max-width: 20.5rem;
    margin: 1rem 0 0;
    color: var(--landing-text-soft);
    font-size: 0.9rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.customer-page .customer-landing-actions {
    display: grid;
    gap: 0.8rem;
    padding: 2.25rem var(--landing-gutter) max(2.5rem, calc(env(safe-area-inset-bottom) + 1.25rem));
}

.customer-page .customer-landing-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.25rem;                   /* 52 px: over the 44 px tap floor */
    padding: 0 1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.customer-page .customer-landing-button.is-primary {
    border: 0;
    background: #ffffff;
    color: var(--landing-ink);
}

.customer-page .customer-landing-button.is-secondary {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.07);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #ffffff;
}

.customer-page .customer-landing-button svg {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
}

.customer-page .customer-landing-button:focus-visible {
    outline: 3px solid #9cc2ff;
    outline-offset: 3px;
}

@media (prefers-reduced-transparency: reduce) {
    .customer-page .customer-landing-brand,
    .customer-page .customer-landing-button.is-secondary {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: #13306f;
    }
}

@media (prefers-contrast: more) {
    .customer-page .customer-landing {
        --landing-text-soft: #ffffff;
    }

    .customer-page .customer-landing-hero::after {
        background: linear-gradient(to bottom, rgba(7, 20, 47, 0) 0%, var(--landing-deep) 50%);
    }

    .customer-page .customer-landing-button.is-secondary {
        border-color: #ffffff;
        background: var(--landing-deep);
    }
}

/* ---------------------------------------------------------------------------
   Cards float off the page, the same as the admin (Kim, 29/09/2026: "ใส่เงา
   หน้าลูกค้าด้วย", after approving the admin preview). Measured on production
   the same day at a 390px phone width: the order card, the empty state and the
   care cards already had a shadow; "Free right now", the shortcut row, the
   showcase card, the payment card, the points card and the history list did
   not. One recipe for every top-level card now; a card inside another card
   gets a lighter one. The html prefix beats .my-page .customer-points
   { box-shadow: none } at (0,3,0).
   --------------------------------------------------------------------------- */
html body.customer-page :is(.order-card, .payment-card, .journey-panel, .customer-points, .my-points-list, .customer-avail, .customer-shortcuts, .customer-showcase-card, .branch-line-contact--card, .empty-state, .care-card) {
    box-shadow:
        0 1px 2px rgba(20, 24, 33, 0.05),
        0 10px 28px -6px rgba(20, 24, 33, 0.14);
}

html body.customer-page :is(.order-card, .payment-card, .journey-panel, .customer-points, .my-points-list, .customer-avail, .customer-shortcuts, .customer-showcase-card, .branch-line-contact--card, .empty-state, .care-card)
    :is(.order-card, .payment-card, .journey-panel, .customer-points, .my-points-list, .customer-avail, .customer-shortcuts, .customer-showcase-card, .branch-line-contact--card, .empty-state, .care-card) {
    box-shadow:
        0 1px 2px rgba(20, 24, 33, 0.06),
        0 3px 10px rgba(20, 24, 33, 0.06);
}

/* ---------------------------------------------------------------------------
   No band at the top (Kim, 29/09/2026: "ลบแถบน้ำเงินนี้ออก ให้เหลือแต่ BG
   น้ำเงิน"). The topbar painted its own darker gradient (navy-top to navy-mid
   with two glows), and on branch home and "Me" the first block's navy starts
   26px under it at navy-mid, so the back button sat on a darker strip with a
   visible seam. The topbar is now plain navy-mid, the colour the navy below
   starts at, so the two read as one background. It stays opaque, which is
   what the reduced-transparency rules above need (white wordmark, 02/09).
   --------------------------------------------------------------------------- */
html body.customer-page .customer-topbar {
    background: var(--hero-navy-mid);
}

/* pstack CA2-02 (08/10/2026): the countdown's spoken twin - same off-screen
   technique as .receipt-text above. */
.pay-countdown-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   The free-wash band (T-FW-CUSTOMER-1, Kim 08/10/2026,
   docs/design/FREE-WASH-OPENING-PROMO.md §6).

   This machine is inside an active opening campaign, so the offer sits between
   the "เลือกโปรแกรม" heading and the programme list. It is the customer app's
   own mint-soft field (.customer-redeem-balance's face: mint-soft #e4fbef, a
   #b7f0d3 hairline and deep-mint text), rounded to the card radius of 14px so
   it reads as one of this page's cards, not a banner bolted on top. No Swiss
   tokens: Kim, 08/10/2026 - "แอปลูกค้าไม่ใช่สไตน์ swiss design".
   --------------------------------------------------------------------------- */
.customer-page .free-wash-band {
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
    padding: 14px 16px;
    border: 1px solid #b7f0d3;
    border-radius: 14px;
    background: #e4fbef;
}

/* The reward line, in the deep mint the points card gives its own number; it is
   the reason to read the field, so it carries the weight. The "used today" line
   swaps in here and goes ink-coloured instead - it is a fact, not an offer. */
.customer-page .free-wash-band-head {
    margin: 0;
    font-weight: 800;
    font-size: 0.938rem;
    line-height: 1.35;
    color: #137b51;
}

.customer-page .free-wash-band.is-used .free-wash-band-head {
    color: #111820;
}

/* The condition, in the muted grey the small print uses everywhere here. */
.customer-page .free-wash-band-until {
    margin: 0;
    font-size: 0.813rem;
    font-weight: 400;
    line-height: 1.4;
    color: #68717d;
}

/* The way in for a phone LINE has not identified yet. A link-styled button, not
   a filled one: the pay button below is the screen's one filled action. 44px
   minimum, because it is a tap target on a phone held at a machine. */
.customer-page .free-wash-band-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 6px 0 0;
    padding: 0 16px;
    border: 1px solid #137b51;
    border-radius: 12px;
    background: #ffffff;
    color: #137b51;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* display: inline-flex above would otherwise beat the [hidden] attribute, the
   same trap .customer-points[hidden] is written down for. */
.customer-page .free-wash-band-signin[hidden] {
    display: none;
}

.customer-page .free-wash-band-signin:active {
    background: #f2fdf7;
}

