/* Creatures of the Deep wiki — theme aligned to in-game card (teal + cyan) */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  color-scheme: dark;

  /* Reference (fish detail card): deep teal surfaces, cyan accent, pale blue labels */
  --game-teal-footer: #002b36;
  --game-teal-main: #003d4c;
  --game-cyan: #00b4ff;
  /* Primary “white” / body copy (warm parchment; was pure #fff) */
  --game-text: #e3ead8;
  --game-label: #a0c0c8;

  --bg-base: var(--game-teal-footer);
  --bg-elevated: #063848;
  --bg-card: var(--game-teal-main);
  --bg-card-hover: #0f4556;

  --border-subtle: rgba(160, 192, 200, 0.14);
  --border-strong: rgba(160, 192, 200, 0.28);

  --text-primary: var(--game-text);
  --text-secondary: var(--game-label);
  --text-muted: #7a9ba8;

  --accent: var(--game-cyan);
  --accent-dim: rgba(0, 180, 255, 0.2);
  --accent-glow: rgba(0, 180, 255, 0.48);
  --accent-hover: #47c9ff;
  --accent-border-soft: rgba(0, 180, 255, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 0 var(--border-subtle), 0 12px 40px rgba(0, 0, 0, 0.45);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --content-max: 72rem;
  --header-h: 3.5rem;

  /* Map hero — portrait width ≈ panel content (see .map-hero__img max-width); height caps only */
  --map-hero-portrait-max-h: 11rem;
  --map-hero-portrait-max-h-mobile-vw: 72vw;
  --map-hero-portrait-max-h-desktop: 9.5rem;

  /* Hero metric icons — active = theme cyan; idle darker than main teal */
  --map-hero-icon-indicator: var(--accent);
  --map-hero-icon-indicator-idle: #001923;

  --map-hero-panel-bg: var(--game-teal-main);
  --map-hero-panel-bg-glass: rgba(0, 61, 76, 0.55);
  --map-hero-metric-well-bg: var(--game-teal-footer);
  --map-hero-metric-well-border: rgba(0, 0, 0, 0.38);
  --map-hero-tab-active-bg: var(--game-cyan);
  --map-hero-tab-active-fg: var(--game-text);
  --map-hero-tab-idle-bg: var(--game-teal-footer);
  /* Mobile hero footer tabs — match in-game card (dark strip + cyan active “scoop”) */
  --map-hero-tab-footer-idle: #082b36;
  --map-hero-tab-scoop-radius: 1.375rem;

  /* Rarity palette — tuned for teal UI (game rarities kept readable) */
  --rarity-common-fg: var(--game-label);
  --rarity-common-border: #5a7d8c;
  --rarity-common-bg: rgba(160, 192, 200, 0.1);
  --rarity-common-bg-hover: rgba(160, 192, 200, 0.18);
  --rarity-common-line: rgba(160, 192, 200, 0.45);

  --rarity-rare-fg: #fcd34d;
  --rarity-rare-fg-strong: #fbbf24;
  --rarity-rare-border: #ddcd04;
  --rarity-rare-bg: rgba(234, 88, 12, 0.16);
  --rarity-rare-bg-hover: rgba(234, 88, 12, 0.24);
  --rarity-rare-line: rgba(251, 191, 36, 0.65);

  --rarity-epic-fg: #e9d5ff;
  --rarity-epic-accent: #c084fc;
  --rarity-epic-border: #a855f7;
  --rarity-epic-bg: rgba(147, 51, 234, 0.16);
  --rarity-epic-bg-hover: rgba(147, 51, 234, 0.26);
  --rarity-epic-line: rgba(192, 132, 252, 0.7);

  --rarity-monster-fg: #fecaca;
  --rarity-monster-accent: #f87171;
  --rarity-monster-border: #ef4444;
  --rarity-monster-bg: rgba(239, 68, 68, 0.14);
  --rarity-monster-bg-hover: rgba(239, 68, 68, 0.24);
  --rarity-monster-line: rgba(248, 113, 113, 0.75);

  /* Round map list + pin thumbnails (behind transparent PNG edges) */
  --map-portrait-round-bg: rgba(0, 180, 255, 0.28);

  /* Cloversalad wordmark — mint → cyan → violet (readable on dark teal) */
  --brand-gradient: linear-gradient(102deg, #9ff7d1 0%, #2ad8ff 45%, #c9b8ff 100%);
  --brand-gradient-hero: linear-gradient(
    95deg,
    #b8ffd9 0%,
    #00e0ff 35%,
    #a78bfa 72%,
    #7dffc8 100%
  );
  --brand-glow: rgba(0, 210, 255, 0.42);
  --brand-glow-strong: rgba(120, 200, 255, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(0, 180, 255, 0.11), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(0, 61, 76, 0.45), transparent 42%);
}

body > main {
  flex: 1 0 auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  padding: 0 var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-base);
  background-image: linear-gradient(to bottom, rgba(0, 61, 76, 0.97), rgba(0, 43, 54, 0.94));
  backdrop-filter: blur(10px);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: var(--header-h);
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  max-width: min(100%, 22rem);
  font-size: 0.75rem;
  line-height: 1.3;
}

.lang-switcher__link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
}

.lang-switcher__link:hover {
  color: var(--accent);
}

.lang-switcher__link--current {
  color: var(--accent);
  font-weight: 600;
}

.site-header__burger {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.site-header__burger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.site-header__burger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header__burger-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 1.25rem;
  height: 1rem;
}

.site-header__burger-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.site-header--nav-open .site-header__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header--nav-open .site-header__burger-line:nth-child(2) {
  opacity: 0;
}

.site-header--nav-open .site-header__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header__backdrop {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.26s cubic-bezier(0.33, 1, 0.68, 1),
    visibility 0s linear 0.26s;
}

.site-header--nav-open .site-header__backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.26s cubic-bezier(0.33, 1, 0.68, 1),
    visibility 0s;
}

.site-header__drawer {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 2;
  max-height: min(78vh, 36rem);
  overflow: auto;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-base);
  background-image: linear-gradient(to bottom, rgba(0, 61, 76, 0.98), rgba(0, 43, 54, 0.96));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.6rem);
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.28s;
}

.site-header--nav-open .site-header__drawer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}

.site-header__drawer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-md);
  box-sizing: border-box;
}

.site-header__drawer-heading {
  margin: 0 0 var(--space-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-header__drawer-links {
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
}

.site-header__drawer-link {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-header__drawer-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.site-header__drawer-link--map {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-header__drawer-map-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

.site-header__drawer-map-label {
  flex: 1;
  min-width: 0;
}

.site-header__drawer-links--maps {
  margin-bottom: var(--space-md);
}

.site-header__drawer .lang-switcher {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  max-width: none;
  font-size: 0.9375rem;
}

.site-header__drawer .lang-switcher__link {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
}

.site-header__drawer .lang-switcher__link:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.site-nav-drawer-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .site-header__burger-line {
    transition: none;
  }

  .site-header__backdrop,
  .site-header__drawer {
    transition-duration: 0.01ms;
    transform: none;
  }

  .site-header--nav-open .site-header__drawer {
    transform: none;
  }
}

.brand {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand__link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
  text-decoration: none;
}

.brand__link:hover .brand__tagline {
  color: var(--text-secondary);
}

.brand__logo {
  display: block;
  width: 1.75rem;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.25));
}

.brand__lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
  line-height: 1.05;
}

.brand__mark {
  display: inline-block;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.045em;
  line-height: 1;
  background-color: transparent;
  background-image: var(--brand-gradient-hero);
  background-size: 160% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  /* Required on WebKit/Chromium so parent link color doesn’t paint over the gradient */
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 18px rgba(0, 210, 255, 0.35), 0 0 32px rgba(100, 200, 255, 0.2);
  transition: text-shadow 0.2s ease;
}

.brand__link:hover .brand__mark {
  text-shadow: 0 0 26px rgba(0, 230, 255, 0.55), 0 0 48px rgba(160, 200, 255, 0.35);
}

.brand__tagline {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  max-width: min(56vw, 19rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

@media (min-width: 420px) {
  .brand__tagline {
    font-size: 0.6875rem;
    max-width: none;
  }
}

@supports not (background-clip: text) {
  .brand__mark {
    background: none;
    color: var(--accent-hover);
    -webkit-text-fill-color: var(--accent-hover);
    text-shadow: none;
  }
}

.site-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-3xl);
}

/* Full-width strip above site footer — reserved slot */
.site-shell--ad-footer {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-md);
}

/* Emplacements pub : hauteur réservée pour limiter le CLS ; rendu par le fond uniquement */
.ad-slot {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.ad-slot--leaderboard {
  min-height: 90px;
  margin-bottom: var(--space-xl);
}

.ad-slot--sidebar {
  min-height: 250px;
}

/* Typical “medium rectangle” (e.g. 300×250) — legal pages, end of article */
.ad-slot--in-article {
  min-height: 250px;
  max-width: 300px;
  margin: var(--space-xl) auto;
}

/* Site-wide horizontal banner above footer */
.ad-slot--footer {
  min-height: 90px;
  margin-bottom: 0;
}

/* In-feed / native-style block (skill tree: below builder) */
.ad-slot--native {
  min-height: 280px;
  margin-top: var(--space-xl);
}

/* Mobile map column: reserved slot above .map-stage (AdSense / équivalent) — hidden on desktop */
.ad-slot--map-above {
  width: 100%;
  min-height: 100px;
  margin-bottom: var(--space-md);
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .ad-slot--map-above {
    display: none !important;
  }
}

/* Wraps ad placeholder + .map-stage — scrollIntoView target for editorial links (includes ad on mobile) */
.map-page__map-cluster {
  width: 100%;
  scroll-margin-top: calc(var(--header-h) + var(--space-sm));
}

.map-page__ad-end {
  margin-top: var(--space-2xl);
  width: 100%;
}

.home-sidebar {
  margin-top: var(--space-xl);
}

@media (min-width: 900px) {
  .home-sidebar {
    margin-top: 0;
  }

  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 160px);
    gap: var(--space-xl);
    align-items: start;
  }

  .home-layout .home-main {
    min-width: 0;
  }

  .home-sidebar {
    position: sticky;
    top: calc(var(--header-h) + var(--space-md));
    min-width: 0;
  }
}

.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
}

.hero__brand {
  margin: 0 0 var(--space-md);
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.92;
  background-color: transparent;
  background-image: var(--brand-gradient-hero);
  background-size: 200% auto;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 28px rgba(0, 210, 255, 0.4), 0 0 56px rgba(120, 190, 255, 0.25);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__brand {
    animation: hero-brand-glow 10s ease-in-out infinite alternate;
  }
}

@keyframes hero-brand-glow {
  0% {
    background-position: 0% 50%;
    text-shadow: 0 0 24px rgba(0, 210, 255, 0.35), 0 0 48px rgba(100, 200, 230, 0.2);
  }
  100% {
    background-position: 100% 50%;
    text-shadow: 0 0 36px rgba(180, 200, 255, 0.45), 0 0 64px rgba(0, 220, 255, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__brand {
    background-size: 100% auto;
  }
}

@supports not (background-clip: text) {
  .hero__brand {
    background: none;
    color: var(--accent-hover);
    -webkit-text-fill-color: var(--accent-hover);
    text-shadow: none;
  }
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
}

.hero__title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 0;
  max-width: 42rem;
  font-size: 1.0625rem;
  color: var(--text-secondary);
}

.intro {
  padding: var(--space-lg) 0 var(--space-2xl);
  border-top: 1px solid var(--border-subtle);
}

.intro__prose {
  max-width: 48rem;
}

.intro__prose > p:first-of-type {
  margin-top: 0;
}

.intro__prose p {
  color: var(--text-secondary);
}

.intro__prose strong {
  color: var(--text-primary);
}

.section-title {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Homepage — maps portal: single “stage” card (unified with grid + foot) */
.portal {
  padding: var(--space-lg) 0 var(--space-2xl);
}

.portal-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 200, 255, 0.42);
  background: linear-gradient(
    165deg,
    rgba(0, 210, 255, 0.14) 0%,
    rgba(0, 58, 78, 0.62) 36%,
    rgba(0, 14, 24, 0.98) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 14px 44px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(0, 0, 0, 0.32),
    0 0 72px -20px rgba(0, 200, 255, 0.42);
}

.portal-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background:
    radial-gradient(ellipse 110% 85% at 50% -25%, rgba(0, 235, 255, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 100% 105%, rgba(0, 120, 180, 0.2) 0%, transparent 52%);
}

.portal-stage__top,
.portal-stage__maps,
.portal-stage__foot {
  position: relative;
  z-index: 1;
  padding-left: clamp(var(--space-md), 3vw, var(--space-xl));
  padding-right: clamp(var(--space-md), 3vw, var(--space-xl));
  max-width: 100%;
}

.portal-stage__top {
  padding-top: clamp(var(--space-lg), 4vw, var(--space-xl));
  padding-bottom: var(--space-md);
}

.portal-stage__title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--accent-hover);
  text-shadow:
    0 0 36px var(--accent-glow),
    0 0 64px rgba(0, 210, 255, 0.25),
    0 1px 0 rgba(0, 0, 0, 0.45);
}

.portal-stage__body {
  margin: 0 auto;
  max-width: 48rem;
}

.portal-stage__body > p:first-of-type {
  margin-top: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.62;
  color: rgba(240, 248, 252, 0.95);
}

.portal-stage__body p {
  margin: 0 0 var(--space-md);
  color: rgba(220, 235, 242, 0.9);
}

.portal-stage__body p:last-child {
  margin-bottom: 0;
}

.portal-stage__maps {
  margin-top: 0;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-top: 1px solid rgba(0, 180, 255, 0.28);
  background: rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.portal-stage__foot {
  padding-top: var(--space-md);
  padding-bottom: clamp(var(--space-lg), 3vw, var(--space-xl));
  border-top: 1px solid rgba(0, 180, 255, 0.22);
}

.portal-stage__foot p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(200, 225, 235, 0.88);
}

.portal-stage__body strong,
.portal-stage__foot strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

/* Map tiles sit on a darker inset — nudge cards toward the cyan accent */
.portal-stage .portal-card {
  border-color: rgba(0, 160, 220, 0.28);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(0, 30, 45, 0.5);
}

.portal-stage .portal-card:hover {
  border-color: rgba(0, 220, 255, 0.5);
  box-shadow:
    var(--shadow-card),
    0 0 24px rgba(0, 200, 255, 0.18);
}

