/* Wave checkout self-enrollment (MPD-11026).
 * Sunlight-readable, thumb-first UI: white ground, deep-green identity,
 * crop-tinted produce tiles, prices as the display type. */

:root {
    /* Brand palette sampled from the official Bindal sa bopp logo. */
    --green-deep: #14532d;
    --green-primary: #047c35;
    --amber: #feb100;
    --ink: #111827;
    --ink-soft: #4b5563;
    --paper: #ffffff;
}

.enroll-page {
    justify-content: flex-start;
    /* Bottom clearance: the last row must scroll clear of the fixed
       72px guide speaker instead of hiding a price under it. */
    padding: 12px 12px calc(104px + env(safe-area-inset-bottom));
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* A repeated digit is two quick taps on one key, which mobile Chrome reads
   as double-tap-to-zoom and swallows (MPD-11337). Every tap target in the
   flow is a button; the sheet mounts on body, outside the page wrapper.
   Pinch zoom stays, so the viewport meta is untouched. */
.enroll-page button,
.sheet button {
    touch-action: manipulation;
}

/* --- paid banner ------------------------------------------------------- */

.paid-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: var(--green-deep);
    color: var(--paper);
    border-radius: 18px;
    padding: 14px 18px;
    box-sizing: border-box;
}

.paid-banner__icon {
    width: 52px;
    height: 52px;
    flex: none;
}

.paid-banner__text {
    text-align: left;
}

.paid-banner__title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.15;
}

.paid-banner__amount {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #bbf7d0;
}

/* The banner is also the "Faire un autre paiement" button: one green pill,
   the confirmation on top and the next payment as its subtitle. */
.paid-form {
    width: 100%;
    margin: 0;
}

button.paid-banner {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.paid-banner__text > span {
    display: block;
}

.paid-banner__amount[hidden] {
    display: none;
}

.paid-banner__again {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--paper);
    opacity: 0.9;
}

/* --- greeting ---------------------------------------------------------- */

.greeting {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
}

.greeting__wave {
    font-size: 22px;
}

/* Status card (MPD-11126/MPD-11052): one green container for everything
   that answers "whose account, and how is it doing" — phone + village
   identity, a hairline rule, then the savings balance and goal. Reads as
   one status, not two disconnected facts. */
.status-card {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: #f0fdf4;
    border: 1.5px solid var(--green-primary);
    border-radius: 12px;
}

.status-card__id {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
    gap: 8px;
}

.status-card__rule {
    height: 1px;
    margin: 10px 0;
    background: rgba(20, 83, 45, 0.14);
}

.account__icon {
    font-size: 17px;
    line-height: 1;
}

.account__value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    /* The number must never wrap mid-digit-group on a narrow screen. */
    white-space: nowrap;
}

.account__prefix {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
}

.account__number {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--green-deep);
}

/* Divider + village badge (MPD-11052): shares the phone pill rather than
   getting its own card — it is the same "which account am I on" glance,
   not a second fact to scan. Pushed to the row's far edge, mirroring the
   balance/goal split below it. */
.account__divider {
    width: 1px;
    align-self: stretch;
    background: rgba(20, 83, 45, 0.18);
}

.account__village {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-left: auto;
    /* Lets account__village-name actually shrink/ellipsize instead of
       forcing the whole row wider — a flex item's default min-width is
       its content's full width, which would defeat text-overflow. */
    min-width: 0;
}

/* On /enroll/ the village is a button (MPD-11485): tapping it opens the
   village-code screen. It keeps the look of the plain text it replaced. */
button.account__village {
    border: 0;
    background: none;
    padding: 4px 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.account__village--empty .account__village-name {
    max-width: none;
    color: var(--green-deep);
}

.account__village-icon {
    font-size: 14px;
}

/* Truncates a long village name on a small screen ("Village Name…") while
   the code that follows it never does — the code is the part ops and the
   farmer actually rely on to be readable in full. */
.account__village-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
}

.account__village-code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--green-deep);
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- sections ---------------------------------------------------------- */

.enroll {
    width: 100%;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0;
    text-align: left;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 8px;
}

/* Sign-out (MPD-11372): a red ❌ beside the phone number it signs out of
   (PR #188 review) — icon only, never text, and red-rimmed because it
   undoes the identity next to it rather than advancing the flow. */
.logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(220, 38, 38, 0.4);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.logout-button:disabled {
    opacity: 0.45;
    cursor: default;
}

/* --- balance (nested inside .status-card, see above) --------------------- */

.balance__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Narrow screens: the goal cell drops to its own line as a unit —
       never split an amount mid-number. */
    flex-wrap: wrap;
    gap: 6px 10px;
}

.balance__cell {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.balance__icon {
    font-size: 19px;
}

.balance__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.balance__amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--green-deep);
    white-space: nowrap;
}

.balance__goal {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink-soft);
    white-space: nowrap;
}

/* Small phones (the field devices): tighter numbers, same hierarchy. */
@media (max-width: 380px) {
    .balance__icon {
        font-size: 16px;
    }

    .balance__label {
        font-size: 11px;
    }

    .balance__amount {
        font-size: 18px;
    }

    .balance__goal {
        font-size: 15px;
    }

    .account__village-name {
        max-width: 70px;
    }
}

