/* ============================================
   1. CSS 变量定义
   ============================================ */
:root {
  --glass: rgba(255, 255, 255, .25);
  --bg: #E1ECF2;
  --text: #4a7c59;
  --text-light: rgba(76, 175, 80, .15);
  --subtext: #333;
  --border: rgba(255, 255, 255, .4);
  --shadow: 0 2px 8px rgba(0, 0, 0, .1);

  --radius: 14px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --color-blue: #007bff;
  --color-orange: #ff9800;
  --color-brown: #C6A65D;
  --color-red: #b71c1c;
  --color-lightred: #FF6E6E;
  --color-gray: #9e9e9e;
  --color-sky: #73ABFF;
  --color-life: #FF8126;
}

/* ============================================
   2. 基础重置与通用样式
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: background .3s ease, color .3s ease;
}

.glass-btn {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(5px);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .2s, background .3s, color .3s;
}

.glass-btn:active {
  transform: scale(0.95);
}

/* ============================================
   3. 布局组件 - 头部与导航
   ============================================ */
.header {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  justify-content: center;
}

.weather-island {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  width: calc(100vw - 40px);
  max-width: 400px;
  height: 100px;
  padding: 16px 20px;
  border-radius: 50px;
  transform: scale(0.45, 0.48);
  transform-origin: center top;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-radius 0.35s ease;
}

.weather-island.expanded {
  transform: scale(1, 1);
  border-radius: 28px;
  cursor: default;
}

.weather-island.reminder-mode {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 152, 0, 0.1) 100%);
  border-color: rgba(255, 107, 53, 0.4);
  animation: reminderPulse 2s ease-in-out infinite;
}

@keyframes reminderPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4), var(--shadow); }
  50% { box-shadow: 0 0 0 6px rgba(255, 107, 53, 0), var(--shadow); }
}

.island-collapsed {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.2s ease;
  padding: 6px 14px;
  transform: scale(2.2, 2.08);
  transform-origin: center center;
}

.weather-island.expanded .island-collapsed {
  opacity: 0;
  pointer-events: none;
}

.island-expanded {
  position: absolute;
  inset: 16px 20px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease 0.15s;
  pointer-events: none;
}

.weather-island.expanded .island-expanded {
  opacity: 1;
  pointer-events: auto;
}

.island-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  overflow: hidden;
}

.main-title {
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
}

.sub-title {
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
}

#weatherIcon {
  font-size: 24px;
  flex-shrink: 0;
}

.hourly-scroll {
  flex: 1;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hourly-scroll::-webkit-scrollbar {
  display: none;
}

.hourly-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  scroll-snap-align: center;
  min-width: 44px;
  height: 100%;
}

.hourly-item.current .hourly-time,
.hourly-item.current .hourly-temp {
  font-weight: 700;
  color: var(--text);
}

.hourly-time {
  font-size: 11px;
  color: var(--subtext);
  font-weight: 500;
}

.hourly-icon {
  font-size: 22px;
}

.hourly-temp {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.island-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 29;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.island-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 45px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 4px;
  z-index: 999;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s;
  will-change: transform;
}

.bottom-nav:active {
  transform: translateX(-50%) scale(0.95);
}

.bottom-nav-slider {
  position: absolute;
  left: 4px;
  top: 3px;
  bottom: 3px;
  width: calc((100% - 8px) / 4);
  background: var(--text-light);
  border-radius: 28px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: -1;
  will-change: transform;
  transform: translateZ(0);
  transform-origin: center center;
}

.bottom-nav-item {
  position: relative;
  flex: 1;
  height: 48px;
  border-radius: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--subtext);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: color 0.2s;
  z-index: 1;
  pointer-events: auto;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.bottom-nav-item.active {
  color: var(--text);
}

.bottom-nav-item i {
  font-size: 16px;
}

/* 楼层栏 */
#floorBar {
  position: absolute;
  left: 20px;
  bottom: 80px;
  display: none;
  flex-direction: column;
  border: 1px solid var(--border);
  gap: 6px;
  z-index: 5;
  background: var(--glass);
  border-radius: 28px;
  padding: 6px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
  width: 48px;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.2s ease;
  will-change: transform;
}

#floorBar:active {
  transform: scale(0.98);
}

.floor-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--subtext);
  font-size: 12px;
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.2s, transform 0.2s;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.floor-btn.active {
  color: var(--text);
  font-weight: 600;
}

