:root {
  --ink: #1c1914;
  --muted: #6f675e;
  --line: #e6dccf;
  --paper: #f4efe7;
  --card: #fffcf8;
  --teal: #14685a;
  --teal-dark: #0e4d43;
  --gold: #9a7340;
  --danger: #9d342c;
  --ok: #2b6b4d;
  --warn: #8a5a12;
  --shadow: 0 12px 32px rgba(48, 34, 16, 0.06);
  --sans: "Avenir Next", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --serif: "Iowan Old Style", Palatino, "Songti TC", serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(820px 320px at 100% -8%, #efe3d1 0%, transparent 55%),
    var(--paper);
  min-height: 100vh;
}
a { color: var(--teal-dark); }
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 4vw;
  border-bottom: 1px solid var(--line);
  background: var(--head-bg, #fffcf8);
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 180px; }
.brand strong { display: block; font-family: var(--serif); letter-spacing: 0.03em; }
.brand small { color: var(--muted); font-size: 12px; }
.mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--ink); color: #f6ead8; border-radius: 12px; font-family: var(--serif);
}
nav { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
nav a {
  text-decoration: none; color: var(--muted); font-size: 14px;
  padding: 7px 11px; border-radius: 999px;
}
nav a.on, nav a:hover { background: #efe6da; color: var(--ink); }
.points-pill {
  display: flex; flex-direction: column; align-items: flex-end;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 7px 12px; min-width: 92px;
}
.points-pill span, .points-pill b { color: var(--ink); background: transparent; border: 0; }
.points-pill span { font-size: 11px; opacity: 1; }
.points-pill b { font-size: 16px; }
.corner-logo, .mark.logo {
  width: auto !important; height: auto !important;
  max-width: none; max-height: none;
  object-fit: none; object-position: left center;
  padding: 0; background: transparent; border: 0; border-radius: 0;
}
.wrap { width: min(1120px, calc(100% - 28px)); margin: 26px auto 64px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 16px 28px; }
.pagehead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
h1 { font-family: var(--serif); font-weight: 650; letter-spacing: 0.01em; margin: 0 0 6px; font-size: 34px; }
h2 { margin: 0 0 12px; font-size: 20px; font-family: var(--serif); }
.lede { color: var(--muted); margin: 0; line-height: 1.65; max-width: 62ch; }
.grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px; }
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: #c9bba8; }
.stat b { display: block; font-size: 30px; margin-top: 4px; font-family: var(--serif); }
.stat span, .kicker { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; }
label { display: block; font-size: 13px; margin: 12px 0 6px; color: var(--ink); font-weight: 600; }
.hint { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d9cec2;
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #d7ebe4; border-color: var(--teal); }
textarea { min-height: 110px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; background: var(--teal); color: white;
  text-decoration: none; border-radius: 999px; padding: 10px 16px; font: inherit; margin-top: 14px;
}
button.secondary, .btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: var(--danger); }
button.warn { background: var(--warn); }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.flash.ok { background: #e7f5ee; color: var(--ok); }
.flash.error { background: #fdeceb; color: var(--danger); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.tabs a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.tabs a.on { background: var(--ink); color: #f6ead8; border-color: var(--ink); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 650; font-size: 12px; letter-spacing: 0.05em; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #f0e7da; }
.badge.pending { background: #fff1d6; color: var(--warn); }
.badge.approved, .badge.shipped, .badge.active { background: #e7f5ee; color: var(--ok); }
.badge.rejected, .badge.disabled { background: #fdeceb; color: var(--danger); }
.shot { width: 128px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f6efe6; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gift { display: flex; flex-direction: column; gap: 6px; }
.gift img, .gift .ph { width: 100%; height: 148px; object-fit: cover; border-radius: 12px; background: linear-gradient(160deg, #f7efe4, #e7efe9); }
.gift .ph { display: grid; place-items: center; color: var(--gold); font-family: var(--serif); font-size: 28px; }
.cost { font-family: var(--serif); font-size: 22px; }
.muted { color: var(--muted); }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form, .inline form { margin: 0; }
.actions button, .inline button { margin-top: 0; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.search { display: flex; gap: 8px; margin: 0 0 14px; }
.search input { max-width: 320px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; }
.check input { width: auto; }
.steps { display: flex; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.qr { width: 220px; height: 220px; background: white; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
strong { font-weight: 700; }
html { -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom); }
input, select, textarea { font-size: 16px; }
button, .btn { min-height: 44px; }
.dock { display: none; }
@media (max-width: 860px) {
  .grid, .cards, .split, .row, .pagehead { grid-template-columns: 1fr; }
  .pagehead { display: block; }
  .pagehead .btn, .panel .btn, .gift button, form > button { width: 100%; margin-left: 0; }
  .topbar { padding: 10px 12px; align-items: center; flex-wrap: nowrap; gap: 10px; }
  .brand { min-width: 0; }
  .brand small, .desk-nav { display: none; }
  .points-pill { margin-left: auto; min-width: 0; padding: 6px 10px; }
  .wa-top span { display: inline; }
  .wa-top { width: auto; height: auto; min-height: 36px; padding: 6px 10px; }
  .wrap { width: min(1120px, calc(100% - 20px)); margin: 16px auto 28px; }
  h1 { font-size: 26px; }
  .search { flex-direction: column; }
  .search input { max-width: none; }
  .steps { overflow-x: auto; }
  .gift-grid { grid-template-columns: 1fr; }
  .qr { width: min(220px, 70vw); height: auto; }
  table.stack { min-width: 0; }
  table.stack thead, table.stack th { display: none; }
  table.stack tr { display: block; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 10px; padding: 8px 10px; background: #fff; }
  table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 7px 0; text-align: right; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; }
  table.stack .shot { width: 96px; height: 64px; }
}
.top-link { margin: 0; min-height: 36px; padding: 6px 12px; }
.wa-top {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  min-height: 36px; padding: 6px 12px; border-radius: 999px;
  background: #25d366; color: #fff; text-decoration: none; font-size: 13px; font-weight: 700;
}
.wa-top svg { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.points-meter {
  position: relative; overflow: hidden; isolation: isolate;
  min-width: 148px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; padding: 7px 12px 10px;
}
.points-meter .meter-fill {
  position: absolute; left: 0; bottom: 0; height: 4px; width: var(--pct, 0%); z-index: 0;
  background: linear-gradient(90deg, #14685a, #c4a46a);
}
.points-meter .meter-fill::after { content: none; }
.points-meter span, .points-meter b { position: relative; z-index: 1; display: block; background: transparent; }
.points-meter span { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.points-meter b { font-size: 18px; margin: 1px 0 0; font-family: var(--serif); color: var(--ink); }
.points-meter b small { font-size: 12px; color: var(--muted); margin-left: 4px; font-family: var(--sans); }
.meter-track { display: block; height: 8px; border-radius: 999px; background: #efe6da; overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14685a, #e8d7a8); }
@keyframes meter-flow { 50% { background-position: 100% 0; } }
@keyframes meter-spark { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) {
  .points-meter .meter-fill, .points-meter .meter-fill::after,
  .redeem-balance .balance-fill { animation: none; }
}
.whoami {
  display: flex; align-items: center; gap: 8px; max-width: 220px;
  background: #fffdf9; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px;
}
.whoami span { background: #14685a; color: #fff8ee; border-radius: 999px; padding: 4px 8px; font-size: 12px; }
.whoami b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="dark"] .whoami { background: #241f1b; }
html[data-theme="dark"] .points-meter { background: var(--card); border-color: var(--line); }
html[data-theme="dark"] .points-meter b { color: var(--ink); }
html[data-theme="dark"] .meter-track, html[data-theme="dark"] .gift-cost i { background: #3a332c; }
html[data-theme="dark"] .whoami b { color: #f6efe6; }
.gift-admin { display: grid; gap: 10px; }
.gift-admin-card { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.gift-admin-card img, .gift-icon { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.gift-icon { display: grid; place-items: center; background: #efe6da; font-family: var(--serif); font-size: 28px; }
.corner-logo { height: auto; width: auto; max-width: none; object-fit: none; background: transparent; border: 0; padding: 0; }
.mark.logo { object-fit: none; padding: 0; background: transparent; width: auto; height: auto; }
.theme-btn { margin: 0; min-height: 40px; width: 40px; padding: 0; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.theme-btn svg { width: 22px; height: 22px; display: block; margin: 0 auto; }
.refresh-btn {
  margin: 0; min-height: 40px; width: 40px; padding: 0;
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; display: grid; place-items: center;
}
.refresh-btn svg { width: 20px; height: 20px; display: block; }
.refresh-btn:hover { background: #efe6da; border-color: #c9bba8; }
html[data-theme="dark"] .refresh-btn { background: #1c1815; color: #f6efe6; border-color: #4a4036; }
html[data-theme="dark"] .refresh-btn:hover { background: #2a241c; }
html:not([data-theme="dark"]) .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: none; }
.points-col { display: flex; flex-direction: column; gap: 8px; max-width: 42ch; }
.points-col p { margin: 0; }
.order-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.order-actions input, .order-actions select, .order-actions button { margin: 0; width: 100%; }
.wa-float {
  position: fixed; right: 16px; bottom: 24px; z-index: 30;
  background: #25d366; color: #fff; text-decoration: none; font-weight: 700;
  border-radius: 999px; padding: 12px 16px; box-shadow: 0 10px 24px rgba(20, 80, 40, 0.25);
}
body.nav-member .wa-float { bottom: calc(24px + env(safe-area-inset-bottom)); }
.richtext { max-width: 68ch; }
.richtext img { max-width: 100%; height: auto; border-radius: 12px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.member-card {
  display: grid; grid-template-columns: 46px 1fr auto; grid-template-rows: auto auto;
  gap: 4px 10px; align-items: center; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
}
.member-card small { display: block; color: var(--muted); font-size: 12px; }
.member-card b { font-family: var(--serif); font-size: 22px; }
.member-card b i { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; }
.member-card .badge { grid-column: 3; justify-self: end; }
.avatar {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ink); color: #f6ead8; font-family: var(--serif); grid-row: span 2;
}
input[type="color"] { height: 46px; padding: 6px; max-width: 120px; }
html[data-theme="dark"] body {
  --ink: #f6efe6; --muted: #c4b8aa; --line: #3a332c; --paper: #161410 !important;
  --card: #241f1b; --teal: #8fd0c2; --teal-dark: #d7f3ec; --shadow: none; --bg: #161410 !important;
  background: #161410;
}
html[data-theme="dark"] .topbar, html[data-theme="dark"] .dock { background: rgba(22, 20, 16, 0.94); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #1c1815; color: #f6efe6; border-color: #4a4036; }
input[type="date"], input[type="datetime-local"], input[type="month"], input[type="time"] { color-scheme: light; }
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-text { color: #1c1914; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 1; }
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="month"],
html[data-theme="dark"] input[type="time"] {
  color-scheme: light;
  background: #fffdf9;
  color: #1c1914;
  border-color: #c4a46a;
}
html[data-theme="dark"] .points-pill {
  background: var(--card);
  border-color: var(--line);
}
html[data-theme="dark"] .points-pill span,
html[data-theme="dark"] .points-pill b {
  background: transparent;
  color: var(--ink);
  border: 0;
}
html[data-theme="dark"] .avatar { background: #f3e7d8; color: #1c1914; }
html[data-theme="dark"] nav a.on, html[data-theme="dark"] nav a:hover { background: #3a332c; color: #f6efe6; }
html[data-theme="dark"] .flash.ok { background: #1d3a2c; }
html[data-theme="dark"] .flash.error { background: #4a2422; }
.dash-hero, .dash-actions { display: grid; gap: 14px; }
.dash-hero { grid-template-columns: 1.4fr 0.6fr; margin-bottom: 16px; }
.dash-hello, .dash-points { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.dash-points .meter-track { margin-top: 12px; }
.referral-spotlight {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  margin: 0 0 16px; padding: 18px 20px; border-radius: 20px;
  background: linear-gradient(135deg, #14685a, #1d8a78 55%, #c4a36a);
  color: #fff8ee;
}
.referral-spotlight .kicker, .referral-spotlight p { color: #f3e7d6; }
.referral-spotlight strong {
  display: block; margin: 4px 0 8px; font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px); letter-spacing: 0.04em; line-height: 1;
}
.referral-spotlight span {
  flex: 0 0 auto; border: 1px solid rgba(255,248,238,.45); border-radius: 999px;
  padding: 8px 12px; font-size: 13px;
}
html[data-theme="dark"] .referral-spotlight { background: linear-gradient(135deg, #0e4d43, #14685a 60%, #9a7340); }
@media (max-width: 860px) {
  .referral-spotlight { display: block; }
  .referral-spotlight span { display: inline-block; margin-top: 10px; }
}
.dash-points b { display: block; font-size: 42px; font-family: var(--serif); }
.dash-actions { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.dash-actions:has(.act-card) { grid-template-columns: repeat(4, 1fr); }
.dash-actions a.act {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  text-decoration: none; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow); min-height: 88px;
}
.dash-actions a.act:hover { border-color: #c9bba8; transform: translateY(-1px); }
.act-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: #e7f3ef; color: #14685a;
}
.act-icon svg { width: 22px; height: 22px; display: block; }
.act-gift .act-icon { background: #f8efe0; color: #9a7340; }
.act-history .act-icon { background: #f3ece4; color: #1c1914; }
.act-card .act-icon { background: #e7eef8; color: #2d4f86; }
.act-copy { min-width: 0; }
.act-copy b { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.2; }
.act-copy span, .code-line { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.code-line strong { font-family: var(--serif); }
.act-count, .dash-actions em {
  min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px;
}
.act-count { background: #f0b429; color: #fff; font-family: var(--serif); font-size: 18px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08); }
.dash-actions em { background: #efe6da; color: var(--ink); }
html[data-theme="dark"] .act-count { background: #e0a31f; color: #fff8ee; }
html[data-theme="dark"] .dash-actions em { background: #3a332c; color: #f6efe6; }
button.zoom { border: 0; background: transparent; padding: 0; margin: 0; min-height: 0; }
#lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(16, 12, 8, 0.82);
  display: grid; place-items: center; padding: 24px;
}
#lightbox[hidden] { display: none; }
#lightbox img { max-width: min(960px, 92vw); max-height: 84vh; border-radius: 12px; background: #fff; }
#lightboxClose { position: absolute; top: 16px; right: 16px; }
.logo-natural { width: auto; height: auto; max-width: none; object-fit: none; }
.instant { width: 100%; margin: 0 0 14px; }
.record-list { display: grid; gap: 10px; }
.record { display: grid; grid-template-columns: 88px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.record b { display: block; text-align: right; margin-top: 6px; }
.dash-points small { display: block; color: var(--muted); margin-top: 4px; }
html[data-theme="dark"] .dash-points b { color: #fff8ee; }
@media (max-width: 860px) {
  .record { grid-template-columns: 72px 1fr; }
  .record > div:last-child { grid-column: 2; }
}
@media (max-width: 860px) {
  .dash-hero, .dash-actions, .dash-actions:has(.act-card) { grid-template-columns: 1fr; }
}
.points-col { margin-top: 14px; }
.points-col p { margin: 0 0 8px; }
.order-list { display: grid; gap: 12px; }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.order-card.dup { border-color: var(--danger); }
.order-top, .order-body, .order-actions { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.order-body { margin-top: 10px; }
.order-actions { flex-wrap: wrap; margin-top: 12px; }
.order-actions input, .order-actions select { max-width: 180px; margin: 0; }
.order-actions button { margin: 0; }
.record-list { display: grid; gap: 10px; }
.record { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.record b { display: block; text-align: right; margin-top: 6px; }
.gift .stock { color: var(--muted); font-size: 13px; }
.redeem-head { align-items: flex-start; }
.redeem-head > div:first-child { padding-top: 2px; }
.redeem-head { margin-bottom: 12px; }
.redeem-tools { display: grid; gap: 10px; }
#redeem-search { display: block; margin: 0; }
#redeem-search input {
  width: 100%; max-width: none; min-height: 48px;
  border-radius: 18px; padding: 0 16px;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(48, 34, 16, .04);
}
.redeem-balance {
  position: relative; overflow: hidden; isolation: isolate;
  min-width: 220px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px 13px;
}
.redeem-balance .balance-fill {
  position: absolute; left: 0; bottom: 0; height: 5px; width: var(--pct, 0%); z-index: 0;
  background: linear-gradient(90deg, #14685a, #c4a46a);
}
.redeem-balance .balance-copy { position: relative; z-index: 1; }
.redeem-balance span, .redeem-balance small, .redeem-balance em { color: var(--muted); }
.redeem-balance span { display: block; font-size: 11px; letter-spacing: 0.04em; }
.redeem-balance b { display: block; margin: 2px 0 0; color: var(--ink); font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.redeem-balance b small { color: var(--muted); font-size: 13px; margin-left: 4px; font-family: var(--sans); }
.redeem-balance em { display: block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--teal); }
.redeem-balance small { display: block; margin-top: 4px; font-size: 12px; }
html[data-theme="dark"] .redeem-balance { background: var(--card); border-color: var(--line); }
html[data-theme="dark"] .redeem-balance b { color: var(--ink); }
.redeem-tools { display: grid; gap: 10px; margin-bottom: 14px; }
.gift-grid { align-items: stretch; }
.gift { padding: 0; overflow: hidden; gap: 0; }
.gift-media { position: relative; height: 188px; overflow: hidden; background: #efe6da; }
.gift-media img, .gift .ph {
  display: block; width: 100%; height: 188px; object-fit: cover; object-position: center; border-radius: 0;
}
.gift-state {
  position: absolute; left: 12px; top: 12px;
  background: rgba(28, 25, 20, 0.82); color: #fff8ee;
  border-radius: 999px; padding: 4px 10px; font-size: 12px;
}
.gift-state.ok { background: #14685a; color: #fff8ee; }
.gift-body, .gift-body h2, .gift-confirm p, .method-picks label { color: var(--ink); }
.gift-confirm summary {
  cursor: pointer; list-style: none; padding: 11px 14px; font-weight: 700;
  color: #fff8ee; background: #14685a; border-radius: 14px;
}
.points-progress .meter-track { margin-top: 10px; background: #efe6da; }
.points-progress .meter-track em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14685a, #c4a46a); }
.points-progress .pct { display: block; margin-top: 6px; color: var(--teal); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.status-pills a {
  text-decoration: none; padding: 5px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.status-pills a:hover { border-color: var(--gold); color: var(--ink); }
html[data-theme="dark"] .status-pills a { background: #1b1b1b; color: #efe6da; border-color: #333; }
html[data-theme="dark"] .status-pills a:hover { color: #f6ead8; border-color: #6d4e16; }
.history-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.history-col { min-width: 0; }
.hist-list { display: grid; gap: 10px; max-height: 68vh; overflow: auto; padding-right: 4px; }
.hist-card {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.hist-thumb {
  width: 72px; height: 72px; object-fit: cover; object-position: center; border-radius: 12px;
  display: grid; place-items: center; background: #efe6da; color: var(--gold); overflow: hidden;
}
.hist-thumb.file { text-decoration: none; font-family: var(--serif); }
.hist-card strong, .hist-card p { display: block; margin: 0; overflow-wrap: anywhere; }
.hist-card p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.hist-side { text-align: right; }
.hist-side b { display: block; margin-top: 6px; }
.gift-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.gift-body h2 { margin: 0; font-size: 22px; }
.gift-desc { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.gift-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gift-chips span {
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; font-size: 12px; color: var(--muted);
}
.gift-cost b { font-family: var(--serif); font-size: 26px; }
.gift-cost b small { font-size: 14px; font-weight: 600; }
.gift-cost span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.gift-cost i { display: block; height: 8px; border-radius: 999px; background: #111; margin-top: 8px; overflow: hidden; }
.gift-cost em { display: block; height: 100%; background: linear-gradient(90deg, #14685a, #e8d7a8); border-radius: inherit; }
.gift.locked { opacity: 0.92; }
.gift.tier-locked { opacity: 1; border-color: #c4a46a; box-shadow: inset 0 0 0 1px #c4a46a; }
.gift-state.tier { background: #8a6a2f; color: #fff8ee; }
.gift-chips .tier-chip { border-color: #c4a46a; color: #6d5424; background: #f8f1e2; font-weight: 700; }
.tier-pitch {
  margin: 0; padding: 10px 12px; border-radius: 12px;
  background: #f8f1e2; color: #6d5424; font-size: 13px; line-height: 1.55; font-weight: 700;
}
html[data-theme="dark"] .gift.tier-locked { border-color: #c4a46a; }
html[data-theme="dark"] .gift-state.tier { background: #c4a46a; color: #1c1815; }
html[data-theme="dark"] .tabs a { background: #241f1b; color: #f6efe6; border-color: #4a4036; }
html[data-theme="dark"] .tabs a.on { background: #8fd0c2; color: #14221e; border-color: #8fd0c2; }
html[data-theme="dark"] p.tier-locked { color: #f6efe6; font-weight: 700; }
html[data-theme="dark"] .gift-desc,
html[data-theme="dark"] .gift-chips span,
html[data-theme="dark"] .gift-cost span,
html[data-theme="dark"] .gift-gap { color: #f6efe6; }
html[data-theme="dark"] .gift-chips .tier-chip,
html[data-theme="dark"] .tier-pitch { background: #3a3124; color: #f6efe6; border-color: #c4a46a; }
.method-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.method-picks label {
  margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-weight: 600; font-size: 14px;
}
.method-picks input { width: auto; margin-right: 6px; }
.method-fixed, .ship-note, .gift-gap { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.gift-form:has(input[value="pickup"]:checked) .ship-note:not(.always) { display: none; }
.gift-confirm { margin-top: 4px; border: 1px solid var(--line); border-radius: 14px; background: #f7f1e8; }
.gift-confirm summary {
  cursor: pointer; list-style: none; padding: 11px 14px; font-weight: 700;
  color: #fff8ee; background: #14685a; border-radius: 14px;
}
.gift-confirm[open] summary { border-radius: 14px 14px 0 0; }
.gift-confirm summary::-webkit-details-marker { display: none; }
.gift-confirm p { margin: 0; padding: 12px 14px 0; font-size: 14px; line-height: 1.55; }
.gift-confirm .gift-panel button { width: 100%; margin: 0; }
.gift-empty { grid-column: 1 / -1; }
html[data-theme="dark"] .gift-confirm { background: #1c1815; border-color: #4a4036; color: #f6efe6; }
html[data-theme="dark"] .gift-confirm p,
html[data-theme="dark"] .gift-confirm label,
html[data-theme="dark"] .gift-panel,
html[data-theme="dark"] .gift-panel label,
html[data-theme="dark"] .method-fixed,
html[data-theme="dark"] .ship-note,
html[data-theme="dark"] .confirm-line,
html[data-theme="dark"] .gift-gap,
html[data-theme="dark"] .gift-confirm .agree,
html[data-theme="dark"] .gift-confirm .agree span,
html[data-theme="dark"] .redeem-batch .agree,
html[data-theme="dark"] .redeem-batch .agree span {
  color: #fff8ee !important;
  -webkit-text-fill-color: #fff8ee;
  opacity: 1;
}
html[data-theme="dark"] .method-picks label { color: #f6efe6; }
html[data-theme="dark"] .gift-confirm input:not([type="checkbox"]),
html[data-theme="dark"] .gift-confirm textarea { color: #f6efe6; background: #161410; border-color: #5a5148; }
html[data-theme="dark"] .gift-confirm input::placeholder,
html[data-theme="dark"] .gift-confirm textarea::placeholder { color: #c4b8aa; }
html[data-theme="dark"] .gift-cost i { background: #000; }
html[data-theme="dark"] .gift-confirm summary { color: #14221e; background: #8fd0c2; }
html[data-theme="dark"] .gift-state.ok { color: #14221e; background: #8fd0c2; }
html[data-theme="dark"] .hist-thumb { background: #3a332c; }
.admin-nav {
  position: sticky; top: 67px; z-index: 7;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 4vw 10px; background: rgba(255, 252, 248, 0.96);
  border-bottom: 1px solid var(--line);
}
.admin-nav .nav-cluster {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  border: 1px solid #efe4d4; border-radius: 16px; padding: 4px;
  background: #f7f2ea;
}
.admin-nav .nav-cluster.work { background: #fff; }
.admin-nav .nav-cluster.member { background: #fbf7f1; }
.admin-nav .nav-cluster.setup { background: #f7f2ea; }
.admin-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; text-decoration: none; color: #4d4338;
  border: 1px solid transparent; border-radius: 12px; padding: 7px 10px; font-size: 14px; font-weight: 650;
  background: transparent;
}
.admin-nav a.is-nav-hidden, .admin-nav a[hidden] { display: none !important; }
.admin-nav .nav-ico {
  width: 16px; height: 16px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.admin-nav a.on, .admin-nav a:hover { background: var(--ink); color: #f6ead8; border-color: var(--ink); }
.admin-nav a.nav-pending, .admin-nav a.nav-approved { display: inline-flex; align-items: center; gap: 6px; }
.admin-nav a.nav-pending { border-color: #e3b4ae; background: #fff6f4; color: #9d342c; font-weight: 700; }
.admin-nav a.nav-pending b, .admin-nav a.nav-approved b { min-width: 18px; height: 18px; border-radius: 999px; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.admin-nav a.nav-pending b { background: #9d342c; color: #fff6f4; }
.admin-nav a.nav-pending.on, .admin-nav a.nav-pending:hover { background: #9d342c; color: #fff6f4; border-color: #9d342c; }
.admin-nav a.nav-pending.on b, .admin-nav a.nav-pending:hover b { background: #fff6f4; color: #9d342c; }
.admin-nav a.nav-pending.is-zero { font-weight: 600; color: #8a625e; background: #fff; }
.admin-nav a.nav-approved { border-color: #d7b56a; background: #fff8ee; color: #6d4e16; }
.admin-nav a.nav-approved b { background: #9a7340; color: #fff8ee; }
.admin-nav a.nav-approved.on, .admin-nav a.nav-approved:hover { background: #9a7340; color: #fff8ee; border-color: #9a7340; }
.admin-nav a.nav-approved.on b, .admin-nav a.nav-approved:hover b { background: #fff8ee; color: #6d4e16; }
.tabs a.tab-pending { border-color: #e3b4ae; color: #9d342c; font-weight: 700; }
.tabs a.tab-pending.on { background: #9d342c; color: #fff6f4; border-color: #9d342c; }
.approved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.approved-card { display: flex; flex-direction: column; gap: 8px; padding: 0 0 14px; overflow: hidden; }
.approved-photo { width: 100%; height: 150px; object-fit: cover; display: block; }
.approved-card .order-top, .approved-card .order-body, .approved-card .order-actions { padding-inline: 14px; }
html[data-theme="dark"] .admin-nav a.nav-pending { background: #3a2422; color: #f6dad6; border-color: #6a3d38; }
html[data-theme="dark"] .admin-nav a.nav-pending b { background: #e7b2ab; color: #2a1614; }
html[data-theme="dark"] .admin-nav a.nav-pending.is-zero { background: var(--card); color: #c4b8aa; }
html[data-theme="dark"] .admin-nav a.nav-approved { background: #3a2e1c; color: #f6ead8; }
html[data-theme="dark"] .tabs a.tab-pending { background: #3a2422; color: #f6dad6; border-color: #6a3d38; }
html[data-theme="dark"] .tabs a.tab-pending.on { background: #e7b2ab; color: #2a1614; }
@media (max-width: 860px) {
  .approved-grid { grid-template-columns: 1fr; }
}
body.nav-admin .desk-nav { display: none; }
body.nav-admin { padding-bottom: 28px; }
.admin-stats { grid-template-columns: repeat(3, 1fr); }
.admin-home { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; align-items: start; }
.rules-panel { grid-column: 1 / -1; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.quick-links a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--ink); }
.log-list { display: grid; gap: 8px; }
.log-row, .log-row.compact {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.log-row.compact { grid-template-columns: auto 1fr; }
.log-row strong, .log-row p { display: block; margin: 0; }
.log-row p, .log-meta span { color: var(--muted); font-size: 13px; }
.log-meta { text-align: right; }
.log-meta b { display: block; font-weight: 600; font-size: 13px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.pager span { color: var(--muted); font-size: 13px; }
.pager .btn { margin: 0; }
html[data-theme="dark"] .admin-nav { background: rgba(22, 20, 16, 0.96); }
html[data-theme="dark"] .admin-nav .nav-cluster { background: #241f1a; border-color: #3a332c; }
html[data-theme="dark"] .admin-nav .nav-cluster.work { background: #1c1914; }
html[data-theme="dark"] .admin-nav a:not(.nav-pending):not(.nav-approved) { color: #e7dccb; }
html[data-theme="dark"] .admin-nav a.on, html[data-theme="dark"] .admin-nav a:hover { background: #f6ead8; color: #1c1914; }
html[data-theme="dark"] .admin-nav a.nav-pending.on, html[data-theme="dark"] .admin-nav a.nav-pending:hover { background: #e7b2ab; color: #2a1614; border-color: #e7b2ab; }
html[data-theme="dark"] .admin-nav a.nav-pending.on b, html[data-theme="dark"] .admin-nav a.nav-pending:hover b { background: #2a1614; color: #f6dad6; }
html[data-theme="dark"] .admin-nav a.nav-approved.on, html[data-theme="dark"] .admin-nav a.nav-approved:hover { background: #d7b56a; color: #2a2114; border-color: #d7b56a; }
html[data-theme="dark"] .admin-nav a.nav-approved.on b, html[data-theme="dark"] .admin-nav a.nav-approved:hover b { background: #2a2114; color: #f6ead8; }
@media (max-width: 860px) {
  .admin-nav { top: 60px; padding-inline: 12px; }
  .admin-stats, .admin-home, .history-split { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: auto 1fr; }
  .log-meta, .log-row > a { grid-column: 2; text-align: left; }
  .hist-card { grid-template-columns: 64px minmax(0, 1fr); }
  .hist-side { grid-column: 2; text-align: left; }
}
@media (max-width: 860px) {
  .redeem-balance { margin-top: 12px; }
  .gift-media, .gift-media img, .gift .ph { height: 210px; }
}
.dash-hero { align-items: stretch; }
.dash-points small { display: block; margin-top: 6px; color: var(--muted); }
@media (max-width: 860px) {
  .record { grid-template-columns: 72px 1fr; }
  .record > div:last-child { grid-column: 2; }
}
.copy-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 14px; }
.copy-actions .secondary { width: auto; margin: 0; padding: 6px 10px; font-size: 13px; }
.gift-panel { display: grid; gap: 8px; padding: 12px 14px 14px; }
.gift-panel .qty { max-width: 120px; }
.gift-panel button, .redeem-batch button { width: 100%; }
.gift-confirm .agree, .redeem-batch .agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.gift-confirm .agree input, .redeem-batch .agree input { width: auto; margin-top: 2px; }
.confirm-line { margin: 0; font-size: 14px; line-height: 1.55; }
.redeem-batch {
  position: sticky; bottom: 12px; z-index: 8; margin-top: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 16px;
  box-shadow: 0 10px 30px rgba(28, 25, 20, 0.12);
}
.batch-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.batch-head h2 { margin: 0; font-size: 22px; }
.batch-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.batch-row span, .batch-row strong { display: block; }
.batch-row span { color: var(--muted); font-size: 13px; margin-top: 2px; }
.batch-qty { display: flex; gap: 6px; align-items: center; }
.batch-qty button { width: auto; margin: 0; padding: 4px 8px; }
html[data-theme="dark"] .redeem-batch { background: var(--card); }
@media (max-width: 860px) {
  .redeem-batch { bottom: 12px; }
}
.gift-admin-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.gift-stats { margin-bottom: 14px; }
.method-set { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin: 8px 0 12px; }
.method-set legend { padding: 0 6px; font-weight: 700; }
.method-choice { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 8px; border-radius: 10px; }
.method-choice small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.method-choice input { width: auto; margin-top: 4px; }
.gift-table { display: grid; gap: 8px; margin-top: 10px; }
.gift-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gift-row img, .gift-row .gift-icon { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.gift-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.member-table { display: grid; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.member-head, .member-row { display: grid; grid-template-columns: 1.4fr .9fr .6fr 1fr 1.1fr auto; gap: 8px; align-items: center; padding: 10px 12px; }
.member-head { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; background: #f7f1e8; }
.member-row { text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.member-row:hover { background: #f7f1e8; }
.member-row small { display: block; color: var(--muted); font-size: 12px; }
.member-row b { font-family: var(--serif); font-size: 20px; }
.per-page { display: flex; gap: 8px; align-items: center; }
.per-page input { width: 80px; margin: 0; }
.per-page button { width: auto; margin: 0; }
.hist-search { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.hist-search input { margin: 0; }
.hist-search button, .hist-search .btn { width: auto; margin: 0; }
.faq-preview { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.faq-preview .kicker { margin-bottom: 8px; }
.rich-copy { line-height: 1.7; }
.rich-copy h2, .rich-copy h3 { margin: 1em 0 0.4em; }
.rich-copy p { margin: 0 0 0.8em; }
.rich-copy img { max-width: 100%; height: auto; border-radius: 12px; }
.rich-copy table { min-width: 0; }
.ledger-top .per-page { margin: 0 0 12px; }
.table-wrap { overflow-x: auto; }
td.up { color: #14685a; font-weight: 700; }
td.down { color: #9d342c; font-weight: 700; }
@media (max-width: 860px) {
  .gift-admin-layout, .member-head, .member-row { grid-template-columns: 1fr; }
  .member-head { display: none; }
  .member-row { gap: 2px; }
}

/* Mobile: one sticky head, no page shift, readable top bar */
html { scroll-padding-top: calc(var(--head-space, 72px) + env(safe-area-inset-top)); }
html, body { max-width: 100%; overflow-x: clip; }
img, video, svg, canvas, iframe { max-width: 100%; }
.site-head {
  position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: var(--head-bg, #fffcf8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .topbar { position: static; top: auto; z-index: auto; border-bottom: 0; background: transparent; }
.site-head .admin-nav { position: static; top: auto; z-index: auto; background: transparent; border-bottom: 0; }
.topbar .mark.logo, .topbar .corner-logo {
  width: auto !important; height: 36px !important;
  max-width: 108px !important; max-height: 36px !important;
  object-fit: contain !important; object-position: left center;
  background: transparent; border: 0; border-radius: 8px; padding: 0;
}
.logo-natural { width: auto; height: auto; max-width: min(100%, 420px); object-fit: contain; }
.brand { min-width: 0; }
.brand span { min-width: 0; }
.brand strong, .whoami b, .code-line, .lede, .panel, .order-card, .hist-card p {
  overflow-wrap: anywhere;
}
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.to-top {
  position: fixed; right: 14px; bottom: 24px; z-index: 35;
  min-height: 40px; padding: 8px 12px; border-radius: 999px;
  background: var(--ink); color: #f6ead8; border: 0; box-shadow: var(--shadow);
}
body.nav-member .to-top { bottom: calc(24px + env(safe-area-inset-bottom)); }
html[data-theme="dark"] .site-head { background: rgba(22, 20, 16, 0.96); }
html[data-theme="dark"] .to-top { background: #f6ead8; color: #1c1914; }
.tox-tinymce, .tox-editor-container { max-width: 100% !important; }
@media (max-width: 860px) {
  :root { --head-space: 108px; }
  .site-head { --head-space: 108px; }
  .topbar {
    flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 8px 12px 6px;
  }
  .brand { flex: 1 1 auto; max-width: calc(100% - 148px); }
  .brand small { display: none; }
  .brand strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .desk-nav {
    display: flex; order: 5; flex: 1 1 100%; flex-wrap: nowrap;
    gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 2px 0 6px; scrollbar-width: none;
  }
  .desk-nav::-webkit-scrollbar { display: none; }
  .desk-nav a { white-space: nowrap; flex: 0 0 auto; background: var(--card); border: 1px solid var(--line); }
  .top-tools { gap: 6px; margin-left: auto; }
  .points-meter { min-width: 0; padding: 4px 8px 6px; }
  .points-meter span { display: none; }
  .points-meter b { font-size: 15px; }
  .whoami { max-width: 42vw; padding-right: 8px; }
  .whoami b { max-width: 18vw; }
  .top-link { padding: 6px 8px; font-size: 13px; }
  .wa-top span { display: none; }
  .wa-top { width: 36px; height: 36px; min-height: 36px; padding: 0; justify-content: center; }
  .theme-btn { width: 36px; min-height: 36px; }
  .admin-nav {
    flex-wrap: nowrap; overflow-x: auto;
    padding: 0 12px 8px; gap: 6px;
    scrollbar-width: none;
  }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav .nav-cluster { flex-wrap: nowrap; }
  .admin-nav a { padding: 8px 10px; }
  .wrap { width: min(1120px, calc(100% - 20px)); margin: 14px auto 24px; }
  .pagehead, .batch-head, .panel-head, .hist-search, .search, .per-page, .actions, .copy-actions {
    align-items: stretch;
  }
  .pagehead .btn, .panel .btn, .gift button, form > button { width: 100%; }
  .actions, .search, .copy-actions, .hist-search, .per-page, .quick-links, .status-pills, .tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
  }
  .actions > *, .search > *, .hist-search > *, .per-page > * { min-width: 0; }
  .search input, .hist-search input, .per-page input { width: 100%; max-width: none; flex: 1 1 160px; }
  .search button, .search .btn, .hist-search button, .hist-search .btn, .per-page button, .copy-actions .secondary, .actions button, .batch-qty button {
    width: auto; flex: 1 1 auto;
  }
  .history-split, .gift-admin-layout, .approved-grid, .dash-hero, .dash-actions, .dash-actions:has(.act-card), .method-picks {
    grid-template-columns: 1fr;
  }
  .hist-list { max-height: none; overflow: visible; padding-right: 0; }
  .hist-card, .gift-row, .record { grid-template-columns: 64px minmax(0, 1fr); }
  .hist-side, .gift-row form, .gift-row .actions { grid-column: 2; text-align: left; }
  .order-top, .order-body, .log-row { min-width: 0; }
  .order-card, .panel, .card, .gift { overflow: hidden; }
  .member-row { padding: 12px; }
  .member-row b { font-size: 18px; }
  table { min-width: 560px; }
  .rich-copy table, .table-wrap table { min-width: 560px; }
  body.nav-member { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  #lightbox { padding: 48px 12px 12px; }
  #lightbox img { max-width: 100%; max-height: 78dvh; }
  #lightboxClose { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
  h1 { font-size: 26px; overflow-wrap: anywhere; }
  .dash-points b { font-size: 36px; }
  .gift-body h2, .batch-head h2 { font-size: 20px; }
}
@media (max-width: 420px) {
  .brand { max-width: calc(100% - 120px); }
  .points-meter b small { display: none; }
  .whoami b { display: none; }
  .whoami { padding-right: 4px; }
}
.top-note {
  display: inline-flex; align-items: center; max-width: 9em;
  padding: 6px 10px; border-radius: 999px; background: #fff8ee; color: #6d4e16;
  border: 1px solid #e4d3b0; font-size: 12px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.expiry-panel { margin: 0 0 16px; }
.expiry-panel h2 { margin: 0 0 8px; font-size: 18px; }
.expiry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.expiry-list li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 12px; background: #f7f1e8; font-size: 14px;
}
html[data-theme="dark"] .top-note { background: #3a2e1c; color: #f6ead8; border-color: #6d5a38; }
html[data-theme="dark"] .expiry-list li { background: #2a241e; }
@media (max-width: 860px) {
  .top-note { display: inline-flex; max-width: 7.5em; order: -1; }
  .top-tools { flex-wrap: wrap; justify-content: flex-end; }
}

/* Second mobile pass: cards, touch, no hidden top */
@media (max-width: 860px) {
  html { scroll-padding-top: calc(var(--head-space, 120px) + 8px); }
  body { -webkit-text-size-adjust: 100%; }
  .wrap { margin-top: 12px; }
  .site-head { box-shadow: 0 8px 18px rgba(28, 25, 20, 0.06); }
  .desk-nav, .admin-nav {
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent);
  }
  .desk-nav a, .admin-nav a { min-height: 36px; display: inline-flex; align-items: center; }
  .top-tools { max-width: 58%; }
  .top-note { max-width: 100%; white-space: normal; }
  input, select, textarea, button, .btn { max-width: 100%; }
  .search, .hist-search, .per-page { display: grid; grid-template-columns: 1fr; }
  .search > *, .hist-search > *, .per-page > * { width: 100%; }
  .pagehead { gap: 10px; }
  .pagehead .btn, .pager, .pager .btn { width: 100%; }
  .pager { display: grid; gap: 8px; justify-items: stretch; }
  .cards, .admin-stats { grid-template-columns: 1fr; }
  .card, .panel, .order-card, .gift { padding: 12px; }
  .order-top, .order-body, .log-row, .gift-admin-card, .gift-row {
    display: grid; grid-template-columns: 1fr; gap: 8px;
  }
  .order-body .shot, .order-body img, .shot { width: 100%; height: 180px; object-fit: cover; }
  .order-actions { display: grid; grid-template-columns: 1fr; }
  .order-actions button { min-height: 44px; }
  .log-meta, .log-row > a, .hist-side, .gift-row .actions { grid-column: auto; text-align: left; }
  .member-table { border: 0; background: transparent; overflow: visible; }
  .member-row {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
    margin: 0 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  }
  .member-row span:first-child { grid-column: 1 / -1; }
  .member-row b { grid-column: 2; grid-row: 2; }
  .member-row span:nth-child(2)::before { content: "電話 "; color: var(--muted); font-size: 12px; }
  .member-row span:nth-child(4)::before { content: "小朋友 "; color: var(--muted); font-size: 12px; }
  .member-row span:nth-child(5)::before { content: "登入 "; color: var(--muted); font-size: 12px; }
  .table-wrap { overflow: hidden; max-width: 100%; }
  table, .table-wrap table { min-width: 0; width: 100%; display: block; }
  table tr {
    display: block; margin: 0 0 10px; padding: 8px 10px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--card);
    min-width: 0; max-width: 100%;
  }
  table tr:first-child, table thead { display: none; }
  table td {
    display: grid; grid-template-columns: max-content minmax(0, 1fr);
    gap: 2px 12px; align-items: start;
    border: 0; padding: 7px 0; text-align: right; min-width: 0; max-width: 100%;
    overflow-wrap: anywhere; word-break: break-word;
  }
  table td::before {
    content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; line-height: 1.45;
  }
  table td > span { min-width: 0; overflow-wrap: anywhere; word-break: break-word; text-align: right; }
  .rich-copy table, .rich-copy table tr, .rich-copy table td { display: table; }
  .rich-copy table { display: block; overflow-x: auto; }
  .rich-copy table tr { display: table-row; }
  .rich-copy table td, .rich-copy table th { display: table-cell; text-align: left; }
  .rich-copy table td::before { content: none; }
  .tox-toolbar, .tox-toolbar__primary { overflow-x: auto; }
  .dash-actions a.act { min-height: 72px; }
  .referral-spotlight strong { overflow-wrap: anywhere; font-size: 22px; }
  .to-top { min-width: 44px; min-height: 44px; }
}
html[data-theme="dark"] .member-row, html[data-theme="dark"] table tr { background: var(--card); }
.wrong-pass { margin: 6px 0 0; color: var(--danger); font-weight: 700; overflow-wrap: anywhere; }
.log-row.fail { border-color: #e7c7c4; }
.search .per-page { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.search .per-page input { width: 72px; margin: 0; }
@media (max-width: 860px) {
  .search .per-page { width: 100%; }
  .search .per-page input { flex: 1; }
}
.gift.is-hidden, .gift[hidden],
.gift-card.is-hidden, .gift-card[hidden],
.order-card.is-hidden, .order-card[hidden],
.bday-card.is-hidden, .bday-card[hidden] { display: none !important; }
.redeem-found { display: none !important; }
.point-band {
  margin-top: 4px; padding: 14px 16px 12px;
  border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 104, 90, .07), transparent 46%), var(--card);
  box-shadow: 0 8px 22px rgba(48, 34, 16, .04);
}
.band-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.point-band h2 { margin: 0; font-size: 20px; font-family: var(--serif); letter-spacing: .01em; }
#band-count {
  color: var(--teal-dark); font-size: 12px; font-weight: 700;
  background: rgba(20, 104, 90, .1); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.band-sliders { position: relative; height: 54px; margin: 8px 12px 2px; touch-action: none; cursor: pointer; }
.band-ticks { position: absolute; left: 0; right: 0; top: 31px; height: 10px; pointer-events: none; }
.band-ticks i {
  position: absolute; top: 1px; width: 3px; height: 3px; margin-left: -1.5px;
  border-radius: 50%; background: #c9baa8;
}
.band-sliders::before {
  content: ""; position: absolute; left: 0; right: 0; top: 29px; height: 8px;
  border-radius: 999px; background: #efe6da; box-shadow: inset 0 1px 2px rgba(28, 25, 20, .08);
}
#band-fill {
  position: absolute; top: 29px; height: 8px; border-radius: 999px; pointer-events: none;
  background: linear-gradient(90deg, #1f8a78, #14685a);
  box-shadow: 0 0 0 1px rgba(20, 104, 90, .12);
}
.band-bubble {
  position: absolute; top: 0; z-index: 5; transform: translateX(-50%);
  min-width: 36px; padding: 1px 7px; border-radius: 999px;
  background: var(--ink); color: #f6ead8; font-size: 12px; font-weight: 700;
  line-height: 1.45; text-align: center; pointer-events: none; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 10px rgba(28, 25, 20, .16);
}
.band-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -3px; width: 7px; height: 7px;
  background: inherit; transform: translateX(-50%) rotate(45deg);
}
.band-bubble.max { background: var(--teal); }
.band-bubble.is-same { background: var(--teal-dark); }
.band-bubble.is-hidden { display: none; }
.band-sliders input[type="range"] {
  position: absolute; left: 0; right: 0; top: 18px; width: 100%; margin: 0; height: 30px;
  pointer-events: none; background: transparent; appearance: none; touch-action: none;
}
.band-sliders input[type="range"]::-webkit-slider-runnable-track { height: 8px; background: transparent; }
.band-sliders input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto; appearance: none; width: 24px; height: 24px; margin-top: -8px;
  border-radius: 50%; background: #fffdf9; border: 3px solid var(--teal); cursor: grab;
  box-shadow: 0 2px 8px rgba(20, 104, 90, .28), inset 0 0 0 3px #fffdf9;
}
.band-sliders input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; border-color: var(--teal-dark); box-shadow: 0 0 0 6px rgba(20, 104, 90, .16); }
.band-sliders input[type="range"]::-moz-range-track { height: 8px; background: transparent; border: 0; }
.band-sliders input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; cursor: grab;
  background: #fffdf9; border: 3px solid var(--teal); box-shadow: 0 2px 8px rgba(20, 104, 90, .28);
}
.band-sliders input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(20, 104, 90, .28); }
.band-sliders input.on { z-index: 4; }
.band-scale {
  display: flex; justify-content: space-between; margin: 0 12px;
  color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .point-band { background: linear-gradient(180deg, rgba(143, 208, 194, .08), transparent 46%), var(--card); box-shadow: none; }
html[data-theme="dark"] .band-sliders::before { background: #3a332c; }
html[data-theme="dark"] .band-ticks i { background: #5a5148; }
html[data-theme="dark"] #band-fill { background: linear-gradient(90deg, #8fd0c2, #5eae9e); }
html[data-theme="dark"] .band-sliders input[type="range"]::-webkit-slider-thumb,
html[data-theme="dark"] .band-sliders input[type="range"]::-moz-range-thumb { background: #1c1914; border-color: #8fd0c2; }
html[data-theme="dark"] .band-bubble { background: #f6efe6; color: #1c1914; }
html[data-theme="dark"] .band-bubble.max,
html[data-theme="dark"] .band-bubble.is-same { background: #8fd0c2; color: #10221e; }
html[data-theme="dark"] #band-count { color: #8fd0c2; background: rgba(143, 208, 194, .14); }

.referrer-line { margin: 8px 0 0; font-weight: 700; color: var(--teal-dark); }
html[data-theme="dark"] .referrer-line { color: var(--teal); }

.stats-page { display: grid; gap: 16px; }
.stats-hero {
  display: flex; justify-content: space-between; gap: 18px; align-items: end;
  padding: 22px 22px 18px; border-radius: 22px; color: #fff8ee;
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(232, 215, 168, .45), transparent 60%),
    linear-gradient(135deg, #0e4d43, #14685a 58%, #9a7340);
  box-shadow: var(--shadow);
}
.stats-hero .kicker, .stats-hero p { color: rgba(255, 248, 238, .82); }
.stats-hero h1 { color: #fff8ee; font-size: 64px; line-height: .9; margin: 4px 0 8px; }
.stats-hero h1 small { margin-left: 6px; font-size: 18px; font-family: var(--sans); font-weight: 600; }
.stats-hero p { margin: 0; max-width: 62ch; }
.hero-side { display: grid; gap: 8px; justify-items: end; text-align: right; font-size: 13px; color: rgba(255, 248, 238, .86); }
.delta-pill { border-radius: 999px; padding: 6px 12px; background: rgba(255, 248, 238, .16); font-weight: 700; }
.delta-pill.up { background: #e7f5ee; color: #14685a; }
.delta-pill.down { background: #fdeceb; color: #9d342c; }
.preset-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.preset {
  display: grid; gap: 2px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px;
}
.preset span { color: var(--muted); font-size: 12px; }
.preset b { font-family: var(--serif); font-size: 22px; font-weight: 650; }
.preset:hover { border-color: var(--gold); }
.stats-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.stats-toolbar label { display: grid; gap: 4px; margin: 0; min-width: 150px; color: var(--muted); font-size: 12px; }
.stats-toolbar input, .stats-toolbar button, .stats-toolbar .btn { width: auto; margin: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px 16px 18px; box-shadow: var(--shadow); color: inherit; text-decoration: none;
}
.kpi span { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.kpi b { display: block; margin-top: 4px; font-family: var(--serif); font-size: 32px; }
.kpi small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.kpi i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--teal); }
.kpi.gold i { background: var(--gold); }
.kpi.link:hover { border-color: #c9bba8; }
.col-chart { display: flex; align-items: end; gap: 6px; min-height: 180px; overflow-x: auto; padding: 8px 2px 0; }
.col { flex: 1 0 28px; display: grid; grid-template-rows: 18px 120px auto; justify-items: center; gap: 4px; min-width: 28px; }
.col b { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col span { width: 100%; max-width: 22px; height: 120px; display: flex; align-items: end; background: #f3ecdf; border-radius: 999px; overflow: hidden; }
.col i { display: block; width: 100%; border-radius: inherit; background: linear-gradient(180deg, #8fd0c2, #14685a); }
.col.peak i { background: linear-gradient(180deg, #e8d7a8, #9a7340); }
.col.zero i { background: transparent; }
.col small { color: var(--muted); font-size: 11px; }
.stats-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 18px; }
.week-cell { background: #f7f1e8; border-radius: 14px; padding: 10px 8px; }
.week-cell span, .week-cell small { color: var(--muted); font-size: 12px; }
.week-cell b { display: block; font-family: var(--serif); font-size: 22px; margin: 2px 0 8px; }
.week-cell i { display: block; height: 4px; border-radius: 999px; background: var(--teal); }
.week-cell.peak { background: #14685a; color: #fff8ee; }
.week-cell.peak span { color: rgba(255, 248, 238, .75); }
.week-cell.peak i { background: #e8d7a8; }
.hour-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.hour-cell {
  min-height: 52px; border-radius: 12px; padding: 6px 4px; text-align: center;
  background: rgba(20, 104, 90, calc(var(--heat, 0) * .72 + .06));
  color: var(--ink);
}
.hour-cell b { display: block; font-size: 13px; min-height: 16px; }
.hour-cell small { color: var(--muted); font-size: 10px; }
.rank-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.rank-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; }
.rank-list em {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: #f3ecdf; font-style: normal; font-size: 13px; font-weight: 700;
}
.rank-list li:first-child em { background: #14685a; color: #fff8ee; }
.rank-list strong, .rank-list p { display: block; margin: 0; }
.rank-list p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rank-list b { font-family: var(--serif); font-size: 20px; }
.stats-search { margin-bottom: 12px; }
.member-list { display: grid; gap: 8px; }
.member-chip {
  display: grid; grid-template-columns: 42px 1fr auto auto; gap: 10px; align-items: center;
  text-decoration: none; color: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 16px;
}
.member-chip:hover { border-color: #c9bba8; }
.member-chip .avatar { width: 42px; height: 42px; }
.member-chip strong, .member-chip small { display: block; }
.member-chip small, .chip-meta small { color: var(--muted); font-size: 12px; }
.chip-meta { text-align: right; font-size: 13px; }
.chip-meta small { display: block; }
.stats-page .table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.stats-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; }
.stats-table td { padding: 9px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.stats-table tr.is-peak td { background: rgba(20, 104, 90, .08); }
.stats-table tr.is-zero td { color: var(--muted); }
.day-bar { display: block; height: 8px; min-width: 72px; border-radius: 999px; background: #efe6da; overflow: hidden; }
.day-bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
html[data-theme="dark"] .preset { background: var(--card); }
html[data-theme="dark"] .col span, html[data-theme="dark"] .day-bar, html[data-theme="dark"] .week-cell { background: #3a332c; }
html[data-theme="dark"] .week-cell.peak { background: #8fd0c2; color: #10221e; }
html[data-theme="dark"] .hour-cell { color: #f6efe6; }
html[data-theme="dark"] .rank-list em { background: #3a332c; }
html[data-theme="dark"] .stats-table tr.is-peak td { background: rgba(143, 208, 194, .12); }
@media (max-width: 860px) {
  .stats-hero, .hero-side { display: grid; justify-items: start; text-align: left; }
  .stats-hero h1 { font-size: 52px; }
  .preset-grid, .kpi-grid, .stats-split, .week-grid { grid-template-columns: 1fr 1fr; }
  .hour-grid { grid-template-columns: repeat(6, 1fr); }
  .stats-toolbar, .stats-search { display: grid; }
  .stats-toolbar input, .stats-toolbar button, .stats-toolbar .btn, .stats-search input, .stats-search button { width: 100%; }
  .member-chip { grid-template-columns: 42px 1fr auto; }
  .chip-meta { display: none; }
  .stats-page .stats-table { display: table; min-width: 640px; }
  .stats-page .stats-table tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .stats-page .stats-table tr:first-child { display: table-row; }
  .stats-page .stats-table th, .stats-page .stats-table td { display: table-cell; text-align: left; }
  .stats-page .stats-table td::before { content: none; }
}
.orders-page { display: grid; gap: 16px; }
.orders-hero .btn { margin: 0; background: #fff8ee; color: #14685a; }
.orders-hero .pending-amount {
  display: grid; justify-items: end; gap: 2px;
  padding: 8px 12px; border-radius: 16px; background: rgba(255, 248, 238, .16);
  border: 1px solid rgba(255, 248, 238, .28);
}
.orders-hero .pending-amount b {
  font-family: var(--serif); font-size: 28px; line-height: 1; color: #fff8ee;
}
.orders-hero .pending-amount small {
  font-size: 12px; color: rgba(255, 248, 238, .82); letter-spacing: .04em;
}
@media (max-width: 860px) {
  .orders-hero .pending-amount { justify-items: start; }
}
.order-presets { grid-template-columns: repeat(4, 1fr); }
.orders-page .stats-toolbar .instant { flex: 1; min-width: 180px; margin: 0; }
.order-date-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.order-date-filter label { display: grid; gap: 4px; margin: 0; min-width: 140px; color: var(--muted); font-size: 12px; }
.order-date-filter input, .order-date-filter button, .order-date-filter .btn { width: auto; margin: 0; }
.order-date-filter .date-type { display: flex; gap: 12px; align-items: center; min-height: 40px; }
.order-date-filter .date-type label { display: flex; gap: 4px; align-items: center; min-width: 0; color: var(--ink); font-size: 14px; }
.order-date-filter .muted { align-self: center; }
.order-card { padding: 16px; }
.order-card.dup { border-color: #e3b4ae; background: #fff8f6; }
.order-body .zoom { margin: 0; padding: 0; background: transparent; min-height: 0; border-radius: 14px; }
.order-body .shot, .shot.pdf {
  width: 148px; height: 112px; object-fit: cover; border-radius: 14px; display: grid; place-items: center;
}
.shot.pdf { background: #f3ecdf; color: var(--gold); font-family: var(--serif); text-decoration: none; }
.order-main { min-width: 0; flex: 1; }
.order-amount { display: block; font-family: var(--serif); font-size: 28px; line-height: 1; }
.order-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.order-chips span { border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; font-size: 12px; color: var(--muted); }
.order-chips .bad { border-color: #e3b4ae; background: #fdeceb; color: var(--danger); font-weight: 700; }
.order-chips .gold { border-color: #e4d2a8; background: #fff8ee; color: #6d4e16; }
.order-main .note { margin: 6px 0 0; padding: 8px 10px; border-radius: 12px; background: #f7f1e8; }
.order-main .member-note { margin: 6px 0 0; padding: 8px 10px; border-radius: 12px; background: #fff8ee; border-left: 3px solid #c9a46a; }
.order-main .member-note span { display: block; font-size: 12px; color: #6d4e16; margin-bottom: 2px; font-weight: 650; }
html[data-theme="dark"] .order-main .member-note { background: #2a241c; border-left-color: #c9a46a; }
.approve-row, .reject-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.reject-row { padding-top: 8px; border-top: 1px dashed var(--line); }
.approve-row label { display: grid; gap: 4px; margin: 0; min-width: 140px; color: var(--muted); font-size: 12px; }
.approve-row input, .approve-row button, .reject-row select, .reject-row input, .reject-row button { margin: 0; width: auto; }
.reject-row input { flex: 1; min-width: 140px; }
html[data-theme="dark"] .order-card.dup { background: #3a2422; }
html[data-theme="dark"] .order-main .note, html[data-theme="dark"] .shot.pdf { background: #3a332c; }
@media (max-width: 860px) {
  .order-presets { grid-template-columns: 1fr 1fr; }
  .orders-page .stats-toolbar { display: grid; }
  .orders-page .stats-toolbar input, .orders-page .stats-toolbar button, .orders-page .stats-toolbar .btn { width: 100%; }
  .approve-row, .reject-row { display: grid; }
  .approve-row input, .approve-row button, .reject-row select, .reject-row input, .reject-row button { width: 100%; }
}
.redeem-presets { grid-template-columns: repeat(7, 1fr); }
.pickup-code { margin: 4px 0 8px; font-family: var(--serif); font-size: 28px; letter-spacing: .08em; }
.addr-box { margin: 8px 0 0; padding: 8px 10px; border-radius: 12px; background: #f7f1e8; color: var(--ink); line-height: 1.45; }
html[data-theme="dark"] .addr-box { background: #3a332c; }
@media (max-width: 860px) {
  .redeem-presets { grid-template-columns: 1fr 1fr; }
}
.bday-who { display: flex; gap: 10px; align-items: center; }
.bday-who .avatar { width: 42px; height: 42px; grid-row: auto; }
.bday-who p { margin: 2px 0 0; }
#bday-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 860px) {
  #bday-list { grid-template-columns: 1fr; }
}
.audit-presets { grid-template-columns: repeat(6, 1fr); }
.audit-card strong { display: block; }
.audit-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.bday-hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .8fr); gap: 14px 20px; align-items: end;
  background: radial-gradient(420px 180px at 100% 0%, rgba(232, 215, 168, .55), transparent 60%), linear-gradient(135deg, #6d4e16, #9a7340 55%, #14685a);
}
.bday-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(64px, 1fr)); gap: 8px; margin: 0; }
.bday-hero-stats div { background: rgba(255,248,238,.14); border: 1px solid rgba(255,248,238,.2); border-radius: 14px; padding: 8px 10px; }
.bday-hero-stats b { display: block; color: #fff8ee; font-family: var(--serif); font-size: 22px; line-height: 1; }
.bday-hero-stats span { color: rgba(255,248,238,.78); font-size: 12px; }
.bday-meter-wrap {
  grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 12px; margin: 2px 0 0; padding-top: 12px;
  border-top: 1px solid rgba(255,248,238,.18); color: rgba(255,248,238,.88); font-size: 13px;
}
.bday-meter-label, .bday-meter-pct { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bday-meter-pct { min-width: 3ch; text-align: right; font-weight: 700; }
.bday-meter { display: block; width: auto; min-width: 0; height: 8px; border-radius: 999px; background: rgba(255,248,238,.25); overflow: hidden; }
.bday-meter i { display: block; height: 100%; width: var(--pct); background: #fff8ee; }
.bday-presets { grid-template-columns: repeat(3, 1fr); }
.bday-tools { display: flex; gap: 10px; align-items: center; }
.bday-tools .instant { flex: 1; margin: 0; }
.bday-tools .per-page { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; font-size: 13px; }
.bday-tools .per-page input { width: 72px; margin: 0; }
.bday-tools button { margin: 0; }
.bday-visible, .bday-selected { color: var(--muted); font-size: 13px; white-space: nowrap; }
.bday-batch {
  position: sticky; top: 8px; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.bday-batch button { margin: 0; }
.bday-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.bday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.bday-card {
  position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 14px 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.bday-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #c4a15a; }
.bday-card.done { opacity: .84; }
.bday-card.done::before { background: #2f8f78; }
.bday-card.is-picked { border-color: #c4a15a; box-shadow: 0 0 0 3px rgba(196, 161, 90, .28); }
.bday-check { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.bday-no {
  width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; align-content: center;
  background: #fff8ee; color: #6d4e16; font-family: var(--serif); font-size: 28px; line-height: 1;
}
.bday-no small { display: block; margin-top: 2px; font-family: var(--sans); font-size: 11px; font-weight: 650; }
.bday-card.done .bday-no { background: #eef7f4; color: #14685a; }
.bday-copy strong, .bday-copy p { display: block; margin: 0; }
.bday-copy p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bday-card form, .bday-card button { margin: 0; }
.bday-actions { align-self: end; }
.bday-empty { grid-column: 1 / -1; }
html[data-theme="dark"] .bday-no, html[data-theme="dark"] .bday-card.done .bday-no { background: #3a2e1c; color: #f6ead8; }
html[data-theme="dark"] .bday-batch { background: rgba(28, 24, 20, .92); }
@media (max-width: 860px) {
  .audit-presets, .bday-grid { grid-template-columns: 1fr; }
  .bday-hero { grid-template-columns: 1fr; }
  .bday-hero-stats { grid-template-columns: 1fr 1fr; }
  .bday-meter-wrap { gap: 10px; }
  .bday-tools, .bday-batch { display: grid; }
  .bday-batch { top: auto; bottom: 8px; }
  .bday-card { grid-template-columns: 72px minmax(0, 1fr); }
  .bday-card form, .bday-card .badge, .bday-card .muted { grid-column: 1 / -1; }
  .bday-card button { width: 100%; }
  .bday-check { position: static; grid-column: 1 / -1; }
}
.child-line { margin: 10px 0 12px; padding: 10px 12px; border-radius: 14px; background: #f7f1e8; }
.child-line span, .child-line small { display: block; color: var(--muted); font-size: 12px; }
.child-line b { display: block; margin-top: 2px; }
.child-line.is-birthday { background: #fff8ee; border: 1px solid #e4d2a8; }
.child-line.is-birthday span { color: #6d4e16; font-weight: 700; }
html[data-theme="dark"] .child-line { background: #3a332c; }
html[data-theme="dark"] .child-line.is-birthday { background: #3a2e1c; border-color: #6d4e16; }
.gift-presets { grid-template-columns: repeat(5, 1fr); }
.gift-admin-grid { display: grid; gap: 10px; }
.gift-card {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
}
.gift-card.off { opacity: .72; }
.gift-card.low { border-color: #e3b4ae; }
.gift-card .zoom, .gift-preview {
  width: 56px; height: 56px; margin: 0; padding: 0; min-height: 0;
  background: transparent; border-radius: 10px; overflow: hidden;
}
.gift-card img, .gift-card .gift-icon, .gift-preview img {
  width: 56px; height: 56px; max-width: 56px; object-fit: cover; border-radius: 10px; display: block;
}
.gift-card .gift-icon, .gift-preview { display: grid; place-items: center; background: #f3ecdf; color: var(--gold); font-family: var(--serif); font-size: 18px; }
.gift-cost { display: block; margin-top: 2px; font-family: var(--serif); font-size: 22px; }
.gift-card p { margin: 2px 0 6px; color: var(--muted); font-size: 13px; }
.gift-card .actions { margin-top: 8px; }
.gift-card .actions .btn, .gift-card .actions button { margin: 0; }
.gift-card { scroll-margin-top: 84px; }
.gift-sort { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.gift-sort form, .gift-sort button { margin: 0; }
.gift-sort button { width: 100%; }
.gift-sort button:disabled { opacity: .4; }
html[data-theme="dark"] .gift-card .gift-icon { background: #3a332c; }
@media (max-width: 860px) {
  .gift-presets { grid-template-columns: 1fr 1fr; }
  .gift-card { grid-template-columns: 56px minmax(0, 1fr); }
  .gift-card .zoom, .gift-card img, .gift-card .gift-icon, .gift-preview, .gift-preview img { width: 56px; height: 56px; max-width: 56px; }
  .gift-card .actions { display: grid; }
  .gift-card .actions .btn, .gift-card .actions button { width: 100%; }
}

.date-rule {
  margin: 4px 0 16px;
  padding: 14px;
  border: 1px solid #e4d2a8;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf3, #f7f1e8);
}
.date-rule-top { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; align-items: end; }
.date-rule-top strong { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.date-chips button {
  width: auto; margin: 0; padding: 6px 10px; border-radius: 999px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); font-size: 13px;
}
.date-chips button:hover { border-color: var(--gold); color: #6d4e16; }
.date-preview {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 12px;
  background: #fff; border: 1px dashed #e4d2a8; color: #6d4e16; font-size: 14px;
}
.date-window {
  display: block;
  margin: 0 0 14px; padding: 14px; border-radius: 16px;
  background: linear-gradient(135deg, #fff8ee, #f3ecdf); border: 1px solid #e4d2a8;
}
.date-window .kicker { margin: 0; }
.date-window strong { display: block; margin: 2px 0; font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.date-window span { display: block; color: #6d4e16; font-size: 14px; }
.date-mark {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: var(--ink); color: #f6ead8; font-family: var(--serif); font-size: 18px;
}
.date-window.closed { background: #fdeceb; border-color: #e3b4ae; }
.date-window.closed span { color: var(--danger); }
button:disabled { opacity: .55; cursor: not-allowed; }
html[data-theme="dark"] .date-rule { background: #2a241c; border-color: #6d4e16; }
html[data-theme="dark"] .date-chips button,
html[data-theme="dark"] .date-preview { background: #1b1b1b; color: #efe6da; border-color: #444; }
html[data-theme="dark"] .date-window { background: #2a241c; border-color: #6d4e16; }
html[data-theme="dark"] .date-window span { color: #e8d7a8; }
html[data-theme="dark"] .date-window.closed { background: #4a2422; border-color: #8a403a; }
html[data-theme="dark"] .date-window.closed span { color: #f3c7c3; }
@media (max-width: 720px) {
  .date-rule-top { grid-template-columns: 1fr; }
  .date-window { padding: 10px 12px; }
  .date-window strong, .date-rule-top strong {
    font-family: var(--sans);
    font-size: clamp(12px, 3.5vw, 15px);
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
  }
}

.staff-list { display: grid; gap: 10px; }
.staff-card {
  display: block; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
}
.staff-card summary { list-style: none; cursor: pointer; padding: 12px; }
.staff-card summary::-webkit-details-marker { display: none; }
.staff-card[open] { border-color: var(--gold); }
.staff-edit { display: grid; gap: 10px; padding: 0 12px 12px; border-top: 1px solid var(--line); }
.staff-id { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: center; }
.staff-id .kicker { margin: 0; }
.staff-id strong, .staff-pass b { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.staff-id span, .staff-pass small { display: block; color: var(--muted); font-size: 13px; }
.staff-pass span { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.staff-pass b { margin: 2px 0; word-break: break-all; }
.staff-reset { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.staff-reset input, .staff-reset button, .staff-role select, .staff-role button { margin: 0; }
.staff-role { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.staff-role label { margin: 0; }
.staff-role select { width: auto; min-width: 180px; margin: 0; }
html[data-theme="dark"] .staff-card { background: #1b1b1b; }
@media (max-width: 860px) {
  .staff-card, .staff-reset, .staff-role { grid-template-columns: 1fr; }
  .staff-reset button, .staff-role button, .staff-role select { width: 100%; }
}

.status-pills a.on, .status-pills a:hover { background: #f3ecdf; color: #6d4e16; border-color: #e4d2a8; }
.status-pills a.pill-pending.on { background: #fff6e8; color: #8a5a12; border-color: #e4d2a8; }
.status-pills a.pill-approved.on, .status-pills a.pill-completed.on { background: #e7f5ee; color: #14685a; border-color: #b7d9d1; }
.status-pills a.pill-ready.on, .status-pills a.pill-all.on { background: #fff8ee; color: #6d4e16; border-color: #e4d2a8; }
.status-pills a.pill-shipped.on { background: #e8f4f7; color: #1d5f73; border-color: #c5dde6; }
.status-pills a.pill-rejected.on { background: #fdeceb; color: #9d342c; border-color: #e3b4ae; }
html[data-theme="dark"] .status-pills a.on, html[data-theme="dark"] .status-pills a:hover { background: #2a241c; color: #f6ead8; border-color: #6d4e16; }
html[data-theme="dark"] .status-pills a.pill-pending.on { background: #3a2e1c; color: #f3e2bf; border-color: #6d4e16; }
html[data-theme="dark"] .status-pills a.pill-approved.on, html[data-theme="dark"] .status-pills a.pill-completed.on { background: #1d3a2c; color: #d7f0e6; border-color: #2f6b58; }
html[data-theme="dark"] .status-pills a.pill-ready.on, html[data-theme="dark"] .status-pills a.pill-all.on { background: #2a241c; color: #f6ead8; border-color: #6d4e16; }
html[data-theme="dark"] .status-pills a.pill-shipped.on { background: #1c333a; color: #d5eef5; border-color: #3d6d7a; }
html[data-theme="dark"] .status-pills a.pill-rejected.on { background: #4a2422; color: #f3c7c3; border-color: #8a403a; }
.preset.on, .preset:hover { background: #f3ecdf; color: #6d4e16; border-color: #e4d2a8; }
.preset.on span, .preset:hover span, .preset.on b { color: inherit; }
.preset.pill-pending.on { background: #fff6e8; color: #8a5a12; border-color: #e4d2a8; }
.preset.pill-approved.on, .preset.pill-completed.on { background: #e7f5ee; color: #14685a; border-color: #b7d9d1; }
.preset.pill-ready.on { background: #fff8ee; color: #6d4e16; border-color: #e4d2a8; }
.preset.pill-shipped.on { background: #e8f4f7; color: #1d5f73; border-color: #c5dde6; }
.preset.pill-rejected.on { background: #fdeceb; color: #9d342c; border-color: #e3b4ae; }
html[data-theme="dark"] .preset.on, html[data-theme="dark"] .preset:hover { background: #2a241c; color: #f6ead8; border-color: #6d4e16; }
html[data-theme="dark"] .preset.on span { color: inherit; }
html[data-theme="dark"] .preset.pill-pending.on { background: #3a2e1c; color: #f3e2bf; border-color: #6d4e16; }
html[data-theme="dark"] .preset.pill-approved.on, html[data-theme="dark"] .preset.pill-completed.on { background: #1d3a2c; color: #d7f0e6; border-color: #2f6b58; }
html[data-theme="dark"] .preset.pill-ready.on { background: #2a241c; color: #f6ead8; border-color: #6d4e16; }
html[data-theme="dark"] .preset.pill-shipped.on { background: #1c333a; color: #d5eef5; border-color: #3d6d7a; }
html[data-theme="dark"] .preset.pill-rejected.on { background: #4a2422; color: #f3c7c3; border-color: #8a403a; }

.status-pills a { display: inline-flex; align-items: center; gap: 6px; }
.count-badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: #f0b429; color: #fff; font-style: normal; font-weight: 700;
  font-size: 12px; line-height: 1; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08);
}
html[data-theme="dark"] .count-badge { background: #e0a31f; color: #fff8ee; }

@keyframes flash-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, .15); filter: brightness(1); }
  50% { box-shadow: 0 0 0 5px rgba(240, 180, 41, .45); filter: brightness(1.15); }
}
@keyframes flash-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(29, 95, 115, .12); filter: brightness(1); }
  50% { box-shadow: 0 0 0 5px rgba(80, 170, 196, .45); filter: brightness(1.15); }
}
body.flash-pending .pill-pending .count-badge,
body.flash-pending .badge.pending {
  animation: flash-gold 1.15s ease-in-out infinite;
}
body.flash-dash-receipt .note-pending,
body.flash-dash-receipt .act-history .act-count,
body.flash-dash-redeem .act-gift .act-count {
  animation: flash-gold 1.15s ease-in-out infinite;
}
body.flash-shipped .pill-shipped .count-badge,
body.flash-shipped .badge.shipped {
  animation: flash-blue 1.15s ease-in-out infinite;
}
body.flash-shipped .badge.shipped { background: #e8f4f7; color: #1d5f73; }
html[data-theme="dark"] body.flash-shipped .badge.shipped { background: #1c333a; color: #d5eef5; }
@media (prefers-reduced-motion: reduce) {
  body.flash-pending .pill-pending .count-badge,
  body.flash-pending .badge.pending,
  body.flash-dash-receipt .note-pending,
  body.flash-dash-receipt .act-history .act-count,
  body.flash-dash-redeem .act-gift .act-count,
  body.flash-shipped .pill-shipped .count-badge,
  body.flash-shipped .badge.shipped { animation: none; }
}

.hist-search { display: grid; gap: 8px; align-items: stretch; }
.hist-search-row { display: flex; gap: 8px; align-items: center; }
.hist-search-row input[name="rq"] { flex: 1; min-width: 0; }
.hist-search .date-filter { display: flex; align-items: center; gap: 6px; flex: 1; margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.hist-search .date-filter input { flex: 1; width: auto; min-width: 0; }
@media (max-width: 720px) {
  .hist-search-row { flex-wrap: wrap; }
  .hist-search .date-filter { width: 100%; }
}

.page-size { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 0 8px; flex-wrap: wrap; }
.page-size span, .page-size label { color: var(--muted); font-size: 13px; }
.page-size label { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.page-size select { width: 88px; margin: 0; padding: 8px 10px; }
.panel-head .page-size { margin: 0; }
.hist-list { max-height: none; overflow: visible; }

.boost-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.boost-card {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px; border: 1px solid #e4d2a8; border-radius: 14px; background: #fffaf3;
}
.boost-card.off { opacity: .6; }
.boost-card strong { font-family: var(--serif); font-size: 22px; color: #6d4e16; }
.boost-card p { margin: 2px 0; }
.boost-actions { display: flex; gap: 6px; }
.boost-actions form { margin: 0; }
.boost-actions button { width: auto; margin: 0; padding: 6px 10px; }
.boost-hint {
  margin: -4px 0 12px; padding: 10px 12px; border-radius: 12px;
  background: #fff8ee; border: 1px solid #e4d2a8; color: #6d4e16;
}
.boost-notes { margin: 8px 0 12px; padding-left: 18px; color: #6d4e16; }
.boost-notes li { margin: 4px 0; }
.hist-side small.gold { color: #6d4e16; }
html[data-theme="dark"] .boost-card,
html[data-theme="dark"] .boost-hint { background: #2a241c; border-color: #6d4e16; color: #e8d7a8; }
html[data-theme="dark"] .boost-card strong,
html[data-theme="dark"] .boost-notes,
html[data-theme="dark"] .hist-side small.gold { color: #e8d7a8; }
@media (max-width: 720px) {
  .boost-card { display: grid; }
  .boost-actions { width: 100%; }
  .boost-actions form, .boost-actions button { width: 100%; }
}

.boost-card.on { border-color: var(--gold); }
.boost-days { margin-top: 8px; }
.boost-days summary { cursor: pointer; color: #6d4e16; }
.boost-days ul { margin: 8px 0 0; padding-left: 18px; }
.boost-days li { margin: 3px 0; font-size: 14px; }
html[data-theme="dark"] .boost-days summary { color: #e8d7a8; }

.boost-page { display: grid; gap: 14px; min-width: 0; }
.boost-page .boost-hero { align-items: center; }
.boost-page .boost-hero h1 { font-size: 40px; line-height: 1.05; overflow-wrap: anywhere; }
.boost-page .boost-hero .hero-side { display: grid; justify-items: end; gap: 2px; }
.boost-page .boost-hero .hero-side b { font-family: var(--serif); font-size: 42px; line-height: 1; color: #fff8ee; }
.boost-page .boost-hero .hero-side .btn { margin: 8px 0 0; background: #fff8ee; color: #14685a; }
.boost-page .panel { margin: 0; }
.boost-page button, .boost-page .btn { margin-top: 0; }
.boost-add {
  border: 1px solid #e4d2a8;
  background:
    radial-gradient(280px 120px at 100% 0%, rgba(224, 163, 31, .16), transparent 70%),
    linear-gradient(180deg, #fffaf3, var(--card));
  scroll-margin-top: 84px;
}
.boost-add-head, .boost-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, .8fr); gap: 14px; align-items: start; }
.boost-add h2 { margin: 0 0 6px; }
.boost-preview {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px;
  background: #fff; border: 1px dashed #e4d2a8; min-width: 0;
}
.boost-preview span { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.boost-preview strong { font-family: var(--serif); font-size: 22px; line-height: 1.2; color: #6d4e16; overflow-wrap: anywhere; }
.boost-preview small { color: #6d4e16; }
.boost-lock {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: #fff1d6; color: #8a5a12;
}
.boost-fields label { margin-top: 0; }
.boost-fields .hint { font-weight: 500; }
.boost-fields button[type="submit"] { width: 100%; margin-top: 12px; }
.date-chips button.on { background: #fff8ee; border-color: var(--gold); color: #6d4e16; }
.boost-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.boost-stats .card.on { border-color: var(--gold); background: #fffaf3; }
.boost-toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-width: 0; }
.boost-toolbar .status-pills { margin: 0; min-width: 0; }
.boost-toolbar .instant { flex: 1 1 180px; min-width: 0; margin: 0; }
.boost-toolbar .btn { flex: 0 0 auto; }
.boost-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr); gap: 14px; align-items: start; }
.boost-side { display: grid; gap: 14px; }
.boost-now { display: grid; gap: 2px; margin: 0 0 8px; padding: 10px 12px; border-radius: 14px; background: #fff8ee; border: 1px solid #e4d2a8; }
.boost-now span { font-size: 12px; color: #6d4e16; }
.boost-now strong { font-family: var(--serif); font-size: 20px; line-height: 1.25; color: #6d4e16; overflow-wrap: anywhere; }
.boost-page .boost-list { margin: 0; }
.boost-page .boost-card {
  display: grid; gap: 0; padding: 0; overflow: hidden; align-items: stretch;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.boost-page .boost-card.on { border-color: var(--gold); }
.boost-page .boost-card.is-live { border-color: #e4d2a8; }
.boost-page .boost-card.is-off { opacity: .72; }
.boost-page .boost-card.is-hidden, .boost-page .boost-card[hidden] { display: none !important; }
.boost-page .boost-main {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px;
}
.boost-page .boost-mark {
  width: 72px; height: 72px; display: grid; place-items: center; border-radius: 16px;
  background: #fff8ee; color: #6d4e16; font-family: var(--serif); font-size: 26px;
}
.boost-page .boost-card.is-upcoming .boost-mark { background: #e7f5ee; color: #14685a; }
.boost-page .boost-card.is-past .boost-mark { background: #f6f1ea; color: var(--muted); }
.boost-page .boost-card.is-off .boost-mark { background: #fdeceb; color: var(--danger); }
.boost-page .boost-copy { min-width: 0; }
.boost-page .boost-copy strong, .boost-page .boost-copy p { display: block; overflow-wrap: anywhere; }
.boost-page .boost-copy strong { font-size: 18px; }
.boost-page .boost-copy p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.boost-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.boost-counts span {
  padding: 3px 8px; border-radius: 999px; background: #f6f1ea; color: #6d4e16; font-size: 12px;
}
.boost-counts .is-live { background: #fff1d6; color: #8a5a12; }
.boost-counts .is-upcoming { background: #e7f5ee; color: #14685a; }
.boost-counts .is-past { background: #f6f1ea; color: var(--muted); }
.boost-counts .is-off { background: #fdeceb; color: var(--danger); }
.boost-page .boost-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.boost-page .boost-actions form, .boost-edit form, .boost-delete { margin: 0; }
.boost-page .boost-actions .btn,
.boost-page .boost-actions button { width: auto; margin: 0; padding: 8px 12px; }
.boost-page .boost-days, .boost-edit { border-top: 1px solid var(--line); padding: 0 14px 12px; }
.boost-page .boost-days summary, .boost-edit summary { cursor: pointer; padding: 10px 0; color: #6d4e16; }
.boost-edit-actions { display: flex; gap: 8px; align-items: center; }
.boost-edit-actions button, .boost-delete button { width: auto; }
.boost-delete { margin-top: 8px; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.day-grid div { min-width: 0; padding: 8px 10px; border-radius: 12px; background: #fffaf3; border: 1px solid #e4d2a8; }
.day-grid b, .day-grid span { display: block; overflow-wrap: anywhere; }
.day-grid span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.boost-receipts { display: grid; gap: 8px; }
.boost-receipt {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; background: #fff;
}
.boost-receipt p, .boost-receipt small { display: block; margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.boost-receipt > div:last-child { text-align: right; }
.boost-receipt b { display: block; font-family: var(--serif); }
.boost-fold { padding: 0 16px 14px; }
.boost-fold summary {
  cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 0;
  font-family: var(--serif); font-size: 22px; list-style: none;
}
.boost-fold summary::-webkit-details-marker { display: none; }
.boost-fold summary small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; }
.boost-copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.boost-copy-grid h3 { margin: 4px 0 8px; font-size: 15px; }
.boost-copy-form button { margin-top: 12px; }
html[data-theme="dark"] .boost-stats .card.on,
html[data-theme="dark"] .day-grid div,
html[data-theme="dark"] .boost-page .boost-mark,
html[data-theme="dark"] .boost-preview,
html[data-theme="dark"] .boost-now { background: #2a241c; color: #e8d7a8; border-color: #6d4e16; }
html[data-theme="dark"] .boost-receipt { background: #1b1b1b; }
html[data-theme="dark"] .boost-counts span { background: #2a241c; color: #e8d7a8; }
html[data-theme="dark"] .boost-add { background: #241f1a; }
html[data-theme="dark"] .boost-lock { background: #3a2e1c; color: #f3e2bf; }
@media (max-width: 860px) {
  .boost-stats { grid-template-columns: 1fr 1fr; }
  .boost-page .boost-hero h1 { font-size: 32px; }
  .boost-page .boost-hero .hero-side { justify-items: start; }
  .boost-add-head, .boost-fields, .boost-layout, .boost-copy-grid { grid-template-columns: 1fr; }
  .boost-page .boost-main { grid-template-columns: 64px minmax(0, 1fr); }
  .boost-page .boost-actions { grid-column: 1 / -1; justify-content: stretch; }
  .boost-page .boost-actions form { flex: 1 1 0; }
  .boost-page .boost-actions .btn,
  .boost-page .boost-actions button { width: 100%; margin: 0; }
}
@media (max-width: 640px) {
  .boost-stats, .boost-toolbar { grid-template-columns: 1fr; display: grid; }
  .boost-toolbar .btn, .boost-fields button[type="submit"], .boost-edit-actions button, .boost-delete button { width: 100%; }
  .boost-receipt { grid-template-columns: 1fr; }
  .boost-receipt > div:last-child { text-align: left; }
}

.hist-side .boost-note { display: grid; gap: 1px; margin-top: 4px; color: #6d4e16; font-size: 12px; line-height: 1.3; text-align: right; }
.hist-side .boost-note span:first-child { letter-spacing: .04em; }
html[data-theme="dark"] .hist-side .boost-note { color: #e8d7a8; }

.tier-spend { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.tier-spend b { color: var(--ink); font-weight: 650; }
.tier-progress { display: block; margin-top: 4px; color: var(--gold); font-size: 13px; }
.tier-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #efe6da; color: var(--gold); font-size: 12px; }
.tier-pills { margin: 8px 0 4px; }
.tier-count-note { margin: 0 0 10px; }
.member-row b small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.card.stat small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
html[data-theme="dark"] .tier-badge { background: #3a2e1c; color: #e0a31f; }
html[data-theme="dark"] .tier-spend b { color: var(--ink); }

.tier-icon { width: 28px; height: 28px; object-fit: cover; border-radius: 8px; vertical-align: middle; margin-right: 6px; background: #efe6da; }
.tier-icon-mini { width: 18px; height: 18px; border-radius: 5px; margin: 0 0 2px; }
.tier-icon-empty { display: inline-block; }
.tier-name { display: flex; align-items: center; gap: 6px; }
.tier-icon-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tier-icon-form input[type=file] { max-width: 180px; font-size: 12px; }
.points-meter .tier-icon-mini { position: relative; z-index: 1; }
.member-row b small .tier-icon { width: 16px; height: 16px; border-radius: 4px; }
.card.stat b .tier-icon { width: 22px; height: 22px; }
html[data-theme="dark"] .tier-icon { background: #3a2e1c; }

.tier-page .tier-pick { cursor: pointer; text-align: left; font: inherit; color: inherit; }
.tier-page .card.tier-pick { width: 100%; }
.tier-page .tier-pick.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.tier-analysis { margin-top: 12px; }
.tier-bar-note { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.tier-bar { display: flex; height: 32px; border-radius: 999px; overflow: hidden; background: #efe6da; margin: 8px 0 12px; }
.tier-bar i { display: flex; align-items: center; justify-content: center; min-width: 8px; height: 100%; font-size: 11px; font-weight: 700; }
.tier-bar i b { font-weight: 700; }
.tier-bar-empty { flex: 1; color: var(--muted); background: transparent !important; }
.tier-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.tier-legend-kicker { flex: 1 0 100%; margin: 6px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.tier-legend .tier-pick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 10px; }
.tier-legend i { width: 10px; height: 10px; border-radius: 99px; }
.tier-legend .tier-up { border-style: dashed; }
.tier-board { display: grid; gap: 8px; }
.tier-board-head, .tier-board-row { display: grid; grid-template-columns: 1.35fr .72fr .62fr .52fr .52fr auto; gap: 10px; align-items: center; }
.tier-mult-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tier-mult-note { color: var(--muted); font-size: 11px; line-height: 1.2; }
.tier-inline.tier-mult { text-align: center; border-radius: 10px; }
.tier-inline.tier-mult.is-plain { color: var(--muted); }
.tier-inline.tier-mult.is-extra { color: #6d4e16; font-weight: 700; background: #f3e2b8; }
.tier-stat-mult { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #f3e2b8; color: #6d4e16; font-style: normal; font-weight: 700; }
html[data-theme="dark"] .tier-inline.tier-mult.is-extra,
html[data-theme="dark"] .tier-stat-mult { color: #e0a31f; background: #3a2e1c; }
.tier-board-head { color: var(--muted); font-size: 12px; padding: 0 8px; }
.tier-board-row { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.tier-inline { width: 100%; border: 0; border-bottom: 1px dashed transparent; background: transparent; font: inherit; color: inherit; padding: 4px 2px; }
.tier-inline:hover, .tier-inline:focus { border-bottom-color: var(--gold); outline: none; background: #fff8ee; }
.tier-inline.is-saving { opacity: .55; }
.tier-inline.is-saved { border-bottom-color: #2f7d4a; }
.tier-money { font-variant-numeric: tabular-nums; }
.tier-count { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border: 0; background: #efe6da; color: var(--gold); border-radius: 12px; min-width: 64px; height: auto; padding: 4px 8px; font-weight: 700; cursor: pointer; line-height: 1.15; }
.tier-count small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }
.tier-icon-hit { display: inline-flex; cursor: pointer; }
.tier-icon-hit input { display: none; }
.tier-icon-empty { width: 28px; height: 28px; border: 1px dashed var(--line); border-radius: 8px; }
.tier-add { max-width: 420px; }
#tier-members { margin-top: 12px; }
html[data-theme="dark"] .tier-inline:hover, html[data-theme="dark"] .tier-inline:focus { background: #2a241c; }
html[data-theme="dark"] .tier-count { background: #3a2e1c; color: #e0a31f; }
@media (max-width: 760px) {
  .tier-board-head { display: none; }
  .tier-board-row { grid-template-columns: 1fr 1fr; }
  .tier-board-row .actions { grid-column: 1 / -1; }
}

.dash-points > b { color: var(--teal); }
.dash-points .tier-spend,
.redeem-balance .tier-spend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--gold);
}
.dash-points .tier-spend b,
.redeem-balance .tier-spend b,
.dash-points .tier-amount,
.redeem-balance .tier-amount {
  display: inline;
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--gold);
}
.dash-points .tier-kicker,
.redeem-balance .tier-kicker { font-size: 12px; color: var(--gold); }
.dash-points .tier-spend .tier-icon,
.redeem-balance .tier-spend .tier-icon { width: 18px; height: 18px; margin: 0; }
.dash-points .tier-progress,
.redeem-balance .tier-progress { font-size: 12px; }
html[data-theme="dark"] .dash-points > b { color: #fff8ee; }
html[data-theme="dark"] .dash-points .tier-spend,
html[data-theme="dark"] .dash-points .tier-spend b,
html[data-theme="dark"] .dash-points .tier-kicker,
html[data-theme="dark"] .redeem-balance .tier-spend,
html[data-theme="dark"] .redeem-balance .tier-spend b,
html[data-theme="dark"] .redeem-balance .tier-kicker { color: #e0a31f; }
.nav-sort-block { margin-top: 22px; padding-top: 8px; border-top: 1px solid var(--line); }
.nav-sort-block h2, .nav-sort-block h3 { margin: 14px 0 8px; }
.nav-sort { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.nav-sort li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; position: relative; }
.nav-sort li.is-dragging { opacity: .85; outline: 2px solid var(--gold); box-shadow: var(--shadow); background: #fffaf1; z-index: 2; }
.nav-move { display: flex; gap: 4px; flex: 0 0 auto; }
.nav-sort .drag, .nav-sort .step { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; margin: 0; padding: 0; cursor: pointer; touch-action: none; user-select: none; background: #f7f1e8; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.nav-sort .drag { cursor: grab; font-weight: 700; touch-action: none; -webkit-user-select: none; }
.nav-sort li.is-dragging { z-index: 5; }
.nav-sort .drag:active { cursor: grabbing; }
.nav-sort label { margin: 0; flex: 0 0 auto; white-space: nowrap; }
.nav-sort label.check input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; }
.nav-name { flex: 1; min-width: 0; width: auto; margin: 0; padding: 6px 8px; min-height: 40px; text-align: left; background: transparent; border: 1px dashed transparent; border-radius: 8px; color: inherit; font: inherit; }
.nav-name:hover, .nav-name:focus { border-color: var(--gold); background: #fffaf1; }
.nav-name input { width: 100%; margin: 0; padding: 2px 6px; min-height: 32px; }
.nav-name.is-saved { border-color: #2f7d4a; }
.nav-name.is-error { border-color: #9d342c; }
.nav-status { flex: 0 0 auto; min-width: 4.5em; color: var(--muted); font-size: 12px; text-align: right; }
.nav-status.is-ok { color: #146b38; }
.nav-status.is-bad { color: #9d342c; }
html[data-theme="dark"] .nav-sort li { background: #1c1815; }

.expiry-soon {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 16px;
  background: #fff4df; color: #6d4e16; border: 1px solid #e4d3b0;
  font-weight: 700;
}
.notice-wa { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.wa-btn { border-color: #1f8a4c; color: #146b38; }
.wa-btn:hover { background: #eef8f2; }
.expiry-range { margin: 0 0 12px; }
html[data-theme="dark"] .expiry-soon { background: #3a2e1c; color: #f6ead8; border-color: #6d5a38; }
html[data-theme="dark"] .wa-btn { color: #b7e7c8; border-color: #2f7d4a; }
html[data-theme="dark"] .wa-btn:hover { background: #1c2a22; }

.expiry-page { display: grid; gap: 14px; }
.expiry-hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .8fr); gap: 14px 20px; align-items: end;
  background: radial-gradient(420px 180px at 100% 0%, rgba(255, 214, 140, .5), transparent 62%), linear-gradient(135deg, #7a3414, #c47b2b 46%, #9a7340);
}
.expiry-hero .bday-hero-stats { margin: 0; }
.expiry-presets { grid-template-columns: repeat(3, 1fr); }
.expiry-pill small { color: var(--muted); font-size: 12px; }
.expiry-pill.on { border-color: #c47b2b; box-shadow: inset 0 0 0 1px #c47b2b; }
.expiry-pill-expired.on { border-color: #9d342c; box-shadow: inset 0 0 0 1px #9d342c; }
.expiry-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.expiry-tools .instant { flex: 1; min-width: 180px; margin: 0; }
.expiry-tools .per-page { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; font-size: 13px; }
.expiry-tools .per-page input { width: 72px; margin: 0; }
.expiry-tools button, .expiry-tools .btn { margin: 0; }
.expiry-visible { color: var(--muted); font-size: 13px; white-space: nowrap; }
.expiry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.expiry-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow);
}
.expiry-card.tone-today { border-color: #e3b4ae; background: #fff8f6; }
.expiry-card.tone-soon { border-color: #e4d3b0; background: #fffaf1; }
.expiry-card.tone-over { border-color: #d9d3cc; background: #f6f4f1; }
.exp-date {
  display: grid; place-items: center; align-content: center; min-height: 72px;
  border-radius: 14px; background: #fff4df; color: #6d4e16; text-align: center;
}
.exp-date b { font-family: var(--serif); font-size: 28px; line-height: .9; }
.exp-date small { font-size: 12px; font-weight: 700; }
.tone-today .exp-date { background: #9d342c; color: #fff8ee; }
.tone-soon .exp-date { background: #c47b2b; color: #fff8ee; }
.tone-over .exp-date { background: #8a8178; color: #fff8ee; }
.exp-head, .exp-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.exp-head a { color: inherit; text-decoration: none; }
.exp-points { font-family: var(--serif); font-size: 28px; line-height: 1; }
.exp-points small { margin-left: 2px; font-family: var(--sans); font-size: 13px; font-weight: 650; }
.exp-copy p { margin: 2px 0 8px; }
.exp-state { font-weight: 700; }
.tone-today .exp-state { color: #9d342c; }
.tone-soon .exp-state { color: #8a5a12; }
.tone-over .exp-state { color: #6d675f; }
.exp-meter { height: 6px; margin: 10px 0 12px; border-radius: 999px; background: #efe7dc; overflow: hidden; }
.exp-meter i { display: block; height: 100%; background: #c47b2b; }
.tone-today .exp-meter i { background: #9d342c; }
.tone-over .exp-meter i { background: #8a8178; }
.exp-actions .btn { margin: 0; min-height: 40px; }
.exp-actions .wa-btn { flex: 1; text-align: center; background: #146b38; color: #fff; border-color: #146b38; }
.exp-actions .wa-btn:hover { background: #0f552c; }
.expiry-empty { grid-column: 1 / -1; }
.expiry-card.is-hidden, .expiry-card[hidden] { display: none !important; }
html[data-theme="dark"] .expiry-card.tone-today { background: #3a2422; border-color: #8a463f; }
html[data-theme="dark"] .expiry-card.tone-soon { background: #3a2e1c; border-color: #6d5a38; }
html[data-theme="dark"] .expiry-card.tone-over { background: #2a2724; border-color: #4a453f; }
html[data-theme="dark"] .exp-meter { background: #2a241e; }
html[data-theme="dark"] .tone-soon .exp-state { color: #f0d7a4; }
html[data-theme="dark"] .tone-today .exp-state { color: #f0b2ab; }
@media (max-width: 860px) {
  .expiry-hero, .expiry-presets, .expiry-grid { grid-template-columns: 1fr; }
  .expiry-hero .bday-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .expiry-visible { white-space: normal; }
}

@media (max-width: 640px) {
  .nav-sort li { flex-wrap: wrap; }
  .nav-name { flex: 1 1 140px; }
  .nav-status { width: 100%; text-align: left; }
}

.home-hello { margin: 0 0 6px; font-size: 16px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }

.ledger-list { display: grid; gap: 10px; min-width: 0; }
.ledger-card {
  min-width: 0; max-width: 100%; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
}
.ledger-card p {
  display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 8px 12px;
  align-items: start; margin: 0; padding: 8px 0;
  border-top: 1px solid var(--line);
}
.ledger-card p:first-child { border-top: 0; }
.ledger-card span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.ledger-card b {
  min-width: 0; font-weight: 650; text-align: right; line-height: 1.45;
  overflow-wrap: anywhere; word-break: break-word;
}
.ledger-card b.up { color: #14685a; }
.ledger-card b.down { color: #9d342c; }
.ledger-top { margin-bottom: 28px; }
html[data-theme="dark"] .ledger-card b.up { color: #8fd0c2; }
html[data-theme="dark"] .ledger-card b.down { color: #f0b2ac; }

.file-page { display: grid; gap: 12px; }
.file-presets { grid-template-columns: repeat(4, 1fr); }
.file-presets .preset.on { border-color: #9a7340; background: #fff8ee; }
.file-presets .preset.is-warn b, .file-presets .preset.is-warn.on { color: #9d342c; }
.file-presets .preset.is-warn.on { background: #fff6f4; border-color: #e7c4bf; }
.file-money b { color: #9a7340; }
.file-per span { color: var(--muted); font-size: 13px; }
.file-jumps { display: flex; flex-wrap: wrap; gap: 6px; }
.file-jumps a {
  text-decoration: none; color: #5e5348; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700;
}
.file-jumps a.on, .file-jumps a:hover { background: #1f1a14; color: #f8f1e6; border-color: #1f1a14; }
.file-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file-search input, .file-search select { width: auto; min-width: 140px; margin: 0; }
.file-search button { width: auto; margin: 0; }
.file-live-note { margin: -4px 0 0; color: var(--muted); font-size: 12.5px; }
.file-empty { margin: 0; color: var(--muted); }
.file-list { display: grid; gap: 10px; }
.file-card {
  display: grid; grid-template-columns: 112px 1fr auto; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  border-left: 4px solid #e4d2a8;
}
.file-card.is-pending { border-left-color: #c9842a; }
.file-card.is-approved { border-left-color: #14685a; }
.file-card.is-rejected { border-left-color: #9d342c; }
.file-card.is-missing { border-color: #e7c4bf; background: #fff8f6; border-left-color: #9d342c; }
.file-thumb, .file-thumb img { width: 112px; height: 84px; border-radius: 14px; object-fit: cover; display: block; }
.file-thumb { border: 0; padding: 0; background: #f6efe6; color: #8a7348; display: grid; place-items: center; font-weight: 700; cursor: zoom-in; }
.file-thumb.missing, .file-thumb.pdf { background: #f6e4e1; color: #9d342c; text-decoration: none; cursor: pointer; }
.file-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.file-meta a { color: inherit; text-decoration: none; }
.file-meta a:hover { color: #9a7340; }
.file-rows { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0; color: #5e5348; font-size: 13px; }
.file-path {
  margin: 0; font-size: 12.5px; color: #6d4e16; background: #fff8ee;
  display: flex; gap: 8px; align-items: center; border-radius: 10px; padding: 5px 8px; overflow-wrap: anywhere;
}
.file-path span { flex: none; background: #f3e2bf; color: #6d4e16; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.file-side { text-align: right; display: grid; gap: 6px; justify-items: end; }
.file-side b { font-family: var(--serif); font-size: 22px; }
.file-side a { color: #9a7340; font-weight: 700; text-decoration: none; }
html[data-theme="dark"] .file-presets .preset.on { background: #3a2e1c; color: #f6ead8; }
html[data-theme="dark"] .file-card.is-missing { background: #3a2422; }
html[data-theme="dark"] .file-path { background: #3a2e1c; color: #f6ead8; }
html[data-theme="dark"] .file-path span { background: #6d4e16; color: #fff8ee; }
html[data-theme="dark"] .file-jumps a { background: #1c1914; color: #e7dccb; }
html[data-theme="dark"] .file-jumps a.on { background: #f6ead8; color: #1c1914; }
@media (max-width: 860px) {
  .file-presets { grid-template-columns: 1fr 1fr; }
  .file-card { grid-template-columns: 84px 1fr; }
  .file-thumb, .file-thumb img { width: 84px; height: 64px; }
  .file-side { grid-column: 1 / -1; text-align: left; justify-items: start; }
  .file-side b { font-size: 18px; }
  .file-search input, .file-search select, .file-search button { width: 100%; }
}

.bonus-panel { margin: 0 0 16px; }
.bonus-panel .panel-head { align-items: baseline; }
.bonus-stats { margin: 4px 0 14px; }
.bonus-rules {
  margin-top: 12px; padding: 12px 14px; border: 1px solid #e4d2a8;
  border-radius: 14px; background: #fff8ee;
}
.bonus-rules p { margin: 0 0 8px; }
.bonus-rules p:last-child { margin-bottom: 0; }
.bonus-rules strong { color: #6d4e16; }
html[data-theme="dark"] .bonus-rules { background: #3a2e1c; border-color: #6d4e16; }
html[data-theme="dark"] .bonus-rules, html[data-theme="dark"] .bonus-rules strong { color: #f6ead8; }\n
.login-page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); gap: 28px; align-items: start; }
.login-title { margin: 0 0 8px; max-width: none; font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.6; letter-spacing: 0; }
.login-points { margin-top: 16px; max-width: none; }
.login-points p {
  margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card);
}
.login-points p:last-child { margin-bottom: 0; }
.login-points strong { color: var(--teal-dark); }
.login-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.login-perks article {
  padding: 12px 14px; border-radius: 16px; background: #fff8ee;
  border: 1px solid #e4d2a8;
}
.login-perks span { display: block; color: #6d4e16; font-size: 12px; letter-spacing: 0.06em; }
.login-perks strong { display: block; margin-top: 4px; font-size: 16px; line-height: 1.35; }
.login-card { position: sticky; top: 84px; }
.login-after { grid-column: 1 / -1; }
.login-after .lede { max-width: none; color: var(--ink); }
.login-card h2 { margin: 0 0 4px; font-size: 28px; }
.login-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.login-form label { margin-top: 0; }
.login-form input { min-height: 48px; font-size: 16px; }
.pass-field { position: relative; }
.pass-field input { padding-right: 72px; }
.pass-toggle {
  position: absolute; top: 6px; right: 6px; margin: 0; min-height: 36px;
  padding: 0 12px; border-radius: 10px; background: #efe6da; color: var(--ink);
}
.login-go, .login-reg { width: 100%; min-height: 48px; margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.login-go svg, .login-reg svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-go { margin-top: 16px; font-weight: 700; }
.login-reg { margin-top: 16px; }
.forgot-wa {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 20px 0 4px; color: #25d366; font-weight: 650; text-decoration: none;
}
.forgot-wa svg { width: 18px; height: 18px; }
.forgot-wa:hover { text-decoration: underline; }
.login-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 12px 0; color: var(--muted); font-size: 13px; }
.login-or::before, .login-or::after { content: ""; height: 1px; background: var(--line); }
html[data-theme="dark"] .login-points p { background: var(--card); }
html[data-theme="dark"] .login-perks article { background: #3a2e1c; border-color: #6d4e16; }
html[data-theme="dark"] .login-perks span, html[data-theme="dark"] .login-perks strong { color: #f6ead8; }
html[data-theme="dark"] .pass-toggle { background: #3a332c; color: #f6efe6; }
@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; gap: 16px; }
  .login-card { position: static; order: -1; }
  .login-after { order: 0; }
  .login-story { order: 1; }
  .login-title { font-size: 16px; font-weight: 400; }
  .login-perks { grid-template-columns: 1fr; }
}

.tier-ladder {
  margin-top: 16px;
  padding: 22px 18px 16px;
  background: #fffaf3;
  border-color: #f0e4cf;
  text-align: center;
}
.tier-ladder h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0.08em;
}
.tier-ladder h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin: 10px auto 0;
  background: #e4d2a8;
}
.tier-ladder-spend { margin: 12px 0 14px; color: #b68b3c; font-weight: 700; }
.tier-ladder-card {
  text-align: left;
  background: #fff;
  border: 1px solid #f3eadc;
  border-radius: 22px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(120, 86, 32, 0.04);
}
.tier-ladder ol { list-style: none; margin: 0; padding: 0; }
.tier-ladder li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 4px 0;
  padding: 10px 12px;
  border-radius: 16px;
}
.tier-ladder li.is-now { background: #fff6e4; }
.tier-ladder li strong { display: block; font-size: 16px; }
.tier-ladder li small { display: block; margin-top: 2px; color: #b68b3c; font-size: 13px; }
.tier-ladder li em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #eadcc4;
  border-radius: 999px;
  background: #fff;
  color: #8a7044;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}
.tier-ladder li.is-now em { border-color: #e0b15a; background: #e0b15a; color: #fff; font-weight: 700; }
.tier-ladder li b { color: #b68b3c; font-size: 16px; font-variant-numeric: tabular-nums; }
.tier-ladder li b small { display: block; margin-top: 2px; color: #8a7044; font-size: 11px; font-weight: 500; line-height: 1.35; white-space: normal; }

.tier-ladder .tier-icon, .tier-ladder-mark {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; margin: 0;
}
.tier-ladder-mark {
  display: grid; place-items: center; background: #f8f1e4; color: #b68b3c; font-size: 13px;
}
.tier-ladder-meter {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 6px 8px 8px;
  color: #b68b3c;
  font-size: 13px;
  font-weight: 700;
}
.tier-ladder-meter .tier-ladder-mark { width: 28px; height: 28px; font-size: 12px; }
.tier-ladder-meter i { display: block; height: 8px; border-radius: 999px; background: #f3eadc; overflow: hidden; }
.tier-ladder-meter b { display: block; height: 100%; border-radius: 999px; background: #e0b15a; }
.tier-ladder-note { margin: 14px 0 0; color: #8a7044; font-size: 13px; line-height: 1.55; }
.tier-ladder-note::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 16px; height: 16px; margin-right: 6px;
  border: 1px solid #e0b15a; border-radius: 50%;
  color: #b68b3c; font-size: 11px; font-weight: 700;
}
html[data-theme="dark"] .tier-ladder { background: #2a241c; border-color: #4a3d2c; }
html[data-theme="dark"] .tier-ladder-card { background: #241f1a; border-color: #4a3d2c; }
html[data-theme="dark"] .tier-ladder li.is-now { background: #3a2e1c; }
html[data-theme="dark"] .tier-ladder li em { background: #2a241c; border-color: #6d4e16; color: #e8d7a8; }
html[data-theme="dark"] .tier-ladder li.is-now em { background: #e0a31f; border-color: #e0a31f; color: #2a241c; }
html[data-theme="dark"] .tier-ladder-mark, html[data-theme="dark"] .tier-ladder-meter i { background: #3a332c; }
@media (max-width: 860px) {
  .tier-ladder h2 { font-size: 28px; }
  .tier-ladder li { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .tier-ladder li b { grid-column: 3; }
  .tier-ladder li em { grid-column: 2 / -1; justify-self: start; }
}

.order-batch {
  position: sticky; top: 8px; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px;
  background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.order-batch button { margin: 0; }
.order-pick, .order-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.order-check input, .order-pick input { width: 18px; height: 18px; margin: 0; }
.order-selected { color: var(--muted); font-size: 13px; }
.order-card.is-picked { border-color: #c4a15a; box-shadow: 0 0 0 3px rgba(196, 161, 90, .28); }
html[data-theme="dark"] .order-batch { background: rgba(28, 24, 20, .92); }
@media (max-width: 860px) {
  .order-batch { top: auto; bottom: 8px; display: grid; grid-template-columns: 1fr; }
  .order-batch button { width: 100%; }
  .order-selected { white-space: normal; }
}

.date-panel { scroll-margin-top: 72px; }
.date-panel .date-rule { margin-top: 0; }
.date-rule input[type="date"] { width: 100%; min-height: 44px; }
.date-rule-top label { display: grid; gap: 4px; margin: 0; }

.dash-hello { position: relative; }
.hello-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; }
.hello-row .home-hello { flex: 1; min-width: 0; margin: 0; }
.hello-row .secret { font-weight: 650; }
button.privacy-eye {
  flex: 0 0 32px; width: 32px; height: 32px; min-width: 32px; min-height: 32px; max-width: 32px;
  margin: 0; padding: 0; border-radius: 999px; border: 1px solid #e4d2a8;
  background: #fff8ee; color: #9a7340; box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center;
}
button.privacy-eye svg { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
button.privacy-eye .eye-off { display: none; }
button.privacy-eye.is-hidden .eye-on { display: none; }
button.privacy-eye.is-hidden .eye-off { display: block; }
.referral-spotlight b.secret {
  display: inline; margin: 0; font-family: inherit; font-size: inherit;
  letter-spacing: 0; font-weight: 650; line-height: inherit;
}
html[data-theme="dark"] button.privacy-eye { background: #3a2e1c; border-color: #6d4e16; color: #f6ead8; }

/* submit.php beautified form */
.submit-form { display: grid; gap: 4px; }
.submit-form .field { margin: 6px 0 2px; }
.submit-form .field > label {
  display: block; margin: 0 0 6px; font-size: 14px; font-weight: 650; color: var(--ink);
}
.submit-form .field-control {
  position: relative; display: flex; align-items: center;
}
.submit-form .field-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--gold); pointer-events: none; display: grid; place-items: center;
  z-index: 1;
}
.submit-form .field-control input {
  padding-left: 40px; min-height: 46px;
}
.submit-form .hint {
  display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 400;
}
.submit-form .boost-hint { margin: 4px 0 8px; }

.upload-box { position: relative; }
.upload-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.upload-label {
  display: grid; place-items: center; gap: 4px; text-align: center;
  min-height: 128px; padding: 18px 16px; margin: 0;
  border: 1.5px dashed #d9cec2; border-radius: 16px;
  background: #fffaf3; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.upload-label:hover, .upload-box.is-drag .upload-label {
  border-color: var(--gold); background: #fff8ee;
}
.upload-label strong { font-size: 15px; font-weight: 650; color: var(--ink); }
.upload-icon { color: var(--gold); margin-bottom: 2px; }
.upload-name {
  margin-top: 6px; font-size: 13px; color: #6d4e16; font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upload-preview {
  display: block; max-width: 100%; max-height: 220px; margin: 8px auto 4px;
  border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid #e4d2a8;
}
.upload-change { font-size: 13px; color: var(--teal); font-weight: 600; margin-top: 2px; }
.upload-box.has-file .upload-icon,
.upload-box.has-file .upload-label > strong { display: none; }
.upload-box.has-file .upload-label { min-height: 0; padding: 12px; }
.upload-box.has-file .upload-label { border-style: solid; border-color: #c9bba8; background: #fff; }
.upload-box.has-file .upload-icon { color: var(--teal); }

.submit-btn {
  width: 100%; margin-top: 16px; min-height: 50px;
  background: linear-gradient(180deg, #c4a06a, #9a7340); color: #fff8ee;
  border: 0; border-radius: 14px; font-weight: 650; font-size: 16px;
  box-shadow: 0 4px 14px rgba(154, 115, 64, .22);
}
.submit-btn:hover:not(:disabled) { filter: brightness(1.05); }
.submit-btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }

html[data-theme="dark"] .upload-label { background: #2a241c; border-color: #6d4e16; }
html[data-theme="dark"] .upload-label:hover,
html[data-theme="dark"] .upload-box.is-drag .upload-label { background: #3a2e1c; }
html[data-theme="dark"] .upload-box.has-file .upload-label { background: #1c1815; border-color: #6d4e16; }
html[data-theme="dark"] .upload-name { color: #e8d7a8; }
html[data-theme="dark"] .submit-btn { background: linear-gradient(180deg, #b08a52, #7a5a30); }

/* member notices */
.notice-admin { display: grid; grid-template-columns: minmax(280px, 0.9fr) 1.1fr; gap: 16px; align-items: start; }
.notice-list { display: grid; gap: 12px; }
.notice-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fffaf3; }
.notice-card.off { opacity: .65; }
.notice-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.notice-card strong { font-family: var(--serif); font-size: 18px; }
.notice-card p { margin: 4px 0 8px; white-space: pre-wrap; }
.notice-card small { color: var(--muted); display: block; margin-bottom: 10px; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.notice-actions form, .notice-actions button, .notice-actions .btn { margin: 0; }
.status-pill { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #efe6da; color: var(--muted); }
.status-pill.status-顯示中 { background: #e7f5ee; color: var(--ok); }
.status-pill.status-已下架, .status-pill.status-已結束 { background: #fdeceb; color: var(--danger); }
.status-pill.status-未開始 { background: #fff8ee; color: #6d4e16; }

.member-notices { display: grid; gap: 10px; margin: 0 0 16px; }
.member-notice {
  position: relative; padding: 14px 40px 14px 16px;
  border: 1px solid #e4d2a8; border-left: 4px solid var(--gold);
  border-radius: 16px; background: #fffaf3;
}
.member-notice-kicker { font-size: 12px; letter-spacing: .08em; color: #6d4e16; margin-bottom: 4px; }
.member-notice strong { display: block; font-family: var(--serif); font-size: 20px; margin-bottom: 4px; }
.member-notice p { margin: 0; line-height: 1.55; }
.member-notice-close {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  border: 0; background: transparent; color: var(--muted); font-size: 20px;
  line-height: 1; margin: 0; padding: 0; min-height: 0; border-radius: 8px;
}
.member-notice-close:hover { background: #efe6da; color: var(--ink); }
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .member-notice { background: #2a241c; border-color: #6d4e16; }
html[data-theme="dark"] .member-notice-kicker { color: #e8d7a8; }

.order-date-line { margin: 4px 0 10px; }
.date-chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: #fff8ee; border: 1px solid #e4d2a8; color: #6d4e16;
  font-size: 13px; font-weight: 650;
}
.prev-approved {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: #faf6f1; border: 1px solid var(--line);
}
.prev-kicker { font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 650; }
.prev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.prev-list li {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  padding: 3px 0; border-bottom: 1px dashed #efe6da;
}
.prev-list li:last-child { border-bottom: 0; }
.prev-amt { font-weight: 700; min-width: 88px; }
.prev-date { color: var(--muted); }
.prev-flag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--danger);
  background: #fdeceb; border: 1px solid #e3b4ae; border-radius: 999px;
  padding: 2px 7px;
}
.prev-list li.is-dup .prev-amt { color: var(--danger); }
html[data-theme="dark"] .date-chip { background: #2a241c; border-color: #6d4e16; color: #e8d7a8; }
html[data-theme="dark"] .prev-approved { background: #2a241c; border-color: #3a332c; }
html[data-theme="dark"] .prev-list li { border-bottom-color: #3a332c; }
html[data-theme="dark"] .prev-flag { background: #3a2422; border-color: #e3b4ae; }

@media (max-width: 860px) {
  .notice-admin { grid-template-columns: 1fr; }
}
