/* CoverTree Rewards — the agent store's look (agent.html only). One sheet for the frame and the kit: colours, type, buttons,
   fields, notices, dialogs, the header and the footer. The pages have their own sheets (shop-store.css, shop-buy.css,
   shop-orders.css, shop-account.css, and shop-staff.css for a staff member's read-only view).

   Who it is for: insurance agents, many of them older and not at home with online shops. So:
   - big, plain type (18 px body, set in rem so the browser's own text size and the site's Text size choice both scale it);
   - every button says what it does in words, is at least 48 px tall and never hides behind an icon or a hover;
   - strong contrast (4.5:1 or more for every word, 3:1 for a field's edge) in light and in dark;
   - one main button a screen, calm motion, nothing that slides out of view.
   The colours and the typeface are the CoverTree Agent Portal's (Onest, the white page, the warm card, CoverTree teal), so the
   store feels like the site agents already use. Class names: the kit keeps the plain names js/core.js's own pieces draw
   (.btn, .modal, .toast, .icon, .sr-only); everything of the store's own starts with sh-. */

/* ───────── typeface: Onest from Google Fonts (the server's font-src allows fonts.gstatic.com) ───────── */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(https://fonts.gstatic.com/s/onest/v11/gNMKW3F-SZuj7xmf-HY.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(https://fonts.gstatic.com/s/onest/v11/gNMKW3F-SZuj7xmR-HY6EQ.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ───────── colours ───────── */
:root {
  color-scheme: light;
  --bg: #ffffff;            /* the page */
  --soft: #f8f7f1;          /* the warm card */
  --sunk: #f0eee7;          /* a pressed or quiet ground */
  --photo: #f3f1ea;         /* behind every product picture */
  --photo-ink: #c9c5ba;     /* the line drawing a missing picture shows */
  --ink: #141413;           /* words */
  --ink-2: #4a4945;         /* quieter words (8:1 on the page) */
  --ink-3: #66645f;         /* the quietest words allowed (5.5:1 on the page, 5:1 on the warm card) */
  --line: #e3e1da;          /* a hairline between things */
  --edge: #807e78;          /* a field's or a quiet button's edge (4.1:1 on the page, 3.8:1 on the warm card) */
  --brand: #007e6a;         /* CoverTree teal: the main button, links */
  --brand-deep: #00624f;    /* its hover and pressed */
  --brand-soft: #e3f2ee;    /* a teal wash */
  --brand-ink: #007663;     /* teal words and links: 5.6:1 on the page, 4.8:1 or more on every tinted ground (lighter in the dark) */
  --brand-ink-2: #00624f;   /* a link under the pointer */
  /* the names js/core.js's own drawings use (the points coin) */
  --ready: var(--brand); --pending: var(--warn); --surface: var(--bg); --fg-3: var(--ink-3);
  --on-brand: #ffffff;
  --logo: #fe8c21;          /* the logo's orange (never for words: too light) */
  --ok: #0a6c4f; --ok-soft: #e3f3ec; --ok-edge: #9fd3bf;
  --warn: #7d5200; --warn-soft: #fcf2dc; --warn-edge: #e8c877;
  --bad: #b3261e; --bad-soft: #fcebe9; --bad-edge: #f0b4ae;
  --info: #1d57b0; --info-soft: #e8f0fb; --info-edge: #b2caee;
  --focus: #1447c7;         /* the focus ring: blue, so it shows on white and on teal */
  --scrim: rgba(20, 20, 18, 0.5);
  --shadow: 0 1px 2px rgba(20, 20, 18, 0.06), 0 8px 24px rgba(20, 20, 18, 0.08);
  --shadow-up: 0 18px 48px rgba(20, 20, 18, 0.22);

  --font: "Onest", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-pill: 999px;
  --tap: 3rem;              /* the least height of anything pressed: 54 px at the usual text size */
  --gutter: 1rem;           /* the page's side room: wider on wider screens, below */
  --wrap: 72rem;            /* the page column */
  --head-h: 4.25rem;
  --sv-h: 0px;              /* the staff view's bar, when it shows (css/shop-staff.css sets it on body.is-staff-view) */
  /* a list's arrow (drawn in --ink-3: a picture can't read a token, so each theme names its own) */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366645f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (min-width: 40em) { :root { --gutter: 1.5rem; } }
@media (min-width: 64em) { :root { --gutter: 2rem; } }

/* dark: for agents whose device asks for it, or who pick it on My account. Pictures keep a light ground so they never glare
   and never vanish. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131312; --soft: #1d1d1b; --sunk: #272724; --photo: #d6d3ca; --photo-ink: #a9a59a;
    --ink: #f4f3ef; --ink-2: #c9c7c0; --ink-3: #a5a39c;
    --line: #33332f; --edge: #86847d;
    --brand: #0a7a66; --brand-deep: #006b5a; --brand-soft: #14302b; --brand-ink: #5fd3bb; --brand-ink-2: #8fe3cf; --on-brand: #ffffff;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5a39c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    --ok: #62d6a8; --ok-soft: #12291f; --ok-edge: #1f5a44;
    --warn: #f2c260; --warn-soft: #2e2510; --warn-edge: #6b5318;
    --bad: #ff8f88; --bad-soft: #331715; --bad-edge: #7a2a25;
    --info: #9cc0ff; --info-soft: #152238; --info-edge: #2c4a7e;
    --focus: #9cc0ff; --scrim: rgba(0, 0, 0, 0.66);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35); --shadow-up: 0 18px 48px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131312; --soft: #1d1d1b; --sunk: #272724; --photo: #d6d3ca; --photo-ink: #a9a59a;
  --ink: #f4f3ef; --ink-2: #c9c7c0; --ink-3: #a5a39c;
  --line: #33332f; --edge: #86847d;
  --brand: #0a7a66; --brand-deep: #006b5a; --brand-soft: #14302b; --brand-ink: #5fd3bb; --brand-ink-2: #8fe3cf; --on-brand: #ffffff;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5a39c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ok: #62d6a8; --ok-soft: #12291f; --ok-edge: #1f5a44;
  --warn: #f2c260; --warn-soft: #2e2510; --warn-edge: #6b5318;
  --bad: #ff8f88; --bad-soft: #331715; --bad-edge: #7a2a25;
  --info: #9cc0ff; --info-soft: #152238; --info-edge: #2c4a7e;
  --focus: #9cc0ff; --scrim: rgba(0, 0, 0, 0.66);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35); --shadow-up: 0 18px 48px rgba(0, 0, 0, 0.6);
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
/* 18 px at the browser's usual setting; a browser set to larger text grows with it. Text size on My account: one step up each */
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
/* what the keyboard or a link scrolls into view stops below the header only where the header stays at the top (a wide
   screen at the usual text size; css/shop-staff.css adds the staff bar's height) */
@media (min-width: 75em) { html:not([data-text]) { scroll-padding-top: calc(var(--head-h) + 1rem); } }
html[data-text="large"] { font-size: 125%; }
html[data-text="xlarge"] { font-size: 137.5%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font); font-synthesis: none; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
#app-main { flex: 1 0 auto; display: block; outline: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--brand-ink-2); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; 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; }

/* type */
h1, .h1 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.2rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
h2, .h2 { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.55rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h3, .h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
h4, .h4 { font-size: 1rem; line-height: 1.35; font-weight: 600; }
p { text-wrap: pretty; }
.lede { font-size: 1.1rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small, .xs { font-size: 0.9rem; }   /* nothing an agent reads is smaller than 16 px */
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
strong, b { font-weight: 600; }

/* the page column */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.page { padding-block: 1.5rem 3.5rem; }
@media (min-width: 64em) { .page { padding-block: 2.25rem 4.5rem; } }
/* the kit (build guide 4) is kept whole for the pages to use: a few of its classes (.row, .grow, .faint, .nowrap, .rule,
   .panel__head, .btn-row--end, the --ready/--pending/--void tones) are not drawn by the store today */
.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 0.75rem); }
.row--between { justify-content: space-between; }
.row--nowrap { flex-wrap: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* icons: drawn by CT.icon on a 24 px grid; always beside words, never instead of them */
.icon { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon.spin { animation: sh-spin 0.9s linear infinite; }
@keyframes sh-spin { to { transform: rotate(360deg); } }
.pts__coin { width: 1.15em; height: 1.15em; flex: none; }

/* ───────── buttons: every one at least 48 px tall, with words ─────────
   .btn--primary  the one main thing on a screen (teal)
   .btn--ghost    a second choice (an edge, no fill)
   .btn--quiet    a small side action (words in teal, no edge)
   .btn--danger   something that can't be undone */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: var(--tap); padding: 0.55rem 1.5rem; border: 2px solid transparent; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink); font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { background: color-mix(in srgb, var(--sunk) 86%, var(--ink)); color: var(--ink); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-deep); color: var(--on-brand); }
.btn--ghost { background: transparent; border-color: var(--edge); color: var(--ink); }
.btn--ghost:hover { background: var(--soft); border-color: var(--ink); color: var(--ink); }
.btn--quiet { background: transparent; color: var(--brand-ink); padding-inline: 0.75rem; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
.btn--quiet:hover { background: var(--brand-soft); color: var(--brand-ink-2); }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn--lg { min-height: 3.4rem; padding-inline: 2rem; font-size: 1.1rem; }
.btn--sm { min-height: 2.7rem; padding: 0.35rem 1.1rem; font-size: 0.95rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--sunk); border-color: transparent; color: var(--ink-3); cursor: not-allowed; }
.btn--ghost[disabled], .btn--quiet[disabled], .btn--ghost[aria-disabled="true"], .btn--quiet[aria-disabled="true"] { background: transparent; }
/* an X in a corner (a dialog's Close): it has a name for screen readers and a ring of its own */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--sunk); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.btn-row--end { justify-content: flex-end; }
@media (max-width: 39.99em) { .btn-row--stack { flex-direction: column; align-items: stretch; } .btn-row--stack .btn { width: 100%; } }

/* ───────── fields: the label above, the box big enough to read and to tap ───────── */
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.label { font-weight: 600; font-size: 1rem; }
.label .optional, .optional { font-weight: 400; color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: 0.9rem; }
.input, .select, .textarea { width: 100%; min-height: var(--tap); padding: 0.6rem 0.9rem; border: 2px solid var(--edge); border-radius: var(--r); background: var(--bg); color: var(--ink); font-size: 1rem; line-height: 1.3; transition: border-color 0.15s; -webkit-appearance: none; appearance: none; }
.textarea { min-height: 6.5rem; resize: vertical; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--ink); border-radius: var(--r); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-soft); }
.select { padding-right: 2.8rem; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 1.3rem; }
.error-text { display: flex; gap: 0.4rem; align-items: flex-start; color: var(--bad); font-weight: 600; font-size: 0.95rem; }
.error-text .icon { margin-top: 0.1em; }
/* a tick box or a round choice with its words: the whole line is the target */
.check { display: flex; align-items: flex-start; gap: 0.75rem; min-height: var(--tap); padding: 0.6rem 0; cursor: pointer; }
.check input { flex: none; width: 1.55rem; height: 1.55rem; margin: 0.05rem 0 0; accent-color: var(--brand); cursor: pointer; }
.check span { line-height: 1.4; }