.floor-btn:active {
  transform: scale(0.9);
}

.floor-slider {
  position: absolute;
  left: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  background: var(--text-light);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  will-change: transform;
  transform-origin: center center;
  pointer-events: none;
}

/* ============================================
   室内地图图例卡片
   ============================================ */
#indoorLegend {
  position: absolute;
  right: 16px;
  bottom: 140px;
  z-index: 10;
  display: none;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 90px;
  max-width: 140px;
}

.legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.legend-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.legend-toggle {
  width: 34px;
  height: 18px;
  border-radius: 9px;
  background: var(--subtext);
  border: none;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  padding: 0;
}

.legend-toggle.active {
  background: var(--text);
}

.legend-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.legend-toggle.active .legend-toggle-thumb {
  transform: translateX(16px);
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-icon-box {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.legend-icon {
  font-size: 11px;
  font-weight: 900;
}

.legend-label {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  #indoorLegend {
    border-color: rgba(255, 255, 255, 0.12);
  }
  
  .legend-title {
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .legend-icon-box {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  }
}

/* 定位按钮 */
.location-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 996;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s, background 0.3s;
}

.location-btn:active {
  transform: scale(0.9);
}

.location-btn * {
  pointer-events: none;
}

/* ============================================
   4. 地图相关组件
   ============================================ */
#mapCanvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

#mapCanvas:active {
  cursor: grabbing;
}

.toggle-switch {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 22px;
  background: #ccc;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: background .3s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s;
}

.toggle-switch:checked::after {
  transform: translateX(18px);
}

/* ============================================
   5. 页面覆盖层基础
   ============================================ */
.page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 80px;
  overflow-y: auto;
  z-index: 998;
}

.page-overlay.active {
  display: flex;
}

.page-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 24px;
}

.back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   6. 通用卡片组件
   ============================================ */
.card {
  width: 100%;
  max-width: 360px;
  background: var(--glass);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform .2s;
}

.card:active {
  transform: scale(0.9);
}

.card img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  margin-left: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.card.blue { border: 1px solid var(--color-blue); color: var(--color-blue); }
.card.green { border: 1px solid var(--text); color: var(--text); }
.card.orange { border: 1px solid var(--color-orange); color: var(--color-orange); }
.card.brown { border: 1px solid var(--color-brown); color: var(--color-brown); }
.card.red { border: 1px solid var(--color-red); color: var(--color-red); }
.card.lightred { border: 1px solid var(--color-lightred); color: var(--color-lightred); }
.card.gray { border: 1px solid var(--color-gray); color: var(--color-gray); }
.card.red { border: 1px solid var(--color-red); color: var(--color-red); }

.tool-btn.qq-channel-row-btn {
  flex-direction: row;
  aspect-ratio: auto;
  height: auto;
  padding: 8px 10px;
  gap: 8px;
  justify-content: center;
  width: 100%;
  border-radius: 16px;
  border: 1px solid #6BA3FF;
}

.tool-btn.qq-channel-row-btn img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  pointer-events: none;
  margin-left: 0;
}

.tool-btn.qq-channel-row-btn span {
  font-size: 15px;
  font-weight: 600;
  color: #6BA3FF;
  pointer-events: none;
}

.tools-qq-channel-section {
  width: 100%;
  max-width: 400px;
  margin-bottom: 16px;
}

/* APP下载底部按钮容器 */
.tools-app-section {
  width: 100%;
  max-width: 400px;
  margin-top: 0;
  margin-bottom: 16px;
}

/* ================== 频道热议卡片 ================== */
.channel-hot-card {
  width: 100%;
  max-width: 400px;
  background: var(--glass);
  border: 1px solid #6BA3FF;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.channel-hot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-hot-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-hot-title-wrap img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: contain;
}

.channel-hot-title-wrap span {
  font-size: 15px;
  font-weight: 600;
  color: #6BA3FF;
}

.channel-hot-join-btn {
  padding: 8px 16px;
  border: 1px solid #6BA3FF;
  background: transparent;
  color: #6BA3FF;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.channel-hot-join-btn:hover {
  background: rgba(107, 163, 255, 0.1);
}

.channel-hot-join-btn:active {
  transform: scale(0.95);
}

.channel-hot-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}

