/* 溪溪食光 · 粉色主题 */
:root {
  --pink-50: #FFF6F9;
  --pink-100: #FFE7EF;
  --pink-150: #FFD9E6;
  --pink-200: #FFC6DA;
  --pink-300: #FFA3C3;
  --pink-400: #FF7EA9;
  --pink-500: #FF5C8D;
  --pink-600: #EA4378;
  --pink-700: #C93061;
  --ink: #4A3540;
  --ink-soft: #6E5763;
  --muted: #A8919B;
  --line: #FFDCE7;
  --gold: #F3B23E;
  --gold-soft: #FFF1D6;
  --white: #fff;
  --shadow-sm: 0 1px 3px rgba(200, 120, 150, .10);
  --shadow-md: 0 6px 18px rgba(214, 120, 155, .14);
  --shadow-lg: 0 12px 34px rgba(214, 120, 155, .20);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
               "Noto Color Emoji", sans-serif;
  color: var(--ink);
  background: var(--pink-50);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------------- 应用外壳 ---------------- */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--pink-50);
  overflow: hidden;
}

@media (min-width: 520px) {
  body {
    background:
      radial-gradient(900px 500px at 12% -10%, #FFE3EE 0%, transparent 60%),
      radial-gradient(800px 500px at 90% 110%, #FFE9DF 0%, transparent 60%),
      #FDF1F5;
  }
  .app {
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex: none;
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, #FF7EA9 0%, #FF5C8D 55%, #F94F86 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 67, 120, .22);
  position: relative;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  text-shadow: 0 1px 2px rgba(180, 40, 90, .25);
}

.brand .heart { font-size: 17px; animation: beat 1.8s ease-in-out infinite; }

@keyframes beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.22); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
}

.coin-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .38);
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.coin-pill .dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #FFE9A8, #F3B23E 65%, #D8901F);
  box-shadow: inset 0 0 0 1px rgba(160, 100, 0, .25);
  flex: none;
}

.coin-pill.bump { animation: bump .45s ease; }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* ---------------- 视图区 ---------------- */
.views {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  flex-direction: column;
  padding: 14px 14px 18px;
}

.view.active { display: flex; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}

.tab {
  position: relative;
  border: 0;
  background: none;
  padding: 8px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: color .18s;
}

.tab .ico { font-size: 20px; line-height: 1; transition: transform .22s; }
.tab.active { color: var(--pink-600); }
.tab.active .ico { transform: translateY(-2px) scale(1.1); }
.tab.active::after {
  content: "";
  position: absolute;
  bottom: calc(var(--safe-b) + 4px);
  width: 18px; height: 3px;
  border-radius: 2px;
  background: var(--pink-500);
}

/* ---------------- 通用卡片 / 文字 ---------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 12px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 18px 2px 10px;
}

.section-title:first-child { margin-top: 2px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }

/* ---------------- 按钮 ---------------- */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: var(--pink-100);
  color: var(--pink-700);
  transition: transform .12s, filter .18s, opacity .18s;
}

.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(135deg, #FF7EA9, #FF5C8D);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 92, 141, .32);
}
.btn.ghost { background: transparent; border: 1px solid var(--pink-200); color: var(--pink-600); }
.btn.danger { background: #FFF0F3; color: #D62B4E; }
.btn.block { width: 100%; display: block; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; }

/* ---------------- 首页 ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #FF8FB4 0%, #FF5C8D 58%, #F0478C 100%);
  box-shadow: 0 10px 26px rgba(240, 71, 140, .26);
}

.hero::after {
  content: "";
  position: absolute;
  right: -34px; top: -46px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.hero::before {
  content: "";
  position: absolute;
  right: 40px; bottom: -60px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}

.hero .hi { font-size: 13px; opacity: .92; margin-bottom: 6px; }
.hero .name { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.hero .balance {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}
.hero .balance b { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.hero .balance span { font-size: 14px; opacity: .9; }

.avatar-ring {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 24px;
  background: rgba(255, 255, 255, .26);
  border: 2px solid rgba(255, 255, 255, .55);
  position: absolute; right: 18px; top: 18px;
  z-index: 1;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.quick {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 15px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .18s;
}

.quick:active { transform: scale(.97); }
.quick .qi { font-size: 24px; display: block; margin-bottom: 7px; }
.quick .qt { font-size: 15px; font-weight: 700; display: block; }
.quick .qs { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: block; }

/* 流水 */
.tx-list { display: flex; flex-direction: column; gap: 2px; }

.tx {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 2px;
  border-bottom: 1px solid #FFF0F5;
}
.tx:last-child { border-bottom: 0; }

.tx .ic {
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 16px;
  background: var(--pink-100);
}
.tx .tx-main { flex: 1; min-width: 0; }
.tx .tx-note {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tx .tx-time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tx .amt {
  font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tx .amt.plus { color: #24A06B; }
.tx .amt.minus { color: var(--pink-600); }

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 26px 0;
}
.empty .e-ico { font-size: 32px; display: block; margin-bottom: 8px; opacity: .5; }

/* ---------------- 点单界面 ---------------- */
.view.order {
  padding: 0;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.view.order.active { display: flex; }

.order-head {
  flex: none;
  padding: 12px 14px 10px;
  background: linear-gradient(180deg, #FFF0F5, var(--pink-50));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-head .oh-title {
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(90deg, #FF5C8D, #FF8FB4, #EA4378);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1.2px;
}

.order-head .oh-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.order-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* 左侧分类栏 */
.cat-rail {
  flex: none;
  width: 82px;
  overflow-y: auto;
  background: linear-gradient(180deg, #FFEDF3, #FFE2EC);
  padding: 8px 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }

.cat {
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 11px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  transition: background .18s, color .18s, transform .12s;
  position: relative;
}

.cat .ce { font-size: 17px; line-height: 1; }
.cat:active { transform: scale(.96); }

.cat.active {
  background: #fff;
  color: var(--pink-600);
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(220, 120, 160, .16);
}

.cat.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--pink-500);
}

.cat-add {
  margin-top: 2px;
  border: 1px dashed var(--pink-300);
  background: transparent;
  border-radius: 12px;
  padding: 9px;
  color: var(--pink-600);
  font-size: 18px;
  cursor: pointer;
}

/* 右侧菜单区 */
.menu-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 0;
  overflow: hidden;
}

.dish-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 7px;
}

.dish {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(150deg, #FFE9F1, #FFD5E4);
  box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .18s;
  min-height: 0;
  text-align: left;
}

.dish:active { transform: scale(.96); }
.dish.blank {
  background: transparent;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
  border: 1px dashed #FFE1EC;
}

.dish .d-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.dish .d-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  opacity: .95;
}

.dish .d-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(70, 25, 45, .74) 0%, rgba(70, 25, 45, .30) 42%, rgba(70, 25, 45, 0) 72%);
}

.dish .d-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 5px 6px 6px;
  color: #fff;
}

