/* ============================================================
   湖南潇湘职院 · 校园服务 v2.0
   简约清爽（微信小程序风） + 深色渐变发布会质感 · 两端适配
============================================================ */

:root {
  --deep: #0b1c3f;
  --deep-2: #123a7c;
  --primary: #2f6bff;
  --primary-dark: #1e4fd6;
  --accent: #f5b942;
  --brand: #e74c3c;
  --ink: #1f2937;
  --ink-soft: #64748b;
  --line: #e7ecf5;
  --bg-soft: #f4f7fc;
  --card: #ffffff;
  --radius: 18px;
  --shadow-sm: 0 4px 16px rgba(11, 28, 63, 0.07);
  --shadow-md: 0 14px 40px rgba(11, 28, 63, 0.14);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: #e8edf6;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }

/* 触屏优化：消除点击延迟、避免双击缩放干扰、点击高亮更自然 */
button,
.spot,
.tab,
.filter-chip,
.fab,
.result-item,
.menu-tab,
.nav-btn,
.drop-zone,
.header-btn,
.header-login,
.mine-menu button,
.logout-btn,
.auth-tab,
.search-close,
.modal-close {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(1080px, 92%);
  margin-inline: auto;
}

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 26px rgba(47, 107, 255, 0.38);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(47, 107, 255, 0.46);
}

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 7px 20px; font-size: 13px; }

/* ============ 开屏 ============ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(160deg, #071430 0%, #0d2452 48%, #163a82 100%);
  color: #fff;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  cursor: pointer;
  overflow: hidden;
  animation:
    splashZoom 0.85s 2.45s cubic-bezier(0.4, 0, 0.2, 1) forwards,
    splashGone 0s 3.5s forwards;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
}

/* ---- 开屏文案舞台 ---- */
.splash-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: textOut 0.55s 1.5s ease forwards;
}

.splash-eyebrow {
  font-size: 13px;
  letter-spacing: 7px;
  color: rgba(255, 255, 255, 0.72);
  animation: fadeUp 0.6s 0.05s ease both;
}

.splash-name {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 8px;
  animation: nameIn 0.85s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash-sub {
  font-size: 14px;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.82);
  animation: fadeUp 0.8s 0.48s ease both;
}

.splash-loading {
  width: 150px;
  height: 4px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  animation: fadeUp 0.5s 0.7s ease both;
}

.splash-loading span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #7aa3ff, #f5b942);
  animation: loadFill 1.15s 0.8s ease forwards;
}

.splash-gate {
  position: absolute;
  width: min(250px, 62vw);
  opacity: 0;
  filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.45));
  animation: gatePop 0.7s 1.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash.hide .splash-gate { transform: scale(1.18); }

.splash-tip {
  position: absolute;
  bottom: 42px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
  animation: fadeUp 0.8s 0.95s ease both;
}

/* 回访用户：快速开场 */
.splash.quick { animation: none; }
.splash.quick .splash-stage { opacity: 0; animation: none; }
.splash.quick .splash-gate { opacity: 1; animation: none; }
.splash.quick .splash-tip { display: none; }

@keyframes nameIn {
  from { opacity: 0; transform: translateY(18px); letter-spacing: 0.5em; }
  to { opacity: 1; transform: none; letter-spacing: 8px; }
}

@keyframes textOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-20px) scale(1.08); }
}

@keyframes gatePop {
  from { opacity: 0; transform: translateY(36px) scale(0.5); }
  to { opacity: 1; transform: none; }
}

@keyframes loadFill {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes splashZoom {
  from { opacity: 1; transform: none; filter: blur(0); }
  to { opacity: 0; transform: scale(1.16); filter: blur(9px); }
}

/* 兜底：即使脚本异常，开屏也会在 3.5 秒后停止拦截点击 */
@keyframes splashGone {
  to { visibility: hidden; pointer-events: none; }
}

.splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.5;
  animation: orbFloat 9s ease-in-out infinite;
}

.orb-a { width: 340px; height: 340px; top: -110px; left: -80px; background: radial-gradient(circle, rgba(47,107,255,0.9), transparent 70%); }
.orb-b { width: 300px; height: 300px; bottom: -100px; right: -70px; background: radial-gradient(circle, rgba(245,185,66,0.45), transparent 70%); animation-delay: -4.5s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -22px) scale(1.08); }
}

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

@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
}

/* ============ 应用壳 ============ */
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-soft);
  position: relative;
  box-shadow: 0 0 60px rgba(11, 28, 63, 0.22);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231,236,245,0.9);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 14px;
}

.app-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff5f4a, #c0392b);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  flex: none;
  box-shadow: 0 5px 14px rgba(231, 76, 60, 0.35);
}

.app-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}

