/* Atlas Collection — page-specific styles */

:root {
  --atlas-shadow-soft: 0 8px 24px -16px rgba(15,23,42,0.18);
  --atlas-shadow-soft-dark: 0 14px 32px -20px rgba(5,12,30,0.32);
  --atlas-shadow-inset: inset 0 1px 0 rgba(15,23,42,0.08);
}

.btn-pill,
#atlasInlineToolbar .atlas-inline-toolbar__save,
.atlas-list-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  font-weight:600;
  border:1px solid transparent;
  box-shadow:var(--atlas-shadow-soft);
  transition:background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.btn-pill--primary{ background:linear-gradient(180deg, rgba(191,219,254,0.55), rgba(147,197,253,0.45)); color:#1e293b; border-color:rgba(99,102,241,0.18); }
.btn-pill--primary:hover{ box-shadow:0 6px 18px -10px rgba(59,130,246,0.25); }

.btn-pill--ghost{ background:#f8fafc; color:#0f172a; border-color:rgba(148,163,184,0.3); }

.card-dark{
  background:rgba(15,23,42,0.9);
  color:#e2e8f0;
  border:1px solid rgba(148,163,184,0.26);
  box-shadow:var(--atlas-shadow-soft-dark);
  backdrop-filter:saturate(140%) blur(6px);
}

/* Page title + lead (kept minimal) */
.atlas-page .page-title{ color: var(--fg); margin-bottom: 1rem }
.atlas-page .lead{ color: var(--muted); margin-bottom: 2rem; max-width: 62ch; line-height: 1.65 }
html.theme-light .atlas-page .page-title{ color:#0f172a !important }
html.theme-light .atlas-page .lead{ color:#334155 !important }
html.theme-dark .atlas-page .page-title{ color:#f3f7ff !important }
html.theme-dark .atlas-page .lead{ color:rgba(212,224,244,.92) !important }

.atlas-categories__title{
  margin:0 0 1.25rem;
  font-size:1.25rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:700;
}

#atlasCollection:not([data-atlas-list-fragment]){
  background: var(--card);
  color: var(--fg);
  border-radius: clamp(18px, 3vw, 28px);
  padding: clamp(1.1rem, 2vw, 2rem);
  margin-top: clamp(0.5rem, 1.5vw, 1.25rem);
  box-shadow: var(--atlas-shadow-soft);
  border: 1px solid rgba(148,163,184,0.16);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
html.theme-light #atlasCollection:not([data-atlas-list-fragment]){
  background: linear-gradient(180deg, rgba(248,250,252,0.96), rgba(241,245,249,0.98));
  border-color: rgba(148,163,184,0.18);
  box-shadow: var(--atlas-shadow-soft);
  color: #0f172a;
}
html.theme-dark #atlasCollection:not([data-atlas-list-fragment]){
  background: rgba(11,17,26,0.92);
  border-color: rgba(148,163,184,0.28);
  box-shadow: var(--atlas-shadow-soft-dark);
  color: #e2e8f0;
}
#atlasCollection:not([data-atlas-list-fragment]) .page-title{
  text-shadow: 0 1px 2px rgba(15,23,42,0.12);
}
html.theme-dark #atlasCollection:not([data-atlas-list-fragment]) .page-title{
  text-shadow: 0 2px 6px rgba(3,7,18,0.65);
}
#atlasCollection:not([data-atlas-list-fragment]) .lead{
  font-size: clamp(1.02rem, 1.9vw, 1.15rem);
}
html.theme-dark #atlasCollection:not([data-atlas-list-fragment]) .lead{
  text-shadow: 0 1px 3px rgba(2,6,23,0.55);
}

