/* ===== 基础 ===== */
body.choujiang-page,
body.choujiang-page * {
  box-sizing: border-box;
}

:root {
  --primary: #4D96FF;
  --primary-dark: #3a7bd5;
  --danger: #ef476f;
  --bg: #f0f3f8;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
}

html, body {
  height: 100%;
}

body.choujiang-page {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  /* 上浅粉渐变 → 下浅灰过渡，保证页脚最底部不露粉 */
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 30%, #fcd0e2 45%, #f6f4f4 55%, #ffffff 72%, #ffffff 100%) !important;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
/* 页脚：独立浅灰色块，防止 footer_text 内嵌样式覆盖背景 */
body.choujiang-page footer.py-6.bg-gray-50 {
  background: #f3f4f6 !important;
  border-top: 1px solid #e5e7eb;
}
body.choujiang-page footer.py-6.bg-gray-50 p,
body.choujiang-page footer.py-6.bg-gray-50 footer {
  background: transparent !important;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ===== 头部 ===== */
.app-header {
  text-align: center;
  margin-bottom: 18px;
}
.app-header h1 {
  font-size: 28px;
  color: #1e293b;
  letter-spacing: 1px;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

/* ===== 主区域 ===== */
.app-main {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

/* ===== 转盘 ===== */
.wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
}
#wheel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.18));
  pointer-events: none;
}
.pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 34px solid #e63946;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.3));
  z-index: 3;
}
.spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 5px solid #fff;
  background: radial-gradient(circle at 35% 30%, #ffd166, #f4a261 60%, #e76f51);
  color: #fff;
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(231, 111, 81, .5), inset 0 -4px 8px rgba(0,0,0,.15);
  transition: transform .12s ease, box-shadow .12s ease;
  z-index: 4;
  -webkit-appearance: none;
  appearance: none;
}
.spin-btn:hover { transform: translate(-50%, -50%) scale(1.05); }
.spin-btn:active { transform: translate(-50%, -50%) scale(0.96); }
.spin-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(.6) brightness(.8);
  transform: translate(-50%, -50%) scale(1);
}
.spin-btn.spin-btn--disabled {
  background: radial-gradient(circle at 35% 30%, #9ca3af, #6b7280 60%, #4b5563);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25), inset 0 -4px 8px rgba(0, 0, 0, .2);
}

/* 转盘下方操作区：空格提示 + 全屏按钮（一行） */
.wheel-action-row {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

/* 空格提示（转盘下方） */
.spin-key-hint {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 6px 12px;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.spin-key-hint kbd {
  display: inline-block;
  font-family: inherit;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  margin-right: 6px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ===== 转盘全屏按钮（转盘下方，仅桌面端显示） ===== */
.wheel-fs-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.wheel-fs-btn:hover {
  background: #f3f4f6;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transform: translateY(-1px);
}
.wheel-fs-btn:active { transform: translateY(0) scale(0.98); }
.wheel-fs-btn .fs-icon { display: block; }
.wheel-fs-btn .fs-icon-exit { display: none; }
.wheel-fs-btn .fs-text { display: inline; }

/* 全屏态：按钮固定到左上角，切换为退出图标 */
body.wheel-fs-active .wheel-fs-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 210;
  margin-top: 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.95);
}
body.wheel-fs-active .wheel-fs-btn .fs-icon-enter { display: none; }
body.wheel-fs-active .wheel-fs-btn .fs-icon-exit { display: block; }
body.wheel-fs-active .wheel-fs-btn .fs-text { display: none; }

/* 全屏态：历史记录面板浮在右侧，透明背景白字 */
body.wheel-fs-active .history-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: 300px;
  max-width: 40vw;
  max-height: none;
  z-index: 210;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .35s ease;
}
body.wheel-fs-active .history-panel .panel-head h2 { color: #fff; }
body.wheel-fs-active .history-panel .history-list {
  max-height: none;
  flex: 1;
  overflow-y: auto;
}
body.wheel-fs-active .history-item {
  background: rgba(255, 255, 255, 0.08);
}
body.wheel-fs-active .hist-prize { color: #fff; }
body.wheel-fs-active .hist-prize-sub { color: rgba(255, 255, 255, 0.7); }
body.wheel-fs-active .hist-remark { color: rgba(255, 255, 255, 0.7); }
body.wheel-fs-active .hist-time { color: rgba(255, 255, 255, 0.5); }
body.wheel-fs-active .empty { color: rgba(255, 255, 255, 0.6); }

/* 全屏态：记录面板收起时滑出视口 */
body.wheel-fs-active .history-panel.fs-hidden {
  transform: translateX(calc(100% + 40px));
}

/* 全屏态：隐藏转盘下方的分享区域，以及侧栏中的移动端记录（记录已通过浮层实现） */
body.wheel-fs-active .owner-under-wheel .owner-share-desktop,
body.wheel-fs-active .owner-share-mobile,
body.wheel-fs-active .owner-history-mobile {
  display: none !important;
}

/* 全屏态：记录显示/隐藏切换按钮 */
.fs-history-toggle {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 211;
  width: 28px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: right .3s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.fs-history-toggle:hover { background: rgba(0, 0, 0, 0.6); }
.fs-history-toggle .ht-icon { display: block; }
.fs-history-toggle .ht-icon-expand { display: none; }
/* 全屏时显示按钮，定位在面板左侧 */
body.wheel-fs-active .fs-history-toggle {
  display: flex;
  right: 320px;
}
/* 面板收起后：按钮移到视口右边缘，切换为展开图标 */
body.wheel-fs-active .fs-history-toggle.is-collapsed {
  right: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  border-radius: 10px 0 0 10px;
}
body.wheel-fs-active .fs-history-toggle.is-collapsed .ht-icon-collapse { display: none; }
body.wheel-fs-active .fs-history-toggle.is-collapsed .ht-icon-expand { display: block; }

/* 全屏态：转盘覆盖整个视口 */
.wheel-wrap.is-fullscreen {
  --fs-size: min(80vh, 80vw); /* 全屏时 canvas 实际尺寸，作为等比缩放基准 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  aspect-ratio: auto;
  z-index: 200;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 25%, #b91c1c 50%, #991b1b 75%, #7f1d1d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* 全屏态：隐藏全站顶部导航和页脚 */
body.wheel-fs-active #desktopNavbar,
body.wheel-fs-active #mobileNavbar,
body.wheel-fs-active .mobile-header,
body.wheel-fs-active .sidebar-overlay,
body.wheel-fs-active footer {
  display: none !important;
}
body.wheel-fs-active {
  padding-top: 0 !important;
}
.wheel-wrap.is-fullscreen #wheel {
  width: var(--fs-size);
  height: var(--fs-size);
  max-width: none;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,.5));
}
/* 全屏态：中心按钮等比放大（基于 canvas 实际尺寸，而非 wheel-wrap/视口） */
.wheel-wrap.is-fullscreen .spin-btn {
  width: calc(var(--fs-size) * 0.24);
  font-size: calc(var(--fs-size) * 0.05);
  border-width: calc(var(--fs-size) * 0.0114);
  letter-spacing: calc(var(--fs-size) * 0.0045);
  box-shadow: 0 calc(var(--fs-size) * 0.014) calc(var(--fs-size) * 0.036) rgba(231, 111, 81, .5),
              inset 0 calc(var(--fs-size) * -0.009) calc(var(--fs-size) * 0.018) rgba(0,0,0,.15);
}
/* 全屏态：指针也等比放大，定位到 canvas 顶部 */
.wheel-wrap.is-fullscreen .pointer {
  top: calc((100vh - var(--fs-size)) / 2 - var(--fs-size) * 0.009);
  border-left-width: calc(var(--fs-size) * 0.0409);
  border-right-width: calc(var(--fs-size) * 0.0409);
  border-top-width: calc(var(--fs-size) * 0.0773);
}

/* 全屏态：空格提示 fixed 到转盘正下方，具体 top/left 由 JS 根据 canvas 实际位置写入 */
body.wheel-fs-active .spin-key-hint {
  display: flex;
  align-items: center;
  position: fixed;
  z-index: 210;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
  color: #fff;
  /* 尺寸按 --fs-size 等比；位置由 JS 内联 style 设置 */
  font-size: calc(var(--fs-size) * 0.027);
  padding: calc(var(--fs-size) * 0.014) calc(var(--fs-size) * 0.027);
  border-radius: calc(var(--fs-size) * 0.023);
  border-width: calc(var(--fs-size) * 0.0023);
}
body.wheel-fs-active .spin-key-hint kbd {
  font-size: calc(var(--fs-size) * 0.025);
  padding: calc(var(--fs-size) * 0.0045) calc(var(--fs-size) * 0.018);
  border-radius: calc(var(--fs-size) * 0.014);
  border-width: calc(var(--fs-size) * 0.0023);
  margin-right: calc(var(--fs-size) * 0.014);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* ===== 用户栏 ===== */
.user-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.user-bar--compact {
  justify-content: flex-end;
  margin-bottom: 4px;
}
.user-name { font-weight: 600; color: var(--text); }
.link-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0 10px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
  font-family: inherit;
  gap: 4px;
}
.link-btn:hover { background: rgba(77,150,255,.1); }

/* ===== 首页欢迎面板（登录后 CTA 区）===== */
.welcome-panel {
  text-align: center;
  line-height: 1.8;
}
.welcome-panel__hi {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}
.welcome-panel__hi .hl { color: #2563EB; }
.welcome-panel__sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: #4b5563;
}
.welcome-panel__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
}
.welcome-panel__actions .btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  height: 40px;
  padding: 0 20px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  line-height: 1;
}
.welcome-panel__actions .btn-ghost {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.welcome-panel__actions .btn-ghost:hover {
  background: #e5e7eb;
  color: #1f2937;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.welcome-panel__actions .btn-primary {
  background: linear-gradient(135deg, #4D96FF 0%, #3B82F6 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(77, 150, 255, 0.3);
}
.welcome-panel__actions .btn-primary:hover {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 150, 255, 0.4);
}
.welcome-panel__tip {
  text-align: center;
  font-size: 12px;
  margin: 6px 0 2px;
}

.user-bar__tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.tool-btn i { font-size: 12px; }
.tool-btn--ghost {
  color: #374151;
  background: rgba(255,255,255,.9);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.tool-btn--ghost:hover {
  background: #fff;
  color: #2563EB;
  border-color: #bfdbfe;
}
.tool-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #4D96FF, #2563EB);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.22);
}
.tool-btn--primary:hover { filter: brightness(1.06); }
.tool-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

@media (max-width: 640px) {
  .user-bar { gap: 8px; font-size: 13px; }
  .tool-btn { padding: 0 8px; height: 26px; }
  .tool-btn span:not(.btn-icon) { display: none; }    /* 小屏：两个按钮都只显示图标，给用户名腾地方（图标在 .btn-icon span 内，不能一并隐藏） */
  .tool-btn i { font-size: 13px; }
}
@media (max-width: 380px) {
  .user-bar { justify-content: space-between; }
  .user-bar__tools { order: 3; width: 100%; justify-content: flex-end; }
}

/* ===== 设置行 ===== */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 12px;
}
.setting-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.setting-row input {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-size: 15px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.setting-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,150,255,.15);
}

