/* สีหลัก/สีแต้มถูกเขียนทับจาก JS ตามแบรนด์ของแต่ละร้าน (white-label) */
:root {
  --bg: #F4F5F1;
  --surface: #FFFFFF;
  --ink: #15201A;
  --ink-2: #47534C;
  --ink-3: #66716A;
  --line: #E2E6E0;
  --line-2: #D5DBD3;
  --soft: #EEF0EC;
  --signal: #06C755;
  --danger: #A32626;
  --danger-tint: #FBE7E7;

  --primary: #0B6B39;
  --primary-hover: #095A30;
  --primary-tint: #E5F1E8;
  --primary-ink: #0B6B39;
  --on-primary: #FFFFFF;
  --accent: #C98A1E;
  --accent-tint: #FBEFD9;
  --accent-ink: #8F5000;

  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-display: 'Anuphan', 'IBM Plex Sans Thai Looped', sans-serif;
  --font-body: 'IBM Plex Sans Thai Looped', 'Noto Sans Thai', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
p { margin: 0; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--ink-2); font-size: 14px; }
.muted-sm { color: var(--ink-3); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }

.mock-banner {
  position: sticky; top: 0; z-index: 20;
  padding: 6px 12px; text-align: center; font-size: 12px;
  background: #15201A; color: #D8DED9;
}

/* ---------- views ---------- */
.view { min-height: 100dvh; display: flex; flex-direction: column; }
.view.enter-fwd { animation: view-in-fwd 0.36s var(--ease) both; }
.view.enter-back { animation: view-in-back 0.36s var(--ease) both; }
@keyframes view-in-fwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes view-in-back { from { opacity: 0; transform: translateX(-28px); } }

.view-body {
  flex: 1;
  padding: 22px 20px 24px;
  display: flex; flex-direction: column; gap: 18px;
}
.view-body.center-top { align-items: stretch; padding-top: 44px; }

