/* Coffee.me public pages — the Edwerth Toolkit look (glass cards over soft colour light,
   Kanit + Inter, spring motion) in coffee red.
   Served under CSP style-src 'self': no inline styles anywhere. Bar widths are set by
   coffee.js through the CSSOM; a <noscript> SVG draws them without JavaScript.
   Everything that moves stops under prefers-reduced-motion (end of file). */

/* ---------- fonts (self-hosted; SIL OFL, see fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/inter-regular.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: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("fonts/inter-medium.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: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("fonts/inter-semibold.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: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("fonts/inter-bold.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: "Kanit";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/kanit-regular.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("fonts/kanit-medium.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("fonts/kanit-semibold.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

/* ---------- tokens (the Toolkit's, plus its Coffee.me card colours) ---------- */
:root {
  --text: #1d1d1f;
  --muted: #6e6e73;
  --soft-text: #55555a; /* ≥ 4.5:1 on the lightest part of the page glow */
  --line: rgba(0, 0, 0, 0.08);
  --fill: rgba(118, 118, 128, 0.12);
  --page-bg: #f3f1f0;
  --glass: rgba(255, 255, 255, 0.82);
  --accent: #0071e3;
  /* coffee red: Ko-fi's #ff5e5b darkened until a white label passes AA (4.59:1) */
  --coffee: #d4402f;
  --coffee-2: #bf3727;
  --coffee-ink: #9a3412; /* 7.3:1 on white — text in coffee colour */
  --coffee-soft: rgba(212, 64, 47, 0.1);
  --coffee-glow: rgba(255, 149, 64, 0.16);
  --coffee-grad: linear-gradient(135deg, #e0513d 0%, #bf3727 100%);
  --coffee-bar: linear-gradient(90deg, #ffb340 0%, #f47b3a 55%, #d4402f 100%);
  --ok: #1f7a3a;
  --ok-grad: linear-gradient(135deg, #2fb457 0%, #1f8f45 100%);
  --radius: 12px;
  --radius-card: 18px;
  --radius-win: 20px;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-float: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 18px 44px -22px rgba(30, 45, 90, 0.38), 0 3px 10px rgba(30, 45, 90, 0.05);
  --shadow-warm: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 18px 44px -20px rgba(90, 45, 30, 0.32), 0 4px 14px rgba(30, 45, 90, 0.06);
  --font: "Inter", "Kanit", system-ui, -apple-system, "Segoe UI", "Leelawadee UI", "Thonburi", sans-serif;
  --font-head: "Kanit", "Inter", system-ui, -apple-system, "Segoe UI", "Leelawadee UI", "Thonburi", sans-serif;
  --page-max: 1200px;
  --gutter: 14px;
  color-scheme: light;
}

@media (min-width: 720px) {
  :root {
    --gutter: 24px;
  }
}
@media (min-width: 1200px) {
  :root {
    --gutter: 32px;
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--page-bg);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* soft colour light behind the glass (the Toolkit's, turned warm) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 10% 12%, rgba(255, 149, 0, 0.24), transparent 70%),
    radial-gradient(34% 30% at 90% 8%, rgba(212, 64, 47, 0.17), transparent 70%),
    radial-gradient(40% 34% at 84% 90%, rgba(0, 122, 255, 0.15), transparent 70%),
    radial-gradient(36% 34% at 12% 94%, rgba(175, 82, 222, 0.14), transparent 70%),
    var(--page-bg);
}

a {
  color: var(--coffee-ink);
}

h1,
h2,
h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
h1 {
  font-size: 1.5rem;
}
h2 {
  font-size: 1.12rem;
}
h3 {
  font-size: 1rem;
}
p {
  margin: 0.4rem 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(212, 64, 47, 0.45);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);
}
.hint {
  font-size: 0.85rem;
  color: var(--muted);
}
.center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}
.big {
  font-size: 1.25rem;
  font-weight: 700;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- skip link ---------- */
.skip {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 50;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--coffee);
  text-decoration: none;
  transform: translateY(calc(-100% - 20px));
}
.skip:focus {
  transform: none;
}

/* ---------- header (the Toolkit's sticky glass bar) ---------- */
.head {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.12), 0 6px 20px -14px rgba(30, 45, 90, 0.35);
  view-transition-name: cm-head;
}

.head-in {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  height: 56px;
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
}

.head a:focus-visible {
  outline-offset: -3px;
}

.brand {
  position: relative;
  isolation: isolate;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 11px 0 6px;
  margin-left: -6px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s;
}

a.brand:hover:not([aria-current="page"]) {
  background: rgba(0, 0, 0, 0.04);
}

.brand-logo {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 19px;
  color: #fff;
  background: var(--coffee-grad);
  box-shadow: 0 2px 6px -1px rgba(191, 55, 39, 0.5), inset 0 0 0 0.5px rgba(255, 255, 255, 0.25);
}

.brand-logo svg,
.tk-logo svg,
.nav-ic svg,
.give-ic svg,
.btn-ic svg {
  display: block;
}

.logo-steam {
  animation: logo-steam 3.2s ease-in-out infinite;
}
@keyframes logo-steam {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.35; transform: translateY(-1px); }
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  margin: 0;
  padding: 0 8px 0 6px;
  list-style: none;
}