/* ───────── notices: something the agent should read, said in a sentence ───────── */
.notice { display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.15rem; border: 1px solid var(--info-edge); border-radius: var(--r); background: var(--info-soft); color: var(--ink); }
.notice > .icon { color: var(--info); margin-top: 0.1em; }
.notice__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.notice__title { font-weight: 600; }
.notice--ok, .notice--ready { border-color: var(--ok-edge); background: var(--ok-soft); }
.notice--ok > .icon, .notice--ready > .icon { color: var(--ok); }
.notice--warn { border-color: var(--warn-edge); background: var(--warn-soft); }
.notice--warn > .icon { color: var(--warn); }
.notice--bad, .notice--void { border-color: var(--bad-edge); background: var(--bad-soft); }
.notice--bad > .icon, .notice--void > .icon { color: var(--bad); }
.notice--plain { border-color: var(--line); background: var(--soft); }
.notice--plain > .icon { color: var(--ink-2); }

/* a small label that says a state in words ("Shipped", "Sold out") */
.pill { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.2rem 0.75rem; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink); font-size: 0.9rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.pill--ok, .pill--ready { background: var(--ok-soft); color: var(--ok); }
.pill--warn, .pill--pending { background: var(--warn-soft); color: var(--warn); }
.pill--bad, .pill--void { background: var(--bad-soft); color: var(--bad); }
.pill--info { background: var(--info-soft); color: var(--info); }