.app-header-text strong { font-size: 15px; letter-spacing: 1px; color: var(--deep); }
.app-header-text small { font-size: 11px; color: var(--ink-soft); }

.header-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-btn:hover { background: #e9effb; transform: translateY(-1px); }

.bell-btn { position: relative; }

.notify-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  animation: dotPulse 1.6s ease-in-out infinite;
}

.notify-dot[hidden] { display: none; }

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

/* 首页公告栏 */
.notices-bar {
  position: relative;
  margin: 8px 14px 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.14), rgba(231, 76, 60, 0.1));
  border: 1px solid rgba(245, 185, 66, 0.35);
  color: #8a6116;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  animation: fadeUp 0.5s ease both;
}

.notices-bar[hidden] { display: none; }

.header-login {
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(47,107,255,0.35);
}

.header-login.logged {
  background: var(--deep);
  box-shadow: 0 6px 16px rgba(11,28,63,0.3);
}

.app-main { padding-bottom: 78px; }
.page { display: none; }
.page.active { display: block; animation: pageIn 0.4s ease both; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ============ 首页 Hero ============ */
.home-hero {
  position: relative;
  overflow: hidden;
  margin: 12px 14px 4px;
  padding: 24px 20px 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #081631 0%, var(--deep-2) 55%, #1d56b8 130%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(11, 28, 63, 0.35);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 82% 10%, #000 0%, transparent 62%);
  pointer-events: none;
}

.home-hero .hero-orb { position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none; }
.home-hero .orb-a { width: 210px; height: 210px; top: -90px; right: -60px; background: radial-gradient(circle, rgba(47,107,255,0.95), transparent 70%); animation: orbFloat 8s ease-in-out infinite; }
.home-hero .orb-b { width: 180px; height: 180px; bottom: -80px; left: -50px; background: radial-gradient(circle, rgba(245,185,66,0.5), transparent 70%); animation: orbFloat 10s -4s ease-in-out infinite; }

.hero-eyebrow {
  position: relative;
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 4px;
  background: rgba(255,255,255,0.08);
}

.hero-title {
  position: relative;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 12px;
  background: linear-gradient(90deg, #fff, #cfe0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title span { color: var(--accent); -webkit-text-fill-color: var(--accent); }

.hero-sub {
  position: relative;
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  margin-top: 6px;
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 11px 16px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.hero-search:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }

/* 开屏结束后，首页元素依次浮现 */
body.entered .home-hero .hero-eyebrow { animation: fadeUp 0.65s 0.05s ease both; }
body.entered .home-hero .hero-title { animation: fadeUp 0.65s 0.18s ease both; }
body.entered .home-hero .hero-sub { animation: fadeUp 0.65s 0.3s ease both; }
body.entered .home-hero .hero-search { animation: fadeUp 0.65s 0.42s ease both; }

/* hero 底部柔光，衔接浅色地图区域 */
.home-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  width: 86%;
  height: 70px;
  background: radial-gradient(closest-side, rgba(30, 86, 184, 0.34), transparent 72%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 1;
}

/* ============ 地图 ============ */
.map-section {
  padding: 8px 0 0;
  flex: 1;
  min-height: 0;
  position: relative;
}

/* 地图区域顶部的柔和衔接光晕 */
.map-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -16px;
  transform: translateX(-50%);
  width: 82%;
  height: 56px;
  background: radial-gradient(closest-side, rgba(18, 58, 124, 0.18), transparent 72%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 1;
}

.map-frame {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  height: calc(100% - 28px);
  min-height: 420px;
  margin: 14px;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(165deg, #ffffff, #eaf1fc 50%, #d5e4fa);
  box-shadow:
    0 18px 40px rgba(11, 28, 63, 0.16),
    inset 0 0 0 1px rgba(47, 107, 255, 0.16);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

body.entered .map-frame {
  animation: frameIn 0.75s 0.15s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.map-frame:hover {
  transform: translateY(-4px);
  box-shadow:
    0 26px 54px rgba(11, 28, 63, 0.22),
    inset 0 0 0 1px rgba(47, 107, 255, 0.24);
}

.map-frame::before {
  content: "";
  position: absolute;
  inset: -10px -8px -18px -8px;
  z-index: -2;
  border-radius: 28px;
  background: linear-gradient(180deg, #f4f8ff, #dbe7f8);
  box-shadow: 0 10px 22px rgba(11, 28, 63, 0.12);
}

.map-frame::after {
  content: "";
  position: absolute;
  inset: -4px -3px -10px -3px;
  z-index: -1;
  border-radius: 25px;
  background: #ffffff;
  box-shadow: 0 5px 12px rgba(11, 28, 63, 0.09);
}

/* 地图工具栏：卡片顶部标题行 */
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 6px 12px;
}

.map-toolbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: 1px;
}

.map-toolbar-hint {
  font-size: 11.5px;
  color: var(--ink-soft);
}

/* 校外地图切换：角落提示 + 云层遮挡 */
.map-corner-hint {
  position: absolute;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--deep), var(--deep-2));
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11, 28, 63, 0.35);
  transition: transform 0.2s ease;
}

.map-corner-hint:hover { transform: translateY(-2px); }
.map-corner-hint[hidden] { display: none; }

#map-corner-out { right: 12px; bottom: 12px; }
#map-corner-back { left: 12px; top: 12px; }

.map-clouds {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
  border-radius: 14px;
}

.cloud-shape {
  position: absolute;
  width: 220px;
  height: 78px;
  opacity: 0;
  filter: blur(2px);
}

.cs-1 { top: 14%; left: -240px; }
.cs-2 { top: 44%; left: -300px; animation-delay: 0.08s; }
.cs-3 { top: 70%; left: -260px; animation-delay: 0.16s; }

.map-frame.clouding .cloud-shape {
  animation: cloudCover 1.05s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cloudCover {
  0% { opacity: 0; transform: translateX(0); }
  22% { opacity: 1; }
  100% { opacity: 1; transform: translateX(760px); }
}

@keyframes frameIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.map-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  transform-origin: center center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  cursor: grab;
  border-radius: 14px;
  transform-origin: center center;
}

/* 地图暗角：聚焦中心，增强沉浸感 */
.map-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: 14px;
  background: radial-gradient(120% 95% at 50% 42%, transparent 55%, rgba(11, 28, 63, 0.12) 100%);
}

.map-wrap::-webkit-scrollbar { display: none; }
.map-wrap.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* 开场：镜头从校门推入地图 */
.map-section.map-enter .map-wrap {
  animation: mapIn 1s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mapIn {
  from { opacity: 0; transform: scale(1.09); }
  to { opacity: 1; transform: scale(1); }
}

.campus-map {
  width: auto;
  height: 100%;
  min-width: 100%;
  max-width: none;
  display: block;
}

.spot {
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.spot:hover,
.spot:focus-visible {
  transform: translateY(-5px);
  filter: drop-shadow(0 14px 16px rgba(11, 28, 63, 0.3)) brightness(1.04);
  outline: none;
}

/* 公告栏底部柔光衔接 */
.notices-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background: linear-gradient(180deg, rgba(245, 185, 66, 0.18), transparent);
  pointer-events: none;
}

.spot-name {
  font-size: 16px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--deep);
  paint-order: stroke;
  stroke: #f9fdf5;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.spot-emoji { font-size: 22px; text-anchor: middle; }

.speed-chip { cursor: pointer; }
.speed-chip rect { transition: filter 0.2s ease, transform 0.2s ease; }
.speed-chip:hover rect { filter: brightness(1.14); transform: translateY(-2px); }
.speed-chip-text { font-size: 15px; font-weight: 700; fill: #fff; text-anchor: middle; }

.map-hint {
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
  fill: #8aa88f;
  letter-spacing: 2px;
}

/* 开场扫光 + 建筑名字依次点亮 */
.map-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.5) 50%, transparent 58%);
  transform: translateX(-130%);
}