/* 开关行：标签 + 开关 + 提示文字 */
.setting-row--switch {
  flex-wrap: wrap;
}
.setting-row--switch > label:first-child {
  flex: 1;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .2s ease;
  cursor: pointer;
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider {
  background: var(--primary);
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
}
.switch-hint {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.setting-row--datetime {
  align-items: flex-start;
  flex-wrap: wrap;
}
.setting-row--datetime > label {
  flex: 0 0 auto;
  min-width: 80px;
  padding-top: 8px;
  font-weight: 600;
  color: var(--text);
}
.setting-row--datetime .datetime-pair {
  display: flex;
  gap: 10px;
  flex: 1;
  margin-top: 0;
  width: 100%;
}
.setting-row--datetime .datetime-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.setting-row--datetime .datetime-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.setting-row--datetime input[type="datetime-local"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}
.setting-row--datetime input[type="datetime-local"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,150,255,.15);
}
.setting-row--datetime .datetime-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-basis: 100%;
  margin-top: 8px;
  gap: 10px;
}
.setting-row--datetime .datetime-actions .switch-hint {
  flex: 1;
  margin-top: 0;
}
.setting-row--datetime #clearActivityTime {
  margin-top: 0;
  flex-shrink: 0;
}
.sub-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.sub-title:not(:first-child) { margin-top: 14px; }