/* Tab 切换栏 */
.channel-hot-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.channel-hot-tab {
  background: transparent;
  border: none;
  color: var(--subtext);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
  position: relative;
  z-index: 2;
}

.channel-hot-tab.active {
  color: #6BA3FF;
  font-weight: 600;
}

.channel-tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: #6BA3FF;
  border-radius: 1px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.channel-hot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-hot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}

.channel-hot-item:active {
  opacity: 0.6;
}

.channel-hot-index {
  font-size: 16px;
  font-weight: 700;
  color: #6BA3FF;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.channel-hot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--text-light);
}

.channel-hot-content {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--subtext);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.channel-hot-loading {
  text-align: center;
  font-size: 13px;
  color: var(--subtext);
  padding: 12px 0;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .channel-hot-card {
    border-color: #6BA3FF;
  }
  .channel-hot-title-wrap span {
    color: #8BB8FF;
  }
  .channel-hot-join-btn {
    border-color: #8BB8FF;
    color: #8BB8FF;
  }
  .channel-hot-join-btn:hover {
    background: rgba(139, 184, 255, 0.12);
  }
  .channel-hot-tab.active {
    color: #8BB8FF;
  }
  .channel-tab-indicator {
    background: #8BB8FF;
  }
  .channel-geo-toggle-btn.active {
    background: #8BB8FF;
  }
}

/* ============================================
   7. 工具页面（抽屉式）
   ============================================ */
#tools-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* 保留顶部圆角 */
  border-radius: 32px 32px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
  z-index: 997;
  visibility: hidden;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.32, 0.72, 0, 1),
              opacity 0.3s ease,
              visibility 0.4s;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 顶部 padding 加大到 52px，让内容从圆角下方开始，避免被圆角区域裁剪 */
  padding: 52px 20px 80px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

#tools-page::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* 展开状态：全屏覆盖，保留顶部圆角 */
#tools-page.expanded,
#tools-page.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  /* 不覆盖 border-radius，保持 32px 32px 0 0 */
}

/* 收起状态 */
#tools-page.collapsed {
  visibility: visible;
  opacity: 1;
  pointer-events: none;
  transform: translateY(100%);
  border-radius: 32px 32px 0 0;
}

#tools-page.collapsed * {
  pointer-events: none !important;
}

/* 宽屏居中适配 */
@media (min-width: 480px) {
  #tools-page {
    width: 580px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    border-radius: 32px 32px 0 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  #tools-page.expanded,
  #tools-page.active {
    transform: translateX(-50%) translateY(0);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    width: 580px;
    /* 保留顶部圆角 */
  }

  #tools-page.collapsed {
    transform: translateX(-50%) translateY(100%);
    border-radius: 32px 32px 0 0;
  }

  #tools-page.dragging,
  #tools-page.resetting,
  #tools-page.closing {
    left: 50%;
    right: auto;
  }
}

.drawer-drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  background: transparent;
  pointer-events: none;
  touch-action: none;
}

.drawer-hint-bar {
  width: 40px;
  height: 5px;
  background: var(--subtext);
  opacity: 0.3;
  border-radius: 3px;
  margin-bottom: 6px;
  transition: opacity 0.2s, transform 0.2s;
}

.drawer-hint-text {
  font-size: 11px;
  color: var(--subtext);
  opacity: 0.7;
  transition: opacity 0.5s ease;
  pointer-events: none;
  white-space: nowrap;
}

.drawer-hint-text.hidden {
  opacity: 0;
}

.tools-content-container {
  width: 100%;
  max-width: 480px;
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* 全局页面装饰图（右下角，不跟随内容滚动） */
.page-deco-layer {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 240px;
  max-width: 50%;
  height: auto;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0.35;
}

.page-deco-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.tools-home-content {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-bottom: 120px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  opacity: 1;
}

.tools-home-content::-webkit-scrollbar {
  display: none;
}

.tools-home-content.hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  display: none;
}

.tools-sub-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  pointer-events: none;
  padding-bottom: 100px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tools-sub-page::-webkit-scrollbar {
  display: none;
}

.tools-sub-page.active {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  position: relative;
  height: auto;
  min-height: 100%;
}

.sub-page-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
  margin-top: 16px;
  flex-shrink: 0;
}

.sub-page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.sub-page-back {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow);
}