.action-bar {
  position: sticky; bottom: 0; z-index: 10;
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex; gap: 14px;
}
.action-bar.stacked { flex-direction: column; gap: 10px; }
.action-bar.row { align-items: center; }
.action-bar.plain { background: transparent; border-top: 0; }
.action-bar > .btn-primary:only-child { flex: 1; }
.sum { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sum strong { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.sum strong.bump { animation: bump 0.35s var(--ease); }
@keyframes bump { 0% { transform: translateY(6px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- buttons ---------- */
.btn-primary, .btn-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 22px; border: 0; border-radius: 14px;
  background: var(--primary); color: var(--on-primary);
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  transition: background 0.2s, transform 0.12s, opacity 0.2s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active, .btn-dark:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }
.btn-primary.compact { height: 52px; font-size: 16px; flex-shrink: 0; }
.btn-primary.loading { pointer-events: none; opacity: 0.75; }
.stacked .btn-primary, .stacked .btn-dark { width: 100%; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-text {
  height: 48px; border: 0; background: transparent; border-radius: 14px;
  color: var(--primary-ink); font-weight: 500; font-size: 15px;
}
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--ink); background: var(--surface);
  font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration: none;
}
.btn-outline.small { height: 44px; border-color: var(--line-2); font-weight: 500; }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.text-btn { border: 0; background: none; color: var(--primary-ink); font-weight: 500; font-size: 13.5px; padding: 8px 4px; }
.ghost-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}

/* ---------- home ---------- */
.shop { display: flex; align-items: center; gap: 12px; }
.shop-logo {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 15px; overflow: hidden;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
}
.shop-logo img, .mc-logo img, .mini-service-icon img, .svc-thumb img, .reward-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.shop-logo.has-img { background: var(--surface); border: 1px solid var(--line); }
.shop-meta { display: flex; flex-direction: column; min-width: 0; }
.shop-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.shop-sub { font-size: 13px; color: var(--ink-2); }
.shop-sub:empty { display: none; }
.shop-hours { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.open-dot { width: 7px; height: 7px; border-radius: 50%; background: #B9C0BA; }
.open-dot.on { background: var(--signal); box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.15); }

.greet { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.greet-sub { font-size: 15px; color: var(--ink-2); }
.greet-title { font-weight: 700; font-size: 28px; line-height: 1.25; letter-spacing: -0.01em; }

.points-link {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
}
.points-link-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  background: var(--accent-tint); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.points-link-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.points-link-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.points-link-top strong { font-size: 15px; }
.chev { color: var(--ink-3); flex-shrink: 0; }

.bar { display: block; height: 5px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 3px; transition: width 0.9s var(--ease); }
.bar-fill.accent { background: var(--accent); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.section-head h2 { font-weight: 600; font-size: 18px; }

.service-list { display: flex; flex-direction: column; gap: 12px; }
.svc {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.12s;
  animation: rise 0.4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.svc:active { transform: scale(0.99); }
.svc[aria-pressed="true"] {
  border: 1.5px solid var(--primary); padding: 13.5px;
  box-shadow: 0 8px 20px -12px var(--primary);
}
.svc-thumb {
  width: 72px; height: 72px; flex-shrink: 0; border-radius: 14px; overflow: hidden;
  background: var(--primary-tint); color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center;
}
.svc-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.svc-name { font-weight: 600; font-size: 16px; line-height: 1.35; }
.svc-meta { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.svc-meta .price { font-weight: 600; color: var(--ink); }
.svc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.chip {
  align-self: flex-start; font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 999px;
  background: var(--soft); color: var(--ink-2);
}
.svc[aria-pressed="true"] .chip { background: var(--primary-tint); color: var(--primary-ink); }
.svc-radio {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid #CDD3CC; color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.svc-radio svg { opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.25s var(--ease); }
.svc[aria-pressed="true"] .svc-radio { background: var(--primary); border-color: var(--primary); }
.svc[aria-pressed="true"] .svc-radio svg { opacity: 1; transform: none; }

.trust-line { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-3); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- topbar / progress ---------- */
.topbar { display: flex; align-items: center; gap: 12px; }
.topbar-title { display: flex; flex-direction: column; gap: 1px; }
.topbar-title h1 { font-weight: 700; font-size: 21px; }
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: -4px; }
.progress i { height: 4px; border-radius: 2px; background: #DDE2DB; position: relative; overflow: hidden; }
.progress i::after {
  content: ''; position: absolute; inset: 0; background: var(--primary);
  transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.progress[data-step="2"] i:nth-child(-n+2)::after,
.progress[data-step="3"] i:nth-child(-n+3)::after,
.progress[data-step="4"] i::after { transform: scaleX(1); }

/* ---------- datetime ---------- */
.mini-service {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
}
.mini-service-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: var(--primary-tint); color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center;
}
.mini-service-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mini-service-body strong { font-size: 14.5px; }

.month-row { display: flex; align-items: center; justify-content: space-between; }
.month-label { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.month-label.flip { animation: bump 0.3s var(--ease); }

.date-strip {
  margin: -6px -20px 0; padding: 6px 20px 8px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-track { position: relative; display: flex; gap: 8px; width: max-content; }
.date-indicator {
  position: absolute; top: 0; left: 0; height: 76px; width: 56px;
  border-radius: 16px; background: var(--ink);
  box-shadow: 0 10px 22px -12px rgba(21, 32, 26, 0.7);
  transition: transform 0.42s var(--ease), opacity 0.2s;
  opacity: 0;
}
.date-chip {
  position: relative; z-index: 1;
  width: 56px; height: 76px; flex-shrink: 0; scroll-snap-align: center;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  animation: rise 0.4s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms);
}
.date-chip .dow { font-size: 12px; color: var(--ink-3); transition: color 0.25s; }
.date-chip .day { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.2; }
.date-chip .avail { width: 6px; height: 6px; border-radius: 50%; margin-top: 3px; background: transparent; }
.date-chip .avail.good { background: var(--primary); }
.date-chip .avail.few { background: var(--accent); }
.date-chip .tag { font-size: 11px; font-weight: 600; margin-top: 1px; }
.date-chip[aria-pressed="true"] { background: transparent; border-color: transparent; color: #fff; }
.date-chip[aria-pressed="true"] .dow { color: #C3CBC5; }
.date-chip[aria-pressed="true"] .avail.good { background: #fff; }
.date-chip:disabled { background: var(--soft); border-style: dashed; border-color: var(--line-2); color: #8E978F; cursor: not-allowed; }
.date-chip:disabled .dow { color: #8E978F; }

.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); margin-top: -6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.ldot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ldot.good { background: var(--primary); }
.ldot.few { background: var(--accent); }
.ldot.none { background: #C9CFC9; }

.slot-wrap { display: flex; flex-direction: column; gap: 18px; min-height: 120px; }
.slot-group { display: flex; flex-direction: column; gap: 10px; }
.slot-group-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.slot-group-label span { font-weight: 400; color: var(--ink-3); }
.slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot {
  height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; font-variant-numeric: tabular-nums;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  animation: slot-in 0.34s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms);
}
.slot:disabled { background: var(--soft); border-color: #E8EBE6; color: #9AA29C; text-decoration: line-through; cursor: not-allowed; }
.slot[aria-pressed="true"] {
  background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600;
  animation: pop 0.28s var(--ease);
}
@keyframes slot-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes pop { 0% { transform: scale(0.92); } 60% { transform: scale(1.04); } 100% { transform: none; } }

.slot-empty, .slot-loading {
  padding: 28px 16px; border-radius: 14px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-2);
  color: var(--ink-3); font-size: 14px;
}
.skeleton-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.skeleton-grid i {
  height: 46px; border-radius: 12px;
  background: linear-gradient(90deg, var(--soft) 0%, #F8F9F6 50%, var(--soft) 100%);
  background-size: 200% 100%; animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- info ---------- */
.card {
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
}
.summary-title { font-size: 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.icon-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.icon-line svg { color: var(--primary-ink); flex-shrink: 0; }
.icon-line.big { font-size: 15px; color: var(--ink); }
.divider { height: 1px; background: var(--soft); }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv > span { color: var(--ink-3); }

.fields { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field input, .input-row input {
  height: 50px; width: 100%; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 16px; font-weight: 400; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .input-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }
.field-note { font-size: 13px; font-weight: 500; }
.field-note.ok { color: var(--primary-ink); }
.field-note.bad { color: var(--danger); }

.choice { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
.choice legend { padding: 0; margin-bottom: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.choice-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.choice-card input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.choice-card > span { display: flex; flex-direction: column; gap: 2px; }
.choice-card strong { font-size: 15px; }
.choice-card:has(input:checked) { border: 1.5px solid var(--primary); padding: 13.5px; background: var(--primary-tint); }

.error {
  padding: 10px 12px; border-radius: 12px;
  background: var(--danger-tint); color: var(--danger); font-size: 14px;
}

/* ---------- payment ---------- */
.pay-card { align-items: center; gap: 10px; padding: 20px; border-radius: 20px; }
.pay-amount {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: 1.15; color: var(--primary-ink);
}
.strike { font-size: 18px; color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.qr-frame {
  width: 216px; height: 216px; margin: 6px 0 4px; padding: 10px;
  border-radius: 18px; border: 1px solid var(--line); background: #fff;
}
.qr-frame img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-2); }
.steps li { display: flex; align-items: center; gap: 10px; }
.steps span {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.upload {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, white); background: var(--primary-tint);
  cursor: pointer; transition: border-color 0.2s;
}
.upload.has-file { border-style: solid; border-color: var(--primary); }
.upload-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  background: var(--surface); color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center;
}
.upload-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.upload-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slip-thumb { width: 44px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- status ---------- */
.status-mark { align-self: center; width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.status-ring {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.5s var(--ease) both;
}
.status-mark svg { display: none; }
.status-mark[data-state="waiting"] { background: var(--accent-tint); }
.status-mark[data-state="waiting"] .status-ring { background: var(--accent); color: #fff; }
.status-mark[data-state="waiting"] .mark-clock { display: block; }
.status-mark[data-state="confirmed"] { background: var(--primary-tint); }
.status-mark[data-state="confirmed"] .status-ring { background: var(--primary); color: var(--on-primary); }
.status-mark[data-state="confirmed"] .mark-check { display: block; }
.status-mark[data-state="confirmed"] .mark-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.5s 0.2s var(--ease) forwards; }
.status-mark[data-state="rejected"] { background: var(--danger-tint); }
.status-mark[data-state="rejected"] .status-ring { background: var(--danger); color: #fff; }
.status-mark[data-state="rejected"] .mark-x { display: block; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.status-title { text-align: center; font-weight: 700; font-size: 27px; margin-top: -4px; }
.status-text { text-align: center; color: var(--ink-2); font-size: 15px; line-height: 1.55; max-width: 300px; align-self: center; margin-top: -8px; }

.ticket {
  position: relative; margin-top: 6px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  animation: rise 0.5s 0.15s var(--ease) both;
}
.ticket-top { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.ticket-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.ticket-head strong { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.35; }
.ticket-cut { position: relative; margin: 0 18px; border-top: 2px dashed var(--line); }
.ticket-cut::before, .ticket-cut::after {
  content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.ticket-cut::before { left: -30px; clip-path: inset(0 0 0 50%); }
.ticket-cut::after { right: -30px; clip-path: inset(0 50% 0 0); }
.ticket-bottom { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.ticket-bottom strong { font-weight: 500; }

.pill { flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pill.waiting { background: var(--accent-tint); color: var(--accent-ink); }
.pill.confirmed { background: var(--primary-tint); color: var(--primary-ink); }
.pill.rejected { background: var(--danger-tint); color: var(--danger); }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
}
.note svg { flex-shrink: 0; color: var(--primary-ink); }
.note.accent { background: var(--accent-tint); border-color: transparent; color: var(--accent-ink); align-items: center; animation: rise 0.5s 0.3s var(--ease) both; }
.note.accent svg { color: var(--accent-ink); }

/* ---------- rewards ---------- */
.member-card {
  position: relative; overflow: hidden;
  padding: 22px; border-radius: 22px;
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column; gap: 18px;
  animation: card-in 0.6s var(--ease) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px) rotateX(8deg); } }
.mc-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.09); pointer-events: none; }
.mc-ring.r1 { width: 230px; height: 230px; left: -90px; bottom: -150px; }
.mc-ring.r2 { width: 150px; height: 150px; left: -50px; bottom: -110px; }
.mc-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mc-head > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-shop { font-size: 12.5px; color: #B4BEB7; }
.mc-name { font-size: 16px; font-weight: 600; }
.mc-logo {
  width: 54px; height: 54px; flex-shrink: 0; border-radius: 15px; overflow: hidden;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff;
}
.mc-logo.has-img { background: #fff; border-color: transparent; }
.mc-points { position: relative; display: flex; align-items: baseline; gap: 8px; }
.mc-num { font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.mc-unit { font-size: 16px; color: #D8DED9; }
.mc-total { margin-left: auto; font-size: 12.5px; color: #B4BEB7; }
.mc-progress { position: relative; display: flex; flex-direction: column; gap: 8px; }
.mc-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.mc-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 1s 0.3s var(--ease); }
.mc-next { font-size: 13px; color: #D8DED9; }
.mc-next strong { color: color-mix(in srgb, var(--accent) 55%, white); }

.empty { gap: 4px; }
#rewardsCatalog { display: flex; flex-direction: column; gap: 12px; }
.reward-list { display: flex; flex-direction: column; gap: 10px; }
.reward {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  animation: rise 0.4s var(--ease) both; animation-delay: calc(0.2s + var(--i, 0) * 70ms);
}
.reward-thumb {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 14px; overflow: hidden;
  background: var(--accent-tint); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.reward.muted-row .reward-thumb { background: var(--soft); color: var(--ink-3); }
.reward-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.reward-body strong { font-size: 15px; }
.pill.ok { background: var(--primary-tint); color: var(--primary-ink); }
.pill.off { background: var(--soft); color: var(--ink-2); }

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