/* Headings */
html[data-theme="light"] .atlas-page h1,
html[data-theme="light"] .atlas-page h2,
html[data-theme="light"] .atlas-page h3,
html[data-theme="light"] .atlas-page h4{ color:#000 !important }
html[data-theme="dark"] .atlas-page h1,
html[data-theme="dark"] .atlas-page h2,
html[data-theme="dark"] .atlas-page h3,
html[data-theme="dark"] .atlas-page h4{ color:#f0f0f0 !important }
.atlas-page .category-block{ margin-top:2.75rem; padding-top:1.5rem; border-top:1px solid rgba(13,110,253,.22) }
.atlas-page .category-block:first-of-type{ margin-top:1.5rem; padding-top:0; border-top:none }
.atlas-page .atlas-subcategory{
  content-visibility:auto;
  contain-intrinsic-size: 720px;
}
.atlas-page .category-header h3{ margin:0 0 .8rem; font-size:1.85rem; letter-spacing:.02em; padding-bottom:.35rem; border-bottom:3px solid rgba(13,110,253,.35) }
html.theme-dark .atlas-page .category-header h3,
html.theme-light.dim-theme .atlas-page .category-header h3{ border-bottom-color: rgba(16,185,129,.45) }
html.theme-dark .atlas-page .category-block,
html.theme-light.dim-theme .atlas-page .category-block{ border-top-color:rgba(148,163,184,.25) }
.atlas-page .subcategory h4{ margin:.9rem 0 .5rem; padding:.25rem .5rem; background:#eef2f7; border-left:4px solid #0d6efd; border-radius:6px }
html.theme-dark .atlas-page .subcategory h4,
html.theme-light.dim-theme .atlas-page .subcategory h4{ background:rgba(255,255,255,.06); border-left-color:#10b981 }

/* Search bar */
#atlas-search{ margin:16px 0 24px }
#atlas-search .search-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap }
#atlas-search .search-input-wrap{ position:relative; flex:1 1 520px; min-width:240px }
#atlas-search .search-input-wrap svg{ position:absolute; left:12px; top:50%; transform:translateY(-50%); width:20px; height:20px; color:#64748b; opacity:.9; pointer-events:none }
#atlas-search input[type="search"]{ width:100%; height:48px; padding:10px 12px 10px 42px; border-radius:12px; border:2px solid #cbd5e1; background:#ffffff; color:#0f172a; box-shadow:0 2px 8px rgba(0,0,0,.05); font-weight:600 }
#atlas-search input[type="search"]::placeholder{ color:#64748b; font-weight:500 }
#atlas-search input[type="search"]:focus{ outline:none; border-color:#0d6efd; box-shadow:0 0 0 4px rgba(13,110,253,.18) }
#atlas-search button{ height:48px; padding:0 14px; border-radius:12px; border:2px solid #cbd5e1; background:#f8fafc; color:#0f172a; font-weight:700 }
#atlas-search .results-meta{ margin-top:8px; font-size:.95rem }
#liveSearchResults{ display:none; margin-top:10px }
html.theme-dark #atlas-search .search-input-wrap svg, html.theme-light.dim-theme #atlas-search .search-input-wrap svg{ color:#93a4b8 }
html.theme-dark #atlas-search input[type="search"], html.theme-light.dim-theme #atlas-search input[type="search"]{ background:#0f141b; color:#e5e7eb; border-color:#475569; box-shadow:0 2px 10px rgba(0,0,0,.35) }
html.theme-dark #atlas-search input[type="search"]::placeholder, html.theme-light.dim-theme #atlas-search input[type="search"]::placeholder{ color:#94a3b8 }
html.theme-dark #atlas-search input[type="search"]:focus, html.theme-light.dim-theme #atlas-search input[type="search"]:focus{ border-color:#10b981; box-shadow:0 0 0 4px rgba(16,185,129,.22) }
html.theme-dark #atlas-search button, html.theme-light.dim-theme #atlas-search button{ background:#111827; color:#e5e7eb; border-color:#475569 }

/* Categories overview */
#atlas-categories-overview{ margin:10px 0 4px }
#atlas-categories-overview .cat-list{ display:flex; flex-wrap:wrap; gap:8px 14px; font-weight:700 }
#atlas-categories-overview .cat-list a{ text-decoration:none; padding:4px 8px; border-radius:8px; border:1px solid var(--border, #e5e7eb) }
html.theme-light #atlas-categories-overview .cat-list a{ background:#f8fafc; color:#0f172a; border-color:#cbd5e1 }
html.theme-light #atlas-categories-overview .cat-list a:hover{ background:#eef2f7 }
html.theme-dark #atlas-categories-overview .cat-list a,
html.theme-light.dim-theme #atlas-categories-overview .cat-list a{ background:#111827; color:#e5e7eb; border-color:#374151 }
html.theme-dark #atlas-categories-overview .cat-list a:hover,
html.theme-light.dim-theme #atlas-categories-overview .cat-list a:hover{ background:#1f2937 }

/* Legal notice links: ensure strong visibility in both themes */
.atlas-page .legal-notice a:not(.btn){
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 2px;
  font-weight: 700;
}
.atlas-page .legal-notice a:not(.btn):hover{ color: var(--link-hover) }
.atlas-page .legal-notice a:not(.btn):visited{ color: var(--link) }

/* Atlas list */
.atlas-page .map-list{ list-style:none; margin:0; padding:0 }
.atlas-page .map-item{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; border:none; border-radius:10px; margin:3px 0; position:relative; background-clip:padding-box }
.theme-dark .atlas-page .map-item{ color:#d6dce2 }
.atlas-page .map-title{ font-weight:600; line-height:1.35; margin:0; display:inline-block; padding:2px 6px; border-radius:6px }
.atlas-page .map-links{ display:inline-flex; flex-wrap:wrap; gap:8px }

/* Minimal zebra stripes for entire rows */

.atlas-page .map-list .map-item{ border:1px solid rgba(148,163,184,0.22); box-shadow:var(--atlas-shadow-inset); color:#0f172a }
.atlas-page .map-list .map-item:nth-child(odd){ background:#f8fafc }
.atlas-page .map-list .map-item:nth-child(even){ background:#eef2f7 }
.atlas-page .map-list .map-item:hover{ background:#e2e8f0 }

html.theme-dark .atlas-page .map-list .map-item,
html.theme-light.dim-theme .atlas-page .map-list .map-item{
  border:1px solid rgba(59,73,99,0.55);
  box-shadow:var(--atlas-shadow-inset);
  color:#dbeafe;
}
html.theme-dark .atlas-page .map-list .map-item:nth-child(odd),
html.theme-light.dim-theme .atlas-page .map-list .map-item:nth-child(odd){ background:rgba(15,23,42,0.7) }
html.theme-dark .atlas-page .map-list .map-item:nth-child(even),
html.theme-light.dim-theme .atlas-page .map-list .map-item:nth-child(even){ background:rgba(15,23,42,0.58) }
html.theme-dark .atlas-page .map-list .map-item:hover,
html.theme-light.dim-theme .atlas-page .map-list .map-item:hover{ background:rgba(17,24,39,0.82) }

html.theme-light .atlas-page .map-list .map-item,
html.theme-light.dim-theme .atlas-page .map-list .map-item{
  color:#dce7ff;
}
html.theme-light .atlas-page .map-title{ color:#0f172a; }
html.theme-light.dim-theme .atlas-page .map-title,
html.theme-dark .atlas-page .map-title{ color:#e2e8f0; }


/* Numbering badge */
.atlas-page{ counter-reset: atlas; isolation:isolate }
.atlas-page .map-item::before{
  counter-increment: atlas;
  content: counter(atlas);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.85rem;
  height:1.85rem;
  border-radius:999px;
  font-weight:700;
  font-size:.82rem;
  margin-right:8px;
  flex:0 0 auto;
  background:rgba(59,130,246,0.12);
  color:#1d4ed8;
  border:1px solid rgba(59,130,246,0.18);
}
html.theme-dark .atlas-page .map-item::before,
html.theme-light.dim-theme .atlas-page .map-item::before{
  background:rgba(255,255,255,0.08);
  color:#cbd5f5;
  border-color:rgba(148,163,184,0.3);
}
.atlas-page .map-item{ padding-left:12px }
.atlas-page .map-item > .map-title{ margin-left:0 }
html[dir="rtl"] .atlas-page .map-item{ padding-left:0; padding-right:12px }
html[dir="rtl"] .atlas-page .map-item::before{ margin-right:0; margin-left:8px }
html[dir="rtl"] .atlas-page .map-title.as-h4::before{ margin-right:0; margin-left:8px }
html[dir="rtl"] .atlas-page .map-links{ margin-left:0; margin-right:8px }
#liveSearchResults .map-item::before{ display:none }
#liveSearchResults .map-item.map-item--search{ flex-direction:column; align-items:flex-start; gap:6px; padding:12px 14px; }
#liveSearchResults .map-item.map-item--search .map-links{ gap:6px; }
#liveSearchResults .map-result-meta{ font-size:.85rem; color:#475569; font-weight:500; }
html.theme-dark #liveSearchResults .map-result-meta,
html.theme-light.dim-theme #liveSearchResults .map-result-meta{ color:#cbd5f5; }

/* Links */
.atlas-page .map-links a{ display:none }
.atlas-page .map-links a.see-the-atlas-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  font-weight:600;
  border:1px solid rgba(99,102,241,0.18);
  box-shadow:var(--atlas-shadow-soft);
  background:linear-gradient(180deg, rgba(191,219,254,0.55), rgba(147,197,253,0.45));
  color:#1e293b;
  transition:background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.atlas-page .map-links a.see-the-atlas-link:hover{ box-shadow:0 6px 18px -10px rgba(59,130,246,0.25); }
html.theme-dark .atlas-page .map-links a.see-the-atlas-link,
html.theme-light.dim-theme .atlas-page .map-links a.see-the-atlas-link{ color:#e0f2ff; background:linear-gradient(180deg, rgba(96,165,250,0.25), rgba(37,99,235,0.32)); border:1px solid rgba(96,165,250,0.4); box-shadow:0 1px 0 rgba(59,130,246,0.28) inset, 0 6px 20px -12px rgba(30,64,175,0.85) }
html.theme-dark .atlas-page .map-links a.see-the-atlas-link:hover,
html.theme-light.dim-theme .atlas-page .map-links a.see-the-atlas-link:hover{ background:linear-gradient(180deg, rgba(96,165,250,0.38), rgba(37,99,235,0.45)); }
.atlas-page .map-title-link{ color:inherit; text-decoration:none }
.atlas-page .map-title-link:hover{ text-decoration:underline }

/* Map title dot (as h4) */
.atlas-page .map-title.as-h4{ display:inline-block; font-weight:700 }
.atlas-page .map-title.as-h4::before{ content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background:#0d6efd; margin-right:8px; vertical-align:middle }
html.theme-dark .atlas-page .map-title.as-h4::before, html.theme-light.dim-theme .atlas-page .map-title.as-h4::before{ background:#10b981 }

/* Back-to-top button */
#backToTopBtn.back-to-top{ position:fixed; right:18px; bottom:18px; width:44px; height:44px; display:grid; place-items:center; border-radius:999px; border:1px solid rgba(5,150,105,0.35); background:linear-gradient(135deg, rgba(16,185,129,0.22), rgba(5,150,105,0.22)); backdrop-filter:saturate(180%) blur(8px); -webkit-backdrop-filter:saturate(180%) blur(8px); box-shadow:var(--bt-shadow, 0 8px 24px rgba(5,150,105,0.25)), inset 0 1px 0 rgba(255,255,255,0.25); color:#064e3b; font-size:18px; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease, box-shadow .25s ease }
html.theme-light #backToTopBtn.back-to-top{ --bt-shadow:0 10px 30px rgba(5,150,105,0.45); --bt-shadow-hover:0 14px 36px rgba(5,150,105,0.55); background:linear-gradient(150deg, rgba(6,95,70,0.95), rgba(5,150,105,0.85)); border-color:rgba(4,120,87,0.92); color:#ecfdf5; text-shadow:0 2px 6px rgba(0,0,0,0.35) }
#backToTopBtn.back-to-top.visible{ opacity:1; pointer-events:auto }
#backToTopBtn.back-to-top:hover{ transform:translateY(-2px); box-shadow:var(--bt-shadow-hover, 0 12px 28px rgba(5,150,105,0.35)), inset 0 1px 0 rgba(255,255,255,0.35) }
@media (prefers-color-scheme: dark){
  #backToTopBtn.back-to-top{ --bt-shadow:0 8px 24px rgba(16,185,129,0.25); --bt-shadow-hover:0 12px 28px rgba(16,185,129,0.35); color:#ecfdf5; border-color:rgba(16,185,129,0.45); background:linear-gradient(135deg, rgba(16,185,129,0.18), rgba(5,150,105,0.18)); font-weight:800; font-size:20px; text-shadow:0 1px 0 rgba(0,0,0,0.45), 0 0 6px rgba(16,185,129,0.55); -webkit-text-stroke:.25px rgba(0,0,0,0.35) }
}

/* Toast */
.toast{ position:fixed; left:50%; transform:translateX(-50%); bottom:18px; padding:10px 14px; border-radius:8px; box-shadow:0 6px 16px rgba(15,23,42,0.18); display:none; z-index:4000; border:1px solid var(--border); background: var(--card); color: var(--fg) }

/* Admin quick guide */
.admin-quick-guide{ margin:12px 0 20px; padding:14px 16px; border:1px solid #d97706; border-radius:10px; background:#fde68a; color:#1f2937; position:relative }
@media (prefers-color-scheme: dark){ .admin-quick-guide{ background:#f59e0b; color:#0b1020; border-color:#b45309 } }
html.theme-dark .admin-quick-guide{ background:#f59e0b; color:#0b1020; border-color:#b45309 }
.admin-quick-guide ul{ margin:0 0 0 18px }

/* Admin Quick Guide Popover */
.aqg-popover{ position:fixed; z-index:3500; max-width:360px; border:1px solid #d97706; border-radius:10px; background:#fde68a; color:#1f2937; box-shadow:0 8px 20px rgba(0,0,0,.18); padding:12px 14px 10px; display:none }
.aqg-popover.visible{ display:block }
.aqg-popover__head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px }
.aqg-popover__close{ border:1px solid #d1d5db; border-radius:6px; background:#fff; padding:2px 8px; cursor:pointer }
@media (prefers-color-scheme: dark){
  .aqg-popover{ background:#f59e0b; color:#0b1020; border-color:#b45309 }
  .aqg-popover__close{ background:#111827; color:#e5e7eb; border-color:#374151 }
}

/* Modal (inline editor) */
.modal{ position:fixed; inset:0; display:none; background:rgba(0,0,0,.5); z-index:3000 }
.modal__panel{ background:#fff; max-width:960px; width:90%; max-height:85vh; margin:7vh auto; border-radius:10px; box-shadow:0 12px 32px -18px rgba(15,23,42,0.3); display:flex; flex-direction:column }
.modal__header{ padding:12px 16px; border-bottom:1px solid #eee; display:flex; align-items:center; justify-content:space-between }
.modal__body{ padding:16px; overflow:auto }
.modal__footer{ position:sticky; bottom:0; padding:10px 16px; border-top:1px solid #eee; background:#fff; display:flex; justify-content:flex-end; gap:8px }
.form-label{ display:block; font-weight:600; margin-bottom:4px }
.form-input{ width:100%; padding:8px; border:1px solid #ddd; border-radius:6px }
.muted{ color:#666 }
.admin-inline-controls > * + *{ margin-left:6px }
.is-hidden{ display:none !important }

/* Dark-friendly modal */
@media (prefers-color-scheme: dark){
  .modal__panel, .modal__body{ background:#0f1115; color:#e5e7eb; border-color:#1f2937 }
  .form-input{ background:#111827; color:#e5e7eb; border-color:#374151 }
}

/* Drag handles */
.drag-handle, .nav-drag{ margin-left:6px; padding:2px 8px; min-width:24px; line-height:1; display:inline-flex; align-items:center; justify-content:center; font-weight:700; border:1px solid #d1d5db; border-radius:6px; cursor:grab; user-select:none; background:#e5e7eb; color:#111827 }
@media (prefers-color-scheme: dark){ .drag-handle, .nav-drag{ background:#1f2937; color:#e5e7eb; border-color:#374151 } }

/* Responsive tweaks */
@media (max-width: 679px){
  .atlas-page .map-title.as-h4::before{ display:none; content:none }
  .atlas-page .map-item{ display:block; padding:6px 8px; position:relative; margin-left:22px }
  .atlas-page .map-title{ display:inline-block; font-size:.98rem; margin:0 }
  .atlas-page .map-links{ display:inline-block; white-space:nowrap; margin-left:8px; vertical-align:baseline; gap:6px }
  .atlas-page .see-the-atlas-link{ padding:4px 10px; font-size:.82rem; border-radius:6px }
  .atlas-page .map-links a{ padding:4px 10px; font-size:.82rem; border-radius:6px }
  .atlas-page .map-item::before{ width:1.5rem; height:1.5rem; font-size:.78rem; margin-right:0; position:absolute; left:-22px; top:10px }
}
@media (min-width: 680px){
  .atlas-page .map-item{ flex-direction:row; align-items:center; justify-content:flex-start }
  .atlas-page .map-title{ margin-right:10px }
  .atlas-page .map-links{ margin-left:0 }
}
@media (min-width: 980px){ .atlas-page .see-the-atlas-link{ padding:3px 8px; font-size:.70rem; border-radius:10px; font-weight:600 } }

/* Modal utilities and admin fixes */
.modal__actions{ display:flex; gap:8px }
.form-row{ margin-bottom:10px }
.form-row--compact{ margin-bottom:8px }
.inline-row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px }
.muted--small{ font-size:11px; margin-top:2px }
.muted--sm{ font-size:12px }
.modal__results{ border:1px solid #eee; border-radius:6px; margin-top:6px }

/* Categories label text */
#atlas-categories-overview .label{ font-weight:800; margin-bottom:6px }

@media (max-width: 679px){
  html[dir="rtl"] .atlas-page .map-item{ margin-left:0; margin-right:22px }
  html[dir="rtl"] .atlas-page .map-links{ margin-left:0; margin-right:8px }
  html[dir="rtl"] .atlas-page .map-item::before{ left:auto; right:-22px }
}

/* Highlighted mark (search) */
mark.hl{ background-color:#fef08a; color:#1f2937; padding:2px 4px; border-radius:4px; font-weight:700 }
html.theme-dark mark.hl, html.theme-light.dim-theme mark.hl{ background-color:#f59e0b; color:#0b1020 }

/* Inline toolbar */
#atlasInlineToolbar{
  position:fixed;
  left:16px;
  top:calc(var(--header-h, 72px) + 16px);
  transform:none;
  z-index:2200;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  transition:transform .2s ease;
}
#atlasInlineToolbar.is-expanded{
  flex-direction:row;
  align-items:center;
  gap:12px;
}
#atlasInlineToolbar .atlas-inline-toolbar__content{ display:none; pointer-events:auto; }
#atlasInlineToolbar.is-expanded .atlas-inline-toolbar__content{ display:flex; align-items:center; gap:12px; padding:8px 14px; border-radius:999px; }
.card-dark,
#atlasInlineToolbar.is-expanded .atlas-inline-toolbar__content,
#atlasInlineToolbar .atlas-inline-toolbar__launcher,
#atlasTrashPanel,
.atlas-image-picker{ background:rgba(15,23,42,0.9); color:#e2e8f0; border:1px solid rgba(148,163,184,0.26); box-shadow:var(--atlas-shadow-soft-dark); backdrop-filter:saturate(140%) blur(6px); }
html.theme-light #atlasInlineToolbar.is-expanded .atlas-inline-toolbar__content,
html.theme-light #atlasInlineToolbar .atlas-inline-toolbar__launcher{ background:rgba(248,250,252,0.92); color:#0f172a; border-color:rgba(148,163,184,0.32); box-shadow:var(--atlas-shadow-soft); }
#atlasInlineToolbar .atlas-inline-toolbar__launcher{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:50%;
  cursor:pointer;
  transition:background .2s ease, transform .2s ease, box-shadow .2s ease;
}
#atlasInlineToolbar .atlas-inline-toolbar__launcher:hover{ transform:translateY(-1px); box-shadow:0 10px 24px rgba(15,23,42,0.25); }
#atlasInlineToolbar.is-expanded .atlas-inline-toolbar__launcher{ display:none; }
#atlasInlineToolbar .atlas-inline-toolbar__toggle{ display:inline-flex; align-items:center; gap:8px; border:none; background:transparent; color:inherit; font-weight:700; cursor:pointer; padding:6px 12px; border-radius:999px; transition:background .2s ease, transform .2s ease; }
#atlasInlineToolbar .atlas-inline-toolbar__toggle:hover{ background:rgba(15,23,42,.15); }
html.theme-light #atlasInlineToolbar .atlas-inline-toolbar__toggle:hover{ background:rgba(226,232,240,.8); }
#atlasInlineToolbar .atlas-inline-toolbar__save{ gap:6px; border:none; background:#22c55e; color:#032d1b; }
#atlasInlineToolbar .atlas-inline-toolbar__save:hover{ background:#16a34a; }
html.theme-dark #atlasInlineToolbar .atlas-inline-toolbar__save{ background:#34d399; color:#022c22; }
html.theme-dark #atlasInlineToolbar .atlas-inline-toolbar__save:hover{ background:#10b981; }
#atlasInlineToolbar .atlas-inline-toolbar__save:disabled{ opacity:.55; cursor:not-allowed; box-shadow:none; background:rgba(148,163,184,.4); color:#1e293b; }
html.theme-dark #atlasInlineToolbar .atlas-inline-toolbar__save:disabled{ background:rgba(148,163,184,.3); color:#cbd5f5; }
#atlasInlineToolbar .atlas-inline-toolbar__icon{ width:20px; height:20px; }
#atlasInlineToolbar .atlas-inline-toolbar__status{ min-width:90px; font-size:.85rem; font-weight:600; }
#atlasInlineToolbar .atlas-inline-toolbar__status.is-error{ color:#ef4444; }
#atlasInlineToolbar .atlas-inline-toolbar__status.is-ok{ color:#22c55e; }
#atlasInlineToolbar .atlas-inline-toolbar__trash{ display:inline-flex; align-items:center; gap:6px; border:none; background:transparent; color:inherit; font-weight:700; cursor:pointer; padding:6px 12px; border-radius:999px; transition:background .2s ease; }
#atlasInlineToolbar .atlas-inline-toolbar__trash:hover{ background:rgba(15,23,42,.18); }
html.theme-light #atlasInlineToolbar .atlas-inline-toolbar__trash:hover{ background:rgba(226,232,240,.85); }
#atlasInlineToolbar .atlas-inline-toolbar__collapse{ border:none; background:transparent; color:inherit; font-size:1.35rem; line-height:1; padding:6px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; cursor:pointer; transition:background .2s ease; }
#atlasInlineToolbar .atlas-inline-toolbar__collapse:hover{ background:rgba(15,23,42,.2); }
html.theme-light #atlasInlineToolbar .atlas-inline-toolbar__collapse:hover{ background:rgba(226,232,240,.8); }

body:not(.atlas-editing) .map-item__editor{ display:none; }
body:not(.atlas-editing) .map-item--adder{ display:none !important; }
.map-item__editor{ display:flex; flex-direction:column; gap:8px; width:100%; background:rgba(15,23,42,.04); padding:10px 12px; border-radius:10px; margin-top:8px; }
html.theme-light .map-item__editor{ color:#0f172a; }
html.theme-dark .map-item__editor{ background:rgba(148,163,184,.08); }
.map-item__editor label{ display:flex; flex-direction:column; font-weight:600; font-size:.85rem; gap:4px; }
html.theme-light .map-item__editor label{ color:#0f172a; }
.map-item__editor input[type="text"],
.map-item__editor input[type="url"]{ padding:6px 8px; border-radius:6px; border:1px solid rgba(148,163,184,.6); font-size:.88rem; width:100%; }
.map-item__editor input[readonly]{ background:rgba(148,163,184,.12); color:inherit; cursor:default; font-family:"SFMono-Regular", "Menlo", "Roboto Mono", monospace; white-space:nowrap; overflow-x:auto; }
.map-item__editor input[readonly]{ direction: rtl; text-align: left; unicode-bidi: plaintext; }
.map-item__editor input[readonly]:focus{ outline:none; }
html.theme-light .map-item__editor input[type="text"],
html.theme-light .map-item__editor input[type="url"]{ background:#ffffff; color:#0f172a; border-color:rgba(100,116,139,.35); }
html.theme-light .map-item__editor input[readonly]{ color:#1e293b; }
html.theme-light .map-item__editor input::placeholder{ color:rgba(100,116,139,.8); }
.map-item__editor a{ color:inherit; text-decoration:underline; }
html.theme-light .map-item__editor a{ color:#0f172a; font-weight:600; }
html.theme-light .map-item__input-row,
html.theme-light .map-item__input-row input[type="url"],
html.theme-light .map-item__input-row input[type="text"]{ color:#0f172a; }
.map-item__editor{ position:relative; }
.map-item__input-row{ display:flex; gap:6px; align-items:center; overflow:visible; }
.map-item__input-row input[type="url"],
.map-item__input-row input[type="text"]{ flex:1 1 auto; min-width:0; }
.map-item__upload,
.map-item__library{ padding:6px 10px; border-radius:6px; border:1px solid rgba(148,163,184,.5); background:rgba(226,232,240,.9); font-size:.78rem; font-weight:600; cursor:pointer; transition:background .2s ease; }
.map-item__library{ background:rgba(148,163,184,.15); }
html.theme-dark .map-item__upload{ background:rgba(148,163,184,.15); border-color:rgba(148,163,184,.4); color:#e2e8f0; }
html.theme-dark .map-item__library{ background:rgba(30,41,59,.6); border-color:rgba(71,85,105,.6); color:#e2e8f0; }
.map-item__upload:hover,
.map-item__library:hover{ background:rgba(59,130,246,.12); }
.map-item__editor-actions{ display:flex; justify-content:space-between; align-items:center; gap:12px; position:relative; overflow:visible; }
.map-item__toggle{ display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:.85rem; }
.map-item__toggle-group{ display:inline-flex; align-items:center; gap:8px; }
.map-item__delete{ border:1px solid rgba(239,68,68,.45); background:rgba(239,68,68,.12); color:#b91c1c; padding:6px 14px; border-radius:6px; font-weight:600; cursor:pointer; }
html.theme-dark .map-item__delete{ background:rgba(239,68,68,.2); color:#fca5a5; border-color:rgba(248,113,113,.4); }

.map-item--adder{ justify-content:flex-start; background:transparent; padding:6px 0; }
.map-item--adder button{ display:inline-flex; align-items:center; gap:6px; border:1px dashed rgba(59,130,246,.45); background:rgba(59,130,246,.08); color:#0f172a; padding:6px 12px; border-radius:999px; font-weight:600; cursor:pointer; }
.map-add__icon{ display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:rgba(59,130,246,.2); color:#1d4ed8; font-weight:900; }
html.theme-dark .map-item--adder button{ background:rgba(37,99,235,.18); color:#e2e8f0; border-color:rgba(96,165,250,.4); }
.map-item--inactive{ opacity:.55; }

.atlas-editable{ outline:2px dashed rgba(16,185,129,.6); outline-offset:4px; border-radius:6px; padding:2px 4px; }
.atlas-subcategory .subcategory__head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.atlas-subcategory__actions{ display:inline-flex; align-items:center; gap:8px; position:relative; overflow:visible; }
.atlas-help{ position:relative; display:inline-flex; flex-shrink:0; }
.atlas-help__toggle{ width:22px; height:22px; border-radius:50%; border:1px solid rgba(148,163,184,.6); background:rgba(226,232,240,.9); color:#1f2937; font-size:.85rem; font-weight:700; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; padding:0; line-height:1; }
.atlas-help__toggle:hover,
.atlas-help__toggle:focus-visible{ background:rgba(59,130,246,.18); color:#1d4ed8; border-color:rgba(59,130,246,.4); outline:none; }
html.theme-dark .atlas-help__toggle{ background:rgba(30,41,59,.7); border-color:rgba(71,85,105,.6); color:#e2e8f0; }
html.theme-dark .atlas-help__toggle:hover,
html.theme-dark .atlas-help__toggle:focus-visible{ background:rgba(59,130,246,.25); color:#bfdbfe; border-color:rgba(96,165,250,.6); }
.atlas-help__popover{ position:absolute; top:calc(100% + 6px); right:0; min-width:220px; max-width:260px; background:#ffffff; color:#0f172a; border:1px solid rgba(148,163,184,.4); border-radius:10px; padding:10px 12px; box-shadow:0 20px 35px -15px rgba(15,23,42,.45); font-size:.78rem; line-height:1.35; z-index:300; }
.atlas-help__popover::before{ content:""; position:absolute; top:-6px; right:14px; width:10px; height:10px; background:inherit; border-left:inherit; border-top:inherit; transform:rotate(45deg); z-index:-1; }
html.theme-dark .atlas-help__popover{ background:rgba(15,23,42,.95); color:#e2e8f0; border-color:rgba(71,85,105,.6); box-shadow:0 20px 35px -15px rgba(15,23,42,.8); }
html.theme-dark .atlas-help__popover::before{ background:rgba(15,23,42,.95); border-color:rgba(71,85,105,.6); }
.map-item__reorder{ display:inline-flex; align-items:center; gap:4px; }
.map-item__move{ border:1px solid rgba(148,163,184,.5); border-radius:6px; background:rgba(226,232,240,.7); padding:4px 8px; font-size:.75rem; cursor:pointer; font-weight:700; color:#1f2937; }
.map-item__move:hover{ background:rgba(59,130,246,.18); color:#1d4ed8; }
html.theme-dark .map-item__move{ background:rgba(30,41,59,.7); border-color:rgba(71,85,105,.6); color:#e2e8f0; }
html.theme-dark .map-item__move:hover{ background:rgba(59,130,246,.25); color:#bfdbfe; }
.map-item--new .map-item__editor{ display:flex !important; background:rgba(59,130,246,.1); border:1px dashed rgba(59,130,246,.5); }
html.theme-dark .map-item--new .map-item__editor{ background:rgba(37,99,235,.15); border-color:rgba(96,165,250,.5); }
.map-item__editor--new-actions{ display:flex; gap:8px; align-items:center; justify-content:flex-end; }
.map-item__save{ border:1px solid rgba(34,197,94,.6); background:rgba(16,185,129,.15); color:#047857; padding:6px 14px; border-radius:6px; font-weight:600; cursor:pointer; }
html.theme-dark .map-item__save{ background:rgba(16,185,129,.25); color:#bbf7d0; border-color:rgba(74,222,128,.45); }
.map-item__cancel{ border:1px solid rgba(148,163,184,.6); background:rgba(148,163,184,.1); color:#475569; padding:6px 14px; border-radius:6px; font-weight:600; cursor:pointer; }
html.theme-dark .map-item__cancel{ background:rgba(30,41,59,.7); color:#e2e8f0; border-color:rgba(71,85,105,.6); }

.atlas-trash-panel{ position:fixed; right:20px; top:calc(var(--header-h,72px) + 60px); width:min(320px, 92vw); max-height:70vh; overflow:auto; border-radius:14px; padding:14px; z-index:2200; }
.atlas-trash-panel[hidden]{ display:none; }
.atlas-trash-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.atlas-trash-head h3{ margin:0; font-size:1rem; font-weight:700; }
.atlas-trash-close{ border:none; background:transparent; font-size:1.2rem; font-weight:700; cursor:pointer; color:inherit; }
.atlas-trash-list{ display:flex; flex-direction:column; gap:10px; }
.atlas-trash-empty{ font-size:.9rem; color:rgba(226,232,240,.8); }
html.theme-light .atlas-trash-empty{ color:#475569; }
.atlas-trash-item{ padding:10px 12px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:rgba(15,23,42,.35); display:flex; flex-direction:column; gap:6px; }
html.theme-light .atlas-trash-item{ background:rgba(226,232,240,.6); border-color:rgba(148,163,184,.45); }
.atlas-trash-item strong{ font-weight:700; }
.atlas-trash-meta{ font-size:.8rem; color:rgba(226,232,240,.75); }
html.theme-light .atlas-trash-meta{ color:#475569; }
.atlas-trash-actions{ display:flex; gap:8px; justify-content:flex-end; }
.atlas-trash-restore{ border:1px solid rgba(59,130,246,.5); background:rgba(59,130,246,.12); color:#1d4ed8; padding:6px 12px; border-radius:6px; font-weight:600; cursor:pointer; }
html.theme-dark .atlas-trash-restore{ color:#93c5fd; border-color:rgba(147,197,253,.5); }
#atlasImagePicker{ position:fixed; inset:0; background:rgba(15,23,42,.55); display:none; align-items:center; justify-content:center; z-index:3000; }
#atlasImagePicker.is-open{ display:flex; }
.atlas-image-picker{ width:min(90vw, 720px); max-height:80vh; border-radius:16px; display:flex; flex-direction:column; }
.atlas-image-picker__head{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid rgba(148,163,184,.3); }
.atlas-image-picker__body{ padding:16px 20px; overflow:auto; display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); }
.atlas-image-picker__item{ border:1px solid rgba(148,163,184,.3); border-radius:10px; background:#fff; padding:10px; display:flex; flex-direction:column; gap:8px; cursor:pointer; text-align:left; font-weight:600; color:#0f172a; box-shadow:var(--atlas-shadow-soft); transition:box-shadow .2s ease, border-color .2s ease; }
.atlas-image-picker__item img{ width:100%; height:100px; object-fit:cover; border-radius:8px; }
.atlas-image-picker__item:hover{ border-color:rgba(59,130,246,.4); box-shadow:0 6px 16px rgba(59,130,246,.18); }
.atlas-image-picker__close{ border:none; background:transparent; font-size:1.4rem; cursor:pointer; }
html.theme-dark #atlasImagePicker{ background:rgba(2,6,23,.7); }
html.theme-dark .atlas-image-picker{ border:none; }
html.theme-dark .atlas-image-picker__item{ background:rgba(30,41,59,.85); color:#e2e8f0; border-color:rgba(51,65,85,.6); box-shadow:var(--atlas-shadow-soft-dark); }
html.theme-dark .atlas-image-picker__item:hover{ border-color:rgba(96,165,250,.5); box-shadow:0 6px 16px rgba(59,130,246,.25); }
