:root {
  color-scheme: dark;
  --bg: #080808;
  --bg-alt: #111111;
  --card: rgba(18, 18, 18, 0.88);
  --card-border: rgba(226, 197, 139, 0.14);
  --text: #f5f0e6;
  --muted: #b9ad97;
  --accent: #e2c58b;
  --accent-2: #d0b06a;
  --accent-3: #f2ddb1;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f0e6;
  --bg-alt: #ebe1cf;
  --card: rgba(255, 250, 240, 0.9);
  --card-border: rgba(167, 143, 106, 0.28);
  --text: #171410;
  --muted: #6f6250;
  --accent: #9b7a36;
  --accent-2: #b49350;
  --accent-3: #7f6128;
  --shadow: 0 18px 54px rgba(70, 55, 34, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  background:
    linear-gradient(180deg, rgba(226, 197, 139, 0.08) 0%, rgba(8, 8, 8, 0) 360px),
    linear-gradient(180deg, #050505 0%, #090909 42%, #111111 100%);
  color: var(--text);
  min-height: 100vh;
}

html[data-theme="light"] body {
  background:
    linear-gradient(180deg, rgba(208, 176, 106, 0.24) 0%, rgba(245, 240, 230, 0) 340px),
    linear-gradient(180deg, #fbf7ee 0%, #f5f0e6 46%, #ebe1cf 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.96), rgba(8, 8, 8, 0.82)),
    var(--bg);
  border-bottom: 1px solid rgba(226, 197, 139, 0.12);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 48px 14px 0;
  position: relative;
  transition: padding 180ms ease, gap 180ms ease;
}

html[data-theme="light"] .topbar {
  background:
    linear-gradient(180deg, rgba(251, 247, 238, 0.94), rgba(251, 247, 238, 0.78)),
    var(--bg);
  border-bottom-color: rgba(167, 143, 106, 0.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: gap 180ms ease;
}

.brand-mark {
  width: 88px;
  height: 88px;
  border: 1px solid rgba(226, 197, 139, 0.32);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 5px rgba(242, 221, 177, 0.06);
  transition: width 180ms ease, height 180ms ease, box-shadow 180ms ease;
}

.brand-name {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.hidden-brand-link {
  color: inherit;
  text-decoration: none;
}

.hidden-brand-link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.theme-toggle {
  position: absolute;
  top: 18px;
  right: 0;
  z-index: 5;
  width: 34px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(242, 221, 177, 0.08);
  cursor: pointer;
  opacity: 0.52;
  transition: opacity 180ms ease, background 180ms ease, border-color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  opacity: 1;
}

.theme-toggle span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-3);
  transition: transform 180ms ease;
}

html[data-theme="light"] .theme-toggle {
  background: rgba(23, 20, 16, 0.06);
}

html[data-theme="light"] .theme-toggle span {
  transform: translateX(14px);
}

.nav a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 32px;
  padding: 52px 0 30px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--accent);
  margin: 0 0 14px;
}

.hero-copy h1,
.section-head h2 {
  font-family: "Cormorant Garamond", serif;
  line-height: 0.96;
  letter-spacing: 0;
  margin: 0;
}

.hero-copy h1 {
  max-width: 10ch;
  font-size: 6rem;
}

.lede,
.section-copy,
.pulse-card p,
.info-card p,
.kpi-meta,
.brand-tag,
.nav,
.pin-meta,
.rail-head p,
.pin-subtitle {
  color: var(--muted);
}

.lede {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 18px 0 0;
}

.lede-note {
  color: var(--accent-3);
  margin: 14px 0 0;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(135deg, #f2ddb1, #d0b06a);
  color: #171410;
}

.button-secondary {
  border-color: var(--card-border);
  background: rgba(242, 221, 177, 0.04);
}

.contact-page {
  padding: 112px 0 72px;
}

.contact-cover {
  max-width: 560px;
  padding-top: 38px;
}

.contact-copy h1 {
  color: var(--accent-3);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.14em;
  margin: 0;
  text-transform: uppercase;
}

.contact-lede {
  max-width: 52ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.contact-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 560px;
  margin-top: 22px;
}

.contact-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 221, 177, 0.08), rgba(255, 255, 255, 0.02)),
    var(--card);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(226, 197, 139, 0.36);
}