/* Distance to the total savings goal, readable without words. */
.balance__track {
    margin-top: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(20, 83, 45, 0.14);
    overflow: hidden;
}

.balance__fill {
    height: 100%;
    border-radius: 999px;
    background: var(--green-primary);
    transition: width 0.6s ease;
}

.balance__fill--full {
    background: var(--amber);
}

/* --- catalog grid ------------------------------------------------------- */

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

.pkg-tile {
    position: relative;
    border: 2px solid var(--tile-rim, #d1d5db);
    background: var(--tile-bg, #f3f4f6);
    border-radius: 18px;
    padding: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pkg-tile:active {
    transform: scale(0.97);
}

.pkg-tile--locked {
    opacity: 0.45;
    filter: grayscale(0.35);
}

.pkg-tile--locked:active {
    transform: none;
}

/* Two-tap pick (MPD-11249 / MPD-11360): selected tile keeps the
   language chooser's green ring + glow. Held tiles already have a
   lighter ring; pick only adds weight. */
.pkg-tile--picked,
.held-tile--picked {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 4px rgba(4, 124, 53, 0.5);
}

.pkg-tile__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pkg-tile__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    padding-bottom: 88px;
}

.pkg-tile__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 8px 8px;
    background: linear-gradient(transparent, rgba(17, 24, 39, 0.78));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.pkg-tile__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--paper);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.pkg-tile__size {
    font-size: 12px;
    font-weight: 600;
    color: var(--paper);
    opacity: 0.92;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.pkg-tile__price {
    font-size: 20px;
    font-weight: 700;
    color: var(--paper);
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* A held package keeps its full-size box: green ring, quantity riding on
   top, package total in the overlay (new concept — replaces the shelf).
   Shares the pkg-tile child styles (photo, overlay, name, size, price). */
.held-tile {
    position: relative;
    border: 2px solid var(--green-primary);
    background: var(--tile-bg, #f3f4f6);
    border-radius: 18px;
    padding: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0 0 3px rgba(4, 124, 53, 0.25);
}

.held-tile:active {
    transform: scale(0.97);
}

.held-tile--static {
    cursor: default;
}

.held-tile--static:active {
    transform: none;
}

.held-tile__qty {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--green-primary);
    color: var(--paper);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 19px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ⏳ while any unit is still in the pipeline, ✔ once all delivered. */
.held-tile__state {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--green-primary);
    color: var(--paper);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 15px;
    line-height: 26px;
    text-align: center;
}

.held-tile__state--pending {
    background: var(--amber);
    font-size: 14px;
}

/* Struck-through catalogue total above the discounted one (MPD-11090). */
.pkg-tile__price--list {
    font-size: 13px;
    font-weight: 600;
    color: var(--paper);
    opacity: 0.85;
    text-decoration: line-through;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Quantity promo runs on this package (MPD-11090). */
.pkg-tile__promo {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 17px;
    line-height: 30px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Two-tap pick (MPD-11360): catalog face stays; reserved slot fills. */
.pkg-tile__action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    width: 100%;
    margin: 4px 0 0;
    box-sizing: border-box;
}

.pkg-tile__confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(4, 124, 53, 0.5);
    white-space: nowrap;
    box-sizing: border-box;
    animation: arm-face-in 0.28s ease both;
}

.pkg-tile__confirm-arrow {
    width: 16px;
    height: 16px;
    flex: none;
    display: block;
    color: var(--paper);
}

.pkg-tile__confirm-name {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--paper);
}

@keyframes arm-face-in {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- remaining photo sizing (sheet hero + quantity cards) ---------------- */

img.product-img {
    object-fit: contain;
}

img.sheet__emoji {
    width: 128px;
    height: 128px;
}

img.qty-card__icon {
    width: 26px;
    height: 26px;
}

/* --- crop tints (the produce stall) ------------------------------------- */

.tile--mais {
    --tile-bg: #fef3c7;
    --tile-rim: #f59e0b;
}
.tile--dap {
    --tile-bg: #dcfce7;
    --tile-rim: #16a34a;
}
.tile--mil {
    --tile-bg: #fef9c3;
    --tile-rim: #ca8a04;
}
.tile--riz {
    --tile-bg: #e0f2fe;
    --tile-rim: #0284c7;
}
.tile--bissap {
    --tile-bg: #fce7f3;
    --tile-rim: #db2777;
}
.tile--pasteque {
    --tile-bg: #fee2e2;
    --tile-rim: #dc2626;
}
.tile--gombo {
    --tile-bg: #ecfccb;
    --tile-rim: #65a30d;
}
.tile--niebe {
    --tile-bg: #fdeadd;
    --tile-rim: #b45309;
}
.tile--tomate {
    --tile-bg: #ffe4e6;
    --tile-rim: #f43f5e;
}
.tile--calthio {
    --tile-bg: #fae8ff;
    --tile-rim: #a21caf;
}
.tile--poulet {
    --tile-bg: #ffedd5;
    --tile-rim: #ea580c;
}
.tile--autre {
    --tile-bg: #f1f5f9;
    --tile-rim: #64748b;
}

/* --- speaker buttons ----------------------------------------------------- */

.speaker {
    border: 0;
    position: relative;
    background: var(--green-primary);
    color: var(--paper);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.speaker--guide {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 72px;
    height: 72px;
    box-shadow: 0 6px 18px rgba(20, 83, 45, 0.35);
    animation: speaker-pulse 2.2s ease-in-out infinite;
    z-index: 30;
}

.speaker__icon {
    font-size: 26px;
    line-height: 1;
}

.speaker--guide .speaker__icon {
    font-size: 34px;
}

/* While audio is audible every speaker shows the pause glyph
   (body.audio-playing is kept in sync by the audio guide). */
.speaker__icon--pause {
    display: none;
}

.audio-playing .speaker__icon--play {
    display: none;
}

.audio-playing .speaker__icon--pause {
    display: inline;
}

@keyframes speaker-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.07);
    }
}

/* --- volume hint (MPD-11361) --------------------------------------------- */

/* No web API reports the OS volume, so a handset on silent plays the
   whole guide to nobody. The first clip that actually plays cues this
   instead; audioGuide.js owns the body classes and their timing.

   Kept local to the speaker: a full-screen flash read as an alarm. The
   220 box is centred on .speaker--guide (16px inset + 36px = 52px from
   both edges, so 52 - 110 = -58) and sits at z 29, under its 30. */
.volume-flash {
    display: none;
    position: fixed;
    right: -58px;
    bottom: -58px;
    width: 220px;
    height: 220px;
    z-index: 29;
    pointer-events: none;
}

body.volume-hint-flash .volume-flash,
body.audio-playing .volume-flash {
    display: block;
}

/* Three arcs fanning out of the speaker into the screen — the 🔊 glyph's
   own waves, blown up. Opening inward, no radius ever clips at the edge.
   Nothing moves: the cue lights them small→large three times, opacity
   only, so reduced motion needs no separate treatment. */
.volume-flash__fan {
    display: block;
    width: 100%;
    height: 100%;
}

.volume-flash__arc {
    fill: none;
    stroke: var(--green-primary);
    stroke-width: 7;
    stroke-linecap: round;
    opacity: 0;
    transition:
        opacity 0.4s,
        stroke 0.4s;
}

/* Steady while a clip is audible — no animation, so a nine digit
   readback lights it once instead of firing nine times. It stands down
   while the cue owns the same arcs. */
body.audio-playing:not(.volume-hint-flash) .volume-flash__arc {
    opacity: 0.4;
}

/* Amber is "look here" throughout this stylesheet; red stays for
   destructive actions. The language screen is the cue's home, so its
   steady arcs are amber too: no green blip after the third pulse. */
body.lang-open .volume-flash__arc {
    stroke: var(--amber);
}

/* At 40% the amber washes out to a pale yellow; hold it solid here. */
body.lang-open.audio-playing:not(.volume-hint-flash) .volume-flash__arc {
    opacity: 1;
}

body.volume-hint-flash .volume-flash__arc {
    stroke: var(--amber);
    /* A transition outranks the animation, so none while the cue pops. */
    transition: none;
    animation: volume-fan-1 1.2s ease-out 3;
}

body.volume-hint-flash .volume-flash__arc:nth-child(2) {
    animation-name: volume-fan-2;
}
body.volume-hint-flash .volume-flash__arc:nth-child(3) {
    animation-name: volume-fan-3;
}

@keyframes volume-fan-1 {
    0% {
        opacity: 0;
    }
    10%,
    70% {
        opacity: 1;
    }
    90%,
    100% {
        opacity: 0;
    }
}

@keyframes volume-fan-2 {
    0%,
    22% {
        opacity: 0;
    }
    32%,
    70% {
        opacity: 1;
    }
    90%,
    100% {
        opacity: 0;
    }
}

@keyframes volume-fan-3 {
    0%,
    44% {
        opacity: 0;
    }
    54%,
    70% {
        opacity: 1;
    }
    90%,
    100% {
        opacity: 0;
    }
}

/* Only while the cue runs, so the speaker returns to how it started. */
.speaker::after {
    content: '\2191';
    display: none;
    position: absolute;
    top: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--amber);
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 24px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.speaker--guide::after {
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 30px;
}

/* The badge belongs to the language screen alone. */
body.lang-open.volume-hint-on .speaker::after {
    display: block;
}

body.volume-hint-beat .speaker::after {
    animation: volume-badge-pop 9s ease-out;
}

@keyframes volume-badge-pop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(254, 177, 0, 0.9);
    }
    3% {
        transform: scale(1.8);
    }
    9% {
        transform: scale(1.25);
        box-shadow: 0 0 0 20px rgba(254, 177, 0, 0);
    }
    12% {
        transform: scale(1.8);
        box-shadow: 0 0 0 0 rgba(254, 177, 0, 0.9);
    }
    18% {
        transform: scale(1.25);
        box-shadow: 0 0 0 20px rgba(254, 177, 0, 0);
    }
    21% {
        transform: scale(1.8);
        box-shadow: 0 0 0 0 rgba(254, 177, 0, 0.9);
    }
    27% {
        transform: scale(1.25);
        box-shadow: 0 0 0 20px rgba(254, 177, 0, 0);
    }
    30% {
        transform: scale(1.8);
        box-shadow: 0 0 0 0 rgba(254, 177, 0, 0.9);
    }
    36% {
        transform: scale(1.25);
        box-shadow: 0 0 0 20px rgba(254, 177, 0, 0);
    }
    39% {
        transform: scale(1.8);
        box-shadow: 0 0 0 0 rgba(254, 177, 0, 0.9);
    }
    45% {
        transform: scale(1.25);
        box-shadow: 0 0 0 20px rgba(254, 177, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    }
}

