:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #18202c;
  --surface-hover: #202a39;
  --border: #243041;
  --border-gold: rgba(220, 182, 92, 0.38);
  --text: #d6e0ec;
  --text-muted: #8a9bb0;
  --gold: #dcb65c;
  --gold-soft: rgba(220, 182, 92, 0.13);
  --red: #e56275;
  --red-soft: rgba(229, 98, 117, 0.14);
  --green: #3ac991;
  --green-soft: rgba(58, 201, 145, 0.14);
  --blue: #5ca4f6;
  --blue-soft: rgba(92, 164, 246, 0.14);
  --purple: #ab86f2;
  --purple-soft: rgba(171, 134, 242, 0.14);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

html, body {
  background-color: var(--bg);
  color: var(--text);
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 18% 0%, #131e2a 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

input, button, select, textarea {
  color-scheme: dark;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0d1218;
}

::-webkit-scrollbar-thumb {
  background: #283548;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #374963;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 22px 48px;
}

/* 顶部栏 */
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(20, 27, 36, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.triforce-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(228, 190, 99, 0.18), rgba(56, 211, 153, 0.1));
  border: 1px solid var(--border-gold);
  display: grid;
  place-items: center;
}

.brand h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-ver {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  padding: 2px 8px;
  border-radius: 999px;
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.path-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px 4px 10px;
}

.path-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.path-box input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  width: 240px;
  outline: none;
  font-family: Consolas, monospace;
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  /* 让 <a class="btn"> 与 <button class="btn"> 渲染完全一致 */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.25;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
  padding: 4px 10px;
  font-size: 12px;
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--gold);
}

.btn-gold {
  background: linear-gradient(135deg, #e4be63, #cfa23e);
  color: #14120c;
}

.btn-gold:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--border-gold);
}

.btn-outline:hover {
  background: var(--gold-soft);
}

.watch-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  user-select: none;
}

.watch-toggle input {
  display: none;
}

.watch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #556478;
}

.watch-toggle input:checked + .watch-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.watch-toggle input:checked ~ span:last-child {
  color: var(--text);
}

.error-banner {
  background: var(--red-soft);
  border: 1px solid var(--red);
  color: #ffb4be;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  font-size: 13px;
}

/* 槽位条 */
.slots-section {
  margin-bottom: 16px;
}

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

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

.verify-pill {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.verify-pill.ok {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(56, 211, 153, 0.35);
}

.verify-pill.warn {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(240, 93, 114, 0.4);
}

.slots-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
}

.slot-card {
  display: flex;
  gap: 10px;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  align-items: center;
}

.slot-card:hover {
  background: var(--surface-2);
  border-color: #3a4c66;
}

.slot-card.active {
  background: linear-gradient(135deg, rgba(228, 190, 99, 0.13), var(--surface-2));
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(228, 190, 99, 0.25);
}

.slot-thumb {
  width: 72px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #0b0f14;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

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

.slot-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.tag-latest {
  font-size: 10px;
  background: var(--green-soft);
  color: var(--green);
  padding: 1px 6px;
  border-radius: 999px;
}

.slot-loc {
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

/* 核心看板 */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow);
}

