@import url("tokens.css?v=1.3.1");
/* PlayZapZone — app shell styles (assets/style.css)
 *
 * Mobile-app-clean identity (2026-11-08), teal restyle (2026-11-08),
 * professional polish (2026-11-08): very light gray-blue page,
 * white cards, teal accent, near-black navy headings, generous
 * whitespace, rounded cards, real Inter type (self-hosted woff2),
 * sentence case. The site is ONE centered app column — 480px on
 * phones, 720px on desktop (2026-11-08 decision: the 480px strip
 * left desktop looking empty and half-clipped the filter pills;
 * 720px still feels like an app and fits the pills). No dark navy,
 * no shouting hero, no footer link soup, no fake numbers.
 *
 * Type scale: 13 / 16 / 20 / 25 / 31px from tokens.css — no
 * hardcoded font-size in this file. Weights: body 400, labels 600,
 * headings/buttons 700, display 800 only. Spacing: 8-point grid
 * (multiples of 4). Touch targets: 44px minimum hit area.
 *
 * This sheet styles SITE pages only (index, earn, account, legal).
 * The in-game shell (assets/ui.js) and the games' own menus do NOT
 * load it — each game keeps its own identity (see game-ui-ux skill).
 * The header chip (assets/earn.js) and the auth modal
 * (assets/auth.js) are styled HERE, not by injected script CSS —
 * those scripts must not ship their own styles.
 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 112px; }
body {
  margin: 0; background: var(--app-bg); color: var(--app-ink);
  font-family: var(--font-body);
  font-size: var(--text-base); line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
a { color: var(--app-accent-text); }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; border-radius: 6px; }
.pzz-ico { width: 1em; height: 1em; vertical-align: -.12em; fill: currentColor; flex: none; }

/* ---------- app column ---------- */
.app {
  max-width: 480px; margin: 0 auto; background: var(--app-surface);
  min-height: 100dvh; position: relative;
  /* Bottom clearance for the fixed tab bar: the bar is ~70px tall, so
   * 104px leaves ~34px of daylight — the last line of every page must
   * clear the bar even when fonts render a little taller (the old
   * 72px left ~2px and clipped the last lines on the user's phone). */
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 520px) {
  .app { border-left: 1px solid var(--app-line); border-right: 1px solid var(--app-line); }
}

/* ---------- slim top bar ---------- */
.app-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--app-line);
}
.pzz-header-in {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; max-width: 480px; margin: 0 auto;
}
.pzz-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--app-ink); font-weight: 700; font-size: var(--text-md); letter-spacing: -.3px; margin-right: auto; }
.pzz-logo-mark {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  color: var(--app-accent-ink); background: var(--app-accent); flex: none;
}
.pzz-logo-mark .pzz-ico { width: 20px; height: 20px; }
/* Header action slots (assets/auth.js + assets/earn.js render into
 * these fixed slots — avatar first, wallet second, always, on every
 * page). The slots exist in the HTML from first paint and reserve the
 * row height, so the two buttons can never swap places or shift the
 * header as auth state resolves. The scripts must render INTO their
 * slot, never appendChild() to .pzz-header-in. */
.pzz-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; }
.pzz-header-slot { display: flex; align-items: center; min-height: 44px; }
/* The wallet slot is a FIXED width, so the chip growing from "Wallet"
 * to a balance ("2,502 pts · $0.00") can never push the avatar left:
 * the chip ellipsizes inside its slot instead. Desktop width fits a
 * long balance; phones use the narrower 148px below. */
.pzz-header-wallet-slot { flex: none; width: 220px; justify-content: flex-end; }
.pzz-header-wallet-slot .pzz-earn-chip { width: 100%; max-width: 220px; justify-content: flex-end; }
.pzz-header-wallet-slot .pzz-earn-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Header button (assets/auth.js) + wallet chip (assets/earn.js) are
 * rendered into the fixed .pzz-header-slot spans above. Their styles
 * live here — the scripts ship markup only, no injected CSS. */
