:root { --stamp-brown:#74452a; --stamp-brown-dark:#4b2b1e; }
/* #273 the living card (dist/living-card.js) on the real customer page. Every size is a share of the card's width
   (cqw), so the same markup works full size on the home page, as a thumbnail in the layout sheet and on the QR screen.
   A stop only sets the custom properties below; layouts never name a stop. Four finishes on the same layouts:
   loyalty = plain paper; bronze (10-coffee pack) and silver (20-coffee pack) = engraved metal;
   gold (subscription) = holo with a rainbow shimmer. Motion is transform and opacity only; idle motion runs a few
   passes, then rests, and pauses off screen. Fonts and tokens are the app's own (DESIGN.md). */
.mc-wrap { container-type: inline-size; }
.mc {
  --panel: #f8efdc; --ink: #2b1b12; --soft: #5a4433; --accent: #e5432f; --safe: 0.4;
  --mc-body: var(--cc-font-body, "DM Sans", system-ui, sans-serif); --edge: calc(var(--safe) * 100%); --frost: color-mix(in srgb, var(--panel) 86%, transparent);
  position: relative; display: grid; overflow: hidden; isolation: isolate;
  border-radius: 5.4cqw; color: var(--ink); background: var(--panel);
  font-family: var(--cc-font-body, "DM Sans", system-ui, sans-serif); font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), 0 1px 2px rgba(58, 36, 20, 0.2), 0 14px 26px -14px rgba(58, 36, 20, 0.55);
}
/* The art: anchored right so the character stays in view; the text side is re-covered in the skin's own colour. */
.mc-art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--panel) 0 calc(var(--edge) - 4%), transparent calc(var(--edge) + 6%)),
    var(--art) right center / cover no-repeat;
}
.mc > :not(.mc-art) { position: relative; z-index: 1; min-width: 0; }