.portal-nav {
  margin: 0;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-grid > li {
  margin: 0;
  padding: 0;
}

@media (min-width: 480px) {
  .portal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .portal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.portal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 5.5rem;
  padding: var(--space-md);
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

/* Image-only map tiles: static/images/maps/pc_<slug>.png */
.portal-card--map {
  position: relative;
  display: block;
  min-height: unset;
  padding: 0;
  overflow: hidden;
  background: var(--bg-card);
}

.portal-card__vip-badge {
  position: absolute;
  right: var(--space-xs);
  bottom: var(--space-xs);
  width: clamp(2.625rem, 18%, 3.75rem);
  height: auto;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

.portal-card--map:focus {
  outline: none;
}

.portal-card--map:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.portal-card__img {
  display: block;
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .portal-card {
    transition: none;
  }
}

.portal-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
}

.portal-card:not(.portal-card--map):hover {
  background: var(--bg-card-hover);
}

.portal-card__label {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.portal-card__meta {
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Homepage — author card (teal + cyan glow, map-selection family) */
.home-author {
  margin-top: var(--space-md);
  padding-bottom: var(--space-2xl);
}

/* Full /about/ page — same card, standalone spacing (no 42rem page-shell column) */
.home-author--page {
  margin-top: 0;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-3xl);
}

.home-author__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  border: 1px solid rgba(0, 180, 255, 0.38);
  background: linear-gradient(
    145deg,
    rgba(0, 180, 255, 0.14) 0%,
    rgba(0, 55, 70, 0.82) 42%,
    rgba(0, 18, 28, 0.96) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 36px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 0 52px -14px var(--accent-glow);
}

.home-author__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background: radial-gradient(ellipse 88% 72% at 12% 0%, rgba(255, 255, 255, 0.16) 0%, transparent 58%);
}

.home-author__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.home-author__avatar {
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
  border: 2px solid rgba(0, 180, 255, 0.55);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(0, 180, 255, 0.4);
}

.home-author__head-text {
  min-width: 0;
}

.home-author__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--accent-hover);
  text-shadow:
    0 0 28px var(--accent-glow),
    0 1px 0 rgba(0, 0, 0, 0.35);
}

.home-author__tagline {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--game-label);
  letter-spacing: 0.02em;
}

.home-author__prose {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.home-author__prose p {
  margin: 0 0 var(--space-md);
}

.home-author__prose p:last-of-type {
  margin-bottom: 0;
}

.home-author__prose ul {
  margin: 0 0 var(--space-md);
  padding-left: 1.35rem;
}

.home-author__prose li {
  margin-bottom: var(--space-xs);
}

.home-author__more {
  position: relative;
  z-index: 1;
  margin: var(--space-lg) 0 0;
}

.home-author__more-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.home-author__more-link:hover {
  color: var(--accent-hover);
}

.home-author__more-link:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

.home-author__links-heading {
  position: relative;
  z-index: 1;
  margin: var(--space-xl) 0 var(--space-md);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.home-author__link-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.home-author__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-author__link--discord {
  background: #5865f2;
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.5);
}

.home-author__link--discord:hover {
  box-shadow: 0 6px 28px rgba(88, 101, 242, 0.6);
}

.home-author__link--kofi {
  background: #ff5e5b;
  box-shadow: 0 4px 20px rgba(255, 94, 91, 0.45);
}

.home-author__link--kofi:hover {
  box-shadow: 0 6px 28px rgba(255, 94, 91, 0.55);
}

.home-author__link:hover {
  transform: translateY(-2px);
}

.home-author__link:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .home-author__link {
    transition: none;
  }

  .home-author__link:hover {
    transform: none;
  }
}

/* 404 — aligned with wiki teal / cyan theme */
.error-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 36rem);
  padding: var(--space-2xl) var(--space-md) var(--space-3xl);
}

.error-404__card {
  width: min(36rem, 100%);
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-border-soft);
  background: linear-gradient(
    155deg,
    rgba(0, 180, 255, 0.1) 0%,
    rgba(0, 50, 65, 0.75) 45%,
    rgba(0, 18, 28, 0.92) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 56px -20px var(--accent-glow);
}

.error-404__img {
  display: block;
  width: min(26rem, 100%);
  height: auto;
  margin: 0 auto var(--space-lg);
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.55));
}

.error-404__title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--accent-hover);
  text-shadow:
    0 0 28px var(--accent-glow),
    0 1px 0 rgba(0, 0, 0, 0.4);
}

.error-404__lead {
  margin: 0 0 var(--space-lg);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.error-404__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 var(--space-xl);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--game-teal-footer);
  background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
  border: 1px solid rgba(0, 200, 255, 0.55);
  box-shadow:
    0 4px 20px rgba(0, 180, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.error-404__btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 28px rgba(0, 180, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.error-404__btn:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .error-404__btn {
    transition: none;
  }

  .error-404__btn:hover {
    transform: none;
  }
}

.site-footer {
  margin-top: auto;
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-md);
  line-height: 1.5;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-nav__sep {
  color: var(--text-muted);
  user-select: none;
}

.footer-note {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  background-color: transparent;
  background-image: var(--brand-gradient);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 16px rgba(0, 210, 255, 0.35), 0 0 28px rgba(100, 200, 255, 0.2);
}

.footer-note__meta {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-muted);
}

@supports not (background-clip: text) {
  .footer-brand {
    background: none;
    color: var(--accent-hover);
    -webkit-text-fill-color: var(--accent-hover);
    text-shadow: none;
  }
}

/* Pages légales / texte long */
.page-shell {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-3xl);
  max-width: 42rem;
}

/* Full database — table + filters (matches site cards / accents) */
.database-page {
  padding-bottom: var(--space-3xl);
}

.database-page .hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Filtres + tableau : pleine largeur de la colonne (aligné avec la home, pas de bloc centré) */
.database-layout {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.database-page .intro__prose > p:first-of-type {
  margin-top: 0;
}

.database-page .intro__prose p {
  margin: 0 0 var(--space-md);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.database-page .intro__prose p:last-child {
  margin-bottom: 0;
}

.database-filters {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border-soft);
  background: var(--map-hero-panel-bg);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.database-filters__search {
  margin-bottom: var(--space-md);
}

.database-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.database-input {
  width: 100%;
  max-width: 28rem;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
}

.database-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.database-filters__grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 700px) {
  .database-filters__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .database-filters__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.database-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.database-fieldset--maps {
  grid-column: 1 / -1;
}

.database-legend {
  padding: 0;
  margin: 0 0 var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.database-checkboxes,
.database-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.database-checkboxes--wrap {
  gap: 0.4rem;
}

.database-chip,
.database-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.database-chip input,
.database-radio input {
  accent-color: var(--accent);
}

.database-filters__actions {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}

.database-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border-soft);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.database-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
}

.database-load-more-wrap {
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
}

.database-btn--load-more {
  min-width: 12rem;
  background: var(--accent-dim);
}

.database-btn--load-more:hover:not(:disabled) {
  background: var(--accent-border-soft);
  border-color: var(--accent);
}

.database-btn--load-more:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.database-result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
}

.database-filter-count-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border-soft);
  background: rgba(39, 203, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.database-filter-count-num {
  font-family: var(--font-display, inherit);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.database-filter-count-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: lowercase;
}

.database-count {
  margin: 0 0 var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.database-count--detail {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
}

.database-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.database-table {
  width: 100%;
  min-width: 56rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.database-table thead {
  background: rgba(0, 0, 0, 0.25);
}

.database-table th {
  padding: 0.65rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.database-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-secondary);
}

.database-table tbody tr:hover {
  background: rgba(39, 203, 255, 0.06);
}

.database-td--name {
  min-width: 12rem;
}

.database-td--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.database-td--moment,
.database-td--seasons {
  text-align: center;
}

.database-td--empty,
.database-td--error {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-muted);
}

.database-name-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

.database-name-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.database-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
  flex-shrink: 0;
  background: #7be2f0;
}

.database-muted {
  color: var(--text-muted);
}

.database-rarity {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.database-rarity--common {
  background: rgba(185, 185, 185, 0.15);
  color: var(--rarity-common-line, #b9b9b9);
}

.database-rarity--rare {
  background: rgba(234, 88, 12, 0.15);
  color: #fb923c;
}

.database-rarity--epic {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.database-rarity--monster {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.database-moment-row {
  display: inline-flex;
  gap: 0.35rem;
  justify-content: center;
}

.database-moment {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.database-season-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  width: fit-content;
  margin: 0 auto;
}

.database-season-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
}

.database-season-dot--in {
  background: var(--accent);
  border-color: var(--accent);
}

.database-season-dot--out {
  background: rgba(244, 67, 54, 0.45);
  border-color: rgba(244, 67, 54, 0.5);
}

.database-season-dot--current {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.page-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-prose {
  color: var(--text-secondary);
}

.page-prose h2 {
  margin: var(--space-xl) 0 var(--space-md);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-prose h3 {
  margin: var(--space-lg) 0 var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.page-prose p,
.page-prose ul,
.page-prose ol {
  margin: 0 0 var(--space-md);
}

.page-prose ul,
.page-prose ol {
  padding-left: 1.25rem;
}

.page-prose li {
  margin-bottom: var(--space-sm);
}

.page-prose strong {
  color: var(--text-primary);
}

.page-prose a {
  word-break: break-word;
}

/* Maps — list + single */
.breadcrumb {
  margin: 0 0 var(--space-lg);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumb__sep {
  margin: 0 var(--space-sm);
  color: var(--text-muted);
}

.breadcrumb__segment {
  color: var(--text-secondary);
}

.breadcrumb__current {
  color: var(--text-primary);
}

.map-list-page__header {
  margin-bottom: var(--space-xl);
}

.map-list-page__title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.map-list-page__lead {
  margin: 0;
  color: var(--text-secondary);
  max-width: 40rem;
}

.map-list-prose {
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
  max-width: 42rem;
}

.map-list-prose p {
  margin: 0 0 var(--space-md);
}

.map-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .map-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.map-list-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 4.5rem;
  padding: var(--space-md);
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.map-list-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-glow);
}

.map-list-card__title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.map-list-card__meta {
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.map-page {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-3xl);
}

.map-page__header {
  margin-bottom: var(--space-lg);
}

.map-page__title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.map-page__description {
  margin: 0;
  color: var(--text-secondary);
  max-width: 48rem;
}

/* Map category pages — H1 + lead use same palette as active tab (see .map-page--* + .map-cat-nav) */
.map-page--fish .map-page__header,
.map-page--creatures .map-page__header,
.map-page--items .map-page__header,
.map-page--monster .map-page__header {
  position: relative;
  padding: var(--space-lg) var(--space-lg);
  margin-bottom: var(--space-xl);
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
}

.map-page--fish .map-page__header::before,
.map-page--creatures .map-page__header::before,
.map-page--items .map-page__header::before,
.map-page--monster .map-page__header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 85% 70% at 18% 12%, rgba(255, 255, 255, 0.14) 0%, transparent 52%);
}

.map-page--fish .map-page__header {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(0, 165, 210, 0.26) 0%, rgba(0, 44, 58, 0.78) 48%, rgba(0, 18, 26, 0.55) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 12px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 72px -28px var(--map-tab-glow);
}

.map-page--creatures .map-page__header {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(109, 76, 204, 0.28) 0%, rgba(0, 40, 54, 0.8) 48%, rgba(0, 18, 28, 0.55) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 72px -28px var(--map-tab-glow);
}

.map-page--items .map-page__header {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(200, 130, 25, 0.26) 0%, rgba(0, 44, 52, 0.78) 48%, rgba(0, 22, 28, 0.55) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 72px -28px var(--map-tab-glow);
}

.map-page--monster .map-page__header {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(185, 55, 55, 0.3) 0%, rgba(0, 35, 40, 0.82) 48%, rgba(0, 18, 22, 0.58) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 44px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 0 72px -28px var(--map-tab-glow);
}

.map-page--fish .map-page__title,
.map-page--creatures .map-page__title,
.map-page--items .map-page__title,
.map-page--monster .map-page__title {
  position: relative;
  z-index: 1;
  margin: 0 0 var(--space-md);
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.map-page__title-map {
  color: rgba(244, 250, 240, 0.96);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 0 40px rgba(255, 255, 255, 0.06);
}

.map-page__title-sep {
  color: rgba(160, 192, 200, 0.55);
  font-weight: 600;
  text-shadow: none;
}

.map-page__title-guide {
  position: relative;
  z-index: 1;
  color: rgba(200, 228, 238, 0.92);
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0.03em;
}

.map-page--fish .map-page__title-cat,
.map-page--creatures .map-page__title-cat,
.map-page--items .map-page__title-cat,
.map-page--monster .map-page__title-cat {
  color: var(--map-tab);
  text-shadow:
    0 0 26px var(--map-tab-glow),
    0 0 52px var(--map-tab-glow),
    0 1px 0 rgba(0, 0, 0, 0.38);
  filter: drop-shadow(0 0 10px var(--map-tab-glow));
}

.map-page--fish .map-page__description,
.map-page--creatures .map-page__description,
.map-page--items .map-page__description,
.map-page--monster .map-page__description {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 42rem;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: 0.015em;
}

.map-page--fish .map-page__description {
  color: #a8e4f5;
  text-shadow: 0 0 28px rgba(0, 200, 255, 0.15);
}

.map-page--creatures .map-page__description {
  color: #d8cfff;
  text-shadow: 0 0 28px rgba(167, 139, 250, 0.14);
}

.map-page--items .map-page__description {
  color: #fde9a8;
  text-shadow: 0 0 26px rgba(251, 191, 36, 0.12);
}

.map-page--monster .map-page__description {
  color: #fecaca;
  text-shadow: 0 0 20px rgba(248, 113, 113, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .map-page--fish .map-page__title-cat,
  .map-page--creatures .map-page__title-cat,
  .map-page--items .map-page__title-cat,
  .map-page--monster .map-page__title-cat {
    filter: none;
  }
}

.map-page__map-section {
  margin: 0;
}

.map-page__intro {
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
}

.map-page__intro p {
  margin: 0 0 var(--space-md);
}

.map-page__intro strong {
  color: var(--text-primary);
}

/* Show map only — editorial stays in the DOM (SEO); visually collapsed via display */
.map-page--editorial-compact .map-editorial--intro,
.map-page--editorial-compact .map-editorial-below {
  display: none !important;
}

.map-editorial-view-toggle-wrap {
  margin: 0 0 var(--space-lg);
  max-width: 48rem;
}

.map-editorial-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.map-page--fish .map-editorial-view-toggle,
.map-page--creatures .map-editorial-view-toggle,
.map-page--items .map-editorial-view-toggle,
.map-page--monster .map-editorial-view-toggle {
  border-color: var(--map-tab-edge);
  color: var(--map-tab);
  background: linear-gradient(152deg, rgba(0, 50, 70, 0.55) 0%, rgba(0, 24, 36, 0.85) 100%);
  box-shadow: inset 0 1px 0 rgba(0, 200, 255, 0.12);
}

.map-editorial-view-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-glow);
}

.map-page--fish .map-editorial-view-toggle:hover,
.map-page--creatures .map-editorial-view-toggle:hover,
.map-page--items .map-editorial-view-toggle:hover,
.map-page--monster .map-editorial-view-toggle:hover {
  color: var(--text-primary);
  border-color: var(--map-tab);
}

.map-editorial-view-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-editorial-view-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 200, 255, 0.25);
}

/* Editorial article: data/<slug>/<category>/article.json (intro above map, blocks below) */
.map-editorial {
  color: var(--text-secondary);
}

.map-editorial--intro {
  margin-bottom: var(--space-xl);
  max-width: 48rem;
}

.map-editorial--intro .map-editorial__body--intro p {
  margin: 0 0 var(--space-md);
}

.map-editorial--intro .map-editorial__body--intro p:last-child {
  margin-bottom: 0;
}

/* Section heading above “below-map” editorial blocks (notable picks) */
.map-editorial-below {
  margin-top: var(--space-xl);
  max-width: min(100%, 48rem);
}

.map-editorial-below__title {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2.3vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--text-primary);
}