.pzz-auth-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--app-soft); border: 1px solid var(--app-line); color: var(--app-ink);
  font-weight: 600; font-size: var(--text-base); padding: 12px 16px; border-radius: 99px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.pzz-auth-btn:hover { background: #ececea; }
.pzz-auth-btn .pzz-ico { width: 16px; height: 16px; }
.pzz-auth-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--app-accent); color: #fff;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); flex: none;
}
.pzz-earn-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--app-accent-soft); border: 1px solid var(--app-accent-line); color: var(--app-accent-text);
  font-weight: 700; font-size: var(--text-xs); padding: 8px 12px; border-radius: 99px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.pzz-earn-chip:hover { background: var(--app-accent-soft-hover); }
.pzz-earn-chip .pzz-ico { width: 15px; height: 15px; }

/* Header search button (index only): focuses the page search. Hidden
 * on phones — the top bar has no room for it there; the search box
 * below the greeting is the phone path to search. */
.pzz-header-search {
  display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--app-line);
  background: var(--app-soft); color: var(--app-muted); cursor: pointer; place-items: center; padding: 0; flex: none;
}
.pzz-header-search:hover { background: #eceef1; color: var(--app-ink); }
.pzz-header-search .pzz-ico { width: 17px; height: 17px; }
@media (min-width: 521px) { .pzz-header-search { display: grid; } }

/* Header nav row (index only): Home / Games / Earn / About / Contact.
 * Text links, horizontally scrollable with the scrollbar hidden, so a
 * narrow phone never clips a link it cannot reach. The active link
 * gets the teal soft tint. Lives inside the sticky top bar. */
.app-nav {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding: 0 12px 8px; max-width: 480px; margin: 0 auto;
}
.app-nav::-webkit-scrollbar { display: none; }
.app-nav a {
  flex: none; padding: 8px 12px; border-radius: 99px; text-decoration: none;
  color: var(--app-muted); font-size: var(--text-xs); font-weight: 600; white-space: nowrap;
}
.app-nav a:hover { color: var(--app-ink); background: var(--app-soft); }
.app-nav a.active { background: var(--app-accent-soft); color: var(--app-accent-text); }

/* ---------- main ---------- */
.app-main { padding: 20px 16px 32px; }
.app-main h1 { margin: 0; font-size: var(--text-lg); line-height: 1.2; letter-spacing: -.4px; }
.app-main h2 { margin: 0; font-size: var(--text-md); letter-spacing: -.2px; }

/* Greeting + search */
.app-greet { margin: 4px 0 16px; }
.app-greet p { margin: 4px 0 0; color: var(--app-muted); font-size: var(--text-base); }
.app-search { position: relative; margin-bottom: 20px; }
.app-search input {
  width: 100%; padding: 12px 52px 12px 40px; border-radius: 14px;
  border: 1px solid var(--app-line); background: var(--app-soft);
  color: var(--app-ink); font-size: var(--text-base); outline: none;
}
.app-search input::placeholder { color: var(--app-faint); }
.app-search input:focus { border-color: var(--app-accent); background: #fff; }
.app-search .app-search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--app-faint); display: flex; }
.app-search .app-search-ico .pzz-ico { width: 16px; height: 16px; }
/* 44px hit area; the visible circle is the 28px ::after so the ink
 * stays small while the touch target meets the 44px floor. */
.app-search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--app-ink); display: grid; place-items: center; padding: 0;
}
.app-search-clear::after {
  content: ''; position: absolute; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0, 0, 0, .07);
}
.app-search-clear[hidden] { display: none; }
.app-search-clear .pzz-ico { width: 13px; height: 13px; position: relative; z-index: 1; }

/* ---------- buttons ----------
 * ONE primary recipe for the whole shell (teal fill, white text,
 * 12px radius). .pzz-earn-btn is the same recipe under its own
 * name — the wallet script needs the class, not a second design. */
