/* ═══════════════════════════════════════════════════
   Dolly — Wynncraft Toolkit
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500;600&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Light Theme ── */
:root {
  --bg: #f6f3ec;
  --bg-gradient: linear-gradient(165deg, #f6f3ec 0%, #ede7db 40%, #f4efe6 100%);
  --surface: #ffffff;
  --surface2: #f2eee7;
  --surface3: #e8e2d8;
  --border: #d6cec0;
  --gold: #8a7238;
  --gold-light: #a58e4a;
  --gold-dark: #6a5620;
  --crimson: #a02020;
  --crimson-light: #d13a3a;
  --text: #1a1712;
  --text2: #787068;
  --text3: #b0a69a;
  --teal: #3a7878;
  --teal-light: #4a9898;
  --green: #4a783a;
  --orange: #b87828;

  --font-display: 'Archivo', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-accent: 'Playfair Display', serif;

  --top-h: 60px;
  --sidebar-w: 360px;
  --radius: 8px;
  --radius-lg: 14px;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg: #0c0b14;
  --bg-gradient: radial-gradient(ellipse at 35% 15%, #16132a 0%, #0c0b14 60%, #0a0910 100%);
  --surface: #14121e;
  --surface2: #1c1a2a;
  --surface3: #242238;
  --border: #28243e;
  --gold: #c9a84c;
  --gold-light: #e8cc6a;
  --gold-dark: #8a7430;
  --crimson: #8b1a1a;
  --crimson-light: #d14a4a;
  --text: #e4ddd0;
  --text2: #847c92;
  --text3: #58506a;
  --teal: #3a8a8a;
  --teal-light: #5ababa;
  --green: #4a8a4a;
  --orange: #c97a2a;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── Top Navigation ── */
#top-nav {
  height: var(--top-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 4px;
  flex-shrink: 0;
  z-index: 1000;
  position: relative;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-right: 24px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 36px;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-link.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  border-radius: 6px;
  padding: 5px 7px;
  line-height: 1;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
#theme-toggle:hover {
  border-color: var(--gold-dark);
  color: var(--gold);
}
#theme-toggle .sun { display: none; }
#theme-toggle .moon { display: block; }
[data-theme="dark"] #theme-toggle .sun { display: block; }
[data-theme="dark"] #theme-toggle .moon { display: none; }

/* ── Page Container ── */
#app { display: flex; flex-direction: column; height: 100%; }
.page { display: none; flex: 1; overflow-y: auto; position: relative; }
.page.active { display: flex; flex-direction: column; }

/* ── Status Bar ── */
#status-text {
  font-size: 12px;
  color: var(--text3);
  margin-left: auto;
}

/* ── Home Page ── */
#page-home { padding: 0; align-items: center; overflow-y: auto; }

/* Dolly Hero Card */
.bot-hero-card {
  display: flex;
  align-items: center;
  gap: 24px;
  width: calc(100% - 48px);
  max-width: 1000px;
  margin: 40px auto 0;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.2, 1);
  cursor: pointer;
  flex-shrink: 0;
}

.bot-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.bot-hero-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-dark);
  box-shadow: 0 16px 48px rgba(0,0,0,0.07), 0 0 0 1px rgba(170,130,40,0.08);
}

.bot-hero-card:active {
  transform: translateY(-1px);
}

.bhero-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--gold-dark);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.bhero-text {
  flex: 1;
  min-width: 0;
}

.bhero-text h1 {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 34px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 2px;
  line-height: 1.1;
}

.bhero-sub {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 10px;
}

.bhero-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bhero-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}

.bhero-arrow {
  font-size: 24px;
  color: var(--text3);
  flex-shrink: 0;
  transition: transform 0.3s ease, color 0.3s ease;
  align-self: center;
}

.bot-hero-card:hover .bhero-arrow {
  transform: translateX(4px);
  color: var(--gold);
}

/* Subhead divider */
.home-subhead {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1000px;
  padding: 32px 24px 16px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
}

.home-subhead-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 24px 40px;
  max-width: 1000px;
  width: 100%;
}

.home-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.home-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(170,130,40,0.08);
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  border-radius: 0 2px 2px 0;
}

.home-card.map-card::before { background: var(--teal); }
.home-card.we-card::before { background: var(--gold); }
.home-card.anni-card::before { background: var(--crimson); }

.home-card .card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}

.home-card .card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.home-card .card-desc {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.5;
}

.home-card .card-meta {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text3);
}

/* ── Home Footer Link ── */
.home-footer-link {
  padding: 0 24px 48px;
  max-width: 1000px;
  width: 100%;
  flex-shrink: 0;
}

