/* The Pink Wall — pixel-art tribute wall */

:root {
  --ink: #5b1834;
  --ink-soft: #84385a;
  --berry: #8f1747;
  --rose: #c2255f;
  --pink: #e2457f;
  --pink-soft: #f891b4;
  --blush: #ffd6e3;
  --cream: #fff7f1;
  --cream-2: #ffeef0;
  --mortar: #b35d77;
  --focus: #3b0a24;
  --shadow: rgba(110, 22, 58, 0.28);

  --font-pixel: "Pixelify Sans", ui-monospace, "Courier New", monospace;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;

  --px: 4px; /* one "art pixel" for UI chrome */
  --wall-max: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: #fbd9d6;
  overflow-x: hidden;
}

img { image-rendering: pixelated; image-rendering: crisp-edges; }
img, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: var(--berry); text-underline-offset: 3px; }
a:hover { color: var(--rose); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sr-only {
  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 {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--cream); padding: 8px 14px; border: 3px solid var(--berry); font-weight: 800;
}
.skip-link:focus { top: 12px; }

/* ---------- Sky (page background) ---------- */
.sky {
  position: fixed; inset: 0; z-index: -2;
  background: #f4a3b9 url("assets/sky-base.webp") center top / cover no-repeat;
  image-rendering: pixelated;
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--wall-max); margin: 0 auto; padding: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-pixel); font-weight: 600; font-size: 1.25rem;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 20px; height: 26px; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a { font-weight: 800; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.topbar nav a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--cream); --btn-ink: var(--ink); --btn-edge: var(--berry);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px;
  font-family: var(--font-pixel); font-weight: 600; font-size: 1.125rem; letter-spacing: 0.02em;
  color: var(--btn-ink); background: var(--btn-bg); text-decoration: none; cursor: pointer;
  border: 0;
  /* pixel border with notched corners */
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--btn-edge),
    0 var(--px) 0 0 var(--btn-edge),
    calc(var(--px) * -1) 0 0 0 var(--btn-edge),
    var(--px) 0 0 0 var(--btn-edge),
    0 calc(var(--px) * 2) 0 0 var(--shadow),
    inset 0 calc(var(--px) * -1) 0 0 rgba(0, 0, 0, 0.12);
  margin: var(--px);
  transition: transform 80ms steps(2), box-shadow 80ms steps(2);
}
.btn:hover { --btn-bg: #fff; color: var(--btn-ink); }
.btn:active { transform: translateY(var(--px)); }
.btn:active { box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--btn-edge), 0 var(--px) 0 0 var(--btn-edge),
    calc(var(--px) * -1) 0 0 0 var(--btn-edge), var(--px) 0 0 0 var(--btn-edge); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.btn--primary { --btn-bg: var(--pink); --btn-ink: #fff; --btn-edge: var(--berry); text-shadow: 0 2px 0 var(--berry); }
.btn--primary:hover { --btn-bg: #ec5a8f; color: #fff; }
.btn--light { --btn-bg: var(--cream); }
.btn--ghost { --btn-bg: rgba(255, 247, 241, 0.55); --btn-edge: var(--rose); }
.btn--ghost:hover { --btn-bg: var(--cream); }
.btn--small { min-height: 42px; padding: 6px 16px; font-size: 1rem; }
.btn__icon { width: 15px; height: 20px; filter: drop-shadow(1px 1px 0 var(--berry)); }
.btn__arrow { font-family: var(--font-body); font-weight: 800; }
.btn[aria-busy="true"]::after {
  content: ""; width: 12px; height: 12px; background: currentColor;
  animation: blink 0.8s steps(2) infinite;
}

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  background: transparent; border: 0; cursor: pointer; font-size: 1.1rem; font-weight: 800; color: var(--ink-soft);
}
.icon-btn:hover { color: var(--berry); background: var(--cream-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(68vh, 620px);
  display: grid; place-items: center;
  padding: 24px 16px 72px;
  text-align: center;
}
.clouds { position: absolute; inset: -90px 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cloud { position: absolute; top: 0; height: auto; opacity: 0.95; }
.cloud--left { left: -2%; width: clamp(240px, 36vw, 560px); animation: drift-a 70s ease-in-out infinite alternate; }
.cloud--right { right: -2%; width: clamp(220px, 31vw, 490px); top: 10px; animation: drift-b 85s ease-in-out infinite alternate; }
@keyframes drift-a { from { transform: translateX(-3vw); } to { transform: translateX(6vw); } }
@keyframes drift-b { from { transform: translateX(3vw); } to { transform: translateX(-7vw); } }

.hero__inner { max-width: 760px; }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 4px 12px;
  font-family: var(--font-pixel); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--berry); background: rgba(255, 247, 241, 0.7);
}
.hero h1 {
  margin: 0; font-family: var(--font-pixel); font-weight: 700;
  font-size: clamp(2.5rem, 7.2vw, 4.9rem); line-height: 1.02; letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 4px 0 var(--berry), 4px 0 0 var(--berry), -4px 0 0 var(--berry), 0 -4px 0 var(--berry),
               4px 4px 0 var(--berry), -4px 4px 0 var(--berry), 4px -4px 0 var(--berry), -4px -4px 0 var(--berry),
               0 10px 0 rgba(110, 22, 58, 0.25);
}
.subtitle {
  margin: 22px auto 0; max-width: 34ch;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem); font-weight: 800; color: var(--ink);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 16px; margin-top: 30px; }
.hero__count { margin: 22px 0 0; font-weight: 700; color: var(--ink-soft); min-height: 1.6em; }

/* ---------- Wall section ---------- */
.wall-section { max-width: var(--wall-max); margin: 0 auto; padding: 0 16px 24px; scroll-margin-top: 12px; }

.wall-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px;
  padding: 18px 20px 16px;
  background: var(--cream);
  box-shadow: 0 -4px 0 var(--berry), -4px 0 0 var(--berry), 4px 0 0 var(--berry);
  margin: 0 4px;
}
.wall-head h2 { margin: 0; font-family: var(--font-pixel); font-weight: 700; font-size: 1.9rem; line-height: 1.1; }
.wall-count { margin: 2px 0 0; font-weight: 700; color: var(--ink-soft); }
.wall-count strong { color: var(--berry); font-size: 1.1em; }

