/* Bnei Yitzhak Torah — shared styles (public site + rabbi portal) */
:root {
  --bg: #f6f3ec; --surface: #fffdf8; --surface-2: #efeae0; --ink: #1c1f29; --ink-2: #4a4f5c; --muted: #666b78; --gold-text: #8a6a24;
  --line: #e3dccd; --line-2: #d2c9b6; --accent: #1f3a5f; --accent-2: #2d5280; --accent-ink: #ffffff; --accent-soft: #e4ebf5; --gold: #a8853a; --gold-soft: #f3ead3; --gold-line: #d9c48f;
  --live: #a23b3b; --live-soft: #f6e4e4; --ok: #2f7a4f; --shadow: 0 1px 2px rgba(28,31,41,.06), 0 8px 24px -12px rgba(28,31,41,.18);
  --radius: 14px; --radius-s: 9px; --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "Newsreader", Georgia, "Times New Roman", serif; --hebrew: "Frank Ruhl Libre", "Times New Roman", serif;
  --player-h: 0px; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121419; --surface: #1a1d25; --surface-2: #222631; --ink: #ecebe6; --ink-2: #c4c6cc; --muted: #8e93a0; --line: #2a2f3b; --line-2: #3a4050;
  --accent: #9db9e3; --accent-2: #b7cdef; --accent-ink: #0f1a2b; --accent-soft: #1d2a3d; --gold: #cfae63; --gold-text: #cfae63; --gold-soft: #2e2a1f; --gold-line: #6a5a33; --live: #e07a7a; --live-soft: #3a2323; --ok: #6cc08b;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom)); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 .8em; }
.he { font-family: var(--hebrew); direction: rtl; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.container { width: min(1180px, 100% - 32px); margin: 0 auto; }
.section { margin: 2.4rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head .more { color: var(--accent); font-weight: 500; font-size: .9rem; }
.section-head .more:hover { text-decoration: underline; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 1.2rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--display); font-size: 1.2rem; letter-spacing: -.01em; white-space: nowrap; }
.brand .mark { width: 36px; height: 36px; border-radius: 10px; background: #052e43; color: #fff; display: grid; place-items: center; font-family: var(--hebrew); font-size: 1.1rem; font-weight: 700; }
.brand small { display: block; font-family: var(--font); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); line-height: 1; margin-top: 2px; }
.nav { display: flex; gap: .2rem; margin-left: .4rem; }
.nav a { padding: .45rem .75rem; border-radius: 999px; font-weight: 500; font-size: .93rem; color: var(--ink-2); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a.live-link .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: .4rem; animation: pulse 1.6s infinite; vertical-align: 1px; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .4; transform: scale(.8);} }
.header-search { margin-left: auto; position: relative; flex: 0 1 320px; }
.header-search input { width: 100%; padding: .55rem .9rem .55rem 2.3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; outline: none; }
.header-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.header-search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.sm { width: 32px; height: 32px; } .icon-btn.sm svg { width: 17px; height: 17px; }
.icon-btn.active { color: var(--accent); }
.mobile-tabs { display: none; }
@media (max-width: 820px) {
  .nav, .header-search { display: none; }
  .site-header .container { height: 56px; }
  .mobile-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); padding: .35rem .3rem calc(.35rem + env(safe-area-inset-bottom)); justify-content: space-around; }
  .mobile-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .66rem; font-weight: 500; color: var(--muted); padding: .2rem .5rem; border-radius: 10px; min-width: 56px; }
  .mobile-tabs a svg { width: 22px; height: 22px; }
  .mobile-tabs a.active { color: var(--accent); }
  body { padding-bottom: calc(var(--player-h) + 64px + env(safe-area-inset-bottom)); }
  .player-bar { bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem 1.05rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500; font-size: .92rem; line-height: 1; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.live { background: var(--live); color: #fff; border-color: var(--live); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.sm { padding: .42rem .8rem; font-size: .84rem; }
.btn.lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn.danger { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
.btn.danger:hover { background: var(--live-soft); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 500; color: var(--ink-2); border: 1px solid transparent; }
.chip:hover { border-color: var(--line-2); }
.chip.active { background: var(--accent); color: var(--accent-ink); }
.chip.live { background: var(--live-soft); color: var(--live); }
.chip.gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.pill-count { background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: .1rem .5rem; font-size: .75rem; font-weight: 600; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Hero / today */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; align-items: stretch; margin-top: 1.6rem; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.hero-main { padding: 2rem; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 60%); position: relative; overflow: hidden; }
.hero-main .he-big { position: absolute; right: -8px; top: -22px; font-size: 9rem; color: var(--accent); opacity: .06; pointer-events: none; font-family: var(--hebrew); line-height: 1; }
.hero-main h1 { margin: .4rem 0 .6rem; max-width: 14ch; }
.hero-main .lead { color: var(--ink-2); max-width: 44ch; font-size: 1.04rem; }
.today { padding: 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.today .date-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .8rem; }
.today .date-line .he { font-size: 1.25rem; }
.today-item { display: flex; gap: .9rem; align-items: center; padding: .55rem .7rem; border-radius: var(--radius-s); background: var(--surface-2); }
.today-item:hover { background: var(--accent-soft); }
.today-item .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.today-item .val { font-weight: 500; }
.today-item .he { margin-left: auto; color: var(--ink-2); }
.today-item .n { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .72rem; padding: .1rem .5rem; font-weight: 600; }
.live-banner { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border-radius: var(--radius); background: var(--live-soft); border: 1px solid color-mix(in srgb, var(--live) 30%, transparent); margin-top: 1.2rem; }
.live-banner .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; flex: none; }
.live-banner strong { color: var(--live); }

/* Shiur cards and rows */
.shiur-card { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; position: relative; transition: transform .15s, box-shadow .15s; }
.shiur-card:hover { transform: translateY(-2px); }
.shiur-card .top { display: flex; gap: .7rem; align-items: flex-start; }
.shiur-card .play { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 0; display: grid; place-items: center; }
.shiur-card .play svg { width: 20px; height: 20px; }
.shiur-card .play.playing { background: var(--gold); }
.shiur-card .title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shiur-card .title:hover { text-decoration: underline; }
.shiur-card .meta { font-size: .82rem; color: var(--muted); display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.shiur-card .meta a:hover { color: var(--ink); text-decoration: underline; }
.shiur-card .ref { color: var(--accent); font-weight: 500; }
.shiur-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .4rem; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--muted); }
.progress-line { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--accent); }
.shiur-list { display: flex; flex-direction: column; }
.shiur-row { display: grid; grid-template-columns: 44px 1fr auto; gap: .9rem; align-items: center; padding: .8rem .4rem; border-bottom: 1px solid var(--line); }
.shiur-row:last-child { border-bottom: 0; }
.shiur-row .play { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); border: 0; display: grid; place-items: center; }
.shiur-row .play:hover { background: var(--accent); color: var(--accent-ink); }
.shiur-row .play.playing { background: var(--gold); color: #fff; }
.shiur-row .play svg { width: 18px; height: 18px; }
.shiur-row .title { font-weight: 600; line-height: 1.3; }
.shiur-row .title:hover { text-decoration: underline; }
.shiur-row .meta { font-size: .82rem; color: var(--muted); display: flex; gap: .35rem; flex-wrap: wrap; }
.shiur-row .meta .ref { color: var(--accent); font-weight: 500; }
.shiur-row .actions { display: flex; gap: .1rem; align-items: center; color: var(--muted); font-size: .82rem; }
.shiur-row .dur { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .shiur-row .actions .icon-btn.optional { display: none; } }

.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--display); font-weight: 600; object-fit: cover; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 2rem; } .avatar.xl { width: 140px; height: 140px; font-size: 3rem; } .avatar.sm { width: 32px; height: 32px; font-size: .9rem; }
.rabbi-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.4rem 1rem; gap: .5rem; transition: transform .15s; }
.rabbi-card:hover { transform: translateY(-2px); }
.rabbi-card .name { font-family: var(--display); font-size: 1.15rem; }
.rabbi-card .he { color: var(--muted); }
.cat-card { padding: 1.1rem 1.2rem; display: flex; align-items: center; gap: 1rem; transition: transform .15s; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.cat-card .he { font-size: 1.5rem; color: var(--accent); min-width: 2.6rem; text-align: center; }
.cat-card .name { font-weight: 600; }
.cat-card .count { margin-left: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.cat-card.compact { padding: .8rem 1rem; }
.cat-card.compact .he { font-size: 1.15rem; min-width: 2rem; }

/* Page headers */
.page-head { margin: 1.8rem 0 1.4rem; display: flex; gap: 1.5rem; align-items: flex-end; flex-wrap: wrap; }
.page-head .text { flex: 1 1 320px; }
.page-head h1 .he { color: var(--muted); font-size: .7em; margin-left: .5rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .3rem; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { opacity: .5; }
.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.toolbar select, .field select, .field input, .field textarea, select.input, input.input, textarea.input { font: inherit; font-size: .92rem; padding: .55rem .8rem; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); outline: none; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.form-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.empty .big { font-family: var(--hebrew); font-size: 2.6rem; color: var(--line-2); margin-bottom: .4rem; }
.pager { display: flex; justify-content: center; gap: .4rem; margin: 1.6rem 0; }

/* Daf grid */
.daf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.daf-grid a { height: 46px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; border: 1px solid transparent; position: relative; }
.daf-grid a.has { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.daf-grid a.has:hover { filter: brightness(1.1); }
.daf-grid a.today { outline: 2px solid var(--gold); outline-offset: 1px; }
.daf-grid a.selected { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.daf-grid a .n { position: absolute; top: 2px; right: 4px; font-size: .55rem; opacity: .8; }
.legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); margin: .6rem 0 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }

/* Shiur page */
.shiur-hero { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; margin-top: 1.6rem; }
@media (max-width: 900px) { .shiur-hero { grid-template-columns: 1fr; } }
.shiur-hero .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.2rem 0; }
.desc { white-space: pre-wrap; color: var(--ink-2); max-width: 70ch; }
.side-card .rabbi-line { display: flex; gap: .8rem; align-items: center; }
.qa { border-top: 1px solid var(--line); padding: .9rem 0; }
.qa .q { font-weight: 600; } .qa .a { color: var(--ink-2); margin-top: .3rem; white-space: pre-wrap; }
.qa .who { font-size: .78rem; color: var(--muted); }

/* Player bar */
.player-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 30px -14px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .25s ease; }
.player-bar.visible { transform: none; }
.player-bar .scrub { position: absolute; left: 0; right: 0; top: -2px; height: 4px; background: var(--line); cursor: pointer; }
.player-bar .scrub .buf { position: absolute; inset: 0 auto 0 0; background: var(--line-2); }
.player-bar .scrub .pos { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.player-bar .scrub:hover { height: 8px; top: -4px; }
.player-bar .inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; height: 72px; }
.player-bar .now { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.player-bar .now .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .now .s { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .controls { display: flex; align-items: center; gap: .2rem; }
.player-bar .controls .main { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 0; display: grid; place-items: center; }
.player-bar .controls .main svg { width: 24px; height: 24px; }
.player-bar .right { display: flex; align-items: center; justify-content: flex-end; gap: .2rem; }
.player-bar .time { font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--muted); min-width: 92px; text-align: right; }
.speed-btn { font-size: .8rem; font-weight: 600; min-width: 48px; height: 32px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; padding: 0 .5rem; }
@media (max-width: 820px) {
  .player-bar .inner { grid-template-columns: 1fr auto; height: 64px; }
  .player-bar .right { display: none; }
  .player-bar .controls .skip { display: none; }
}
.menu { position: absolute; bottom: calc(100% + 8px); right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .4rem; min-width: 190px; z-index: 60; }
.menu button { display: flex; width: 100%; text-align: left; padding: .5rem .7rem; border: 0; background: none; border-radius: 8px; font-size: .9rem; justify-content: space-between; }
.menu button:hover { background: var(--surface-2); }
.menu button.on { color: var(--accent); font-weight: 600; }
/* Expanded player sheet */
.sheet { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.sheet.open { transform: none; }
.sheet .sheet-inner { width: min(640px, 100% - 32px); margin: 0 auto; padding: 1rem 0 2rem; display: flex; flex-direction: column; gap: 1.2rem; min-height: 100%; }
.sheet .art { width: min(260px, 60vw); aspect-ratio: 1; margin: 1rem auto 0; border-radius: 24px; background: var(--accent-soft); display: grid; place-items: center; font-family: var(--hebrew); font-size: 4rem; color: var(--accent); overflow: hidden; box-shadow: var(--shadow); }
.sheet .art img { width: 100%; height: 100%; object-fit: cover; }
.sheet .big-controls { display: flex; justify-content: center; align-items: center; gap: 1.2rem; }
.sheet .big-controls .main { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 0; display: grid; place-items: center; }
.sheet .big-controls .main svg { width: 34px; height: 34px; }
.sheet .big-controls .icon-btn { width: 52px; height: 52px; } .sheet .big-controls .icon-btn svg { width: 28px; height: 28px; }
.sheet input[type=range] { width: 100%; accent-color: var(--accent); }
.sheet .times { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet .extras { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.queue-list .shiur-row { grid-template-columns: 28px 1fr auto; }
.queue-list .idx { color: var(--muted); font-size: .8rem; text-align: center; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 90px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px; font-size: .9rem; opacity: 0; transition: .25s; z-index: 80; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; min-height: 1em; }
@keyframes sk { to { background-position: -200% 0; } }

/* Footer */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: .86rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90; display: grid; place-items: center; padding: 1rem; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 1.4rem; }
.modal h3 { margin-bottom: .8rem; }

/* Live page */
.live-stage { text-align: center; padding: 2.5rem 1rem; }
.live-stage .wave { display: flex; justify-content: center; gap: 4px; height: 44px; align-items: center; margin: 1rem 0; }
.live-stage .wave i { width: 5px; border-radius: 3px; background: var(--live); height: 8px; animation: wave 1.1s ease-in-out infinite; }
.live-stage .wave i:nth-child(2) { animation-delay: .1s } .live-stage .wave i:nth-child(3) { animation-delay: .2s } .live-stage .wave i:nth-child(4) { animation-delay: .3s } .live-stage .wave i:nth-child(5) { animation-delay: .4s } .live-stage .wave i:nth-child(6) { animation-delay: .5s } .live-stage .wave i:nth-child(7) { animation-delay: .6s }
@keyframes wave { 0%,100% { height: 8px } 50% { height: 40px } }
.live-stage.idle .wave i { animation: none; background: var(--line-2); }

kbd { font: inherit; font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35rem; }

/* Compact lists (sidebars) */
.shiur-list.compact { padding: 0 .5rem !important; }
.shiur-list.compact .shiur-row { grid-template-columns: 36px 1fr auto; gap: .6rem; padding: .65rem .2rem; }
.shiur-list.compact .shiur-row .play { width: 34px; height: 34px; }
.shiur-list.compact .actions .optional, .shiur-list.compact .dur { display: none; }
.shiur-list.compact .title { font-size: .92rem; }

/* ---------- Design pass: texture, ornaments, hero photo, dedications, sponsor ---------- */
body { background-color: var(--bg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%231f3a5f' stroke-opacity='.055' stroke-width='1'%3E%3Cpath d='M28 4l24 24-24 24L4 28z'/%3E%3Cpath d='M28 14l14 14-14 14-14-14z'/%3E%3Ccircle cx='28' cy='28' r='3'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-theme="dark"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%239db9e3' stroke-opacity='.05' stroke-width='1'%3E%3Cpath d='M28 4l24 24-24 24L4 28z'/%3E%3Cpath d='M28 14l14 14-14 14-14-14z'/%3E%3Ccircle cx='28' cy='28' r='3'/%3E%3C/g%3E%3C/svg%3E"); }
.site-header, .player-bar, .sheet { background-image: none; }
.section-head h2 { position: relative; padding-left: .9rem; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 3px; border-radius: 2px; background: linear-gradient(var(--gold), var(--accent)); }
.ornament { display: flex; align-items: center; gap: .6rem; color: var(--gold); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-line)); }
.ornament::after { background: linear-gradient(90deg, var(--gold-line), transparent); }
/* Hero with the hechal photo */
.hero-main.photo { color: #fff; background: #17283f url('/img/hechal.jpg') center 28% / cover no-repeat; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; border-color: transparent; }
.hero-main.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,34,56,.93) 0%, rgba(20,34,56,.78) 45%, rgba(20,34,56,.35) 100%), linear-gradient(0deg, rgba(20,34,56,.65), transparent 60%); }
.hero-main.photo > * { position: relative; }
.hero-main.photo .eyebrow { color: var(--gold-line); }
.hero-main.photo .lead { color: rgba(255,255,255,.82); }
.hero-main.photo .he-big { color: #fff; opacity: .07; }
.hero-main.photo .btn { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(6px); }
.hero-main.photo .btn:hover { background: rgba(255,255,255,.18); }
.hero-main.photo .btn.primary { background: var(--gold); border-color: var(--gold); color: #1b1f29; }
.hero-main.photo .stats strong { color: #fff; } .hero-main.photo .stats { color: rgba(255,255,255,.7); }
.hero-main.photo .photo-credit { position: absolute; right: 1rem; bottom: .6rem; font-size: .68rem; color: rgba(255,255,255,.55); letter-spacing: .04em; }
.today { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--gold-soft) 45%, var(--surface))); }
.today .date-line { border-bottom-color: var(--gold-line); }
.today .eyebrow { color: var(--gold); }
/* Dedication ribbon */
.dedication { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid var(--gold-line); margin-top: 1.2rem; }
.dedication .he { font-size: 1.15rem; color: var(--ink); }
.dedication .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; }
.dedication .candle { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--gold); flex: none; border: 1px solid var(--gold-line); }
.dedication .candle svg { width: 18px; height: 18px; }
.dedication-inline { padding: .8rem 1rem; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 1rem 0; }
.dedication-inline .he { font-size: 1.1rem; }
/* Our Rav */
.rav-card { display: grid; grid-template-columns: 180px 1fr; gap: 1.6rem; align-items: center; padding: 1.6rem; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface) 55%); }
.rav-card .avatar { border: 3px solid var(--gold-line); box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-2); }
.rav-card .name { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; }
@media (max-width: 700px) { .rav-card { grid-template-columns: 1fr; text-align: center; } .rav-card .avatar { margin: 0 auto; } .rav-card .row { justify-content: center; } }
.rabbi-card .avatar { border: 2px solid var(--gold-line); }
/* Root category cards */
.cat-card.root { border-top: 3px solid var(--accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--surface)), var(--surface)); }
.cat-card.root .he { font-size: 1.9rem; }
/* Shul info strip */
.shul-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.shul-strip .cell { padding: 1.1rem 1.2rem; }
.shul-strip .cell .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; margin-bottom: .3rem; }
.shul-strip .cell pre { font: inherit; white-space: pre-wrap; margin: 0; color: var(--ink-2); font-size: .9rem; }
/* Sponsor page */
.sponsor-hero { padding: 2rem; background: linear-gradient(135deg, var(--gold-soft), var(--surface) 70%); border: 1px solid var(--gold-line); }
.opt-card { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; cursor: pointer; border: 1px solid var(--line); transition: .15s; }
.opt-card:hover { border-color: var(--gold-line); transform: translateY(-2px); }
.opt-card.selected { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.opt-card .amt { font-family: var(--display); font-size: 1.5rem; color: var(--accent); }
.opt-card .nm { font-weight: 600; }
.ded-types { display: flex; flex-wrap: wrap; gap: .4rem; }
.ded-types label { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); cursor: pointer; font-size: .88rem; display: flex; gap: .4rem; align-items: center; }
.ded-types label:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ded-types input { display: none; }
.pay-box { padding: 1.4rem; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--radius); }
.site-footer { background: var(--surface); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; width: 100%; }
.site-footer .cols h4 { font-family: var(--font); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin-bottom: .6rem; }
.site-footer .cols a { display: block; padding: .15rem 0; }
.site-footer .legal { width: 100%; margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .78rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: 1fr; gap: 1.2rem; } }