.map-wrap.map-sweep::after {
  animation: mapSweep 1.2s 0.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.map-wrap.map-sweep .spot-name {
  animation: nameSpotIn 0.55s ease both;
}

@keyframes mapSweep {
  to { transform: translateX(130%); }
}

@keyframes nameSpotIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.cloud {
  animation: cloudDrift 26s linear infinite;
}

.cloud-2 {
  animation-duration: 34s;
  animation-delay: -14s;
}

@keyframes cloudDrift {
  from { transform: translateX(-80px); }
  to { transform: translateX(80px); }
}

/* 首页整页布局：hero + 地图占满剩余 */
#page-home.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 62px);
  padding-bottom: 0;
}

.map-section { height: auto; }

#app[data-page="home"] .app-header { display: none; }

/* ============ 底部 Tab ============ */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 100%);
  height: 62px;
  display: flex;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 130;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: none;
  font-size: 11px;
  color: #8a94a6;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.tab .tab-icon { font-size: 21px; line-height: 1; transition: transform 0.2s ease; }
.tab.active { color: var(--primary); font-weight: 700; }
.tab.active .tab-icon { transform: translateY(-2px); }
.tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--primary), #7aa3ff);
}

/* ============ 互帮互助 ============ */
.help-head { padding: 20px 0 12px; }
.help-head h2 { font-size: 21px; color: var(--deep); letter-spacing: 1px; }
.help-head p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.help-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
}

.help-filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex: none;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(47,107,255,0.3);
}

.help-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

.help-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 15px 13px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: cardIn 0.35s ease both;
}