/* ── Bot Page ── */
#page-bot {
  align-items: center;
  padding: 0 0 48px;
}

.b-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 600px;
  padding: 40px 24px 0;
  margin-bottom: 20px;
}

.b-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold-dark);
  object-fit: cover;
  flex-shrink: 0;
}

.b-hero-text { flex: 1; min-width: 0; }

.b-title {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 32px;
  color: var(--gold);
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 2px;
}

.b-sub {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 8px;
}

.b-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.b-tags span {
  font-size: 10px;
  padding: 2px 9px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}

/* QR Section */
.b-qr-wrap {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 24px;
  width: 100%;
  max-width: 600px;
  margin-bottom: 32px;
}

.b-qr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.2, 1);
  flex: 1;
  min-width: 150px;
}

.b-qr-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-dark);
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}

.b-qr-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.b-qr-hint {
  font-size: 12px;
  color: var(--text2);
}

.b-qr-card .qr-wrapper {
  padding: 6px;
  border-radius: 8px;
  background: #fff;
  line-height: 0;
}

.b-qr-card .qr-img {
  width: 200px;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Section Label */
.b-section-label {
  width: 100%;
  max-width: 600px;
  padding: 0 24px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.b-section-label span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  flex-shrink: 0;
}

.b-section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Feature Cards */
.b-card {
  width: 100%;
  max-width: 600px;
  padding: 0 24px;
  margin-top: 20px;
}

.b-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.b-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.b-card-label span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
}

.b-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 4px;
}

.b-card-desc {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 10px;
  line-height: 1.5;
}

.b-cmd-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.b-cmd-bar code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Preview image placeholder */
.b-preview {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface2);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.b-preview:hover {
  border-color: var(--gold-dark);
}

.b-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text3);
  padding: 40px;
}

.b-preview-placeholder svg {
  opacity: 0.4;
}

.b-preview-placeholder span {
  font-size: 14px;
}

.b-preview img {
  width: 100%;
  height: auto;
  display: block;
}

[data-theme="dark"] .b-qr-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

[data-theme="dark"] .b-qr-card .qr-wrapper {
  background: #fff;
}

/* ── Bot Commands Section ── */
.bot-section {
  width: 100%;
  max-width: 540px;
  padding: 24px 24px 0;
  animation: botFadeIn 0.6s ease both;
  animation-delay: 0.35s;
}

.bot-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  text-align: center;
}

.bot-section-line {
  width: 48px;
  height: 2px;
  background: var(--gold-dark);
  margin: 10px auto 0;
  border-radius: 1px;
  opacity: 0.5;
}

.bot-cmd-group {
  width: 100%;
  max-width: 540px;
  padding: 20px 24px 0;
  animation: botFadeIn 0.6s ease both;
  animation-delay: 0.45s;
}

.bot-cmd-header {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  padding-left: 2px;
}

.bot-cmd-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.bot-cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.bot-cmd-item:last-child {
  border-bottom: none;
}

.bot-cmd-item:hover {
  background: var(--surface2);
}

.bot-cmd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bot-cmd-desc {
  font-size: 14px;
  color: var(--text2);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .bot-cmd-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ── WE Page ── */
#page-we { padding: 0; }

.we-header {
  padding: 20px 24px 12px;
  flex-shrink: 0;
}

.we-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 2px;
}

.we-header .we-subtitle {
  font-size: 14px;
  color: var(--text2);
}

.we-controls {
  display: flex;
  gap: 8px;
  padding: 0 24px 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
}

.we-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.we-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.we-search-wrap input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

.we-search-wrap input:focus { border-color: var(--gold-dark); }
.we-search-wrap input::placeholder { color: var(--text3); }

.we-filter-select {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  min-width: 90px;
}

.we-filter-select:focus { border-color: var(--gold-dark); }
.we-filter-select option { background: var(--surface); color: var(--text); }

.we-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  user-select: none;
  white-space: nowrap;
}
.we-toggle-label input[type="checkbox"] { accent-color: var(--gold); }

.we-stats {
  padding: 0 24px 8px;
  font-size: 13px;
  color: var(--text3);
  flex-shrink: 0;
}

.we-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 24px;
}

.we-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
  padding: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.we-section:first-child { padding-top: 0; }
.we-section::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
}
.we-section.scheduled-section::before { background: var(--gold); }
.we-section.unscheduled-section::before { background: var(--text3); }

.we-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

@keyframes weCardIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.we-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.2, 1);
  position: relative;
  cursor: default;
  animation: weCardIn 0.3s ease both;
}

.we-card:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.we-card.followed {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(170,130,40,0.04) 0%, var(--surface) 70%);
}