/* ===== 抽奖次数限制（三维度 × 每日/永久 两种周期） ===== */
.limits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}
.limit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.limit-row__label {
  flex: 0 0 120px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;     /* 标签字也自动居中 */
  font-size: 13px;
  line-height: 1;
  color: #374151;
  font-weight: 500;
}
.limit-row__unit {
  flex: 0 0 auto;
  height: 32px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
}
/* 分段按钮（每日 / 永久） */
.seg {
  flex: 0 0 auto;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.seg__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;                /* 固定高度 + flex 居中，彻底消除中文上下视觉偏移 */
  padding: 0 14px;
  line-height: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
  border-right: 1px solid var(--border);
}
.seg__btn:last-child { border-right: 0; }
.seg__btn:hover:not(.is-active) {
  background: #f3f4f6;
  color: #374151;
}
.seg__btn.is-active {
  background: linear-gradient(135deg, #4D96FF, #2563EB);
  color: #fff;
  cursor: default;
}
.seg__btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.limit-row__input {
  flex: 1 1 auto;
  min-width: 80px;
  max-width: 200px;
  height: 32px;                 /* 与分段按钮等高 */
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  line-height: 32px;
  text-align: center;            /* 数值居中（原为右对齐） */
}
.limit-row__input::-webkit-outer-spin-button,
.limit-row__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.limit-row__input[type=number] { -moz-appearance: textfield; }
.limit-row__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,150,255,.15);
  background: #fff;
}
@media (max-width: 560px) {
  .limit-row__label { flex-basis: 100%; height: auto; justify-content: flex-start; font-size: 13px; margin-bottom: -2px; }
  .seg            { flex: 1 1 0; }
  .seg__btn       { flex: 1 1 0; min-width: 0; padding: 0 8px; }   /* 保持高度 32px + 居中不变 */
  .limit-row__input { max-width: none; }
}