/* ───────── containers ───────── */
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); padding: 1.25rem; }
.panel--hero, .panel--soft { border-color: transparent; background: var(--soft); }
.panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.panel__title { font-size: 1.15rem; font-weight: 600; }
@media (min-width: 40em) { .panel { padding: 1.75rem; } }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.list > * + * { border-top: 1px solid var(--line); }
/* a short "key: value" table (a total, an address) */
.kv { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1.5rem; align-items: baseline; }
.kv dt { color: var(--ink-2); }
.kv dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv .kv__total { padding-top: 0.75rem; border-top: 1px solid var(--line); font-size: 1.15rem; color: var(--ink); font-weight: 600; }

/* a page's first lines: where am I, and the way back */
.page-head { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.page-head__sub { color: var(--ink-2); font-size: 1.05rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; min-height: var(--tap); margin-left: -0.25rem; padding: 0.25rem 0.5rem 0.25rem 0.25rem; font-weight: 600; text-decoration: none; border-radius: var(--r-sm); }
.back-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* "Step 2 of 3": the steps in a row, the one you are on marked */
.sh-steps { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 1.5rem; padding: 0; counter-reset: none; }
.sh-steps__it { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink-2); font-weight: 500; }
.sh-steps__n { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 2px solid var(--edge); border-radius: 50%; font-weight: 700; font-size: 0.95rem; }
.sh-steps__n .icon { width: 1.1rem; height: 1.1rem; stroke-width: 2.6; }
.sh-steps__it.is-now { color: var(--ink); font-weight: 700; }
.sh-steps__it.is-now .sh-steps__n { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.sh-steps__it.is-done .sh-steps__n { border-color: var(--ok); color: var(--ok); }
@media (max-width: 39.99em) { .sh-steps__it:not(.is-now) .sh-steps__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* a calm whole-page state: loading, nothing here, something went wrong */
.empty { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; max-width: 34rem; margin: 2rem auto; padding: 2.5rem 1.5rem; border-radius: var(--r-lg); background: var(--soft); text-align: center; }
.empty > .icon, .empty__icon { width: 2.6rem; height: 2.6rem; color: var(--ink-3); }
.empty__text { color: var(--ink-2); }
.empty .btn-row { justify-content: center; }

/* a grey shape where something is loading */
.skel { display: block; border-radius: var(--r); background: linear-gradient(90deg, var(--sunk) 0%, var(--soft) 40%, var(--sunk) 80%); background-size: 200% 100%; animation: sh-skel 1.4s linear infinite; }
@keyframes sh-skel { to { background-position: -200% 0; } }

/* ───────── what js/core.js's own pieces draw: its dialog and the toast ───────── */
.scrim { position: fixed; inset: 0; z-index: 80; background: var(--scrim); opacity: 0; transition: opacity 0.2s; }
.scrim.is-open { opacity: 1; }
.modal { position: fixed; z-index: 90; left: 50%; top: 50%; width: min(34rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.75rem; border-radius: var(--r-lg); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-up); transform: translate(-50%, -48%); opacity: 0; transition: opacity 0.2s, transform 0.2s var(--ease); overscroll-behavior: contain; }
.modal.is-open { opacity: 1; transform: translate(-50%, -50%); }
.modal--wide { width: min(52rem, calc(100vw - 2rem)); }
.modal__close { position: absolute; top: 0.5rem; right: 0.5rem; }
.modal h2 { padding-right: 2.5rem; }
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; width: min(34rem, calc(100vw - 2rem)); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.9rem 1.2rem; border-radius: var(--r); background: var(--ink); color: var(--bg); font-weight: 500; box-shadow: var(--shadow-up); animation: sh-toast 0.25s var(--ease); }
.toast.is-leaving { opacity: 0; transition: opacity 0.25s; }
@keyframes sh-toast { from { opacity: 0; transform: translateY(0.5rem); } }

/* the store's own dialog (CT.shop.dialog): a title, words, and buttons that say what they do */
.sh-dialog { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--scrim); overscroll-behavior: contain; }
.sh-dialog__box { position: relative; width: min(34rem, 100%); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.75rem; border-radius: var(--r-lg); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-up); display: flex; flex-direction: column; gap: 1rem; }
.sh-dialog__box--wide { width: min(56rem, 100%); }
/* the title and Close side by side; where the title's longest word and Close do not fit (a phone with larger text), Close
   goes on its own line, still on the right. A word wider than the whole box (an item's long name) breaks, never scrolls. */