/* --- package sheet ------------------------------------------------------- */

.sheet {
    position: fixed;
    inset: 0;
    background: var(--tile-bg, #f3f4f6);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-y: auto;
    /* Rubber-banding must not scroll the shop behind the overlay. */
    overscroll-behavior: contain;
}

/* The sheet covers the whole screen, so it has to carry the training
   cue too or the tint vanishes the moment a package is opened. */
body.training-mode .sheet {
    background: var(--color-training);
}

.sheet__top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sheet__back {
    border: 0;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
}

.sheet__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 10px 0 18px;
}

.sheet__emoji {
    font-size: 96px;
    line-height: 1.05;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet__name {
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
}

.sheet__size {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-soft);
}

.sheet__quantities {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 440px;
}

.qty-card {
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    padding: 14px 4px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.qty-card--active {
    border-color: var(--green-primary);
    background: var(--paper);
    box-shadow: 0 4px 14px rgba(20, 83, 45, 0.18);
}

.qty-card__overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-card__confirm-spinner {
    width: 28px;
    height: 28px;
    flex: none;
    box-sizing: border-box;
    border: 3px solid rgba(4, 124, 53, 0.25);
    border-top-color: var(--green-primary);
    border-radius: 50%;
    animation: busy-spin 0.8s linear infinite;
}

.qty-card--disabled,
.qty-card:disabled {
    opacity: 0.4;
    filter: grayscale(0.35);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.qty-card--disabled:active,
.qty-card:disabled:active {
    transform: none;
}

.qty-card__icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Four 26px icons per row: counts up to 16 read as a 4×4 domino. */
    max-width: 104px;
    line-height: 1;
}

.qty-card__icon {
    font-size: 22px;
    height: 26px;
    display: inline-flex;
    align-items: center;
}

.qty-card__count {
    font-size: 30px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
}

.qty-card__price {
    font-size: 14px;
    font-weight: 600;
    color: var(--green-deep);
}

.qty-card__price--list {
    font-size: 12px;
    color: var(--ink-soft);
    text-decoration: line-through;
}

/* 0-card mark. Retirer is red; Fermer is grey. */
.qty-card--remove .qty-card__remove-mark,
.qty-card--close .qty-card__remove-mark {
    font-size: 22px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.qty-card--remove .qty-card__remove-mark {
    color: #dc2626;
}

.qty-card--close .qty-card__remove-mark {
    color: var(--ink-soft);
}

.qty-card--remove.qty-card--active {
    border-color: #dc2626;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.22);
}

/* Ten seconds without acting and the guide repeats the action while the
   button that carries it pulses (MPD-11249). One class for every screen
   so the tuning lives in one place. Most carriers are full-width bars
   (continue FAB, Valider, Autoriser, the chooser's Valider): at 440px
   .speaker--guide's 1.07 would swing ~30px and read as a lurch, and even
   1.04 is ~18px, so a bar breathes at 1.02. The keypad ✓ and Oui are
   narrow keys and can move more before it looks like a jump. */
.nudge-pulse {
    --nudge-scale: 1.02;
    animation: nudge-pulse 2s ease-in-out infinite;
}

.phone__key.nudge-pulse,
.phone__choice.nudge-pulse {
    --nudge-scale: 1.05;
}

@keyframes nudge-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(var(--nudge-scale));
    }
}