.sub-page-back:hover {
  background: var(--text-light);
  transform: translateY(-50%) scale(1.05);
}

.sub-page-back:active {
  transform: translateY(-50%) scale(0.95);
}

#tools-page .page-title {
  margin-bottom: 20px;
  margin-top: 16px;
  font-size: 22px;
}

.tools-grid-section {
  width: 100%;
  max-width: 400px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.tools-divider {
  width: 100%;
  max-width: 400px;
  height: 1px;
  background: var(--border);
  margin: 8px 0 16px 0;
  opacity: 0.6;
}

.tools-grid-section-secondary {
  width: 100%;
  max-width: 400px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

.tool-btn {
  aspect-ratio: 1;
  background: transparent;
  border: none;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s;
  padding: 8px;
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.tool-btn:active {
  transform: scale(0.92);
  background: rgba(128, 128, 128, 0.1);
}

.tool-btn.pressing {
  transform: scale(0.92);
  background: rgba(128, 128, 128, 0.15);
  transition: transform 0.1s ease, background 0.1s ease;
}

.tool-btn img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  pointer-events: none;
}

.tool-btn span {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000;
  pointer-events: none;
  word-break: break-all;
}

.tool-btn.ad-badge::before {
  content: '广告';
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 500;
  pointer-events: none;
}

.tools-search-bar {
  width: 100%;
  max-width: 400px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
  margin-top: 16px;
}

.tools-search-bar:active {
  transform: scale(0.98);
  background: rgba(128, 128, 128, 0.15);
}

.tools-search-bar i {
  font-size: 16px;
  color: var(--subtext);
  opacity: 0.6;
}

.search-placeholder {
  font-size: 15px;
  color: var(--subtext);
  opacity: 0.7;
}

.page-transitioning #tools-page {
  pointer-events: none !important;
}

/* 店铺详情页 */
#store-detail-page {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.store-detail-drawer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  width: 100%;
  max-width: 480px;
}

.store-detail-hero {
  flex-shrink: 0;
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.store-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-detail-info-card {
  flex-shrink: 0;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}

.store-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(128, 128, 128, 0.05);
  border-radius: 12px;
  transition: transform 0.2s;
}

.store-info-row:active {
  transform: scale(0.98);
  background: rgba(128, 128, 128, 0.1);
}

.store-info-row i {
  font-size: 20px;
  color: var(--text);
  margin-top: 2px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

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

.store-info-label {
  font-size: 12px;
  color: var(--subtext);
  margin-bottom: 4px;
  opacity: 0.8;
  font-weight: 500;
}

.store-info-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.remark-row .store-info-value {
  font-size: 14px;
  font-weight: normal;
  line-height: 1.6;
}

.remark-row .store-info-value img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ============================================
   14. 动画与特效
   ============================================ */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes fa-spin {
  to { --angle: 360deg; }
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0) rotate(-45deg); opacity: 1; }
  50% { transform: translateY(-10px) rotate(-45deg); opacity: 0.8; }
}

/* ============================================
   15. 暗色模式（统一放在最后）
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --glass: rgba(0, 0, 0, .25);
    --bg: #30425A;
    --text: #a8e063;
    --subtext: #e5e7eb;
    --border: rgba(255, 255, 255, .15);
    --shadow: 0 2px 12px rgba(0, 0, 0, .25);
  }

  .page-overlay {
    background: rgba(30, 30, 30, 0.7);
  }

  #tools-page {
    background: rgba(30, 30, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
  }

  #tools-page.expanded {
    height: 100vh;
    max-height: 100vh;
  }

  #tools-page .option-switch-title,
  #tools-page .tool-btn span {
    color: #fff;
  }

  #tools-page .option-switch-icon {
    filter: brightness(1.2);
  }

  .tool-btn.qq-channel-row-btn span {
    color: #fff;
  }

  .option-switch-title,
  .tool-btn span {
    color: #fff;
  }

  #homeScheduleTable th:first-child,
  #homeScheduleTable td:first-child {
    background: rgba(255, 255, 255, 0.06);
  }

  #homeScheduleTable td:not(:has(.course-cell)):not(:first-child) {
    background: rgba(255, 255, 255, 0.03);
  }

  .course-cell-overlay {
    color: #fff;
    border-color: rgba(255,255,255,0.15);
  }

  .course-cell-overlay .course-name,
  .course-cell-overlay .course-room,
  .course-cell-overlay .course-teacher {
    color: rgba(255,255,255,0.95);
  }

  .room-name {
    color: #fff;
  }

  .modal-overlay {
    background: rgba(0, 0, 0, 0.6);
  }

  .cabinet-btn {
    border-color: rgba(77, 148, 255, 0.3);
  }
  .station-icon-wrap {
    background: rgba(255, 255, 255, 0.1);
  }
  .station-locate-btn {
    background: rgba(60, 60, 60, 0.6);
    color: var(--text);
  }
  .station-locate-btn:hover {
    background: rgba(80, 80, 80, 0.8);
  }
}

/* ============================================
   16. 响应式适配
   ============================================ */
