/* ==========================================================================
   Tokman24: mobile-first stylesheet
   Ink navy + cool paper + marigold brass. Tasks are tear-off tickets.
   ========================================================================== */

:root {
  --ink: #16224a;
  --ink-2: #2d3c70;
  --ink-soft: #e7eaf5;
  --paper: #f3f5fa;
  --card: #ffffff;
  --line: #dce0ec;
  --line-strong: #c4cadc;
  --muted: #5d6685;
  --brass: #f0b323;
  --brass-deep: #8a6100;
  --brass-soft: #fff4d6;
  --teal: #0c7a5f;
  --teal-soft: #e0f3ec;
  --rose: #c22f4a;
  --rose-soft: #fde8ec;

  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --gutter: 16px;
  --tabbar-h: 64px;
  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --focus: 0 0 0 3px rgba(240, 179, 35, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--ink-2); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.3125rem; }
p { margin: 0 0 1em; }
small, .small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hidden { display: none !important; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 460px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }

/* ---------- icons ---------- */
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; }
.brand-coin {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brass);
  box-shadow: inset 0 0 0 3px var(--brass), inset 0 0 0 4.5px rgba(22, 34, 74, 0.5);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; color: var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--card); --fg: var(--ink); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  font: inherit; font-weight: 600; font-size: 0.975rem; line-height: 1.2;
  color: var(--fg); background: var(--bg); border: 1px solid var(--bd); border-radius: 10px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--fg); border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary { --bg: var(--ink); --fg: #fff; --bd: var(--ink); }
.btn-primary:hover { --bg: var(--ink-2); --bd: var(--ink-2); }
.btn-brass { --bg: var(--brass); --fg: var(--ink); --bd: #d99d0c; }
.btn-brass:hover { --bg: #f5be3d; --bd: #c58c00; }
.btn-success { --bg: var(--teal); --fg: #fff; --bd: var(--teal); }
.btn-success:hover { --bg: #0a6a52; --bd: #0a6a52; }
.btn-danger { --bg: var(--card); --fg: var(--rose); --bd: #efb3bf; }
.btn-danger:hover { --bg: var(--rose-soft); --bd: var(--rose); }
.btn-danger-solid { --bg: var(--rose); --fg: #fff; --bd: var(--rose); }
.btn-danger-solid:hover { --bg: #a92740; --bd: #a92740; }
.btn-ghost { --bg: transparent; --bd: transparent; }
.btn-ghost:hover { --bg: var(--ink-soft); --bd: transparent; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.875rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 44px; }
.btn-sm.btn-icon { width: 36px; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316224a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: #9aa1b9; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--rose); }
.field-error { color: var(--rose); font-size: 0.875rem; margin-top: 6px; }
.hint { color: var(--muted); font-size: 0.875rem; margin-top: 6px; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-prefix > .input { padding-left: 34px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; cursor: pointer; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 10px; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { color: var(--ink); }

/* ---------- alerts / flash ---------- */
.flash-stack { display: grid; gap: 8px; margin: 16px 0; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; font-size: 0.9375rem; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--teal-soft); border-color: #a7dccb; color: #064d3b; }
.alert-error { background: var(--rose-soft); border-color: #f2b8c3; color: #7d1a2d; }
.alert-info { background: var(--ink-soft); border-color: #c8cfe6; color: var(--ink); }
.alert-brass { background: var(--brass-soft); border-color: #f2d78c; color: #5c4100; }
.alert p:last-child { margin-bottom: 0; }

/* ---------- surfaces ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.125rem; }
.panel.panel-flush { padding: 0; overflow: hidden; }
.panel-flush > .panel-head { padding: 16px 18px 0; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

.page-head { padding: 22px 0 6px; }
.page-head h1 { font-size: 1.75rem; margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .row-between { align-items: flex-end; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9rem; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.crumb:hover { color: var(--ink); }

/* ---------- status badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--ink-soft); color: var(--ink-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending { background: var(--brass-soft); color: var(--brass-deep); }
.badge-approved, .badge-paid, .badge-active { background: var(--teal-soft); color: var(--teal); }
.badge-rejected, .badge-banned { background: var(--rose-soft); color: var(--rose); }
.badge-paused, .badge-closed { background: #eceef3; color: #5b6275; }
.badge-admin { background: var(--ink); color: #fff; }
.badge-plain::before { display: none; }

/* ---------- filter chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 38px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .count { font-size: 0.8rem; padding: 0 7px; border-radius: 999px; background: var(--ink-soft); color: var(--ink-2); }
.chip.is-active .count { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ==========================================================================
   Ticket: the signature element. Reward stub + perforation + body.
   ========================================================================== */
.tickets { display: grid; gap: 14px; }
.ticket {
  --stub: 96px;
  position: relative; display: grid; grid-template-columns: var(--stub) 1fr;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; color: inherit; text-decoration: none; min-height: 118px;
}
a.ticket:hover { border-color: var(--line-strong); color: inherit; }
a.ticket:hover .ticket-title { text-decoration: underline; text-decoration-thickness: 1.5px; }
.ticket::before, .ticket::after {
  content: ''; position: absolute; left: calc(var(--stub) - 10px); width: 20px; height: 20px;
  border-radius: 50%; background: var(--paper); border: 1px solid var(--line); z-index: 2;
}
.ticket::before { top: -11px; }
.ticket::after { bottom: -11px; }
.ticket-stub {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 14px 6px; background: var(--brass); color: var(--ink); text-align: center;
  background-image: radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.35), transparent 60%);
}
.ticket-stub::after {
  content: ''; position: absolute; top: 12px; bottom: 12px; right: -1px; width: 0;
  border-right: 2px dashed rgba(22, 34, 74, 0.35);
}
.ticket-amount { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; word-break: break-all; }
.ticket-amount.is-long { font-size: 1.05rem; }
.ticket-unit { font-size: 0.75rem; font-weight: 600; opacity: 0.75; }
.ticket-body { padding: 14px 16px 14px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ticket-title { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.ticket-summary { font-size: 0.9rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; font-size: 0.8125rem; color: var(--muted); }
.ticket.is-muted .ticket-stub { background: #e3e6ef; background-image: none; }
.ticket.is-done .ticket-stub { background: var(--teal-soft); color: var(--teal); background-image: none; }

.slots { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.meter { width: 64px; height: 6px; border-radius: 999px; background: var(--ink-soft); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--ink-2); border-radius: inherit; }
.meter.is-low > i { background: var(--rose); }

/* Big ticket on the task page */
.ticket-hero { --stub: 0px; display: block; min-height: 0; }
.ticket-hero::before, .ticket-hero::after { display: none; }
.ticket-hero .ticket-stub { flex-direction: row; justify-content: space-between; padding: 16px 18px; gap: 12px; }
.ticket-hero .ticket-stub::after { top: auto; bottom: -1px; left: 14px; right: 14px; width: auto; height: 0; border-right: 0; border-bottom: 2px dashed rgba(22, 34, 74, 0.35); }
.ticket-hero .ticket-amount { display: block; font-size: 2rem; }
.ticket-hero .ticket-unit { display: block; margin-top: 4px; text-align: left; }
.ticket-hero .ticket-stub > div:first-child { text-align: left; }
.ticket-hero-notch { position: relative; }
.ticket-hero-notch::before, .ticket-hero-notch::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); z-index: 2; }
.ticket-hero-notch::before { left: -11px; }
.ticket-hero-notch::after { right: -11px; }
.ticket-hero .ticket-body { padding: 20px 18px; }

/* ==========================================================================
   Public header / landing
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(243, 245, 250, 0.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.top-nav { display: none; }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.balance-chip .brand-coin { width: 24px; height: 24px; font-size: 0.7rem; }
.balance-chip:hover { border-color: var(--line-strong); color: var(--ink); }

.hero { padding: 36px 0 28px; }
.hero-grid { display: grid; gap: 32px; }
.hero h1 { font-size: 2.25rem; line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; max-width: 14ch; margin-bottom: 16px; }
.hero-lead { font-size: 1.125rem; color: var(--muted); max-width: 42ch; margin-bottom: 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 24px; font-size: 0.9375rem; color: var(--muted); }
.hero-facts strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.ticket-deck { position: relative; display: grid; gap: 14px; }
.ticket-deck .ticket { box-shadow: 0 1px 0 rgba(22, 34, 74, 0.04), 0 12px 28px -18px rgba(22, 34, 74, 0.35); }
@media (prefers-reduced-motion: no-preference) {
  .ticket-deck .ticket { animation: deal 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .ticket-deck .ticket:nth-child(2) { animation-delay: 0.08s; }
  .ticket-deck .ticket:nth-child(3) { animation-delay: 0.16s; }
}
@keyframes deal {
  from { opacity: 0; transform: translateY(18px) rotate(-1.5deg); }
  to { opacity: 1; transform: none; }
}

.section { padding: 40px 0; }
.section-title { font-size: 1.5rem; margin-bottom: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.steps li::before { content: counter(step); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.125rem; background: var(--brass-soft); color: var(--brass-deep); border: 1.5px dashed #e3b84c; }
.steps h3 { font-size: 1.0625rem; margin: 2px 0 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.site-footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.has-tabbar .site-footer { padding-bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }

/* ---------- auth pages ---------- */
.auth { padding: 28px 0 48px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 18px; }
.auth h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth .sub { color: var(--muted); margin-bottom: 22px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); }

/* ==========================================================================
   User app shell: bottom tab bar on phones, top nav on desktop
   ========================================================================== */
.app-main { padding-bottom: 32px; min-height: calc(100vh - 160px); }
.has-tabbar .app-main { padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 0.7rem; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--ink); }
.tabbar a.is-active .icon { stroke-width: 2.2; }
.tabbar a.is-active span { position: relative; }
.tabbar a.is-active span::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brass); }

/* ---------- dashboard ---------- */
.wallet-card {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 20px;
}
.wallet-card::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  border: 18px solid rgba(240, 179, 35, 0.9); box-shadow: inset 0 0 0 6px var(--ink), inset 0 0 0 8px rgba(240, 179, 35, 0.5);
}
.wallet-card .label { color: #c5cbe3; font-weight: 500; margin: 0; }
.wallet-amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin: 4px 0 16px; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.wallet-card .row { position: relative; z-index: 1; }
.wallet-card .btn-ghost { --fg: #fff; }
.wallet-card .btn-ghost:hover { --bg: rgba(255, 255, 255, 0.12); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-label { font-size: 0.875rem; color: var(--muted); }
.stat a { color: inherit; text-decoration: none; }
.stat.is-alert { border-color: #f2d78c; background: var(--brass-soft); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-main { min-width: 0; flex: 1; }
.list-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: inherit; text-decoration: none; }
a.list-title:hover { text-decoration: underline; }
.list-meta { font-size: 0.8125rem; color: var(--muted); }
.list-end { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .icon-lg { color: var(--line-strong); margin-bottom: 8px; }
.empty h3 { color: var(--ink); font-size: 1.0625rem; margin-bottom: 4px; }
.empty p { max-width: 36ch; margin: 0 auto 14px; }

/* ---------- submission cards (user) ---------- */
.sub-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.sub-card + .sub-card { margin-top: 12px; }
.sub-card h3 { font-size: 1.0625rem; margin: 0; }
.sub-note { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--paper); font-size: 0.9rem; }
.sub-note.is-reject { background: var(--rose-soft); color: #7d1a2d; }
.file-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink); text-decoration: none; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ---------- rich text (task descriptions) ---------- */
.prose { font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; max-width: 72ch; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 0.9em; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.2em 0 0.45em; }
.prose h1 { font-size: 1.75rem; }
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.25em; }
.prose a { color: #1d4ed8; font-weight: 600; }
.prose blockquote { border-left: 4px solid var(--brass); padding: 4px 0 4px 14px; color: var(--ink-2); background: var(--brass-soft); border-radius: 0 8px 8px 0; }
.prose mark { background: #fde68a; padding: 0 2px; border-radius: 3px; }
.prose hr { border: 0; border-top: 2px dashed var(--line-strong); margin: 1.4em 0; }
.prose pre, .prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--paper); border-radius: 6px; }
.prose code { padding: 1px 5px; }
.prose pre { padding: 12px; overflow-x: auto; }
.prose img { border-radius: 10px; }

/* ==========================================================================
   Uploader
   ========================================================================== */
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 26px 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--paper); text-align: center; cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
.drop:hover, .drop.is-over { border-color: var(--ink-2); background: var(--ink-soft); }
.field > label.drop { display: flex; font-weight: 400; font-size: 1rem; margin-bottom: 0; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop strong { font-size: 1.0625rem; }
.drop .icon-lg { color: var(--ink-2); }
.drop-hint { font-size: 0.8125rem; color: var(--muted); max-width: 46ch; }

.uploads { display: grid; gap: 10px; margin-top: 12px; }
.up-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.up-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ink-soft); color: var(--ink-2); overflow: hidden; }
.up-icon img { width: 100%; height: 100%; object-fit: cover; }
.up-name { font-weight: 600; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-meta { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; gap: 10px; flex-wrap: wrap; }
.up-bar { height: 6px; background: var(--ink-soft); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.up-bar > i { display: block; height: 100%; width: 0; background: var(--ink-2); border-radius: inherit; transition: width 0.2s linear; }
.up-row.is-done .up-bar > i { background: var(--teal); }
.up-row.is-error { border-color: #f2b8c3; background: #fffafb; }
.up-row.is-error .up-bar > i { background: var(--rose); }
.up-row.is-done .up-icon { background: var(--teal-soft); color: var(--teal); }
.up-err { color: var(--rose); font-size: 0.8125rem; }

/* ==========================================================================
   Tables that collapse into cards on phones
   ========================================================================== */
.table-wrap { width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font-weight: 600; font-size: 0.8125rem; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table .t-right { text-align: right; }
.table .t-title { font-weight: 600; color: inherit; text-decoration: none; }
.table a.t-title:hover { text-decoration: underline; }
.table .t-sub { display: block; font-size: 0.8125rem; color: var(--muted); font-weight: 400; }
.table .t-check { width: 40px; }
.table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }

@media (max-width: 767.98px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 16px; border-top: 1px solid var(--line); position: relative; }
  .table-cards tr:first-child { border-top: 0; }
  .table-cards td { padding: 3px 0; border: 0; text-align: left !important; }
  .table-cards td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 96px; color: var(--muted); font-size: 0.8125rem; }
  .table-cards td.t-main { padding-bottom: 6px; }
  .table-cards td.t-check { position: absolute; right: 12px; top: 12px; width: auto; }
  .table-cards td.t-actions { padding-top: 8px; }
}

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 20px 0 4px; flex-wrap: wrap; }
.pagination span { color: var(--muted); font-size: 0.9rem; padding: 0 8px; }

.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: 0.9375rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }

.copy { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; margin: -2px -4px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 6px; text-align: left; }
.copy:hover { background: var(--ink-soft); }
.copy .icon { width: 14px; height: 14px; color: var(--muted); }
.copy.is-copied .icon { color: var(--teal); }

/* ==========================================================================
   Admin shell
   ========================================================================== */
.admin-shell { min-height: 100vh; }
.admin-top { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; }
.admin-top-bar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 var(--gutter); gap: 12px; }
.admin-top .brand { color: #fff; font-size: 1.05rem; }
.admin-top .brand small { font-weight: 500; color: #aab3d3; font-size: 0.8rem; letter-spacing: 0; }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 var(--gutter) 10px; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: #c9cfe6; text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.admin-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.admin-nav a.is-active { color: var(--ink); background: var(--brass); }
.admin-nav .nav-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 0.75rem; line-height: 20px; text-align: center; }
.admin-nav a.is-active .nav-count { background: var(--ink); }
.admin-nav-foot { display: none; }
.admin-main { padding: 0 0 48px; }
.admin-main .container { max-width: 1240px; }
.admin-top .btn-ghost { --fg: #fff; }
.admin-top .btn-ghost:hover { --bg: rgba(255, 255, 255, 0.1); }

.review-actions { display: grid; gap: 12px; }
/* Phones: approve/reject bar is pinned to the bottom of the screen while reviewing. */
.review-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); backdrop-filter: blur(6px); box-shadow: 0 -8px 24px -16px rgba(22, 34, 74, 0.4); }
.admin-main:has(.review-sticky) { padding-bottom: 110px; }
.media-grid { display: grid; gap: 14px; }
.media-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.media-view { background: #0e1530; display: grid; place-items: center; min-height: 120px; }
.media-view img { display: block; max-height: 70vh; width: auto; max-width: 100%; object-fit: contain; cursor: zoom-in; }
.media-view video { display: block; width: 100%; max-height: 70vh; background: #000; }
.media-view audio { width: calc(100% - 24px); margin: 24px 12px; }
.media-view iframe { width: 100%; height: 70vh; border: 0; background: #fff; }
.media-view.is-file { background: var(--paper); padding: 28px 16px; color: var(--muted); text-align: center; }
.media-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.media-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

.bulk-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.bulk-bar .input { min-height: 36px; padding: 6px 10px; font-size: 0.875rem; flex: 1 1 160px; width: auto; }

details.disclose { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
details.disclose > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; margin-top: -4px; }
details.disclose[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.disclose > .disclose-body { padding: 0 16px 16px; }
details.disclose + details.disclose { margin-top: 10px; }

.danger-zone { border-color: #f2b8c3; }

/* ---------- rich text editor ---------- */
.editor { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); overflow: visible; }
.editor:focus-within { border-color: var(--ink-2); box-shadow: var(--focus); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: 56px; z-index: 5; }
.editor-toolbar .sep { width: 1px; background: var(--line-strong); margin: 6px 4px; }
.tb-btn { position: relative; display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.tb-btn:hover { background: var(--ink-soft); }
.tb-btn.is-on { background: var(--ink); color: #fff; }
.tb-btn .icon { width: 18px; height: 18px; }
.tb-select { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; font-size: 0.875rem; padding: 0 8px; color: var(--ink); }
.tb-pop { position: absolute; top: 40px; left: 0; z-index: 20; display: none; grid-template-columns: repeat(5, 28px); gap: 6px; padding: 10px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 12px 28px -12px rgba(22, 34, 74, 0.35); }
.tb-pop.is-open { display: grid; }
.tb-swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); cursor: pointer; padding: 0; }
.tb-swatch.is-none { background: linear-gradient(135deg, #fff 45%, var(--rose) 45%, var(--rose) 55%, #fff 55%); }
.editor-area { min-height: 260px; max-height: 70vh; overflow-y: auto; padding: 16px; outline: none; }
.editor-area:empty::before { content: attr(data-placeholder); color: #9aa1b9; }
.editor-input { display: block; width: 100%; min-height: 260px; border: 0; padding: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.875rem; line-height: 1.6; resize: vertical; border-radius: 0 0 var(--radius) var(--radius); color: var(--ink); background: var(--card); }
.editor-input:focus { outline: none; }
.editor:not(.is-ready) .editor-toolbar, .editor:not(.is-ready) .editor-area { display: none; }
.editor.is-ready .editor-input { display: none; }
.editor.is-ready.is-source .editor-input { display: block; }
.editor.is-source .editor-area { display: none; }
.tb-group { position: relative; display: inline-flex; }
.tb-btn:disabled, .tb-select:disabled { opacity: 0.35; cursor: default; }

/* ---------- misc ---------- */
.banned-page { padding: 64px 0; text-align: center; }
.banned-page .icon-lg { width: 48px; height: 48px; color: var(--rose); margin-bottom: 12px; }
.error-page { padding: 64px 0; text-align: center; }
.error-page h1 { font-size: 2rem; }
.announcement { margin-top: 16px; }
.inline-form { display: inline; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.cols > *, .grid-2 > *, .hero-grid > *, .tickets > * { min-width: 0; }
html, body { overflow-x: clip; }

/* ---------- page-specific bits ---------- */
.section-tight { padding-top: 0; }
.section-head { margin-bottom: 14px; }
.section-head .section-title, .section-head h2 { margin: 0; }
.h-section { font-size: 1.25rem; margin: 0; }
.form-alert { margin-bottom: 16px; }
.side-alert { margin-top: 14px; }
.banned-reason { text-align: left; margin: 16px 0; }
.banned-logout { margin-top: 20px; }
.filter-bar { margin: 4px 0 14px; }
.filter-form { margin-bottom: 14px; }
.filter-form .select { width: auto; min-width: 0; max-width: 100%; }
.search-box { position: relative; min-width: 200px; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 42px; }
.row-end { justify-content: flex-end; }
.panel-actions { margin-top: 14px; }
.list-padded > li { padding-left: 18px; padding-right: 18px; }
.list-note { display: block; color: var(--ink-2); }
.amount-in { color: var(--teal); }
.amount-out { color: var(--ink); }
.list-summary { margin: 0 0 10px; }
.account-kv { margin: 4px 0 8px; }

.hero-slots { font-size: 0.9375rem; text-align: right; }
.task-title { font-size: 1.625rem; margin-bottom: 8px; }
.task-proof { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); background: var(--ink-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }
.sub-meta { gap: 6px 14px; margin-top: 4px; }
.sub-retry { margin-top: 6px; }
.sub-retry a { color: inherit; font-weight: 700; }
.wallet-sub { gap: 6px 18px; color: #c5cbe3; font-size: 0.9375rem; }
.wallet-sub strong { color: #fff; }

.up-info { min-width: 0; }
.up-actions { display: flex; align-items: center; gap: 4px; }

.admin-stats { margin-bottom: 16px; }
.admin-stats .stat { text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--line-strong); }
.dash-lists { margin-top: 0; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; background: var(--paper); border-radius: var(--radius-sm); padding: 12px 14px; }
.reason-chips { flex-wrap: wrap; overflow: visible; margin-top: 10px; }
.reason-chips .chip { min-height: 32px; padding: 5px 12px; font-size: 0.8125rem; font-weight: 500; cursor: pointer; font-family: inherit; }
.review-buttons { flex-wrap: nowrap; }
.review-buttons .btn-success { white-space: normal; }
.reject-form { margin-bottom: 4px; }
.proof-cell { gap: 6px; flex-wrap: nowrap; }
.bulk-all { margin: 0 8px 0 0; }

.wd-list { display: grid; gap: 12px; }
.wd-card .wd-amount { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.wd-kv { margin: 14px 0 0; }
.wd-actions { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.wd-actions .input { min-height: 44px; flex: 1 1 200px; width: auto; }
.wd-reject > summary { list-style: none; width: max-content; }
.wd-reject > summary::-webkit-details-marker { display: none; }
.wd-reject[open] > summary { margin-bottom: 10px; }

.ban-banner { margin: 6px 0 16px; }
.ban-banner .row-between { margin-bottom: 12px; }
.linked-hint { margin: -6px 0 8px; }
.ban-value { overflow-wrap: anywhere; }
.settings-intro { margin: -4px 0 16px; }
.speed-summary { margin-bottom: 10px; }
.delete-task { margin-top: 16px; }

/* ---------- task budgets ---------- */
.budget-intro { margin: -6px 0 14px; }
.budget-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.budget-grid .input-prefix > .input { padding-left: 30px; }
.budget-grid .input-prefix > span { left: 12px; }
.budget-summary { margin: 0 0 8px; font-size: 0.9rem; color: var(--ink-2); font-weight: 600; }
.budget-summary:empty { display: none; }
.budget-usage { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.budget-usage h4 { font-size: 0.9375rem; margin: 0 0 10px; }
.budget-line + .budget-line { margin-top: 12px; }
.budget-line .row-between { font-size: 0.9rem; }
.budget-line .hint { margin-top: 4px; }
.meter-wide { width: 100%; height: 8px; margin-top: 6px; }
.budget-mini { display: grid; gap: 4px; font-size: 0.8125rem; }
@media (min-width: 768px) {
  .table .slots { white-space: nowrap; }
  .table td.t-actions .row { flex-wrap: nowrap; }
}

/* ---------- WhatsApp channel ---------- */
:root { --wa: #25d366; --wa-deep: #075e54; --wa-ink: #05301f; --wa-chat: #efeae2; --wa-soft: #e3f8ec; }
.btn-wa { --bg: var(--wa); --fg: var(--wa-ink); --bd: #1fbf5b; font-weight: 700; }
.btn-wa:hover { --bg: #3ddc78; --bd: #19a94f; color: var(--wa-ink); }
.btn-wa .icon { width: 22px; height: 22px; }
.btn-lg { min-height: 52px; padding: 12px 22px; font-size: 1.0625rem; border-radius: 12px; }

.wa-pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 9px; border-radius: 999px; background: var(--wa-soft); color: #0a7a3d; text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.wa-pill:hover { background: #cdf2dc; color: #075e2f; }
.wa-pill span { display: none; }

.footer-links { display: inline-flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; }
.footer-links a { display: inline-flex; gap: 6px; align-items: center; color: inherit; }

.wa-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-lg); background: var(--wa-soft); border: 1px solid #bfeccf; color: var(--wa-ink); text-decoration: none; }
.wa-card:hover { border-color: #8edcab; color: var(--wa-ink); }
.wa-card-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--wa); color: #fff; display: grid; place-items: center; flex: none; }
.wa-card-icon .icon { width: 24px; height: 24px; }
.wa-card-text { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
.wa-card-text span { font-size: 0.875rem; color: #2e5a45; }

/* WhatsApp-style channel preview */
.wa-chat { border-radius: 16px; overflow: hidden; border: 1px solid rgba(7, 94, 84, 0.18); background: var(--wa-chat); }
.wa-chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--wa-deep); color: #fff; }
.wa-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brass); color: var(--ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.wa-chat-name { display: grid; line-height: 1.2; flex: 1; min-width: 0; }
.wa-chat-name span { font-size: 0.75rem; opacity: 0.8; }
.wa-chat-logo { width: 22px; height: 22px; opacity: 0.9; }
.wa-chat-body { display: grid; gap: 8px; padding: 14px 12px 16px 18px; background-color: var(--wa-chat); background-image: radial-gradient(rgba(7, 94, 84, 0.08) 1px, transparent 1px); background-size: 14px 14px; }
.wa-bubble { position: relative; justify-self: start; display: grid; gap: 2px; max-width: 94%; padding: 8px 10px 20px; border-radius: 0 10px 10px 10px; background: #fff; color: #111b21; font-size: 0.875rem; line-height: 1.4; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); overflow-wrap: anywhere; }
.wa-bubble::before { content: ''; position: absolute; left: -7px; top: 0; border-top: 9px solid #fff; border-left: 8px solid transparent; }
.wa-bubble strong { font-weight: 700; }
.wa-bubble time { position: absolute; right: 9px; bottom: 4px; font-size: 0.6875rem; color: #667781; }

/* Join popup: bottom sheet on phones, centered card on larger screens */
.wa-sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; padding: 0; border: 0; border-radius: 22px 22px 0 0; overflow-y: auto; background: var(--card); color: var(--ink); box-shadow: 0 -20px 60px -20px rgba(14, 21, 48, 0.5); }
.wa-sheet::backdrop { background: rgba(14, 21, 48, 0.55); backdrop-filter: blur(2px); }
.wa-sheet-inner { position: relative; display: grid; gap: 18px; padding: 48px 16px calc(14px + env(safe-area-inset-bottom)); }
.wa-sheet-inner::before { content: ''; position: absolute; top: 10px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-strong); }
.wa-sheet-copy h2 { font-size: 1.5rem; margin: 0 0 6px; }
.wa-sheet-copy h2:focus { outline: none; box-shadow: none; }
.wa-sheet-copy p { margin: 0 0 18px; color: var(--muted); }
.wa-sheet-copy .btn-ghost { margin-top: 6px; color: var(--muted); }
.wa-close { position: absolute; top: 8px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
.wa-close:hover { background: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .wa-sheet[open] { animation: sheet-up 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .wa-sheet[open]::backdrop { animation: fade-in 0.3s ease; }
}
@keyframes sheet-up { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }

/* Channel page */
.wa-page { display: grid; gap: 28px; padding: 24px 0 8px; }
.wa-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 16px; background: var(--wa); color: #fff; }
.wa-mark .icon { width: 32px; height: 32px; }
.wa-page h1 { max-width: 16ch; font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; }
.wa-lead { max-width: 46ch; font-size: 1.125rem; color: var(--muted); }
.wa-join { width: 100%; }
.wa-qr-card { display: none; }
.wa-perks { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.wa-perks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.wa-perks .icon { margin-top: 2px; color: #0a7a3d; }
.wa-perks strong { display: block; }
.wa-perks span { font-size: 0.9375rem; color: var(--muted); }
.wa-empty .icon-lg { color: var(--wa); }
.wa-stats { margin-bottom: 12px; }
.wa-admin-title { gap: 10px; }
.wa-admin-title .wa-card-icon { width: 30px; height: 30px; border-radius: 9px; }
.wa-admin-title .wa-card-icon .icon { width: 18px; height: 18px; }

@media (min-width: 640px) {
  .wa-pill { padding: 0 14px 0 10px; }
  .wa-pill span { display: inline; }
  .wa-sheet { max-width: 420px; margin: auto; border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(14, 21, 48, 0.55); }
  .wa-sheet-inner { padding: 52px 24px 22px; }
  .wa-sheet-inner::before { display: none; }
  .wa-join { width: auto; }
  .wa-qr-card { display: flex; gap: 16px; align-items: center; max-width: 440px; margin-top: 26px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
  .wa-qr { flex: none; width: 112px; height: 112px; }
  .wa-qr svg { display: block; width: 100%; height: 100%; }
  .wa-qr-card p { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }
}
@media (min-width: 900px) {
  .wa-page { grid-template-columns: 1.1fr 0.9fr; align-items: start; gap: 56px; padding-top: 48px; }
  .wa-page h1 { font-size: 3rem; }
  .wa-page-chat { position: sticky; top: 90px; }
}

/* Phones: on the wallet page, show the withdraw form right after the balance. */
@media (max-width: 899.98px) {
  .wallet-layout > .stack { display: contents; }
  .wallet-layout > .stack > * { margin-top: 0; order: 2; }
  .wallet-layout > .stack > .wallet-card { order: 0; }
  .wallet-layout > aside { order: 1; }
}

/* ==========================================================================
   Tablet and up
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .tickets.is-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 32px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .media-grid .media-card.is-wide { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .ticket { --stub: 110px; }
  .ticket-amount { font-size: 1.5rem; }
}

@media (min-width: 900px) {
  h1 { font-size: 2.5rem; }
  .hero { padding: 64px 0 48px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 56px; }
  .hero h1 { font-size: 3.75rem; }
  .hero-lead { font-size: 1.3125rem; }
  .ticket-deck .ticket:nth-child(1) { transform: rotate(-1.2deg); }
  .ticket-deck .ticket:nth-child(2) { transform: translateX(18px) rotate(0.8deg); }
  .ticket-deck .ticket:nth-child(3) { transform: translateX(-6px) rotate(-0.4deg); }
  @media (prefers-reduced-motion: no-preference) {
    .ticket-deck .ticket:nth-child(1) { animation-name: deal1; }
    .ticket-deck .ticket:nth-child(2) { animation-name: deal2; }
    .ticket-deck .ticket:nth-child(3) { animation-name: deal3; }
  }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { grid-template-columns: 1fr; }
  .section-title { font-size: 2rem; }
  .page-head { padding: 32px 0 10px; }
  .page-head h1 { font-size: 2.25rem; }

  /* user app: top nav replaces the tab bar */
  .top-nav { display: flex; gap: 4px; }
  .top-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
  .top-nav a:hover { color: var(--ink); background: var(--ink-soft); }
  .top-nav a.is-active { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
  .tabbar { display: none; }
  .has-tabbar .app-main { padding-bottom: 48px; }
  .has-tabbar .site-footer { padding-bottom: 28px; }
  .cols { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; }
  .cols-even { grid-template-columns: 1fr 1fr; }
  .sticky-side { position: sticky; top: 80px; }
  .tickets.is-grid { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 22px; }

  /* admin: sidebar */
  .admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); background: linear-gradient(90deg, var(--ink) 240px, var(--paper) 240px); }
  .admin-top { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
  .admin-top-bar { height: 68px; }
  .admin-top-bar .admin-top-actions { display: none; }
  .admin-nav { flex-direction: column; padding: 8px 12px; overflow: visible; flex: 1; }
  .admin-nav a { padding: 10px 12px; }
  .admin-nav .nav-count { margin-left: auto; }
  .admin-nav-foot { display: grid; gap: 4px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .admin-nav-foot a, .admin-nav-foot button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; color: #c9cfe6; text-decoration: none; font: inherit; font-weight: 600; font-size: 0.9rem; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
  .admin-nav-foot a:hover, .admin-nav-foot button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
  .review-sticky { position: static; margin: 0; padding: 0; background: none; border: 0; backdrop-filter: none; box-shadow: none; }
  .admin-main:has(.review-sticky) { padding-bottom: 48px; }
  .editor-toolbar { top: 0; }
}

@media (min-width: 1200px) {
  .tickets.is-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@keyframes deal1 { from { opacity: 0; transform: translateY(18px) rotate(-3deg); } to { opacity: 1; transform: rotate(-1.2deg); } }
@keyframes deal2 { from { opacity: 0; transform: translate(18px, 18px) rotate(2deg); } to { opacity: 1; transform: translateX(18px) rotate(0.8deg); } }
@keyframes deal3 { from { opacity: 0; transform: translate(-6px, 18px) rotate(-2deg); } to { opacity: 1; transform: translateX(-6px) rotate(-0.4deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