.we-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.we-lv {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.we-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.we-follow-btn {
  cursor: pointer;
  font-size: 14px;
  color: var(--text3);
  transition: all 0.2s;
  user-select: none;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.we-follow-btn:hover { color: var(--gold); }
.we-follow-btn.followed { color: var(--gold); }

.we-meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.we-tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.we-tag.anni-tag {
  background: rgba(204,51,51,0.15);
  color: var(--crimson-light);
  border-color: rgba(204,51,51,0.2);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.we-countdown {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}
.we-countdown.urgent { color: var(--crimson-light); }
.we-countdown.normal { color: var(--gold); }
.we-countdown.done { color: var(--text3); }

.we-rewards-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.we-reward-pill {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(58,138,138,0.1);
  color: var(--teal-light);
  border: 1px solid rgba(58,138,138,0.15);
  white-space: nowrap;
}

.we-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
  font-style: italic;
  font-size: 16px;
}

/* ── Anni Page ── */
#page-anni { padding: 0; }

.anni-header {
  padding: 24px 24px 16px;
  flex-shrink: 0;
}

.anni-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--crimson-light);
  margin-bottom: 4px;
}

.anni-header .anni-subtitle {
  font-size: 16px;
  color: var(--text2);
  font-style: italic;
}

.anni-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 24px;
}

.anni-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.anni-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.anni-status-dot.active { background: var(--crimson-light); box-shadow: 0 0 12px rgba(204,51,51,0.4); }
.anni-status-dot.waiting { background: var(--gold); box-shadow: 0 0 12px rgba(201,168,76,0.3); }
.anni-status-dot.none { background: var(--text3); }

.anni-status-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.anni-countdown {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--crimson-light);
  letter-spacing: 1px;
}

.anni-current-card {
  background: linear-gradient(135deg, rgba(139,26,26,0.08) 0%, var(--surface) 60%);
  border: 1px solid rgba(139,26,26,0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.anni-current-card .card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--crimson-light);
  margin-bottom: 12px;
}

.anni-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.anni-detail-item {
  padding: 12px 16px;
  background: var(--surface2);
  border-radius: var(--radius);
}

.anni-detail-label {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-display);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.anni-detail-value {
  font-size: 17px;
  color: var(--text);
}

.anni-history { margin-top: 8px; }

.anni-history h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.anni-history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}

.anni-history-item:hover { border-color: var(--gold); }

.anni-h-date {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.anni-h-detect {
  font-size: 14px;
  color: var(--text3);
  margin-left: auto;
}

.anni-empty {
  text-align: center;
  padding: 40px;
  color: var(--text3);
  font-style: italic;
  font-size: 17px;
}

/* ── Map Page ── */
#page-map { flex: 1; position: relative; overflow: hidden; }
#page-map .page-inner { display: flex; flex: 1; position: relative; overflow: hidden; }
#map { flex: 1; height: 100%; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transform: translateX(100%);
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  transition: transform 0.25s ease;
  z-index: 800;
}
.sidebar.open { transform: translateX(0); }

.sb-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  gap: 8px;
  flex-shrink: 0;
}

.sb-back { cursor: pointer; color: var(--text2); padding: 4px; user-select: none; }
.sb-back:hover { color: var(--text); }
.sb-close { cursor: pointer; color: var(--text3); padding: 4px; user-select: none; margin-left: auto; }
.sb-close:hover { color: var(--text); }

.sb-detail { flex: 0 0 auto; }
.sidebar { overflow-y: auto; }