/* ===== 权重输入 ===== */
.weight-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.weight-label {
  font-size: 10px;
  color: var(--muted);
  line-height: 1;
}
.prize-weight {
  width: 52px;
  padding: 5px 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.prize-weight:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(77,150,255,.15);
}

/* ===== 设置区操作 + 分享框 ===== */
.settings-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* ===== 主用户：桌面端转盘正下方的 分享 + 记录 ===== */
/* 默认（移动端）：转盘正下方的区块不显示，分享/记录显示在右侧面板 */
.owner-under-wheel { display: none; }
/* 移动端：右侧面板内的分享+记录显示 */
.owner-share-mobile { display: block; }

/* 默认（移动端）：主用户侧边栏记录显示，转盘下方的不显示 */
.owner-history-mobile { display: flex; flex-direction: column; }
.owner-history-mobile .history-list {
  max-height: 680px;
  overflow-y: auto;
}

/* 主用户桌面端（>=821px）：切换显示位置 */
@media (min-width: 821px) {
  .owner-under-wheel {
    display: block;
    width: 100%;
    max-width: 1180px;
    margin-top: 20px;
  }
  .owner-under-row {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 18px;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }
  /* 左侧：链接+二维码 面板 */
  .owner-share-desktop { display: block; }
  .owner-share-desktop .share-box { margin-top: 14px; }
  /* 右侧：记录面板 固定高度可滚动 */
  .owner-history-desktop {
    display: flex;
    flex-direction: column;
    max-height: 720px;
  }
  .owner-history-desktop .history-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
  }
  /* 桌面端主用户：隐藏右侧面板内的分享和记录 */
  .owner-share-mobile { display: none; }
  .owner-history-mobile { display: none; }
}

