:root {
  --frontend-content-max-width: 88rem;
  --frontend-surface: #ffffff;
  --frontend-background: #f7f8fb;
  --frontend-text: #25324a;
  --frontend-muted: #64748b;
  --frontend-border: #e2e8f0;
  --frontend-primary: #5169e8;
  --frontend-primary-dark: #3f54c9;
  --frontend-radius: 0.625rem;
}

html.dark-style {
  --frontend-surface: #2b2c40;
  --frontend-background: #232333;
  --frontend-text: #cbc8e0;
  --frontend-muted: #a1a0b5;
  --frontend-border: #444564;
  --frontend-primary: #696cff;
  --frontend-primary-dark: #7e82ff;
}

html.dark-style .dropdown-menu {
  background-color: #2b2c40;
  border-color: #444564;
}

html.dark-style .dropdown-item {
  color: #cbc8e0;
}

html.dark-style .dropdown-item:hover,
html.dark-style .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
}

body {
  background: var(--frontend-background);
  color: var(--frontend-text);
}

a {
  color: var(--frontend-primary-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: #2f419e;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 0.1875rem solid rgba(81, 105, 232, 0.35);
  outline-offset: 0.125rem;
}

.frontend-site-header {
  background: var(--frontend-surface);
  border-bottom: 1px solid var(--frontend-border);
}

.frontend-content {
  width: min(100%, var(--frontend-content-max-width));
  margin-inline: auto;
  padding: 2rem clamp(1rem, 2vw, 2rem) 3rem;
}

.frontend-brand {
  color: var(--frontend-text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.frontend-brand:hover {
  color: var(--frontend-primary-dark);
}

.frontend-nav-link {
  color: var(--frontend-text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.frontend-nav-link:hover,
.frontend-nav-link:focus {
  color: var(--frontend-primary-dark);
}

@media (min-width: 1200px) {
  .frontend-site-header .frontend-content {
    gap: 0.875rem;
    flex-wrap: nowrap;
  }

  .frontend-site-header .frontend-content > .d-flex {
    min-width: 0;
  }

  .frontend-site-header .frontend-content > .d-flex:first-child {
    flex: 0 1 auto;
  }

  .global-search-trigger {
    max-width: 13rem;
  }

  .global-search-trigger .small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .frontend-navigation-list {
    gap: clamp(0.65rem, 1.1vw, 1rem) !important;
  }

  .frontend-navigation-list > .nav-item,
  .frontend-navigation-list .btn,
  .frontend-nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .frontend-nav-link {
    font-size: 0.875rem;
  }
}

@media (min-width: 1200px) and (max-width: 1279.98px) {
  .frontend-site-header .d-xl-block {
    display: none !important;
  }

  .frontend-site-header .navbar-toggler.d-xl-none {
    display: block !important;
  }
}

.frontend-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.frontend-page-eyebrow {
  color: var(--frontend-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.frontend-page-title {
  color: var(--frontend-text);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}

.frontend-page-summary {
  color: var(--frontend-muted);
  font-size: 1rem;
  margin: 0.75rem 0 0;
  max-width: 44rem;
}

.frontend-panel {
  background: var(--frontend-surface);
  border: 1px solid var(--frontend-border);
  border-radius: var(--frontend-radius);
}

.frontend-content .card {
  border: 1px solid var(--frontend-border);
  border-radius: var(--frontend-radius);
  box-shadow: none;
}

.frontend-content .card .card-body {
  padding: 1.5rem;
}

.frontend-panel > .card-body {
  padding: 1.5rem;
}

.frontend-list {
  background: var(--frontend-surface);
  border: 1px solid var(--frontend-border);
  border-radius: var(--frontend-radius);
  overflow: hidden;
}

.frontend-list .table {
  margin-bottom: 0;
}

.frontend-list .table > :not(caption) > * > * {
  border-bottom-color: var(--frontend-border);
  padding: 1rem;
}

.frontend-filter {
  background: var(--frontend-surface);
  border-bottom: 1px solid var(--frontend-border);
  padding: 1.5rem;
}

.frontend-filter .form-label {
  color: var(--frontend-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.frontend-filter .form-control,
.frontend-filter .form-select {
  border-color: #cbd5e1;
}

.frontend-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.frontend-category-nav .btn {
  border-color: var(--frontend-border);
  color: var(--frontend-text);
}

.frontend-category-nav .btn:hover,
.frontend-category-nav .btn.active {
  background: #eef1ff;
  border-color: #c7d0ff;
  color: var(--frontend-primary-dark);
}

.frontend-mobile-list {
  display: grid;
  gap: 0.75rem;
}

.frontend-mobile-list-item {
  background: var(--frontend-surface);
  border: 1px solid var(--frontend-border);
  border-radius: var(--frontend-radius);
  padding: 1rem;
}

.frontend-detail-nav {
  border-bottom: 1px solid var(--frontend-border);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.frontend-detail-nav .nav-link {
  color: var(--frontend-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0;
  white-space: nowrap;
}

.frontend-detail-nav .nav-link:hover {
  color: var(--frontend-primary-dark);
}

.frontend-definition-list dt {
  color: var(--frontend-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.frontend-definition-list dd {
  font-weight: 500;
}

.frontend-empty-state {
  background: var(--frontend-surface);
  border: 1px dashed #cbd5e1;
  border-radius: var(--frontend-radius);
  color: var(--frontend-muted);
  padding: 3rem 1.5rem;
  text-align: center;
}

.frontend-section {
  margin-top: 2rem;
}

.frontend-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.frontend-hero {
  max-width: 52rem;
  padding-block: 3rem 2rem;
}

.frontend-content > .row.justify-content-center {
  padding-block: 2rem;
}

.frontend-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.frontend-entry-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.frontend-entry {
  background: var(--frontend-surface);
  border: 1px solid var(--frontend-border);
  border-radius: var(--frontend-radius);
  color: var(--frontend-text);
  display: block;
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.frontend-entry:hover {
  border-color: var(--frontend-primary);
  color: var(--frontend-text);
  transform: translateY(-1px);
}

.frontend-entry-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.frontend-entry-description {
  color: var(--frontend-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.frontend-map-page .frontend-content {
  max-width: none;
  padding: 0;
  width: 100%;
}

.frontend-map-page .content-wrapper {
  background: #101923;
}

.frontend-map-experience {
  min-height: calc(100dvh - 4.5rem);
  padding: 1rem clamp(1rem, 2vw, 2rem) 1.5rem;
}

.frontend-map-header {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 0.75rem;
  max-width: 70rem;
}

.frontend-map-switcher {
  display: flex;
  gap: 0.5rem;
  margin: 0 auto 0.75rem;
  max-width: 70rem;
}

.frontend-map-switcher a {
  border: 1px solid #3b4d62;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  text-decoration: none;
}

.frontend-map-switcher a:hover,
.frontend-map-switcher a.active {
  background: #334155;
  border-color: #60a5fa;
  color: #f8fafc;
}

.frontend-map-tools,
.frontend-map-meta {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin: 0 auto 0.75rem;
  max-width: 70rem;
}

.frontend-map-search {
  max-width: 32rem;
  position: relative;
  width: 100%;
}

.frontend-map-search input {
  background: #172230;
  border: 1px solid #3b4d62;
  border-radius: 0.5rem;
  color: #f8fafc;
  padding: 0.5rem 0.75rem;
  width: 100%;
}

.frontend-map-search input::placeholder {
  color: #aab7c7;
}

.frontend-map-search-results {
  background: #172230;
  border: 1px solid #3b4d62;
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.28);
  left: 0;
  margin-top: 0.375rem;
  overflow: hidden;
  position: absolute;
  right: 0;
  z-index: 1000;
}

.frontend-map-search-results p {
  color: #cbd5e1;
  font-size: 0.875rem;
  margin: 0;
  padding: 0.75rem;
}

.frontend-map-search-result {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #2a3a4d;
  color: #f8fafc;
  display: grid;
  padding: 0.625rem 0.75rem;
  text-align: left;
  width: 100%;
}

.frontend-map-search-result:last-child {
  border-bottom: 0;
}

.frontend-map-search-result:hover {
  background: #26364a;
}

.frontend-map-search-result small {
  color: #aab7c7;
  margin-top: 0.125rem;
}

.frontend-map-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.frontend-map-action,
.frontend-map-layer-panel button {
  background: #1e293b;
  border: 1px solid #3b4d62;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
}

.frontend-map-action:hover,
.frontend-map-layer-panel button:hover {
  background: #334155;
  border-color: #60a5fa;
}

.frontend-map-layer-panel {
  background: #172230;
  border: 1px solid #3b4d62;
  border-radius: 0.5rem;
  color: #e2e8f0;
  margin: 0 auto 0.75rem;
  max-width: 70rem;
  padding: 0.75rem;
}

.frontend-map-layer-panel__header {
  align-items: center;
  border-bottom: 1px solid #28374a;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
}

.frontend-map-layer-panel__heading {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.frontend-map-layer-panel h2 {
  color: #f8fafc;
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
}

.frontend-map-layer-badge {
  background: #1e293b;
  border: 1px solid #3b4d62;
  border-radius: 9999px;
  color: #94a3b8;
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
}

.frontend-map-layer-panel__actions {
  display: flex;
  gap: 0.375rem;
}

.frontend-map-layer-groups {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.frontend-map-layer-group {
  background: #0f172a;
  border: 1px solid #2a394c;
  border-radius: 0.375rem;
  overflow: hidden;
}

.frontend-map-layer-group__header {
  align-items: center;
  background: #1e293b;
  border-bottom: 1px solid #2a394c;
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0.625rem;
}

.frontend-map-layer-group__toggle {
  align-items: center;
  background: none;
  border: none;
  color: #f1f5f9;
  cursor: pointer;
  display: flex;
  font-size: 0.8125rem;
  font-weight: 600;
  gap: 0.375rem;
  padding: 0;
}

.frontend-map-layer-group__toggle:hover {
  color: #60a5fa;
}

.frontend-map-layer-group__toggle .group-arrow {
  display: inline-block;
  font-size: 0.6875rem;
  transition: transform 0.15s ease;
}

.frontend-map-layer-group__toggle[aria-expanded="false"] .group-arrow {
  transform: rotate(-90deg);
}

.frontend-map-layer-group__toggle .group-count {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 400;
}

.frontend-map-layer-group__quick-actions {
  display: flex;
  gap: 0.25rem;
}

.btn-group-toggle {
  background: #334155;
  border: 1px solid #475569;
  border-radius: 0.25rem;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.6875rem;
  line-height: 1.2;
  padding: 0.125rem 0.375rem;
}

.btn-group-toggle:hover {
  background: #475569;
  color: #f8fafc;
}

.frontend-map-layer-group__content {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.625rem;
}

.frontend-map-layer-group__content[hidden] {
  display: none !important;
}

.frontend-map-layer-item {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.8125rem;
  gap: 0.375rem;
  user-select: none;
}

.frontend-map-layer-item input {
  accent-color: #3b82f6;
  cursor: pointer;
  margin: 0;
}

.frontend-map-layer-item__icon {
  height: 1.25rem;
  object-fit: contain;
  width: 1.25rem;
}

.frontend-map-layer-item__name {
  color: #e2e8f0;
}

.frontend-map-layer-item__count {
  color: #94a3b8;
  font-size: 0.75rem;
}

.frontend-map-layer-group--placeholder {
  opacity: 0.75;
}

.badge-upcoming {
  background: #334155;
  border-radius: 0.25rem;
  color: #cbd5e1;
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
}

.layer-placeholder-hint {
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 0.25rem 0;
}

/* BOSS 標記頭像與角標樣式 */
.frontend-map-boss-div-icon {
  background: transparent;
  border: none;
}

.frontend-map-boss-marker {
  cursor: pointer;
  height: 36px;
  position: relative;
  transition: transform 0.15s ease;
  width: 36px;
}

.frontend-map-boss-marker:hover {
  transform: scale(1.15);
  z-index: 1000 !important;
}

.frontend-map-boss-avatar {
  background: #0f172a;
  border: 2px solid #f59e0b;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  display: block;
  height: 36px;
  object-fit: cover;
  width: 36px;
}

.frontend-map-boss-level {
  background: #0f172a;
  border: 1px solid #78350f;
  border-radius: 3px;
  bottom: -3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  color: #fbbf24;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  padding: 0 3px;
  position: absolute;
  right: -3px;
  white-space: nowrap;
}

/* BOSS Popup 卡片樣式 */
.frontend-map-boss-popup .leaflet-popup-content-wrapper {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  color: #e2e8f0;
}

.frontend-map-boss-popup .leaflet-popup-content {
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 10px 12px;
}

.frontend-map-boss-popup .leaflet-popup-tip {
  background: #0f172a;
}

.frontend-map-popup-card__header {
  align-items: center;
  border-bottom: 1px solid #2a394c;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.frontend-map-popup-card__avatar {
  background: #1e293b;
  border: 1px solid #f59e0b;
  border-radius: 50%;
  height: 36px;
  object-fit: cover;
  width: 36px;
}

.frontend-map-popup-card__title {
  color: #f8fafc;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.frontend-map-popup-card__badges {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.125rem;
}

.frontend-map-badge {
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
}

.frontend-map-badge--level {
  background: #78350f;
  color: #fde68a;
}

.frontend-map-badge--type {
  background: #1e293b;
  border: 1px solid #3b4d62;
  color: #94a3b8;
}

.frontend-map-popup-card__meta {
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1.4;
}

.frontend-map-popup-card__btn {
  align-items: center;
  background: #2563eb;
  border: 1px solid #3b82f6;
  border-radius: 0.375rem;
  color: #ffffff;
  display: flex;
  font-size: 0.75rem;
  font-weight: 600;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.375rem 0.5rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.frontend-map-popup-card__btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.frontend-map-legend {
  color: #cbd5e1;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  gap: 0.75rem;
}

.frontend-map-legend span {
  align-items: center;
  display: inline-flex;
  gap: 0.375rem;
}

.frontend-map-legend__icon {
  height: 1.5rem;
  object-fit: contain;
  width: 1.5rem;
}

.frontend-map-legend__dot,
.frontend-map-legend__travel {
  border: 1px solid #ffffff;
  display: inline-block;
  height: 0.75rem;
  width: 0.75rem;
}

.frontend-map-legend__dot {
  border-radius: 50%;
}

.frontend-map-legend__dot--pal {
  background: #f59e0b;
}

.frontend-map-legend__dot--other {
  background: #60a5fa;
}

.frontend-map-legend__travel {
  background: #22d3ee;
  box-shadow: 0 0 0.375rem rgba(34, 211, 238, 0.85);
  transform: rotate(45deg);
}

.frontend-map-coordinates {
  color: #aab7c7;
  font-size: 0.75rem;
  margin: 0;
  text-align: right;
}

.frontend-map-experience:fullscreen {
  background: #101923;
  overflow: auto;
}

.frontend-map-experience:fullscreen .frontend-map-canvas {
  height: calc(100dvh - 12rem);
  max-width: none;
}

.frontend-map-kicker,
.frontend-map-help {
  color: #aab7c7;
  font-size: 0.8125rem;
  margin: 0;
}

.frontend-map-kicker {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.frontend-map-title {
  color: #f8fafc;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0;
}

.frontend-map-canvas {
  background: #101923;
  border: 1px solid #2a3a4d;
  height: calc(100dvh - 9rem);
  margin: 0 auto;
  max-width: 70rem;
  min-height: 36rem;
  width: 100%;
}

.frontend-map-canvas.leaflet-container {
  background: #101923;
}

.frontend-map-status {
  color: #aab7c7;
  font-size: 0.8125rem;
  margin: 0.75rem auto 0;
  max-width: 70rem;
}

.boss-map-marker {
  background: transparent;
}

.boss-map-marker__dot {
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.75);
  display: block;
  height: 0.875rem;
  width: 0.875rem;
}

.boss-map-marker__dot--pal {
  background: #f59e0b;
}

.boss-map-marker__dot--other {
  background: #60a5fa;
}

.fast-travel-map-marker {
  background: transparent;
}

.fast-travel-map-marker__diamond {
  background: #22d3ee;
  border: 2px solid #ecfeff;
  box-shadow: 0 0 0 1px rgba(8, 47, 73, 0.85), 0 0 0.75rem rgba(34, 211, 238, 0.85);
  display: block;
  height: 0.75rem;
  margin: 0.1875rem;
  transform: rotate(45deg);
  width: 0.75rem;
}

.frontend-footer {
  background: var(--frontend-surface);
  border-top: 1px solid var(--frontend-border);
  color: var(--frontend-muted);
  font-size: 0.8125rem;
}

.frontend-footer-content {
  padding: 1.5rem clamp(1rem, 2vw, 2rem);
  text-align: center;
}

.offcanvas .nav-link {
  color: var(--frontend-text);
  font-weight: 500;
  padding-block: 0.75rem;
}

@media (max-width: 767.98px) {
  .frontend-content {
    padding-top: 1.5rem;
  }

  .frontend-page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .frontend-page-header .btn,
  .frontend-page-header .btn-group {
    width: 100%;
  }

  .frontend-entry-grid {
    grid-template-columns: 1fr;
  }

  .frontend-map-experience {
    padding: 1rem;
  }

  .frontend-map-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .frontend-map-tools,
  .frontend-map-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .frontend-map-actions {
    width: 100%;
  }

  .frontend-map-action {
    flex: 1;
  }

  .frontend-map-layer-panel {
    max-height: 65vh;
    overflow-y: auto;
  }

  .frontend-map-layer-panel__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .frontend-map-layer-group__content {
    flex-direction: column;
    gap: 0.375rem;
  }

  .frontend-map-coordinates {
    text-align: left;
  }

  .frontend-map-canvas {
    height: calc(100dvh - 9rem);
    min-height: 26rem;
    width: 100%;
  }
}

/* ==========================================================================
   前台互動地圖：個人化探索進度追蹤系統樣式
   ========================================================================== */

.frontend-map-progress-card {
  background: var(--frontend-card-bg, #1e293b);
  border: 1px solid var(--frontend-border, #334155);
  border-radius: 0.5rem;
  padding: 0.875rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.frontend-map-progress-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.frontend-map-progress-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--frontend-text, #f8fafc);
  margin: 0;
}

.frontend-map-progress-card__percent {
  font-size: 0.95rem;
  font-weight: 700;
  color: #10b981;
}

.frontend-map-progress-bar-wrap {
  width: 100%;
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.frontend-map-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 9999px;
  transition: width 0.35s ease;
}

.frontend-map-progress-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--frontend-muted, #94a3b8);
  margin-bottom: 0.5rem;
}

.btn-map-reset-progress {
  background: transparent;
  border: none;
  color: #ef4444;
  padding: 0;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.btn-map-reset-progress:hover {
  color: #f87171;
}

.frontend-map-progress-card__filter {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.frontend-map-filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--frontend-text, #f8fafc);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.frontend-map-filter-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: #10b981;
}

/* 標記完成狀態樣式（半透明＋平滑過渡） */
.frontend-map-marker--completed {
  opacity: 0.42 !important;
  filter: grayscale(35%) contrast(85%);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.frontend-map-marker--completed:hover {
  opacity: 0.85 !important;
  filter: none;
}

/* 標記彈窗內的打勾按鈕 */
.frontend-map-popup-actions {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-progress-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.4rem 0.75rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 1px solid #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  transition: all 0.2s ease;
}

.btn-progress-toggle:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-progress-toggle--active {
  background: rgba(100, 116, 139, 0.2);
  border-color: #64748b;
  color: #94a3b8;
}

.btn-progress-toggle--active:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

/* ==========================================================================
   BOSS 標記頭像與等級角標樣式（比照 PalDB 精緻小巧設計）
   ========================================================================== */

.frontend-map-boss-div-icon {
  background: transparent !important;
  border: none !important;
}

.frontend-map-boss-marker {
  position: relative;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #1e293b;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.frontend-map-boss-marker:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  z-index: 1000 !important;
}

.frontend-map-boss-avatar {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  pointer-events: none;
}

.frontend-map-boss-level {
  position: absolute !important;
  bottom: -4px !important;
  right: -5px !important;
  background: rgba(15, 23, 42, 0.92) !important;
  color: #facc15 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 1px 3px !important;
  border-radius: 3px !important;
  border: 1px solid rgba(250, 204, 21, 0.6) !important;
  line-height: 1 !important;
  letter-spacing: -0.2px;
  pointer-events: none;
  white-space: nowrap !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
  z-index: 2;
}

/* BOSS 彈窗卡片樣式 */
.frontend-map-boss-popup .leaflet-popup-content-wrapper {
  background: #1e293b;
  color: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  padding: 0;
}

.frontend-map-boss-popup .leaflet-popup-content {
  margin: 0.75rem;
  line-height: 1.4;
}

.frontend-map-popup-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.frontend-map-popup-card__avatar {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-radius: 50% !important;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.2);
  object-fit: cover !important;
  flex-shrink: 0;
}

.frontend-map-popup-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.25rem 0;
}

.frontend-map-popup-card__badges {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.frontend-map-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 600;
}

.frontend-map-badge--level {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.frontend-map-badge--type {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.frontend-map-popup-card__meta {
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 0.375rem;
  padding: 0.5rem;
  margin-bottom: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.frontend-map-popup-card__btn {
  display: block;
  text-align: center;
  background: #3b82f6;
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background 0.2s;
  margin-bottom: 0.5rem;
}

.frontend-map-popup-card__btn:hover {
  background: #2563eb;
  color: #ffffff !important;
}

/* ==========================================================================
   道具圖鑑專屬設計系統 (Item Cards & Grid)
   ========================================================================== */
.item-category-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
}
.item-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  transition: all 0.2s ease;
}
.item-category-pill:hover {
  background: #f1f5f9;
  color: #2563eb;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.item-category-pill.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* 道具卡片網格 */
.item-grid {
  margin-bottom: 1.5rem;
}
.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}
.item-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.875rem;
  text-decoration: none;
  color: inherit;
}
.item-card-inner:hover {
  color: inherit;
}

/* 稀有度邊框與微光色彩 */
.item-card.rarity-common { border-top: 3px solid #94a3b8; }
.item-card.rarity-uncommon { border-top: 3px solid #22c55e; }
.item-card.rarity-rare { border-top: 3px solid #3b82f6; }
.item-card.rarity-epic { border-top: 3px solid #a855f7; }
.item-card.rarity-legendary { border-top: 3px solid #f59e0b; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12); }
.item-card.rarity-mythic { border-top: 3px solid #ef4444; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15); }

/* 道具頭像容器 */
.item-icon-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0.25rem auto 0.625rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}
.item-icon-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}
.item-card:hover .item-icon-img {
  transform: scale(1.08);
}

/* 道具標題與標籤 */
.item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-badge-row {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.item-badge {
  font-size: 0.6875rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 600;
  line-height: 1.2;
}
.item-badge-category {
  background: #f1f5f9;
  color: #475569;
}
.item-badge-rarity {
  color: #ffffff;
}
.item-badge-rarity.rarity-common { background: #64748b; }
.item-badge-rarity.rarity-uncommon { background: #16a34a; }
.item-badge-rarity.rarity-rare { background: #2563eb; }
.item-badge-rarity.rarity-epic { background: #9333ea; }
.item-badge-rarity.rarity-legendary { background: #d97706; }
.item-badge-rarity.rarity-mythic { background: #dc2626; }

/* 道具底端資訊 */
.item-info-footer {
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: #64748b;
}

/* 詳情頁大圖標面板 */
.item-detail-hero-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
}
.item-detail-avatar {
  width: 96px;
  height: 96px;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.item-detail-avatar img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