.dish .d-name {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.dish .d-price {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  color: #FFE7A8;
  display: flex;
  align-items: center;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.dish .d-edit {
  position: absolute;
  top: 4px; right: 4px;
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .9);
  color: var(--pink-600);
  font-size: 11px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  z-index: 3;
}

.dish .d-add {
  position: absolute;
  right: 5px; bottom: 5px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #FF7EA9, #FF4D85);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(255, 77, 133, .45);
  z-index: 3;
  cursor: pointer;
}

/* 分页 */
.pager {
  flex: none;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.pager button {
  border: 1px solid var(--line);
  background: #fff;
  width: 27px; height: 27px;
  border-radius: 50%;
  color: var(--pink-600);
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .12s, opacity .18s;
}

.pager button:active { transform: scale(.9); }
.pager button:disabled { opacity: .3; cursor: not-allowed; }
.pager .p-num {
  min-width: 62px;
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------------- 抽奖 ---------------- */
.wheel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 4px;
}

.wheel-wrap {
  position: relative;
  width: 262px;
  height: 262px;
  margin: 8px auto 4px;
  filter: drop-shadow(0 12px 26px rgba(220, 110, 155, .28));
}

.wheel-rim {
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFC6DA, #FF7EA9 42%, #FFC6DA 72%, #FFA3C3);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 14px rgba(255, 255, 255, .5);
}

.wheel-rim::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image:
    radial-gradient(circle at 50% 0, #fff 0 4px, transparent 4.5px),
    radial-gradient(circle at 50% 100%, #fff 0 4px, transparent 4.5px),
    radial-gradient(circle at 0 50%, #fff 0 4px, transparent 4.5px),
    radial-gradient(circle at 100% 50%, #fff 0 4px, transparent 4.5px);
}

.wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 4.6s cubic-bezier(.16, .78, .12, 1);
  will-change: transform;
  border: 6px solid #fff;
  background: #FFE7EF;
}

.wheel .slice-emoji {
  position: absolute;
  left: 50%; top: 50%;
  font-size: 21px;
  line-height: 1;
  transform-origin: 0 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .12));
}

.wheel .slice-name {
  position: absolute;
  left: 50%; top: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #6B3C51;
  white-space: nowrap;
  transform-origin: 0 0;
  pointer-events: none;
}

.wheel-hub {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #FFE7EF);
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(210, 100, 150, .3);
  display: grid;
  place-items: center;
  font-size: 24px;
  z-index: 4;
  cursor: pointer;
  user-select: none;
  transition: transform .15s;
}

.wheel-hub:active { transform: translate(-50%, -50%) scale(.93); }
.wheel-hub.spinning { animation: hubPulse .7s ease-in-out infinite; }

@keyframes hubPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(210, 100, 150, .3); }
  50% { box-shadow: 0 4px 24px rgba(255, 92, 141, .75); }
}

.wheel-pointer {
  position: absolute;
  left: 50%; top: -16px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid var(--pink-600);
  z-index: 5;
  filter: drop-shadow(0 3px 5px rgba(200, 60, 110, .45));
}

.lottery-cost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 10px 0 14px;
  font-weight: 600;
}

.lottery-cost b { color: var(--pink-600); font-size: 15px; }

.cand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.chip {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}