@keyframes busy-spin {
    to {
        transform: rotate(360deg);
    }
}

.sheet__back:disabled {
    opacity: 0.4;
    cursor: wait;
}

.sheet__confirm-check {
    font-size: 26px;
    font-weight: 700;
}

.sheet__confirm-label {
    font-size: 22px;
    font-weight: 600;
}

.sheet__error {
    margin-top: 12px;
    width: 100%;
    max-width: 440px;
    border: 0;
    background: var(--amber);
    color: var(--ink);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.sheet__error-icon {
    font-size: 24px;
}

.sheet__error-text {
    font-size: 20px;
    font-weight: 600;
}

/* --- success party -------------------------------------------------------- */

.party {
    position: fixed;
    inset: 0;
    /* The celebration-flag green: the fond-vert logo's black "sa bopp" is
       designed against it, where the old near-black deep green swallowed it. */
    background: rgba(27, 125, 64, 0.96);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    overflow: hidden;
    pointer-events: none;
    animation: party-fade 3.2s ease forwards;
}

.party__logo {
    width: 210px;
    max-width: 64vw;
    height: auto;
}

.party__endorse {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.party__endorse img {
    width: 22px;
    height: auto;
}

/* Short viewports (landscape phones): the logo + hero + endorsement stack
   is ~500px at full size and the overlay clips both ends — shrink the
   pieces so the endorsement stays on screen instead of silently hiding. */
@media (max-height: 540px) {
    .party {
        gap: 14px;
    }

    .party__logo {
        width: 140px;
    }

    .party__hero {
        width: 132px;
        height: 132px;
    }

    .party__product {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    .party__product-fallback {
        font-size: 72px;
    }

    .party__check {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
}

.party__confetti {
    position: absolute;
    inset: 0;
}

.party__piece {
    position: absolute;
    top: -6vh;
    width: 12px;
    height: 18px;
    border-radius: 3px;
    transform: scale(var(--piece-scale, 1));
    animation-name: confetti-fall;
    animation-timing-function: linear;
    animation-fill-mode: both;
}

.party__piece--emoji {
    width: auto;
    height: auto;
    font-size: 26px;
    background: none;
    line-height: 1;
}

@keyframes confetti-fall {
    from {
        transform: translate(0, -6vh) rotate(0deg) scale(var(--piece-scale, 1));
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    to {
        transform: translate(var(--drift, 0px), 112vh)
            rotate(var(--spin, 360deg)) scale(var(--piece-scale, 1));
        opacity: 0.6;
    }
}

.party__hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
}

.party__ring {
    position: absolute;
    inset: 0;
    border: 4px solid rgba(249, 246, 239, 0.85);
    border-radius: 50%;
    animation: party-ring 1.1s ease-out forwards;
}

.party__ring--late {
    animation-delay: 0.35s;
}

@keyframes party-ring {
    from {
        transform: scale(0.4);
        opacity: 0.9;
    }
    to {
        transform: scale(2.4);
        opacity: 0;
    }
}

.party__product {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--paper);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    animation: party-pop 0.6s cubic-bezier(0.2, 1.9, 0.4, 1) both;
}

.party__product-fallback {
    font-size: 110px;
    line-height: 1;
    animation: party-pop 0.6s cubic-bezier(0.2, 1.9, 0.4, 1) both;
}

.party__check {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--amber);
    color: var(--green-deep);
    font-size: 40px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    animation: party-pop 0.5s cubic-bezier(0.2, 1.9, 0.4, 1) 0.25s both;
}

@keyframes party-pop {
    from {
        transform: scale(0.1);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes party-fade {
    0%,
    78% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .speaker--guide {
        animation: none;
    }
    .nudge-pulse {
        animation: none;
    }
    body.volume-hint-beat .speaker::after {
        animation: none;
    }
    .pkg-tile__confirm {
        animation: none;
    }
    .party {
        animation: party-fade 2s ease forwards;
    }
    .party__ring {
        animation: none;
        opacity: 0;
    }
    .party__product,
    .party__product-fallback,
    .party__check {
        animation: none;
    }
    .pkg-tile:active {
        transform: none;
    }
    .held-tile:active {
        transform: none;
    }
    .qty-card__confirm-spinner {
        animation: none;
    }
}

/* --- enroll landing: welcome header --------------------------------------- */

.enroll-welcome {
    padding: 10px 0 4px;
}

.enroll-welcome__logo {
    display: block;
    width: 132px;
    height: auto;
}

/* --- retired environment: closed notice (MPD-11418) ----------------------- */

.enroll-closed {
    margin: 16px 0 20px;
    padding: 24px 20px;
    border: 4px solid var(--ink);
    border-radius: 16px;
    background: var(--amber);
    color: var(--ink);
    text-align: center;
}

.enroll-closed__icon {
    font-size: 72px;
    line-height: 1;
}

.enroll-closed__title {
    margin: 8px 0 12px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
}

.enroll-closed__text {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
}

.enroll-closed__button {
    display: block;
    padding: 20px 16px;
    border-radius: 14px;
    background: var(--green-primary);
    color: var(--paper);
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

/* --- enroll landing: phone entry ------------------------------------------ */

.phone {
    margin-top: 10px;
}

.phone__display {
    display: flex;
    /* Wrapping the prefix onto its own line beats a row that runs past the
       viewport: any sideways page overflow re-enables Chrome's double-tap
       zoom on every surface (MPD-11337). */
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 16px 18px;
    background: #f0fdf4;
    border: 2px solid var(--green-primary);
    border-radius: 16px;
    min-height: 64px;
}

.phone__display--error {
    border-color: var(--amber);
    background: #fffbeb;
}

.phone__prefix {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-soft);
    white-space: nowrap;
}

/* Nine countable slots. An underline marks what is still empty, so how much
   is left to type is visible without a word of explanation, and the checkmark
   lights exactly as the last one fills. */
.phone__digits {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    font-size: 28px;
    font-weight: 800;
    color: var(--green-deep);
    min-height: 34px;
}

.phone__group {
    display: flex;
    gap: 5px;
}

.phone__slot {
    min-width: 19px;
    padding-bottom: 2px;
    text-align: center;
    line-height: 1.1;
    border-bottom: 3px solid rgba(20, 83, 45, 0.2);
}

.phone__slot--filled {
    border-bottom-color: transparent;
}

/* Every Senegalese mobile starts with a 7: show it in place, greyed out,
   instead of only saying so. */
.phone__slot--ghost {
    color: rgba(20, 83, 45, 0.3);
}

/* The refused digit, on its way back out of the display. */
.phone__slot--reject {
    color: var(--amber);
}

/* Prefix plus nine slots run 305px; a 320px handset has 256px inside the
   box, and the overflow put the whole page into sideways scroll. */
@media (max-width: 380px) {
    .phone__display {
        gap: 8px;
        padding: 14px 10px;
    }

    .phone__prefix {
        font-size: 16px;
    }

    .phone__digits {
        gap: 8px;
        font-size: 26px;
    }

    .phone__group {
        gap: 4px;
    }

    .phone__slot {
        min-width: 17px;
    }
}

/* The number for assistive tech. The slots are a visual counting aid and are
   hidden from it, so the whole number is announced once, properly grouped. */
.phone__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* A refused tap gets an answer, never silence: the display shakes while the
   voice names the rule that was broken. */
.phone__display--shake {
    animation: phone-shake 0.36s ease;
}

@keyframes phone-shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-7px);
    }
    45% {
        transform: translateX(6px);
    }
    70% {
        transform: translateX(-4px);
    }
    88% {
        transform: translateX(2px);
    }
}

.phone__pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 360px;
}