/* Top banner (Learning of the week) */
.top-banner { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .9rem; display: flex; justify-content: center; align-items: center; gap: .7rem; flex-wrap: wrap; }
.top-banner .lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--gold-line); }
.top-banner a { color: #fff; text-decoration: underline; text-underline-offset: 3px; opacity: .85; font-size: .82rem; }
/* Mabrook */
.mabrook { background: linear-gradient(135deg, var(--gold-soft), var(--surface) 70%); border: 1px solid var(--gold-line); padding: 1.4rem 1.6rem; position: relative; overflow: hidden; }
.mabrook .he-big { position: absolute; right: 1rem; top: -1.2rem; font-family: var(--hebrew); font-size: 7rem; color: var(--gold); opacity: .1; line-height: 1; pointer-events: none; }
.mabrook h2 { padding: 0 !important; } .mabrook h2::before { display: none; }
.mabrook-list { display: grid; gap: .6rem; margin-top: .9rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mabrook-item { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; background: var(--surface); border-radius: var(--radius-s); border: 1px solid var(--line); }
.mabrook-item .ico { width: 36px; height: 36px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex: none; font-size: 1.1rem; }
.mabrook-item .names { font-weight: 600; }
.mabrook-item .occ { color: var(--ink-2); font-size: .92rem; }
.tabs { display: inline-flex; gap: .2rem; padding: .25rem; background: var(--surface-2); border-radius: 999px; }
.tabs a { padding: .45rem 1rem; border-radius: 999px; font-weight: 500; font-size: .9rem; color: var(--ink-2); }
.tabs a.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.rabbi-browse { display: grid; grid-template-columns: 200px 1fr; gap: 1.4rem; padding: 1.4rem; align-items: start; }
@media (max-width: 700px) { .rabbi-browse { grid-template-columns: 1fr; } }
.rabbi-browse .subj { margin-bottom: .8rem; }
.rabbi-browse .subj .root { font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }
.rabbi-browse .subj .kids { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }

/* ---------- Visual pass 2: full-bleed hero, motion, subject tiles, navy footer ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
  .hero-bleed::before { animation: kenburns 40s ease-in-out infinite alternate; }
  @keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
}
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.hero-bleed { position: relative; color: #fff; overflow: hidden; background: #142238; margin-top: 0; }
.hero-bleed::before { content: ""; position: absolute; inset: -2%; background: url('/img/hechal.jpg') center 30% / cover no-repeat; transform-origin: center; }
.hero-bleed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,28,46,.94) 0%, rgba(16,28,46,.82) 40%, rgba(16,28,46,.45) 75%, rgba(16,28,46,.6) 100%), linear-gradient(0deg, rgba(16,28,46,.7), transparent 50%); }
.hero-bleed .inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .95fr; gap: 2rem; align-items: center; padding: 3.4rem 0 3.2rem; min-height: 560px; }
@media (max-width: 900px) { .hero-bleed .inner { grid-template-columns: 1fr; padding: 2.2rem 0; min-height: 0; } }
.hero-bleed .eyebrow { color: var(--gold-line); }
.hero-bleed h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.02; margin: .6rem 0 1rem; max-width: 12ch; text-shadow: 0 2px 30px rgba(0,0,0,.3); }
.hero-bleed h1 em { font-style: italic; color: var(--gold-line); }
.hero-bleed .lead { color: rgba(255,255,255,.84); font-size: 1.1rem; max-width: 46ch; }
.hero-bleed .btn { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; backdrop-filter: blur(8px); }
.hero-bleed .btn:hover { background: rgba(255,255,255,.18); }
.hero-bleed .btn.primary { background: var(--gold); border-color: var(--gold); color: #1b1f29; box-shadow: 0 10px 30px -12px rgba(168,133,58,.9); }
.hero-bleed .stats { color: rgba(255,255,255,.7); margin-top: 1.6rem; gap: 1.4rem; }
.hero-bleed .stats strong { color: #fff; font-family: var(--display); font-size: 1.3rem; }
.hero-bleed .photo-credit { position: absolute; right: 0; bottom: .6rem; font-size: .68rem; color: rgba(255,255,255,.5); letter-spacing: .04em; z-index: 1; }
.glass { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(16px) saturate(140%); border-radius: var(--radius); color: #fff; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.glass .eyebrow, .glass .lbl { color: var(--gold-line) !important; }
.glass .today-item { background: rgba(255,255,255,.08); color: #fff; } .glass .today-item:hover { background: rgba(255,255,255,.16); }
.glass .today-item .he, .glass .muted, .glass pre { color: rgba(255,255,255,.75) !important; }
.glass .date-line, .glass [style*="border-top"] { border-color: rgba(255,255,255,.2) !important; }
.glass .today-item .n { background: var(--gold); color: #1b1f29; }
.ring { width: 54px; height: 54px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; } .ring .bg { stroke: rgba(255,255,255,.18); } .ring .fg { stroke: var(--gold-line); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.ring .txt { position: absolute; inset: 0; display: grid; place-items: center; font-size: .62rem; font-weight: 700; color: #fff; letter-spacing: .02em; }
/* Section heads with Hebrew subtitle */
.section-head h2 .sub { font-family: var(--hebrew); font-size: .72em; color: var(--gold); margin-left: .6rem; font-weight: 500; }
/* Subject tiles */
.tiles-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile-subj { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 150px; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background: var(--t, var(--accent)); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; isolation: isolate; }
.tile-subj::before { content: attr(data-he); position: absolute; right: -.1em; top: -.35em; font-family: var(--hebrew); font-size: 5.6rem; line-height: 1; color: #fff; opacity: .13; font-weight: 700; z-index: -1; transition: transform .4s, opacity .3s; }
.tile-subj::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.14), transparent 45%, rgba(0,0,0,.25)); z-index: -1; }
.tile-subj:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 18px 40px -18px rgba(0,0,0,.5); }
.tile-subj:hover::before { transform: scale(1.08) rotate(-3deg); opacity: .2; }
.tile-subj .nm { font-family: var(--display); font-size: 1.3rem; line-height: 1.1; }
.tile-subj .cnt { font-size: .78rem; color: rgba(255,255,255,.75); margin-top: .25rem; }
.tile-subj .he { font-size: 1rem; color: var(--gold-line); margin-bottom: .2rem; }
.t1 { --t: linear-gradient(135deg, #1f3a5f, #2d5280); } .t2 { --t: linear-gradient(135deg, #2f4f4f, #3f6b68); } .t3 { --t: linear-gradient(135deg, #5c2a2a, #7a3b3b); }
.t4 { --t: linear-gradient(135deg, #3f4a2a, #5a6a3b); } .t5 { --t: linear-gradient(135deg, #4a2f5c, #66457c); } .t6 { --t: linear-gradient(135deg, #6b4a1f, #8a6530); }
/* Sponsor block */
.sponsor-block { position: relative; overflow: hidden; border-radius: var(--radius); background: linear-gradient(135deg, #142238, #1f3a5f 60%, #2d5280); color: #fff; padding: 2.2rem; box-shadow: var(--shadow); }
.sponsor-block::before { content: "לעילוי נשמת"; position: absolute; right: 1.2rem; top: -.6rem; font-family: var(--hebrew); font-size: 6rem; color: #fff; opacity: .06; line-height: 1; pointer-events: none; }
.sponsor-block .ornament { color: var(--gold-line); justify-content: flex-start; max-width: 320px; } .sponsor-block .ornament::before { display: none; }
.sponsor-block h2 { padding: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .5rem 0; } .sponsor-block h2::before { display: none; }
.sponsor-block p { color: rgba(255,255,255,.8); max-width: 60ch; }
.sponsor-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.sponsor-opt { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-s); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; transition: .2s; color: #fff; }
.sponsor-opt:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.sponsor-opt .amt { font-family: var(--display); font-size: 1.6rem; color: var(--gold-line); }
.sponsor-opt .nm { font-weight: 600; } .sponsor-opt .ds { font-size: .8rem; color: rgba(255,255,255,.7); }
.sponsor-opt .go { margin-top: auto; font-size: .82rem; color: var(--gold-line); font-weight: 600; }
/* Richer cards & buttons */
.card { transition: box-shadow .2s, transform .2s, border-color .2s; }
.shiur-card:hover, .rabbi-card:hover, .cat-card:hover { box-shadow: 0 18px 40px -22px rgba(28,31,41,.35); border-color: var(--line-2); }
.btn.primary { box-shadow: 0 8px 22px -12px var(--accent); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px var(--accent); }
.shiur-card .play, .shiur-row .play { transition: transform .15s, background .15s; }
.shiur-card .play:hover, .shiur-row .play:hover { transform: scale(1.08); }
.shiur-card .meta .avatar.sm { width: 20px; height: 20px; font-size: .6rem; }
.daf-grid a { transition: transform .12s, filter .12s; } .daf-grid a:hover { transform: scale(1.08); z-index: 1; }
.rabbi-card { position: relative; overflow: hidden; }
.rabbi-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 70px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent); }
/* Navy footer */
.site-footer { background: #142238; color: rgba(255,255,255,.72); border-top: 0; margin-top: 5rem; }
.site-footer .cols h4 { color: var(--gold-line); }
.site-footer a:hover { color: #fff; }
.site-footer .brand span, .site-footer .legal { color: rgba(255,255,255,.85); }
.site-footer .brand .mark { background: rgba(255,255,255,.1); }
.site-footer .legal { border-top-color: rgba(255,255,255,.12); color: rgba(255,255,255,.55); }
.site-footer [style*="color:var(--ink)"] { color: #fff !important; }
.mabrook .he-big { animation: none; }
.live-banner { box-shadow: 0 10px 30px -18px var(--live); }
.today-item { transition: transform .15s, background .15s; } .today-item:hover { transform: translateX(3px); }

/* Live now + just added (top of the home page) */
.now-strip { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0 1.2rem; }
.now-live { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-radius: var(--radius); background: var(--live-soft); border: 1px solid color-mix(in srgb, var(--live) 30%, transparent); }
.now-live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; flex: none; }
.now-live .lbl { font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--live); flex: none; }
.now-live .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.now-live .btn { margin-left: auto; flex: none; }
.now-new { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.now-new > .lbl { flex: none; font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.now-scroll { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; min-width: 0; padding: .1rem 0; }
.now-scroll::-webkit-scrollbar { display: none; }
.now-card { flex: none; width: 250px; scroll-snap-align: start; display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); }
.now-card .play { flex: none; width: 32px; height: 32px; }
.now-card .txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.now-card .ti { font-weight: 600; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-card .by { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-more { flex: none; align-self: center; padding: 0 .4rem; font-size: .82rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
@media (max-width: 600px) { .now-new { flex-direction: column; align-items: stretch; gap: .4rem; } .now-card { width: 78vw; } }

/* Mabrook form */
.mb-form { margin-top: .9rem; padding: .9rem; border-radius: var(--radius-s); background: var(--surface-2); }
.mb-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.now-card .play { border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 0; display: grid; place-items: center; cursor: pointer; }
.now-card .play svg { width: 14px; height: 14px; }
.now-card .play.playing { background: var(--gold); }

/* Hazzanut */
.maqam-tag { display: inline-block; padding: 0 .45rem; margin-right: .35rem; border-radius: 999px; font-size: .72rem; font-weight: 700; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.maqam-week { display: flex; align-items: center; gap: 1.1rem; padding: 1rem 1.3rem; margin-bottom: 1.4rem; background: linear-gradient(135deg, var(--gold-soft), var(--surface)); border: 1px solid var(--gold-line); }
.maqam-week .he-mq { font-family: var(--hebrew); font-size: 2.6rem; line-height: 1; color: var(--gold); min-width: 3.2rem; text-align: center; }
.maqam-week .nm { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; }
.maqam-week .go { margin-left: auto; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* Music: covers */
.cover { position: relative; aspect-ratio: 1; width: 100%; border-radius: 12px; overflow: hidden; background: var(--surface-2); flex: none; box-shadow: 0 10px 24px -14px rgba(0,0,0,.45); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.gen { display: grid; place-content: center; text-align: center; gap: .2rem; color: #f3e6c4;
  background: radial-gradient(120% 90% at 20% 0%, hsl(var(--h) 42% 38%), hsl(var(--h) 48% 22%) 60%, hsl(var(--h) 50% 13%)); }
.cover.gen::after { content: ""; position: absolute; inset: 7%; border: 1px solid rgba(243,230,196,.28); border-radius: 8px; pointer-events: none; }
.cover.gen .he { font-family: var(--hebrew); font-size: clamp(1.4rem, 5cqi, 2.6rem); font-size: 2.1em; line-height: 1; font-weight: 700; }
.cover.gen .en { font-size: .62em; letter-spacing: .22em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.cover.sm { width: 44px; border-radius: 7px; font-size: 9px; box-shadow: none; }
.cover.sm.gen::after { display: none; }
.cover.md { width: 64px; border-radius: 10px; font-size: 12px; }
.cover.xl { width: min(240px, 60vw); font-size: 26px; }
.cover.add { display: grid; place-items: center; font-size: 2.4rem; color: var(--muted); background: transparent; border: 2px dashed var(--line-2); box-shadow: none; }

/* Music: tiles and track lists */
.tile-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 1rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.music-tile { display: flex; flex-direction: column; gap: .35rem; font-size: 15px; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; }
.music-tile .t { font-weight: 650; line-height: 1.25; }
.music-tile .s { font-size: .8rem; color: var(--muted); }
.music-tile:hover .cover { transform: translateY(-2px); }
.music-tile .cover { transition: transform .15s ease; }
.music-tile.on .cover { outline: 3px solid var(--gold); outline-offset: 3px; }
.tracks { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.track { display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) auto auto auto; align-items: center; gap: .75rem; padding: .5rem .8rem; border-top: 1px solid var(--line); }
.track:first-child { border-top: 0; }
.track:hover { background: var(--surface-2); }
.tnum { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600; }
.tnum svg { width: 16px; height: 16px; display: none; }
.track:hover .tnum .n, .tnum.playing .n { display: none; }
.track:hover .tnum svg, .tnum.playing svg { display: block; }
.tnum.playing { background: var(--gold); color: #fff; }
.tmeta { min-width: 0; }
.tmeta .title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmeta .sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .dur { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .track { grid-template-columns: 32px 40px minmax(0, 1fr) auto auto; gap: .55rem; } .track [data-fav-id], .track .dur { display: none; } }

/* Music: page heads */
.hz-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.2rem; margin: 1.4rem 0 .4rem; }
.hz-head h1 { margin: .1rem 0; }
.mw-card { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem .7rem .7rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--gold-soft), var(--surface)); border: 1px solid var(--gold-line); max-width: 360px; }
.mw-card .nm { font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }
.mw-card .go { margin-left: auto; font-weight: 700; color: var(--accent); white-space: nowrap; padding-left: .6rem; }
@media (max-width: 860px) { .hz-head { grid-template-columns: auto minmax(0, 1fr); } .hz-head .mw-card { grid-column: 1 / -1; max-width: none; } }
.album-head { display: flex; align-items: flex-end; gap: 1.6rem; margin: 1.6rem 0 1.4rem; }
.album-head h1 { margin: .2rem 0; }
@media (max-width: 600px) { .album-head { flex-direction: column; align-items: flex-start; } }

/* Keriyat Torah */
.aliyah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.aliyah { padding: .9rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.aliyah.empty { opacity: .6; }
.aliyah .ah { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.aliyah .ah .he { font-family: var(--hebrew); font-size: 1.35rem; font-weight: 700; color: var(--gold); }
.aliyah .ah .nm { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.aliyah .reader { display: flex; align-items: center; gap: .55rem; }
.aliyah .reader .play { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; cursor: pointer; flex: none; }
.aliyah .reader .play svg { width: 14px; height: 14px; }
.aliyah .reader .play.playing { background: var(--gold); color: #fff; }
.aliyah .reader .rm { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
/* the menu stays on one line; it tightens before it wraps */
.nav a { white-space: nowrap; }
@media (max-width: 1360px) { .nav { gap: 0; } .nav a { padding: .45rem .55rem; font-size: .9rem; } }
@media (max-width: 1220px) { .nav a[data-nav="library"] { display: none; } }
.aliyah .ah .he { white-space: nowrap; }
.aliyah .ah .nm { white-space: nowrap; }

/* Schedule */
.sch-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.sch-day { padding: 1rem 1.1rem; }
.sch-day.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.sch-day.special { background: linear-gradient(180deg, var(--gold-soft), var(--surface) 70%); }
.sch-head { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; padding-bottom: .55rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line); }
.sch-special { text-align: right; }
.sch-row { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: .6rem; padding: .5rem 0; border-top: 1px dashed var(--line); }
.sch-row:first-of-type { border-top: 0; }
.sch-row .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.sch-row.past { opacity: 1; } .sch-row.past :is(.t, .w) { color: var(--muted) !important; }
.sch-row.cancelled .t, .sch-row.cancelled strong { text-decoration: line-through; opacity: .6; }
.chip.sch-minyan { background: var(--accent-soft); color: var(--accent); }
.chip.sch-shiur { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.chip.sch-event { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.ev-card { display: flex; gap: .9rem; align-items: center; }
.ev-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 4.6rem; padding: .4rem; border-radius: 10px; background: var(--surface-2); font-weight: 700; text-align: center; line-height: 1.2; }
.mobile-tabs a { min-width: 0; }
@media (max-width: 1360px) { .nav a[data-nav="library"] { display: none; } }

/* Schedule: the Today panel */
.tl-card { padding: 1.1rem 1.3rem 1.2rem; margin-bottom: 1.2rem; }
.tl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.tl-clock { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tl-track { position: relative; height: 128px; margin: .6rem 1.2rem .4rem; }
.tl-line { position: absolute; left: 0; right: 0; top: 50%; height: 3px; border-radius: 2px; background: var(--line-2); }
.tl-item { position: absolute; top: 50%; transform: translateX(-50%); }
.tl-item .dot { position: absolute; left: 50%; top: 0; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.tl-item.k-shiur .dot { background: var(--ok); } .tl-item.k-event .dot { background: var(--gold); }
.tl-item .lbl { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .76rem; line-height: 1.25; text-align: center; color: var(--ink-2); }
.tl-item .lbl b { display: block; font-size: .8rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-item.up .lbl { bottom: 14px; } .tl-item.down .lbl { top: 14px; }
.tl-item.past { opacity: 1; } .tl-item.past * { color: var(--muted) !important; }
.tl-now { position: absolute; top: 6px; bottom: 6px; width: 2px; background: var(--live); transform: translateX(-50%); transition: left .6s ease; z-index: 2; }
.tl-now span { position: absolute; top: -4px; left: 50%; transform: translate(-50%, -100%); padding: .05rem .45rem; border-radius: 999px; background: var(--live); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tl-now.edge { opacity: .45; }
.tl-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; margin-top: .8rem; }
.tl-card-next { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .9rem; border-radius: var(--radius-s); background: var(--surface-2); border-left: 4px solid var(--accent); }
.tl-card-next.k-shiur { border-left-color: var(--ok); } .tl-card-next.k-event { border-left-color: var(--gold); }
.tl-card-next .cd { font-family: var(--display); font-size: 1.35rem; line-height: 1.2; }
.tl-card-next.soon .cd { color: var(--live); }
.tl-card-next.now .cd { color: var(--ok); }
@media (max-width: 700px) {
  .tl-track { display: none; }
  .tl-next { grid-template-columns: 1fr; }
}

/* Source sheets */
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.src-sheet { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); padding: 0; cursor: zoom-in; }
.src-sheet img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.src-sheet.pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: .8rem; text-align: center; cursor: pointer; }
.src-sheet.pdf .ico { font-weight: 800; letter-spacing: .08em; color: #fff; background: var(--live); border-radius: 6px; padding: .5rem .7rem; }
.src-sheet.pdf .nm { font-size: .82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sheet-view { position: fixed; inset: 0; z-index: 200; background: rgba(10,12,18,.94); display: flex; align-items: center; justify-content: center; touch-action: pinch-zoom; }
.sheet-view img { max-width: 96vw; max-height: 86vh; object-fit: contain; border-radius: 6px; background: #fff; }
.sheet-view .bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 1.2rem; justify-content: center; align-items: center; padding: .9rem; color: #fff; font-weight: 600; }
.sheet-view .bar a, .sheet-view .bar button { color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 999px; padding: .45rem 1rem; font: inherit; cursor: pointer; }
.sheet-view .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.8rem; cursor: pointer; }
.sheet-view .prev { left: 1rem; } .sheet-view .next { right: 1rem; }
/* Portal: sheets while recording */
.sheet-pick { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.sheet-pick .th { position: relative; width: 74px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: .75rem; }
.sheet-pick .th img { width: 100%; height: 100%; object-fit: cover; }
.sheet-pick .th button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }

/* Notch / Dynamic Island (iPhone app and home-screen app; zero in a normal browser tab) */
body { padding-top: env(safe-area-inset-top); }
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--bg); z-index: 60; pointer-events: none; }
.site-header { top: env(safe-area-inset-top); }
.sheet { padding-top: env(safe-area-inset-top); }
.sheet-view { padding-top: env(safe-area-inset-top); }

/* Tablet widths (iPad portrait, narrow windows): the menu shrinks, then scrolls sideways,
   so the search and theme buttons always stay on screen */
.nav { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.nav::-webkit-scrollbar { display: none; }
.site-header .brand, .site-header #theme-toggle { flex-shrink: 0; }
.header-search { flex: 0 4 320px; min-width: 150px; }
@media (max-width: 1180px) { .nav a { padding: .4rem .55rem; font-size: .88rem; } .site-header .container { gap: .8rem; } }
.brand .mark { overflow: hidden; }
.brand .mark img { height: 24px; width: auto; display: block; }

/* Notifications */
.bell { position: relative; flex-shrink: 0; }
.bell svg { width: 21px; height: 21px; }
.bell-dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px var(--surface); }
.nt-device { margin-bottom: 1.1rem; }
.nt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; }
.nt-dot.on { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.nt-dot.warn { background: var(--gold); }
.nt-tabs { margin-bottom: .4rem; }
.nt-list { display: flex; flex-direction: column; gap: .7rem; }
.nt-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.nt-item.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nt-item.urgent { border-left: 4px solid var(--live); }
.nt-item h3 { margin: .45rem 0 .25rem; font-size: 1.05rem; }
.nt-item p { margin: 0 0 .5rem; white-space: pre-wrap; color: var(--ink-2); line-height: 1.55; }
.nt-item p:last-child { margin-bottom: 0; }
.nt-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.nt-group { margin-bottom: 1rem; }
.nt-group h3 { margin: 0 0 .4rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--font); font-weight: 600; }
.nt-toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.nt-group h3 + .nt-toggle { border-top: 0; }
.nt-toggle > span { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
input.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; flex-shrink: 0; cursor: pointer; transition: background .15s; margin: 0; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nt-dev { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem .8rem; align-items: center; }
.nt-dev .nt-dot { align-self: start; margin-top: .45rem; }
@media (max-width: 560px) { .nt-dev { grid-template-columns: auto 1fr; } .nt-dev .btn { grid-column: 2; justify-self: start; } }

/* ===== Phone & app look: navy and gold, app-style tabs ===== */
:root { --brand: #052e43; --brand-2: #0b3d57; --brand-gold: #e3c06e; }
.more-sheet { display: none; }
@media (min-width: 821px) { #mobile-search-btn { display: none; } }
@media (max-width: 820px) {
  body { background-image: none; }
  input, select, textarea { font-size: 16px !important; } /* iPhone zooms into anything smaller */
  body::before { background: var(--brand); }
  .site-header { background: var(--brand); border-bottom: 0; backdrop-filter: none; box-shadow: 0 6px 20px -14px rgba(5,46,67,.6); }
  .site-header .container { height: 58px; gap: .2rem; }
  .site-header .brand { margin-right: auto; color: #fff; font-size: 1.22rem; }
  .site-header .brand small { color: var(--brand-gold); opacity: .9; }
  .site-header .brand .mark { background: rgba(255,255,255,.1); width: 38px; height: 38px; border-radius: 11px; }
  .site-header .icon-btn { color: #fff; }
  .site-header #theme-toggle { display: none; }
  .bell-dot { box-shadow: 0 0 0 2px var(--brand); }
  .top-banner { background: linear-gradient(90deg, #c9a24a, #e3c06e); color: var(--brand); padding: .5rem .9rem; font-size: .84rem; line-height: 1.35; gap: .25rem .6rem; }
  .top-banner .lbl { color: var(--brand); opacity: .75; }
  .top-banner a { color: var(--brand); opacity: 1; font-weight: 600; }

  .mobile-tabs { background: var(--brand); border-top: 0; box-shadow: 0 -10px 30px -12px rgba(5,46,67,.45); padding: .45rem .2rem calc(.4rem + env(safe-area-inset-bottom)); }
  .mobile-tabs a, .mobile-tabs button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; font: inherit; font-size: .68rem; font-weight: 600; letter-spacing: .01em; color: rgba(255,255,255,.62); padding: 0; position: relative; cursor: pointer; }
  .mobile-tabs a svg, .mobile-tabs button svg { width: 56px; height: 30px; padding: 4px 16px; box-sizing: border-box; border-radius: 999px; transition: background .2s; }
  .mobile-tabs a.active, .mobile-tabs button.active { color: var(--brand-gold); }
  .mobile-tabs a.active svg, .mobile-tabs button.active svg { background: rgba(227,192,110,.17); }
  .mobile-tabs .dot { position: absolute; top: 2px; left: calc(50% + 12px); width: 8px; height: 8px; border-radius: 50%; background: #ff5d5d; box-shadow: 0 0 0 2px var(--brand); }

  .more-sheet { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(2,18,28,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .more-sheet.open { opacity: 1; pointer-events: auto; }
  .more-panel { position: absolute; left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 24px; padding: .5rem .8rem .8rem; box-shadow: 0 24px 60px -20px rgba(2,18,28,.6); transform: translateY(16px) scale(.98); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
  .more-sheet.open .more-panel { transform: none; }
  .more-grab { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: .2rem auto .6rem; }
  .more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .2rem; }
  .more-grid a { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .7rem .2rem; border-radius: 16px; font-size: .78rem; font-weight: 600; color: var(--ink); text-align: center; }
  .more-grid a:active { background: var(--surface-2); }
  .more-grid .ic { width: 50px; height: 50px; border-radius: 16px; background: var(--brand); color: var(--brand-gold); display: grid; place-items: center; box-shadow: 0 8px 18px -10px rgba(5,46,67,.7); }
  .more-grid .ic svg { width: 24px; height: 24px; }
  .more-rows { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .3rem; }
  .more-rows a, .more-rows button { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .75rem .5rem; background: none; border: 0; font: inherit; font-weight: 500; color: var(--ink); text-align: left; }
  .more-rows svg { width: 21px; height: 21px; color: var(--muted); }

  /* Cards and type */
  .card { border-radius: 18px; border-color: transparent; box-shadow: 0 1px 2px rgba(5,46,67,.05), 0 10px 28px -16px rgba(5,46,67,.22); }
  .section-head h2 { font-size: 1.45rem; }
  .page-head h1 { font-size: 2.1rem; }

  /* Home hero: compact, with today front and centre */
  .hero-bleed .inner { padding: 1.5rem 0 1.4rem; gap: 1.2rem; }
  .hero-bleed h1 { font-size: 2.15rem; max-width: none; margin: .45rem 0 .9rem; }
  .hero-bleed .lead, .hero-bleed .stats, .hero-bleed .photo-credit { display: none; }
  .hero-bleed .row { gap: .5rem; margin-top: .4rem !important; flex-wrap: nowrap; }
  .hero-bleed .row .btn { padding: .6rem 1rem; font-size: .92rem; white-space: nowrap; }
  .hero-bleed .row .btn:nth-child(2) { display: none; }
  .hero-bleed .eyebrow { font-size: .68rem; }
  .now-strip { margin: .9rem 0 1rem; }
}
:root[data-theme="dark"] .more-grid .ic { background: var(--brand-2); }
.form-err { background: var(--live-soft); color: var(--live); border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; font-weight: 500; }
.player-bar .pb-close { color: var(--muted); margin-left: .2rem; }
.player-bar .pb-close svg { width: 18px; height: 18px; }
@media (min-width: 821px) { .player-bar .pb-close { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); } .player-bar .inner { padding-right: 2.6rem; } }

/* Shiur artwork: the rabbi's photo (or the shiur's own cover) behind the play button */
button.play.art { position: relative; background-color: var(--brand); background-size: cover; background-position: center 18%; color: #fff !important; border-radius: 14px; overflow: hidden; }
button.play.art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,46,67,.05), rgba(5,46,67,.55)); transition: background .2s; }
button.play.art:hover::before, button.play.art.playing::before { background: rgba(5,46,67,.55); }
button.play.art svg { position: relative; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.shiur-card button.play.art { width: 64px; height: 64px; }
.shiur-row button.play.art { width: 48px; height: 48px; border-radius: 11px; }
.shiur-list.compact .shiur-row button.play.art { width: 40px; height: 40px; }
.now-card button.play.art { border-radius: 10px; }

/* ===== Hazzanut: immersive music app ===== */
.hz2 { --ink: #f5f1e8; --ink-2: #c9d3dc; --muted: #8ea1b1; --surface: rgba(255,255,255,.055); --surface-2: rgba(255,255,255,.1); --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.16); --accent: #e3c06e; --accent-ink: #1a1405;
  color: var(--ink); margin: 0 calc(50% - 50vw); padding: 0 max(16px, calc(50vw - 600px)) 3.5rem; min-height: 100vh;
  background: linear-gradient(180deg, hsl(var(--h) 48% 24%) 0, hsl(var(--h) 40% 13%) 360px, #07121b 720px, #07121b); }
.hz2 a { color: inherit; }
.hz2 .eyebrow { color: var(--brand-gold); letter-spacing: .14em; }
.hz2 .he { font-family: var(--hebrew); }
.hz2 h1, .hz2 h2 { color: #fff; }
.hz2-hero { position: relative; margin: 0 calc(-1 * max(16px, calc(50vw - 600px))); padding: 3.2rem max(16px, calc(50vw - 600px)) 1.8rem; overflow: hidden; }
.hz2-hero .bg { position: absolute; inset: -40px; background: hsl(var(--h) 40% 25%) center 20% / cover; filter: blur(38px) saturate(1.3) brightness(.55); transform: scale(1.1); }
.hz2-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,18,27,.1), rgba(7,18,27,.25) 55%, hsl(var(--h) 40% 13%)); }
.hz2-hero .inner { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 1.6rem; }
.hz2-portrait { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; object-position: center 15%; flex: none; box-shadow: 0 24px 60px -18px rgba(0,0,0,.8), 0 0 0 4px rgba(255,255,255,.08); }
.hz2-portrait.ph { display: grid; place-items: center; background: hsl(var(--h) 35% 30%); font-size: 3rem; color: #f3e6c4; }
.hz2-hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .95; letter-spacing: -.03em; font-weight: 600; margin: .3rem 0 .6rem; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.hz2-hero .eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; text-transform: uppercase; font-weight: 700; }
.hz2-hero .eyebrow svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: #3b82f6; color: #fff; }
.hz2-stats { color: var(--ink-2); font-size: .92rem; }
.hz2-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.hz-play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--brand-gold); color: #1a1405; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 26px -8px rgba(227,192,110,.75); transition: transform .15s, background .15s; flex: none; }
.hz-play svg { width: 22px; height: 22px; margin-left: 2px; }
.hz-play:hover { transform: scale(1.06); background: #f0d083; }
.hz-play.lg { width: 60px; height: 60px; } .hz-play.lg svg { width: 26px; height: 26px; }
.hz-play.sm { width: 42px; height: 42px; } .hz-play.sm svg { width: 18px; height: 18px; }
.hz-icon { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.hz-icon svg { width: 26px; height: 26px; } .hz-icon:hover { color: #fff; background: rgba(255,255,255,.08); }

.qp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .4rem 0 1.6rem; }
.qp { display: flex; align-items: center; gap: .8rem; background: rgba(255,255,255,.08); border: 0; border-radius: 8px; overflow: hidden; color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; text-align: left; cursor: pointer; padding: 0 .7rem 0 0; min-height: 60px; position: relative; transition: background .15s; }
.qp:hover { background: rgba(255,255,255,.16); }
.qp .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.qp-art { width: 60px; height: 60px; flex: none; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h, 222) 55% 38%), hsl(calc(var(--h, 222) + 30) 50% 20%)); color: #f3e6c4; font-size: 1.15rem; box-shadow: 4px 0 14px -6px rgba(0,0,0,.6); }
.qp-art.liked { background: linear-gradient(135deg, #4f3cc9, #9d8cf0); color: #fff; } .qp-art.liked svg, .qp-art.pl svg { width: 24px; height: 24px; }
.qp-art.pl { background: linear-gradient(135deg, #0e6b62, #2fb59f); color: #fff; }
.qp-go { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-gold); color: #1a1405; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.qp-go svg { width: 16px; height: 16px; } .qp:hover .qp-go { opacity: 1; }

.hz2-mw { position: relative; overflow: hidden; border-radius: 22px; padding: 1.5rem; margin-bottom: 2rem; background: linear-gradient(125deg, hsl(var(--h) 55% 30%), hsl(calc(var(--h) + 35) 45% 16%)); box-shadow: 0 30px 60px -30px hsl(var(--h) 60% 30%); }
.hz2-mw .glow { position: absolute; width: 360px; height: 360px; right: -100px; top: -140px; border-radius: 50%; background: radial-gradient(hsla(var(--h), 90%, 70%, .35), transparent 65%); animation: mwglow 7s ease-in-out infinite alternate; }
@keyframes mwglow { to { transform: translate(-60px, 40px) scale(1.15); } }
.hz2-mw .wm { position: absolute; right: 1rem; bottom: -1.6rem; font-size: 9rem; line-height: 1; color: rgba(255,255,255,.07); pointer-events: none; }
.mw-top { position: relative; display: flex; align-items: center; gap: 1.2rem; }
.mw-top > div { flex: 1; min-width: 0; }
.mw-top h2 { font-size: 2.2rem; margin: .15rem 0 .2rem; }
.mw-top p { margin: 0; color: var(--ink-2); } .mw-top p.note { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.mw-top .vinyl { width: 96px; height: 96px; }
.mw-list { position: relative; margin-top: 1rem; display: flex; flex-direction: column; gap: .2rem; }
.mw-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: .6rem; background: rgba(0,0,0,.18); border: 0; border-radius: 10px; padding: .55rem .7rem; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mw-row:hover { background: rgba(0,0,0,.3); } .mw-row .s { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.mw-row .eqw { display: grid; place-items: center; } .mw-row .eqw svg { width: 16px; height: 16px; } .mw-row .eq { display: none; }
.mw-row.playing .eq { display: inline-flex; } .mw-row.playing .eqw svg { display: none; } .mw-row.playing .t { color: var(--brand-gold); }

.hz2-sec { margin-top: 2.2rem; }
.hz2-sec h2 { font-family: var(--font); font-weight: 750; font-size: 1.45rem; letter-spacing: -.02em; margin-bottom: .9rem; display: flex; align-items: baseline; gap: .6rem; }
.hz2-sec h2 .sub { font-size: .95rem; color: var(--muted); font-weight: 400; }
.hz2-head { display: flex; justify-content: space-between; align-items: baseline; } .hz2-head .more { color: var(--muted); font-size: .85rem; font-weight: 700; }
.hz2-row { display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 1.1rem; overflow-x: auto; padding: .2rem .2rem 1rem; margin: 0 -.2rem; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hz2-row::-webkit-scrollbar { display: none; }
.card-art { display: flex; flex-direction: column; gap: .3rem; background: none; border: 0; padding: .6rem; margin: -.6rem; border-radius: 12px; color: inherit; font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; transition: background .2s; }
.card-art:hover { background: rgba(255,255,255,.06); }
.card-art .art-wrap { position: relative; margin-bottom: .35rem; }
.card-art .art-wrap .hz-play { position: absolute; right: .5rem; bottom: .5rem; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.card-art:hover .art-wrap .hz-play, .card-art .art-wrap .hz-play.playing { opacity: 1; transform: none; }
@media (hover: none) { .card-art .art-wrap .hz-play { opacity: 1; transform: none; } }
.card-art .t { font-weight: 700; font-size: .95rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-art .s { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hz2 .cover { border-radius: 10px; box-shadow: 0 16px 32px -14px rgba(0,0,0,.8); }
.hz2 .cover img { object-position: center 18%; }
.pl-cover, .pl-new { display: grid; place-items: center; background: linear-gradient(135deg, #0e6b62, #2fb59f); color: #fff; }
.pl-cover svg { width: 40%; height: 40%; } .pl-new { background: rgba(255,255,255,.06); border: 2px dashed rgba(255,255,255,.2); box-shadow: none !important; font-size: 2.6rem; color: var(--muted); }

.occ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.occ { position: relative; overflow: hidden; height: 108px; border-radius: 12px; padding: .9rem 1rem; background: linear-gradient(135deg, hsl(var(--h) 62% 44%), hsl(calc(var(--h) + 25) 58% 28%)); box-shadow: 0 14px 28px -18px hsl(var(--h) 70% 40%); transition: transform .18s; }
.occ:hover { transform: translateY(-3px) rotate(-.4deg); }
.occ .t { font-weight: 800; font-size: 1.12rem; color: #fff; position: relative; z-index: 1; }
.occ .he { position: absolute; right: -.4rem; bottom: -.7rem; font-size: 3.3rem; line-height: 1; color: rgba(255,255,255,.2); transform: rotate(-12deg); font-weight: 700; }
.occ .n { position: absolute; left: 1rem; bottom: .7rem; font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.75); }

/* maqamat as records */
.vinyl { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; position: relative; flex: none;
  background: radial-gradient(circle, transparent 0 30%, rgba(255,255,255,.05) 30.5% 31%, transparent 31.5% 38%, rgba(255,255,255,.05) 38.5% 39%, transparent 39.5% 47%, rgba(255,255,255,.04) 47.5% 48%, transparent 48.5%), conic-gradient(from 30deg, #111 0, #2a2a2a 12%, #0c0c0c 25%, #262626 38%, #0d0d0d 50%, #2b2b2b 63%, #0e0e0e 75%, #252525 88%, #111); box-shadow: 0 16px 34px -14px rgba(0,0,0,.9); }
.vinyl .lbl { position: absolute; inset: 31%; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #0b0b0b 0 7%, hsl(var(--h) 55% 46%) 8%, hsl(var(--h) 50% 34%)); color: #f7ecd0; }
.vinyl .lbl .he { font-size: clamp(.7rem, 2.3vw, 1rem); font-weight: 700; transform: translateY(-58%); }
.vinyl.spin { animation: vspin 3.2s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
.vinyl-tile { display: flex; flex-direction: column; gap: .3rem; scroll-snap-align: start; }
.vinyl-tile .vinyl { margin-bottom: .5rem; transition: transform .3s; } .vinyl-tile:hover .vinyl { transform: rotate(25deg) scale(1.03); }
.vinyl-tile .t { font-weight: 800; } .vinyl-tile .s { color: var(--muted); font-size: .78rem; line-height: 1.35; }

/* filtered / album / playlist header */
.hz2-view { display: flex; align-items: flex-end; gap: 1.6rem; padding: 2.6rem 0 1.6rem; }
.hz2-view > .cover, .hz2-view > .vinyl, .hz2-view > .occ-badge { width: 220px; height: 220px; flex: none; }
.hz2-view .txt { min-width: 0; } .hz2-view h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.03em; font-weight: 600; margin: .2rem 0 .5rem; }
.hz2-view h1 .he { font-size: .55em; color: var(--brand-gold); }
.hz2-view p { color: var(--ink-2); margin: 0 0 .4rem; max-width: 60ch; }
.hz2-back { display: inline-block; font-size: .85rem; color: var(--muted) !important; margin-bottom: .8rem; font-weight: 600; }
.occ-badge { border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 62% 44%), hsl(calc(var(--h) + 25) 58% 22%)); box-shadow: 0 24px 50px -20px rgba(0,0,0,.8); }
.occ-badge .he { font-size: 4rem; color: rgba(255,255,255,.85); }
.hz2-empty { color: var(--muted); padding: 2rem 0; text-align: center; }

/* track list inside Hazzanut */
.hz2 .tracks { background: transparent; border: 0; border-radius: 0; }
.hz2 .track { border-top: 0; border-radius: 8px; padding: .45rem .6rem; transition: background .15s; }
.hz2 .track:hover { background: rgba(255,255,255,.07); }
.hz2 .track .title { color: #fff; font-weight: 600; }
.hz2 .track .sub, .hz2 .track .dur { color: rgba(255,255,255,.62); }
.hz2 .track .maqam-tag { background: rgba(227,192,110,.15); color: var(--brand-gold); }
.hz2 .icon-btn { color: var(--muted); } .hz2 .icon-btn:hover { color: #fff; } .hz2 .icon-btn.active { color: var(--brand-gold); }
.hz2 .pill-count { background: rgba(255,255,255,.1); color: var(--ink-2); }
.tnum .eq { display: none; }
.tnum.playing .n, .tnum.playing svg { display: none; } .tnum.playing .eq { display: inline-flex; }
.track:has(.tnum.playing) .title { color: var(--brand-gold) !important; }
.eq { gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--brand-gold); border-radius: 1px; animation: eqb .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eqb { 0%, 100% { height: 3px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .vinyl.spin, .eq i, .hz2-mw .glow { animation: none; } }

@media (max-width: 700px) {
  .hz2-hero { padding-top: 2rem; }
  .hz2-hero .inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hz2-portrait { width: 150px; height: 150px; }
  .qp-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .qp { min-height: 54px; font-size: .82rem; } .qp-art { width: 54px; height: 54px; }
  .hz2-row { grid-auto-columns: 148px; }
  .hz2-view { flex-direction: column; align-items: flex-start; padding-top: 1.4rem; }
  .hz2-view > .cover, .hz2-view > .vinyl, .hz2-view > .occ-badge { width: 190px; height: 190px; align-self: center; }
  .hz2-mw { padding: 1.2rem; } .mw-top { flex-wrap: wrap; } .mw-top .vinyl { width: 76px; height: 76px; } .mw-top h2 { font-size: 1.8rem; }
  .occ-grid { grid-template-columns: 1fr 1fr; } .occ { height: 96px; }
}
.cover.designed { background: linear-gradient(160deg, hsl(var(--h) 60% 42%), hsl(calc(var(--h) + 30) 55% 18%)); }
.cover.designed img { position: absolute; inset: 0; mix-blend-mode: luminosity; opacity: .55; }
.cover.designed::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, hsla(var(--h), 60%, 12%, .85)); }
.cover.designed .nm { position: absolute; left: .7rem; right: .7rem; bottom: .65rem; z-index: 1; color: #fff; font-family: var(--font); font-weight: 800; font-size: 1.12rem; line-height: 1.05; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.qp-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; mix-blend-mode: luminosity; opacity: .7; }

/* Phone: floating mini-player above the tab bar (never overlapping it) */
@media (max-width: 820px) {
  .mobile-tabs { height: calc(64px + env(safe-area-inset-bottom)); box-sizing: border-box; }
  .player-bar { left: 8px; right: 8px; bottom: calc(64px + 6px + env(safe-area-inset-bottom)); border: 0; border-radius: 14px; overflow: hidden;
    background: var(--brand-2); color: #fff; box-shadow: 0 14px 34px -12px rgba(2,18,28,.65); z-index: 46; }
  .player-bar:not(.visible) { transform: translateY(calc(100% + 90px)); }
  .player-bar .inner { height: 60px; padding: 0 .4rem 0 .5rem; gap: .5rem; }
  .player-bar .now { gap: .65rem; }
  .player-bar .now .avatar { border-radius: 8px; width: 42px; height: 42px; }
  .player-bar .now .t { color: #fff; font-size: .9rem; }
  .player-bar .now .s { color: rgba(255,255,255,.65); }
  .player-bar .icon-btn, .player-bar .pb-close { color: rgba(255,255,255,.85); }
  .player-bar .controls { gap: 0; }
  .player-bar .controls #pb-back, .player-bar .controls #pb-fwd { display: none; }
  .player-bar .controls .main { width: 40px; height: 40px; background: transparent; color: #fff; }
  .player-bar .controls .main svg { width: 28px; height: 28px; }
  .player-bar .scrub { top: auto; bottom: 0; left: 10px; right: 10px; height: 2px; background: rgba(255,255,255,.18); border-radius: 2px; }
  .player-bar .scrub .buf { background: rgba(255,255,255,.25); }
  .player-bar .scrub .pos { background: var(--brand-gold); }
  body { padding-bottom: calc(var(--player-h) + 76px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(var(--player-h) + 96px + env(safe-area-inset-bottom)); }
}

/* Accounts */
.acct-btn { flex-shrink: 0; overflow: hidden; }
.acct-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.acct-btn .ini { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-gold); color: var(--brand); font-weight: 800; font-size: .85rem; }
@media (max-width: 820px) { .site-header .acct-btn { display: none; } }
.more-acct { display: flex; align-items: center; gap: .8rem; padding: .5rem .4rem .8rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.more-acct .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-gold); font-weight: 800; overflow: hidden; flex: none; }
.more-acct .av img { width: 100%; height: 100%; object-fit: cover; } .more-acct .av svg { width: 22px; height: 22px; }
.more-acct strong { display: block; } .more-acct small { color: var(--muted); font-size: .78rem; } .more-acct .go { margin-left: auto; color: var(--muted); font-size: 1.4rem; }
.acct { max-width: 520px; margin: 0 auto; padding: 1.4rem 0 2rem; }
.acct-hero { text-align: center; margin: 1rem 0 1.4rem; }
.acct-hero .mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--brand); margin-bottom: .8rem; } .acct-hero .mark img { height: 40px; }
.acct-hero h1 { font-size: 2rem; margin-bottom: .4rem; }
.acct-form .or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .8rem; margin: 1rem 0; } .acct-form .or::before, .acct-form .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.acct-form [data-google] { display: flex; justify-content: center; min-height: 44px; }
.g-btn { width: 100%; justify-content: center; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.acct-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.acct-ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--brand); color: var(--brand-gold); font-size: 1.8rem; font-weight: 700; flex: none; }
.acct-head h1 { font-size: 1.9rem; margin: .1rem 0; }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.acct-stats a { background: var(--surface); border-radius: 14px; padding: .8rem; text-align: center; box-shadow: 0 1px 2px rgba(5,46,67,.05); }
.acct-stats strong { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--ink); } .acct-stats span { font-size: .78rem; color: var(--muted); }
.acct-card { margin-bottom: 1rem; padding: .4rem 1rem; }
.acct-sync { display: flex; gap: .8rem; padding: .7rem 0; } .acct-sync svg { width: 22px; height: 22px; color: var(--ok); flex: none; margin-top: .1rem; }
.acct-row { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .85rem 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.acct-row:first-child { border-top: 0; } .acct-row svg { width: 20px; height: 20px; color: var(--muted); } .acct-row span { margin-left: auto; color: var(--muted); }
.linklike { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; }
.acct-form [data-google]:empty { display: none; }
/* Live: the rabbi is on a short break (phone call or Pause) */
.live-break { display: flex; gap: .8rem; align-items: center; text-align: left; max-width: 460px; margin: 1.2rem auto 0; padding: .9rem 1.1rem; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--ink); }
.live-break .ic { font-size: 1.6rem; } .live-break strong { display: block; }
.live-stage.on-break .wave i { animation-duration: 3s; opacity: .45; }
/* Shiurim page: live at the top */
.live-top { margin-top: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.live-top .live-banner { margin-top: 0; }
.live-idle { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .7rem 1rem; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line-2); color: var(--muted); font-size: .88rem; }
.live-idle svg { width: 18px; height: 18px; flex: none; } .live-idle .go { margin-left: auto; font-size: 1.2rem; }

/* Browse by subject: clean list rows */
.subj-sec { margin-top: 1.8rem; }
.subj-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.subj-head > a:first-child { display: flex; align-items: baseline; gap: .6rem; min-width: 0; }
.subj-head h2 { font-size: 1.5rem; margin: 0; }
.subj-head .he { font-family: var(--hebrew); color: var(--gold); font-size: 1.15rem; }
.subj-head .more { color: var(--accent); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.subj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.subj-row { display: flex; align-items: center; gap: .85rem; padding: .6rem .8rem .6rem .6rem; background: var(--surface); border-radius: 14px; box-shadow: 0 1px 2px rgba(5,46,67,.05), 0 8px 22px -16px rgba(5,46,67,.25); transition: transform .15s, box-shadow .15s; min-width: 0; }
.subj-row:hover { transform: translateY(-1px); box-shadow: 0 1px 2px rgba(5,46,67,.05), 0 12px 26px -14px rgba(5,46,67,.3); }
.subj-badge { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg, hsl(var(--h) 38% 30%), hsl(calc(var(--h) + 25) 45% 18%)); }
.subj-badge .he { font-family: var(--hebrew); color: #f3e3b8; font-size: .95rem; font-weight: 700; line-height: 1; max-width: 44px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip; direction: rtl; }
.subj-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.subj-txt .nm { font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subj-txt .sub { font-family: var(--hebrew); font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.subj-n { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: .15rem .55rem; flex: none; }
.subj-go { color: var(--line-2); font-size: 1.4rem; line-height: 1; flex: none; }
@media (max-width: 700px) {
  .subj-list { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .compact-head { margin: 1rem 0 .4rem; } .compact-head h1 { font-size: 2rem; } .compact-head p.muted { display: none; }
  .subj-head h2 { font-size: 1.3rem; }
}
.subj-badge .he { font-size: 1.15rem; } .subj-badge .he.sm { font-size: .92rem; } .subj-badge .he.xs { font-size: .72rem; }

/* Browse by subject: rich tiles */
.subj-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.subj-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; padding: .95rem 1rem .8rem; border-radius: 16px; color: #fff;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.16), transparent 55%), linear-gradient(150deg, var(--a), var(--b));
  box-shadow: 0 14px 28px -18px var(--b), inset 0 1px 0 rgba(255,255,255,.12); transition: transform .18s ease, box-shadow .18s ease; isolation: isolate; }
.subj-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 2l18 18-18 18L2 20z' fill='none' stroke='%23fff' stroke-opacity='.06'/%3E%3C/svg%3E"); }
.subj-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 32px -16px var(--b), inset 0 1px 0 rgba(255,255,255,.12); }
.subj-tile:active { transform: scale(.98); }
.subj-tile .nm { position: relative; z-index: 1; font-family: var(--font); font-weight: 800; font-size: 1.08rem; line-height: 1.15; letter-spacing: -.01em; max-width: 85%; text-shadow: 0 1px 10px rgba(0,0,0,.2); }
.subj-tile .wm { position: absolute; z-index: 0; right: -.3rem; bottom: -.55rem; font-family: var(--hebrew); font-weight: 700; font-size: 2.9rem; line-height: 1; color: rgba(255,255,255,.17); white-space: nowrap; transform: rotate(-10deg); transform-origin: right bottom; pointer-events: none; }
.subj-tile .n { position: relative; z-index: 1; align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: .2rem .55rem; border-radius: 999px; background: rgba(0,0,0,.22); color: rgba(255,255,255,.92); backdrop-filter: blur(4px); }
.subj-head { margin-bottom: .8rem; }
.subj-head h2 { font-weight: 600; }
@media (max-width: 700px) { .subj-tiles { grid-template-columns: 1fr 1fr; gap: .6rem; } .subj-tile { min-height: 104px; } .subj-tile .nm { font-size: 1rem; } .subj-tile .wm { font-size: 2.5rem; } }
.subj-tile .wm { color: rgba(227,192,110,.22); }
.subj-tile .n { background: rgba(227,192,110,.16); color: #f1dca4; }
.subj-tile { box-shadow: 0 14px 28px -18px rgba(5,46,67,.9), inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(227,192,110,.12); }

/* Schedule: what's next, the prayer and its time first */
.tl-next { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tl-card-next { gap: .25rem; padding: .8rem 1rem; }
.tl-card-next .r1 { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.tl-card-next .t { font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.2; color: var(--ink); min-width: 0; }
.tl-card-next .tm { font-family: var(--display); font-weight: 600; font-size: 1.2rem; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.tl-card-next .r2 { display: flex; flex-wrap: wrap; gap: .1rem .5rem; font-size: .82rem; color: var(--muted); }
.tl-card-next .r2 > span + span::before { content: '·'; margin-right: .5rem; }
.tl-card-next .cd { font-family: var(--font); font-size: .82rem; line-height: 1.4; font-weight: 600; color: var(--ink-2); }
/* the very next one stands out */
.tl-card-next.first { background: linear-gradient(150deg, #123f5c, #052e43); border-left: 0; padding: 1.05rem 1.15rem; box-shadow: 0 16px 34px -20px rgba(5,46,67,.9); }
.tl-card-next.first .t, .tl-card-next.first .tm { color: #fff; font-size: 1.6rem; }
.tl-card-next.first .r2 { color: rgba(255,255,255,.72); font-size: .88rem; }
.tl-card-next.first .cd { color: #e3c06e; font-size: .88rem; }
.tl-card-next.first::before { content: 'Next'; font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: rgba(255,255,255,.6); }
.tl-card-next.soon .cd { color: var(--live); } .tl-card-next.first.soon .cd { color: #ff9a9a; }
@media (max-width: 700px) { .tl-next { grid-template-columns: minmax(0, 1fr); } }
.tl-card-next .r2 { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.tl-card-next .r2 > span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* Shiurim, by rabbi: portrait cards */
.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-top: .4rem; }
.rb-card { display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(5,46,67,.06), 0 14px 30px -20px rgba(5,46,67,.45); transition: transform .18s, box-shadow .18s; }
.rb-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(5,46,67,.06), 0 18px 34px -18px rgba(5,46,67,.5); }
.rb-card:active { transform: scale(.985); }
.rb-ph { position: relative; display: block; aspect-ratio: 1; background: linear-gradient(150deg, #123f5c, #052e43); overflow: hidden; }
.rb-ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block; }
.rb-ph::after { content: ''; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(5,46,67,.55)); pointer-events: none; }
.rb-ph .ini { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 2.6rem; color: #e3c06e; letter-spacing: .02em; }
.rb-ph .ini::before { content: ''; position: absolute; inset: 10%; border: 1px solid rgba(227,192,110,.25); border-radius: 50%; }
.rb-n { position: absolute; z-index: 1; left: .6rem; bottom: .55rem; font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: rgba(5,46,67,.7); color: #f1dca4; backdrop-filter: blur(6px); }
.rb-txt { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .85rem .85rem; min-width: 0; }
.rb-role { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--gold); }
.rb-nm { font-family: var(--display); font-size: 1.15rem; line-height: 1.2; color: var(--ink); }
.rb-subj { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-card.rav { grid-column: 1 / -1; flex-direction: row; }
.rb-card.rav .rb-ph { width: 42%; max-width: 260px; flex: none; }
.rb-card.rav .rb-txt { justify-content: center; padding: 1rem 1.2rem; }
.rb-card.rav .rb-nm { font-size: 1.6rem; }
@media (max-width: 700px) { .rb-grid { grid-template-columns: 1fr 1fr; gap: .7rem; } .rb-nm { font-size: 1.02rem; } .rb-card.rav .rb-nm { font-size: 1.35rem; } }

/* ===== Full player: navy, immersive ===== */
.sheet { background: #041d2b; color: #fff; overflow-x: hidden; }
.sheet-bg { position: fixed; inset: -60px; background: #052e43 center / cover no-repeat; filter: blur(60px) saturate(1.2) brightness(.42); transform: scale(1.15); z-index: 0; pointer-events: none; }
.sheet::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(120% 70% at 50% 0%, rgba(18,63,92,.35), transparent 60%), linear-gradient(180deg, rgba(5,46,67,.35), rgba(4,22,33,.92) 70%); }
.sheet .sheet-inner { position: relative; z-index: 1; width: min(560px, 100% - 40px); gap: 1.1rem; padding: .6rem 0 calc(2rem + env(safe-area-inset-bottom)); }
.sheet .icon-btn { color: rgba(255,255,255,.88); }
.sheet .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.sh-top { display: flex; align-items: center; justify-content: space-between; }
.sh-eyebrow { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.62); }
.sh-stage { position: relative; display: grid; place-items: center; margin: .6rem 0 .2rem; }
.sh-waves { position: absolute; left: -20px; right: -20px; top: 50%; width: calc(100% + 40px); height: 78%; transform: translateY(-50%); pointer-events: none; }
.sheet .art { position: relative; width: min(300px, 66vw); margin: 0; border-radius: 22px; background: linear-gradient(150deg, #123f5c, #052e43); color: #e3c06e; box-shadow: 0 30px 60px -24px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.06); transition: transform .5s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.sheet .art img { object-position: center 15%; }
.sheet:not(.playing) .art { transform: scale(.94); }
.sh-meta { display: flex; align-items: center; gap: .8rem; margin-top: .4rem; }
.sh-meta > div { flex: 1; }
.sheet #sheet-title { font-size: 1.55rem; line-height: 1.2; color: #fff; text-align: left; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sheet #sheet-sub { color: rgba(255,255,255,.62); font-size: .95rem; margin-top: .2rem !important; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-fav { width: 44px; height: 44px; flex: none; } .sh-fav svg { width: 26px; height: 26px; } .sh-fav.on { color: #e3c06e !important; }
.sheet .times { color: rgba(255,255,255,.55); font-size: .78rem; margin-top: .35rem; }
.sheet input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; --p: 0%; }
.sheet input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #e3c06e var(--p), rgba(255,255,255,.18) var(--p)); }
.sheet input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); }
.sheet input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: #e3c06e; }
.sheet input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.sheet input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.sheet .big-controls { justify-content: space-between; gap: 0; padding: 0 .2rem; }
.sheet .big-controls .icon-btn { width: 54px; height: 54px; } .sheet .big-controls .icon-btn svg { width: 30px; height: 30px; }
.sheet .big-controls #sh-prev svg, .sheet .big-controls #sh-next svg { width: 26px; height: 26px; }
.sheet .big-controls .main { width: 78px; height: 78px; background: #fff; color: #052e43; box-shadow: 0 16px 34px -12px rgba(0,0,0,.6); transition: transform .15s; }
.sheet .big-controls .main:active { transform: scale(.94); }
.sheet .big-controls .main svg { width: 36px; height: 36px; }
.sh-speeds { display: flex; align-items: center; gap: .3rem; padding: .3rem; border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.sh-speeds .lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: rgba(255,255,255,.55); padding: 0 .5rem 0 .6rem; }
.sh-speeds button { flex: 1; border: 0; background: transparent; color: rgba(255,255,255,.75); font: inherit; font-weight: 700; font-size: .88rem; padding: .5rem 0; border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.sh-speeds button.on { background: #e3c06e; color: #052e43; box-shadow: 0 6px 16px -8px rgba(227,192,110,.9); }
.sh-actions { display: flex; justify-content: space-around; }
.sh-actions > a, .sh-actions > button { display: flex; flex-direction: column; align-items: center; gap: .3rem; background: none; border: 0; color: rgba(255,255,255,.78); font: inherit; font-size: .74rem; font-weight: 600; padding: .3rem .6rem; border-radius: 12px; cursor: pointer; }
.sh-actions > a:hover, .sh-actions > button:hover { color: #fff; background: rgba(255,255,255,.06); }
.sh-actions svg { width: 22px; height: 22px; }
.sh-queue { margin-top: .4rem; background: rgba(255,255,255,.05); border-radius: 18px; padding: .8rem 1rem; }
.sh-queue h3 { color: #fff; font-size: 1.1rem; } .sh-queue .section-head { margin-bottom: .2rem; } .sh-queue .section-head h3::before { display: none; }
.sh-queue .btn.ghost { color: rgba(255,255,255,.6); }
.sh-queue .queue-list, .sh-queue .queue-list * { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.08) !important; }
.sh-queue .queue-list .muted, .sh-queue .queue-list .small { color: rgba(255,255,255,.5); }
.sh-queue:has(.queue-list:empty) { display: none; }
@media (max-height: 760px) { .sheet .art { width: min(240px, 58vw); } .sheet #sheet-title { font-size: 1.35rem; } }
/* player fixes: lines in their own band, firmly navy, speed row fits */
.sh-stage { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.sh-waves { position: static; transform: none; width: calc(100% + 40px); margin: 0 -20px; height: 74px; }
.sheet-bg { filter: blur(70px) saturate(.6) brightness(.38); opacity: .55; }
.sheet { background: #052e43; }
.sheet::before { background: radial-gradient(110% 60% at 50% 0%, rgba(32,92,130,.45), transparent 65%), linear-gradient(180deg, rgba(5,46,67,.55), rgba(3,24,36,.96) 75%); }
.sh-actions [hidden] { display: none !important; }
.sh-speed-wrap { display: flex; flex-direction: column; gap: .45rem; }
.sh-speed-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: rgba(255,255,255,.55); text-align: center; }
.sh-speeds .lbl { display: none; }
.sh-speeds button { font-size: .85rem; padding: .55rem 0; min-width: 0; }
.sh-grab { width: 40px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.28); margin: .1rem auto -.6rem; flex: none; }
.sheet { touch-action: pan-y; overscroll-behavior: contain; }

/* ===== Home ===== */
/* A live shiur: the first and biggest thing on the page */
.live-hero-wrap { margin: 1rem 0 .4rem; display: flex; flex-direction: column; gap: .7rem; }
.live-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem; padding: 1.1rem 1.2rem; border-radius: 22px; color: #fff;
  background: radial-gradient(90% 140% at 0% 0%, rgba(255,90,90,.35), transparent 60%), linear-gradient(135deg, #3a1020, #052e43 70%); box-shadow: 0 22px 44px -22px rgba(162,59,59,.8); }
.live-hero::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,120,120,.35); pointer-events: none; }
.lh-ph { position: relative; width: 74px; height: 74px; flex: none; }
.lh-ph img, .lh-ph .ini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 15%; display: grid; place-items: center; background: #123f5c; color: #e3c06e; font-family: var(--display); font-size: 1.6rem; }
.lh-ph .ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #ff6b6b; animation: lhring 1.8s ease-out infinite; }
@keyframes lhring { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.lh-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.lh-tag { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #ff9a9a; }
.lh-tag .dot { width: 9px; height: 9px; border-radius: 50%; background: #ff5d5d; box-shadow: 0 0 0 0 rgba(255,93,93,.7); animation: lhdot 1.4s infinite; }
@keyframes lhdot { 70% { box-shadow: 0 0 0 9px rgba(255,93,93,0); } 100% { box-shadow: 0 0 0 0 rgba(255,93,93,0); } }
.lh-nm { font-family: var(--display); font-size: 1.55rem; line-height: 1.15; }
.lh-ti { color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-since { font-size: .78rem; color: rgba(255,255,255,.55); }
.lh-btn { display: inline-flex; align-items: center; gap: .45rem; background: #fff; color: #7a1d2c; font-weight: 800; padding: .7rem 1.1rem; border-radius: 999px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); }
.lh-btn svg { width: 18px; height: 18px; }
@media (max-width: 600px) { .live-hero { grid-template-columns: auto 1fr; } .lh-btn { grid-column: 1 / -1; justify-content: center; } .lh-ph { width: 64px; height: 64px; } .lh-nm { font-size: 1.3rem; } }

/* Shabbat panel in the banner */
.shabbat-glass { gap: .8rem; }
.sg-parasha { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .1rem 1rem; padding: .9rem 1rem; border-radius: 14px; background: rgba(255,255,255,.08); color: #fff; }
.sg-parasha .lbl, .sg-times .lbl { grid-column: 1 / -1; font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--gold-line); }
.sg-parasha .val { font-family: var(--display); font-size: 1.45rem; line-height: 1.15; }
.sg-parasha .he { font-family: var(--hebrew); font-size: 1.25rem; color: rgba(255,255,255,.8); }
.sg-times { display: grid; grid-template-columns: 1.3fr 1fr; gap: .6rem; }
.sg-times > div { display: flex; flex-direction: column; padding: .9rem 1rem; border-radius: 14px; background: rgba(255,255,255,.06); }
.sg-candles { background: linear-gradient(150deg, rgba(227,192,110,.28), rgba(227,192,110,.08)) !important; box-shadow: inset 0 0 0 1px rgba(227,192,110,.35); }
.sg-times .big { font-family: var(--display); font-size: 2rem; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.sg-havdalah .big { font-size: 1.5rem; color: rgba(255,255,255,.9); margin-top: auto; }
.sg-times .small { color: rgba(255,255,255,.65); }
.rc-alert { display: grid; grid-template-columns: 1fr; padding: 1rem 1.1rem; border-radius: 16px; text-align: center; color: #052e43; background: linear-gradient(135deg, #f1dca4, #e3c06e); box-shadow: 0 14px 30px -14px rgba(227,192,110,.9); }
.rc-alert .he { font-family: var(--hebrew); font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.rc-alert .rc-t { font-family: var(--display); font-size: 1.35rem; }
.rc-alert .rc-s { font-size: .82rem; font-weight: 600; opacity: .8; }

/* Next minyan, right under the banner */
.next-minyan { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: .7rem; margin: 1.2rem 0 .4rem; align-items: stretch; }
.nm-main { grid-row: span 2; display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.2rem; border-radius: 18px; color: #fff; background: linear-gradient(150deg, #123f5c, #052e43); box-shadow: 0 18px 36px -22px rgba(5,46,67,.95); }
.nm-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: rgba(255,255,255,.6); }
.nm-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.nm-main .nm-t, .nm-main .nm-tm { font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1.15; }
.nm-main .nm-tm { white-space: nowrap; font-variant-numeric: tabular-nums; }
.nm-sub { display: flex; flex-wrap: wrap; gap: .1rem .5rem; color: rgba(255,255,255,.72); font-size: .88rem; }
.nm-sub > span + span::before { content: '·'; margin-right: .5rem; }
.nm-sub .cd { color: #e3c06e; font-weight: 600; } .nm-sub .chg { color: #f1dca4; }
.nm-more { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .75rem .95rem; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgba(5,46,67,.05), 0 10px 24px -18px rgba(5,46,67,.4); }
.nm-more .nm-t { font-weight: 650; color: var(--ink); } .nm-more .nm-tm { font-family: var(--display); font-weight: 600; color: var(--ink); white-space: nowrap; }
.nm-all { grid-column: 2 / -1; align-self: center; justify-self: end; font-size: .85rem; font-weight: 600; color: var(--accent); }
@media (max-width: 700px) { .next-minyan { grid-template-columns: 1fr 1fr; } .nm-main { grid-column: 1 / -1; grid-row: auto; } .nm-main .nm-t, .nm-main .nm-tm { font-size: 1.5rem; } .nm-all { grid-column: 1 / -1; } }

/* Just added: big cards */
.ja-row { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 1rem; overflow-x: auto; padding: .2rem .1rem 1rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ja-row::-webkit-scrollbar { display: none; }
.ja-card { display: flex; flex-direction: column; gap: .3rem; scroll-snap-align: start; min-width: 0; }
.ja-art { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: linear-gradient(150deg, #123f5c, #052e43); box-shadow: 0 16px 30px -18px rgba(5,46,67,.8); margin-bottom: .35rem; }
.ja-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block; }
.ja-art .ini { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 2rem; color: #e3c06e; }
.ja-art::after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(180deg, transparent, rgba(5,46,67,.55)); pointer-events: none; }
.ja-play { position: absolute; z-index: 1; right: .55rem; bottom: .55rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #052e43; display: grid; place-items: center; box-shadow: 0 8px 18px -6px rgba(0,0,0,.6); cursor: pointer; }
.ja-play svg { width: 20px; height: 20px; margin-left: 2px; } .ja-play.playing { background: #e3c06e; }
.ja-t { font-weight: 700; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ja-s { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .ja-row { grid-auto-columns: 150px; gap: .8rem; } }

/* Phone: the whole banner fits on the screen */
@media (max-width: 820px) {
  .home-hero .inner { padding: 1.2rem 0 1.3rem; gap: 1rem; }
  .home-hero h1 { font-size: 2rem; margin: .35rem 0 .8rem; }
  .home-hero .eyebrow { font-size: .6875rem; letter-spacing: .12em; }
  .home-hero .glass { padding: .8rem; }
  .sg-times .big { font-size: 1.75rem; } .sg-havdalah .big { font-size: 1.3rem; }
  .sg-parasha .val { font-size: 1.25rem; }
}
.next-minyan { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); }
.nm-main, .nm-more { min-width: 0; }
.nm-main .nm-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .next-minyan { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nm-more { flex-direction: column; align-items: flex-start; gap: .1rem; }
  .nm-more .nm-tm { font-size: 1.05rem; }
}

/* Home: the doorway into Hazzanut */
.hz-widget { position: relative; display: flex; flex-direction: column; gap: 1.1rem; overflow: hidden; isolation: isolate; padding: 1.3rem 1.3rem 1.2rem; border-radius: 24px; color: #fff;
  background: linear-gradient(160deg, hsl(var(--h) 45% 22%) 0%, #07121b 70%); box-shadow: 0 28px 56px -28px rgba(5,20,30,.95); transition: transform .25s ease; }
.hz-widget:hover { transform: translateY(-3px); }
.hzw-bg { position: absolute; inset: -40px; z-index: -2; background: center 20% / cover no-repeat; filter: blur(34px) saturate(1.2) brightness(.45); transform: scale(1.1); opacity: .7; }
.hzw-glow { position: absolute; z-index: -1; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(hsla(var(--h), 90%, 70%, .35), transparent 65%); animation: mwglow 8s ease-in-out infinite alternate; }
.hz-widget::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); background: linear-gradient(180deg, transparent 40%, rgba(5,14,20,.55)); }
.hzw-top { display: flex; justify-content: space-between; align-items: center; }
.hzw-eyebrow { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; color: #e3c06e; }
.hzw-go { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 800; color: #1a1405; background: #e3c06e; padding: .45rem .9rem; border-radius: 999px; box-shadow: 0 10px 24px -10px rgba(227,192,110,.8); }
.hzw-go svg { width: 14px; height: 14px; }
.hzw-main { display: flex; align-items: center; gap: 1rem; }
.hzw-ph { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; object-position: center 15%; flex: none; box-shadow: 0 0 0 3px rgba(227,192,110,.55), 0 14px 30px -10px rgba(0,0,0,.8); }
.hzw-title { display: block; font-family: var(--display); font-size: 1.75rem; line-height: 1.08; letter-spacing: -.01em; }
.hzw-sub { display: block; margin-top: .3rem; font-size: .9rem; color: rgba(255,255,255,.72); }
.hzw-records { display: flex; gap: .9rem; overflow: hidden; padding: .2rem 0; -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
.hzw-rec { display: flex; flex-direction: column; align-items: center; gap: .35rem; flex: none; width: 74px; }
.hzw-rec .vinyl { width: 74px; height: 74px; animation-duration: 6s; animation-delay: var(--d); }
.hzw-rec .vinyl .lbl .he { font-size: .62rem; }
.hzw-rec .nm { font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.8); }
.hzw-mw { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .1rem .7rem; padding: .8rem 1rem; border-radius: 14px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.hzw-mw .lbl { grid-row: span 2; font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.55); max-width: 5.5rem; line-height: 1.3; }
.hzw-mw .v { font-family: var(--display); font-size: 1.25rem; } .hzw-mw .v .he { font-family: var(--hebrew); color: #e3c06e; font-size: .95em; margin-left: .3rem; }
.hzw-mw .mood { font-size: .82rem; color: rgba(255,255,255,.65); }
.home-subj { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (max-width: 600px) { .hzw-title { font-size: 1.45rem; } .hzw-ph { width: 64px; height: 64px; } .hzw-rec, .hzw-rec .vinyl { width: 64px; } .hzw-rec .vinyl { height: 64px; } }
.subj-tile.soon .n { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
.hz-widget { background: radial-gradient(120% 90% at 100% 0%, rgba(32,92,130,.55), transparent 60%), linear-gradient(160deg, #0b3d57 0%, #052e43 45%, #041f2e 100%); }
.hzw-bg { filter: blur(40px) saturate(.5) brightness(.4); opacity: .45; }
.hzw-glow { background: radial-gradient(rgba(120,180,230,.28), transparent 65%); }
@media (max-width: 700px) {
  .home-subj { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .4rem; }
  .home-subj::-webkit-scrollbar { display: none; }
  .home-subj .subj-tile { scroll-snap-align: start; min-height: 96px; }
}

/* Continue listening: how far along */
.ja-prog { position: absolute; z-index: 1; left: .6rem; right: 3.6rem; bottom: .8rem; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; }
.ja-prog i { display: block; height: 100%; background: #e3c06e; border-radius: 4px; }
/* Popular: a short numbered list */
.top-list { display: flex; flex-direction: column; gap: .2rem; background: var(--surface); border-radius: 18px; padding: .4rem; box-shadow: 0 1px 2px rgba(5,46,67,.05), 0 12px 28px -20px rgba(5,46,67,.4); }
.top-row { display: grid; grid-template-columns: 1.6rem 52px minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .45rem .6rem; border-radius: 12px; }
.top-row:hover { background: var(--surface-2); }
.top-row .rk { font-family: var(--display); font-size: 1.25rem; color: var(--gold); text-align: center; }
.top-art { width: 52px; height: 52px; border-radius: 10px; border: 0; background: linear-gradient(150deg, #123f5c, #052e43) center 15% / cover; color: #fff; display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden; }
.top-art::before { content: ''; position: absolute; inset: 0; background: rgba(5,46,67,.35); } .top-art svg { position: relative; width: 20px; height: 20px; }
.top-art.playing { box-shadow: 0 0 0 2px #e3c06e; }
.top-txt { display: flex; flex-direction: column; min-width: 0; }
.top-txt .t { font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-txt .s { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-row .dur { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Hazzanut card: the maqamat as quiet gold words */
.hzw-maq { display: flex; flex-wrap: wrap; gap: .4rem; }
.hzw-maq span { font-size: .75rem; font-weight: 600; letter-spacing: .02em; padding: .28rem .7rem; border-radius: 999px; color: #f1dca4; border: 1px solid rgba(227,192,110,.35); background: rgba(227,192,110,.07); }
/* Phones and the app: no website-style footer (address, links and contact live under More → About) */
@media (max-width: 820px) { .site-footer { display: none; } }
/* Home: our rabbis as a row of portraits */
.rb-row { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: .9rem; overflow-x: auto; padding: .3rem .1rem .6rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rb-row::-webkit-scrollbar { display: none; }
.rb-bub { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; scroll-snap-align: start; }
.rb-bub .ph { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(150deg, #123f5c, #052e43); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(5,46,67,.18), 0 12px 24px -14px rgba(5,46,67,.7); }
.rb-bub.rav .ph { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #e3c06e, 0 12px 24px -14px rgba(5,46,67,.7); }
.rb-bub .ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.rb-bub .ini { font-family: var(--display); font-size: 1.5rem; color: #e3c06e; }
.rb-bub .nm { font-size: .8rem; font-weight: 650; line-height: 1.2; color: var(--ink); }
/* Hazzanut card: tappable everywhere, with Play and Enter */
.hz-widget { cursor: pointer; }
.hzw-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.hz-widget > :not(.hzw-link):not(.hzw-bg):not(.hzw-glow):not(.hzw-lines) { position: relative; z-index: 2; pointer-events: none; }
.hz-widget .hzw-actions { pointer-events: auto; }
.hzw-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; mix-blend-mode: screen; }
.hzw-actions { display: flex; gap: .6rem; align-items: center; }
.hzw-play { display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: .95rem; padding: .75rem 1.3rem; border-radius: 999px; color: #1a1405; background: linear-gradient(180deg, #f0d083, #e3c06e); box-shadow: 0 12px 28px -10px rgba(227,192,110,.85), inset 0 1px 0 rgba(255,255,255,.5); transition: transform .15s; }
.hzw-play:active { transform: scale(.96); } .hzw-play svg { width: 18px; height: 18px; }
.hzw-enter { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .92rem; color: #fff; padding: .72rem 1.1rem; border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.hzw-enter span { font-size: 1.2rem; line-height: 1; }
.hz-widget .hzw-top .hzw-go { display: none; }
/* Next minyan: a clear Full schedule button */
.nm-all { grid-column: 1 / -1; justify-self: stretch; display: flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1rem; border-radius: 14px; font-size: .95rem; font-weight: 700; color: #052e43; background: var(--surface); box-shadow: inset 0 0 0 1.5px rgba(5,46,67,.22), 0 8px 20px -16px rgba(5,46,67,.5); }
.nm-all svg { width: 18px; height: 18px; } .nm-all span { margin-left: .2rem; font-size: 1.2rem; line-height: 1; }
.nm-all:hover { background: #052e43; color: #fff; }
:root[data-theme="dark"] .nm-all { color: var(--ink); }
.nt-consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: .7rem; font-size: .78rem; line-height: 1.45; color: var(--muted); cursor: pointer; }
.nt-consent input { margin-top: .2rem; flex: none; width: 18px; height: 18px; }
.apple-btn { width: 100%; justify-content: center; background: #000; color: #fff; border-color: #000; margin-bottom: .6rem; }
:root[data-theme="dark"] .apple-btn { background: #fff; color: #000; border-color: #fff; }

/* App: screens slide in like a native app */
@media (prefers-reduced-motion: no-preference) {
  .in-app #app.enter-fwd { animation: enterFwd .28s cubic-bezier(.2,.8,.2,1); }
  .in-app #app.enter-back { animation: enterBack .28s cubic-bezier(.2,.8,.2,1); }
}
@keyframes enterFwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
/* App: no text-selection or long-press menus on buttons and tiles */
.in-app button, .in-app .mobile-tabs, .in-app .subj-tile, .in-app .rb-card, .in-app .ja-card, .in-app .hz-widget, .in-app .nm-main, .in-app .player-bar { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.in-app a, .in-app button { -webkit-tap-highlight-color: transparent; }

/* ---------- Downloads ---------- */
.dl-btn { position: relative; }
.dl-btn.dl-on, .dl-page.dl-on { color: var(--gold, #c9a54e); }
.dl-ring { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(currentColor calc(var(--p, 0) * 1%), color-mix(in srgb, currentColor 18%, transparent) 0); -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6px); mask: radial-gradient(circle, transparent 5.5px, #000 6px); vertical-align: -3px; }
.dl-page .dl-ring { margin-right: .35rem; }
.shiur-row.is-dl .title::after, .track.is-dl .title::after { content: ''; display: inline-block; width: 13px; height: 13px; margin-left: .35rem; vertical-align: -1px; border-radius: 50%; background: #c9a54e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M12 6v10m0 0l-4-4m4 4l4-4'/%3E%3C/svg%3E") center/11px no-repeat; }
.track.is-dl .dl-btn { display: none; }
.hz-dl { display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; font: 600 .9rem/1 var(--font, inherit); cursor: pointer; }
.hz-dl svg { width: 18px; height: 18px; }
.hz-dl.dl-on { border-color: #e3c06e; color: #e3c06e; }
.hz-dl.dl-busy { color: #e3c06e; }
.hz-dl .dl-n { font-variant-numeric: tabular-nums; }
.dl-link { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; margin: 0 0 1.2rem; text-decoration: none; color: inherit; }
.dl-link .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #052e43; color: #e3c06e; flex: none; }
.dl-link .ic svg { width: 22px; height: 22px; }
.dl-link strong { display: block; }
.dl-link small { color: var(--muted); }
.dl-link .go { margin-left: auto; font-size: 1.4rem; color: var(--muted); }
html.offline .live-hero-wrap, html.offline .live-strip { display: none; }

/* Zmanim in the schedule timeline: quiet gold lines between the minyanim */
.sch-row.zman { padding: .28rem 0; border-top-style: dotted; }
.sch-row.zman .t { font-weight: 600; color: var(--gold-text); font-size: .9rem; }
.sch-row.zman .w { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .45rem; }
.sch-row.zman .w::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #e3c06e; flex: none; }
:root[data-theme="dark"] .sch-row.zman .t { color: #e3c06e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sch-row.zman .t { color: #e3c06e; } }
.sch-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.sch-chips::-webkit-scrollbar { display: none; }
.sch-chips .chip { flex: none; }

/* ---------- Today strip: the whole day, minyanim above the line and zmanim below; scrolls sideways ---------- */
.tl-scroll { overflow-x: auto; overflow-y: hidden; margin: .5rem -1.3rem .2rem; padding: 0 1.3rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; mask-image: linear-gradient(90deg, transparent, #000 1.3rem, #000 calc(100% - 1.3rem), transparent); }
.tl-scroll::-webkit-scrollbar { display: none; }
.tl-scroll .tl-track { display: block !important; position: relative; height: 212px; margin: 0; min-width: 100%; }
.tl-scroll .tl-item .lbl { font-size: .74rem; max-width: 100px; white-space: normal; }
.tl-scroll .tl-item.up.lane0 .lbl { bottom: 14px; } .tl-scroll .tl-item.up.lane1 .lbl { bottom: 54px; }
.tl-scroll .tl-item.down.lane0 .lbl { top: 14px; } .tl-scroll .tl-item.down.lane1 .lbl { top: 54px; }
.tl-scroll .tl-item.lane1 .lbl::before { content: ''; position: absolute; left: 50%; width: 1px; height: 38px; background: var(--line-2); }
.tl-scroll .tl-item.up.lane1 .lbl::before { top: 100%; } .tl-scroll .tl-item.down.lane1 .lbl::before { bottom: 100%; }
.tl-item.k-zman .dot { width: 9px; height: 9px; background: #e3c06e; border-width: 2px; }
.tl-item.k-zman .lbl { color: var(--muted); }
.tl-item.k-zman .lbl b { color: #a8862f; font-weight: 700; }
:root[data-theme="dark"] .tl-item.k-zman .lbl b { color: #e3c06e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-item.k-zman .lbl b { color: #e3c06e; } }
.tl-scroll .tl-now { top: 0; bottom: 0; }
.tl-scroll .tl-now span { top: 50%; transform: translate(-50%, -50%); }
@media (max-width: 820px) { .tl-scroll { margin-inline: -1.1rem; padding-inline: 1.1rem; } }

/* Based on Hacham Ovadia Yosef */
sup.ov { color: #a8862f; font-weight: 700; margin-left: 1px; }
.sg-note { margin-top: .7rem; font-size: .74rem; color: rgba(255,255,255,.62); }
.zman-notes { margin-top: 1rem; }
.zman-notes h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.zman-notes dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1rem; margin: .8rem 0 0; font-size: .86rem; }
.zman-notes dt { font-weight: 700; color: var(--ink); }
.zman-notes dd { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .zman-notes dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; } .zman-notes dd { margin-bottom: .55rem; } }
.tl-scroll .tl-item .lbl { width: max-content; max-width: 108px; }
.tl-scroll .tl-item .lbl b { white-space: nowrap; }
.tl-tabs { display: inline-flex; gap: .25rem; padding: .25rem; margin-top: .7rem; border-radius: 999px; background: var(--surface-2); }
.tl-tabs button { border: 0; background: transparent; color: var(--ink-2); font: 600 .85rem/1 var(--font); padding: .5rem .95rem; border-radius: 999px; cursor: pointer; }
.tl-tabs button.on { background: #052e43; color: #fff; }
.tl-scroll.hidden { display: none; }
.zinfo { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: italic 700 .68rem/1 Georgia, serif; display: inline-grid; place-items: center; padding: 0; cursor: pointer; flex: none; }
.zinfo:hover { color: var(--ink); border-color: var(--ink-2); }
.tl-item[data-zinfo] .lbl { cursor: pointer; }
.tl-item[data-zinfo] .lbl::after { content: 'ⓘ'; margin-left: 2px; font-size: .7rem; opacity: .6; }
.zpop { position: absolute; z-index: 90; padding: .8rem .95rem; border-radius: 14px; background: #052e43; color: #fff; box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); font-size: .86rem; line-height: 1.45; animation: zpopIn .16s ease; }
.zpop strong { display: block; font-family: var(--display); font-size: 1.05rem; color: #e3c06e; margin-bottom: .2rem; }
.zpop p { margin: 0; }
.zpop .how { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.8); font-size: .8rem; }
.zpop .how span { color: #e3c06e; font-weight: 600; }
@keyframes zpopIn { from { opacity: 0; transform: translateY(4px); } }

/* One date control: the week's days, arrows to move a week */
.day-picker { display: flex; align-items: center; gap: .3rem; margin: .8rem 0 .2rem; }
.dp-days { display: flex; gap: .3rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dp-days::-webkit-scrollbar { display: none; }
.dp-day { flex: 1 0 auto; min-width: 46px; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem .5rem; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); cursor: pointer; font: inherit; }
.dp-day .dw { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.dp-day .dn { font-family: var(--display); font-size: 1.15rem; line-height: 1; color: var(--ink); }
.dp-day.on { background: #052e43; color: rgba(255,255,255,.75); }
.dp-day.on .dn { color: #e3c06e; }
.dp-day.special::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #e3c06e; }
.dp-arrow { flex: none; width: 34px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 1.5rem; line-height: 1; }
.dp-arrow:hover { background: var(--surface-2); color: var(--ink); }
.dp-today { display: inline-block; margin: .3rem 0 .1rem; font-size: .85rem; font-weight: 600; color: var(--accent); }
.sch-day.picked { box-shadow: 0 0 0 2px #e3c06e; }
.dp-day { flex: 1 1 0; min-width: 38px; padding: .45rem .2rem; }
.dp-day .dw { font-size: .6875rem; letter-spacing: .02em; }
.dp-arrow { width: 26px; }
.tl-card.other-day .tl-clock, .tl-card.other-day .tl-next { display: none; }

/* ---------- Search ---------- */
.sr { max-width: 860px; }
.sr-bar { position: sticky; top: calc(var(--hdr, 64px) + 6px); z-index: 5; display: flex; align-items: center; gap: .5rem; margin: .4rem 0 1rem; padding: 0 .4rem 0 1rem; height: 54px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line-2); box-shadow: 0 12px 30px -22px rgba(5,46,67,.55); }
.sr-bar:focus-within { border-color: #052e43; box-shadow: 0 0 0 4px rgba(227,192,110,.28), 0 12px 30px -22px rgba(5,46,67,.55); }
.sr-bar .mag { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sr-bar input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: 500 1.05rem/1 var(--font); color: var(--ink); outline: none; -webkit-appearance: none; }
.sr-bar input::-webkit-search-cancel-button { display: none; }
.sr-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink-2); cursor: pointer; flex: none; }
.sr-body { transition: opacity .15s; }
.sr-body.loading { opacity: .55; }
.sr-sec { margin: 0 0 1.3rem; }
.sr-sec > h3, .sr-sec .section-head h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .6rem; font-family: var(--font); font-weight: 700; }
.sr-go { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; margin-bottom: 1.2rem; border-radius: 16px; background: linear-gradient(150deg, #123f5c, #052e43); color: #fff; text-decoration: none; }
.sr-go .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(227,192,110,.16); color: #e3c06e; flex: none; }
.sr-go .ic svg { width: 22px; height: 22px; }
.sr-go small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); }
.sr-go strong { font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.sr-go .go { margin-left: auto; font-size: 1.6rem; color: #e3c06e; }
.sr-rabbis { display: flex; gap: .9rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.sr-rabbi { display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 86px; flex: none; text-align: center; font-size: .82rem; color: var(--ink); text-decoration: none; line-height: 1.2; }
.sr-rabbi img, .sr-rabbi .ini { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; background: #052e43; color: #e3c06e; display: grid; place-items: center; font-family: var(--display); font-size: 1.3rem; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px #e3c06e; }
.sr-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.sr-subj { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .9rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sr-subj small { color: var(--muted); font-size: .74rem; }
.sr-subj strong { font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.sr-subj .he { color: var(--muted); font-size: .9rem; }
.sr-filters { display: flex; flex-direction: column; gap: .45rem; margin: 0 0 .8rem; }
.sr-frow { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.sr-frow::-webkit-scrollbar, .sr-rabbis::-webkit-scrollbar { display: none; }
.sr-frow .chip { flex: none; }
.sr-frow .chip .n { opacity: .55; font-weight: 600; margin-left: .15rem; }
.sr-sep { width: 1px; flex: none; background: var(--line-2); margin: .2rem .2rem; }
.sr-recent { display: flex; flex-direction: column; }
.sr-recent a { display: flex; align-items: center; gap: .7rem; padding: .7rem .2rem; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.sr-recent a:first-child { border-top: 0; }
.sr-recent svg { width: 16px; height: 16px; color: var(--muted); }
.sr-none { text-align: center; padding: 1.5rem 0; }
.sr-none .row { justify-content: center; }
mark { background: rgba(227,192,110,.45); color: inherit; border-radius: 3px; padding: 0 1px; }
.sr-entry { display: flex; align-items: center; gap: .6rem; height: 50px; padding: 0 1rem; margin: .2rem 0 1rem; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line-2); color: var(--muted); text-decoration: none; font-size: 1rem; }
.sr-entry svg { width: 19px; height: 19px; }
@media (max-width: 700px) {
  .sr-subjects { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 0 16px .2rem; }
  .sr-subjects::-webkit-scrollbar { display: none; }
  .sr-subj { flex: none; width: 168px; }
}
.kt-soon { max-width: 520px; margin: 2.5rem auto; text-align: center; }
.kt-soon .kt-scroll { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(150deg, #123f5c, #052e43); color: #e3c06e; box-shadow: 0 18px 40px -20px rgba(5,46,67,.8); }
.kt-soon .kt-scroll svg { width: 40px; height: 40px; }
.kt-soon h1 { margin: .3rem 0 .6rem; }
.kt-soon p { margin: 0 auto 1.4rem; }
.soon-pill { font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .1rem .4rem; border-radius: 999px; background: #e3c06e; color: #052e43; vertical-align: 2px; margin-left: .2rem; }
.more-grid .ic { position: relative; }
.soon-dot { position: absolute; top: -6px; right: -14px; font-size: .6875rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .08rem .32rem; border-radius: 999px; background: #e3c06e; color: #052e43; }

/* ---------- Leadership ---------- */
.ld { max-width: 980px; }
.ld-hero { margin: .6rem 0 1.2rem; padding: 1.6rem 1.4rem; border-radius: 22px; background: linear-gradient(150deg, #123f5c, #052e43); color: #fff; }
.ld-hero .eyebrow { color: #e3c06e; }
.ld-hero h1 { color: #fff; margin: .2rem 0 .3rem; }
.ld-hero p { margin: 0; color: rgba(255,255,255,.75); }
.ld-rav { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; margin-bottom: 1.6rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: 0 14px 32px -24px rgba(5,46,67,.6); }
.ld-rav .ph img, .ld-rav .ph .ini { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; object-position: top; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #e3c06e; display: grid; place-items: center; background: #052e43; color: #e3c06e; font-family: var(--display); font-size: 1.5rem; }
.ld-rav .rl, .ld-officer .rl, .ld-person .rl { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #a8862f; }
.ld-rav .nm { display: block; font-family: var(--display); font-size: 1.55rem; font-weight: 600; }
.ld-rav .go { margin-left: auto; font-size: 1.6rem; color: var(--muted); }
.ld-sec { margin-bottom: 1.6rem; }
.ld-sec h2 { font-size: 1.25rem; margin: 0 0 .8rem; }
.ld-officers, .ld-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.ld-officer { display: flex; flex-direction: column; gap: .25rem; padding: .9rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid #e3c06e; }
.ld-officer .nm { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.ld-officer.wide { grid-column: 1 / -1; background: linear-gradient(150deg, #123f5c, #052e43); border: 0; color: #fff; }
.ld-officer.wide .nm { color: #fff; }
.ld-officer.wide .rl { color: #e3c06e; }
.ld-officer .note { font-size: .88rem; color: rgba(255,255,255,.78); line-height: 1.45; }
.ld-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem .7rem; }
.ld-person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; text-decoration: none; color: var(--ink); }
.ld-person .ph img, .ld-person .ph .ini { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; display: grid; place-items: center; background: #052e43; color: #e3c06e; font-family: var(--display); font-size: 1.4rem; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px rgba(227,192,110,.7); margin-bottom: .3rem; }
.ld-person .nm { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.ld-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.ld-two .ld-sec { margin: 0; }
.ld-names { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.2rem; }
.ld-names li { padding: .35rem 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: .95rem; }
.ld-foot { text-align: center; margin-top: 1rem; }
@media (max-width: 600px) { .ld-officers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ld-officer .nm { font-size: 1.05rem; } }

/* Hazzanut in Bnei Yitzhak navy: the maqam's color stays on covers and tiles, not the whole page */
.hz2 { background: radial-gradient(120% 60% at 15% 0%, rgba(227,192,110,.10), transparent 55%), linear-gradient(180deg, #0b3d57 0, #052e43 340px, #041f2e 720px, #03192a); }
.hz2-hero .bg { background-color: #0b3d57; filter: blur(38px) saturate(.9) brightness(.5); }
.hz2-hero::after { background: linear-gradient(180deg, rgba(5,46,67,.2), rgba(5,46,67,.45) 55%, #052e43); }
.hz2-portrait.ph { background: #123f5c; }
.hz2-mw { background: linear-gradient(125deg, #123f5c, #052e43 70%); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7), inset 0 0 0 1px rgba(227,192,110,.22); }
.hz2-hero::after { background: linear-gradient(180deg, rgba(5,46,67,.5), rgba(5,46,67,.62) 55%, #052e43); }
.ld-officer.has-ph { flex-direction: row; align-items: center; gap: .8rem; }
.ld-officer .oph { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px rgba(227,192,110,.7); }
.ld-officer.has-ph > span { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
@media (max-width: 600px) {
  .ld-officers { grid-template-columns: minmax(0, 1fr); }
  .ld-officer .oph { width: 56px; height: 56px; }
}

/* ---------- Super Daf (AI Sefarim) inside the app ---------- */
.sd { position: relative; margin: -.6rem calc(-1 * var(--gutter, 16px)) 0; display: flex; flex-direction: column; height: calc(100dvh - var(--hdr, 64px) - 20px); }
.in-app .sd, .sd { min-height: 520px; }
@media (max-width: 820px) { .sd { height: calc(100dvh - 64px - 78px - env(safe-area-inset-bottom)); } }
.sd-bar { display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; background: #052e43; color: #fff; flex: none; }
.sd-bar img { width: 30px; height: 30px; border-radius: 8px; }
.sd-bar strong { display: block; font-family: var(--display); font-size: 1rem; line-height: 1.1; }
.sd-bar small { display: block; font-size: .7rem; color: #e3c06e; letter-spacing: .04em; }
.sd-out { margin-left: auto; font-size: .78rem; color: rgba(255,255,255,.7); text-decoration: none; }
/* Full screen: no site header, footer, tabs or player while studying */
body.immersive { padding-bottom: 0 !important; overflow: hidden; }
body.immersive .site-header, body.immersive .site-footer, body.immersive .mobile-tabs, body.immersive #top-banner, body.immersive .player-bar { display: none !important; }
body.immersive #app { max-width: none; padding: 0; margin: 0; }
body.immersive .sd { position: fixed; inset: 0; z-index: 50; margin: 0; height: auto; min-height: 0; }
body.immersive .sd-bar { padding: calc(.4rem + env(safe-area-inset-top)) max(.8rem, env(safe-area-inset-right)) .4rem max(.6rem, env(safe-area-inset-left)); justify-content: space-between; }
.sd-back { display: inline-flex; align-items: center; gap: .35rem; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; padding: .3rem .7rem .3rem .45rem; border-radius: 999px; background: rgba(255,255,255,.12); }
.sd-back:active { background: rgba(255,255,255,.22); }
.sd-back img { width: 20px !important; height: 20px !important; border-radius: 5px !important; }
.sd-name { display: inline-flex; align-items: center; gap: .5rem; text-align: right; }
body.immersive .sd-frame { padding-bottom: env(safe-area-inset-bottom); background: #0b1622; }
.sd-frame { flex: 1; width: 100%; border: 0; background: #0b1622; }
.sd-splash { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; background: radial-gradient(120% 80% at 50% 20%, #0f2a44, #050d18 70%); color: #fff; transition: opacity .6s ease, visibility .6s; }
.sd-splash.gone { opacity: 0; visibility: hidden; }
.sd-logo { width: min(230px, 56vw); border-radius: 26px; box-shadow: 0 30px 70px -30px rgba(80,170,255,.55); margin-bottom: 1rem; animation: sdIn .9s ease both; }
.sd-kicker { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.sd-title { font-family: var(--display); font-size: 2.2rem; font-weight: 600; }
.sd-by { font-size: .95rem; color: rgba(255,255,255,.75); }
.sd-by strong { color: #e3c06e; }
@keyframes sdIn { from { opacity: 0; transform: scale(.94); } }
.sd-ic img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* Weekly shiurim, like the printed sheet */
.wk { display: flex; flex-direction: column; gap: 1rem; max-width: 760px; }
.wk-sec { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); }
.wk-sec h3 { margin: 0; padding: .55rem 1rem; background: #0a1e33; color: #fff; font: 700 .8rem/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.wk-row { display: grid; grid-template-columns: 6.6rem 8.2rem minmax(0, 1fr); align-items: center; gap: .6rem; padding: .55rem 1rem; }
.wk-row:nth-child(odd) { background: var(--surface-2); }
.wk-days { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-2); white-space: nowrap; }
.wk-time { font-style: italic; font-weight: 700; font-size: .9rem; color: var(--ink); white-space: nowrap; border-left: 2px solid #e3c06e; padding-left: .6rem; }
.wk-what strong { display: block; font-size: .95rem; line-height: 1.2; }
.wk-what strong a { color: inherit; text-decoration: none; }
.wk-what span { display: block; font-size: .84rem; color: var(--muted); }
.wk-what span a { color: inherit; }
.wk-people .chip .n { opacity: .55; font-weight: 600; margin-left: .15rem; }
.sch-row .t-end { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); }
@media (max-width: 560px) {
  .wk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); row-gap: .15rem; }
  .wk-days { grid-column: 1; } .wk-time { grid-column: 2; font-size: .84rem; }
  .wk-what { grid-column: 1 / -1; }
}
.sd-promo { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; margin: .4rem 0 1.2rem; border-radius: 16px; background: linear-gradient(150deg, #0f2a44, #050d18); color: #fff; text-decoration: none; }
.sd-promo img { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.sd-promo strong { display: block; font-family: var(--display); font-size: 1.1rem; }
.sd-promo small { display: block; font-size: .78rem; color: rgba(255,255,255,.7); }
.sd-promo .go { margin-left: auto; font-size: 1.5rem; color: #e3c06e; }
.sd { margin-top: 0; }
@media (max-width: 820px) { .sd { height: calc(100dvh - 64px - 60px - env(safe-area-inset-bottom)); } }

/* Day strip, one column per item */
.tl-scroll .tl-track.cols { height: 236px; }
.tl-track.cols .tl-line { top: 50%; }
.tl-col { position: absolute; top: 0; bottom: 0; }
.tl-col .dot { position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%); background: #123f5c; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); z-index: 1; }
.tl-col.k-shiur .dot { background: #2f7d5b; } .tl-col.k-event .dot { background: #a8862f; } .tl-col.k-zman .dot { background: #e3c06e; width: 9px; height: 9px; }
.tl-col .tc { position: absolute; left: 5px; right: 5px; display: flex; flex-direction: column; gap: 1px; font-size: .74rem; line-height: 1.25; text-align: left; }
.tl-col.up .tc { bottom: calc(50% + 14px); padding: .45rem .55rem; border-radius: 10px; background: var(--surface-2); border-left: 3px solid #123f5c; }
.tl-col.up.k-shiur .tc { border-left-color: #2f7d5b; }
.tl-col.down .tc { top: calc(50% + 14px); padding: 0 .3rem; }
.tl-col .tc b { font-size: .8rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-col.down .tc b { color: #a8862f; }
.tl-col .tc .nm { color: var(--ink); font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-col.down .tc .nm { color: var(--muted); font-weight: 500; }
.tl-col .tc .who { color: var(--muted); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-col.past { opacity: .42; }
.tl-col[data-zinfo] .tc { cursor: pointer; }
.tl-col[data-zinfo] .nm::after { content: ' ⓘ'; font-size: .7rem; opacity: .6; }
:root[data-theme="dark"] .tl-col.down .tc b { color: #e3c06e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-col.down .tc b { color: #e3c06e; } }
.tl-track.cols .tl-now { top: 8px; bottom: 8px; z-index: 2; }

/* ---------- Minyanim vs shiurim: one color each, everywhere on the schedule ---------- */
:root { --k-minyan: #123f5c; --k-shiur: #2f7d5b; --k-zman: #c49a3a; --k-event: #8a5a9e; }
.sch-filter { display: flex; align-items: center; gap: .45rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px .9rem; padding: .1rem 16px; }
.sch-filter::-webkit-scrollbar { display: none; }
.sch-filter .lbl { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); flex: none; }
.sf { flex: none; display: inline-flex; align-items: center; gap: .4rem; height: 38px; padding: 0 .8rem 0 .35rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: transparent; color: var(--muted); font: 600 .88rem/1 var(--font); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.sf .sw { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.sf .sw svg { width: 15px; height: 15px; }
.sf .n { font-size: .75rem; opacity: .7; font-variant-numeric: tabular-nums; }
.sf.on { color: #fff; border-color: transparent; }
.sf.on .sw { background: rgba(255,255,255,.18); }
.sf.k-minyan.on { background: var(--k-minyan); } .sf.k-shiur.on { background: var(--k-shiur); } .sf.k-zman.on { background: var(--k-zman); } .sf.k-event.on { background: var(--k-event); }
.sf:not(.on) { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.sf-weekly { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; height: 38px; padding: 0 .9rem; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--k-shiur); color: var(--k-shiur); font: 600 .85rem/1 var(--font); text-decoration: none; white-space: nowrap; }
.sf-weekly svg { width: 15px; height: 15px; }

/* hide what's switched off */
.sch-page.off-minyan :is(.tl-col, .sch-row, .tl-card-next).k-minyan,
.sch-page.off-shiur :is(.tl-col, .sch-row, .tl-card-next).k-shiur,
.sch-page.off-zman :is(.tl-col, .sch-row).k-zman,
.sch-page.off-event :is(.tl-col, .sch-row, .tl-card-next).k-event { display: none !important; }

/* timeline cards: minyan = solid navy, shiur = green */
.tl-col .tc .kt { font-style: normal; font-size: .6875rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.tl-col.up.k-minyan .tc { background: var(--k-minyan); border-left: 0; color: #fff; }
.tl-col.up.k-minyan .tc b, .tl-col.up.k-minyan .tc .nm { color: #fff; }
.tl-col.up.k-minyan .tc .kt, .tl-col.up.k-minyan .tc .who { color: rgba(255,255,255,.72); }
.tl-col.up.k-shiur .tc { background: rgba(47,125,91,.1); border-left: 3px solid var(--k-shiur); }
.tl-col.up.k-shiur .tc .kt { color: var(--k-shiur); }
.tl-col.k-minyan .dot { background: var(--k-minyan); } .tl-col.k-shiur .dot { background: var(--k-shiur); }

/* day lists: a colored bar and a type tag on every row */
.sch-row.k-minyan, .sch-row.k-shiur, .sch-row.k-event { position: relative; padding-left: .7rem; border-radius: 10px; margin: .25rem 0; border-top: 0; }
.sch-row.k-minyan { background: rgba(18,63,92,.07); box-shadow: inset 4px 0 0 var(--k-minyan); }
.sch-row.k-shiur { background: rgba(47,125,91,.07); box-shadow: inset 4px 0 0 var(--k-shiur); }
.sch-row.k-event { background: rgba(138,90,158,.07); box-shadow: inset 4px 0 0 var(--k-event); }
.ktag { display: inline-flex; align-items: center; gap: .25rem; margin-right: .45rem; padding: .12rem .45rem; border-radius: 6px; font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; color: #fff; }
.ktag svg { width: 11px; height: 11px; }
.ktag.k-minyan { background: var(--k-minyan); } .ktag.k-shiur { background: var(--k-shiur); } .ktag.k-event { background: var(--k-event); }
.tl-card-next.k-shiur:not(.first) { border-left-color: var(--k-shiur); }
.tl-card-next.k-minyan:not(.first) { border-left-color: var(--k-minyan); }
:root[data-theme="dark"] { --k-minyan: #3f7fa8; --k-shiur: #4fae84; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --k-minyan: #3f7fa8; --k-shiur: #4fae84; } }
@media (max-width: 700px) {
  .sch-filter { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; row-gap: .5rem; }
  .sch-filter .lbl { display: none; }
  .sf { height: 36px; font-size: .84rem; }
  .sf-weekly { margin-left: 0; height: 36px; }
}
.sch-now { position: relative; display: flex; align-items: center; margin: .5rem 0; height: 2px; background: var(--live); border-radius: 2px; }
.sch-now span { position: absolute; left: 0; padding: .12rem .55rem; border-radius: 999px; background: var(--live); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Newsletter ---------- */
.nl-cover { display: block; flex: none; width: 92px; aspect-ratio: 1200 / 1558; border-radius: 8px; overflow: hidden; background: #052e43; box-shadow: 0 12px 26px -16px rgba(5,46,67,.7), 0 0 0 1px var(--line); }
.nl-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.nl-cover .ph { display: grid; place-items: center; height: 100%; color: #e3c06e; font-family: var(--display); font-size: 1.6rem; }
.nl-cover.lg { width: 168px; }
.nl-home { margin-top: 1.2rem; }
.nl-home-in, .nl-hero { display: flex; gap: 1rem; align-items: center; padding: 1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: 0 14px 32px -26px rgba(5,46,67,.6); }
.nl-txt { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.nl-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #a8862f; }
.nl-txt strong { font-family: var(--display); font-size: 1.35rem; font-weight: 600; line-height: 1.15; color: var(--ink); }
.nl-sub { font-size: .85rem; color: var(--muted); }
.nl-btns { margin-top: .5rem; }
.nl-hero .btn { align-self: flex-start; margin-top: .7rem; }
.nl-all { display: block; text-align: right; font-size: .85rem; font-weight: 600; margin-top: .4rem; color: var(--accent); }
.nl-hero { margin-bottom: 1.4rem; }
.nl-hero .nl-txt strong { font-size: 1.8rem; }
.nl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1.1rem .8rem; }
.nl-item { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: var(--ink); }
.nl-item .nl-cover { width: 100%; }
.nl-item strong { font-size: .9rem; line-height: 1.2; }
.nl-item span { font-size: .78rem; color: var(--muted); }
.nl-read { max-width: 900px; margin: 0 auto; }
.nl-bar { position: sticky; top: calc(var(--hdr, 64px)); z-index: 4; display: flex; align-items: center; gap: .8rem; padding: .6rem 0; background: var(--bg); }
.nl-back { font-size: .85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.nl-head { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nl-head strong { font-family: var(--display); font-size: 1.1rem; line-height: 1.2; }
.nl-head span { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-acts { display: flex; gap: .3rem; }
.nl-pages { display: flex; flex-direction: column; gap: .8rem; padding-bottom: 2rem; }
.nl-page { width: 100%; height: auto; display: block; border-radius: 6px; background: #fff; box-shadow: 0 10px 30px -20px rgba(0,0,0,.5), 0 0 0 1px var(--line); }
.nl-loading { text-align: center; }
@media (max-width: 600px) { .nl-cover.lg { width: 120px; } .nl-hero .nl-txt strong { font-size: 1.4rem; } }

/* Kiryat HaTorah door on the home page */
.kt-hero { margin: 1.4rem 0 .4rem; }
.kt-door { position: relative; display: block; overflow: hidden; border-radius: 22px; padding: 1.6rem 1.8rem; min-height: 200px; color: #fff; text-decoration: none; background: radial-gradient(900px 500px at 85% 10%, #4b7df0 0%, #2d5bd1 35%, #1d3a8a 100%); box-shadow: 0 30px 60px -32px rgba(29,58,138,.75); transition: transform .2s, box-shadow .2s; }
.kt-door:hover { transform: translateY(-2px); box-shadow: 0 40px 70px -32px rgba(29,58,138,.85); }
.kt-door > span { position: relative; display: block; max-width: 30rem; }
.kt-eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; font-weight: 600; }
.kt-title { margin: .35rem 0 .4rem; font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.kt-sub { font-size: 1rem; opacity: .95; line-height: 1.45; }
.kt-cta { display: inline-block !important; margin-top: 1rem; background: #fff; color: #1d3a8a; font-weight: 700; border-radius: 999px; padding: .65rem 1.2rem; }
.kt-art { position: absolute; right: 12px; bottom: -8px; width: 38%; max-width: 250px; filter: drop-shadow(0 18px 28px rgba(0,0,0,.35)); }
.kt-nav { font-weight: 700; color: #2d5bd1 !important; }
@media (max-width: 700px) {
  .kt-door { padding: 1rem 1.1rem 1rem; min-height: 0; display: grid; grid-template-columns: 1fr 72px; column-gap: 10px; align-items: end; border-radius: 18px; }
  .kt-door > span { grid-column: 1; }
  .kt-door > .kt-eyebrow { grid-column: 1 / -1; font-size: .7rem; letter-spacing: .1em; }
  .kt-title { font-size: 1.25rem; margin: .25rem 0 .2rem; }
  .kt-sub { font-size: .88rem; }
  .kt-cta { margin-top: .7rem; padding: .5rem 1rem; font-size: .9rem; }
  .kt-art { position: static; grid-column: 2; grid-row: 2 / 5; width: 72px; max-width: none; align-self: end; margin-bottom: -4px; opacity: 1; }
}

/* ===== The Expansion ===== */
.xp { --xp-stone: #efe7da; --xp-ink: #2a2318; --xp-brass: #a8853a; margin-bottom: 2rem; }
.xp-hero { position: relative; width: 100vw; margin-left: calc(50% - 50vw); height: min(88vh, 860px); min-height: 520px; overflow: hidden; background: #b9c9d8; }
.xp-hero-img { position: absolute; inset: -2% 0 0; width: 100%; height: 104%; object-fit: cover; object-position: center 40%; transform: scale(1.04); transform-origin: center bottom; will-change: transform; }
.xp-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,18,26,0) 30%, rgba(14,18,26,.35) 58%, rgba(14,18,26,.82) 100%); }
.xp-hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 max(16px, calc(50vw - 560px)) clamp(2rem, 6vh, 4rem); color: #fff; animation: xp-rise 1.1s cubic-bezier(.2,.8,.2,1) both .1s; }
.xp-hero-text h1 { font-size: clamp(2.8rem, 8vw, 5.6rem); font-weight: 400; letter-spacing: -.02em; line-height: 1; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.xp-hero-he { font-size: clamp(1.25rem, 2.6vw, 1.8rem); color: #ecdcb4; margin: .5rem 0 1rem; direction: rtl; text-align: left; }
.xp-hero-text p { max-width: 46ch; font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255,255,255,.88); margin: 0; }
.xp-eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 600; color: var(--gold); margin-bottom: .7rem; }
.xp-eyebrow.light { color: #ecdcb4; }
.xp-down { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-top: 1.6rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); color: #fff; animation: xp-bob 2.4s ease-in-out infinite; }
.xp-down svg { width: 22px; height: 22px; }
@keyframes xp-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes xp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.xp-intro { max-width: 760px; margin: clamp(3rem, 8vw, 5.5rem) auto clamp(2rem, 6vw, 4rem); text-align: center; scroll-margin-top: 80px; }
.xp-lede { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.45; color: var(--ink); margin-top: 1.2rem; }
.xp-ch { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; margin: clamp(2.5rem, 7vw, 5.5rem) 0; }
.xp-ch.flip { grid-template-columns: 1fr 1.35fr; }
.xp-ch.flip .xp-shot { order: 2; }
.xp-shot { position: relative; padding: 0; border: 0; background: none; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(28,31,41,.45); cursor: zoom-in; }
.xp-shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.xp-shot:hover img { transform: scale(1.035); }
.xp-zoom { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(20,22,28,.55); color: #fff; backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.xp-zoom svg { width: 18px; height: 18px; }
.xp-shot:hover .xp-zoom, .xp-shot:focus-visible .xp-zoom { opacity: 1; }
.xp-copy { max-width: 440px; }
.xp-num { font-family: var(--display); font-size: 3.4rem; line-height: 1; color: var(--gold-line); font-weight: 400; margin-bottom: .6rem; }
.xp-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 400; margin-bottom: 1rem; }
.xp-he { font-size: 1.5rem; color: var(--gold); margin: -.3rem 0 1rem; text-align: left; }
.xp-copy p { color: var(--ink-2); font-size: 1.04rem; line-height: 1.7; }
.xp-copy em { font-family: var(--display); font-size: 1.08em; color: var(--ink); }
.xp-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: clamp(2rem, 6vw, 4rem) 0; }
.xp-thumb { padding: 0; border: 0; border-radius: 4px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.xp-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1), filter .4s; filter: saturate(.9); }
.xp-thumb:hover img { transform: scale(1.05); filter: none; }
.xp-close { width: 100vw; margin-left: calc(50% - 50vw); background: linear-gradient(180deg, #1c2230, #12161f); color: #f4efe4; padding: clamp(3.5rem, 9vw, 6.5rem) 16px; text-align: center; position: relative; overflow: hidden; }
.xp-close::before { content: ""; position: absolute; inset: 0; background: url(/img/expansion/sanctuary.jpg) center 30% / cover; opacity: .13; }
.xp-close-inner { position: relative; max-width: 620px; margin: 0 auto; }
.xp-close .xp-eyebrow { color: #d9c48f; }
.xp-close h2 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 400; color: #fff; margin-bottom: 1rem; }
.xp-close p { color: rgba(244,239,228,.78); font-size: 1.05rem; line-height: 1.7; }
.xp-actions { justify-content: center; margin-top: 1.6rem; gap: .7rem; }
.xp-btn { background: transparent; color: #f4efe4; border: 1px solid rgba(244,239,228,.35); border-radius: 999px; padding: .7rem 1.3rem; }
.xp-btn:hover { border-color: #d9c48f; color: #fff; }
.xp-btn.primary { background: #d9c48f; color: #1c2230; border-color: #d9c48f; font-weight: 600; }
.xp-btn.primary:hover { background: #e6d4a3; color: #1c2230; }
.xp-note { text-align: center; margin-top: 1.2rem; }
.xp-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10,12,16,.94); display: grid; place-items: center; opacity: 0; transition: opacity .25s; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.xp-lightbox.open { opacity: 1; }
.xp-lightbox img { max-width: min(94vw, 1600px); max-height: 86vh; object-fit: contain; border-radius: 3px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.xp-lightbox button { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; display: grid; place-items: center; }
.xp-lightbox button:hover { background: rgba(255,255,255,.18); }
.xp-lb-x { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.xp-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.xp-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
:root[data-theme="dark"] .xp-shot { box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
@media (max-width: 820px) {
  .xp-hero { height: 78vh; min-height: 460px; }
  .xp-ch, .xp-ch.flip { grid-template-columns: 1fr; gap: 1.3rem; }
  .xp-ch.flip .xp-shot { order: 0; }
  .xp-shot { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; box-shadow: none; }
  .xp-num { font-size: 2.6rem; }
  .xp-strip { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .xp-lb-prev, .xp-lb-next { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); transform: none; }
}
@media (prefers-reduced-motion: reduce) { .xp-hero-text, .xp-down { animation: none; } .xp-shot img, .xp-thumb img { transition: none; } }

/* ===== Shiur page: square play tile ===== */
.play-cover { position: relative; display: block; width: 100%; max-width: 400px; aspect-ratio: 1; margin: 1.4rem 0 1rem; padding: 0; border: 0; border-radius: 28px; overflow: hidden; cursor: pointer; color: #fff; text-align: left; isolation: isolate;
  background: #061f2e; box-shadow: 0 34px 70px -34px rgba(5,46,67,.85), 0 10px 24px -14px rgba(5,46,67,.5); }
.pc-aurora { position: absolute; inset: -20%; z-index: -1; filter: blur(42px) saturate(1.15); }
.pc-aurora i { position: absolute; border-radius: 50%; animation: pc-drift 18s ease-in-out infinite alternate; }
.pc-aurora i:nth-child(1) { width: 75%; height: 75%; left: -5%; top: -5%; background: #1b74a0; }
.pc-aurora i:nth-child(2) { width: 60%; height: 60%; right: -2%; bottom: 0; background: #e3a84f; opacity: .5; animation-duration: 22s; animation-delay: -6s; }
.pc-aurora i:nth-child(3) { width: 55%; height: 55%; left: 20%; bottom: -12%; background: #0e3f5d; animation-duration: 26s; animation-delay: -12s; }
@keyframes pc-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, 6%) scale(1.08); } 100% { transform: translate(-6%, 4%) scale(.96); } }
.play-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4,18,28,0) 45%, rgba(4,18,28,.55) 100%); }
.pc-eyebrow { position: absolute; left: 26px; top: 24px; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: rgba(255,255,255,.78); }
.pc-play { position: absolute; left: 50%; top: 44%; width: 136px; height: 136px; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; color: #082a3e;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f4 100%); box-shadow: 0 24px 48px -14px rgba(0,0,0,.6), 0 2px 0 rgba(255,255,255,.6) inset; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.pc-play svg { width: 54px; height: 54px; margin-left: 8px; fill: currentColor; }
.play-cover.playing .pc-play svg { margin-left: 0; width: 46px; height: 46px; }
.play-cover:hover .pc-play { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 30px 56px -14px rgba(0,0,0,.65), 0 2px 0 rgba(255,255,255,.6) inset; }
.play-cover:active .pc-play { transform: translate(-50%, -50%) scale(.95); }
.play-cover.playing .pc-play { animation: pc-breathe 2.4s ease-in-out infinite; }
@keyframes pc-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.035); } }
.play-cover.playing .pc-aurora i { animation-duration: 9s; }
.pc-cap { position: absolute; left: 24px; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: .2rem; text-align: center; align-items: center; }
.pc-cap b { font-family: var(--display); font-weight: 500; font-size: 1.7rem; line-height: 1.1; letter-spacing: -.01em; }
.pc-cap small { color: rgba(255,255,255,.7); font-size: .9rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-cover .l-pause { display: none; } .play-cover.playing .l-play { display: none; } .play-cover.playing .l-pause { display: block; }
.play-cover .ph-eq { position: absolute; right: 26px; top: 24px; display: flex; align-items: flex-end; gap: 3px; height: 14px; opacity: 0; transition: opacity .3s; }
.ph-eq i { display: block; width: 3px; height: 30%; border-radius: 2px; background: #fff; }
.play-cover.playing .ph-eq { opacity: 1; } .play-cover.playing .ph-eq i { animation: ph-eq 1.1s ease-in-out infinite; }
.ph-eq i:nth-child(2) { animation-delay: -.35s !important; } .ph-eq i:nth-child(3) { animation-delay: -.7s !important; } .ph-eq i:nth-child(4) { animation-delay: -.2s !important; }
@keyframes ph-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@media (max-width: 560px) { .play-cover { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .play-cover .pc-aurora i, .play-cover.playing .pc-play, .play-cover.playing .ph-eq i { animation: none; } }

/* Full player: menu matches the dark sheet; on shorter phones the art shrinks so speed fits on screen */
.sheet .menu { top: calc(100% + 8px); bottom: auto; background: #0e2a3b; border-color: rgba(255,255,255,.1); color: #fff; min-width: 210px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); z-index: 5; }
.sheet .menu button { color: rgba(255,255,255,.9); padding: .65rem .8rem; font-size: .95rem; }
.sheet .menu button:hover { background: rgba(255,255,255,.08); } .sheet .menu button.on { color: #e3c06e; }
@media (max-height: 820px) { .sheet .art { width: min(300px, 66vw, 31vh); } .sheet .sheet-inner { gap: .85rem; } .sh-stage { margin: .2rem 0 0; } }

/* first-visit notifications card */
.np-card { position: fixed; left: 50%; bottom: calc(76px + var(--player-h) + env(safe-area-inset-bottom)); z-index: 60; width: min(440px, calc(100% - 24px)); transform: translate(-50%, 20px); opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s;
  display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; align-items: start; padding: 1rem 1.1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 50px -20px rgba(5,46,67,.45); }
.np-card.in { transform: translate(-50%, 0); opacity: 1; }
.np-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #052e43; color: #e3c06e; } .np-ic svg { width: 20px; height: 20px; }
.np-txt b { display: block; font-size: 1rem; } .np-txt span { display: block; color: var(--muted); font-size: .88rem; line-height: 1.4; margin-top: .15rem; }
.np-btns { grid-column: 2; display: flex; gap: .5rem; margin-top: .4rem; }
@media (min-width: 821px) { .np-card { bottom: calc(24px + var(--player-h)); } }

/* Meet the Board: name and role always stack; the CTO card */
.ld-officer > span:not(.ld-mono) { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ld-officer.wide { padding: 1.3rem 1.3rem; gap: 1.1rem; align-items: flex-start; }
.ld-officer.wide .nm { font-size: 1.45rem; }
.ld-officer.wide .note { margin-top: .35rem; font-size: .95rem; color: rgba(255,255,255,.8); }
.ld-mono { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.5rem; font-weight: 500; color: #052e43;
  background: radial-gradient(circle at 32% 28%, #f6e2ad, #e3c06e 55%, #c49a4b); box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 8px 20px -8px rgba(0,0,0,.5); }
.ld-tags { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: .4rem !important; margin-top: .8rem; }
.ld-tags span { font-size: .76rem; font-weight: 500; color: #f3e6c4; background: rgba(227,192,110,.12); border: 1px solid rgba(227,192,110,.3); border-radius: 999px; padding: .25rem .65rem; }
@media (max-width: 600px) { .ld-officer.wide { flex-direction: column !important; } .ld-mono { width: 56px; height: 56px; font-size: 1.3rem; } }
.ld-officer.has-ph > .ld-mono { display: grid; place-items: center; line-height: 1; }
.sd-report { margin-left: .4rem; background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: .3rem .7rem; font-size: .76rem; font-weight: 600; cursor: pointer; }
.sd-report:hover { background: rgba(255,255,255,.18); color: #fff; }


/* ===== Apple HIG pass (apple-look / apple-motion review, Oct 2026) ===== */
/* legibility: no label under 11pt; gold text dark enough to read on cream */
.mobile-tabs a, .mobile-tabs button { font-size: .6875rem; }
.brand small, .sh-speed-lbl { font-size: .6875rem; }
.eyebrow, .xp-eyebrow { color: var(--gold-text); }
/* tap targets: at least 44 × 44 pt */
@media (max-width: 820px) {
  .site-header .icon-btn, .player-bar .pb-close, .player-bar .controls .main, .track .icon-btn.sm { width: 44px; height: 44px; }
  .btn { min-height: 44px; }
  .chip { min-height: 36px; }
  .dp-arrow { width: 28px; position: relative; }
  .dp-arrow::after { content: ''; position: absolute; inset: 0 -8px; }
}
/* feedback the moment a finger lands, not on release */
.btn:active, .chip:active, .icon-btn:active { transform: scale(.96); transition: transform .1s ease-out; }
.mobile-tabs :is(a, button):active svg { background: rgba(255,255,255,.14); border-radius: 10px; }
.site-header .icon-btn:active { background: rgba(255,255,255,.14); }
:is(.track, .shiur-card, .more-grid > a, .rabbi-card, .subj-tile):active { background-color: var(--surface-2); }
.more-panel { transform-origin: 85% 100%; }
/* Reduce Motion: fades instead of slides, no looping motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet { transition: opacity .2s, visibility 0s .2s; }
  .sheet:not(.open) { transform: none; opacity: 0; visibility: hidden; }
  .sheet.open { transition: opacity .2s; }
  .more-panel, .player-bar { transition: opacity .2s; }
  .more-sheet .more-panel { transform: none; }
  .sheet .art { transition: none; }
  .sheet:not(.playing) .art { transform: none; }
  .dot, .live-banner .dot { animation: none; }
  .in-app #app, #app.enter-fwd, #app.enter-back { animation: none !important; }
}
/* Home: two subjects side by side instead of stacked in one column */
.home-subj:not(:has(> :nth-child(5))) { grid-auto-flow: row; grid-template-columns: 1fr 1fr; grid-template-rows: none; }

/* ---------- Marketplace: businesses run by members of the shul ---------- */
.mk { max-width: 980px; margin: 0 auto; }
.mk-ic { width: 20px; height: 20px; flex: none; }
.mk-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; margin: .6rem 0 1.4rem; }
.mk-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3rem); letter-spacing: -.02em; margin: .1rem 0 .4rem; }
.mk-hero p { max-width: 52ch; margin: 0; }
.mk-mine { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: -.4rem 0 1.2rem; }
.mk-mine-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem .3rem .3rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .88rem; }
.mk-mine-chip em { font-style: normal; color: var(--muted); font-weight: 500; }
.mk-tools { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: .5rem 0 .7rem; margin-bottom: .6rem; }
.mk-search .input { width: 100%; border-radius: 999px; padding-left: 1.1rem; }
.mk-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .7rem 0 .1rem; scrollbar-width: none; }
.mk-chips::-webkit-scrollbar { display: none; }
.mk-chips .chip-btn { flex: none; font: inherit; font-size: .85rem; font-weight: 600; padding: .45rem .9rem; min-height: 36px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.mk-chips .chip-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.mk-grid > [hidden] { display: none; }
.mk-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.mk-card:active { transform: scale(.985); }
@media (hover: hover) { .mk-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28,31,41,.06), 0 18px 36px -18px rgba(28,31,41,.3); } }
.mk-card-cover { position: relative; aspect-ratio: 16 / 7; background: linear-gradient(135deg, #0b3d57, #052e43) center / cover; display: grid; place-items: center; }
.mk-card-ph { color: rgba(255,255,255,.35); } .mk-card-ph .mk-ic { width: 38px; height: 38px; }
.mk-card-body { display: flex; gap: .75rem; padding: .85rem 1rem 1rem; align-items: flex-start; }
.mk-card-txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mk-card-txt strong { font-size: 1.02rem; line-height: 1.25; }
.mk-tag { color: var(--ink-2); font-size: .88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-meta { color: var(--muted); font-size: .8rem; font-weight: 500; }
.mk-logo { flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--line); }
.mk-logo img { width: 100%; height: 100%; object-fit: cover; } .mk-logo b { font-family: var(--display); font-size: 1.15rem; font-weight: 500; }
.mk-logo.sm { position: relative; z-index: 1; margin-top: -1.9rem; width: 52px; height: 52px; border: 3px solid var(--surface); box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); }
.mk-logo.xs { width: 26px; height: 26px; border-radius: 50%; } .mk-logo.xs b { font-size: .7rem; }
.mk-logo.lg { width: 92px; height: 92px; border-radius: 22px; border: 4px solid var(--bg); box-shadow: 0 10px 24px -14px rgba(0,0,0,.5); } .mk-logo.lg b { font-size: 2rem; }
.mk-kosher { position: absolute; top: .6rem; right: .6rem; display: inline-flex; align-items: center; gap: .25rem; background: rgba(255,253,248,.95); color: var(--ok); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .25rem .55rem .25rem .4rem; border-radius: 999px; }
.mk-kosher .mk-ic { width: 14px; height: 14px; stroke-width: 2.4; }
.mk-empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 20px; }
.mk-empty > .mk-ic { width: 44px; height: 44px; color: var(--gold); } .mk-empty h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: .6rem 0 .3rem; } .mk-empty p { max-width: 44ch; margin: 0 auto 1.2rem; }
.mk-none { text-align: center; padding: 2rem 0; }
/* a business */
.mk-back { display: inline-block; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; margin: .3rem 0 .6rem; }
.mk-flag { background: var(--live-soft); color: var(--live); border-radius: 12px; padding: .6rem .9rem; font-weight: 600; font-size: .9rem; margin-bottom: .8rem; }
.mk-cover { height: clamp(150px, 34vw, 280px); border-radius: 22px; background: linear-gradient(135deg, #0b3d57, #052e43 60%, #1b4d6a) center / cover; }
.mk-head { display: flex; flex-direction: column; gap: .7rem; align-items: flex-start; padding: 0 .4rem; margin-top: -46px; position: relative; }
.mk-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 5.5vw, 2.5rem); line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .2rem; }
.mk-tagline { margin: 0 0 .3rem; color: var(--ink-2); font-size: 1.02rem; }
.mk-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: .5rem; margin: 1.3rem 0 .4rem; }
.mk-act { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .75rem .3rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); text-decoration: none; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; min-height: 64px; }
.mk-act:active { transform: scale(.96); } .mk-act .mk-ic { width: 22px; height: 22px; }
.mk-sec { margin: 1.6rem 0; }
.mk-sec h2 { display: flex; align-items: center; gap: .4rem; font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 .7rem; }
.mk-about { white-space: pre-line; line-height: 1.6; margin: 0; color: var(--ink); }
.mk-kosher-card { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); border-radius: 18px; padding: 1rem 1.1rem; }
.mk-kosher-card h2 { color: var(--ok); font-family: var(--font); font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; } .mk-kosher-card p { margin: 0 0 .7rem; white-space: pre-line; }
.mk-items { display: grid; gap: .6rem; }
.mk-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .85rem 1rem; }
.mk-item p { margin: .3rem 0 0; font-size: .92rem; line-height: 1.45; } .mk-price { color: var(--gold-text); font-weight: 700; white-space: nowrap; font-size: .92rem; }
.mk-contact { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.mk-contact > a, .mk-contact > div { display: flex; gap: .75rem; align-items: center; padding: .75rem .9rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.mk-contact .mk-ic { color: var(--accent); } .mk-contact small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.mk-owner { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: 1rem; border-radius: 16px; background: var(--surface-2); }
.mk-owner .danger { color: var(--live); }
.mk-foot { text-align: center; margin: 2rem 0 1rem; }
/* listing form */
.mk-form { display: flex; flex-direction: column; gap: 1rem; }
.mk-form section h3 { display: flex; align-items: center; gap: .4rem; margin: 0 0 .8rem; font-size: 1.05rem; } .mk-form section { display: flex; flex-direction: column; gap: .8rem; }
.mk-form section > .small.muted { margin: -.5rem 0 .2rem; }
.mk-req { margin-left: auto; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--live); background: var(--live-soft); padding: .2rem .5rem; border-radius: 999px; }
.mk-kosher-edit { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)) !important; } .mk-kosher-edit h3 .mk-ic { color: var(--ok); }
.mk-photos { display: flex; gap: 1rem; flex-wrap: wrap; }
.mk-up { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; } .mk-up-wide { flex: 1; min-width: 220px; }
.mk-up-prev.busy { opacity: .45; }
.mk-up-logo { width: 92px; height: 92px; border-radius: 22px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-2); }
.mk-up-logo img { width: 100%; height: 100%; object-fit: cover; } .mk-up-logo .mk-ic { width: 30px; height: 30px; }
.mk-up-cover { width: 100%; aspect-ratio: 16 / 7; border-radius: 14px; background: linear-gradient(135deg, #0b3d57, #052e43) center / cover; }
.mk-rows { display: flex; flex-direction: column; gap: .7rem; }
.mk-row { display: flex; flex-direction: column; gap: .5rem; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.mk-row-f { display: flex; gap: .5rem; } .mk-row-f .input:first-child { flex: 1; min-width: 0; } .mk-row-price { width: 38%; max-width: 170px; }
.mk-row-x { align-self: flex-end; color: var(--muted); }
.mk-seg { display: inline-flex; align-self: flex-start; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.mk-seg button { font: inherit; font-size: .8rem; font-weight: 600; border: 0; background: none; color: var(--ink-2); padding: .35rem .9rem; border-radius: 999px; cursor: pointer; min-height: 32px; }
.mk-seg button.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mk-save { position: sticky; bottom: calc(var(--player-h) + env(safe-area-inset-bottom) + 72px); display: flex; justify-content: center; padding: .4rem 0; }
.mk-save .btn { min-width: 220px; box-shadow: 0 10px 24px -10px rgba(31,58,95,.55); }
@media (min-width: 900px) { .mk-save { bottom: calc(var(--player-h) + 16px); } }
.mk-item.has-img { display: flex; gap: .9rem; align-items: flex-start; padding: .6rem; }
.mk-item-img { width: 88px; height: 88px; flex: none; border-radius: 11px; object-fit: cover; background: var(--surface-2); }
.mk-item-txt { flex: 1; min-width: 0; } .mk-item.has-img .mk-item-txt { padding-top: .25rem; }
.mk-row-img { flex-direction: row; align-items: center; gap: .7rem; }
.mk-up-item { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--line-2); } .mk-up-item:empty { display: none; }
.mk-up-item img { width: 100%; height: 100%; object-fit: cover; }
/* marketplace front page: header, featured banner, Products / Services / Businesses */
.mk-hero { margin: .5rem 0 1rem; align-items: center; }
.mk-hero h1 { font-size: clamp(2rem, 6vw, 2.6rem); margin: 0 0 .15rem; }
.mk-hero-act { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.mk-mine-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.mk-feat { margin: 0 0 1rem; }
.mk-feat-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; }
.mk-feat-track::-webkit-scrollbar { display: none; }
.mk-feat-card { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 9; max-height: 340px; background: linear-gradient(135deg, #0b3d57, #052e43) center / cover; color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; }
.mk-feat-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,20,30,0) 35%, rgba(5,20,30,.78) 100%); }
.mk-feat-label { position: absolute; top: .8rem; left: .8rem; background: rgba(255,253,248,.94); color: var(--gold-text); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; }
.mk-feat-txt { position: relative; display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem 1.1rem; }
.mk-feat-txt strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.55rem; line-height: 1.1; }
.mk-feat-txt span span { display: block; font-size: .9rem; opacity: .88; margin-top: .15rem; }
.mk-dots { display: flex; justify-content: center; gap: 6px; margin-top: .55rem; }
.mk-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .3s, background .3s; }
.mk-dots i.on { width: 18px; background: var(--accent); }
.mk-tools { display: flex; flex-direction: column; gap: .6rem; }
.mk-tabs { display: flex; width: 100%; } .mk-tabs button { flex: 1; min-height: 38px; font-size: .88rem; }
.mk-tabs button span { color: var(--muted); font-weight: 500; margin-left: .15rem; } .mk-tabs button.on span { color: var(--accent); opacity: .7; }
.mk-q { width: 100%; border-radius: 999px; padding-left: 1.1rem; }
.mk-chips { padding: 0; }
.mk-pane[hidden], .mk-prods > [hidden], .mk-svcs > [hidden] { display: none !important; }
.mk-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .9rem .8rem; }
.mk-prod { display: flex; flex-direction: column; gap: .15rem; color: var(--ink); text-decoration: none; min-width: 0; }
.mk-prod-img { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; margin-bottom: .35rem; box-shadow: var(--shadow); }
.mk-prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
@media (hover: hover) { .mk-prod:hover .mk-prod-img img { transform: scale(1.04); } }
.mk-prod:active .mk-prod-img { transform: scale(.98); }
.mk-prod strong { font-size: .95rem; line-height: 1.25; } .mk-prod .mk-price { font-size: .88rem; }
.mk-svcs { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.mk-svc { display: flex; align-items: center; gap: .8rem; padding: .8rem .95rem; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); min-height: 64px; }
.mk-svcs > .mk-svc:first-child, .mk-svcs > [hidden] + .mk-svc { border-top: 0; }
.mk-svc:active { background: var(--surface-2); }
.mk-svc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; } .mk-svc-txt strong { font-size: .97rem; }
.mk-svc .mk-price { font-size: .82rem; text-align: right; max-width: 34%; } .mk-chev { color: var(--line-2); font-size: 1.4rem; }
.mk-logo.sm2 { width: 42px; height: 42px; border-radius: 11px; } .mk-logo.sm2 b { font-size: .95rem; }
.mk-feat .mk-logo.sm2 { border: 2px solid rgba(255,255,255,.85); }
.mk-svc { align-items: flex-start; padding: .9rem .95rem; } .mk-svc .mk-chev { align-self: center; }
.mk-svc-list { color: var(--ink-2); font-size: .86rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-svc-txt .mk-meta { margin-top: .1rem; }
.mk-he { font-family: var(--hebrew); color: var(--gold); font-size: .62em; font-weight: 500; letter-spacing: 0; margin-left: .25rem; vertical-align: .12em; }
.mk-agency { font-weight: 700; font-size: 1.15rem; color: var(--ink); margin: 0 0 .25rem !important; }
.mk-kosher-edit select + .input { display: block; }
/* the Shuk: approvals */
.mk-flag.pend { background: var(--gold-soft); color: var(--gold-text); font-weight: 500; } .mk-flag strong { font-weight: 700; }
.mk-st { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 999px; margin-bottom: .3rem; }
.mk-st.pend { background: var(--gold-soft); color: var(--gold-text); } .mk-st.no { background: var(--live-soft); color: var(--live); text-transform: none; letter-spacing: 0; font-size: .78rem; } .mk-st.ok { background: var(--accent-soft); color: var(--accent); }
.mk-review-link { color: var(--gold-text); font-weight: 700; text-decoration: none; } .mk-review-link b { background: var(--live); color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .75rem; }
.mk-rv { padding: 1rem; margin-bottom: 1rem; transition: opacity .3s, transform .3s; } .mk-rv p { margin: .5rem 0; }
.mk-rv-head { display: flex; gap: .75rem; align-items: center; } .mk-rv-head > div { flex: 1; min-width: 0; } .mk-rv-head .mk-st { margin: 0; }
.mk-rv-cover { aspect-ratio: 16 / 6; border-radius: 12px; background: center / cover; margin-top: .8rem; }
.mk-rv-k { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--ok); } .mk-rv-k b { color: var(--ink); }
.mk-rv-contact { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .85rem; color: var(--ink-2); } .mk-rv-contact span { display: inline-flex; gap: .3rem; align-items: center; } .mk-rv-contact .mk-ic { width: 15px; height: 15px; }
.mk-rv-items { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; }
.mk-rv-item { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: opacity .3s; }
.mk-rv-item img { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; flex: none; } .mk-rv-item > div:not(.mk-rv-btns) { flex: 1; min-width: 0; } .mk-rv-item strong { display: block; } .mk-rv-item p { margin: .2rem 0 0; font-size: .86rem; }
.mk-rv-btns { display: flex; gap: .4rem; flex-wrap: wrap; } .mk-rv-main { justify-content: flex-end; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.mk-rv-done { opacity: 0; transform: scale(.98); }
.mk-rv-item { flex-wrap: wrap; } .mk-rv-item .mk-rv-btns { width: 100%; justify-content: flex-end; }
@media (max-width: 640px) { .mk-hero-act { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; } }
.mk-rv-note { color: var(--ok); margin-top: .4rem !important; }

/* More panel: never taller than the screen (the account row at the top stayed under the status bar); scrolls inside instead */
@media (max-width: 899px) {
  .more-panel { max-height: calc(100dvh - 70px - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 14px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .more-grid a { padding: .55rem .2rem; gap: .38rem; }
  .more-rows a, .more-rows button { padding: .65rem .5rem; }
}
.more-sheet.open ~ .np-card, body:has(.more-sheet.open) .np-card { display: none !important; }
/* A rabbi's series: a shelf of album covers */
.sr-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 172px); gap: 1rem; overflow-x: auto; scroll-snap-type: x proximity; padding: .2rem 0 .6rem; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.sr-shelf::-webkit-scrollbar { display: none; }
.sr-card { display: flex; flex-direction: column; gap: .2rem; color: var(--ink); text-decoration: none; scroll-snap-align: start; min-width: 0; }
.sr-card strong { font-size: .95rem; line-height: 1.25; margin-top: .45rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-card:active .sr-cover { transform: scale(.97); }
.sr-cover { aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: block; box-shadow: 0 14px 28px -16px rgba(5,46,67,.6); transition: transform .2s; }
.sr-cover img { width: 100%; height: 100%; object-fit: cover; }
.sr-type { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: .35rem; padding: .9rem; color: #f4efe4; background: radial-gradient(120% 90% at 85% 0%, #1b5a7c 0%, #0b3d57 45%, #052e43 100%); }
.sr-type.t1 { background: radial-gradient(120% 90% at 85% 0%, #3a4f73 0%, #1f2f4a 50%, #141e33 100%); }
.sr-type.t2 { background: radial-gradient(120% 90% at 85% 0%, #5d4a2c 0%, #3a2d1a 50%, #241b10 100%); }
.sr-type::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(227,192,110,.35); border-radius: 9px; pointer-events: none; }
.sr-rule { width: 26px; height: 2px; background: #e3c06e; border-radius: 2px; }
.sr-type b { font-family: var(--display); font-weight: 400; font-size: 1.12rem; line-height: 1.12; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sr-type small { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: #e3c06e; font-weight: 700; }
@media (min-width: 900px) { .sr-shelf { margin: 0; padding-inline: 0; grid-auto-columns: 190px; } }
.sr-shelf { margin: 0; padding-inline: 0; }
@media (max-width: 640px) { .rabbi-acts { flex-wrap: nowrap; gap: .5rem; } .rabbi-acts .btn { padding-inline: .9rem; white-space: nowrap; } }
.rabbi-search { position: relative; margin: 0 0 1rem; }
.rabbi-search svg { position: absolute; left: 1rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.rabbi-search .input { width: 100%; border-radius: 999px; padding-left: 2.6rem; }
.rabbi-search { margin: .2rem 0 1.4rem; } [data-rabbi-extra][hidden] { display: none; }