.dash-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.dash-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.dash-label {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.dash-num small {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.dash-miss {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.dash-miss-red {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(240, 93, 114, 0.35);
}

.dash-miss.done {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(56, 211, 153, 0.35);
}

.rupee-pill {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 9px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.fill-gold {
  background: linear-gradient(90deg, #c9972c, #f0cf7b);
}

.fill-red {
  background: linear-gradient(90deg, #d63d58, #ff7d90);
}

.dash-foot {
  font-size: 12px;
  color: var(--text-muted);
}

.bonus-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  font-size: 12px;
}

.bonus-mini-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: var(--surface-2);
  border-radius: 6px;
}

.bonus-mini-item strong {
  color: var(--gold);
}

/* 可领取奖励提示 */
.claim-banner {
  background: linear-gradient(90deg, rgba(228, 190, 99, 0.18), rgba(56, 211, 153, 0.12));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 11px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 主页签 */
.main-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.main-tab {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.main-tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.main-tab.active {
  background: var(--surface-2);
  color: var(--gold);
  border-color: var(--gold);
}

.tab-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
}

.tab-badge-red {
  background: var(--red-soft);
  color: var(--red);
}

.tab-badge-green {
  background: var(--green-soft);
  color: var(--green);
}

/* 筛选工具栏 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.filter-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.seg-btn, .chip-btn, .tag-btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s ease;
}

.seg-btn:hover, .chip-btn:hover, .tag-btn:hover {
  color: var(--text);
  border-color: #3f526d;
}

.seg-btn.active, .chip-btn.active {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--border-gold);
  font-weight: 600;
}

.tag-btn.active {
  background: var(--purple-soft);
  color: var(--purple);
  border-color: rgba(179, 136, 255, 0.45);
  font-weight: 600;
}

.search-box {
  margin-left: auto;
  flex: 1 1 220px;
  max-width: 340px;
}

.search-box input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.search-box input:focus {
  border-color: var(--gold);
}

/* 双栏工作区 */
.workspace {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 16px;
  align-items: start;
}

.loc-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}

.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}

.only-missing-loc {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
}

.loc-group-label {
  font-size: 11px;
  color: var(--text-muted);
  margin: 10px 4px 5px;
  letter-spacing: 0.5px;
}

.loc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 3px;
  border: 1px solid transparent;
}

.loc-item:hover {
  background: var(--surface-2);
}

.loc-item.active {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  color: var(--gold);
  font-weight: 700;
}

.loc-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.loc-count.has-miss {
  background: var(--red-soft);
  color: #ff94a3;
}

.loc-count.all-done {
  background: var(--green-soft);
  color: var(--green);
}

/* 交互式小地图 */
.minimap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.minimap-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.minimap-head h2 {
  font-size: 15px;
  font-weight: 700;
}

.minimap-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.floor-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.floor-tab {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.floor-tab.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: rgba(88, 166, 255, 0.45);
  font-weight: 700;
}

.minimap-svg-wrap {
  position: relative;
  background: #0a0f15;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

#miniMapSvg {
  width: 100%;
  height: 310px;
  display: block;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 21, 29, 0.96);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  max-width: 260px;
  box-shadow: var(--shadow);
  z-index: 10;
}

.minimap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.minimap-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-sk-miss { background: var(--gold); }
.dot-hp-miss { background: var(--red); }
.dot-got { background: var(--green); opacity: 0.7; }
.dot-fac { background: var(--blue); border-radius: 2px; }
.dot-ent { background: #8fa3bc; border-radius: 2px; transform: rotate(45deg); }

/* 列表结果区 */
.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.btn-link {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
}

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all 0.18s ease;
}

.item-card:hover {
  border-color: #364860;
}

.item-card.collected {
  opacity: 0.72;
  border-left: 3px solid var(--green);
}

.item-card.missing-sk {
  border-left: 3px solid var(--gold);
}

.item-card.missing-hp {
  border-left: 3px solid var(--red);
}

.item-card.flash {
  box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(228, 190, 99, 0.35);
  border-color: var(--gold);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.card-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-pill.miss {
  background: var(--red-soft);
  color: #ff98a6;
}

.status-pill.got {
  background: var(--green-soft);
  color: var(--green);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-locate {
  font-size: 11px;
  background: var(--surface-2);
  color: var(--blue);
  border: 1px solid rgba(88, 166, 255, 0.35);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}

.btn-locate:hover {
  background: var(--blue-soft);
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: #b7c5d8;
  border: 1px solid var(--border);
}

.badge-loc {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: var(--border-gold);
}

.badge-night {
  color: var(--purple);
  background: var(--purple-soft);
  border-color: rgba(179, 136, 255, 0.35);
}

.badge-soil {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(56, 211, 153, 0.35);
}

.badge-coord {
  font-family: Consolas, monospace;
  color: var(--text-muted);
}

.card-landmark {
  font-size: 12.5px;
  color: #b5c4d6;
  margin-bottom: 6px;
}

.card-guide {
  font-size: 13.5px;
  color: var(--text);
  background: rgba(12, 17, 23, 0.55);
  border: 1px solid rgba(38, 50, 68, 0.7);
  border-radius: 8px;
  padding: 9px 12px;
}

.empty-state {
  text-align: center;
  padding: 46px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* 重要收集总览页 */
.bonus-workspace {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 14px;
}

.bonus-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.bonus-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.bonus-group-head h3 {
  font-size: 15px;
  color: var(--gold);
}

.bonus-group-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

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

.bonus-row {
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.bonus-row.got {
  opacity: 0.7;
  border-left: 3px solid var(--green);
}

.bonus-row.miss {
  border-left: 3px solid var(--gold);
}

.bonus-row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.bonus-row-guide {
  font-size: 12px;
  color: var(--text-muted);
}

/* 弹窗 & Toast */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  z-index: 100;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  width: min(520px, 92vw);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.modal-body {
  padding: 14px 16px;
  font-size: 13px;
}

.verify-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #172330;
  border: 1px solid var(--green);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 90;
}

@media (max-width: 980px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .loc-sidebar {
    position: static;
    max-height: none;
  }
  .bonus-workspace {
    grid-template-columns: 1fr;
  }
}

/* 离线快照 / 手机端增强样式 */
.badge-offline {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(92, 164, 246, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
}

/* 113821.xyz 云端快照：与本地离线导出做极轻微视觉区分，保持护眼暗色一致 */
.badge-offline.is-portal {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: var(--border-gold);
}

.mobile-loc-bar {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.mobile-loc-bar select {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}

.btn-temp-check {
  font-size: 11px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}

.btn-temp-check.checked {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(58, 201, 145, 0.45);
}

.modal-mobile {
  width: min(480px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
}

.mobile-tip {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.qr-wrap svg {
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.lan-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.lan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.lan-url {
  font-family: Consolas, monospace;
  font-size: 13px;
  color: var(--gold);
  word-break: break-all;
}

.mobile-help-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-help-box code {
  color: var(--gold);
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .app-shell {
    padding: 10px 12px 36px;
  }

  .topbar {
    padding: 12px;
    gap: 10px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .path-box {
    width: 100%;
  }

  .path-box input {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .topbar-actions {
    width: 100%;
    gap: 8px;
  }

  .topbar-actions .btn,
  .topbar-actions .watch-toggle {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* 移动端顶栏按钮允许换行，避免「返回首页 / 同步」挤压换行错位 */
  .topbar-actions #btnBackHome,
  .topbar-actions #btnPublishSite {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .slots-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 4px;
  }

  .slot-card {
    flex: 0 0 225px;
    scroll-snap-align: start;
  }

  .dashboard {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .dash-bonus {
    grid-column: 1 / -1;
  }

  .dash-card {
    padding: 12px;
  }

  .dash-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .dash-num {
    font-size: 21px;
  }

  .bonus-mini-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .main-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .main-tab {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 13px;
  }

  .filter-bar {
    padding: 10px;
    gap: 8px;
  }

  .filter-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .seg-btn, .chip-btn, .tag-btn {
    white-space: nowrap;
  }

  .search-box {
    max-width: none;
    flex: 1 1 100%;
  }

  .loc-sidebar {
    display: none;
  }

  .mobile-loc-bar {
    display: flex;
  }

  #miniMapSvg {
    height: 240px;
  }

  .item-card {
    padding: 12px;
  }

  .card-title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .bonus-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