.phone__key {
    border: 2px solid rgba(20, 83, 45, 0.16);
    background: #fff;
    border-radius: 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--green-deep);
    padding: 16px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.phone__key:active {
    background: #f0fdf4;
}

.phone__key--back {
    color: var(--ink-soft);
}

.phone__key--ok {
    background: var(--green-primary);
    border-color: var(--green-primary);
    color: #fff;
}

.phone__key--ok:disabled {
    opacity: 0.35;
    cursor: default;
}

/* Dimmed, but never disabled: tapping it on an unfinished number is how a
   farmer who cannot read finds out what is missing. */
.phone__key--ok-wait {
    opacity: 0.4;
}

/* The number just became valid. "Then press the green check" played nine taps
   ago, so the button repeats it on its own. */
.phone__key--ok-ready {
    animation: phone-beckon 1.7s ease-in-out infinite;
}

/* The farmer keyed something no number can start with: point at the key that
   can, rather than leave them hunting. */
.phone__key--hint {
    border-color: var(--green-primary);
    background: #f0fdf4;
    animation: phone-beckon 1.2s ease-in-out infinite;
}

@keyframes phone-beckon {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    }
    60% {
        box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
    }
}

/* Without motion the beckon becomes a standing ring: the farmer still needs
   to be told which key to press. */