.contact-card-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(226, 197, 139, 0.24);
  border-radius: 50%;
  color: var(--accent-3);
  background: rgba(242, 221, 177, 0.07);
  line-height: 1;
}

.contact-card strong,
.contact-card small {
  display: block;
}

.contact-card strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  line-height: 1;
}

.contact-card small {
  margin-top: 6px;
  color: var(--accent-3);
  font-size: 0.86rem;
  font-weight: 800;
  word-break: break-word;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-points span,
.chart-chip,
.dialog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
  background: rgba(242, 221, 177, 0.06);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.hero-points span::before,
.filter-btn::before {
  content: attr(data-symbol);
  color: var(--accent-3);
  font-size: 0.86em;
  line-height: 1;
}

.insight-grid,
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.audience-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-card,
.audience-card {
  position: relative;
  padding: 20px;
}

.insight-card::before,
.audience-card::before,
.chart-card::before,
.info-card::before,
.kpi::before,
.pulse-card::before {
  content: attr(data-symbol);
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(226, 197, 139, 0.2);
  border-radius: 50%;
  background: rgba(242, 221, 177, 0.06);
  color: var(--accent-3);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: inset 0 0 18px rgba(226, 197, 139, 0.06);
}

.insight-card::before {
  margin-bottom: 14px;
}

.audience-card::before {
  margin-bottom: 12px;
}

.insight-card strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  margin: 10px 0 8px;
  letter-spacing: 0;
  line-height: 1.04;
}

.insight-label,
.audience-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.insight-card p,
.audience-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.accent-teal {
  box-shadow: inset 0 1px 0 rgba(226, 197, 139, 0.22);
}

.accent-blue {
  box-shadow: inset 0 1px 0 rgba(208, 176, 106, 0.22);
}

.accent-amber {
  box-shadow: inset 0 1px 0 rgba(242, 221, 177, 0.22);
}

.accent-pink {
  box-shadow: inset 0 1px 0 rgba(167, 143, 106, 0.22);
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.stat-list li {
  display: grid;
  grid-template-columns: 8px auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid rgba(226, 197, 139, 0.5);
  border-radius: 50%;
  background: rgba(242, 221, 177, 0.16);
}

.stat-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stat-list strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--text);
}

.stat-list span {
  color: var(--muted);
  text-align: right;
  justify-self: end;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

html[data-theme="light"] .button-secondary,
html[data-theme="light"] .hero-points span,
html[data-theme="light"] .chart-chip,
html[data-theme="light"] .dialog-kicker,
html[data-theme="light"] .filter-btn {
  background: rgba(155, 122, 54, 0.07);
}

html[data-theme="light"] .kpi,
html[data-theme="light"] .pulse-card,
html[data-theme="light"] .pin-detail-card,
html[data-theme="light"] .instagram-embed {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(245, 240, 230, 0.58)),
    rgba(155, 122, 54, 0.04);
}

html[data-theme="light"] .pin-item {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(167, 143, 106, 0.18);
}

html[data-theme="light"] .pin-item:hover,
html[data-theme="light"] .pin-item.is-active {
  background: rgba(208, 176, 106, 0.16);
  border-color: rgba(155, 122, 54, 0.36);
}

.hero-panel {
  padding: 20px;
}

.mini-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.kpi {
  position: relative;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(242, 221, 177, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(226, 197, 139, 0.12);
}

.kpi::before {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  font-size: 0.96rem;
}

.kpi-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 10px;
}

.kpi strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  letter-spacing: 0;
  line-height: 1;
}

.kpi-meta {
  font-size: 0.84rem;
}

.animated-number {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  min-width: max-content;
}

.pulse-card {
  position: relative;
  margin-top: 16px;
  padding: 20px 20px 20px 68px;
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(226, 197, 139, 0.12);
}

.pulse-card::before {
  position: absolute;
  top: 20px;
  left: 20px;
}

.pulse-card h2,
.section-head h2,
.rail-head h3,
.chart-head h3,
.info-card h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
}

.pulse-label {
  margin: 0 0 8px;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.section-grid {
  padding: 46px 0 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 3rem;
  max-width: 14ch;
  text-wrap: balance;
}

#map .section-head h2 {
  max-width: 20ch;
  line-height: 1.03;
}

