/* 奖励站 (spec §20): the coin bank, prize cards (里程碑大奖 / 商店), redemptions, the parents' 待兑现,
   奖品 and 币的明细 pages, the sheets and 「兑现啦！」. §12: side-by-side groups share one class, use
   minmax(0, 1fr) columns and equal rows; every card part has a fixed height, so cards in both grids are
   the same size; long names are cut to one line. Phone 2 columns, iPad portrait 3, landscape 4. */

/* ---------- Tokens (light / dark) ---------- */
:root {
  --pz-gold: #FFC233;
  --pz-gold-deep: #B86E00;
  --pz-tile: #FFF4DF;
  --pz-tile-line: rgba(232, 155, 0, 0.16);
  --pz-bar-track: rgba(42, 30, 53, 0.08);
  --pz-bar-fill: linear-gradient(90deg, #FFD45C, #FF9A2E);
  --pz-ready-ring: rgba(255, 165, 31, 0.55);
  --pz-stamp: #1E9E5A;
  --pz-owe: #FFB3A8;
  --pz-alert-glass: rgba(255, 107, 90, 0.30);
  --pz-cel-1: #FF8A5C;
  --pz-cel-2: #7A3A9C;
  --pz-cel-3: #2B0F3A;
  --pz-pic: 112px;
  --pz-pic-kid: 128px;
  --pz-foot-h: 52px;
  --pz-foot-h-kid: 60px;
  --pz-stat-h: 88px;
}
@media (min-width: 700px) {
  :root { --pz-pic-kid: 150px; --pz-foot-h-kid: 64px; --pz-stat-h: 104px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --pz-gold-deep: #FFD06A;
    --pz-tile: #2A1E33;
    --pz-tile-line: rgba(255, 194, 51, 0.14);
    --pz-bar-track: rgba(255, 255, 255, 0.10);
    --pz-ready-ring: rgba(255, 194, 51, 0.45);
    --pz-stamp: #4CD38A;
    --pz-cel-3: #12061A;
  }
}

/* ---------- Page ---------- */
/* The body starts under the header's rounded edge: a leading section label needs room. */
.page--prizes .page-body > :first-child > .pz-section-label:first-child,
.page--prizes .page-body > :first-child > .pz-section:first-child > .pz-section-label { margin-top: 36px; }
.pz-switcher { margin: 6px 0 12px; }

/* ---------- Header: equal glass tiles ---------- */
.pz-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--gap);
  margin-top: 14px;
}
.pz-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pz-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  height: 100%;
  min-height: var(--pz-stat-h);
  padding: 10px 12px;
  border-radius: var(--r-m);
  background: var(--hero-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.pz-stat-art { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; color: var(--pz-gold); }
.pz-stat-art svg { width: 28px; height: 28px; }
.pz-stat-art .pz-stat-coin { width: 40px; height: 40px; }
.pz-stat-value {
  align-self: end;
  font-family: var(--font-rounded);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--pz-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pz-stat-label { align-self: start; font-size: 13px; color: var(--hero-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-stat.is-owe .pz-stat-value { color: var(--pz-owe); }
.pz-stat.is-alert { background: var(--pz-alert-glass); }
.pz-stat-value.is-bump { animation: pz-bump 420ms var(--ease-spring); }
@keyframes pz-bump { 40% { transform: scale(1.18); } }
/* Three tiles on a phone: icon above the number. */
@media (max-width: 519px) {
  .pz-stats--3 .pz-stat { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; justify-items: center; text-align: center; padding: 8px 6px; }
  .pz-stats--3 .pz-stat-art { grid-row: auto; width: 28px; height: 28px; }
  .pz-stats--3 .pz-stat-art svg, .pz-stats--3 .pz-stat-art .pz-stat-coin { width: 24px; height: 24px; }
  .pz-stats--3 .pz-stat-value { align-self: center; font-size: 24px; }
}
/* The child's bank: bigger, the coin wobbles a little. */
.page--prizes-kid .pz-stat-value { font-size: 40px; }
.page--prizes-kid .pz-stat-label { font-size: 14px; }
.page--prizes-kid .pz-stat-art { width: 52px; height: 52px; }
.page--prizes-kid .pz-stat-art svg { width: 34px; height: 34px; }
.page--prizes-kid .pz-stat-art .pz-stat-coin { width: 52px; height: 52px; animation: pz-wobble 3.2s ease-in-out infinite; }
@media (min-width: 700px) {
  .page--prizes-kid .pz-stat-value { font-size: 52px; }
  .page--prizes-kid .pz-stat-label { font-size: 16px; }
  /* A wide tile holds a short line: the coin and its words sit in the middle (spec §24.3). */
  .page--prizes-kid .pz-stat { grid-template-columns: auto auto; justify-content: center; column-gap: 16px; }
}
@keyframes pz-wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-2px); } }

/* ---------- Sections and the card grids ---------- */
.pz-content { display: grid; gap: 0; }
.pz-section-label { justify-content: space-between; }
.pz-section-title { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pz-section-title svg { width: 18px; height: 18px; color: var(--pz-gold-deep); }
.pz-section-hint { font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page--prizes-kid .pz-section-label { font-size: 18px; color: var(--text); }
.page--prizes-kid .pz-section-title svg { width: 22px; height: 22px; }

.pz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: var(--gap);
}
@media (min-width: 700px) { .pz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pz-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Prize card ---------- */
.pz-card {
  --pic: var(--pz-pic);
  --foot: var(--pz-foot-h);
  display: grid;
  grid-template-rows: auto 24px 18px 30px minmax(var(--foot), 1fr);
  justify-items: center;
  row-gap: 6px;
  height: 100%;
  min-width: 0;
  padding: var(--card-pad);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  text-align: center;
}
.page--prizes-kid .pz-card { --pic: var(--pz-pic-kid); --foot: var(--pz-foot-h-kid); grid-template-rows: auto 30px 22px 32px minmax(var(--foot), 1fr); }
.pz-card.is-ready { box-shadow: 0 0 0 2.5px var(--pz-ready-ring), var(--shadow-2); }
.pz-card-pic {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 10px 0;
  border-radius: var(--r-m);
  background: var(--pz-tile);
  box-shadow: inset 0 0 0 1px var(--pz-tile-line);
}
.pz-card.is-done .pz-card-pic .pz-pic { opacity: 0.55; filter: saturate(0.6); }
.pz-card-name {
  width: 100%;
  font-size: 17px;
  font-weight: 800;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pz-card-sub { width: 100%; font-size: 13px; line-height: 18px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page--prizes-kid .pz-card-name { font-size: 19px; line-height: 30px; }
.page--prizes-kid .pz-card-sub { font-size: 14px; line-height: 22px; }
@media (min-width: 700px) {
  .page--prizes-kid .pz-card-name { font-size: 22px; }
  .page--prizes-kid .pz-card-sub { font-size: 15px; }
}
.pz-card-price { display: grid; place-items: center; height: 100%; }

/* Pictures: a square, the photo or the drawing fills it. */
.pz-pic { display: block; flex-shrink: 0; overflow: hidden; border-radius: 22%; }
.pz-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pz-pic .pz-art { display: block; width: 100%; height: 100%; }
.pz-pic--lg { width: var(--pic, 112px); height: var(--pic, 112px); }
.pz-pic--md { width: 64px; height: 64px; }
.pz-pic--sm { width: 44px; height: 44px; border-radius: 12px; background: var(--pz-tile); }
.pz-pic--xl { width: min(62vw, 44dvh, 320px); height: min(62vw, 44dvh, 320px); }
.pz-pic--md { border-radius: 16px; background: var(--pz-tile); }
.pz-pic--sm .pz-art, .pz-pic--md .pz-art { padding: 3px; }

.pz-stamp {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 4px 10px;
  border: 2.5px solid var(--pz-stamp);
  border-radius: 10px;
  color: var(--pz-stamp);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(-10deg);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.pz-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px 0 6px;
  border-radius: var(--r-pill);
  background: var(--pineapple-soft);
  color: var(--pz-gold-deep);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.pz-price--mile { padding-left: 10px; background: var(--accent-soft); color: var(--accent); }
.pz-price-icon { width: 17px; height: 17px; }
.pz-price-coin-box, .pz-stat-coin-box { display: inline-grid; place-items: center; }
.pz-price-coin { width: 22px; height: 22px; }
.page--prizes-kid .pz-price { height: 32px; font-size: 18px; }
.page--prizes-kid .pz-price-coin { width: 26px; height: 26px; }

/* The bottom area: one fixed height for the button and for the progress line. */
.pz-foot {
  display: grid;
  align-content: center;
  gap: 6px;
  align-self: end;
  width: 100%;
  height: var(--foot);
  min-width: 0;
}
.pz-go { width: 100%; height: var(--foot); min-height: 0; padding: 0 10px; font-size: 16px; }
.page--prizes-kid .pz-go { font-size: 18px; border-radius: 18px; }
@media (min-width: 700px) { .page--prizes-kid .pz-go { font-size: 20px; } }
.page--prizes-kid .pz-go svg { width: 24px; height: 24px; }
.pz-foot-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: var(--text-2);
  white-space: nowrap;
}
.pz-foot-text > span { overflow: hidden; text-overflow: ellipsis; }
.pz-foot-text svg { width: 18px; height: 18px; flex-shrink: 0; }
.page--prizes-kid .pz-foot-text { font-size: 15px; line-height: 24px; }
@media (min-width: 700px) { .page--prizes-kid .pz-foot-text { font-size: 17px; } }
.pz-foot--short .pz-foot-text { color: var(--pz-gold-deep); }
.pz-foot--wait .pz-foot-text { color: var(--warning); }
.pz-foot--done .pz-foot-text { color: var(--positive); }
.pz-foot--go .pz-foot-text { color: var(--positive); }
.pz-foot--muted .pz-foot-text { color: var(--text-3); }
.pz-foot--wait, .pz-foot--done, .pz-foot--muted { border-radius: 14px; background: var(--surface-3); }

.pz-bar { display: block; height: 10px; border-radius: var(--r-pill); background: var(--pz-bar-track); overflow: hidden; }
.pz-bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--pz-bar-fill);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  transition: transform var(--dur-3) var(--ease-out);
}

/* ---------- Notes, empty states ---------- */
.pz-note, .pz-owe-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 4px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.pz-note svg, .pz-owe-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--pz-gold-deep); }
.pz-owe-note { padding: 12px 14px; border-radius: var(--r-m); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.pz-owe-note svg { color: var(--danger); }
.page--prizes-kid .pz-owe-note { font-size: 18px; }
.pz-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 28px 20px;
  border: 0;
  font: inherit;
  color: var(--text);
  text-align: center;
  text-decoration: none;
}
.pz-empty p { font-size: 14px; color: var(--text-2); }
.page--prizes-kid .pz-empty strong { font-size: 22px; }
.page--prizes-kid .pz-empty p { font-size: 17px; }
.pz-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: var(--pz-gold-deep); background: var(--pineapple-soft); }
.pz-empty-icon svg { width: 34px; height: 34px; }
.pz-empty-coin { width: 44px; height: 44px; }
.pz-retry:active, a.pz-empty:active { transform: scale(0.98); }
.pz-none { display: flex; align-items: center; gap: 10px; padding: 16px; color: var(--text-2); font-size: 15px; }
.pz-none svg { width: 22px; height: 22px; color: var(--positive); flex-shrink: 0; }
.pz-skel { height: 220px; margin-top: 26px; border-radius: var(--r-l); }
.pz-skel--req { height: 132px; margin-top: 0; }
.pz-foot-note { margin: 18px 8px 0; font-size: 12px; line-height: 1.6; color: var(--text-3); text-align: center; }