.wall-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px;
  font-weight: 800; font-size: 0.92rem; background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 3px #f0bfd0;
}
.chip b { font-weight: 800; color: var(--rose); font-variant-numeric: tabular-nums; }
.chip input:checked + span { background: var(--pink); color: #fff; box-shadow: inset 0 0 0 3px var(--berry); }
.chip input:checked + span b { color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.view-toggle { display: inline-flex; box-shadow: inset 0 0 0 3px var(--berry); padding: 3px; background: #fff; }
.view-toggle button { min-height: 34px; padding: 4px 14px; border: 0; background: transparent; font-weight: 800; cursor: pointer; font-size: 0.92rem; }
.view-toggle button[aria-pressed="true"] { background: var(--berry); color: #fff; }

/* The wall itself */
.wall-frame {
  position: relative; margin: 0 4px;
  box-shadow: -4px 0 0 var(--berry), 4px 0 0 var(--berry), 0 4px 0 var(--berry), 0 14px 0 rgba(110, 22, 58, 0.18);
  background: #f3b7b4;
}
.wall-frame[hidden] { display: none; }
.wall-status {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; text-align: center; font-weight: 800; color: var(--ink);
  background: rgba(255, 238, 240, 0.55);
}
.wall-status[hidden] { display: none; }
.loader { width: 16px; height: 16px; background: var(--rose); box-shadow: 20px 0 0 var(--pink), 40px 0 0 var(--pink-soft); margin-right: 40px; animation: blink 0.9s steps(3) infinite; }

.wall-sections { min-height: 360px; }
.wall-panel {
  position: relative;
  background: url("assets/wall-tile.webp") 0 0 / 1254px auto repeat;
  image-rendering: pixelated;
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}
.wall-ledge {
  position: relative; height: 44px;
  background: url("assets/wall-ledge.webp") 0 100% / 1254px auto repeat-x;
  image-rendering: pixelated;
  display: flex; align-items: center; justify-content: center;
}
.wall-ledge span {
  font-family: var(--font-pixel); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cream); background: rgba(143, 23, 71, 0.72); padding: 1px 10px;
}

/* Empty state */
.wall-empty {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 20px; pointer-events: none;
}
.wall-empty__card {
  pointer-events: auto; text-align: center; max-width: 380px; padding: 22px 22px 18px;
  background: rgba(255, 247, 241, 0.94);
  box-shadow: 0 -4px 0 var(--berry), 0 4px 0 var(--berry), -4px 0 0 var(--berry), 4px 0 0 var(--berry), 0 12px 0 var(--shadow);
}
.wall-empty__ghost { width: 50px; height: 65px; margin: 0 auto 10px; opacity: 0.35; filter: grayscale(0.3); animation: bob 2.4s steps(2) infinite; }
.wall-empty h3 { margin: 0 0 6px; font-family: var(--font-pixel); font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.wall-empty p { margin: 0 0 14px; color: var(--ink-soft); font-weight: 700; }

/* Ribbons */
.ribbon {
  position: absolute; z-index: 1;
  width: var(--rw); height: var(--rh);
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
}
.ribbon img {
  width: 100%; height: 100%;
  filter: drop-shadow(3px 3px 0 rgba(110, 22, 58, 0.32));
  animation: sway 4.8s steps(4, jump-none) infinite;
  animation-delay: var(--delay, 0s);
  transform-origin: 50% 0;
}
.ribbon.is-smooth img { image-rendering: auto; }
.ribbon::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  white-space: nowrap; padding: 3px 8px; font-size: 0.8rem; font-weight: 800;
  color: #fff; background: var(--ink); pointer-events: none; opacity: 0; transition: opacity 120ms steps(2);
}
.ribbon:hover, .ribbon:focus-visible { z-index: 4; }
.ribbon:hover img, .ribbon:focus-visible img { animation-play-state: paused; transform: translateY(-4px) scale(1.12); filter: drop-shadow(0 0 0 #fff) drop-shadow(3px 5px 0 rgba(110, 22, 58, 0.4)); }
.ribbon:hover::after, .ribbon:focus-visible::after { opacity: 1; }
.ribbon:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.ribbon.is-dimmed { opacity: 0.16; pointer-events: none; filter: saturate(0.4); }
.ribbon.is-mine::before {
  content: ""; position: absolute; left: 50%; top: -9px; width: 4px; height: 4px; transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 -4px 0 #fff, 0 4px 0 #fff, -4px 0 0 #fff, 4px 0 0 #fff, 0 0 0 1px var(--berry);
  animation: blink 1.6s steps(2) infinite;
}
.ribbon.is-new img { animation: land 900ms steps(9) both; }
.ribbon.is-highlight { z-index: 5; }
.ribbon.is-highlight img { animation: pulse 1.2s steps(4) 3; }

@keyframes sway {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-1px); }
  50% { transform: translateY(-2px); }
  75% { transform: translateY(-1px); }
}
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes land {
  0% { transform: translateY(-14px) scale(1.25); filter: brightness(1.4) drop-shadow(0 0 0 #fff); }
  60% { transform: translateY(2px) scale(0.96); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(3px 3px 0 rgba(110, 22, 58, 0.32)); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 0 #fff) brightness(1.15) drop-shadow(0 0 6px #fff); }
}

.flyer { position: fixed; z-index: 60; pointer-events: none; image-rendering: pixelated; filter: drop-shadow(4px 6px 0 rgba(110, 22, 58, 0.35)); }
.spark { position: absolute; z-index: 6; width: 6px; height: 6px; background: #fff; pointer-events: none; box-shadow: 0 0 0 2px var(--pink-soft); }

/* ---------- List view ---------- */
.list-view {
  margin: 0 4px; padding: 18px 20px 22px; background: var(--cream);
  box-shadow: -4px 0 0 var(--berry), 4px 0 0 var(--berry), 0 4px 0 var(--berry), 0 14px 0 rgba(110, 22, 58, 0.18);
}
.list-view__intro { margin: 0 0 12px; font-weight: 700; color: var(--ink-soft); }
.ribbon-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.ribbon-list li button {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 14px; align-items: center; width: 100%;
  padding: 10px 12px; text-align: left; cursor: pointer; background: #fff; border: 0;
  box-shadow: inset 0 0 0 3px #f6d1dc;
}
.ribbon-list li button:hover { box-shadow: inset 0 0 0 3px var(--pink-soft); }
.ribbon-list img { width: 30px; height: 39px; }
.ribbon-list strong { display: block; font-weight: 800; }
.ribbon-list small { color: var(--ink-soft); font-weight: 700; font-size: 0.85rem; }
.ribbon-list .tag { font-size: 0.8rem; font-weight: 800; color: var(--berry); white-space: nowrap; }
.ribbon-list__empty { padding: 18px; background: #fff; font-weight: 700; color: var(--ink-soft); }

/* ---------- Panels / donate ---------- */
.panel {
  background: var(--cream);
  box-shadow: 0 -4px 0 var(--berry), 0 4px 0 var(--berry), -4px 0 0 var(--berry), 4px 0 0 var(--berry), 0 14px 0 rgba(110, 22, 58, 0.18);
  margin: 4px;
}
.donate { max-width: 980px; margin: 56px auto 0; padding: 0 16px; scroll-margin-top: 16px; }
.donate__panel { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; padding: 32px 36px; }
.donate__ribbon { width: 100px; height: 130px; margin-top: 4px; }
.donate h2 { margin: 0 0 8px; font-family: var(--font-pixel); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.1; }
.donate__lead { margin: 0 0 20px; font-size: 1.15rem; font-weight: 700; }
.donate__note { margin: 18px 0 0; max-width: 62ch; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { max-width: var(--wall-max); margin: 56px auto 0; padding: 26px 16px 40px; text-align: center; font-weight: 700; }
.footer p { margin: 0 0 10px; }
.footer__links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 0; padding: 0; }
.footer a { color: var(--ink); font-weight: 800; }

/* ---------- Modals ---------- */
.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; color: var(--ink); background: var(--cream); overflow: visible;
  box-shadow: 0 -4px 0 var(--berry), 0 4px 0 var(--berry), -4px 0 0 var(--berry), 4px 0 0 var(--berry), 0 16px 0 rgba(60, 10, 30, 0.25);
}
.modal::backdrop { background: rgba(91, 24, 52, 0.45); }
.modal[open] { animation: pop-in 220ms steps(4); }
@keyframes pop-in { from { transform: translateY(16px); opacity: 0; } }
.modal__inner { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.modal__head { display: grid; grid-template-columns: 1fr auto; align-items: start; padding: 20px 14px 4px 24px; }
.modal__step { grid-column: 1; margin: 0; font-family: var(--font-pixel); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rose); }
.modal__head h2 { grid-column: 1; margin: 2px 0 0; font-family: var(--font-pixel); font-weight: 700; font-size: 1.6rem; line-height: 1.15; }
.modal__head .icon-btn { grid-column: 2; grid-row: 1 / span 2; }
.steps { display: flex; gap: 6px; list-style: none; margin: 10px 24px 0; padding: 0; }
.steps li { height: 6px; flex: 1; background: #f3cbd7; }
.steps li.is-current, .steps li.is-done { background: var(--pink); }
.modal__body { padding: 18px 24px 8px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 12px; padding: 12px 20px 20px; flex-wrap: wrap; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step[hidden] { display: none; }

.option { display: block; position: relative; margin-bottom: 10px; cursor: pointer; }
.option input, .shade input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option__box { display: block; padding: 14px 16px 14px 52px; background: #fff; box-shadow: inset 0 0 0 3px #f3cbd7; position: relative; }
.option__box::before {
  content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  background: #fff; box-shadow: inset 0 0 0 3px var(--mortar);
}
.option__box strong { display: block; font-weight: 800; font-size: 1.08rem; }
.option__box small { color: var(--ink-soft); font-weight: 700; font-size: 0.92rem; }
.option input:checked + .option__box { box-shadow: inset 0 0 0 3px var(--berry); background: #fff2f6; }
.option input:checked + .option__box::before { background: var(--pink); box-shadow: inset 0 0 0 3px var(--berry), inset 0 0 0 6px #fff; }
.option input:focus-visible + .option__box, .shade input:focus-visible + .shade__box { outline: 3px solid var(--focus); outline-offset: 2px; }

.shades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.shade { position: relative; cursor: pointer; }
.shade__box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px 14px; background: #fff; box-shadow: inset 0 0 0 3px #f3cbd7; font-weight: 800; font-size: 0.95rem; text-align: center; }
.shade__box img { width: 75px; height: 97.5px; }
.shade input:checked + .shade__box { box-shadow: inset 0 0 0 3px var(--berry); background: #fff2f6; }
.shade input:checked + .shade__box img { animation: bob 1.4s steps(2) infinite; }

.preview { display: grid; gap: 10px; justify-items: center; }
.preview__card { width: min(100%, 340px); height: auto; aspect-ratio: 1; image-rendering: auto; box-shadow: 0 8px 0 rgba(110, 22, 58, 0.18); }
.preview__text { margin: 4px 0 0; text-align: center; font-weight: 700; color: var(--ink-soft); font-size: 0.95rem; }
.alert { margin-top: 14px; padding: 12px 14px; background: #fff; box-shadow: inset 4px 0 0 var(--rose), inset 0 0 0 2px #f3cbd7; font-weight: 700; }
.alert[hidden] { display: none; }

/* Ribbon detail */
.modal--ribbon { width: min(420px, calc(100vw - 24px)); }
.icon-btn--corner { position: absolute; top: 8px; right: 8px; }
.ribbon-detail { padding: 32px 26px 24px; text-align: center; }
.ribbon-detail__img { width: 125px; height: 162.5px; margin: 0 auto 14px; filter: drop-shadow(4px 4px 0 rgba(110, 22, 58, 0.3)); }
.ribbon-detail__img.is-smooth { image-rendering: auto; }
.ribbon-detail__kicker { margin: 0 0 4px; font-family: var(--font-pixel); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rose); }
.ribbon-detail h2 { margin: 0; font-family: var(--font-pixel); font-weight: 700; font-size: 1.6rem; line-height: 1.15; }
.ribbon-detail__message { margin: 8px 0 6px; font-size: 1.1rem; font-weight: 800; }
.ribbon-detail__meta { margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); }
.ribbon-detail__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.share-status { margin: 10px 0 0; min-height: 1.3em; font-size: 0.9rem; font-weight: 800; color: var(--berry); }
.share-status input { width: 100%; margin-top: 6px; padding: 8px; border: 2px solid var(--pink-soft); font-size: 0.9rem; }

/* Success sheet */
.success {
  position: fixed; z-index: 40; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start;
  padding: 18px 10px 18px 20px; background: var(--cream);
  box-shadow: 0 -4px 0 var(--berry), 0 4px 0 var(--berry), -4px 0 0 var(--berry), 4px 0 0 var(--berry), 0 14px 0 rgba(60, 10, 30, 0.25);
  animation: rise 260ms steps(5);
}
.success[hidden] { display: none; }
.success > img { width: 50px; height: 65px; }
.success h2 { margin: 0; font-family: var(--font-pixel); font-weight: 700; font-size: 1.3rem; line-height: 1.2; outline: none; }
.success p { margin: 2px 0 10px; font-weight: 700; color: var(--ink-soft); font-size: 0.95rem; }
.success__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@keyframes rise { from { transform: translate(-50%, 24px); opacity: 0; } }

.noscript { text-align: center; padding: 20px; font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .topbar nav { gap: 14px; }
  .hero { min-height: auto; padding: 28px 16px 56px; }
  .hero__actions { flex-direction: column; align-items: stretch; max-width: 320px; margin-inline: auto; }
  .wall-section { padding-inline: 12px; }
  .wall-head { padding: 16px 14px 14px; }
  .wall-controls { width: 100%; justify-content: space-between; }
  .filters { gap: 6px; }
  .chip span { padding: 6px 9px; font-size: 0.86rem; }
  .donate__panel { grid-template-columns: 1fr; padding: 24px 20px; text-align: left; }
  .donate__ribbon { width: 50px; height: 65px; }
  .modal__body { padding: 14px 18px 6px; }
  .modal__head { padding: 18px 10px 4px 18px; }
  .steps { margin-inline: 18px; }
  .shade__box img { width: 50px; height: 65px; }
  .modal__foot { flex-wrap: nowrap; gap: 8px; padding: 10px 14px 16px; }
  .modal__foot .btn { flex: 1; padding: 8px 10px; font-size: 1rem; }
  .modal__foot [data-back] { flex: 0 0 auto; padding-inline: 16px; }
  .modal__head h2 { font-size: 1.35rem; }
  .preview__card { width: min(100%, 250px); }
  .success { grid-template-columns: 1fr auto; }
  .success > img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .cloud, .ribbon img, .wall-empty__ghost, .ribbon.is-mine::before, .shade input:checked + .shade__box img { animation: none !important; }
  .ribbon.is-highlight img { animation: none !important; outline: 3px solid #fff; outline-offset: 2px; }
}

/* ---------- Community coin ---------- */
.coin { margin-top: 28px; padding: 26px 36px 28px; display: grid; gap: 14px; }
.coin__kicker { margin: 0; font-family: var(--font-pixel); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rose); }
.coin h3 { margin: 2px 0 0; font-family: var(--font-pixel); font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 1.8rem); line-height: 1.15; text-wrap: balance; }
.coin__lead { margin: 0; max-width: 62ch; font-weight: 700; }
.coin__ca label { display: block; margin-bottom: 6px; font-weight: 800; font-size: 0.9rem; }
.coin__row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.coin__input {
  flex: 1 1 280px; min-width: 0; min-height: 44px; padding: 8px 12px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9rem; letter-spacing: 0.02em;
  color: var(--ink); background: #fff; border: 0; box-shadow: inset 0 0 0 3px #f3cbd7;
}
.coin__input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.coin__status { margin: 6px 0 0; min-height: 1.3em; font-size: 0.9rem; font-weight: 800; color: var(--berry); }
.coin__links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; font-weight: 800; }
.coin__note { margin: 0; max-width: 66ch; font-size: 0.92rem; color: var(--ink-soft); }
@media (max-width: 720px) { .coin { padding: 22px 20px; } }

/* ---------- Contract address bar (top of page) ---------- */
.ca-bar {
  position: relative; z-index: 6;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px;
  padding: 8px 16px; background: var(--berry); color: #fff; font-weight: 700; font-size: 0.88rem; text-align: center;
}
.ca-bar__label { font-family: var(--font-pixel); font-weight: 700; letter-spacing: 0.08em; padding: 0 6px; background: var(--pink); }
.ca-bar__addr { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.86rem; word-break: break-all; user-select: all; }
.ca-bar__copy {
  min-height: 30px; padding: 2px 12px; border: 0; cursor: pointer; font-weight: 800; font-size: 0.85rem;
  color: var(--berry); background: var(--cream); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.ca-bar__copy:hover { background: #fff; }
.ca-bar__copy:active { transform: translateY(2px); box-shadow: none; }
.ca-bar__copy:focus-visible, .ca-bar__more:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ca-bar__more { color: var(--blush); font-weight: 800; }
.ca-bar__more:hover { color: #fff; }
.ca-bar__status:empty { display: none; }
.ca-bar__status { color: var(--blush); font-weight: 800; }
.coin { scroll-margin-top: 16px; }
@media (max-width: 720px) {
  .ca-bar { gap: 6px 10px; padding: 8px 12px; }
  .ca-bar__addr { font-size: 0.68rem; letter-spacing: -0.01em; }
  .ca-bar__label { font-size: 0.75rem; }
}