.section-copy {
  max-width: 42ch;
  line-height: 1.7;
  margin: 0;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.filter-btn.is-active,
.filter-btn:hover {
  background: rgba(226, 197, 139, 0.16);
  border-color: rgba(226, 197, 139, 0.3);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(340px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.map-card {
  position: relative;
  padding: 12px;
  height: 760px;
  min-height: 760px;
}

.map-touch-toggle {
  display: none;
}

#mapCanvas {
  width: 100%;
  height: 100%;
  min-height: 736px;
  scroll-margin-top: 132px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #171410;
}

html[data-theme="light"] #mapCanvas,
html[data-theme="light"] #mapCanvas .leaflet-container {
  background: #e8dcc8;
}

#mapCanvas.map-fallback::after {
  content: attr(data-map-status);
  position: absolute;
  inset: 16px;
  z-index: 500;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.9), rgba(18, 18, 18, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
  pointer-events: none;
}

#mapCanvas.map-fallback .leaflet-pane,
#mapCanvas.map-fallback .leaflet-control-container {
  opacity: 0.9;
}

.selected-reel {
  height: 760px;
  min-height: 760px;
  overflow: auto;
  padding: 18px;
  scroll-margin-top: 132px;
}

.selected-reel .eyebrow {
  margin-bottom: 14px;
}

.selected-detail {
  display: grid;
  gap: 14px;
}

.pin-browse {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
  scroll-margin-top: 132px;
}

.pin-browse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

.pin-browse summary::-webkit-details-marker {
  display: none;
}

.pin-browse summary strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  line-height: 1.05;
}

.pin-browse summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(226, 197, 139, 0.22);
  border-radius: 50%;
  color: var(--accent-3);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
}

.pin-browse[open] summary::after {
  content: "-";
}

.browse-count {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.pin-list {
  display: grid;
  gap: 12px;
  max-height: 720px;
  overflow-y: auto;
  padding: 0 18px 18px;
  scrollbar-color: rgba(226, 197, 139, 0.42) rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
}

.pin-list::-webkit-scrollbar {
  width: 8px;
}

.pin-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.pin-list::-webkit-scrollbar-thumb {
  background: rgba(226, 197, 139, 0.42);
  border-radius: 999px;
}

.pin-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.pin-item:hover,
.pin-item.is-active {
  border-color: rgba(226, 197, 139, 0.42);
  background: rgba(226, 197, 139, 0.08);
}

.pin-title {
  font-weight: 800;
}

.pin-meta,
.pin-subtitle {
  font-size: 0.9rem;
}

.pin-detail {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 197, 139, 0.16);
}

.selected-detail .pin-detail-card {
  background:
    linear-gradient(135deg, rgba(242, 221, 177, 0.14), rgba(18, 18, 18, 0.34)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.pin-detail-card {
  padding: 16px;
  border: 1px solid rgba(226, 197, 139, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 221, 177, 0.12), rgba(18, 18, 18, 0.3)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.pin-detail-card span {
  display: block;
  color: var(--accent-3);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pin-detail-card h4 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  line-height: 1;
  margin: 0 0 8px;
}

.pin-detail-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.pin-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pin-detail-actions .button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.reel-map-popup .leaflet-popup-content-wrapper {
  border: 1px solid rgba(226, 197, 139, 0.2);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.96);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
}

html[data-theme="light"] .reel-map-popup .leaflet-popup-content-wrapper,
html[data-theme="light"] .reel-map-popup .leaflet-popup-tip {
  background: rgba(255, 250, 240, 0.98);
  border-color: rgba(167, 143, 106, 0.28);
  box-shadow: 0 18px 46px rgba(70, 55, 34, 0.16);
}

.reel-map-popup .leaflet-popup-content {
  margin: 14px;
}

.reel-map-popup .leaflet-popup-tip {
  background: rgba(13, 13, 13, 0.96);
  border: 1px solid rgba(226, 197, 139, 0.18);
}

.map-popup {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
}

.map-popup span {
  color: var(--accent-3);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-popup strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  line-height: 1;
}

.map-popup p {
  color: var(--muted);
  margin: 0;
}

.map-popup a {
  color: var(--accent-3);
  font-weight: 800;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.chart-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  min-height: 332px;
}

.chart-card::before,
.info-card::before {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  opacity: 0.9;
}

.chart-card.wide {
  grid-column: 1 / -1;
  min-height: 350px;
}

.chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-right: 42px;
}

.chart-head h3 {
  font-size: 1.3rem;
  line-height: 1.1;
  max-width: 18ch;
}

.chart-body {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}

.chart-body-donut {
  height: 238px;
}

.chart-body-bar {
  height: 260px;
}

.chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-card::after {
  content: "";
  position: absolute;
  inset: auto 20px 18px 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 197, 139, 0.28), transparent);
  pointer-events: none;
}