.map-page--fish .map-editorial-below__title,
.map-page--creatures .map-editorial-below__title,
.map-page--items .map-editorial-below__title,
.map-page--monster .map-editorial-below__title {
  color: var(--map-tab);
  text-shadow: 0 0 20px var(--map-tab-glow);
}

.map-editorial-below .map-editorial--block:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Monster article.json — blocks grouped by "day"; palette cycles p0–p5 (mod 6) */
.map-editorial-day {
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  border-radius: 16px;
  border-width: 1px;
  border-style: solid;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 36px rgba(0, 0, 0, 0.38);
}

.map-editorial-below__title + .map-editorial-day {
  margin-top: var(--space-md);
}

.map-editorial-day__label {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-editorial-day__blocks .map-editorial--block:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.map-editorial-day .map-editorial--block + .map-editorial--block {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.map-editorial-day--p0 {
  border-color: rgba(0, 200, 255, 0.38);
  background: linear-gradient(165deg, rgba(0, 130, 170, 0.28) 0%, rgba(0, 36, 48, 0.72) 100%);
}

.map-editorial-day--p0 .map-editorial-day__label {
  color: #7dd3fc;
  text-shadow: 0 0 22px rgba(0, 200, 255, 0.3);
}

.map-editorial-day--p1 {
  border-color: rgba(167, 139, 250, 0.4);
  background: linear-gradient(165deg, rgba(91, 58, 180, 0.26) 0%, rgba(0, 32, 44, 0.72) 100%);
}

.map-editorial-day--p1 .map-editorial-day__label {
  color: #c4b5fd;
  text-shadow: 0 0 22px rgba(167, 139, 250, 0.28);
}

.map-editorial-day--p2 {
  border-color: rgba(251, 191, 36, 0.38);
  background: linear-gradient(165deg, rgba(180, 110, 20, 0.24) 0%, rgba(0, 38, 46, 0.72) 100%);
}

.map-editorial-day--p2 .map-editorial-day__label {
  color: #fde68a;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.22);
}

.map-editorial-day--p3 {
  border-color: rgba(52, 211, 153, 0.38);
  background: linear-gradient(165deg, rgba(16, 120, 90, 0.26) 0%, rgba(0, 34, 40, 0.72) 100%);
}

.map-editorial-day--p3 .map-editorial-day__label {
  color: #6ee7b7;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.22);
}

.map-editorial-day--p4 {
  border-color: rgba(251, 113, 133, 0.4);
  background: linear-gradient(165deg, rgba(180, 60, 75, 0.22) 0%, rgba(0, 30, 36, 0.74) 100%);
}

.map-editorial-day--p4 .map-editorial-day__label {
  color: #fda4af;
  text-shadow: 0 0 20px rgba(251, 113, 133, 0.22);
}

.map-editorial-day--p5 {
  border-color: rgba(56, 189, 248, 0.38);
  background: linear-gradient(165deg, rgba(30, 100, 150, 0.24) 0%, rgba(0, 32, 42, 0.72) 100%);
}

.map-editorial-day--p5 .map-editorial-day__label {
  color: #7dd3fc;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.map-editorial--block {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.map-editorial__block-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  max-width: min(100%, 48rem);
}

.map-editorial__focus {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.map-editorial__focus:hover {
  border-color: var(--accent-glow);
  box-shadow: var(--shadow-card);
  background: var(--bg-card-hover);
}

.map-editorial__focus:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}

.map-editorial__portrait-static {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.map-editorial__portrait {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  line-height: 0;
}

.map-editorial__portrait-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-editorial__copy {
  min-width: 0;
  flex: 1;
}

.map-editorial__heading {
  margin: 0 0 var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.map-editorial__body p {
  margin: 0 0 var(--space-md);
}

.map-editorial__body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 899px) {
  .map-editorial__block-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .map-editorial__focus {
    align-self: flex-start;
  }

  .map-editorial__portrait-static {
    align-self: flex-start;
  }
}

.map-missing {
  color: var(--text-secondary);
}

.map-layout {
  display: grid;
  gap: var(--space-xl);
  position: relative;
}

@media (max-width: 899px) {
  .map-layout {
    display: block;
  }
}

@media (min-width: 900px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 24rem);
    grid-template-rows: 1fr;
    align-items: start;
  }

  .map-layout__main {
    grid-column: 1;
    grid-row: 1;
    max-width: min(100%, 41rem);
    justify-self: start;
    width: 100%;
    min-width: 0;
  }

  /* Hero is position:fixed full-width; does not consume a grid cell */
  .map-layout__hero {
    grid-column: unset;
    grid-row: unset;
  }

  .map-sidebar {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
}

/* —— Mobile: sidebar as left drawer + FAB —— */
.map-sidebar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.map-sidebar__head .map-sidebar__heading {
  margin: 0;
}

.map-drawer__close {
  display: none;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.25rem -0.25rem 0 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.map-drawer__close:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-glow);
}

.map-drawer__close-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto;
}

.map-drawer__close-icon::before,
.map-drawer__close-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.map-drawer__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.map-drawer__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.map-drawer-backdrop {
  display: none;
}

.map-drawer__open {
  display: none;
}

/* Mobile-only: full-width “Open list” below .map-stage (outside teal map card); replaces floating FAB */
.map-page__drawer-trigger-wrap {
  display: none;
}

@media (max-width: 899px) {
  .map-page__drawer-trigger-wrap {
    display: block;
    width: 100%;
    margin-top: var(--space-md);
    margin-bottom: 0;
    box-sizing: border-box;
  }

  .map-drawer__close {
    display: inline-flex;
  }

  .map-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .map-layout--drawer-open .map-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .map-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    width: min(20rem, 92vw);
    max-height: 100vh;
    margin: 0;
    padding: var(--space-lg) var(--space-md);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-subtle);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .map-layout--drawer-open .map-sidebar {
    transform: translateX(0);
  }

  .map-page__drawer-trigger-wrap .map-drawer__open {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent-primary, #0ce467);
    background: rgba(12, 228, 103, 0.12);
    border: 1px solid rgba(12, 228, 103, 0.4);
    border-radius: var(--radius-sm);
    box-shadow: none;
    cursor: pointer;
    transition:
      background 0.12s ease,
      border-color 0.12s ease,
      opacity 0.18s ease;
  }

  .map-page__drawer-trigger-wrap .map-drawer__open:hover {
    background: rgba(12, 228, 103, 0.2);
    border-color: var(--accent-glow);
  }

  .map-page__drawer-trigger-wrap .map-drawer__open:active {
    opacity: 0.92;
  }

  .map-layout--drawer-open .map-page__drawer-trigger-wrap .map-drawer__open {
    opacity: 0;
    pointer-events: none;
  }

  body.map-drawer-open {
    overflow: hidden;
  }
}

@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  .map-sidebar,
  .map-drawer-backdrop,
  .map-page__drawer-trigger-wrap .map-drawer__open {
    transition: none;
  }
}

@media (min-width: 900px) {
  .map-drawer__close {
    display: none;
  }

  .map-sidebar__head {
    display: block;
    margin-bottom: 0;
  }

  .map-sidebar__heading {
    margin: 0 0 var(--space-md);
  }
}

.map-redirect-msg {
  margin: var(--space-lg) 0;
  color: var(--text-muted);
}

/* Map + selection label — same shell as .map-hero__panel (teal card) */
.map-stage {
  width: 100%;
  max-width: min(100%, 90vmin);
  margin: 0 auto;
  padding: var(--space-md);
  box-sizing: border-box;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border-soft);
  background: var(--map-hero-panel-bg);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.map-canvas-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 900px) {
  .map-stage {
    max-width: min(100%, 34rem);
    margin: var(--space-lg) auto;
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }
}

.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-elevated);
}

.map-stage .map-canvas {
  border: none;
  border-radius: var(--radius-sm);
}

.map-stage__cta {
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
}

.map-stage__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border-soft);
  background: var(--accent-dim);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.map-stage__cta-btn:hover:not(:disabled) {
  background: var(--accent-border-soft);
  border-color: var(--accent);
}

.map-stage__cta-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-stage__cta-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.map-canvas__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: middle;
}

/* Raster map art (e.g. Paradise.jpg) — same idea as Vue v-img cover + square map */
.map-canvas__img--photo {
  object-fit: cover;
  object-position: center center;
}

.map-canvas__markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Pins are decorative; selection is via list / URL + “View details” CTA */
/* Same as cloversalad2 .position: top=data x%, left=data y%; center marker on that point */
.map-marker {
  position: absolute;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, filter 0.12s ease;
  line-height: 0;
}

/* Round portrait thumbnails — ring color follows entity rarity */
.map-marker__thumb {
  position: relative;
  z-index: 1;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.55);
  border: 3px solid var(--rarity-common-border);
  background: #7be2f0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.map-marker__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-marker--rarity-common .map-marker__thumb {
  border-color: var(--rarity-common-border);
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.2), 0 0 14px rgba(0, 0, 0, 0.5);
}

.map-marker--rarity-rare .map-marker__thumb {
  border-color: var(--rarity-rare-border);
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.45), 0 0 16px rgba(251, 191, 36, 0.2), 0 0 14px rgba(0, 0, 0, 0.5);
}

.map-marker--rarity-epic .map-marker__thumb {
  border-color: var(--rarity-epic-border);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5), 0 0 14px rgba(0, 0, 0, 0.5);
}

.map-marker--rarity-monster .map-marker__thumb {
  border-color: var(--rarity-monster-border);
  width: 44px;
  height: 44px;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.55), 0 0 14px rgba(0, 0, 0, 0.5);
}

.map-marker--active {
  z-index: 2;
  transform: translate(-50%, -50%) scale(1.14);
}

.map-marker--active .map-marker__thumb {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 0 3px rgba(255, 255, 255, 0.9))
    drop-shadow(0 0 0 5px var(--accent));
}

/* Map monster rotation: other possible spots (not today’s) — shown only after secret triple-tap */
.map-marker--rotation-dim {
  opacity: 0.3;
  z-index: 1;
}

.map-item-link--active.map-item-link--rarity-common {
  border-color: var(--rarity-common-line);
  background: var(--rarity-common-bg-hover);
  box-shadow: inset 0px 0 0 0 var(--rarity-common-border);
}

.map-item-link--active.map-item-link--rarity-rare {
  border-color: var(--rarity-rare-line);
  background: var(--rarity-rare-bg-hover);
  box-shadow: inset 0px 0 0 0 var(--rarity-rare-border);
}

.map-item-link--active.map-item-link--rarity-epic {
  border-color: var(--rarity-epic-line);
  background: var(--rarity-epic-bg-hover);
  box-shadow: inset 0px 0 0 0 var(--rarity-epic-border);
}

.map-item-link--active.map-item-link--rarity-monster {
  border-color: var(--rarity-monster-line);
  background: var(--rarity-monster-bg-hover);
  box-shadow: inset 0px 0 0 0 var(--rarity-monster-border);
}

.map-canvas__hint {
  margin: var(--space-sm) 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Selected entity name above map — palette matches active category tab (.map-page--*) */
.map-selection {
  width: 100%;
  max-width: none;
  margin: 0 0 var(--space-md);
  padding: var(--space-md) var(--space-lg);
  box-sizing: border-box;
  border-radius: 14px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.map-selection[hidden] {
  display: none !important;
}

.map-page--fish .map-selection {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(0, 165, 210, 0.2) 0%, rgba(0, 42, 54, 0.68) 50%, rgba(0, 18, 26, 0.48) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 28px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 44px -14px var(--map-tab-glow);
}

.map-page--creatures .map-selection {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(109, 76, 204, 0.2) 0%, rgba(0, 38, 50, 0.72) 50%, rgba(0, 16, 24, 0.48) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 8px 28px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 44px -14px var(--map-tab-glow);
}

.map-page--items .map-selection {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(200, 130, 25, 0.18) 0%, rgba(0, 42, 50, 0.68) 50%, rgba(0, 20, 26, 0.48) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 8px 28px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 44px -14px var(--map-tab-glow);
}

.map-page--monster .map-selection {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(185, 55, 55, 0.2) 0%, rgba(0, 34, 40, 0.74) 50%, rgba(0, 14, 18, 0.5) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 44px -14px var(--map-tab-glow);
}

.map-page--fish .map-selection::before,
.map-page--creatures .map-selection::before,
.map-page--items .map-selection::before,
.map-page--monster .map-selection::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 85% 70% at 18% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
}

.map-selection__name {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: clamp(1.35rem, 4.5vw, 1.875rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-align: center;
}

.map-page--fish .map-selection__name,
.map-page--creatures .map-selection__name,
.map-page--items .map-selection__name,
.map-page--monster .map-selection__name {
  color: var(--map-tab);
  text-shadow:
    0 0 26px var(--map-tab-glow),
    0 0 48px var(--map-tab-glow),
    0 1px 0 rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 0 8px var(--map-tab-glow));
}

@media (prefers-reduced-motion: reduce) {
  .map-page--fish .map-selection__name,
  .map-page--creatures .map-selection__name,
  .map-page--items .map-selection__name,
  .map-page--monster .map-selection__name {
    filter: none;
  }
}

/* map-hero-mobile.html vs map-hero-desktop.html — only one visible per breakpoint */
@media (max-width: 899px) {
  .map-hero--viewport-desktop {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .map-hero--viewport-mobile {
    display: none !important;
  }
}

.map-hero {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 var(--space-md) env(safe-area-inset-bottom, 0);
  box-sizing: border-box;
  visibility: hidden;
  pointer-events: none;
}

.map-hero.map-hero--open {
  visibility: visible;
  pointer-events: auto;
}

.map-hero__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  max-height: min(85vh, 100%);
  padding: var(--space-md) var(--space-md) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  background: var(--map-hero-panel-bg);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
  transform: translate3d(0, 100%, 0);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.map-hero.map-hero--open .map-hero__panel {
  transform: translate3d(0, 0, 0);
}

/* Editorial contextual sheet (spot summary only; above main map hero) */
.map-editorial-spot-popup.map-hero {
  z-index: 95;
}

.map-editorial-spot-popup__body {
  padding-top: 0.125rem;
  --map-editorial-spot-column-max: min(100%, 20rem);
}

.map-editorial-spot-popup__title {
  margin: 0 0 var(--space-sm);
}

/* Title card: same language as .map-selection / .map-selection__name — slightly smaller (desktop + mobile) */
.map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
.map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title {
  padding: var(--space-sm) var(--space-md);
  box-sizing: border-box;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  font-size: clamp(1.05rem, 3.2vw, 1.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-align: center;
}

.map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title,
.map-editorial-spot-popup.map-hero--viewport-desktop .map-editorial-spot-popup__title {
  width: 100%;
  max-width: var(--map-editorial-spot-column-max);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-md);
}

.map-page--fish .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
.map-page--fish .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(0, 165, 210, 0.2) 0%, rgba(0, 42, 54, 0.68) 50%, rgba(0, 18, 26, 0.48) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 22px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 36px -12px var(--map-tab-glow);
  color: var(--map-tab);
  text-shadow:
    0 0 22px var(--map-tab-glow),
    0 0 40px var(--map-tab-glow),
    0 1px 0 rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 0 6px var(--map-tab-glow));
}