.nav-item {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 11px;
  border-radius: 11px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  color: #3a3a3f;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

a.nav-item:hover {
  background: rgba(0, 0, 0, 0.045);
  color: var(--text);
}

.nav-ic {
  display: inline-flex;
  font-size: 1.12rem;
}

.nav-item[aria-current="page"],
.brand[aria-current="page"] .brand-name {
  color: var(--coffee-ink);
  font-weight: 600;
}

a.nav-item[aria-current="page"]:hover {
  background: transparent;
}

/* "you are here" — glides to the new item on a page change (View Transition, below) */
.pill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(212, 64, 47, 0.1);
  box-shadow: inset 0 0 0 0.5px rgba(212, 64, 47, 0.2);
  pointer-events: none;
  view-transition-name: cm-pill;
}

/* back to the Toolkit: its blue, so it reads as "the other app" */
.tk-link {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 5px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0060c0;
  background: rgba(0, 113, 227, 0.08);
  box-shadow: inset 0 0 0 0.5px rgba(0, 113, 227, 0.16);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.tk-link:hover {
  background: rgba(0, 113, 227, 0.14);
}
.tk-link:focus-visible {
  outline-color: rgba(0, 113, 227, 0.45);
}

.tk-logo {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(135deg, #0071e3 0%, #007aff 100%);
  box-shadow: 0 2px 6px -1px rgba(0, 90, 200, 0.45);
}

@media (max-width: 719.98px) {
  .brand-name,
  .nav-ic,
  .tk-link-text {
    display: none;
  }
  .brand {
    padding-right: 6px;
  }
  .tk-link {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
}
@media (max-width: 359.98px) {
  .nav-item {
    padding: 0 8px;
    font-size: 0.86rem;
  }
}

/* ---------- page frame ---------- */
.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 22px var(--gutter) 8px;
}
.page:focus {
  outline: none;
}

.card {
  position: relative;
  padding: 20px 18px;
  border-radius: var(--radius-win);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  backdrop-filter: saturate(180%) blur(40px);
  box-shadow: var(--shadow-float);
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.sec-head h2,
.sec-head h3 {
  margin: 0;
  min-width: 0;
}

.more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--coffee-ink);
  text-decoration: none;
  white-space: nowrap;
}
.more span {
  transition: transform 0.35s var(--spring);
}
.more:hover span {
  transform: translateX(3px);
}

/* sub-page title row (wall, roadmap, costs) */
.ph {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin: 6px 0 20px;
}
.ph-text {
  min-width: 0;
  flex: 1 1 20rem;
}
.ph-title {
  margin: 0 0 4px;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.ph-sub {
  margin: 0;
  color: var(--soft-text);
}
.ph-sub b {
  color: var(--text);
}

/* ---------- landing: phones one column, desktop two ---------- */
.land {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.land-main {
  display: contents;
}
.hero {
  order: 1;
}
.covcard {
  order: 2;
}
.land-side {
  order: 3;
}
.wall-sec {
  order: 4;
}
.feat-sec {
  order: 5;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 4px 2px 6px;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-cup,
.msg-cup,
.empty-cup {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(154, 52, 18, 0.1), 0 10px 22px -10px rgba(154, 52, 18, 0.45);
}
.hero-cup {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  50% {
    transform: translateY(-4px);
  }
}

.cup-art {
  width: 46px;
  height: 50px;
  overflow: visible;
}
.cup-art .body {
  fill: var(--coffee);
}
.cup-art .handle {
  stroke: var(--coffee);
}
.cup-art .crema {
  fill: #f6c89f;
}
.cup-art .saucer {
  fill: #ead9cf;
}
.cup-art .steam path {
  stroke: #b8917f;
  opacity: 0;
  animation: steam 3.6s ease-in-out infinite;
}
.cup-art .steam .w2 {
  animation-delay: 1.2s;
}
.cup-art .steam .w3 {
  animation-delay: 2.4s;
}
@keyframes steam {
  0% { opacity: 0; transform: translateY(3px); }
  35% { opacity: 0.95; }
  100% { opacity: 0; transform: translateY(-6px); }
}
/* the cup tilts now and then, as if someone just set it down */
.hero-cup .cup-art,
.thanks-cup .cup-art {
  transform-origin: 50% 90%;
  animation: tilt 6s ease-in-out 1.2s infinite;
}
@keyframes tilt {
  0%, 82%, 100% { transform: rotate(0deg); }
  86% { transform: rotate(-7deg); }
  90% { transform: rotate(5deg); }
  94% { transform: rotate(-2deg); }
}

.eyebrow {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--coffee-ink);
}
.hero-by {
  margin: 0;
  font-size: 0.86rem;
  color: var(--soft-text);
}

.hero-title {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #1d1d1f 30%, #4a3b37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-accent {
  background: linear-gradient(135deg, #f47b3a 0%, #d4402f 60%, #bf3727 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 38rem;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #4a4a50;
}

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.perk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.3;
  color: #3a3a3f;
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 4px 12px -8px rgba(30, 45, 90, 0.35);
  white-space: nowrap;
}
.perk-ic {
  display: inline-flex;
  font-size: 1.05rem;
  color: var(--coffee);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 38rem;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #4a4a50;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 0.5px rgba(154, 52, 18, 0.18);
}
.notice-ic {
  flex: none;
  display: inline-flex;
  margin-top: 2px;
  font-size: 1.15rem;
  color: var(--coffee);
}

.social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 16px;
}
.social-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--soft-text);
}
.social-text b {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ---------- avatars (a pastel disc with a dark ink of the same hue: ≥ 7:1) ---------- */
.faces {
  display: flex;
  padding-left: 8px;
}
.face {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0 0 2.5px #fff;
}
.faces .face {
  margin-left: -8px;
  animation: face-in 0.5s var(--spring) both;
}
.faces .face:nth-child(2) { animation-delay: 0.06s; }
.faces .face:nth-child(3) { animation-delay: 0.12s; }
.faces .face:nth-child(4) { animation-delay: 0.18s; }
.faces .face:nth-child(5) { animation-delay: 0.24s; }
@keyframes face-in {
  from { opacity: 0; transform: scale(0.6); }
}
.more-faces {
  width: auto;
  min-width: 36px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f0f0f3;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
}
.hue-0 { background: hsl(210 72% 89%); color: hsl(210 55% 24%); }
.hue-1 { background: hsl(150 72% 89%); color: hsl(150 55% 24%); }
.hue-2 { background: hsl(28 72% 89%); color: hsl(28 55% 24%); }
.hue-3 { background: hsl(275 72% 89%); color: hsl(275 55% 24%); }
.hue-4 { background: hsl(340 72% 89%); color: hsl(340 55% 24%); }
.hue-5 { background: hsl(190 72% 89%); color: hsl(190 55% 24%); }
.hue-6 { background: hsl(250 72% 89%); color: hsl(250 55% 24%); }
.hue-7 { background: hsl(12 72% 89%); color: hsl(12 55% 24%); }
.is-anon-face {
  background: #f0ebe8;
  color: #8a6f64;
  font-size: 1.1rem;
}

/* ---------- this month's cost ---------- */
.covcard {
  background:
    radial-gradient(120% 90% at 0% 0%, var(--coffee-glow), transparent 60%),
    var(--glass);
  box-shadow: var(--shadow-warm);
}
.covcard .sec-head {
  margin-bottom: 8px;
}
.cov-big {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 4px 0 10px;
}
.cov-pct {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 2.4rem;
  line-height: 1.05;
  font-weight: 600;
  color: var(--coffee-ink);
  font-variant-numeric: tabular-nums;
}
.cov-word {
  font-size: 0.95rem;
  color: var(--soft-text);
}
.bar-caption {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--soft-text);
}
.bar-caption b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- bars ---------- */
.bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.14);
  overflow: hidden;
}
.bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: inherit;
  background: var(--coffee-bar);
  overflow: hidden;
  transition: width 1.6s var(--spring);
}
/* a soft band of light slides along the filled part */
.bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0;
}
.bar-fill.is-full {
  min-width: 8px; /* "<1%" still shows a sliver */
}
.bar-fill.is-full::after {
  animation: flow 3.6s ease-in-out 1.8s infinite;
}
@keyframes flow {
  0% { left: -40%; opacity: 0; }
  15% { opacity: 1; }
  60%, 100% { left: 100%; opacity: 0; }
}
.bar.is-ok .bar-fill {
  background: linear-gradient(90deg, #7ad48f 0%, #2fb457 55%, #1f8f45 100%);
}
.bar-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bar-svg rect {
  fill: #f47b3a;
}
.bar.is-ok .bar-svg rect {
  fill: #2fb457;
}

/* numbers that pop once when they arrive */
.pop {
  display: inline-block;
  animation: pop 0.55s var(--spring) 0.9s both;
}
@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

/* ---------- support form ---------- */
.give {
  background:
    radial-gradient(120% 70% at 100% 0%, var(--coffee-glow), transparent 60%),
    var(--glass);
  box-shadow: var(--shadow-warm);
}

.give-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.give-head h2 {
  margin: 0;
  font-size: 1.3rem;
}
.give-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--soft-text);
}
.give-ic {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 24px;
  color: #fff;
  background: var(--coffee-grad);
  box-shadow: 0 8px 18px -8px rgba(212, 64, 47, 0.7), inset 0 0 0 0.5px rgba(255, 255, 255, 0.25);
}