@media (prefers-reduced-motion: reduce) {
    .phone__display--shake {
        animation: none;
    }

    .phone__key--ok-ready,
    .phone__key--hint {
        animation: none;
        box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.35);
    }
}

/* --- enroll landing: phone confirmation ------------------------------------ */

/* The number is the whole screen here — no keypad competing with it. */
.phone__display--confirm {
    justify-content: center;
    padding: 24px 18px;
    margin-bottom: 24px;
}

/* Nothing left to count here — the number is whole, so it is just the digits,
   large and centred. */
.phone__number {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--green-deep);
}

.phone__choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 360px;
}

.phone__choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 2px solid rgba(20, 83, 45, 0.16);
    background: #fff;
    border-radius: 16px;
    padding: 18px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.phone__choice-icon {
    font-size: 30px;
    line-height: 1;
}

.phone__choice-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--green-deep);
}

.phone__choice--yes {
    background: var(--green-primary);
    border-color: var(--green-primary);
}

.phone__choice--yes .phone__choice-label {
    color: #fff;
}

.phone__choice--no {
    background: #fffbeb;
    border-color: var(--amber);
}

.phone__choice:disabled {
    opacity: 0.35;
    cursor: default;
}

/* --- enroll landing: boot (reload with a live session) --------------------- */

.boot {
    display: flex;
    justify-content: center;
    padding: 56px 0;
}

.boot__spinner {
    font-size: 44px;
    animation: boot-pulse 1.1s ease-in-out infinite;
}

@keyframes boot-pulse {
    0%,
    100% {
        opacity: 0.35;
    }
    50% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .boot__spinner {
        animation: none;
    }
}

/* --- enroll landing: pay step ---------------------------------------------- */

.pay {
    margin-top: 10px;
}

/* The sheet's back circle is white-on-tile; on the pay page's light
   background it needs its own contrast. */
.pay__back {
    background: #e8eaed;
    flex-shrink: 0;
}