.map-page--creatures .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
.map-page--creatures .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(109, 76, 204, 0.2) 0%, rgba(0, 38, 50, 0.72) 50%, rgba(0, 16, 24, 0.48) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 6px 22px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 36px -12px var(--map-tab-glow);
  color: var(--map-tab);
  text-shadow:
    0 0 22px var(--map-tab-glow),
    0 0 40px var(--map-tab-glow),
    0 1px 0 rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 0 6px var(--map-tab-glow));
}

.map-page--items .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
.map-page--items .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(200, 130, 25, 0.18) 0%, rgba(0, 42, 50, 0.68) 50%, rgba(0, 20, 26, 0.48) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 6px 22px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 36px -12px var(--map-tab-glow);
  color: var(--map-tab);
  text-shadow:
    0 0 22px var(--map-tab-glow),
    0 0 40px var(--map-tab-glow),
    0 1px 0 rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 0 6px var(--map-tab-glow));
}

.map-page--monster .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
.map-page--monster .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title {
  border: 1px solid var(--map-tab-edge);
  background: linear-gradient(142deg, rgba(185, 55, 55, 0.2) 0%, rgba(0, 34, 40, 0.74) 50%, rgba(0, 14, 18, 0.5) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 22px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 36px -12px var(--map-tab-glow);
  color: var(--map-tab);
  text-shadow:
    0 0 22px var(--map-tab-glow),
    0 0 40px var(--map-tab-glow),
    0 1px 0 rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 0 6px var(--map-tab-glow));
}

.map-page--fish .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title::before,
.map-page--fish .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title::before,
.map-page--creatures .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title::before,
.map-page--creatures .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title::before,
.map-page--items .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title::before,
.map-page--items .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title::before,
.map-page--monster .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title::before,
.map-page--monster .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 85% 70% at 18% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
}

@media (prefers-reduced-motion: reduce) {
  .map-page--fish .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
  .map-page--fish .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title,
  .map-page--creatures .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
  .map-page--creatures .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title,
  .map-page--items .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
  .map-page--items .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title,
  .map-page--monster .map-editorial-spot-popup .map-hero__title--desktop.map-editorial-spot-popup__title,
  .map-page--monster .map-editorial-spot-popup.map-hero--viewport-mobile .map-editorial-spot-popup__title {
    filter: none;
  }
}

.map-editorial-spot-popup__mini-wrap {
  margin: 0 auto var(--space-sm);
  width: 100%;
  max-width: var(--map-editorial-spot-column-max);
}

.map-editorial-spot-popup__mini-wrap[hidden] {
  display: none !important;
}

.map-editorial-spot-popup__canvas.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-elevated);
}

.map-editorial-spot-popup__markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-editorial-spot-popup__markers .map-marker__thumb {
  width: 28px;
  height: 28px;
  border-width: 2px;
}

.map-editorial-spot-popup__markers .map-marker--rarity-monster .map-marker__thumb {
  width: 32px;
  height: 32px;
}

.map-editorial-spot-popup__no-coords {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.map-editorial-spot-popup__no-coords[hidden] {
  display: none !important;
}

@media (min-width: 900px) {
  .map-editorial-spot-popup.map-hero--viewport-desktop .map-editorial-spot-popup__panel {
    max-width: min(28rem, 100%);
    margin-left: auto;
    margin-right: auto;
  }
}

.map-hero__panel.map-hero__panel--details {
  border-color: var(--accent-border-soft);
}

.map-hero__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  min-width: 0;
}

.map-hero__col {
  min-width: 0;
}

.map-hero__toprow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  margin: 0 0 var(--space-sm);
  min-height: 1.85rem;
}

.map-hero__toprow[hidden] {
  display: none !important;
}

/* Day/night icons — top-left of panel */
.map-hero__topcell--moment {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  min-width: 0;
}

#map-hero-rarity-row[hidden],
#map-hero-moment-row[hidden],
#map-hero-rarity-row-desktop[hidden],
#map-hero-moment-row-desktop[hidden],
#map-hero-toprow-desktop[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .map-hero__panel {
    transition-duration: 0.01ms;
  }
}

/* Mobile sheet: glass panel + dim (≤899px). Desktop template: see .map-hero--viewport-desktop block. */
@media (max-width: 899px) {
  /* Lift the sheet so the footer tab bar stays clear of browser chrome / gesture areas */
  .map-hero--viewport-mobile.map-hero {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-2xl));
  }

  .map-hero--viewport-mobile.map-hero.map-hero--open {
    background: rgba(0, 0, 0, 0.38);
  }

  .map-hero--viewport-mobile .map-hero__panel {
    background: var(--map-hero-panel-bg-glass);
    border-color: rgba(255, 255, 255, 0.16);
    border-bottom: none;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.08) inset,
      0 -16px 52px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(36px) saturate(175%);
    backdrop-filter: blur(36px) saturate(175%);
  }

  .map-hero--viewport-mobile .map-hero__panel.map-hero__panel--details {
    border-color: rgba(0, 180, 255, 0.42);
    padding-bottom: 0;
  }

  .map-hero--viewport-mobile .map-hero__close {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    backdrop-filter: blur(16px) saturate(130%);
  }
}

@media (max-width: 899px) and (prefers-reduced-transparency: reduce) {
  .map-hero--viewport-mobile.map-hero.map-hero--open {
    background: rgba(0, 0, 0, 0.5);
  }

  .map-hero--viewport-mobile .map-hero__panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--map-hero-panel-bg);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
  }

  .map-hero--viewport-mobile .map-hero__close {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--bg-card);
    border-color: var(--border-subtle);
  }
}

/* Desktop: header row (name + latin | rarity | moment) + 3 cols: portrait+seasons | shadow+minigame | calculator */
@media (min-width: 900px) {
  .map-hero--viewport-desktop.map-hero {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  .map-hero--viewport-desktop.map-hero:not(.map-hero--open) {
    pointer-events: none;
  }

  .map-hero--viewport-desktop.map-hero.map-hero--open {
    background: rgba(0, 0, 0, 0.34);
  }

  .map-hero--viewport-desktop .map-hero__panel {
    width: 100%;
    max-width: none;
    max-height: min(58vh, 44rem);
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: none;
    box-shadow:
      0 -8px 40px rgba(0, 0, 0, 0.4),
      0 1px 0 rgba(255, 255, 255, 0.06) inset;
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    background: var(--map-hero-panel-bg-glass);
  }

  .map-hero--viewport-desktop .map-hero__grid--desktop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--space-md) var(--space-lg);
    align-items: start;
    width: 100%;
    box-sizing: border-box;
  }

  .map-hero__desktop-header {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: var(--space-xs);
  }

  .map-hero__desktop-header-main {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    box-sizing: border-box;
  }

  .map-hero__desktop-name-block {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.2rem;
  }

  .map-hero__title--desktop {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    text-align: left;
    width: 100%;
  }

  .map-hero__rarity-wrap--desktop {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .map-hero__latin--desktop {
    margin: 0;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.35;
    width: 100%;
  }

  .map-hero__desktop-header-main .map-hero__desktop-moment.map-hero__toprow {
    margin: 0;
    min-height: 0;
    flex-shrink: 0;
    width: auto;
    justify-content: flex-end;
  }

  .map-hero__desktop-col--left {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
  }

  .map-hero__visual--desktop {
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--left .map-hero__seasons-row {
    width: 100%;
    max-width: 100%;
  }

  /* Match mobile month cells (see max-width: 899px block): same gap + type scale */
  .map-hero--viewport-desktop .map-hero__seasons-grid {
    gap: 0;
  }

  .map-hero--viewport-desktop .map-hero__season-cell {
    font-size: clamp(0.46rem, 3.2vw, 0.7rem);
    padding: 0.4rem;
  }

  /* Tab shell: middle + right columns participate in main grid */
  .map-hero--viewport-desktop .map-hero__lower--desktop {
    display: contents;
  }

  .map-hero--viewport-desktop .map-hero__lower--desktop .map-hero__tab-panels {
    display: contents;
  }

  .map-hero--viewport-desktop .map-hero__lower--desktop .map-hero__tab-slider-track {
    display: contents;
  }

  .map-hero--viewport-desktop #map-hero-lower-main-desktop {
    grid-column: 2;
    grid-row: 2;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--space-sm);
    min-width: 0;
    min-height: 0;
  }

  .map-hero--viewport-desktop #map-hero-lower-calc-pane-desktop {
    grid-column: 3;
    grid-row: 2;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--space-sm);
    min-width: 0;
  }

  .map-layout--cat-items .map-hero--viewport-desktop #map-hero-lower-calc-pane-desktop {
    display: none !important;
  }

  .map-layout--cat-items .map-hero--viewport-desktop #map-hero-lower-main-desktop {
    grid-column: 2 / span 2;
  }

  .map-hero--viewport-desktop .map-hero__tabbar--desktop-hidden {
    display: none !important;
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--center .map-hero__duo {
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--right .map-hero__weight-line {
    justify-content: flex-start;
    margin: 0;
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--right .map-hero__col--calc {
    flex: 0 0 auto;
    min-width: 0;
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--right .map-hero__calc-inner {
    gap: var(--space-sm);
    padding: 0;
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--right .map-hero__calc-convert {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--right .map-hero__calc-convert-mid {
    display: none;
  }
}

@media (min-width: 900px) and (prefers-reduced-transparency: reduce) {
  .map-hero--viewport-desktop.map-hero.map-hero--open {
    background: rgba(0, 0, 0, 0.45);
  }

  .map-hero--viewport-desktop .map-hero__panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--map-hero-panel-bg);
  }
}

@media (min-width: 1100px) {
  .map-hero--viewport-desktop .map-hero__desktop-col--right .map-hero__col--calc .map-hero__calc-convert {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .map-hero--viewport-desktop .map-hero__desktop-col--right .map-hero__col--calc .map-hero__calc-convert-mid {
    display: flex;
  }
}

.map-hero__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.map-hero__close:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-glow);
}

.map-hero__close-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto;
}

.map-hero__close-icon::before,
.map-hero__close-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.map-hero__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.map-hero__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.map-hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 0 var(--space-sm);
  padding: var(--space-md) var(--space-sm) var(--space-sm);
  min-height: 8.5rem;
}
.map-hero__visual:before{
  content:"";
  display:block;
  position:absolute;
  top:50%;
  left:50%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: rgba(0, 180, 255, 0.45);
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: blur(20px);
}

.map-hero__visual-spotlight {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(72%, 11rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.02) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.map-hero__img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  /* Same inner width as hero text block (panel minus .map-hero__visual horizontal padding) */
  max-width: 100%;
  max-height: var(--map-hero-portrait-max-h);
  object-fit: contain;
  filter: drop-shadow(0 0 0.65rem rgba(0, 0, 0, 0.65));
}

@media (max-width: 899px) {
  .map-hero--viewport-mobile .map-hero__img {
    max-height: min(
      var(--map-hero-portrait-max-h),
      var(--map-hero-portrait-max-h-mobile-vw)
    );
  }
}

@media (min-width: 900px) {
  .map-hero--viewport-desktop .map-hero__visual--desktop {
    margin: 0 0 var(--space-xs);
    padding: var(--space-xs) 0;
    min-height: 6rem;
  }

  .map-hero--viewport-desktop .map-hero__visual--desktop .map-hero__img {
    max-height: var(--map-hero-portrait-max-h-desktop);
  }
}

.map-hero__titleblock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.map-hero__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  line-height: 1.2;
}

.map-hero__latin {
  margin: 0;
  font-size: 0.8125rem;
  font-style: italic;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.35;
}

.map-hero__latin[hidden] {
  display: none !important;
}

.map-hero__rarity-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Items: karma (+1 sold / water) — under bio chip in header (same copy as former Usage karma block) */
.map-hero__item-karma-inline {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-primary);
  text-align: center;
}

.map-hero__item-karma-inline .map-hero__item-usage-line {
  margin: 0 0 0.35rem;
}

.map-hero__item-karma-inline .map-hero__item-usage-line:last-child {
  margin-bottom: 0;
}

.map-hero__item-karma-inline[hidden] {
  display: none !important;
}

@media (min-width: 900px) {
  .map-hero__item-karma-inline--desktop {
    margin-top: var(--space-xs);
    text-align: left;
    display:flex;
    align-items:center;
    flex-direction:column;
  }
}

.map-hero__weight-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.map-hero__col--right {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  gap: var(--space-xs);
}

.map-hero__col--middle {
  padding-bottom: var(--space-xs);
}

/* Mobile hero: infos vs calculator (desktop uses display:contents in ≥900px block) */
@media (max-width: 899px) {
  .map-hero--viewport-mobile .map-hero__lower {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    gap: 0;
  }

  .map-hero--viewport-mobile .map-hero__tab-panels {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    width: 100%;
  }

  .map-hero--viewport-mobile .map-hero__tab-slider-track {
    display: flex;
    width: 200%;
    align-items: stretch;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .map-hero--viewport-mobile .map-hero__tab-slider-track--calc {
    transform: translateX(-50%);
  }

  .map-hero--viewport-mobile .map-hero__tab-pane--icons,
  .map-hero--viewport-mobile .map-hero__tab-pane--calc {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    min-width: 0;
  }

  .map-hero--viewport-mobile .map-hero__tab-pane--icons {
    padding-bottom: var(--space-xs);
  }

  .map-hero--viewport-mobile .map-hero__tabbar {
    display: flex;
    flex-shrink: 0;
    align-items: stretch;
    width: calc(100% + 2 * var(--space-md));
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    margin-top: var(--space-sm);
    border: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
    background: var(--map-hero-tab-footer-idle);
    box-shadow: none;
  }

  .map-hero--viewport-mobile .map-hero__tab-btn {
    position: relative;
    z-index: 0;
    flex: 1;
    margin: 0;
    min-height: 2.875rem;
    padding: 0.9rem 0.5rem;
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--game-label);
    background: var(--map-hero-tab-footer-idle);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition:
      background 0.18s ease,
      color 0.18s ease,
      border-radius 0.18s ease;
  }

  .map-hero--viewport-mobile .map-hero__tab-btn:hover {
    color: var(--text-primary);
  }

  .map-hero--viewport-mobile .map-hero__tab-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    z-index: 2;
  }

  /* Inactive: outer bottom corner only */
  .map-hero--viewport-mobile .map-hero__tab-btn:first-child:not(.map-hero__tab-btn--active) {
    border-bottom-left-radius: var(--radius-md);
  }

  .map-hero--viewport-mobile .map-hero__tab-btn:last-child:not(.map-hero__tab-btn--active) {
    border-bottom-right-radius: var(--radius-md);
  }

  /* Active left (Icons): cyan + large inner top-right “scoop” */
  .map-hero--viewport-mobile .map-hero__tab-btn:first-child.map-hero__tab-btn--active {
    z-index: 1;
    color: var(--map-hero-tab-active-fg);
    background: var(--map-hero-tab-active-bg);
    border-top-right-radius: var(--map-hero-tab-scoop-radius);
    border-bottom-left-radius: var(--radius-md);
  }

  /* Active right (Calculator): cyan + large inner top-left “scoop” */
  .map-hero--viewport-mobile .map-hero__tab-btn:last-child.map-hero__tab-btn--active {
    z-index: 1;
    color: var(--map-hero-tab-active-fg);
    background: var(--map-hero-tab-active-bg);
    border-top-left-radius: var(--map-hero-tab-scoop-radius);
    border-bottom-right-radius: var(--radius-md);
  }

  .map-hero--viewport-mobile .map-hero__tab-btn--active:hover {
    color: var(--map-hero-tab-active-fg);
  }
}

