/* ============================================================
   7EE7IN PUBLIC THEME
   One shared Light/Dark system for Home, Gallery, Places and Journal.
   Admin remains independent and does not load this file.
   ============================================================ */
:root{
  --site-page-bg:#f6f0eb;
  --site-surface:#fffaf7;
  --site-surface-soft:#eee2dc;
  --site-surface-raised:#ffffff;
  --site-text:#211918;
  --site-muted:#766663;
  --site-line:rgba(33,25,24,.13);
  --site-accent:#b96f78;
  --site-nav-bg:rgba(248,243,239,.91);
  --site-nav-control:rgba(255,250,247,.78);
  --site-button-bg:#211918;
  --site-button-text:#fffaf7;
  --site-media-bg:#eee8e3;
  --site-shadow:0 28px 90px rgba(47,28,25,.13);
  --site-map-panel:#f8f4f1;
  --site-map-surface:#ffffff;
}

html[data-theme="dark"]{
  color-scheme:dark;
  --site-page-bg:#151210;
  --site-surface:#1d1917;
  --site-surface-soft:#241f1c;
  --site-surface-raised:#28221f;
  --site-text:#f2eae5;
  --site-muted:#afa19a;
  --site-line:rgba(242,234,229,.14);
  --site-accent:#d08b94;
  --site-nav-bg:rgba(21,18,16,.91);
  --site-nav-control:rgba(36,31,28,.82);
  --site-button-bg:#f2eae5;
  --site-button-text:#191513;
  --site-media-bg:#201c1a;
  --site-shadow:0 28px 90px rgba(0,0,0,.28);
  --site-map-panel:#191513;
  --site-map-surface:#211c19;

  /* Existing public variable systems inherit the shared palette. */
  --bg:var(--site-page-bg);
  --paper:var(--site-surface);
  --ink:var(--site-text);
  --muted:var(--site-muted);
  --accent:var(--site-accent);
  --accent-soft:#6a4449;
  --line:var(--site-line);
  --shadow:var(--site-shadow);

  --v9-bg:var(--site-page-bg);
  --v9-paper:var(--site-surface);
  --v9-bg2:var(--site-surface-soft);
  --v9-ink:var(--site-text);
  --v9-muted:var(--site-muted);
  --v9-accent:var(--site-accent);
  --v9-dark:#11100f;
  --v9-line:var(--site-line);
  --v9-shadow:var(--site-shadow);

  --map-paper:var(--site-map-panel);
  --map-ink:var(--site-text);
  --map-line:var(--site-line);
  --map-accent:#c47c6d;
  --map-soft:var(--site-surface-soft);
}

/* ---------- shared navigation + theme toggle ---------- */
.v9-nav-controls{
  justify-self:end;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.v9-nav-controls .v9-language{justify-self:auto;margin:0}
.site-theme-toggle{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--v9-line,var(--site-line));
  border-radius:50%;
  background:transparent;
  color:inherit;
  font-size:.92rem;
  line-height:1;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,transform .2s ease;
}
.site-theme-toggle:hover{
  transform:translateY(-1px);
  background:var(--site-nav-control);
}
.v9-nav{
  color:var(--site-text)!important;
  border-bottom-color:var(--site-line)!important;
  background:var(--site-nav-bg)!important;
}
.v9-mobile-menu-btn{
  border-color:var(--site-line)!important;
  background:var(--site-nav-control)!important;
}
.v9-mobile-menu-btn span{background:var(--site-text)!important}
.v9-mobile-drawer{
  color:var(--site-text)!important;
  background:var(--site-surface)!important;
  box-shadow:18px 0 60px rgba(0,0,0,.24)!important;
}
.v9-mobile-drawer-head,
.v9-mobile-drawer nav a{border-color:var(--site-line)!important}
.v9-mobile-drawer-head button{
  color:inherit!important;
  border-color:var(--site-line)!important;
  background:transparent!important;
}
.lang-switch{border-color:var(--site-line)!important}
.lang-switch button{color:var(--site-muted)!important}
.lang-switch button.active{
  color:var(--site-button-text)!important;
  background:var(--site-button-bg)!important;
}

@media(max-width:760px){
  .v9-nav-controls{gap:5px}
  .site-theme-toggle{width:32px;height:32px;flex-basis:32px}
}
@media(max-width:390px){
  .v9-nav{gap:8px!important;padding-left:12px!important;padding-right:12px!important}
  .v9-brand{font-size:1.06rem!important;letter-spacing:.23em!important}
  .v9-nav-controls{gap:3px}
  .site-theme-toggle{width:30px;height:30px;flex-basis:30px}
  .v9-language button{padding-left:6px!important;padding-right:6px!important}
}