.closed {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--soft-text);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field-label {
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.opt {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}

/* quick amounts: tiles with 1–4 little cups */
.quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 66px;
  padding: 8px 4px;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.09), 0 2px 6px -4px rgba(30, 45, 90, 0.3);
  cursor: pointer;
  transition: transform 0.4s var(--spring), background-color 0.2s, box-shadow 0.25s, color 0.2s;
}
.chip-cups {
  display: flex;
  gap: 1px;
  font-size: 16px;
  color: var(--coffee);
  transition: color 0.2s;
}
.chip-cups svg {
  display: block;
}
.chip-amt {
  font-size: 1.02rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip:active {
  transform: scale(0.95);
}
.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--coffee-grad);
  box-shadow: 0 10px 20px -10px rgba(212, 64, 47, 0.8), inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.chip[aria-pressed="true"] .chip-cups {
  color: #fff;
}
.chip.is-bump .chip-cups {
  animation: cups-bump 0.5s var(--spring);
}
@keyframes cups-bump {
  40% { transform: translateY(-3px) rotate(-6deg); }
}

.amount-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s;
}
.amount-box:focus-within {
  box-shadow: inset 0 0 0 2px var(--coffee), 0 0 0 4px rgba(212, 64, 47, 0.12);
}
.amount-cur {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--coffee-ink);
}
.amount-unit {
  flex: none;
  font-size: 0.9rem;
  color: var(--muted);
}
.amount-box #amount {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.amount-box #amount::placeholder {
  font-size: 1.1rem;
  font-weight: 500;
  color: #a1a1a6;
}