@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  .map-hero--viewport-mobile .map-hero__tab-slider-track {
    transition: none;
  }
}

.map-hero__calc-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-md);
  padding: var(--space-xs) 0 var(--space-sm);
  min-height: 4rem;
}

.map-hero__calc-heading {
  margin: 0;
}

.map-hero__rating {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.08rem;
}

.map-hero__rating-star {
  display: inline-block;
  margin: 0;
  padding: 0.06rem;
  line-height: 1;
  font-size: 1.65rem;
  color: var(--text-muted);
  transition: color 0.12s ease;
}

.map-hero__rating-star.map-hero__rating-star--active {
  color: #f4a522;
}

.map-hero__points-gauge {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
}

/* Bar wraps track + tier: tier % and fill % both match the same full gauge width */
.map-hero__points-gauge-bar {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.map-hero__points-gauge-bar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-hero__points-gauge-bar--dragging {
  cursor: grabbing;
}

.map-hero__points-gauge-track {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.map-hero__points-gauge-tier {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 180, 255, 0.32);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.map-hero__points-gauge--empty .map-hero__points-gauge-tier {
  opacity: 0;
}

/* Fill width (inline %) = position within this rarity’s points range (0–100%); tier is inside .map-hero__points-gauge-bar */
.map-hero__points-gauge-fill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  height: 0.5rem;
  width: 0;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(
    90deg,
    rgba(0, 150, 210, 0.92) 0%,
    var(--accent) 100%
  );
  pointer-events: none;
  transition: width 0.2s ease;
}

/* Six ticks at 0%, 20%, 40%, 60%, 80%, 100% — no labels */
.map-hero__points-gauge-ticks {
  position: relative;
  width: 100%;
  height: 0.35rem;
  margin-top: 0.2rem;
}

.map-hero__points-gauge-mark {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 0.35rem;
  background: var(--text-muted);
  opacity: 0.65;
  border-radius: 1px;
}

.map-hero__points-gauge-mark:nth-child(1) {
  left: 0;
  transform: none;
}

.map-hero__points-gauge-mark:nth-child(2) {
  left: 20%;
  transform: translateX(-50%);
}

.map-hero__points-gauge-mark:nth-child(3) {
  left: 40%;
  transform: translateX(-50%);
}

.map-hero__points-gauge-mark:nth-child(4) {
  left: 60%;
  transform: translateX(-50%);
}

.map-hero__points-gauge-mark:nth-child(5) {
  left: 80%;
  transform: translateX(-50%);
}

.map-hero__points-gauge-mark:nth-child(6) {
  left: 100%;
  transform: translateX(-100%);
}

@media (prefers-reduced-motion: reduce) {
  .map-hero__points-gauge-tier {
    transition: none;
  }

  .map-hero__points-gauge-fill {
    transition: none;
  }
}

.map-hero__calc-toggles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.map-hero__calc-convert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: end;
}

.map-hero__calc-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.map-hero__calc-col-head {
  margin: 0;
  cursor: pointer;
}

.map-hero__calc-col-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-primary);
}

.map-hero__calc-field-shell {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--map-hero-metric-well-border);
  background: var(--map-hero-metric-well-bg);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.map-hero__calc-input--convert {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.map-hero__calc-input--convert:focus {
  outline: none;
}

.map-hero__calc-field-shell:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.map-hero__calc-input-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.22);
  border-left: 1px solid var(--map-hero-metric-well-border);
}

.map-hero__calc-precise {
  margin: 0;
  min-height: 1.15em;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: var(--text-muted);
}

.map-hero__calc-convert-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding-bottom: 0.2rem;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--map-hero-tab-active-bg);
  opacity: 0.9;
  user-select: none;
}

@media (max-width: 360px) {
  .map-hero__calc-convert {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .map-hero__calc-convert-mid {
    display: none;
  }
}

.map-hero__calc-seg {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  padding: 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  gap: 1px;
}

.map-hero__calc-seg-btn {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.2rem 0.55rem;
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  line-height: 1.15;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease;
}

.map-hero__calc-seg-btn:hover:not(:disabled) {
  color: var(--text-primary);
}

.map-hero__calc-seg-btn--active {
  color: var(--game-text);
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.map-hero__calc-seg-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.map-hero__calc-seg-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-hero__calc-field-label {
  display: block;
  margin: 0;
}

.map-hero__calc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  background: var(--map-hero-metric-well-bg);
  border: 1px solid var(--map-hero-metric-well-border);
  border-radius: var(--radius-sm);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(0, 0, 0, 0.4);
}

.map-hero__calc-input::placeholder {
  color: var(--text-muted);
}

.map-hero__calc-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.map-hero__calc-result {
  margin: 0;
  min-height: 1.35em;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-secondary);
  text-align: center;
}

.map-hero__calc-result.map-hero__calc-result--error {
  color: #f0a8a8;
}

.map-hero__weight-label {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.map-hero__weight-value {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

/* Map hero — items: usage (craft, quests, recycling, karma) */
.map-hero__item-usage {
  width: 100%;
  min-width: 0;
  max-height: min(60vh, 22rem);
  overflow-y: auto;
  padding: 0 var(--space-xs);
  box-sizing: border-box;
}

.map-hero__item-usage[hidden] {
  display: none !important;
}

.map-hero__item-usage-inner {
  margin: 0;
}

.map-hero__item-usage-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: var(--space-sm);
  align-items: stretch;
}

.map-hero__item-usage-block {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--space-sm);
  min-width: 0;
  min-height: 12.5rem;
  overflow-wrap: break-word;
  border: 1px solid rgba(185, 185, 185, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  position:relative;
}

.map-hero__item-usage-block:after{
  content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(0, 180, 255, 0.45);
    transform: translate(-50%, -50%);
    z-index: 0;
    filter: blur(20px);
}

.map-hero__item-usage-block-type {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 var(--space-xs);
  text-align: center;
  width: 100%;
}

.map-hero__item-usage-block-subtitle {
  position: relative;
  z-index: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0 0 var(--space-sm);
  text-align: center;
  width: 100%;
}

.map-hero__item-usage-block-body {
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  width: 100%;
  min-height: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-primary);
  text-align: center;
}

.map-hero__item-usage-visual-text {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-primary);
  text-align: center;
}

.map-hero__item-usage-block-body:not(:has(img)):not(:has(.map-hero__item-usage-img-link)) {
  justify-content: center;
}

.map-hero__item-usage-block-body > :last-child {
  margin-bottom: 0;
}

.map-hero__item-usage-block .map-hero__item-usage-recycle-row:last-child {
  margin-bottom: 0;
}

.map-hero__item-usage-line {
  margin: 0 0 0.35rem;
}

.map-hero__item-usage-line:last-child {
  margin-bottom: 0;
}

.map-hero__karma-num--pos {
  color: #66bb6a;
  font-weight: 700;
}

.map-hero__karma-num--neg {
  color: #ef5350;
  font-weight: 700;
}

.map-hero__item-usage-desc {
  margin: 0;
  width: 100%;
  text-align: center;
}

.map-hero__item-usage-recycle-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-xs);
  width: 100%;
  margin: 0 0 var(--space-sm);
  text-align: center;
}

.map-hero__item-usage-img {
  width: 96px;
  height: 96px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.map-hero__item-usage-img-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  max-width: 100%;
}

.map-hero__item-usage-img-link .map-hero__item-usage-img {
  display: block;
}

.map-hero__item-usage-text-link {
  font-size: 0.8125rem;
  text-decoration: underline;
  color: var(--text-muted);
}

.map-layout--cat-items .map-hero__tabbar {
  display: none !important;
}

.map-layout--cat-items .map-hero__tab-pane--calc {
  display: none !important;
}

.map-layout--cat-items .map-hero__weight-line {
  display: none !important;
}

/* Items: single pane — avoid 200% wide track overlapping the panel (and the close control) */
@media (max-width: 899px) {
  .map-layout--cat-items .map-hero--viewport-mobile .map-hero__tab-slider-track {
    width: 100%;
    transform: none !important;
  }

  .map-layout--cat-items .map-hero--viewport-mobile .map-hero__tab-pane--icons {
    flex: 0 0 100%;
  }
}

.map-hero__duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  margin: 0 0 var(--space-sm);
}

.map-hero__duo[hidden] {
  display: none !important;
}

.map-hero__duo--shadow-only {
  grid-template-columns: 1fr;
}

.map-hero__duo--shadow-only .map-hero__metric--speed {
  display: none;
}

.map-hero__duo--speed-only {
  grid-template-columns: 1fr;
}

.map-hero__duo--speed-only .map-hero__metric--shadow {
  display: none;
}

/* Shadow / speed / minigame blocks — flat on panel (no recessed well) */
.map-hero__metric,
.map-hero__minigame-row {
  background: transparent;
  box-shadow: none;
}

.map-hero__metric {
  min-width: 0;
  padding: var(--space-xs) var(--space-sm);
}

.map-hero__metric .map-hero__shadow-row,
.map-hero__metric .map-hero__speed-row {
  margin-top: 0;
}

.map-hero__rarity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  max-width: 100%;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
}

.map-hero__rarity-chip--common {
  color: var(--rarity-common-fg);
  background: var(--rarity-common-bg);
  border-color: var(--rarity-common-border);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

/* Items: material type (same pill style as rarity) */
.map-hero__rarity-chip--item-bio {
  color: #b8f5c8;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.2);
}

.map-hero__rarity-chip--item-nonbio {
  color: var(--rarity-common-fg);
  background: var(--rarity-common-bg);
  border-color: var(--rarity-common-border);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.map-hero__rarity-chip--rare {
  color: var(--rarity-rare-fg-strong);
  background: var(--rarity-rare-bg);
  border-color: var(--rarity-rare-border);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.2);
}

.map-hero__rarity-chip--epic {
  color: var(--rarity-epic-accent);
  background: var(--rarity-epic-bg);
  border-color: var(--rarity-epic-border);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.22);
}

.map-hero__rarity-chip--monster {
  color: var(--rarity-monster-accent);
  background: var(--rarity-monster-bg);
  border-color: var(--rarity-monster-border);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.22);
}

.map-hero__rarity-chip--letter {
  min-width: 1.65rem;
  min-height: 1.65rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0;
}

.map-hero__seasons-row {
  width: 100%;
  margin: var(--space-md) 0;
}

.map-hero__seasons-row[hidden] {
  display: none !important;
}

.map-hero__seasons-title {
  margin: 0 0 0.12rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-muted);
}

/* Twelve months on one compact row (labels: short month names from i18n) */
.map-hero__seasons-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  align-items: stretch;
}

.map-hero__season-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: clamp(0.42rem, 2.75vw, 0.62rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  border-radius: 5px;
  border: 1px solid transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Slightly larger season cells on narrow viewports (tighter grid gap + scale-friendly type) */
@media (max-width: 899px) {
  .map-hero__seasons-grid {
    gap: 0;
  }

  .map-hero__season-cell {
    font-size: clamp(0.46rem, 3.2vw, 0.7rem);
  }
}

/* In season: brighter teal + cyan wash (background clearly above OOS luminance) */
.map-hero__season-cell--in {
  color: var(--game-text);
  background:
    linear-gradient(
      145deg,
      rgba(0, 180, 210, 0.14) 0%,
      transparent 48%
    ),
    linear-gradient(
      165deg,
      rgba(0, 108, 128, 0.82) 0%,
      rgba(0, 82, 102, 0.9) 38%,
      rgba(0, 58, 76, 0.96) 100%
    );
  border-color: rgba(0, 210, 255, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(0, 220, 255, 0.38),
    inset 0 1px 0 rgba(200, 235, 245, 0.24);
}

/* Out of season: stay clearly darker; layered deep blues (idle-icon family) */
.map-hero__season-cell--oos {
  color: #96b4c4;
  background:
    linear-gradient(
      155deg,
      rgba(0, 55, 72, 0.35) 0%,
      transparent 55%
    ),
    linear-gradient(
      165deg,
      rgba(0, 32, 44, 0.92) 0%,
      rgba(0, 16, 26, 0.97) 48%,
      #000f18 100%
    );
  border-color: rgba(0, 85, 115, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(0, 65, 88, 0.42),
    inset 0 1px 0 rgba(70, 110, 130, 0.1);
}

/* Current month: strong ring (does not replace --in / --oos inset shadows) */
.map-hero__season-cell--current {
  outline: 2px solid rgba(0, 180, 255, 0.92);
  outline-offset: 1px;
  z-index: 2;
  filter: drop-shadow(0 0 5px rgba(0, 180, 255, 0.65)) drop-shadow(0 0 10px rgba(0, 180, 255, 0.28));
}

/* Current month but OOS: cooler ring (no red) */
.map-hero__season-cell--current.map-hero__season-cell--oos {
  outline-color: rgba(100, 160, 188, 0.88);
  filter: drop-shadow(0 0 5px rgba(0, 100, 140, 0.5)) drop-shadow(0 0 10px rgba(0, 60, 90, 0.28));
}

.map-hero__moment-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.map-hero__moment-svg {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--map-hero-icon-indicator-idle);
  filter: none;
  transition:
    color 0.15s ease,
    filter 0.15s ease;
}

.map-hero__moment-svg.map-hero__moment-svg--active {
  color: var(--map-hero-icon-indicator);
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .map-hero__moment-svg {
    transition: none;
  }
}

.map-hero__shadow-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.map-hero__shadow-row[hidden] {
  display: none !important;
}

.map-hero__shadow-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-primary);
}

.map-hero__shadow-empty {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
  color: var(--text-secondary);
}

.map-hero__shadow-empty[hidden] {
  display: none !important;
}

.map-hero__shadow-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  padding: 0 var(--space-xs) var(--space-xs);
}

.map-hero__shadow-icons[hidden] {
  display: none !important;
}

.map-hero__shadow-blob-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-xs) var(--space-xs);
}

.map-hero__shadow-blob-wrap[hidden] {
  display: none !important;
}

/* Creatures, shadow [0]: irregular “potato” silhouette, slow spin (replaces icon row) */
.map-hero__shadow-blob {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  background: radial-gradient(
    ellipse 85% 78% at 42% 40%,
    rgba(160, 192, 200, 0.5) 0%,
    var(--accent) 52%,
    rgba(0, 43, 54, 0.95) 100%
  );
  border-radius: 58% 42% 62% 38% / 48% 55% 45% 52%;
  box-shadow:
    0 0 0.35rem rgba(0, 0, 0, 0.35),
    0 0 0.75rem var(--accent-glow);
  animation: mapHeroShadowBlobSpin 26s linear infinite;
  will-change: transform;
}