.help-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.help-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.help-type { font-size: 12.5px; font-weight: 700; color: var(--primary-dark); }

.help-status { font-size: 11.5px; padding: 2px 10px; border-radius: 999px; }
.help-status.open { background: #e0f2fe; color: #0369a1; }
.help-status.done { background: #dcfce7; color: #15803d; }

.help-card h3 { font-size: 15.5px; color: var(--deep); }
.help-desc { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.help-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.help-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.help-reward { font-size: 14px; font-weight: 800; color: #e74c3c; }
.help-done { font-size: 12.5px; color: #15803d; font-weight: 600; }
.help-empty { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 48px 0; }

.fab {
  position: fixed;
  bottom: 82px;
  right: max(18px, calc(50% - 262px));
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.45);
  cursor: pointer;
  z-index: 110;
  transition: transform 0.2s ease;
}

.fab:hover { transform: translateY(-3px) scale(1.04); }

/* ============ 互帮互助页：左右双栏（互帮互助 + 二手跳蚤市场） ============ */
.market-container {
  width: auto;
  margin: 0;
  padding: 0 10px 24px;
}

.market-head {
  position: sticky;
  top: 56px;
  z-index: 8;
  display: flex;
  gap: 8px;
  padding: 10px 0 8px;
  background: var(--bg-soft);
}

.market-tab {
  flex: 1;
  padding: 9px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.market-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.3);
}

.market-body {
  display: flex;
  align-items: flex-start;
}

.market-body .col-help,
.market-body .col-market {
  flex: 1;
  min-width: 0;
  transition: flex 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 挤压特效：未选中一侧收缩成只显示一个金额的窄条，其余隐藏 */
.market-body .col-help.collapsed,
.market-body .col-market.collapsed {
  flex: 0 0 46px;
  min-width: 46px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.market-body .col-help.collapsed > :not(.collapse-tag),
.market-body .col-market.collapsed > :not(.collapse-tag) {
  display: none;
}

.collapse-tag {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin: 0 auto;
  padding: 10px 5px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  white-space: nowrap;
}

.collapse-tag[hidden] { display: none; }

/* 遮挡特效：右栏层叠在左栏上方，像两张叠放的卡片 */
.col-market {
  position: relative;
  z-index: 2;
  margin-left: -14px;
  padding: 0 12px 14px 20px;
  background: linear-gradient(180deg, #ffffff, #eef3fc);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: -10px 8px 26px rgba(11, 28, 63, 0.14);
}

.col-help {
  padding: 0 6px 14px 0;
}

.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 2px 6px;
}

.col-head span {
  font-size: 14px;
  font-weight: 700;
  color: var(--deep);
  white-space: nowrap;
}

.col-add {
  flex: none;
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(47, 107, 255, 0.3);
}

.market-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}

.market-filters::-webkit-scrollbar { display: none; }
.market-filters .filter-chip { padding: 5px 11px; font-size: 12px; }

.market-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.market-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 11px 9px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.m-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.m-cat {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-dark);
}

.m-status {
  font-size: 10.5px;
  padding: 1px 8px;
  border-radius: 999px;
}

.m-status.on { background: #e0f2fe; color: #0369a1; }
.m-status.sold { background: #dcfce7; color: #15803d; }

.market-card h4 {
  font-size: 14px;
  color: var(--deep);
  line-height: 1.45;
}

.m-desc {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
  font-size: 11px;
  color: var(--ink-soft);
}

.m-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 6px;
}

.m-price {
  font-size: 14px;
  font-weight: 800;
  color: #e74c3c;
}

.m-own {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.btn-xs {
  padding: 5px 10px;
  font-size: 11.5px;
}

.btn-ghost-red {
  background: #fff;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.btn-ghost-red:hover {
  color: #dc2626;
  background: #fef2f2;
}

/* ============ 校园论坛 ============ */
.forum-head { padding: 18px 0 12px; }
.forum-head h2 { font-size: 20px; color: var(--deep); }
.forum-head p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.forum-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
}

.forum-filters::-webkit-scrollbar { display: none; }

.forum-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 70px;
}

.forum-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-sm);
}

.forum-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin-bottom: 8px;
}