.share-box-panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.share-box {
  margin-top: 14px;
  padding: 12px;
  background: #eef2ff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.share-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  margin-bottom: 10px;
}
.share-label {
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.share-box-panel input[type="text"][readonly] {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  font-size: 14px;
  color: #1e3a8a;
  background: #fff;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  box-shadow: inset 0 1px 2px rgba(79,70,229,.06);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.share-box-panel input[type="text"][readonly]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,150,255,.15), inset 0 1px 2px rgba(79,70,229,.06);
}
.share-box-panel .btn[data-copy-link],
.share-box-panel #copyShare {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(135deg, #4D96FF 0%, #3a7bd5 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 6px rgba(77,150,255,.35);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.share-box-panel .btn[data-copy-link]:hover,
.share-box-panel #copyShare:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 10px rgba(77,150,255,.45);
  transform: translateY(-1px);
}
.share-box-panel .btn[data-copy-link]:active,
.share-box-panel #copyShare:active {
  transform: translateY(0) scale(0.98);
}

/* ===== 二维码盒子 ===== */
.qr-box {
  background: #fff;
  border-radius: 10px;
  padding: 14px 10px 10px;
  border: 1px solid #dbeafe;
  text-align: center;
  margin-top: 4px;
}
.qr-box--small { margin-top: 8px; }
.qr-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.qr-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: #fff;
  border-radius: 6px;
}
.qr-image svg {
  width: 160px;
  height: 160px;
  max-width: 100%;
  background: #fff;
  border-radius: 4px;
}
.qr-box--small .qr-image svg {
  width: 130px;
  height: 130px;
}
.qr-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ===== 提示面板（未登录 / 查看他人转盘） ===== */
.note-panel {
  text-align: center;
}
.note-panel p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.4;
}
.note-panel p:last-child { margin-bottom: 0; }
.note-panel .btn { display: inline-block; }
.note-description {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #f3f4f6;
  border-left: none;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== 侧边面板 ===== */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.panel-head h2 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app .owner-history-title {
  font-size: 13px;
}

/* ===== 主用户设置面板：Tab 切换 ===== */
.setting-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin: -4px 0 12px 0;
  border-radius: 10px;
  background: #f5f6f8;
  border: 1px solid var(--border);
}
.setting-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.setting-tab:hover {
  color: #111827;
  background: #ffffff;
}
.setting-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #4D96FF, #2563EB);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}
.setting-tab i {
  font-size: 13px;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

@media (max-width: 560px) {
  .setting-tabs { padding: 4px; gap: 4px; }
  .setting-tab { height: 34px; font-size: 12px; }
}

/* ===== 主用户配额卡片（按会员等级限制创建数量） ===== */
.quota-card {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid #dbeafe;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06);
}
.quota-card.is-full {
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
  border-color: #fecaca;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.06);
}
.quota-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.quota-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid;
  background: #fff;
}
.quota-card__count {
  font-size: 13px;
  color: #1f2937;
}
.quota-card__count b { color: #111827; font-weight: 700; }
.quota-card__remain { margin-left: 6px; color: #6b7280; font-weight: 500; }
.quota-card__remain b {
  color: #2563EB;
  padding: 1px 7px;
  background: #dbeafe;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  margin: 0 1px;
}
.quota-bar {
  height: 8px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}
.quota-bar__fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease, background .4s ease;
}
.quota-card__foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px dashed #e5e7eb;
  font-size: 12px;
  color: #4b5563;
}
.quota-card__foot b { color: #111827; }

/* quota-card：上方放按钮、下方放说明/升级入口，两栏可以自动换行 */
.quota-card__foot--spaced {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
@media (min-width: 900px) {
  .quota-card__foot--spaced {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.quota-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .quota-card__actions > * { flex: 1 1 0; min-width: 140px; justify-content: center; }
}
.count-badge {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
}

/* ===== 奖品列表 ===== */
.prize-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.prize-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
}
.prize-num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prize-name {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}
.prize-name:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,150,255,.15);
}
.prize-name-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.prize-sub {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
  color: #374151;
  background: #fafafa;
  -webkit-appearance: none;
  appearance: none;
}
.prize-sub::placeholder {
  color: #9ca3af;
}
.prize-sub:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,150,255,.1);
  background: #fff;
}
.prize-color {
  width: 36px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}

