/* ============================================
   game-shell.css — v1.6.0 游戏公共样式
   引用：被所有游戏页面引用
   ============================================ */

/* --- 字体 --- */
@font-face {
  font-family: 'GameFont';
  src: url('../../assets/fonts/SimKai.woff2') format('woff2'),
       url('../../assets/fonts/SimKai.subset.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- CSS 变量 --- */
:root {
  --outer-bg: #0a1f14;
  --inner-bg: #0f2b1c;
  --panel: #163020;
  --panel-strong: #1e3c2a;
  --card: #1a3a26;
  --gold: #d4af37;
  --gold-light: #ffeb8a;
  --primary: #2e7d32;
  --primary-hover: #256428;
  --danger: #b91c1c;
  --danger-hover: #991616;
  --info: #1e40af;
  --text: #e8f5e9;
  --muted: #a8c8ad;
  --line: #3a6a4a;
  --line-soft: rgba(212, 175, 55, 0.28);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 12px;
  --font-title: 'GameFont', 'KaiTi', 'STKaiti', serif;
  --font-body: 'Noto Serif SC', 'GameFont', 'KaiTi', 'STKaiti', serif;
}

@media (min-width: 900px) { :root { --radius-lg: 24px; } }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background-color: var(--outer-bg);
  font-family: var(--font-body);
}
body { padding: 0; overflow-x: hidden; }

h1, h2, h3, .place-title, .facility-meta h3, .loc-header h1, .identity h2 {
  font-family: var(--font-title);
  letter-spacing: 0.03em;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

/* --- app-shell --- */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(167, 212, 155, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(53, 189, 122, 0.05) 0%, transparent 50%),
    var(--inner-bg);
  padding-bottom: calc(96px + var(--safe-bottom));
}

.bottom-fill {
  position: fixed;
  inset: auto 0 0 0;
  height: 120px;
  background: var(--outer-bg);
  z-index: 0;
  pointer-events: none;
}

/* --- 顶部地点信息条 --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #0a2016 0%, #0f2b1c 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}
.topbar-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(10,32,22,0.92) 0%, rgba(10,32,22,0.7) 45%, rgba(10,32,22,0.15) 100%),
    radial-gradient(circle at 85% 40%, rgba(212, 175, 55, 0.18), transparent 55%),
    radial-gradient(circle at 15% 80%, rgba(76, 175, 80, 0.14), transparent 55%);
}
.topbar-vertical {
  position: absolute;
  right: 8px;
  top: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  color: rgba(212, 175, 55, 0.24);
  font-family: var(--font-title);
  font-size: 14px;
  writing-mode: vertical-rl;
  letter-spacing: 0.3em;
  pointer-events: none;
  z-index: 0;
}
.topbar-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 10px;
}
.place-emblem {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2a4a3a, #14301f);
  color: var(--gold-light);
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-title);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.place-info { min-width: 0; }
.place-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-light);
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.place-title .place-tag {
  padding: 2px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.24);
  font-family: var(--font-body);
}
.marquee-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-row .badge { color: var(--gold); flex-shrink: 0; }
.marquee { overflow: hidden; flex: 1; min-width: 0; }
.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 22s linear infinite;
  color: #d7f0dc;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.move-btn {
  display: grid;
  place-items: center;
  grid-template-rows: auto auto;
  gap: 2px;
  min-width: 52px;
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.move-btn b { font-size: 18px; line-height: 1; font-family: var(--font-title); }
.move-btn:active { transform: scale(0.95); }

.home-btn {
  display: grid;
  place-items: center;
  grid-template-rows: auto auto;
  gap: 2px;
  min-width: 52px;
  padding: 4px 8px;
  margin-left: 4px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.home-btn b { font-size: 18px; line-height: 1; font-family: var(--font-title); }
.home-btn:active { transform: scale(0.95); }

/* --- PWA 横幅 --- */
.pwa-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #0a1f14, #163020);
  border-bottom: 1px solid var(--line-soft);
  color: #d7f0dc;
  font-size: 12px;
}
.pwa-banner .pwa-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--gold);
  color: #1a1a1a;
  font-weight: 900;
  font-family: var(--font-title);
  flex-shrink: 0;
}
.pwa-banner .pwa-text { flex: 1; min-width: 0; }
.pwa-banner .pwa-text b { color: #fff; font-weight: 700; }
.pwa-banner .pwa-text small { display: block; color: #a8c8ad; font-size: 11px; margin-top: 1px; }
.pwa-banner button {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 12px;
}
.pwa-banner .pwa-close {
  background: transparent;
  color: #a8c8ad;
  padding: 4px 6px;
}

/* --- 主体布局 --- */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px) {
  .page { grid-template-columns: 340px 1fr; padding: 16px; gap: 16px; }
}

/* --- 左栏角色状态 --- */
.status-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(212,175,55,0.06), transparent 30%), var(--panel);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.identity {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.avatar {
  position: relative;
  width: 76px; height: 92px;
  display: grid; place-items: end center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(212,175,55,0.35), transparent 60%),
    linear-gradient(180deg, #2a4a3a 0%, #14301f 100%);
  color: var(--gold-light);
  overflow: hidden;
}
.avatar::before {
  content: '';
  position: absolute;
  left: 50%; bottom: 8px;
  width: 46px; height: 62px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 22%, #1a1a1a 0 30%, transparent 32%),
    linear-gradient(180deg, transparent 30%, #0e1f14 40%, #0a1f14 100%);
  clip-path: polygon(30% 0%, 70% 0%, 82% 26%, 100% 100%, 0% 100%, 18% 26%);
  opacity: 0.85;
}
.avatar .asset-mini {
  position: relative;
  z-index: 1;
  color: #9fc4a6;
  font-size: 10px;
  line-height: 1.3;
  padding: 4px;
  background: rgba(10, 31, 20, 0.72);
  border-radius: var(--radius-sm);
  margin: 0 4px 4px;
}
.identity h2 { margin: 0; color: var(--gold-light); font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity .sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.identity .power {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 700;
}
.companion {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}
.companion .avatar-sm {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #244a34, #14301f);
  color: var(--gold-light);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-title);
}
.companion .comp-title { color: var(--gold-light); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.companion small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.quick-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-4 a {
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.quick-4 a b { font-size: 15px; color: var(--gold-light); line-height: 1; font-family: var(--font-title); }
.quick-4 a:hover { border-color: var(--gold); color: var(--gold-light); }
.vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vital-item { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0,0,0,0.2); }
.vital-item .lbl { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; color: var(--muted); }
.vital-item .lbl b { color: var(--gold-light); }
.bar { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(212, 175, 55, 0.15); }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4caf50, var(--gold-light)); transition: width 0.4s ease-out; }
.bar.exp span { background: linear-gradient(90deg, #1e40af, #60a5fa); }
.attrs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-size: 12px; }
.attrs .attr { display: flex; justify-content: space-between; padding: 5px 8px; border-bottom: 1px dashed rgba(212, 175, 55, 0.18); color: var(--muted); }
.attrs .attr b { color: var(--gold-light); font-weight: 700; }
.attrs-more { grid-column: 1 / -1; margin-top: 4px; padding: 6px; border: 1px dashed var(--line-soft); border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 12px; text-align: center; cursor: pointer; }
@media (max-width: 899px) { .attrs .attr.extra { display: none; } .attrs.expanded .attr.extra { display: flex; } }
@media (min-width: 900px) { .attrs-more { display: none; } }

/* --- 右栏主内容 --- */
.main-col { display: grid; gap: 12px; min-width: 0; }

/* 地点 Header */
.loc-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(212,175,55,0.08), transparent 60%), var(--panel);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.loc-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), transparent);
  opacity: 0.6;
}
.loc-header .loc-vertical {
  position: absolute;
  right: 10px;
  top: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  writing-mode: vertical-rl;
  color: rgba(212, 175, 55, 0.22);
  font-family: var(--font-title);
  font-size: 20px;
  letter-spacing: 0.35em;
  pointer-events: none;
}
.loc-header h1 { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--gold-light); font-size: 20px; font-weight: 700; }
.loc-header h1 .icon { color: var(--gold); font-size: 22px; font-family: var(--font-title); }
.loc-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.btn-outline {
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.btn-outline:active { transform: scale(0.96); }

/* 主线任务卡 */
.mission-card {
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.mission-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.15); }
.mission-head .mtitle { display: flex; align-items: center; gap: 6px; color: var(--gold-light); font-size: 12px; font-weight: 700; }
.mission-head .mtag { padding: 2px 8px; border-radius: 999px; background: rgba(212, 175, 55, 0.18); color: var(--gold-light); font-size: 11px; }
.mission-body { padding: 10px 12px; }
.mission-body .m-goal { font-size: 14px; font-weight: 700; color: var(--text); font-family: var(--font-title); }
.mission-body .m-hint { margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.mission-progress { margin-top: 8px; height: 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.mission-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width 0.5s ease-out; }
.mission-cta { display: flex; justify-content: flex-end; padding: 8px 12px; border-top: 1px dashed var(--line-soft); background: rgba(0, 0, 0, 0.15); }
.subtasks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 12px 10px; }
.subtask { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.18); font-size: 11px; color: var(--muted); }
.subtask.done { color: #a3e0a7; border-color: rgba(76, 175, 80, 0.4); background: rgba(76, 175, 80, 0.08); }
.subtask.doing { color: var(--gold-light); border-color: var(--gold); }
.subtask .mark { flex-shrink: 0; font-weight: 900; font-family: var(--font-title); }

/* --- 分区标题 --- */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 10px;
  padding: 0 4px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft, rgba(255,255,255,0.08));
}
.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light, #d4af37);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* --- 场景卡片网格 --- */
.facility-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) {
  .facility-grid { grid-template-columns: repeat(2, 1fr); }
  .facility-grid > .facility-card[data-primary="true"] { grid-column: 1 / -1; }
}
.facility-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.facility-card:active { transform: scale(0.995); }
.facility-card[data-primary="true"] { border-color: var(--gold); box-shadow: 0 8px 24px rgba(0,0,0,0.36), inset 0 0 0 1px rgba(212,175,55,0.18); }
.facility-card[data-state="cooling"] { border-color: rgba(107, 114, 128, 0.5); filter: saturate(0.8); }
.facility-card[data-state="locked"] { border-color: rgba(75, 85, 99, 0.5); opacity: 0.7; }
.facility-card[data-state="locked"]::after {
  content: '未解锁';
  position: absolute;
  top: 8px; right: 8px;
  padding: 2px 8px;
  border: 1px solid #6b7280;
  border-radius: 999px;
  color: #d1d5db;
  background: rgba(0, 0, 0, 0.5);
  font-size: 10px;
  z-index: 2;
}
.facility-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 40%, rgba(212, 175, 55, 0.16), transparent 55%),
    radial-gradient(circle at 10% 100%, rgba(76, 175, 80, 0.14), transparent 60%),
    linear-gradient(90deg, rgba(10, 32, 22, 0.85) 0%, rgba(10, 32, 22, 0.4) 60%, transparent 100%);
  pointer-events: none;
}
.facility-card-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.facility-head { display: flex; align-items: center; gap: 10px; }
.facility-icon {
  width: 56px; height: 56px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2a4a3a, #14301f);
  color: var(--gold-light);
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-title);
}
.facility-meta { min-width: 0; flex: 1; }
.facility-meta h3 { margin: 0; color: var(--gold-light); font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facility-meta .badges { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.facility-meta .badges span { padding: 1px 6px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--gold-light); background: rgba(0, 0, 0, 0.28); font-size: 10px; font-weight: 600; }
.action-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn {
  flex: 1;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.12s, opacity 0.12s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.disabled, .btn:disabled { opacity: 0.55; cursor: not-allowed; background: #334; color: #aaa; border-color: #555; }
.btn-primary { background: var(--primary); border-color: var(--primary-hover); color: #fff; }
.btn-primary:not(.disabled):hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger-hover); color: #fff; }
.btn-danger:not(.disabled):hover { background: var(--danger-hover); }
.btn-info { background: var(--info); border-color: #1e3a8a; color: #fff; }
.btn-secondary { background: #334; border-color: #555; color: var(--muted); flex: 0 0 auto; padding: 6px 12px; }
.btn .cd { margin-left: 4px; padding: 0 6px; font-size: 11px; color: #ffd7a0; background: rgba(0, 0, 0, 0.35); border-radius: 999px; }
.btn.reason { background: #4b5563 !important; color: #cbd5e1 !important; border-color: #374151 !important; cursor: not-allowed; }

/* 日志面板 */
.log-panel { border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--panel); overflow: hidden; }
.log-tabs { display: flex; overflow-x: auto; background: rgba(0,0,0,0.25); border-bottom: 1px solid var(--line-soft); }
.log-tabs button { padding: 8px 14px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; border-bottom: 2px solid transparent; }
.log-tabs button.active { color: var(--gold-light); border-bottom-color: var(--gold); background: rgba(212, 175, 55, 0.06); }
.log-body { max-height: 180px; overflow-y: auto; padding: 8px 12px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.log-body .log-item { padding: 4px 0; border-bottom: 1px dashed rgba(212, 175, 55, 0.14); content-visibility: auto; contain-intrinsic-size: 0 28px; }
.log-body .log-item time { color: #7ea88a; margin-right: 8px; }
.log-body .log-item b { color: var(--gold-light); }
.log-body .log-item.sys b { color: #7dd3fc; }
.log-body .log-item.drop b { color: #fca5a5; }

/* 底部导航 */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: var(--safe-bottom);
  background: linear-gradient(180deg, rgba(10, 31, 20, 0.92), rgba(10, 31, 20, 0.98));
  border-top: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
  box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.45);
}
.bottom-nav button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 2px 8px;
  border: 0;
  background: transparent;
  color: #7ea88a;
  transition: color 0.18s;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.bottom-nav .nav-tab-top {
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: transparent;
  transition: background 0.18s;
}
.bottom-nav .nav-ico {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  color: inherit;
  font-size: 18px;
  font-weight: 900;
  font-family: var(--font-title);
  transition: transform 0.18s, filter 0.18s, background 0.18s, color 0.18s;
  filter: grayscale(1) opacity(0.55);
}
.bottom-nav .nav-label { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; transition: color 0.18s; }
.bottom-nav button:active .nav-ico { transform: scale(0.9); }
.bottom-nav button.active .nav-tab-top,
.bottom-nav button.pending .nav-tab-top { background: var(--gold); }
.bottom-nav button.active,
.bottom-nav button.pending { color: var(--gold-light); }
.bottom-nav button.active .nav-ico,
.bottom-nav button.pending .nav-ico {
  filter: none;
  transform: scale(1.12);
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.05));
  color: var(--gold-light);
}
@media (min-width: 1040px) {
  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(760px, calc(100% - 48px));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding-bottom: 6px;
  }
  .bottom-fill { display: none; }
}

/* 长按详情面板 */
.detail-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  transform: translateY(100%);
  transition: transform 0.25s ease-out;
  background: var(--panel-strong);
  border-top: 1px solid var(--gold);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.5);
  padding: 12px 16px calc(20px + var(--safe-bottom));
  max-height: 60vh;
  overflow-y: auto;
}
.detail-sheet.open { transform: translateY(0); }
.detail-sheet .grip { width: 40px; height: 4px; margin: 0 auto 10px; background: rgba(212, 175, 55, 0.5); border-radius: 4px; }
.detail-sheet h4 { margin: 0 0 6px; color: var(--gold-light); font-family: var(--font-title); font-size: 17px; }
.detail-sheet .desc { color: var(--muted); font-size: 13px; line-height: 1.9; }
.detail-sheet .kv { margin-top: 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 12px; }
.detail-sheet .kv > div { padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.2); }
.detail-sheet .kv b { color: var(--gold-light); }
.detail-sheet .close { margin-top: 12px; display: block; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-weight: 700; }
.detail-mask { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.detail-mask.open { opacity: 1; pointer-events: auto; }

/* 淡入动画 */
.fade-in { animation: fade-rise 0.22s ease-out; }
@keyframes fade-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .marquee span { animation: none; padding-left: 0; }
  .bottom-nav button.active .nav-ico,
  .bottom-nav button.pending .nav-ico { transform: none; }
  .fade-in { animation: none; }
}
