/* ==========================================================================
   水票 · 设计基底
   实体票券的形制感 + 水的清透，克制、不喧哗
   ========================================================================== */
:root {
  --ink: #14201e;
  --ink-2: #586a67;
  --ink-3: #90a09d;
  --line: #e2eae8;
  --line-2: #eef3f2;
  --paper: #ffffff;
  --bg: #f3f7f6;
  --teal: #0e5c63;
  --teal-2: #16787f;
  --teal-soft: #e3f0ef;
  --seal: #c0503c;
  --seal-soft: #fbedea;
  --gold: #a97c34;
  --radius: 16px;
  --glass: rgba(255, 255, 255, 0.92);
  --gold-soft: #fffdf8;
  --halo: rgba(22, 120, 127, 0.09);
  --btn-glow: rgba(14, 92, 99, 0.22);
  --shadow-sm: 0 1px 2px rgba(20, 32, 30, 0.04), 0 2px 8px rgba(20, 32, 30, 0.04);
  --shadow-md: 0 2px 4px rgba(20, 32, 30, 0.04), 0 8px 24px rgba(20, 32, 30, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 内联图标默认尺寸，避免 SVG 撑满容器 */
svg { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.section-head .more svg, .topbar .more svg, .topbar a svg { width: 14px; height: 14px; }
.picker .chev svg { width: 16px; height: 16px; }
.tabbar button svg { width: 21px; height: 21px; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { overscroll-behavior-y: none; }

button { font-family: inherit; font-size: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- 布局骨架 ---------- */
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  animation: fadeUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.wrap { padding: 0 18px; }

/* ---------- 顶部 ---------- */
.topbar {
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar.blur::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(243, 247, 246, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  z-index: -1;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
  margin-bottom: 3px;
}
.brand small {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
/* 品牌标识：矢量图标，随文字基线垂直居中 */
.brand-mark { width: 22px; height: 22px; border-radius: 7px; display: block; flex: none; align-self: center; }

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }

/* ---------- 余额卡 ---------- */
.balance {
  margin: 6px 18px 0;
  background: var(--paper);
  border-radius: 20px;
  padding: 20px 20px 17px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.balance::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -58px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--halo, rgba(22, 120, 127, 0.09)), transparent 68%);
}
.balance .label {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.balance .figure {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 2px;
}
.balance .figure b {
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
}
.balance .figure span { font-size: 14px; color: var(--ink-2); }

.waterbar {
  height: 7px;
  border-radius: 99px;
  background: var(--teal-soft);
  margin: 14px 0 8px;
  overflow: hidden;
  position: relative;
}
.waterbar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal-2), var(--teal));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.balance .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.balance .meta b { color: var(--ink-2); font-weight: 500; }

/* ---------- 主行动 ---------- */
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 16px 18px 0;
  height: 52px;
  border-radius: 15px;
  background: var(--teal);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 18px var(--btn-glow, rgba(14, 92, 99, 0.22));
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  width: calc(100% - 36px);
}
.primary:active { transform: scale(0.985); box-shadow: 0 3px 10px var(--btn-glow, rgba(14, 92, 99, 0.2)); }
.primary:disabled { background: var(--teal); opacity: 0.32; box-shadow: none; }
.primary.ghost {
  background: var(--paper);
  color: var(--teal);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* ---------- 指标条 ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 18px 0;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.metric {
  padding: 14px 8px;
  text-align: center;
  position: relative;
}
.metric + .metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: var(--line-2);
}
.metric b {
  display: block;
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.metric span { font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }
.metric .accent { color: var(--seal); }

/* ---------- 区块标题 ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 18px 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head h2::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--teal);
}
.section-head .more {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ---------- 票券 ---------- */
.ticket {
  position: relative;
  background: var(--paper);
  border-radius: 14px;
  padding: 14px 15px 13px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 12px;
  overflow: hidden;
  border-left: 3px solid var(--teal);
}
.ticket + .ticket { margin-top: 12px; }
.ticket.featured { border-left-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft, #fffdf8), var(--paper)); }
.ticket .body { flex: 1; min-width: 0; }
.ticket .route {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.ticket .route b { color: var(--ink); font-weight: 500; }
.ticket .route .arrow { color: var(--teal); font-size: 11px; opacity: 0.7; }
.ticket .comment {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink);
  letter-spacing: 0.01em;
  word-break: break-word;
}
.ticket .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.ticket .foot .badge {
  font-size: 10px;
  color: var(--gold);
  border: 1px solid rgba(169, 124, 52, 0.35);
  border-radius: 4px;
  padding: 0 4px;
  letter-spacing: 0.06em;
}

/* 朱印：票数 */
.seal {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  position: relative;
  color: var(--seal);
  border: 1.5px solid rgba(192, 80, 60, 0.62);
  background: var(--seal-soft);
  transform: rotate(-7deg);
}
.seal b {
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.seal i {
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.18em;
  line-height: 1;
  margin-top: 2px;
  opacity: 0.8;
}
.seal::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  border: 0.5px solid rgba(192, 80, 60, 0.22);
}

/* 撕票齿孔 */
.ticket .perf {
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 6px;
  background-image: radial-gradient(circle at 0 6px, var(--bg) 2px, transparent 2.2px);
  background-size: 6px 12px;
  background-repeat: repeat-y;
  opacity: 0.9;
  pointer-events: none;
}

/* ---------- 横向精选 ---------- */
.rail {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  padding: 2px 18px 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: 0 0 82%; }
.rail .ticket { margin-top: 0; }

/* ---------- 空态 ---------- */
.empty {
  text-align: center;
  padding: 34px 20px;
  color: var(--ink-3);
  font-size: 13px;
}
.empty .glyph { font-size: 26px; opacity: 0.35; margin-bottom: 8px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--glass, rgba(255, 255, 255, 0.92));
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line-2);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
}
.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  padding: 4px 0;
  transition: color 0.18s;
}
.tabbar button svg { width: 21px; height: 21px; stroke-width: 1.6; }
.tabbar button.on { color: var(--teal); }
.tabbar button.on svg { stroke-width: 2; }

/* ---------- 写票页 ---------- */
.write-head {
  padding: 4px 18px 0;
}
.write-head h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 8px 0 5px;
  letter-spacing: -0.01em;
}
.write-head p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }

.field { margin: 20px 18px 0; }
.field > label {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.picker {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--paper);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  text-align: left;
  transition: box-shadow 0.18s;
}
.picker:active { box-shadow: inset 0 0 0 1px var(--line); }
.picker .name { font-size: 15px; font-weight: 500; }
.picker .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.picker .chev { margin-left: auto; color: var(--ink-3); font-size: 16px; }
.picker.placeholder .name { color: var(--ink-3); font-weight: 400; }

.textarea-wrap {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 14px 15px 10px;
}
.textarea-wrap textarea {
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  min-height: 108px;
  font-size: 15px;
  line-height: 1.66;
  background: transparent;
  letter-spacing: 0.01em;
}
.textarea-wrap textarea::placeholder { color: #b6c3c0; }
.textarea-wrap .counter {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-3);
  border-top: 1px solid var(--line-2);
  padding-top: 8px;
  margin-top: 6px;
}
.textarea-wrap .counter .warn { color: var(--seal); }

/* 票数选择 */
.qty {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.qty button {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 16px 8px 13px;
  text-align: center;
  transition: all 0.18s;
  border: 1.5px solid transparent;
}
.qty button b {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.qty button span { font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }
.qty button.on {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.qty button.on b { color: var(--teal); }
.qty button:disabled { opacity: 0.4; }

.hint {
  margin: 10px 18px 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
  display: flex;
  gap: 6px;
}
.hint .mark { color: var(--teal); flex-shrink: 0; }

.submit-bar {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  padding: 10px 18px 12px;
  background: linear-gradient(180deg, transparent, var(--bg) 42%);
  z-index: 25;
}
.submit-bar.solo { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

/* ---------- 人员选择弹层 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 28, 0.42);
  z-index: 60;
  animation: fade 0.2s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet .grab {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: #d3dddb;
  margin: 9px auto 4px;
}
.sheet .sheet-head {
  padding: 8px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet .sheet-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.search {
  margin: 0 18px 8px;
  background: var(--paper);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  box-shadow: var(--shadow-sm);
}
.search input {
  border: 0;
  outline: none;
  flex: 1;
  background: transparent;
  font-size: 14px;
}
.people-list {
  overflow-y: auto;
  padding: 4px 12px 12px;
  -webkit-overflow-scrolling: touch;
}
.group-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  padding: 12px 6px 6px;
}
.person-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 8px;
  border-radius: 12px;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.person-row:active { background: var(--paper); }
.person-row .name { font-size: 14.5px; font-weight: 450; }
.person-row .sub { font-size: 11px; color: var(--ink-3); }

/* ---------- 商城 ---------- */
.goods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  padding: 0 18px;
}
.goods {
  background: var(--paper);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
}
.goods:active { transform: scale(0.985); }
.goods .thumb {
  height: 94px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: var(--tint, #eef4f3);
  border-bottom: 1px solid var(--line-2);
}
.goods .thumb svg { width: 34px; height: 34px; color: var(--tone, #3f8b8a); }
.goods .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.7), transparent 62%);
}
.goods .info { padding: 10px 11px 11px; }
.goods .info .nm {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.goods .info .pc {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 7px;
  color: var(--seal);
  font-variant-numeric: tabular-nums;
}
.goods .info .pc b { font-size: 17px; font-weight: 600; }
.goods .info .pc span { font-size: 11px; color: var(--ink-3); }
.goods .info .stock { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.goods .info .stock.low { color: var(--seal); }

.balance-chip {
  position: sticky;
  top: calc(52px + env(safe-area-inset-top, 0px));
  margin: 0 18px 12px;
  background: var(--teal);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(14, 92, 99, 0.2);
}
.balance-chip b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 我的 ---------- */
.profile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 6px 18px 0;
}
.profile .nm { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.profile .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.panel {
  background: var(--paper);
  border-radius: 16px;
  margin: 12px 18px 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel .row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
.panel .row + .row { border-top: 1px solid var(--line-2); }
.panel .row .val { margin-left: auto; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.panel .row .val.strong { color: var(--ink); font-weight: 500; }

/* 外观主题（个人偏好，各自选各自生效） */
.theme-panel { padding: 13px 15px 15px; }
.tp-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.tp-head span { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.tp-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 11px; }
.tp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 4px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tp i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.tp.on {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 500;
}

.ledger-item {
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  align-items: flex-start;
}
.ledger-item + .ledger-item { border-top: 1px solid var(--line-2); }
.ledger-item .text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.55; }
.ledger-item .text .who { color: var(--ink-2); font-size: 12px; }
.ledger-item .text .cm {
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ledger-item .delta {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.delta.plus { color: var(--seal); }
.delta.minus { color: var(--ink-3); }

.status-pill {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.status-pill.pending { background: #fff4e2; color: #9a6a1e; }
.status-pill.shipped { background: var(--teal-soft); color: var(--teal); }
.status-pill.done { background: #eef3f2; color: var(--ink-3); }
.status-pill.approved { background: var(--teal-soft); color: var(--teal); }
.status-pill.rejected { background: #f4f6f5; color: var(--ink-3); }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: 100%;
  max-width: 560px;
  padding: 0 24px;
}
.toast {
  background: rgba(20, 32, 30, 0.94);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 11px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 100%;
  text-align: center;
  line-height: 1.5;
}
.toast.err { background: rgba(160, 52, 38, 0.96); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ---------- 登录（演示身份切换） ---------- */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.login h1 { font-size: 27px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
.login p { color: var(--ink-2); font-size: 13.5px; margin: 0 0 24px; line-height: 1.7; }
.login .pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.login .pick-list button {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--paper);
  padding: 11px 13px;
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.login .pick-list .nm { font-size: 14.5px; font-weight: 500; }
.login .pick-list .sub { font-size: 11.5px; color: var(--ink-3); }
.login .tag {
  margin-left: auto;
  font-size: 10px;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 7px;
  border-radius: 99px;
}

/* ---------- 细节 ---------- */
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.gap8 { display: flex; gap: 8px; align-items: center; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  height: 80px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--line-2) 25%, var(--paper) 50%, var(--line-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  margin-bottom: 10px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }


/* ==========================================================================
   主题
   aqua 水青（默认） · sunset 暖阳 · cream 蜜桃 · candy 糖果
   通过 <html data-theme="..."> 切换，仅覆盖色彩与质感，不动布局
   ========================================================================== */

/* ---- 暖阳：柿子橙 + 奶油底，温暖但仍然是办公场景 ---- */
[data-theme="sunset"] {
  --ink: #3a2620;
  --ink-2: #7c6152;
  --ink-3: #ab8e7d;
  --line: #edddcd;
  --line-2: #f6ecdf;
  --paper: #fffdf9;
  --bg: #faf1e6;
  --teal: #c95f1e;
  --teal-2: #de7630;
  --teal-soft: #fae7d5;
  --seal: #bf4a30;
  --seal-soft: #fae9e2;
  --gold: #c08a2d;
  --shadow-sm: 0 1px 2px rgba(96, 52, 20, 0.05), 0 2px 8px rgba(96, 52, 20, 0.05);
  --shadow-md: 0 2px 4px rgba(96, 52, 20, 0.05), 0 8px 24px rgba(96, 52, 20, 0.08);
  --glass: rgba(255, 251, 244, 0.92);
  --gold-soft: #fff8ec;
  --halo: rgba(201, 95, 30, 0.1);
  --btn-glow: rgba(201, 95, 30, 0.24);
}

/* ---- 蜜桃：奶油粉底，圆滚滚的卡通质感 ---- */
[data-theme="cream"] {
  --ink: #43303a;
  --ink-2: #83636f;
  --ink-3: #b0929c;
  --line: #f2dde2;
  --line-2: #faeef0;
  --paper: #fffbfa;
  --bg: #fdeff0;
  --teal: #d95f7e;
  --teal-2: #e67893;
  --teal-soft: #fce4ea;
  --seal: #d4574d;
  --seal-soft: #fdeae6;
  --gold: #cf9440;
  --shadow-sm: 0 1px 2px rgba(120, 60, 80, 0.05), 0 2px 10px rgba(120, 60, 80, 0.06);
  --shadow-md: 0 2px 4px rgba(120, 60, 80, 0.05), 0 8px 24px rgba(120, 60, 80, 0.09);
  --glass: rgba(255, 250, 250, 0.92);
  --gold-soft: #fff4f2;
  --halo: rgba(217, 95, 126, 0.11);
  --btn-glow: rgba(217, 95, 126, 0.26);
}

/* ---- 糖果：亮橘黄，最有「卡通贴纸」味的一档 ---- */
[data-theme="candy"] {
  --ink: #46311f;
  --ink-2: #7f6a54;
  --ink-3: #b09a80;
  --line: #f3e3c4;
  --line-2: #faf1dc;
  --paper: #fffdf3;
  --bg: #fff4d6;
  --teal: #f07f1f;
  --teal-2: #fa9032;
  --teal-soft: #ffead0;
  --seal: #e04b3a;
  --seal-soft: #feeae2;
  --gold: #dfa614;
  --shadow-sm: 0 1px 2px rgba(140, 90, 20, 0.06), 0 2px 10px rgba(140, 90, 20, 0.06);
  --shadow-md: 0 2px 4px rgba(140, 90, 20, 0.06), 0 8px 24px rgba(140, 90, 20, 0.1);
  --glass: rgba(255, 253, 242, 0.94);
  --gold-soft: #fff8df;
  --halo: rgba(240, 127, 31, 0.13);
  --btn-glow: rgba(240, 127, 31, 0.28);
}

/* ---- 卡通化质感：蜜桃 / 糖果共用 ---- */
[data-theme="cream"] .ticket,
[data-theme="candy"] .ticket {
  border-radius: 20px;
  box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--line);
}
[data-theme="cream"] .panel,
[data-theme="candy"] .panel {
  border-radius: 20px;
}
[data-theme="cream"] .panel .row + .row::before,
[data-theme="candy"] .panel .row + .row::before {
  border-color: var(--line-2);
}
[data-theme="cream"] .avatar,
[data-theme="candy"] .avatar {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--teal-soft);
}
[data-theme="cream"] .metric,
[data-theme="candy"] .metric {
  border-radius: 18px;
}
[data-theme="cream"] .brand .dot,
[data-theme="candy"] .brand .dot {
  width: 8px;
  height: 8px;
}

/* 暖色主题里，身份色降一点饱和度，避免高饱和色块抢戏 */
[data-theme="sunset"] .avatar,
[data-theme="cream"] .avatar,
[data-theme="candy"] .avatar {
  filter: saturate(0.62) brightness(1.04);
}

/* ---------- 商城：图片与评分角标 ---------- */
.goods .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.goods .thumb .thumb-score {
  position: absolute; right: 7px; bottom: 7px; z-index: 2;
  background: rgba(255, 255, 255, .92); color: var(--gold);
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 99px;
  box-shadow: 0 1px 4px rgba(20, 32, 30, .12);
}
.goods .info .goods-tip { font-size: 10.5px; color: var(--teal); margin-top: 3px; }

/* ---------- 想要什么福利（建议入口） ---------- */
.sug-entry {
  display: flex; align-items: center; gap: 11px;
  width: calc(100% - 36px); margin: 16px 18px 0; padding: 13px 14px;
  background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-sm);
  text-align: left;
}
.sug-entry:active { transform: scale(.99); }
.sug-entry .sug-icon {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px;
  display: grid; place-items: center; background: var(--teal-soft); color: var(--teal);
}
.sug-entry .sug-icon svg { width: 17px; height: 17px; }
.sug-entry b { display: block; font-size: 13.5px; font-weight: 600; }
.sug-entry i { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.sug-entry .chev { margin-left: auto; color: var(--ink-3); }

/* ---------- 商品详情弹层 ---------- */
.gs { max-height: 90vh; }
.gs .gs-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.gs-hero {
  height: 176px; margin: 4px 14px 0; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--tint, var(--teal-soft)); color: var(--tone, var(--teal));
}
.gs-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-hero svg { width: 52px; height: 52px; }
.gs-body { padding: 14px 18px 4px; }
.gs-title { display: flex; align-items: flex-start; gap: 10px; }
.gs-title h3 { margin: 0; flex: 1; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.gs-cost { display: flex; align-items: baseline; gap: 2px; color: var(--seal); }
.gs-cost b { font-size: 22px; font-weight: 600; }
.gs-cost span { font-size: 11px; opacity: .8; }
.gs-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 7px; }
.gs-meta .sep { opacity: .5; }
.gs-stars { color: var(--gold); letter-spacing: 1px; font-size: 12px; }
.gs-stars.sm { font-size: 11px; }
.gs-desc { margin: 11px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.gs-actions { display: flex; gap: 10px; margin-top: 16px; }
.gs-balance { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; text-align: center; }
.gs-sec-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; font-weight: 600; margin: 18px 0 4px;
  padding-top: 14px; border-top: 1px dashed var(--line);
}
.gs-sec-head span { font-weight: 400; font-size: 11.5px; color: var(--ink-3); }
.gs-review { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.gs-review:last-child { border-bottom: 0; }
.gs-review-head { display: flex; align-items: baseline; gap: 7px; }
.gs-review-who { font-size: 12.5px; font-weight: 500; }
.gs-review-time { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.gs-review-text { font-size: 13px; line-height: 1.65; color: var(--ink-2); margin-top: 4px; }
.gs-empty { font-size: 12.5px; color: var(--ink-3); padding: 14px 0; }
.gs-form { background: var(--paper); border-radius: 14px; padding: 13px; margin-top: 14px; box-shadow: var(--shadow-sm); }
.gs-form-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 9px; }
.gs-starpick { display: flex; gap: 4px; }
.gs-starpick button { font-size: 21px; line-height: 1; color: var(--line); padding: 0 1px; }
.gs-starpick button.on { color: var(--gold); }
.gs-form textarea {
  width: 100%; min-height: 78px; resize: vertical;
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px;
  font-size: 13px; line-height: 1.65; color: var(--ink); background: var(--bg);
  outline: none; box-sizing: border-box;
}
.gs-form textarea:focus { border-color: var(--teal-2); }
.gs-form-act { display: flex; gap: 9px; margin-top: 10px; }

/* 建议输入框 */
.sug-text {
  width: 100%; min-height: 96px; resize: vertical; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 13px; font-size: 13.5px; line-height: 1.7;
  color: var(--ink); background: var(--paper); outline: none;
  font-family: inherit;
}
.sug-text:focus { border-color: var(--teal-2); box-shadow: 0 0 0 3px var(--teal-soft); }