.chip.win {
  background: linear-gradient(135deg, #FF7EA9, #FF5C8D);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

/* ---------------- 设置 ---------------- */
.set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #FFF0F5;
  cursor: pointer;
}
.set-row:last-child { border-bottom: 0; }
.set-row .sr-ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--pink-100);
  display: grid; place-items: center;
  font-size: 15px;
  flex: none;
}
.set-row .sr-main { flex: 1; min-width: 0; }
.set-row .sr-t { font-size: 14px; font-weight: 600; }
.set-row .sr-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.set-row .sr-v { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.set-row .arrow { color: var(--pink-300); font-size: 15px; }

.me-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #FFA3C3, #FF6E9E 60%, #F0508A);
  color: #fff;
  box-shadow: 0 10px 24px rgba(240, 80, 138, .26);
}

.me-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  border: 2px solid rgba(255, 255, 255, .6);
  display: grid; place-items: center;
  font-size: 26px;
  flex: none;
  cursor: pointer;
}

.me-name { font-size: 19px; font-weight: 800; }
.me-sub { font-size: 12px; opacity: .9; margin-top: 3px; }

/* ---------------- 弹层 ---------------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(60, 20, 40, .42);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}

.mask.show { opacity: 1; pointer-events: auto; }

.sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 18px calc(20px + var(--safe-b));
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .8, .3, 1);
  max-height: 88dvh;
  overflow-y: auto;
}

.mask.show .sheet { transform: translateY(0); }

.sheet-grip {
  width: 38px; height: 4px;
  border-radius: 2px;
  background: #FFD5E4;
  margin: 6px auto 12px;
}

.sheet h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
}

.sheet .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

.field { margin-bottom: 13px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 13px;
  font-size: 15px;
  background: #FFF9FB;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--pink-300);
  box-shadow: 0 0 0 3px rgba(255, 163, 195, .22);
  background: #fff;
}

.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; }

.img-picker {
  width: 100%;
  height: 116px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--pink-200);
  background: #FFF9FB center/cover no-repeat;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.img-picker .ip-emoji { font-size: 30px; }
.img-picker.has-img { border-style: solid; border-color: var(--pink-200); }

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.emoji-grid button {
  border: 1px solid var(--line);
  background: #FFF9FB;
  border-radius: 9px;
  padding: 6px 0;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
}

.emoji-grid button.on {
  border-color: var(--pink-400);
  background: var(--pink-100);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.sheet-actions .btn { flex: 1; }

/* toast */
.toast-wrap {
  position: fixed;
  left: 0; right: 0;
  top: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: rgba(58, 24, 40, .9);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  max-width: 86vw;
  text-align: center;
  animation: toastIn .26s ease;
  box-shadow: var(--shadow-md);
}

.toast.ok { background: linear-gradient(135deg, #FF7EA9, #FF5C8D); }
.toast.err { background: rgba(190, 40, 78, .94); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* 中奖弹层 */
.result-card {
  text-align: center;
  padding: 10px 0 4px;
}

.result-card .r-emoji { font-size: 60px; line-height: 1.1; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.result-card .r-name { font-size: 22px; font-weight: 800; margin-top: 8px; color: var(--pink-700); }
.result-card .r-price { font-size: 13px; color: var(--muted); margin-top: 5px; }
.result-card .r-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--pink-50);
  border-radius: var(--r-md);
  padding: 11px;
  line-height: 1.55;
}

@keyframes pop {
  0% { transform: scale(.4); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

/* 加载 / 错误 */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--pink-50);
  z-index: 300;
  transition: opacity .3s;
}

.boot.hide { opacity: 0; pointer-events: none; }

.spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--pink-150);
  border-top-color: var(--pink-500);
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 管理端 ---------------- */
.admin .topbar { background: linear-gradient(135deg, #7B5EA7, #5C4B8A); }

.admin-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .24);
  border: 1px solid rgba(255, 255, 255, .34);
  font-weight: 700;
  letter-spacing: .4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px;
}

.stat .s-v {
  font-size: 23px;
  font-weight: 800;
  color: var(--pink-700);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}
.stat .s-k { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.user-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #FFF0F5;
}
.user-row:last-child { border-bottom: 0; }
.user-row .u-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pink-100);
  display: grid; place-items: center;
  font-size: 18px;
  flex: none;
}
.user-row .u-main { flex: 1; min-width: 0; }
.user-row .u-name { font-size: 14px; font-weight: 700; }
.user-row .u-bal { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.user-row .u-bal b { color: var(--gold); font-size: 13px; }

.seg {
  display: flex;
  background: var(--pink-100);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 14px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 4px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pink-700);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.seg button.on { background: #fff; color: var(--pink-600); box-shadow: var(--shadow-sm); }

.quick-amt {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.quick-amt button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pink-700);
  cursor: pointer;
}
.quick-amt button:active { background: var(--pink-100); }

.switch {
  position: relative;
  width: 44px; height: 26px;
  flex: none;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute;
  inset: 0;
  background: #F0DDE5;
  border-radius: 999px;
  transition: background .2s;
  cursor: pointer;
}
.switch span::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.switch input:checked + span { background: var(--pink-500); }
.switch input:checked + span::after { transform: translateX(18px); }
