.live-editor-mode {
  --live-editor-green: #166534;
  --live-editor-accent: #22c55e;
  --live-editor-accent-soft: rgba(34, 197, 94, 0.16);
  --live-editor-panel-shadow: 0 24px 60px rgba(4, 16, 8, 0.22);
  --live-editor-panel-width: 420px;
  --live-editor-panel-gap: 20px;
  --live-editor-resizer-width: 28px;
  --live-editor-safe-area: calc(var(--live-editor-panel-width) + (var(--live-editor-panel-gap) * 2));
}

body.live-editor-mode {
  overflow-x: hidden;
}

body.live-editor-mode .navbar {
  right: var(--live-editor-safe-area);
}

body.live-editor-mode #pageSectionsRoot,
body.live-editor-mode footer.footer {
  width: calc(100% - var(--live-editor-safe-area));
  max-width: calc(100% - var(--live-editor-safe-area));
  margin-right: var(--live-editor-safe-area);
}

body.live-editor-mode .modal-overlay {
  padding-right: var(--live-editor-safe-area);
}

.live-editor-mode .live-editable-target {
  outline: 2px solid transparent;
  outline-offset: 4px;
  cursor: pointer;
  transition: outline-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.live-editor-mode .live-editable-target:hover {
  outline-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1);
}

.live-editor-mode .live-editable-target.is-live-selected {
  outline-color: rgba(22, 101, 52, 0.72);
  box-shadow: 0 0 0 7px rgba(22, 101, 52, 0.12);
}

.live-editor-toolbar {
  position: fixed;
  top: 18px;
  right: var(--live-editor-panel-gap);
  z-index: 11000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: var(--live-editor-panel-width);
  padding: 14px 16px;
  border: 1px solid rgba(22, 101, 52, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(4, 16, 8, 0.16);
}

.live-editor-toolbar-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.live-editor-toolbar-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: var(--live-editor-green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.live-editor-toolbar-text {
  font-size: 0.84rem;
  color: #47614c;
  line-height: 1.55;
}

.live-editor-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.live-editor-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #5f7a63;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f6fbf7;
  border: 1px solid rgba(22, 101, 52, 0.14);
}

.live-editor-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.live-editor-status.is-dirty .live-editor-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.live-editor-toolbar-btn,
.live-editor-toolbar-link,
.live-editor-panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.live-editor-toolbar-btn,
.live-editor-panel-btn.secondary {
  border: 1px solid rgba(22, 101, 52, 0.16);
  background: #fff;
  color: #315039;
  padding: 10px 16px;
}

.live-editor-toolbar-btn:hover,
.live-editor-panel-btn.secondary:hover {
  background: #f2fbf4;
}

.live-editor-toolbar-link {
  border: 1px solid rgba(22, 101, 52, 0.16);
  background: #f6fbf7;
  color: var(--live-editor-green);
  padding: 10px 16px;
}

.live-editor-toolbar-link:hover {
  background: #ecf9ef;
}

.live-editor-panel {
  position: fixed;
  top: 170px;
  right: var(--live-editor-panel-gap);
  bottom: 20px;
  width: var(--live-editor-panel-width);
  z-index: 11000;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(22, 101, 52, 0.16);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: var(--live-editor-panel-shadow);
}

.live-editor-panel-resizer {
  position: fixed;
  top: 182px;
  bottom: 32px;
  right: calc(var(--live-editor-safe-area) - (var(--live-editor-resizer-width) / 2));
  width: var(--live-editor-resizer-width);
  cursor: ew-resize;
  touch-action: none;
  z-index: 11010;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-editor-panel-resizer::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(22, 101, 52, 0.48), rgba(34, 197, 94, 0.18));
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.08);
}

.live-editor-panel-resizer-grip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(22, 101, 52, 0.16);
  box-shadow: 0 12px 30px rgba(4, 16, 8, 0.12);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.live-editor-panel-resizer-grip span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.58);
}

.live-editor-panel-resizer:hover .live-editor-panel-resizer-grip,
body.live-editor-resizing .live-editor-panel-resizer-grip {
  transform: scale(1.04);
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(240, 253, 244, 0.96);
  box-shadow: 0 16px 34px rgba(4, 16, 8, 0.16);
}

body.live-editor-resizing,
body.live-editor-resizing * {
  cursor: ew-resize !important;
  user-select: none !important;
}

.live-editor-panel-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(22, 101, 52, 0.1);
  background: linear-gradient(180deg, #f4fcf5, rgba(255, 255, 255, 0.94));
}

.live-editor-panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--live-editor-green);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-editor-panel-title {
  margin-top: 10px;
  font-size: 1.18rem;
  font-weight: 800;
  color: #16311d;
}

.live-editor-panel-desc {
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #64806a;
}

.live-editor-panel-drag-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.76rem;
  color: #6e8972;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.82);
  border: 1px solid rgba(22, 101, 52, 0.08);
}

