@font-face {
  font-family: 'FbTypograph2';
  src: url('assets/fonts/FbTypograph2-Light.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FbTypograph2';
  src: url('assets/fonts/FbTypograph2-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FbTypograph2';
  src: url('assets/fonts/FbTypograph2-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FbTypograph2';
  src: url('assets/fonts/FbTypograph2-Black.otf') format('opentype');
  font-weight: 900; font-style: normal; font-display: swap;
}

:root {
  --primary: #FFD500;
  --ink: #0A0A0A;
  --paper: #FAF7F0;
  --muted: #6B6B66;
  --line: rgba(10,10,10,0.12);
  --font-display: 'FbTypograph2', system-ui, sans-serif;
  --font-body: 'FbTypograph2', system-ui, sans-serif;
  --font-mono: 'FbTypograph2', ui-monospace, monospace;
}

body, input, select, textarea, button {
  font-family: 'FbTypograph2', system-ui, sans-serif !important;
}
.mono { font-family: 'FbTypograph2', system-ui, sans-serif !important; letter-spacing: 0.06em; }
.display { font-family: 'FbTypograph2', system-ui, sans-serif !important; font-weight: 900; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* Site canvas — establishes a CSS query container so layout responds to its
   own width (not the viewport). On a real phone it's the full viewport width;
   in admin "mobile preview" it's constrained to a phone frame. Either way the
   same @container rules fire, so the preview is faithful. */
.site-canvas { container-type: inline-size; container-name: canvas; width: 100%; }
.site-canvas--mobile {
  max-width: 402px;
  margin: 24px auto;
  border: 10px solid #111;
  border-radius: 38px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06) inset;
  overflow: hidden;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@container (max-width: 600px) {
  .wrap { padding: 0 18px; }
  /* Mobile: remove the top nav entirely */
  .topnav { display: none !important; }
  /* Hero viewfinder eyebrow: shrink + drop secondary bits so it fits the phone */
  .hero-eyebrow { padding: 16px 22px !important; margin-bottom: 26px !important; }
  .hero-eyebrow-row { gap: 12px !important; }
  .hero-eyebrow-label { font-size: 14px !important; letter-spacing: 0.16em !important; }
  .hero-eyebrow-extra { display: none !important; }
  /* Keep the red punchline on a single line on mobile */
  .problem-paragraph-card { padding: 32px 20px 30px !important; }
  .problem-punchline { font-size: clamp(15px, 5.4cqw, 22px) !important; white-space: nowrap !important; }
  /* Multi-column grids collapse on a narrow canvas. Desktop styles stay
     inline+untouched; these override only inside the container query, so
     !important here is the documented way to beat the inline grid value. */
  .cq-stack { grid-template-columns: 1fr !important; gap: 28px !important; }
  .cq-stack > * { grid-column: auto !important; }
  .cq-stack-2 { grid-template-columns: 1fr 1fr !important; }
  /* Solution headline: keep each line on one row, as large as fits — full
     canvas width (break past wrap padding) + tighter tracking. */
  .solution-headline {
    font-size: clamp(25px, 8.7cqw, 48px) !important;
    letter-spacing: -0.05em !important;
    margin-inline: -18px !important;
  }
  .solution-headline > span { white-space: nowrap; }
  /* Social-proof headline: one sentence per line (2 lines), sized to fit. */
  .socialproof-headline {
    font-size: clamp(18px, 6.9cqw, 44px) !important;
    letter-spacing: -0.02em !important;
    margin-inline: -18px !important;
    line-height: 1.16 !important;
  }
  .socialproof-headline > span { white-space: nowrap; }
  /* Podcast heading: "ככה נראים" on its own line on mobile (one line on desktop) */
  .results-h-line1 { display: block; }
  /* "השורה התחתונה" pull-quote: tighten the gaps and enlarge the text. */
  .pullquote { margin-top: 28px !important; padding: 14px 6px !important; }
  .pullquote-glyph { font-size: 78px !important; margin-bottom: 0 !important; }
  .pullquote-eyebrow { font-size: 16px !important; }
  .pullquote-text { font-size: clamp(30px, 8.2cqw, 46px) !important; line-height: 1.12 !important; }
}
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.display { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; line-height: 0.92; }

/* Scrollbar polish */
::selection { background: var(--primary); color: #000; }

/* ===== BOLD / STUDIO NEON ===== */
.theme-bold {
  --bg: #0A0A0A;
  --fg: #F5F2E8;
  --accent: var(--primary);
  --card: #141414;
  --line2: rgba(245,242,232,0.10);
  background:
    radial-gradient(1100px 700px at 12% 5%,   rgba(255,213,0,0.16), transparent 55%),
    radial-gradient(950px  600px at 92% 25%,  rgba(255,213,0,0.10), transparent 55%),
    radial-gradient(900px  600px at 8%  60%,  rgba(255,213,0,0.09), transparent 55%),
    radial-gradient(1000px 650px at 95% 95%,  rgba(255,213,0,0.13), transparent 55%),
    radial-gradient(700px  500px at 50% 45%,  rgba(255,213,0,0.05), transparent 70%),
    var(--bg);
  color: var(--fg);
}

/* Living drifting auras — fixed to viewport so it's always visible */
.theme-bold::before {
  content: "";
  position: fixed; inset: -15%;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(700px 500px at 25% 35%, rgba(255,213,0,0.14), transparent 60%),
    radial-gradient(600px 420px at 75% 70%, rgba(255,213,0,0.10), transparent 60%);
  animation: bgDrift 18s ease-in-out infinite alternate;
  mix-blend-mode: screen;
  filter: blur(20px);
}

@keyframes bgDrift {
  0%   { transform: translate(0%, 0%)      scale(1);    opacity: 0.85; }
  35%  { transform: translate(-4%, 3%)     scale(1.12); opacity: 1;    }
  70%  { transform: translate(3%, -4%)     scale(1.08); opacity: 0.9;  }
  100% { transform: translate(-2%, -2%)    scale(1.05); opacity: 1;    }
}

.theme-bold > * { position: relative; z-index: 1; }

.theme-bold .paper-swap { background: #F5F2E8; color: #0A0A0A; }

/* ===== Mobile performance (real devices ≤600px) =====
   These target actual phones via viewport width — the cheap fixes that stop
   per-frame repaints during scroll. The desktop look is untouched. */
@media (max-width: 600px) {
  /* backdrop-filter recomputes the blur of everything behind a sticky/fixed
     bar on every scroll frame — brutal on phones. Drop it everywhere. */
  *, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Without the blur the translucent nav shows scrolling content through it;
     make it near-opaque instead. */
  .topnav { background: rgba(10,10,10,0.96) !important; }
  /* The fixed, full-viewport, blurred + screen-blended, infinitely-animating
     aura is the biggest scroll-jank source. A position:fixed full-screen layer
     forces iOS off the fast-scroll path even when static — so drop it entirely
     on phones (section-level glows keep the ambiance). */
  .theme-bold::before { display: none !important; }
  /* the desktop cursor-glow is a fixed, screen-blended layer — pointless on
     touch and another fixed-layer cost. Remove it on phones. */
  #cursor-glow { display: none !important; }
  /* Freeze purely-decorative (aria-hidden) glow/pulse loops AND drop their
     blur — large blurred layers are the most expensive thing a phone GPU
     paints. Marquees keep moving (their animation lives on the row, which is
     not aria-hidden). */
  [aria-hidden="true"] { animation: none !important; filter: none !important; }
  /* Scroll-reveal slides elements up 30px as they enter — on a long phone
     scroll that reads as the page "jumping". Keep a gentle fade, drop the
     positional move (and any leftover offset) so scrolling stays steady. */
  .reveal-init { transform: none !important; transition: opacity .5s ease !important; }
}

/* ===== EDITORIAL ===== */
.theme-editorial {
  --bg: #FAF7F0;
  --fg: #0A0A0A;
  --accent: #0A0A0A;
  --chip: #FFD500;
  --card: #FFFFFF;
  --line2: rgba(10,10,10,0.12);
  background: var(--bg); color: var(--fg);
}

/* ===== CINEMATIC ===== */
.theme-cinematic {
  --bg: #0E0B0A;
  --fg: #F2E9DD;
  --accent: #E63946;
  --yellow: #FFD500;
  --card: #17110F;
  --line2: rgba(242,233,221,0.12);
  background: var(--bg); color: var(--fg);
}

/* Dark-mode overrides for editorial */
.theme-editorial.dark {
  --bg: #0F0F0E;
  --fg: #F2EFE6;
  --accent: #FFD500;
  --card: #1A1A19;
  --line2: rgba(242,239,230,0.10);
  background: var(--bg); color: var(--fg);
}
.theme-bold.light {
  --bg: #F5F2E8;
  --fg: #0A0A0A;
  --accent: #0A0A0A;
  --card: #FFFFFF;
  --line2: rgba(10,10,10,0.12);
  background: var(--bg); color: var(--fg);
}
.theme-cinematic.light {
  --bg: #F2EDE4;
  --fg: #0E0B0A;
  --accent: #E63946;
  --card: #FFFFFF;
  --line2: rgba(14,11,10,0.12);
  background: var(--bg); color: var(--fg);
}

/* Utility */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  padding: 6px 10px; border: 1px solid currentColor; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse { position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0% { opacity: 0.8; transform: scale(0.6);} 80% { opacity: 0; transform: scale(2);} 100% { opacity: 0; transform: scale(2);} }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px;
  font-weight: 700; font-size: 16px;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,213,0,0.15);
}
/* Ensure all form/interactive buttons get the iOS tap fix too */
button, [type="submit"] { touch-action: manipulation; cursor: pointer; }
/* Hover-lift and transform compositing ONLY on devices with a real pointer.
   On iOS WebKit (Safari AND Chrome), will-change:transform creates a
   composited layer whose hit-testing is unreliable for touch, and
   transition:transform causes the button to move during a tap. */
@media (hover: hover) and (pointer: fine) {
  .btn {
    transition: transform .25s ease, background .2s ease, color .2s ease;
    transform-origin: center center;
    will-change: transform;
  }
  .btn:hover { transform: scale(1.04); }
}
/* Force-kill transform props on touch devices — Chrome iOS (WKWebView)
   can misreport hover:hover as true, so hover:hover alone is not enough. */
@media (pointer: coarse) {
  .btn, .btn:hover, .btn:active {
    will-change: auto !important;
    transform: none !important;
  }
}
.btn:active { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #0A0A0A; }
.btn-ghost { border: 1.5px solid currentColor; }

/* Marquee */
.marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(to left, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 64px; animation: marquee 40s linear infinite; width: max-content; }
@keyframes marquee { 0% { transform: translateX(0);} 100% { transform: translateX(50%);} }

/* Waveform */
.waveform { display: flex; align-items: center; gap: 3px; height: 40px; }
.waveform span { display: block; width: 3px; background: currentColor; border-radius: 2px; animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 0%,100% { height: 10%;} 50% { height: 100%;} }

/* Hero "tap for sound" hint — shows below the clip while it's muted */
.hero-sound-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #0A0A0A;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  pointer-events: none;
  animation: soundHintPulse 1.6s ease-in-out infinite;
}
.hero-sound-hint svg { display: block; }
@keyframes soundHintPulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* Grid bg */
.grid-bg {
  background-image:
    linear-gradient(to right, var(--line2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line2) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* FAQ */
details.faq { border-bottom: 1px solid var(--line2); padding: 20px 0; }
details.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 20px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .icon { transition: transform .3s ease; font-size: 24px; }
details[open].faq summary .icon { transform: rotate(45deg); }
details.faq .answer { padding-top: 14px; color: var(--fg); opacity: 0.75; line-height: 1.7; font-size: 17px; }

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px;
  padding: 14px 16px; border-radius: 12px;
  background: transparent; color: inherit;
  border: 1.5px solid var(--line2);
  outline: none; transition: border-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}
.field.error input, .field.error select, .field.error textarea { border-color: #E63946; }
.field .err { font-family: var(--font-mono); font-size: 11px; color: #E63946; }

/* Page transitions on variation change */
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }

/* Variation switcher (separate from Tweaks) */
.var-switch {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 40;
  display: flex; gap: 4px; padding: 4px;
  background: rgba(10,10,10,0.85); color: #F5F2E8;
  border: 1px solid rgba(245,242,232,0.15);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-family: var(--font-mono); font-size: 11px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.var-switch button {
  padding: 8px 16px; border-radius: 999px; color: inherit;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500;
}
.var-switch button.active { background: var(--primary); color: #0A0A0A; font-weight: 700; }

/* Tweaks panel */
.tweaks-panel {
  position: fixed; bottom: 80px; left: 24px; z-index: 50;
  background: #0A0A0A; color: #F5F2E8;
  border: 1px solid rgba(245,242,232,0.15);
  border-radius: 16px; padding: 20px;
  width: 280px;
  font-family: var(--font-mono);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.tweaks-panel h3 { margin: 0 0 16px; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
.tweaks-panel .row { margin-bottom: 14px; }
.tweaks-panel label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.6; margin-bottom: 6px; }
.tweaks-panel .swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.tweaks-panel .sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.tweaks-panel .sw.active { border-color: #F5F2E8; }
.tweaks-panel select {
  width: 100%; background: #1A1A1A; color: inherit;
  border: 1px solid rgba(245,242,232,0.2); border-radius: 8px;
  padding: 8px 10px; font: inherit; font-size: 12px;
}
.tweaks-panel .toggle {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; cursor: pointer;
  padding: 8px 12px; background: #1A1A1A; border-radius: 8px;
  border: 1px solid rgba(245,242,232,0.15);
}
.tweaks-panel .toggle .knob {
  width: 32px; height: 18px; background: #333; border-radius: 999px; position: relative; transition: background .2s;
}
.tweaks-panel .toggle .knob::after {
  content: ""; position: absolute; top: 2px; right: 2px;
  width: 14px; height: 14px; border-radius: 50%; background: #F5F2E8;
  transition: transform .2s;
}
.tweaks-panel .toggle.on .knob { background: var(--primary); }
.tweaks-panel .toggle.on .knob::after { transform: translateX(-14px); background: #0A0A0A; }

/* Responsive */
@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
  .tweaks-panel { left: 12px; right: 12px; width: auto; }
  .var-switch { bottom: 12px; font-size: 10px; }
}

/* ============================================================
   Admin Mode — inline text editor + section drag-to-reorder
   ============================================================ */

.admin-button {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0F0F0F;
  border: 1.5px solid var(--accent, #FFD500);
  color: var(--accent, #FFD500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 24px rgba(255,213,0,0.18);
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.admin-button:hover {
  transform: translateY(-50%) scale(1.06);
  background: #181818;
  box-shadow: 0 10px 32px rgba(0,0,0,0.55), 0 0 36px rgba(255,213,0,0.35);
}
.admin-button:active { transform: translateY(-50%) scale(0.97); }

.hero-poster-img {
  filter: saturate(1.2) contrast(1.08) brightness(1.02);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
.hero-poster-btn:hover .hero-poster-img { transform: scale(1.05); }
/* Baked posters are already color-graded in the image — render true colors. */
.hero-poster-img--baked { filter: none; }

.admin-scale-selected {
  outline: 2px dashed var(--accent) !important;
  outline-offset: 4px;
  border-radius: 2px;
}

/* Free-hand editing: while editing/arranging, headings never auto-wrap (only a
   manual Enter breaks a line) and nothing clips them, so text can extend freely.
   The red safe-zone guides show how far is safe on the narrowest phone. */
body.admin-editing-text :is(h1, h2, h3, h4),
body.admin-moving-elements :is(h1, h2, h3, h4),
body.admin-editing-text :is(h1, h2, h3, h4) *,
body.admin-moving-elements :is(h1, h2, h3, h4) * {
  white-space: nowrap !important;
}
body.admin-editing-text section,
body.admin-moving-elements section,
body.admin-editing-text .site-canvas,
body.admin-moving-elements .site-canvas,
body.admin-editing-text .wrap,
body.admin-moving-elements .wrap {
  overflow: visible !important;
}

/* Narrowest-phone safe-zone side guides (edit/move modes). */
.safe-guide {
  position: fixed; top: 0; bottom: 0; width: 2px;
  background: rgba(255,45,45,0.6);
  box-shadow: 0 0 6px rgba(255,0,0,0.45);
  z-index: 9997; pointer-events: none;
}

.scale-control {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: #0F0F0F;
  border: 1px solid rgba(255,213,0,0.45);
  border-radius: 999px;
  z-index: 10000;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(255,213,0,0.15);
  font-family: 'FbTypograph2', system-ui, sans-serif;
  color: #fff;
}
.scale-control__label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.55); }
.scale-control__btn {
  appearance: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,213,0,0.5);
  background: rgba(255,213,0,0.12); color: var(--accent);
  font-size: 20px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.scale-control__btn:active { background: var(--accent); color: #0A0A0A; }
.scale-control__val { min-width: 58px; text-align: center; font-weight: 800; font-size: 15px; }
.scale-control__sub { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.45); min-width: 38px; text-align: center; }
.scale-control__reset, .scale-control__close {
  appearance: none; cursor: pointer;
  background: transparent; border: 0; color: rgba(255,255,255,0.7);
  font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 8px;
}
.scale-control__reset:hover, .scale-control__close:hover { background: rgba(255,255,255,0.08); }

.scale-control--panel {
  flex-direction: column;
  align-items: stretch;
  border-radius: 16px;
  gap: 6px;
  padding: 12px 14px;
  min-width: 232px;
}
.scale-control__title { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: rgba(255,213,0,0.85); text-align: center; margin-bottom: 2px; }
.scale-control__row { display: flex; align-items: center; gap: 8px; }
.scale-control--panel .scale-control__label { flex: 1; text-align: right; }
.scale-control--panel .scale-control__val { min-width: 52px; }
.scale-control__actions { justify-content: flex-end; gap: 4px; margin-top: 2px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; }

.admin-toolbar {
  position: fixed;
  right: 88px;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  max-height: 92vh;
  overflow-y: auto;
  background: #0F0F0F;
  border: 1px solid rgba(255,213,0,0.35);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 9998;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(255,213,0,0.12);
  font-family: 'FbTypograph2', system-ui, sans-serif;
}

.admin-toolbar__row {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.9);
  font: inherit;
  font-size: 14px;
  text-align: start;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s ease, color 0.2s ease;
  direction: rtl;
}
.admin-toolbar__row:hover { background: rgba(255,213,0,0.08); }
.admin-toolbar__row.is-active {
  background: var(--accent, #FFD500);
  color: #0A0A0A;
  font-weight: 700;
}
.admin-toolbar__icon { font-size: 16px; }
.admin-toolbar__label { flex: 1; }
.admin-toolbar__sep {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 6px;
}
.admin-toolbar__modelabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.45);
  padding: 2px 8px;
}

/* Edit Text mode — outline editable elements on hover/focus */
body.admin-editing-text [data-edit-id] {
  cursor: text;
  position: relative;
}
body.admin-editing-text [data-edit-id]:hover {
  outline: 1px dashed rgba(255,213,0,0.45);
  outline-offset: 2px;
  border-radius: 2px;
}
body.admin-editing-text [data-edit-id][contenteditable="true"]:focus {
  outline: 2px solid var(--accent, #FFD500);
  outline-offset: 3px;
  background: rgba(255,213,0,0.05);
  border-radius: 2px;
}

/* Dragging Sections mode */
body.admin-dragging-sections [data-section-id] {
  position: relative;
  outline: 2px dashed rgba(255,213,0,0.3);
  outline-offset: -2px;
  cursor: grab;
}
body.admin-dragging-sections [data-section-id]:hover {
  outline-color: var(--accent, #FFD500);
}
body.admin-dragging-sections .section-dragging {
  opacity: 0.5;
  cursor: grabbing !important;
}
body.admin-dragging-sections .section-drop-target {
  outline: 3px solid var(--accent, #FFD500) !important;
  outline-offset: -3px;
  box-shadow: 0 0 30px rgba(255,213,0,0.4);
}

@media (max-width: 768px) {
  .admin-button { width: 48px; height: 48px; right: 12px; }
  .admin-toolbar { right: 70px; width: 190px; }
}

/* Admin password modal */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: adminFadeIn 0.18s ease-out;
}
@keyframes adminFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.admin-modal {
  background: #111;
  border: 1.5px solid var(--accent, #FFD500);
  border-radius: 16px;
  padding: 28px 28px 22px;
  width: min(380px, 92vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 213, 0, 0.15);
  font-family: 'FbTypograph2', system-ui, sans-serif;
}
.admin-modal__title {
  color: #fff;
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 800;
}
.admin-modal__input {
  width: 100%;
  background: #0A0A0A;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font: 500 15px 'FbTypograph2', system-ui, sans-serif;
  letter-spacing: 0.04em;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.admin-modal__input:focus {
  outline: none;
  border-color: var(--accent, #FFD500);
  background: #050505;
}
.admin-modal__error {
  color: #ff5d5d;
  font-size: 13px;
  margin-top: 10px;
  font-weight: 600;
}
.admin-modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}
.admin-modal__btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font: 700 14px 'FbTypograph2', system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}
.admin-modal__btn:hover { transform: translateY(-1px); }
.admin-modal__btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
}
.admin-modal__btn--ghost:hover { color: #fff; }
.admin-modal__btn--primary {
  background: var(--accent, #FFD500);
  color: #0A0A0A;
  box-shadow: 0 0 24px rgba(255, 213, 0, 0.3);
}

/* Move-any-element mode */
body.admin-moving-elements [data-section-id],
body.admin-moving-elements * {
  user-select: none;
}
body.admin-moving-elements #root *:not(.admin-button):not(.admin-toolbar):not(.admin-modal):not(.admin-modal *):hover {
  outline: 1px dashed rgba(255, 213, 0, 0.5);
  outline-offset: 2px;
  cursor: grab;
}
body.admin-moving-active * { cursor: grabbing !important; }
.admin-moving {
  outline: 2px solid var(--accent, #FFD500) !important;
  outline-offset: 4px;
  box-shadow: 0 0 40px rgba(255, 213, 0, 0.4) !important;
  z-index: 9990 !important;
  position: relative !important;
}

/* Section hide-toggle (visible only in drag-sections admin mode) */
[data-section-id] { position: relative; }
.section-hide-toggle {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 50;
  appearance: none;
  border: 1px solid var(--accent, #FFD500);
  background: rgba(0, 0, 0, 0.85);
  color: var(--accent, #FFD500);
  font: 700 12px 'FbTypograph2', system-ui, sans-serif;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
body.admin-dragging-sections .section-hide-toggle { display: inline-flex; }
.section-hide-toggle:hover { background: var(--accent, #FFD500); color: #0A0A0A; }

/* Hidden section in admin view — dim + striped overlay */
.section-hidden-admin {
  opacity: 0.4;
  filter: grayscale(0.5);
  position: relative;
}
.section-hidden-admin::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 213, 0, 0.06) 0,
    rgba(255, 213, 0, 0.06) 12px,
    transparent 12px,
    transparent 24px
  );
  pointer-events: none;
  z-index: 1;
}
.section-hidden-badge {
  position: absolute;
  top: 14px;
  inset-inline-end: 12px;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  color: #ff8a8a;
  border: 1px solid rgba(255, 80, 80, 0.5);
  font: 700 12px 'FbTypograph2', system-ui, sans-serif;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Versions modal */
.admin-modal--wide {
  width: min(880px, 96vw);
}
.admin-modal__hint {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin: 0 0 16px;
  line-height: 1.5;
}
.admin-versions {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-versions__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.admin-versions__row:hover {
  border-color: rgba(255, 213, 0, 0.4);
  background: rgba(255, 213, 0, 0.05);
}
.admin-versions__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.admin-versions__label {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.admin-versions__meta {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.admin-versions__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.admin-versions__btn {
  appearance: none;
  border: 1px solid rgba(255,213,0,0.45);
  background: transparent;
  color: var(--accent, #FFD500);
  font: 700 12px 'FbTypograph2', system-ui, sans-serif;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-versions__btn:hover {
  background: var(--accent, #FFD500);
  color: #0A0A0A;
}
.admin-versions__btn--danger {
  border-color: rgba(255, 80, 80, 0.5);
  color: #ff8a8a;
}
.admin-versions__btn--danger:hover {
  background: #ff5a5a;
  color: #fff;
  border-color: #ff5a5a;
}

/* Videos manager modal */
.admin-videos {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  max-height: 55vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-videos__row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.admin-videos__row:hover {
  border-color: rgba(255, 213, 0, 0.4);
  background: rgba(255, 213, 0, 0.05);
}
.admin-videos__row.is-hidden { opacity: 0.45; }
.admin-videos__idx {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: rgba(255,213,0,0.12);
  color: var(--accent, #FFD500);
  font: 800 12px 'FbTypograph2', system-ui, sans-serif;
}
.admin-videos__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.admin-videos__name {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.admin-videos__meta {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.admin-videos__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.admin-videos__btn {
  appearance: none;
  border: 1px solid rgba(255,213,0,0.45);
  background: transparent;
  color: var(--accent, #FFD500);
  font: 800 12px 'FbTypograph2', system-ui, sans-serif;
  min-width: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.admin-videos__btn:hover:not(:disabled) {
  background: var(--accent, #FFD500);
  color: #0A0A0A;
}
.admin-videos__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.admin-videos__btn.is-on {
  border-color: rgba(255,80,80,0.5);
  color: #ff8a8a;
}
.admin-videos__btn.is-on:hover {
  background: #ff5a5a;
  color: #fff;
  border-color: #ff5a5a;
}

/* Publish-settings modal fields */
.admin-field { margin-bottom: 14px; }
.admin-field__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: rgba(255,255,255,0.75);
  font: 600 13px 'FbTypograph2', system-ui, sans-serif;
  margin-bottom: 6px;
}
.admin-field__link {
  color: var(--accent, #FFD500);
  font-size: 12px;
  text-decoration: none;
  font-weight: 700;
}
.admin-field__link:hover { text-decoration: underline; }
.admin-field__caption {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  margin: 6px 0 0;
  line-height: 1.5;
}
.admin-modal__success {
  background: rgba(80, 255, 80, 0.1);
  color: #7ee787;
  border: 1px solid rgba(80, 255, 80, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  margin-top: 6px;
}

/* Admin guests modal — desktop: side-by-side; mobile: stacked */
.admin-guest-row {
  display: grid;
  grid-template-columns: 32px auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 10px;
}
.admin-guest-row__preview {
  width: min(360px, 38vw);
  aspect-ratio: 16 / 9;
}
@media (max-width: 720px) {
  /* Single clean vertical stack so nothing overlaps: handle, preview, the
     number fields, then the action buttons in a horizontal row. */
  .admin-guest-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "handle"
      "preview"
      "fields"
      "buttons";
    row-gap: 14px;
    justify-items: stretch;
  }
  .admin-guest-row > :nth-child(1) { grid-area: handle; justify-self: start; }
  .admin-guest-row > :nth-child(2) { grid-area: preview; justify-self: center; }
  .admin-guest-row > :nth-child(3) { grid-area: fields; }
  .admin-guest-row > :nth-child(4) {
    grid-area: buttons;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px !important;
  }
  .admin-guest-row > :nth-child(4) .admin-videos__btn { width: 44px; height: 40px; }
  .admin-guest-row__preview { width: 100%; max-width: 240px; }
}

/* ===== Accessibility widget ===== */
.a11y-fab {
  position: fixed; left: 20px; bottom: 20px; z-index: 99999;
  width: 54px; height: 54px; border-radius: 50%;
  background: #FFD500; color: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 26px rgba(0,0,0,0.45), 0 0 0 4px rgba(255,213,0,0.18);
  cursor: pointer; border: none;
  transition: transform 0.2s ease;
}
@media (hover: hover) and (pointer: fine) { .a11y-fab:hover { transform: scale(1.06); } }
.a11y-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.a11y-panel {
  position: fixed; left: 20px; bottom: 86px; z-index: 99999;
  width: 280px; max-height: 76vh; overflow-y: auto;
  background: #121212; border: 1px solid rgba(255,213,0,0.4);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.6);
  color: #fff;
}
.a11y-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 16px; margin-bottom: 12px;
  color: #FFD500;
}
.a11y-close {
  background: transparent; border: none; color: rgba(255,255,255,0.6);
  font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.a11y-close:hover { color: #fff; }
.a11y-text-ctrl {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
  background: rgba(255,255,255,0.05); border-radius: 10px; padding: 8px 12px;
  font-size: 13px; color: rgba(255,255,255,0.85);
}
.a11y-text-ctrl button {
  width: 38px; height: 34px; border-radius: 8px;
  background: rgba(255,213,0,0.14); border: 1px solid rgba(255,213,0,0.4);
  color: #FFD500; font-weight: 800; font-size: 15px; cursor: pointer;
}
.a11y-text-ctrl button:hover { background: #FFD500; color: #0A0A0A; }
.a11y-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  text-align: right; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 9px;
  padding: 9px 12px; margin-bottom: 6px;
  color: rgba(255,255,255,0.85); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: border-color 0.18s ease, background 0.18s ease;
}
.a11y-row:hover { border-color: rgba(255,213,0,0.4); }
.a11y-row__dot {
  width: 14px; height: 14px; border-radius: 5px; flex: 0 0 14px;
  border: 1.5px solid rgba(255,255,255,0.3); background: transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.a11y-row.is-on { border-color: rgba(255,213,0,0.6); background: rgba(255,213,0,0.08); color: #fff; }
.a11y-row.is-on .a11y-row__dot { background: #FFD500; border-color: #FFD500; }
.a11y-reset {
  width: 100%; margin-top: 8px; padding: 10px;
  background: transparent; border: 1px solid rgba(255,80,80,0.5);
  color: #ff8a8a; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.a11y-reset:hover { background: #ff5a5a; color: #fff; border-color: #ff5a5a; }
.a11y-statement {
  display: block; text-align: center; margin-top: 10px;
  color: #FFD500; font-size: 12.5px; text-decoration: underline;
}
@media (max-width: 560px) {
  .a11y-panel { width: calc(100vw - 40px); }
}

/* ===== Legal modal (terms / privacy / accessibility) ===== */
.legal-backdrop {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(0,0,0,0.78); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.legal-modal {
  background: #121212; border: 1px solid rgba(255,213,0,0.35);
  border-radius: 18px; width: 100%; max-width: 760px;
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0,0,0,0.7);
  color: rgba(255,255,255,0.85);
}
.legal-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
  flex: 0 0 auto;
}
.legal-modal__title {
  color: #fff; font-weight: 900; font-size: clamp(20px, 3vw, 28px); margin: 0;
}
.legal-modal__close {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7); width: 36px; height: 36px; border-radius: 10px;
  font-size: 16px; cursor: pointer; flex: 0 0 auto;
  transition: background 0.18s ease, color 0.18s ease;
}
.legal-modal__close:hover { background: #FFD500; color: #0A0A0A; }
.legal-modal__body {
  padding: 22px 26px 28px; overflow-y: auto; line-height: 1.7;
}
.legal-modal__updated { color: rgba(255,255,255,0.45); font-size: 13px; margin-bottom: 16px; }
.legal-modal__note {
  background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 10px; padding: 14px 16px; color: rgba(255,255,255,0.6);
  font-size: 13.5px; margin-bottom: 26px;
}
.legal-modal__h { color: #fff; font-weight: 800; font-size: clamp(17px, 2.2vw, 21px); margin: 28px 0 10px; }
.legal-modal__p { font-size: 15.5px; margin-bottom: 12px; }
.legal-modal__ul { margin: 0 22px 14px; font-size: 15.5px; }
.legal-modal__ul li { margin-bottom: 7px; }
.legal-modal__foot {
  border-top: 1px solid rgba(255,255,255,0.08); margin-top: 30px;
  padding-top: 18px; color: rgba(255,255,255,0.4); font-size: 13px;
}
@media (max-width: 560px) {
  .legal-backdrop { padding: 0; }
  .legal-modal { max-width: 100%; max-height: 100vh; border-radius: 0; }
}