.pay__chosen {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0 18px;
    padding: 12px 14px;
    background: var(--tile-bg, #f0fdf4);
    border: 2px solid var(--tile-rim, var(--green-primary));
    border-radius: 16px;
}

.pay__chosen-photo,
img.pay__chosen-photo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.pay__chosen-fallback {
    font-size: 44px;
    line-height: 1;
}

.pay__chosen-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pay__chosen-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--green-deep);
}

.pay__chosen-size {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
}

.pay__chosen-qty {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-soft);
}

.pay__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 440px;
    border: 0;
    border-radius: 20px;
    padding: 20px 16px;
    background: var(--green-primary);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.35);
    animation: pay-pulse 2.4s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

.pay__button-icon {
    font-size: 30px;
}

/* The Wave roundel sits on the green button inside a white ring so the
   brand blue keeps its contrast. */
img.pay__button-icon--wave {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    box-sizing: content-box;
}

.pay__button-label {
    font-size: 22px;
    font-weight: 800;
}

/* The Fayal lockup stands in for the "Payer" word on the button. */
img.pay__button-fayal {
    height: 48px;
    width: auto;
}

.pay__button-amount {
    font-size: 22px;
    font-weight: 800;
}

.pay__button--busy {
    opacity: 0.6;
    animation: none;
}

/* Payer waits while location is still searching (MPD-11432). */
.pay__waiting {
    margin: 12px 0 0;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink-soft);
}

/* Shop-screen variant: shown when a selection already exists (reload /
   returned from Wave) so payment never requires re-selecting. */
.pay__button--cta {
    margin: 16px 0 6px;
}

.pay__error {
    margin-top: 14px;
}

@keyframes pay-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pay__button {
        animation: none;
    }
}

/* --- language chooser (MPD-11098) ---------------------------------------- */

.lang {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    max-width: 440px;
    margin: 18px auto 0;
}

.lang__option {
    border: 3px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 22px 16px;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.lang__option-label {
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
}

.lang__option--active {
    border-color: var(--green-primary);
    background: #f0fdf4;
}

/* Same big green ✓ Valider as the package sheet — one confirm gesture
   across the whole page. Greyed until a language has been tapped. */
.lang__confirm {
    width: 100%;
    border: 0;
    background: var(--green-primary);
    color: var(--paper);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
    -webkit-tap-highlight-color: transparent;
}

.lang__confirm:disabled {
    opacity: 0.45;
    cursor: default;
}

.lang-chip {
    display: block;
    margin-left: auto;
    border: 1px solid rgba(17, 24, 39, 0.15);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* --- success page: "when is your next payment?" (MPD-11364) --------------- */

.next-pay {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-width: 440px;
    margin: 18px auto 0;
}

/* Tonight's moon, the reference every answer's moon is read against. */
.next-pay__today {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.next-pay__today .next-pay__moon {
    font-size: 30px;
}

/* Two by two: the four answers read as one choice, not a list. The
   tiles themselves are the language chooser's. */
.next-pay__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Answers look like package tiles, which they behave like: the same grey
   ground and rim on the white page, and the same green ring when armed. */
.next-pay .lang__option {
    border: 2px solid #d1d5db;
    background: #f3f4f6;
    border-radius: 18px;
    padding: 12px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: inherit;
}

.next-pay .lang__option--active {
    border-color: var(--green-primary);
    background: #f0fdf4;
    box-shadow: 0 0 0 4px rgba(4, 124, 53, 0.5);
}

.next-pay__moon {
    font-size: 44px;
    line-height: 1.1;
}

.next-pay__when {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

/* The amount is what a farmer who cannot read the label still reads. */
.next-pay__amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--green-primary);
    white-space: nowrap;
}

/* The shop's armed chip is see-through over a crop photo; on a white
   answer tile it needs the full green to read as the thing to press. */
.next-pay .pkg-tile__confirm {
    background: var(--green-primary);
}

.next-pay__skip {
    border: 0;
    background: none;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 16px;
    padding: 10px;
    cursor: pointer;
    text-decoration: underline;
}

/* The success page's packages: the pay screen's wide rows, one per
   package, read top to bottom. */
.receipt {
    margin-top: 18px;
}

/* Moved under the progress bar on the success page. */
.enroll > .paid-form {
    margin-top: 12px;
}

.receipt .pay__chosen {
    margin: 10px 0;
}

/* The calendar arm: the next thirty days, a week to a row, under a red
   calendar header. Days waited are shaded, the payment day is filled and
   carries its date. */
.next-pay__cal {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 116px;
    padding: 14px 5px 5px;
    margin-bottom: 4px;
    background: #fff;
    border: 2px solid #9ca3af;
    border-radius: 8px;
}

.next-pay__cal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 9px;
    background: #ef4444;
    border-radius: 6px 6px 0 0;
}

.next-pay__cal i {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 2px;
    color: #fff;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}

.next-pay__cal .next-pay__wait {
    background: #86efac;
}

.next-pay__cal .next-pay__due {
    background: var(--green-primary);
}

/* The answer as the party's hero, in place of a crop photo. */
.next-pay__party {
    animation: party-pop 0.6s cubic-bezier(0.2, 1.9, 0.4, 1) both;
}

.next-pay__party.next-pay__moon {
    font-size: 120px;
}

.next-pay__party.next-pay__cal {
    width: 196px;
    gap: 3px;
    padding: 22px 8px 8px;
}

.next-pay__party.next-pay__cal::before {
    height: 15px;
}

.next-pay__party.next-pay__cal i {
    font-size: 14px;
}

/* Where the page ends after an answer: the plan, then Bindal sa bopp as
   the way on to the packages. */
.next-pay--planned {
    align-items: center;
}

.next-pay--planned .lang__option {
    min-width: 200px;
}

/* The green-ground logo is drawn for the celebration green. */
.next-pay__shop {
    margin-top: 12px;
    padding: 14px 22px;
    border: 0;
    border-radius: 18px;
    background: rgb(27, 125, 64);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.next-pay__shop img {
    display: block;
    width: 150px;
}

/* --- enroll landing: village from location (MPD-11052) -------------------- */

.geo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* The head is the only full-width child of a centred column. */
.geo .section-head {
    align-self: stretch;
}

.geo__mark {
    font-size: 76px;
    line-height: 1;
    margin: 18px 0 22px;
}

.geo__allow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 440px;
    border: 0;
    border-radius: 20px;
    padding: 20px 16px;
    background: var(--green-primary);
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.35);
    -webkit-tap-highlight-color: transparent;
}

.geo__allow-icon {
    font-size: 30px;
}

.geo__allow-label {
    font-size: 22px;
    font-weight: 800;
}

/* Deliberately quiet next to the green button: skipping is allowed, but
   sharing a position is the outcome that gets the farmer a real village.
   Still a full touch target. */
.geo__skip {
    border: 0;
    background: none;
    margin-top: 18px;
    min-height: 48px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Compass, button and the way out must all sit above the fold on a 320px
   handset. */
@media (max-width: 380px) {
    .geo__mark {
        font-size: 56px;
        margin: 10px 0 16px;
    }
}

/* --- enroll landing: village-code prompt (MPD-11432) ------------------- */

/* Shown when the background location lookup fails: one box the agent types
   the village ID into, then two quieter ways forward (try location again,
   call me). */
.village-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.village-code .section-head {
    align-self: stretch;
}

.village-code__mark {
    font-size: 64px;
    line-height: 1;
    margin: 14px 0 12px;
}

.village-code__hint {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-soft);
}

.village-code__form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 440px;
}