@keyframes mapHeroShadowBlobSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-hero__shadow-blob {
    animation: none;
  }
}

.map-hero__shadow-svg {
  flex-shrink: 0;
  width: 1.45rem;
  height: auto;
  color: var(--map-hero-icon-indicator-idle);
  filter: none;
  transform-origin: center center;
  transition:
    color 0.15s ease,
    filter 0.15s ease;
}

/* Three tiers: smallest (0), medium (1), largest (3) */
.map-hero__shadow-icons .map-hero__shadow-svg:nth-child(1) {
  transform: scale(0.45);
}

.map-hero__shadow-icons .map-hero__shadow-svg:nth-child(2) {
  transform: scale(0.72);
}

.map-hero__shadow-icons .map-hero__shadow-svg:nth-child(3) {
  transform: scale(1);
}

.map-hero__shadow-svg.map-hero__shadow-svg--active {
  color: var(--map-hero-icon-indicator);
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .map-hero__shadow-svg {
    transition: none;
  }
}

.map-hero__speed-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.map-hero__speed-row[hidden] {
  display: none !important;
}

.map-hero__speed-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-primary);
}

.map-hero__speed-empty {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
  color: var(--text-secondary);
}

.map-hero__speed-empty[hidden] {
  display: none !important;
}

.map-hero__speed-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0 var(--space-xs);
}

.map-hero__speed-icons[hidden] {
  display: none !important;
}

.map-hero__speed-svg {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--map-hero-icon-indicator-idle);
  filter: none;
  transition:
    color 0.15s ease,
    filter 0.15s ease;
}

.map-hero__speed-svg.map-hero__speed-svg--active {
  color: var(--map-hero-icon-indicator);
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .map-hero__speed-svg {
    transition: none;
  }
}

/* Minigame (cloversalad2 Minigame_fix / Minigame_moving / Minigame_circular) — difficulty 1 / 2 / 3 */
.map-hero__minigame-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
  margin: var(--space-sm) 0 0;
  padding: var(--space-xs) var(--space-sm);
}

.map-hero__minigame-row[hidden] {
  display: none !important;
}

.map-hero__minigame-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-primary);
}

.map-hero__minigame-empty {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
  color: var(--text-secondary);
}

.map-hero__minigame-empty[hidden] {
  display: none !important;
}

.map-hero__minigame-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  width: 100%;
  padding: var(--space-xs) 0;
}

.map-hero__minigame-view[hidden] {
  display: none !important;
}

.map-hero__minigame.map-hero__minigame--bar {
  background-color: var(--game-teal-footer);
  border-radius: 4px;
  width: 9rem;
  max-width: 100%;
  height: 8px;
  padding: 2px;
  position: relative;
  margin: 0 auto;
  box-sizing: content-box;
}

.map-hero__minigame.map-hero__minigame--bar::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--accent);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

/* Bar minigame: fix + moving share mapHeroMg on the inner div; only moving adds mapHeroMgMoving on the span. */
.map-hero__minigame.map-hero__minigame--bar.map-hero__minigame--fix > div,
.map-hero__minigame.map-hero__minigame--bar.map-hero__minigame--moving > div {
  background-color: var(--accent);
  height: 100%;
  width: 60%;
  animation: mapHeroMg 0.5s infinite alternate;
  position: relative;
}

.map-hero__minigame.map-hero__minigame--bar > span {
  display: block;
  width: 35px;
  height: 15px;
  border: 2px solid var(--accent);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 5px;
  left: 65%;
}

.map-hero__minigame.map-hero__minigame--moving > span {
  animation: mapHeroMgMoving 1.5s infinite alternate linear;
}

.map-hero__minigame-circular {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: relative;
  padding: 2px;
  box-sizing: border-box;
  margin: 0 auto;
}

.map-hero__minigame-circular > span {
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 30%;
  height: 30%;
  background-color: var(--accent);
}

.map-hero__minigame-circular > div {
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  animation: mapHeroCircularMg 1.2s linear infinite;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  box-sizing: border-box;
}

@keyframes mapHeroMg {
  0% {
    width: 80%;
  }
  33% {
    width: 75%;
  }
  66% {
    width: 70%;
  }
  100% {
    width: 65%;
  }
}

@keyframes mapHeroMgMoving {
  0% {
    left: 40%;
  }
  100% {
    left: 65%;
  }
}

@keyframes mapHeroCircularMg {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-hero__minigame.map-hero__minigame--bar.map-hero__minigame--fix > div,
  .map-hero__minigame.map-hero__minigame--bar.map-hero__minigame--moving > div {
    animation: none;
    width: 70%;
  }

  .map-hero__minigame.map-hero__minigame--moving > div > span {
    animation: none;
  }

  .map-hero__minigame-circular > div {
    animation: none;
  }
}

.map-sidebar__heading {
  margin: 0 0 var(--space-md);
  font-size: 1rem;
  font-weight: 600;
}

/* Sidebar filters: search + advanced quick filters (fish/creatures) in one glass panel */
.map-filters-panel {
  margin: 0 0 var(--space-md);
  padding: 0.8rem 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 180, 255, 0.26);
  background:
    linear-gradient(155deg, rgba(0, 72, 88, 0.45) 0%, rgba(0, 28, 42, 0.92) 42%, rgba(0, 12, 20, 0.97) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 12px 36px rgba(0, 0, 0, 0.48);
  box-sizing: border-box;
  max-width: 100%;
  position: relative;
}

.map-filters-panel::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  top: 0;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.55), rgba(120, 220, 255, 0.35), transparent);
  opacity: 0.85;
  pointer-events: none;
}

.map-filters-panel--search-only {
  padding-bottom: 0.8rem;
}

.map-sidebar__filter {
  margin: 0 0 var(--space-md);
}

.map-filters-panel .map-sidebar__filter {
  margin: 0 0 0.9rem;
}

.map-filters-panel--search-only .map-sidebar__filter {
  margin-bottom: 0;
}

.map-sidebar__filter-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(180, 205, 195, 0.72);
}

.map-filters-panel .map-sidebar__filter-label {
  color: rgba(200, 228, 215, 0.78);
  text-shadow: 0 0 20px rgba(0, 200, 255, 0.12);
}

.map-list-filter__input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(0, 36, 48, 0.65) 0%, rgba(0, 18, 28, 0.92) 100%);
  border: 1px solid rgba(0, 180, 255, 0.22);
  border-radius: 10px;
  box-sizing: border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  transition:
    border-color 0.18s ease,
    box-shadow 0.2s ease,
    background 0.18s ease;
}

.map-list-filter__input:hover {
  border-color: rgba(0, 200, 255, 0.38);
}

.map-list-filter__input::placeholder {
  color: rgba(148, 168, 158, 0.75);
}

.map-list-filter__input:focus {
  outline: none;
  border-color: rgba(0, 210, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 2px rgba(0, 180, 255, 0.22),
    0 0 24px rgba(0, 200, 255, 0.12);
  background: linear-gradient(180deg, rgba(0, 48, 62, 0.75) 0%, rgba(0, 22, 34, 0.96) 100%);
}

.map-list-filter__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-list-empty-row {
  list-style: none;
  margin: 0;
  padding: 0;
}

.map-list-empty-row[hidden] {
  display: none !important;
}

.map-list-empty-row--solo {
  margin-top: var(--space-md);
}

.map-list-empty-row__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.map-list-empty-row__text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.map-list-empty-row__reset {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.map-list-empty-row__reset:hover {
  background: var(--bg-card-hover);
}

.map-quick {
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.map-filters-panel .map-quick {
  padding-top: 0.65rem;
  margin-top: 0.35rem;
  border-top: 1px solid rgba(0, 180, 255, 0.14);
}

.map-quick__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
}

.map-quick__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 228, 215, 0.82);
  text-shadow: 0 0 18px rgba(0, 200, 255, 0.1);
}

.map-quick__reset {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(0, 180, 255, 0.28);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(0, 56, 70, 0.7) 0%, rgba(0, 24, 34, 0.95) 100%);
  color: rgba(200, 220, 210, 0.88);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.35);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.2s ease,
    transform 0.12s ease;
}