/* ---------- Redemption rows ---------- */
.pz-list .row::before { display: none; }
.pz-list > * + * { border-top: 1px solid var(--line); }
.pz-row { min-height: 64px; }
.page--prizes-kid .pz-row .row-title { font-size: 19px; font-weight: 700; }
.page--prizes-kid .pz-row .row-sub { font-size: 14px; }
.pz-status {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.pz-status--requested { background: var(--warning-soft); color: var(--warning); }
.pz-status--fulfilled { background: var(--positive-soft); color: var(--positive); }
.pz-status--cancelled { background: var(--surface-3); color: var(--text-3); }
.pz-reason {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 16px 12px 72px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text-2);
}
.pz-reason > svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-3); }
.pz-reason > span { flex: 1; min-width: 0; }
.page--prizes-kid .pz-reason { font-size: 17px; }
.pz-say { width: 44px; height: 44px; flex-shrink: 0; }

/* ---------- Parents: 待兑现 ---------- */
.pz-reqs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: var(--gap);
}
@media (min-width: 700px) { .pz-reqs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pz-reqs > .card { margin-top: 0; }
.pz-req { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; height: 100%; padding: var(--card-pad); }
.pz-req-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pz-req-text { display: grid; gap: 2px; min-width: 0; }
.pz-req-who { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-req-name { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-req-when { font-size: 12px; color: var(--text-3); }
.pz-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.pz-two .btn { width: 100%; }
.pz-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

/* ---------- Parents: 奖品 ---------- */
.pz-manage-actions { margin-top: 0; }
.pz-manage-row { gap: 10px; padding-right: 10px; }
.pz-manage-row.is-off .pz-pic, .pz-manage-row.is-off .row-main { opacity: 0.5; }
.pz-manage-main { padding: 6px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.pz-more { flex-shrink: 0; }

/* ---------- 币的明细 ---------- */
.pz-coin-row { gap: 12px; }
.pz-coin-delta { display: grid; justify-items: end; gap: 1px; flex-shrink: 0; }
.pz-coin-delta strong { font-family: var(--font-rounded); font-size: 19px; font-weight: 800; }
.pz-coin-delta .is-plus { color: var(--positive); }
.pz-coin-delta .is-minus { color: var(--danger); }
.pz-coin-after { font-size: 12px; color: var(--text-3); }
.pz-day-sum { font-family: var(--font-rounded); color: var(--text-3); }
/* The child's ledger on a landscape iPad: one readable column (header tiles included) instead of
   1100px-wide rows holding a few words (spec §24.3). */
.page--prizes-coins.page--prizes-kid { --kid-max: 820px; }

/* ---------- Sheets ---------- */
.pz-confirm { display: grid; justify-items: center; gap: 12px; padding: 4px 0 8px; text-align: center; }
.pz-confirm .pz-pic--lg { --pic: min(46vw, 180px); border-radius: 26%; box-shadow: var(--shadow-2); }
.pz-confirm-title { font-size: 26px; font-weight: 900; line-height: 1.3; text-wrap: balance; }
.pz-confirm-line { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--text-2); }
.pz-confirm-left { font-size: 17px; color: var(--text-3); }
.pz-confirm-say { min-height: 52px; font-size: 18px; }
.pz-sheet--kid .sheet-foot .btn { font-size: 20px; }
.pz-cancel { display: grid; gap: 12px; }
.pz-cancel-head { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.pz-cancel-lead { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.pz-chips { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 8px; }
@media (min-width: 420px) { .pz-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pz-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: transform var(--dur-1) var(--ease-out);
}
.pz-chip span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-chip:active { transform: scale(0.97); }
.pz-chip[aria-pressed="true"] { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.pz-form { display: grid; gap: 14px; }
.pz-form > .field { margin-top: 0; }
.pz-num { display: flex; align-items: center; gap: 10px; }
.pz-num-input { width: 120px; text-align: center; font-family: var(--font-rounded); font-weight: 700; }
.pz-num-suffix { font-size: 16px; color: var(--text-2); }
.pz-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.pz-icon-art { width: 100%; height: 100%; }
.pz-photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.pz-photo-actions .btn { width: 100%; }
.pz-photo-actions:has(> .btn[hidden]) { grid-template-columns: minmax(0, 1fr); }
.pz-photo:empty { display: none; }
.pz-photo-kept { display: grid; justify-items: center; gap: 6px; }
.pz-photo-kept .pz-pic--lg { --pic: 140px; }
.pz-sheet .hcrop-frame { aspect-ratio: 1 / 1; width: min(100%, 260px); }

/* ---------- 「兑现啦！」 ---------- */
.pz-cel {
  position: fixed;
  inset: 0;
  z-index: 170; /* under the confetti canvas (180) */
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
  color: #fff;
  background: radial-gradient(circle at 50% 38%, var(--pz-cel-1) 0%, var(--pz-cel-2) 52%, var(--pz-cel-3) 100%);
  opacity: 0;
  transition: opacity 260ms var(--ease-out);
}
.pz-cel.is-open { opacity: 1; }
.pz-cel:focus { outline: none; }
.pz-cel.is-leaving { opacity: 0; }
.pz-cel-rays {
  position: absolute;
  inset: -60%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 226, 140, 0.20) 0deg 9deg, rgba(255, 226, 140, 0) 9deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, #000 22%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0%, #000 22%, transparent 60%);
  opacity: 0.5;
  animation: pz-spin 24s linear infinite;
  transition: opacity 600ms var(--ease-out);
}
.pz-cel.is-done .pz-cel-rays { opacity: 1; }
@keyframes pz-spin { to { transform: rotate(360deg); } }
.pz-cel-stage { position: relative; display: grid; justify-items: center; gap: 20px; width: min(100%, 560px); text-align: center; }
.pz-cel-card {
  padding: 16px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 60px rgba(30, 0, 40, 0.45), 0 0 0 6px rgba(255, 212, 92, 0.6);
  transform: scale(0.4) rotate(-8deg);
  opacity: 0;
  transition: transform 650ms var(--ease-spring), opacity 300ms var(--ease-out);
}
.pz-cel.is-open .pz-cel-card { transform: none; opacity: 1; }
.pz-cel-card .pz-pic { border-radius: 24px; }
.pz-cel-words { display: grid; gap: 8px; opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease-out), transform 600ms var(--ease-spring); }
.pz-cel.is-done .pz-cel-words { opacity: 1; transform: none; }
.pz-cel-title {
  font-size: clamp(40px, 11vw, 64px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  background: linear-gradient(180deg, #FFF8DA 0%, var(--pz-gold) 50%, #FF9F1C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 14px rgba(255, 160, 30, 0.45));
}
.pz-cel-line { font-size: clamp(20px, 5vw, 28px); font-weight: 800; text-wrap: balance; }
.pz-cel-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--gap);
  width: min(100%, 420px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms 200ms var(--ease-out);
}
.pz-cel.is-done .pz-cel-actions { opacity: 1; pointer-events: auto; }
.pz-cel-actions .btn { width: 100%; }
.pz-cel.is-reduced .pz-cel-rays { animation: none; }
.pz-cel.is-reduced .pz-cel-card, .pz-cel.is-reduced .pz-cel-words, .pz-cel.is-reduced .pz-cel-actions { transition: none; }

/* ---------- Reduced motion: nothing wobbles, counts, pops or spins ---------- */
@media (prefers-reduced-motion: reduce) {
  .page--prizes-kid .pz-stat-art .pz-stat-coin, .pz-stat-value.is-bump, .pz-cel-rays { animation: none; }
  .pz-bar-fill, .pz-cel-card, .pz-cel-words, .pz-cel-actions { transition: none; }
}

/* ---------- The 奖励站 card on the child home (prizes/station-card.js, spec §24.3a #4) ----------
   Under the hero card and as wide (landscape: coins left, the nearest prize right); in portrait beside
   it and as tall (the coins fill the middle). Same surface, padding and head row as the other cards. */
.kpz {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: var(--kid-pad, 20px);
  border-radius: var(--r-xl);
  color: var(--text);
  background: radial-gradient(120% 70% at 100% 0%, var(--coral-soft) 0%, transparent 62%), var(--surface);
  box-shadow: var(--shadow-2);
  transition: transform var(--dur-1) var(--ease-out);
}
.kpz:has(.kpz-cover:active) { transform: scale(0.98); }
.kpz-cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.kpz-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.kpz-icon { display: grid; place-items: center; flex-shrink: 0; width: var(--kid-icon, 52px); height: var(--kid-icon, 52px); border-radius: 16px; color: #fff; background: linear-gradient(135deg, #FF9A57, #FF5E62); }
.kpz-icon svg { width: 58%; height: 58%; }
.kpz-title { flex: 1; min-width: 0; font-size: var(--kid-head-fs, 26px); font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpz .kpz-say { position: relative; z-index: 2; grid-area: auto; flex-shrink: 0; width: 52px; height: 52px; --sub-ink: var(--coral); }
.kpz-coins { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.kpz-coin-box { display: inline-grid; place-items: center; }
.kpz-coin { width: 76px; height: 76px; }
.kpz-amount { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kpz-num {
  font-family: var(--font-rounded);
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  color: var(--pz-gold-deep);
}
.kpz-unit { font-size: 20px; font-weight: 800; color: var(--text-2); white-space: nowrap; }
.kpz.is-owe .kpz-num { color: var(--danger); }
.kpz-ready { display: inline-flex; align-items: center; height: 30px; margin-top: 4px; padding: 0 12px; border-radius: var(--r-pill); background: var(--positive-soft); color: var(--positive); font-size: 15px; font-weight: 800; white-space: nowrap; }
.kpz-ready[hidden] { display: none; }
/* Portrait: up to four pictures of what the coins buy now, so the tall card is not an empty frame
   around one number (spec §24.3). Landscape's short card leaves them out. */
.kpz-picks { display: grid; grid-auto-flow: column; grid-auto-columns: 64px; justify-content: center; gap: 10px; margin-top: 12px; }
.kpz-picks[hidden] { display: none; }
.kpz-goal {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-2);
}
.kpz-goal .pz-pic--md { background: var(--surface); }
.kpz-goal-text { display: grid; gap: 4px; min-width: 0; }
.kpz-name { font-size: 18px; font-weight: 800; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpz-line { font-size: 16px; font-weight: 800; line-height: 1.35; color: var(--pz-gold-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpz-line.is-ready { color: var(--positive); }
.kpz-goal .pz-bar { height: 12px; margin-top: 4px; }
.kpz-pic-empty { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--surface); color: var(--text-3); }
.kpz-pic-empty svg { width: 32px; height: 32px; }
.kpz-skel { grid-column: 1 / -1; height: 64px; border-radius: 14px; }
.kpz.is-loading .kpz-coins { visibility: hidden; }

@media (orientation: landscape) and (min-width: 900px) {
  .kid-side .kpz {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-template-areas: "head head" "coins goal";
    align-items: center;
    gap: 14px 16px;
  }
  .kid-side .kpz-head { grid-area: head; }
  .kid-side .kpz-coins { grid-area: coins; display: grid; grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 12px; row-gap: 6px; }
  .kid-side .kpz-coin { width: 52px; height: 52px; }
  .kid-side .kpz-amount { flex-direction: row; align-items: baseline; gap: 6px; min-width: 0; }
  .kid-side .kpz-num { font-size: 48px; }
  .kid-side .kpz-unit { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
  .kid-side .kpz-ready { grid-column: 1 / -1; margin-top: 0; }
  .kid-side .kpz-picks { display: none; }
  .kid-side .kpz-goal { grid-area: goal; }
}