.dh { padding: 16px; background: var(--surface2); }
.dt { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.dg { font-size: 15px; color: var(--text2); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.gc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ds { font-size: 15px; margin-top: 6px; }
.db { padding: 16px; font-size: 15px; }

.sec {
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ir { padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.ir-icon { width: 18px; height: 18px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.dc { padding: 10px 16px; text-align: center; cursor: pointer; color: var(--text3); border-top: 1px solid var(--border); font-size: 14px; }
.dc:hover { color: var(--text); }
.rdy { color: var(--green); font-weight: bold; }
.cd { color: var(--orange); }

/* Tower Calculator */
#tower-calc { border-top: 1px solid var(--border); flex-shrink: 0; }
.tc-header { padding: 10px 16px; font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 1px; color: var(--text2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.tc-body { padding: 6px 12px; }

.tr { display: flex; align-items: center; padding: 3px 0; gap: 8px; }
.tl { font-size: 14px; color: var(--text2); min-width: 60px; flex-shrink: 0; }
.tv { font-size: 13px; color: var(--gold); min-width: 72px; text-align: right; font-family: var(--font-mono); }
.ts { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tb { width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.tb:hover { background: var(--surface3); }
.ti { width: 38px; text-align: center; padding: 2px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-family: var(--font-mono); -moz-appearance: textfield; }
.ti::-webkit-inner-spin-button { -webkit-appearance: none; }
.tp { padding: 5px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface2); color: var(--text2); cursor: pointer; font-size: 13px; font-family: var(--font-display); letter-spacing: 0.5px; }
.tp:hover { border-color: var(--gold-dark); color: var(--gold); }
.tc-result { margin-top: 4px; padding: 8px 12px; background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; }
.tc-stat { font-size: 14px; color: var(--text); }
.tc-stat b { color: var(--gold-light); }
.tc-gap { font-size: 13px; padding: 4px 12px 0; color: var(--orange); }

/* Map Labels */
.tl-wrap { border: none; background: none; pointer-events: none; }
.tl-inner { text-align: center; line-height: 1.2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; }
.tl-prefix { font-family: var(--font-display); font-size: 11px; font-weight: 800; letter-spacing: 0.5px; -webkit-text-stroke: 0.6px #fff; paint-order: stroke fill; text-shadow: 0 0 3px #000, 0 0 6px #000, 1px 1px 0 #000, -1px -1px 0 #000; }
.tl-cd { font-size: 9px; font-weight: 700; -webkit-text-stroke: 0.4px #000; paint-order: stroke fill; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.hq-crown svg { filter: drop-shadow(0 0 3px rgba(0,0,0,0.8)); }

/* ── Map Header ── */
.map-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 500; pointer-events: none;
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(11,10,18,0.85) 0%, transparent 100%);
}
.map-header > * { pointer-events: auto; }
.map-title { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; }
.map-search { flex: 1; max-width: 300px; margin: 0 auto; }
.map-search input { width: 100%; padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--font-body); font-size: 14px; outline: none; }
.map-search input:focus { border-color: var(--gold-dark); }
.map-zoom-display { font-size: 12px; color: var(--text3); font-family: var(--font-mono); padding: 4px 8px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); min-width: 48px; text-align: center; }

/* ── Loading ── */
.loading-page { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 16px; color: var(--text3); }
.loading-spinner { width: 32px; height: 32px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Leaflet overrides ── */
.leaflet-container { background: #0b0a12 !important; }
.tt { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; padding: 6px 12px !important; font-size: 14px !important; font-family: var(--font-body) !important; box-shadow: 0 4px 16px rgba(0,0,0,0.6) !important; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--border) !important; transition: all 0.15s; }
.leaflet-control-zoom a:hover { background: var(--surface2) !important; color: var(--gold) !important; }

/* ── Mobile ── */
@media (max-width: 768px) {
  :root { --top-h: 56px; }
  .nav-brand { font-size: 14px; letter-spacing: 2px; margin-right: 8px; }
  .nav-link { font-size: 11px; padding: 6px 10px; letter-spacing: 0.5px; }
  .home-hero h1 { font-size: 28px; }
  .home-grid { padding: 0 16px 24px; grid-template-columns: 1fr; }
  .bot-hero-card { flex-direction: column; text-align: center; padding: 20px 16px; gap: 12px; margin: 24px 8px 0; width: calc(100% - 16px); flex-shrink: 0; box-sizing: border-box; }
  .bot-hero-card .bhero-logo { width: 56px; height: 56px; margin: 0 auto; }
  .bot-hero-card .bhero-arrow { display: none; }
  .bot-hero-card .bhero-badges { justify-content: center; }
  .bot-hero-card .bhero-text h1 { font-size: 24px; }
  .sidebar { width: 100%; height: 55%; transform: translateY(calc(100% - 38px)); border-left: none; border-top: 1px solid var(--border); right: auto; bottom: 0; top: auto; transition: transform 0.25s ease; }
  .sidebar.open { transform: translateY(0); }
  .we-search-wrap { max-width: 100%; }
  .we-controls { flex-direction: column; align-items: stretch; }
  .we-list { padding: 0 16px 16px; }
  .we-header { padding: 16px 16px 12px; }
  .anni-content { padding: 0 16px 16px; }
  .anni-header { padding: 16px 16px 12px; }
}

/* 导出按钮 */
.we-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.we-export-btn:hover {
  border-color: var(--gold-dark);
  background: rgba(201,168,76,0.08);
}

/* 导出通知条 */
.we-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 9999;
  animation: toastIn 0.25s ease;
}
.we-toast-error {
  border-color: var(--crimson);
  color: var(--crimson-light);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* ══ ICP Footer ══ */
.site-footer {
  text-align: center;
  padding: 24px 16px 32px;
  font-size: 12px;
  color: var(--text3);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.site-footer a {
  color: var(--text2);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer a:hover {
  color: var(--gold);
}
.site-footer .beian {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