.live-editor-panel-body {
  flex: 1;
  overflow: auto;
  padding: 22px 24px;
}

.live-editor-empty {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px dashed rgba(22, 101, 52, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.86), rgba(255, 255, 255, 0.96));
}

.live-editor-empty h4 {
  font-size: 0.96rem;
  color: #1f3926;
}

.live-editor-empty p,
.live-editor-empty li {
  font-size: 0.84rem;
  line-height: 1.8;
  color: #5f7a63;
}

.live-editor-empty ul {
  padding-left: 18px;
}

.live-editor-form {
  display: grid;
  gap: 18px;
}

.live-editor-field {
  display: grid;
  gap: 8px;
}

.live-editor-field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.75rem;
  color: #6b846f;
}

.live-editor-field-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eefaf0;
  color: #166534;
  font-weight: 700;
}

.live-editor-field-type {
  font-weight: 700;
  color: #8aa18e;
}

.live-editor-field-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1d3823;
}

.live-editor-field-control {
  width: 100%;
  border-radius: 16px;
  border: 1.5px solid rgba(22, 101, 52, 0.18);
  background: #fbfefb;
  color: #1a2e1a;
  padding: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.7;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  outline: none;
}

.live-editor-field-control:focus {
  border-color: rgba(22, 101, 52, 0.46);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.1);
}

.live-editor-link-presets {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 101, 52, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.72), rgba(255, 255, 255, 0.96));
}

.live-editor-link-presets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-editor-link-presets-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1f4426;
}

.live-editor-link-presets-sub {
  font-size: 0.76rem;
  color: #6c876f;
}

.live-editor-field-select {
  padding-right: 42px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #4f6f57 50%),
    linear-gradient(135deg, #4f6f57 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.live-editor-field-note {
  font-size: 0.78rem;
  line-height: 1.7;
  color: #78917b;
}

.live-editor-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px 22px;
  border-top: 1px solid rgba(22, 101, 52, 0.1);
  background: rgba(250, 253, 250, 0.96);
}

.live-editor-panel-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-editor-panel-btn.primary {
  padding: 11px 18px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #166534, #15803d);
  color: #fff;
}

.live-editor-panel-btn.primary:hover {
  filter: brightness(1.04);
}

.live-editor-panel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

body.live-editor-mode.live-editor-preview-1100 .hero-content {
  grid-template-columns: 360px 1fr;
  gap: 40px;
}

body.live-editor-mode.live-editor-preview-1100 .avatar-ring {
  width: 260px;
  height: 320px;
}

body.live-editor-mode.live-editor-preview-1100 .about-grid {
  grid-template-columns: 1fr;
}

body.live-editor-mode.live-editor-preview-1100 .about-profile-row {
  grid-template-columns: 220px 1fr;
  gap: 32px;
}

body.live-editor-mode.live-editor-preview-1100 .video-grid,
body.live-editor-mode.live-editor-preview-1100 .listings-grid {
  grid-template-columns: repeat(2, 1fr);
}

