/**
 * Fish or Die - 主样式入口
 * Design Token System v1.0
 * 
 * 使用顺序：base → tokens → components
 * 所有组件使用 CSS 变量，无硬编码值
 */
/* ── 1. 全局重置 ── */
@import url('./base.css');
/* ── 2. Design Token ── */
@import url('./design-tokens.css');
/* ── 3. 组件模块 ── */
@import url('./button.css');
@import url('./card.css');
@import url('./modal.css');
@import url('./form.css');
@import url('./navigation.css');
@import url('./bottom-nav.css');
/* ============================================
   旧样式兼容层
   将原有类名映射到新的 Token 系统
   后续逐步替换为新类名即可
   ============================================ */
/* ── 兼容：旧类名 → 新变量 ── */
#login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-6);
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
}
#login-page .logo {
  font-size: 64px;
  margin-bottom: var(--space-4);
}
#login-page h1 {
  color: var(--color-text-inverse);
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}
#login-page .subtitle {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-10);
}
/* ── 兼容：Auth Footer ── */
.auth-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--font-size-sm);
}
.auth-footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.auth-footer a:hover {
  color: white;
}
.auth-sep {
  color: rgba(255, 255, 255, 0.4);
}
.auth-tip {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: var(--space-4);
}
/* ── 兼容：首页头部 ── */
.home-header {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
  padding: var(--space-5);
  color: white;
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.user-info .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.user-details .nickname {
  display: block;
  font-size: var(--font-size-lg);
  font-weight: 600;
}
.user-details .level {
  display: block;
  font-size: var(--font-size-sm);
  opacity: 0.9;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.badge {
  padding: var(--space-1) var(--space-2);
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  color: white;
}
.btn-text {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  cursor: pointer;
}
.btn-text:active {
  opacity: 0.8;
}
/* ── 兼容：经验条 ── */
.exp-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin-top: var(--space-2);
  overflow: hidden;
}
.exp-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 3px;
  transition: width var(--transition-normal);
}
.exp-text {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
  margin-top: var(--space-1);
}
/* ── 兼容：统计网格 ── */
.stats-grid {
  display: flex;
  padding: var(--space-4);
  gap: var(--space-3);
}
.stat-card {
  flex: 1;
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-2);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-icon {
  font-size: 24px;
  margin-bottom: var(--space-1);
}
.stat-card .stat-value {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-primary);
}
.stat-card .stat-label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
}
/* ── 兼容：快捷操作 ── */
.quick-actions {
  display: flex;
  padding: 0 var(--space-4);
  gap: var(--space-3);
}
.action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  background: var(--color-bg-surface);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.action-btn:active {
  transform: scale(0.97);
}
.action-btn .action-icon {
  font-size: 28px;
}
.action-btn span:last-child {
  font-size: var(--font-size-sm);
  font-weight: 500;
}
/* ── 兼容：Section ── */
.section {
  padding: var(--space-4);
}
.section-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
#home-page .empty-state {
  padding: var(--space-10) var(--space-5);
  text-align: center;
  color: var(--color-text-secondary);
}
/* Feed Tab 切换 */
.feed-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.feed-tab {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--color-text-secondary, #999);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.feed-tab.active {
  background: rgba(255,255,255,0.18);
  color: var(--color-text-primary, #fff);
}

/* Following 用户卡片网格 */
.following-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.following-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.2s;
}
.following-user-card:hover {
  background: rgba(255,255,255,0.12);
}
.following-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.following-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.following-nickname {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-primary, #fff);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.following-latest {
  font-size: 10px;
  color: var(--color-text-secondary, #999);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 兼容：旧版 Modal ── */
.modal-content h3 {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--font-size-lg);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.modal-actions {
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-3);
  border-top: 1px solid var(--color-divider);
}
.btn-secondary {
  flex: 1;
  height: var(--btn-height);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.btn-secondary:active {
  background: var(--color-divider);
}
/* ── 兼容：成就网格 ── */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.achievement-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  background: var(--color-bg-page);
  border-radius: var(--radius-md);
  text-align: center;
}
.achievement-card.earned {
  background: linear-gradient(135deg, #FFF9C4, #FFECB3);
}
.achievement-icon {
  font-size: 32px;
  margin-bottom: var(--space-2);
  opacity: 0.3;
}
.achievement-card.earned .achievement-icon {
  opacity: 1;
}
.achievement-name {
  font-size: var(--font-size-xs);
  color: var(--color-text-primary);
}
.achievement-card:not(.earned) {
  filter: grayscale(1);
  opacity: 0.6;
}
/* ── 兼容：动态列表 ── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.activity-content {
  flex: 1;
  min-width: 0;
}
.activity-title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: 2px;
}
.activity-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
#recent-activities {
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
/* ── 响应式 ── */
@media (max-width: 360px) {
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ── SOS 列表模态框 ── */
.sos-list-card {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.sos-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.sos-modal-header .sos-modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}
.sos-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-page);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.sos-modal-close:active {
  background: var(--color-divider);
  transform: scale(0.95);
}
.sos-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sos-list-container {
  padding: var(--space-3) var(--space-4);
}
.sos-list-empty {
  text-align: center;
  padding: var(--space-10) var(--space-5);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}
.sos-list-item {
  background: var(--color-bg-page);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  position: relative;
}
.sos-list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-3);
}
.sos-list-item-status {
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.sos-list-item-status.active {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
}
.sos-list-item-status.closed {
  background: rgba(142, 142, 147, 0.15);
  color: #8e8e93;
}
.sos-list-item-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.sos-list-item-location {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.sos-list-item-message {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}
.sos-list-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sos-list-item-responses {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.sos-list-item-action {
  padding: 6px 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sos-list-item-action:active {
  transform: scale(0.95);
  opacity: 0.85;
}
.sos-list-item-action.responding {
  background: rgba(255, 149, 0, 0.2);
  color: #ff9500;
}
.sos-list-item-action.closed {
  background: var(--color-bg-page);
  color: var(--color-text-disabled);
  cursor: not-allowed;
}
.sos-list-item-close-btn {
  font-size: var(--font-size-xs);
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sos-list-item-close-btn:active {
  transform: scale(0.95);
  opacity: 0.8;
}
.sos-list-item-close-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.sos-list-loading {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}
.sos-nearby-distance {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  margin-top: 2px;
}
/* ══════════════════════════════════════
   map-page 布局
   ══════════════════════════════════════ */
#map-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
#map-main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* ── 地图区域 ── */
.map-view {
  width: 100%;
  height: 55vh;
  min-height: 280px;
  background: var(--color-bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
}
.map-placeholder .map-icon {
  font-size: 48px;
  opacity: 0.5;
}
.map-placeholder p {
  font-size: var(--font-size-base);
  margin: 0;
}
.map-sub {
  font-size: var(--font-size-sm) !important;
  opacity: 0.6;
}
/* ── SOS 区域 ── */
.map-section {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
/* SOS 快捷卡 */
.sos-quick-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}
.sos-card-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.sos-card-content {
  flex: 1;
  min-width: 0;
}
.sos-card-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}
.sos-card-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}
/* SOS 求助按钮 */
.sos-btn {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--sos-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--sos-accent-glow);
  transition:
    background var(--transition-fast),
    transform var(--transition-spring);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.sos-btn:active {
  transform: scale(0.95);
  background: #e63946;
}
/* SOS 链接按钮行 */
.map-sos-links {
  display: flex;
  gap: var(--space-3);
}
.sos-link-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-spring);
  -webkit-tap-highlight-color: transparent;
}
.sos-link-btn:active {
  transform: scale(0.96);
  background: var(--glass-bg-hover);
}
/* ==========================================
   地图打卡点标记样式
   ========================================== */
.amap-pin-marker {
  position: relative;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.amap-pin-marker .pin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  background: var(--color-primary, #4a9eff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.amap-pin-marker .pin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.amap-pin-marker .pin-avatar span {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.amap-pin-marker .pin-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4a9eff;
  border: 2px solid #fff;
}
.amap-pin-marker .pin-dot.has-fish {
  background: #f59e0b;
}
/* 信息窗体 */
.pin-info-window {
  padding: 4px;
  min-width: 160px;
}
.pin-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.pin-nickname {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a2e;
}
.pin-time {
  font-size: 11px;
  color: #888;
}
.pin-photo {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}
.pin-fish-info {
  font-size: 13px;
  color: #d97706;
  font-weight: 600;
  margin-bottom: 4px;
}
.pin-addr {
  font-size: 12px;
  color: #666;
}
/* SOS 历史/nearby 弹窗卡片 */
.sos-history-card,
.sos-nearby-card {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* 头部行（替代 .sos-modal-header） */
.sos-modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.sos-modal-header-row .sos-modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}
/* 求助记录里 loading 样式 */
.sos-list-loading {
  text-align: center;
  padding: var(--space-10) var(--space-5);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}
/* 附近求助列表 - 卡片样式 */
.sos-nearby-card .sos-list-container {
  padding: var(--space-3) var(--space-4);
  overflow-y: auto;
  flex: 1;
}
.sos-list-item.urgent {
  border-left: 3px solid #ef4444;
}
.sos-list-item-resolve-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  color: #ef4444;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sos-list-item-resolve-btn:active {
  background: rgba(239,68,68,0.15);
}
/* 响应成功弹窗 */
.sos-respond-card {
  text-align: center;
  padding: var(--space-6);
}
.sos-respond-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
}
.sos-respond-info {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}
.sos-respond-info p {
  margin: var(--space-1) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}
/* ==========================================
   记录页 - 出钓会话管理
   ========================================== */
#record-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition-fast);
}
.icon-btn:active { background: var(--color-divider); }
/* 空闲状态 */
.record-idle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.record-start-card {
  text-align: center;
  padding: var(--space-10) var(--space-8);
  max-width: 320px;
  margin: 0 auto;
}
.record-icon {
  font-size: 64px;
  margin-bottom: var(--space-4);
}
.record-start-card h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--color-text-primary);
}
.record-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin: 0 0 var(--space-8);
}
.record-start-btn {
  font-size: var(--font-size-base);
  padding: var(--space-4) var(--space-6);
}
.record-gps-hint {
  margin: var(--space-4) 0 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-disabled);
}
/* 出钓中状态 */
.record-active {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.session-status-card {
  padding: var(--space-5);
}
.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 125, 50, 0.15);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}
.session-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.session-duration {
  font-size: 40px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
  letter-spacing: 2px;
  margin-bottom: var(--space-4);
}
.session-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.session-info-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}
.session-info-label { flex-shrink: 0; }
.session-info-value { color: var(--color-text-primary); }
/* 鱼获列表 */
.session-fish-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.session-fish-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-page);
  border-radius: var(--radius-md);
}
.session-fish-item-info {
  flex: 1;
}
.session-fish-item-name {
  font-weight: 600;
  font-size: var(--font-size-sm);
}
.session-fish-item-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
/* 操作按钮组 */
.session-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}
.session-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-2);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}
.session-action-btn:active {
  transform: scale(0.96);
  background: var(--glass-bg-hover);
}
.session-action-btn span:first-child { font-size: 24px; }
.session-action-btn.end-btn {
  background: rgba(46, 125, 50, 0.1);
  border-color: rgba(46, 125, 50, 0.3);
  color: var(--color-primary);
}
/* 历史记录 */
.record-history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.record-history-item {
  padding: var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.record-history-item:active {
  transform: scale(0.98);
}
.record-history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}
.record-history-item-date {
  font-weight: 700;
  font-size: var(--font-size-sm);
}
.record-history-item-location {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.record-history-item-fish {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  margin-top: var(--space-1);
}
.record-history-empty {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-secondary);
}
/* ── SOS/通用弹窗基础样式 ── */
.sos-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sos-modal.hidden {
  display: none;
}
.sos-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sos-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  padding: 24px 20px 20px;
  text-align: center;
  background: rgba(20, 22, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.sos-modal-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.sos-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 8px;
}
.sos-modal-desc {
  font-size: 13px;
  color: #aaa;
  margin: 0 0 20px;
  line-height: 1.5;
}
.sos-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sos-modal-cancel {
  background: none;
  border: none;
  color: #888;
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
}
/* 按钮样式补充 */
.sos-modal-actions .btn-secondary,
.sos-modal-actions .btn-primary {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.sos-modal-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e0e0e0;
}
.sos-modal-actions .btn-secondary:active {
  background: rgba(255, 255, 255, 0.15);
}
.sos-modal-actions .btn-primary {
  background: linear-gradient(135deg, #4a9eff, #6bb3ff);
  color: #fff;
}
.sos-modal-actions .btn-primary:active {
  transform: scale(0.98);
}
.sos-modal-actions .btn-ghost.sos-modal-cancel {
  background: none;
  border: none;
  color: #888;
}
/* ══════════════════════════════════════
   Profile 页面样式
   ══════════════════════════════════════ */
   ══════════════════════════════════════ */
#profile-main {
  padding: 12px 16px 60px;
  overflow-y: auto;
}
/* 身份卡片 */
.profile-identity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #4a9eff), var(--accent-light, #7bb8ff));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  overflow: hidden;
}
.profile-identity-info {
  flex: 1;
  min-width: 0;
}
.profile-nickname {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary, #f0f0f0);
  margin-bottom: 4px;
}
.profile-level {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary, #aaa);
  margin-bottom: 6px;
}
.profile-exp-text {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-secondary, #888);
}
.profile-exp-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.profile-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #4a9eff), #7bb8ff);
  border-radius: 2px;
  transition: width 0.4s ease;
}
/* 统计卡片行 */
.profile-stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.profile-stat-card {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
}
.profile-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f0f0);
  margin-bottom: 2px;
}
.profile-stat-label {
  font-size: 11px;
  color: var(--text-secondary, #aaa);
}
/* 区块标题 */
.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}
/* 字段行 */
.profile-field {
  padding: 12px 14px;
  margin-bottom: 8px;
}
.profile-field-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary, #aaa);
  margin-bottom: 8px;
}
.profile-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary, #f0f0f0);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.profile-input:focus {
  border-color: var(--accent, #4a9eff);
}
.profile-input::placeholder {
  color: var(--text-secondary, #666);
}
.profile-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-primary, #f0f0f0);
  font-size: 13px;
  outline: none;
}
.profile-select.full-width {
  width: 100%;
}
/* 性别/主题切换按钮组 */
.profile-toggle-group {
  display: flex;
  gap: 6px;
}
.profile-toggle-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary, #aaa);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.profile-toggle-btn.active {
  background: rgba(74, 158, 255, 0.2);
  border-color: var(--accent, #4a9eff);
  color: var(--text-primary, #f0f0f0);
}
/* 出生年月选择 */
.profile-birth-row {
  padding: 12px 14px;
}
.profile-birth-selects {
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-birth-selects .profile-select {
  flex: 1;
}
.profile-birth-sep {
  font-size: 13px;
  color: var(--text-secondary, #888);
  flex-shrink: 0;
}
/* 装备行 */
.profile-equip-row {
  display: flex;
  gap: 8px;
}
.profile-equip-row .profile-select {
  flex: 1;
}
/* 头像行 */
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #4a9eff), var(--accent-light, #7bb8ff));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  overflow: hidden;
  cursor: pointer;
}
/* 头像图片 */
/* 只读字段 */
.profile-readonly-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-readonly-value {
  font-size: 14px;
  color: var(--text-primary, #f0f0f0);
}
.profile-readonly-hint {
  font-size: 11px;
  color: var(--text-secondary, #666);
  margin-top: 2px;
}
/* 密码行 */
.profile-pw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.profile-pw-dots {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--text-secondary, #888);
}
.profile-pw-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
/* 隐私开关 */
.profile-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.profile-switch-row:last-child {
  border-bottom: none;
}
.profile-switch-label {
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
}
/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: 0.3s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
input:checked + .slider {
  background: var(--accent, #4a9eff);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
/* 保存按钮 */
.profile-save-btn {
  width: 100%;
  margin-top: 12px;
}
/* 退出按钮 */
.profile-logout-btn {
  width: 100%;
}
/* 小按钮 */
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}
/* 危险按钮 */
.btn-danger {
  background: rgba(255, 70, 70, 0.15);
  border: 1px solid rgba(255, 70, 70, 0.4);
  color: #ff6b6b;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.btn-danger:hover {
  background: rgba(255, 70, 70, 0.25);
}
/* 头像图片 */
.profile-avatar img,
.profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
/* 游客头像 */
.profile-avatar.guest,
.profile-avatar-lg.guest {
  background: rgba(255, 255, 255, 0.1);
}
/* 加载中隐藏 */
.profile-loading {
  opacity: 0.5;
  pointer-events: none;
}
/* ══════════════════════════════════════════
   港口选择器
══════════════════════════════════════════ */
/* 港口行：输入框 + 按钮组 */
.profile-port-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-port-row .profile-input {
  flex: 1;
  min-width: 0;
}
.profile-port-map-btn,
.profile-port-clear-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}
.profile-port-map-btn:hover { background: #f0f0f0; border-color: #aaa; }
.profile-port-map-btn:active { background: #e0e0e0; }
.profile-port-clear-btn { color: #999; }
.profile-port-clear-btn:hover { background: #ffe5e5; border-color: #f88; color: #d00; }
/* 港口选择弹窗 */
.port-picker-card {
  width: 90vw;
  max-width: 480px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.port-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.port-picker-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.port-picker-search { margin-bottom: 10px; }
.port-result-list {
  flex: 1;
  overflow-y: auto;
  max-height: 50vh;
}
.port-result-hint {
  text-align: center;
  color: #999;
  padding: 20px 0;
  font-size: 14px;
}
.port-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: background 0.15s;
}
.port-result-item:hover { background: #f5f9ff; }
.port-result-item:active { background: #e0ecff; }
.port-result-name { font-size: 14px; color: #333; }
.port-result-code { font-size: 12px; color: #aaa; }
/* ══════════════════════════════════════════
   首页潮汐卡片
══════════════════════════════════════════ */
/* ==========================================
   潮汐模块 - 参考天地图样式
   ========================================== */
/* ==========================================
   潮汐模块 - 参考天地图样式（白底卡片 + 潮汐表 + 极值标注）
   ========================================== */
/* 潮汐表 */
.tide-table-row:last-child { border-bottom: none; }
/* 高高潮用橙色标记 */
.tide-table-row.high-high span:nth-child(2) { color: #e64a19; font-weight: 700; }
/* 低低潮用蓝色标记 */
.tide-table-row.low-low span:nth-child(2) { color: #1565c0; font-weight: 700; }

/* ==========================================
   潮汐模块 - 两行四列表 + 坐标图表
   ========================================== */
.tide-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.tide-port-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tide-port-name {
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

.tide-meta {
  font-size: 11px;
  color: #888;
}

/* 潮汐表：两行四列 */
.tide-table {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.tide-table-row {
  display: grid;
  grid-template-columns: 50px repeat(4, 1fr);
  border-bottom: 1px solid #f0f0f0;
}

.tide-table-row:last-child { border-bottom: none; }

.tide-table-row + .tide-table-row { background: #fafafa; }

.tide-table-label {
  padding: 7px 8px;
  font-size: 11px;
  color: #888;
  font-weight: 600;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  border-right: 1px solid #eee;
}

.tide-table-val {
  padding: 7px 4px;
  font-size: 12px;
  color: #333;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 高高潮(最高)橙色加粗，低低潮(最低)蓝色加粗 */
.tide-high-val { color: #e64a19 !important; font-weight: 700; font-size: 13px; }
.tide-low-val  { color: #1565c0 !important; font-weight: 700; font-size: 13px; }

/* 图表 */
.tide-chart-wrap {
  border-radius: 12px;
  background: #fafafa;
  overflow: visible;
  padding: 6px 2px 2px;
}

#tide-canvas {
  display: block;
  width: 100%;
  height: 150px;
}

/* =============================================
   discover 页面 - WMTS 定位测试地图
   ============================================= */
#discover-map {
  touch-action: none;
  width: 100vw;
  height: calc(100vh - 120px);
  background: #06101e;
  display: block;
  cursor: grab;
}
#discover-map:active { cursor: grabbing; }

#discover-tooltip {
  position: fixed; display: none; z-index: 2000;
  background: rgba(22,27,34,0.96); border: 1px solid #30363d;
  border-radius: 8px; padding: 10px 14px; font-size: 13px;
  max-width: 240px; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
#discover-tooltip .t-name { color: #e6edf3; font-weight: 600; margin-bottom: 4px; }
#discover-tooltip .t-code { color: #8b949e; font-family: monospace; font-size: 11px; }

/* ── discover 地图工具抽屉 ── */
#actions-toggle-btn {
  position: fixed; top: 14px; left: 14px; z-index: 1001;
  width: 40px; height: 40px;
  background: rgba(22,27,34,0.88); backdrop-filter: blur(10px);
  border: 1px solid #30363d; border-radius: 10px;
  color: #e6edf3; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#actions-toggle-btn:active { background: rgba(48,54,61,0.95); }

.actions-drawer {
  position: fixed; inset: 0; z-index: 1100;
  pointer-events: none;
}
.actions-drawer.open { pointer-events: auto; }

.actions-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(1,4,9,0.5);
  opacity: 0; transition: opacity 0.25s;
}
.actions-drawer.open .actions-drawer-backdrop { opacity: 1; }

.actions-drawer-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: min(280px, 80vw);
  background: rgba(13,17,23,0.92); backdrop-filter: blur(16px);
  border-right: 1px solid #30363d;
  transform: translateX(-110%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.actions-drawer.open .actions-drawer-panel { transform: translateX(0); }

.actions-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #30363d;
  font-size: 14px; font-weight: 600; color: #e6edf3;
  flex-shrink: 0;
}
.actions-drawer-close {
  background: none; border: none; color: #8b949e;
  font-size: 16px; cursor: pointer; padding: 4px; line-height: 1;
}
.actions-drawer-close:hover { color: #e6edf3; }

.actions-drawer-body {
  flex: 1; overflow-y: auto; padding: 14px 14px 80px;
  display: flex; flex-direction: column; gap: 4px;
}
.actions-drawer-body button {
  width: 100%; padding: 9px 14px;
  background: #21262d; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 8px;
  cursor: pointer; font-size: 13px; text-align: left;
  transition: background 0.15s;
}
.actions-drawer-body button:hover { background: #30363d; }
.actions-drawer-body button.base-on  { background: #1f6feb; border-color: #58a6ff; }
.actions-drawer-body button.ann-on   { background: #0d4427; border-color: #3fb950; color: #3fb950; }
.actions-drawer-body button.port-on  { background: #0d4427; border-color: #3fb950; color: #3fb950; }

.layer-group { font-size: 11px; color: #8b949e; padding: 2px 0 2px 4px; margin-top: 4px; }
.layer-sep { border-top: 1px solid #30363d; margin-top: 6px; padding-top: 6px; }

/* 状态栏 */
.status-bar {
  position: fixed; bottom: 18px; left: 18px;
  background: rgba(22,27,34,0.92); backdrop-filter: blur(8px);
  padding: 8px 12px; border-radius: 8px; font-size: 12px;
  line-height: 1.9; border: 1px solid #30363d; z-index: 1000;
}
.status-bar .label { color: #8b949e; }
.status-bar .val { color: #58a6ff; font-family: monospace; }
.status-bar .val.green { color: #3fb950; }

/* info-bar 沿用 app 现有样式，确认一下 */
.info-bar {
  background: #161b22; padding: 12px 18px; font-size: 13px;
  line-height: 1.8; border-bottom: 1px solid #30363d;
}
.info-bar h3 { color: #58a6ff; margin-bottom: 6px; }
.info-bar code { background: #21262d; padding: 2px 7px; border-radius: 4px; font-size: 12px; color: #f0883e; }
.info-bar .ok { color: #3fb950; }

/* ── 社交 Feed Card ── */
.feed-card {
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.feed-card:last-child { margin-bottom: 0; }

.feed-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.feed-avatar {
  cursor: pointer;
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #4a9eff), var(--accent-light, #7bb8ff));
}

/* 头像显示：图片 > 首字母 */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-transform: uppercase;
}

.feed-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.feed-nickname {
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.feed-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.feed-follow-btn {
  font-size: var(--font-size-xs);
  color: var(--color-primary, #3b82f6);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.feed-follow-btn.following {
  color: var(--color-text-secondary);
}

.feed-follow-btn:hover {
  opacity: 0.75;
}

.feed-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--space-2);
}

.feed-notes {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  line-height: 1.6;
  word-break: break-word;
}

.feed-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.feed-photos.single { grid-template-columns: 1fr; }
.feed-photo-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--color-bg-elevated);
  overflow: hidden;
}
.feed-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.feed-photo-more {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.feed-weather {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.feed-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}
.feed-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid var(--color-divider);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: all 0.2s;
}
.feed-action-btn:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text-primary);
}
.feed-action-btn.liked {
  border-color: #f85149;
  color: #f85149;
}
.feed-action-btn.liked .action-icon { color: #f85149; }
.follow-btn {
  margin-left: auto;
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 500;
}
.follow-btn:hover { opacity: 0.85; }
.follow-btn:disabled {
  background: var(--color-divider);
  border-color: var(--color-divider);
  color: var(--color-text-secondary);
}

/* ── 发现页模式切换 ── */
.discover-mode-toggle {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  background: rgba(22,27,34,0.92);
  border: 1px solid #30363d;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(8px);
}
.discover-toggle-btn {
  padding: 5px 14px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: #8b949e;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.discover-toggle-btn.active {
  background: #1f6feb;
  color: #fff;
  font-weight: 500;
}


/* ── 用户主页弹窗 ── */
.user-profile-card {
  width: min(420px, 96vw);
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.up-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-divider);
}
.up-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent, #4a9eff), var(--accent-light, #7bb8ff));
  font-size: 52px;
  flex-shrink: 0;
  line-height: 1;
}
.up-avatar img { width: 100%; height: 100%; object-fit: cover; }
.up-avatar .avatar-initial { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.up-identity {
  flex: 1;
  min-width: 0;
}
.up-nickname {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.up-level {
  font-size: 12px;
  color: #58a6ff;
  margin-bottom: 2px;
}
.up-title {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.up-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-divider);
}
.up-stat {
  flex: 1;
  text-align: center;
}
.up-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.up-stat-label {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}
.up-stat-sep {
  width: 1px;
  height: 30px;
  background: var(--color-divider);
  flex: 0 0 1px;
}

.up-actions {
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-divider);
}
.up-follow-btn {
  width: 100%;
  padding: 9px;
  border-radius: 20px;
  border: none;
  background: #1f6feb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.up-follow-btn:hover { opacity: 0.85; }
.up-follow-btn.following {
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-divider);
}
.up-follow-btn.self { display: none; }

.up-tabs {
  display: flex;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-divider);
}
.up-tab {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.up-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.up-records-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.up-records-list .feed-card {
  margin-bottom: 10px;
}
.up-records-list .feed-card:last-child { margin-bottom: 0; }
/* ── 用户资料浮层：隐藏 tab/记录列表 ── */
#user-profile-card .up-tabs,
#user-profile-card #up-records-list {
  display: none;
}


/* ── 评论弹窗 ── */
.comment-card {
  width: min(420px, 96vw);
  height: min(70vh, 560px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-divider);
  flex-shrink: 0;
}
.comment-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.comment-count {
  background: var(--color-divider);
  color: var(--color-text-secondary);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}

.comment-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}
.comment-avatar img,
.comment-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-body { flex: 1; min-width: 0; }
.comment-user-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
}
.comment-nickname {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
}
.comment-nickname:hover { color: var(--color-primary); }
.comment-time {
  font-size: 11px;
  color: var(--color-text-secondary);
}
.comment-edited-tag {
  font-size: 10px;
  color: var(--color-text-secondary);
  background: var(--color-divider);
  padding: 0 4px;
  border-radius: 3px;
}
.comment-text {
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.6;
  word-break: break-word;
}
.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.comment-action-btn {
  font-size: 11px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.comment-action-btn:hover { color: var(--color-text-primary); }
.comment-action-btn.delete-btn:hover { color: #f85149; }

.comment-empty {
  padding: 40px 0;
  text-align: center;
}

.comment-input-area,
.comment-edit-area {
  border-top: 1px solid var(--color-divider);
  padding: 10px 14px 12px;
  flex-shrink: 0;
  background: var(--color-bg-surface);
}
.comment-textarea {
  width: 100%;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 13px;
  padding: 8px 10px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}
.comment-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.comment-input-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.comment-char-count {
  font-size: 11px;
  color: var(--color-text-secondary);
  flex: 1;
}
.comment-submit-btn {
  padding: 6px 16px;
  border-radius: 16px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.comment-submit-btn:hover:not(:disabled) { opacity: 0.85; }
.comment-submit-btn:disabled {
  background: var(--color-divider);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}
.comment-cancel-edit-btn {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
}

/* ── 打卡详情页 ── */
#record-detail-page .page-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.rd-content {
  padding-bottom: 40px;
}

.rd-user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.rd-user-bar .feed-avatar { width: 32px; height: 32px; font-size: 18px; }
.rd-user-info { flex: 1; min-width: 0; }
.rd-nickname {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.rd-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
}
.rd-follow-btn {
  padding: 6px 16px;
  border-radius: 16px;
  border: none;
  background: #1f6feb;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.rd-follow-btn:hover { opacity: 0.85; }
.rd-follow-btn.following {
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-divider);
}

.rd-location-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.rd-location-row .rd-location-icon { flex-shrink: 0; }
.rd-location-row .rd-location-text {
  flex: 1;
  color: var(--color-text-primary);
}
.rd-time { flex-shrink: 0; }

.rd-photos {
  display: grid;
  gap: 3px;
  margin: 8px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.rd-photos.cols-1 { grid-template-columns: 1fr; }
.rd-photos.cols-2 { grid-template-columns: 1fr 1fr; }
.rd-photos.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.rd-photos.cols-3 .rd-photo:first-child { grid-row: span 2; }
.rd-photos.cols-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.rd-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-bg-elevated);
  cursor: pointer;
  position: relative;
}
.rd-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rd-photo.more-overlay::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.rd-weather {
  padding: 6px 16px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.rd-notes {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-text-primary);
  line-height: 1.7;
  word-break: break-word;
}

.rd-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.rd-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}
.rd-action-btn:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
}
.rd-like-btn.liked .rd-like-icon { color: #f85149; }
.rd-share-btn { margin-left: auto; }

/* 评论区 */
.rd-comment-section {
  padding: 0 16px;
}
.rd-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--color-divider);
}
.rd-comment-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.rd-comment-list {
  max-height: 320px;
  overflow-y: auto;
}
.rd-comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider);
}
.rd-comment-item:last-child { border-bottom: none; }
.rd-comment-avatar { font-size: 26px; flex-shrink: 0; }
.rd-comment-avatar img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.rd-comment-body { flex: 1; min-width: 0; }
.rd-comment-nickname {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  margin-bottom: 2px;
}
.rd-comment-text {
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.6;
  word-break: break-word;
}
.rd-comment-meta {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 3px;
  display: flex;
  gap: 10px;
}
.rd-comment-edit-tag {
  font-size: 10px;
  background: var(--color-divider);
  padding: 0 4px;
  border-radius: 3px;
}
.rd-comment-del-btn {
  font-size: 11px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.rd-comment-del-btn:hover { color: #f85149; }
.rd-comment-empty { padding: 16px 0; text-align: center; font-size: 13px; }
.rd-comment-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 0 16px;
  align-items: center;
}
.rd-comment-input {
  flex: 1;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-divider);
  border-radius: 20px;
  color: var(--color-text-primary);
  font-size: 13px;
  padding: 8px 14px;
}
.rd-comment-input:focus { outline: none; border-color: var(--color-primary); }
.rd-comment-send {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.rd-comment-send:disabled {
  background: var(--color-divider);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}
.rd-comment-send:not(:disabled):hover { opacity: 0.85; }

/* 大图查看器 */
#rd-photo-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
#rd-photo-viewer.active { display: flex; }
#rd-photo-viewer img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}
#rd-photo-viewer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 40px;
  text-align: center;
}

/* ==========================================
   FAB 拍照按钮
   ========================================== */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a9eff, #6bb3ff);
  border: none;
  font-size: 22px;
  cursor: pointer;
  z-index: 800;
  box-shadow: 0 4px 16px rgba(74, 158, 255, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

/* ==========================================
   拍照记录弹窗
   ========================================== */
#camera-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
#camera-modal.hidden {
  display: none;
}
.camera-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}
.camera-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  background: var(--bg-secondary, #1a1d24);
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 顶部栏 */
.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: 0;
  background: var(--bg-secondary, #1a1d24);
  z-index: 2;
}
.camera-close {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.camera-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.camera-title {
  font-size: 15px;
  font-weight: 600;
  color: #e6edf3;
}
.camera-save {
  background: #4a9eff;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
}
.camera-save:hover { background: #3b8de8; }
.camera-save:disabled { opacity: 0.6; cursor: not-allowed; }

/* 照片区 */
.camera-photo-area {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #111318;
  overflow: hidden;
}
.camera-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-option-row {
  display: flex;
  gap: 12px;
}
.camera-option-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e6edf3;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.camera-option-btn:hover { background: rgba(255,255,255,0.13); }
#camera-photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#camera-photo-preview.hidden { display: none; }

/* GPS 状态条 */
.camera-gps-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
  color: #8b949e;
}
.gps-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b949e;
  flex-shrink: 0;
}
.gps-dot.on  { background: #34d399; }
.gps-dot.off { background: #f87171; }

/* 表单 */
.camera-form {
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.camera-field label {
  display: block;
  font-size: 12px;
  color: #8b949e;
  margin-bottom: 5px;
}
.camera-field input[type="text"],
.camera-field input[type="number"] {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e6edf3;
  font-size: 14px;
  padding: 9px 12px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.camera-field input:focus {
  outline: none;
  border-color: #4a9eff;
}
.camera-field input::placeholder { color: #4a5568; }
.camera-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.camera-released {
  margin-top: 4px;
}
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #e6edf3;
  font-size: 14px;
}
.checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4a9eff;
}
.camera-gps-display {
  font-size: 13px;
  color: #34d399;
  font-variant-numeric: tabular-nums;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--color-text-secondary);
  font-size: 13px;
}
.loading-state .loading-spinner {
  width: 16px;
  height: 16px;
}