.sh-dialog__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem 1rem; }
.sh-dialog__head > h2 { flex: 1 1 0%; max-width: 100%; }
.sh-dialog__head > [data-close] { flex: none; margin-left: auto; }
.sh-dialog__acts { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; margin-top: 0.5rem; }
/* a phone: still a dialog in the middle of the screen (never a sheet from the bottom), the buttons full width */
@media (max-width: 39.99em) { .sh-dialog { padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom)); } .sh-dialog__box { width: 100%; max-height: calc(100dvh - 1.5rem); padding: 1.4rem 1.15rem; } .sh-dialog__acts { flex-direction: column-reverse; } .sh-dialog__acts .btn { width: 100%; } }
body.sh-locked { overflow: hidden; }

/* ───────── the header: the logo, your points, My orders, the cart, My account ───────── */
#shell-top { position: sticky; top: var(--sv-h); z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
#shell-top:empty { display: none; }
.sh-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; min-height: var(--head-h); padding-block: 0.6rem; }
/* the first thing the keyboard reaches: it shows only then, and jumps past the header */
.sh-skip { position: absolute; left: var(--gutter); top: 0.5rem; z-index: 60; transform: translateY(-300%); }
.sh-skip:focus-visible { transform: none; }
.sh-brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: var(--tap); color: var(--ink); text-decoration: none; border-radius: var(--r-sm); }
.sh-brand:hover { color: var(--ink); }
.sh-brand__mark { width: 2.1rem; height: auto; flex: none; }
.sh-brand__mark rect { fill: var(--logo); }
.sh-brand__word { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--logo); line-height: 1; }
.sh-brand__sub { padding-left: 0.6rem; border-left: 1px solid var(--line); color: var(--ink-2); font-size: 1rem; font-weight: 500; line-height: 1.2; }
.sh-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.5rem; }
/* a header link: an icon with its word beside it */
.sh-nav__link { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--tap); padding: 0.4rem 0.85rem; border: 2px solid transparent; border-radius: var(--r-pill); background: transparent; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.sh-nav__link:hover { background: var(--soft); color: var(--ink); }
.sh-nav__link[aria-current="page"] { background: var(--brand-soft); color: var(--ink); }
.sh-nav__link--cart { border-color: var(--edge); }
.sh-nav__link--cart:hover { border-color: var(--ink); }
.sh-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.4rem; border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* your points: always in words, always in the same place */
.sh-points { display: inline-flex; align-items: center; gap: 0.55rem; min-height: var(--tap); padding: 0.35rem 1.1rem; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--ink); white-space: nowrap; }
.sh-points__label { color: var(--ink-2); font-weight: 500; }
.sh-points__n { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-points .pts__coin { width: 1.3rem; height: 1.3rem; }
.sh-head__row2 { display: none; }
.sh-menu-btn { display: none; }
/* a phone or a small tablet: two calm rows. The logo and Menu; under them your points and the cart. Nothing is icon-only. */
@media (max-width: 74.99em) {
  #shell-top { position: static; }
  .sh-head { flex-wrap: wrap; padding-block: 0.5rem 0.65rem; }
  .sh-nav { display: none; }
  .sh-menu-btn { display: inline-flex; }
  .sh-head__row2 { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
}
/* larger text (My account): the one-row header no longer fits a laptop's width, so the same two rows show at every width
   (em media queries follow the browser's 16 px, not the larger text) */
html[data-text] #shell-top { position: static; }
html[data-text] .sh-nav { display: none; }
html[data-text] .sh-menu-btn { display: inline-flex; }
html[data-text] .sh-head__row2 { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
/* the two rows, wherever they show: a little closer together, and where one still runs out of room (larger text on a
   phone, a five-digit balance), Menu and the cart drop to the right, never under the logo or the points at the left */
@media (max-width: 74.99em) {
  .sh-head { column-gap: 0.5rem; }
  .sh-menu-btn { margin-left: auto; }
  .sh-head__row2 { gap: 0.5rem 0.4rem; }
  .sh-head__row2 > .sh-nav__link--cart { margin-left: auto; }
}
html[data-text] .sh-head { column-gap: 0.5rem; }
html[data-text] .sh-menu-btn { margin-left: auto; }
html[data-text] .sh-head__row2 { gap: 0.5rem 0.4rem; }
html[data-text] .sh-head__row2 > .sh-nav__link--cart { margin-left: auto; }
/* larger text on a phone: a smaller name beside the logo, so the logo and Menu keep to one row on most phones */
@media (max-width: 39.99em) { html[data-text] .sh-brand__word { font-size: 1.1rem; } }
/* a phone: the same two rows, a little tighter so your points and the cart sit side by side */
@media (max-width: 39.99em) {
  .sh-brand__sub { display: none; }
  .sh-points { gap: 0.4rem; padding-inline: 0.8rem; }
  .sh-points .pts__coin { display: none; }
  .sh-points__label { font-size: 0.9rem; }
  .sh-head__row2 .sh-nav__link { padding-inline: 0.7rem; gap: 0.4rem; }
}
/* a small phone: "Points 12,500" beside the cart */
@media (max-width: 26em) { .sh-points__your { display: none; } .sh-points__label { text-transform: capitalize; } }
/* the phone's menu: a full list in words */
.sh-menu { display: flex; flex-direction: column; }
.sh-menu__who { padding-bottom: 0.9rem; color: var(--ink-2); }
.sh-menu__item { display: flex; align-items: center; gap: 0.85rem; min-height: 3.5rem; padding: 0.6rem 0.25rem; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 1.1rem; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; width: 100%; }
.sh-menu__item:hover { background: var(--soft); color: var(--ink); }
.sh-menu__item .icon { color: var(--brand); }
.sh-menu__item .sh-count { margin-left: auto; }

/* ───────── the footer: help by phone, in words ───────── */
#shell-foot { flex: none; }
#shell-foot:empty { display: none; }
.sh-foot { margin-top: 2rem; border-top: 1px solid var(--line); background: var(--soft); }
.sh-foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.5rem; }
.sh-foot__help { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; font-size: 1.05rem; }
.sh-foot__help .icon { color: var(--brand); }
.sh-foot__who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; color: var(--ink-2); }
.sh-foot__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: center; color: var(--ink-2); font-size: 0.95rem; }
.sh-foot__links a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: var(--tap); }
.tel-link { font-weight: 700; white-space: nowrap; }

/* the signed-out pages have no header: the brand sits over the card */
body.is-public #shell-top, body.is-public #shell-foot { display: none; }

/* a page coming in: one soft fade, nothing that moves far */
.app-main.route-in > * { animation: sh-in 0.22s var(--ease); }
@keyframes sh-in { from { opacity: 0; transform: translateY(6px); } }

/* agents who ask their device for less motion get none */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* printing an order: the page only */
@media print { #shell-top, #shell-foot, #staff-bar, .toasts, .no-print { display: none !important; } body { background: #fff; color: #000; } }