.forum-topic {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

.forum-topic.t-friend { background: #fce7f3; color: #be185d; }
.forum-topic.t-confess { background: #ffe4e6; color: #be123c; }
.forum-topic.t-vent { background: #dbeafe; color: #1d4ed8; }
.forum-topic.t-tree { background: #d1fae5; color: #047857; }

.forum-time {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.forum-content {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.forum-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.forum-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.forum-like,
.forum-cmt-btn {
  border: none;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.forum-like.liked {
  background: #fef2f2;
  color: #dc2626;
}

.forum-comments {
  margin-top: 12px;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px 12px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-item {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.comment-item strong {
  color: var(--primary-dark);
  flex: none;
}

.comment-empty {
  font-size: 12px;
  color: var(--ink-soft);
}

.comment-input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.comment-input-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.comment-input-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.13);
}

/* ============ 加载更多 / 图片 ============ */
.load-more {
  display: block;
  width: 100%;
  margin: 4px auto 10px;
  padding: 10px 0;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.load-more:hover { background: var(--bg-soft); }

.card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}

.forum-img { height: 180px; margin-top: 8px; }

.forum-report {
  margin-left: auto;
  border: none;
  background: none;
  font-size: 15px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.forum-report:hover { opacity: 1; }

/* 消息通知 */
.notify-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notify-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: background 0.2s ease;
}

.notify-item.unread {
  background: rgba(47, 107, 255, 0.07);
  border-color: rgba(47, 107, 255, 0.3);
}

.notify-item strong { font-size: 13.5px; color: var(--deep); }
.notify-item p { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.notify-item span { font-size: 11px; color: #a4adbd; }

/* 星级评价 */
.star-row {
  font-size: 30px;
  letter-spacing: 6px;
  color: #f5b942;
  text-align: center;
  margin: 8px 0 16px;
  cursor: pointer;
  user-select: none;
}

/* 管理后台 */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.admin-item-main {
  flex: 1;
  min-width: 0;
}

.admin-item-main strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-item-main span {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.admin-item-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.divider {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 18px 0 14px;
}

.mine-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.mine-balance { font-weight: 700; color: #f5b942; }

/* 钱包 */
.wallet-balance {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--deep);
  padding: 18px 0;
  background: linear-gradient(135deg, #fff8e6, #fef3c7);
  border: 1px solid #f3dd9a;
  border-radius: 16px;
  margin-bottom: 4px;
}

.wallet-tx {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
}

.tx-type { flex: 1; color: var(--ink); }
.tx-amt { font-weight: 700; color: var(--deep); }
.tx-status { color: var(--ink-soft); font-size: 11.5px; }

.amount-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.amount-chips button {
  flex: 1;
  min-width: 60px;
  padding: 9px 0;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--deep);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amount-chips button:hover,
.amount-chips button.on {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(47, 107, 255, 0.06);
}

.pay-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.pay-link {
  display: inline-block;
  margin: 10px 0;
  padding: 10px 22px;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  font-weight: 700;
}

.pay-done { color: #15803d; font-weight: 700; }
.pay-tip { font-size: 12px; color: var(--ink-soft); }

/* 云打印 */
.file-name {
  margin: 10px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(47, 107, 255, 0.07);
  font-size: 13px;
  color: var(--primary-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-price {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
  color: #e74c3c;
  text-align: right;
}

.print-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.print-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.print-order-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.print-order-main strong {
  font-size: 13.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-order-main span {
  font-size: 12px;
  color: var(--ink-soft);
}

.print-order-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.print-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--deep);
}

.badge-status {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-status.unpaid { background: #fef3c7; color: #92400e; }
.badge-status.paid { background: #e0f2fe; color: #0369a1; }
.badge-status.printing { background: #ede9fe; color: #6d28d9; }
.badge-status.ready { background: #dcfce7; color: #15803d; }
.badge-status.picked { background: #e2e8f0; color: #475569; }

/* 卡片可点击 */
.help-card,
.market-card,
.forum-card {
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.help-card:hover,
.market-card:hover,
.forum-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.img-picker {
  display: grid;
  place-items: center;
  padding: 22px 12px;
  border: 2px dashed #b9c8e4;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.img-picker:hover { border-color: var(--primary); background: rgba(47, 107, 255, 0.06); }

.img-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

/* ============ 我的内容管理 ============ */
.mine-my {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mine-my-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.my-tab {
  flex: 1;
  padding: 11px 0;
  border: none;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.my-tab.active {
  color: var(--primary);
  background: rgba(47, 107, 255, 0.06);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.mine-my-list {
  max-height: 320px;
  overflow-y: auto;
}

.my-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.my-item:last-child { border-bottom: none; }

.my-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.my-item-main strong {
  font-size: 13.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-item-main span {
  font-size: 12px;
  color: var(--ink-soft);
}

/* ============ 协议 ============ */
.terms-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 400;
  cursor: pointer;
}

.terms-check input { width: 16px; height: 16px; accent-color: var(--primary); }

.terms-body p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 8px;
}

/* ============ 深色模式 ============ */
[data-theme="dark"] body { background: #0a1020; }
[data-theme="dark"] .app { background: #0f1729; box-shadow: 0 0 60px rgba(0, 0, 0, 0.55); }
[data-theme="dark"] .app-header,
[data-theme="dark"] .tabbar { background: rgba(18, 26, 46, 0.94); border-color: #26324a; }
[data-theme="dark"] .app-header-text strong,
[data-theme="dark"] .col-head span,
[data-theme="dark"] .forum-head h2,
[data-theme="dark"] .help-head h2 { color: #e6ecf5; }
[data-theme="dark"] .app-header-text small,
[data-theme="dark"] .col-head span,
[data-theme="dark"] .help-head p,
[data-theme="dark"] .forum-head p { color: #9aa8c0; }
[data-theme="dark"] .help-card,
[data-theme="dark"] .market-card,
[data-theme="dark"] .forum-card,
[data-theme="dark"] .mine-menu,
[data-theme="dark"] .mine-stats,
[data-theme="dark"] .mine-contact,
[data-theme="dark"] .mine-my,
[data-theme="dark"] .filter-chip,
[data-theme="dark"] .menu-tab,
[data-theme="dark"] .result-group,
[data-theme="dark"] .result-item,
[data-theme="dark"] .speed-card,
[data-theme="dark"] .file-item,
[data-theme="dark"] .coach-card,
[data-theme="dark"] .modal-panel,
[data-theme="dark"] .search-box,
[data-theme="dark"] .collapse-tag,
[data-theme="dark"] .load-more,
[data-theme="dark"] .img-picker,
[data-theme="dark"] .my-tab { background: #16203a; border-color: #26324a; color: #e6ecf5; }
[data-theme="dark"] .help-card h3,
[data-theme="dark"] .market-card h4,
[data-theme="dark"] .forum-content,
[data-theme="dark"] .my-item-main strong,
[data-theme="dark"] .m-cat,
[data-theme="dark"] .mine-stats strong { color: #e6ecf5; }
[data-theme="dark"] .help-desc,
[data-theme="dark"] .m-desc,
[data-theme="dark"] .help-meta,
[data-theme="dark"] .m-meta,
[data-theme="dark"] .forum-meta,
[data-theme="dark"] .my-item-main span,
[data-theme="dark"] .comment-item,
[data-theme="dark"] .forum-time,
[data-theme="dark"] .mine-stats span { color: #9aa8c0; }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .comment-input-row input {
  background: #0f1729;
  border-color: #26324a;
  color: #e6ecf5;
}
[data-theme="dark"] .forum-comments,
[data-theme="dark"] .coach-card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .drop-zone,
[data-theme="dark"] .info-item,
[data-theme="dark"] .menu-item,
[data-theme="dark"] .schedule th,
[data-theme="dark"] .speed-result { background: #0f1729; border-color: #26324a; }
[data-theme="dark"] .info-item p,
[data-theme="dark"] .menu-item,
[data-theme="dark"] .schedule td,
[data-theme="dark"] .speed-result .value { color: #cbd6ea; }
[data-theme="dark"] .info-item strong,
[data-theme="dark"] .schedule th,
[data-theme="dark"] .menu-item .mname { color: #e6ecf5; }
[data-theme="dark"] .modal-overlay { background: rgba(3, 8, 18, 0.72); }
[data-theme="dark"] .auth-tab.active { background: #16203a; }
[data-theme="dark"] .market-tab,
[data-theme="dark"] .forum-like,
[data-theme="dark"] .forum-cmt-btn { background: #0f1729; border-color: #26324a; color: #9aa8c0; }
[data-theme="dark"] .market-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
[data-theme="dark"] .map-frame { background: linear-gradient(165deg, #1b2743, #14203a 55%, #101a30); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
[data-theme="dark"] .map-frame::before { background: linear-gradient(180deg, #182238, #101a30); }
[data-theme="dark"] .map-frame::after { background: #14203a; }
[data-theme="dark"] .map-toolbar-title { color: #e6ecf5; }
[data-theme="dark"] .map-toolbar-hint { color: #9aa8c0; }
[data-theme="dark"] .col-market { background: linear-gradient(180deg, #182440, #101a30); }
[data-theme="dark"] .mine-card { background: linear-gradient(135deg, #0b1c3f, #16325f); }
[data-theme="dark"] .toast { background: rgba(15, 23, 41, 0.96); }

/* ============ 我的潇湘 ============ */
.mine-guest {
  margin-top: 22px;
  padding: 44px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.mine-guest-icon { font-size: 46px; }
.mine-guest strong { display: block; font-size: 18px; color: var(--deep); margin-top: 10px; }
.mine-guest p { font-size: 13px; color: var(--ink-soft); margin: 8px 0 20px; }

.mine-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #081631, var(--deep-2) 55%, #1d56b8);
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 16px 34px rgba(11, 28, 63, 0.3);
  position: relative;
  overflow: hidden;
}

.mine-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 90% 0%, #000, transparent 60%);
  pointer-events: none;
}

.mine-avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  font-size: 24px;
  font-weight: 800;
  flex: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  position: relative;
}

.mine-info { position: relative; }
.mine-info strong { font-size: 18px; letter-spacing: 1px; }
.mine-info p { font-size: 12.5px; color: rgba(255,255,255,0.8); }

.mine-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-top: 12px;
  padding: 16px 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.mine-stats div + div { border-left: 1px solid var(--line); }
.mine-stats strong { display: block; font-size: 22px; color: var(--deep); }
.mine-stats span { font-size: 12px; color: var(--ink-soft); }

.mine-menu {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-top: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mine-menu button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 14.5px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, padding-left 0.18s ease;
}

.mine-menu button:last-child { border-bottom: none; }
.mine-menu button span { color: #c0c7d4; font-size: 16px; }
.mine-menu button:hover { background: #f7faff; padding-left: 20px; }
.mine-menu button:active { background: var(--bg-soft); }

.logout-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.logout-btn:hover { background: #fef2f2; }

.mine-contact {
  margin-top: 14px;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  font-size: 12.5px;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.mine-version {
  text-align: center;
  font-size: 12px;
  color: #a4adbd;
  padding: 16px 0;
}

/* ============ 弹窗 ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 20, 48, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.22s ease;
}

.modal-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  animation: popIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 30px 28px 26px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes popIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 15px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover { background: #fee2e2; color: #dc2626; }

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  color: var(--deep);
  margin-bottom: 4px;
}

.modal-sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.modal-desc { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 18px; }

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.modal-actions .btn { flex: 1; min-width: 140px; }

.nav-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-btn:hover { color: #fff; transform: translateY(-2px); }
.nav-btn.amap { background: linear-gradient(135deg, #2f6bff, #1e4fd6); }
.nav-btn.baidu { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.note {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff8e6;
  border: 1px solid #f3dd9a;
  font-size: 13px;
  color: #8a6116;
}

/* 信息列表 */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.info-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.info-item:last-child { border-bottom: none; }
.info-item .icon { flex: none; font-size: 18px; }
.info-item strong { color: var(--deep); }
.info-item p { color: var(--ink-soft); font-size: 13px; }

.map-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.gallery figure { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 150px; object-fit: cover; }
.gallery figcaption { padding: 8px 10px; font-size: 12.5px; color: var(--ink-soft); background: #fff; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.09);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

/* 服务宫格 */
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
}

.service-card .icon { font-size: 26px; }
.service-card strong { font-size: 15.5px; color: var(--deep); }
.service-card span { font-size: 13px; color: var(--ink-soft); }

.speed-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7675, #e74c3c);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.speed-link:hover { color: #fff; transform: translateY(-2px); }

/* 驾校教练列表 */
.coach-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
}

.coach-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f6c177, #f39c12);
  font-size: 22px;
  flex: none;
  box-shadow: 0 6px 14px rgba(243, 156, 18, 0.3);
}

.coach-info {
  flex: 1;
  min-width: 0;
}

.coach-info strong {
  font-size: 15px;
  color: var(--deep);
}

.coach-info p {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.coach-info .coach-price {
  font-weight: 700;
  color: #e74c3c;
}

.coach-info .coach-desc {
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-btn {
  flex: none;
}

.coach-contact {
  margin: 14px auto;
  padding: 14px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
  color: var(--deep);
  text-align: left;
}

.coach-contact p {
  margin: 4px 0;
}

/* 食堂菜单 */
.menu-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.menu-tab {
  padding: 9px 20px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
}

.menu-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.menu-item:last-child { border-bottom: none; }
.menu-item .mname { flex: 1; }
.menu-item .tag {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fde68a;
  color: #92400e;
  font-weight: 700;
}

.menu-item .price { font-weight: 800; color: #e74c3c; min-width: 64px; text-align: right; }
.menu-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }

/* 课表 */
.schedule-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 4px; }
.schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--deep), var(--deep-2));
  color: #fff;
}

.schedule-head strong { font-size: 14.5px; }
.schedule-head span { font-size: 12px; color: rgba(255,255,255,0.75); }
.table-wrap { overflow-x: auto; }

.schedule {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.schedule th {
  padding: 8px 6px;
  background: var(--bg-soft);
  color: var(--deep);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.schedule td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}

.schedule td:first-child { color: var(--deep); font-weight: 600; }
.schedule tbody tr:hover td { background: #f0f6ff; }
.schedule .rest-row td { background: #fff8e6; color: #8a6116; font-weight: 600; text-align: center; }

/* 打印上传 */
.drop-zone {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  padding: 30px 16px;
  border: 2px dashed #b9c8e4;
  border-radius: 16px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.drop-zone.dragover { border-color: var(--primary); background: rgba(47,107,255,0.06); }
.drop-zone .icon { font-size: 34px; }
.drop-zone strong { font-size: 15px; color: var(--deep); }
.drop-zone em { font-style: normal; font-size: 12.5px; color: var(--ink-soft); }

.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 13.5px;
}

.file-item .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fsize { color: var(--ink-soft); flex: none; }
.file-item .fdel { border: none; background: none; color: #dc2626; cursor: pointer; font-size: 15px; padding: 2px 6px; }

.print-success { text-align: center; padding: 26px 10px 10px; }
.print-success .icon { font-size: 52px; }
.print-success h3 { font-size: 20px; color: var(--deep); margin: 8px 0; }
.print-success p { font-size: 14px; color: var(--ink-soft); }
.print-success .code {
  display: inline-block;
  margin: 12px 0;
  padding: 8px 22px;
  border-radius: 12px;
  background: var(--deep);
  color: #fff;
  font-size: 22px;
  letter-spacing: 6px;
  font-weight: 800;
}

/* 表单 */
.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--deep); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.13);
}

/* ============ 登录 / 注册 ============ */
.auth-panel { width: min(420px, 100%); }
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
}

.auth-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
}

.auth-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(11, 28, 63, 0.1);
}

.auth-tip { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 14px; }
.auth-tip a { font-weight: 600; }

/* ============ 全站搜索 ============ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(7, 20, 48, 0.68);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 16px 24px;
  animation: fadeIn 0.2s ease;
}

.search-overlay[hidden] { display: none; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(640px, 100%);
  padding: 12px 16px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  animation: popIn 0.25s ease;
}

.search-icon { font-size: 17px; }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
}

.search-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
}

.search-results {
  width: min(640px, 100%);
  margin-top: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 150px);
}

.search-empty { color: rgba(255,255,255,0.85); text-align: center; padding: 34px 0; font-size: 14px; }

.result-group {
  margin-bottom: 14px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: cardIn 0.3s ease both;
}

.result-group-head {
  padding: 9px 14px;
  background: linear-gradient(135deg, var(--deep), var(--deep-2));
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease;
}

.result-item:last-child { border-bottom: none; }
.result-item:hover { background: #f2f7ff; }
.result-item .r-icon { font-size: 18px; flex: none; }
.result-item .r-main { flex: 1; min-width: 0; }
.result-item .r-title { font-weight: 600; color: var(--deep); }
.result-item .r-sub { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-item .r-go { color: #c0c7d4; flex: none; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%);
  z-index: 400;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(11, 28, 63, 0.94);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  animation: popIn 0.25s ease;
  white-space: nowrap;
}

.toast[hidden] { display: none; }

/* ============ 测速页 ============ */
.speed-page { padding: 22px 0 36px; }

.speed-card {
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 36px 30px;
  text-align: center;
}

.speed-card h1 { font-size: 25px; color: var(--deep); }
.speed-card .sub { color: var(--ink-soft); font-size: 14px; margin: 6px 0 26px; }

.speed-start {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff7675, #e74c3c);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(231, 76, 60, 0.42);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 22px;
}

.speed-start:hover { transform: scale(1.05); }
.speed-start:disabled { cursor: wait; opacity: 0.8; transform: none; }
.speed-status { min-height: 24px; font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }

.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  margin-bottom: 26px;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #06b6d4, #10b981);
  transition: width 0.3s ease;
}

.speed-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.speed-result { padding: 18px 10px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); }
.speed-result .label { font-size: 13px; color: var(--ink-soft); }
.speed-result .value { font-size: 26px; font-weight: 800; color: var(--deep); margin-top: 4px; }
.speed-result .unit { font-size: 13px; font-weight: 500; color: var(--ink-soft); }

.speed-grade { margin-top: 20px; padding: 14px; border-radius: 16px; font-size: 15px; font-weight: 700; }
.speed-grade.good { background: #d1fae5; color: #065f46; }
.speed-grade.mid { background: #fef3c7; color: #92400e; }
.speed-grade.bad { background: #fee2e2; color: #991b1b; }

.speed-tips {
  margin-top: 26px;
  text-align: left;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

.speed-tips li { margin: 6px 0; padding-left: 18px; position: relative; }
.speed-tips li::before { content: "•"; position: absolute; left: 4px; color: var(--primary); font-weight: 800; }

/* ============ 桌面端适配 ============ */
@media (max-width: 560px) {
  .app { box-shadow: none; }
  .tabbar { width: 100%; }
  .fab { right: 18px; }
  .gallery { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .speed-results { grid-template-columns: 1fr 1fr; }
  .speed-result:last-child { grid-column: 1 / -1; }
  .modal-panel { padding: 26px 18px 22px; }
  .map-frame { margin: 10px; }
}

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