/* ---------- Home ---------- */
html[data-theme="dark"] body.home-v9{background:var(--site-page-bg);color:var(--site-text)}
html[data-theme="dark"] .v9-hero{background:var(--site-surface-soft)}
html[data-theme="dark"] .v9-hero-media{border-left-color:var(--site-line);background:#2b2421}
html[data-theme="dark"] .v9-hero-placeholder{
  background:radial-gradient(circle at 75% 20%,rgba(242,234,229,.12),transparent 24%),linear-gradient(135deg,#3b302d,#6a454b)
}
html[data-theme="dark"] .v9-hero-shade{
  background:linear-gradient(90deg,rgba(29,25,23,.20),transparent 30%),linear-gradient(0deg,rgba(9,7,7,.68),transparent 44%)
}
html[data-theme="dark"] .v9-button.dark{
  color:var(--site-button-text)!important;
  background:var(--site-button-bg)!important;
  border-color:var(--site-button-bg)!important;
}
html[data-theme="dark"] .v9-button.ghost{border-color:var(--site-line)!important}
html[data-theme="dark"] .v9-button.ghost:hover{
  color:var(--site-button-text)!important;
  background:var(--site-button-bg)!important;
  border-color:var(--site-button-bg)!important;
}
html[data-theme="dark"] .v9-social-card:hover,
html[data-theme="dark"] .v9-archive-card:hover{background:var(--site-surface-raised)!important}
html[data-theme="dark"] .v9-latest-media{background:#241f1c}
html[data-theme="dark"] .v9-latest-skeleton{
  background:linear-gradient(110deg,#211c1a 8%,#312925 18%,#211c1a 33%);
  background-size:200% 100%
}
html[data-theme="dark"] .v9-archive-icon{
  color:var(--site-button-text)!important;
  background:var(--site-button-bg)!important;
}
html[data-theme="dark"] .v9-profile-panel,
html[data-theme="dark"] .v9-contact-panel{
  background:radial-gradient(circle at 88% 14%,rgba(208,139,148,.12),transparent 26%),var(--site-surface-soft)!important
}
html[data-theme="dark"] .v9-contact-panel::after{color:rgba(242,234,229,.035)!important}
html[data-theme="dark"] .v9-profile-card,
html[data-theme="dark"] .v9-journal-panel{
  background:#11100f!important;
  color:#f7efea!important;
}
html[data-theme="dark"] .v9-places-preview{
  color:var(--site-text)!important;
  background:var(--site-surface-soft)!important;
  box-shadow:0 20px 64px rgba(0,0,0,.26)!important
}
html[data-theme="dark"] .v9-places-map-preview,
html[data-theme="dark"] .v9-places-leaflet{background:#24201e!important}
html[data-theme="dark"] .v9-places-map-fallback{
  background:radial-gradient(circle at 78% 22%,rgba(208,139,148,.16),transparent 26%),radial-gradient(circle at 24% 74%,rgba(242,234,229,.08),transparent 25%),linear-gradient(145deg,#28221f,#191513)!important
}
html[data-theme="dark"] .v9-place-list-preview{background:var(--site-surface)!important}
html[data-theme="dark"] .v9-place-preview-item.is-active{background:rgba(208,139,148,.13)!important}
html[data-theme="dark"] .v9-places-leaflet .leaflet-control-attribution{
  color:rgba(242,234,229,.63)!important;
  background:rgba(21,18,16,.78)!important
}
html[data-theme="dark"] .v9-home-map-pin{
  color:#1a1614!important;
  background:#f2eae5!important;
  border-color:rgba(21,18,16,.5)!important;
  box-shadow:0 9px 26px rgba(0,0,0,.38),0 0 0 4px rgba(242,234,229,.32)!important
}
html[data-theme="dark"] .v9-home-leaflet-marker.is-active .v9-home-map-pin,
html[data-theme="dark"] .v9-home-leaflet-marker:hover .v9-home-map-pin{
  color:#fff!important;
  background:var(--site-accent)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.4),0 0 0 5px rgba(242,234,229,.30)!important
}
html[data-theme="dark"] .v9-footer{background:var(--site-page-bg)!important;border-color:var(--site-line)!important}

/* ---------- Gallery ---------- */
html[data-theme="dark"] body.gallery-page{background:var(--site-page-bg);color:var(--site-text)}
html[data-theme="dark"] .gallery-filters .nav-btn{background:rgba(36,31,28,.72)!important;border-color:var(--site-line)!important}
html[data-theme="dark"] .gallery-filters .nav-btn.active,
html[data-theme="dark"] .gallery-filters .nav-btn:hover{
  color:var(--site-button-text)!important;
  background:var(--site-button-bg)!important;
  border-color:var(--site-button-bg)!important
}
html[data-theme="dark"] .post-card{background:var(--site-surface)!important;border-color:var(--site-line)!important;box-shadow:0 16px 48px rgba(0,0,0,.18)!important}
html[data-theme="dark"] .subscriber-card .source-badge{border-color:#80555b!important;background:#3a292b!important}
html[data-theme="dark"] .gallery-page .slide{background:var(--site-media-bg)!important}
html[data-theme="dark"] .gallery-page .ambilight::after{background:rgba(21,18,16,.18)}
html[data-theme="dark"] .pill{background:var(--site-surface)!important;border-color:var(--site-line)!important}
html[data-theme="dark"] .link{color:var(--site-button-text)!important;background:var(--site-button-bg)!important}
html[data-theme="dark"] .play{color:#1a1614;background:rgba(242,234,229,.93)!important}
html[data-theme="dark"] .scroll-rail{background:rgba(242,234,229,.06)!important}
html[data-theme="dark"] .scroll-thumb{background:rgba(242,234,229,.34)!important}

/* ---------- Places / full map ---------- */
html[data-theme="dark"] body.map-page{background:var(--site-map-panel)!important;color:var(--site-text)!important}
html[data-theme="dark"] .map-canvas-wrap{background:#201c1a!important;border-color:var(--site-line)!important;box-shadow:0 14px 38px rgba(0,0,0,.22)!important}
html[data-theme="dark"] .map-sidebar{
  color:var(--site-text)!important;
  background:rgba(29,25,23,.97)!important;
  border-color:var(--site-line)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.22)!important;
  scrollbar-color:rgba(242,234,229,.22) transparent!important
}
html[data-theme="dark"] .map-sidebar::-webkit-scrollbar-thumb{background:rgba(242,234,229,.2)!important}
html[data-theme="dark"] .map-btn,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .map-search-row input,
html[data-theme="dark"] .map-filter-row input,
html[data-theme="dark"] .map-layer-row select,
html[data-theme="dark"] .place-form input,
html[data-theme="dark"] .place-form textarea,
html[data-theme="dark"] .place-form select,
html[data-theme="dark"] .post-picker-head input,
html[data-theme="dark"] .post-picker,
html[data-theme="dark"] .place-card,
html[data-theme="dark"] .linked-post{
  color:var(--site-text)!important;
  border-color:var(--site-line)!important;
  background:var(--site-map-surface)!important
}
html[data-theme="dark"] .map-btn.primary{
  color:var(--site-button-text)!important;
  background:var(--site-button-bg)!important;
  border-color:var(--site-button-bg)!important
}
html[data-theme="dark"] .map-btn.danger{color:#fff!important;background:#783b3b!important;border-color:#8f4b4b!important}
html[data-theme="dark"] .place-card:hover{box-shadow:0 9px 24px rgba(0,0,0,.24)!important}
html[data-theme="dark"] .place-meta,
html[data-theme="dark"] .detail-meta,
html[data-theme="dark"] .roadview-message,
html[data-theme="dark"] .post-option small,
html[data-theme="dark"] .linked-post small,
html[data-theme="dark"] .place-form label,
html[data-theme="dark"] .map-filter-row label,
html[data-theme="dark"] .map-layer-row label{color:var(--site-muted)!important}
html[data-theme="dark"] .post-option{border-color:var(--site-line)!important}
html[data-theme="dark"] .post-option img,
html[data-theme="dark"] .linked-post img,
html[data-theme="dark"] .linked-post video{background:#181513!important}
html[data-theme="dark"] .map-layer-row{border-color:var(--site-line)!important}
html[data-theme="dark"] .leaflet-popup-content-wrapper,
html[data-theme="dark"] .leaflet-popup-tip{
  color:var(--site-text)!important;
  background:var(--site-surface)!important
}
html[data-theme="dark"] .map-popup small{color:var(--site-muted)!important}

/* ---------- Journal ---------- */
html[data-theme="dark"] body.journal-page{background:var(--site-page-bg)!important;color:var(--site-text)!important}
html[data-theme="dark"] .journal-placeholder{
  color:#f7efea!important;
  background:#11100f!important;
  border:1px solid var(--site-line)!important;
  box-shadow:0 28px 90px rgba(0,0,0,.3)!important
}
html[data-theme="dark"] .journal-copy{color:rgba(247,239,234,.66)!important}
html[data-theme="dark"] .journal-empty{color:rgba(247,239,234,.82)!important;border-color:rgba(247,239,234,.18)!important}

/* Map-specific finishing touches for the dark public theme. */
html[data-theme="dark"] #map{background:#201c1a!important}
html[data-theme="dark"] .map-page .leaflet-control-zoom a{
  color:var(--site-text)!important;
  background:var(--site-surface)!important;
  border-bottom-color:var(--site-line)!important
}
html[data-theme="dark"] .map-page .leaflet-control-attribution{
  color:var(--site-muted)!important;
  background:rgba(21,18,16,.82)!important
}
html[data-theme="dark"] .map-page .leaflet-control-attribution a{color:var(--site-text)!important}
html[data-theme="dark"] .v9-places-leaflet .leaflet-tile-pane{filter:none!important}