input:not([type="checkbox"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  font-size: 16px; /* 16 px: iOS does not zoom into the field */
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
input:not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--coffee), 0 0 0 4px rgba(212, 64, 47, 0.12);
}
textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}
::placeholder {
  color: #a1a1a6;
}

.select-wrap {
  position: relative;
  display: block;
}
.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  padding-right: 40px;
  cursor: pointer;
}

.counter {
  align-self: flex-end;
  margin-top: -2px;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.counter.is-near {
  color: var(--coffee-ink);
  font-weight: 600;
}

.js .js-hide {
  display: none;
}

/* switches (the Toolkit's iOS-style toggle; still a real checkbox) */
.switches {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  background: rgba(118, 118, 128, 0.09);
  cursor: pointer;
}
.switch-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.switch-label {
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.45;
}
.switch-hint {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
.switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.switch {
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.32);
  transition: background-color 0.25s;
}
.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.35s var(--spring);
}
.switch-input:checked + .switch {
  background: #34c759;
}
.switch-input:checked + .switch .switch-knob {
  transform: translateX(20px);
}
.switch-input:focus-visible + .switch {
  outline: 3px solid rgba(212, 64, 47, 0.45);
  outline-offset: 2px;
}

/* live preview of the wall entry (coffee.js) */
.preview {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  border: 1px dashed rgba(154, 52, 18, 0.25);
}
.preview-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.errors {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #b3261e;
  background: #fdecea;
  box-shadow: inset 0 0 0 1px #f3b8b3;
  animation: shake 0.45s var(--spring);
}
.errors ul {
  margin: 0;
  padding-left: 18px;
}
@keyframes shake {
  20% { transform: translateX(-6px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.give-note {
  margin: -4px 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ---------- buttons ---------- */
.btn-coffee,
.btn-ok {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 12px 26px;
  border: 0;
  border-radius: 16px;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--coffee-grad);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(120, 30, 20, 0.3), 0 8px 18px -8px rgba(212, 64, 47, 0.6);
  transition: transform 0.2s var(--spring), filter 0.15s;
  animation: breathe 3.2s ease-in-out 1s infinite;
}
.btn-ok {
  background: var(--ok-grad);
  box-shadow: 0 1px 2px rgba(20, 80, 40, 0.3), 0 8px 18px -8px rgba(31, 143, 69, 0.6);
  animation: none;
}
#give-form .btn-coffee,
.btn-ok {
  width: 100%;
}
.btn-coffee:hover,
.btn-ok:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-coffee:active,
.btn-ok:active {
  transform: scale(0.98);
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 1px 2px rgba(120, 30, 20, 0.3), 0 8px 18px -8px rgba(212, 64, 47, 0.6); }
  50% { box-shadow: 0 1px 2px rgba(120, 30, 20, 0.3), 0 10px 26px -6px rgba(212, 64, 47, 0.75), 0 0 0 5px rgba(212, 64, 47, 0.1); }
}
/* a light sweep across the button every few seconds */
.btn-coffee::after,
.btn-ok::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  z-index: -1;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  animation: shine 4.8s ease-in-out 1.6s infinite;
}
.btn-ok::after {
  animation-duration: 6s;
}
@keyframes shine {
  0%, 70% { left: -60%; }
  100% { left: 130%; }
}
.btn-ic {
  display: inline-flex;
  font-size: 1.25rem;
  transition: transform 0.35s var(--spring);
}
.btn-coffee:hover .btn-ic {
  transform: rotate(-12deg) translateY(-1px);
}
.btn-coffee:focus-visible,
.btn-ok:focus-visible {
  outline: 3px solid rgba(212, 64, 47, 0.45);
  outline-offset: 3px;
}
.btn-ok:focus-visible {
  outline-color: rgba(31, 143, 69, 0.5);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 12px -8px rgba(30, 45, 90, 0.4);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.2s var(--spring);
}
.btn:hover {
  background: #fff;
}
.btn:active {
  transform: scale(0.98);
}
.btn.block {
  display: flex;
  width: 100%;
}
.small-btn {
  min-height: 34px;
  margin-left: 6px;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
}
.small-btn.is-done {
  color: var(--ok);
}
.links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- supporters ---------- */
.wgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  backdrop-filter: saturate(180%) blur(40px);
  box-shadow: var(--shadow-float);
  transition: transform 0.45s var(--spring), box-shadow 0.35s var(--spring);
}
.wgrid .wcard {
  animation: rise 0.7s var(--spring) both;
}
.wgrid .wcard:nth-child(2) { animation-delay: 0.05s; }
.wgrid .wcard:nth-child(3) { animation-delay: 0.1s; }
.wgrid .wcard:nth-child(4) { animation-delay: 0.15s; }
.wgrid .wcard:nth-child(5) { animation-delay: 0.2s; }
.wgrid .wcard:nth-child(n + 6) { animation-delay: 0.25s; }
@media (hover: hover) {
  .wgrid .wcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 0 0.5px rgba(212, 64, 47, 0.25), 0 26px 50px -24px rgba(30, 45, 90, 0.45), 0 4px 12px rgba(30, 45, 90, 0.06);
  }
}
.wcard.is-preview {
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 8px 20px -14px rgba(30, 45, 90, 0.4);
}

