:root {
  --bg: #0f1419;
  --bg-elev: #1a222c;
  --text: #e8e4dc;
  --muted: #9a9388;
  --gold: #c9a227;
  --gold-dim: #8a7020;
  --accent: #4a7c8c;
  --radius: 12px;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  /* Misma cuadrícula que las tarjetas de cada día del Omer */
  --omer-day-max: 1000px;
  --omer-card-gap: 0.65rem;
  --omer-card-min: 140px;
  /* Una sola definición: mismas columnas que el menú de 49 días */
  --omer-grid-columns: repeat(auto-fill, minmax(min(100%, var(--omer-card-min)), 1fr));
  --body-gradient: radial-gradient(ellipse 120% 80% at 50% -20%, #243040 0%, var(--bg) 55%);
  --grain-opacity: 0.04;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2efe8;
  --bg-elev: #ffffff;
  --text: #1c1914;
  --muted: #5e574c;
  --gold: #8a6b12;
  --gold-dim: #6b5410;
  --accent: #2d5f6e;
  --body-gradient: radial-gradient(ellipse 120% 80% at 50% -15%, #d4e4ea 0%, var(--bg) 50%);
  --grain-opacity: 0.035;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--body-gradient);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Aviso: página abierta como file:// (opcional) */
.file-protocol-banner {
  max-width: var(--omer-day-max);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  background: rgba(201, 162, 39, 0.12);
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e0dbd2;
}

.file-protocol-banner p {
  margin: 0 0 0.5rem;
}

.file-protocol-banner p:last-child {
  margin-bottom: 0;
}

.file-protocol-banner code {
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

.file-protocol-banner a {
  color: var(--gold);
  font-weight: 600;
}

.file-protocol-banner--embed {
  background: rgba(74, 124, 140, 0.14);
  border-bottom-color: rgba(74, 124, 140, 0.4);
}

.file-protocol-banner-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.file-protocol-banner-lead {
  margin-bottom: 0.65rem;
}

.file-protocol-banner-cmd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.file-protocol-banner-label {
  flex: 0 0 auto;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.file-protocol-banner-sep {
  color: var(--muted);
  user-select: none;
}

.file-protocol-banner-note {
  flex: 1 1 100%;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (min-width: 520px) {
  .file-protocol-banner-note {
    flex: 1 1 auto;
  }
}

.site-footer .footer-dev {
  font-size: 0.82rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Barra fija: tema y pantalla completa (responsive, safe-area móvil) */
.app-controls {
  position: fixed;
  top: max(0.4rem, env(safe-area-inset-top, 0px));
  right: max(0.4rem, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  max-width: min(100% - 0.75rem, 30rem);
  pointer-events: none;
}

.app-controls .app-control-btn {
  pointer-events: auto;
}

.app-controls .tv-nav-menu {
  pointer-events: auto;
}

.app-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: clamp(0.78rem, 2.8vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

html[data-theme="light"] .app-control-btn {
  border-color: rgba(138, 107, 18, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.app-control-btn:hover {
  border-color: var(--gold);
}

.app-control-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-control-icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.app-control-label {
  white-space: nowrap;
}

@media (max-width: 380px) {
  .app-control-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .app-control-btn {
    padding: 0.5rem;
    justify-content: center;
  }
}

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(2.75rem, 7vw, 3.5rem) 1.25rem 0.5rem;
  text-align: center;
}

.hero-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  margin: 0 auto 0.85rem;
  text-decoration: none;
  color: inherit;
}

.hero-brand:hover .hero-brand-img {
  opacity: 0.95;
}

.hero-brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 10px;
}

.hero-brand-img {
  display: block;
  width: 100%;
  max-width: min(920px, 100%);
  height: auto;
}

.hero-brand-tagline {
  margin: 0;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 0.75rem;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Mismo ancho útil que .omer-section (tarjetas y videos alineados) */
.intro-wrap {
  max-width: var(--omer-day-max);
  margin: 0 auto 2rem;
  padding: 0 1rem;
  box-sizing: border-box;
}

.omer-section {
  max-width: var(--omer-day-max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.intro-body {
  margin-top: 0.75rem;
}

.prose {
  color: #d8d2c8;
}

.prose p {
  margin: 0 0 1rem;
}

.prose a {
  color: var(--gold);
  word-break: break-word;
}

/* Rejilla compartida con .day-grid: mismas columnas, gap y ancho de celda */
.modal-scroll .omer-embed-grid {
  max-width: 100%;
}

/* Contenedor solo para la rejilla; la tarjeta visible es .day-btn.yt-video-btn */
.yt-embed {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

a.day-btn.yt-video-btn {
  text-decoration: none;
  color: inherit;
}

.yt-video-thumb-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0d11;
  flex-shrink: 0;
}

.yt-video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-video-btn:hover .yt-video-thumb-wrap img {
  opacity: 0.92;
}

.yt-embed-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.72);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.yt-embed-play::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0 solid transparent;
  border-left: 1.1rem solid #fff;
  border-top: 0.65rem solid transparent;
  border-bottom: 0.65rem solid transparent;
}

.reading-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent);
  margin: 1.25rem 0 0.5rem;
}

.day-reading {
  max-height: none;
}

.small {
  font-size: 0.88rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1.25rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toolbar select {
  font: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-elev);
  color: var(--text);
  min-width: 200px;
}

.btn {
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.15), transparent);
  color: var(--gold);
}

.btn:hover {
  border-color: var(--gold);
}

.current-day {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(74, 124, 140, 0.12);
  border-radius: var(--radius);
  border: 1px solid rgba(74, 124, 140, 0.35);
}

.current-day h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.current-day p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  text-align: center;
  margin: 0 0 0.75rem;
  color: var(--text);
}

/* Misma rejilla que los bloques de video: cada celda = mismo ancho que una tarjeta de día */
.day-grid,
.omer-embed-grid {
  margin: 0 0 1.25rem;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: var(--omer-grid-columns);
  gap: var(--omer-card-gap);
  align-items: start;
  justify-items: stretch;
  box-sizing: border-box;
}

/* El reproductor / miniatura ocupa todo el ancho de la celda (como .day-btn) */
.omer-embed-grid > .yt-embed {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.intro-body .omer-embed-grid {
  width: 100%;
}

.day-grid {
  list-style: none;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
}

.omer-section .day-grid {
  margin-left: 0;
  margin-right: 0;
}

.day-btn {
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.day-btn:hover {
  border-color: rgba(201, 162, 39, 0.45);
  transform: translateY(-1px);
}

.day-num {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--gold);
}

.day-meta {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-pair {
  font-size: 0.82rem;
  color: #b8b0a4;
  line-height: 1.3;
}

.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.site-footer code {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.modal {
  border: none;
  padding: 0;
  max-width: min(640px, 96vw);
  width: 100%;
  background: transparent;
}

.modal-inner {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: var(--radius);
  padding: 0.65rem 1rem 1rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
}

.modal-inner:fullscreen {
  max-height: none;
  height: 100%;
  width: 100%;
  max-width: none;
  border-radius: 0;
  padding: 0.75rem 1rem 1rem;
  box-sizing: border-box;
}

.modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 0.35rem;
  padding-bottom: 0.25rem;
  background: var(--bg-elev);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-inner:fullscreen .modal-toolbar {
  flex-shrink: 0;
}

.modal-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font: inherit;
  font-size: clamp(0.78rem, 2.5vw, 0.88rem);
  font-weight: 600;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  min-height: 40px;
  touch-action: manipulation;
}

.modal-fullscreen-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.modal-fullscreen-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal-fullscreen-icon {
  font-size: 1rem;
  line-height: 1;
}

.modal-fullscreen-label {
  white-space: nowrap;
}

@media (max-width: 420px) {
  .modal-fullscreen-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .modal-fullscreen-btn {
    padding: 0.4rem 0.5rem;
    justify-content: center;
  }
}

.modal-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 0.25rem;
}

.modal-inner:fullscreen .modal-scroll {
  flex: 1;
  min-height: 0;
}

.modal-close {
  border: none;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Compartir día: reseña + enlace directo / corto */
.omer-share-card {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(74, 124, 140, 0.1);
}

.omer-share-h {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
}

.omer-share-lead {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.omer-share-tools {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.omer-share-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.omer-share-input {
  font: inherit;
  font-size: 0.88rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}

html[data-theme="light"] .omer-share-input {
  border-color: rgba(0, 0, 0, 0.14);
}

.omer-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.modal .omer-share-btn {
  font-size: 0.88rem;
  padding: 0.45rem 0.75rem;
}

.omer-share-short-out {
  margin: 0;
  padding-top: 0.25rem;
}

.omer-share-short-line {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 0.92rem;
  word-break: break-all;
}

.omer-share-short-line a {
  color: var(--gold);
  font-weight: 600;
}

.omer-share-short-fail {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.omer-share-short-fail strong {
  color: var(--text);
}

.omer-share-social-heading {
  margin: 0.85rem 0 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
}

.omer-share-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.omer-share-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  min-height: 40px;
  box-sizing: border-box;
}

.omer-share-social-btn:hover {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.08);
}

.omer-share-social-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.omer-share-social-btn i {
  font-size: 1.1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.omer-share-social-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.omer-share-social--wa:hover {
  border-color: #25d366;
  color: #b8f5d0;
}

.omer-share-social--tg:hover {
  border-color: #26a5e4;
  color: #a8dfff;
}

.omer-share-social--x:hover {
  border-color: #e7e9ea;
}

.omer-share-social--fb:hover {
  border-color: #1877f2;
  color: #a8c7ff;
}

.omer-share-social--li:hover {
  border-color: #0a66c2;
  color: #a8d4ff;
}

.omer-share-social--re:hover {
  border-color: #ff4500;
  color: #ffc4a8;
}

.omer-share-social--mail:hover,
.omer-share-social--sms:hover {
  border-color: var(--gold);
}

html[data-theme="light"] .omer-share-social-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .omer-share-card {
  background: rgba(45, 95, 110, 0.08);
  border-color: rgba(45, 95, 110, 0.35);
}

.modal-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: var(--gold);
}

.hebrew {
  font-size: 1.25rem;
  direction: rtl;
  text-align: center;
  margin: 0.25rem 0 0.35rem;
}

.modal-gloss {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.modal-rule {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1rem 0;
}

.liturgy-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.liturgy {
  margin: 0 0 1rem;
  padding-left: 0.9rem;
  border-left: 3px solid rgba(201, 162, 39, 0.4);
  font-size: 0.95rem;
  color: #d5cfc4;
}

.muted {
  color: var(--muted);
}

/* Ajustes modo claro: contraste de bloques con color fijo heredado del diseño oscuro */
html[data-theme="light"] .prose {
  color: #3d3830;
}

html[data-theme="light"] .day-pair {
  color: #4a453c;
}

html[data-theme="light"] .liturgy {
  color: #454038;
}

html[data-theme="light"] .file-protocol-banner {
  background: rgba(138, 107, 18, 0.1);
  border-bottom-color: rgba(138, 107, 18, 0.35);
  color: var(--text);
}

html[data-theme="light"] .file-protocol-banner--embed {
  background: rgba(45, 95, 110, 0.1);
  border-bottom-color: rgba(45, 95, 110, 0.35);
}

html[data-theme="light"] .toolbar select {
  border-color: rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .day-btn {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .modal-inner {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .modal-rule {
  border-top-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .site-footer code {
  background: rgba(0, 0, 0, 0.06);
}

/* Menú desplegable Torah Viviente (desde inicio.html), a la derecha de pantalla completa */
.tv-nav-menu {
  --tv-israel-blue: #0038b8;
  --tv-israel-white: #ffffff;
  --tv-israel-gold: #ffd700;
  --tv-israel-dark-blue: #001f5c;
  --tv-israel-darker-blue: #000033;
  --tv-israel-light-blue: #1e4a8c;
  --tv-israel-very-dark: #000011;
  --tv-menu-bg: linear-gradient(
    135deg,
    var(--tv-israel-blue) 0%,
    var(--tv-israel-dark-blue) 100%
  );
  --tv-menu-hover: rgba(255, 215, 0, 0.2);
  --tv-line-color: rgba(255, 255, 255, 0.3);
  --tv-menu-text: var(--tv-israel-white);
  --tv-btn-bg: linear-gradient(
    135deg,
    var(--tv-israel-blue) 0%,
    var(--tv-israel-dark-blue) 100%
  );
  --tv-btn-hover: linear-gradient(135deg, var(--tv-israel-gold) 0%, #ffed4e 100%);
  --tv-shadow: rgba(0, 56, 184, 0.3);
  --tv-shadow-hover: rgba(0, 56, 184, 0.4);
  position: relative;
  flex: 0 0 auto;
}

html[data-theme="dark"] .tv-nav-menu {
  --tv-menu-bg: linear-gradient(
    135deg,
    var(--tv-israel-very-dark) 0%,
    var(--tv-israel-darker-blue) 100%
  );
  --tv-btn-bg: linear-gradient(
    135deg,
    var(--tv-israel-darker-blue) 0%,
    var(--tv-israel-very-dark) 100%
  );
  --tv-btn-hover: linear-gradient(
    135deg,
    var(--tv-israel-light-blue) 0%,
    var(--tv-israel-blue) 100%
  );
  --tv-shadow: rgba(0, 0, 0, 0.5);
  --tv-shadow-hover: rgba(0, 0, 0, 0.7);
}

.tv-nav-menu .menu-container {
  position: relative;
  top: auto;
  right: auto;
  z-index: 201;
}

.tv-nav-menu .menu-button {
  background: var(--tv-btn-bg);
  color: var(--tv-israel-white);
  border: none;
  padding: 0.55rem 0.85rem;
  font-size: 1.05rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px var(--tv-shadow);
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

.tv-nav-menu .menu-button:hover {
  background: var(--tv-btn-hover);
  color: var(--tv-israel-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--tv-shadow-hover);
}

.tv-nav-menu .dropdown-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(75vw, 28rem);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--tv-menu-bg);
  z-index: 1000;
  overflow-y: auto;
  padding: 1rem 1.1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: right 0.45s ease;
  -webkit-overflow-scrolling: touch;
}

.tv-nav-menu .dropdown-menu.active {
  right: 0;
}

.tv-nav-menu .dropdown-menu .header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tv-nav-menu .header .profile-img {
  max-width: min(500px, 100%);
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto 0.85rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: block;
}

.tv-nav-menu .header a {
  display: block;
  text-decoration: none;
  text-align: center;
  width: 100%;
}

.tv-nav-menu .header .title {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  color: var(--tv-menu-text);
  margin: 0.35rem 0;
}

.tv-nav-menu .elegant-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 400;
  text-align: center;
  color: var(--tv-menu-text);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin: 0.5rem 0;
}

.tv-nav-menu .elegant-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: center;
  color: var(--tv-menu-text);
  line-height: 1.5;
  margin: 0.25rem 0 0.75rem;
}

.tv-nav-menu .close-button {
  background: rgba(255, 255, 255, 0.2);
  color: var(--tv-menu-text);
  border: none;
  padding: 0.45rem 0.65rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  align-self: flex-end;
  margin-bottom: 0.75rem;
  transition: background 0.2s ease;
}

.tv-nav-menu .close-button:hover {
  background: #e74c3c;
  color: #fff;
}

.tv-nav-menu .dropdown-menu a {
  color: var(--tv-menu-text);
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.tv-nav-menu .dropdown-menu a:hover {
  background-color: var(--tv-menu-hover);
}

.tv-nav-menu .dropdown-menu a img {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  flex-shrink: 0;
}

.tv-nav-menu .dropdown-menu a + a {
  border-top: 2px solid var(--tv-line-color);
}

@media (max-width: 480px) {
  :root {
    --omer-grid-columns: repeat(2, 1fr);
  }
}