@media (max-width: 380px) {
  .weather-island {
    width: calc(100vw - 24px);
    max-width: none;
    transform: scale(0.5, 0.48);
  }

  .weather-island:not(.expanded) .island-collapsed {
    transform: scale(2, 2.08);
  }

  .island-expanded {
    inset: 14px 16px;
  }

  #homeScheduleTable th:first-child,
  #homeScheduleTable td:first-child {
    width: 36px !important;
    min-width: 36px !important;
  }

  #homeScheduleTable th:not(:first-child),
  #homeScheduleTable td:not(:first-child) {
    width: calc((100% - 36px) / 7) !important;
  }
}

@supports (-webkit-touch-callout: none) {
  .tools-sub-page,
  .tools-home-content,
  #calendar-page,
  #search-page {
    -webkit-overflow-scrolling: touch;
  }

  .tools-sub-page,
  .tools-home-content {
    overscroll-behavior-y: contain;
  }
}

/* ============================================
   iOS 版本切换按钮
   ============================================ */
.ios-version-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ios-toggle-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.ios-toggle-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.ios-toggle-btn:active {
  transform: scale(0.95);
}

.ios-guide-content strong {
  color: var(--text);
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .ios-guide-content strong {
    color: var(--text);
  }
}

/* ============================================
   工具页板块分组
   ============================================ */
.tools-section {
  width: 100%;
  max-width: 400px;
  border: 1.5px solid;
  border-radius: 20px;
  padding: 14px 10px 10px;
  margin-bottom: 16px;
  position: relative;
  background: var(--glass);
  box-shadow: var(--shadow);
}

.tools-section-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.study-section {
  border-color: var(--color-blue);
}
.study-section .tools-section-title {
  color: var(--color-blue);
}

.life-section {
  border-color: var(--text);
}
.life-section .tools-section-title {
  color: var(--text);
}

.other-section {
  border-color: var(--color-orange);
}
.other-section .tools-section-title {
  color: var(--color-orange);
}
.welcome-section {
  border-color: var(--color-orange);
}
.welcome-section .tools-section-title {
  color: var(--color-orange);
}

.frequent-section {
  border-color: var(--color-sky);
}
.frequent-section .tools-section-title {
  color: var(--color-sky);
}

/* ============================================
   常用卡片与编辑功能样式
   ============================================ */
.tools-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.tools-section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 10px;
  opacity: 0.6;
}

.tools-section-edit-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--subtext);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tools-section-edit-btn:active {
  transform: scale(0.95);
}

.tools-section-edit-btn.editing {
  background: var(--text-light);
  color: var(--text);
  border-color: var(--text);
}

.tools-section-edit-btn i {
  font-size: 11px;
}

/* 按钮右上角添加/移除标记 */
.tool-btn-action-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  z-index: 2;
  cursor: pointer;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}

.tool-btn-action-badge.remove {
  background: #ff4757;
}

.tool-btn-action-badge.add {
  background: #2ed573;
}

.tool-btn-action-badge.disabled {
  background: #ccc;
  cursor: not-allowed;
}

.tool-btn-action-badge:active {
  transform: scale(0.85);
}

.tool-btn-action-badge i {
  font-size: 9px;
  pointer-events: none;
}

/* 常用卡片空状态 */
.frequent-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px 0;
  color: var(--subtext);
  font-size: 13px;
  opacity: 0.7;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .frequent-section {
    border-color: #73ABFF;
  }
  .frequent-section .tools-section-title {
    color: #8BB8FF;
  }
  .tool-btn-action-badge {
    border-color: rgba(255,255,255,0.8);
  }
}