.village-code__input {
    flex: 1;
    min-width: 0;
    border: 3px solid var(--green-primary);
    border-radius: 16px;
    padding: 14px 12px;
    font-family: inherit;
    /* 16px+ keeps mobile Safari from zooming into the box on focus. */
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-align: center;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--paper);
}

.village-code__input::placeholder {
    color: #d1d5db;
}

.village-code__input--error {
    border-color: var(--amber);
}

.village-code__submit {
    flex: 0 0 76px;
    border: 0;
    border-radius: 16px;
    background: var(--green-primary);
    color: #fff;
    font-family: inherit;
    font-size: 34px;
    font-weight: 800;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.village-code__submit:disabled {
    opacity: 0.45;
    cursor: default;
}

.village-code__error {
    margin: 14px 0 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}

/* The two other ways off the prompt sit below the box, outlined rather
   than filled, so the code stays the obvious first move. */
.village-code__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    margin-top: 22px;
}

.village-code__option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    border: 2px solid var(--green-primary);
    border-radius: 16px;
    padding: 10px 16px;
    background: var(--paper);
    color: var(--green-deep);
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.village-code__option:disabled {
    opacity: 0.45;
    cursor: default;
}

.village-code__option-icon {
    font-size: 26px;
}

.village-code__how-to {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7e0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
}

.village-code__continue {
    width: 100%;
    max-width: 440px;
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    background: var(--green-primary);
    color: #fff;
    font-family: inherit;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 380px) {
    .village-code__mark {
        font-size: 48px;
        margin: 8px 0 10px;
    }
}

/* --- enroll landing: SMS verification wait (MPD-11163) ------------------- */

.verify {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.verify .section-head {
    align-self: stretch;
}

.verify__mark {
    font-size: 76px;
    line-height: 1;
    margin: 18px 0 22px;
}

.verify__ve {
    margin: 10px 0 2px;
    font-size: 22px;
    font-weight: 800;
    color: var(--green-deep);
}

#verify-resend {
    width: 100%;
    max-width: 440px;
    border: 0;
    border-radius: 20px;
    padding: 20px 16px;
    background: var(--green-primary);
    color: #fff;
    font-family: inherit;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.35);
    -webkit-tap-highlight-color: transparent;
}

#verify-resend:disabled {
    opacity: 0.45;
    cursor: default;
}

#verify-giveup,
#verify-edit {
    border: 0;
    background: none;
    margin-top: 18px;
    min-height: 48px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#verify-edit {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.verify__number {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
}

@media (max-width: 380px) {
    .verify__mark {
        font-size: 56px;
        margin: 10px 0 16px;
    }
}