.map-quick__reset:hover {
  color: var(--accent-hover);
  border-color: rgba(0, 210, 255, 0.5);
  background: linear-gradient(165deg, rgba(0, 80, 100, 0.55) 0%, rgba(0, 32, 44, 0.95) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(0, 200, 255, 0.15);
  transform: translateY(-1px);
}

.map-quick__reset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-quick__reset-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

/* Hide native controls; full-area hit target over styled chip (day/night, rarity, OOS) */
.map-quick input.map-quick__control {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: inherit;
  font-size: inherit;
}

.map-quick__rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Three stacked groups: moment · type · seasonality (fish) */
.map-quick__group {
  margin: 0;
  padding: 0.55rem 0.6rem 0.62rem;
  border-radius: 11px;
  border: 1px solid rgba(0, 180, 255, 0.16);
  background: linear-gradient(145deg, rgba(0, 40, 52, 0.42) 0%, rgba(0, 14, 22, 0.72) 100%);
  box-sizing: border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 24px rgba(0, 100, 140, 0.04);
}

.map-quick__group-label {
  margin: 0 0 0.48rem;
  padding: 0 0 0.28rem;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: rgba(165, 198, 185, 0.72);
  line-height: 1.2;
  border-bottom: 1px solid rgba(0, 180, 255, 0.12);
}

.map-quick__group-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.map-quick__group-body--moment {
  justify-content: flex-start;
  gap: 0.4rem;
}

.map-quick__group-body--rarity {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

@media (min-width: 380px) {
  .map-quick__group-body--rarity {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Seasonality: balanced 2×2 grid on narrow sidebars */
.map-quick__group-body--season {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
}

.map-quick__group-body--season .map-quick__oos {
  width: 100%;
  min-width: 0;
}

.map-quick__group-body--season .map-quick__oos-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 1.85rem;
  padding: 0.2rem 0.35rem;
  text-align: center;
  box-sizing: border-box;
}

.map-quick__oos-arrow {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  opacity: 0.92;
}

.map-quick__oos-text {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.map-quick__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85rem;
  padding: 0.2rem 0.5rem;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(220, 232, 222, 0.82);
  background: linear-gradient(165deg, rgba(0, 48, 60, 0.55) 0%, rgba(0, 18, 28, 0.88) 100%);
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.25);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.2s ease,
    transform 0.14s ease;
}

.map-quick__pill:hover {
  border-color: rgba(0, 200, 255, 0.4);
  color: var(--accent-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 16px rgba(0, 180, 255, 0.12);
  transform: translateY(-1px);
}

.map-quick__pill:has(input:checked) {
  border-color: rgba(0, 210, 255, 0.55);
  color: #e8fff4;
  background: linear-gradient(155deg, rgba(0, 120, 150, 0.35) 0%, rgba(0, 40, 56, 0.95) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 4px 18px rgba(0, 200, 255, 0.22);
  text-shadow: 0 0 14px rgba(0, 200, 255, 0.25);
}

.map-quick__pill--rarity-text:has(input:checked) .map-quick__pill-word {
  color: #b8fff0;
}

.map-quick__pill:focus-within,
.map-quick__oos:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

.map-quick__pill-text {
  pointer-events: none;
}

.map-quick__pill--icon {
  min-width: 2rem;
  padding: 0.2rem 0.35rem;
}

.map-quick__pill--icon-duo {
  min-width: 2.55rem;
  padding: 0.2rem 0.28rem;
}

.map-quick__pill-icons-duo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  pointer-events: none;
}

.map-quick__moment-svg--duo {
  width: 0.92rem;
  height: 0.92rem;
  flex-shrink: 0;
}

.map-quick__pill--rarity-text {
  min-width: 0;
  min-height: 2rem;
  padding: 0.35rem 0.45rem;
  justify-content: center;
}

.map-quick__pill-word {
  pointer-events: none;
  display: block;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
}

.map-quick__pill-word--common {
  color: var(--rarity-common-fg);
}

.map-quick__pill-word--rare {
  color: var(--rarity-rare-fg-strong);
}

.map-quick__pill-word--epic {
  color: var(--rarity-epic-accent);
}

.map-quick__pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.map-quick__moment-svg {
  width: 1.1rem;
  height: 1.1rem;
  color: rgba(160, 185, 175, 0.75);
  filter: drop-shadow(0 0 6px rgba(0, 180, 255, 0.15));
  transition: color 0.16s ease, filter 0.16s ease;
}

.map-quick__pill--icon:hover .map-quick__moment-svg {
  color: rgba(120, 220, 255, 0.9);
}

.map-quick__pill--icon:has(input:checked) .map-quick__moment-svg {
  color: var(--accent-hover);
  filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.45));
}

.map-quick__oos {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.map-quick__oos-chip {
  display: inline-block;
  padding: 0.28rem 0.42rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: rgba(200, 218, 208, 0.78);
  background: linear-gradient(165deg, rgba(0, 44, 56, 0.5) 0%, rgba(0, 16, 26, 0.88) 100%);
  border: 1px solid rgba(0, 180, 255, 0.18);
  border-radius: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.2s ease,
    transform 0.12s ease;
}

.map-quick__oos:hover .map-quick__oos-chip {
  border-color: rgba(0, 200, 255, 0.38);
  color: var(--accent-hover);
}

.map-quick__oos:has(input:checked) .map-quick__oos-chip {
  border-color: rgba(0, 210, 255, 0.5);
  color: #e0fff6;
  background: linear-gradient(155deg, rgba(0, 100, 128, 0.38) 0%, rgba(0, 36, 48, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 16px rgba(0, 200, 255, 0.14);
}

@supports not selector(:has(*)) {
  .map-quick__pill input:focus + .map-quick__pill-text,
  .map-quick__pill input:focus + .map-quick__pill-icon,
  .map-quick__pill input:focus + .map-quick__pill-icons-duo,
  .map-quick__pill input:focus + .map-quick__pill-word {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

.map-family {
  margin-bottom: var(--space-lg);
}

.map-family__title {
  margin: 0 0 var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.map-family--monster .map-family__title {
  color: #f87171;
}

.map-item-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-item-list li {
  margin-bottom: var(--space-xs);
}

@media (min-width: 900px) {
  .map-sidebar #map-item-list {
    max-height: 29rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: var(--space-xs);
    scrollbar-gutter: stable;
  }
}

.map-item-link {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  font: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.map-item-link--rarity-common {
  border-color: rgba(100, 116, 139, 0.4);
  background: var(--rarity-common-bg);
  box-shadow: inset 0px 0 0 0 var(--rarity-common-border);
}

.map-item-link--rarity-common:hover {
  border-color: var(--rarity-common-line);
  background: var(--rarity-common-bg-hover);
}

.map-item-link--rarity-rare {
  border-color: rgba(234, 88, 12, 0.45);
  background: var(--rarity-rare-bg);
  box-shadow: inset 0px 0 0 0 var(--rarity-rare-border);
}

.map-item-link--rarity-rare:hover {
  border-color: var(--rarity-rare-line);
  background: var(--rarity-rare-bg-hover);
}

.map-item-link--rarity-epic {
  border-color: rgba(168, 85, 247, 0.45);
  background: var(--rarity-epic-bg);
  box-shadow: inset 0px 0 0 0 var(--rarity-epic-border);
}

.map-item-link--rarity-epic:hover {
  border-color: var(--rarity-epic-line);
  background: var(--rarity-epic-bg-hover);
}

.map-item-link--rarity-monster {
  border-color: rgba(239, 68, 68, 0.45);
  background: var(--rarity-monster-bg);
  box-shadow: inset 0px 0 0 0 var(--rarity-monster-border);
}

.map-item-link--rarity-monster:hover {
  border-color: var(--rarity-monster-line);
  background: var(--rarity-monster-bg-hover);
}

.map-item-link__portrait {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--rarity-common-border);
  background: var(--map-portrait-round-bg);
  line-height: 0;
}

.map-item-link--rarity-common .map-item-link__portrait {
  border-color: var(--rarity-common-border);
}

.map-item-link--rarity-rare .map-item-link__portrait {
  border-color: var(--rarity-rare-border);
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.35);
}

.map-item-link--rarity-epic .map-item-link__portrait {
  border-color: var(--rarity-epic-border);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
}

.map-item-link--rarity-monster .map-item-link__portrait {
  border-color: var(--rarity-monster-border);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.map-item-link__portrait-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-item-link__text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.35;
}

.map-item-rarity {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.map-item-rarity--common {
  color: var(--rarity-common-fg);
  text-shadow: 0 0 20px rgba(148, 163, 184, 0.35);
}

.map-item-rarity--rare {
  color: var(--rarity-rare-fg-strong);
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.45);
}

.map-item-rarity--epic {
  color: var(--rarity-epic-accent);
  text-shadow: 0 0 20px rgba(192, 132, 252, 0.45);
}

.map-item-rarity--monster {
  color: var(--rarity-monster-accent);
  text-shadow: 0 0 18px rgba(248, 113, 113, 0.5);
}

/* Map carousel — text tiles to other maps (same category; lightweight, crawlable links) */
.map-carousel {
  margin: 0 0 var(--space-lg);
}

.map-carousel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 0.65rem;
}

.map-carousel__title {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(180, 200, 188, 0.55);
}

.map-carousel__controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.map-carousel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(227, 234, 216, 0.88);
  background: linear-gradient(160deg, rgba(0, 72, 88, 0.65) 0%, rgba(0, 28, 38, 0.92) 100%);
  border: 1px solid rgba(0, 180, 255, 0.28);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.map-carousel__btn:hover:not(:disabled) {
  color: var(--accent-hover);
  border-color: rgba(0, 200, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 22px rgba(0, 180, 255, 0.22);
  transform: translateY(-1px);
}

.map-carousel__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-carousel__btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  transform: none;
}

.map-carousel__btn-icon {
  display: block;
  margin-top: -0.12em;
}

.map-carousel__viewport {
  position: relative;
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.25rem;
  padding: 0.35rem 0.15rem 0.55rem;
  margin: 0 -0.15rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 180, 255, 0.2);
  background: linear-gradient(168deg, rgba(0, 44, 56, 0.55) 0%, rgba(0, 18, 26, 0.85) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.38);
  scrollbar-color: rgba(0, 180, 255, 0.35) rgba(0, 24, 32, 0.5);
  scrollbar-width: thin;
}

.map-carousel__viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.map-carousel__viewport::-webkit-scrollbar {
  height: 6px;
}

.map-carousel__viewport::-webkit-scrollbar-track {
  background: rgba(0, 20, 28, 0.5);
  border-radius: 4px;
}

.map-carousel__viewport::-webkit-scrollbar-thumb {
  background: rgba(0, 180, 255, 0.35);
  border-radius: 4px;
}

.map-carousel__track {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.35rem 0.5rem 0.45rem;
}

.map-carousel__tile {
  scroll-snap-align: start;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  max-width: min(14rem, 78vw);
  min-height: 2.65rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  color: rgba(227, 234, 216, 0.88);
  border-radius: 11px;
  border: 1px solid rgba(0, 180, 255, 0.22);
  background: linear-gradient(155deg, rgba(0, 100, 120, 0.25) 0%, rgba(0, 32, 44, 0.75) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.2s ease,
    transform 0.14s ease;
}

.map-carousel__tile:hover {
  color: var(--accent-hover);
  border-color: rgba(0, 200, 255, 0.45);
  background: linear-gradient(155deg, rgba(0, 140, 168, 0.32) 0%, rgba(0, 40, 54, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(0, 180, 255, 0.18);
  transform: translateY(-2px);
}

.map-carousel__tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-carousel__tile--current {
  cursor: default;
  color: #f4faf0;
  border-color: rgba(0, 200, 255, 0.55);
  background: linear-gradient(155deg, rgba(0, 165, 210, 0.38) 0%, rgba(0, 48, 62, 0.95) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 4px 22px rgba(0, 200, 255, 0.28);
  text-shadow: 0 0 16px rgba(0, 200, 255, 0.35);
}

.map-carousel__tile--current:hover {
  transform: none;
  color: #f4faf0;
}

.map-carousel__tile-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  color: rgba(160, 220, 235, 0.88);
  opacity: 0.95;
  transition: color 0.16s ease, opacity 0.16s ease, filter 0.2s ease;
}

.map-carousel__tile-icon .map-carousel-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-carousel__tile:hover .map-carousel__tile-icon,
.map-carousel__tile--current .map-carousel__tile-icon {
  opacity: 1;
}

/* Per-map accent on pictogram (SVG use currentColor) */
.map-carousel__tile[data-map-slug="paradise"] .map-carousel__tile-icon {
  color: #5eead4;
}
.map-carousel__tile[data-map-slug="marina"] .map-carousel__tile-icon {
  color: #7dd3fc;
}
.map-carousel__tile[data-map-slug="great-lakes"] .map-carousel__tile-icon {
  color: #93c5fd;
}
.map-carousel__tile[data-map-slug="costa-rica"] .map-carousel__tile-icon {
  color: #4ade80;
}
.map-carousel__tile[data-map-slug="alaska"] .map-carousel__tile-icon {
  color: #a5d8ff;
}
.map-carousel__tile[data-map-slug="australia"] .map-carousel__tile-icon {
  color: #fbbf24;
}
.map-carousel__tile[data-map-slug="scotland"] .map-carousel__tile-icon {
  color: #c4b5fd;
}
.map-carousel__tile[data-map-slug="thailand"] .map-carousel__tile-icon {
  color: #f472b6;
}
.map-carousel__tile[data-map-slug="amazon"] .map-carousel__tile-icon {
  color: #4ade80;
}
.map-carousel__tile[data-map-slug="chemical-plant"] .map-carousel__tile-icon {
  color: #6ee7b7;
}
.map-carousel__tile[data-map-slug="nuclear-plant"] .map-carousel__tile-icon {
  color: #bef264;
}
.map-carousel__tile[data-map-slug="petrochemical"] .map-carousel__tile-icon {
  color: #fb923c;
}

.map-carousel__tile-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-align: left;
}

.map-carousel__vip {
  flex-shrink: 0;
  padding: 0.12rem 0.38rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(253, 224, 71, 0.95);
  border-radius: 4px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.55) 0%, rgba(66, 32, 6, 0.85) 100%);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.15);
}

.map-carousel__tile--vip:not(.map-carousel__tile--current) .map-carousel__vip {
  opacity: 0.92;
}

/* Map category tabs — high-contrast segmented control (per-category accent) */
.map-cat-nav {
  --map-cat-nav-pad: 0.45rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.4rem;
  margin: 0 0 var(--space-xl);
  padding: var(--map-cat-nav-pad);
  border-radius: 14px;
  border: 1px solid rgba(0, 180, 255, 0.22);
  background: linear-gradient(165deg, rgba(0, 52, 66, 0.92) 0%, rgba(0, 28, 38, 0.97) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 28px rgba(0, 0, 0, 0.42);
}

.map-cat-nav__link {
  --map-tab: var(--accent);
  --map-tab-dim: var(--accent-dim);
  --map-tab-edge: rgba(0, 180, 255, 0.35);
  --map-tab-glow: rgba(0, 180, 255, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: rgba(227, 234, 216, 0.78);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.map-cat-nav__link:hover {
  color: var(--map-tab);
  background: var(--map-tab-dim);
  border-color: var(--map-tab-edge);
  transform: translateY(-1px);
}

.map-cat-nav__link:focus-visible {
  outline: 2px solid var(--map-tab);
  outline-offset: 2px;
}

.map-cat-nav__link:active {
  transform: translateY(0);
}

/* Fish — ocean cyan (matches site accent); shared with .map-page--fish hero */
.map-page--fish,
.map-cat-nav__link--fish {
  --map-tab: #47d6ff;
  --map-tab-dim: rgba(0, 200, 255, 0.16);
  --map-tab-edge: rgba(0, 200, 255, 0.42);
  --map-tab-glow: rgba(0, 200, 255, 0.5);
}

/* Creatures — violet */
.map-page--creatures,
.map-cat-nav__link--creatures {
  --map-tab: #c4b5fd;
  --map-tab-dim: rgba(139, 92, 246, 0.18);
  --map-tab-edge: rgba(167, 139, 250, 0.45);
  --map-tab-glow: rgba(167, 139, 250, 0.42);
}

/* Items — warm gold */
.map-page--items,
.map-cat-nav__link--items {
  --map-tab: #fcd34d;
  --map-tab-dim: rgba(245, 158, 11, 0.16);
  --map-tab-edge: rgba(251, 191, 36, 0.42);
  --map-tab-glow: rgba(251, 191, 36, 0.38);
}

/* Monster — danger red */
.map-page--monster,
.map-cat-nav__link--monster {
  --map-tab: #fca5a5;
  --map-tab-dim: rgba(239, 68, 68, 0.16);
  --map-tab-edge: rgba(248, 113, 113, 0.48);
  --map-tab-glow: rgba(248, 113, 113, 0.45);
}

.map-cat-nav__icon {
  width: 1.375rem;
  height: 1.375rem;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.92;
  filter: saturate(1.08);
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.map-cat-nav__link:hover .map-cat-nav__icon,
.map-cat-nav__link--active .map-cat-nav__icon {
  opacity: 1;
  filter: saturate(1.15) brightness(1.05);
}

.map-cat-nav__link--active {
  color: #f4faf0;
  border-color: var(--map-tab-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 4px 20px var(--map-tab-glow);
  text-shadow: 0 0 18px var(--map-tab-glow);
}

.map-cat-nav__link--active.map-cat-nav__link--fish {
  background: linear-gradient(155deg, rgba(0, 165, 210, 0.42) 0%, rgba(0, 48, 62, 0.96) 100%);
}

.map-cat-nav__link--active.map-cat-nav__link--creatures {
  background: linear-gradient(155deg, rgba(109, 76, 204, 0.4) 0%, rgba(0, 38, 50, 0.96) 100%);
}

.map-cat-nav__link--active.map-cat-nav__link--items {
  background: linear-gradient(155deg, rgba(200, 130, 25, 0.38) 0%, rgba(0, 40, 48, 0.96) 100%);
}

.map-cat-nav__link--active.map-cat-nav__link--monster {
  background: linear-gradient(155deg, rgba(185, 55, 55, 0.42) 0%, rgba(0, 30, 36, 0.96) 100%);
}

@media (max-width: 28rem) {
  .map-cat-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .map-cat-nav__link {
    justify-content: flex-start;
    min-height: 2.65rem;
    font-size: 0.875rem;
    padding: 0.45rem 0.85rem;
  }
}

.map-sidebar__note {
  margin: 0 0 var(--space-md);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.map-monster-card {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.42);
  background: var(--rarity-monster-bg);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.12);
}

.map-monster-card--rarity-monster {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.12) 0%, rgba(127, 29, 29, 0.2) 100%);
}

.map-monster-card--rarity-monster .map-item-link__portrait {
  border-color: var(--rarity-monster-border);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
}

.map-monster-card__header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.map-monster-card__header .map-item-rarity {
  margin-left: auto;
}

.map-monster-card__title-text {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.map-monster-card__snippet {
  margin: 0 0 var(--space-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.map-monster-card__focus {
  width: 100%;
  justify-content: center;
}

/* Focus CTA: same red family, no side bar (centered control) */
.map-monster-card__focus.map-item-link--rarity-monster {
  box-shadow: none;
  border: 1px solid rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.12);
}

.map-monster-card__focus.map-item-link--rarity-monster:hover {
  border-color: var(--rarity-monster-line);
  background: var(--rarity-monster-bg-hover);
}

/* Guides section index */
.guides-index {
  padding-bottom: var(--space-3xl);
}

.guides-index .hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.guides-index__layout {
  max-width: min(100%, 42rem);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.guides-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guides-index__list li {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.guides-index__link {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.guides-index__link:hover {
  text-decoration: underline;
}

.guides-index__desc {
  margin: var(--space-xs) 0 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Skill tree guide — interactive builder (cloversalad2 SkillTree.vue) */
.skill-tree-page {
  padding-bottom: var(--space-3xl);
}

.skill-tree-page .hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.skill-tree-page__layout {
  max-width: min(100%, 72rem);
  margin: 0 auto;
  padding: 0 var(--space-md);
  box-sizing: border-box;
}

/* Ads: keep slots inside the column — avoid stretching the grid horizontally */
.skill-tree-page .home-layout .ad-slot--leaderboard {
  width: 100%;
  max-width: min(100%, 20rem);
  margin-left: auto;
  margin-right: auto;
}

.skill-tree-page .home-layout .ad-slot--native {
  width: 100%;
  max-width: min(100%, 20rem);
  min-height: 250px;
  margin-left: auto;
  margin-right: auto;
}

.skill-tree-prose {
  margin-bottom: var(--space-xl);
}

.skill-tree-prose__featured {
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.skill-tree-prose__featured-img {
  display: block;
  width: 100%;
  max-height: 14rem;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
}

.skill-tree-prose__intro {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg);
}

.skill-tree-prose__section {
  margin-bottom: var(--space-xl);
}

.skill-tree-prose__section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}

.skill-tree-prose__figure {
  margin: 0 0 var(--space-md);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.skill-tree-prose__figure img {
  display: block;
  width: 100%;
  max-height: 12rem;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.skill-tree-prose__p {
  margin: 0 0 var(--space-md);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.skill-tree-noscript {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.skill-tree-builder-section {
  position: relative;
}

.skill-tree-root {
  position: relative;
}

.skill-tree-container {
  width: 100%;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  position: relative;
  min-height: 24rem;
}

.level-input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  width: 100%;
}

.level-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  justify-content: center;
}

.level-label {
  color: var(--accent-primary, #0ce467);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.level-input {
  max-width: 9rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(12, 228, 103, 0.35);
  background: var(--bg-elevated);
  color: var(--accent-primary, #0ce467);
  font: inherit;
  font-weight: 600;
  text-align: center;
}

.level-input:focus-visible {
  outline: 2px solid var(--accent-primary, #0ce467);
  outline-offset: 2px;
}

.points-remaining {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: rgba(12, 228, 103, 0.12);
  border: 1px solid rgba(12, 228, 103, 0.28);
  border-radius: var(--radius-sm);
  min-width: 7.5rem;
  text-align: center;
}

.skill-tree-reset-btn {
  font: inherit;
  cursor: pointer;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(12, 228, 103, 0.45);
  background: transparent;
  color: var(--accent-primary, #0ce467);
  font-weight: 600;
}

.skill-tree-reset-btn:hover {
  background: rgba(12, 228, 103, 0.1);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-lg);
  max-width: 100rem;
  margin: 0 auto;
}

.skill-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: var(--space-sm) 0;
}

.skill-reset-button {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 0;
  opacity: 0.75;
}

.skill-reset-button:hover {
  opacity: 1;
}

.skill-icon-left {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.skill-label-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  flex: 1;
  margin-left: 3.5rem;
}

.skill-label {
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: capitalize;
}

.skill-benefit-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.skill-rating-number {
  font-weight: 700;
  min-width: 1.25rem;
}

.perks-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.375rem;
  width: 100%;
  padding: 0 var(--space-sm);
}

.perk-icon-wrapper {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 3rem;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  filter: grayscale(0.85);
  opacity: 0.65;
  padding: 0;
  font: inherit;
  color: inherit;
}

.perk-icon-wrapper.perk-clickable {
  cursor: pointer;
}

.perk-icon-wrapper.perk-active {
  filter: grayscale(0);
  opacity: 1;
  box-shadow: 0 0 8px currentColor;
}

.perk-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
}

.perk-index-number {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1;
  pointer-events: none;
}

.skill-0 .perk-icon-wrapper.perk-active {
  border-color: #0ce467;
  color: #0ce467;
  box-shadow: 0 0 12px rgba(12, 228, 103, 0.45);
}

.skill-1 .perk-icon-wrapper.perk-active {
  border-color: #f44336;
  color: #f44336;
  box-shadow: 0 0 12px rgba(244, 67, 54, 0.45);
}

.skill-1.strength-level-4,
.skill-1.strength-level-5,
.skill-1.strength-level-6 {
  border-color: rgba(244, 67, 54, 0.4);
}

.skill-1.strength-level-7,
.skill-1.strength-level-8,
.skill-1.strength-level-9 {
  border-color: rgba(244, 67, 54, 0.55);
  box-shadow: 0 0 12px rgba(244, 67, 54, 0.25);
}

.skill-1.strength-level-10 {
  border-color: #f44336;
  border-width: 3px;
  box-shadow: 0 0 20px rgba(244, 67, 54, 0.45);
}

.skill-2 .perk-icon-wrapper.perk-active {
  border-color: #ffc107;
  color: #ffc107;
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.45);
}

.skill-3 .perk-icon-wrapper.perk-active {
  border-color: #2196f3;
  color: #2196f3;
  box-shadow: 0 0 12px rgba(33, 150, 243, 0.45);
}

.skill-4 .perk-icon-wrapper.perk-active {
  border-color: #9c27b0;
  color: #9c27b0;
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.45);
}

.perk-info-dialog {
  position: fixed;
  z-index: 999;
}

.perk-info-dialog.perk-info-mobile {
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
}

.perk-info-dialog.perk-info-desktop {
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 31rem;
  width: 90%;
}

.perk-info-dialog.perk-info-collapsed {
  padding: var(--space-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2.5rem;
}

.perk-info-sticky-content {
  max-width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: left;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.perk-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  gap: var(--space-sm);
}

.perk-info-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.perk-dialog-collapse-btn,
.perk-dialog-expand-btn {
  font: inherit;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.perk-dialog-collapse-btn:hover,
.perk-dialog-expand-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.perk-info-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.perk-info-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.perk-info-skill-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-left: auto;
  text-transform: capitalize;
}

.perk-info-desktop .perk-info-skill-name {
  display: none;
}

.perk-info-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  padding: 0 var(--space-lg);
  font-style: italic;
  text-align: center;
  position: relative;
}

.perk-utility-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
}

.perk-utility-useful {
  background: rgba(12, 228, 103, 0.2);
  color: #0ce467;
  border: 1px solid rgba(12, 228, 103, 0.35);
}

.perk-utility-useless {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.35);
}

.perk-utility-situational {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.perk-utility-debatable {
  background: rgba(156, 39, 176, 0.2);
  color: #9c27b0;
  border: 1px solid rgba(156, 39, 176, 0.35);
}

.perk-info-feedback {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.perk-info-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: 0.25rem;
}

.perk-info-feedback-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.perk-info-feedback-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.perk-info-skill-0 .perk-info-sticky-content {
  border-color: rgba(12, 228, 103, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.perk-info-skill-1 .perk-info-sticky-content {
  border-color: rgba(244, 67, 54, 0.4);
}

.perk-info-skill-2 .perk-info-sticky-content {
  border-color: rgba(255, 193, 7, 0.4);
}

.perk-info-skill-3 .perk-info-sticky-content {
  border-color: rgba(33, 150, 243, 0.4);
}

.perk-info-skill-4 .perk-info-sticky-content {
  border-color: rgba(156, 39, 176, 0.4);
}

.floating-points-remaining {
  position: fixed;
  z-index: 998;
  bottom: 5rem;
  right: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  max-width: min(22rem, calc(100vw - 2rem));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.floating-points-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: 0.35rem;
}

.floating-points-level {
  font-weight: 700;
  color: var(--accent-primary, #0ce467);
}

.floating-points-skills {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.skill-tree-load-error {
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .skill-tree-container {
    padding-bottom: max(22rem, 40vh);
  }

  .skills-container {
    grid-template-columns: 1fr;
  }

  .skill-icon-left {
    width: 2.5rem;
    height: 2.5rem;
  }

  .perk-icon-wrapper {
    max-width: 2.5rem;
  }

  .level-label {
    font-size: 1rem;
  }
}

/* Custom map editor — user map (cloversalad2 UserMap) */
.user-map-page {
  padding-bottom: var(--space-3xl);
}

.user-map-page .hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.user-map-page .hero .ad-slot--leaderboard {
  width: 100%;
  max-width: min(100%, 20rem);
  margin-left: auto;
  margin-right: auto;
}

.user-map-page__layout {
  max-width: min(100%, 72rem);
  margin: 0 auto;
  padding: 0 var(--space-md);
  box-sizing: border-box;
}

.user-map-page__intro {
  margin: 0 0 var(--space-lg);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 48rem;
}

.user-map-page__intro p {
  margin: 0 0 var(--space-md);
}

.user-map-page__intro p:last-child {
  margin-bottom: 0;
}

.user-map-noscript {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.user-map-app {
  position: relative;
}

.user-map__error {
  margin: 0;
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(220, 80, 80, 0.12);
  border: 1px solid rgba(220, 80, 80, 0.35);
  color: var(--text-primary);
}

.user-map__mode {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  width: fit-content;
}

.user-map__mode .user-map__btn {
  border-radius: 0;
  border: none;
  margin: 0;
}

.user-map__mode .user-map__btn.is-active {
  background: rgba(12, 228, 103, 0.18);
  color: var(--accent-primary, #0ce467);
}

.user-map__toolbar {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border-soft);
  background: var(--map-hero-panel-bg);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.user-map__toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-md);
}

.user-map__toolbar-inner--view {
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.user-map__view-hint {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.user-map__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.user-map__select,
.user-map__input {
  min-width: 10rem;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9375rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}

.user-map__select:focus-visible,
.user-map__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.user-map__count {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.user-map__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-left: auto;
}

.user-map__btn {
  font: inherit;
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.user-map__btn:hover {
  border-color: rgba(12, 228, 103, 0.35);
  background: rgba(12, 228, 103, 0.08);
}

.user-map__btn--ghost {
  background: transparent;
}

.user-map__btn--primary {
  border-color: rgba(12, 228, 103, 0.45);
  background: rgba(12, 228, 103, 0.15);
  color: var(--accent-primary, #0ce467);
}

.user-map__btn--primary:hover {
  background: rgba(12, 228, 103, 0.25);
}

/* Editor shell: same grid as .map-layout (sidebar right on desktop, left drawer on mobile) */
.user-map-page__editor-map.map-layout {
  margin-top: var(--space-md);
}

.user-map-page .map-layout__main {
  max-width: min(100%, 72rem);
}

@media (min-width: 900px) {
  .user-map-page .map-sidebar #user-map-item-list {
    max-height: 29rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: var(--space-xs);
    scrollbar-gutter: stable;
  }
}

.user-map__search {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
}

.user-map__rarity {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.8rem 0;
}

.user-map__chip {
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.user-map__chip.is-active {
  border-color: rgba(12, 228, 103, 0.5);
  background: rgba(12, 228, 103, 0.12);
  color: var(--accent-primary, #0ce467);
}

.user-map__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-xs);
}

.user-map__tabs button {
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.user-map__tabs button.is-active {
  color: var(--accent-primary, #0ce467);
  background: rgba(12, 228, 103, 0.1);
}

.user-map__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.15rem;
}

.user-map__list-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.user-map__list-item:hover,
.user-map__list-item.is-selected {
  border-color: rgba(12, 228, 103, 0.35);
  background: rgba(12, 228, 103, 0.08);
}

.user-map__list-avatar {
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.user-map__list-avatar img {
  display: block;
}

.user-map__list-name {
  font-size: 0.8125rem;
  line-height: 1.35;
}

.user-map__toolbar-mobile-row {
  width: 100%;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}

.user-map__toolbar-mobile-row .user-map__btn {
  width: 100%;
}

@media (min-width: 900px) {
  .user-map__toolbar-mobile-row {
    display: none;
  }
}

.user-map__main {
  min-width: 0;
}

/* Place mode: full-map overlay (no layout shift); pointer-events none so clicks reach the canvas below */
.user-map__place-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.58);
  box-sizing: border-box;
  pointer-events: none;
}

.user-map__place-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  max-width: min(92%, 22rem);
  text-align: center;
  pointer-events: none;
}

.user-map__place-overlay-text {
  margin: 0;
  font-size: clamp(0.9rem, 3.8cqi, 1.05rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.user-map__place-overlay-text strong {
  font-weight: 700;
  color: #fff;
}

.user-map__place-overlay [data-cancel-sel] {
  pointer-events: auto;
}

.user-map__map-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.user-map__map-wrap {
  position: relative;
  width: 100%;
}

.user-map__map-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(85vh, 52rem);
  margin: 0 auto;
  container-type: inline-size;
  container-name: user-map-canvas;
}

.user-map__map-inner--place {
  cursor: crosshair;
}

.user-map__map-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: middle;
}

/* Watermarks: size & offset scale with map width (cqi) — same visual ratio on mobile as desktop */
.user-map__watermark {
  position: absolute;
  z-index: 4;
  font-size: 0.85rem;
  font-size: 2.65cqi;
  font-weight: 600;
  line-height: 1.35;
  max-width: calc(100% - 1rem);
  max-width: min(94cqi, 100%);
  box-sizing: border-box;
  pointer-events: none;
}

.user-map__watermark--promo {
  left: 0.5rem;
  top: 0.5rem;
  left: 1cqi;
  top: 1cqi;
  padding: 0.1em 0.8em;
  border-radius: 0.35em;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(245, 245, 245, 0.95);
  text-decoration: none;
  pointer-events: auto;
}

.user-map__watermark--promo:hover {
  text-decoration: underline;
  color: #fff;
}

.user-map__watermark--credit {
  left: 50%;
  bottom: 0.5rem;
  bottom: 1cqi;
  transform: translateX(-50%);
  padding: 0.1em 0.85em;
  border-radius: 0.35em;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(235, 235, 235, 0.95);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-map__placed {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
  cursor: default;
  width: 9%;
  aspect-ratio: 1;
  box-sizing: border-box;
}

/* Edit mode: allow pointer/touch drag without browser scroll stealing the gesture */
.user-map__map-inner--edit .user-map__placed {
  touch-action: none;
  cursor: grab;
}

.user-map__map-inner--edit .user-map__placed:active {
  cursor: grabbing;
}

/* Portrait ring: same rarity border + glow as .map-marker__thumb on map pages */
.user-map__placed-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 3px solid var(--rarity-common-border);
  box-sizing: border-box;
  background: #7be2f0;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.55);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.user-map__placed--rarity-common .user-map__placed-img {
  border-color: var(--rarity-common-border);
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.2), 0 0 14px rgba(0, 0, 0, 0.5);
}

.user-map__placed--rarity-rare .user-map__placed-img {
  border-color: var(--rarity-rare-border);
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.45), 0 0 16px rgba(251, 191, 36, 0.2), 0 0 14px rgba(0, 0, 0, 0.5);
}

.user-map__placed--rarity-epic .user-map__placed-img {
  border-color: var(--rarity-epic-border);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5), 0 0 14px rgba(0, 0, 0, 0.5);
}

.user-map__placed--rarity-monster .user-map__placed-img {
  border-color: var(--rarity-monster-border);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.55), 0 0 14px rgba(0, 0, 0, 0.5);
}

/* Download: full-width action row below the map (not overlaid on canvas) */
.user-map__map-actions {
  display: flex;
  justify-content: stretch;
  padding: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.28);
}

.user-map__map-actions .user-map__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.user-map__download-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.user-map__modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
}

.user-map__modal-card {
  width: min(100%, 26rem);
  max-height: min(90vh, 36rem);
  overflow: auto;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.user-map__modal-card--wide {
  width: min(100%, 40rem);
}

.user-map__modal-title {
  margin: 0 0 var(--space-md);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-map__modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.user-map__modal-actions--end {
  justify-content: flex-end;
}

.user-map__modal-body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.user-map__modal--dialog .user-map__dialog-input {
  width: 100%;
  margin-top: var(--space-sm);
  box-sizing: border-box;
}

.user-map__copied {
  margin: var(--space-sm) 0 0;
  font-size: 0.875rem;
  color: var(--accent-primary, #0ce467);
}

.user-map__help-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.user-map__help-sec h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
  color: var(--text-primary);
}

.user-map__help-sec ul {
  margin: 0;
  padding-left: 1.25rem;
}

.user-map__save-notice {
  flex: 1 0 100%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--accent-primary, #0ce467);
  background: rgba(12, 228, 103, 0.1);
  border: 1px solid rgba(12, 228, 103, 0.28);
}

.user-maps-page .user-map-page__layout {
  max-width: 52rem;
}

.user-maps-page__intro {
  margin-bottom: var(--space-lg);
}

.user-maps-app {
  min-width: 0;
}

.user-maps__toolbar {
  margin-bottom: var(--space-md);
}

.user-maps__table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.user-maps__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.user-maps__table th,
.user-maps__table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.user-maps__table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.user-maps__table tbody tr:last-child td {
  border-bottom: none;
}

.user-maps__cell-title a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}

.user-maps__cell-title a:hover {
  color: var(--accent-primary, #0ce467);
}

.user-maps__cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.user-maps__empty {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
  line-height: 1.5;
}

.user-maps__cta {
  margin: 0;
}

.user-map__btn--sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}

.user-maps__error {
  color: #f87171;
}

@media (max-width: 899px) {
  .user-map__toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .user-map__toolbar-actions {
    margin-left: 0;
  }

  .user-maps__cell-actions {
    justify-content: flex-start;
  }
}