/* Shared parts. */
.mc-mark {
  display: grid; justify-items: start; width: max-content; transform: rotate(-6deg); transform-origin: 0 100%;
  font: 400 6.4cqw/0.86 var(--cc-font-display, "Lilita One", system-ui, sans-serif); text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink);
}
.mc-mark > span { font: inherit; color: inherit; letter-spacing: inherit; }
.mc-heart { display: inline-block; width: 0.78em; height: 0.72em; margin-left: 0.12em; vertical-align: 0.02em; fill: var(--accent); transform: rotate(10deg); }
.mc-label { font: 700 2.9cqw/1.15 var(--mc-body); letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.mc-balance { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 2.4cqw; }
/* One phrase, wrapped to two short lines beside the number, in any language. */
.mc-balance > .mc-label { max-width: 12ch; text-wrap: balance; }
.mc-num { font: 800 17cqw/0.85 var(--mc-body); letter-spacing: -0.04em; color: var(--ink); }
.mc-balance.is-empty .mc-num { opacity: 0.38; }
.mc-buy {
  grid-column: 1 / -1; justify-self: start; margin-top: 2.4cqw; padding: 1.9cqw 3.6cqw; border-radius: 99px;
  font: 700 3.3cqw/1.1 var(--mc-body); white-space: nowrap; text-decoration: none;
  background: var(--ink); color: var(--panel); border: 0; cursor: pointer;
}
.mc-stamps { display: flex; gap: 1.5cqw; margin: 0; padding: 0; list-style: none; }
.mc-stamp {
  flex: none; width: 5.6cqw; aspect-ratio: 1; border-radius: 50%;
  border: 0.45cqw solid var(--ds-primary, #c63a2c);
}
.mc-stamp.is-reward { border-style: dashed; }
.mc-stamp.is-on { border-color: transparent; background: var(--ds-primary, #c63a2c); }
.mc-count { font: 800 3.6cqw/1 var(--mc-body); white-space: nowrap; color: var(--ink); }
.mc-more, .mc-ready { font: 600 3cqw/1.2 var(--mc-body); color: color-mix(in srgb, var(--ink) 82%, transparent); }
.mc-ready { font-weight: 800; color: var(--ink); }

/* 1. Balance hero. */
.mc--hero { aspect-ratio: 85.6 / 54; grid-template-rows: auto 1fr auto; padding: 5cqw 5cqw 4cqw; }
.mc--hero .mc-balance { align-self: center; max-width: 46cqw; }
/* The number column is a fixed share of the card, whatever the art's own proportions. */
.mc--hero { --edge: 43%; }
.mc--hero .mc-rail {
  display: flex; align-items: center; justify-content: space-between; gap: 2cqw; margin: 0 -1.6cqw;
  padding: 2.2cqw 3cqw; border-radius: 99px; background: var(--frost);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
}
.mc--hero.is-ready .mc-count { color: var(--ink); }

/* 2. Postcard: a framed picture above a written half. */
.mc--postcard { grid-template-rows: auto auto; padding: 3.4cqw; gap: 3.4cqw; }
.mc--postcard .mc-window {
  position: relative; aspect-ratio: 2.4 / 1; overflow: hidden; border-radius: 3cqw; padding: 4cqw;
  box-shadow: 0 0 0 1.2cqw color-mix(in srgb, #fff 55%, var(--panel)), 0 0 0 calc(1.2cqw + 1px) color-mix(in srgb, var(--ink) 18%, transparent);
}
.mc--postcard .mc-window .mc-art { background-position: 0 0, right 72%; }
.mc--postcard .mc-mark { position: relative; z-index: 1; font-size: 5.6cqw; }
.mc--postcard .mc-halves { display: grid; grid-template-columns: 0.9fr 1.1fr; padding: 0 1.4cqw 1.4cqw; }
.mc--postcard .mc-half { display: grid; align-content: center; gap: 2cqw; min-width: 0; }
.mc--postcard .mc-stamphalf { padding-left: 4cqw; border-left: 0.5cqw dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.mc--postcard .mc-stamphalf .mc-label b { color: var(--ink); letter-spacing: 0.04em; }
.mc--postcard .mc-stamps.is-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.6cqw; }
.mc--postcard .is-grid .mc-stamp { width: 100%; }
.mc--postcard .mc-num { font-size: 15cqw; }

/* 3. Punch ticket: stub | perforation | picture with punched stamps. */
.mc--ticket { aspect-ratio: 85.6 / 54; grid-template-columns: 37% 0 1fr; padding: 0; }
.mc--ticket .mc-stub { display: grid; grid-template-rows: auto 1fr; padding: 5cqw 3cqw 4.6cqw 5cqw; background: var(--panel); }
.mc--ticket .mc-stub .mc-balance { align-self: end; }
.mc--ticket .mc-stub .mc-num { font-size: 15cqw; }
/* The stub is narrow: the buy prompt may wrap to two lines rather than cross the perforation. */
.mc--ticket .mc-buy { max-width: 100%; white-space: normal; border-radius: 3cqw; font-size: 3cqw; padding: 1.6cqw 2.6cqw; }
.mc--ticket .mc-perf { z-index: 2; border-left: 0.6cqw dotted color-mix(in srgb, var(--ink) 40%, transparent); }
.mc--ticket .mc-perf::before, .mc--ticket .mc-perf::after {
  content: ""; position: absolute; left: -2.6cqw; width: 5.2cqw; aspect-ratio: 1; border-radius: 50%;
  background: var(--cc-paper, #f7f0e2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
}
.mc--ticket .mc-perf::before { top: -2.6cqw; } .mc--ticket .mc-perf::after { bottom: -2.6cqw; }
.mc--ticket .mc-pic { position: relative; display: grid; align-content: end; padding: 3.6cqw; overflow: hidden; }
/* The picture is the art's right-hand side only, so the character stays whole. */
.mc--ticket .mc-pic .mc-art { background: var(--art) right center / auto 100% no-repeat; }
.mc--ticket .mc-punches { position: relative; padding: 1.8cqw 2cqw; border-radius: 99px; background: var(--frost); }
.mc--ticket .mc-stamps.is-punch { justify-content: space-between; gap: 0; }
.mc--ticket .is-punch .mc-stamp { width: 4.3cqw; border-width: 0.35cqw; }
.mc--ticket .mc-chip { position: absolute; top: 3.6cqw; right: 3.6cqw; padding: 1.4cqw 2.8cqw; border-radius: 99px; font: 800 3.4cqw/1 var(--mc-body); background: var(--frost); color: var(--ink); }

/* 4. Wallet pass. */
.mc--pass { grid-template-rows: auto auto auto auto; gap: 3cqw; padding: 4.4cqw 4.8cqw 5cqw; }
.mc--pass .mc-passhead, .mc--pass .mc-fields { display: flex; justify-content: space-between; align-items: end; gap: 3cqw; }
.mc--pass .mc-word { font: 400 5.6cqw/1 var(--cc-font-display, "Lilita One", system-ui, sans-serif); text-transform: uppercase; }
.mc--pass .mc-field { display: grid; gap: 0.8cqw; }
.mc--pass .mc-field.is-right { text-align: right; justify-items: end; }
.mc--pass .mc-field strong { font: 800 7cqw/1 var(--mc-body); }
.mc--pass .mc-passhead .mc-field strong { font-size: 9cqw; }
.mc--pass .mc-strip { position: relative; aspect-ratio: 2.9 / 1; margin: 0 -4.8cqw; overflow: hidden; }
.mc--pass .mc-strip .mc-art { background: var(--art) right 68% / calc(100% / (1 - var(--safe) + 0.04)) auto no-repeat; }
.mc--pass .mc-stamps.is-bar { gap: 1cqw; }
.mc--pass .is-bar .mc-stamp { flex: 1; width: auto; aspect-ratio: auto; height: 1.8cqw; border-radius: 99px; border-width: 0.35cqw; }
.mc--pass .mc-passbuy { display: flex; justify-content: space-between; align-items: center; }
.mc--pass .mc-passbuy .mc-buy { margin: 0; }
.mc--pass.is-noprepaid .mc-passhead .mc-field strong { opacity: 0.38; }

/* ---- Finishes. */
.lc { --lc-ease-out: var(--gold-ease-out, cubic-bezier(0.23, 1, 0.32, 1)); --lc-ease-in-out: var(--gold-ease-in-out, cubic-bezier(0.77, 0, 0.175, 1)); }
.lc .mc > .lc-fx { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: inherit; pointer-events: none; }
.lc .mc > .lc-fx > * { position: absolute; }
/* Where effects are strong: over the picture, faint over the numbers. Each layout puts its picture somewhere else. */
.lc .mc { --lc-film: linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0 34%, #000 58%); --lc-panel: linear-gradient(90deg, #000 0 40%, rgba(0, 0, 0, 0.25) 58%, transparent 72%); }
.lc .mc--ticket { --lc-film: linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0 37%, #000 46%); --lc-panel: linear-gradient(90deg, #000 0 36%, transparent 40%); }
.lc .mc--postcard { --lc-film: linear-gradient(180deg, #000 0 50%, rgba(0, 0, 0, 0.14) 60%); --lc-panel: linear-gradient(180deg, transparent 0 52%, #000 60%); }
.lc .mc--pass { --lc-film: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0 22%, #000 28% 66%, rgba(0, 0, 0, 0.12) 72%); --lc-panel: linear-gradient(180deg, #000 0 24%, transparent 28% 68%, #000 72%); }

/* The metal edge every upgraded card wears: a gradient ring drawn as a masked border, so the card keeps its size,
   and a fine inner pinstripe a little inside it, like an engraved bank card. */
.lc--bronze .mc::after, .lc--silver .mc::after, .lc--gold .mc::after {
  content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  padding: var(--lc-ring, 1.1cqw); background: var(--lc-ring-face);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.lc--bronze .mc::before, .lc--silver .mc::before {
  content: ""; position: absolute; inset: 2.4cqw; z-index: 3; border-radius: 3.4cqw; pointer-events: none; opacity: 0.7;
  padding: 0.28cqw; background: var(--lc-ring-face);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.lc--bronze {
  --lc-metal: #a8642c; --lc-metal-ink: #4a260c;
  --lc-ring-face: conic-gradient(from 210deg, #6e3d17, #f2c48f, #a86a33, #ffe1b8, #7d4720, #e7a96c, #8a5228, #ffd6a3, #6e3d17);
}
.lc--silver {
  --lc-metal: #8d959e; --lc-metal-ink: #2c333b;
  --lc-ring-face: conic-gradient(from 210deg, #6f7780, #f8fafc, #aab2bb, #ffffff, #7f8790, #e1e6ec, #9aa3ad, #fdfeff, #6f7780);
}
.lc--bronze .mc, .lc--silver .mc { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(58, 36, 20, 0.25), 0 20px 32px -14px rgba(58, 36, 20, 0.62); }
.lc--bronze .mc-art { filter: sepia(0.12) saturate(1.16) contrast(1.05); }
.lc--silver .mc-art { filter: saturate(1.04) contrast(1.06) brightness(1.02); }
.lc--bronze .mc-num { color: color-mix(in srgb, var(--ink) 74%, #9a5420); }
.lc--silver .mc-num { color: color-mix(in srgb, var(--ink) 78%, #4f5c6b); }
.lc--bronze .mc-num, .lc--silver .mc-num { text-shadow: 0 0.25cqw 0 color-mix(in srgb, var(--lc-metal) 45%, transparent); }
/* Engraved guilloché: two interfering rosettes in the metal's colour on the number side, like a banknote. */
.lc .lc-guilloche {
  inset: 0; opacity: 0.2; mix-blend-mode: multiply;
  background:
    repeating-radial-gradient(circle at 6% 118%, transparent 0 1.1cqw, var(--lc-metal) 1.1cqw 1.22cqw),
    repeating-radial-gradient(circle at 44% -24%, transparent 0 1.3cqw, var(--lc-metal) 1.3cqw 1.4cqw);
  -webkit-mask-image: var(--lc-panel); mask-image: var(--lc-panel);
}
/* Brushed metal hairlines across the panel. */
.lc .lc-brush {
  inset: 0; mix-blend-mode: soft-light; opacity: 0.9;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 3px), linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.45) 46%, rgba(255, 248, 225, 0.16) 56%, transparent 68%);
  -webkit-mask-image: var(--lc-panel); mask-image: var(--lc-panel);
}
/* A soft light on the metal that follows a finger (bindLight) and otherwise rests up and to the left. */
.lc .lc-light {
  inset: -30%; mix-blend-mode: soft-light; opacity: 0.85; transform: translate(-12%, -14%); will-change: transform;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 32%);
}
@media (prefers-reduced-motion: no-preference) { .lc .lc-light { transition: transform 260ms var(--lc-ease-out); } }
/* The light sweep that crosses a pack or subscriber card when it arrives (played by living-card.js). */
.lc-sheen {
  inset: 0; z-index: 5; transform: translateX(-120%); mix-blend-mode: soft-light; will-change: transform;
  background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, 0.9) 45%, rgba(255, 236, 190, 0.6) 52%, transparent 68%);
}

/* ---- Gold subscriber: holo with a rainbow shimmer. */
.lc--gold { --lc-ring: 1.2cqw; --lc-ring-face: conic-gradient(from 200deg, #8a5a1c, #f7e7b0, #c99a45, #fff4cf, #a8742c, #f2d58a, #7d5016, #f7e7b0, #8a5a1c); }
.lc--gold .mc { box-shadow: 0 1px 2px rgba(80, 52, 14, 0.3), 0 20px 34px -14px rgba(120, 80, 20, 0.7), 0 0 0 1px rgba(176, 133, 58, 0.5); }
.lc--gold .mc-art { filter: saturate(1.18) contrast(1.06); }
/* The rainbow film: a sheet three cards wide, panned by transform inside a still frame that holds the mask and the
   blend, so the film is strongest over the picture and faint behind the numbers wherever it has drifted to. */
.lc--gold .lc-film { inset: 0; mix-blend-mode: overlay; opacity: 0.68; -webkit-mask-image: var(--lc-film); mask-image: var(--lc-film); }
.lc--gold .lc-holo {
  position: absolute; top: 0; bottom: 0; left: -100%; width: 300%; will-change: transform; transform: translateX(-8%);
  background:
    repeating-linear-gradient(112deg,
      rgba(255, 196, 120, 0) 0%, rgba(255, 120, 150, 0.55) 3%, rgba(255, 214, 102, 0.7) 6%, rgba(120, 255, 190, 0.55) 9%,
      rgba(90, 200, 255, 0.6) 12%, rgba(190, 140, 255, 0.55) 15%, rgba(255, 196, 120, 0) 18%),
    linear-gradient(112deg, rgba(255, 226, 150, 0.25), rgba(255, 255, 255, 0) 40%, rgba(255, 210, 120, 0.3));
}
.lc--gold .lc-glitter {
  inset: 0; mix-blend-mode: screen; opacity: 0.4;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 244, 205, 0.9) 0 0.5px, transparent 1px) 0 0 / 9px 9px,
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.8) 0 0.5px, transparent 1px) 4px 3px / 13px 11px;
  -webkit-mask-image: var(--lc-film); mask-image: var(--lc-film);
}
.lc--gold .lc-spark {
  left: var(--x); top: var(--y); width: 3.4cqw; aspect-ratio: 1; margin: -1.7cqw 0 0 -1.7cqw; opacity: 0.85;
  background: radial-gradient(circle, #fff 0 22%, #ffe9a8 40%, rgba(255, 214, 120, 0) 70%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.lc--gold .lc-seal {
  top: var(--lc-seal-top, 4.2cqw); right: 4.2cqw; z-index: 3; display: grid; place-items: center; width: 8.4cqw; aspect-ratio: 1; border-radius: 50%;
  font: 800 4.6cqw/1 var(--mc-body); color: #4a2f0b;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 42%), conic-gradient(from 30deg, #b27d2c, #fff1c2, #d9a94f, #ffe7a3, #9c6a22, #f5d98c, #b27d2c);
  box-shadow: 0 0 0 0.5cqw rgba(255, 244, 205, 0.7), 0 1cqw 2cqw rgba(60, 36, 8, 0.45);
}
.lc .mc--pass { --lc-seal-top: 19cqw; }
.lc .mc--postcard { --lc-seal-top: 6cqw; }
/* On the ticket the medal or seal takes the picture's top-right corner, so the stamp chip moves to its top-left. */
.lc--bronze .mc--ticket .mc-chip, .lc--silver .mc--ticket .mc-chip, .lc--gold .mc--ticket .mc-chip { right: auto; left: 3.6cqw; }
/* Gold accents on the numbers' side: the stamps and the heart go gold, the ink stays ink for contrast. */
.lc--gold .mc { --accent: #c99a2e !important; }

/* The passport tick after a whole round: a small ink stamp pressed into the corner of the art. */
.lc-passport {
  top: 3.2cqw; right: 16cqw; z-index: 3; display: grid; place-items: center; width: 7cqw; aspect-ratio: 1; border-radius: 50%;
  font: 800 3.6cqw/1 var(--mc-body); color: #b4231a; border: 0.5cqw solid currentColor; background: rgba(255, 250, 240, 0.7); transform: rotate(-14deg);
}
.lc--loyalty .lc-passport { right: 4.2cqw; }

/* ---- Idle motion, only when the user allows motion. Gold holo: four slow passes, then rest. */
@media (prefers-reduced-motion: no-preference) {
  .lc--gold .lc-holo { animation: lc-holo 5.6s var(--lc-ease-in-out) 0.4s 4 alternate both; }
  .lc--gold .lc-spark { animation: lc-twinkle 2.8s ease-in-out var(--d) 5 both; }
  .is-offscreen .lc-holo, .is-offscreen .lc-spark { animation-play-state: paused; }
}
@keyframes lc-holo { from { transform: translateX(-16%); } to { transform: translateX(16%); } }
@keyframes lc-twinkle { 0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* ---- Home page host: the stage stacks faces in one grid cell so a change can cross-fade or ripple in place. */
/* Josh (31 Oct 2026): the card sits in the middle of the page column, its own single centred track, whatever the width. */
.lc-home { position: relative; width: 100%; max-width: 480px; margin: 6px auto 4px; }
.lc-home.is-loading .lc-stage { aspect-ratio: 85.6 / 54; border-radius: 18px; background: color-mix(in srgb, var(--cc-divider, #dcc9a8) 45%, transparent); }
.lc-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; perspective: 1100px; }
.lc-stage > .lc-face, .lc-stage > .lc-flip { grid-area: 1 / 1; }
.lc-face.is-incoming { z-index: 2; }
.lc-flip { display: grid; transform-style: preserve-3d; will-change: transform; }
.lc-flip > .lc-face { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.lc-flip > .lc-backface { transform: rotateY(180deg); }
.lc-backface .mc-wrap, .lc-backface .lc-back { height: 100%; }
.is-cutscene { z-index: 5; }

/* The card's back for the upgrade cut-scene. */
.lc-back {
  position: relative; display: grid; place-content: center; justify-items: center; gap: 1.6cqw; overflow: hidden; isolation: isolate;
  border-radius: 5.4cqw; text-align: center; font-family: var(--cc-font-body, "DM Sans", system-ui, sans-serif);
  background: radial-gradient(120% 90% at 50% 0%, #5a3a26, #2b1b12 70%); color: #f6ead2;
  box-shadow: 0 20px 34px -14px rgba(58, 36, 20, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.lc-back > .lc-sheen { position: absolute; }
.lc-back-mark { position: absolute; top: 5cqw; left: 5.4cqw; font: 400 4.4cqw/1 var(--cc-font-display, "Lilita One", system-ui, sans-serif); text-transform: uppercase; letter-spacing: 0.02em; opacity: 0.9; }
.lc-back-num { font: 800 22cqw/0.9 var(--cc-font-body, "DM Sans", system-ui, sans-serif); letter-spacing: -0.04em; -webkit-background-clip: text; background-clip: text; color: transparent; }
.lc-back > span:not(.lc-back-mark) { font: 700 3.6cqw/1.2 var(--cc-font-body, "DM Sans", system-ui, sans-serif); letter-spacing: 0.12em; text-transform: uppercase; }
.lc-back--bronze .lc-back-num { background-image: linear-gradient(115deg, #ffe1b8, #b9773d 35%, #ffd6a3 55%, #8a5228); }
.lc-back--silver { background: radial-gradient(120% 90% at 50% 0%, #4a525b, #1f2429 72%); }
.lc-back--silver .lc-back-num { background-image: linear-gradient(115deg, #ffffff, #aab2bb 35%, #f8fafc 55%, #7f8790); }
.lc-back--gold { background: radial-gradient(120% 100% at 30% 0%, #fff1c2, #d9a94f 40%, #8a5a1c 100%); color: #3a2408; }
.lc-back--gold .lc-back-num { background-image: linear-gradient(115deg, #fff, #ffe7a3 40%, #ff9fb4 55%, #8fe3ff 70%, #fff4cf); filter: drop-shadow(0 0.6cqw 0.6cqw rgba(80, 50, 10, 0.4)); }

/* "Arrived in Paris": a dark pill that settles just under the card, then leaves. */
.lc-plane { width: 1.05em; height: 1.05em; flex: none; fill: currentColor; transform: rotate(45deg); vertical-align: -0.15em; }

/* The route sits below the card controls. The layout picker keeps its own control. */
.lc-meta { display: grid; row-gap: 12px; margin: 12px 2px 0; font-family: var(--cc-font-body, "DM Sans", sans-serif); }
.lc-route {
  display: grid; grid-template-columns: auto 44px auto minmax(0, 1fr); align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 10px; border: 1px solid var(--ds-line); border-radius: 14px;
  background: var(--ds-surface); color: var(--ds-ink);
}
.lc-route--text { grid-template-columns: minmax(0, 1fr); }
.lc-route-thumb { box-sizing: border-box; display: block; object-fit: cover; border: 1.5px solid var(--ds-ink); border-radius: 8px; }
.lc-route-flight { position: relative; height: 0; border-top: 2px dashed var(--cc-brown-muted, #7a5a42); font-size: 0; }
.lc-route-flight::after {
  content: "✈"; position: absolute; top: -11px; left: 12px; padding: 0 2px;
  background: var(--ds-surface); color: var(--ds-primary); font: 700 0.875rem/1rem system-ui, sans-serif;
}
.lc-route-title { display: block; font-size: 0.8125rem; line-height: 1.15; }
.lc-route-detail { display: block; color: var(--cc-brown-muted, #7a5a42); font-size: 0.71875rem; line-height: 15px; }
.lc-route-change, .lc-layout-btn { border: 0; padding: 0; background: transparent; color: var(--ds-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.lc-route-change { position: relative; font: inherit; }
.lc-route-change::before { content: ""; position: absolute; inset: 0 -2px -5px; }
.lc-layout-btn { justify-self: end; min-height: 44px; font: 700 0.8125rem/1.15 var(--cc-font-body, "DM Sans", sans-serif); }
@media (prefers-reduced-motion: no-preference) { .lc-layout-btn { transition: transform 160ms var(--lc-ease-out, ease-out); } .lc-layout-btn:active { transform: scale(0.97); } }

/* ---- Sheets (in the app dialog): choose the next stop, choose the layout. */
.lc-sheet { padding: 10px 16px 18px; color: var(--ds-ink, #2e1f16); }
.mc-grab { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 99px; background: #dcc9a8; }
.lc-sheet h2 { margin: 0; font: 400 1.625rem/1.05 var(--cc-font-display, "Lilita One", sans-serif); }
.lc-sheet > p { margin: 6px 0 4px; font: 400 0.875rem/1.4 var(--cc-font-body, "DM Sans", sans-serif); color: #7a5a42; }
.lc-progress { display: grid; gap: 6px; margin-top: 10px !important; font-weight: 600 !important; font-size: 0.8125rem !important; }
.lc-progress span { display: block; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--ds-primary, #c63a2c) 0 var(--done), #eadcc2 var(--done)); }
.lc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; margin-top: 14px; }
.lc-tile { position: relative; display: grid; gap: 5px; min-width: 0; cursor: pointer; }
.lc-tile input { position: absolute; opacity: 0; pointer-events: none; }
.lc-tile-art { position: relative; display: block; aspect-ratio: 1 / 1.08; overflow: hidden; border-radius: 12px; background: var(--panel); outline: 3px solid transparent; outline-offset: 2px; box-shadow: 0 1px 2px rgba(58, 36, 20, 0.2), 0 8px 14px -10px rgba(58, 36, 20, 0.6); }
.lc-tile-art > i { position: absolute; inset: 0; background: var(--art) 82% center / auto 100% no-repeat; }
/* Visited: full colour and shiny, a gloss across the picture. */
.lc-tile.is-visited .lc-tile-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255, 255, 255, 0.5) 0 14%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, 0.22) 78%, rgba(255, 255, 255, 0) 92%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); border-radius: inherit; }
.lc-tile.is-visited .lc-tile-art > i { filter: saturate(1.12) contrast(1.04); }
/* Not visited: only a shadow of the picture, so the art stays secret until the card travels there. */
/* Josh (31 Oct 2026): a stop not visited yet is a silhouette: its picture cut to one dark shape on a plain light ground,
   so the place reads as an outline to guess. Visited stops are the full colour card. */
.lc-tile.is-secret .lc-tile-art { background: #efe3cc; isolation: isolate; }
.lc-tile.is-secret .lc-tile-art > i { inset: -2px; filter: grayscale(1) blur(0.7px) brightness(0.85) contrast(30); mix-blend-mode: multiply; }
.lc-tile.is-secret .lc-tile-art::after { content: ""; position: absolute; inset: 0; z-index: 0; background: #2b1b12; mix-blend-mode: screen; border-radius: inherit; }
.lc-tile.is-secret .lc-tile-q { background: rgba(255, 250, 240, 0.86); border-color: #7a5a42; color: #2b1b12; }
.lc-tile-art > em { position: absolute; z-index: 1; display: grid; place-items: center; font: 800 0.75rem/1 var(--cc-font-body, "DM Sans", sans-serif); font-style: normal; }
.lc-tile-q { top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 1px dashed rgba(246, 234, 210, 0.55); background: #3b2c22; color: #f6ead2; font-size: 0.75rem !important; }
.lc-tile-tick { top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 250, 240, 0.92); color: #2f7d4f; }
.lc-tile-flag { left: 6px; bottom: 6px; gap: 4px; display: inline-flex !important; padding: 4px 8px; border-radius: 99px; background: var(--ink-line, #2b1b12); color: #fbf3e4; }
.lc-tile-name { font: 600 0.78125rem/1.2 var(--cc-font-body, "DM Sans", sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-tile[aria-disabled="true"] { cursor: default; }
.lc-tile.is-chosen .lc-tile-art, .lc-tile input:focus-visible + .lc-tile-art { outline-color: var(--ds-primary, #c63a2c); }
.lc-tile.is-chosen::after { content: "✓"; position: absolute; top: -6px; right: -6px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ds-primary, #c63a2c); color: #fff; font: 800 0.8125rem/1 var(--cc-font-body, "DM Sans", sans-serif); }
/* The sheet's main button stays in reach while the grid scrolls under it. */
.lc-sheet .mc-save { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -14px 18px -6px var(--ds-surface, #fbf3e4); }
.mc-save { width: 100%; min-height: 50px; margin-top: 18px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--ds-primary, #c63a2c); color: #fff; font: 700 1rem/1.15 var(--cc-font-body, "DM Sans", sans-serif); }
.lc-cancel { display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 0; background: none; color: #7a5a42; font: 600 0.875rem/1 var(--cc-font-body, "DM Sans", sans-serif); }
.lc-layouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 16px 12px; margin-top: 14px; }
.mc-skin { position: relative; display: grid; gap: 5px; cursor: pointer; }
.mc-skin input { position: absolute; opacity: 0; pointer-events: none; }
.mc-thumb { display: block; border-radius: 8px; outline: 3px solid transparent; outline-offset: 2px; }
.mc-skin.is-chosen .mc-thumb, .mc-skin input:focus-visible + .mc-thumb { outline-color: var(--ds-primary, #c63a2c); }
.mc-skin.is-chosen::after { content: "✓"; position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ds-primary, #c63a2c); color: #fff; font: 800 0.8125rem/1 var(--cc-font-body, "DM Sans", sans-serif); }
.mc-skinname { font: 600 0.8125rem/1.2 var(--cc-font-body, "DM Sans", sans-serif); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: no-preference) { .mc-thumb, .lc-tile-art { transition: outline-color 160ms ease; } }

/* ---- The 3D card's back (card3d.js, living-card.js qrBack): the QR on a white tile across the right, on the card's own
   panel and finish; the mark, today's stop and the member code beside it. The art is a faint mirror behind. */
.mc--qrback { aspect-ratio: 85.6 / 54; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3.4cqw; align-items: center; padding: 2.4cqw 2.4cqw 2.4cqw 5.4cqw; }
.mc--qrback .mc-art { background: var(--art) left center / cover no-repeat; transform: scaleX(-1); opacity: 0.16; }
.mc-qrside { display: grid; align-content: space-between; justify-items: start; height: 100%; padding: 1cqw 0; }
.lc-qr-place { display: inline-flex; gap: 1.4cqw; align-items: flex-start; max-width: 100%; padding: 1.6cqw 2.6cqw; border-radius: 2.6cqw; background: color-mix(in srgb, var(--panel) 86%, transparent); color: var(--ink); font: 700 3.3cqw/1.15 var(--mc-body); }
.lc-qr-place .lc-plane { margin-top: 0.1em; }
.lc-qr-shop { max-width: 100%; color: var(--ink); font: 800 3.4cqw/1.1 var(--mc-body); overflow-wrap: anywhere; }
.lc-qr-balance { display: grid; gap: 0.8cqw; max-width: 100%; color: var(--ink); font: 600 2.7cqw/1.12 var(--mc-body); overflow-wrap: anywhere; }
.mc--qrback .code { font: 800 3cqw/1 var(--mc-body); letter-spacing: 0.06em; white-space: nowrap; color: var(--ink); }
.lc-qr-code { width: 58cqw; aspect-ratio: 1; padding: 1.2cqw; border-radius: 3cqw; background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent), 0 1.6cqw 3.2cqw -1.6cqw rgba(40, 24, 10, 0.4); }
.lc-qr-code .qr { width: 100%; height: 100%; margin: 0; padding: 0; border-radius: 0; background: #fff; }
.lc-qr-code .notice { margin: 0; height: 100%; display: grid; place-items: center; font-size: 3.4cqw; }
.mc--qrback .lc-seal, .mc--qrback .lc-passport { display: none; }
.mc--qrback .lc-fx { -webkit-mask-image: linear-gradient(90deg, #000 0 36%, transparent 42%); mask-image: linear-gradient(90deg, #000 0 36%, transparent 42%); }

/* Only when the card cannot turn over (pictures not loaded, or the 3D viewer failed): the plain QR right under the button. */
.qr-inline { display: grid; justify-items: center; gap: 8px; margin: 14px 0 6px; border: 1.5px solid var(--cc-divider, #dcc9a8); border-radius: 18px; background: var(--cc-card, #fff8ec); }
.qr-inline .code { font: 800 0.9375rem/1 var(--cc-font-body, "DM Sans", sans-serif); letter-spacing: 0.12em; }

/* The pocket sheets the #800 tiles open: Heart, Ocean, Gold. */
.pocket-sheet .mc-stamps { gap: clamp(2px, 1vw, 4px); }
.pocket-sheet .mc-stamp { width: 12px; border: 1.5px solid var(--pocket-color); }
.pocket-sheet .mc-stamp.is-reward { border-style: dashed; }
.pocket-sheet .mc-stamp.is-on { background: var(--pocket-color); }
.pocket--stamps { --pocket-color:var(--stamp-brown); --pocket-light:#f3e5d7; --pocket-text:var(--stamp-brown-dark); }
.pocket--prepaid { --pocket-color:#1f7a8c; --pocket-light:#d3ecef; --pocket-text:#166071; }
.pocket--weekly { --pocket-color:#d9a520; --pocket-light:#fae9b5; --pocket-text:#8a6400; --pocket-icon-ink:#4a3300; }
.pocket-icon {
  display:grid; place-items:center; width:24px; height:24px; flex:none; border-radius:8px;
  background:var(--pocket-color); color:var(--pocket-icon-ink,white);
}
.pocket-icon svg { width:15px; height:15px; }
.pocket-icon .mc-heart { margin:0; transform:none; fill:currentColor; }

dialog.pocket-dialog {
  position:fixed; inset:auto 0 0; width:100%; max-width:440px; max-height:calc(100% - 16px);
  margin:auto auto 0; padding:0; border:0; border-radius:22px 22px 0 0; background:#fff9ef; color:#2e1f16;
}
dialog.pocket-dialog::backdrop { background:rgb(46 31 22 / .38); }
.pocket-sheet {
  position:relative; border-top:6px solid var(--pocket-color);
  padding:10px 16px calc(20px + env(safe-area-inset-bottom));
}
.pocket-sheet .mc-grab { width:36px; height:4px; margin:0 auto 16px; }
.pocket-close { position:absolute; top:5px; right:8px; width:max(44px, 1.8em); height:max(44px, 1.8em); padding:0; line-height:1; border:0; border-radius:50%; background:transparent; color:inherit; font-size:1.5rem; cursor:pointer; }
.pocket-heading { display:flex; align-items:center; gap:10px; border-radius:16px; background:var(--pocket-light); padding:10px; }
.pocket-heading .pocket-icon { width:44px; height:44px; border-radius:12px; }
.pocket-heading .pocket-icon svg { width:24px; height:24px; }
.pocket-heading span { font-size:0.75rem; font-weight:700; }
.pocket-sheet h2 { font:400 1.1875rem/1.15 var(--cc-font-display); margin:2px 0 0; }
.pocket-sheet p { margin:12px 0; }
.pocket-sheet .mc-stamps { margin-top:12px; }
.pocket-sheet .mc-stamp { width:16px; }
.pocket-action { width:100%; padding:10px 12px; min-height:44px; border:0; border-radius:999px; cursor:pointer; font-weight:700; background:var(--pocket-text); color:white; }
@media (prefers-reduced-motion: no-preference) {
  .pocket-dialog[open] { animation:pocket-rise 280ms cubic-bezier(.2,.8,.2,1) both; }
  .pocket-dialog[open]::backdrop { animation:pocket-fade 240ms ease-out both; }
  .pocket-dialog[open].is-closing { animation:pocket-out 260ms cubic-bezier(.2,.8,.2,1) both; }
  .pocket-dialog[open].is-closing::backdrop { animation:pocket-dim 260ms ease-out both; }
}
@keyframes pocket-rise { from { transform:translateY(105%); } }
@keyframes pocket-fade { from { opacity:0; } }
@keyframes pocket-out { to { transform:translateY(105%); } }
@keyframes pocket-dim { to { opacity:0; } }
/* #737: one banner under the card, with the final appearance as the default. */
.smart-banner{position:relative;isolation:isolate;display:flex;align-items:center;gap:12px;overflow:hidden;margin:12px 0 0;padding:12px 13px;border:1.5px solid;border-radius:16px;color:#2e1f16;text-align:start}
.smart-copy,.smart-tile,.smart-art,.smart-action,.smart-chip{position:relative;z-index:1}
.smart-copy{min-width:0;flex:1}
.smart-copy strong{display:block;font:400 1.09375rem/1.15 "Lilita One",var(--cc-font-display)}
.smart-copy>span{display:block;margin-top:3px;font-size:0.78125rem;line-height:1.25}
.smart-tile{display:grid;place-items:center;flex:0 0 46px;height:46px;border-radius:14px;background:white;font:1.625rem/1 system-ui}
.smart-tile svg{display:block;width:24px;height:24px}
.smart-banner .smart-art{flex:none;width:52px;height:52px;object-fit:contain}
.smart-action{flex:none;min-height:44px;padding:10px 12px;border:0;border-radius:999px;color:#fff;background:#c63a2c;box-shadow:0 3px #7d241b;font:700 0.78125rem/1.15 var(--cc-font-body);cursor:pointer}
.smart-action span{display:inline-block}
.smart-action:focus-visible{outline:2px solid #2e1f16;outline-offset:2px}
.smart-marks{display:flex;flex-wrap:wrap;gap:5px;list-style:none;margin:7px 0 0;padding:0}
.smart-pip,.smart-dot{box-sizing:border-box;height:16px;width:16px;border:2px solid #c99a1e;border-radius:5px;opacity:.45}
.smart-pip.is-filled{border-color:#a57a0b;background:#d9a520;opacity:1}
.smart-dot{width:12px;height:12px;border:1.5px solid #d8432f;border-radius:50%;opacity:1}
.smart-dot.is-filled{background:#d8432f}
.smart--stopped{background:#efe8e1;border-color:#c9b8aa;border-inline-start:5px solid #a3271b}
.smart--stopped .smart-tile{background:#f8ddd6;color:#a3271b;font-weight:800}
.smart--reward{background:linear-gradient(120deg,#ffe27a,#f4b63f);border-color:rgba(46,31,22,.2);box-shadow:0 0 0 3px #fff3b0,0 0 18px rgba(244,182,63,.55)}
.smart--reward{padding:var(--reward-padding,8px 10px);gap:var(--reward-gap,8px)}
.smart--reward .smart-art{width:var(--reward-art,40px);height:var(--reward-art,40px)}
.smart--reward::before,.smart--prepaid::before{content:"";position:absolute;left:-46px;top:calc(50% - 80px);width:160px;height:160px;background:repeating-conic-gradient(rgb(255 255 255/.6) 0 10deg,transparent 10deg 24deg);mask-image:radial-gradient(black 30%,transparent 70%);pointer-events:none}
.smart--reward::after,.smart--prepaid::after,.smart--low::after,.smart--week::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 30%,rgb(255 255 255/.35) 50%,transparent 66%);transform:translateX(-110%);pointer-events:none}
.smart-confetti{position:absolute;z-index:2;top:50%;left:30%;pointer-events:none}
.smart-confetti i{position:absolute;width:8px;height:12px;border-radius:2px;background:#e84b3c;opacity:0}
.smart-confetti i:nth-child(6n+2){background:#f4b63f}
.smart-confetti i:nth-child(6n+3){background:#1f7a8c}
.smart-confetti i:nth-child(6n+4){background:#c63a2c}
.smart-confetti i:nth-child(6n+5){background:#fbe3a6}
.smart-confetti i:nth-child(6n){background:#d9a520}
.smart--week{padding-block:9px;background:linear-gradient(120deg,#fff6d2,#f6dc8a);border-color:#e3c25e}
.smart--low{background:#e2f2f4;border-color:#a9d3da}
.smart--low .smart-action{background:#1f7a8c;box-shadow:0 3px #11505c}
.smart--prepaid{background:linear-gradient(120deg,#ffe99c,#f4bb4e);border-color:#d9a134}
.smart-pack{position:relative;z-index:1;display:flex;align-items:center;flex:none;gap:3px;min-height:46px}
.smart-pack [data-smart-count]{font:400 1.875rem/.95 "Lilita One",var(--cc-font-display);color:#542c12;font-variant-numeric:tabular-nums}
.smart--low{gap:8px}
.smart--low .smart-pack .smart-art{width:36px;height:42px}
.smart--used{background:#ede6f0;border-color:#cfc2d8;color:#3a2e48}
.smart--used .smart-tile,.smart-chip{color:#6b5a86}
.smart-chip{border:2px solid;border-radius:8px;background:#fff;padding:3px 5px;font-size:0.6875rem;font-weight:700;letter-spacing:.06em}
.smart--one{background:linear-gradient(120deg,#ffe4dc,#ffc9b8);border-color:#f2a08b}
.smart--one .smart-tile{color:#d8432f}
.smart--one .smart-dot:last-child{border:2px solid #d9a520;background:#fff3b0;box-shadow:0 0 0 3px rgb(244 182 63/.35)}
.smart--stamps{background:#fff9ef;border-color:#f2b4a6;border-inline-start:5px solid #d8432f}
.smart--stamps .smart-art{border-radius:50%;object-fit:cover}
.smart--stamps .smart-dot:last-child{border-style:dashed}
.smart--new{min-height:84px;border-color:#dcc9a8;background-color:#fff9ef}
.smart--new{background:linear-gradient(90deg,#fff9ef 46%,rgb(255 249 239/.8) 72%,rgb(255 249 239/.3)),url(card-art/living/uk-cafe-web-strip.png?v=c-a4f215b79667) right center/auto 135% no-repeat,#fff9ef}
@media (prefers-reduced-motion: no-preference){
 .smart-play{animation:smart-rise .4s cubic-bezier(.2,.8,.2,1)}
 .smart--stopped.smart-play{animation:smart-fade .5s ease-out}
 .smart--reward.smart-play::before{animation:smart-rays 2s ease-out}
 .smart--reward.smart-play::after,.smart--prepaid.smart-play::after,.smart--low.smart-play::after,.smart--week.smart-play::after{animation:smart-shine 1.6s ease-in-out .5s}
 .smart--reward.smart-play .smart-art{animation:smart-wiggle 1.6s ease-in-out}
 .smart-play .smart-confetti i{animation:smart-burst 1.1s cubic-bezier(.2,.8,.2,1) forwards}
 .smart-play .smart-pip{animation:smart-pop .35s cubic-bezier(.3,1.6,.5,1) calc(.25s + min(var(--mark-index), 9) * .12s) both}
 .smart--low.smart-play .smart-pack{animation:smart-nudge .6s ease-in-out .7s 2}
 .smart--low.smart-play .smart-action{animation:smart-ring 1.4s ease-out 1.2s 2}
 .smart--used.smart-play{animation:smart-fade .7s ease-out}
 .smart--used.smart-play .smart-tile{animation:smart-breathe 2s ease-in-out}
 .smart-play .smart-dot.is-filled{animation:smart-pop .3s cubic-bezier(.3,1.6,.5,1) calc(var(--mark-index) * .06s) both}
 .smart--stamps.smart-play .smart-dot.is-filled{animation-delay:calc(.2s + var(--mark-index) * .1s)}
 .smart--one.smart-play .smart-dot:last-child{animation:smart-glow 1.2s ease-in-out .7s}
 .smart--stamps.smart-play .smart-art{animation:smart-bob 1s ease-in-out 3}
 .smart--new.smart-play{animation:smart-slide .55s cubic-bezier(.2,.8,.2,1)}
 .smart--new.smart-play .smart-action span{animation:smart-arrow 1s ease-in-out .7s 3}
}
@keyframes smart-rise{from{transform:translateY(8px);opacity:0}}
@keyframes smart-fade{from{opacity:0}}
@keyframes smart-rays{to{transform:rotate(24deg)}}
@keyframes smart-shine{to{transform:translateX(110%)}}
@keyframes smart-wiggle{25%{transform:rotate(-8deg) scale(1.06)}75%{transform:rotate(8deg) scale(1.06)}}
@keyframes smart-burst{0%{opacity:1;transform:scale(.5)}70%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--spin))}}
@keyframes smart-pop{from{transform:scale(0)}}
@keyframes smart-nudge{30%{transform:rotate(-9deg)}65%{transform:rotate(7deg)}}
@keyframes smart-ring{from{box-shadow:0 3px #11505c,0 0 0 0 rgb(31 122 140/.5)}to{box-shadow:0 3px #11505c,0 0 0 10px rgb(31 122 140/0)}}
@keyframes smart-breathe{50%{transform:scale(1.07)}}
@keyframes smart-glow{50%{transform:scale(1.15);box-shadow:0 0 12px rgb(244 182 63/.8)}}
@keyframes smart-bob{50%{transform:translateY(-4px) rotate(-4deg)}}
@keyframes smart-slide{from{transform:translateX(30px);opacity:0}}
@keyframes smart-arrow{50%{transform:translateX(4px)}}

/* #800 Customer home v2 (Josh approved #799, 25 Nov 2026; docs/design/customer-home-v2-1125/). One template, one
   spacing scale: 16px between blocks, 24px before the QR and Wallet pair, every block the page column's full width with
   the same 20px corners. The shop's line sits in the page right under the shared header, so nothing rides over the page;
   the header’s own copy of the shop name stays off the customer page. */
html body[data-role=customer][data-route=home] header.mcc-header .logo .cafe-brand { display:none; }
body[data-role=customer] .home-v2 { --v2-s1:8px; --v2-s2:16px; --v2-s3:24px; --v2-r:20px; display:flex; flex-direction:column; gap:var(--v2-s2); width:100%; max-width:480px; margin:0 auto; }
body[data-role=customer] .home-v2 > :is(.home-v2-shop,.home-v2-hello,.notice) { margin:0; }
body[data-role=customer] .home-v2 > .home-v2-shop { display:flex; align-items:center; gap:6px; height:28px; }
body[data-role=customer] .customer-page-template > .home-v2:first-child > .home-v2-shop { margin-top:calc(-1 * var(--mcc-header-gap, 28px)); }
.home-v2-shop-mark { flex:none; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; object-fit:cover; background:#4b2b1e; color:#fff; font:700 0.5625rem/1 Georgia, "Times New Roman", serif; }
.home-v2-shop-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:700 0.8125rem/1.2 var(--cc-font-body); color:var(--cc-ink); }
body[data-role=customer] .home-v2 > .home-v2-hello { font:400 1.875rem/1.05 var(--cc-font-display); letter-spacing:-0.01em; color:var(--cc-ink); white-space:normal; }
body[data-role=customer] .home-v2 > .lc-home { display:flex; flex-direction:column; gap:var(--v2-s2); width:100%; max-width:none; margin:0 0 40px; }
body[data-role=customer] .home-v2 > .lc-home > * { margin:0; }

/* The My card / Offers bar floats on its own shadow, as in the mock-up: no paper band behind it hiding the Wallet button. */
body[data-role=customer][data-route=home]:has(.home-v2 .home-dock)::after { content:none; }

/* The card: full width on its gold edge, lifted off the page. The stage's ::before is the card's thickness (a darker gold
   rim under the face), its ::after the shadow. Every card wears the gold edge; a subscriber's adds the holo and the seal. */
.lc-home-stage { isolation:isolate; }
.lc-home-stage::before { content:""; position:absolute; inset:4px 0 -4px; z-index:-1; border-radius:19px; background:linear-gradient(180deg, #a8742c, #6d4714); }
.lc-home-stage::after { content:""; position:absolute; left:6%; right:6%; bottom:-14px; height:28px; z-index:-2; border-radius:50%; background:radial-gradient(closest-side, rgba(46, 31, 22, 0.42), rgba(46, 31, 22, 0)); }
.lc:has(.mc--home) { --lc-ring:1.2cqw; --lc-ring-face:conic-gradient(from 200deg, #8a5a1c, #f7e7b0, #c99a45, #fff4cf, #a8742c, #f2d58a, #7d5016, #f7e7b0, #8a5a1c); }
.mc--home { box-shadow:0 1px 2px rgba(80, 52, 14, 0.3), 0 22px 30px -16px rgba(80, 52, 14, 0.75), 0 0 0 1px rgba(176, 133, 58, 0.55); }
.mc--home::after {
  content:""; position:absolute; inset:0; z-index:4; border-radius:inherit; pointer-events:none;
  padding:var(--lc-ring); background:var(--lc-ring-face);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite:exclude;
}
.mc--home .mc-rail { background:rgba(255, 249, 239, 0.92); }
.mc--home .mc-count { color:#2b1b12; }

/* Three tiles, one pattern: a big number, a short label, one action. House metals: brown, silver, gold. */
.home-v2-tiles { display:flex; justify-content:center; gap:12px; width:100%; }
.home-v2-tiles > .home-v2-tile { box-sizing:border-box; flex:0 1 calc((100% - 24px)/3); max-width:160px; min-width:0; }
@media(min-width:700px){.home-v2-tiles{gap:16px}.home-v2-tiles > .home-v2-tile{flex-basis:calc((100% - 32px)/3)}}
:is(body[data-role=customer], .hp-screen) .home-v2-tile {
  position:relative; overflow:hidden; display:flex; flex-direction:column; align-items:center; gap:2px; min-width:0; min-height:150px;
  margin:0; padding:14px 8px 10px; border:0; border-radius:var(--v2-r, 20px); text-align:center; font:inherit; color:var(--t-ink); background:var(--t-face); cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px var(--t-rim), 0 12px 18px -12px rgba(58, 36, 20, 0.6);
}
.home-v2-tile::before { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28) 46%, transparent 60%); }
.home-v2-tile > * { position:relative; }
.home-v2-tile--stamps { --t-ink:#fff3e0; --t-face:linear-gradient(165deg, var(--stamp-brown), var(--stamp-brown-dark)); --t-rim:rgba(255, 220, 180, 0.18); --t-btn:#fff; --t-btn-ink:var(--stamp-brown-dark); }
.home-v2-tile--stamps::before { background:linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.1) 46%, transparent 60%); }
.home-v2-tile--prepaid { --t-ink:#2c333b; --t-face:linear-gradient(165deg, #fbfcfd, #dfe4ea 55%, #b4bcc6); --t-rim:rgba(44, 51, 59, 0.18); --t-btn:#2c333b; --t-btn-ink:#fff; }
.home-v2-tile--weekly { --t-ink:#4a2f0b; --t-face:linear-gradient(165deg, #fff1c2, #ecc970 55%, #c99a45); --t-rim:rgba(74, 47, 11, 0.2); --t-btn:#4a2f0b; --t-btn-ink:#fff1c2; }
.home-v2-tile.is-ready { box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px var(--t-rim), 0 0 0 3px #f4b63f, 0 12px 18px -12px rgba(58, 36, 20, 0.6); }
.home-v2-tile:disabled { cursor:default; opacity:0.62; }
.home-v2-tile:focus-visible { z-index:1; outline:3px solid var(--ink-line); outline-offset:2px; }
.home-v2-num { font:800 2.5rem/1 var(--cc-font-body); letter-spacing:-0.03em; font-variant-numeric:tabular-nums; color:inherit; }
.home-v2-tile.is-empty .home-v2-num { opacity:0.45; }
.home-v2-label { display:flex; align-items:flex-start; justify-content:center; min-height:calc(3 * 1.2em); font:700 0.78125rem/1.2 var(--cc-font-body); text-wrap:balance; overflow-wrap:anywhere; }
.home-v2-act { display:flex; align-items:center; justify-content:center; width:100%; min-height:40px; margin-top:auto; padding:6px; border-radius:999px; background:var(--t-btn); color:var(--t-btn-ink); font:700 0.75rem/1.15 var(--cc-font-body); text-wrap:balance; }
@media (prefers-reduced-motion: no-preference) { .home-v2-tile { transition:transform 140ms var(--lc-ease-out, ease-out); } .home-v2-tile:active:not(:disabled) { transform:scale(0.97); } }

/* Card collection: the next stop's picture at a size you can see, its name, a slim progress bar and Change. */
.home-v2-tour { display:grid; grid-template-columns:112px minmax(0, 1fr); gap:12px; align-items:center; padding:12px; border-radius:var(--v2-r, 20px); background:var(--cc-white, #fff); box-shadow:inset 0 0 0 1.5px var(--cc-divider, #dcc9a8); }
.home-v2-tour-pic { display:block; width:112px; height:84px; overflow:hidden; border-radius:14px; background:var(--cc-card, #fff8ec); }
.home-v2-tour-pic img { display:block; width:100%; height:100%; object-fit:cover; object-position:82% center; }
.home-v2-tour-body { display:grid; gap:4px; min-width:0; }
.home-v2-tour-top { display:flex; align-items:center; justify-content:space-between; gap:var(--v2-s1, 8px); min-height:30px; }
.home-v2-eyebrow { min-width:0; font:700 0.6875rem/1.2 var(--cc-font-body); letter-spacing:0.08em; text-transform:uppercase; color:var(--cc-brown-muted, #7a5a42); }
:is(body[data-role=customer], .hp-screen) .home-v2-change { position:relative; flex:none; height:auto; min-height:30px; margin:0; padding:4px 12px; border:1.5px solid var(--cc-ink); border-radius:999px; background:transparent; color:var(--cc-ink); font:700 0.8125rem/1 var(--cc-font-body); cursor:pointer; }
.home-v2-change::before { content:""; position:absolute; inset:-7px -4px; }
.home-v2-stop { margin:0; font:700 0.875rem/1.25 var(--cc-font-body); color:var(--cc-ink); overflow-wrap:anywhere; }
.home-v2-bar { height:6px; margin-top:4px; overflow:hidden; border-radius:999px; background:color-mix(in srgb, var(--cc-divider, #dcc9a8) 70%, transparent); }
.home-v2-bar i { display:block; width:var(--done, 0%); height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--cc-red, #c63a2c), #f4b63f); }
.home-v2-places { font:600 0.78125rem/1.2 var(--cc-font-body); color:var(--cc-pencil, #6b5646); }

/* Show QR code, then one Wallet button for this phone (native-wallet.js mounts it right after the QR button). */
.home-v2-pair { display:grid; gap:var(--v2-s2, 16px); justify-items:center; }
html body[data-role=customer][data-route=home] .home-v2 .home-v2-pair .show-card {
  display:grid; grid-template-columns:30px 1px 1fr 30px; align-items:center; gap:14px; width:100%; min-height:60px; margin:0; padding:0 20px 0 18px;
  border:2px solid var(--ink-line); border-radius:var(--v2-r); background:var(--ink-line); color:#fff8ec; font:700 1.125rem/1 var(--cc-font-body); text-decoration:none; box-shadow:0 3px 0 var(--ink-line);
}
html body[data-role=customer][data-route=home] .home-v2 .home-v2-pair .show-card > span:nth-child(3) { text-align:left; }
body[data-role=customer] .home-v2-pair :is(.wallet-actions,.qr-inline) { width:100%; margin:0; }
body[data-role=customer] .home-v2-pair .wallet-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:var(--v2-s1); }
body[data-role=customer] .home-v2-pair .wallet-button img { display:block; height:48px; width:auto; }

/* #859 loyalty switched off: no stamp rail, count, punches or loyalty fields on the card. */
.lc--noloyalty :is(.mc-rail,.mc-stamphalf,.mc-punches,.mc-chip,.mc-fields,.mc-stamps){display:none}

/* Text can grow independently of the card illustration. */
.home-v2-tour-top { flex-wrap: wrap; }
.home-v2-tour { grid-template-columns: minmax(0, min(28%, 112px)) minmax(0, 1fr); }
.home-v2-tour-pic { max-width: 100%; }

.pocket-heading { padding-right: 3rem; }
.pocket-heading > div { min-width:0; }

/* Equal balance tiles. Enlarged text uses equal full-width rows rather than shrinking labels. */
body[data-role=customer] .lc-home { container:card-view / inline-size; }
body[data-role=customer] .home-v2-tiles { display:flex; gap:12px; align-items:stretch; }
body[data-role=customer] .home-v2-tiles > .home-v2-tile { flex:0 1 calc((100% - 24px)/3); max-width:none; scroll-margin-block:100px; }
body[data-role=customer] .home-v2-act { padding-inline:3px; font-size:.625rem; }
body[data-role=customer] .home-v2-tile--prepaid .home-v2-act { white-space:nowrap; gap:3px; }
.price-cup { width:1em; height:1em; flex:none; stroke:currentColor; fill:none; }
.lc-stops { position:relative; }
.lc-stops > h2 { padding-right:2.5rem; }
@container card-view (width < 21rem) {
 body[data-role=customer] .home-v2-tiles { display:grid; grid-template-columns:minmax(0,1fr); grid-auto-rows:1fr; }
 body[data-role=customer] .home-v2-tiles > .home-v2-tile:nth-child(n) { width:100%; }
}