body.live-editor-mode.live-editor-preview-1100 .footer-grid {
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

body.live-editor-mode.live-editor-preview-1100 .newsletter-card {
  grid-template-columns: 1fr;
  gap: 40px;
}

body.live-editor-mode.live-editor-preview-900 .live-editor-toolbar-text {
  display: none;
}

body.live-editor-mode.live-editor-preview-900 .live-editor-toolbar-actions {
  justify-content: flex-end;
}

body.live-editor-mode.live-editor-preview-900 .live-editor-panel {
  top: 148px;
}

body.live-editor-mode.live-editor-preview-900 .live-editor-panel-resizer {
  top: 160px;
}

body.live-editor-mode.live-editor-preview-900 .hero-content {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}

body.live-editor-mode.live-editor-preview-900 .hero-left {
  order: -1;
}

body.live-editor-mode.live-editor-preview-900 .hero-text {
  align-items: center;
  text-align: center;
}

body.live-editor-mode.live-editor-preview-900 .hero-name,
body.live-editor-mode.live-editor-preview-900 .hero-tag-row,
body.live-editor-mode.live-editor-preview-900 .hero-pills,
body.live-editor-mode.live-editor-preview-900 .hero-stats,
body.live-editor-mode.live-editor-preview-900 .about-quick-stats {
  justify-content: center;
}

body.live-editor-mode.live-editor-preview-900 .hero-tagline {
  border-left: none;
  padding-left: 0;
  border-bottom: 3px solid var(--green-400);
  padding-bottom: 10px;
}

body.live-editor-mode.live-editor-preview-900 .avatar-ring {
  width: 220px;
  height: 270px;
}

body.live-editor-mode.live-editor-preview-900 .avatar-badge {
  right: -30px;
}

body.live-editor-mode.live-editor-preview-900 .avatar-floating-tag {
  left: -38px;
}

body.live-editor-mode.live-editor-preview-900 .card-left {
  bottom: 12px;
  left: -30px;
}

body.live-editor-mode.live-editor-preview-900 .card-right {
  top: 12px;
  right: -30px;
}

body.live-editor-mode.live-editor-preview-900 .about-profile-row {
  grid-template-columns: 1fr;
  text-align: center;
}

body.live-editor-mode.live-editor-preview-900 .about-profile-photo {
  order: -1;
}

body.live-editor-mode.live-editor-preview-900 .about-grid {
  grid-template-columns: 1fr;
}

body.live-editor-mode.live-editor-preview-768 .nav-container {
  padding: 0 18px;
}

body.live-editor-mode.live-editor-preview-768 .nav-links {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: var(--live-editor-safe-area);
  background: rgba(255,255,255,0.97);
  flex-direction: column;
  padding: 20px;
  gap: 4px;
  border-bottom: 1px solid var(--ui-border);
  box-shadow: var(--shadow-md);
  z-index: 10005;
}

body.live-editor-mode.live-editor-preview-768 .nav-links.open {
  display: flex;
}

body.live-editor-mode.live-editor-preview-768 .nav-links li a {
  padding: 12px 20px;
  border-radius: var(--radius-md);
}

body.live-editor-mode.live-editor-preview-768 .nav-toggle {
  display: flex;
}

body.live-editor-mode.live-editor-preview-768 .hero-stats {
  gap: 16px;
  padding: 16px 24px;
}

body.live-editor-mode.live-editor-preview-768 .video-grid,
body.live-editor-mode.live-editor-preview-768 .listings-grid,
body.live-editor-mode.live-editor-preview-768 .footer-grid {
  grid-template-columns: 1fr;
}

body.live-editor-mode.live-editor-preview-768 .newsletter-card {
  padding: 36px 28px;
}

body.live-editor-mode.live-editor-preview-768 .footer-bottom .container {
  flex-direction: column;
  text-align: center;
}

body.live-editor-mode.live-editor-preview-768 .about-profile-row {
  padding: 28px 20px;
}

body.live-editor-mode.live-editor-preview-768 section {
  padding: 70px 0;
}

body.live-editor-mode.live-editor-preview-480 .hero {
  padding: 92px 20px 52px;
}

body.live-editor-mode.live-editor-preview-480 .hero-stats {
  flex-wrap: wrap;
  justify-content: center;
}

body.live-editor-mode.live-editor-preview-480 .stat-divider {
  display: none;
}

body.live-editor-mode.live-editor-preview-480 .newsletter-card {
  padding: 28px 20px;
}

body.live-editor-mode.live-editor-preview-480 .hero-cta {
  flex-direction: column;
  align-items: center;
}

body.live-editor-mode.live-editor-preview-480 .avatar-ring {
  width: 200px;
  height: 240px;
}

body.live-editor-mode.live-editor-preview-480 .about-quick-stats {
  flex-direction: column;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="none"] .avatar-badge,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="none"] .avatar-floating-tag,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="none"] .hero-float-card {
  display: none;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="badge"] .avatar-floating-tag,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="badge"] .card-left,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="badge"] .card-right {
  display: none;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="tag"] .avatar-badge,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="tag"] .card-left,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="tag"] .card-right {
  display: none;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="left-card"] .avatar-badge,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="left-card"] .avatar-floating-tag,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="left-card"] .card-right {
  display: none;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="right-card"] .avatar-badge,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="right-card"] .avatar-floating-tag,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="right-card"] .card-left {
  display: none;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="badge"] .avatar-badge {
  right: -28px;
  bottom: 24px;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="tag"] .avatar-floating-tag {
  top: auto;
  bottom: 20px;
  left: -28px;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="left-card"] .card-left {
  bottom: 16px;
  left: -28px;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus="right-card"] .card-right {
  top: auto;
  bottom: 28px;
  right: -28px;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus] .avatar-badge,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus] .avatar-floating-tag,
body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus] .card-left {
  display: none;
}

body.live-editor-mode.live-editor-preview-480 .hero[data-mobile-float-focus] .card-right {
  display: flex;
  top: auto;
  bottom: 28px;
  right: -28px;
}

@media (max-width: 960px) {
  .live-editor-mode {
    --live-editor-panel-width: auto;
    --live-editor-safe-area: 0px;
  }

  body.live-editor-mode .navbar {
    right: 0;
  }

  body.live-editor-mode #pageSectionsRoot,
  body.live-editor-mode footer.footer {
    width: auto;
    max-width: none;
    margin-right: 0;
  }

  body.live-editor-mode .modal-overlay {
    padding-right: 0;
  }

  .live-editor-toolbar {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .live-editor-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 70vh;
  }

  .live-editor-panel-resizer,
  .live-editor-panel-drag-hint {
    display: none;
  }
}