.wc-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.wc-who {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.wc-name {
  overflow: hidden;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.is-anon .wc-name {
  font-weight: 500;
  color: var(--muted);
}
.wc-date {
  font-size: 0.8rem;
  color: var(--muted);
}
.wc-amt {
  flex: none;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--coffee-ink);
  background: var(--coffee-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* the message: a speech bubble pointing up at the avatar */
.wc-msg {
  position: relative;
  margin: 2px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.94rem;
  line-height: 1.55;
  white-space: pre-line;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1px var(--line);
}
.wc-msg::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: inherit;
  box-shadow: -1px -1px 0 0 var(--line);
  border-radius: 2px 0 0 0;
  transform: rotate(45deg);
}
/* the owner's thank-you: an indented reply from the coffee cup, under the supporter's words */
.wc-reply {
  margin: 0 0 0 14px;
  padding: 9px 13px 10px;
  border-radius: 14px;
  background: var(--coffee-soft);
}
.wc-reply-who {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
}
.wc-reply-face {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  color: #fff;
  background: var(--coffee-grad);
}
.wc-reply-name {
  overflow: hidden;
  font-weight: 600;
  color: var(--coffee-ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wc-reply-verb {
  flex: none;
}
.wc-reply-text {
  margin: 5px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.thanks-reply {
  max-width: 26rem;
  margin: 16px auto 4px;
  text-align: left;
}
.wc-feat {
  margin: auto 0 0; /* cards in a row share a height: the tag sits at the bottom */
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #0060c0;
  background: rgba(0, 113, 227, 0.08);
}
.tag svg {
  flex: none;
}

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

/* empty states */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 18px;
  text-align: center;
}
.empty p {
  margin: 0;
  color: var(--soft-text);
}
.empty p b {
  color: var(--text);
}
.empty-cup {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  animation: float 6s ease-in-out infinite;
}
.empty-cup .cup-art {
  width: 40px;
  height: 44px;
}

/* ---------- features ---------- */
.flist {
  margin: 0;
  padding: 6px 18px;
  list-style: none;
}
.fl-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "rank title"
    "rank num";
  align-items: center;
  column-gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.fl-item:first-child {
  border-top: 0;
}
.fl-rank {
  grid-area: rank;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--coffee-ink);
  background: var(--coffee-soft);
}
.fl-item:first-child .fl-rank {
  color: #fff;
  background: var(--coffee-grad);
}
.fl-title {
  grid-area: title;
  font-weight: 600;
  line-height: 1.4;
}
.fl-num {
  grid-area: num;
  font-size: 0.86rem;
  color: var(--muted);
}

.seg {
  position: relative;
  display: inline-flex;
  flex: none;
  padding: 3px;
  border-radius: 12px;
  background: rgba(118, 118, 128, 0.12);
}
.seg a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3a3a3f;
  text-decoration: none;
  white-space: nowrap;
}
.seg a[aria-current] {
  font-weight: 600;
  color: var(--text);
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  view-transition-name: cm-seg;
}

.disclaimer {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.fgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  backdrop-filter: saturate(180%) blur(40px);
  box-shadow: var(--shadow-float);
}
.fc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.fc-name {
  margin: 0;
  font-size: 1.05rem;
  min-width: 0;
}
.fc-desc {
  margin: 0;
  font-size: 0.93rem;
  color: #4a4a50;
}
.fcard .bar {
  height: 8px;
}
.fc-stats {
  display: flex;
  gap: 18px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.fc-stats b {
  color: var(--text);
  font-weight: 600;
}
.badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  color: #545458;
  background: rgba(118, 118, 128, 0.13);
}
.st-idea {
  background: #eef0f3;
  color: #4b5563;
}
.st-planned {
  background: #e5efff;
  color: #1d4ed8;
}
.st-in_progress {
  background: #fff1d6;
  color: #8a5300;
}
.st-done {
  background: #e2f4e8;
  color: var(--ok);
}

/* ---------- costs ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  backdrop-filter: saturate(180%) blur(40px);
  box-shadow: var(--shadow-float);
}
.stat-label {
  font-size: 0.84rem;
  color: var(--muted);
}
.stat-val {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.stat.is-hl {
  color: #fff;
  background: var(--coffee-grad);
  box-shadow: 0 16px 30px -18px rgba(212, 64, 47, 0.9);
}
.stat.is-hl .stat-label {
  color: rgba(255, 255, 255, 0.86);
}

.mgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.month .sec-head {
  margin-bottom: 10px;
}
.month .cov,
.sec-head .cov {
  flex: none;
  font-size: 0.9rem;
  color: var(--soft-text);
  text-align: right;
}
.kv {
  margin: 12px 0 0;
}
.kv > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.kv > div:first-child {
  border-top: 0;
}
.kv dt {
  font-size: 0.92rem;
  color: var(--muted);
}
.kv dd {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}
.kv.compact > div {
  padding: 5px 0;
}
.kv .tv dt,
.kv .tv dd {
  font-style: italic;
  color: var(--muted);
}
.cost-items {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  list-style: none;
  font-size: 0.9rem;
  background: rgba(118, 118, 128, 0.07);
}
.cost-items li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  color: #4a4a50;
}
.cost-items li > span:last-child {
  flex: none;
  white-space: nowrap;
}
.cost-items li.tv {
  font-style: italic;
  color: var(--muted);
}
.tv-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, 0.14);
  font-size: 0.9rem;
  color: var(--muted);
}
.sec {
  min-width: 0;
}

/* ---------- pay ---------- */
.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}
.pay {
  text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--coffee-glow), transparent 60%),
    var(--glass);
  box-shadow: var(--shadow-warm);
}
.pay .eyebrow {
  font-size: 0.92rem;
}
.pay-amount {
  margin: 2px 0 0;
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--coffee-ink);
  font-variant-numeric: tabular-nums;
}
.pay-to {
  margin: 0 0 16px;
  color: var(--soft-text);
}
.qr-box {
  position: relative;
  max-width: 290px;
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 34px -20px rgba(30, 45, 90, 0.5);
}
.qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  image-rendering: pixelated;
  -webkit-touch-callout: default;
}
/* four corner marks that breathe around the code (never over it) */
.qr-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--coffee);
  pointer-events: none;
  animation: corner 2.4s ease-in-out infinite;
}
.qr-corner.tl { top: -7px; left: -7px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.qr-corner.tr { top: -7px; right: -7px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.qr-corner.bl { bottom: -7px; left: -7px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.qr-corner.br { bottom: -7px; right: -7px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
@keyframes corner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.save-qr {
  max-width: 290px;
  margin: 0 auto 8px;
}
.save-qr .ico {
  font-size: 1.15rem;
}
.alert {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #6b4200;
  background: #fff4e0;
  box-shadow: inset 0 0 0 1px #f0cf94;
}
.pay-how h2 {
  margin-bottom: 14px;
}
.steps {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.steps li {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.55;
}
/* a thin line joins the numbers */
.steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 2px;
  left: 13px;
  width: 2px;
  border-radius: 1px;
  background: rgba(212, 64, 47, 0.18);
}
.step-n {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--coffee-grad);
  box-shadow: 0 4px 10px -4px rgba(212, 64, 47, 0.7);
}
.phone-only {
  display: none;
}
.pay-how form {
  margin-top: 18px;
}
.pay-how .hint {
  margin-top: 10px;
}
/* phones cannot scan their own screen: "save QR" is the obvious first step */
@media (pointer: coarse), (max-width: 600px) {
  .save-qr {
    min-height: 54px;
    font-size: 1.08rem;
    color: #fff;
    background: var(--coffee-grad);
    box-shadow: 0 1px 2px rgba(120, 30, 20, 0.3), 0 8px 18px -8px rgba(212, 64, 47, 0.6);
  }
  .save-qr:hover {
    background: var(--coffee-grad);
  }
  .phone-only {
    display: inline;
  }
  .phone-only::after {
    content: " ";
  }
}

/* ---------- thanks / message pages ---------- */
.msg {
  position: relative;
  overflow: hidden;
  max-width: 36rem;
  margin: 4vh auto 0;
  padding: 34px 22px 26px;
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 0%, var(--coffee-glow), transparent 65%),
    var(--glass);
  box-shadow: var(--shadow-warm);
}
.msg h1 {
  display: block;
  margin: 14px 0 6px;
  font-size: 1.6rem;
}
.msg p {
  color: #4a4a50;
}
.msg .hint {
  margin-top: 14px;
}
.msg-cup {
  width: 84px;
  height: 84px;
  border-radius: 26px;
}
.msg-cup .cup-art {
  width: 58px;
  height: 63px;
}
.thanks-cup {
  animation: cup-land 0.9s var(--spring) both;
}
@keyframes cup-land {
  0% { opacity: 0; transform: translateY(-24px) scale(0.8); }
  60% { opacity: 1; }
  100% { transform: none; }
}
/* a burst of coffee beans and sparks from behind the cup */
.confetti {
  position: absolute;
  top: 76px;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cf {
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 12px;
  border-radius: 50%;
  background: #8a4b2d;
  opacity: 0;
  animation: burst 1.6s cubic-bezier(0.2, 0.7, 0.3, 1) 0.35s both;
}
.cf:nth-child(3n + 2) {
  width: 8px;
  height: 8px;
  background: #f47b3a;
}
.cf:nth-child(3n) {
  width: 6px;
  height: 14px;
  border-radius: 3px;
  background: #ffb340;
}
.cf1 { --x: -150px; --y: -40px; --r: 220deg; }
.cf2 { --x: -110px; --y: -90px; --r: -160deg; }
.cf3 { --x: -60px; --y: -120px; --r: 300deg; }
.cf4 { --x: 0px; --y: -135px; --r: -240deg; }
.cf5 { --x: 60px; --y: -118px; --r: 200deg; }
.cf6 { --x: 112px; --y: -86px; --r: -280deg; }
.cf7 { --x: 150px; --y: -36px; --r: 260deg; }
.cf8 { --x: -130px; --y: 30px; --r: -200deg; }
.cf9 { --x: 130px; --y: 34px; --r: 180deg; }
.cf10 { --x: -84px; --y: -64px; --r: 140deg; }
.cf11 { --x: 88px; --y: -60px; --r: -120deg; }
.cf12 { --x: 30px; --y: -96px; --r: 320deg; }
@keyframes burst {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.4); }
  15% { opacity: 1; }
  70% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)) scale(1); }
}

