:root {
  --green: #3b6f3d;
  --green-2: #4e8b50;
  --purple: #2b0445;
  --navy: #061953;
  --bg: #0c0911;
  --bg-elev: rgba(24, 19, 31, 0.94);
  --bg-elev-solid: #18131f;
  --bg-elev-2: rgba(34, 27, 44, 0.96);
  --bg-elev-2-solid: #221b2c;
  --text: #f4f1ec;
  --muted: #a39bb2;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 16px 36px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3), 0 28px 64px -16px rgba(0, 0, 0, 0.65);
  --ring: 0 0 0 3px color-mix(in srgb, var(--green-2) 32%, transparent);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --t-hero: clamp(2.6rem, 5.6vw, 4.6rem);
  --t-page: clamp(1.7rem, 2.4vw, 2.15rem);
  --t-section: 1.45rem;
  --t-card: 1rem;
  --t-meta: 0.84rem;
  --danger: #e26252;
  --ok: #8fbf7d;
  --warning: #f0be5e;
  --green-ink: #ffffff;
  --sans: "Rubik", "Segoe UI", sans-serif;
  --display: "Frank Ruhl Libre", "David", serif;
  --hebrew: "Rubik", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sidebar: 256px;
  --radius: 18px;
  --player: 0px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-elev: rgba(255, 255, 255, 0.97);
  --bg-elev-solid: #ffffff;
  --bg-elev-2: rgba(240, 235, 227, 0.97);
  --bg-elev-2-solid: #f0ebe3;
  --text: #1c1424;
  --muted: #685d76;
  --line: rgba(28, 20, 36, 0.085);
  --line-strong: rgba(28, 20, 36, 0.15);
  --shadow-sm: 0 1px 2px rgba(28, 20, 36, 0.05), 0 3px 10px rgba(28, 20, 36, 0.05);
  --shadow: 0 2px 6px rgba(28, 20, 36, 0.05), 0 14px 32px -12px rgba(28, 20, 36, 0.14);
  --shadow-lg: 0 4px 12px rgba(28, 20, 36, 0.07), 0 26px 60px -16px rgba(28, 20, 36, 0.22);
  color-scheme: light;
}

.viewer, .reel-show {
  --bg: #0c0911;
  --bg-elev: rgba(24, 19, 31, 0.94);
  --bg-elev-solid: #18131f;
  --bg-elev-2: rgba(34, 27, 44, 0.96);
  --bg-elev-2-solid: #221b2c;
  --text: #f4f1ec;
  --muted: #a39bb2;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* The soft glow at the top stays put while the page scrolls. It is its own fixed layer: a
   fixed background on the body made the browser repaint the whole page on every bit of
   scrolling, which on long picture pages stopped a swipe from gliding on. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1200px 560px at 0% -12%, color-mix(in srgb, var(--purple) 38%, transparent), transparent 70%);
}
html[data-theme="light"] body::before {
  background: radial-gradient(1200px 560px at 0% -12%, color-mix(in srgb, var(--purple) 7%, transparent), transparent 70%);
}
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
bdi, .ltr-run { unicode-bidi: isolate; }

img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
::selection { background: var(--green); color: var(--green-ink); }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* Custom Sleek Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(29, 18, 38, 0.16); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(29, 18, 38, 0.28); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -48px; background: var(--green); color: var(--green-ink);
  padding: 8px 16px; border-radius: 999px; z-index: 80; font-weight: 600;
  box-shadow: var(--shadow-sm); transition: top 0.2s var(--ease);
}
.skip:focus { top: 14px; }

/* Main Shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }

/* Sidebar */
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 20px 14px 14px;
  background:
    radial-gradient(280px 220px at 100% 0%, color-mix(in srgb, var(--green-2) 20%, transparent), transparent 70%),
    radial-gradient(320px 280px at 0% 100%, color-mix(in srgb, var(--navy) 55%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--purple) 94%, var(--navy)) 0%, color-mix(in srgb, var(--purple) 72%, #07030c) 100%);
  border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
  color: #f4f1ec; display: flex; flex-direction: column; gap: 10px;
}
.side-top { display: flex; align-items: center; gap: 8px; padding: 0 2px 8px; }
.side-fold {
  margin-inline-start: auto; width: 36px; height: 36px; flex: none;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-sm); color: rgba(244, 241, 236, 0.82);
  background: rgba(255, 255, 255, 0.05); display: grid; place-items: center;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.side-fold:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.side-fold svg { width: 18px; height: 18px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 4px; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35)); transition: transform 0.5s var(--spring); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.brand strong, .brand em {
  display: block; font-family: var(--display); font-style: normal; font-weight: 800; line-height: 1.15;
}
.brand span { min-width: 0; }
.brand strong { font-size: 0.98rem; letter-spacing: 0; }
.brand em { font-size: 0.78rem; opacity: 0.7; font-weight: 500; }

.side-nav {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 2px 0 8px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
}
.side-nav::-webkit-scrollbar { display: none; }
.side-group { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.side-group .side-label { margin: 0 12px 6px; }
.side-nav a { z-index: 1; }
/* The open page's link sits on one soft highlight that glides between links. */
.side-glow {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none;
  width: var(--glow-w, 0); height: var(--glow-h, 0); border-radius: var(--r-md);
  transform: translate(var(--glow-x, 0), var(--glow-y, 0));
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.15));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  opacity: 0; transition: transform 0.5s var(--ease), height 0.3s var(--ease), width 0.3s var(--ease), opacity 0.3s;
}
.side-glow.is-on { opacity: 1; }
.side-glow::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px;
  background: var(--green-2); box-shadow: 0 0 12px color-mix(in srgb, var(--green-2) 80%, transparent);
}
.side-nav:has(.side-glow.is-on) a.active { background: transparent; }
.side-nav:has(.side-glow.is-on) a.active::before { display: none; }
.side-admin { flex: none; }
.side-admin .side-label { margin-top: 8px; }
.side-nav a, .side-admin a, .sheet a, .tabbar a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--r-sm);
  font-weight: 500; font-size: 0.93rem; transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.side-nav a svg, .icon-btn svg, .tabbar svg, .btn svg, .mini-tools svg, .mini-actions svg { width: 18px; height: 18px; flex: none; }
.side-nav a, .side-admin a { position: relative; color: rgba(244, 241, 236, 0.78); }
.side-nav a svg, .side-admin a svg { width: 20px; height: 20px; opacity: 0.85; transition: transform 0.3s var(--spring), opacity 0.2s; }
.side-nav a:hover svg, .side-admin a:hover svg { transform: scale(1.12); opacity: 1; }
.side-nav a:hover, .side-admin a:hover { background: rgba(255, 255, 255, 0.07); color: #ffffff; }
.side-nav a.active, .side-admin a.active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff; font-weight: 600;
}
.side-nav a.active svg, .side-admin a.active svg { color: color-mix(in srgb, var(--green-2) 70%, #ffffff); opacity: 1; }
.side-nav a.active::before, .side-admin a.active::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 3px; background: var(--green-2); animation: nav-mark 0.4s var(--ease) both;
}
@keyframes nav-mark { from { transform: scaleY(0); opacity: 0; } }

.shell.is-thin { --sidebar: 88px; }
.shell.is-thin .sidebar { padding: 18px 10px 14px; align-items: center; }
.shell.is-thin .side-top { flex-direction: column; width: 100%; gap: 12px; }
.shell.is-thin .side-fold { margin-inline-start: 0; }
.shell.is-thin .brand { padding: 0; justify-content: center; }
.shell.is-thin .brand span,
.shell.is-thin .side-nav a span,
.shell.is-thin .side-admin a span,
.shell.is-thin .side-label { display: none; }
.shell.is-thin .side-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); width: 100%; align-items: center; }
.shell.is-thin .side-who { display: none; }
.shell.is-thin .brand img { width: 42px; height: 42px; }
.shell.is-thin .side-nav { width: 100%; align-items: center; }
.shell.is-thin .side-nav a, .shell.is-thin .side-admin a { justify-content: center; width: 48px; min-height: 48px; padding: 0; border-radius: var(--r-md); }
.shell.is-thin .side-admin { display: flex; justify-content: center; width: 100%; }
.shell.is-thin .side-nav a.active::before, .shell.is-thin .side-admin a.active::before { top: 14px; bottom: 14px; }
.shell.is-thin .side-foot { justify-content: center; padding: 0; width: 100%; }
.shell.is-thin .side-account { width: auto; padding: 0; justify-content: center; }

.side-label {
  margin: 20px 12px 6px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.5;
}
.side-foot { position: relative; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.side-account {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: var(--r-md); padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04); color: inherit; text-align: start;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.side-account:hover, .side-account[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.08);
}
.side-who { min-width: 0; }
.side-who strong { display: block; font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu {
  position: fixed; z-index: 90; min-width: 232px; padding: 6px; border-radius: var(--r-lg);
  background: var(--bg-elev-solid); color: var(--text); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-strong);
  animation: menu-pop 0.16s var(--ease);
}
.account-menu[hidden] { display: none; }
.account-menu a, .account-menu button:not(.face-choice) {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px;
  padding: 0 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; text-align: start;
  font-weight: 500; font-size: 0.9rem; transition: background 0.14s var(--ease);
}
.account-menu a:hover, .account-menu button:not(.face-choice):hover { background: var(--bg-elev-2); }
.account-menu #logout { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.menu-account {
  display: flex; align-items: center; gap: 10px; flex: none; max-width: 230px;
  border: 1px solid transparent; background: transparent; color: inherit; padding: 4px; padding-inline-end: 14px;
  border-radius: 999px; cursor: pointer; transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.menu-account:hover { background: var(--bg-elev); border-color: var(--line); }
.menu-account strong {
  font-family: var(--hebrew); font-size: 0.92rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-who {
  display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; margin-bottom: 6px;
  font-family: var(--hebrew); font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--line);
}
.tabbar .avatar { width: 26px; height: 26px; font-size: 0.72rem; box-shadow: none; }
.account-menu svg { width: 18px; height: 18px; flex: none; color: var(--muted); }

/* Top Actions */
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.upload-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding-inline: 5px 16px;
  border-radius: 14px; color: #f7f3ea; font-weight: 600; white-space: nowrap; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #1c4a9a 0%, #061953 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 14px rgba(6, 25, 83, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.upload-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.14);
}
.upload-btn svg { width: 20px; height: 20px; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.upload-btn:hover {
  background: linear-gradient(180deg, #2a5cb8 0%, #0c2674 100%);
  transform: translateY(-1px); box-shadow: 0 8px 20px rgba(6, 25, 83, 0.4);
}
.upload-btn:active { transform: translateY(0); }

.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: var(--green); color: var(--green-ink);
  font-weight: 650; font-size: 0.92rem; border: 2px solid color-mix(in srgb, var(--green-2) 55%, transparent);
  flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-foot small { display: block; color: rgba(247, 243, 236, 0.65); font-size: 0.78rem; margin-top: 1px; }
.face-pick { min-width: 0; display: grid; gap: 8px; margin: 4px 0 16px; }
.face-pick[hidden] { display: none; }
.face-pick-row { grid-auto-columns: 96px; gap: 12px; }
.face-choice {
  border: 0; background: transparent; color: inherit; padding: 0; text-align: center; cursor: pointer;
}
.face-choice img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto; }
.face-choice.is-on img { outline: 3px solid var(--green-2); outline-offset: 3px; }
.face-choice strong { display: block; margin-top: 6px; font-size: 0.82rem; font-weight: 560; }

/* Main Content Area */
.main { min-width: 0; padding: 18px clamp(18px, 3vw, 40px) 56px; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  margin: -18px calc(-1 * clamp(18px, 3vw, 40px)) 14px; padding: 12px clamp(18px, 3vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.topbar.is-scrolled { box-shadow: 0 10px 30px -18px rgba(12, 6, 20, 0.45); background: color-mix(in srgb, var(--bg) 90%, transparent); }

/* Search Bar */
.search {
  position: relative; flex: 1; display: flex; align-items: center; height: 44px; padding: 0 18px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 999px; min-width: 0; max-width: 720px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.search:hover { border-color: var(--line-strong); }
.search:focus-within { border-color: var(--green-2); box-shadow: var(--ring); }
.search input { width: 100%; border: 0; background: transparent; outline: none; font-size: 0.95rem; font-weight: 450; }
.search input::placeholder { color: var(--muted); opacity: 0.85; }

/* Search Suggestions */
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
  background: var(--bg-elev-solid); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 8px; max-height: min(72vh, 660px); overflow-y: auto;
  min-width: min(580px, 94vw); border: 1px solid var(--line-strong);
  animation: menu-pop 0.16s var(--ease);
}
.search-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin: 8px 0 20px;
}
.search-shot { display: block; min-width: 0; color: inherit; transition: transform 0.2s var(--ease); }
.search-shot:hover { transform: translateY(-2px); }
.search-shot img, .search-file {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md);
  background: var(--bg-elev-2-solid); display: block; border: 1px solid var(--line);
}
.search-file { display: grid; place-items: center; color: var(--muted); font-size: 1.6rem; }
.search-shot span {
  display: block; margin-top: 6px; font-size: 0.82rem; line-height: 1.25;
  max-height: 2.5em; overflow: hidden; font-weight: 500;
}
.suggest a.search-shot { display: block; padding: 0; }
.suggest a.search-shot:hover { background: transparent; }
.suggest .search-grid { margin: 6px 0 10px; }
.suggest[hidden] { display: none; }
.suggest a, .name-list a {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 10px 12px; border-radius: var(--r-sm); transition: background 0.14s var(--ease);
}
.suggest a:hover, .name-list a:hover { background: var(--bg-elev-2); }
.suggest strong, .name-list strong { font-family: var(--hebrew); font-weight: 600; font-size: 1rem; unicode-bidi: plaintext; }
.suggest small, .name-list span, .suggest-empty { color: var(--muted); font-size: var(--t-meta); }
.suggest-label { padding: 10px 12px 4px; font-size: 0.7rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.suggest-all { color: var(--green-2) !important; font-weight: 600; }
.name-list { display: grid; gap: 4px; margin-bottom: 18px; }

/* Mini Player — sits at the bottom of the menu, on the right */
.shell:has(.mini-player:not([hidden])) .sidebar { padding-bottom: 228px; }
.shell.is-thin:has(.mini-player:not([hidden])) .sidebar { padding-bottom: 210px; }
.shell.is-thin .mini-player .player-info,
.shell.is-thin .mini-player .soundwave,
.shell.is-thin .mini-player .mini-tools { display: none; }
.shell.is-thin .mini-player .player-controls { flex-direction: column; }
.mini-player {
  position: fixed; right: 10px; bottom: 10px; left: auto; z-index: 47;
  width: calc(var(--sidebar) - 20px); height: auto; border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-elev-solid);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-strong);
  color: var(--text); display: flex; flex-direction: column; align-items: center;
  padding: 14px 12px 12px; gap: 8px; text-align: center;
  transition: width 0.35s var(--ease), border-radius 0.35s var(--ease);
}
.mini-player[hidden] { display: none !important; }
.mini-player.is-tucked {
  width: 68px; height: 68px; border-radius: 50%; cursor: pointer; padding: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 2px rgba(255, 255, 255, 0.25);
  display: grid; place-items: center;
}
.mini-player.is-tucked .player-info,
.mini-player.is-tucked .player-controls,
.mini-player.is-tucked .mini-progress,
.mini-player.is-tucked .mini-tools [data-act="hide"] { display: none; }
.mini-player.is-tucked .player-disc-wrap { width: 100%; height: 100%; }
.mini-player.is-tucked .player-disc { width: 100%; height: 100%; border-radius: 50%; }

/* Vinyl Disc */
.player-disc-wrap { position: relative; width: 56px; height: 56px; flex: none; }
.player-disc {
  width: 100%; height: 100%; border-radius: 50%; background: var(--purple) center / cover no-repeat;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.18);
  animation: spin 8s linear infinite; animation-play-state: paused;
}
.mini-player.is-playing .player-disc { animation-play-state: running; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Player Info */
.player-info { width: 100%; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.player-info strong {
  display: block; max-width: 100%; font-family: var(--hebrew); font-weight: 600; font-size: 0.94rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-info span {
  display: block; font-size: 0.8rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Soundwave Animation */
.soundwave { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 14px; margin-top: 4px; }
.soundwave span {
  width: 3px; height: 4px; border-radius: 99px;
  background: var(--green-2); transition: height 0.2s ease;
}
.soundwave.is-active span:nth-child(1) { animation: wave 0.8s ease-in-out infinite; }
.soundwave.is-active span:nth-child(2) { animation: wave 0.9s ease-in-out infinite 0.15s; }
.soundwave.is-active span:nth-child(3) { animation: wave 0.7s ease-in-out infinite 0.3s; }
.soundwave.is-active span:nth-child(4) { animation: wave 1s ease-in-out infinite 0.2s; }
.soundwave.is-active span:nth-child(5) { animation: wave 0.85s ease-in-out infinite 0.1s; }
@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* Controls */
.player-controls { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; direction: ltr; }
.player-btn {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; display: grid; place-items: center;
  transition: all 0.18s var(--ease);
}
.player-btn svg { width: 18px; height: 18px; }
.player-btn:hover { background: var(--bg-elev-2); }
.player-btn.player-mix { width: 32px; height: 32px; color: var(--muted, inherit); }
.player-btn.player-mix svg { width: 16px; height: 16px; }
.player-btn.player-mix.is-on { color: var(--green); }
.shell.is-thin .mini-player .player-mix { display: none; }
.player-btn.player-play {
  width: 42px; height: 42px; background: var(--green);
  color: var(--green-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--green) 40%, transparent);
}
.player-btn.player-play:hover { background: var(--green-2); transform: scale(1.05); }

/* Tools */
.mini-tools { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; }
.mini-tools button {
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); display: grid; place-items: center;
  transition: all 0.18s;
}
.mini-tools button:hover { background: var(--bg-elev-2); color: var(--text); }
.mini-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--line); cursor: pointer;
}
.mini-progress span {
  display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--green-2));
}

/* People Section */
.people-section { margin: 36px 0 44px; }
.people-section h2 { font-family: var(--display); font-weight: 700; font-size: var(--t-section); margin: 0 0 18px; letter-spacing: -0.01em; }
.box-order { display: block; margin: 0 0 10px; }
.box-order input {
  width: 72px; font-family: var(--sans); font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums;
  text-align: center; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg-elev-2); padding: 6px;
}
.box-order input:focus { outline: none; border-color: var(--green-2); box-shadow: var(--ring); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 24px 14px; }
.person-hero {
  display: flex; align-items: center; gap: 24px; margin-bottom: 28px; padding: 22px;
  border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--line);
}
.person-hero img, .person-hero .person-fallback { width: 120px; height: 120px; margin: 0; }
.box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.box-edit {
  display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.box-edit:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.box-edit[hidden] { display: none; }
.box-face {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--bg-elev-2-solid);
  display: grid; place-items: center; color: var(--muted); font-family: var(--hebrew); font-size: 1.5rem;
  border: 2px solid var(--line-strong);
}
.box-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Photo Picker Popup */
.picker-pop {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(6, 4, 12, 0.62); padding: 20px; backdrop-filter: blur(6px);
}
.picker-pop[hidden] { display: none; }
.picker-pop .panel {
  width: min(600px, 100%); max-height: min(84vh, 760px); overflow-y: auto;
  background: var(--bg-elev-solid);
  border-radius: var(--r-xl); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  animation: menu-pop 0.18s var(--ease);
}
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin: 14px 0; }
.cover-results { max-height: 480px; overflow-y: auto; padding: 4px; }
.cover-results .pick-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.pick-back { margin: 10px 0; }
.pick {
  border: 0; background: transparent; text-align: start; color: inherit; padding: 0; border-radius: 14px;
  transition: transform 0.2s var(--ease);
}
.pick:hover { transform: translateY(-2px); }
.pick:hover img, .pick:hover .pick-blank, .pick:focus-visible img, .pick:focus-visible .pick-blank {
  outline: 3px solid var(--green-2); outline-offset: 3px;
}
.pick img, .pick-blank {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md);
  background: var(--bg-elev-2-solid); display: block; border: 1px solid var(--line);
}
.pick > .pick-blank { display: grid; place-items: center; margin-top: 0; color: var(--muted); font-size: 1.5rem; }
.pick.is-folder img, .pick.is-folder .pick-blank, .pick.is-on img, .pick.is-on .pick-blank {
  box-shadow: inset 0 0 0 3px var(--green), var(--shadow-sm);
}
.pick span { display: block; margin-top: 6px; font-size: 0.82rem; word-break: break-word; font-weight: 500; }

/* Artist & Music Blocks */
.artist-block { margin: 12px 0 36px; }
.artist-block h2 { font-family: var(--display); font-weight: 700; font-size: var(--t-section); margin: 0 0 18px; letter-spacing: -0.01em; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 20px; }
.album { display: block; color: inherit; perspective: 900px; border-radius: var(--r-md); }
.album-cover {
  position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--purple) 85%, #ffffff 6%), color-mix(in srgb, var(--navy) 80%, #000000));
  display: grid; place-items: center; box-shadow: var(--shadow);
  border: 0; outline: 1px solid var(--line); outline-offset: -1px;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.album:hover .album-cover {
  box-shadow: var(--shadow-lg);
  transform: rotateX(3deg) translateY(-3px);
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-cover span { font-family: var(--hebrew); font-weight: 700; font-size: 3rem; color: rgba(247, 243, 236, 0.85); }
.playlist-face { width: 172px; margin-bottom: 18px; }

/* Download Lines */
.dl-line {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); border-radius: var(--r-sm);
  transition: background 0.15s;
}
.dl-line:hover { background: var(--bg-elev); }
.dl-line input { width: 22px; height: 22px; flex: none; accent-color: var(--green); cursor: pointer; }
.dl-line.is-on { background: color-mix(in srgb, var(--green) 16%, transparent); }
.dl-all { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-weight: 550; }
.dl-line img { width: 68px; height: 50px; object-fit: cover; border-radius: 12px; background: var(--bg-elev-2); flex: none; border: 1px solid var(--line); }
.dl-line strong, .dl-line a { min-width: 0; font-weight: 550; }
.dl-line .quiet { margin-inline-start: auto; }
.dl-hint { margin: 4px 0 0; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dl-tile {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 14px; cursor: pointer;
  background: var(--bg-elev-2); border: 2px solid transparent; transition: border-color 0.15s var(--ease), transform 0.12s var(--ease);
}
.dl-tile input { position: absolute; opacity: 0; pointer-events: none; }
.dl-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.15s var(--ease); }
.dl-tile-check {
  position: absolute; top: 8px; inset-inline-start: 8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); border: 2px solid #fff; color: transparent;
}
.dl-tile-check svg { width: 16px; height: 16px; stroke-width: 3; }
.dl-tile-play { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); color: #fff; }
.dl-tile-play svg { width: 14px; height: 14px; fill: currentColor; }
.dl-tile-name {
  position: absolute; inset-inline: 0; bottom: 0; padding: 18px 8px 6px; font-size: 0.75rem; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dl-tile.is-on { border-color: var(--green-2); }
.dl-tile.is-on img { transform: scale(0.9); border-radius: 10px; }
.dl-tile.is-on .dl-tile-check { background: var(--green); color: var(--green-ink); border-color: var(--green-2); }
.dl-tile:has(input:focus-visible) { outline: 2px solid var(--green-2); outline-offset: 2px; }
.dl-pickbar {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 10px 12px; border-radius: 999px; background: var(--bg-elev-solid);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
}
.dl-pickbar[hidden] { display: none; }
.dl-pickbar strong { margin-inline-end: auto; padding-inline-start: 6px; }
@media (max-width: 600px) {
  .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .dl-tile { border-radius: 10px; }
  .dl-tile-name { display: none; }
}
.dl-job {
  position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 14px;
  margin-top: 20px; padding: 14px 18px; border-radius: var(--r-lg);
  background: var(--bg-elev-solid); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-strong);
}
.dl-job[hidden] { display: none; }
.dl-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--bg-elev-2); overflow: hidden; }
.dl-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--green-2)); border-radius: inherit; }

.album h3 {
  font-family: var(--hebrew); font-weight: 600; font-size: var(--t-card); margin: 12px 0 0; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.album p, .music-artist { margin: 3px 0 0; color: var(--muted); font-size: var(--t-meta); }
.album.is-on .album-cover { outline: 2px solid var(--green-2); outline-offset: 3px; }

/* Rails & Carousels */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 248px); gap: 20px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 8px 4px 18px; scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.feature-card h3, .feature-card p, .artist-pill strong, .album h3, .album p, .person-card h3, .song strong, .pic-caption, .mini-shade strong, .mini-shade span {
  unicode-bidi: plaintext;
}
.feature-art { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; }
button.feature-art { width: 100%; border: 0; padding: 0; background: transparent; color: inherit; text-align: start; cursor: pointer; }
.feature-card { min-width: 0; }
.feature-card h3 {
  font-family: var(--hebrew); font-weight: 600; font-size: var(--t-card); line-height: 1.3; margin: 12px 0 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feature-card p { margin: 3px 0 0; color: var(--muted); font-family: var(--hebrew); font-size: var(--t-meta); }
.feature-card .album-cover { transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.feature-card:hover .album-cover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Floating Play Buttons */
.feature-play {
  position: absolute; inset-inline-end: 12px; bottom: 12px; z-index: 2;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: var(--green-ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(6px); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), background 0.18s;
}
.feature-play svg { width: 20px; height: 20px; margin-left: 3px; }
.feature-card:hover .feature-play, .album:hover .feature-play, .playlist-face:hover .feature-play, .album-cover > .feature-play, .feature-play:focus-visible {
  opacity: 1; transform: none;
}
.feature-play:hover { background: var(--green-2); transform: scale(1.06) !important; }

.rail-nav { display: flex; gap: 6px; }
.rail-nav button {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--bg-elev); color: inherit; display: grid; place-items: center;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.rail-nav button:hover { background: var(--bg-elev-2); border-color: var(--line-strong); }
.rail-nav svg { width: 16px; height: 16px; }

/* Artist Rail */
.artist-rail { grid-auto-columns: 136px; }
.artist-pill { display: grid; justify-items: center; gap: 10px; text-align: center; color: inherit; }
.artist-circle {
  width: 124px; height: 124px; border-radius: 50%; overflow: hidden; background: var(--purple);
  display: grid; place-items: center; box-shadow: var(--shadow);
  border: 2px solid var(--line); transition: border-color 0.2s, transform 0.25s var(--ease);
}
.artist-pill:hover .artist-circle { border-color: var(--green-2); transform: translateY(-3px); }
.artist-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artist-circle span { font-family: var(--hebrew); font-size: 2.4rem; color: #f7f3ec; }
.artist-pill strong { font-family: var(--hebrew); font-weight: 600; font-size: 0.94rem; }

.people-find { margin: 8px 0 6px; max-width: 440px; }
.person-card h3 { font-family: var(--hebrew); font-weight: 600; font-size: 0.95rem; line-height: 1.3; margin: 0; }
.person-card.is-slot { opacity: 0.62; }
.mini-progress { position: absolute; left: 12px; right: 12px; bottom: 8px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.25); z-index: 2; }
.mini-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: #ffffff; box-shadow: 0 0 8px #ffffff; }
@media (hover: none) { .feature-play { opacity: 1; transform: none; } }

/* Music Layout */
.music-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 44px; align-items: start; }
.music-now { position: sticky; top: 92px; }
.music-now h3 { font-family: var(--hebrew); font-weight: 700; font-size: 1.6rem; line-height: 1.2; margin: 8px 0 4px; unicode-bidi: plaintext; text-align: -webkit-match-parent; text-align: match-parent; }
.album-cover.large { margin-bottom: 18px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.music-controls { display: flex; align-items: center; gap: 8px; margin-top: 14px; direction: ltr; justify-content: flex-end; }
.music-controls button, .music-controls .music-dl { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; transition: background 0.18s, transform 0.18s; text-decoration: none; }
.music-controls button:hover, .music-controls .music-dl:hover { background: var(--bg-elev-2); }
.music-controls button.is-on { color: var(--green-2); background: color-mix(in srgb, var(--green) 16%, transparent); }
.music-controls .play-main {
  width: 54px; height: 54px; background: var(--green); color: var(--green-ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--green) 45%, transparent); border: 0;
}
.music-controls .play-main:hover { background: var(--green-2); transform: scale(1.05); }
.music-controls svg { width: 20px; height: 20px; }
.music-seek { background: var(--line-strong); margin: 14px 0 8px; height: 5px; border-radius: 99px; cursor: pointer; position: relative; transition: height 0.15s; }
.music-seek:hover { height: 7px; }
.music-seek span { background: var(--green-2); border-radius: inherit; height: 100%; display: block; }

.song-list { display: flex; flex-direction: column; gap: 1px; }
.song-row { display: flex; align-items: center; gap: 8px; border-radius: var(--r-sm); transition: background 0.15s; }
.song-row:hover { background: var(--bg-elev); }
.song-row .song { flex: 1; border-bottom: 0; }
.more-btn {
  width: 36px; height: 36px; border: 1px solid transparent; border-radius: 50%; flex: none;
  background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer;
  transition: all 0.2s var(--ease);
}
.more-btn svg { width: 18px; height: 18px; }
.more-btn:hover, .more-btn:focus-visible { background: var(--bg-elev-2); border-color: var(--line); transform: scale(1.06); }
.feature-line { display: flex; align-items: flex-start; gap: 4px; }
.feature-line > div { min-width: 0; flex: 1; }
.album-wrap { position: relative; }
.album-wrap .more-btn { position: absolute; inset-inline-end: 0; bottom: 14px; z-index: 2; }
.album-wrap .album h3, .album-wrap .album p { padding-inline-end: 34px; }

/* Playlist Menu */
.playlist-menu {
  position: fixed; z-index: 80; width: min(270px, calc(100vw - 20px)); max-height: 340px; overflow-y: auto;
  padding: 6px; border-radius: var(--r-lg); background: var(--bg-elev-solid);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: menu-pop 0.16s var(--ease);
}
.playlist-menu[hidden] { display: none; }
.playlist-menu p { margin: 6px 12px 8px; font-weight: 600; font-size: 0.8rem; color: var(--muted); }
.playlist-menu button {
  display: block; width: 100%; text-align: start; border: 0; background: transparent; color: inherit;
  padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; font-weight: 500;
  transition: background 0.14s var(--ease);
}
.playlist-menu button:hover, .playlist-menu button:focus-visible { background: var(--bg-elev-2); }
.playlist-menu .menu-split { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.playlist-menu .menu-danger { color: var(--danger, #c0392b); }
.orig-panel { display: grid; gap: 10px; margin-bottom: 22px; }
.orig-panel h3 { margin: 0; }
.orig-panel > input { max-width: 360px; }
.orig-list { display: grid; gap: 6px; max-height: 460px; overflow-y: auto; padding-inline-end: 4px; }
.orig-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg-elev-2);
}
.orig-row[hidden] { display: none; }
.orig-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.orig-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.orig-actions select { min-height: 38px; border-radius: var(--r-sm); }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 14px; }
.inline-form .field { flex: 1 1 240px; margin: 0; }
.name-list button {
  display: flex; justify-content: space-between; gap: 12px; width: 100%;
  border: 0; background: transparent; color: inherit; padding: 10px 14px; border-radius: 12px; text-align: start;
  transition: background 0.15s;
}
.name-list button:hover { background: var(--bg-elev-2); }

/* Song Rows */
.song {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: center;
  padding: 11px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: inherit; text-align: start; cursor: pointer; transition: background 0.15s; border-radius: 0;
}
.song > span:first-child { color: var(--muted); font-size: 0.86rem; font-variant-numeric: tabular-nums; text-align: center; }
.song strong { font-family: var(--hebrew); font-weight: 550; font-size: 1rem; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; text-align: -webkit-match-parent; text-align: match-parent; }
.song em { color: var(--muted); font-style: normal; font-size: 0.85rem; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.song:has(.song-art) { grid-template-columns: 44px 32px minmax(0, 1fr) auto; }
.song-art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: block; background: var(--bg-elev-2); }
.music-actions { margin: 4px 0 16px; gap: 10px; }
.singer-head { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.singer-head .page-title { margin: 4px 0; }
.artist-circle.large { width: 168px; height: 168px; flex: none; }
@media (max-width: 900px) {
  .artist-circle.large { width: 120px; height: 120px; }
  .singer-head { gap: 16px; }
}
.song:hover { background: var(--bg-elev); }
.song:hover strong, .song.is-on strong { color: var(--green-2); }
.song.is-on > span:first-child { color: var(--green-2); font-weight: 700; }

/* Buttons & System Icons */
.icon-btn, .btn, .btn-ghost, .btn-primary, .btn-danger {
  border: 0; border-radius: 999px; min-height: 40px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 500; font-size: 0.92rem; line-height: 1.2;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), transform 0.3s var(--spring), color 0.2s;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.icon-btn {
  width: 42px; height: 42px; min-height: 42px; padding: 0;
  background: var(--bg-elev); border: 1px solid var(--line);
  position: relative;
}
.icon-btn:hover { background: var(--bg-elev-2); border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.icon-btn svg { transition: transform 0.35s var(--spring); }
.icon-btn:hover svg { transform: scale(1.1); }
.btn-primary {
  background: linear-gradient(180deg, var(--green-2), var(--green));
  color: var(--green-ink); font-weight: 600; border: 1px solid color-mix(in srgb, var(--green-2) 60%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 4px 14px color-mix(in srgb, var(--green) 32%, transparent);
}
.btn-primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--green-2) 85%, #fff), var(--green-2)); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.24) inset, 0 8px 20px color-mix(in srgb, var(--green) 40%, transparent); }
.btn-ghost { background: var(--bg-elev); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--bg-elev-2); transform: translateY(-1px); }
.btn-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 20%, transparent); border-color: var(--danger); }

.dot {
  position: absolute; top: 9px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-2); box-shadow: 0 0 0 2px var(--bg-elev-solid);
}
.view { animation: rise 0.3s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Hero & Headings */
.eyebrow, .kicker {
  margin: 0 0 8px; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.wordmark {
  font-family: var(--display); font-weight: 900; font-size: var(--t-hero);
  line-height: 1.04; margin: 0; letter-spacing: -0.01em;
}
.wordmark[dir="ltr"] { font-family: var(--display); }
/* The name rises word by word (flair.js); the room below keeps letters like ן and ק whole. */
.wordmark .word { display: inline-block; overflow-x: visible; overflow-y: clip; vertical-align: bottom; padding: 0 0.08em 0.14em; margin: 0 -0.08em -0.14em; }
.wordmark .word > span { display: inline-block; will-change: transform; }
.fly-ghost { position: fixed; z-index: 45; object-fit: cover; pointer-events: none; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); will-change: left, top, width, height; }
.count-run { font-variant-numeric: tabular-nums; }
.greeting { font-family: var(--hebrew); font-size: 1.45rem; margin: 18px 0 6px; font-weight: 500; letter-spacing: 0; }
.quiet, .lede { color: var(--muted); line-height: 1.6; font-size: 0.93rem; }
/* Hero Grid */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  grid-template-areas: "copy show"; gap: 40px; align-items: center;
  padding: 18px 0 10px;
}
.hero-copy { grid-area: copy; }
.hero-print { grid-area: show; }
button.hero-print {
  display: block; width: 100%; border: 0; padding: 0; color: inherit; font: inherit;
  text-align: start; cursor: pointer; min-height: 0;
}
.hero-print {
  position: relative; border-radius: var(--r-xl); overflow: hidden; height: 430px;
  background: var(--purple); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}

/* Full Screen Reel */
.reel-show {
  position: fixed; inset: 0; z-index: 60; background: #07030b; color: #f7f3ec;
}
.reel-show img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #07030b;
}
.reel-caption {
  position: absolute; left: 88px; right: 88px; bottom: 24px; z-index: 2; text-align: center;
  margin: 0; font-size: 1rem; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.85); font-weight: 550;
}

.hero-print img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transform: translateX(100%); transition: none;
}
.hero-print img.is-show { transform: translateX(0); transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1; }
.hero-print img.is-leave { transform: translateX(-100%); transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1; }
.hero-print img.is-ready { transform: translateX(100%); transition: none; z-index: 2; }
.hero-mark img { position: static; transform: none; height: auto; transition: none; }
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; color: white; margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); font-size: 0.95rem; font-weight: 550; unicode-bidi: plaintext;
  background: linear-gradient(to top, rgba(6, 2, 10, 0.78) 0%, rgba(6, 2, 10, 0.35) 55%, transparent 100%);
  padding: 48px 22px 18px;
}
.hero-mark { min-height: 320px; display: grid; place-items: center; padding: 32px; }
.hero-mark img { width: min(240px, 70%); }

/* Shelves Navigation Carousel */
.shelves { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.shelves a {
  padding: 7px 16px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--muted); font-size: 0.88rem; font-weight: 500;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.3s var(--spring), box-shadow 0.2s;
}
.shelves a:hover { color: var(--text); background: var(--bg-elev-2); border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.rail-head, .section-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 14px; margin: 40px 0 16px; flex-wrap: wrap;
}
.column-search {
  display: flex; align-items: center; height: 36px; padding: 0 14px; margin-inline-start: auto;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 999px; min-width: 160px; flex: 0 1 230px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.column-search:hover { border-color: var(--line-strong); }
.column-search:focus-within { border-color: var(--green-2); box-shadow: var(--ring); }
.column-search input { width: 100%; border: 0; background: transparent; outline: none; font-size: 0.88rem; }
.column-search input::placeholder { color: var(--muted); }
.rail-head h2, .section-head h2 { font-family: var(--display); font-weight: 700; font-size: var(--t-section); margin: 0; letter-spacing: 0; line-height: 1.25; }
.page-title { font-family: var(--display); font-weight: 800; font-size: var(--t-page); margin: 0 0 6px; letter-spacing: 0; line-height: 1.2; }
.rail-head > a, .section-head > a { color: var(--muted); font-size: 0.88rem; font-weight: 600; transition: color 0.18s; }
.rail-head > a:hover, .section-head > a:hover { color: var(--green-2); }
.section-title { font-family: var(--display); font-weight: 700; font-size: var(--t-section); margin: 36px 0 14px; }

.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 23vw); gap: 18px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin;
}
.scroller.face-pick-row { grid-auto-columns: 96px; gap: 12px; }
.scroller > * { scroll-snap-align: start; }
.scroller.people { grid-auto-columns: 148px; }
.scroller.likes-line, .scroller.since-line { grid-auto-columns: 210px; align-items: start; }
.since-line .shot, .since-line .video-card { margin: 0; }
.since-line .shot img, .since-line .video-card img { width: 100%; height: 168px; object-fit: cover; aspect-ratio: auto; }
.like-slot[hidden] { display: none; }
.like-slot .shot, .like-slot .video-card { margin: 0; }
.like-slot .shot img, .like-slot .video-card img { width: 100%; height: 168px; object-fit: cover; }
/* Folder Cards */
.folder-card { display: block; border-radius: var(--r-lg); }
.collage {
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 3px; aspect-ratio: 16 / 11; border-radius: var(--r-lg);
  overflow: hidden; background: var(--bg-elev-2-solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.folder-card:hover .collage { box-shadow: var(--shadow); transform: translateY(-2px); }
.collage.single, .collage.empty { grid-template-columns: 1fr; }
.collage-main { position: relative; min-height: 0; }
.collage-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s var(--ease); }
.collage-main img.is-on { opacity: 1; }
.collage-side { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }
.collage-side img, .collage.single img { width: 100%; height: 100%; object-fit: cover; }
.collage.empty {
  display: grid; place-items: center; margin: 0; max-width: none;
  background:
    radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--green-2) 26%, transparent), transparent 60%),
    linear-gradient(150deg, color-mix(in srgb, var(--purple) 92%, #fff 4%), color-mix(in srgb, var(--navy) 85%, #000));
}
.collage.empty img { width: 42%; height: auto; margin: 0; }
html[data-theme="light"] .collage.empty {
  background:
    radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--green-2) 16%, transparent), transparent 60%),
    linear-gradient(150deg, color-mix(in srgb, var(--purple) 10%, var(--bg-elev-2-solid)), color-mix(in srgb, var(--navy) 8%, var(--bg-elev-2-solid)));
}
html[data-theme="light"] .collage-mark { color: color-mix(in srgb, var(--purple) 70%, var(--navy)); --duo: 0.12; }
.collage-mark { display: grid; place-items: center; width: 34%; aspect-ratio: 1; color: rgba(247, 243, 236, 0.86); --duo: 0.22; transition: transform 0.45s var(--spring); }
.collage-mark svg { width: 100%; height: 100%; }
.folder-card:hover .collage-mark { transform: scale(1.08) rotate(-4deg); }
.fresh-frame { position: relative; }
.fresh-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.fresh-frame img.is-show { opacity: 1; }
.folder-meta, .card-meta { padding: 12px 2px 0; }
.folder-meta h3, .card-meta h3 {
  margin: 0; font-family: var(--hebrew); font-size: var(--t-card); font-weight: 600; line-height: 1.3; unicode-bidi: plaintext;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.folder-meta p, .card-meta p { margin: 3px 0 0; color: var(--muted); font-size: var(--t-meta); }
.folder-card:hover img.is-on, .video-card:hover img { transform: scale(1.035); }
.collage img { transition: transform 0.7s var(--ease), opacity 1s var(--ease); }

/* Folder Grid */
.folders-head { align-items: center; }
.folders-count { color: var(--muted); font-size: var(--t-meta); font-weight: 550; font-variant-numeric: tabular-nums; }
.folder-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 16px; margin-top: 16px;
}
.folder-grid .folder-card {
  padding: 8px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); color: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.folder-grid .folder-card[hidden] { display: none; }
.folder-grid .folder-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.folder-grid .collage { aspect-ratio: 4 / 3; border-radius: var(--r-md); border: 0; box-shadow: none; }
.folder-grid .folder-card:hover .collage { transform: none; box-shadow: none; }
.folder-grid .collage.empty img { width: 30%; opacity: 0.55; filter: grayscale(0.4); }
.folder-grid .folder-meta { padding: 10px 6px 4px; }
.folder-grid .folder-meta h3 { font-size: 1.02rem; }
.folder-none { margin-top: 18px; }

.chat-page {
  display: flex; flex-direction: column; height: calc(100vh - 118px); max-width: 820px;
  margin-inline: auto; min-height: 420px; position: relative;
}
.chat-head { flex: none; padding-bottom: 8px; }
.chat-head .page-title { margin-bottom: 2px; }
.chat-head .quiet { margin: 0; }
.chat-log, .chat-wall-preview, .chat-swatch {
  background-color: #efeae2;
  background-image: radial-gradient(rgba(90, 70, 40, 0.09) 0.8px, transparent 0.8px);
  background-size: 16px 16px;
}
.chat-log[data-wall="plain"], .chat-wall-preview[data-wall="plain"], .chat-swatch[data-wall="plain"] { background: transparent; border: 1px dashed var(--line-strong); }
.chat-log[data-wall="linen"], .chat-wall-preview[data-wall="linen"], .chat-swatch[data-wall="linen"] {
  background-color: #e4efe3;
  background-image:
    repeating-linear-gradient(0deg, rgba(40, 70, 40, 0.05) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(40, 70, 40, 0.05) 0 1px, transparent 1px 8px);
}
.chat-log[data-wall="doodle"], .chat-wall-preview[data-wall="doodle"], .chat-swatch[data-wall="doodle"] {
  background-color: #efe6d4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%235a4630' stroke-opacity='.16' stroke-width='1.3'%3E%3Ccircle cx='28' cy='30' r='9'/%3E%3Cpath d='M78 20h22v16H78zM84 36v8M70 96c10-14 22-14 32 0'/%3E%3Ccircle cx='136' cy='48' r='7'/%3E%3Cpath d='M118 112h26l-13 18zM46 142h18M55 133v18M150 130c8 0 12 6 8 12'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.chat-log[data-wall="image"], .chat-wall-preview[data-wall="image"], .chat-swatch[data-wall="image"] {
  background-color: #1c1916;
  background-image: var(--chat-wall);
  background-size: cover;
  background-position: center;
}
html[data-theme="dark"] .chat-log,
html[data-theme="dark"] .chat-wall-preview,
html[data-theme="dark"] .chat-swatch {
  background-color: #0b141a;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 0.8px, transparent 0.8px);
}
html[data-theme="dark"] .chat-log[data-wall="plain"],
html[data-theme="dark"] .chat-wall-preview[data-wall="plain"],
html[data-theme="dark"] .chat-swatch[data-wall="plain"] { background: transparent; }
html[data-theme="dark"] .chat-log[data-wall="linen"],
html[data-theme="dark"] .chat-wall-preview[data-wall="linen"],
html[data-theme="dark"] .chat-swatch[data-wall="linen"] { background-color: #101a14; }
html[data-theme="dark"] .chat-log[data-wall="doodle"],
html[data-theme="dark"] .chat-wall-preview[data-wall="doodle"],
html[data-theme="dark"] .chat-swatch[data-wall="doodle"] {
  background-color: #0e1714;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1.3'%3E%3Ccircle cx='28' cy='30' r='9'/%3E%3Cpath d='M78 20h22v16H78zM84 36v8M70 96c10-14 22-14 32 0'/%3E%3Ccircle cx='136' cy='48' r='7'/%3E%3Cpath d='M118 112h26l-13 18zM46 142h18M55 133v18M150 130c8 0 12 6 8 12'/%3E%3C/svg%3E");
}
.chat-log {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 14px 12px 16px; border-radius: 18px;
}
.chat-empty { margin: auto; text-align: center; padding: 24px 12px; color: #3d3428; }
html[data-theme="dark"] .chat-empty { color: #d5ddd8; }
.chat-empty h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 600; }
.chat-day { display: flex; justify-content: center; margin: 6px 0 2px; }
.chat-day span {
  padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.82);
  color: #5c5348; font-size: 0.78rem; font-weight: 650; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .chat-day span { background: rgba(17, 27, 33, 0.82); color: #d1d7db; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; max-width: min(440px, 88%); }
.chat-row.mine { align-self: flex-end; }
.chat-row .avatar { width: 32px; height: 32px; flex: none; font-size: 0.82rem; }
.chat-bubble {
  min-width: 0; padding: 6px 8px 4px; border-radius: 16px 16px 6px 16px;
  background: #ffffff; color: #1c1424; box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}
.chat-row.mine .chat-bubble { background: #d9fdd3; color: #102116; border-radius: 16px 16px 16px 6px; }
html[data-theme="dark"] .chat-bubble { background: #202c33; color: #e9edef; }
html[data-theme="dark"] .chat-row.mine .chat-bubble { background: #005c4b; color: #e9edef; }
.chat-bubble p { margin: 2px 4px 2px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.chat-meta {
  display: flex; align-items: center; gap: 8px; margin-top: 2px; padding: 0 4px 1px;
}
.chat-meta strong { font-size: 0.78rem; font-weight: 700; }
.chat-meta time { margin-inline-start: auto; color: rgba(28, 20, 36, 0.55); font-size: 0.72rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chat-row.mine .chat-meta time { color: rgba(16, 33, 22, 0.58); }
.chat-row.mine .chat-meta strong { color: #0b6b43; }
html[data-theme="dark"] .chat-meta time,
html[data-theme="dark"] .chat-row.mine .chat-meta time { color: rgba(233, 237, 239, 0.62); }
html[data-theme="dark"] .chat-row.mine .chat-meta strong { color: #b7ebc8; }
.chat-who-0 { color: #1a6aa8; } .chat-who-1 { color: #c45c26; } .chat-who-2 { color: #6b3fa0; }
.chat-who-3 { color: #0f7a6c; } .chat-who-4 { color: #a33b55; } .chat-who-5 { color: #3d6b1e; }
html[data-theme="dark"] .chat-who-0 { color: #8ec5f0; } html[data-theme="dark"] .chat-who-1 { color: #f0b089; }
html[data-theme="dark"] .chat-who-2 { color: #d2b3f0; } html[data-theme="dark"] .chat-who-3 { color: #8ed9cc; }
html[data-theme="dark"] .chat-who-4 { color: #f0a8b8; } html[data-theme="dark"] .chat-who-5 { color: #b7d99a; }
.chat-remove {
  width: 22px; height: 22px; border: 0; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: transparent; color: inherit; opacity: 0;
}
.chat-row:hover .chat-remove, .chat-remove:focus-visible { opacity: 0.75; }
.chat-remove svg { width: 14px; height: 14px; }
.stage:has(#frame) { touch-action: none; }
.stage.is-zoomed #frame { cursor: grab; -webkit-user-drag: none; user-select: none; }
.stage.is-dragging #frame { cursor: grabbing; }
.chat-photo { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.chat-photo img { display: block; width: min(280px, 68vw); max-height: 320px; object-fit: cover; }
.chat-voice { display: flex; align-items: center; gap: 8px; min-width: 190px; padding: 4px 4px 2px; }
.chat-voice button {
  width: 34px; height: 34px; border: 0; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: #0b6b43; color: #fff;
}
.chat-row.mine .chat-voice button { background: #075e54; }
html[data-theme="dark"] .chat-voice button,
html[data-theme="dark"] .chat-row.mine .chat-voice button { background: #d9fdd3; color: #075e54; }
.chat-voice button svg { width: 16px; height: 16px; }
.chat-voice-bar { flex: 1; height: 4px; border-radius: 99px; background: rgba(0, 0, 0, 0.12); overflow: hidden; }
.chat-voice-bar span { display: block; height: 100%; width: 0; background: #0b6b43; }
html[data-theme="dark"] .chat-voice-bar { background: rgba(255, 255, 255, 0.16); }
html[data-theme="dark"] .chat-voice-bar span { background: #d9fdd3; }
.chat-voice-len { font-size: 0.75rem; font-variant-numeric: tabular-nums; min-width: 34px; }
.chat-compose { flex: none; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.chat-pending {
  display: flex; align-items: flex-start; gap: 8px; width: fit-content;
  padding: 6px; border-radius: 14px; background: var(--bg-elev-solid); border: 1px solid var(--line);
}
.chat-pending img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.chat-pending button {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--bg-elev-2-solid); color: inherit;
  display: grid; place-items: center;
}
.chat-compose-row {
  display: flex; align-items: flex-end; gap: 6px; padding: 6px;
  border-radius: 26px; background: var(--bg-elev-solid); border: 1px solid var(--line);
}
.chat-compose textarea {
  flex: 1; min-height: 40px; max-height: 120px; resize: none; border: 0; border-radius: 16px;
  background: transparent; color: inherit; padding: 9px 8px; font: inherit; line-height: 1.4;
}
.chat-compose textarea:focus { outline: none; }
.chat-tool, .chat-send {
  width: 40px; height: 40px; border: 0; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: transparent; color: var(--muted);
}
.chat-tool svg, .chat-send svg { width: 20px; height: 20px; }
.chat-send { background: #0b6b43; color: #fff; }
.chat-send:disabled { opacity: 0.6; }
.chat-mic { color: #0b6b43; }
.chat-live { color: var(--text); }
.chat-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #d24b4b; margin-bottom: 15px; }
.chat-pending[hidden], .chat-live[hidden], .chat-send[hidden], .chat-mic[hidden], .chat-zoom[hidden] { display: none; }
.chat-zoom {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  padding: 48px 16px 16px; background: rgba(12, 10, 8, 0.82);
}
.chat-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.chat-zoom button {
  position: absolute; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: #1c1424;
}
.chat-acts { display: flex; flex-direction: column; gap: 2px; align-self: center; opacity: 0.5; transition: opacity 0.15s var(--ease); }
.chat-row:hover .chat-acts, .chat-row:focus-within .chat-acts { opacity: 1; }
.chat-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 30px; height: 28px; padding: 0 5px;
  border: 0; border-radius: 14px; background: transparent; color: inherit; cursor: pointer;
}
.chat-act:hover, .chat-act:focus-visible { background: var(--bg-elev-2); }
.chat-act svg { width: 16px; height: 16px; }
.chat-act b { font-size: 0.74rem; font-weight: 700; }
.chat-like.on { color: #0b6b43; }
html[data-theme="dark"] .chat-like.on { color: #7fe0a7; }
.chat-like.on b, .chat-like b:not(:empty) { min-width: 8px; }
.chat-row:has(.chat-like b:not(:empty)) .chat-acts { opacity: 1; }
.chat-private {
  display: flex; align-items: center; gap: 6px; margin: 0 2px 4px; padding: 4px 8px; border-radius: 10px;
  background: rgba(92, 44, 140, 0.1); color: #5b2c8c; font-size: 0.76rem; font-weight: 600;
}
.chat-private svg { width: 14px; height: 14px; flex: none; }
html[data-theme="dark"] .chat-private { background: rgba(190, 150, 240, 0.16); color: #d8c3f5; }
.chat-row.is-private .chat-bubble { box-shadow: 0 0 0 1.5px rgba(92, 44, 140, 0.35), 0 1px 0.5px rgba(0, 0, 0, 0.13); }
.chat-quote {
  display: grid; gap: 1px; width: 100%; margin: 0 0 4px; padding: 5px 9px; border: 0; border-inline-start: 3px solid #0b6b43;
  border-radius: 8px; background: rgba(0, 0, 0, 0.05); color: inherit; text-align: start; font: inherit; cursor: pointer;
}
.chat-quote strong { font-size: 0.76rem; color: #0b6b43; }
.chat-quote span { font-size: 0.82rem; opacity: 0.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-quote.is-gone { font-size: 0.8rem; font-style: italic; opacity: 0.7; cursor: default; }
html[data-theme="dark"] .chat-quote { background: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .chat-quote strong { color: #7fe0a7; }
.chat-row.is-flash .chat-bubble { animation: chat-flash 1.2s var(--ease); }
@keyframes chat-flash { 0%, 40% { box-shadow: 0 0 0 3px rgba(11, 107, 67, 0.55); } 100% { box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13); } }
.chat-context { display: grid; gap: 6px; }
.chat-context-line {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 14px;
  background: var(--bg-elev-solid); border: 1px solid var(--line); font-size: 0.86rem;
}
.chat-context-line[hidden] { display: none; }
.chat-context-line > svg { width: 16px; height: 16px; flex: none; }
.chat-context-line > span { flex: 1; min-width: 0; display: grid; }
.chat-context-line em { font-style: normal; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-context-line button {
  width: 26px; height: 26px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-elev-2-solid); color: inherit; flex: none;
}
.chat-context-line button svg { width: 14px; height: 14px; }
#chat-to-line { color: #5b2c8c; font-weight: 600; }
html[data-theme="dark"] #chat-to-line { color: #d8c3f5; }
.chat-compose.is-private .chat-compose-row { border-color: rgba(92, 44, 140, 0.55); box-shadow: 0 0 0 2px rgba(92, 44, 140, 0.14); }
#chat-private.on { background: #5b2c8c; color: #fff; }
.chat-people {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px;
  background: rgba(12, 10, 8, 0.55);
}
.chat-people[hidden] { display: none; }
.chat-people-card {
  display: grid; gap: 10px; width: min(380px, 100%); max-height: min(520px, 100%); grid-template-rows: auto auto 1fr;
  padding: 14px; border-radius: var(--r-lg); background: var(--bg-elev-solid); box-shadow: var(--shadow-lg);
}
.chat-people-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-people-card header button {
  width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elev-2-solid); color: inherit;
}
.chat-people-list { overflow-y: auto; display: grid; gap: 2px; align-content: start; }
.chat-person {
  display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px;
  background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.chat-person:hover, .chat-person:focus-visible { background: var(--bg-elev-2); }
.chat-person .avatar { width: 36px; height: 36px; flex: none; }
.chat-walls { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.chat-wall-pick {
  display: grid; gap: 6px; justify-items: center; min-width: 92px; padding: 8px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--bg-elev); color: inherit; font: inherit;
}
.chat-wall-pick.is-on { border-color: var(--green-2); box-shadow: 0 0 0 1px var(--green-2) inset; }
.chat-swatch { display: block; width: 72px; height: 48px; border-radius: 8px; }
.chat-wall-preview {
  display: flex; flex-direction: column; gap: 8px; min-height: 180px; margin: 8px 0 16px;
  padding: 16px; border-radius: 18px;
}
.chat-wall-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chat-wall-actions input { display: none; }
@media (max-width: 900px) {
  .chat-page { height: calc(100vh - 144px); min-height: 320px; }
}
.calendar-week {
  margin-inline-end: auto; padding: 4px 12px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; font-weight: 600;
}
.calendar-line .scroller { display: flex; align-items: flex-start; }
.calendar-line .scroller > .folder-card { flex: 0 0 min(270px, 70vw); width: min(270px, 70vw); }
.calendar-line .scroller > .folder-card.is-list { flex-basis: 168px; width: 168px; }
.calendar-line .is-list .collage { aspect-ratio: 1; border-radius: var(--r-md); }
.collage.list-mark { color: rgba(255, 255, 255, 0.82); }
.collage.list-mark svg { width: 34%; height: auto; }
.cal-weeks { display: grid; gap: 10px; margin-top: 18px; }
.cal-week {
  display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg-elev); border: 1px solid var(--line);
}
.cal-week.is-now { border-color: var(--green-2); box-shadow: 0 0 0 1px var(--green-2) inset; }
.cal-week-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-week-head strong { font-size: 1rem; }
.cal-week-name { display: flex; flex-direction: column; gap: 2px; }
.cal-week-name span { font-size: 0.86rem; }
.cal-now { padding: 2px 10px; border-radius: 999px; background: var(--green); color: var(--green-ink); font-size: 0.8rem; font-weight: 700; }
.cal-week-head .btn { margin-inline-start: auto; }
.cal-items { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px;
  background: var(--bg-elev-2-solid); border: 1px solid var(--line); font-size: 0.9rem;
}
.cal-chip svg { width: 15px; height: 15px; flex: none; }
.cal-chip button { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.cal-chip button:hover { background: var(--line); color: var(--text); }
.cal-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cal-add[hidden] { display: none; }
.cal-add input, .cal-add select {
  height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-elev-2-solid); color: inherit; font: inherit; min-width: 0;
}
.cal-add input { flex: 1 1 180px; }
.cal-add select { flex: 2 1 240px; }
.cal-years { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Masonry Photos */
.masonry { display: flex; align-items: flex-start; gap: 12px; }
.masonry-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.playlist-shot { break-inside: avoid; margin: 0 0 12px; }
.playlist-shot .shot { margin: 0; }
.playlist-shot .btn { margin-top: 8px; }
.shot, .video-card {
  position: relative; display: block; margin: 0 0 12px; border-radius: var(--r-md); overflow: hidden;
  background: var(--bg-elev-2-solid); border: 1px solid var(--line); break-inside: avoid;
  transition: box-shadow 0.3s var(--ease), border-color 0.25s, transform 0.35s var(--spring);
}
.shot:hover, .video-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.shot img, .video-card img {
  width: 100%; display: block; object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.5s var(--ease);
}
.shot:hover img, .video-card:hover img { transform: scale(1.04); }

.pic-caption:empty { display: none; }
.pic-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  color: white; font-size: 0.8rem; line-height: 1.35; letter-spacing: 0.005em; font-weight: 550;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  pointer-events: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  background: linear-gradient(to top, rgba(6, 2, 12, 0.8) 0%, rgba(6, 2, 12, 0.35) 65%, transparent 100%);
  padding: 26px 12px 9px;
}
.video-card .pic-caption { padding-right: 70px; }
.stage .pic-caption {
  left: 90px; right: 90px; bottom: 20px; font-size: 0.98rem; text-align: center;
  background: none; text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
}
.stage:has(video) .pic-caption { bottom: 88px; }
.video-controls { left: 84px; right: 84px; }
.video-card img { aspect-ratio: 16 / 10; }
.shot-fav, .play-badge, .duration { position: absolute; display: grid; place-items: center; }

/* Photo Tools */
.shot-tools {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3;
  display: flex; gap: 6px; transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}
.shot-tools .shot-fav { position: static; }
.shot-fav {
  top: 10px; inset-inline-end: 10px; min-width: 34px; height: 32px; padding: 0 10px; gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px;
  background: rgba(12, 6, 18, 0.66); color: white;
  display: inline-flex; align-items: center;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), opacity 0.18s;
}
.shot-fav:hover { background: rgba(12, 6, 18, 0.82); }
.shot-fav b { font-size: 0.76rem; font-weight: 700; font-style: normal; font-variant-numeric: tabular-nums; }
.shot-fav svg { width: 15px; height: 15px; }
.shot-fav.on { background: var(--green); color: var(--green-ink); border-color: rgba(255, 255, 255, 0.24); }
@media (hover: hover) {
  .shot-tools { opacity: 0; transform: translateY(-4px); }
  .shot:hover .shot-tools, .video-card:hover .shot-tools, .shot-tools:focus-within, .shot-tools:has(.on) { opacity: 1; transform: none; }
  .shot-tools:has(.on):not(:hover) .shot-fav:not(.on) { opacity: 0; }
}
.shot-fav.pop, .like-btn.pop { animation: thumb-pop 0.48s var(--ease); }
.like-btn { display: inline-flex; align-items: center; gap: 6px; }
.like-btn svg { width: 16px; height: 16px; }
.like-btn.on { background: var(--green); color: var(--green-ink); }

/* Like and comment counts sit inside the icon */
.count-icon { --ico: 32px; position: relative; display: inline-grid; place-items: center; }
.shot-tools .shot-fav.count-icon { position: relative; width: 38px; height: 38px; min-width: 0; padding: 0; border-radius: 50%; --ico: 26px; }
.btn.count-icon { width: 48px; padding: 0; }
button.count-icon svg { width: var(--ico); height: var(--ico); stroke-width: 1.6; }
.count-icon b {
  position: absolute; left: 50%; top: 50%;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 800; font-style: normal; line-height: 1; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; direction: ltr; pointer-events: none; white-space: nowrap;
}
.count-icon[data-note] b { transform: translate(-50%, -50%) translateY(calc(var(--ico) * -0.034)); }
.count-icon[data-fav] b { transform: translate(-50%, -50%) translate(calc(var(--ico) * 0.09), calc(var(--ico) * 0.115)); }
.np-ball, .top-menu { display: none; }
@keyframes thumb-pop {
  0% { transform: scale(1) rotate(0); }
  35% { transform: scale(1.28) rotate(-14deg); }
  65% { transform: scale(0.92) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

.play-badge {
  inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; z-index: 2;
  background: rgba(247, 243, 236, 0.9); color: #140a1c;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 6px rgba(247, 243, 236, 0.18);
  transition: transform 0.35s var(--spring), background 0.2s, box-shadow 0.3s var(--ease);
}
.play-badge svg { width: 20px; height: 20px; margin-left: 3px; }
.video-card:hover .play-badge { transform: scale(1.12); background: #ffffff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 10px rgba(247, 243, 236, 0.16); }
.duration {
  inset-inline-end: 10px; bottom: 10px; z-index: 3; padding: 3px 8px; border-radius: 6px;
  background: rgba(8, 4, 16, 0.76); color: white; direction: ltr; unicode-bidi: isolate;
  font-size: 0.74rem; font-weight: 650; font-variant-numeric: tabular-nums;
}

/* Comments Popover */
.comment-pop {
  position: fixed; z-index: 70; width: min(340px, calc(100vw - 24px));
  max-height: min(440px, calc(100vh - 24px)); overflow-y: auto;
  padding: 16px; border-radius: var(--r-lg); background: var(--bg-elev-solid);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  animation: menu-pop 0.16s var(--ease);
}
.comment-pop textarea {
  width: 100%; min-height: 80px; resize: vertical; margin: 10px 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px;
  background: var(--bg); color: inherit; outline: none; transition: border-color 0.18s, box-shadow 0.18s;
}
.comment-pop textarea:focus { border-color: var(--green-2); box-shadow: var(--ring); }
.comment-line { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.comment-line:last-child { border-bottom: 0; margin-bottom: 8px; }
.comment-line p { margin: 6px 0; white-space: pre-wrap; font-size: 0.94rem; }
.comment-line button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.8rem; }
.comment-line button:hover { color: var(--danger); }

.scroller.comments { grid-auto-columns: minmax(280px, 340px); }
.comment-card {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start;
  padding: 12px; border-radius: var(--r-lg); background: var(--bg-elev);
  border: 1px solid var(--line); transition: border-color 0.18s, box-shadow 0.18s;
}
.comment-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.comment-card img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-elev-2); border: 1px solid var(--line); }
.comment-card strong { font-size: 0.86rem; font-weight: 650; }
.comment-card p {
  margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.92rem;
}

/* Audio Tracks */
.track {
  display: grid; grid-template-columns: 44px 1fr auto auto; gap: 14px; align-items: center;
  padding: 10px; border-radius: var(--r-sm); transition: background 0.15s;
}
.track:hover, .track.is-on { background: var(--bg-elev); }
.track button { border: 0; background: transparent; }

/* People Cards & Avatars */
.person-card { text-align: center; display: block; color: inherit; border-radius: var(--r-md); }
.person-card[hidden] { display: none; }
.face-stack { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.face-stack img { width: 94px; height: 94px; border-radius: 50%; object-fit: cover; background: var(--bg-elev-2-solid); border: 2px solid var(--line-strong); }
.person-hero .face-stack { justify-content: flex-start; margin: 0; }
.kw-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
.person-hero .kw-row { justify-content: flex-start; }
.kw {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px;
  background: var(--bg-elev-2); font-size: 0.8rem; font-weight: 550; border: 1px solid var(--line); unicode-bidi: plaintext;
}
.kw button, .face-mini button { border: 0; background: transparent; color: inherit; cursor: pointer; }
.face-row, .kw-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kw-add input {
  flex: 1 1 140px; min-width: 0; min-height: 40px; padding: 8px 12px; color: inherit; font: inherit;
  border: 1px solid var(--line-strong); background: var(--bg); border-radius: var(--r-sm); outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.kw-add input:focus { border-color: var(--green-2); box-shadow: var(--ring); }
.face-mini { position: relative; width: 66px; height: 66px; }
.face-mini img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; display: block; background: var(--purple); border: 2px solid var(--line); }
.face-mini button { position: absolute; top: -4px; inset-inline-end: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #f7f3ec; border: 1px solid var(--line); }
.person-card img, .person-fallback {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block;
  background: var(--bg-elev-2-solid); border: 2px solid var(--line-strong);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.person-card:hover img, .person-card:hover .person-fallback {
  border-color: var(--green-2); transform: translateY(-3px); box-shadow: var(--shadow);
}
.person-fallback { display: grid; place-items: center; color: var(--muted); font-family: var(--hebrew); font-weight: 700; font-size: 2.2rem; }

/* Breadcrumbs & Toolbars */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 10px; font-size: 0.88rem; font-weight: 500; }
.crumbs a { unicode-bidi: plaintext; transition: color 0.15s; }
.crumbs a:hover { color: var(--text); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 22px; }
.chip, select.chip, .toolbar select {
  border: 1px solid var(--line); background: var(--bg-elev);
  border-radius: 999px; min-height: 36px; padding: 0 14px; font-size: 0.88rem; font-weight: 500;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s, transform 0.3s var(--spring);
}
.chip:hover, select.chip:hover, .toolbar select:hover { border-color: var(--line-strong); background: var(--bg-elev-2); }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }
html[data-theme="light"] .chip.on { background: var(--text); color: var(--bg); }

/* Panels & Dashboard */
.panel {
  background: var(--bg-elev); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel h2 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field span { font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select, .inline-input {
  width: 100%; border: 1px solid var(--line-strong); background: var(--bg);
  border-radius: var(--r-sm); min-height: 44px; padding: 9px 13px; outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field input:hover, .field textarea:hover, .field select:hover, .inline-input:hover { border-color: color-mix(in srgb, var(--text) 26%, transparent); }
.field input:focus, .field textarea:focus, .field select:focus, .inline-input:focus {
  border-color: var(--green-2); box-shadow: var(--ring);
}
.field textarea { min-height: 96px; resize: vertical; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px 20px; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--sans); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 74px 1.4fr 1fr auto; gap: 14px; align-items: center;
  padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: var(--r-sm); transition: background 0.15s;
}
a.row:hover, .list .row:hover { background: var(--bg-elev); }
.row:not(:has(> img, > .thumb-ph)) { grid-template-columns: max-content 1.4fr 1fr auto; }
.row strong { font-weight: 600; unicode-bidi: plaintext; }
.row img, .thumb-ph { width: 74px; height: 56px; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-elev-2); border: 1px solid var(--line); }
.thumb-ph { display: grid; place-items: center; color: var(--muted); font-size: 0.76rem; text-align: center; padding: 4px; }
.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.status.pending { color: var(--warning); }
.status.approved, .status.active { color: var(--ok); }
.status.rejected, .status.disabled { color: var(--danger); }

/* Empty & Loading */
.empty {
  max-width: 460px; margin: 48px auto; text-align: center; padding: 36px 28px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-xl);
}
.empty img { width: 84px; margin-bottom: 10px; opacity: 0.9; }
.empty h2 { font-family: var(--display); font-weight: 700; font-size: 1.55rem; margin: 0 0 8px; }
.empty p { margin: 0 auto; max-width: 36ch; }
.skeleton {
  background: linear-gradient(100deg, var(--bg-elev-2) 30%, color-mix(in srgb, var(--bg-elev-2) 60%, var(--bg-elev-solid)) 50%, var(--bg-elev-2) 70%);
  background-size: 250% 100%; animation: shine 1.6s ease-in-out infinite; border-radius: var(--r-lg);
}
@keyframes shine { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.sk-hero { height: 380px; margin-bottom: 20px; }
.sk-card { height: 210px; }

/* Auth Gate */
.gate { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.gate-brand {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 480px at 85% 10%, color-mix(in srgb, var(--navy) 55%, transparent), transparent 70%),
    radial-gradient(600px 420px at 10% 100%, color-mix(in srgb, var(--green) 26%, transparent), transparent 70%),
    var(--purple);
  color: #f7f3ec; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 56px; gap: 14px; border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
}
.gate-brand img { width: min(260px, 64%); margin-bottom: auto; }
.gate-brand p { margin: 0; opacity: 0.78; font-size: 1.02rem; }
.gate-form { display: grid; align-content: center; padding: 56px 8vw; }
.gate-form > * { width: 100%; max-width: 440px; }
.gate-form h2 { font-family: var(--display); font-size: 2.4rem; margin: 0 0 8px; font-weight: 800; letter-spacing: 0; }
.gate-form form .btn-primary { width: 100%; min-height: 46px; margin-top: 4px; }
.google {
  width: 100%; background: #f7f3ec; color: #1b1020; border: 1px solid transparent; border-radius: 999px; min-height: 46px; font-weight: 600;
  display: grid; place-items: center; transition: background 0.18s var(--ease), border-color 0.18s;
}
.google:hover { background: #ffffff; }
html[data-theme="light"] .google { background: white; border: 1px solid var(--line); }
.or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; color: var(--muted); margin: 20px 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); }
.error-note { color: var(--danger); min-height: 1.2em; font-size: 0.88rem; font-weight: 550; }

/* Viewer Ambient Glow Backdrop */
/* Viewer & Lightbox */
.viewer, .reel-show {
  position: fixed; inset: 0; z-index: 40; background: #07030b; color: #f7f3ec;
}
.ambient-glow {
  position: absolute; inset: -40px; z-index: 1; pointer-events: none;
  background-size: cover; background-position: center;
  filter: blur(80px) saturate(180%) brightness(0.65); opacity: 0.6;
  transform: scale(1.15); transition: background-image 0.5s ease;
}
.reel-show { z-index: 60; }
.stage {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  overflow: hidden; min-width: 0; min-height: 0;
}
.stage img, .stage video {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  min-width: 0; min-height: 0;
  object-fit: contain; object-position: center;
  image-orientation: from-image;
  transition: transform 0.25s ease;
}
.show-pace { display: inline-flex; gap: 8px; }
.show-pace[hidden] { display: none; }
.person-chip { display: inline-flex; align-items: center; gap: 4px; }
.person-chip button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: inline-grid; place-items: center; padding: 0; }
.person-chip button svg { width: 14px; height: 14px; }
.profile-note { margin: 14px 0 6px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.suggest-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.suggest-row > span { flex: 1; min-width: 0; }
.suggest-row .btn { min-height: 32px; padding: 0 12px; }
@media (min-width: 901px) {
  .viewer {
    inset: 18px; border-radius: 22px; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  }
  .viewer .stage { position: relative; inset: auto; min-width: 0; min-height: 0; }
  .viewer .info, .viewer .info.is-open {
    position: relative; display: block; inset: auto; width: auto; max-height: none;
    border-radius: 0; top: auto; bottom: auto;
  }
  .viewer:fullscreen { inset: 0; border-radius: 0; display: block; }
  .viewer:fullscreen .stage { position: absolute; inset: 0; }
  .viewer:fullscreen .info { display: none; }
}
.reel-show img { max-width: 100%; max-height: 100%; object-fit: contain; }
.stage img { cursor: zoom-in; }
.stage-top {
  position: absolute; top: 16px; left: 20px; right: 20px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.stage-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-nav, .viewer-close, .stage-tools button, .stage-tools a {
  border: 1px solid rgba(255, 255, 255, 0.12); color: white; background: rgba(20, 14, 26, 0.55);
  display: inline-grid; place-items: center; text-decoration: none; backdrop-filter: blur(10px);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease), opacity 0.2s;
}
.stage-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
}
.stage-nav:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.24); }
.stage-nav.prev { left: 20px; right: auto; }
.stage-nav.next { right: 20px; left: auto; }
.viewer-close, .stage-tools button, .stage-tools a {
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
}
.viewer-close:hover, .stage-tools button:hover, .stage-tools a:hover { background: rgba(255, 255, 255, 0.2); }
.stage-tools button.stage-size {
  width: auto; min-width: 54px; padding: 0 14px; border-radius: 999px;
  font-weight: 650; direction: ltr; unicode-bidi: isolate; font-size: 0.9rem;
}
.stage-nav svg, .viewer-close svg, .stage-tools svg { width: 22px; height: 22px; }
.stage-tools button.is-on, .stage-tools a.is-on { background: var(--green); color: var(--green-ink); border-color: rgba(255, 255, 255, 0.3); }

/* Info Sidebar in Viewer */
.info {
  display: none; position: absolute; top: 76px; bottom: 20px; z-index: 4; width: min(350px, calc(100% - 36px));
  inset-inline-end: 20px; overflow-y: auto; padding: 22px; border-radius: var(--r-lg); background: rgba(16, 10, 22, 0.94);
  backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.info.is-open { display: block; animation: menu-pop 0.2s var(--ease); }
@media (min-width: 720px) {
  .viewer:has(.info.is-open) .stage-nav.prev { left: 390px; }
}
@media (min-width: 901px) {
  .viewer:has(.info.is-open) .stage-nav.prev { left: 20px; }
}
.info h2 { font-family: var(--hebrew); font-weight: 650; margin-top: 0; font-size: 1.2rem; line-height: 1.35; unicode-bidi: plaintext; overflow-wrap: anywhere; }
.info dl { display: grid; grid-template-columns: 104px 1fr; gap: 10px 12px; }
.info dt { color: #b2a8c0; font-size: 0.84rem; font-weight: 550; }
.info dd { margin: 0; font-size: 0.88rem; unicode-bidi: plaintext; overflow-wrap: anywhere; }

/* Video Controls in Viewer */
.video-controls {
  position: absolute; bottom: 20px; display: grid; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-lg); background: rgba(10, 6, 16, 0.78);
  backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); z-index: 2;
}
/* The seek line: what has loaded, what has played, and a knob to drag. A taller invisible edge makes it easy to grab. */
.seek { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); position: relative; cursor: pointer; touch-action: none; transition: height 0.15s; }
.seek::before { content: ""; position: absolute; inset: -12px 0; }
.seek:hover, .seek.is-dragging { height: 7px; }
.seek .seek-buffer, .seek .seek-fill { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: inherit; pointer-events: none; }
.seek .seek-buffer { background: rgba(255, 255, 255, 0.28); }
.seek .seek-fill { background: var(--green-2); }
.seek .seek-knob {
  position: absolute; top: 50%; inset-inline-start: 0; width: 15px; height: 15px; margin-top: -7.5px; margin-inline-start: -7.5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-2) 45%, transparent), 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: scale(0.85); transition: transform 0.2s var(--spring); pointer-events: none;
}
.seek:hover .seek-knob, .seek.is-dragging .seek-knob { transform: scale(1.15); }
.seek:focus-visible { outline: none; box-shadow: var(--ring); }
.control-row { display: flex; align-items: center; gap: 6px; color: #fff; }
.control-row .spacer { flex: 1; }
.control-row .icon-btn { color: #fff; background: transparent; border-color: transparent; }
.control-row .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.control-row .icon-btn svg { width: 22px; height: 22px; }
.control-row .vbar-play svg { width: 20px; height: 20px; }
.control-row .icon-btn.is-on { color: #ffb4a8; }
.vtime { font-size: 0.84rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.86); margin-inline-start: 6px; white-space: nowrap; }
.vbar-speed {
  min-width: 46px; height: 32px; padding: 0 10px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08); color: #fff; font: 700 0.82rem var(--sans); cursor: pointer; transition: background 0.2s;
}
.vbar-speed:hover { background: rgba(255, 255, 255, 0.16); }
.vbar-speed.is-on { background: var(--green-2); border-color: transparent; }

/* Play and pause in the middle, with ten seconds either side, like any video app. */
.video-center {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: clamp(28px, 6vw, 64px);
  pointer-events: none; transition: opacity 0.3s var(--ease);
}
/* Light glass buttons: the video stays the main thing. */
.video-center .vc-btn {
  pointer-events: auto; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: rgba(255, 255, 255, 0.92);
  background: rgba(16, 10, 24, 0.28); border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s var(--spring), background 0.2s, border-color 0.2s;
}
.video-center .vc-btn:hover { background: rgba(16, 10, 24, 0.42); border-color: rgba(255, 255, 255, 0.36); transform: scale(1.06); }
.video-center .vc-btn:active { transform: scale(0.92); }
.video-center .vc-skip { width: 52px; height: 52px; }
.video-center .vc-skip svg { width: 26px; height: 26px; }
.video-center .vc-play { width: 70px; height: 70px; }
.video-center .vc-play svg { width: 30px; height: 30px; }
/* While it plays the controls only come up when the mouse moves or the screen is touched, and leave again after a moment. */
.stage.is-idle .video-center, .stage.is-idle .video-controls, .stage.is-idle .stage-top, .stage.is-idle .stage-nav, .stage.is-idle .pic-caption { opacity: 0; pointer-events: none; }
.stage.is-idle .video-center .vc-btn { pointer-events: none; }
.stage.is-idle { cursor: none; }
.stage.is-loading .video-center .vc-play { opacity: 0; }
.video-controls, .stage-top, .stage-nav { transition: opacity 0.3s var(--ease); }
.stage:fullscreen { background: #000; }
.stage:fullscreen video { max-height: 100vh; }

.full-player { display: none; }
.sheet { display: none; }

/* Modals & Popups */
.modal-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(6, 3, 12, 0.62);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
}
.modal {
  width: min(540px, 100%); background: var(--bg-elev-solid);
  border-radius: var(--r-xl); padding: 26px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong);
  animation: menu-pop 0.2s var(--ease);
}
.modal h2 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin: 0 0 10px; }
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; justify-items: center; }
.push-ask {
  position: fixed; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 80;
  max-width: 420px; margin-inline: auto; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.push-ask p { margin: 0 0 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: rgba(23, 17, 30, 0.9); color: #f7f3ec; padding: 11px 18px 11px 16px; border-radius: 999px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-weight: 500; font-size: 0.92rem; max-width: min(520px, calc(100vw - 32px));
  animation: toast-in 0.45s var(--spring), toast-out 0.35s var(--ease) 3.25s forwards;
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--green-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-2) 25%, transparent); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(18px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.96); } }

.check { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 0.94rem; }
.member-sites { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.member-sites .check { margin: 4px 0 0; font-size: 0.86rem; }
.drop {
  border: 2px dashed var(--line-strong); border-radius: var(--r-xl); padding: 40px 20px; text-align: center;
  background: var(--bg-elev); transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.drop:hover { border-color: color-mix(in srgb, var(--green-2) 60%, transparent); }
.drop.over { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-2)); border-radius: inherit; }
.hold-tip, .hold-full {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--green) 12%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--green-2) 35%, transparent);
}
.hold-tip svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--green-2); }
.hold-tip p { margin: 0; }
.hold-full { background: color-mix(in srgb, var(--danger) 14%, var(--bg-elev)); border-color: color-mix(in srgb, var(--danger) 45%, transparent); font-weight: 600; }
.hold-meter { display: grid; gap: 8px; margin-bottom: 14px; }
.hold-meter .progress { height: 10px; }
.review-bulk { margin-bottom: 12px; }
.review-card { display: grid; grid-template-columns: auto 180px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 12px; }
.review-card .check { margin: 4px 0 0; }
.review-card .check input { width: 20px; height: 20px; }
.review-media img, .review-media video { width: 100%; max-height: 200px; object-fit: cover; border-radius: 14px; display: block; background: #000; }
.review-media audio { width: 100%; }
.review-media .pick-blank { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; background: var(--bg-elev-2); color: var(--muted); }
.review-media .pick-blank svg { width: 40px; height: 40px; }
.review-info strong { font-family: var(--hebrew); overflow-wrap: anywhere; }
.review-info .toolbar { margin-top: 8px; }
@media (max-width: 600px) {
  .review-card { grid-template-columns: auto minmax(0, 1fr); }
  .review-info { grid-column: 1 / -1; }
}

/* Admin Views */
.admin-nav {
  display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; margin: 10px 0 24px; padding: 4px;
  border-radius: var(--r-md); background: var(--bg-elev); border: 1px solid var(--line); width: max-content; max-width: 100%;
}
.admin-nav a {
  flex: none; padding: 7px 14px; border-radius: var(--r-sm); color: var(--muted); white-space: nowrap;
  font-size: 0.88rem; font-weight: 550;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.admin-nav a:hover { color: var(--text); background: var(--bg-elev-2); }
.admin-nav a.active { background: var(--text); color: var(--bg); font-weight: 600; }

.home-stack { display: grid; gap: 16px; }
.folder-picks { max-height: 290px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 8px 14px; margin-bottom: 16px; background: var(--bg); }
.folder-picks label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.folder-picks input { margin-top: 4px; }
.folder-picks span { unicode-bidi: plaintext; }
.note {
  padding: 12px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--purple) 14%, var(--bg-elev));
  border: 1px solid var(--line); border-inline-start: 3px solid color-mix(in srgb, var(--purple) 70%, var(--green-2)); margin: 12px 0;
}
/* Announcements at the top of the home page */
.notice-deck {
  position: relative; margin: 0 0 22px;
  opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease);
}
.notice-deck.is-ready { opacity: 1; transform: none; }
.notice-deck.is-gone { opacity: 0; transform: translateY(-8px) scale(0.97); height: 0 !important; margin: 0; overflow: hidden; }
.notice-deck:focus { outline: none; }
.notice-track { position: relative; transition: height 0.45s var(--ease); }
.notice {
  position: absolute; inset: 0 0 auto 0; visibility: hidden; pointer-events: none;
  display: grid; overflow: hidden; border-radius: var(--r-xl);
  background: var(--bg-elev-solid); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.notice.is-current { position: relative; visibility: visible; pointer-events: auto; animation: notice-in 0.55s var(--ease) both; }
.notice.is-leaving { visibility: visible; animation: notice-out 0.45s var(--ease) both; }
@keyframes notice-in {
  from { opacity: 0; transform: translateX(calc(var(--notice-way, 1) * -36px)) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes notice-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(calc(var(--notice-way, 1) * 36px)) scale(0.985); }
}
.notice.has-art { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.notice-art { position: relative; display: block; min-height: 250px; max-height: 360px; overflow: hidden; background: var(--bg-elev-2-solid); }
.notice-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.notice.is-current .notice-art img { animation: notice-zoom 10s ease-out both; }
.notice-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* A video keeps its own shape and shows whole, edge to edge; no fade over its side. */
.notice-art.is-video { min-height: 0; max-height: none; aspect-ratio: 16 / 9; align-self: center; background: #000; }
.notice-art.is-video::after { content: none; }
.notice-sound {
  position: absolute; z-index: 2; bottom: 12px; inset-inline-start: 12px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; cursor: pointer;
  background: rgba(10, 6, 16, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s var(--spring), background 0.2s;
}
.notice-sound svg { width: 19px; height: 19px; }
/* Silent until asked: a line through the speaker. */
.notice-sound:not(.is-on)::after {
  content: ""; position: absolute; width: 24px; height: 2px; border-radius: 2px; background: #fff;
  transform: rotate(-45deg); box-shadow: 0 0 0 1.5px rgba(10, 6, 16, 0.55);
}
.notice-sound.is-on { background: var(--green-2); border-color: transparent; }
.notice-sound:hover { transform: scale(1.08); }
@keyframes notice-zoom { from { transform: scale(1.09); } to { transform: scale(1); } }
.notice-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 55%, color-mix(in srgb, var(--bg-elev-solid) 55%, transparent));
}
[dir="rtl"] .notice-art::after { background: linear-gradient(-90deg, transparent 55%, color-mix(in srgb, var(--bg-elev-solid) 55%, transparent)); }
.notice-body { position: relative; z-index: 1; display: grid; align-content: center; gap: 8px; padding: 26px 30px 24px; min-width: 0; }
.notice:not(.has-art) {
  color: #f7f3ec; border-color: transparent;
  background: linear-gradient(130deg, var(--purple) 0%, color-mix(in srgb, var(--purple) 55%, var(--navy)) 55%, var(--navy) 100%);
}
.notice:not(.has-art)::before, .notice:not(.has-art)::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(2px);
}
.notice:not(.has-art)::before {
  width: 260px; height: 260px; inset-inline-end: -70px; top: -110px;
  background: radial-gradient(circle, color-mix(in srgb, var(--green-2) 55%, transparent), transparent 70%);
  animation: notice-float 9s ease-in-out infinite alternate;
}
.notice:not(.has-art)::after {
  width: 200px; height: 200px; inset-inline-start: -60px; bottom: -120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  animation: notice-float 11s ease-in-out infinite alternate-reverse;
}
@keyframes notice-float { from { transform: translate(0, 0) scale(1); } to { transform: translate(-26px, 18px) scale(1.12); } }
.notice-meta { display: flex; align-items: center; gap: 10px; font-size: var(--t-meta); color: var(--muted); }
.notice:not(.has-art) .notice-meta { color: rgba(247, 243, 236, 0.72); }
.notice-new {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 999px;
  background: var(--green); color: var(--green-ink); font-weight: 650; font-size: 0.78rem; letter-spacing: 0.02em;
}
.notice-new::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c9f2c0;
  animation: notice-pulse 1.8s ease-out infinite;
}
@keyframes notice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 242, 192, 0.7); }
  100% { box-shadow: 0 0 0 9px rgba(201, 242, 192, 0); }
}
.notice-title { margin: 0; font-family: var(--display); font-size: clamp(1.3rem, 2.3vw, 1.7rem); font-weight: 800; line-height: 1.25; text-wrap: balance; }
.notice-text {
  margin: 0; white-space: pre-line; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}
.notice:not(.has-art) .notice-text { color: rgba(247, 243, 236, 0.86); }
.notice.is-open .notice-text { -webkit-line-clamp: unset; display: block; }
.notice-more {
  justify-self: start; padding: 0; border: 0; background: none; color: var(--green-2);
  font: inherit; font-weight: 650; cursor: pointer;
}
.notice:not(.has-art) .notice-more { color: #c9f2c0; }
.notice-more:hover { text-decoration: underline; }
.notice-close {
  position: absolute; z-index: 2; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(12, 9, 17, 0.42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0.8; transition: opacity 0.2s, transform 0.25s var(--ease), background 0.2s;
}
.notice-close svg { width: 16px; height: 16px; }
.notice-close:hover, .notice-close:focus-visible { opacity: 1; transform: rotate(90deg); background: rgba(12, 9, 17, 0.62); }
.notice-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.notice-step {
  width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg-elev-solid); color: var(--text);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.notice-step svg { width: 16px; height: 16px; }
[dir="rtl"] .notice-step svg { transform: scaleX(-1); }
.notice-step:hover { transform: scale(1.08); background: var(--bg-elev-2-solid); }
.notice-dots { display: flex; align-items: center; gap: 6px; }
.notice-dots button {
  position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; overflow: hidden;
  background: var(--line-strong); transition: width 0.35s var(--ease), background 0.2s;
}
.notice-dots button.is-on { width: 30px; background: color-mix(in srgb, var(--green-2) 28%, transparent); }
.notice-dots button span { position: absolute; inset: 0; inset-inline-end: auto; width: 0; background: var(--green-2); border-radius: inherit; }
.notice-dots button.is-on span { animation: notice-fill var(--notice-ms, 8s) linear both; }
.notice-deck.is-held .notice-dots button.is-on span { animation-play-state: paused; }
@keyframes notice-fill { from { width: 0; } to { width: 100%; } }
@media (max-width: 700px) {
  .notice.has-art { grid-template-columns: 1fr; }
  .notice-art { min-height: 0; max-height: none; aspect-ratio: 16 / 9; }
  .notice-art::after, [dir="rtl"] .notice-art::after { background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--bg-elev-solid) 50%, transparent)); }
  .notice-body { padding: 18px 18px 18px; gap: 6px; }
  .notice:not(.has-art) .notice-body { padding-top: 22px; padding-inline-end: 54px; }
  .notice-text { -webkit-line-clamp: 3; font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .notice-deck { opacity: 1; transform: none; }
  .notice-dots button.is-on span { width: 100%; }
}
.font-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 18px; }
.font-panel { margin: 18px 0 24px; }
.font-card { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 14px; background: var(--surface, #fff); }
.font-card h3 { font-size: 1rem; margin: 0; }
.font-card select { width: 100%; min-height: 42px; }
.font-card .btn { justify-self: start; }
.font-sample { margin: 0; padding: 12px; border-radius: 10px; background: rgba(0,0,0,.035); font-size: 1.15rem; line-height: 1.5; min-height: 3.4em; }
.font-upload { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.font-upload .field { flex: 1 1 220px; margin: 0; }
.font-pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.font-pick svg { width: 18px; height: 18px; }
.font-pick.is-busy { opacity: .55; pointer-events: none; }
.font-library { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.font-library li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(0,0,0,.05); font-size: 1rem; }
.font-library .icon-btn { width: 28px; height: 28px; }
.word-group { margin-bottom: 24px; }
.word-group h3 { font-family: var(--display); font-weight: 650; font-size: 1.1rem; margin-bottom: 12px; }
.word-row input { font-family: var(--hebrew); font-size: 1rem; }

/* Command Palette Modal */
.palette-back {
  position: fixed; inset: 0; z-index: 95; background: rgba(5, 2, 10, 0.6);
  backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 18px 24px; animation: palette-fade 0.2s var(--ease);
}
.palette-back[hidden] { display: none; }
@keyframes palette-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.palette-panel {
  width: min(620px, 100%); background: var(--bg-elev-solid);
  border-radius: var(--r-xl); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column;
  animation: palette-drop 0.22s var(--ease);
}
@keyframes palette-drop {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.palette-input-wrap {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.palette-icon { width: 22px; height: 22px; color: var(--muted); display: grid; place-items: center; }
.palette-icon svg { width: 22px; height: 22px; }
.palette-input {
  flex: 1; border: 0; background: transparent; font-size: 1.15rem; font-weight: 500;
  color: var(--text); outline: none;
}
.palette-input::placeholder { color: var(--muted); opacity: 0.7; }
.palette-esc {
  font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 8px;
  background: var(--bg-elev-2); color: var(--muted); border: 1px solid var(--line);
  font-family: monospace;
}
.palette-results { max-height: min(60vh, 480px); overflow-y: auto; padding: 12px 14px; }
.palette-hint, .palette-empty { padding: 32px 16px; text-align: center; }
.palette-group-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px 4px;
}
.palette-row {
  display: flex; align-items: center; gap: 14px; padding: 9px 12px;
  border-radius: var(--r-sm); color: inherit; transition: background 0.15s;
}
.palette-row:hover { background: var(--bg-elev-2); }
.palette-row-icon {
  width: 36px; height: 36px; border-radius: 12px; background: var(--bg-elev-2);
  display: grid; place-items: center; color: var(--green-2); flex: none;
}
.palette-row-icon svg { width: 18px; height: 18px; }
.palette-row-text strong { display: block; font-size: 1rem; font-weight: 560; }
.palette-row-text small { display: block; color: var(--muted); font-size: 0.82rem; }
.palette-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; margin: 8px 12px 14px;
}
.palette-all {
  display: block; text-align: center; padding: 12px; border-radius: 12px;
  color: var(--green-2); font-weight: 600; font-size: 0.94rem; margin-top: 6px;
}
.palette-all:hover { background: var(--bg-elev-2); }

/* Interactive People Cards */
.person-card-info { margin-top: 10px; }
.person-card { transition: transform 0.25s var(--ease); }
.person-card:hover { transform: translateY(-4px); }
.face-stack { position: relative; }
.person-card:hover .face-stack img:first-child { transform: scale(1.04); }

/* Responsive Rules */
@media (max-width: 1100px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .music-layout, .font-grid { grid-template-columns: minmax(0, 1fr); }
  .music-now { position: static; }
}

@media (max-width: 720px) {
  .menu-account strong { display: none; }
  .topbar { flex-wrap: nowrap; row-gap: 0; align-items: center; }
  .topbar .menu-account { display: none; }
  .topbar .search { order: 0; flex: 1 1 auto; min-width: 0; max-width: none; flex-basis: auto; }
  .top-actions { margin-inline-start: 0; gap: 6px; flex: none; }
  .upload-btn { height: 38px; padding-inline: 3px 12px; gap: 6px; font-size: 0.85rem; border-radius: 11px; }
  .upload-mark { width: 30px; height: 30px; border-radius: 8px; }
}
@media (max-width: 380px) {
  .upload-btn { padding: 3px; }
  .upload-btn > span:not(.upload-mark) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 14px 16px 112px; }
  .hero, .gate, .split, .viewer, .full-player { grid-template-columns: 1fr; }
  .hero { grid-template-areas: "show" "copy"; gap: 24px; }
  .gate-brand { min-height: 30vh; padding: 28px; }
  .gate-brand img { width: 128px; }
  .person-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .rail-head, .section-head { margin-top: 30px; }
  .column-search { flex-basis: 100%; margin-inline-start: 0; }
  .gate-form { padding: 28px 20px 44px; }
  .hero-print { height: 240px; }
  /* On a phone the home page is a preview: a few pictures per row of the collection, then "see all",
     so the way down is short and mostly not pictures under the thumb. */
  .page-home .masonry:not(.is-found) .is-past-six { display: none; }
  .page-home .rail-head > a:last-child { font-weight: 700; }

  .topbar { margin: -14px -16px 12px; padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
  .topbar { transition: transform 0.28s var(--ease); will-change: transform; }
  .topbar.is-away { transform: translateY(-100%); }
  .search { max-width: none; }
  .shell:has(.mini-player:not([hidden])) .sidebar { padding-bottom: 0; }
  .main { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

  /* Phones: every top-bar control is the same 40px ball */
  .topbar { --ball: 40px; gap: 8px; }
  .topbar .top-menu { display: inline-flex; }
  .topbar #theme { display: none; }
  .topbar .icon-btn { width: var(--ball); height: var(--ball); min-height: var(--ball); flex: none; }
  .topbar .icon-btn svg { width: 20px; height: 20px; }
  .topbar .menu-account { display: flex; flex: none; max-width: none; padding: 0; border: 0; border-radius: 50%; }
  .topbar .menu-account strong { display: none; }
  .topbar .menu-account .avatar { width: var(--ball); height: var(--ball); }
  .top-actions { margin-inline-start: auto; gap: 8px; align-items: center; }
  .top-actions .upload-btn {
    width: var(--ball); height: var(--ball); padding: 0; gap: 0; border-radius: 50%;
    justify-content: center; flex: none; font-size: 0;
  }
  .top-actions .upload-btn > span:not(.upload-mark) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .top-actions .upload-mark { width: auto; height: auto; background: none; border: 0; border-radius: 0; }
  .top-actions .upload-btn svg { width: 20px; height: 20px; }

  /* Phones: the song playing sits in a bar along the bottom: its cover, name and singer, pause, and an X */
  .np-ball { display: none !important; }
  .mini-player:not([hidden]), .mini-player.is-tucked:not([hidden]) {
    display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
    left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; height: auto;
    padding: 8px 8px 10px 10px; border-radius: 16px; text-align: start; cursor: pointer;
  }
  .mini-player .player-disc-wrap, .mini-player.is-tucked .player-disc-wrap { width: 48px; height: 48px; }
  .mini-player .player-disc, .mini-player.is-tucked .player-disc { border-radius: 10px; animation: none; border: 0; }
  .mini-player .player-info, .mini-player.is-tucked .player-info { display: flex; align-items: flex-start; text-align: start; }
  .mini-player .soundwave, .mini-player .mini-seek, .mini-player .player-controls [data-act="prev"], .mini-player .player-controls [data-act="next"],
  .mini-player .player-controls [data-act="shuffle"], .mini-player .player-controls [data-dl], .mini-player .mini-tools [data-act="hide"] { display: none !important; }
  .mini-player .player-controls, .mini-player.is-tucked .player-controls { display: flex; width: auto; }
  .mini-player .mini-tools { position: static; display: flex; }
  .mini-player .mini-tools button { width: 38px; height: 38px; }
  .mini-player .mini-progress, .mini-player.is-tucked .mini-progress { display: block; left: 14px; right: 14px; top: auto; bottom: 3px; height: 3px; }
  .shell:has(.mini-player:not([hidden])) #app { padding-bottom: 86px; }
  html:has(.mini-player:not([hidden])) .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .np-ball:not([hidden]) {
    display: grid; place-items: center; flex: none; width: var(--ball); height: var(--ball); padding: 0; margin: 0;
    border: 0; border-radius: 50%; background: transparent; cursor: pointer; line-height: 0; vertical-align: middle;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.28);
  }
  .np-ball .player-disc { display: block; width: 100%; height: 100%; border-width: 0; box-shadow: none; }
  .np-ball.is-playing .player-disc { animation-play-state: running; }
  .np-ball:active { transform: scale(0.94); }
  .toasts { bottom: calc(18px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }

  /* Phones: likes and comments only inside the open picture or video */
  .shot-tools { display: none; }

  /* More sheet */
  .sheet-scrim {
    position: fixed; inset: 0; z-index: 34; background: rgba(6, 3, 12, 0.5);
    animation: palette-fade 0.2s var(--ease);
  }
  .sheet-scrim[hidden] { display: none; }
  html.sheet-open, html.sheet-open body, html.np-open, html.np-open body { overflow: hidden; }
  .hero, .gate, .split, .viewer, .music-layout { grid-template-columns: 1fr; }

  /* Phone menu: the laptop sidebar as a drawer that slides in from the side */
  .sheet {
    display: flex; flex-direction: column; gap: 6px; position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 35;
    width: min(320px, 86vw); overflow-y: auto; overscroll-behavior: contain;
    padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, color-mix(in srgb, var(--purple) 92%, var(--navy)) 0%, color-mix(in srgb, var(--purple) 70%, #07030c) 100%);
    color: #f4f1ec; box-shadow: 0 0 50px rgba(0, 0, 0, 0.45);
    transform: translateX(105%); visibility: hidden;
    transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  html[dir="ltr"] .sheet { transform: translateX(-105%); }
  .sheet.open, html[dir="ltr"] .sheet.open { transform: none; visibility: visible; transition-delay: 0s; }
  .sheet-top { display: flex; align-items: center; gap: 8px; padding: 0 2px 6px; }
  .sheet-top .side-fold { width: 40px; height: 40px; }
  .sheet-who {
    min-height: 60px; padding: 8px 10px; margin: 0 0 4px; color: inherit; border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.06); border: 0;
  }
  .sheet-who span:not(.avatar) { display: grid; line-height: 1.25; min-width: 0; }
  .sheet-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet-who small { color: rgba(244, 241, 236, 0.65); font-family: var(--sans); font-weight: 500; font-size: 0.8rem; }
  .sheet-who .avatar { width: 44px; height: 44px; }
  .sheet-nav { display: flex; flex-direction: column; gap: 2px; }
  .sheet-nav .side-label { margin: 16px 12px 6px; }
  .sheet a:not(.brand):not(.sheet-who), .sheet-row {
    position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 12px;
    border: 0; border-radius: var(--r-sm); background: transparent; color: rgba(244, 241, 236, 0.82);
    font-weight: 500; font-size: 0.98rem; text-align: start;
  }
  .sheet a:not(.brand):not(.sheet-who) svg, .sheet-row svg { width: 21px; height: 21px; flex: none; opacity: 0.85; }
  .sheet a:not(.brand):not(.sheet-who):active, .sheet-row:active { background: rgba(255, 255, 255, 0.1); }
  .sheet a.active { background: rgba(255, 255, 255, 0.11); color: #fff; font-weight: 600; }
  .sheet a.active svg { color: color-mix(in srgb, var(--green-2) 70%, #ffffff); opacity: 1; }
  .sheet a.active::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--green-2);
  }
  .sheet-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: grid; gap: 2px; }
  .viewer { grid-template-columns: 1fr; }
  .row { grid-template-columns: 68px minmax(0, 1fr); }
  .row:not(:has(> img, > .thumb-ph)) { grid-template-columns: max-content minmax(0, 1fr); }
  .row > * { min-width: 0; overflow-wrap: anywhere; }
  input[type="file"] { max-width: 100%; }
  .row .hide-sm { display: none; }

  /* Viewer on phones */
  .stage-top { top: calc(10px + env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); gap: 8px; align-items: flex-start; }
  .stage-tools {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; max-width: calc(100% - 52px);
    gap: 6px; padding: 2px; justify-content: flex-start;
  }
  .stage-tools::-webkit-scrollbar { display: none; }
  .stage-tools > * { flex: none; }
  .viewer-close, .stage-tools button, .stage-tools a { width: 44px; height: 44px; }
  .stage-nav { width: 44px; height: 44px; opacity: 0.85; }
  .stage-nav.prev { left: max(8px, env(safe-area-inset-left)); }
  .stage-nav.next { right: max(8px, env(safe-area-inset-right)); }
  .stage .pic-caption { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); font-size: 0.9rem; }
  .stage:has(video) .pic-caption { bottom: calc(110px + env(safe-area-inset-bottom)); }
  .stage:has(video) { touch-action: none; }
  .stage.is-zoomed .stage-nav, .stage.is-zoomed .pic-caption { opacity: 0; pointer-events: none; }
  .video-controls { left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 10px 12px; }
  .seek { height: 6px; }
  .control-row { gap: 2px; }
  .control-row .icon-btn { width: 40px; height: 40px; }
  .control-row .skip-btn, .control-row [data-pip] { display: none; }
  .video-center { gap: 22px; }
  .video-center .vc-skip { width: 48px; height: 48px; }
  .video-center .vc-play { width: 64px; height: 64px; }
  .info, .info.is-open {
    top: auto; bottom: 0; inset-inline: 0; width: 100%; max-height: 66vh;
    border-radius: 22px 22px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  }
  .info dl { grid-template-columns: 92px 1fr; }
}

/* Video loading and error states */
.video-state {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 12px;
  pointer-events: none; text-align: center; color: #f7f3ec;
}
.video-state[hidden] { display: none; }
.video-error { pointer-events: auto; background: rgba(7, 3, 11, 0.72); }
.video-error p { margin: 0; font-weight: 600; }
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22); border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}

/* Large now-playing screen (phones) */
.mini-open { display: none; }
.np-stage {
  position: fixed; inset: 0; z-index: 80; overflow: hidden auto;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: calc(12px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background: #0d0814; color: #f7f3ec; animation: np-up 0.32s var(--ease);
  color-scheme: dark;
}
.np-stage[hidden] { display: none; }
@keyframes np-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.np-glow {
  position: fixed; inset: -80px; z-index: 0; background: var(--purple) center / cover no-repeat;
  filter: blur(60px) saturate(1.3); opacity: 0.5; pointer-events: none;
}
.np-stage > *:not(.np-glow) { position: relative; z-index: 1; }
.np-head { width: 100%; max-width: 520px; display: flex; align-items: center; justify-content: space-between; font-size: 0.84rem; font-weight: 650; color: rgba(247, 243, 234, 0.75); }
.np-icon { width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); color: inherit; }
.np-icon svg { width: 22px; height: 22px; }
.np-art {
  width: min(82vw, 44vh, 420px); aspect-ratio: 1; flex: none; border-radius: 20px;
  background: linear-gradient(145deg, var(--purple), var(--navy)) center / cover no-repeat;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); transform: scale(0.94); transition: transform 0.4s var(--ease);
}
.np-stage.is-playing .np-art { transform: none; }
.np-meta { width: 100%; max-width: 520px; display: grid; gap: 4px; text-align: center; }
.np-meta strong { font-family: var(--hebrew); font-size: 1.3rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.np-meta span { color: rgba(247, 243, 234, 0.7); font-size: 0.95rem; }
.np-seek { width: 100%; max-width: 520px; direction: ltr; }
.np-seek input, .np-volume input { width: 100%; accent-color: #f7f3ea; height: 28px; margin: 0; }
.np-times { display: flex; justify-content: space-between; font-size: 0.78rem; color: rgba(247, 243, 234, 0.7); font-variant-numeric: tabular-nums; direction: ltr; }
.np-controls { display: flex; align-items: center; justify-content: center; gap: 26px; direction: ltr; }
.np-btn { width: 60px; height: 60px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: inherit; }
.np-btn svg { width: 30px; height: 30px; }
.np-btn.np-play { width: 76px; height: 76px; background: #f7f3ea; color: #120b1a; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.np-btn.np-play svg { width: 32px; height: 32px; fill: currentColor; }
.np-btn:active { transform: scale(0.94); }
.np-volume { width: 100%; max-width: 520px; display: flex; align-items: center; gap: 10px; color: rgba(247, 243, 234, 0.75); }
.np-volume svg { width: 22px; height: 22px; flex: none; }
.np-queue { width: 100%; max-width: 520px; list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.np-queue li { min-width: 0; }
.np-queue[hidden] { display: none; }
.np-queue button {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: start; font: inherit;
}
.np-queue button.is-now { background: rgba(255, 255, 255, 0.12); font-weight: 700; }
.np-q-num { width: 24px; color: rgba(247, 243, 234, 0.6); font-variant-numeric: tabular-nums; flex: none; }
.np-q-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--hebrew); }

/* Phone-sized content */
@media (max-width: 600px) {
  :root { --t-page: 1.55rem; --t-section: 1.2rem; }
  .masonry { gap: 8px; }
  .shot, .video-card { margin-bottom: 8px; border-radius: 12px; }
  .playlist-shot { margin-bottom: 8px; }
  .scroller { grid-auto-columns: minmax(220px, 78vw); gap: 12px; }
  .scroller.people { grid-auto-columns: 112px; }
  .scroller.likes-line, .scroller.since-line { grid-auto-columns: 46vw; }
  .since-line .shot img, .since-line .video-card img { height: 46vw; }
  .rail { grid-auto-columns: minmax(150px, 44vw); gap: 12px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 12px; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px 10px; }
  .calendar-line .scroller > .folder-card { flex-basis: 74vw; width: 74vw; }
  .calendar-line .scroller > .folder-card.is-list { flex-basis: 40vw; width: 40vw; }
  .admin-nav { width: 100%; margin: 6px 0 16px; }
  .admin-nav a { padding: 10px 14px; }
  .panel { padding: 16px; }
  .toolbar { gap: 6px; }
  .chip, select.chip, .toolbar select { min-height: 40px; }
  .modal-back, .picker-pop { place-items: end stretch; padding: 0; }
  .modal, .picker-pop .panel {
    width: 100%; max-height: 90vh; overflow-y: auto;
    border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .palette-back { padding: calc(8px + env(safe-area-inset-top)) 8px 8px; }
  .palette-results { max-height: 70vh; }
  .chat-row { max-width: 92%; }
}
@media (max-width: 360px) {
  .masonry { gap: 6px; }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Touch screens */
@media (pointer: coarse) {
  a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }
  .field input, .field textarea, .field select, .inline-input, .search input, .chat-compose textarea,
  .palette-input, .cal-add input, .cal-add select, input[type="search"], input[type="text"], input[type="email"], input[type="password"] { font-size: 16px; }
  .btn, .btn-ghost, .btn-primary, .btn-danger { min-height: 44px; }
  .btn:active { transform: scale(0.98); }
}
@media (hover: none) {
  .shot:hover img, .video-card:hover img { transform: none; }
  .person-card:hover { transform: none; }
  .folder-grid .folder-card:hover { transform: none; }
  .seek:hover { height: 8px; }
}

/* Short landscape phones */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .np-stage { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 28px; align-items: center; }
  .np-head { grid-column: 1 / -1; max-width: none; }
  .np-art { width: min(40vw, 62vh); grid-row: 2 / span 4; }
  .np-coming { grid-column: 2; }
  .chat-page { height: calc(100vh - 110px); }
}

@supports (height: 100dvh) {
  .chat-page { height: calc(100dvh - 118px); }
  @media (max-width: 900px) {
    .chat-page { height: calc(100dvh - 144px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  }
}

.is-copy-edit .copy-live {
  outline: 1px dashed color-mix(in srgb, var(--green-2) 80%, transparent);
  outline-offset: 2px;
  cursor: text;
  border-radius: 4px;
}
.is-copy-edit .copy-live:hover { background: color-mix(in srgb, var(--green) 18%, transparent); }
.copy-edit-bar {
  position: fixed; z-index: 70; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 24px));
  padding: 10px 12px 10px 14px; border-radius: 999px;
  background: var(--bg-elev); color: var(--text);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong);
}
.copy-edit-bar button, .copy-box .btn { flex: none; }
.copy-box {
  position: fixed; z-index: 120; display: grid; gap: 8px;
  padding: 14px; border-radius: 18px;
  background: var(--bg-elev); color: var(--text);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong);
}
.copy-box[hidden] { display: none; }
.copy-box input { width: 100%; }

/* Admin: bulk naming, charts, duplicates, entertainment */
.bulk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.bulk-card {
  display: grid; gap: 6px; align-content: start; padding: 8px; border-radius: 16px; cursor: pointer;
  background: var(--bg-elev); border: 2px solid var(--line); min-width: 0; transition: border-color 0.15s, box-shadow 0.15s;
}
.bulk-card.is-on { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(80, 200, 120, 0.25); }
.bulk-card strong { font-family: var(--hebrew); font-weight: 600; overflow-wrap: anywhere; }
.bulk-card .quiet { font-size: 0.8rem; overflow-wrap: anywhere; }
.bulk-names { display: flex; flex-wrap: wrap; gap: 4px; }
.bulk-names .chip { font-size: 0.8rem; padding-block: 2px; padding-inline: 10px 2px; min-height: 0; max-width: 100%; overflow-wrap: anywhere; }
.bulk-art { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-elev-2); display: grid; place-items: center; }
.bulk-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bulk-check {
  position: absolute; top: 8px; inset-inline-start: 8px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: transparent; border: 2px solid #fff;
}
.bulk-check svg { width: 18px; height: 18px; }
.bulk-card.is-on .bulk-check { background: var(--green); color: var(--green-ink); }
.bulk-bar {
  position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  padding: 12px 14px; background: var(--bg-elev); box-shadow: var(--shadow-lg);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar > strong { align-self: center; white-space: nowrap; }
.bulk-bar .field { flex: 1 1 180px; margin: 0; }
.bulk-bar .toolbar { margin: 0; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: 8px 0 0; overflow-x: auto; direction: ltr; }
.chart { height: 230px; }
.chart-col { flex: 1 0 22px; max-width: 72px; display: grid; grid-template-rows: 16px minmax(0, 1fr) 56px; height: 100%; justify-items: center; min-width: 22px; }
.chart-bar { width: 100%; min-height: 2px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #1c4a9a, #061953); align-self: end; }
.chart-num { font-size: 0.7rem; color: var(--muted); align-self: end; }
.chart-label { font-size: 0.66rem; color: var(--muted); white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); padding-bottom: 4px; align-self: start; }
.dupe-group { display: grid; gap: 10px; margin-bottom: 14px; }
.dupe-files { display: grid; gap: 8px; }
.dupe-file { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.dupe-file img, .dupe-file .pick-blank { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.ent-card { display: grid; gap: 6px; align-content: start; color: inherit; text-decoration: none; min-width: 0; }
.ent-card strong { font-family: var(--hebrew); font-weight: 600; overflow-wrap: anywhere; }
.ent-card .bulk-art svg { width: 48px; height: 48px; color: var(--muted); }
.ent-card .play-badge { position: absolute; }
.ann-thumb { display: block; width: 120px; max-width: 100%; border-radius: 10px; margin-bottom: 6px; }
.ann-picks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 8px 0 16px; }
.ann-pick { display: grid; gap: 8px; }
.ann-pick .field-label { font-size: 0.9rem; color: var(--muted); }
.ann-pick-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ann-pick-face {
  width: 96px; height: 96px; border-radius: 14px; overflow: hidden; flex: 0 0 auto;
  background: var(--bg-elev-2); border: 1px solid var(--line); display: grid; place-items: center;
}
.ann-pick-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ann-pick-face .pick-blank { font-size: 1.6rem; color: var(--muted); }
.ent-items { display: grid; gap: 8px; margin: 10px 0; }
.ent-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ent-item img, .ent-item .pick-blank { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; display: grid; place-items: center; }
@media (max-width: 900px) {
  .bulk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bulk-bar { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dupe-file { grid-template-columns: auto 48px minmax(0, 1fr); }
  .dupe-file a { grid-column: 3; }
}

/* Icons: the soft second tone deepens on hover and on the open page */
svg .ic-d { fill: currentColor; fill-opacity: var(--duo, 0.16); stroke: none; transition: fill-opacity 0.25s var(--ease); }
.side-nav a:hover, .side-admin a:hover, .sheet a:hover, .icon-btn:hover, .account-menu a:hover { --duo: 0.28; }
.side-nav a.active, .side-admin a.active, .sheet a.active { --duo: 0.42; }
.shot-fav.on, .like-btn.on, .chat-like.on, .stage-tools .is-on { --duo: 0.34; }

/* Touch feedback: a ripple from where the finger lands, and a small press */
/* clip, not hidden: hidden lets a button in a flex row shrink to nothing while the ripple runs. */
.has-ripple { overflow: hidden; overflow: clip; }
i.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  background: currentColor; opacity: 0.18; transform: scale(0);
  animation: ripple 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
:is(.btn, .icon-btn, .chip, .shelves a, .upload-btn, .rail-nav button, .notice-step, .player-btn, .music-controls button,
  .np-icon, .side-fold, .more-btn, .shot-fav, .like-btn, .stage-tools button, .stage-tools a, .viewer-close,
  .chat-tool, .chat-send, .chat-act, .menu-account, .notice-close):active {
  transform: scale(0.93); transition-duration: 0.08s;
}
.stage-nav:active { transform: translateY(-50%) scale(0.9); }
/* With a mouse a card presses in right away; on touch, motion.js presses it only once it is clearly a tap,
   so a finger that lands on a picture to scroll does not look like it is opening it. */
@media (hover: hover) {
  :is(.shot, .video-card, .album, .person-card, .feature-card, .artist-pill, .folder-card, .song):active {
    transform: scale(0.975); transition-duration: 0.1s;
  }
}
:is(.side-nav a, .sheet a):active, .is-pressed { transform: scale(0.975); transition-duration: 0.1s; }
.upload-btn { transition: transform 0.3s var(--spring), box-shadow 0.25s var(--ease), background 0.25s; }
.upload-btn:hover .upload-mark svg { animation: nudge-down 0.6s var(--spring); }
@keyframes nudge-down { 40% { transform: translateY(3px); } }
.rail-nav button, .more-btn, .player-btn, .music-controls button, .side-fold, .notice-close { transition: background 0.18s var(--ease), border-color 0.18s, color 0.18s, transform 0.3s var(--spring); }

/* Likes burst out with a ring */
.shot-fav, .like-btn { position: relative; }
.shot-fav.pop::after, .like-btn.pop::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--green-2); animation: like-ring 0.55s var(--ease) forwards;
}
@keyframes like-ring { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

/* Pages ease in; cards rise as they come into view; pictures fade in once loaded */
#view > * { animation: view-in 0.45s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
.motion [data-reveal] { opacity: 0; transform: translateY(18px) scale(0.985); }
.motion [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease) var(--reveal-delay, 0ms), transform 0.75s var(--ease) var(--reveal-delay, 0ms);
}
.motion :is(.shot img, .video-card img, .album-cover img, .artist-circle img, .person-card img, .face-stack img, .song-art,
  .search-shot img, .collage-side img, .collage.single:not(.fresh-frame) img, .pick img, .ent-art img, .ent-photo img) { opacity: 0; }
.motion :is(.shot img, .video-card img, .album-cover img, .artist-circle img, .person-card img, .face-stack img, .song-art,
  .search-shot img, .collage-side img, .collage.single:not(.fresh-frame) img, .pick img, .ent-art img, .ent-photo img).is-loaded { opacity: 1; }
.motion :is(.album-cover img, .artist-circle img, .song-art, .search-shot img, .pick img, .face-stack img) { transition: opacity 0.5s var(--ease), transform 0.4s var(--ease); }
.motion .person-card img { transition: opacity 0.5s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.motion :is(.shot, .video-card, .album-cover):has(> img:not(.is-loaded)) {
  background: linear-gradient(100deg, var(--bg-elev-2-solid) 30%, color-mix(in srgb, var(--bg-elev-2-solid) 55%, var(--bg-elev-solid)) 50%, var(--bg-elev-2-solid) 70%);
  /* A few rounds, not forever: cards off to the side of a row only load when reached. */
  background-size: 250% 100%; animation: shine 1.6s ease-in-out 4;
}
.motion .shot:has(> img:not(.is-loaded)) img[style*="aspect-ratio"] { min-height: 0; }
.motion .shot:has(> img:not(.is-loaded)) img:not([style]) { min-height: 160px; }

/* The phone menu: links slide in one after another */
@media (max-width: 900px) {
  .sheet.open .sheet-nav > *, .sheet.open .sheet-foot > *, .sheet.open .sheet-who {
    animation: sheet-item 0.45s var(--ease) both; animation-delay: calc(60ms + var(--i, 0) * 22ms);
  }
  @keyframes sheet-item { from { opacity: 0; transform: translateX(28px); } }
  html[dir="ltr"] .sheet.open .sheet-nav > * { animation-name: sheet-item-ltr; }
  @keyframes sheet-item-ltr { from { opacity: 0; transform: translateX(-28px); } }
  .sheet-scrim { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
}

/* Menus and pop-ups open with a little spring */
.account-menu, .playlist-menu, .comment-pop, .suggest { transform-origin: top center; animation: menu-pop 0.28s var(--spring); }
@keyframes menu-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal { animation: modal-in 0.4s var(--spring); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
.modal-back, .picker-pop { animation: palette-fade 0.25s var(--ease); }

/* The Hebrew calendar (לוח) */
.sheet-nav .side-group .side-label { margin: 0 12px 6px; }
.luach { --heat: var(--green-2); }
.luach-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 560px); gap: 18px 28px; align-items: end; margin: 6px 0 22px; }
.luach-intro .page-title { margin-bottom: 4px; }
.luach-intro .quiet { margin: 0; }
.luach-find {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 6px; padding-inline-start: 14px;
  border-radius: 999px; background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.luach-find:focus-within { border-color: var(--green-2); box-shadow: var(--ring), var(--shadow); }
.luach-find-icon { display: grid; color: var(--muted); }
.luach-find-icon svg { width: 20px; height: 20px; }
.luach-find input[name="q"] { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1rem; padding: 8px 2px; }
.luach-find input[name="q"]::placeholder { color: var(--muted); }
.luach-pick {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.luach-pick:hover { background: var(--bg-elev-2); color: var(--text); transform: scale(1.06); }
.luach-pick svg { width: 21px; height: 21px; }
.luach-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.luach-pick input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.luach-find .btn { flex: none; min-height: 40px; }
.luach-hint {
  position: absolute; top: calc(100% + 8px); inset-inline: 10px; z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-md); background: var(--bg-elev-solid); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg); animation: menu-pop 0.28s var(--spring);
}
.luach-hint[hidden] { display: none; }
.luach-hint svg { width: 20px; height: 20px; flex: none; color: var(--green-2); }
.luach-hint span { display: grid; }
.luach-hint small { color: var(--muted); font-size: 0.82rem; }
.luach-hint.is-miss { color: var(--muted); }

.luach-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.luach-month {
  --shift: 0px; position: relative; padding: 18px 18px 14px; border-radius: var(--r-xl);
  background: var(--bg-elev-solid); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: 90px;
}
[dir="rtl"] .luach-month[data-way="1"], .luach-month[data-way="-1"] { --shift: -30px; }
[dir="rtl"] .luach-month[data-way="-1"], .luach-month[data-way="1"] { --shift: 30px; }
.luach-skeleton { height: 520px; }
.luach-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.luach-title { text-align: center; min-width: 0; }
.luach-title h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.1; }
.luach-title span { color: var(--muted); font-size: 0.88rem; }
.luach-month.is-entering .luach-title { animation: luach-title 0.5s var(--ease) backwards; }
@keyframes luach-title { from { opacity: 0; transform: translateX(var(--shift)); } }
.luach-step {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text);
  transition: transform 0.3s var(--spring), background 0.2s, box-shadow 0.2s;
}
.luach-step:hover { transform: scale(1.08); background: var(--bg-elev-2-solid); box-shadow: var(--shadow-sm); }
.luach-step svg { width: 20px; height: 20px; }
.luach-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.luach-weekdays span { text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--muted); padding: 4px 0; }
.luach-weekdays span:last-child { color: color-mix(in srgb, var(--purple) 55%, var(--text)); }
.luach-weekdays i { display: none; font-style: normal; }
.luach-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.luach-cell {
  --tint: 0%; position: relative; min-width: 0; aspect-ratio: 1 / 0.92; padding: 8px 9px; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; text-align: start; cursor: pointer; font: inherit; color: var(--text);
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--heat) var(--tint), var(--bg-elev-2-solid));
  transition: transform 0.35s var(--spring), box-shadow 0.25s var(--ease), border-color 0.2s;
}
.luach-cell:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow); z-index: 2; border-color: var(--line-strong); }
.luach-cell[data-empty] { background: transparent; }
.luach-cell[data-empty]:hover { background: var(--bg-elev-2-solid); }
.luach-cell.is-shabbos { background: color-mix(in srgb, var(--heat) var(--tint), color-mix(in srgb, var(--purple) 9%, var(--bg-elev-2-solid))); }
.luach-cell.is-shabbos[data-empty] { background: color-mix(in srgb, var(--purple) 6%, transparent); }
.luach-cell.lvl-1 { --tint: 16%; }
.luach-cell.lvl-2 { --tint: 34%; }
.luach-cell.lvl-3 { --tint: 58%; color: #fff; }
.luach-cell.lvl-4 { --tint: 82%; color: #fff; border-color: transparent; box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--heat) 90%, transparent); }
.luach-cell.has-cover {
  background:
    linear-gradient(to top, color-mix(in srgb, var(--green) 88%, transparent) 0%, color-mix(in srgb, var(--green) 40%, transparent) 55%, rgba(0, 0, 0, 0.15) 100%),
    var(--cover) center / cover no-repeat, var(--green);
}
.luach-cell.lvl-4.has-cover { animation: luach-breathe 4.5s ease-in-out infinite; }
@keyframes luach-breathe { 50% { box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--heat) 100%, transparent), 0 0 0 3px color-mix(in srgb, var(--heat) 35%, transparent); } }
.luach-hd { font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1; }
.luach-gd { position: absolute; top: 8px; inset-inline-end: 9px; font-size: 0.74rem; font-weight: 500; opacity: 0.6; font-variant-numeric: tabular-nums; }
.luach-tag {
  grid-row: 3; align-self: end; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.7rem; font-weight: 600; opacity: 0.85;
}
.luach-cell.is-occasion .luach-tag { color: #9a6a0c; opacity: 1; }
html[data-theme="dark"] .luach-cell.is-occasion .luach-tag { color: var(--warning); }
.luach-cell.lvl-3 .luach-tag, .luach-cell.lvl-4 .luach-tag { color: #fff; }
.luach-count {
  position: absolute; bottom: 7px; inset-inline-end: 7px; min-width: 22px; padding: 2px 7px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--heat) 22%, var(--bg-elev-solid)); color: var(--text);
}
.luach-cell:has(.luach-tag) .luach-count { bottom: auto; top: 30px; }
.luach-cell.lvl-3 .luach-count, .luach-cell.lvl-4 .luach-count { background: rgba(255, 255, 255, 0.94); color: #1c3b1e; }
.luach-cell.lvl-4 .luach-count { font-size: 0.8rem; padding: 3px 9px; }
.luach-cell.is-today::after {
  content: ""; position: absolute; inset: 3px; border-radius: calc(var(--r-md) - 3px); pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--navy) 70%, var(--green-2)); animation: luach-today 2.4s ease-in-out infinite;
}
html[data-theme="dark"] .luach-cell.is-today::after { border-color: #b7c8ff; }
@keyframes luach-today { 50% { opacity: 0.35; } }
.luach-cell.is-picked { transform: scale(1.05); z-index: 3; box-shadow: 0 0 0 3px var(--bg-elev-solid), 0 0 0 5px var(--green-2), var(--shadow-lg); }
.luach-month.is-entering .luach-cell { animation: luach-cell 0.55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 11ms); }
.luach-month.is-entering .luach-cell.lvl-4.has-cover { animation: luach-cell 0.55s var(--ease) backwards, luach-breathe 4.5s ease-in-out 1s infinite; animation-delay: calc(var(--i, 0) * 11ms), 1s; }
@keyframes luach-cell { from { opacity: 0; transform: translateX(var(--shift)) translateY(6px) scale(0.94); } }
.luach-legend { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 0.78rem; }
.luach-legend i { width: 16px; height: 16px; border-radius: 5px; background: color-mix(in srgb, var(--heat) var(--tint), var(--bg-elev-2-solid)); }
.luach-legend .lvl-1 { --tint: 16%; } .luach-legend .lvl-2 { --tint: 34%; } .luach-legend .lvl-3 { --tint: 58%; } .luach-legend .lvl-4 { --tint: 82%; }
.luach-empty { margin-top: 14px; text-align: center; color: var(--muted); }
.luach-empty p { margin: 0 0 4px; }
.luach-empty .toolbar { justify-content: center; margin: 6px 0 0; }

.luach-side { display: grid; gap: 16px; position: sticky; top: 92px; }
.luach-panel { padding: 16px; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); }
.luach-panel h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.luach-busies { display: grid; gap: 6px; }
.luach-busy {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border: 0; border-radius: var(--r-md);
  background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
  transition: background 0.2s, transform 0.3s var(--spring);
}
.luach-busy:hover { background: var(--bg-elev-2); transform: translateX(-3px); }
[dir="ltr"] .luach-busy:hover { transform: translateX(3px); }
.luach-busy-art { width: 52px; height: 52px; flex: none; border-radius: 12px; background: var(--green) center / cover no-repeat; box-shadow: var(--shadow-sm); }
.luach-busy-text { display: grid; min-width: 0; }
.luach-busy-text strong { font-weight: 600; font-size: 0.95rem; }
.luach-busy-text small { color: var(--muted); font-size: 0.8rem; }
.luach-year + .luach-year { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.luach-year h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font-family: var(--display); font-size: 1.1rem; font-weight: 800; }
.luach-year h3 small { font-family: var(--sans); font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.luach-month-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  padding: 5px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; font: inherit; cursor: pointer;
  text-align: start; transition: background 0.2s;
}
.luach-month-row:hover { background: var(--bg-elev-2); }
.luach-month-row span { font-weight: 500; font-size: 0.9rem; }
.luach-month-row i {
  display: block; height: 8px; border-radius: 99px; background: var(--line);
  overflow: hidden; position: relative;
}
.luach-month-row i::after {
  content: ""; position: absolute; inset: 0; inset-inline-end: auto; width: calc(var(--share) * 100%); border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--green-2)); transform-origin: right; animation: luach-bar 0.9s var(--ease) both;
}
[dir="ltr"] .luach-month-row i::after { transform-origin: left; }
@keyframes luach-bar { from { transform: scaleX(0); } }
.luach-month-row small { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.luach-undated { margin: 12px 0 0; font-size: 0.82rem; display: grid; gap: 8px; justify-items: start; }
.luach-undated p { margin: 0; }
.luach-undated .btn, .luach-day-tools .btn { display: inline-flex; align-items: center; gap: 7px; }
.luach-undated .btn svg, .luach-day-tools .btn svg { width: 17px; height: 17px; }

.luach-day {
  margin-top: 24px; padding: 18px; border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); scroll-margin-top: 86px; animation: luach-day 0.5s var(--ease) both;
}
.luach-day[hidden] { display: none; }
@keyframes luach-day { from { opacity: 0; transform: translateY(18px); } }
.luach-day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.luach-day-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.6rem; }
.luach-day-head .eyebrow { margin-bottom: 4px; }
.luach-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.luach-chip { padding: 3px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: color-mix(in srgb, var(--green-2) 18%, transparent); color: color-mix(in srgb, var(--green) 70%, var(--text)); }
.luach-none { margin: 10px 0; }
.viewer-day { margin: 10px 0 0; }
.viewer-day .chip { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.viewer-day svg { width: 16px; height: 16px; }
.luach-more { text-align: center; margin: 8px 0 0; }

@media (max-width: 1100px) {
  .luach-head { grid-template-columns: 1fr; }
  .luach-body { grid-template-columns: 1fr; }
  .luach-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 700px) {
  .luach-month { padding: 12px 8px 10px; border-radius: var(--r-lg); }
  .luach-grid, .luach-weekdays { gap: 3px; }
  .luach-weekdays b { display: none; }
  .luach-weekdays i { display: inline; }
  /* Small cells: the Hebrew day over the Gregorian one, centred; colour shows how full the day is. */
  .luach-cell { aspect-ratio: 1 / 1.22; padding: 6px 3px 4px; border-radius: 10px; grid-template-rows: auto auto 1fr; justify-items: center; text-align: center; }
  .luach-hd { font-size: 1.02rem; }
  .luach-gd { position: static; font-size: 0.58rem; margin-top: 2px; }
  .luach-tag { font-size: 0.5rem; max-width: 100%; }
  .luach-count { display: none; }
  .luach-cell.is-picked { transform: none; box-shadow: inset 0 0 0 2px var(--green-2); }
  .luach-step { width: 40px; height: 40px; }
  .luach-find { padding-inline-start: 10px; }
  .luach-find .btn { padding: 0 14px; }
  .luach-day { padding: 14px 10px; }
}

/* Entertainment: a fun little streaming app built from the entertainment folder */
.ent { --accent: var(--green-2); }
.ent-eyebrow { margin: 0 0 6px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.ent-hero {
  position: relative; height: clamp(320px, 54vh, 540px); border-radius: var(--r-xl); overflow: hidden; margin: 0 0 18px;
  background: #0d0716; color: #fff; box-shadow: 0 30px 70px -30px rgba(20, 6, 40, 0.75); isolation: isolate;
}
.ent-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s; }
.ent-slide.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.ent-slide:nth-child(4n + 1) { --glow: #ff4d9d; }
.ent-slide:nth-child(4n + 2) { --glow: #3ba7ff; }
.ent-slide:nth-child(4n + 3) { --glow: #ffb020; }
.ent-slide:nth-child(4n + 4) { --glow: #19c3a6; }
.ent-slide-art { position: absolute; inset: 0; background: center / cover no-repeat; transform: scale(1.06); }
.ent-slide.is-on .ent-slide-art { animation: ent-drift 16s ease-out both; }
@keyframes ent-drift { from { transform: scale(1.14) translateX(1.5%); } to { transform: scale(1.04) translateX(0); } }
.ent-slide-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s var(--ease); }
.ent-slide-video.is-on { opacity: 1; }
.ent-slide-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 60%),
    linear-gradient(to left, rgba(10, 4, 20, 0.92) 0%, rgba(10, 4, 20, 0.6) 40%, rgba(10, 4, 20, 0.05) 75%),
    linear-gradient(to top, rgba(10, 4, 20, 0.85) 0%, transparent 45%);
}
[dir="ltr"] .ent-slide-shade {
  background:
    radial-gradient(70% 90% at 0% 100%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 60%),
    linear-gradient(to right, rgba(10, 4, 20, 0.92) 0%, rgba(10, 4, 20, 0.6) 40%, rgba(10, 4, 20, 0.05) 75%),
    linear-gradient(to top, rgba(10, 4, 20, 0.85) 0%, transparent 45%);
}
.ent-slide-text { position: absolute; inset-inline-start: clamp(20px, 4vw, 52px); bottom: clamp(28px, 6vh, 60px); max-width: min(560px, 80%); z-index: 2; }
.ent-slide-text .ent-eyebrow {
  display: inline-block; padding: 4px 12px; border-radius: 999px; color: #fff;
  background: color-mix(in srgb, var(--glow) 70%, transparent); letter-spacing: 0.04em;
}
.ent-slide-text h2 { margin: 6px 0 18px; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 4.6vw, 3.7rem); line-height: 1.04; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); }
.ent-slide.is-on .ent-slide-text > * { animation: ent-rise 0.8s var(--ease) both; }
.ent-slide.is-on .ent-slide-text > *:nth-child(2) { animation-delay: 0.08s; }
.ent-slide.is-on .ent-slide-text > *:nth-child(3) { animation-delay: 0.16s; }
@keyframes ent-rise { from { opacity: 0; transform: translateY(18px); } }
.ent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ent-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px 12px 22px; border-radius: 999px;
  background: #fff; color: #120a1c; font-weight: 700; font-size: 1.05rem; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s var(--spring), box-shadow 0.3s;
}
.ent-cta svg { width: 20px; height: 20px; }
.ent-cta:hover { transform: scale(1.06); box-shadow: 0 16px 36px -8px color-mix(in srgb, var(--glow) 70%, transparent); }
.ent-dots { position: absolute; bottom: 18px; inset-inline-end: 22px; z-index: 3; display: flex; gap: 6px; }
.ent-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.4); cursor: pointer; transition: width 0.35s var(--ease), background 0.2s; }
.ent-dots button.is-on { width: 28px; background: #fff; }

.ent-cats {
  position: sticky; top: 70px; z-index: 6; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  margin: 0 calc(-1 * clamp(18px, 3vw, 40px)) 6px; padding: 10px clamp(18px, 3vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.ent-cats::-webkit-scrollbar { display: none; }
.ent-cats a {
  display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 16px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--line); font-weight: 600; font-size: 0.92rem;
  transition: background 0.25s, color 0.25s, transform 0.3s var(--spring), box-shadow 0.25s;
}
.ent-cats a i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.ent-cats a:hover { transform: translateY(-2px); }
.ent-cats a.is-on { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -8px var(--accent); }
.ent-cats a.is-on i { background: #fff; box-shadow: none; }

.ent-cat {
  margin: 26px calc(-1 * min(16px, 2vw)) 0; padding: 22px min(16px, 2vw) 6px; border-radius: var(--r-xl); scroll-margin-top: 130px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 260px);
}
.ent-cat-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.ent-cat-head h2 { position: relative; margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.ent-cat-head h2::after { content: ""; display: block; width: 54px; height: 6px; margin-top: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff)); }
.ent-cat-head span { color: var(--muted); font-size: 0.88rem; }

.ent-shelf { margin: 18px 0 8px; }
.ent-shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ent-shelf-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.15rem; font-weight: 700; }
.ent-shelf-head h3 small { padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; color: var(--muted); background: var(--bg-elev-2); }
.ent-shelf-head .ent-eyebrow { margin-bottom: 2px; color: var(--accent); }
.ent-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--accent); color: #fff; --duo: 0.4; transform: rotate(-8deg); }
.ent-badge svg { width: 17px; height: 17px; }
.ent-rail {
  display: grid; grid-auto-flow: column; gap: 14px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 8px 4px 18px; margin: -8px -4px 0; scrollbar-width: none;
}
.ent-rail::-webkit-scrollbar { display: none; }
.ent-rail > * { scroll-snap-align: start; }
.is-movie .ent-rail { grid-auto-columns: minmax(300px, 34%); }
/* A category's only film gets the whole row, like a cinema banner. */
.is-feature .ent-rail { grid-auto-columns: 100%; }
.is-feature .ent-movie .ent-art { aspect-ratio: 21 / 8; border-radius: 24px; }
.is-feature .ent-movie-shade { border-radius: 24px; background: linear-gradient(to left, rgba(8, 3, 16, 0.9) 0%, rgba(8, 3, 16, 0.35) 45%, transparent 70%), linear-gradient(to top, rgba(8, 3, 16, 0.6), transparent 50%); }
[dir="ltr"] .is-feature .ent-movie-shade { background: linear-gradient(to right, rgba(8, 3, 16, 0.9) 0%, rgba(8, 3, 16, 0.35) 45%, transparent 70%), linear-gradient(to top, rgba(8, 3, 16, 0.6), transparent 50%); }
.is-feature .ent-movie-text { inset-inline: 32px auto; bottom: 28px; max-width: 60%; }
.is-feature .ent-movie-text strong { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.is-feature .ent-movie-text small { font-size: 0.92rem; }
.is-feature .ent-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 1; transform: none; }
.is-feature .ent-movie:hover { transform: translateY(-4px); }
.is-clip .ent-rail { grid-auto-columns: 250px; }
.is-short .ent-rail { grid-auto-columns: 172px; }
.is-photo .ent-rail { grid-auto-columns: 190px; }

.ent-art { position: relative; display: block; overflow: hidden; border-radius: 16px; background: var(--bg-elev-2-solid); }
.ent-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease), opacity 0.5s var(--ease); }
.ent-movie, .ent-clip, .ent-short, .ent-photo { position: relative; display: block; color: inherit; transition: transform 0.4s var(--spring); }
.ent-movie:hover, .ent-clip:hover, .ent-photo:hover { transform: translateY(-6px); }
.ent-short:hover { transform: translateY(-6px) rotate(-1.5deg); }
.ent-movie:hover .ent-art img, .ent-clip:hover .ent-art img, .ent-short:hover .ent-art img, .ent-photo:hover img { transform: scale(1.08); }
.ent-movie .ent-art, .ent-clip .ent-art, .ent-short .ent-art, .ent-photo { transition: box-shadow 0.35s var(--ease); }
.ent-movie:hover .ent-art, .ent-clip:hover .ent-art, .ent-short:hover .ent-art, .ent-photo:hover { box-shadow: 0 20px 40px -16px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 0 2px var(--accent); }

.ent-movie .ent-art { aspect-ratio: 16 / 9; border-radius: 20px; }
.ent-movie-shade { position: absolute; inset: 0; border-radius: 20px; background: linear-gradient(to top, rgba(8, 3, 16, 0.88) 0%, rgba(8, 3, 16, 0.2) 55%, transparent 80%); pointer-events: none; }
.ent-movie-text { position: absolute; inset-inline: 16px; bottom: 14px; color: #fff; display: grid; gap: 2px; }
.ent-movie-text strong { font-family: var(--display); font-weight: 800; font-size: 1.3rem; line-height: 1.15; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ent-movie-text small { font-size: 0.8rem; opacity: 0.85; font-weight: 500; }
.ent-play {
  position: absolute; top: 50%; left: 50%; z-index: 2; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: #140a1c;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 0 0 6px rgba(255, 255, 255, 0.2);
  opacity: 0; transform: scale(0.7); transition: opacity 0.25s, transform 0.4s var(--spring);
}
.ent-play svg { width: 20px; height: 20px; margin-left: 3px; }
.ent-movie:hover .ent-play, .ent-clip:hover .ent-play, .ent-movie:focus-visible .ent-play, .ent-clip:focus-visible .ent-play { opacity: 1; transform: none; }
@media (hover: none) { .ent-movie .ent-play { opacity: 0.92; transform: scale(0.85); } }
.ent-clip .ent-art { aspect-ratio: 16 / 9; }
.ent-clip > strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-weight: 600; font-size: 0.94rem; line-height: 1.3; }
.ent-time {
  position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 2; padding: 2px 8px; border-radius: 7px; direction: ltr;
  background: rgba(8, 3, 16, 0.78); color: #fff; font-size: 0.74rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ent-progress { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; height: 4px; background: rgba(255, 255, 255, 0.3); }
.ent-progress i { display: block; height: 100%; background: var(--accent); }
.ent-short { width: 100%; padding: 0; border: 0; background: none; font: inherit; text-align: start; cursor: pointer; }
.ent-short .ent-art { aspect-ratio: 9 / 16; border-radius: 20px; }
.ent-short .ent-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 3, 16, 0.85), transparent 45%); }
.ent-short-text { position: absolute; inset-inline: 12px; bottom: 12px; z-index: 2; display: grid; gap: 4px; color: #fff; }
.ent-short-text strong { font-weight: 700; font-size: 0.92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.ent-short-text small { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; font-weight: 600; opacity: 0.9; }
.ent-short-text small svg { width: 14px; height: 14px; }
.ent-photo { aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--bg-elev-2-solid); }
.ent-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }

@media (max-width: 700px) {
  .ent-hero { height: 62vh; border-radius: var(--r-lg); margin-inline: -4px; }
  .ent-slide-text { max-width: 88%; }
  .ent-cats { top: 64px; }
  .ent-cat { margin-inline: -8px; padding-inline: 8px; }
  .is-movie .ent-rail { grid-auto-columns: 80vw; }
  .is-feature .ent-rail { grid-auto-columns: 100%; }
  .is-feature .ent-movie .ent-art { aspect-ratio: 16 / 10; }
  .is-feature .ent-movie-text { inset-inline: 18px; bottom: 18px; max-width: none; }
  .is-clip .ent-rail { grid-auto-columns: 64vw; }
  .is-short .ent-rail { grid-auto-columns: 40vw; }
  .is-photo .ent-rail { grid-auto-columns: 42vw; }
  .ent-shelf-head .rail-nav { display: none; }
}

/* Shorts: full screen, one upright video at a time */
html.shorts-open, html.shorts-open body { overflow: hidden; }
.shorts { position: fixed; inset: 0; z-index: 95; background: #000; color: #fff; animation: shorts-in 0.35s var(--ease); }
.shorts.is-closing { animation: shorts-out 0.26s var(--ease) forwards; }
@keyframes shorts-in { from { opacity: 0; transform: scale(1.04); } }
@keyframes shorts-out { to { opacity: 0; transform: scale(0.97); } }
.shorts-feed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.shorts-feed::-webkit-scrollbar { display: none; }
.shorts-slide { position: relative; height: 100%; display: grid; place-items: center; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.shorts-glow { position: absolute; inset: -60px; background: center / cover no-repeat; filter: blur(46px) saturate(1.5) brightness(0.45); }
.shorts-frame { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #000; overflow: hidden; }
.shorts-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shorts-info { position: absolute; inset-inline: 16px 76px; bottom: 26px; z-index: 2; display: grid; gap: 4px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); pointer-events: none; }
.shorts-info strong { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.shorts-info span { font-size: 0.86rem; opacity: 0.85; }
.shorts-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 35%); }
.shorts-side { position: absolute; inset-inline-end: 12px; bottom: 26px; z-index: 3; display: grid; gap: 14px; }
.shorts-btn {
  position: relative; display: grid; place-items: center; gap: 2px; width: 50px; min-height: 50px; padding: 8px 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer;
  transition: transform 0.35s var(--spring), background 0.2s;
}
.shorts-btn:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.08); }
.shorts-btn svg { width: 24px; height: 24px; }
.shorts-btn b { font-size: 0.72rem; font-weight: 700; }
.shorts-btn.on { background: #fff; color: #e2335f; --duo: 0.9; }
.shorts-btn.pop { animation: thumb-pop 0.48s var(--ease); }
.shorts.is-muted [data-sound]::after { content: ""; position: absolute; width: 30px; height: 2.5px; border-radius: 2px; background: #fff; transform: rotate(-45deg); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.35); }
.shorts-bar { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; height: 3px; background: rgba(255, 255, 255, 0.25); direction: ltr; }
.shorts-bar i { display: block; height: 100%; width: 0; background: #fff; }
.shorts-paused, .shorts-heart { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.shorts-paused { width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); transition: opacity 0.2s, transform 0.3s var(--spring); transform: scale(0.8); }
.shorts-paused svg { width: 36px; height: 36px; margin-left: 5px; }
.shorts-slide.is-paused .shorts-paused { opacity: 1; transform: none; }
.shorts-heart { width: 140px; height: 140px; margin: -70px 0 0 -70px; color: #fff; --duo: 0.9; filter: drop-shadow(0 8px 24px rgba(226, 51, 95, 0.8)); }
.shorts-heart svg { width: 100%; height: 100%; }
.shorts-slide.is-loved .shorts-heart { animation: shorts-love 0.9s var(--ease); }
@keyframes shorts-love { 0% { opacity: 0; transform: scale(0.3) rotate(-20deg); } 25% { opacity: 1; transform: scale(1.15) rotate(6deg); } 60% { opacity: 1; transform: scale(1) rotate(0); } 100% { opacity: 0; transform: scale(1.3) translateY(-40px); } }
.shorts-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px; z-index: 5; width: 46px; height: 46px;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer;
  backdrop-filter: blur(10px); transition: transform 0.3s var(--spring), background 0.2s;
}
.shorts-close:hover { transform: rotate(90deg); background: rgba(255, 255, 255, 0.28); }
.shorts-close svg { width: 22px; height: 22px; }
.shorts-steps { position: absolute; inset-inline-start: 24px; top: 50%; z-index: 5; display: grid; gap: 10px; transform: translateY(-50%); }
.shorts-steps button { width: 50px; height: 50px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; transition: transform 0.3s var(--spring), background 0.2s; }
.shorts-steps button:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.08); }
.shorts-steps svg { width: 22px; height: 22px; }
@media (min-width: 701px) {
  /* On a wide screen the buttons sit beside the video, so the frame lets them show. */
  .shorts-frame { height: calc(100% - 36px); overflow: visible; }
  .shorts-video, .shorts-frame::after { border-radius: 22px; }
  .shorts-video { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
  .shorts-bar { inset-inline: 14px; bottom: 6px; border-radius: 99px; overflow: hidden; }
  .shorts-side { inset-inline-end: -70px; }
  .shorts-info { inset-inline-end: 16px; }
}
@media (max-width: 700px) {
  .shorts-frame { width: 100%; aspect-ratio: auto; }
  .shorts-steps { display: none; }
}

/* The install card in the profile menu */
.install-card { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 6px 4px 2px; }
.install-card img { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow); animation: install-bob 2.4s ease-in-out infinite; }
@keyframes install-bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.install-card h2 { margin: 6px 0 0; }
.install-card p { margin: 0 0 6px; color: var(--muted); line-height: 1.6; }

/* ── Notifications: for me / for everyone / settings ─────────────────────── */
.notes-page { max-width: 760px; }
.notes-head .btn { display: inline-flex; align-items: center; gap: 6px; }
.notes-head .btn svg { width: 16px; height: 16px; }
.notes-tabs {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  padding: 5px; margin: 6px 0 22px; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--line);
}
.notes-tabs button {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--muted);
  font: 600 0.95rem var(--sans); cursor: pointer; transition: color 0.2s var(--ease);
}
.notes-tabs button svg { width: 18px; height: 18px; flex: none; }
.notes-tabs button.is-on { color: var(--text); }
.notes-tab-glow {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; border-radius: 999px;
  background: var(--bg-elev-solid); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line-strong);
  transition: transform 0.38s var(--spring), width 0.3s var(--ease);
}
.note-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center;
  background: var(--green-2); color: var(--green-ink); font-size: 0.72rem; font-weight: 700;
}
.notes-pane[hidden] { display: none; }
.notes-pane { animation: notes-in 0.35s var(--ease) both; }
@keyframes notes-in { from { opacity: 0; transform: translateY(6px); } }
.note-day + .note-day { margin-top: 22px; }
.note-day h3 { margin: 0 4px 8px; font: 700 0.78rem var(--sans); letter-spacing: 0.04em; color: var(--muted); }
.note-list { display: flex; flex-direction: column; gap: 6px; }
.note-row {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: background 0.2s, border-color 0.2s, transform 0.25s var(--spring);
}
.note-row:hover { background: var(--bg-elev-2); border-color: var(--line-strong); }
.note-row.is-unread { background: color-mix(in srgb, var(--green-2) 9%, var(--bg-elev-solid)); border-color: color-mix(in srgb, var(--green-2) 30%, transparent); }
.note-row.is-unread::before {
  content: ""; position: absolute; inset-inline-start: -4px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 3px var(--bg);
}
.note-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.note-icon svg { width: 21px; height: 21px; }
.tone-green { background: linear-gradient(135deg, #4e8b50, #2f6b3a); }
.tone-blue { background: linear-gradient(135deg, #3ba7ff, #2563eb); }
.tone-violet { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }
.tone-pink { background: linear-gradient(135deg, #ff4d9d, #c0267a); }
.tone-gold { background: linear-gradient(135deg, #ffb020, #e07b00); }
.tone-teal { background: linear-gradient(135deg, #19c3a6, #0e8a7a); }
.tone-orange { background: linear-gradient(135deg, #ff8a3d, #e2522c); }
.tone-gray { background: linear-gradient(135deg, #8a8396, #5d5669); }
.note-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.note-copy strong { font-weight: 600; line-height: 1.35; }
.note-row.is-unread .note-copy strong { font-weight: 700; }
.note-body { color: var(--muted); font-size: 0.9rem; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-row time { color: var(--muted); font-size: 0.78rem; white-space: nowrap; align-self: start; padding-top: 3px; }

.notes-settings { display: flex; flex-direction: column; gap: 14px; }
.note-group { padding: 18px; border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--line); }
.note-group-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.note-group-head h3 { margin: 0 0 2px; font: 700 1.05rem var(--sans); }
.note-group-head p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.note-badge { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--bg-elev-2); color: var(--muted); transition: background 0.3s, color 0.3s; }
.note-badge svg { width: 20px; height: 20px; }
.note-badge.is-everyone { background: color-mix(in srgb, #3ba7ff 18%, transparent); color: #3ba7ff; }
.note-badge.is-mine { background: color-mix(in srgb, #ff4d9d 16%, transparent); color: #ff4d9d; }
.note-group.is-device.is-on .note-badge { background: var(--green-2); color: var(--green-ink); }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 2px; border-top: 1px solid var(--line); cursor: pointer;
}
.note-group-head + .switch-row { border-top: 0; }
.switch-row.is-big { margin-top: 6px; padding: 14px 16px; border: 0; border-radius: var(--r-md); background: var(--bg-elev-2); }
.switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-text strong { font-weight: 600; }
.switch-text small { color: var(--muted); font-size: 0.82rem; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; margin: 0;
  border-radius: 99px; background: var(--line-strong); cursor: pointer; transition: background 0.25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--spring);
}
.switch:checked { background: var(--green-2); }
.switch:checked::after { transform: translateX(20px); }
[dir="rtl"] .switch:checked::after { transform: translateX(-20px); }
.switch:focus-visible { outline: none; box-shadow: var(--ring); }
.note-always { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.note-always svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--green-2); }
@media (max-width: 700px) {
  .notes-tabs button { flex-direction: column; gap: 2px; min-height: 52px; font-size: 0.8rem; }
  .notes-tabs { border-radius: 22px; }
  .notes-tabs button, .notes-tab-glow { border-radius: 17px; }
  .note-count { position: absolute; top: 4px; inset-inline-end: 10px; }
  .note-row { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .note-icon { width: 40px; height: 40px; }
  .note-row time { grid-column: 2; padding: 0; }
  .note-group { padding: 16px 14px; }
}

/* ── On this day: the same Hebrew date in earlier years, on the home page ── */
.day-card { position: relative; }
.day-card .day-badge {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; padding: 5px 11px; border-radius: 99px;
  font-size: 0.76rem; font-weight: 700; color: #fff; background: rgba(12, 6, 20, 0.66);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.day-card.is-today .day-badge { background: linear-gradient(135deg, #4e8b50, #2f6b3a); }
.day-card.is-today .collage { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-2) 55%, transparent), var(--shadow-sm); }
.day-card .day-occasion { color: var(--green-2); font-weight: 600; }

/* ── Setting dates by hand in the calendar (administrators) ───────────────── */
.luach-day-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.luach-day.is-choosing [data-media] { cursor: copy; }
.luach-day.is-choosing [data-media] .shot-tools { display: none; }
.luach-day.is-choosing [data-media]::after {
  content: ""; position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(12, 6, 20, 0.35); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: background 0.2s, transform 0.25s var(--spring);
}
.luach-day.is-choosing [data-media].is-chosen { outline: 3px solid var(--green-2); outline-offset: 2px; }
.luach-day.is-choosing [data-media].is-chosen img { opacity: 0.82; }
.luach-day.is-choosing [data-media].is-chosen::after {
  background: var(--green-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
  transform: scale(1.1);
}
.date-fixer {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 16px; padding: 14px 16px;
  display: grid; gap: 10px; border-radius: var(--r-xl); background: var(--bg-elev-solid);
  border: 1px solid color-mix(in srgb, var(--green-2) 40%, var(--line)); box-shadow: var(--shadow-lg);
  animation: notes-in 0.35s var(--ease) both;
}
.date-fixer-hint { margin: 0; color: var(--muted); font-size: 0.86rem; }
.date-fixer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.date-fixer-row strong { margin-inline-end: auto; }
.date-fixer-input {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 99px; background: var(--bg-elev-2); border: 1px solid var(--line-strong);
}
.date-fixer-input svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.date-fixer-input input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: inherit; outline: none; }
.date-fixer-pick { min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-elev-2); color: inherit; font: inherit; }
.date-fixer-read { flex-basis: 100%; font-size: 0.86rem; font-weight: 600; color: var(--green-2); min-height: 1.2em; }
.date-fixer-read.is-miss { color: var(--danger); }
@media (max-width: 700px) {
  .date-fixer { padding: 12px; gap: 8px; }
  .date-fixer-hint { display: none; }
  .date-fixer-input { flex: 1 1 0; min-width: 0; }
  .date-fixer-pick { width: 148px; flex: none; }
  .date-fixer-row .btn { flex: 1 1 auto; min-height: 42px; }
  .luach-day-tools .btn span { display: none; }
}

/* ── The film at the top of a person's page (film.js) ──────────────────────── */
.film-box {
  position: relative; height: clamp(200px, 26vh, 330px); margin: 6px 0 26px; border-radius: var(--r-xl); overflow: hidden;
  background: #07040b; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: film-in 0.9s var(--ease) both;
}
.film-box::after {
  content: ""; position: absolute; inset: 0; z-index: 400; pointer-events: none; border-radius: inherit;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
@keyframes film-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
.film-stage { position: absolute; inset: 0; overflow: hidden; container-type: size; color: #fff; }
.film-stage .fs { position: absolute; inset: 0; overflow: hidden; background: #07040b; }
.film-stage img, .film-stage video { display: block; }
.fa-blur { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(22px) brightness(0.6) saturate(1.2); }
.fa-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.35)); }
.fa-shade.is-deep { background: radial-gradient(ellipse at center, rgba(5, 2, 10, 0.25), rgba(5, 2, 10, 0.7)); }
.fa-mosaic { position: absolute; inset: -4%; display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 1fr; gap: 1.2cqh; opacity: 0.5; }
.fa-mosaic div { overflow: hidden; }
.fa-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.fa-title, .fa-chapter { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh; text-align: center; padding: 0 8cqw; }
.fa-title h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 22cqh, 4.2rem); line-height: 1.05; text-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.6); }
.fa-title p, .fa-chapter p { margin: 0; font-size: clamp(0.85rem, 7cqh, 1.25rem); color: #e8c983; font-weight: 600; letter-spacing: 0.03em; }
.fa-chapter i { width: 14cqw; height: 2px; background: linear-gradient(90deg, transparent, #e8c983, transparent); }
.fa-chapter h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.2rem, 15cqh, 2.6rem); line-height: 1.15; text-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.6); }
/* Each panel has its picture's own shape, so the picture shows whole. */
.fa-row { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fa-row div { flex: none; overflow: hidden; border-radius: 1.2cqh; box-shadow: 0 1.6cqh 5cqh rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.fa-row img, .fa-row video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  .film-box { height: clamp(190px, 30vh, 260px); margin-inline: -4px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* GSAP moments (flair.js); each is numbered there and can be turned off on its own. */
.flair-line { position: relative; }
.flair-line::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -7px; width: 44px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--green-2), #e8c983, var(--purple));
  transform: scaleX(var(--line, 1)); transform-origin: left;
}
[dir="rtl"] .flair-line::after { transform-origin: right; }
.flair-tilt { transform-style: preserve-3d; transition: box-shadow 0.3s var(--ease), border-color 0.25s; }
.flair-tilt::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 255, 255, 0.32), transparent 55%);
  opacity: var(--shine, 0); mix-blend-mode: soft-light;
}
.flair-lean { translate: var(--mx, 0) var(--my, 0); }
.flair-dot { position: fixed; z-index: 80; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; pointer-events: none; }
.flair-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--green-2), #e8c983, var(--purple));
  transform: scaleX(0); transform-origin: left;
}
[dir="rtl"] .flair-progress { transform-origin: right; }
.flair-top {
  position: fixed; left: 24px; bottom: 24px; z-index: 46; width: 48px; height: 48px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.flair-top svg { width: 20px; height: 20px; }
.flair-top:hover { color: var(--green-2); }
@media (max-width: 900px) { .flair-top { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); left: 16px; width: 44px; height: 44px; } }
.flair-light {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; border-radius: inherit; mix-blend-mode: soft-light;
  background: radial-gradient(circle at calc(var(--lx, 50) * 1%) calc(var(--ly, 50) * 1%), rgba(255, 255, 255, 0.55), transparent 42%);
}

/* Language and the way back. */
.back-btn { flex: none; }
.back-btn[hidden] { display: none; }
.gate-form { position: relative; }
.gate-lang {
  position: absolute; width: auto; max-width: max-content; top: 18px; inset-inline-end: 18px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-elev-solid);
  color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.gate-lang svg { width: 16px; height: 16px; }
.gate-lang:hover { border-color: var(--green-2); color: var(--green-2); }
/* On English pages a calendar square's Hebrew name gets its English name on a line of its own. */
.luach-tag-en { display: block; font-style: normal; font-size: 0.92em; opacity: 0.85; direction: ltr; overflow: hidden; text-overflow: ellipsis; }
.luach-cell:has(.luach-tag-en) .luach-count { top: 26px; }
/* Sideways rows scroll sideways only; an up-and-down swipe on them always moves the page. */
.scroller, .rail, .ent-rail { overflow-y: hidden; overscroll-behavior-y: auto; }

/* The collection's name on the home page: dark purple with a short gold line under it. Its last
   word sits in a glass button; each press sends out a ring of colour, and the word takes it. */
.hero-copy .wordmark {
  --name-base: #2B0445;
  position: relative; padding-bottom: 16px; color: var(--name-base);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.16;
}
html[data-theme="dark"] .hero-copy .wordmark { --name-base: #efe2ff; }
.hero-copy .wordmark::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 90px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, #c9a24a, #e8c983);
}
.hero-copy .wordmark .word { will-change: transform; }
.hero-copy .wordmark .word-glass { overflow: visible; padding-bottom: 0; margin-bottom: 0; }
/* A glass bubble in the word's colour: a soft tinted fill, a thin border of the same colour, a gloss
   on top and a glow underneath. --tone follows the colour chosen by pressing. */
.name-glass {
  --tone: #9b5cc9;
  position: relative; display: inline-block; margin: 0; padding: 0.02em 0.36em 0.1em; cursor: pointer;
  font: inherit; line-height: inherit; color: var(--name-base); vertical-align: baseline;
  border-radius: 0.5em; border: 1.5px solid color-mix(in srgb, var(--tone) 42%, white);
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--tone) 14%, rgba(255, 255, 255, 0.55)), color-mix(in srgb, var(--tone) 26%, rgba(255, 255, 255, 0.2)));
  -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -0.18em 0.4em color-mix(in srgb, var(--tone) 22%, transparent),
    0 0.25em 0.8em color-mix(in srgb, var(--tone) 28%, transparent);
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
html[data-theme="dark"] .name-glass {
  border-color: color-mix(in srgb, var(--tone) 55%, transparent);
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--tone) 22%, rgba(255, 255, 255, 0.06)), color-mix(in srgb, var(--tone) 34%, rgba(255, 255, 255, 0.02)));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 0.25em 0.9em color-mix(in srgb, var(--tone) 35%, transparent);
}
.name-glass:hover { transform: translateY(-1px); }
.name-glass:active { transform: scale(0.96); }
.name-glass:focus-visible { outline: 2px solid var(--tone); outline-offset: 3px; }
.name-ink { position: relative; z-index: 1; display: inline-block; }
/* The other words of the name take the colour the ball brings back. */
.hero-copy .wordmark .word:not(.word-glass) > span { color: var(--words-ink, inherit); transition: color 0.18s ease-out; }
.hero-copy .wordmark.is-new .word:not(.word-glass) > span { animation: name-ink 0.6s var(--ease); }
@keyframes name-ink { 40% { text-shadow: 0 0 26px var(--words-ink, transparent); } }
.name-glass.is-pressed { animation: name-press 0.45s var(--spring); }
@keyframes name-press { 30% { transform: scale(0.92); } 70% { transform: scale(1.06); } }
/* A big round ball of light, bright rather than dark, that swells out from the button and comes back:
   a soft filled ball, with no ring or stripe around it. */
.name-ball {
  position: fixed; z-index: 30; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--ball) 35%, white) 0%, color-mix(in srgb, var(--ball) 70%, white) 28%,
    color-mix(in srgb, var(--ball) 45%, transparent) 52%, transparent 72%);
  mix-blend-mode: normal; animation: name-ball 1.1s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}
@keyframes name-ball {
  0% { transform: scale(0.2); opacity: 0.95; }
  52% { transform: scale(6.5); opacity: 0.5; }
  100% { transform: scale(0.25); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .name-glass, .name-ink, .hero-copy .wordmark .word > span { transition: none; animation: none; } }

/* Easy to hit with a finger: small controls get a bigger touch area without looking any bigger. */
.ent-dots button { position: relative; }
.ent-dots button::before { content: ""; position: absolute; inset: -14px -3px; }
.rail-head > a, .section-head > a { padding: 9px 6px; margin: -9px -6px; }
.kw button { min-width: 28px; min-height: 28px; }
.row select, .row .btn { min-height: 36px; }
@media (max-width: 900px) {
  /* While editing words on a phone, the bar sits low so it never covers the menus at the top. */
  .copy-edit-bar { top: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* A folder with more than one kind of thing: a strip at the top shows one kind at a time. */
.kind-tabs {
  position: sticky; top: 74px; z-index: 5; display: flex; gap: 6px; width: fit-content; max-width: 100%;
  margin: 18px 0 6px; padding: 5px; border-radius: 999px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg-elev-solid) 88%, transparent); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm);
}
.kind-tabs button {
  flex: none; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--muted); background: transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.kind-tabs button[aria-selected="true"] { background: var(--green); color: var(--green-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--green) 35%, transparent); }
.kind-tabs button:not([aria-selected="true"]):hover { color: var(--text); background: var(--bg-elev-2); }
.kind-part[hidden] { display: none; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.video-grid .video-card { margin: 0; }
@media (max-width: 700px) {
  .kind-tabs { top: 64px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Members who only listen and watch: their own home page, and no download buttons anywhere. */
/* Music & entertainment members download music and videos (not the pictures' download page). */
.is-listener .upload-btn { display: none !important; }
.top-spacer { flex: 1; }
.listen-hero {
  position: relative; overflow: hidden; margin: 6px 0 30px; padding: 46px 40px 40px; border-radius: 30px; color: #fff;
  background: linear-gradient(135deg, #2B0445 0%, #4a1373 45%, #0f3b5e 100%);
  box-shadow: 0 30px 70px rgba(43, 4, 69, 0.35);
}
.listen-hero .eyebrow { color: #e8c983; }
.listen-hero h1 { position: relative; margin: 6px 0 8px; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; }
.listen-lead { position: relative; margin: 0 0 26px; font-size: 1.05rem; opacity: 0.85; max-width: 560px; }
.listen-glow { position: absolute; inset: 0; pointer-events: none; }
.listen-glow i { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.55; animation: listen-float 14s ease-in-out infinite alternate; }
.listen-glow i:nth-child(1) { width: 320px; height: 320px; background: #c0267a; top: -120px; inset-inline-end: -60px; }
.listen-glow i:nth-child(2) { width: 260px; height: 260px; background: #1fb371; bottom: -140px; inset-inline-start: 20%; animation-delay: -5s; }
.listen-glow i:nth-child(3) { width: 220px; height: 220px; background: #e0a526; top: 30%; inset-inline-start: -80px; animation-delay: -9s; }
@keyframes listen-float { to { transform: translate(30px, -20px) scale(1.15); } }
.listen-doors { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 14px; }
.listen-door {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 22px; color: #fff;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.25s var(--spring), background 0.2s;
}
.listen-door:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.2); }
.listen-door svg { width: 34px; height: 34px; flex: none; padding: 8px; border-radius: 14px; box-sizing: content-box; }
.listen-door.is-music svg { background: linear-gradient(135deg, #c0267a, #7b2cbf); }
.listen-door.is-fun svg { background: linear-gradient(135deg, #e0a526, #e2522c); }
.listen-door strong { display: block; font-size: 1.15rem; }
.listen-door small { opacity: 0.8; }
.listen-row { margin: 0 0 26px; }
.listen-row .scroller { grid-auto-columns: 168px; }
.listen-song, .listen-album, .listen-watch {
  display: grid; gap: 4px; padding: 0; border: 0; background: none; text-align: start; color: inherit; cursor: pointer; font: inherit; min-width: 0;
}
.listen-watch { grid-auto-columns: 260px; }
.listen-row:has(.listen-watch) .scroller { grid-auto-columns: 260px; }
.listen-art {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 70%, #000), color-mix(in srgb, var(--purple) 40%, var(--navy)));
  box-shadow: var(--shadow-sm); color: rgba(255, 255, 255, 0.55);
}
.listen-art.wide { aspect-ratio: 16 / 9; }
.listen-art > svg { width: 36px; height: 36px; }
.listen-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.listen-art i {
  position: absolute; inset-inline-end: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: var(--green-ink); opacity: 0; transform: translateY(6px);
  transition: opacity 0.2s, transform 0.25s var(--spring); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.listen-art i svg { width: 18px; height: 18px; }
:is(.listen-song, .listen-watch):hover .listen-art i, :is(.listen-song, .listen-watch):focus-visible .listen-art i { opacity: 1; transform: none; }
.listen-song strong, .listen-album strong, .listen-watch strong { font-size: 0.92rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listen-song small, .listen-album small { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .listen-hero { padding: 30px 20px 24px; border-radius: 24px; }
  .listen-doors { grid-template-columns: 1fr 1fr; gap: 10px; }
  .listen-door { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .listen-row .scroller { grid-auto-columns: 140px; }
  .listen-row:has(.listen-watch) .scroller { grid-auto-columns: 220px; }
  .listen-art i { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .listen-glow i { animation: none; } }

/* The ball with two arrows an administrator drags to move a card along its music row. */
.feature-card, .video-card, .artist-pill { position: relative; }
.arrange-handle {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 4;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; cursor: grab; touch-action: none; user-select: none;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(155,92,201,.85) 55%, rgba(76,29,149,.95));
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 6px 16px rgba(46,16,101,.35), inset 0 1px 2px rgba(255,255,255,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .18s ease, box-shadow .18s ease;
}
.arrange-handle svg { width: 18px; height: 18px; }
.arrange-handle:hover, .arrange-handle:focus-visible { transform: scale(1.1); outline: none; box-shadow: 0 0 0 3px rgba(155,92,201,.45), 0 8px 18px rgba(46,16,101,.4); }
.arrange-handle:active { cursor: grabbing; }
.artist-pill .arrange-handle { top: 0; inset-inline-start: 0; width: 30px; height: 30px; }
.rail.is-arranging { scroll-snap-type: none; }
.rail.is-arranging > [data-arrange-id]:not(.is-arranging) { transition: transform .15s ease; }
[data-arrange-id].is-arranging { opacity: .9; transform: scale(1.04) rotate(-1deg); z-index: 5; filter: drop-shadow(0 14px 22px rgba(46,16,101,.35)); }
@media (pointer: coarse) { .arrange-handle { width: 40px; height: 40px; } }

/* ---- The front door: choose a collection, sign in, open a new account ---- */
.door {
  min-height: 100vh; min-height: 100dvh; position: relative; overflow: hidden;
  display: grid; place-items: center; padding: 32px 16px;
  background:
    radial-gradient(900px 600px at 85% 0%, color-mix(in srgb, var(--navy) 70%, transparent), transparent 70%),
    radial-gradient(800px 560px at 0% 100%, color-mix(in srgb, var(--green) 38%, transparent), transparent 70%),
    linear-gradient(160deg, #3a0a5c, var(--purple) 55%, #14021f);
}
.door.is-brodsky { background:
    radial-gradient(900px 600px at 85% 0%, rgba(30, 64, 175, .55), transparent 70%),
    radial-gradient(800px 560px at 0% 100%, rgba(180, 132, 40, .35), transparent 70%),
    linear-gradient(160deg, #0b1f4d, #071233 55%, #030817); }
.door-glow { position: absolute; inset: 0; pointer-events: none; }
.door-glow i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: door-float 16s ease-in-out infinite alternate; }
.door-glow i:nth-child(1) { width: 380px; height: 380px; background: #9b5cc9; top: -80px; inset-inline-start: -60px; }
.door-glow i:nth-child(2) { width: 300px; height: 300px; background: #e0a526; bottom: -90px; inset-inline-end: 8%; opacity: .32; animation-duration: 20s; }
.door-glow i:nth-child(3) { width: 260px; height: 260px; background: #1fb371; top: 40%; inset-inline-end: -80px; opacity: .3; animation-duration: 24s; }
@keyframes door-float { to { transform: translate(40px, -30px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .door-glow i { animation: none; } }

.door-card {
  position: relative; z-index: 1; width: min(520px, 100%);
  padding: 26px 30px 32px; border-radius: 28px;
  background: color-mix(in srgb, var(--bg-elev-solid) 88%, transparent);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  animation: door-in .5s var(--ease) both;
}
@keyframes door-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.door-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.door-top .gate-lang { position: static; }
.door-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); font-weight: 600; font-size: .92rem; }
.door-back svg { width: 18px; height: 18px; }
[dir="rtl"] .door-back svg, [dir="rtl"] .door-site-go svg, [dir="rtl"] .door-go svg, [dir="rtl"] .door-prev svg { transform: scaleX(-1); }
.door-back:hover { border-color: var(--green-2); color: var(--green-2); }
.door-badge { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; margin-bottom: 18px; background: color-mix(in srgb, var(--text) 6%, transparent); border: 1px solid var(--line); }
.door-badge img { width: 46px; height: 46px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; }
.door-badge strong { font-family: var(--display); font-size: 1.15rem; }
.door-title { font-family: var(--display); font-size: clamp(1.8rem, 6vw, 2.4rem); font-weight: 800; margin: 2px 0 6px; line-height: 1.15; }
.door-card > .quiet { margin: 0 0 20px; }

.door-sites { display: grid; gap: 14px; margin-top: 22px; }
.door-site {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: 22px; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, #9b5cc9 26%, transparent), color-mix(in srgb, var(--text) 4%, transparent));
  border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .2s var(--spring), box-shadow .2s ease, border-color .2s ease;
}
.door-site.is-brodsky { background: linear-gradient(135deg, rgba(59, 130, 246, .26), color-mix(in srgb, var(--text) 4%, transparent)); }
.door-site:hover, .door-site:focus-visible { transform: translateY(-2px); border-color: rgba(255, 255, 255, .4); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .6); outline: none; }
.door-site:active { transform: scale(.98); }
.door-site-logo { width: 72px; height: 72px; border-radius: 18px; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.door-site-logo img { width: 86%; height: 86%; object-fit: contain; }
.door-site-text { display: grid; gap: 4px; min-width: 0; }
.door-site-text strong { font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }
.door-site-text small { color: var(--muted); font-size: .86rem; }
.door-site-go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--text) 10%, transparent); }
.door-site-go svg { width: 20px; height: 20px; }

.door-form { display: grid; gap: 2px; }
.door-field input { min-height: 52px; font-size: 1.05rem; border-radius: 14px; }
.door-secret { position: relative; display: block; }
.door-secret input { width: 100%; padding-inline-end: 84px; }
.door-eye { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); font-weight: 600; cursor: pointer; }
.door-secret input[dir="ltr"] + .door-eye { inset-inline-end: auto; right: 8px; }
.door-hint { display: block; margin-top: 2px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.door-go { width: 100%; min-height: 52px; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.door-go svg { width: 18px; height: 18px; }
.door-card .or { margin: 18px 0 12px; }

.door-stripe {
  width: 100%; margin-top: 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 20px; border: 0; cursor: pointer; text-align: start; font: inherit;
  color: #1b0b26; background: linear-gradient(120deg, #f6c453, #e0a526 45%, #f59e6b);
  box-shadow: 0 14px 30px -12px rgba(224, 165, 38, .65), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .2s var(--spring), box-shadow .2s ease;
}
.door-stripe:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(224, 165, 38, .75); }
.door-stripe:active { transform: scale(.985); }
.door-stripe:disabled { opacity: .6; cursor: progress; }
.door-stripe strong { display: block; font-size: 1.1rem; }
.door-stripe small { display: block; font-size: .85rem; opacity: .78; margin-top: 2px; }
.door-stripe .door-site-go { background: rgba(27, 11, 38, .12); }
.door-stripe-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .55); }
.door-stripe-icon svg { width: 22px; height: 22px; }
.door-send { grid-template-columns: auto 1fr; margin-top: 8px; }
.door-prev { margin-top: 10px; justify-self: center; display: inline-flex; align-items: center; gap: 6px; }
.door-prev svg { width: 16px; height: 16px; }

.door-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: none; }
.door-steps li { display: grid; justify-items: center; gap: 6px; position: relative; color: var(--muted); font-size: .82rem; font-weight: 600; }
.door-steps li:not(:last-child)::after { content: ""; position: absolute; top: 17px; inset-inline-start: calc(50% + 22px); width: calc(100% - 36px); height: 2px; border-radius: 2px; background: var(--line-strong); }
.door-steps li.is-done:not(:last-child)::after { background: #1fb371; }
.door-steps b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); font-size: .95rem; }
.door-steps b svg { width: 16px; height: 16px; }
.door-steps li.is-on { color: var(--text); }
.door-steps li.is-on b { border-color: #e0a526; background: #e0a526; color: #1b0b26; box-shadow: 0 0 0 5px rgba(224, 165, 38, .22); }
.door-steps li.is-done b { border-color: #1fb371; background: #1fb371; color: #fff; }

.door-faces { margin: 4px 0 8px; }
.door-faces-title { display: block; font-weight: 700; margin-bottom: 10px; }
.door-face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 300px; overflow-y: auto; padding: 2px; }
.door-face-grid .face-choice { display: grid; gap: 6px; justify-items: center; padding: 8px; border-radius: 16px; border: 2px solid transparent; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); cursor: pointer; transition: transform .18s var(--spring), border-color .18s; }
.door-face-grid .face-choice img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.door-face-grid .face-choice strong { font-size: .8rem; line-height: 1.25; text-align: center; }
.door-face-grid .face-choice:hover { transform: translateY(-2px); }
.door-face-grid .face-choice.is-on { border-color: #e0a526; background: rgba(224, 165, 38, .16); }

.door-done { text-align: center; display: grid; justify-items: center; gap: 6px; padding-top: 6px; }
.door-done-mark { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #4ade80, #1fb371 60%, #0f7a4a); box-shadow: 0 0 0 10px rgba(31, 179, 113, .18), 0 18px 40px -10px rgba(31, 179, 113, .6); animation: door-pop .6s var(--spring) both; margin-bottom: 10px; }
.door-done-mark svg { width: 46px; height: 46px; }
@keyframes door-pop { from { transform: scale(.3); opacity: 0; } }
.door-done-note { font-size: 1.08rem; line-height: 1.7; margin: 4px 0 22px; padding: 14px 16px; border-radius: 16px; background: rgba(224, 165, 38, .12); border: 1px solid rgba(224, 165, 38, .35); }

@media (max-width: 560px) {
  .door { padding: 14px 12px; align-items: start; }
  .door-card { padding: 18px 18px 24px; border-radius: 24px; }
  .door-site { padding: 14px; gap: 12px; }
  .door-site-logo { width: 58px; height: 58px; }
  .door-site-text strong { font-size: 1.12rem; }
}

/* ---- Members: requests waiting for approval, then everyone as cards ---- */
.requests-block { border-radius: 22px; padding: 18px 18px 20px; margin-bottom: 22px; border: 1px solid var(--line-strong); background: var(--bg-elev); }
.requests-block.has-requests { border-color: rgba(224, 165, 38, .5); background: linear-gradient(135deg, rgba(224, 165, 38, .12), transparent 60%), var(--bg-elev); box-shadow: 0 14px 34px -18px rgba(224, 165, 38, .5); }
.requests-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.requests-head h3 { margin: 0; font-size: 1.15rem; }
.count-badge { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: #e0a526; color: #1b0b26; }
.requests-block:not(.has-requests) .count-badge { background: var(--line-strong); color: var(--muted); }
.request-list, .member-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.request-card, .member-card { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--bg-elev-2); border: 1px solid var(--line); transition: opacity .35s ease, transform .35s var(--ease); }
.request-card.is-gone { opacity: 0; transform: scale(.96); }
.request-who { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; min-width: 0; }
.request-who > div { min-width: 0; }
.request-who strong { font-size: 1.05rem; }
.request-who .quiet { overflow-wrap: anywhere; font-size: .86rem; }
.member-face { width: 52px; height: 52px; border-radius: 50%; position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #9b5cc9, #3b6f3d); color: #fff; font-weight: 800; font-size: 1.2rem; }
.member-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.request-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: .82rem; }
.pill-tag { padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .78rem; background: rgba(155, 92, 201, .2); color: var(--text); }
.request-roles, .member-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.member-filters { margin: 4px 0 14px; }
.role-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.role-chip b { opacity: .6; font-weight: 700; margin-inline-start: 4px; }
.role-chip:hover { border-color: var(--green-2); }
.role-chip.is-on { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.request-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.request-actions .btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.request-actions svg { width: 18px; height: 18px; }
.danger-text { color: var(--danger) !important; }
.member-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.member-controls label { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 600; min-width: 0; }
.member-controls select { min-height: 42px; width: 100%; }
.member-controls .btn { min-height: 42px; }
.member-card .member-sites, .request-card .member-sites { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.invite-fold { margin-top: 22px; }
.invite-fold summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; min-height: 40px; list-style: none; }
.invite-fold summary::-webkit-details-marker { display: none; }
.invite-fold summary svg { width: 18px; height: 18px; transition: transform .2s ease; }
.invite-fold[open] summary svg { transform: rotate(45deg); }
.invite-fold form { margin-top: 12px; }
@media (max-width: 560px) {
  .requests-block { padding: 14px 12px 16px; border-radius: 18px; }
  .member-controls { grid-template-columns: 1fr 1fr; }
  .member-controls .btn { grid-column: 1 / -1; }
  .member-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .member-filters .role-chip { flex: none; }
}
.member-find { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.member-find input { flex: 1; min-width: 0; }

/* Installing: one card per collection app */
.install-pick { max-width: 460px; }
.install-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.install-app { display: grid; justify-items: center; gap: 10px; padding: 16px 12px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--bg-elev-2); text-align: center; }
.install-app.is-here { border-color: color-mix(in srgb, var(--green-2) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-2) 18%, transparent); }
.install-app img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.install-app strong { font-family: var(--display); font-size: 1.02rem; line-height: 1.25; }
.install-app .btn { width: 100%; min-height: 44px; }

/* Phone home: sections sit closer together. The title and "see all" share one line, the search goes under them. */
@media (max-width: 900px) {
  .page-home .notice-deck { margin-bottom: 14px; }
  .page-home .hero { gap: 14px; padding: 8px 0 0; }
  .page-home .greeting { margin: 10px 0 4px; }
  .page-home .shelves { margin: 14px 0 0; }
  .page-home .hero-copy > :last-child { margin-bottom: 0; }
  .page-home .rail-head { margin: 22px 0 10px; gap: 8px 12px; }
  .page-home .rail-head > h2 { order: 1; }
  .page-home .rail-head > a:last-child { order: 2; }
  .page-home .rail-head > .column-search { order: 3; height: 38px; }
  .page-home .rail-head > .calendar-week { order: 3; flex-basis: 100%; }
}

/* ---- Ideas from a quiet personal site: a hand-drawn "new", a list of what's new, a clock line, soft links ---- */

/* "New" with a circle drawn around it by hand; the circle draws itself in. */
.new-mark {
  position: relative; display: inline-block; margin-inline-start: 0.55em; padding: 0 0.32em;
  font-family: var(--sans); font-size: 0.72em; font-weight: 700; line-height: 1.5; letter-spacing: 0;
  color: #e5367f; vertical-align: 0.12em; white-space: nowrap;
}
.new-mark svg { position: absolute; inset: -0.32em -0.38em; width: calc(100% + 0.76em); height: calc(100% + 0.64em); overflow: visible; pointer-events: none; }
.new-mark path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: new-draw 0.9s 0.25s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
@keyframes new-draw { to { stroke-dashoffset: 0; } }
html[data-theme="dark"] .new-mark { color: #f472b6; }

/* The foot of the home page: a short rule, then the time, today's date and the parsha, and a doodle. */
.home-foot { margin: 46px 0 10px; }
.home-foot::before { content: ""; display: block; width: 52px; height: 1px; background: var(--line-strong); margin-bottom: 18px; }
.home-foot p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; color: var(--muted); font-size: 0.92rem; }
.home-foot [data-clock] { font-variant-numeric: tabular-nums; }
.home-foot-dot { opacity: 0.6; }
.home-doodle { width: 26px; height: 26px; margin-inline-start: 6px; color: #e0a526; }
.home-doodle path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: new-draw 1.6s 0.6s ease-in-out forwards; }
.home-doodle path + path { animation-delay: 1.9s; animation-duration: 0.5s; }
@media (prefers-reduced-motion: reduce) { .new-mark path, .home-doodle path { animation: none; stroke-dashoffset: 0; } }

/* Links inside running text: a soft thin underline that darkens on hover. */
:where(p, li, .quiet, .note, .empty, .door-card) > a:not([class]) {
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.28em;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
:where(p, li, .quiet, .note, .empty, .door-card) > a:not([class]):hover { text-decoration-color: currentColor; color: var(--text); }

@media (max-width: 560px) {
  .home-foot { margin-top: 34px; }
}

/* Admin: "add new folders by themselves" on a homepage section */
.check.auto-new { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-elev-2); border: 1px solid var(--line); }
.check.auto-new input { margin-top: 3px; flex: none; }
.check.auto-new span { display: grid; gap: 3px; }
.check.auto-new small { font-size: 0.82rem; line-height: 1.5; }

/* ======================================================================================
   שיעור ליל ששי — the shiur's own look: the brown and cream of its logo, warm like candlelight
   on the pages of a sefer.
   ====================================================================================== */
html[data-site="shiur"] {
  --green: #8a5a3c; --green-2: #a3703f; --purple: #5b3a2c; --navy: #4a2f22;
  --shiur-brown: #795548; --shiur-deep: #4e342e; --shiur-cream: #f8f2e9; --shiur-paper: #fffdf8; --shiur-gold: #c8923f;
  --ring: 0 0 0 3px rgba(163, 112, 63, 0.3);
}
html[data-site="shiur"][data-theme="light"] {
  --bg: #f6efe5; --bg-elev: rgba(255, 253, 248, 0.97); --bg-elev-solid: #fffdf8;
  --bg-elev-2: rgba(243, 233, 219, 0.97); --bg-elev-2-solid: #f3e9db;
  --text: #2e1f18; --muted: #7d6656; --line: rgba(78, 52, 46, 0.1); --line-strong: rgba(78, 52, 46, 0.18);
}
html[data-site="shiur"][data-theme="dark"] {
  --bg: #15100c; --bg-elev: rgba(32, 24, 19, 0.95); --bg-elev-solid: #201813;
  --bg-elev-2: rgba(43, 32, 25, 0.96); --bg-elev-2-solid: #2b2019;
  --text: #f6ece0; --muted: #b9a28e; --shiur-paper: #241a14; --shiur-cream: #2b2019;
}
html[data-site="shiur"] .sidebar { background: linear-gradient(180deg, #5b3a2c, #3e271d 70%, #2e1c15); }
html[data-site="shiur"] .brand img { background: #fffdf8; border-radius: 12px; padding: 3px; }
.switch-logo { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; background: #fff; flex: none; }

/* The sign-in card for the shiur */
.door.is-shiur { background:
    radial-gradient(900px 600px at 85% 0%, rgba(200, 146, 63, .35), transparent 70%),
    radial-gradient(800px 560px at 0% 100%, rgba(121, 85, 72, .45), transparent 70%),
    linear-gradient(160deg, #6d4636, #4a2f22 55%, #24150f); }
.door-site.is-shiur { background: linear-gradient(135deg, rgba(200, 146, 63, .28), color-mix(in srgb, var(--text) 4%, transparent)); }

.shiur-page { --tile: 150px; }
.shiur-page > section { margin-bottom: 34px; }
.shiur-page > section.is-waiting-in { opacity: 0; transform: translateY(18px); }
.shiur-page > section.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

.shiur-kicker { margin: 0 0 6px; font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--shiur-gold); }
.shiur-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; color: var(--shiur-brown); }
html[data-theme="dark"] .shiur-title { color: #e7c9a4; }
.shiur-quiet { color: var(--muted); font-size: .9rem; }
.shiur-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--shiur-brown); background: rgba(200, 146, 63, .16); border: 1px solid rgba(121, 85, 72, .18); }
html[data-theme="dark"] .shiur-chip { color: #e7c9a4; }
.shiur-label { font-size: .8rem; font-weight: 700; color: var(--shiur-gold); }
.shiur-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.shiur-head h2 { margin: 0; font-family: var(--display); font-size: 1.55rem; color: var(--text); }
.shiur-head h2::after { content: ""; display: block; width: 42px; height: 3px; margin-top: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--shiur-gold), var(--shiur-brown)); }
.shiur-head a { color: var(--muted); font-weight: 600; font-size: .9rem; }

/* Hero: a page of the sefer with candlelight behind it */
.shiur-hero, .parsha-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr minmax(160px, 260px); gap: 24px; align-items: center;
  padding: clamp(22px, 4vw, 40px); border-radius: 28px;
  background: linear-gradient(135deg, var(--shiur-paper), var(--shiur-cream));
  border: 1px solid rgba(121, 85, 72, .22);
  box-shadow: 0 24px 50px -28px rgba(78, 52, 46, .45), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.parsha-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.shiur-hero::before, .parsha-hero::before { content: ""; position: absolute; inset: 14px; border-radius: 20px; border: 1px dashed rgba(121, 85, 72, .22); pointer-events: none; }
.shiur-hero-copy, .parsha-hero > * { position: relative; z-index: 1; }
.shiur-motto { margin: 12px 0 18px; max-width: 46ch; font-size: 1.05rem; line-height: 1.7; color: var(--muted); }
.shiur-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.shiur-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(121, 85, 72, .18); color: var(--muted); font-size: .86rem; animation: shiur-pop .6s calc(.15s + var(--i) * .08s) var(--spring) both; }
html[data-theme="dark"] .shiur-stat { background: rgba(255, 255, 255, .05); }
.shiur-stat b { font-size: 1.15rem; color: var(--shiur-brown); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .shiur-stat b { color: #e7c9a4; }
.shiur-hero-mark { position: relative; z-index: 1; justify-self: center; width: 100%; max-width: 240px; animation: shiur-float 7s ease-in-out infinite; }
.shiur-hero-mark img { width: 100%; filter: drop-shadow(0 18px 24px rgba(78, 52, 46, .28)); animation: shiur-open 1.1s .1s var(--ease) both; transform-origin: 30% 60%; }
.shiur-candle { position: absolute; inset: 0; pointer-events: none; }
.shiur-candle i { position: absolute; border-radius: 50%; filter: blur(40px); background: radial-gradient(circle, rgba(255, 196, 102, .7), rgba(200, 146, 63, .25) 50%, transparent 72%); animation: shiur-flicker 4.2s ease-in-out infinite alternate; }
.shiur-candle i:nth-child(1) { width: 320px; height: 320px; top: -120px; inset-inline-end: -60px; }
.shiur-candle i:nth-child(2) { width: 220px; height: 220px; bottom: -110px; inset-inline-start: 18%; opacity: .6; animation-duration: 5.6s; animation-delay: -2s; }
@keyframes shiur-flicker { 0% { transform: scale(1); opacity: .75; } 35% { transform: scale(1.06) translate(4px, -3px); opacity: .95; } 60% { transform: scale(.97); opacity: .7; } 100% { transform: scale(1.04) translate(-3px, 2px); opacity: .9; } }
@keyframes shiur-float { 50% { transform: translateY(-8px) rotate(-1.2deg); } }
@keyframes shiur-open { from { opacity: 0; transform: perspective(700px) rotateY(-38deg) scale(.86); } }
@keyframes shiur-pop { from { opacity: 0; transform: translateY(8px) scale(.92); } }

/* This week */
.shiur-week-card {
  display: grid; grid-template-columns: minmax(160px, 300px) 1fr; gap: 20px; align-items: center; padding: 14px; color: var(--text);
  border-radius: 24px; background: var(--bg-elev); border: 1px solid rgba(200, 146, 63, .35);
  box-shadow: 0 18px 40px -26px rgba(121, 85, 72, .6); transition: transform .3s var(--spring), box-shadow .3s ease;
}
.shiur-week-card:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -24px rgba(121, 85, 72, .7); }
.shiur-week-copy { display: grid; gap: 8px; justify-items: start; }
.shiur-week-copy strong { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--shiur-brown); line-height: 1.1; }
html[data-theme="dark"] .shiur-week-copy strong { color: #e7c9a4; }
.shiur-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 9px 16px; border-radius: 999px; background: var(--shiur-brown); color: #fff8ef; font-weight: 700; font-size: .9rem; }
.shiur-go svg { width: 16px; height: 16px; }
[dir="rtl"] .shiur-go svg, [dir="rtl"] .more-row > svg { transform: scaleX(-1); }
.shiur-week-wait { margin: 10px 4px 0; color: var(--muted); font-size: .92rem; }
.shiur-week.is-waiting { padding: 22px; border-radius: 22px; background: var(--bg-elev); border: 1px dashed rgba(121, 85, 72, .3); text-align: center; }

/* Covers: one to three pictures fanned like pages */
.shiur-covers { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #f3e6d3, #e6d2b8); }
.shiur-covers img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shiur-covers.n2 img:nth-child(2), .shiur-covers.n3 img:nth-child(2) { inset: auto 0 0 auto; width: 42%; height: 46%; border: 3px solid var(--shiur-paper); border-radius: 12px 0 0 0; }
.shiur-covers.n3 img:nth-child(3) { inset: 0 0 auto auto; width: 42%; height: 46%; border: 3px solid var(--shiur-paper); border-radius: 0 0 0 12px; }
[dir="rtl"] .shiur-covers.n2 img:nth-child(2), [dir="rtl"] .shiur-covers.n3 img:nth-child(2) { inset: auto auto 0 0; border-radius: 0 12px 0 0; }
[dir="rtl"] .shiur-covers.n3 img:nth-child(3) { inset: 0 auto auto 0; border-radius: 0 0 12px 0; }
.shiur-covers.is-empty { display: grid; place-items: center; }
.shiur-covers.is-empty img { position: static; width: 46%; height: auto; opacity: .35; filter: grayscale(.3); }
.shiur-covers.is-big { aspect-ratio: 16 / 11; border-radius: 18px; }
.shiur-covers.is-small { width: 64px; aspect-ratio: 1; border-radius: 14px; flex: none; }

/* The parshiyos, on shelves by chumash */
.chumash-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.chumash-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s var(--spring); }
.chumash-tab small { font-weight: 600; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chumash-tab.is-on { background: var(--shiur-brown); border-color: var(--shiur-brown); color: #fff8ef; }
.chumash-tab.is-on small { color: rgba(255, 248, 239, .75); }
.chumash-tab:active { transform: scale(.96); }
.parsha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 12px; }
.parsha-grid:not([hidden]) > * { animation: shiur-pop .45s calc(var(--n, 0) * 0s) var(--spring) both; }
.parsha-tile { position: relative; display: grid; gap: 6px; padding: 8px 8px 12px; border-radius: 18px; color: var(--text); background: var(--bg-elev); border: 1px solid var(--line); transition: transform .25s var(--spring), box-shadow .25s ease, border-color .25s ease; }
.parsha-tile:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 16px 30px -20px rgba(121, 85, 72, .7); border-color: rgba(200, 146, 63, .45); }
.parsha-tile.is-empty { opacity: .62; }
.parsha-tile.is-empty:hover { opacity: .9; }
.parsha-tile.is-now { border-color: var(--shiur-gold); box-shadow: 0 0 0 3px rgba(200, 146, 63, .25), 0 14px 30px -18px rgba(200, 146, 63, .8); }
.parsha-tile.is-now::after { content: ""; position: absolute; top: 14px; inset-inline-start: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--shiur-gold); box-shadow: 0 0 0 0 rgba(200, 146, 63, .7); animation: shiur-pulse 1.8s ease-out infinite; }
@keyframes shiur-pulse { to { box-shadow: 0 0 0 12px rgba(200, 146, 63, 0); } }
.parsha-name { font-family: var(--display); font-size: 1.15rem; font-weight: 800; padding: 0 4px; }
.parsha-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0 4px; color: var(--muted); font-size: .78rem; }
.parsha-meta b { color: var(--shiur-gold); }
.parsha-tile .new-mark { position: absolute; top: 12px; inset-inline-end: 12px; margin: 0; background: rgba(255, 253, 248, .9); border-radius: 999px; }
.chumash-block { margin-bottom: 26px; }
.chumash-name { font-family: var(--display); color: var(--shiur-brown); margin: 0 0 12px; }

/* Special evenings */
.moment-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.moment-card, .entry-card { display: grid; gap: 10px; padding: 10px 10px 14px; border-radius: 22px; scroll-snap-align: start; color: var(--text); background: var(--bg-elev); border: 1px solid var(--line); transition: transform .3s var(--spring), box-shadow .3s ease; }
.moment-card:hover, .entry-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px rgba(121, 85, 72, .75); }
.moment-copy, .entry-copy { display: grid; gap: 6px; padding: 0 4px; }
.moment-copy strong, .entry-copy strong { font-size: 1rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.moment-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.entry-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }

/* Newest pictures: a strip that leans in one by one */
.newest-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.newest-shot { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #ead9c2; animation: shiur-pop .5s calc(var(--i) * .04s) var(--spring) both; }
.newest-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.newest-shot:hover img { transform: scale(1.06); }
.newest-shot i { position: absolute; inset: auto auto 8px 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 253, 248, .9); color: var(--shiur-brown); }
.newest-shot i svg { width: 14px; height: 14px; }

/* More from the shiur */
.more-list { display: grid; gap: 10px; }
.more-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 18px; color: var(--text); background: var(--bg-elev); border: 1px solid var(--line); transition: transform .2s var(--spring), border-color .2s ease; }
.more-row:hover { transform: translateX(-3px); border-color: rgba(200, 146, 63, .45); }
.more-row > span:not(.shiur-covers) { flex: 1; display: grid; gap: 3px; min-width: 0; }
.more-row small { color: var(--muted); }
.more-row > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }

/* A parsha page */
.parsha-hero { margin-bottom: 30px; }
.parsha-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 6px; }
.shiur-page-head { padding: 6px 0 4px; }
.parsha-steps { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 10px 0 30px; }
.parsha-step { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); font-weight: 700; justify-self: start; }
.parsha-step.is-next { justify-self: end; }
.parsha-step svg { width: 16px; height: 16px; }
[dir="rtl"] .parsha-step svg { transform: scaleX(-1); }
.parsha-all { color: var(--muted); font-weight: 600; }

@media (max-width: 760px) {
  .shiur-page { --tile: 132px; }
  .shiur-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .shiur-hero-mark { order: -1; max-width: 170px; }
  .shiur-motto { margin-inline: auto; }
  .shiur-stats { justify-content: center; }
  .shiur-week-card { grid-template-columns: 1fr; }
  .shiur-week-copy { justify-items: center; text-align: center; }
  .moment-rail { grid-auto-columns: minmax(230px, 78%); }
  .parsha-steps { grid-template-columns: 1fr 1fr; }
  .parsha-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .shiur-hero-mark, .shiur-hero-mark img, .shiur-candle i, .shiur-stat, .newest-shot, .parsha-tile.is-now::after, .parsha-grid > * { animation: none !important; }
}
.parsha-grid[hidden] { display: none; }
html[data-site="shiur"] .upload-btn { background: linear-gradient(180deg, #96644a 0%, #5b3a2c 100%); box-shadow: 0 4px 14px rgba(91, 58, 44, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.24); }
html[data-site="shiur"] .menu-account .avatar, html[data-site="shiur"] .side-account .avatar { background: #8a5a3c; }

/* Notes to the administrators */
.note-page .quiet { max-width: 60ch; }
.note-form { display: grid; gap: 12px; max-width: 720px; }
.note-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.note-form textarea { min-height: 130px; font-size: 1rem; line-height: 1.6; }
.note-send { justify-self: start; min-width: 160px; min-height: 46px; }
.note-mine { max-width: 720px; margin-top: 26px; }
.note-mine h3 { margin: 0 0 12px; }
.note-card { display: grid; gap: 10px; padding: 14px 16px; margin-bottom: 10px; border-radius: 18px; background: var(--bg-elev-2); border: 1px solid var(--line); transition: opacity .3s ease, transform .3s var(--ease); }
.note-card.is-done { opacity: .72; }
.note-card.is-gone { opacity: 0; transform: scale(.97); }
.note-card p { margin: 0; white-space: pre-wrap; line-height: 1.65; }
.note-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; }
.note-state { margin-inline-start: auto; font-weight: 700; color: var(--warning); }
.note-card.is-done .note-state { color: var(--ok); }
.note-admin-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.note-admin-list .note-card { margin: 0; }
.note-admin-list .note-body, .note-mine .note-card p {
  /* The whole note, every line: an older style with the same name clips it to two lines. */
  display: block; -webkit-line-clamp: unset; -webkit-box-orient: initial; overflow: visible;
  color: var(--text); font-size: 1rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
}
.pill-tag.is-site { background: rgba(200, 146, 63, .18); }
.note-page-link a { font-family: monospace; font-size: .82rem; }

/* Admin charts: each in a card, bars in the site's colours, growing up when the page opens */
.stats-head { margin: 28px 0 12px; }
.stat.is-today { border-color: color-mix(in srgb, var(--green-2) 55%, transparent); }
.chart-card { margin: 14px 0; padding: 16px 16px 8px; }
.chart-card h3 { margin: 0 0 6px; font-size: 1rem; }
.chart-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.chart-pair .chart-card { margin: 0; }
.chart { height: 220px; gap: 3px; }
.chart-col { grid-template-rows: 18px minmax(0, 1fr) 44px; }
.chart.is-wide .chart-col { flex: 1 0 34px; max-width: 120px; }
.chart-bar { height: var(--h); background: linear-gradient(180deg, var(--green-2), var(--green)); opacity: .9; transform-origin: bottom; animation: chart-grow .7s var(--ease) both; }
.chart-col:nth-child(odd) .chart-bar { animation-delay: .05s; }
.chart-col.is-last .chart-bar { background: linear-gradient(180deg, #e0a526, #c8923f); opacity: 1; }
.chart-col:hover .chart-bar { opacity: 1; filter: brightness(1.1); }
.chart-label { writing-mode: horizontal-tb; transform: none; font-size: .68rem; padding-top: 6px; align-self: start; }
.chart:not(.is-wide) .chart-label { writing-mode: vertical-rl; transform: rotate(180deg); padding: 0 0 4px; }
.chart-empty { padding: 26px 0; text-align: center; }
@keyframes chart-grow { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .chart-bar { animation: none; } }
.member-name { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.member-name input { min-height: 42px; font-size: .98rem; color: var(--text); border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-elev); padding: 0 12px; }
.member-name input:focus { outline: none; border-color: var(--green-2); box-shadow: var(--ring); }
@media (max-width: 560px) {
  .page .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .page .stats .stat { padding: 12px 10px; min-width: 0; }
  .page .stats .stat b { font-size: 1.6rem; }
  .page .stats .stat span { font-size: .74rem; line-height: 1.3; }
}

/* ---- Folder links ---- */
.folder-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.folder-tools .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; }
.folder-tools svg { width: 18px; height: 18px; }
.folder-tools [data-moment].is-on { background: rgba(200, 146, 63, .18); border-color: #c8923f; color: var(--text); }
.share-made { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 6px 2px; }
.share-made h2 { margin: 4px 0 0; }
.share-made-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #4ade80, #1fb371 60%, #0f7a4a); box-shadow: 0 0 0 8px rgba(31, 179, 113, .16); }
.share-made-mark svg { width: 32px; height: 32px; }
.share-link-box { width: 100%; }
.share-link-box input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-elev-2); color: var(--text); font-family: monospace; font-size: .85rem; }
.link-card .note-top strong { display: inline-flex; align-items: center; gap: 6px; }
.link-card .note-top svg { width: 16px; height: 16px; }
.link-meter { height: 8px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.link-meter span { display: block; height: 100%; width: var(--fill); border-radius: inherit; background: linear-gradient(90deg, var(--green-2), #e0a526); }
.via-link, .door-share-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(224, 165, 38, .14); border: 1px solid rgba(224, 165, 38, .35); font-size: .9rem; font-weight: 600; }
.via-link svg, .door-share-note svg { width: 18px; height: 18px; flex: none; }
.door-share-note { margin-bottom: 14px; }
.pill-tag svg { width: 12px; height: 12px; vertical-align: -1px; margin-inline-end: 4px; }

/* The page someone opens from a link */
.share-page { min-height: 100vh; min-height: 100dvh; padding: 0 16px 60px; background: radial-gradient(900px 500px at 85% -10%, rgba(155, 92, 201, .25), transparent 70%), var(--bg); }
.share-page.is-shiur { background: radial-gradient(900px 500px at 85% -10%, rgba(200, 146, 63, .25), transparent 70%), #f6efe5; color: #2e1f18; }
.share-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 0 10px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.share-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; font-family: var(--display); font-size: 1.05rem; }
.share-brand img { width: 40px; height: 40px; border-radius: 12px; background: #fff; object-fit: contain; padding: 3px; }
.share-days { padding: 7px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: rgba(224, 165, 38, .18); border: 1px solid rgba(224, 165, 38, .4); white-space: nowrap; }
.share-hero { max-width: 1100px; margin: 18px auto 14px; }
.share-kicker { margin: 0 0 6px; color: #c8923f; font-weight: 700; font-size: .85rem; }
.share-hero h1 { margin: 0; font-family: var(--display); font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.1; }
.share-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.share-trail a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.share-trail i { font-style: normal; opacity: .6; }
.share-band { max-width: 1100px; margin: 0 auto 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 20px; background: linear-gradient(120deg, rgba(246, 196, 83, .22), rgba(224, 165, 38, .12)); border: 1px solid rgba(224, 165, 38, .45); }
.share-band div { display: grid; gap: 3px; }
.share-band span { color: var(--muted); font-size: .9rem; }
.share-band .btn { min-height: 46px; }
.share-folders { max-width: 1100px; margin: 0 auto 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.share-folder { display: grid; gap: 6px; padding: 8px 8px 12px; border-radius: 18px; color: inherit; background: var(--bg-elev); border: 1px solid var(--line); transition: transform .25s var(--spring); }
.share-folder:hover { transform: translateY(-3px); }
.share-folder-art { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--bg-elev-2); }
.share-folder-art img { width: 100%; height: 100%; object-fit: cover; }
.share-folder-art svg { width: 34px; height: 34px; opacity: .5; }
.share-folder strong { padding: 0 4px; }
.share-folder small { padding: 0 4px; color: var(--muted); }
.share-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.share-shot { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--bg-elev-2); animation: shiur-pop .45s calc(var(--i) * .025s) var(--spring) both; }
.share-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.share-shot:hover img { transform: scale(1.05); }
.share-shot i { position: absolute; inset: auto auto 8px 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #111; }
.share-shot i svg { width: 14px; height: 14px; }
.share-empty { text-align: center; margin-top: 30px; }
.share-viewer { position: fixed; inset: 0; z-index: 100; background: rgba(8, 6, 12, .96); display: grid; place-items: center; }
.share-stage { width: 100%; height: 100%; display: grid; place-items: center; padding: 50px 10px; }
.share-stage img, .share-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.share-close, .share-step { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.share-close { top: calc(12px + env(safe-area-inset-top)); inset-inline-end: 12px; }
.share-step { top: 50%; transform: translateY(-50%); }
.share-step.is-prev { inset-inline-start: 10px; }
.share-step.is-next { inset-inline-end: 10px; }
.share-close svg, .share-step svg { width: 20px; height: 20px; }
.share-count { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); color: rgba(255, 255, 255, .8); font-size: .85rem; }
.share-gone { max-width: 440px; margin: 0 auto; padding-top: 18vh; display: grid; justify-items: center; gap: 10px; text-align: center; }
.share-gone-mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elev); border: 1px solid var(--line-strong); }
.share-gone-mark svg { width: 30px; height: 30px; }
@media (max-width: 560px) {
  .share-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .share-shot { border-radius: 8px; }
  .share-folders { grid-template-columns: repeat(2, 1fr); }
  .share-band .btn { width: 100%; }
}

/* ---- The page a folder link opens: a big picture, three clear buttons, then everything inside ---- */
.share-page { padding: 0 0 50px; }
.share-cover { position: relative; overflow: hidden; min-height: min(62vh, 520px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(160deg, #3a0a5c, #2b0445 60%, #14021f); }
.share-page.is-shiur .share-cover { background: linear-gradient(160deg, #8a5a3c, #5b3a2c 60%, #2e1c15); }
.share-cover-blur { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(30px) saturate(1.2); opacity: .55; transform: scale(1.05); }
.share-cover-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: share-zoom 18s ease-in-out infinite alternate; }
@keyframes share-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.share-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 4, 16, .55) 0%, rgba(10, 4, 16, 0) 30%, rgba(10, 4, 16, .15) 55%, rgba(10, 4, 16, .85) 100%); }
.share-page.is-shiur .share-cover-shade { background: linear-gradient(180deg, rgba(46, 28, 21, .55) 0%, rgba(46, 28, 21, 0) 30%, rgba(46, 28, 21, .15) 55%, rgba(46, 28, 21, .88) 100%); }
.share-cover .share-top { position: relative; z-index: 2; padding: calc(14px + env(safe-area-inset-top)) 18px 10px; backdrop-filter: none; -webkit-backdrop-filter: none; }
.share-cover .share-brand { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.share-cover .share-days { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.share-days.is-urgent { background: rgba(229, 54, 127, .5) !important; border-color: rgba(255, 255, 255, .5) !important; }
.share-cover-copy { position: relative; z-index: 2; max-width: 1100px; width: 100%; margin: 0 auto; padding: 0 18px 26px; animation: shiur-pop .7s .1s var(--ease) both; }
.share-cover-copy h1 { margin: 0; font-family: var(--display); font-size: clamp(2.1rem, 8vw, 3.8rem); line-height: 1.05; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.share-cover .share-kicker { color: #f6c453; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.share-totals { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.share-totals span { padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.share-cover .share-trail { color: rgba(255, 255, 255, .85); }
.share-actions { position: relative; z-index: 3; max-width: 1100px; margin: -18px auto 24px; padding: 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.share-action { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text); font: inherit; text-align: start; cursor: pointer; box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .6); transition: transform .25s var(--spring), box-shadow .25s ease; animation: shiur-pop .5s calc(.2s + var(--n, 0) * .06s) var(--spring) both; }
.share-action:nth-child(2) { --n: 1; } .share-action:nth-child(3) { --n: 2; }
.share-action:hover { transform: translateY(-3px); }
.share-action strong { display: block; font-size: 1.02rem; }
.share-action small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.share-action > img { width: 48px; height: 48px; border-radius: 14px; background: #fff; object-fit: contain; padding: 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.share-action-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, var(--green-2), var(--green)); }
.share-action-icon svg { width: 22px; height: 22px; }
.share-action.is-account .share-action-icon { background: linear-gradient(160deg, #f6c453, #e0a526); color: #2e1f18; }
.share-action.is-app { border-color: rgba(224, 165, 38, .5); }
.share-action.is-busy { opacity: .75; pointer-events: none; }
.share-page.is-shiur .share-action { background: #fffdf8; color: #2e1f18; border-color: rgba(121, 85, 72, .22); }
.share-page.is-shiur .share-action-icon { background: linear-gradient(160deg, #a3703f, #795548); }
.share-section { max-width: 1100px; margin: 0 auto 22px; padding: 0 16px; }
.share-section h2 { margin: 0 0 12px; font-family: var(--display); font-size: 1.4rem; }
.share-section h2::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 6px; border-radius: 3px; background: linear-gradient(90deg, #e0a526, var(--green-2)); }
.share-page.is-shiur .share-section h2::after { background: linear-gradient(90deg, #c8923f, #795548); }
.share-page .share-folders, .share-page .share-grid { max-width: none; margin: 0; }
.share-folder { animation: shiur-pop .45s calc(var(--i) * .05s) var(--spring) both; }
.share-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-flow: dense; }
.share-shot.is-big { grid-column: span 2; grid-row: span 2; }
.share-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 30px 16px 0; color: var(--muted); font-size: .88rem; }
.share-foot img { width: 30px; height: 30px; border-radius: 9px; background: #fff; object-fit: contain; padding: 2px; }
@media (max-width: 560px) {
  .share-cover { min-height: 56vh; }
  .share-grid { grid-template-columns: repeat(3, 1fr); }
  .share-actions { margin-top: -14px; }
}
@media (prefers-reduced-motion: reduce) { .share-cover-pic, .share-action, .share-cover-copy, .share-folder { animation: none; } }
/* A shiur link is always in the shiur's light cream and brown, whatever the phone's dark mode. */
.share-page.is-shiur {
  --bg: #f6efe5; --bg-elev: #fffdf8; --bg-elev-2: #f3e9db; --text: #2e1f18; --muted: #7d6656;
  --line: rgba(78, 52, 46, .12); --line-strong: rgba(78, 52, 46, .2); --green: #8a5a3c; --green-2: #a3703f;
  color: var(--text); background: radial-gradient(900px 500px at 85% -10%, rgba(200, 146, 63, .22), transparent 70%), var(--bg);
}
.share-page.is-shiur .share-folder { background: var(--bg-elev); color: var(--text); border-color: var(--line); box-shadow: 0 12px 26px -20px rgba(78, 52, 46, .5); }
.share-page.is-shiur .share-folder-art { background: var(--bg-elev-2); }
.share-page.is-shiur .share-foot { color: var(--muted); }


/* Moves made with anime.js and Motion (moves.js). */
.logo-ring { position: absolute; z-index: 2; pointer-events: none; overflow: visible; color: var(--green); transform-origin: 50% 50%; }
html[data-site="shiur"] .logo-ring { color: #c9a227; }
html[data-site="brodsky"] .logo-ring { color: var(--purple); }
.logo-ring circle { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.logo-ring .logo-spark { fill: currentColor; stroke: none; opacity: 0; transform-box: fill-box; transform-origin: center; }
.np-eq { position: absolute; inset-inline: 0; bottom: 14px; margin: auto; width: 64px; height: 26px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; direction: ltr; pointer-events: none; opacity: 0; transition: opacity 0.35s ease; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)); }
.np-eq.is-on { opacity: 1; }
.np-eq i { display: block; width: 6px; height: 100%; border-radius: 3px; background: rgba(255, 255, 255, 0.92); transform: scaleY(0.35); transform-origin: 50% 100%; }
.np-art { position: relative; }
@media (prefers-reduced-motion: reduce) { .logo-ring, .np-eq { display: none; } }

/* The turning wheel of pictures (carousel.js): music's newest records, and a shared folder's pictures. */
.flow { position: relative; user-select: none; -webkit-user-select: none; }
.flow-stage {
  --flow-w: clamp(150px, 44vw, 240px);
  position: relative; height: calc(var(--flow-w) * 1.16); perspective: 1100px; perspective-origin: 50% 45%;
  overflow: hidden; touch-action: pan-y; outline: none; border-radius: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.flow-wide .flow-stage { --flow-w: clamp(200px, 60vw, 360px); height: calc(var(--flow-w) * 0.9); }
.flow-card {
  position: absolute; left: 50%; top: 50%; width: var(--flow-w); aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: color-mix(in srgb, var(--text) 8%, transparent); box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.55);
  will-change: transform; cursor: pointer; backface-visibility: hidden;
}
.flow-wide .flow-card { aspect-ratio: 4 / 3; }
.flow-card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.flow-card::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); pointer-events: none; }
.flow-card.is-middle { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6); }
.flow-still .flow-card { cursor: default; }
.flow-stage.is-dragging .flow-card { cursor: grabbing; }
.flow-stage:focus-visible { box-shadow: 0 0 0 2px var(--green-2); }

/* Music: the wheel, the name and round buttons under it. */
.music-flow { margin: 4px 0 30px; }
.flow-info { display: grid; justify-items: center; gap: 4px; text-align: center; margin-top: 8px; min-height: 118px; }
.flow-info h3 { margin: 0; font-family: var(--hebrew); font-size: 1.35rem; font-weight: 700; line-height: 1.25; }
.flow-info h3 a { color: inherit; text-decoration: none; }
.flow-info h3 a:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.flow-info p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.music-balls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.music-ball {
  width: 44px; height: 44px; flex: none; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-elev-solid); color: var(--text); text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.music-ball svg { width: 20px; height: 20px; }
.music-ball:hover { border-color: color-mix(in srgb, var(--green-2) 55%, transparent); transform: translateY(-2px); }
.music-ball:active { transform: scale(0.9); }
.music-ball.is-main { width: 54px; height: 54px; border: 0; background: var(--green); color: var(--green-ink, #fff); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--green) 80%, transparent); }
.music-ball.is-main svg { width: 23px; height: 23px; }
.music-ball.is-main:hover { background: var(--green-2); transform: scale(1.06); }
.music-ball.is-on { color: var(--green-2); border-color: var(--green-2); background: color-mix(in srgb, var(--green) 14%, var(--bg-elev-solid)); }
.album-now { display: grid; justify-items: center; text-align: center; }
.album-now .album-cover.large { width: 100%; }
.album-now .music-balls { margin-top: 14px; }
.music-released { margin: 2px 0 0; color: var(--muted); font-size: 0.88rem; }
.music-time { width: 100%; margin-top: 14px; }
.music-time[hidden] { display: none; }

/* Arranging an album's songs: two small arrows at the start of each row. */
.song-move { display: none; gap: 4px; flex: none; }
.song-list.is-arranging .song-move { display: inline-flex; }
.song-move .music-ball { width: 34px; height: 34px; }
.song-move .music-ball svg { width: 16px; height: 16px; }
.song-row:first-child .song-move [data-move="-1"], .song-row:last-child .song-move [data-move="1"] { opacity: 0.3; pointer-events: none; }
.song-list.is-arranging .song-row { align-items: center; }

/* The small card for an album's or song's date. */
.date-pop {
  position: fixed; z-index: 80; width: min(290px, calc(100vw - 24px)); padding: 14px; border-radius: 16px;
  background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
}
.date-pop label { display: grid; gap: 8px; font-weight: 650; font-size: 0.92rem; }
.date-pop input { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); }
.date-pop-row { display: flex; gap: 8px; margin-top: 12px; }
.date-pop-row .btn { flex: 1; justify-content: center; }

/* A shared folder's pictures turning under the buttons. */
.share-reel { max-width: 1100px; margin: 8px auto 26px; padding: 0 16px; }
.share-reel .flow-card { border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .music-ball, .music-ball:hover, .music-ball:active { transition: none; transform: none; } }

/* Lighter in the light theme: covers still loading or without a picture, and softer shadows on music pages. */
html[data-theme="light"] .album-cover,
html[data-theme="light"] .flow-card { background: linear-gradient(145deg, color-mix(in srgb, var(--purple) 16%, #ffffff), color-mix(in srgb, var(--navy) 10%, #f4f0fb)); }
html[data-theme="light"] .album-cover > span { color: color-mix(in srgb, var(--purple) 70%, #000); }
html[data-theme="light"] .music-page .album-cover { box-shadow: 0 14px 30px -18px rgba(43, 4, 69, 0.35); }
html[data-theme="light"] .flow-card { box-shadow: 0 20px 40px -24px rgba(43, 4, 69, 0.4); }
html[data-theme="light"] .flow-card::after { background: #fff; }
.album-now { perspective: 900px; }

/* The three dots' menu on songs, albums and playlists (music-menu.js). */
.more-menu {
  position: fixed; z-index: 85; width: min(280px, calc(100vw - 20px)); max-height: min(420px, 70vh); overflow-y: auto;
  padding: 6px; border-radius: var(--r-lg); background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
}
.more-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; border: 0; background: transparent; color: inherit;
  padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-weight: 550;
}
.more-menu button:hover, .more-menu button:focus-visible { background: var(--bg-elev-2); outline: none; }
.more-menu button svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.more-menu .menu-danger { color: #d1435b; }
.more-menu .more-back { color: var(--muted); font-weight: 650; }
[dir="rtl"] .more-menu .more-back svg { transform: scaleX(-1); }
.more-split { margin: 8px 12px 4px; font-size: 0.76rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.song-row .more-btn, .feature-line .more-btn { opacity: 0.75; }
.song-row:hover .more-btn, .feature-line:hover .more-btn, .more-btn:focus-visible { opacity: 1; }

/* Listening numbers, for administrators and music administrators. */
.play-count { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 3px 8px; border-radius: 999px; font-size: 0.76rem; color: var(--muted); background: color-mix(in srgb, var(--text) 6%, transparent); direction: ltr; white-space: nowrap; }
.play-count svg { width: 12px; height: 12px; }
.play-count b { font-weight: 650; margin-inline-end: 4px; }
.feature-card > .play-count, .artist-pill .play-count { margin-top: 6px; }

/* Most listened, and the member's own. */
.block-title { margin: 18px 0 8px; font-size: 1rem; font-weight: 700; color: var(--muted); }
.song-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px 32px; }
.song-block h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.music-top .song-block .song-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); column-gap: 32px; }

/* Playlists in one row, a "new playlist" card, and a playlist's owner line. */
.list-rail { grid-auto-columns: minmax(170px, 200px); }
.new-list { display: block; width: 100%; border: 0; padding: 0; background: none; color: inherit; text-align: start; cursor: pointer; font: inherit; }
.new-list-cover { background: transparent !important; outline: 2px dashed var(--line-strong) !important; box-shadow: none !important; color: var(--muted); }
.new-list-cover svg { width: 34px; height: 34px; }
.new-list:hover .new-list-cover { color: var(--green-2); outline-color: var(--green-2) !important; }
.list-note { margin: -6px 0 12px; }

/* Making or changing one's own playlist. */
.list-editor { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(12, 6, 18, 0.45); backdrop-filter: blur(4px); }
.list-editor-card { width: min(380px, 100%); padding: 22px; border-radius: 20px; background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); display: grid; gap: 12px; }
.list-editor-card h3 { margin: 0 0 4px; font-family: var(--hebrew); font-size: 1.25rem; }
.list-check { display: flex; align-items: center; gap: 10px; font-weight: 550; cursor: pointer; }
.list-check input { width: 18px; height: 18px; accent-color: var(--green); }
.list-check input:disabled + span { opacity: 0.5; }
.list-editor-row { display: flex; gap: 8px; margin-top: 4px; }
.list-editor-row .btn { flex: 1; justify-content: center; }
.list-delete { border: 0; background: none; color: #d1435b; font: inherit; font-weight: 600; cursor: pointer; padding: 6px 0 0; justify-self: center; }

/* The Jewish date: day, month and year side by side. */
.date-pop-title { margin: 0 0 10px; font-weight: 700; }
.date-pop-fields { display: grid; grid-template-columns: 0.8fr 1.2fr 1fr; gap: 8px; }
.date-pop-fields label { display: grid; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.date-pop-fields select { font: inherit; font-size: 1rem; padding: 9px 8px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); }

/* Laptops: the line under the song that drags, with the time so far and the whole length. */
.mini-seek { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; direction: ltr; font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-seek input { width: 100%; height: 18px; margin: 0; accent-color: var(--green-2); cursor: pointer; }
@media (min-width: 901px) { .mini-player:has(.mini-seek) .mini-progress { display: none; } }
.mini-player.is-tucked .mini-seek, .shell.is-thin .mini-player .mini-seek { display: none; }

/* Play and Shuffle under a cover: the symbol and the word. */
.music-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; flex: none;
  border: 1px solid var(--line-strong); background: var(--bg-elev-solid); color: var(--text); font: inherit; font-weight: 650; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease;
}
.music-pill svg { width: 18px; height: 18px; flex: none; }
.music-pill:hover { border-color: color-mix(in srgb, var(--green-2) 55%, transparent); transform: translateY(-2px); }
.music-pill:active { transform: scale(0.95); }
.music-pill.is-main { border: 0; background: var(--green); color: var(--green-ink, #fff); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--green) 80%, transparent); }
.music-pill.is-main:hover { background: var(--green-2); }

/* The singers under a song's name, and singers' names that lead to their page. */
.song-names { display: grid; gap: 2px; min-width: 0; }
.song-singers { color: var(--muted); font-size: 0.82rem; line-height: 1.3; overflow-wrap: anywhere; }
.singer-link { cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.singer-link:hover, .singer-link:focus-visible { color: var(--text); text-decoration-color: currentColor; outline: none; }
.flow-singer { color: var(--muted); }
.flow-date { color: var(--muted); font-size: 0.86rem; min-height: 1.2em; }

/* A singer's page: their picture, with Play and Shuffle under it. */
.singer-face { display: grid; justify-items: center; gap: 4px; }
.singer-face .music-balls { margin-top: 8px; }

/* Music videos: picture, then name, singer and year, with the three dots. */
.video-card-wrap { display: grid; gap: 8px; min-width: 0; }
.video-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.video-line > div { display: grid; gap: 2px; min-width: 0; }
.video-line strong { font-family: var(--hebrew); font-weight: 600; font-size: 0.95rem; line-height: 1.3; overflow-wrap: anywhere; }
.video-line small { color: var(--muted); font-size: 0.82rem; }
@media (prefers-reduced-motion: reduce) { .music-pill, .music-pill:hover, .music-pill:active { transition: none; transform: none; } }

/* ---- Music, rebuilt ---------------------------------------------------------------------------------- */

/* Above a cover: the three dots at the start, an arrow back at the end. */
.music-top-bar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; min-height: 44px; }
.music-top-bar .more-btn { width: 44px; height: 44px; opacity: 1; border: 1px solid var(--line-strong); background: var(--bg-elev-solid); }
.music-back { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--bg-elev-solid); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform 0.2s var(--ease); }
.music-back svg { width: 20px; height: 20px; }
.music-back:hover { transform: translateX(-3px); }
.cover-button { display: block; border: 0; padding: 0; cursor: zoom-in; font: inherit; color: inherit; }
.music-singers { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.see-all { font-weight: 650; white-space: nowrap; color: var(--green-2); text-decoration: none; }
.see-all:hover { text-decoration: underline; }

/* A cover over the whole screen, to send or download. */
.cover-view { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; align-content: center; gap: 18px; padding: 56px 16px calc(24px + env(safe-area-inset-bottom)); background: rgba(8, 4, 12, 0.92); backdrop-filter: blur(10px); }
.cover-view img { max-width: min(92vw, 900px); max-height: 72vh; border-radius: 14px; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6); object-fit: contain; }
.cover-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cover-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); inset-inline-end: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
html.cover-open { overflow: hidden; }

/* Songs like the picture: columns of three, each song with its picture, name, singer and length, a heart and three dots. */
.song-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: minmax(280px, calc((100% - 40px) / 3));
  gap: 4px 20px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 2px 2px 12px; scrollbar-width: thin;
}
.song-grid.is-full { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); overflow: visible; }
.grid-song { display: flex; align-items: center; gap: 4px; min-width: 0; scroll-snap-align: start; border-radius: 12px; transition: background 0.15s; }
.grid-song:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.grid-song-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px; border: 0; background: none; color: inherit; text-align: start; cursor: pointer; font: inherit; border-radius: 12px; }
.grid-art { width: 52px; height: 52px; flex: none; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--purple) 18%, var(--bg-elev-2)); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.grid-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid-names { display: grid; gap: 2px; min-width: 0; }
.grid-names strong { font-family: var(--hebrew); font-weight: 650; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-names small { color: var(--muted); font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-song-main.is-on .grid-names strong { color: var(--green-2); }
.grid-heart { width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: transform 0.2s var(--ease), color 0.2s; }
.grid-heart svg { width: 20px; height: 20px; }
.grid-heart:hover { color: var(--text); }
.grid-heart.is-on { color: #e5367f; }
.grid-heart.is-on svg path { fill: currentColor; }
.grid-heart:active { transform: scale(0.85); }
.grid-song .more-btn { opacity: 0.8; }
@media (max-width: 900px) { .song-grid:not(.is-full) { grid-auto-columns: 86%; } }

/* Wide pictures at the top of the music page. */
.music-banners { margin: 0 0 28px; }
.banner-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { position: relative; scroll-snap-align: center; }
.banner { display: block; position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 5 / 2; background: color-mix(in srgb, var(--purple) 20%, var(--bg-elev-2)); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.5); }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.banner:hover img { transform: scale(1.02); }
.banner-title { position: absolute; inset-inline: 0; bottom: 0; padding: 40px 22px 16px; color: #fff; font-family: var(--hebrew); font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 1.8rem); background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); }
.banner-edit { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.banner-edit svg { width: 18px; height: 18px; }
.banner-add { aspect-ratio: 5 / 2; border-radius: 20px; border: 2px dashed var(--line-strong); background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 650; cursor: pointer; }
.music-banners:has(.banner) .banner-add { aspect-ratio: auto; }
.banner-track:has(.banner) { grid-auto-columns: 100%; }
.banner-track:has(.banner) .banner-add { position: absolute; inset-inline-start: 12px; top: 12px; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; z-index: 2; }
.music-banners { position: relative; }
.banner-add svg { width: 20px; height: 20px; }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.banner-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: width 0.3s var(--ease), background 0.3s; }
.banner-dots button.is-on { width: 22px; background: var(--green-2); }
.banner-form .banner-pick { display: grid; gap: 6px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.banner-form .banner-pick small { color: var(--muted); font-weight: 500; }
.banner-form .banner-pick img, .banner-empty { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 12px; background: var(--bg-elev-2); border: 2px dashed var(--line-strong); display: block; }
.banner-targets { width: 100%; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; padding: 4px; }
.banner-form select[name="type"] { font: inherit; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); }

/* Who sings: every singer with a tick, and a box for a new one. */
.singer-filter { width: 100%; font: inherit; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); }
.singer-checks { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.singer-check { padding: 6px 8px; border-radius: 8px; }
.singer-check:hover { background: var(--bg-elev-2); }
.singer-new { display: flex; gap: 8px; }
.singer-new input { flex: 1; font: inherit; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); }
.singer-new .btn svg { width: 18px; height: 18px; }

/* "See all" for singers. */
.singer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.banner-pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 240px; overflow-y: auto; padding: 4px; border-radius: 12px; border: 1px solid var(--line); min-height: 60px; }
.banner-choice { padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden; background: var(--bg-elev-2); cursor: pointer; aspect-ratio: 5 / 2; }
.banner-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-choice.is-on { border-color: var(--green-2); }

/* Music's own search bar, with suggestions while typing. */
.music-search { position: relative; z-index: 30; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 8px 0 14px; margin: 0 0 22px; border-radius: 999px; background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.45); transition: border-color 0.2s, box-shadow 0.2s; }
.music-search:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-2) 18%, transparent); }
.ms-icon { display: grid; place-items: center; color: var(--muted); }
.ms-icon svg { width: 20px; height: 20px; }
.music-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.02rem; outline: none; }
.music-search input::-webkit-search-cancel-button { display: none; }
.ms-clear { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.ms-clear svg { width: 18px; height: 18px; }
.ms-drop { position: absolute; top: calc(100% + 8px); inset-inline: 0; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; border-radius: 18px; background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); }
.ms-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.ms-row:hover, .ms-row.is-on { background: var(--bg-elev-2); }
.ms-row > svg { width: 20px; height: 20px; color: var(--muted); flex: none; margin-inline: 10px; }
.ms-pic { width: 44px; height: 44px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--purple) 18%, var(--bg-elev-2)); color: var(--muted); font-weight: 700; }
.ms-pic.is-round, .ms-top-pic.is-round { border-radius: 50%; }
.ms-pic img, .ms-top-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-names { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ms-names strong { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-names small { color: var(--muted); font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-all strong { color: var(--green-2); }
.ms-forget { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.ms-forget svg { width: 16px; height: 16px; }
.ms-tabs { display: flex; gap: 8px; overflow-x: auto; margin: -8px 0 20px; padding-bottom: 4px; scrollbar-width: none; }
.ms-tab { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-elev-solid); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.ms-tab small { color: var(--muted); font-weight: 500; }
.ms-tab.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ms-tab.is-on small { color: inherit; opacity: 0.7; }
.ms-top { margin-bottom: 26px; }
.ms-top-card { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 20px; background: var(--bg-elev-solid); border: 1px solid var(--line); color: inherit; text-decoration: none; max-width: 640px; transition: background 0.2s; }
.ms-top-card:hover { background: var(--bg-elev-2); }
.ms-top-pic { width: 96px; height: 96px; flex: none; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--purple) 18%, var(--bg-elev-2)); }
.ms-top-card .ms-names strong { font-family: var(--hebrew); font-size: 1.35rem; white-space: normal; }
.ms-none { font-size: 1.05rem; padding: 30px 0; text-align: center; }
@media (max-width: 560px) { .ms-top-card { flex-wrap: wrap; } .ms-top-card .music-pill { width: 100%; justify-content: center; } }
.ms-top-pic { display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: var(--muted); }

/* The wide pictures turning in depth, like the old wheel but made for wide pictures. */
.flow-banner .flow-stage { --flow-w: clamp(240px, 66vw, 660px); height: calc(var(--flow-w) * 0.46); perspective: 1600px; }
.flow-banner .flow-card { aspect-ratio: 5 / 2; border-radius: 20px; }
.banner-under { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; min-height: 30px; }
.banner-name { margin: 0; font-family: var(--hebrew); font-weight: 700; font-size: 1.15rem; text-align: center; }
.banner-tools { display: flex; gap: 8px; align-items: center; }
.music-banners:not(:has([data-banner-flow])) .banner-under { justify-content: flex-start; }

/* An album's or playlist's songs: one under another, like the search results. */
.song-grid.is-list { grid-template-columns: 1fr; gap: 2px; }
.song-grid.is-list .grid-song { border-bottom: 1px solid var(--line); border-radius: 0; }
.song-grid.is-list .grid-song:hover { border-radius: 12px; }
.grid-drop { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.grid-drop:hover { color: #d1435b; background: color-mix(in srgb, #d1435b 10%, transparent); }
.grid-drop svg { width: 16px; height: 16px; }
.music-head { display: flex; align-items: flex-start; gap: 10px; }
.music-head .music-search { flex: 1; }
.music-zip-all { width: 50px; height: 50px; }

/* "Where are you?": picking the pictures one is in. */
.pick-page { padding-bottom: 110px; }
.pick-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.pick-face { width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--purple); color: #fff; font-size: 2rem; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-2) 45%, transparent); }
.pick-face img { width: 100%; height: 100%; object-fit: cover; }
.pick-head .page-title { margin: 0 0 4px; }
.pick-head p { margin: 2px 0; }
.pick-left { font-size: var(--t-meta); color: var(--green-2); font-weight: 600; }
.where-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.where-tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--bg-elev-solid); cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s; }
.where-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s, transform .25s; }
.where-tile:hover img { transform: scale(1.03); }
.where-tile.is-picked { outline-color: var(--green-2); }
.where-tile.is-picked img { filter: brightness(.82); }
.where-check { position: absolute; top: 8px; inset-inline-start: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); border: 2px solid rgba(255, 255, 255, .85); color: transparent; transition: background .15s, color .15s, transform .2s; }
.where-check svg { width: 17px; height: 17px; }
.where-tile.is-picked .where-check { background: var(--green-2); border-color: #fff; color: var(--green-ink); transform: scale(1.08); }
.where-zoom { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; opacity: .85; }
.where-zoom svg { width: 15px; height: 15px; }
.pick-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--bg-elev); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
.pick-count { white-space: nowrap; color: var(--muted); }
.pick-count b { display: inline-block; color: var(--text); font-size: 1.25rem; min-width: 1.4ch; text-align: center; }
.pick-bar .btn { border-radius: 999px; white-space: nowrap; }
.pick-links { margin-top: 18px; text-align: center; }
.pick-big { position: fixed; inset: 0; z-index: 90; background: rgba(5, 3, 8, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; }
.pick-big img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: var(--r-lg); object-fit: contain; }
.pick-big-bar { display: flex; gap: 10px; }
.pick-big-bar .btn { border-radius: 999px; min-width: 120px; }
.pick-big-bar svg { width: 16px; height: 16px; }
.pick-done { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; pointer-events: none; }
.pick-done-card { position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 34px; border-radius: var(--r-xl); background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); text-align: center; }
.pick-done-card strong { font-size: 2.6rem; line-height: 1; }
.pick-done-card p { margin: 0; color: var(--muted); }
.pick-done-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--green-2); color: var(--green-ink); }
.pick-done-mark svg { width: 28px; height: 28px; }
.pick-bit { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--green-2); }
.pick-bit:nth-child(3n) { background: var(--warning); }
.pick-bit:nth-child(3n+1) { background: #b48ce0; }
.pick-invite { display: flex; align-items: center; gap: 14px; margin: 10px 0 18px; padding: 14px 18px; border-radius: var(--r-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--green) 55%, transparent), color-mix(in srgb, var(--purple) 70%, transparent)); color: #fff; text-decoration: none; border: 1px solid var(--line-strong); }
.pick-invite svg { width: 26px; height: 26px; flex: none; }
.pick-invite span { display: grid; gap: 2px; }
.pick-invite small { opacity: .85; }
.person-own { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.person-own .btn svg { width: 16px; height: 16px; }
.pick-drop { display: none; position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 0; place-items: center; background: #d1435b; color: #fff; cursor: pointer; }
.pick-drop svg { width: 15px; height: 15px; }
.is-tidying .pick-drop { display: grid; }
@media (max-width: 640px) {
  .where-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .where-tile { border-radius: 8px; }
  .where-check { width: 24px; height: 24px; top: 5px; inset-inline-start: 5px; }
  .where-zoom { width: 26px; height: 26px; bottom: 5px; inset-inline-end: 5px; }
  .pick-face { width: 64px; height: 64px; }
}

/* A singer's pictures on their page, and the large view (pictures only). */
.photo-rail .singer-photo { flex: none; width: 180px; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--bg-elev-solid); cursor: zoom-in; }
.photo-rail .singer-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo-rail .singer-photo:hover img { transform: scale(1.04); }
.photo-big { position: fixed; inset: 0; z-index: 90; background: rgba(5, 3, 8, .92); display: grid; place-items: center; padding: 16px; }
.photo-big img { max-width: min(100%, 1400px); max-height: calc(100vh - 80px); border-radius: var(--r-lg); object-fit: contain; }
.photo-big-close, .photo-big-step { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.photo-big-close { top: 16px; inset-inline-end: 16px; }
.photo-big-step { top: 50%; transform: translateY(-50%); }
.photo-big-step.is-prev { inset-inline-start: 16px; }
.photo-big-step.is-next { inset-inline-end: 16px; }
.photo-big-close svg, .photo-big-step svg { width: 20px; height: 20px; }
.photo-big-count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); margin: 0; }
@media (max-width: 640px) { .photo-rail .singer-photo { width: 130px; } .photo-big-step { display: none; } }

/* Liked songs and For you. */
.liked-cover { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #6d2bd9, #c2386b 60%, #f08a5d); color: #fff; }
.liked-cover svg { width: 42%; height: 42%; fill: currentColor; }
.liked-face { width: min(240px, 60vw); aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; margin: 6px 0 14px; }
.row-note { margin: -6px 0 10px; font-size: var(--t-meta); }

/* Music page: drag handles only after "arrange" is tapped on a row; music videos larger, with a play mark. */
.arrange-handle { display: none; }
.is-arrange-on .arrange-handle { display: grid; }
.arrange-switch { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.arrange-switch[aria-pressed="true"] { background: var(--green-2); border-color: var(--green-2); color: var(--green-ink); }
.video-rail { grid-auto-columns: minmax(300px, 360px); }
.music-video-card { position: relative; aspect-ratio: 16 / 9; margin: 0; border-radius: var(--r-lg); }
.music-video-card img { width: 100%; height: 100%; object-fit: cover; }
.music-video-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 2, 12, .45), transparent 45%); pointer-events: none; }
.video-play { position: absolute; inset: 0; margin: auto; z-index: 2; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #1b0a2a; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: transform .3s var(--spring), background .2s; }
.video-play svg { width: 22px; height: 22px; margin-inline-start: 3px; }
.music-video-card:hover .video-play { transform: scale(1.12); background: #fff; }
.video-time { position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 2; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .76rem; font-variant-numeric: tabular-nums; direction: ltr; }
.video-grid-all { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (max-width: 640px) { .video-rail { grid-auto-columns: 78vw; } }
.singer-check.is-chosen { background: color-mix(in srgb, var(--green-2) 14%, transparent); border-radius: 10px; }

/* Administration: activity by person and by day. */
.act-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line); margin: 4px 0 16px; }
.act-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; }
.act-tabs a svg { width: 17px; height: 17px; }
.act-tabs a[aria-selected="true"] { background: var(--green-2); color: var(--green-ink); }
.act-find { display: block; max-width: 520px; margin-bottom: 10px; }
.act-note { font-size: var(--t-meta); margin: 4px 0 14px; }
.act-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 10px; font-size: 1.05rem; }
.act-head small, .act-day h3 small { color: var(--muted); font-weight: 500; font-size: .82rem; }
.act-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.act-people.is-quiet { opacity: .72; }
.act-person { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .2s, transform .25s var(--spring); }
.act-person:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.act-face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--purple); color: #fff; font-weight: 700; flex: none; }
.act-person-main { display: grid; min-width: 0; }
.act-person-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-person-main small { color: var(--muted); font-size: .8rem; }
.act-counts { display: flex; gap: 8px; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.act-counts span { display: inline-flex; align-items: center; gap: 3px; }
.act-counts svg { width: 14px; height: 14px; }
.act-live { position: absolute; top: 10px; inset-inline-start: 46px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--bg-elev-solid); }
.act-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; margin-bottom: 12px; }
.act-back svg { width: 16px; height: 16px; }
.act-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.act-hero .act-face { width: 72px; height: 72px; font-size: 1.6rem; }
.act-hero .page-title { margin: 0; }
.act-hero p { margin: 2px 0; }
.act-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.act-stat { display: grid; justify-items: start; gap: 2px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-elev); border: 1px solid var(--line); }
.act-stat svg { width: 18px; height: 18px; color: var(--green-2); }
.act-stat b { font-size: 1.5rem; line-height: 1.1; }
.act-stat span { color: var(--muted); font-size: .8rem; }
.act-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.act-filters button, .act-filters a { border: 1px solid var(--line-strong); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: .85rem; text-decoration: none; cursor: pointer; }
.act-filters [aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.act-day { margin-bottom: 18px; }
.act-day h3 { position: sticky; top: 0; z-index: 2; margin: 0 0 6px; padding: 8px 0; font-size: .95rem; background: var(--bg); }
.act-list { display: grid; gap: 2px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.act-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg-elev); color: var(--text); text-decoration: none; }
a.act-row:hover { background: var(--bg-elev-2, var(--bg-elev)); }
.act-row[hidden], .act-day[hidden] { display: none; }
.act-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.act-icon svg { width: 16px; height: 16px; }
.act-icon.is-signin, .act-icon.is-signout { color: #5aa7e0; background: color-mix(in srgb, #5aa7e0 16%, transparent); }
.act-icon.is-photo, .act-icon.is-video, .act-icon.is-folder { color: var(--green-2); background: color-mix(in srgb, var(--green-2) 16%, transparent); }
.act-icon.is-song { color: #b48ce0; background: color-mix(in srgb, #b48ce0 18%, transparent); }
.act-icon.is-download { color: var(--warning); background: color-mix(in srgb, var(--warning) 18%, transparent); }
.act-icon.is-like, .act-icon.is-comment { color: #e0708c; background: color-mix(in srgb, #e0708c 16%, transparent); }
.act-text { display: grid; gap: 2px; min-width: 0; }
.act-text > span { overflow: hidden; text-overflow: ellipsis; }
.act-text a { color: inherit; }
.act-text small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem; }
.act-text small svg { width: 12px; height: 12px; }
.act-quote { font-style: italic; }
.act-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.act-row time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .act-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 10px 12px; }
  .act-row .act-thumb { display: none; }
  .act-counts { display: none; }
  .act-stats { grid-template-columns: repeat(3, 1fr); }
}

/* Choosing the picture of a folder link. */
.link-pick h2 { margin: 0 0 4px; }
.link-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; max-height: min(56vh, 520px); overflow-y: auto; margin: 12px 0; padding: 2px; }
.link-pick-tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; background: var(--bg-elev-solid); }
.link-pick-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link-pick-tile[aria-pressed="true"] { outline-color: var(--green-2); }
.link-pick-mark { position: absolute; top: 6px; inset-inline-start: 6px; width: 26px; height: 26px; border-radius: 50%; display: none; place-items: center; background: var(--green-2); color: var(--green-ink); }
.link-pick-mark svg { width: 15px; height: 15px; }
.link-pick-tile[aria-pressed="true"] .link-pick-mark { display: grid; }


/* The menu that slides in from the side, on every screen now (there is no side panel on a laptop). */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 34; background: rgba(6, 3, 12, 0.5);
  animation: palette-fade 0.2s var(--ease);
}
.sheet-scrim[hidden] { display: none; }
html.sheet-open, html.sheet-open body, html.np-open, html.np-open body { overflow: hidden; }

/* Phone menu: the laptop sidebar as a drawer that slides in from the side */
.sheet {
  display: flex; flex-direction: column; gap: 6px; position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 35;
  width: min(320px, 86vw); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, color-mix(in srgb, var(--purple) 92%, var(--navy)) 0%, color-mix(in srgb, var(--purple) 70%, #07030c) 100%);
  color: #f4f1ec; box-shadow: 0 0 50px rgba(0, 0, 0, 0.45);
  transform: translateX(105%); visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
html[dir="ltr"] .sheet { transform: translateX(-105%); }
.sheet.open, html[dir="ltr"] .sheet.open { transform: none; visibility: visible; transition-delay: 0s; }
.sheet-top { display: flex; align-items: center; gap: 8px; padding: 0 2px 6px; }
.sheet-top .side-fold { width: 40px; height: 40px; }
.sheet-who {
  min-height: 60px; padding: 8px 10px; margin: 0 0 4px; color: inherit; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.06); border: 0;
}
.sheet-who span:not(.avatar) { display: grid; line-height: 1.25; min-width: 0; }
.sheet-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-who small { color: rgba(244, 241, 236, 0.65); font-family: var(--sans); font-weight: 500; font-size: 0.8rem; }
.sheet-who .avatar { width: 44px; height: 44px; }
.sheet-nav { display: flex; flex-direction: column; gap: 2px; }
.sheet-nav .side-label { margin: 16px 12px 6px; }
.sheet a:not(.brand):not(.sheet-who), .sheet-row {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 12px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: rgba(244, 241, 236, 0.82);
  font-weight: 500; font-size: 0.98rem; text-align: start;
}
.sheet a:not(.brand):not(.sheet-who) svg, .sheet-row svg { width: 21px; height: 21px; flex: none; opacity: 0.85; }
.sheet a:not(.brand):not(.sheet-who):active, .sheet-row:active { background: rgba(255, 255, 255, 0.1); }
.sheet a.active { background: rgba(255, 255, 255, 0.11); color: #fff; font-weight: 600; }
.sheet a.active svg { color: color-mix(in srgb, var(--green-2) 70%, #ffffff); opacity: 1; }
.sheet a.active::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--green-2);
}
.sheet-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: grid; gap: 2px; }

/* No side panel on a laptop: the menu is behind the three lines, like on a phone. */
@media (min-width: 901px) {
  .shell, .shell.is-thin { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar .top-menu { display: inline-flex; }
  .main { max-width: 1680px; width: 100%; margin: 0 auto; }
  /* The song playing: a bar along the bottom, above the menu bar. */
  .mini-player:not([hidden]), .mini-player.is-tucked:not([hidden]) {
    display: grid !important; grid-template-columns: auto minmax(140px, 240px) auto minmax(160px, 1fr) auto; align-items: center; gap: 14px;
    left: 50%; right: auto; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--tab-gap) + 34px);
    width: min(1000px, calc(100vw - 32px)); height: auto; padding: 8px 12px; border-radius: 18px; text-align: start;
  }
  .mini-player .player-disc-wrap, .mini-player.is-tucked .player-disc-wrap { width: 48px; height: 48px; }
  .mini-player .player-disc, .mini-player.is-tucked .player-disc { border-radius: 10px; animation: none; border: 0; }
  .mini-player .player-info, .mini-player.is-tucked .player-info { display: flex; align-items: flex-start; text-align: start; }
  .mini-player .soundwave, .mini-player .mini-tools [data-act="hide"], .mini-player .mini-progress { display: none !important; }
  .mini-player .player-controls, .mini-player.is-tucked .player-controls { display: flex; width: auto; }
  .mini-player .mini-seek, .mini-player.is-tucked .mini-seek { display: grid !important; }
  .mini-player .mini-tools { position: static; display: flex; }
  .mini-player .mini-open { display: none; }
  .np-ball { display: none !important; }
  .main { padding-bottom: calc(var(--tabbar-h) + 40px); }
  .shell:has(.mini-player:not([hidden])) .main { padding-bottom: calc(var(--tabbar-h) + 120px); }
}

/* The bar along the bottom: a floating white pill. The open place has its icon and name coloured, with a
   small dot under it; the song playing is the large round button standing up in the middle. */
:root { --tabbar-h: 66px; --tab-gap: 12px; --tab-now: 60px; }
nav.tabbar {
  --bar-bg: color-mix(in srgb, var(--bg-elev-solid) 95%, transparent);
  --tab-accent: #b79cf5;
  position: fixed; z-index: 46; display: flex; align-items: stretch; gap: 0;
  bottom: calc(var(--tab-gap) + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  height: var(--tabbar-h); padding: 0 10px; border-radius: 999px;
  background: var(--bar-bg);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--line);
  box-shadow: 0 22px 44px -18px rgba(20, 6, 40, .45), 0 6px 16px -6px rgba(20, 6, 40, .18);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: opacity .25s, transform .35s var(--ease);
}
html[data-theme="light"] nav.tabbar { --tab-accent: color-mix(in srgb, var(--purple) 70%, #7c3aed); }
nav.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 78px; padding: 0 8px 6px; margin: 0; border-radius: 0; background: transparent;
  color: var(--muted); font-size: 0.72rem; font-weight: 600; text-decoration: none;
  -webkit-tap-highlight-color: transparent; outline: none; transition: color .3s var(--ease);
}
nav.tabbar a:hover { color: var(--text); }
nav.tabbar a:focus-visible .tab-icon { box-shadow: var(--ring); border-radius: 10px; }
.tab-icon { position: relative; display: grid; place-items: center; width: 26px; height: 26px; transition: transform .45s var(--spring); }
nav.tabbar .tab-icon svg { width: 23px; height: 23px; transition: color .3s, fill .3s; }
.tab-label { white-space: nowrap; line-height: 1; transition: color .3s; }
nav.tabbar a.active { color: var(--tab-accent); }
nav.tabbar a.active .tab-icon { transform: translateY(-1px) scale(1.08); }
nav.tabbar a.active .tab-icon svg { fill: color-mix(in srgb, var(--tab-accent) 30%, transparent); }
nav.tabbar a.active .tab-label { font-weight: 700; }
nav.tabbar a::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--tab-accent); transform: scale(0); transition: transform .4s var(--spring);
}
nav.tabbar a.active::after { transform: scale(1); }
nav.tabbar a:active .tab-icon { transform: scale(.88); }
/* The song playing: a round button in the middle, standing up out of the bar. */
nav.tabbar .tab-now {
  position: relative; flex: none; align-self: center; width: var(--tab-now); height: var(--tab-now); min-width: 0; margin: -30px 6px 0; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: linear-gradient(145deg, #6d8cff 0%, #7c4dff 55%, color-mix(in srgb, var(--purple) 70%, #9b4dff) 100%);
  box-shadow: 0 0 0 6px var(--bar-bg), 0 14px 26px -8px rgba(110, 70, 255, .65);
  -webkit-tap-highlight-color: transparent; transition: transform .35s var(--spring), box-shadow .3s;
}
nav.tabbar .tab-now:active { transform: scale(.92); }
nav.tabbar .tab-now:focus-visible { box-shadow: 0 0 0 6px var(--bar-bg), var(--ring); outline: none; }
.tab-now .tab-icon { width: 100%; height: 100%; }
nav.tabbar .tab-now .tab-icon svg { width: 26px; height: 26px; color: #fff; }
.tab-disc { position: absolute; inset: 5px; border-radius: 50%; background: var(--purple) center / cover no-repeat; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--spring); }
.tab-now.has-song .tab-disc { opacity: 1; transform: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.tab-now.is-playing .tab-disc { animation: spin 6s linear infinite; }
.tab-note { display: grid; place-items: center; transition: opacity .2s; }
.tab-now.has-song .tab-note { opacity: 0; }
.tab-eq { position: absolute; bottom: 4px; inset-inline-end: 4px; display: none; align-items: flex-end; gap: 2px; height: 12px; padding: 2px 3px; border-radius: 6px; background: #fff; }
.tab-eq i { width: 2px; height: 3px; border-radius: 2px; background: #7c4dff; }
.tab-now.is-playing .tab-eq { display: flex; }
.tab-now.is-playing .tab-eq i:nth-child(1) { animation: wave-sm .8s ease-in-out infinite; }
.tab-now.is-playing .tab-eq i:nth-child(2) { animation: wave-sm .9s ease-in-out infinite .15s; }
.tab-now.is-playing .tab-eq i:nth-child(3) { animation: wave-sm .7s ease-in-out infinite .3s; }
@keyframes wave-sm { 0%, 100% { height: 3px; } 50% { height: 8px; } }
html.np-open nav.tabbar, html.sheet-open nav.tabbar { opacity: 0; pointer-events: none; transform: translate(-50%, 30px); }
@media (prefers-reduced-motion: reduce) {
  .tab-icon, nav.tabbar a::after, nav.tabbar .tab-now { transition: none !important; }
  .tab-now.is-playing .tab-disc, .tab-eq i { animation: none !important; }
}
@media (max-width: 900px) {
  :root { --tabbar-h: 62px; --tab-gap: 10px; --tab-now: 56px; }
  nav.tabbar { left: 12px; right: 12px; transform: none; padding: 0 4px; justify-content: space-around; }
  html.np-open nav.tabbar, html.sheet-open nav.tabbar { transform: translateY(30px); }
  nav.tabbar a { min-width: 0; flex: 1 1 0; padding: 0 2px 6px; font-size: 0.64rem; }
  .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  nav.tabbar .tab-icon svg { width: 22px; height: 22px; }
  nav.tabbar .tab-now { margin: -28px 4px 0; }
  .mini-player:not([hidden]), .mini-player.is-tucked:not([hidden]) { bottom: calc(var(--tabbar-h) + var(--tab-gap) + 30px + env(safe-area-inset-bottom)); }
  .main { padding-bottom: calc(var(--tabbar-h) + 48px + env(safe-area-inset-bottom)); }
  .shell:has(.mini-player:not([hidden])) .main { padding-bottom: calc(var(--tabbar-h) + 130px + env(safe-area-inset-bottom)); }
  html:has(.mini-player:not([hidden])) .toasts { bottom: calc(var(--tabbar-h) + 112px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(var(--tabbar-h) + 38px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  nav.tabbar { left: 8px; right: 8px; }
  .tab-label { font-size: 0.58rem; }
}
.act-face { overflow: hidden; }
.act-face img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* Two equal halves, so the round button stands exactly in the middle. */
.tab-side { flex: 1 1 0; display: flex; align-items: stretch; justify-content: space-around; min-width: 0; }
@media (max-width: 900px) { .tab-side a { flex: 1 1 0; } }
/* A laptop gives the bar a set width, so each half holds its places beside the round button. */
@media (min-width: 901px) { nav.tabbar { width: min(680px, calc(100vw - 32px)); } }
nav.tabbar .tab-now { box-shadow: 0 0 0 6px var(--tab-ring, var(--bg-elev-solid)), 0 14px 26px -8px rgba(110, 70, 255, .65); }
/* A picture whose size the site does not know yet keeps a set space, so nothing under it shifts when it loads. */
.masonry .shot img:not([style*="aspect-ratio"]) { aspect-ratio: 4 / 5; object-fit: cover; }

/* ---- The bar, thinner (latest): the logo of the part one is in stands in the middle; while music plays,
   the song's cover turns there instead. The separate bar for the song playing is gone. ---- */
#now-playing, #now-playing:not([hidden]) { display: none !important; }
:root { --tabbar-h: 54px; --tab-now: 52px; }
nav.tabbar a { gap: 3px; padding-bottom: 5px; }
nav.tabbar .tab-icon svg { width: 21px; height: 21px; }
nav.tabbar a::after { bottom: 2px; width: 4px; height: 4px; margin-left: -2px; }
nav.tabbar .tab-now {
  margin: -22px 6px 0;
  background: var(--bg-elev-solid);
  box-shadow: 0 0 0 4px var(--bg-elev-solid), 0 0 0 6px color-mix(in srgb, var(--tab-accent) 55%, transparent), 0 12px 24px -10px rgba(60, 20, 120, .55);
}
.tab-logo { position: absolute; inset: 18%; width: 64%; height: 64%; object-fit: contain; transition: opacity .3s, transform .45s var(--spring); }
.tab-now.has-song .tab-logo { opacity: 0; transform: scale(.6); }
.tab-disc { inset: 3px; }
.tab-eq { background: var(--tab-accent); }
.tab-eq i { background: #fff; }
.main, .shell:has(.mini-player:not([hidden])) .main { padding-bottom: calc(var(--tabbar-h) + var(--tab-gap) + 34px + env(safe-area-inset-bottom)); }
html:has(.mini-player:not([hidden])) .toasts, .toasts { bottom: calc(var(--tabbar-h) + var(--tab-gap) + 26px + env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
  :root { --tabbar-h: 54px; --tab-now: 50px; --tab-gap: 8px; }
  nav.tabbar [data-wide] { display: none; }
  nav.tabbar a { font-size: 0.6rem; padding: 0 1px 5px; }
  nav.tabbar .tab-icon { width: 22px; height: 22px; }
  nav.tabbar .tab-icon svg { width: 20px; height: 20px; }
  nav.tabbar .tab-now { margin: -20px 3px 0; }
}
/* A laptop: a thin bar, icon and name side by side, with most of the places used often. */
@media (min-width: 901px) {
  :root { --tabbar-h: 46px; --tab-now: 46px; --tab-gap: 12px; }
  nav.tabbar { width: auto; max-width: calc(100vw - 32px); padding: 0 12px; }
  .tab-side { flex: 0 0 auto; justify-content: center; gap: 2px; }
  nav.tabbar a { flex-direction: row; gap: 7px; min-width: 0; padding: 0 11px; font-size: 0.8rem; justify-content: center; }
  nav.tabbar .tab-icon { width: 19px; height: 19px; }
  nav.tabbar .tab-icon svg { width: 18px; height: 18px; }
  nav.tabbar a.active .tab-icon { transform: none; }
  nav.tabbar a::after { bottom: 3px; }
  nav.tabbar .tab-now { margin: -14px 10px 0; }
}
/* The music search bar and its download button fit any phone (they made the music page wider than a
   small phone, which made the whole page, and the bar at the bottom, too wide). Nothing in the page
   may widen it sideways. */
.music-head { min-width: 0; }
.music-head .music-search { flex: 1 1 0; min-width: 0; }
.music-head .music-zip-all { flex: none; }
.main { overflow-x: clip; }
/* A laptop: two equal sides (each as wide as the longer one), so the round button stands in the middle. */
@media (min-width: 901px) {
  nav.tabbar { display: grid; grid-template-columns: 1fr auto 1fr; width: max-content; max-width: calc(100vw - 32px); }
  .tab-side { min-width: 0; }
  .tab-side:first-child { justify-content: flex-end; }
  .tab-side:last-child { justify-content: flex-start; }
}
/* The round button's picture fills it (the small-icon size of the other places must not apply here). */
nav.tabbar .tab-now .tab-icon, nav.tabbar a.active ~ .tab-now .tab-icon { width: 100%; height: 100%; transform: none; }
nav.tabbar .tab-now .tab-logo { inset: 16%; width: 68%; height: 68%; }
@media (max-width: 360px) { nav.tabbar a { font-size: 0.55rem; } }
/* A laptop: the same small, classic bar as on a phone (icon over its name), centred, with four places on
   each side. This replaces the long bar that ran the width of the screen. */
@media (min-width: 901px) {
  :root { --tabbar-h: 58px; --tab-now: 52px; --tab-gap: 14px; }
  nav.tabbar { display: flex; width: auto; max-width: calc(100vw - 32px); padding: 0 10px; grid-template-columns: none; }
  .tab-side, .tab-side:first-child, .tab-side:last-child { flex: 1 1 0; justify-content: space-around; gap: 0; }
  nav.tabbar a { flex-direction: column; gap: 3px; width: 72px; min-width: 72px; padding: 0 4px 6px; font-size: 0.7rem; }
  nav.tabbar .tab-icon { width: 22px; height: 22px; }
  nav.tabbar .tab-icon svg { width: 21px; height: 21px; }
  nav.tabbar a::after { bottom: 2px; }
  nav.tabbar .tab-now { margin: -20px 10px 0; }
}

/* The music stopped when the app was left: a box to play on, with an X at the top. */
.music-stopped {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabbar-h) + var(--tab-gap) + 30px + env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 24px)); padding: 16px 16px 14px; border-radius: 22px;
  background: var(--bg-elev-solid); border: 1px solid var(--line-strong); box-shadow: 0 24px 50px -18px rgba(20, 6, 40, .55);
  transform: translate(-50%, 24px); opacity: 0; transition: transform .45s var(--spring), opacity .25s;
  display: grid; gap: 10px;
}
.music-stopped.is-in { transform: translate(-50%, 0); opacity: 1; }
.music-stopped-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--bg-elev); color: var(--muted); cursor: pointer; }
.music-stopped-x svg { width: 16px; height: 16px; }
.music-stopped-main { display: flex; gap: 12px; align-items: flex-start; padding-inline-end: 34px; }
.music-stopped-mark { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #6d8cff, #7c4dff); }
.music-stopped-mark svg { width: 22px; height: 22px; }
.music-stopped strong { display: block; font-size: 1.02rem; margin-bottom: 3px; }
.music-stopped p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.music-stopped-go { justify-content: center; gap: 8px; border-radius: 999px; min-height: 46px; }
.music-stopped-go svg { width: 18px; height: 18px; }
.music-stopped-auto { display: flex; align-items: center; gap: 8px; font-size: .86rem; cursor: pointer; }
.music-stopped-auto input { width: 18px; height: 18px; accent-color: var(--green-2); }
.music-stopped-tip { font-size: .78rem !important; }
/* The numbers under a singer, album or song (for administrators), in words. */
.play-count.is-words { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; padding: 4px 10px; font-size: .74rem; font-weight: 600; line-height: 1.3; }
.play-count.is-words svg { width: 12px; height: 12px; flex: none; opacity: .75; }
.play-count-dot { opacity: .5; }
/* A heart with how many like the song. */
.grid-heart { width: auto; min-width: 38px; padding: 0 6px; gap: 3px; display: inline-flex; align-items: center; justify-content: center; }
.heart-count { font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.heart-count:empty { display: none; }
/* "All singers" at the end of the top singers rows. */
.artist-pill.all-singers .artist-circle { display: grid; place-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--purple) 50%, #a78bfa), var(--purple)); color: #fff; }
.artist-pill.all-singers .artist-circle svg { width: 34%; height: 34%; }
/* For music administrators: an orange mark on what has no date or no singer yet. */
.missing-mark { position: relative; z-index: 4; flex: none; width: 22px; height: 22px; padding: 0; border: 2px solid var(--bg-elev-solid); border-radius: 50%; background: #f08a2c; color: #fff; font: 800 .78rem/1 var(--sans); display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 8px -2px rgba(240, 138, 44, .7); transition: transform .2s var(--spring); }
.missing-mark:hover { transform: scale(1.15); }
.feature-card > .missing-mark, .video-card-wrap > .missing-mark { position: absolute; top: 8px; inset-inline-end: 8px; }
.feature-card, .video-card-wrap { position: relative; }
.grid-song > .missing-mark { margin-inline-start: 4px; }
/* Songs in the search at the top. */
.suggest-songs { display: grid; gap: 2px; margin-bottom: 6px; }
.suggest-song { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.suggest-song a { display: flex !important; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px !important; border-radius: 12px; text-decoration: none; color: var(--text); }
.suggest-song a:hover { background: var(--bg-elev); }
.suggest-song img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; flex: none; background: var(--purple); }
.suggest-song a > span { display: grid; min-width: 0; }
.suggest-song strong, .suggest-song small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-song small { color: var(--muted); font-size: .78rem; }
.suggest-song-play { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--green-2); color: var(--green-ink); cursor: pointer; }
.suggest-song-play svg { width: 15px; height: 15px; }

/* ---- Home: the name much bigger, on two lines (the last word, in its glass button, on the second). ---- */
.hero-copy .wordmark { font-size: clamp(2.5rem, 5.4vw, 5rem); line-height: 1.08; padding-bottom: 22px; }
.hero-copy .wordmark .word-glass { display: block; width: fit-content; margin-top: 0.14em; }
.hero-copy .wordmark::after { width: 120px; height: 5px; }
@media (max-width: 900px) { .hero-copy .wordmark { font-size: clamp(2.3rem, 10vw, 3.4rem); } }

/* Liquid glass: a clear, slightly tinted body; a bright reflection across its top; a thin light edge and a
   darker inner rim, as thick glass has; a soft coloured shadow; and a shine that slides over it now and then. */
.name-glass {
  overflow: hidden; isolation: isolate;
  padding: 0.06em 0.5em 0.14em; border-radius: 0.62em;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 46%, rgba(255, 255, 255, 0.04) 54%, rgba(255, 255, 255, 0.22) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--tone) 20%, rgba(255, 255, 255, 0.35)), color-mix(in srgb, var(--tone) 34%, rgba(255, 255, 255, 0.12)));
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(1.06); backdrop-filter: blur(18px) saturate(1.8) brightness(1.06);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 3px color-mix(in srgb, var(--tone) 30%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent),
    inset 0 -0.35em 0.7em color-mix(in srgb, var(--tone) 18%, transparent),
    0 0.32em 1.1em -0.1em color-mix(in srgb, var(--tone) 42%, transparent),
    0 0.08em 0.18em rgba(20, 6, 40, 0.12);
}
/* The reflection: a curved band of light over the upper half. */
.name-glass::before {
  content: ""; position: absolute; z-index: 0; left: 6%; right: 6%; top: 4%; height: 46%; border-radius: 0.5em 0.5em 50% 50% / 0.5em 0.5em 0.9em 0.9em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.08));
  opacity: 0.75; pointer-events: none;
}
/* The shine: a slanted streak of light that crosses the glass every few seconds, and on hover. */
.name-glass::after {
  content: ""; position: absolute; z-index: 2; top: -30%; bottom: -30%; left: -60%; width: 38%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.0) 20%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 80%, transparent 100%);
  transform: skewX(-18deg); pointer-events: none;
  animation: glass-shine 5.5s ease-in-out 1.2s infinite;
}
.name-glass:hover::after { animation-duration: 1.4s; }
@keyframes glass-shine { 0% { left: -60%; } 22% { left: 130%; } 100% { left: 130%; } }
html[data-theme="dark"] .name-glass {
  border-color: rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 48%, rgba(255, 255, 255, 0) 56%, rgba(255, 255, 255, 0.08) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--tone) 30%, rgba(255, 255, 255, 0.06)), color-mix(in srgb, var(--tone) 44%, rgba(255, 255, 255, 0.02)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px color-mix(in srgb, var(--tone) 40%, transparent),
    0 0.32em 1.2em -0.1em color-mix(in srgb, var(--tone) 50%, transparent);
}
html[data-theme="dark"] .name-glass::before { opacity: 0.35; }
@media (prefers-reduced-motion: reduce) { .name-glass::after { animation: none; display: none; } }

/* ---- "Now playing", like a music app: the song's picture blurred behind, everything on it clear. ---- */
.np-stage { gap: 14px; justify-content: flex-start; background: #10151a; }
.np-glow { inset: -12%; filter: blur(48px) saturate(1.35) brightness(0.85); opacity: 1; transform: scale(1.15); background-color: #2c3a3a; }
.np-shade { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10, 14, 18, 0.28) 0%, rgba(10, 14, 18, 0.18) 40%, rgba(10, 14, 18, 0.55) 100%); }
.np-stage > *:not(.np-glow):not(.np-shade) { position: relative; z-index: 1; }
.np-head { font-size: 0.92rem; font-weight: 600; color: rgba(255, 255, 255, 0.85); letter-spacing: .01em; }
.np-head .np-icon { background: transparent; width: 40px; height: 40px; }
.np-art { width: min(80vw, 46vh, 420px); border-radius: 18px; margin-top: 8px; box-shadow: 0 28px 60px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06); transform: none; }
.np-meta { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; margin-top: 10px; }
.np-names { display: grid; gap: 3px; text-align: center; min-width: 0; }
.np-names strong { font-size: 1.32rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-names span { color: rgba(255, 255, 255, 0.72); font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-side { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, 0.72); display: grid; place-items: center; cursor: pointer; }
.np-side svg { width: 22px; height: 22px; }
.np-heart.is-on { color: #ff5c8a; }
.np-heart.is-on svg path { fill: currentColor; }
/* The seek line: thin, white, with a round orange knob. */
.np-seek input {
  -webkit-appearance: none; appearance: none; height: 26px; background: transparent; cursor: pointer;
  --fill: calc(var(--seek, 0) * 100%);
}
.np-seek input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #ffb24a var(--fill), rgba(255, 255, 255, 0.28) var(--fill)); }
.np-seek input::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.28); }
.np-seek input::-moz-range-progress { height: 4px; border-radius: 4px; background: #ffb24a; }
.np-seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #ffb24a; box-shadow: 0 0 0 4px rgba(255, 178, 74, 0.25); border: 0; }
.np-seek input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #ffb24a; border: 0; box-shadow: 0 0 0 4px rgba(255, 178, 74, 0.25); }
.np-times { color: rgba(255, 255, 255, 0.72); margin-top: 2px; }
/* The buttons: shuffle, back, a big round play, next, repeat. */
.np-controls { width: 100%; max-width: 520px; justify-content: space-between; gap: 6px; padding: 0 4px; }
.np-btn { color: #fff; }
.np-btn svg { width: 28px; height: 28px; }
.np-btn.np-small { width: 44px; height: 44px; color: rgba(255, 255, 255, 0.72); position: relative; }
.np-btn.np-small svg { width: 22px; height: 22px; }
.np-btn.np-small.is-on { color: #ffb24a; }
.np-one { display: none; position: absolute; top: 6px; right: 5px; font-style: normal; font-size: .6rem; font-weight: 800; }
.np-btn[data-repeat="one"] .np-one { display: block; }
.np-btn.np-play { width: 72px; height: 72px; background: rgba(12, 16, 20, 0.88); color: #fff; box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.55); }
.np-btn.np-play svg { width: 30px; height: 30px; }
/* "Up next" along the bottom; a tap shows the whole list. */
.np-next { width: 100%; max-width: 520px; margin-top: auto; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 6px; padding: 10px 4px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); background: transparent; color: #fff; text-align: start; cursor: pointer; font: inherit; }
.np-next-icon, .np-next-chevron { display: grid; place-items: center; color: rgba(255, 255, 255, 0.72); }
.np-next-icon svg, .np-next-chevron svg { width: 20px; height: 20px; }
.np-next-chevron svg { transform: rotate(180deg); transition: transform .3s var(--ease); }
.np-stage.is-list .np-next-chevron svg { transform: none; }
.np-next-text { display: grid; min-width: 0; }
.np-next-text small { color: rgba(255, 255, 255, 0.6); font-size: .74rem; }
.np-next-text strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-queue { background: rgba(0, 0, 0, 0.22); border-radius: 16px; padding: 6px; max-height: 40vh; overflow-y: auto; }
/* The three dots: open the song, or stop the music. */
.np-more { position: absolute !important; top: calc(56px + env(safe-area-inset-top)); inset-inline-end: 18px; z-index: 5 !important; display: grid; gap: 2px; padding: 6px; border-radius: 14px; background: rgba(20, 24, 28, 0.94); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6); min-width: 190px; }
.np-more[hidden] { display: none; }
.np-more button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; font: inherit; text-align: start; cursor: pointer; }
.np-more button:hover { background: rgba(255, 255, 255, 0.08); }
.np-more svg { width: 18px; height: 18px; }
@media (min-width: 901px) {
  .np-stage { display: flex; grid-template-columns: none; }
  .np-art { width: min(34vw, 44vh, 420px); grid-row: auto; }
  .np-head, .np-meta, .np-seek, .np-controls, .np-next, .np-volume, .np-queue, .np-coming { max-width: 480px; }
}
.photo-grid-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 180px), 1fr)); gap: 10px; }
.photo-grid-all .singer-photo { width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--bg-elev-solid); cursor: zoom-in; }
.photo-grid-all .singer-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Music: total streams, search chips, playlist mosaics, wide video pictures ---- */
.total-streams { display: flex; gap: 12px; margin: 4px 0 22px; }
.total-streams > div { flex: 1; display: flex; flex-direction: column; gap: 0; padding: 10px 14px; border-radius: 16px; background: var(--bg-elev-solid); border: 1px solid var(--line); }
.total-streams strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.total-streams small { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.ms-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: none; }
.ms-chip { flex: none; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: 0.86rem; cursor: pointer; }
.ms-chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.singer-sort { margin: 0 0 18px; }
.cover-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 100%; height: 100%; }
.cover-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; min-width: 0; min-height: 0; }
.wide-pick .banner-choice { aspect-ratio: 16 / 9; }

/* ---- On the music pages: put the music on the phone (shortcut or Android app) ---- */
.install-strip { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 22px; padding: 14px 44px 14px 16px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--purple, #2B0445) 14%, var(--bg-elev-solid)), var(--bg-elev-solid)); border: 1px solid var(--line-strong); }
html[dir="rtl"] .install-strip { padding: 14px 16px 14px 44px; }
.install-strip img { width: 52px; height: 52px; border-radius: 14px; flex: none; box-shadow: var(--shadow); }
.install-strip-text { flex: 1 1 180px; display: grid; gap: 3px; min-width: 0; }
.install-strip-text small { color: var(--muted); line-height: 1.5; }
.install-strip-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.install-strip-buttons .btn { padding: 8px 14px; font-size: 0.9rem; }
.install-strip-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.install-strip-x:hover { background: var(--bg-elev-2); color: var(--text); }

/* ---- "Now playing": the songs coming up, always shown under the volume ---- */
.np-coming { width: 100%; max-width: 520px; margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.np-coming h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 700; color: #fff; }
.np-coming-note { margin: 0 0 6px; color: rgba(255, 255, 255, 0.65); font-size: .88rem; }
.np-coming-note:empty { display: none; }
.np-coming .np-queue { max-height: none; overflow: visible; background: rgba(0, 0, 0, 0.22); border-radius: 16px; padding: 6px; margin: 0; }
.np-coming .np-queue:empty { display: none; }
.np-coming .np-queue button { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 6px; border: 0; border-radius: 12px; background: transparent; color: #fff; font: inherit; text-align: start; cursor: pointer; }
.np-coming .np-queue button:hover, .np-coming .np-queue button:focus-visible { background: rgba(255, 255, 255, 0.1); }
.np-coming .np-queue img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: rgba(255, 255, 255, 0.08); }
.np-q-names { display: grid; min-width: 0; gap: 2px; }
.np-q-names strong { font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-q-names small { color: rgba(255, 255, 255, 0.62); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-q-names small:empty { display: none; }

/* ---- Music page, for music administrators: total streams (glass headphones) and total songs (albums) ---- */
.stat-card { display: grid; justify-items: center; align-content: center; gap: 4px; padding: 12px 10px 14px; border-radius: 22px; min-width: 0; }
.stat-card svg { width: 100%; max-width: 190px; height: auto; display: block; }
.stat-label { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.stat-streams { background: linear-gradient(135deg, #2B0445, #3b7a3f); color: rgba(255, 255, 255, .88); box-shadow: 0 16px 34px -22px rgba(43, 4, 69, .7); }
.stat-songs { background: var(--bg-elev-solid); border: 1px solid var(--line); color: var(--muted); }
.stat-songs svg { max-width: 160px; }
/* A phone: the wheel, its words, and the two cards side by side under them. */
.music-flow.has-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "flow flow" "info info" "streams songs"; column-gap: 12px; }
.music-flow.has-stats > [data-flow] { grid-area: flow; min-width: 0; }
.music-flow.has-stats > .flow-info { grid-area: info; }
.music-flow.has-stats > .stat-streams { grid-area: streams; }
.music-flow.has-stats > .stat-songs { grid-area: songs; }
.stat-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 4px 0 22px; }
/* A laptop: the two cards on both sides of the turning wheel. */
@media (min-width: 1000px) {
  .music-flow.has-stats { grid-template-columns: 230px minmax(0, 1fr) 230px; grid-template-areas: "streams flow songs" ". info ."; align-items: center; column-gap: 24px; }
  .music-flow.has-stats > .stat-card { align-self: center; padding: 18px 14px; }
  .stat-card svg { max-width: 200px; }
}

/* ---- Administration: music that is here twice ---- */
.music-dupe { display: grid; gap: 10px; }
.music-dupe-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.music-dupe-why, .music-dupe-counts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.music-dupe-items { display: grid; gap: 8px; }
.music-dupe-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: var(--bg-elev-2); }
.music-dupe-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--line); }
.music-dupe-item img.is-wide { width: 56px; height: 32px; }
.music-dupe-text { display: grid; gap: 2px; min-width: 0; }
.music-dupe-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-dupe-text .quiet { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-dupe-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.music-dupe-keep { justify-self: start; }
@media (max-width: 600px) { .music-dupe-item { grid-template-columns: 48px minmax(0, 1fr); } .music-dupe-actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* ---- Likes are a thumbs-up now (blue when given); how many people listened, under each song and album ---- */
.grid-heart.is-on, .np-heart.is-on { color: #2f7cf6; }
.grid-heart.is-on svg path, .grid-heart.is-on svg rect, .np-heart.is-on svg path, .np-heart.is-on svg rect { fill: currentColor; }
.count-line { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.count-line svg { width: 14px; height: 14px; }
.count-dot { opacity: .6; margin: 0 2px; }
.feature-card .count-line { margin-top: 2px; padding-inline: 2px; }
.grid-song .count-line { flex: none; }
@media (max-width: 600px) { .grid-song .count-line span:not(.count-dot) { font-size: .7rem; } }

/* ---- Seasons ("Music for now") ---- */
.season-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.season-list { display: grid; gap: 12px; margin: 14px 0; }
.season-card.is-on-now { border-color: color-mix(in srgb, var(--green-2) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-2) 15%, transparent); }
.season-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.season-picks { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.season-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg-elev-2); cursor: pointer; }
.season-pick span { display: grid; }
.season-pick small { color: var(--muted); }
.season-pick.is-on-now { outline: 2px solid color-mix(in srgb, var(--green-2) 45%, transparent); }

/* ---- "Now playing": the next song right under the buttons ---- */
.np-peek { width: 100%; max-width: 520px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 28px; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 16px; background: rgba(0, 0, 0, 0.24); color: #fff; font: inherit; text-align: start; cursor: pointer; }
.np-peek[hidden] { display: none; }
.np-peek img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: rgba(255, 255, 255, 0.08); }
.np-peek img[hidden] { visibility: hidden; display: block; }
.np-peek-text { display: grid; min-width: 0; }
.np-peek-text small { color: rgba(255, 255, 255, 0.65); font-size: .74rem; }
.np-peek-text strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-peek-more { display: grid; place-items: center; color: rgba(255, 255, 255, 0.7); }
.np-peek-more svg { width: 20px; height: 20px; }
@media (min-width: 901px) { .np-peek { max-width: 480px; } }

/* ---- Waves to the song, in the cover's colours (the dancing bars are gone) ---- */
.np-eq, .tab-eq { display: none !important; }
.np-art { position: relative; overflow: hidden; }
.np-waves { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 46%; pointer-events: none; border-radius: 0 0 inherit inherit; }
.tab-waves { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; clip-path: circle(50%); pointer-events: none; opacity: 0; transition: opacity .3s; }
.tab-now.has-song .tab-waves { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .np-waves, .tab-waves { display: none; } }

/* ---- A play button turns when pressed; the new sign spins in ---- */
.is-turning svg { animation: play-turn .55s cubic-bezier(.3, 1.45, .5, 1); }
@keyframes play-turn { 0% { transform: rotate(-200deg) scale(.55); opacity: .3; } 100% { transform: rotate(0) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .is-turning svg { animation: none; } }

/* A thin glowing ring round the edges of the "now playing" screen and of the round button, in the cover's
   colours, turning slowly and beating with the bass (the colours and sizes are set while it plays). */
.np-stage > .np-ring, .tab-ring {
  position: fixed !important; inset: 0; z-index: 3 !important; width: auto; height: auto; margin: 0; pointer-events: none; padding: var(--ring-t, 3px);
  background: conic-gradient(from var(--ring-a, 0deg), var(--rc1, #f6a53c), var(--rc2, #e6455d), var(--rc3, #f2c230), var(--rc4, #8b4bd8), var(--rc5, #3b9be0), var(--rc1, #f6a53c));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: blur(var(--ring-b, 5px)); opacity: var(--ring-o, .5);
}
@media (max-width: 900px) { .np-stage > .np-ring { border-radius: 34px; } }
.tab-ring { position: absolute !important; inset: -3px; border-radius: 50%; opacity: 0; transition: opacity .3s; }
.tab-now.has-song .tab-ring { opacity: var(--ring-o, .5); }
@media (prefers-reduced-motion: reduce) { .np-stage > .np-ring, .tab-ring { display: none; } }

/* The music of the season on now, on the home page: a warm card with a row of covers. */
.season-home {
  margin: 18px 0 8px; padding: 16px 0 14px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 16%, var(--bg-elev-solid)), color-mix(in srgb, #f2a93b 14%, var(--bg-elev-solid)));
  box-shadow: 0 18px 36px -28px rgba(43, 4, 69, .55);
}
.season-head { display: flex; align-items: center; gap: 12px; padding: 0 16px 12px; }
.season-head h2 { margin: 0; font-size: 1.12rem; }
.season-head p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.season-head > div { flex: 1; min-width: 0; }
.season-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(145deg, #f2a93b, var(--purple)); box-shadow: 0 8px 18px -8px rgba(110, 50, 160, .7); }
.season-mark svg { width: 20px; height: 20px; }
.season-all { font-size: .82rem; font-weight: 700; color: var(--purple); text-decoration: none; white-space: nowrap; }
.season-rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.season-rail::-webkit-scrollbar { display: none; }
.season-tile { position: relative; flex: none; width: 124px; scroll-snap-align: start; }
.season-tile.is-wide { width: 200px; }
.season-art { position: relative; display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--purple) 20%, #fff); box-shadow: 0 10px 20px -14px #000; }
.season-tile.is-wide .season-art { aspect-ratio: 16 / 10; }
.season-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.season-mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.season-badge { position: absolute; inset: auto auto 8px 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.season-badge svg { width: 14px; height: 14px; }
.season-play { position: absolute; top: calc(124px - 44px); inset-inline-end: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--purple); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 6px 14px -6px #000; cursor: pointer; }
.season-play svg { width: 16px; height: 16px; }
.season-name { display: block; margin-top: 7px; font-size: .84rem; font-weight: 650; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- The chat, in the style of iMessage: blue bubbles for one's own messages, light grey for others',
   the name above, messages one after another sitting close, a thumb on the corner for likes. ---- */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 10px; }
.chat-head-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, #5ab0ff, #0a7cff); box-shadow: 0 8px 18px -8px rgba(10, 124, 255, .8); }
.chat-head-mark svg { width: 22px; height: 22px; }
.chat-row { gap: 7px; max-width: min(520px, 80%); }
.chat-row + .chat-row.is-follow { margin-top: -5px; }
.chat-row.has-next .avatar { visibility: hidden; }
.chat-stack { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.chat-row.mine .chat-stack { align-items: flex-end; }
.chat-name { margin: 0 12px 2px; font-size: .74rem; font-weight: 650; opacity: .85; }
.chat-row.is-follow .chat-name { display: none; }
.chat-bubble {
  position: relative; padding: 7px 13px 5px; border-radius: 20px; box-shadow: none;
  background: #e9e9eb; color: #111;
}
.chat-row:not(.mine):not(.has-next) .chat-bubble { border-end-start-radius: 6px; }
.chat-row.mine .chat-bubble { background: linear-gradient(180deg, #3d9bff, #0a7cff); color: #fff; border-radius: 20px; }
.chat-row.mine:not(.has-next) .chat-bubble { border-end-end-radius: 6px; }
html[data-theme="dark"] .chat-bubble { background: #2c2c2e; color: #f2f2f7; }
html[data-theme="dark"] .chat-row.mine .chat-bubble { background: linear-gradient(180deg, #3d9bff, #0a7cff); color: #fff; }
.chat-bubble p { margin: 1px 0; line-height: 1.4; }
.chat-meta { justify-content: flex-end; margin: 1px -3px 0 0; padding: 0; }
.chat-meta strong { display: none; }
.chat-meta time { margin-inline-start: 0; font-size: .66rem; color: rgba(0, 0, 0, .45); }
.chat-row.mine .chat-meta time, html[data-theme="dark"] .chat-row.mine .chat-meta time { color: rgba(255, 255, 255, .78); }
html[data-theme="dark"] .chat-meta time { color: rgba(242, 242, 247, .5); }
.chat-row.mine .chat-remove { color: #fff; }
/* A picture alone: no bubble round it, the time on the picture. */
.chat-bubble.is-photo { padding: 0; background: none !important; }
.chat-bubble.is-photo .chat-photo { border-radius: 18px; }
.chat-bubble.is-photo .chat-meta { position: absolute; bottom: 7px; inset-inline-end: 9px; margin: 0; padding: 1px 8px; border-radius: 10px; background: rgba(0, 0, 0, .45); }
.chat-bubble.is-photo .chat-meta time { color: #fff; }
.chat-bubble:not(.is-photo) .chat-photo { margin: 2px -9px 4px; border-radius: 14px; }
/* The like: a small round thumb on the top corner of the message, with the count when more than one. */
.chat-badge {
  position: absolute; top: -12px; inset-inline-end: -12px; z-index: 1; display: inline-flex; align-items: center; gap: 2px;
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; justify-content: center;
  background: #e9e9eb; color: #0a7cff; box-shadow: 0 0 0 2px var(--bg-elev-solid), 0 2px 6px rgba(0, 0, 0, .18);
  font-size: .72rem; font-weight: 800; animation: chat-pop .35s var(--spring, ease);
}
.chat-badge[hidden] { display: none; }
.chat-badge svg { width: 14px; height: 14px; }
.chat-badge.mine { background: #0a7cff; color: #fff; }
.chat-row.mine .chat-badge { inset-inline-end: auto; inset-inline-start: -12px; }
html[data-theme="dark"] .chat-badge:not(.mine) { background: #3a3a3c; color: #64b5ff; }
.chat-row:has(.chat-badge:not([hidden])) { margin-top: 12px; }
@keyframes chat-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
/* Reply and like stay at hand beside a message, quietly; a double tap also likes. */
.chat-acts { opacity: .28; }
.chat-act b { display: none; }
.chat-like.on { color: #0a7cff; }
html[data-theme="dark"] .chat-like.on { color: #64b5ff; }
.chat-row:has(.chat-like b:not(:empty)) .chat-acts { opacity: .28; }
.chat-row:hover .chat-acts, .chat-row:focus-within .chat-acts { opacity: 1; }
.chat-row.mine .chat-quote { background: rgba(255, 255, 255, .2); border-inline-start-color: #fff; }
.chat-row.mine .chat-quote strong { color: #fff; }
.chat-quote { border-inline-start-color: #0a7cff; }
.chat-quote strong { color: #0a7cff; }
.chat-row.mine .chat-voice button { background: #fff; color: #0a7cff; }
.chat-row.mine .chat-voice-bar { background: rgba(255, 255, 255, .35); }
.chat-row.mine .chat-voice-bar span { background: #fff; }
.chat-row.mine .chat-private { background: rgba(255, 255, 255, .2); color: #fff; }
.chat-day span { background: transparent; box-shadow: none; color: #8e8e93; font-size: .74rem; }
/* Writing: a round field with a blue send arrow, as in iMessage. */
.chat-compose-row { border-radius: 24px; padding: 4px; box-shadow: 0 6px 20px -16px rgba(0, 0, 0, .5); }
.chat-send { background: #0a7cff; width: 36px; height: 36px; margin: 2px; }
.chat-send svg { width: 18px; height: 18px; }
.chat-mic { color: #0a7cff; }
.chat-page.is-dropping .chat-log { outline: 3px dashed #0a7cff; outline-offset: -6px; }
/* A laptop: a wider chat, the messages further from the edges. */
@media (min-width: 901px) {
  /* Room for the menu bar floating at the bottom, so the writing field is never under it. */
  .chat-page { max-width: 980px; height: calc(100dvh - 96px - var(--tabbar-h) - var(--tab-gap) - 18px - env(safe-area-inset-bottom)); }
  .chat-log { padding: 20px 28px 22px; border: 1px solid var(--line); box-shadow: 0 24px 50px -40px rgba(0, 0, 0, .45); }
  .chat-row { max-width: min(560px, 64%); }
  .chat-photo img { width: min(320px, 40vw); }
}

/* ---- The calendar: every day with pictures shows one of them; the number of pictures stands out clearly;
   the parsha on each Shabbos is a clear little label. ---- */
.luach-cell.has-cover {
  color: #fff; border-color: transparent;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%),
    var(--cover) center / cover no-repeat, var(--green);
}
.luach-cell.has-cover .luach-hd, .luach-cell.has-cover .luach-gd { text-shadow: 0 1px 4px rgba(0, 0, 0, .55); opacity: 1; }
.luach-count {
  bottom: 7px; top: auto; min-width: 28px; padding: 3px 9px; font-size: .8rem; font-weight: 800; color: #fff;
  background: linear-gradient(145deg, var(--purple), color-mix(in srgb, var(--purple) 60%, #ff7a59));
  box-shadow: 0 4px 12px -4px rgba(43, 4, 69, .7), 0 0 0 2px rgba(255, 255, 255, .85);
}
.luach-cell:has(.luach-tag) .luach-count { top: auto; bottom: 7px; }
.luach-cell.lvl-3 .luach-count, .luach-cell.lvl-4 .luach-count { background: linear-gradient(145deg, var(--purple), color-mix(in srgb, var(--purple) 60%, #ff7a59)); color: #fff; }
.luach-tag { max-width: 100%; justify-self: start; opacity: 1; }
.luach-cell:has(.luach-count) .luach-tag { max-width: calc(100% - 40px); }
.luach-cell.is-shabbos .luach-tag, .luach-cell.is-occasion .luach-tag {
  padding: 2px 7px; border-radius: 999px; font-weight: 700;
  background: color-mix(in srgb, var(--purple) 14%, transparent); color: color-mix(in srgb, var(--purple) 85%, var(--text));
}
.luach-cell.is-occasion .luach-tag { background: rgba(214, 160, 40, .18); color: #8a5d05; }
.luach-cell.has-cover .luach-tag, .luach-cell.lvl-3 .luach-tag, .luach-cell.lvl-4 .luach-tag { background: rgba(0, 0, 0, .5); color: #fff; }
html[data-theme="dark"] .luach-cell.is-shabbos .luach-tag { color: #e2ccff; }
@media (max-width: 700px) {
  /* The number of pictures at the bottom of the square; on a Shabbos or holiday (the name is there) in the corner. */
  .luach-cell .luach-count, .luach-cell.lvl-3 .luach-count, .luach-cell.lvl-4 .luach-count {
    display: block; position: absolute; top: auto; bottom: 5px; inset-inline: 0; margin-inline: auto; width: fit-content;
    min-width: 0; padding: 1px 6px; font-size: .62rem; box-shadow: 0 2px 6px -2px rgba(43, 4, 69, .7), 0 0 0 1.5px rgba(255, 255, 255, .9);
  }
  .luach-cell:has(.luach-tag) .luach-count { top: 2px; bottom: auto; inset-inline-start: auto; inset-inline-end: 2px; margin: 0; padding: 0 4px; font-size: .55rem; }
  /* A little taller, so the parsha fits on two short lines under the dates. */
  .luach-cell { aspect-ratio: 1 / 1.45; }
  .luach-tag, .luach-cell:has(.luach-count) .luach-tag { max-width: 100%; justify-self: center; align-self: end; font-size: .56rem; white-space: normal; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .luach-cell.is-shabbos .luach-tag, .luach-cell.is-occasion .luach-tag { padding: 1px 4px; border-radius: 6px; }
}

/* ---- Chat reactions (as in iMessage) and "seen" ---- */
button.chat-badge { border: 0; cursor: pointer; font: inherit; padding: 0 7px 0 5px; }
.chat-badge-emoji { display: inline-flex; }
.chat-badge-emoji i { font-style: normal; font-size: .92rem; line-height: 1; margin-inline-start: -3px; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .9)); }
.chat-badge-emoji i:first-child { margin-inline-start: 0; }
.chat-badge.mine { background: #d8eaff; color: #0a7cff; }
html[data-theme="dark"] .chat-badge.mine { background: #12345a; color: #8cc8ff; }
.chat-react-pick {
  position: absolute; z-index: 7; display: flex; gap: 2px; padding: 5px 6px; border-radius: 999px;
  background: var(--bg-elev-solid); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45), 0 0 0 1px var(--line);
  animation: chat-pick .28s cubic-bezier(.3, 1.4, .5, 1);
}
.chat-react-pick button {
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 1.45rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; animation: chat-pick-one .32s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i) * 30ms);
  transition: transform .15s;
}
.chat-react-pick button:hover, .chat-react-pick button:focus-visible { transform: scale(1.25) translateY(-3px); outline: none; }
.chat-react-pick button.is-on { background: color-mix(in srgb, #0a7cff 18%, transparent); }
@keyframes chat-pick { from { opacity: 0; transform: translateY(8px) scale(.85); } }
@keyframes chat-pick-one { from { opacity: 0; transform: scale(.2) translateY(10px); } }
.chat-seen {
  align-self: flex-end; display: inline-flex; align-items: center; gap: 4px; margin: -4px 6px 0; padding: 0; border: 0; background: none;
  color: #8e8e93; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer;
}
.chat-seen svg { width: 13px; height: 13px; color: #0a7cff; }
@media (prefers-reduced-motion: reduce) { .chat-react-pick, .chat-react-pick button { animation: none; } }

/* The sleep timer: its choices under the menu item, and a little moon with the time left beside the title. */
.np-sleep-pick { display: grid; gap: 2px; margin: 0 0 4px; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.np-sleep-pick[hidden] { display: none; }
.np-sleep-pick button { padding: 8px 12px 8px 34px; font-size: .9rem; }
.np-head-title { display: inline-flex; align-items: center; gap: 8px; }
.np-sleep-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #ffd98a; font: inherit; font-size: .76rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.np-sleep-chip[hidden] { display: none; }
.np-sleep-chip svg { width: 14px; height: 14px; }

/* A playlist put on the phone: a wide soft button with a line that fills while the songs are saved. */
.to-phone {
  position: relative; display: flex; align-items: center; gap: 12px; width: min(420px, 100%); margin: 4px auto 14px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elev-solid); color: inherit; font: inherit; text-align: start; cursor: pointer; overflow: hidden;
  transition: transform .25s var(--spring, ease), box-shadow .25s;
}
.to-phone:active { transform: scale(.97); }
.to-phone > svg { width: 22px; height: 22px; flex: none; color: var(--purple); }
.to-phone span { display: grid; }
.to-phone small { color: var(--muted); font-size: .76rem; }
.to-phone-bar { position: absolute; inset: auto 0 0 0; height: 3px; background: color-mix(in srgb, var(--purple) 12%, transparent); }
.to-phone-bar b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple), #3fbf7f); transition: width .4s; }
.to-phone.is-busy > svg { animation: to-phone-bob 1s ease-in-out infinite; }
.to-phone.is-saved { border-color: color-mix(in srgb, #3fbf7f 60%, transparent); background: color-mix(in srgb, #3fbf7f 10%, var(--bg-elev-solid)); }
.to-phone.is-saved > svg { color: #2e9e64; }
@keyframes to-phone-bob { 50% { transform: translateY(3px); } }

/* ---- The slideshow of a day's pictures ---- */
html.slides-open { overflow: hidden; }
.slides { position: fixed; inset: 0; z-index: 200; background: #050307; color: #fff; animation: slides-in .35s ease; user-select: none; }
.slides.is-closing { animation: slides-out .3s ease forwards; }
@keyframes slides-in { from { opacity: 0; } }
@keyframes slides-out { to { opacity: 0; transform: scale(1.03); } }
.slides-stage { position: absolute; inset: 0; overflow: hidden; }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.1s ease; will-change: transform, opacity; }
.slide.is-on { opacity: 1; }
.slide.is-drift { animation: slide-drift 5.6s ease-out forwards; }
@keyframes slide-drift {
  from { transform: translate(var(--from-x, 0), var(--from-y, 0)) scale(var(--zoom-from, 1.02)); }
  to { transform: translate(0, 0) scale(var(--zoom-to, 1.12)); }
}
.slides-top, .slides-bottom { position: absolute; inset-inline: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; z-index: 2; }
.slides-top { top: 0; padding-top: calc(22px + env(safe-area-inset-top)); background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.slides-bottom { bottom: 0; justify-content: center; gap: 26px; padding-bottom: calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.slides-title { flex: 1; font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slides-count { font-size: .82rem; opacity: .8; font-variant-numeric: tabular-nums; }
.slides-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.slides-btn svg { width: 20px; height: 20px; }
.slides-btn.is-big { width: 58px; height: 58px; background: rgba(255, 255, 255, .92); color: #120a1c; }
.slides-btn.is-big svg { width: 24px; height: 24px; }
.slides-bars { position: absolute; top: calc(8px + env(safe-area-inset-top)); inset-inline: 12px; z-index: 3; display: flex; gap: 3px; }
.slides-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.slides-bars b { display: block; height: 100%; width: 0; background: #fff; }
.slides-bars i.is-done b { width: 100%; }
.slides-bars i.is-now b { animation: slides-fill 4.5s linear forwards; }
@keyframes slides-fill { to { width: 100%; } }
.luach-slides { display: inline-flex; align-items: center; gap: 7px; }
.luach-slides[hidden] { display: none; }
.luach-slides svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } .slide.is-drift { animation: none; } }

/* The picture viewer pulled down to close: the dark behind the picture fades as it goes. */
.viewer:has(.stage.is-pulling) { background: rgba(10, 8, 14, calc(1 - var(--pull, 0) * .85)) !important; }
.viewer:has(.stage.is-pulling) .stage { background: transparent !important; }
.viewer:has(.stage.is-pulling) > :not(.stage), .viewer:has(.stage.is-pulling) .stage-tools { opacity: calc(1 - var(--pull, 0) * 2); }

/* While music plays, the bar at the bottom glows softly in the song's own colours (they change with the song). */
nav.tabbar { transition: box-shadow .8s ease; }
nav.tabbar::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; padding: 2px;
  background: linear-gradient(90deg, var(--song-c1, transparent), var(--song-c2, transparent), var(--song-c3, transparent), var(--song-c1, transparent));
  background-size: 300% 100%; transition: opacity .8s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
html.music-on nav.tabbar::before { opacity: .9; animation: bar-glow 9s linear infinite; }
html.music-on nav.tabbar { box-shadow: 0 0 22px -4px color-mix(in srgb, var(--song-c1, transparent) 70%, transparent), 0 12px 28px -14px var(--song-c2, transparent), 0 22px 44px -18px rgba(20, 6, 40, .45); }
@keyframes bar-glow { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { html.music-on nav.tabbar::before { animation: none; } }

/* Pull down to load the page again: the logo comes down and turns, then spins while it loads. */
.pull-mark { position: fixed; top: calc(env(safe-area-inset-top) - 46px); left: 50%; z-index: 60; pointer-events: none;
  transform: translate(-50%, var(--pull-y, 0)); opacity: var(--pull-show, 0); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; }
.pull-mark.is-pulling { transition: none; }
.pull-ball { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--bg-elev-solid);
  box-shadow: 0 8px 20px -8px rgba(30, 10, 60, .55), 0 0 0 2px color-mix(in srgb, var(--purple) 30%, transparent); }
.pull-ball img { width: 26px; height: 26px; object-fit: contain; transform: rotate(var(--pull-turn, 0)); }
.pull-mark.is-ready .pull-ball { box-shadow: 0 8px 20px -8px rgba(30, 10, 60, .55), 0 0 0 3px var(--purple); }
.pull-mark.is-loading .pull-ball img { animation: pull-spin .8s linear infinite; }
@keyframes pull-spin { to { transform: rotate(360deg); } }

/* A person with new pictures since one last looked: a small glowing dot on the card. */
.person-card { position: relative; }
.person-new { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; width: 13px; height: 13px; border-radius: 50%;
  background: #ff4d6d; box-shadow: 0 0 0 2.5px var(--bg-elev-solid), 0 0 12px 2px rgba(255, 77, 109, .6); animation: person-new 2.2s ease-in-out infinite; }
@keyframes person-new { 50% { transform: scale(1.25); box-shadow: 0 0 0 2.5px var(--bg-elev-solid), 0 0 18px 4px rgba(255, 77, 109, .45); } }
@media (prefers-reduced-motion: reduce) { .person-new { animation: none; } }

/* The cover on its way from the card to the album's page. */
.cover-fly { position: fixed; z-index: 90; margin: 0; object-fit: cover; pointer-events: none; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .55); will-change: transform; }

/* ---- The opening, once a day ---- */
.intro { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--purple) 55%, #1a0a2c), #08040d 70%); animation: intro-in .3s ease; }
.intro.is-leaving { animation: intro-out .7s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes intro-in { from { opacity: 0; } }
@keyframes intro-out { to { opacity: 0; transform: scale(1.18); filter: blur(6px); } }
.intro-glow { position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 140, .35), transparent 65%);
  animation: intro-glow 2.3s ease-in-out; }
@keyframes intro-glow { from { transform: scale(.3); opacity: 0; } 50% { opacity: 1; } }
.intro-mark { position: relative; width: 132px; height: 132px; display: grid; place-items: center; animation: intro-pop .9s cubic-bezier(.3, 1.6, .5, 1) .15s backwards; }
.intro-mark > img { width: 84px; height: 84px; object-fit: contain; border-radius: 22px; background: #fff; padding: 8px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); }
.intro-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.intro-ring circle { fill: none; stroke: #ffd38a; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340;
  filter: drop-shadow(0 0 6px rgba(255, 211, 138, .8)); animation: intro-ring 1.2s ease-out .35s forwards; }
@keyframes intro-ring { to { stroke-dashoffset: 0; } }
@keyframes intro-pop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
.intro-name { position: absolute; top: calc(50% + 215px); text-shadow: 0 2px 14px rgba(0, 0, 0, .7); margin: 0; color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: .02em;
  animation: intro-name .7s ease .8s backwards; }
@keyframes intro-name { from { opacity: 0; transform: translateY(12px); letter-spacing: .3em; } }
/* The pictures fly in from outside and settle in a ring around the logo, each a little turned. */
.intro-shot { position: absolute; width: 92px; height: 92px; object-fit: cover; border-radius: 16px; border: 3px solid #fff; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7);
  --a: calc(360deg / var(--n) * var(--i) - 90deg);
  transform: rotate(var(--a)) translateX(150px) rotate(calc(-1 * var(--a))) rotate(calc((var(--i) - 2) * 7deg));
  animation: intro-shot .9s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: calc(.35s + var(--i) * 90ms); }
@keyframes intro-shot { from { transform: rotate(var(--a)) translateX(90vmax) rotate(calc(-1 * var(--a))) rotate(40deg) scale(.6); opacity: 0; } }
@media (min-width: 700px) { .intro-name { top: calc(50% + 290px); } .intro-shot { width: 120px; height: 120px; transform: rotate(var(--a)) translateX(210px) rotate(calc(-1 * var(--a))) rotate(calc((var(--i) - 2) * 7deg)); } }

.slides-caption { position: absolute; inset-inline: 16px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 2; margin: 0; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: 1.25rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.slides-caption:empty { display: none; }
.slides-caption.is-new { animation: slides-caption .7s ease; }
@keyframes slides-caption { from { opacity: 0; transform: translateY(10px); letter-spacing: .08em; } }

/* "This week in years past": a warm card with a fan of pictures and a play button. */
.memories { margin: 16px 0 6px; }
.memories-card { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-radius: 24px; cursor: pointer; overflow: hidden;
  color: #fff; text-align: start; font: inherit;
  background: linear-gradient(120deg, #3a1660, #8a3a6b 55%, #e08a4a); box-shadow: 0 20px 40px -26px rgba(60, 10, 80, .8); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.memories-card:active { transform: scale(.97); }
.memories-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .25), transparent 45%); pointer-events: none; }
.memories-faces { position: relative; flex: none; width: 112px; height: 84px; }
.memories-faces img { position: absolute; top: 6px; width: 64px; height: 72px; object-fit: cover; border-radius: 10px; border: 2.5px solid #fff; box-shadow: 0 8px 16px -8px #000;
  inset-inline-start: calc(var(--i) * 15px); transform: rotate(calc((var(--i) - 1.5) * 8deg)); transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.memories-card:hover .memories-faces img { transform: rotate(calc((var(--i) - 1.5) * 13deg)) translateY(-3px); }
.memories-text { flex: 1; display: grid; gap: 3px; min-width: 0; }
.memories-text strong { font-family: var(--display); font-size: 1.12rem; }
.memories-text small { opacity: .85; font-size: .8rem; }
.memories-play { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #6b2a6b; box-shadow: 0 8px 18px -8px #000; }
.memories-play svg { width: 20px; height: 20px; }

/* ---- The words of the song (karaoke) ---- */
.np-words-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: -6px; padding: 6px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: .82rem; font-weight: 700; }
.np-words-btn[hidden] { display: none; }
.np-words-btn svg { width: 16px; height: 16px; }
.np-words-btn.is-on { background: #fff; color: #1a0f24; }
.np-lyrics { position: absolute; inset: 0; z-index: 3; border-radius: inherit; overflow: hidden; background: rgba(12, 8, 18, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: np-lyrics-in .35s ease; }
.np-lyrics[hidden] { display: none; }
@keyframes np-lyrics-in { from { opacity: 0; transform: scale(.97); } }
.np-lyrics-lines { height: 100%; overflow-y: auto; padding: 40% 22px; scrollbar-width: none;
  -webkit-mask: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.np-lyrics-lines::-webkit-scrollbar { display: none; }
.np-lyrics-lines p { margin: 0 0 14px; font-family: var(--display); font-weight: 800; font-size: 1.32rem; line-height: 1.3; color: rgba(255, 255, 255, .42); text-align: center;
  transition: color .35s, transform .35s cubic-bezier(.3, 1.4, .5, 1), text-shadow .35s; cursor: pointer; }
.np-lyrics-lines p.is-past { color: rgba(255, 255, 255, .6); }
.np-lyrics-lines p.is-lit { color: #fff; transform: scale(1.08); text-shadow: 0 0 18px var(--song-c1, rgba(255, 200, 120, .8)); }
.np-lyrics-empty { height: 100%; display: grid; place-content: center; gap: 12px; padding: 20px; text-align: center; color: #fff; }
.np-lyrics-tool { position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; }
.np-lyrics-tool svg { width: 17px; height: 17px; }
.lyrics-editor { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(5, 3, 8, .6); }
.lyrics-editor-card { display: grid; gap: 10px; width: min(520px, 100%); max-height: 92vh; overflow: auto; padding: 16px; border-radius: 20px; background: var(--bg-elev-solid); color: var(--text); box-shadow: var(--shadow-lg); }
.lyrics-editor-card header { display: flex; align-items: center; justify-content: space-between; }
.lyrics-editor-card .np-icon { background: var(--bg-elev-2-solid); color: inherit; }
.lyrics-editor-card textarea { width: 100%; min-height: 220px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; line-height: 1.5; }
.lyrics-editor-card textarea[hidden] { display: none; }
.lyrics-editor-card footer { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.lyrics-editor-card footer .btn { display: inline-flex; align-items: center; gap: 6px; }
.lyrics-editor-card footer svg { width: 16px; height: 16px; }
.lyrics-tap { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 10px 0; }
.lyrics-tap[hidden] { display: none; }
.lyrics-tap-prev { margin: 0; color: var(--muted); font-size: .9rem; min-height: 1.2em; }
.lyrics-tap-now { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.4rem; }
.lyrics-tap-btn { width: 140px; height: 140px; border: 0; border-radius: 50%; font: inherit; font-size: 1.5rem; font-weight: 800; color: #fff; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #a678ff, var(--purple)); box-shadow: 0 16px 34px -12px rgba(60, 20, 120, .8); transition: transform .12s; }
.lyrics-tap-btn:active { transform: scale(.9); }

/* Karaoke on the cover (style 3): no dark sheet over the picture; the waves at the bottom stay in sight.
   The line being sung fills with gold; the line before and after stand faintly above and below it. */
.np-lyrics { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
.np-lyrics .np-lyrics-tool, .np-lyrics .np-lyrics-empty button, .np-lyrics .np-lyrics-lines { pointer-events: auto; }
.np-lyrics-lines { background: radial-gradient(ellipse at 50% 45%, rgba(8, 5, 12, .55), rgba(8, 5, 12, .15) 70%); }
.np-lyrics-empty { background: rgba(8, 5, 12, .55); border-radius: inherit; pointer-events: auto; }
.np-karaoke { position: absolute; inset: 8% 6% 40% 6%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: radial-gradient(ellipse at 50% 50%, rgba(6, 4, 10, .58), rgba(6, 4, 10, .25) 55%, transparent 75%); }
.np-karaoke p { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.22; }
.np-k-prev, .np-k-next { font-size: .9rem; color: rgba(255, 255, 255, .5); max-width: 100%; padding: 0 4px; text-shadow: 0 1px 3px rgba(0, 0, 0, .85); }
.np-k-now { font-size: 1.45rem; }
.np-k-now span {
  background: linear-gradient(90deg, #ffd27a var(--fill, 0%), rgba(255, 255, 255, .55) var(--fill, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .7));
}
.np-k-now:dir(rtl) span { background: linear-gradient(270deg, #ffd27a var(--fill, 0%), rgba(255, 255, 255, .55) var(--fill, 0%)); -webkit-background-clip: text; background-clip: text; }
.np-karaoke.is-moving .np-k-now { animation: np-k-in .45s cubic-bezier(.3, 1.3, .5, 1); }
.np-karaoke.is-moving .np-k-prev { animation: np-k-up .45s ease; }
@keyframes np-k-in { from { transform: translateY(14px) scale(.94); opacity: .4; } }
@keyframes np-k-up { from { transform: translateY(14px); } }

/* Karaoke, word by word: white on every cover (black on a light one), bigger, five lines (two faint before,
   two after), the cover and its waves still showing. */
.np-karaoke { inset: 5% 5% 34% 5%; gap: 6px; background: radial-gradient(ellipse at 50% 50%, rgba(6, 4, 10, .5), rgba(6, 4, 10, .2) 60%, transparent 80%); --k-ink: #fff; --k-shade: rgba(0, 0, 0, .8); }
html.cover-light .np-karaoke { --k-ink: #111; --k-shade: rgba(255, 255, 255, .85); background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .2) 60%, transparent 80%); }
.np-k-line { font-size: 1rem; color: color-mix(in srgb, var(--k-ink) 50%, transparent); text-shadow: 0 1px 3px var(--k-shade); max-width: 100%; }
.np-k-line[data-off="-2"], .np-k-line[data-off="2"] { font-size: .86rem; color: color-mix(in srgb, var(--k-ink) 28%, transparent); }
.np-k-line:empty { display: none; }
.np-k-now { font-size: 1.7rem; line-height: 1.2; color: inherit; text-shadow: none; }
.np-k-now span {
  display: inline; background: linear-gradient(90deg, var(--k-ink) var(--fill, 0%), color-mix(in srgb, var(--k-ink) 40%, transparent) var(--fill, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 3px var(--k-shade)); transition: transform .2s;
}
.np-k-now:dir(rtl) span { background: linear-gradient(270deg, var(--k-ink) var(--fill, 0%), color-mix(in srgb, var(--k-ink) 40%, transparent) var(--fill, 0%)); -webkit-background-clip: text; background-clip: text; }
.np-k-now span.is-singing { display: inline-block; transform: translateY(-2px) scale(1.06); }
.np-karaoke.is-moving .np-k-line:not(.np-k-now) { animation: np-k-up .45s ease; }
html.cover-light .np-lyrics-tool { background: rgba(0, 0, 0, .12); color: #111; }

/* Karaoke: the line being sung all white at once (black on a light cover), thick letters in every language;
   the next line a little bigger than the one after it. */
.np-karaoke p { font-weight: 900; }
.np-k-now { font-size: 1.75rem; color: var(--k-ink); text-shadow: 0 1px 4px var(--k-shade), 0 0 18px color-mix(in srgb, var(--k-shade) 60%, transparent); }
.np-k-line[data-off="1"] { font-size: 1.15rem; color: color-mix(in srgb, var(--k-ink) 58%, transparent); }
.np-k-line[data-off="-1"] { font-size: 1rem; }
.np-k-line[data-off="2"], .np-k-line[data-off="-2"] { font-size: .86rem; }
.np-karaoke.is-moving .np-k-now { animation: np-k-in .4s cubic-bezier(.3, 1.3, .5, 1); }

/* Karaoke as chosen (11 with the glass of 4): every line white (black on a light cover), Rubik letters, very
   thick; the line being sung bigger, in a glass pill. */
.np-karaoke p, .np-k-line, .np-k-now { font-family: "Rubik", system-ui, sans-serif; font-weight: 900; color: var(--k-ink); }
.np-k-line[data-off="-1"] { font-size: 1rem; color: var(--k-ink); }
.np-k-line[data-off="1"] { font-size: 1.12rem; color: var(--k-ink); }
.np-k-line[data-off="-2"], .np-k-line[data-off="2"] { font-size: .86rem; color: var(--k-ink); }
.np-k-line { text-shadow: 0 1px 3px var(--k-shade); }
.np-k-now {
  font-size: 1.4rem; line-height: 1.25; padding: 4px 16px; border-radius: 999px; max-width: 98%;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 4px var(--k-shade);
}
html.cover-light .np-k-now { background: rgba(0, 0, 0, .08); border-color: rgba(0, 0, 0, .22); }

/* A laptop: all the words on both sides of the player, each line centred in its column, the line being
   sung lit on both sides; the cover stays clean, with its waves. */
.np-side-words { display: none; }
@media (min-width: 1100px) {
  .np-stage > .np-side-words {
    position: fixed !important; z-index: 2 !important; top: 90px; bottom: 120px; width: min(340px, calc(50vw - 360px));
    display: block; overflow: hidden; pointer-events: none;
    -webkit-mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  }
  .np-side-words.is-start { inset-inline-start: max(24px, calc(50vw - 360px - min(340px, calc(50vw - 360px)))); }
  .np-side-words.is-end { inset-inline-end: max(24px, calc(50vw - 360px - min(340px, calc(50vw - 360px)))); }
  .np-stage:not(.has-side-words) > .np-side-words { display: none; }
  .np-side-track { transition: transform .6s cubic-bezier(.3, 1.15, .5, 1); }
  .np-side-track p { margin: 0 0 14px; text-align: center; font-family: "Rubik", system-ui, sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.3;
    color: rgba(255, 255, 255, .42); transition: color .35s, transform .35s, font-size .35s; }
  .np-side-track p.is-on { color: #fff; font-weight: 900; font-size: 1.3rem; text-shadow: 0 0 18px rgba(255, 255, 255, .25); }
  /* With the words on the sides, the cover shows only itself and its waves. */
  .np-stage.has-side-words .np-karaoke { display: none; }
}

/* The words on both sides run the full height of the screen, from the bottom to the top. */
@media (min-width: 1100px) {
  .np-stage > .np-side-words { top: 12px; bottom: 12px;
    -webkit-mask: linear-gradient(transparent, #000 7%, #000 93%, transparent); mask: linear-gradient(transparent, #000 7%, #000 93%, transparent); }
  .np-side-track p { margin: 0 0 22px; font-size: 1.08rem; }
  .np-side-track p.is-on { font-size: 1.4rem; }
}

/* Small screens: listeners and plays as a sign and a number only, so the song's name has its room. */
.count-word { font-style: normal; }
@media (max-width: 700px) {
  .count-word { display: none; }
  .play-count.is-words { padding: 3px 7px; }
}

/* ---- A weak phone or computer (html.lite): the heavy effects are left out, everything else stays. Blurred
   glass becomes plain colour, glows and ever-moving shimmer stop, the ring keeps still. ---- */
html.lite *, html.lite *::before, html.lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.lite nav.tabbar { background: var(--bg-elev-solid); }
html.lite nav.tabbar::before { animation: none !important; }
html.lite .np-stage > .np-ring, html.lite .tab-ring { filter: none !important; }
html.lite .np-glow { filter: blur(24px) saturate(1.2); inset: -30px; }
html.lite .np-k-now { background: rgba(0, 0, 0, .35); }
html.lite .person-new, html.lite .luach-cell.lvl-4.has-cover, html.lite .tab-now.is-playing .tab-disc { animation: none !important; }

/* Lighter while music plays: the old little equalizer behind the turning cover is never seen, so it no longer
   moves; the bar's glow keeps its colours without moving all the time; the ring changes more slowly. */
.tab-eq, .tab-now.is-playing .tab-eq { display: none !important; animation: none !important; }
.tab-now.is-playing .tab-eq i { animation: none !important; }
html.music-on nav.tabbar::before { animation: none; }

html.lite .tab-ring { display: none !important; }

/* The ring: a fixed soft line in the cover's colours; only its strength beats with the bass (cheap to show). */
.np-stage > .np-ring { padding: 4px; filter: blur(7px); will-change: opacity; transition: none; }
.tab-ring { padding: 2.5px; filter: blur(2px); will-change: opacity; transition: none; }
.tab-now.has-song .tab-ring { opacity: .6; }

/* The shine on the name moves by transform only (no layout every frame). */
@keyframes glass-shine-x { 0% { transform: translateX(0) skewX(-18deg); } 22% { transform: translateX(520%) skewX(-18deg); } 100% { transform: translateX(520%) skewX(-18deg); } }
.name-glass::after { left: -60%; animation-name: glass-shine-x; will-change: transform; }
html.lite .name-glass::after { animation: none; }

/* Singers' names lead to their page only inside an album or a single's page; elsewhere they are plain text. */
.singer-link { cursor: inherit; text-decoration: none; }
html.on-album .singer-link { cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); }

/* A singer's bio under the name, shortened with "more" when long. */
.singer-bio { margin: 4px 0 18px; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--purple) 7%, var(--bg-elev-solid)); border: 1px solid var(--line); }
.singer-bio p { margin: 0; line-height: 1.6; font-size: .95rem; white-space: normal; }
.singer-bio.is-long:not(.is-open) p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.singer-bio-more { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--purple); font: inherit; font-weight: 700; cursor: pointer; }

/* Downloads beside the plays (administrators), and the total under "Total streams". */
.play-count.is-downloads { margin-inline-start: 4px; }
.stat-sub { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .74rem; font-weight: 700; opacity: .9; }
.stat-sub svg { width: 13px; height: 13px; }

/* "Mix songs" in the now-playing menu, ticked when on. */

/* Back and ahead 15 seconds, on both sides of the play button. */
.np-btn.np-jump { width: 44px; height: 44px; }
.np-btn.np-jump svg { width: 26px; height: 26px; }
@media (max-width: 380px) { .np-btn.np-jump { width: 38px; height: 38px; } .np-btn.np-jump svg { width: 23px; height: 23px; } }
/* Singers' names lead to their page only on a laptop (inside an album). */
@media not ((hover: hover) and (pointer: fine)) { html.on-album .singer-link { cursor: inherit; text-decoration: none; } }
/* "Mix songs" when on: in the colours of the play button. */
.np-controls .np-btn { flex: none; } .np-controls { gap: 2px; }
/* A phone: seven buttons in one row, all of them in sight. */
@media (max-width: 520px) {
  .np-controls { justify-content: space-between; gap: 0; padding: 0 2px; }
  .np-controls .np-btn { width: 40px; height: 40px; }
  .np-controls .np-btn svg { width: 22px; height: 22px; }
  .np-controls .np-btn.np-small svg { width: 19px; height: 19px; }
  .np-controls .np-btn.np-jump svg { width: 25px; height: 25px; }
  .np-controls .np-btn.np-play { width: 64px; height: 64px; }
  .np-controls .np-btn.np-play svg { width: 26px; height: 26px; }
}

/* Choosing a cover: square pictures from the covers folder. */
.cover-pick { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.cover-pick .banner-choice img { aspect-ratio: 1; object-fit: cover; }

/* ---- Album booklet: the button on the album page and the PDF reader ---- */
.booklet-btn { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 380px; margin: 16px auto 0; padding: 10px 14px 10px 10px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.16); background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--text); text-align: start; cursor: pointer; box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.8); transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.booklet-btn:hover { background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)); border-color: rgba(255, 255, 255, 0.28); }
.booklet-btn:active { transform: scale(0.98); }
.booklet-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.booklet-btn-art { position: relative; flex: none; width: 46px; height: 54px; }
.booklet-btn-art img, .booklet-btn-art i { position: absolute; inset: 0; border-radius: 4px 7px 7px 4px; }
.booklet-btn-art img { z-index: 3; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.booklet-btn-art::before { content: ""; position: absolute; z-index: 4; inset: 0 auto 0 0; width: 5px; border-radius: 4px 0 0 4px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(255, 255, 255, 0.12)); }
.booklet-btn-art i { background: #f4efe6; }
.booklet-btn-art i:nth-of-type(1) { z-index: 2; transform: translate(4px, 2px) rotate(3deg); }
.booklet-btn-art i:nth-of-type(2) { z-index: 1; transform: translate(8px, 4px) rotate(6deg); background: #e3dccf; }
.booklet-btn:hover .booklet-btn-art i:nth-of-type(1) { transform: translate(7px, 1px) rotate(6deg); }
.booklet-btn:hover .booklet-btn-art i:nth-of-type(2) { transform: translate(13px, 2px) rotate(11deg); }
.booklet-btn-art i { transition: transform 0.3s cubic-bezier(.3, 1.4, .5, 1); }
.booklet-btn-words { display: grid; gap: 2px; min-width: 0; flex: 1; }
.booklet-btn-words strong { font-size: 1rem; font-weight: 800; }
.booklet-btn-words small { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.booklet-btn-go { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--green-2); color: var(--green-ink); }
.booklet-btn-go svg { width: 20px; height: 20px; }

html.booklet-on, html.booklet-on body { overflow: hidden; }
.booklet-view { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: #0b0810; color: #fff; opacity: 0; transition: opacity 0.25s ease; }
.booklet-view.is-open { opacity: 1; }
.bk-backdrop { position: absolute; inset: -40px; background: var(--bk-cover, none) center / cover; filter: blur(48px) brightness(0.38) saturate(1.3); transform: scale(1.1); pointer-events: none; }
.bk-backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, transparent, rgba(8, 5, 12, 0.7)); }
.bk-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: rgba(12, 9, 17, 0.55); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.bk-title { flex: 1; min-width: 0; display: grid; text-align: center; }
.bk-title strong { font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-title small { color: rgba(255, 255, 255, 0.6); font-size: 0.74rem; }
.bk-tools { display: flex; gap: 6px; }
.bk-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; text-decoration: none; }
.bk-icon:hover { background: rgba(255, 255, 255, 0.16); }
.bk-icon svg { width: 20px; height: 20px; }
.bk-scroll { position: relative; z-index: 1; flex: 1; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 0 calc(80px + env(safe-area-inset-bottom)); }
.bk-pages { display: grid; gap: 18px; margin: 0 auto; transform-origin: 50% 0; justify-items: center; }
.booklet-view.is-zoomed .bk-pages { margin: 0 12px; }
.bk-page { position: relative; border-radius: 6px; overflow: hidden; background: #f7f4ee; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 48px -20px rgba(0, 0, 0, 0.75); }
.bk-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; animation: bk-in 0.35s ease both; }
.bk-page-n { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(0, 0, 0, 0.18); font-weight: 900; font-size: 3rem; }
.bk-page:not(.is-drawn)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%) -100% 0 / 200% 100%; animation: bk-shine 1.4s linear infinite; }
@keyframes bk-shine { to { background-position: 100% 0; } }
@keyframes bk-in { from { opacity: 0; } }
.bk-loading { display: grid; justify-items: center; gap: 16px; padding: 12vh 20px; color: var(--muted); text-align: center; }
.bk-loading img { width: min(200px, 50vw); aspect-ratio: 1; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow-lg); animation: bk-breathe 1.6s ease-in-out infinite alternate; }
.bk-loading.is-error a { display: inline-flex; gap: 8px; align-items: center; }
@keyframes bk-breathe { from { transform: scale(0.96); opacity: 0.75; } to { transform: scale(1); opacity: 1; } }
.bk-count { position: absolute; z-index: 2; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 7px 16px; border-radius: 999px; background: rgba(12, 9, 17, 0.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; font-weight: 700; font-size: 0.86rem; font-variant-numeric: tabular-nums; direction: ltr; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .bk-page:not(.is-drawn)::after, .bk-loading img { animation: none; } }

.booklet-pick { display: grid; gap: 8px; max-height: min(50vh, 420px); overflow: auto; margin: 12px 0; padding: 2px; }
.booklet-choice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 2px solid transparent; background: var(--bg-elev-2); color: var(--text); text-align: start; cursor: pointer; }
.booklet-choice:hover { border-color: var(--line-strong); }
.booklet-choice.is-on { border-color: var(--green-2); background: color-mix(in srgb, var(--green-2) 16%, var(--bg-elev-2)); }
.booklet-choice-icon { flex: none; display: grid; place-items: center; width: 38px; height: 46px; border-radius: 4px 9px 4px 4px; background: #e3483d; color: #fff; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.04em; }
.booklet-choice-name { flex: 1; min-width: 0; display: grid; gap: 2px; }
.booklet-choice-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booklet-choice-name small { color: var(--muted); font-size: 0.78rem; }
.booklet-choice-check { flex: none; opacity: 0; color: var(--green-2); }
.booklet-choice.is-on .booklet-choice-check { opacity: 1; }
.booklet-choice-check svg { width: 20px; height: 20px; }
.booklet-pick-head { margin: 6px 2px 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; }

/* ---- Admin: moods ---- */
.mood-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.mood-progress .bar { height: 8px; border-radius: 8px; background: var(--bg-elev-2); overflow: hidden; margin-top: 12px; }
.mood-progress .bar span { display: block; height: 100%; width: 0; background: var(--green-2); transition: width 0.3s ease; }
.mood-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mood-table select { max-width: 190px; }
.mood-table .small { font-size: 0.78rem; }
.mood-hand { margin-inline-start: 6px; font-size: 0.72rem; }

/* ---- Moods on the music page ---- */
.mood-rail { gap: 12px; }
.mood-tile { position: relative; flex: none; width: 200px; height: 124px; border-radius: 18px; overflow: hidden; padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; text-decoration: none; background: linear-gradient(160deg, var(--m1), var(--m2)); isolation: isolate; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 10px 24px -16px var(--m2); }
.mood-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, 0.28), transparent 65%); }
.mood-tile:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -16px var(--m2); }
.mood-tile:active { transform: scale(0.98); }
.mood-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--m1); }
.mood-art { position: absolute; z-index: -1; inset-inline-end: -18px; bottom: -22px; width: 112px; height: 112px; color: rgba(255, 255, 255, 0.16); transform: rotate(-12deg); transition: transform 0.35s ease; }
.mood-art svg { width: 100%; height: 100%; stroke-width: 1.2; }
.mood-tile:hover .mood-art { transform: rotate(-4deg) scale(1.06); }
.mood-badge { position: absolute; inset-inline-start: 14px; top: 14px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); }
.mood-badge svg { width: 20px; height: 20px; }
.mood-faces { position: absolute; inset-inline-end: 12px; top: 14px; display: flex; }
.mood-faces img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--m1); margin-inline-start: -9px; background: rgba(0, 0, 0, 0.2); }
.mood-faces img:first-child { margin-inline-start: 0; }
.mood-words { display: grid; gap: 2px; }
.mood-words strong { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.01em; }
.mood-words small { font-size: 0.76rem; color: rgba(255, 255, 255, 0.82); font-weight: 500; }
@media (max-width: 700px) { .mood-tile { width: 160px; height: 112px; padding: 12px 14px; } .mood-words strong { font-size: 1.08rem; } .mood-faces img { width: 24px; height: 24px; } .mood-badge { width: 32px; height: 32px; } }

.mood-hero { position: relative; display: flex; align-items: center; gap: 34px; margin: 6px 0 10px; padding: 30px; border-radius: 28px; overflow: hidden; color: #fff; background: linear-gradient(160deg, var(--m1), var(--m2)); isolation: isolate; box-shadow: 0 20px 40px -30px var(--m2); }
.mood-hero-glow { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent 60%); }
.mood-hero-stack { position: relative; flex: none; width: 210px; height: 190px; }
.mood-hero-stack img { position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 16px; object-fit: cover; box-shadow: 0 18px 34px -12px rgba(0, 0, 0, 0.55); border: 3px solid rgba(255, 255, 255, 0.4); translate: calc((var(--i) - 2) * 26px) 0; rotate: calc((var(--i) - 2) * 8deg); }
.mood-hero-stack img:nth-child(3) { z-index: 3; } .mood-hero-stack img:nth-child(2), .mood-hero-stack img:nth-child(4) { z-index: 2; }
.mood-hero-badge { position: absolute; z-index: 5; right: 0; bottom: 0; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5); }
.mood-hero-badge svg { width: 32px; height: 32px; }
.mood-hero-words { flex: 1; min-width: 0; }
.mood-hero-words .eyebrow { color: rgba(255, 255, 255, 0.8); margin: 0; }
.mood-hero-words h1 { margin: 2px 0 6px; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; line-height: 1; letter-spacing: -0.02em; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); }
.mood-hero-about { margin: 0; font-size: 1.02rem; opacity: 0.92; }
.mood-hero-meta { margin: 6px 0 0; font-size: 0.86rem; opacity: 0.8; font-weight: 600; }
.mood-hero .music-balls { justify-content: flex-start; margin-top: 16px; }
.mood-hero .music-pill:not(.is-main) { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
@media (max-width: 700px) {
  .mood-hero { flex-direction: column; text-align: center; gap: 12px; padding: 22px 16px; }
  .mood-hero-stack { width: 180px; height: 150px; }
  .mood-hero-stack img { width: 104px; height: 104px; margin: -52px 0 0 -52px; translate: calc((var(--i) - 2) * 20px) 0; }
  .mood-hero .music-balls { justify-content: center; }
}
.mood-dot { display: none; width: 7px; height: 7px; margin-inline-start: 6px; border-radius: 50%; background: #fff; vertical-align: middle; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
@media (max-width: 700px) { .mood-yours { display: none; } .mood-dot { display: inline-block; } }

/* The shiur's page of all its special evenings */
.moment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 4px 0 24px; }
.moment-grid .moment-card { width: auto; }