/* ============================================
   高级 Toast（毛玻璃 + 顶部按钮）
   ============================================ */
.premium-toast {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: calc(100vw - 40px);
  min-width: 280px;
}

.premium-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.premium-toast-msg {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  flex: 1;
  line-height: 1.4;
}

.premium-toast-btn {
  padding: 8px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--text);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.premium-toast-btn:hover {
  background: rgba(46, 213, 115, 0.1);
}

.premium-toast-btn:active {
  transform: scale(0.95);
}

@media (prefers-color-scheme: dark) {
  .premium-toast {
    background: rgba(30, 30, 30, 0.7);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  }
  .premium-toast-msg {
    color: var(--text);
  }
  .premium-toast-btn {
    border-color: var(--text);
    color: var(--text);
  }
  .premium-toast-btn:hover {
    background: rgba(46, 213, 115, 0.15);
  }
}

/* ================== VR街景页 ================== */
.vr-hint-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 12px 14px;
  background: rgba(255, 152, 0, 0.12);
  border: 1px solid rgba(255, 152, 0, 0.35);
  border-radius: 12px;
  color: #ff9800;
  font-size: 13px;
  font-weight: 500;
}
.vrstreetview-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vrstreetview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.vrstreetview-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.vrstreetview-thumb {
  width: 80px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}
.vrstreetview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.vrstreetview-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.vrstreetview-sub {
  font-size: 12px;
  color: var(--subtext);
}
.vrstreetview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.vrstreetview-btn:active { opacity: 0.85; }

/* ================== 街景全景 ================== */
#panoBox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: none;
}
#panoViewer {
  position: absolute;
  inset: 0;
  cursor: grab;
}
#panoViewer:active { cursor: grabbing; }
#panoBackBtn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
#panoBackBtn:active { transform: scale(0.95); }
.pano-text-bottom {
  position: absolute;
  bottom: 20px;
  left: 16px;
  z-index: 10001;
  text-align: left;
  pointer-events: none;
  user-select: none;
}
.pano-line {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.pano-controls {
  position: absolute;
  bottom: 20px;
  right: 16px;
  z-index: 10001;
}
.pano-place-list {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10002;
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  background: var(--glass);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.pano-thumb {
  flex-shrink: 0;
  width: 120px;
  cursor: pointer;
  text-align: center;
}
.pano-thumb img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  background: #333;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.pano-thumb:hover img { border-color: var(--text); }
.pano-thumb span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (prefers-color-scheme: dark) {
  .vrstreetview-thumb { background: #3a3a3c; }
  .pano-thumb img { background: #2c2c2e; }
}
/* ============================================
   长按分享弹窗
   ============================================ */
#mapShareModal {
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#mapShareModal .map-share-modal-content {
  width: 380px;
  max-width: calc(100vw - 40px);
  animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#mapShareModal .map-share-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100%;
}

#mapShareModal .map-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

#mapShareModal .map-share-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#mapShareModal .map-share-header-left img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--text-light);
}

#mapShareModal .map-share-header-left span {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

#mapShareModal .map-share-header .map-share-coords {
  font-size: 11px !important;
  color: var(--subtext) !important;
  opacity: 0.7 !important;
  font-weight: 500 !important;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

#mapShareModal .map-share-img-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

#mapShareModal .map-share-img-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#mapShareModal .map-share-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

#mapShareModal .map-share-qrcode-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#mapShareModal .map-share-qrcode-wrap canvas {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

#mapShareModal .map-share-qrcode-wrap span {
  font-size: 11px;
  color: var(--subtext);
  font-weight: 500;
}

#mapShareModal .map-share-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}

#mapShareModal .map-share-save-btn:active {
  opacity: 0.85;
}

#mapShareModal .map-share-close-hint {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  pointer-events: none;
}

/* 触发按钮 */
.map-share-trigger-btn {
  position: fixed;
  z-index: 995;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s, opacity 0.2s;
  font-family: inherit;
  pointer-events: auto;
  transform: translate(14px, -14px);
}

.map-share-trigger-btn:active {
  transform: translate(14px, -14px) scale(0.92);
}

@media (prefers-color-scheme: dark) {
  #mapShareModal {
    background: rgba(0, 0, 0, 0.15);
  }
  #mapShareModal .map-share-qrcode-wrap canvas {
    background: #fff;
  }
}