/* ===== 按钮（限定在 .app 作用域内，避免污染全站导航） ===== */
.app .btn {
  border: 1px solid var(--border);
  background: #f9fafb;
  background-image: none;
  color: var(--text);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all .18s ease;
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 38px;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-padding-before: 0;
  -webkit-padding-after: 0;
  padding-block: 0;
  font-weight: 500;
  position: relative;
  overflow: visible;
  height: 38px;
  padding: 0 16px;
  white-space: nowrap;
}
.app .btn::before { display: none !important; }
.app .btn::after { display: none !important; }
.app .btn > span,
.app .btn > i {
  display: inline-block;
  line-height: 38px;
  font-size: inherit;
  height: 38px;
}
.app .btn > .btn-icon {
  line-height: 38px;
  font-size: 18px;
}
.app .btn > span:not(.btn-icon) {
  transform: translateY(-2px);
}

.app .btn-default:hover { background: #f3f4f6; }
.app .btn:hover { transform: translateY(-1px); }

.app .btn-small {
  padding: 0 14px;
  font-size: 13px;
  height: 34px;
  min-height: 34px;
  line-height: 34px;
  font-weight: 500;
  letter-spacing: 0;
}
.app .btn-small > span,
.app .btn-small > i {
  line-height: 34px;
  height: 34px;
}
.app .btn-small > .btn-icon {
  font-size: 16px;
  line-height: 34px;
}
.app .btn-small > span:not(.btn-icon) {
  transform: translateY(-1.5px);
}
.app .btn-primary {
  background: linear-gradient(135deg, #4D96FF 0%, #3B82F6 100%);
  border: none;
  color: #fff;
  box-shadow: 0 2px 6px rgba(77, 150, 255, 0.25);
}
.app .btn-primary:hover {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  box-shadow: 0 4px 12px rgba(77, 150, 255, 0.35);
  transform: translateY(-1px);
}
.app .btn-danger {
  background: linear-gradient(135deg, #FF6B6B, #DC2626) !important;
  background-image: linear-gradient(135deg, #FF6B6B, #DC2626) !important;
  border: none !important;
  color: #fff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}
.app .btn-danger:hover {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%) !important;
  background-image: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%) !important;
  filter: brightness(1);
  transform: translateY(-1px);
}
.app .btn-danger:disabled { filter: grayscale(0.2) brightness(1.05); opacity: .7; cursor: not-allowed; }
.app .btn-warn {
  background: linear-gradient(135deg, #FFC837, #F59E0B) !important;
  background-image: linear-gradient(135deg, #FFC837, #F59E0B) !important;
  border: none !important;
  color: #fff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}
.app .btn-warn:hover {
  background: linear-gradient(135deg, #FFB820 0%, #D97706 100%) !important;
  background-image: linear-gradient(135deg, #FFB820 0%, #D97706 100%) !important;
  filter: brightness(1);
  transform: translateY(-1px);
}
.app .btn-warn:disabled { opacity: .7; cursor: not-allowed; }
.app .btn-ghost {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.app .btn-ghost:hover {
  background: #f9fafb;
  color: #1f2937;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ===== 恢复次数按钮（仅主用户） ===== */
.reset-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: -2px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed #f5c2c7;
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}
.reset-btns .btn {
  flex: 0 0 auto;
  min-width: 118px;
  height: 32px;
  padding: 0 12px;
}
.reset-hint {
  flex: 1 1 200px;
  font-size: 12px;
  color: #8b5e5e;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .reset-btns .btn { flex: 1 1 45%; min-width: 0; }
  .reset-hint { flex-basis: 100%; }
}

/* ===== 历史记录 ===== */
.history-list {
  max-height: 680px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}
/* 新记录入场动画：仅数据中新增的条目带 hist-item--enter 类时播放 */
@keyframes histEnter {
  from { opacity: 0; transform: translateY(-16px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.history-item.hist-item--enter {
  animation: histEnter .45s cubic-bezier(.22, 1, .36, 1) both;
}
/* 新记录高光：橙色微光从卡片上扫过并渐隐（伪元素 overlay，深浅主题均适配） */
@keyframes histFlash {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
.history-item.hist-item--enter::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 138, 61, .32), rgba(255, 170, 80, .16));
  animation: histFlash 1.8s ease-out .15s both;
  pointer-events: none;
}
/* 「新」角标随新记录弹出 */
@keyframes histBadgePop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); opacity: 1; }
}
.history-item.hist-item--enter .hist-new {
  animation: histBadgePop .5s cubic-bezier(.22, 1, .36, 1) .2s both;
}
.hist-color {
  flex: 0 0 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
}
.hist-info { flex: 1; min-width: 0; }
.hist-prize {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.hist-prize-sub {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}
.hist-drawer {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: #fff;
  background: var(--primary);
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.4;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 6px;
}
.hist-drawer.is-guest {
  background: #9ca3af;
}
/* 最新记录「新」角标：标记列表前 2 条（最新）记录 */
.hist-new {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7043, #f4511e);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  letter-spacing: 1px;
  box-shadow: 0 1px 4px rgba(244, 81, 30, .4);
}
.history-item.is-new {
  box-shadow: 0 0 0 1px rgba(244, 81, 30, .25);
}
.hist-remark {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
}
.hist-time {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 3px;
}
.empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0;
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
/* 全屏态：弹窗层级高于全屏转盘（z-index:200），确保备注/结果弹窗可见 */
body.wheel-fs-active .modal {
  z-index: 220;
}
.modal.show {
  display: flex;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
  animation: pop .25s ease;
  box-sizing: border-box;
}
@keyframes pop {
  from { transform: scale(.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-content h3 {
  font-size: 18px;
  margin-bottom: 14px;
  text-align: center;
}
#remarkInput {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px; /* >=16px 防止 iOS 聚焦放大 */
  resize: vertical;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
#remarkInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,150,255,.15);
}
.modal-tip {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}
.modal-tip kbd {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: inherit;
  color: var(--primary-dark);
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.modal-actions .btn { flex: 1; padding: 11px; font-size: 15px; }

/* 结果弹窗 */
.result-content { text-align: center; }
.result-text { margin: 8px 0 4px; }
.result-prize {
  font-size: 30px;
  font-weight: 800;
  padding: 16px;
  border-radius: 12px;
  color: #fff;
  margin-bottom: 8px;
  text-align: center;
}
.result-prize__name {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
}
.result-prize__value {
  display: block;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 4px;
  line-height: 1.3;
}
.result-prize__sub {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 6px;
}
.result-remark {
  font-size: 14px;
  color: var(--muted);
}

/* ===== 响应式 ===== */
/* 桌面端：转盘放大 + 显示全屏按钮 */
@media (min-width: 821px) {
  .wheel-wrap { max-width: 560px; }
  .app { max-width: 1180px; }
  .wheel-action-row { display: flex; }
  .wheel-fs-btn { display: flex; }
}
@media (max-width: 820px) {
  .app-main {
    grid-template-columns: 1fr;
  }
  .side-panel { gap: 14px; }
  .app-header h1 { font-size: 24px; }
  /* 移动端隐藏分享二维码（手机无法扫码自屏，仅电脑端显示） */
  .qr-box { display: none !important; }
}
@media (max-width: 480px) {
  .app { padding: 14px 12px 32px; }
  .panel { padding: 14px; }
  .modal-content { padding: 20px; }
}
