/* BibliaREM — shell global permanent
 * Extras din HOME-ul aprobat: numai header, meniu, selector limba, tema, footer si mobile dock.
 * Fara stiluri specifice paginii HOME.
 */
:root {
color-scheme: light dark;
  --font-display: Georgia, Cambria, "Times New Roman", Times, serif;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shell: 1480px;
  --header-h: 76px;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --ease: 180ms ease;
}

html[data-theme="light"],
html[data-theme="auto"] {
--bg: #f8efe1;
  --bg-soft: #fff9ef;
  --surface: rgba(255, 251, 244, .88);
  --surface-2: #fffaf2;
  --text: #13273a;
  --text-soft: #5d6b76;
  --line: rgba(71, 86, 99, .18);
  --line-gold: rgba(183, 122, 24, .32);
  --navy: #0d2a3f;
  --navy-2: #133c56;
  --gold: #ad741c;
  --gold-2: #d8a653;
  --gold-pale: #f3d59d;
  --teal: #1c7180;
  --shadow: 0 20px 55px rgba(33, 48, 60, .13);
  --shadow-soft: 0 12px 35px rgba(33, 48, 60, .09);
  --header-bg: rgba(255, 249, 239, .88);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
--bg: #07131f;
    --bg-soft: #0a1b2a;
    --surface: rgba(12, 29, 43, .88);
    --surface-2: #0d2232;
    --text: #f6ead5;
    --text-soft: #b1bec7;
    --line: rgba(222, 192, 131, .18);
    --line-gold: rgba(228, 182, 90, .34);
    --navy: #061827;
    --navy-2: #0d2c43;
    --gold: #dfb158;
    --gold-2: #f0cb7d;
    --gold-pale: #8d6e36;
    --teal: #54c5c8;
    --shadow: 0 24px 58px rgba(0, 0, 0, .35);
    --shadow-soft: 0 14px 34px rgba(0, 0, 0, .22);
    --header-bg: rgba(7, 19, 31, .9);
  }
}

html[data-theme="dark"] {
--bg: #07131f;
  --bg-soft: #0a1b2a;
  --surface: rgba(12, 29, 43, .88);
  --surface-2: #0d2232;
  --text: #f6ead5;
  --text-soft: #b1bec7;
  --line: rgba(222, 192, 131, .18);
  --line-gold: rgba(228, 182, 90, .34);
  --navy: #061827;
  --navy-2: #0d2c43;
  --gold: #dfb158;
  --gold-2: #f0cb7d;
  --gold-pale: #8d6e36;
  --teal: #54c5c8;
  --shadow: 0 24px 58px rgba(0, 0, 0, .35);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, .22);
  --header-bg: rgba(7, 19, 31, .9);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; background: var(--bg); }

body {
margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 88% 5%, color-mix(in srgb, var(--gold) 9%, transparent), transparent 34rem),
    radial-gradient(circle at 8% 14%, color-mix(in srgb, var(--teal) 7%, transparent), transparent 30rem),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 38rem, var(--bg));
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button, input { font: inherit; }

button { color: inherit; }

svg { vector-effect: non-scaling-stroke; }

.sr-only {
position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 999;
  transform: translateY(-180%);
  padding: .75rem 1rem;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--ease);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  /* Shell-ul își păstrează paleta proprie chiar dacă pagina are altă culoare de body. */
  color: var(--text);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

