:root {
  --blue: #3d7bff;
  --blue-2: #5b9bff;
  --sky: #8cc8ff;
  --ink: #142347;
  --ink-2: #4a5878;
  --ink-3: #8a96b2;
  --line: #e4ebf8;
  --bg: #f3f7ff;
  --card: #ffffff;
  --green: #12b886;
  --green-bg: #e6f9f1;
  --amber: #f08c00;
  --amber-bg: #fff4e0;
  --grey-bg: #f1f3f8;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(20, 35, 71, .04), 0 8px 28px rgba(40, 90, 200, .08);
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.modal-open { overflow: hidden; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- 背景 ---------- */
.sky {
  position: fixed; inset: 0 0 auto 0; height: 860px; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, #5b9bff 0%, #7fb4ff 55%, #b9d6ff 78%, rgba(243, 247, 255, 0) 100%);
}
.sky::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; }
.b1 { width: 320px; height: 320px; background: #b6e0ff; top: -120px; left: -80px; animation: drift 14s ease-in-out infinite; }
.b2 { width: 260px; height: 260px; background: #c9b6ff; top: 40px; right: -90px; animation: drift 18s ease-in-out infinite reverse; }
.b3 { width: 220px; height: 220px; background: #ffffff; top: 260px; left: 30%; opacity: .35; animation: drift 16s ease-in-out infinite; }
@keyframes drift { 50% { transform: translate(30px, 24px) scale(1.08); } }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 22px 0 18px; color: #fff; }
.avatar { position: relative; width: 96px; height: 96px; margin: 0 auto 16px; }
.avatar img {
  width: 96px; height: 96px; border-radius: 30px; object-fit: cover;
  border: 4px solid rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(30, 70, 180, .35);
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.spark { position: absolute; color: #fff; text-shadow: 0 0 12px rgba(255,255,255,.9); animation: twinkle 2.4s ease-in-out infinite; }
.s1 { top: -6px; right: -14px; font-size: 20px; }
.s2 { bottom: 6px; left: -16px; font-size: 13px; animation-delay: 1.1s; }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.7); } }

.badges { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.badges span {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .45);
}
.badges span::before { content: "✓ "; }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 16px rgba(20, 60, 160, .25); }
.grad {
  margin-left: 4px; padding: 0 10px; border-radius: 12px;
  background: rgba(255, 255, 255, .95); color: var(--blue);
  text-shadow: none; display: inline-block; transform: rotate(-2deg);
}
.tagline { margin: 12px auto 0; font-size: 14px; line-height: 1.7; opacity: .95; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin: 22px auto 0; max-width: 480px; overflow: hidden;
  border-radius: 18px; background: rgba(255, 255, 255, .35);
  border: 1px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.stat { padding: 12px 6px 10px; background: rgba(40, 90, 220, .14); }
.stat b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 12px; }
.stats, .btn.soft { text-shadow: 0 1px 8px rgba(20, 60, 160, .22); }

.cta { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  -webkit-user-select: none; user-select: none; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn.primary { color: #fff; background: linear-gradient(135deg, #3d7bff, #6a5cff); box-shadow: 0 8px 20px rgba(61, 123, 255, .35); }
.hero .btn.primary { background: #fff; color: var(--blue); box-shadow: 0 10px 24px rgba(20, 60, 160, .25); }
.btn.soft { color: #fff; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .5); }
.btn.ghost { color: var(--ink-2); background: var(--grey-bg); }
.btn.outline { color: var(--ink-2); background: #fff; border: 1px solid var(--line); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 规则 ---------- */
.rules {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 16px;
}
.rule {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 12px;
  background: rgba(255, 255, 255, .88); border-radius: 18px; box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.rule-ico {
  width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; color: var(--blue); background: #eaf1ff;
}
.rule b { font-size: 14px; }
.rule p { margin: 3px 0 0; font-size: 12px; line-height: 1.55; color: var(--ink-3); }

/* ---------- 列表面板 ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

.seg {
  --n: 2; --i: 0;
  position: relative; display: inline-grid; grid-template-columns: repeat(var(--n), 1fr);
  padding: 4px; border-radius: 14px; background: var(--grey-bg);
}
.seg.three { --n: 3; }
.seg button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--ink-3); transition: color .2s; white-space: nowrap;
}
.seg button[aria-selected="true"] { color: var(--ink); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n));
  border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(20, 35, 71, .1);
  transform: translateX(calc(100% * var(--i)));
  transition: transform .28s cubic-bezier(.3, .7, .2, 1);
}

.list { display: grid; gap: 12px; }

/* 票券卡片 */
.ticket {
  position: relative; display: grid; grid-template-columns: 1fr auto;
  border-radius: 18px; background: linear-gradient(135deg, #f5f9ff, #eef3ff);
  border: 1px solid #dfe8fb; overflow: hidden;
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.ticket::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 5px;
  background: linear-gradient(180deg, #3d7bff, #8a6bff);
}
.ticket .main { padding: 14px 14px 12px 18px; min-width: 0; }
.ticket .side {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 12px 14px; border-left: 2px dashed #d3def6;
}
/* 打孔 */
.ticket .side::before, .ticket .side::after {
  content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--card);
  border: 1px solid #dfe8fb;
}
.ticket .side::before { top: -9px; }
.ticket .side::after { bottom: -9px; }

.code-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code {
  margin: 0; font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: .18em;
  color: var(--ink); -webkit-user-select: all; user-select: all; word-break: break-all;
}
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.unused { color: var(--green); background: var(--green-bg); }
.pill.unused::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.pill.used { color: var(--ink-3); background: var(--grey-bg); }
.pill.expired { color: var(--amber); background: var(--amber-bg); }

.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.meta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.meta .hot { color: var(--amber); font-weight: 600; }

.btn.copy { min-height: 38px; padding: 0 18px; color: #fff; background: linear-gradient(135deg, #3d7bff, #6a5cff); box-shadow: 0 6px 14px rgba(61, 123, 255, .28); }
.btn.copy.done { background: var(--green); box-shadow: 0 6px 14px rgba(18, 184, 134, .3); }
.btn.mark { min-height: 34px; padding: 0 12px; font-size: 12px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); }

.ticket.used, .ticket.expired { background: #f7f8fb; border-color: #eceff5; }
.ticket.used::before, .ticket.expired::before { background: #d5dae6; }
.ticket.expired .code { color: #a8b1c6; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(168, 177, 198, .6); }
.ticket.used .side, .ticket.expired .side { border-left-color: #e3e7ef; }
.stamp {
  font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #b7bfd0; border: 2px solid #d3d9e5;
  border-radius: 8px; padding: 4px 8px; transform: rotate(-8deg); text-align: center;
}
.ticket.expired .stamp { color: #f3b05a; border-color: #f7cf98; }

/* 骨架 / 空状态 */
.skeleton { height: 92px; border-radius: 18px; background: linear-gradient(90deg, #f1f4fa 25%, #f8faff 37%, #f1f4fa 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty { text-align: center; padding: 30px 16px 26px; color: var(--ink-3); }
.empty .em { font-size: 44px; line-height: 1; }
.empty h3 { margin: 12px 0 6px; color: var(--ink); font-size: 16px; }
.empty p { margin: 0 0 16px; font-size: 13px; line-height: 1.6; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.page-label { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 教程 ---------- */
.how { margin-top: 26px; }
.how h2 { margin: 0; font-size: 19px; text-align: center; }
.how .sub { margin: 4px 0 14px; font-size: 12px; color: var(--ink-2); text-align: center; }
.steps {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; margin: 0 -16px;
  scrollbar-width: none;
}
.steps::-webkit-scrollbar { display: none; }
.step {
  margin: 0; scroll-snap-align: center; background: #fff; border-radius: 20px; padding: 8px;
  box-shadow: var(--shadow); cursor: zoom-in; transition: transform .2s;
}
.step:active { transform: scale(.98); }
.step img { width: 100%; aspect-ratio: 1080 / 2400; object-fit: cover; object-position: top; border-radius: 14px; background: #eef2f9; }
.step figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 4px 4px; font-size: 13px; font-weight: 600; }
.step em {
  font-style: normal; flex: none; width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center;
  font-size: 12px; color: #fff; background: linear-gradient(135deg, #3d7bff, #6a5cff);
}

.foot { margin-top: 26px; text-align: center; font-size: 12px; line-height: 1.8; color: var(--ink-3); }

/* ---------- 分享弹层 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 25, 55, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
.mask[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  animation: up .32s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(100%); } }
.grip { display: block; width: 40px; height: 5px; border-radius: 9px; background: #dde3ee; margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 6px; font-size: 19px; }
.sheet-lead { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.paste-box { position: relative; }
.paste-box textarea {
  width: 100%; resize: vertical; min-height: 160px; padding: 12px 14px 46px;
  font: 14px/1.6 inherit; font-family: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 16px; background: #fafcff; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.paste-box textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(91, 155, 255, .15); background: #fff; }
.paste-box textarea::placeholder { color: #b3bccd; }
.paste-btn {
  position: absolute; right: 10px; bottom: 12px; border: 0; cursor: pointer;
  padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--blue); background: #eaf1ff;
}
.preview {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--green-bg); color: #0b7a5a; font-size: 13px;
}
.preview .code { font-size: 20px; color: #0b7a5a; }
.preview.bad { background: #fff1f0; color: #d63b30; }
.form-error { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: #d63b30; background: #fff1f0; }
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { min-height: 48px; }

@media (min-width: 640px) {
  .mask { align-items: center; }
  .sheet { border-radius: 26px; padding-top: 22px; }
  .grip { display: none; }
  .steps { grid-auto-columns: calc(25% - 9px); margin: 0; padding: 4px 0 14px; }
}

/* ---------- 大图 ---------- */
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 28, .92); animation: fade .2s; }
.viewer[hidden] { display: none; }
.viewer-track {
  height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track img {
  flex: none; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center;
  padding: 56px 20px calc(20px + env(safe-area-inset-bottom));
}
.viewer-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 1;
  width: 40px; height: 40px; border: 0; border-radius: 50%; font-size: 26px; line-height: 1;
  color: #fff; background: rgba(255, 255, 255, .15); cursor: pointer;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 80;
  max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 16px;
  font-size: 14px; line-height: 1.5; color: #fff; background: rgba(20, 30, 60, .92);
  box-shadow: 0 10px 30px rgba(10, 20, 50, .3);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: rgba(10, 140, 100, .95); }
.toast.err { background: rgba(210, 55, 45, .95); }

.copy-sink { position: fixed; top: 0; left: 0; opacity: 0; pointer-events: none; }
.noscript { text-align: center; padding: 20px; }

@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
  .code { font-size: 22px; letter-spacing: .12em; }
  .rules { gap: 8px; }
  .rule { padding: 12px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =================== 新增模块 =================== */

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 640px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  color: #fff; transition: background .25s, color .25s, box-shadow .25s;
}
.topbar.solid {
  color: var(--ink); background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: 0 1px 0 rgba(20, 35, 71, .06); border-radius: 0 0 18px 18px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: inherit; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 9px; border: 2px solid rgba(255, 255, 255, .8); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 160px; height: 34px; padding: 0 12px 0 8px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .2);
  font-size: 13px; font-weight: 600; cursor: pointer; color: inherit;
}
.chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .dot { flex: none; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #ffd36e, #ff8fb1); }
.round {
  position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .2); color: inherit;
}
.round svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round[aria-pressed="true"] { background: #ffcf4a; border-color: #ffcf4a; color: #6b4800; }
.round[aria-pressed="true"] svg { animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 85% { transform: rotate(-12deg); } 92% { transform: rotate(6deg); } }
.topbar.solid .chip, .topbar.solid .round:not([aria-pressed="true"]) { border-color: var(--line); background: #fff; }

.btn.sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.link { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; font-size: inherit; }

/* 跑马灯 */
.ticker {
  display: flex; align-items: center; gap: 10px; height: 40px; margin: 0 0 14px; padding: 0 6px 0 12px;
  border-radius: 14px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow); overflow: hidden;
}
.ticker[hidden] { display: none; }
.live { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #e8590c; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #ff6b3d; box-shadow: 0 0 0 0 rgba(255, 107, 61, .6); animation: beacon 1.6s infinite; }
@keyframes beacon { 70% { box-shadow: 0 0 0 7px rgba(255, 107, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 61, 0); } }
.ticker-view { position: relative; flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.ticker-track { display: inline-flex; gap: 28px; white-space: nowrap; font-size: 13px; color: var(--ink-2); animation: marquee var(--dur, 40s) linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-track b { color: var(--ink); font-weight: 600; }
.ticker-track em { font-style: normal; color: var(--ink-3); margin-right: 4px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 我的足迹 */
.mine {
  position: relative; margin: 0 0 14px; padding: 16px; border-radius: var(--radius); color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #3d7bff 0%, #6a5cff 60%, #a35cff 100%); box-shadow: 0 12px 30px rgba(70, 80, 230, .3);
}
.mine::after { content: "🫘"; position: absolute; right: -8px; bottom: -18px; font-size: 92px; opacity: .14; transform: rotate(-18deg); }
.mine[hidden] { display: none; }
.mine-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mine-title { margin: 0; font-size: 16px; font-weight: 800; }
.mine-sub { margin: 2px 0 0; font-size: 12px; opacity: .8; }
.karma { text-align: center; padding: 6px 12px; border-radius: 14px; background: rgba(255, 255, 255, .18); }
.karma b { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.karma span { font-size: 11px; opacity: .85; }
.mine-stats { display: flex; gap: 16px; margin-top: 12px; font-size: 13px; opacity: .95; }
.mine-stats b { font-size: 16px; }
.pending {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px;
  border-radius: 14px; background: rgba(255, 255, 255, .95); color: var(--ink);
}
.pending .code { font-size: 17px; letter-spacing: .12em; }
.pending p { flex: 1; margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.pending .acts { display: flex; gap: 6px; align-items: center; }
@media (max-width: 480px) {
  .pending { flex-wrap: wrap; }
  .pending p { min-width: 50%; }
  .pending .acts { width: 100%; justify-content: flex-end; }
}
.pending .btn { min-height: 30px; padding: 0 10px; font-size: 12px; }
.pending .x { border: 0; background: none; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 0 2px; }

/* 票券补充 */
.owner { margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.owner b { color: var(--blue); font-weight: 600; }
.mine-tag { white-space: nowrap; display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 11px; background: #fff3d6; color: #a86a00; }
.warn { color: #e8590c !important; font-weight: 600; }
.btn.report { min-height: 26px; padding: 0 6px; font-size: 11px; font-weight: 500; color: var(--ink-3); background: none; text-decoration: underline; text-underline-offset: 3px; }
.ticket.invalid { background: #f7f8fb; border-color: #eceff5; }
.ticket.invalid::before { background: #ffc9c9; }
.ticket.invalid .code { color: #a8b1c6; text-decoration: line-through; }
.ticket.invalid .side { border-left-color: #e3e7ef; }
.ticket.invalid .stamp { color: #f08080; border-color: #ffc9c9; }
.pill.invalid { color: #e03131; background: #fff0f0; }
.ticket.fresh { box-shadow: 0 0 0 3px rgba(61, 123, 255, .25); }

/* 社区 */
.community { margin-top: 16px; }
.com-body { min-height: 120px; }
.wall { columns: 2; column-gap: 10px; }
.note {
  break-inside: avoid; margin: 0 0 10px; padding: 12px; border-radius: 16px; font-size: 13px; line-height: 1.6;
  background: var(--note, #f3f7ff); animation: rise .35s ease both;
}
.note:nth-child(5n+1) { --note: #eef4ff; }
.note:nth-child(5n+2) { --note: #fff6e5; }
.note:nth-child(5n+3) { --note: #ecfaf3; }
.note:nth-child(5n+4) { --note: #f6f0ff; }
.note:nth-child(5n+5) { --note: #fff0f4; }
.note .emo { font-size: 20px; line-height: 1; }
.note p { margin: 6px 0 8px; color: var(--ink); word-break: break-word; }
.note .to { color: var(--blue); font-weight: 600; }
.note small { display: flex; justify-content: space-between; gap: 6px; color: var(--ink-3); font-size: 11px; }
.note small span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note small span:last-child { flex: none; white-space: nowrap; }

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #f7f9fe; }
.board .rank { flex: none; width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--ink-3); background: #fff; }
.board li:nth-child(1) .rank { background: linear-gradient(135deg, #ffd43b, #fab005); color: #fff; }
.board li:nth-child(2) .rank { background: linear-gradient(135deg, #dee2e6, #adb5bd); color: #fff; }
.board li:nth-child(3) .rank { background: linear-gradient(135deg, #ffc078, #e8590c); color: #fff; }
.board .who { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .who small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.board .num { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.board .num b { font-size: 18px; color: var(--blue); }
.board-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }

.feed { list-style: none; margin: 0; padding: 0 0 0 6px; }
.feed li { position: relative; display: flex; gap: 10px; padding: 0 0 14px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.feed li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
.feed li::after { content: ""; position: absolute; left: 3.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.feed li:last-child::after { display: none; }
.feed li.use { --c: var(--green); }
.feed li.invalid { --c: #fa5252; }
.feed li.thanks { --c: #f783ac; }
.feed b { color: var(--ink); font-weight: 600; }
.feed time { margin-left: auto; flex: none; font-size: 12px; color: var(--ink-3); }

/* FAQ */
.faq { margin-top: 26px; }
.faq h2 { margin: 0 0 12px; font-size: 19px; text-align: center; }
.faq details { margin-bottom: 8px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; font-size: 14px; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 16px 14px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

.foot .btn { margin-bottom: 14px; }
.foot .btn svg { stroke-width: 2; }

/* 弹层补充 */
.sheet.small { max-width: 440px; }
.sign { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }
.sign b { color: var(--ink-2); }
.counter { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: var(--ink-3); }
#thanks-text { min-height: 96px; padding-bottom: 28px; }
.emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 10px; }
.emojis button {
  width: 100%; aspect-ratio: 1; max-width: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 19px; cursor: pointer; padding: 0;
  transition: transform .15s, border-color .15s, background .15s;
}
.emojis button[aria-checked="true"] { border-color: var(--blue-2); background: #eef4ff; transform: scale(1.08); }
.celebrate { font-size: 46px; text-align: center; margin: 2px 0 4px; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.next-share {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: 12px; padding: 12px 14px;
  border: 1px dashed #c4d4f6; border-radius: 14px; background: #f5f9ff; cursor: pointer; font-size: 13px; color: var(--ink-2);
}
.next-share b { color: var(--blue); }
.nick-row { display: flex; gap: 8px; }
.nick-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px; outline: none; background: #fafcff;
}
.nick-row input:focus { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(91, 155, 255, .15); background: #fff; }
.nick-row .btn { min-height: 46px; border-radius: 14px; }

@media (max-width: 420px) {
  .stat { padding: 10px 2px 8px; }
  .stat b { font-size: 20px; }
  .stat span { font-size: 11px; }
  .rules { gap: 8px; }
  .rule { padding: 12px 10px; gap: 4px; }
  .rule p { font-size: 11.5px; }
  .seg button { padding: 8px 11px; font-size: 13px; }
  .brand span { display: none; }
}
@media (max-width: 360px) {
  .wall { columns: 1; }
}

/* ---------- 电脑宽屏：放宽版心，邀请码流式多列 ---------- */
@media (min-width: 960px) {
  .wrap, .topbar { max-width: 1180px; padding-left: 28px; padding-right: 28px; }
  .hero { padding: 30px 0 26px; }
  .hero h1 { font-size: 38px; }
  .stats { max-width: 560px; }
  .panel { padding: 20px; }
  .list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: stretch; }
  .list > .skeleton, .list > .empty { grid-column: 1 / -1; }
  .ticket { height: 100%; }
  .rules { gap: 14px; }
  .wall { columns: 4; column-gap: 12px; }
  .board, .feed { columns: 2; column-gap: 24px; }
  .board li, .feed li { break-inside: avoid; }
  .how .steps { max-width: 960px; margin: 0 auto; }
  .m-only { display: none; }
  .faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
  .faq h2 { grid-column: 1 / -1; }
}

/* 每码可邀 3 人：提示条与「有人用过」的码 */
.tip { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: #fff8e6; color: #8a5a00; font-size: 13px; line-height: 1.6; }
.tip b { color: #e67700; font-size: 15px; }
.tip .link { color: #e67700; font-weight: 600; padding: 0 2px; }
.ticket.used .code { color: #7d879c; }
.ticket.used .side { gap: 8px; }
.btn.try { min-height: 34px; padding: 0 16px; font-size: 13px; font-weight: 600; color: var(--blue); background: #fff; border: 1px solid #cfdcff; }
.btn.try:hover { background: #eef3ff; }
.meta .maybe { color: #e67700; }

/* 复制成功弹框 */
.copied { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #eef3ff, #f3efff); }
.copied span { font-size: 12px; font-weight: 600; color: var(--green); }
.copied b { font: 800 28px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .18em; color: var(--ink); }
#sheet-copy h2 { text-align: center; }
#sheet-copy .sheet-lead { text-align: center; }
.relay { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.relay li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f7f9fe; }
.relay li[hidden] { display: none; }
.relay em { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 inherit; font-style: normal; color: #fff; background: linear-gradient(135deg, #3d7bff, #6a5cff); margin-top: 1px; }
.relay b { display: block; font-size: 14px; color: var(--ink); }
.relay p { margin: 2px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.relay li:last-child { background: #fff8e6; }
.relay li:last-child em { background: linear-gradient(135deg, #ffa94d, #f76707); }
.nomore { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--ink-3); cursor: pointer; }
.sheet-actions.one { grid-template-columns: 1fr; }