.app-btn, .pzz-earn-btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  font-weight: 700; font-size: var(--text-base); padding: 12px 24px; border-radius: 12px;
  color: var(--app-accent-ink); background: var(--app-accent); white-space: nowrap;
}
.app-btn:hover, .pzz-earn-btn:hover { filter: brightness(1.04); }
.app-btn:active, .pzz-earn-btn:active { transform: translateY(1px); }
.app-btn-block { display: block; width: 100%; }
.app-btn-small { font-size: var(--text-xs); padding: 8px 16px; }
.app-btn-ghost, .pzz-earn-btn.ghost {
  background: var(--app-soft); color: var(--app-ink); border: 1px solid var(--app-line);
}
.app-btn-ghost:hover, .pzz-earn-btn.ghost:hover { background: #ececea; }
.pzz-earn-btn:disabled { opacity: .55; cursor: default; }

/* ---------- hero banner ----------
 * One large rounded banner for the featured game: our own key art
 * fills the banner, with the title and Play button overlaid on a
 * gradient at the bottom. The art is a real <img> (rendered by
 * home.js from the catalog) — never an empty or placeholder state.
 * Overlay text sits on the dark end of the gradient (verified in
 * the screenshot gate against the actual art). */
.app-featured { margin-bottom: 8px; }
.app-hero {
  position: relative; border-radius: 20px; overflow: hidden;
  box-shadow: var(--app-shadow); aspect-ratio: 16 / 9; background: var(--app-soft);
}
.app-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-hero-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start; padding: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 38%, rgba(15, 23, 42, .78) 100%);
}
.app-hero-eyebrow {
  color: #99f6e4; font-size: var(--text-eyebrow); font-weight: 700;
  letter-spacing: .4px;
}
.app-hero-overlay h2 { color: #fff; font-size: var(--text-md); margin: 4px 0; }
.app-hero-overlay p { color: rgba(255, 255, 255, .88); font-size: var(--text-xs); line-height: 1.5; margin: 0 0 12px; }
.app-hero-best { color: rgba(255, 255, 255, .88); font-size: var(--text-xs); font-weight: 600; margin: 0 0 12px; }
.app-hero-best b { color: #fff; }

/* ---------- filter pills ----------
 * Horizontally scrollable, scrollbar hidden. The bar bleeds to the
 * column edges (negative side margins) and keeps 16px of trailing
 * padding inside the scroll area, so the last pill always scrolls
 * fully into view instead of stopping half-clipped. On desktop the
 * 720px column fits all four pills in one row with no scrolling.
 * Active pill is filled teal with white text. */
.app-pills {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 16px -16px 0; padding: 4px 16px 8px; scroll-padding-right: 16px;
}
.app-pills::-webkit-scrollbar { display: none; }
.app-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 99px; border: 1px solid var(--app-line);
  background: #fff; color: var(--app-ink); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.app-pill:hover { border-color: var(--app-accent-line); }
.app-pill .pzz-ico { width: 15px; height: 15px; color: var(--app-muted); }
.app-pill.active { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.app-pill.active .pzz-ico { color: #fff; }

/* ---------- sections ---------- */
.app-section { margin-top: 32px; }
.app-section-title { margin: 0 0 12px; font-size: var(--text-md); letter-spacing: -.2px; }
.app-section-sub { margin: -8px 0 12px; color: var(--app-muted); font-size: var(--text-xs); }
/* Section heading row: bold title left, teal "View All" link right. */
.app-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.app-section-head .app-section-title { margin: 0; }
.app-viewall {
  color: var(--app-accent-text); font-size: var(--text-xs); font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.app-viewall:hover { text-decoration: underline; }

/* ---------- game grid (3 columns, square cards) ----------
 * Square key art on top, bold name in sentence case + small gray
 * genre label below. The whole card is a link to the game page;
 * the favorite star sits on the art as a sibling of the link, never
 * nested inside it. */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.app-grid-card {
  background: #fff; border: 1px solid var(--app-line);
  border-radius: var(--app-radius); overflow: hidden; box-shadow: var(--app-shadow);
}
.app-grid-thumb { position: relative; aspect-ratio: 1 / 1; background: var(--app-soft); }
.app-grid-thumb a { display: block; width: 100%; height: 100%; }
.app-grid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.app-grid-body { display: block; padding: 12px; text-decoration: none; color: var(--app-ink); }
.app-grid-body h3 {
  margin: 0 0 2px; font-size: var(--text-xs); font-weight: 700;
  line-height: 1.3; min-height: 34px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-grid-body p { margin: 0; color: var(--app-muted); font-size: var(--text-xs); }
/* 44px hit area; the visible circle is the 28px ::after so the ink
 * stays small while the touch target meets the 44px floor. */
.app-game-fav {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--app-muted); cursor: pointer;
  display: grid; place-items: center; padding: 0; z-index: 2;
}
.app-game-fav::after {
  content: ''; position: absolute; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.app-game-fav .pzz-ico { width: 15px; height: 15px; position: relative; z-index: 1; }
.app-game-fav.active { color: #fff; }
.app-game-fav.active::after { background: var(--app-accent); }

/* Continue playing card */
.app-continue {
  display: flex; gap: 12px; align-items: center; background: var(--app-accent-soft);
  border: 1px solid var(--app-accent-line); border-radius: var(--app-radius); padding: 12px;
}
.app-continue-thumb { flex: 0 0 88px; width: 88px; height: 66px; border-radius: 10px; overflow: hidden; background: #fff; }
.app-continue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.app-continue-body { flex: 1; min-width: 0; }
.app-continue-body h3 { margin: 0 0 2px; font-size: var(--text-base); }
.app-continue-body p { margin: 0; color: var(--app-muted-soft); font-size: var(--text-xs); }
.app-continue .app-btn { flex: none; }

/* Empty state */
.app-empty {
  display: none; text-align: center; padding: 32px 16px; color: var(--app-muted);
  background: var(--app-soft); border-radius: var(--app-radius); font-size: var(--text-base); line-height: 1.6;
}
.app-empty.show { display: block; }
.app-empty b { color: var(--app-ink); font-size: var(--text-base); display: block; margin-bottom: 4px; }
.app-empty .app-btn { margin-top: 16px; }

/* ---------- footer (index only) ----------
 * Our own links only: About, Terms, Privacy, Contact. No newsletter
 * (we have no mailing list), no social buttons, no copied text. */
.app-footer { margin-top: 32px; padding: 20px 4px 8px; border-top: 1px solid var(--app-line); text-align: center; }
.app-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 8px; }
.app-footer-links a { color: var(--app-muted); font-size: var(--text-xs); font-weight: 600; text-decoration: none; }
.app-footer-links a:hover { color: var(--app-accent-text); }
.app-footer p { margin: 0; color: var(--app-faint); font-size: var(--text-xs); }

/* ---------- bottom tab bar ---------- */
.app-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(480px, 100%); z-index: 50;
  display: flex; background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--app-line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
.app-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px 0; text-decoration: none; color: var(--app-faint);
  font-size: var(--text-eyebrow); font-weight: 600; border-radius: 10px;
}
.app-tab .pzz-ico { width: 22px; height: 22px; }
.app-tab.active { color: var(--app-accent-text); }

/* ---------- menu rows (Profile tab: settings / wallet / legal) ---------- */
.app-menu { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--app-line); border-radius: var(--app-radius); overflow: hidden; box-shadow: var(--app-shadow); }
.app-menu a, .app-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px;
  background: none; border: 0; border-top: 1px solid var(--app-line); cursor: pointer;
  text-decoration: none; color: var(--app-ink); font-size: var(--text-base); font-weight: 600; text-align: left;
}
.app-menu a:first-child, .app-menu button:first-child { border-top: 0; }
.app-menu a:hover, .app-menu button:hover { background: var(--app-soft); }
.app-menu .pzz-ico { width: 19px; height: 19px; color: var(--app-muted); }
.app-menu .app-menu-label { flex: 1; }
.app-menu .app-menu-sub { color: var(--app-faint); font-size: var(--text-xs); font-weight: 600; }
.app-menu .app-menu-chev { color: var(--app-faint); }
.app-menu .app-menu-chev .pzz-ico { width: 16px; height: 16px; color: var(--app-faint); }
.app-card {
  background: #fff; border: 1px solid var(--app-line); border-radius: var(--app-radius);
  padding: 16px; box-shadow: var(--app-shadow);
}
.app-card h2 { margin: 0 0 4px; }
.app-card p { margin: 0; color: var(--app-muted); font-size: var(--text-base); line-height: 1.6; }
.app-card p + p { margin-top: 8px; }
.app-note {
  background: var(--app-soft); border-radius: 12px; padding: 12px 16px;
  color: var(--app-muted-soft); font-size: var(--text-xs); line-height: 1.6;
}
.app-note b { color: var(--app-ink); }

/* ---------- legal / text pages ---------- */
.app-legal h1 { font-size: var(--text-lg); margin: 4px 0 8px; }
.app-legal h2 { font-size: var(--text-md); margin: 32px 0 8px; }
.app-legal p, .app-legal li { color: var(--app-muted); line-height: 1.7; font-size: var(--text-base); }
.app-legal p { margin: 0 0 12px; }
.app-legal ul { margin: 0 0 12px; padding-left: 20px; }
.app-legal .app-note { margin: 16px 0; }
.app-legal .app-note a { color: var(--app-accent-text); }
.app-back { display: inline-block; margin-bottom: 12px; text-decoration: none; font-weight: 600; font-size: var(--text-xs); }
.app-ledger { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: var(--text-xs); }
.app-ledger th { text-align: left; color: var(--app-faint); font-size: var(--text-xs); padding: 8px; border-bottom: 1px solid var(--app-line); }
.app-ledger td { padding: 8px; border-bottom: 1px solid var(--app-line); color: var(--app-muted); vertical-align: top; }
.app-ledger td b { color: var(--app-ink); }

/* ---------- earn / wallet page (keeps the .pzz-earn-* ids the wallet script needs) ---------- */
.pzz-earn-main h1 { font-size: var(--text-lg); margin: 4px 0 8px; }
.pzz-earn-main h2 { font-size: var(--text-md); margin: 32px 0 10px; }
.pzz-earn-main p { color: var(--app-muted); line-height: 1.6; margin: 0 0 16px; font-size: var(--text-base); }
.pzz-earn-bal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.pzz-earn-card { background: #fff; border: 1px solid var(--app-line); border-radius: var(--app-radius); padding: 16px; box-shadow: var(--app-shadow); }
.pzz-earn-card .lbl { font-size: var(--text-xs); font-weight: 600; color: var(--app-faint); }
.pzz-earn-card .val { font-size: var(--text-display); font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -.5px; }
.pzz-earn-card .sub { font-size: var(--text-xs); color: var(--app-muted); margin-top: 4px; line-height: 1.5; }
.pzz-earn-rate { font-size: var(--text-xs); color: var(--app-muted); }
.pzz-earn-rate b { color: var(--app-ink); }
.pzz-earn-bar { height: 8px; border-radius: 99px; background: var(--app-soft); overflow: hidden; margin-top: 8px; }
.pzz-earn-bar i { display: block; height: 100%; background: var(--app-accent); border-radius: 99px; }
.pzz-earn-task { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--app-line); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; box-shadow: var(--app-shadow); }
.pzz-earn-task .t { flex: 1; min-width: 0; }
.pzz-earn-task .t b { display: block; font-size: var(--text-base); }
.pzz-earn-task .t span { font-size: var(--text-xs); color: var(--app-muted); line-height: 1.5; }
.pzz-earn-task .r { font-size: var(--text-xs); font-weight: 700; color: var(--app-accent-text); white-space: nowrap; }
.pzz-earn-done { color: var(--app-green); font-weight: 700; font-size: var(--text-xs); white-space: nowrap; }
.pzz-earn-field { margin-bottom: 12px; }
.pzz-earn-field label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--app-ink); margin-bottom: 4px; }
.pzz-earn-field input, .pzz-earn-field select { width: 100%; box-sizing: border-box; padding: 12px; border-radius: 10px; border: 1px solid var(--app-line); background: var(--app-soft); color: var(--app-ink); font-size: var(--text-base); }
.pzz-earn-field input:focus, .pzz-earn-field select:focus { outline: 2px solid var(--app-accent); border-color: var(--app-accent); background: #fff; }
.pzz-earn-err { min-height: 20px; color: var(--app-red); font-size: var(--text-xs); font-weight: 600; margin: 4px 0; }
.pzz-earn-ok { min-height: 20px; color: var(--app-green); font-size: var(--text-xs); font-weight: 600; margin: 4px 0; }
.pzz-earn-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.pzz-earn-table th { text-align: left; color: var(--app-faint); font-size: var(--text-xs); padding: 8px; border-bottom: 1px solid var(--app-line); }
.pzz-earn-table td { padding: 8px; border-bottom: 1px solid var(--app-line); color: var(--app-muted); vertical-align: top; }
.pzz-earn-table td b { color: var(--app-ink); }
.pzz-earn-status { font-weight: 700; font-size: var(--text-xs); padding: 4px 8px; border-radius: 99px; white-space: nowrap; }
.pzz-earn-status.requested { background: var(--app-accent-soft); color: var(--app-accent-text); }
.pzz-earn-status.under_review { background: #ffead5; color: #92400e; }
.pzz-earn-status.paid { background: #dcfce7; color: var(--app-green); }
.pzz-earn-status.rejected { background: #fee2e2; color: var(--app-red); }
.pzz-earn-note { font-size: var(--text-xs); color: var(--app-muted-soft); line-height: 1.6; background: var(--app-soft); border-radius: 12px; padding: 12px 16px; }
.pzz-earn-note b { color: var(--app-ink); }
/* Small secondary line inside a table cell (fee breakdown, ledger
 * meta). Same passing faint tone as table headers. */
.pzz-earn-sub { color: var(--app-faint); }
.pzz-earn-phase { background: var(--app-accent-soft); border: 1px solid var(--app-accent-line); border-radius: 12px; padding: 12px 16px; font-size: var(--text-xs); color: var(--app-muted-soft); line-height: 1.6; margin: 16px 0; }
.pzz-earn-phase b { color: var(--app-ink); }
.pzz-earn-ref { display: flex; gap: 8px; }
.pzz-earn-ref input { flex: 1; min-width: 0; }

/* ---------- account page ---------- */
.pzz-account-main h1 { font-size: var(--text-lg); margin: 4px 0 8px; }
.pzz-account-main p { color: var(--app-muted); line-height: 1.6; margin: 0 0 16px; font-size: var(--text-base); }
.pzz-account-list { margin: 0 0 16px; padding-left: 20px; color: var(--app-muted); line-height: 1.7; font-size: var(--text-base); }
.pzz-account-box { background: #fff; border: 1px solid var(--app-line); border-radius: var(--app-radius); padding: 16px; box-shadow: var(--app-shadow); }
.pzz-account-box h2 { font-size: var(--text-md); margin: 0 0 6px; }
.pzz-account-box p { margin: 0; font-size: var(--text-base); }

@media (max-width: 520px) {
  .pzz-earn-bal { grid-template-columns: 1fr; }
  /* Top bar: logo + sign-in + wallet chip must fit 360–390px without
     scrolling. Measured 431px before this rule — shrink paddings and
     let the chip's text ellipse instead of overflowing. */
  .pzz-header-in { padding: 0 12px; gap: 8px; }
  .pzz-logo { font-size: var(--text-base); gap: 8px; }
  .pzz-logo-mark { width: 28px; height: 28px; border-radius: 8px; }
  .pzz-auth-btn { padding: 8px 12px; font-size: var(--text-xs); }
  /* On a phone the top bar has no room for the "Sign in" label — the
     person icon alone opens the same panel (aria-label is kept), which
     frees the space the wallet chip needs to show in full. Same for a
     signed-in username: the avatar alone is the account button. */
  .pzz-header-in .pzz-auth-btn span:not(.pzz-auth-avatar) { display: none; }
  .pzz-header-in .pzz-earn-chip {
    padding: 8px 12px;
    gap: 4px;
    font-size: var(--text-xs);
    max-width: 148px;
    overflow: hidden;
  }
  /* Phones: the wallet slot is the same fixed 148px as the chip, so
   * the balance loading never moves the avatar. */
  .pzz-header-wallet-slot { width: 148px; }
  .pzz-header-in .pzz-earn-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- auth modal (assets/auth.js) — light app theme ----------
 * auth.js ships markup only; every rule below lives here, in the
 * light shell's tokens. (The script used to inject its own dark
 * styles at runtime; that injection is deleted — if this sheet ever
 * fails to load, the modal has no styles at all instead of wrong
 * dark-on-light ones, and the page is already broken then anyway.)
 * Bottom sheet on phones, centred card on desktop; Escape closes
 * (handled in auth.js). */
.pzz-auth-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(25, 25, 25, .45); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow: auto; font-family: var(--font-body); }
.pzz-auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--app-line); border-radius: 18px; color: var(--app-ink); padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .18); }
.pzz-auth-card h2 { margin: 0 0 4px; font-size: var(--text-lg); color: var(--app-ink); }
.pzz-auth-card p { margin: 0 0 16px; color: var(--app-muted); font-size: var(--text-base); line-height: 1.6; }
.pzz-auth-close { float: right; background: var(--app-soft); border: 1px solid var(--app-line); color: var(--app-ink); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 700; font-size: var(--text-xs); }
.pzz-auth-tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.pzz-auth-tab { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--app-line); background: #fff; color: var(--app-ink); font-weight: 700; font-size: var(--text-base); cursor: pointer; }
.pzz-auth-tab.active { background: var(--app-accent); border-color: var(--app-accent); color: var(--app-accent-ink); }
.pzz-auth-field { margin-bottom: 12px; }
.pzz-auth-field label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--app-muted); margin-bottom: 4px; }
.pzz-auth-field input { width: 100%; box-sizing: border-box; padding: 12px; border-radius: 10px; border: 1px solid var(--app-line); background: var(--app-soft); color: var(--app-ink); font-size: var(--text-base); }
.pzz-auth-field input:focus { outline: 2px solid var(--app-accent); border-color: var(--app-accent); background: #fff; }
.pzz-auth-err { min-height: 20px; color: var(--app-red); font-size: var(--text-xs); font-weight: 600; margin: 4px 0 8px; }
.pzz-auth-ok { min-height: 20px; color: var(--app-green); font-size: var(--text-xs); font-weight: 600; margin: 4px 0 8px; }
.pzz-auth-submit { width: 100%; padding: 12px; border: 0; border-radius: 12px; background: var(--app-accent); color: var(--app-accent-ink); font-weight: 700; font-size: var(--text-base); cursor: pointer; }
.pzz-auth-submit:disabled { opacity: .6; cursor: wait; }
.pzz-auth-note { margin-top: 12px; font-size: var(--text-xs); color: var(--app-faint); line-height: 1.5; text-align: center; }
.pzz-auth-profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.pzz-auth-profile-head .pzz-auth-avatar { width: 56px; height: 56px; font-size: var(--text-lg); }
.pzz-auth-profile-name { font-size: var(--text-md); font-weight: 700; line-height: 1.2; }
.pzz-auth-profile-mail { font-size: var(--text-xs); color: var(--app-faint); }
.pzz-auth-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.pzz-auth-stat { background: var(--app-soft); border: 1px solid var(--app-line); border-radius: 12px; padding: 12px; text-align: center; }
.pzz-auth-stat b { display: block; font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.pzz-auth-stat span { font-size: var(--text-xs); color: var(--app-faint); font-weight: 600; }
.pzz-auth-row { display: flex; gap: 8px; margin-bottom: 8px; }
.pzz-auth-row .pzz-auth-submit { flex: 1; }
.pzz-auth-ghost { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--app-line); background: #fff; color: var(--app-ink); font-weight: 700; font-size: var(--text-base); cursor: pointer; }
.pzz-auth-danger { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #fca5a5; background: #fee2e2; color: #b91c1c; font-weight: 700; font-size: var(--text-base); cursor: pointer; }
.pzz-auth-merge { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.pzz-auth-merge button { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--app-line); background: #fff; color: var(--app-ink); font-weight: 600; font-size: var(--text-base); line-height: 1.4; cursor: pointer; }
.pzz-auth-merge button b { display: block; color: var(--app-accent-text); }
.pzz-auth-merge button:hover { border-color: var(--app-accent); }
@media (max-width: 480px) { .pzz-auth-card { padding: 16px; } .pzz-auth-stats { grid-template-columns: 1fr 1fr; } }

/* ---------- desktop column ----------
 * 720px on desktop (phones stay 480px): the pills fit in one row
 * and the page stops looking like a narrow strip with huge grey
 * gutters. This block MUST stay last in the sheet — the rules it
 * overrides are defined above it, and same-specificity later rules
 * win. */
@media (min-width: 721px) {
  .app { max-width: 720px; }
  .app-tabbar { width: min(720px, 100%); }
  .pzz-header-in, .app-nav { max-width: 720px; }
}