.header-inner {
width: min(calc(100% - 40px), var(--shell));
  min-height: var(--header-h);
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.brand {
display: inline-flex;
  align-items: center;
  gap: .72rem;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
width: 50px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark img {
width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-copy { display: grid; line-height: 1.05; }

.brand-copy strong {
font: 700 clamp(1.1rem, 1.5vw, 1.5rem)/1 var(--font-display);
  letter-spacing: .05em;
}

.brand-copy small {
margin-top: .28rem;
  font: 600 .68rem/1.1 var(--font-ui);
  letter-spacing: .05em;
  color: var(--gold);
}

.primary-nav {
justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 1.7vw, 1.55rem);
}

.primary-nav a {
position: relative;
  padding: 1rem .15rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 720;
  font-size: .9rem;
  white-space: nowrap;
}

.primary-nav a::after {
content: "";
  position: absolute;
  left: 50%;
  bottom: .58rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width var(--ease);
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after { width: 70%; }

.header-actions { display: flex; align-items: center; gap: .6rem; }

.login-button {
min-height: 42px;
  padding: 0 .92rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  text-decoration: none;
  font-weight: 760;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), background var(--ease);
}

.login-button svg {
width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-button:hover { border-color: var(--line-gold); box-shadow: var(--shadow-soft); transform: translateY(-1px); }

.icon-button,
.language-button,
.nav-toggle,
.popover-close,
.footer-language button {
border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.icon-button {
width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
}

.icon-button svg {
width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.language-control { position: relative; }

.language-name-short { display: none; }

.language-button {
min-height: 42px;
  padding: 0 .88rem;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 760;
}

.language-button > svg,
.footer-language button > svg {
width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-language button {
display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.icon-button:hover,
.language-button:hover { border-color: var(--line-gold); box-shadow: var(--shadow-soft); }

.language-popover {
position: absolute;
  right: 0;
  top: calc(100% + .8rem);
  width: min(356px, calc(100vw - 20px));
  max-height: min(650px, calc(100vh - 110px));
  padding: .78rem;
  border: 1px solid var(--line-gold);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface-2) 96%, transparent);
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  overflow: hidden;
}

.language-popover__head {
display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .7rem;
  margin-bottom: .62rem;
}

.language-popover__head > div { display: grid; gap: .2rem; }

.language-popover__head small {
margin: 0;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.language-popover__head strong { font: 700 1.35rem/1.2 var(--font-display); }

.popover-close {
width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.35rem;
}

.language-search {
min-height: 40px;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 0 .8rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg-soft);
}

.language-search svg { width: 18px; fill: none; stroke: var(--text-soft); stroke-width: 1.7; }

.language-search input {
flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.language-list {
max-height: 430px;
  margin-top: .55rem;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.language-item {
width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: .62rem;
  padding: .52rem .45rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.language-item:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); }

.language-item[aria-disabled="true"] { opacity: .57; cursor: default; }

.language-code {
display: grid;
  place-items: center;
  min-height: 29px;
  border: 1px solid var(--line-gold);
  border-radius: 9px;
  color: var(--gold);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.language-name { display: grid; gap: .12rem; }

.language-name strong { font-size: .9rem; }

.language-name small { color: var(--text-soft); font-size: .72rem; }

.language-state {
padding: .25rem .45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  color: var(--gold);
  font-size: .64rem;
  font-weight: 850;
}

.language-note {
margin: .8rem 0 0;
  color: var(--text-soft);
  font-size: .71rem;
  line-height: 1.45;
}

.nav-toggle { display: none; }

.footer-inner { display: grid; grid-template-columns: .85fr 1.75fr .55fr; gap: 2rem; padding-block: 2.3rem; }

.footer-brand strong { font: 700 1.5rem/1 var(--font-display); letter-spacing: .06em; color: #e4b65a; }

.footer-brand p { color: #9fb0bc; font-size: .8rem; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.footer-links > div { display: grid; align-content: start; gap: .45rem; }

.footer-links strong { margin-bottom: .2rem; color: #e4b65a; font-family: var(--font-display); }

.footer-links a { color: #b4c0c8; text-decoration: none; font-size: .75rem; }

.footer-links a:hover { color: #f0ca7d; }

.footer-language { display: grid; align-content: start; gap: .5rem; }

.footer-language button { min-height: 42px; padding: 0 .8rem; border-color: rgba(228,182,90,.24); border-radius: 12px; background: rgba(255,255,255,.04); color: #e8dfd0; }

.footer-language small { color: #96a8b4; font-size: .68rem; }

.footer-bottom { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.07); color: #8297a5; font-size: .7rem; }

.toast {
position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 100;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 28px));
  padding: .8rem 1rem;
  border: 1px solid var(--line-gold);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  font-size: .8rem;
}

:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold-2) 78%, white); outline-offset: 3px; }

@media (max-width: 1240px) {
    .header-inner { grid-template-columns: auto 1fr auto; }

    .primary-nav { gap: .8rem; }

    .primary-nav a { font-size: .82rem; }
}

@media (max-width: 980px) {
    :root { --header-h: 68px; }

    .header-inner { grid-template-columns: auto auto 1fr; gap: .75rem; }

    .brand { grid-column: 1; }

    .nav-toggle {
grid-column: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-content: center;
    gap: 4px;
    border-radius: 12px;
  }

    .nav-toggle span:not(.sr-only) { width: 18px; height: 1.5px; background: currentColor; border-radius: 999px; }

    .header-actions { grid-column: 3; justify-self: end; }

    .primary-nav {
position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .6rem;
    border: 1px solid var(--line-gold);
    border-radius: 16px;
    background: var(--surface-2);
    box-shadow: var(--shadow);
  }

    .primary-nav.is-open { display: flex; }

    .primary-nav a { padding: .78rem .85rem; border-radius: 10px; }

    .primary-nav a:hover { background: color-mix(in srgb, var(--gold) 7%, transparent); }

    .primary-nav a::after { display: none; }

    .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .language-name-full { display: none; }

    .language-name-short { display: inline; min-width: 2.1ch; text-align: center; }

    .language-button { min-width: 64px; padding-inline: .62rem; gap: .38rem; justify-content: center; }

    .login-button { width: 42px; padding: 0; justify-content: center; }

    .login-button .login-label { display: none; }
}

@media (max-width: 680px) {
    :root { --header-h: 66px; }

    .header-inner {
width: calc(100% - 14px);
    min-height: var(--header-h);
    grid-template-columns: minmax(0, 1fr) 36px auto;
    gap: .3rem;
  }

    .brand {
min-width: 0;
    max-width: 100%;
    gap: .38rem;
    overflow: hidden;
  }

    .brand-mark {
width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

    .brand-copy {
min-width: 0;
    overflow: hidden;
  }

    .brand-copy strong {
font-size: .92rem;
    letter-spacing: .035em;
    white-space: nowrap;
  }

    .brand-copy small { display: none; }

    .nav-toggle {
grid-column: 2;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    padding: 0;
  }

    .header-actions {
grid-column: 3;
    min-width: 0;
    gap: .22rem;
    justify-self: end;
  }

    .icon-button,
  .login-button {
width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 10px;
    justify-content: center;
  }

    .icon-button { display: grid; }

    .language-control { min-width: 0; }

    .language-button {
min-width: 52px;
    width: 52px;
    height: 36px;
    min-height: 36px;
    padding: 0 .35rem;
    gap: .18rem;
    border-radius: 10px;
    justify-content: center;
  }

    .language-button > svg {
width: 15px;
    height: 15px;
    flex: 0 0 15px;
  }

    .language-name-short {
display: inline;
    min-width: 2ch;
    max-width: 3ch;
    font-size: .72rem;
    line-height: 1;
    text-align: center;
    overflow: hidden;
  }

    .login-button svg { width: 17px; height: 17px; }

    .language-popover {
position: fixed;
    top: calc(var(--header-h) + 6px);
    right: 7px;
    left: 7px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - var(--header-h) - 14px);
  }

    .primary-nav {
left: 7px;
    right: 7px;
    top: calc(100% + 6px);
  }
}

@media (max-width: 365px) {
    .header-inner { width: calc(100% - 10px); gap: .2rem; }

    .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }

    .brand-copy strong { font-size: .82rem; letter-spacing: .02em; }

    .nav-toggle,
  .icon-button,
  .login-button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }

    .language-button { width: 48px; min-width: 48px; height: 34px; min-height: 34px; }
}

@media (max-width: 330px) {
    .brand-copy { display: none; }
}

.mobile-quick-nav { display: none !important; }

@media (max-width: 680px) {
    html,
  body {
width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

    body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

    .mobile-quick-nav {
position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 2147483000 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    align-content: center;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0 !important;
    max-height: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    padding: .22rem .1rem calc(.12rem + env(safe-area-inset-bottom, 0px));
    gap: 0 !important;
    overflow: hidden !important;
    transform: translate3d(0,0,0) !important;
    border: 0;
    border-top: 1px solid rgba(241, 213, 164, .12);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(6, 24, 39, .96), rgba(4, 20, 34, .995));
    box-shadow: 0 -8px 22px rgba(0, 0, 0, .22);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-sizing: border-box;
    isolation: isolate;
  }

    .mobile-quick-nav__item,
  .mobile-quick-nav__item--center {
min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    display: grid;
    grid-template-rows: 48px 12px;
    justify-items: center;
    align-items: center;
    align-content: center;
    gap: .08rem;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    overflow: hidden;
    color: rgba(235, 239, 244, .84);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
  }

    .mobile-quick-nav__icon-frame,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon-frame {
position: relative;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    display: grid;
    place-items: center;
    border-radius: 50%;
  }

    .mobile-quick-nav__icon-frame::before,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon-frame::before {
content: "";
    position: absolute;
    inset: 1px !important;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #43c9ff, #f6c45e 28%, #1f7fe4 58%, #f39f41 82%, #43c9ff 100%);
    opacity: 0;
    transform: rotate(0deg);
    transition: opacity var(--ease);
    z-index: 0;
  }

    .mobile-quick-nav__icon-frame::after,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon-frame::after {
content: "";
    position: absolute;
    inset: 3px !important;
    border-radius: 50%;
    background: rgba(4, 20, 34, .98);
    z-index: 1;
  }

    .mobile-quick-nav__icon,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon {
position: relative;
    z-index: 2;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: grid;
    place-items: center;
    border-radius: 50%;
  }

    .mobile-quick-nav__icon img,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon img {
width: 44px !important;
    height: 44px !important;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .22));
  }

    .mobile-quick-nav__label,
  .mobile-quick-nav__item--center .mobile-quick-nav__label {
display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: clamp(.47rem, 2vw, .56rem) !important;
    font-weight: 640;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

    .mobile-quick-nav__item.is-active { color: #fff; }

    .mobile-quick-nav__item.is-active .mobile-quick-nav__icon-frame::before {
opacity: 1;
    animation: mobileDockRingSpin 3.2s linear infinite;
  }

    .mobile-quick-nav__item.is-active .mobile-quick-nav__label { color: #fff; }
}

@keyframes mobileDockRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
    :root { --header-h: 64px; }

    .header-inner {
width: calc(100% - 10px);
    min-height: var(--header-h);
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    gap: .22rem;
  }

    .nav-toggle {
grid-column: 1;
    grid-row: 1;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

    .brand {
grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
    gap: .32rem;
  }

    .brand-mark {
width: 35px;
    height: 35px;
    flex: 0 0 35px;
  }

    .brand-copy strong {
font-size: .86rem;
    letter-spacing: .025em;
    white-space: nowrap;
  }

    .header-actions {
grid-column: 3;
    grid-row: 1;
    min-width: max-content;
    gap: .16rem;
  }

    .icon-button,
  .login-button {
width: 35px;
    min-width: 35px;
    height: 35px;
    min-height: 35px;
    border-radius: 9px;
  }

    .language-button {
width: auto;
    min-width: 62px;
    max-width: 68px;
    height: 35px;
    min-height: 35px;
    padding: 0 .38rem;
    gap: .2rem;
    border-radius: 9px;
    overflow: visible;
  }

    .language-button > svg {
width: 15px;
    height: 15px;
    flex: 0 0 15px;
  }

    .language-name-short {
display: inline-block;
    min-width: 3ch;
    max-width: none;
    overflow: visible;
    white-space: nowrap;
    font-size: .7rem;
    line-height: 1;
    text-align: center;
  }

    body { padding-bottom: calc(61px + env(safe-area-inset-bottom, 0px)); }

    .mobile-quick-nav {
inset: auto 0 0 0 !important;
    height: calc(59px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(59px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0 !important;
    padding: 1px 1px max(1px, env(safe-area-inset-bottom, 0px)) !important;
    align-items: end !important;
    align-content: end !important;
  }

    .mobile-quick-nav__item,
  .mobile-quick-nav__item--center {
height: 56px !important;
    grid-template-rows: 42px 11px !important;
    align-content: end !important;
    gap: 1px !important;
  }

    .mobile-quick-nav__icon-frame,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon-frame {
width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }

    .mobile-quick-nav__icon,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon,
  .mobile-quick-nav__icon img,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon img {
width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

    .mobile-quick-nav__label,
  .mobile-quick-nav__item--center .mobile-quick-nav__label {
font-size: clamp(.45rem, 1.9vw, .53rem) !important;
    line-height: 1 !important;
  }
}

@media (max-width: 380px) {
    .header-inner { grid-template-columns: 36px minmax(0, 1fr) auto; }

    .nav-toggle { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }

    .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }

    .brand-copy strong { font-size: .78rem; }

    .icon-button,
  .login-button { width: 33px; min-width: 33px; height: 33px; min-height: 33px; }

    .language-button { min-width: 60px; max-width: 64px; height: 33px; min-height: 33px; padding-inline: .3rem; }
}

@media (max-width: 340px) {
    .brand-copy { display: none; }
}

.icon-language {
display: block;
  overflow: visible;
}

.language-button > .icon-language,
.footer-language button > .icon-language {
width: 21px;
  height: 21px;
  flex: 0 0 21px;
  stroke-width: 1.45;
  transform: none;
}

.language-button { column-gap: .5rem; }

@media (max-width: 680px) {
    .language-button > .icon-language {
width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

    .language-button { gap: .28rem; }
}

@media (max-width: 680px) {
    body { padding-bottom: 54px !important; }

    .mobile-quick-nav {
position: fixed !important;
    inset: auto 0 0 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 1px 0 1px !important;
    gap: 0 !important;
    align-items: center !important;
    align-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

    .mobile-quick-nav__item,
  .mobile-quick-nav__item--center {
height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    grid-template-rows: 38px 11px !important;
    align-content: center !important;
    gap: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

    .mobile-quick-nav__icon-frame,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon-frame {
width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

    .mobile-quick-nav__icon,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon,
  .mobile-quick-nav__icon img,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon img {
width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

    .mobile-quick-nav__label,
  .mobile-quick-nav__item--center .mobile-quick-nav__label {
font-size: clamp(.44rem, 1.85vw, .52rem) !important;
    line-height: 1 !important;
  }
}

@media (max-width: 680px) {
    body { padding-bottom: 66px !important; }

    .mobile-quick-nav {
position: fixed !important;
    inset: auto 0 0 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    margin: 0 !important;
    padding: 2px 0 4px !important;
    gap: 0 !important;
    align-items: center !important;
    align-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

    .mobile-quick-nav__item,
  .mobile-quick-nav__item--center {
height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    grid-template-rows: 44px 12px !important;
    align-content: center !important;
    gap: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

    .mobile-quick-nav__icon-frame,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon-frame {
width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

    .mobile-quick-nav__icon,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon,
  .mobile-quick-nav__icon img,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon img {
width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

    .mobile-quick-nav__label,
  .mobile-quick-nav__item--center .mobile-quick-nav__label {
font-size: clamp(.47rem, 1.95vw, .55rem) !important;
    line-height: 1 !important;
  }
}

@media (max-width: 680px) {
    body { padding-bottom: 74px !important; }

    .mobile-quick-nav {
height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    padding: 2px 0 5px !important;
  }

    .mobile-quick-nav__item,
  .mobile-quick-nav__item--center {
height: 65px !important;
    min-height: 65px !important;
    max-height: 65px !important;
    grid-template-rows: 50px 13px !important;
  }

    .mobile-quick-nav__icon-frame,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon-frame {
width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
  }

    .mobile-quick-nav__icon,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon,
  .mobile-quick-nav__icon img,
  .mobile-quick-nav__item--center .mobile-quick-nav__icon img {
width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }

    .mobile-quick-nav__label,
  .mobile-quick-nav__item--center .mobile-quick-nav__label { font-size: clamp(.5rem, 2.05vw, .58rem) !important; }
}

.brand-copy {
position: relative;
  align-content: center;
  overflow: visible;
}

.brand-hebrew {
position: absolute;
  left: .02rem;
  top: -.72rem;
  direction: rtl;
  unicode-bidi: isolate;
  white-space: nowrap;
  color: color-mix(in srgb, var(--gold) 78%, var(--text));
  font: 650 .49rem/.95 var(--font-ui);
  letter-spacing: .035em;
  opacity: .84;
  pointer-events: none;
}

.brand-motto {
display: grid;
  gap: .02rem;
  margin-top: .12rem;
  line-height: 1;
}

.brand-motto small {
margin: 0;
  white-space: nowrap;
}

.brand-motto__translit {
color: var(--gold);
  font: 700 .49rem/1 var(--font-ui);
  letter-spacing: .035em;
}

.brand-motto__translation {
color: var(--text-soft);
  font: 620 .47rem/1.02 var(--font-ui);
  letter-spacing: .012em;
}

.primary-nav { gap: clamp(.85rem, 1.75vw, 1.7rem); }

.primary-nav > a,
.nav-dropdown__trigger {
position: relative;
  min-height: 42px;
  padding: .72rem .12rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .34rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 720 .9rem/1 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.nav-dropdown {
position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown__icon {
width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: color-mix(in srgb, var(--gold) 82%, var(--text));
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms ease, stroke 220ms ease, filter 220ms ease;
}

.nav-dropdown__trigger[aria-expanded="true"] .nav-dropdown__icon {
transform: rotate(180deg);
  stroke: #55ccff;
  filter: drop-shadow(0 0 5px rgba(72, 200, 255, .34));
}

.nav-dropdown__panel {
position: absolute;
  top: calc(100% + .18rem);
  left: 50%;
  z-index: 70;
  width: min(310px, 82vw);
  transform: translateX(-50%);
  display: grid;
  gap: .26rem;
  padding: .46rem;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-2) 94%, transparent);
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
}

.nav-dropdown__panel[hidden] { display: none !important; }

.nav-dropdown__panel::before {
content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #49d5ff, #f1ad46, transparent);
  opacity: .72;
}

.nav-dropdown__panel a {
display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  align-items: center;
  gap: .62rem;
  min-height: 46px;
  padding: .48rem .58rem;
  border-radius: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 680;
  transition: background 180ms ease, transform 180ms ease;
}

.nav-dropdown__panel a svg {
width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-dropdown__panel a:hover,
.nav-dropdown__panel a:focus-visible {
background: linear-gradient(90deg,
    color-mix(in srgb, #43cbff 8%, transparent),
    color-mix(in srgb, #f3a646 8%, transparent));
  transform: translateX(2px);
}

.nav-dropdown__trigger::after {
content: "";
  position: absolute;
  left: 50%;
  bottom: .38rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width var(--ease);
}

.nav-dropdown.is-open .nav-dropdown__trigger::after { width: 70%; }

.nav-label {
display: inline-block;
  color: currentColor;
}

@media (hover: hover) and (pointer: fine) {
    .primary-nav > a:hover .nav-label,
  .primary-nav > a:focus-visible .nav-label,
  .nav-dropdown__trigger:hover .nav-label,
  .nav-dropdown__trigger:focus-visible .nav-label {
color: transparent;
    background-image: linear-gradient(
      90deg,
      var(--text) 0%,
      #45d9ff 22%,
      #ffae45 48%,
      #49a8ff 72%,
      var(--text) 100%
    );
    background-size: 280% 100%;
    background-position: 100% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: brNavLedSweep 1.05s ease-out forwards;
    filter: drop-shadow(0 0 3px rgba(67, 207, 255, .18));
  }
}

@keyframes brNavLedSweep {
  from { background-position: 100% 50%; }
  to   { background-position: 0% 50%; }
}

@media (max-width: 980px) {
    .brand-hebrew,
  .brand-motto { display: none !important; }

    .nav-dropdown {
width: 100%;
    display: block;
  }

    .nav-dropdown__trigger {
width: 100%;
    min-height: 0;
    padding: .78rem .85rem;
    justify-content: space-between;
    border-radius: 10px;
    font-size: .82rem;
  }

    .nav-dropdown__panel {
position: static;
    width: 100%;
    transform: none;
    margin: .08rem 0 .35rem;
    padding: .3rem;
    border-radius: 12px;
    box-shadow: none;
    background: color-mix(in srgb, var(--gold) 4%, var(--surface));
  }

    .nav-dropdown__panel::before { display: none; }

    .nav-dropdown__panel a {
min-height: 42px;
    padding: .46rem .58rem;
    font-size: .76rem;
  }

    .nav-dropdown__trigger::after { display: none; }
}

.brand-motto__translation { font-style: italic !important; }

.nav-dropdown__panel { width: min(326px, 84vw); }

.nav-dropdown__panel a { grid-template-columns: 31px minmax(0, 1fr); }

.footer {
position: relative;
  width: 100%;
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 1rem clamp(1rem, 4vw, 5rem) 1.15rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, var(--bg));
  color: var(--text-soft);
  font: 600 .76rem/1.45 var(--font-ui);
  text-align: center;
}

.footer__line {
display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .42rem;
}

.footer__line strong {
color: var(--text);
  font-weight: 820;
}

.footer__version {
position: absolute;
  right: clamp(.7rem, 1.8vw, 1.35rem);
  bottom: .42rem;
  color: transparent;
  background: linear-gradient(90deg, #43d3ff, #f0ad47 52%, #4c9eff);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: .63rem;
  font-weight: 840;
  letter-spacing: .045em;
  white-space: nowrap;
  filter: drop-shadow(0 0 5px rgba(74, 190, 255, .16));
}

@media (max-width: 680px) {
    .footer {
min-height: 86px;
    padding: .9rem .8rem 1.65rem;
    font-size: .66rem;
  }

    .footer__line { gap: .28rem .38rem; }

    .footer__version {
right: .65rem;
    bottom: .35rem;
    font-size: .56rem;
  }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-quick-nav__item.is-active .mobile-quick-nav__icon-frame::before { animation: none !important; }

    .primary-nav > a:hover .nav-label,
  .primary-nav > a:focus-visible .nav-label,
  .nav-dropdown__trigger:hover .nav-label,
  .nav-dropdown__trigger:focus-visible .nav-label {
animation: none !important;
    background-position: 50% 50% !important;
  }

    html { scroll-behavior: auto !important; }
}

.primary-nav,
.language-popover,
.mobile-quick-nav { max-width: 100%; }

@media (min-width: 981px) {
    .nav-dropdown__panel {
left: 0;
    width: min(326px, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    transform: none;
  }

    [dir="rtl"] .nav-dropdown__panel {
left: auto;
    right: 0;
  }
}

.nav-dropdown__panel a span,
.footer__line {
min-width: 0;
  overflow-wrap: anywhere;
}

.language-state:empty { display: none !important; }

:root { --language-popover-fit: 356px; }

.language-popover {
width: min(var(--language-popover-fit), calc(100vw - 20px));
  min-width: min(318px, calc(100vw - 20px));
  padding: .86rem;
  border-radius: 22px;
}

.language-popover__head {
align-items: flex-start;
  gap: .85rem;
  margin-bottom: .72rem;
}

.language-popover__head > div {
min-width: 0;
  gap: .26rem;
}

.language-popover__head small {
line-height: 1.22;
  letter-spacing: .18em;
}

.language-popover__head strong {
font-size: clamp(1.62rem, 2.4vw, 2rem);
  line-height: 1.04;
}

.language-search {
min-height: 44px;
  padding-inline: .84rem;
  border-radius: 14px;
}

.language-search input { font-size: .96rem; }

.language-list {
max-height: min(58dvh, 440px);
  margin-top: .64rem;
  padding-right: .16rem;
  scrollbar-color: color-mix(in srgb, var(--gold) 58%, var(--line)) transparent;
}

.language-list::-webkit-scrollbar { width: 10px; }

.language-list::-webkit-scrollbar-track { background: transparent; }

.language-list::-webkit-scrollbar-thumb {
border-radius: 999px;
  border: 2px solid transparent;
  background: color-mix(in srgb, var(--gold) 52%, rgba(255,255,255,.08));
  background-clip: padding-box;
}

.language-item {
grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: .72rem;
  padding: .68rem .5rem;
  border-radius: 14px;
  border-bottom: 0;
}

.language-item + .language-item { margin-top: .08rem; }

.language-item:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); }

.language-item--featured { background: color-mix(in srgb, var(--gold) 4.5%, transparent); }

.language-divider {
height: 1px;
  margin: .42rem .5rem .5rem;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--gold) 48%, var(--line)) 12%, color-mix(in srgb, var(--gold) 48%, var(--line)) 88%, transparent 100%);
}

.language-code {
min-height: 31px;
  border-radius: 10px;
  font-size: .7rem;
}

.language-name {
min-width: 0;
  gap: .16rem;
}

.language-name strong {
font-size: .98rem;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.language-name small {
font-size: .76rem;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.language-state {
min-width: 1.55rem;
  padding: .28rem .46rem;
  text-align: center;
}

.language-state--current {
background: color-mix(in srgb, var(--gold) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 26%, transparent);
}

.language-note { margin-top: .9rem; }

.language-measurer {
position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: -1;
  visibility: hidden;
  width: auto;
  min-width: 318px;
  max-width: none;
  padding: .86rem;
  border: 1px solid var(--line-gold);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-2) 96%, transparent);
  box-shadow: none;
}

.language-measurer .language-list {
max-height: none;
  overflow: visible;
  margin-top: .64rem;
  padding-right: 0;
}

.language-measurer .language-item {
width: max-content;
  min-width: 100%;
}

@media (max-width: 900px) {
    .language-popover { width: min(max(var(--language-popover-fit), 320px), calc(100vw - 18px)); }
}

@media (max-width: 680px) {
    .language-popover {
left: 9px;
    right: 9px;
    width: auto;
    min-width: 0;
    padding: .82rem;
    border-radius: 20px;
  }

    .language-popover__head strong { font-size: clamp(1.7rem, 7.4vw, 2rem); }

    .language-list { max-height: calc(100dvh - var(--header-h) - 188px); }

    .language-item {
grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: .66rem;
    padding: .64rem .48rem;
  }
}

@media (max-width: 380px) {
    .language-popover__head strong { font-size: clamp(1.52rem, 7vw, 1.82rem); }

    .language-name strong { font-size: .95rem; }

    .language-name small { font-size: .74rem; }
}

.language-note:empty {
display: none !important;
  margin: 0 !important;
}


/* BibliaREM shared theme selector — permanent Auto / Dark / Light control */
.theme-selector{
  flex:0 0 auto;display:inline-grid;grid-template-columns:repeat(3,30px);align-items:center;gap:2px;height:42px;padding:3px;
  border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 92%,transparent);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.theme-selector__button{
  width:30px;height:34px;min-width:0;padding:0;border:0;border-radius:9px;background:transparent;color:var(--text-soft);
  display:grid;place-items:center;cursor:pointer;font:700 .9rem/1 var(--font-ui);transition:background var(--ease),color var(--ease),box-shadow var(--ease),transform var(--ease);
}
.theme-selector__button span{display:block;line-height:1}
.theme-selector__button:hover{color:var(--text);background:color-mix(in srgb,var(--teal) 8%,transparent)}
.theme-selector__button[aria-pressed="true"]{
  color:#0b1820;background:linear-gradient(135deg,#9fefff 0%,#bcefe2 42%,#f1c46f 100%);
  box-shadow:0 3px 10px rgba(18,69,91,.14),inset 0 1px 0 rgba(255,255,255,.55);
}
html[data-theme="dark"] .theme-selector__button[aria-pressed="true"]{color:#08151e}
@media(prefers-color-scheme:dark){html[data-theme="auto"] .theme-selector__button[aria-pressed="true"]{color:#08151e}}
@media(max-width:680px){
  .theme-selector{grid-template-columns:repeat(3,22px);gap:1px;width:74px;height:36px;padding:2px;border-radius:10px}
  .theme-selector__button{width:22px;height:30px;border-radius:8px;font-size:.78rem}
}
@media(max-width:365px){
  .theme-selector{grid-template-columns:repeat(3,20px);width:68px;height:34px}
  .theme-selector__button{width:20px;height:28px;font-size:.72rem}
}

/* Shared shell v4 — language name is always explicit; abbreviations are no longer the active UI. */
.language-name-full{display:inline!important;min-width:0;max-width:15ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.language-name-short{display:none!important}
.language-button{width:auto!important;min-width:84px!important;max-width:170px!important;padding-inline:.62rem!important;overflow:hidden!important}
@media(max-width:680px){
  .language-button{min-width:72px!important;max-width:116px!important;height:35px!important;padding-inline:.42rem!important;gap:.22rem!important}
  .language-name-full{font-size:.69rem!important;max-width:10ch}
  .language-button>.icon-language{width:15px!important;height:15px!important;flex-basis:15px!important}
}
@media(max-width:380px){
  .language-button{min-width:66px!important;max-width:96px!important;padding-inline:.32rem!important}
  .language-name-full{font-size:.64rem!important;max-width:8.4ch}
  .language-button>.icon-language{display:none!important}
}
@media(max-width:330px){.language-button{min-width:62px!important;max-width:88px!important}.language-name-full{max-width:8ch}}
/* Shared shell v4.1 — full native language name, including narrow devices. */
.language-name-full{max-width:none!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important}
@media(max-width:680px){
  .language-button{min-width:max-content!important;max-width:none!important;padding-inline:.38rem!important}
  .language-name-full{font-size:.62rem!important}
  .language-button>.icon-language{display:none!important}
  .header-actions{max-width:70vw}
}
@media(max-width:430px){.language-name-full{font-size:.56rem!important}.language-button{padding-inline:.28rem!important}.brand-copy{display:none!important}.brand{justify-content:center}}