/* ---------- privacy (a readable column) ---------- */
.prose {
  max-width: 48rem;
  margin: 0 auto;
}
.prose h1 {
  font-size: 1.6rem;
}
.prose h2 {
  margin-top: 20px;
  font-size: 1.08rem;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 5px 0;
  color: #3a3a3f;
}

/* ---------- footer ---------- */
.foot {
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  width: 100%;
  margin: 0 auto;
  padding: 30px var(--gutter) calc(26px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 0.85rem;
  color: #5f5f64;
}
.foot p {
  margin: 4px 0;
}
.foot .personal {
  font-weight: 600;
  color: #4a4a50;
}
.foot-links a {
  color: var(--coffee-ink);
  text-decoration: none;
}
.foot-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.foot .dot {
  margin: 0 8px;
}
.foot-meta {
  font-size: 0.78rem;
  color: #6e6e73;
}

/* ---------- entrance: each block rises into place once (pure CSS, no flash without JS) ---------- */
.rise {
  animation: rise 0.7s var(--spring) both;
}
.d1 { animation-delay: 0.06s; }
.d2 { animation-delay: 0.12s; }
.d3 { animation-delay: 0.18s; }
.d4 { animation-delay: 0.24s; }
.d5 { animation-delay: 0.3s; }
.d6 { animation-delay: 0.36s; }
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
}