.playbook-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  position: relative;
  padding: 18px;
  min-height: 160px;
}

.info-card h3 {
  margin: 38px 0 10px;
  font-size: 1.2rem;
}

.admin-shell {
  display: grid;
  gap: 18px;
}

.admin-hero,
.admin-layout,
.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.admin-hero h1,
.admin-panel h2 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
  line-height: 1;
}

.admin-hero h1 {
  font-size: 4rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.admin-status {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-status[data-state="dirty"] {
  color: var(--accent-3);
}

.admin-layout {
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  align-items: start;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-panel {
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.admin-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-reel-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 6px;
}

.admin-reel-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(167, 143, 106, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.admin-reel-item:hover,
.admin-reel-item.is-active {
  border-color: rgba(155, 122, 54, 0.38);
  background: rgba(208, 176, 106, 0.15);
}

.admin-reel-item strong {
  font-size: 0.95rem;
}

.admin-reel-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-form,
.stats-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.field-wide {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea,
.metric-table input {
  width: 100%;
  border: 1px solid rgba(167, 143, 106, 0.28);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

html:not([data-theme="light"]) .field input,
html:not([data-theme="light"]) .field select,
html:not([data-theme="light"]) .field textarea,
html:not([data-theme="light"]) .metric-table input,
html:not([data-theme="light"]) .admin-reel-item {
  background: rgba(255, 255, 255, 0.04);
}

.field textarea {
  resize: vertical;
  min-height: 112px;
}

.metric-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 38px;
  gap: 10px;
  margin-bottom: 12px;
}

.prompt-panel {
  display: grid;
  gap: 14px;
}

.prompt-intro {
  max-width: 72ch;
  margin: -6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.prompt-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(167, 143, 106, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
}

html:not([data-theme="light"]) .prompt-card {
  background: rgba(255, 255, 255, 0.035);
}

.prompt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prompt-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  line-height: 1;
}

.prompt-card textarea {
  width: 100%;
  min-height: 340px;
  resize: vertical;
  border: 1px solid rgba(167, 143, 106, 0.28);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
  color: var(--text);
  font: 0.86rem/1.55 "Manrope", system-ui, sans-serif;
  padding: 12px;
}

html:not([data-theme="light"]) .prompt-card textarea {
  background: rgba(255, 255, 255, 0.04);
}

.generated-json-import {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(167, 143, 106, 0.2);
}

.generated-json-import textarea {
  min-height: 190px;
}

.generated-json-import .button {
  justify-self: start;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: rgba(242, 221, 177, 0.08);
  color: var(--accent-3);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.danger-button {
  border-color: rgba(169, 95, 63, 0.34);
  color: #a95f3f;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.12;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 0.6px, transparent 0.6px);
  background-size: 14px 14px;
  mix-blend-mode: overlay;
}

html[data-theme="light"] .grain {
  opacity: 0.08;
  mix-blend-mode: multiply;
}

main {
  position: relative;
  z-index: 2;
  padding-top: 126px;
}

.instagram-embed {
  display: grid;
  place-items: center;
  max-height: 520px;
  min-height: 280px;
  margin: 0;
  overflow: auto;
  border: 1px solid rgba(226, 197, 139, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.instagram-embed:empty {
  display: none;
}

.instagram-embed .instagram-media {
  min-width: 0 !important;
  width: min(100%, 420px) !important;
  margin: 0 auto !important;
}

#mapCanvas .leaflet-control-zoom a,
#mapCanvas .leaflet-bar {
  background: rgba(18, 18, 18, 0.9);
  color: var(--text);
  border-color: rgba(226, 197, 139, 0.14);
}

html[data-theme="light"] #mapCanvas .leaflet-control-zoom a,
html[data-theme="light"] #mapCanvas .leaflet-bar {
  background: rgba(255, 250, 240, 0.92);
  color: var(--text);
  border-color: rgba(167, 143, 106, 0.24);
}

#mapCanvas .leaflet-control-zoom a:hover {
  background: rgba(242, 221, 177, 0.08);
}

#mapCanvas .leaflet-container {
  background: #171410;
}

#mapCanvas .leaflet-tile {
  filter: sepia(0.34) saturate(0.62) hue-rotate(350deg) brightness(0.9) contrast(0.95);
}

html[data-theme="light"] #mapCanvas .leaflet-tile {
  filter: sepia(0.28) saturate(0.72) hue-rotate(350deg) brightness(1.04) contrast(0.9);
}

.map-pin {
  transition: transform 180ms ease;
}

.map-pin.is-active {
  transform: scale(1.04);
}

@media (max-width: 1080px) {
  .hero,
  .map-layout,
  .section-head,
  .insight-grid,
  .audience-grid,
  .chart-grid,
  .playbook-grid,
  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .playbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: 5rem;
  }

  .contact-card-grid {
    max-width: 560px;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    padding-right: 0;
  }

  .topbar.is-compact .topbar-inner {
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand {
    align-self: flex-start;
    padding-right: 48px;
  }

  .topbar.is-compact .brand {
    gap: 12px;
  }

  .topbar.is-compact .brand-mark {
    width: 48px;
    height: 48px;
    box-shadow: 0 0 0 3px rgba(242, 221, 177, 0.05);
  }

  .topbar.is-compact ~ main #mapCanvas,
  .topbar.is-compact ~ main .selected-reel,
  .topbar.is-compact ~ main .pin-browse {
    scroll-margin-top: 132px;
  }

  main {
    padding-top: 182px;
  }

  .mediakit-body main {
    padding-top: 230px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .segmented-nav {
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: rgba(242, 221, 177, 0.08);
  }

  .segmented-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(208, 176, 106, 0.12);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
  }

  .mediakit-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 18px;
  }

  html:not([data-theme="light"]) .segmented-nav {
    background: rgba(255, 255, 255, 0.035);
  }

  .shell {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding-top: 34px;
  }

  .contact-page {
    padding-top: 182px;
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

  .contact-copy h1 {
    font-size: 0.9rem;
  }

  .contact-lede {
    font-size: 0.98rem;
  }

  .contact-card-grid {
    min-height: 0;
    margin-top: 22px;
  }

  .contact-card {
    min-height: 0;
    padding: 14px;
  }

  .contact-card strong {
    font-size: 1.55rem;
  }

  .contact-card small {
    font-size: 0.86rem;
  }

  .section-head h2 {
    font-size: 2.4rem;
  }

  .mini-kpis,
  .insight-grid,
  .audience-grid,
  .playbook-grid,
  .admin-hero,
  .admin-layout,
  .admin-grid,
  .admin-form,
  .stats-form {
    grid-template-columns: 1fr;
  }

  .admin-actions,
  .prompt-card-head {
    justify-content: start;
  }

  .pulse-card {
    padding: 20px;
  }

  .pulse-card::before {
    position: static;
    margin-bottom: 14px;
  }

  .map-card {
    height: 420px;
    min-height: 420px;
  }

  .selected-reel {
    height: auto;
    min-height: 0;
    overflow: visible;
    scroll-margin-top: 184px;
  }

  .pin-list {
    max-height: none;
    overflow: visible;
  }

  #mapCanvas {
    height: 100%;
    min-height: 396px;
    scroll-margin-top: 184px;
    touch-action: pan-y;
  }

  #mapCanvas.is-touch-enabled {
    touch-action: none;
  }

  .map-touch-toggle {
    position: absolute;
    right: 22px;
    top: 22px;
    z-index: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(167, 143, 106, 0.32);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.92);
    color: var(--text);
    box-shadow: 0 12px 30px rgba(70, 55, 34, 0.18);
    backdrop-filter: blur(14px);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
  }

  html:not([data-theme="light"]) .map-touch-toggle {
    background: rgba(8, 8, 8, 0.88);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  }

  .map-touch-toggle[aria-pressed="true"] {
    background: linear-gradient(135deg, #f2ddb1, #d0b06a);
    color: #171410;
  }

  .instagram-embed {
    max-height: none;
    min-height: 220px;
    overflow: visible;
  }

  .map-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
    padding-inline: 10px;
  }

  .filter-btn[data-filter="all"] {
    grid-column: 1 / -1;
  }

  .pin-browse {
    scroll-margin-top: 184px;
  }

  .pin-browse summary {
    align-items: start;
  }
}