/* ---------- page to page: the header stays, the pill glides, the page cross-fades ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
::view-transition-group(cm-pill),
::view-transition-group(cm-seg) {
  animation-duration: 0.45s;
  animation-timing-function: var(--spring);
}

/* phones: three supporters are enough on the first page (the rest are one tap away) */
@media (max-width: 599.98px) {
  .wall-sec .wcard:nth-child(n + 4) {
    display: none;
  }
}

/* ---------- tablets ---------- */
@media (min-width: 600px) {
  .wgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .page {
    padding-top: 36px;
  }
  .card {
    padding: 26px 28px;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .hero-cup {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }
  .hero-cup .cup-art {
    width: 52px;
    height: 56px;
  }
  .ph-title {
    font-size: 2.1rem;
  }
  .fgrid,
  .mgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pay-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
  }
  .msg {
    margin-top: 6vh;
    padding: 40px 36px 30px;
  }
  .flist {
    padding: 8px 24px;
  }
}

/* ---------- desktop: two columns, the form on the right ---------- */
@media (min-width: 960px) {
  .land {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
    gap: 32px;
    align-items: start;
  }
  .land-main {
    display: flex;
    flex-direction: column;
    gap: 26px;
    min-width: 0;
  }
  .hero {
    padding-top: 10px;
  }
  .hero-title {
    font-size: 2.9rem;
  }
  .wgrid.wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .give {
    padding: 26px 26px 24px;
  }
}
/* the form stays in view while the left column scrolls. A form taller than the screen
   scrolls along until its button is in view, then stays (coffee.js keeps --give-h at the
   form's height; without it the huge fallback means "not sticky") */
@media (min-width: 960px) {
  .land-side {
    position: sticky;
    top: min(calc(76px + env(safe-area-inset-top, 0px)), calc(100vh - var(--give-h, 9999px) - 20px));
  }
}

@media (min-width: 1200px) {
  .land {
    gap: 44px;
  }
  .hero-title {
    font-size: 3.2rem;
  }
}

/* phones in landscape: less air on top */
@media (max-height: 500px) and (orientation: landscape) {
  .page {
    padding-top: 16px;
  }
  .msg {
    margin-top: 0;
  }
}

/* ---------- every gimmick off under reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .cup-art .steam path {
    opacity: 0.6;
  }
  .confetti {
    display: none;
  }
}

.btn-coffee[aria-busy="true"] {
  cursor: progress;
  filter: saturate(0.85);
}
