/* iShtaig, look D (the owner's pick, 2026-11-16): a bright modern app. A pale page, white cards with a thin border
   and round corners, one soft blue, plain lettering (Inter); the Hebrew in Frank Ruhl Libre, Rashi and Tosfos in
   Rashi script, and the amud black on white. No figures anywhere: only the things of the beis medrash, the gemara, the
   daf and the yad. One stylesheet for the front page and the app.
   The leather look's names (--gold, --foil, --leather-*, --paper, --mono, --serif ...) stay, at the end of :root, as
   aliases of this look's own, so a rule written for that look still comes out in this one. */

:root {
  --bg: #f3f6fb; /* the page */
  --card: #ffffff; /* cards and sheets */
  --field: #ffffff; /* what you type in, and the small controls */
  --edge: #e1e7f0; /* a card's thin border, and the rule between rows */
  --edge-strong: #cdd6e4; /* a button's and a box's edge */
  --text: #12203a;
  --muted: #536380;
  --brand: #1f5fd6; /* the name, the big titles */
  --accent: #1f5fd6;
  --accent-hover: #1a52bb;
  --accent-ink: #ffffff; /* lettering on the accent */
  --accent-text: #1a4fb4; /* the accent as small lettering, readable on the tints too */
  --soft: #e3ecfb; /* the chevrusa's side of a conversation; quiet panels */
  --hl: #d6e5ff; /* a highlight: chosen, started, mine */
  --hover: #f1f5fd;
  --lamp: #f5c84c; /* a lit lamp: someone learning (the beis medrash, Chats) */
  --lamp-soft: #fff1c7;
  --lamp-ink: #5c4300;
  --badge: #d93a2e; /* how many new */
  --danger: #c4372b;
  --here: #d6e5ff; /* the yad's line */
  --shown: #fde3c3; /* what the chevrusa is explaining (app.js markShown): warm, never the yad's blue */
  --shown-line: #c77a17; /* and its frame */
  --term-line: #6e96e4; /* a word to know's underline, on the white page */
  --daf-bg: #ffffff; /* the page the Hebrew is printed on */
  --daf-ink: #161616;
  --line: var(--edge);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hebrew: "Frank Ruhl Libre", "Taamey Frank CLM", FrankRuehl, "Times New Roman", serif;
  --rashi: "Noto Rashi Hebrew", var(--hebrew); /* Rashi and Tosfos; Plain letters makes it the square letters */
  --r-lg: 24px; /* a large panel */
  --r: 16px; /* a card */
  --r-sm: 12px; /* a button, a box to type in */
  --r-xs: 8px;
  --pill: 999px;
  --shadow: none; /* cards lie flat on the page */
  --lift: 0 16px 40px -16px rgb(18 32 58 / 0.3), 0 2px 8px rgb(18 32 58 / 0.06); /* what floats over it */
  --mark: url("/icons/mark.png"); /* the logo's mark */
  /* the leather look's names */
  --ink: var(--text);
  --paper: var(--card);
  --paper-edge: var(--edge);
  --gold: var(--hl);
  --foil: var(--brand);
  --foil-light: var(--brand);
  --on-leather: #ffffff;
  --leather-1: #3a78ea;
  --leather-2: #1a4fb8;
  --night: var(--text);
  --card-edge: var(--edge-strong);
  --mono: var(--sans);
  --serif: var(--sans);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1322;
    --card: #141e33;
    --field: #0f182b;
    --edge: #233150;
    --edge-strong: #33466e;
    --text: #e8eef9;
    --muted: #9fb0cd;
    --brand: #8db2ff;
    --accent: #336be0;
    --accent-hover: #2c5fcb;
    --accent-text: #8db2ff;
    --soft: #1b2944;
    --hl: #1f3a6e;
    --hover: #1a2640;
    --lamp-soft: #4a3a12;
    --lamp-ink: #ffe6a3;
    --danger: #ff8a7d;
    --here: #1e3a6c;
    --shown: #4b3416;
    --shown-line: #e6a24b;
    --term-line: #7ea4ef;
    --daf-bg: #10192c;
    --daf-ink: #eef2fa;
    --lift: 0 16px 40px -16px rgb(0 0 0 / 0.75), 0 2px 8px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

/* The paper look (look.js sets <html data-look="paper">; the owner, 2026-11-24: "a paper look like ink reader
   style", then "paper should be shades of grey actually like an ereader"): the light page as an e-reader shows it.
   Light grey paper, black ink, no colour anywhere: what was the accent is ink, the borders are thin and grey, and what
   is read (the amud's English, the conversation) is set in a book's serif. The pictures (the shtetl, the hall, the
   room, the wall, the map, the print) are in grey too. Only under /app: on the front page and the pages around it
   look.js sets "light" for whoever chose paper. */
:root[data-look="paper"] {
  --bg: #e3e3e1;
  --card: #eeeeec;
  --field: #f5f5f3;
  --edge: #cdcdca;
  --edge-strong: #a6a6a3;
  --text: #161616;
  --muted: #555555;
  --brand: #161616;
  --accent: #262626;
  --accent-hover: #000000;
  --accent-ink: #f2f2f0;
  --accent-text: #262626;
  --soft: #d9d9d6;
  --hl: #cbcbc8;
  --hover: #e8e8e6;
  --lamp: #f7f7f5;
  --lamp-soft: #dcdcd9;
  --lamp-ink: #262626;
  --badge: #2b2b2b;
  --danger: #3a3a3a;
  --here: #cfcfcc;
  --shown: #d4d4d1;
  --shown-line: #555555;
  --term-line: #7a7a7a;
  --daf-bg: #eeeeec;
  --daf-ink: #111111;
  --lift: 0 16px 40px -16px rgb(0 0 0 / 0.35), 0 2px 8px rgb(0 0 0 / 0.08);
  --leather-1: #4a4a4a;
  --leather-2: #262626;
  --book: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; /* on the device already: nothing is fetched */
  color-scheme: light;
}
/* what is read, in a book's letters; the buttons and labels around it stay as they are */
:root[data-look="paper"] :is(#lines .en, #lines .notes, #gloss, #transcript, .mef-foot, .term-card) { --sans: var(--book); font-family: var(--book); }
:root[data-look="paper"] :is(#lines .en, #gloss, #transcript) { font-size: 1.04em; }
/* whatever is drawn or photographed in colour, in grey: the shtetl, the Heichal's hall, the beis medrash's room, the
   board's wall, the map, the Vilna print, the chevrusa's face and the name's mark */
:root[data-look="paper"] :is(.shtetl, .hl-stage > svg, .klal, .bm, .kotel, .mp-sheet, .scan img, .face, .bar .brand, .heichal-strip, .ticker) { filter: grayscale(1); }
:root[data-look="paper"] .shtetl .klal { filter: none; }
:root[data-look="paper"] :is(.crown, .week-box.is-shared) { background: linear-gradient(150deg, #4a4a4a, #262626); box-shadow: 0 14px 30px -18px rgb(0 0 0 / 0.6); }
:root[data-look="paper"] .week-box.is-shared { box-shadow: none; }
:root[data-look="paper"] .hl-tag:not(.is-free) { background: rgb(22 22 22 / 0.84); }
:root[data-look="paper"] #orb { box-shadow: 0 6px 16px -6px rgb(0 0 0 / 0.6); }

* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--text);
  font: 16px/1.55 var(--sans);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The pieces */
.tag { display: inline-block; margin: 0; padding: 0.25em 0.75em; background: var(--hl); color: var(--accent-text); border-radius: var(--pill); font: 600 0.8rem/1.35 var(--sans); text-decoration: none; }
.tag.light { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--edge); }
/* The logo: its mark, then the name */
.tag.brand { display: inline-flex; align-items: center; gap: 0.42em; padding: 0; background: none; color: var(--brand); border-radius: 0; box-shadow: none; font: 700 1.15rem/1 var(--sans); letter-spacing: -0.02em; }
.tag.brand::before { content: ""; flex: none; width: 1.45em; height: 1.45em; background: var(--mark) center / 100% 100% no-repeat; }
.chip { display: inline-block; padding: 0.35em 0.8em; background: var(--card); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--pill); font: 500 0.78rem/1.2 var(--sans); text-decoration: none; }
.box-title { display: block; width: fit-content; margin: 0; color: var(--brand); font: 700 clamp(3.2rem, 10vw, 7.2rem)/1.02 var(--sans); letter-spacing: -0.045em; }
.box-title.medium { font-size: clamp(1.8rem, 5vw, 3.2rem); letter-spacing: -0.03em; }
.highlight { padding: 0.02em 0.25em; background: var(--hl); color: var(--text); border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.foil { color: var(--brand); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72em 1.15em;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--edge-strong);
  border-radius: var(--r-sm);
  font: 600 0.9rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
@media (hover: hover) {
  .btn:hover { background: var(--hover); border-color: color-mix(in srgb, var(--accent) 45%, var(--edge-strong)); }
}
.btn:active { transform: scale(0.97); }
.btn.gold { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (hover: hover) {
  .btn.gold:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
}
.btn.small { padding: 0.5em 0.8em; font-size: 0.8rem; border-radius: 10px; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.paper { background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-lg); }
.bsd { position: absolute; top: 4px; right: max(14px, env(safe-area-inset-right)); z-index: 6; margin: 0; font: 500 0.85rem/1.3 var(--hebrew); }
.note { margin: 0; color: var(--muted); font-size: 0.9rem; }
.error { margin: 0; min-height: 1.3em; color: var(--danger); font: 500 0.85rem var(--sans); }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: auto; accent-color: var(--accent); }

/* ---- The front page ----
   On a phone on its side what's in it stays clear of the notch (env(safe-area-inset-*), 0 on a computer).
   The plain header and the shared pieces first: Privacy and Terms (.landing too) and the price section use them. */
.landing .nav { position: absolute; top: 26px; left: max(34px, calc(env(safe-area-inset-left) + 18px)); right: max(34px, calc(env(safe-area-inset-right) + 18px)); z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.landing .nav nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
.landing .brand { font-size: 1.3rem; }
.landing .nav .chip { padding: 0.5em 0.95em; font-size: 0.82rem; }
.kicker, .kicker-light { display: table; }
.idea, .statement, .how, .price, .open { position: relative; max-width: 1100px; margin: 0 auto; padding: 72px max(24px, env(safe-area-inset-right)) 72px max(24px, env(safe-area-inset-left)); }
.kicker-light { margin: 0 0 14px; }
.lines { margin: 0; color: var(--text); font: 700 clamp(1.6rem, 4.4vw, 3rem)/1.16 var(--sans); letter-spacing: -0.03em; }
.lines span { display: table; margin: 0 0 0.04em; }
.lines span:nth-child(2) { color: var(--brand); }
.card { max-width: 560px; margin: 40px 0 0 5%; padding: 22px 26px; }
.card p { margin: 0 0 0.8em; }
.card p:last-child { margin-bottom: 0; }
.drop::first-letter { float: left; margin: 0.02em 0.1em 0 0; color: var(--brand); font: 700 2.7em/0.9 var(--sans); }
.how h2 { margin: 0; font: 700 clamp(1.6rem, 4vw, 2.6rem)/1.2 var(--sans); letter-spacing: -0.03em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 30px 0 0; padding: 0; list-style: none; }
.steps li { padding: 20px 22px 24px; border-radius: var(--r); }
.steps .tag { display: inline-grid; place-items: center; width: 2.1em; height: 2.1em; padding: 0; background: var(--accent); color: var(--accent-ink); border-radius: 50%; }
.steps h3 { margin: 14px 0 6px; font: 700 1.1rem/1.3 var(--sans); }
.steps p { margin: 0; }
/* Open your gemara: the sign-in, with the volume itself beside it */
.open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 360px); gap: 40px; align-items: center; padding-bottom: 40px; }
.open .box-title { color: var(--text); }
.open .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.open .note, .credit { max-width: 520px; margin: 20px 0 0; color: var(--muted); }
.volume { position: relative; margin: 0; filter: drop-shadow(0 20px 26px rgb(18 32 58 / 0.2)); }
.volume img { display: block; width: 100%; height: auto; }
/* the shadow it stands on */
.volume::after { content: ""; position: absolute; z-index: -1; left: 5%; right: 3%; bottom: 0.5%; height: 7%; border-radius: 50%; background: rgb(10 20 45 / 0.5); filter: blur(14px); }
.credit { margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); max-width: 1100px; font: 500 0.74rem var(--sans); }

@media (max-width: 760px) {
  .landing .nav { top: 22px; left: 20px; right: 20px; }
  .landing .nav .chip { display: none; }
  .landing .btn { min-height: 44px; }
  .card { margin: 32px 0 0; }
  .open { grid-template-columns: 1fr; }
  .volume { max-width: 260px; margin: 0 auto; }
}

/* The front page itself (body.front), 2026-11-20: it opens and ends in the logo's blue with its stars; in between it is
   the bright page. The sky (landing-sky.js), the example of learning (landing-demo.js), the pictures of the places
   inside (landing-tour.js) and the numbers on the shelf (landing.js) move; with less motion asked for, or no script,
   everything stands still and is all there. */
.front { --sky-1: #2c6fe8; --sky-2: #1648b4; --glass: rgb(255 255 255 / 0.13); --glass-edge: rgb(255 255 255 / 0.24); }
@media (prefers-color-scheme: dark) { .front { --sky-1: #2360d6; --sky-2: #123a94; } }
/* The page itself is the sky's blue: it is what shows when a phone's page is pulled past its top or its end, and what
   an iPhone's Safari takes for the strips around its own bars. The bright middle is main's own. */
html:has(> body.front) { background: #1648b4; scroll-behavior: smooth; }
@media (prefers-color-scheme: dark) { html:has(> body.front) { background: #123a94; } }
.front { background: var(--sky-1); }
.front main { background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html:has(> body.front) { scroll-behavior: auto; } }
.front [id] { scroll-margin-top: 84px; }
.front .bsd { color: rgb(255 255 255 / 0.92); }

/* The bar: it stays at the top; glass over the sky, a white pill over the page */
.front .nav { position: fixed; top: 28px; left: 50%; right: auto; z-index: 20; width: min(1120px, calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right))); padding: 7px 8px 7px 16px; translate: -50% 0; border: 1px solid var(--glass-edge); border-radius: var(--pill); background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); transition: top 0.25s, background 0.25s, border-color 0.25s, box-shadow 0.25s; }
.scrolled .front .nav { top: 10px; }
.front .nav nav { flex-wrap: nowrap; gap: 4px; }
.front .nav .brand { color: #fff; transition: color 0.25s; }
.front .nav .chip { background: transparent; border-color: transparent; color: #fff; transition: color 0.25s, background 0.15s; }
.front .nav .btn.gold { margin-inline-start: 6px; background: #fff; border-color: #fff; border-radius: var(--pill); color: var(--sky-2); }
@media (hover: hover) {
  .front .nav .chip:hover { background: rgb(255 255 255 / 0.16); }
  .front .nav .btn.gold:hover { background: #eef3fd; border-color: #eef3fd; }
}
.past-sky .front .nav { border-color: var(--edge); background: var(--card); background: color-mix(in srgb, var(--card) 84%, transparent); box-shadow: var(--lift); } /* the first for a browser without color-mix */
.past-sky .front .nav .brand { color: var(--brand); }
.past-sky .front .nav .chip { color: var(--text); }
.past-sky .front .nav .btn.gold { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) {
  .past-sky .front .nav .chip:hover { background: var(--hover); }
  .past-sky .front .nav .btn.gold:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
}

/* The sky. The star figure is a picture standing on the ground line; the canvas over it draws its stars flowing out
   and up (it reads where the picture stands, so only these rules place it). On a wide screen the words keep to the
   left and the figure stands beside them; on a narrow one the words are above and the figure below. */
.front .sky { position: relative; min-height: 100vh; min-height: 100svh; padding: clamp(104px, 15vh, 150px) max(44px, calc(env(safe-area-inset-right) + 28px)) 56px max(44px, calc(env(safe-area-inset-left) + 28px)); overflow: hidden; color: #fff; background: linear-gradient(var(--sky-1), var(--sky-2)); }
.front .sky-stars, .front .dusk-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.front .sky-figure { position: absolute; left: clamp(430px, 33vw, 600px); bottom: 3.5vh; width: auto; height: clamp(280px, 60vh, 600px); pointer-events: none; -webkit-user-select: none; user-select: none; }
.front .sky-words { position: relative; z-index: 2; width: fit-content; max-width: 100%; }
.front .sky .cover-title { margin: 0 0 10px; color: rgb(255 255 255 / 0.94); text-align: left; font: 700 clamp(1.15rem, 2.2vw, 1.6rem)/1.2 var(--hebrew); letter-spacing: 0.04em; }
.front .sky .kicker { border-radius: 16px; background: rgb(255 255 255 / 0.15); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.26); color: #fff; }
.front .sky .box-title { margin-top: 14px; color: #fff; font-size: clamp(3.4rem, 9.5vw, 7.2rem); }
.front .tagline { margin: 10px 0 0; font: 700 clamp(1.25rem, 2.4vw, 1.75rem)/1.25 var(--sans); letter-spacing: -0.02em; }
/* what a chevrusa says, as its side of a conversation looks in the app, on glass */
.front .says { position: relative; width: min(100%, 24.5rem); margin: 24px 0 0; padding: 10px 16px 12px; border: 1px solid var(--glass-edge); border-radius: 18px 18px 18px 5px; background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.front .says .who { display: block; margin-bottom: 2px; color: rgb(255 255 255 / 0.8); font: 600 0.68rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.front .typed, .front .asks li { margin: 0; min-height: 1.5em; font: 500 1.08rem/1.5 var(--sans); }
.front .typed { display: none; white-space: nowrap; }
.front .asks { margin: 0; padding: 0; list-style: none; }
.front .asks li + li { display: none; } /* with no script the first line simply stands there */
.js .front .typed { display: block; }
.js .front .asks { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* still read out */
.front .caret { display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -0.18em; background: #fff; }
.front .sky-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.front :is(.sky, .dusk) .btn.gold { background: #fff; border-color: #fff; color: var(--sky-2); }
.front :is(.sky, .dusk) .btn:not(.gold) { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.5); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (hover: hover) {
  .front :is(.sky, .dusk) .btn.gold:hover { background: #eef3fd; border-color: #eef3fd; }
  .front :is(.sky, .dusk) .btn:not(.gold):hover { background: rgb(255 255 255 / 0.2); border-color: #fff; }
}
.front :is(.sky, .dusk) :focus-visible, .front .nav :focus-visible { outline-color: #fff; }
.past-sky .front .nav :focus-visible { outline-color: var(--accent); }
.front .sky-quote { position: absolute; z-index: 2; right: max(44px, calc(env(safe-area-inset-right) + 28px)); bottom: 5vh; margin: 0; padding: 12px 18px 10px; border: 1px solid var(--glass-edge); border-radius: var(--r); background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-align: right; font: 700 1.7rem/1.2 var(--hebrew); }
.front .sky-quote small { display: block; margin-top: 4px; color: rgb(255 255 255 / 0.82); font: 500 0.72rem var(--sans); }

/* See it learn: a piece of the learning screen. The amud's side wears the app's own rules (.line, .he, .w, .en, .notes),
   so it is the app's line-by-line view; the talk copies #transcript's. The yad lies over both and runs off the page. */
.front :is(.see, .inside, .shelf) { position: relative; max-width: 1100px; margin: 0 auto; padding: 72px max(24px, env(safe-area-inset-right)) 72px max(24px, env(safe-area-inset-left)); }
.front .see { padding-top: 92px; }
.front main { overflow-x: hidden; overflow-x: clip; } /* the yad's rod runs off the right edge */
.front .lead { max-width: 600px; margin: 22px 0 0; font-size: 1.06rem; }
.front .demo-wrap { position: relative; margin-top: 46px; }
.front .demo-daf { position: absolute; z-index: 0; left: -64px; bottom: -78px; width: min(22vw, 250px); margin: 0; rotate: -8deg; filter: drop-shadow(0 18px 22px rgb(18 32 58 / 0.18)); pointer-events: none; }
.front .demo-daf img { display: block; width: 100%; height: auto; border-radius: 2px; filter: brightness(1.07) saturate(0.86); }
.front .orb { display: grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.front .orb svg { width: 22px; height: 22px; fill: currentColor; }
/* what was said before slips away under the top as more is said */
.front .demo-talk { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; min-height: 0; margin: 0; padding: 12px 20px 22px; overflow: hidden; list-style: none; -webkit-mask-image: linear-gradient(transparent, #000 34px); mask-image: linear-gradient(transparent, #000 34px); }
.front .demo-talk li { box-sizing: border-box; flex: none; max-width: 92%; margin-top: 12px; padding: 10px 14px; overflow: hidden; background: var(--soft); border-radius: 16px 16px 16px 4px; }
.front .demo-talk li.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 16px 16px 4px 16px; }
.front .demo-talk .who { display: block; margin-bottom: 2px; color: var(--muted); font: 600 0.68rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.front .demo-talk li.me .who { color: rgb(255 255 255 / 0.8); }
.front .demo-talk p { margin: 0; font: 400 1.02rem/1.55 var(--sans); }
.front .demo-talk .unsaid { visibility: hidden; } /* the rest of a line being said: it holds its room */
.front .bars { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.front .bars b { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(0.3); }
.front .demo-yad { position: absolute; z-index: 3; left: 0; top: 0; width: 400px; max-width: none; height: auto; opacity: 0; pointer-events: none; filter: drop-shadow(0 14px 14px rgb(18 32 58 / 0.3)); -webkit-user-select: none; user-select: none; }
.front .demo-note { margin-top: 18px; text-align: center; }

/* Inside: the pictures of the places. They swipe sideways and snap; the script only adds the arrows' work, the dots
   and moving on by itself. */
.front .tour { margin-top: 36px; }
.front .tour-track { position: relative; display: flex; gap: 20px; margin: 0 -4px; padding: 6px 4px 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); }
.front .tour-track::-webkit-scrollbar { display: none; }
.front .tour-slide { flex: 0 0 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px 44px; margin: 0; padding: 36px 64px; overflow: hidden; scroll-snap-align: center; border: 1px solid var(--edge); border-radius: var(--r-lg); background: linear-gradient(160deg, var(--card), var(--soft)); }
.front .tour-slide h3 { margin: 16px 0 10px; font: 700 clamp(1.7rem, 4vw, 2.7rem)/1.1 var(--sans); letter-spacing: -0.03em; }
.front .tour-slide p { max-width: 24em; margin: 0; color: var(--muted); font-size: 1.12rem; }
/* a phone, plainly: a dark rim and the picture */
.front .phone { width: 262px; aspect-ratio: 390 / 640; box-sizing: content-box; overflow: hidden; border: 9px solid #101a2e; border-radius: 36px; background: var(--bg); box-shadow: 0 22px 44px -20px rgb(18 32 58 / 0.55); }
.front .phone img { display: block; width: 100%; height: auto; }
.front .tour-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.front .tour-dots { display: flex; gap: 2px; }
.front .tour-dot { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.front .tour-dot::before { content: ""; display: block; width: 8px; height: 8px; margin: auto; border-radius: 50%; background: var(--edge-strong); transition: width 0.2s, background 0.2s; }
.front .tour-dot[aria-current="true"]::before { width: 20px; border-radius: 4px; background: var(--accent); }

/* On the shelf: how much of it there is, in the sky's blue */
.front .shelf h2 { margin: 0; font: 700 clamp(1.6rem, 4vw, 2.6rem)/1.2 var(--sans); letter-spacing: -0.03em; }
.front .counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 30px 0 0; }
.front .counts > div { padding: 24px 24px 22px; border-radius: var(--r); background: linear-gradient(150deg, #2f6fe0, #1a4fb8); color: #fff; }
.front .counts dt { font: 700 clamp(2.1rem, 4.6vw, 3rem)/1.05 var(--sans); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.front .counts dd { margin: 8px 0 0; color: rgb(255 255 255 / 0.9); font: 500 0.98rem/1.35 var(--sans); }

/* The end of the page: the sky again, Open your Gemara and the credit on it */
.front .dusk { position: relative; margin-top: 32px; overflow: hidden; color: #fff; background: linear-gradient(var(--sky-1), var(--sky-2)); }
.front .dusk .open { z-index: 1; padding-top: 88px; }
.front .dusk .kicker-light { background: rgb(255 255 255 / 0.15); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.26); color: #fff; }
.front .dusk .box-title { color: #fff; }
.front .dusk .note, .front .dusk .credit { color: rgb(255 255 255 / 0.85); }
.front .dusk .credit { position: relative; z-index: 1; }

/* The motion: the words of the sky arrive one after the other; further down each piece rises into place as it comes
   into view (landing.js marks them, so with no script nothing is ever hidden) */
@keyframes arrive { from { opacity: 0; translate: 0 18px; } }
@keyframes appear { from { opacity: 0; } }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .front .sky-words > * { animation: arrive 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .front .sky-words > :nth-child(2) { animation-delay: 0.05s; }
  .front .sky-words > :nth-child(3) { animation-delay: 0.1s; }
  .front .sky-words > :nth-child(4) { animation-delay: 0.18s; }
  .front .sky-words > :nth-child(5) { animation-delay: 0.28s; }
  .front .sky-words > :nth-child(6) { animation-delay: 0.38s; }
  .front .sky-figure, .front .sky-stars { animation: appear 1.4s ease-out 0.1s both; }
  .front .sky-quote { animation: appear 1s ease-out 0.7s both; }
  .front .caret { animation: caret 1s steps(2, jump-none) infinite; }
  .js .front .reveal { opacity: 0; translate: 0 24px; transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .front .reveal.in { opacity: 1; translate: none; }
}
/* being filmed (tools/film.py): nothing eases by itself, every frame is drawn from its time */
.film .front *, .film .front *::before, .film .front *::after { animation: none !important; transition: none !important; }
.film .front .reveal { opacity: 1 !important; translate: none !important; }

/* a narrow window or a tablet: the words above, the figure below them */
@media (max-width: 1000px) {
  .front .sky { display: flex; flex-direction: column; }
  .front .sky-words { margin-bottom: clamp(200px, 38vh, 350px); }
  .front .sky-figure { left: clamp(14px, 6vw, 70px); bottom: 2.5vh; height: clamp(170px, 34vh, 320px); }
  .front .nav .chip { display: none; }
}
@media (max-width: 760px) {
  .front .nav { top: 26px; padding: 6px 7px 6px 14px; }
  .scrolled .front .nav { top: 8px; }
  .front .sky { padding: 96px 24px 40px; }
  .front .sky-quote { right: 16px; bottom: 3vh; padding: 9px 13px 8px; font-size: 1.22rem; }
  .front .sky-quote small { margin-top: 2px; font-size: 0.66rem; }
  .front .see { padding-top: 64px; }
  .front .demo-wrap { margin-top: 32px; }
  .front .demo-daf { display: none; }
  .front .tour-slide { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 22px; padding: 26px 22px 28px; text-align: center; }
  .front .tour-slide p { font-size: 1.02rem; }
  .front .phone { width: 226px; border-width: 8px; border-radius: 32px; }
  .front .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .front .counts > div { padding: 18px 16px 16px; }
  .front .dusk .open { padding-top: 64px; }
}

/* features:start
   Features (2026-11-21): everything inside in four groups, each a card with a short list. Two cards across on a
   computer, all open. On a phone one under the other, and they fold: the heading opens and shuts its list (landing.js
   shuts all but the first there; with no script all four stand open). Made by
   claude-scratch/features-2026-11-21.nosync/tools/features.py from src/features.css. */
.front .features { position: relative; max-width: 1100px; margin: 0 auto; padding: 72px max(24px, env(safe-area-inset-right)) 72px max(24px, env(safe-area-inset-left)); }
.front .feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-top: 40px; }
.front .feature summary { position: relative; display: block; padding: 26px 28px 20px; list-style: none; pointer-events: none; }
.front .feature summary::-webkit-details-marker { display: none; }
.front .feature h3 { display: flex; align-items: center; gap: 13px; margin: 0; font: 700 1.32rem/1.2 var(--sans); letter-spacing: -0.02em; }
.front .feature-icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(150deg, #2f6fe0, #1a4fb8); color: #fff; }
.front .feature-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.front .feature-sub { margin: 12px 0 0; color: var(--muted); font-size: 1rem; }
.front .feature ul { margin: 0; padding: 0 28px 14px; list-style: none; }
.front .feature li { padding: 11px 0 12px; border-top: 1px solid var(--edge); color: var(--muted); font-size: 0.97rem; line-height: 1.5; }
.front .feature li b { color: var(--text); font-weight: 600; }
.front .feature li a { color: var(--brand); text-underline-offset: 2px; }
@media (max-width: 760px) {
  .front .feature-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 30px; }
  .front .feature summary { padding: 20px 52px 20px 20px; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .front .feature summary::after { content: ""; position: absolute; right: 24px; top: 34px; width: 10px; height: 10px; border: solid var(--muted); border-width: 0 2px 2px 0; rotate: 45deg; transition: rotate 0.2s, top 0.2s; }
  .front .feature[open] summary::after { top: 40px; rotate: 225deg; }
  .front .feature h3 { font-size: 1.2rem; }
  .front .feature-sub { font-size: 0.97rem; }
  .front .feature ul { padding: 0 20px 8px; }
}
/* features:end */

/* The site's other pages, 2026-11-20: they wear the front page's sky. Privacy and Terms (body.front.inner): its bar, a
   short sky with the page's name and the star figure, the sheet rising onto it (privacy.css), the blue again at the
   end. A page that isn't there (404.html, body.front.lost): the sky alone. pages.js draws the stars. */
.front.inner .sky { display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; height: clamp(280px, 44vh, 400px); padding: 0 max(16px, env(safe-area-inset-right)) 92px max(16px, env(safe-area-inset-left)); }
.front.inner .sky-words { box-sizing: border-box; flex: none; width: 100%; max-width: 820px; margin: 0 auto; padding: 0 30px; }
.front.inner .sky .box-title { margin: 0; color: #fff; font-size: clamp(2.5rem, 7vw, 4.4rem); }
/* the figure stands on the sheet's top edge, toward its right end */
.front.inner .sky-figure { left: auto; right: max(40px, calc(50% - 340px)); bottom: 56px; height: calc(100% - 56px - 96px); }
.front.inner .dusk { margin-top: 0; }
.front.inner .dusk .credit { box-sizing: border-box; max-width: 820px; padding: 30px 30px calc(34px + env(safe-area-inset-bottom)); }
.front.lost .sky-words { max-width: min(100%, 370px); }
.front.lost .sky .box-title { margin-top: 16px; font-size: clamp(2.5rem, 5.4vw, 3.9rem); line-height: 1.04; }
.front.lost .tagline { font-weight: 500; font-size: clamp(1.05rem, 1.8vw, 1.22rem); line-height: 1.45; margin-top: 16px; }
.front.lost .sky-actions { margin-top: 26px; }
@media (max-width: 1000px) {
  .front.lost .sky-words { max-width: 100%; }
}
@media (max-width: 560px) {
  .front.inner .sky { height: clamp(250px, 36vh, 300px); padding-bottom: 82px; }
  .front.inner .sky-words { padding: 0 18px; }
  .front.inner .sky-figure { right: 30px; height: calc(100% - 56px - 92px); }
  .front.inner .dusk .credit { padding: 24px 34px calc(30px + env(safe-area-inset-bottom)); }
}

/* See it learn, as the real thing (2026-11-20, the owner: "show what the actual learning pages look like and the virtual
   ai guy ... clips of his voice talking torah as he goes through ... sliding through the page"). The page is a picture
   of the app's own page of an amud (src/daf.json; art/demo-page*.webp); landing-demo.js moves over it like a camera, lights the
   words as they are read and Rashi as it is explained, and plays the chevrusa's voice once "Hear him" is pressed. */
.front .demo { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); grid-template-rows: auto 508px; overflow: hidden; border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--lift); }
.front .demo-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--edge); background: var(--bg); }
.front .demo-brand { display: inline-flex; align-items: center; gap: 0.42em; color: var(--brand); font: 700 1.02rem/1 var(--sans); letter-spacing: -0.02em; }
.front .demo-brand::before { content: ""; width: 1.45em; height: 1.45em; background: var(--mark) center / 100% 100% no-repeat; }
.front .demo-pick { display: inline-flex; align-items: center; gap: 8px; margin-inline: auto; }
.front .demo-key { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--edge-strong); border-radius: 10px; background: var(--card); color: var(--text); font: 600 1rem/1 var(--sans); }
.front .demo-key.off { color: var(--edge-strong); }
.front .demo-key svg { width: 18px; height: 18px; }
.front .demo-amud { padding: 0.45em 0.85em; border: 1px solid var(--edge-strong); border-radius: var(--r-sm); background: var(--card); color: var(--text); font: 600 0.95rem var(--sans); white-space: nowrap; }
.front .demo-amud small { color: var(--muted); font-size: 0.8em; }
/* the page: the picture, moved by the script; a light page in either look, as the app's own page is */
.front .demo-page { position: relative; min-width: 0; overflow: hidden; background: #fff; }
.front .demo-cam { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.front .demo-cam img { display: block; max-width: none; height: auto; }
.front .demo-cam i { position: absolute; display: block; border-radius: 4px; mix-blend-mode: multiply; opacity: 0; }
.front .demo-cam .dw.read { opacity: 1; background: #d6e5ff; }
.front .demo-cam .dw.at { opacity: 1; background: #8fb2f2; }
.front .demo-cam .dr { border-radius: 3px; background: #fde3c3; }
.front .demo-cam .dr.on { opacity: 1; }
.front .demo-cam .dr.edge { mix-blend-mode: normal; background: none; box-shadow: 0 0 0 2px #c77a17; }
/* the chevrusa: his face, what is said, and the microphone */
.front .demo-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-inline-start: 1px solid var(--edge); background: var(--bg); }
.front .demo-face { position: relative; flex: none; margin: 14px 14px 0; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 18px; background: #1b2436; box-shadow: 0 0 0 0 rgb(31 95 214 / 0); transition: box-shadow 0.3s; }
.front .demo-face img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.front .demo-face video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; opacity: 0; transition: opacity 0.12s; pointer-events: none; }
.front .demo-face video.on { opacity: 1; } /* he is saying a line: his face moving */
.front .demo-face figcaption { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: var(--pill); background: rgb(10 18 34 / 0.62); color: #fff; font: 600 0.78rem var(--sans); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.front .demo-face.speaking { box-shadow: 0 0 0 3px var(--accent), 0 0 22px 4px rgb(31 95 214 / 0.35); }
.front .demo-face .bars { height: 12px; }
.front .demo-talk { padding: 4px 14px 10px; -webkit-mask-image: linear-gradient(transparent, #000 64px); mask-image: linear-gradient(transparent, #000 64px); }
.front .demo-talk li { margin-top: 10px; padding: 9px 13px; }
.front .demo-talk p { font-size: 0.97rem; line-height: 1.5; }
.front .demo-state { display: flex; flex: none; align-items: center; gap: 10px; margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--edge); color: var(--accent-text); font: 600 0.84rem var(--sans); }
.front .demo-state .orb { width: 40px; height: 40px; }
.front .demo-sound { display: inline-flex; align-items: center; gap: 7px; margin-inline-start: auto; padding: 0.55em 1em; border: 0; border-radius: var(--pill); background: var(--accent); color: var(--accent-ink); font: 600 0.9rem var(--sans); cursor: pointer; box-shadow: 0 6px 16px -6px rgb(31 95 214 / 0.7); }
.front .demo-sound svg { width: 20px; height: 20px; fill: currentColor; }
.front .demo-sound[aria-pressed="true"] { background: var(--card); color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--accent); }
@media (hover: hover) {
  .front .demo-sound:hover { background: var(--accent-hover); }
  .front .demo-sound[aria-pressed="true"]:hover { background: var(--hover); }
}
.front .demo-sound:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.front .demo-yad { width: 300px; }
.front .demo-note { position: relative; z-index: 2; } /* over the Vilna page at its side */
@media (prefers-reduced-motion: no-preference) {
  .front .demo-sound:not([aria-pressed="true"]) { animation: nudge 2.6s ease-in-out 1.2s 3; }
}
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.07); } 90% { transform: scale(0.98); } }
@media (max-width: 760px) {
  /* the page above, his face over its corner as in a call, the talk under it */
  .front .demo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 330px auto; }
  .front .demo-top { padding: 8px 10px; gap: 8px; }
  .front .demo-brand { display: none; }
  .front .demo-pick { margin-inline: 0 auto; }
  .front .demo-key { width: 30px; height: 30px; }
  .front .demo-side { border-inline-start: 0; border-top: 1px solid var(--edge); }
  .front .demo-face { position: absolute; z-index: 2; top: 60px; left: 10px; width: 104px; margin: 0; aspect-ratio: 4 / 5; border-radius: 14px; box-shadow: 0 10px 24px -10px rgb(10 18 34 / 0.6); }
  .front .demo-face.speaking { box-shadow: 0 0 0 3px var(--accent), 0 10px 24px -10px rgb(10 18 34 / 0.6); }
  .front .demo-face figcaption { left: 6px; right: 6px; bottom: 6px; justify-content: center; gap: 6px; padding: 3px 6px; font-size: 0.66rem; }
  .front .demo-talk { flex: none; height: 188px; padding: 2px 12px 8px; }
  .front .demo-talk li { margin-top: 8px; padding: 7px 11px; }
  .front .demo-talk p { font-size: 0.93rem; }
  .front .demo-state { padding: 8px 12px 10px; }
  .front .demo-state .orb { width: 36px; height: 36px; }
  .front .demo-yad { width: 230px; }
}

/* Inside's slide show, 2026-11-20 (the owner: "make the ability to move the slides in the slide show more apparent"):
   big round arrows on the slides themselves, the next slide showing at the edge on a phone, a line saying it swipes,
   and the dot of the slide that's showing filling up until the next one comes. */
.front .tour { position: relative; }
.front .tour-arrow { position: absolute; z-index: 3; top: calc(50% - 46px); display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--card); color: var(--accent-text); box-shadow: 0 10px 28px -8px rgb(18 32 58 / 0.45), 0 0 0 1px var(--edge); cursor: pointer; transition: transform 0.15s, background 0.15s; }
.front .tour-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.front .tour-arrow.prev { left: -22px; }
.front .tour-arrow.next { right: -22px; }
@media (hover: hover) {
  .front .tour-arrow:hover { background: var(--accent); color: var(--accent-ink); transform: scale(1.06); }
}
.front .tour-arrow:active { transform: scale(0.94); }
.front .tour-arrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.front .tour-nav { gap: 6px; margin-top: 4px; }
.front .tour-dot { width: 30px; height: 30px; }
.front .tour-dot::before { width: 10px; height: 10px; }
.front .tour-dot[aria-current="true"]::before { width: 34px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--accent) var(--fill, 100%), color-mix(in srgb, var(--accent) 35%, transparent) var(--fill, 100%)); }
.front .tour-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 0; color: var(--muted); font: 500 0.88rem var(--sans); }
.front .tour-hint svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .js .front .tour-hint svg { animation: swipe 1.8s ease-in-out infinite; }
}
@keyframes swipe { 0%, 100% { translate: 0 0; } 50% { translate: -7px 0; } }
@media (max-width: 760px) {
  /* the next slide shows at the edge, so it's plain there are more */
  .front .tour-track { gap: 12px; scroll-padding-inline: 7%; }
  .front .tour-slide { flex-basis: 86%; }
  .front .tour-arrow { top: calc(50% - 40px); width: 48px; height: 48px; }
  .front .tour-arrow.prev { left: -6px; }
  .front .tour-arrow.next { right: -6px; }
}

/* tour-screens:start (claude-scratch/tour-screens-2026-11-24.nosync/apply.py puts this in; change it there)
   The owner, 2026-11-24: the slide show's pictures up to date and on "a computer screen instead of phone screen so
   people can see better the pages", and See it learn as "a video clip so you can move the time like any normal video". */
/* Inside: each place on a computer's screen, the words above it. A phone gets the phone's picture, in a phone. */
.front .tour-slide { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 22px; padding: 30px 56px 34px; text-align: center; }
.front .tour-slide figcaption { display: grid; justify-items: center; }
.front .tour-slide h3 { margin: 12px 0 8px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.front .tour-slide p { max-width: 40em; text-wrap: balance; }
.front .screen { width: min(100%, max(520px, (100vh - 330px) * 1.6)); }
.front .screen picture { display: block; margin: 0 5%; overflow: hidden; border: 10px solid #101a2e; border-bottom-width: 13px; border-radius: 16px 16px 5px 5px; background: #fff; box-shadow: 0 26px 50px -26px rgb(18 32 58 / 0.6); }
.front .screen img { display: block; width: 100%; height: auto; }
/* what the screen stands on: a laptop's base, with the notch where it opens */
.front .screen::after { content: ""; display: block; height: 13px; border-radius: 3px 3px 14px 14px; background: linear-gradient(#b7c0d1, #b7c0d1) top center / 15% 5px no-repeat, linear-gradient(#e6eaf2, #b3bccd 65%, #8e99ae); box-shadow: 0 14px 22px -12px rgb(18 32 58 / 0.5); }
@media (min-width: 761px) {
  .front .tour-arrow { top: calc(50% - 30px); }
}
@media (min-width: 1300px) {
  .front .tour { margin-inline: -70px; } /* wider than the words above it, so the screen is as big as it can be */
}
@media (max-width: 760px) {
  .front .tour-slide { gap: 20px; padding: 26px 22px 28px; }
  .front .screen { width: 226px; }
  .front .screen picture { margin: 0; aspect-ratio: 390 / 640; border-width: 8px; border-radius: 32px; }
  .front .screen::after { content: none; }
}
/* See it learn: the clip, the browser's own controls on it, and the sound's button under it */
.front .clip { position: relative; z-index: 1; }
.front .clip-video { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 686; border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--lift); transition: filter 0.3s; }
.front .clip.held .clip-video { filter: saturate(0.55) brightness(0.95); } /* it waits where it is while he asks */
.front .clip-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin: 16px 0 0; color: var(--muted); font-size: 0.95rem; }
.front .clip-bar .demo-sound { margin: 0; }
.front .demo-daf { bottom: 0; } /* the Vilna page at the clip's side ends with the button's line, clear of the note under it */
@media (max-width: 760px) {
  .front .clip-video { aspect-ratio: 684 / 1254; }
}
/* tour-screens:end */
/* ---- The app ---- */
.app-page { height: 100%; overflow: hidden; }
.app-page .bsd { color: var(--muted); font-size: 0.75rem; top: 2px; right: max(14px, env(safe-area-inset-right)); }
#app { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
/* max(…, env(safe-area-inset-*)): a phone on its side keeps the notch clear (on a computer they're 0) */
.bar { display: flex; align-items: center; gap: 12px; padding: 20px max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left)); }
.bar .brand { font-size: 1.12rem; }
.daf { display: flex; align-items: center; gap: 8px; margin-inline: auto; }
/* What I'm learning, on the bar: tap it to choose (picker.js). The sefer's name gives way first; its daf never does. */
.daf .pick-open { display: inline-flex; align-items: baseline; gap: 0.55em; min-width: 0; max-width: 100%; padding: 0.5em 0.95em; background: var(--card); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 600 0.95rem var(--sans); cursor: pointer; transition: background 0.12s, border-color 0.12s, transform 0.08s; }
.daf .pick-open::after { content: "▾"; flex: none; color: var(--muted); font-size: 0.85em; }
.daf .pick-open:active { transform: scale(0.98); }
.pick-open-book, .pick-open-more { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-open-n { flex: none; }
.pick-open-more { max-width: 22em; color: var(--muted); font-weight: 500; }
.pick-open-more:empty { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; display: grid; place-items: center; width: 40px; height: 36px; background: var(--card); color: var(--text); border: 1px solid var(--edge-strong); border-radius: 10px; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; }
.menu-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  z-index: 10;
  display: grid;
  gap: 2px;
  min-width: 250px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  box-shadow: var(--lift);
}
.menu-list .btn { justify-content: flex-start; width: 100%; background: none; border-color: transparent; }
@media (hover: hover) { .menu-list .btn:hover { background: var(--hover); border-color: transparent; } }
.menu-list a.signout { padding: 8px 12px; color: var(--muted); font: 500 0.8rem var(--sans); }
.menu-list .note { padding: 4px 12px 6px; font: 500 0.78rem var(--sans); overflow-wrap: anywhere; }
/* The night look (look.js): Auto, Off, On, in a row of its own above Sign out */
.menu-look { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; padding: 10px 6px 6px 12px; border-top: 1px solid var(--edge); }
.menu-look-label { font: 600 0.8rem var(--sans); white-space: nowrap; }
.menu-look-chips { display: inline-flex; gap: 4px; }
.menu-look .chip { min-height: 32px; padding-inline: 0.75em; cursor: pointer; }
.menu-look .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (pointer: coarse) { .menu-look .chip { min-height: 40px; min-width: 44px; } }
/* Who's learning, on an account with more than one learner: their first name on the bar; tap to switch */
.bar .learner { flex: none; max-width: 10em; }
.bar .learner span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .learner::after { content: "▾"; font-size: 0.85em; }
.learner-list { display: grid; gap: 12px; margin: 16px 0 6px; }
.learner-list .btn { min-height: 52px; font-size: 1.05rem; }
.learner-list .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seats { display: inline-flex; align-items: center; gap: 6px; font: 600 0.78rem var(--sans); }
.seats select { padding: 0.35em 0.5em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: 10px; font: 600 0.85rem var(--sans); cursor: pointer; }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(330px, 1fr); gap: 20px; min-height: 0; padding: 4px max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }

/* The amud, on its page */
.text { overflow-y: auto; padding: 22px 30px 48px; overscroll-behavior: contain; }
.text.paper { background: var(--daf-bg); }
body[data-text="page"] .text { padding: 16px 12px 40px; }
.lines-wrap { position: relative; max-width: 780px; margin: 0 auto; }
.lines-wrap .scan, .lines-wrap #page { min-height: 40px; }
#lines { margin: 0; padding: 0; list-style: none; }
.line { padding: 10px 14px 12px; border-inline-start: 4px solid transparent; border-radius: 4px 12px 12px 4px; }
.line + .line { margin-top: 4px; }
.line.done { border-inline-start-color: var(--line); }
.line.here { background: var(--here); border-inline-start-color: var(--accent); }
.he { margin: 0; color: var(--daf-ink); font: 500 1.6rem/2.1 var(--hebrew); text-align: right; }
.w { padding: 0.04em 0.08em; transition: background 0.2s; }
.w.at { background: var(--accent); color: var(--accent-ink); border-radius: 4px; }
.en { margin: 6px 0 0; color: var(--muted); font: 400 1.02rem/1.6 var(--sans); }
.en b { color: var(--text); font-weight: 600; }
/* The English yad's word (app.js readAlong), marked as the Hebrew yad's is: a ring of the blue rather than padding, so the
   English doesn't shift as it moves */
.ew { transition: background 0.2s, box-shadow 0.2s; }
.ew.at { background: var(--accent); color: var(--accent-ink); border-radius: 3px; box-shadow: 0 0 0 0.12em var(--accent); }
.ew.at b { color: inherit; }
.notes { margin: 8px 0 0; }
.notes summary { width: fit-content; color: var(--muted); font: 600 0.74rem var(--sans); cursor: pointer; }
.note { margin: 10px 0 0; } /* every note keeps its spacing */
/* line by line: a Rashi, Tosfos, Biur Halacha or Shaar HaTziyun folded under its line (app.js renderLines, folded) */
.notes .note { padding: 0 0 0 12px; border-inline-start: 2px solid var(--line); }
.note-who { color: var(--muted); font: 600 0.7rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; }
.note-he { margin: 2px 0 0; color: var(--daf-ink); font: 500 1.08rem/1.85 var(--rashi); text-align: right; }
.note-he b { font-family: var(--hebrew); font-weight: 700; }
.source { max-width: 780px; margin: 28px auto 0; color: var(--muted); font: 500 0.74rem var(--sans); text-align: center; }

/* The amud three ways (body[data-text]): the page as printed in Vilna, line by line with the English, the 1886 print */
.views { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 18px; }
.views .chip { cursor: pointer; }
.views .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* Help with the words, after the views and wrapping as one: Words to know, Plain letters, and Rashi letters (a link) */
.views-help { display: flex; flex-wrap: wrap; justify-content: center; gap: inherit; margin-inline-start: 6px; }
.views .chip.link-chip { background: none; border-color: transparent; color: var(--accent-text); text-decoration: underline; text-underline-offset: 0.2em; }
body[data-text="page"] .lines-wrap { max-width: 880px; }
body[data-text="page"] #lines,
body[data-text="lines"] #page, body[data-text="lines"] #runner, body[data-text="lines"] #gloss,
body:not([data-text="scan"]) #scan,
body[data-text="scan"] #page, body[data-text="scan"] #lines, body[data-text="scan"] #runner, body[data-text="scan"] #gloss { display: none; }

/* The page as it's printed: the running head, then the Gemara with Rashi and Tosafot around it (vendor/daf-renderer.css
   shapes it). White paper and near-black ink; the Gemara in a heavy square letter on tight lines; Rashi and Tosafot
   small and dense, each opening with its words in square letters (Tosafot's bigger and heavier); narrow gutters.
   The weights sit on the spans, not on the columns: daf-renderer measures a column with the font shorthand, which
   resets the column's own weight, so only a weight on the spans is both drawn and measured. --daf-size is the
   Gemara's letter, set by layoutPage() in app.js. */
.runner { display: flex; align-items: baseline; gap: 0.8em; margin: 0 0 0.3em; padding: 0 0.15em; color: var(--daf-ink); font: 700 calc(var(--daf-size, 20px) * 1.3)/1.15 var(--hebrew); }
.runner .rh { display: flex; flex: 1; justify-content: space-around; gap: 0.6em; }
.runner .rh-daf { font-weight: 900; }
.daf-page { font-weight: 400; color: var(--daf-ink); }
.daf-page > div { position: relative; margin: 0 auto; }
.daf-page .seg { font-weight: 500; }
.daf-page .c { font-weight: 400; cursor: pointer; }
.daf-page .w { padding: 0; }
.daf-page .w.open { font-size: 1.6em; font-weight: 900; }
.daf-page .seg.here { background: var(--here); }
.daf-page b { font-weight: 700; }
.daf-page b.sq { font-family: var(--hebrew); font-size: 1.12em; font-weight: 750; }
.daf-page b.sq.tos { font-size: 1.3em; font-weight: 900; }
.daf-page .c.picked { background: var(--here); }
.daf-plain { display: grid; grid-template-columns: 27% 46% 27%; gap: 9px; }
.daf-plain .main { font: 400 1.2rem/1.2 var(--hebrew); text-align: justify; }
.daf-plain .side { font: 400 0.76rem/1.25 var(--rashi); text-align: justify; }
body[data-text="page"] .yad { width: 11px; height: 19px; }
/* The English of the line we're on, or of the Rashi or Tosafot I tapped: under the page on a phone; on a wide screen
   app.js moves it beside the page, under the chevrusa's card (see the end of the chevrusa's styles). The × puts it
   away; a long one scrolls inside, with the × staying on top. */
.gloss { position: sticky; bottom: 0; z-index: 2; max-width: 880px; max-height: 38dvh; margin: 18px auto 0; padding: 0 14px 12px 16px; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--lift); }
.gloss:empty { display: none; }
.gloss-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0 4px; background: var(--paper); }
.gloss .close { flex: none; width: 30px; height: 28px; padding: 0; font-size: 1.15rem; line-height: 1; }
.gloss-who { color: var(--muted); font: 600 0.7rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; }
.gloss-en { margin: 0; font: 400 1rem/1.55 var(--sans); }
.gloss-en b { font-weight: 600; }

/* The 1886 print itself */
.scan { margin: 0 auto; max-width: 880px; }
.scan img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--soft); }
.zoom-hint { display: none; } /* a phone's: tap to look closer */

/* The yad: a small hand on a rod, under the word being read. */
.yad { position: absolute; left: 0; top: 0; width: 15px; height: 25px; color: var(--text); pointer-events: none; transition: transform 0.25s ease; }
.yad svg { display: block; width: 100%; height: 100%; }

/* The chevrusa */
.talk { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; min-height: 0; }
.stage { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "orb info" "orb actions"; gap: 6px 16px; align-items: center; padding: 16px; }
.stage-info { grid-area: info; }
.stage-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 10px; }
.view-toggle { display: none !important; }
/* The chevrusa's personality on his card (app.js showPersonality): the word, and the style I have now beside it */
.tune svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tune-text { display: inline-flex; align-items: baseline; gap: 0.45em; }
.tune-now { color: var(--muted); font-weight: 500; }
.tune-now:not(:empty)::before { content: "·"; margin-inline-end: 0.45em; }
body[data-full="on"] #tune { display: none; }
/* The player (app.js, "The player"): back a line, pause / go on, on a line, together as on a recording */
.player { display: inline-flex; gap: 4px; }
.player[hidden] { display: none; }
.player .btn { width: 40px; padding-inline: 0; }
.player svg { flex: none; width: 15px; height: 15px; fill: currentColor; }
#pause .i-play, #pause[aria-pressed="true"] .i-pause { display: none; }
#pause[aria-pressed="true"] .i-play { display: block; }
#pause[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* How the chevrusa learns with me (app.js "The ways"; style.py WAYS): three small buttons by the mic and the chosen one's
   line under them; on a phone in a session only the chip, which opens Personality, where the ways are cards */
.way-pick { display: grid; gap: 4px; margin: 2px 0 4px; }
.way-pick[hidden], .way-chip[hidden], .way-turn[hidden] { display: none; }
.way-pick-title { color: var(--muted); font: 600 0.7rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; }
.way-options { display: flex; flex-wrap: wrap; gap: 4px; }
.way-option[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stage-info .way-line { margin: 0; max-width: 46ch; }
.way-chip-row { margin: 0; }
.way-chip { display: none; }
.player .way-turn { width: auto; padding-inline: 0.8em; }
#status { display: inline-block; margin: 0 0 4px; padding: 0.25em 0.75em; background: var(--hl); color: var(--accent-text); border-radius: var(--pill); font: 600 0.85rem/1.3 var(--sans); }
.stage-info .note { font-size: 0.85rem; }

#orb {
  grid-area: orb;
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 0;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 24px -10px rgb(31 95 214 / 0.7);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.12s, background 0.2s;
}
#orb:active { transform: scale(0.95); }
#orb svg { width: 36%; height: 36%; }
#orb::after { content: ""; position: absolute; inset: -9px; border: 2px solid var(--accent); border-radius: 50%; opacity: 0; pointer-events: none; }
body[data-state="connecting"] #orb::after,
body[data-state="initializing"] #orb::after { animation: pulse 1.6s ease-in-out infinite; }
body[data-state="listening"] #orb::after { opacity: 0.4; animation: breathe 3.2s ease-in-out infinite; }
body[data-state="thinking"] #orb::after { opacity: 0.9; border-style: dashed; animation: spin 3s linear infinite; }
body[data-state="speaking"] #orb::after { animation: speak 0.9s ease-in-out infinite; }
#orb .mic-off,
body[data-muted="true"] #orb .mic { display: none; }
body[data-muted="true"] #orb .mic-off { display: block; }
body[data-muted="true"] #orb { background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 1px var(--edge-strong); }
@keyframes pulse { 0%, 100% { opacity: 0.15; transform: scale(0.96); } 50% { opacity: 0.6; transform: scale(1.04); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes speak { 0%, 100% { opacity: 0.45; transform: scale(1); } 50% { opacity: 0.95; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  #orb::after { animation: none !important; }
  .yad { transition: none; }
  .art { transform: none !important; }
}

/* The chevrusa's face (app.js showFace), in a session that has one: a tile at the top of his card. Tapping it makes it
   bigger, or small again. */
.face { grid-area: face; display: block; justify-self: start; width: 100%; max-width: 300px; margin: 0 0 8px; padding: 0; overflow: hidden; background: #0b1220; border: 0; border-radius: var(--r); box-shadow: none; line-height: 0; cursor: zoom-in; }
.face[hidden] { display: none; }
.face[aria-pressed="true"] { max-width: none; cursor: zoom-out; }
.face video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
body[data-face="on"] .stage { grid-template-areas: "face face" "orb info" "orb actions"; }
/* The camera, for two who learn together (camera.js): my chaver's picture in a tile like the chevrusa's face, with my
   own small in its corner, as in a mirror; under it whose it is, Hide and Report. Tapping the tile makes it bigger. */
.cams { grid-area: cams; justify-self: start; width: 100%; max-width: 300px; margin: 0 0 8px; }
.cams[hidden], .cam[hidden], .cam-me[hidden], .cam-bar[hidden] { display: none; }
.cams:has(.cam[aria-pressed="true"]) { max-width: none; }
.cam-box { position: relative; line-height: 0; }
.cam { display: block; width: 100%; padding: 0; overflow: hidden; background: #0b1220; border: 0; border-radius: var(--r); box-shadow: none; line-height: 0; cursor: zoom-in; }
.cam[aria-pressed="true"] { cursor: zoom-out; }
.cam video, .cam-me video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cam-me { position: absolute; right: 8px; bottom: 8px; width: 30%; max-width: 110px; overflow: hidden; background: #0b1220; border: 2px solid var(--card); border-radius: 10px; }
.cam-me video { transform: scaleX(-1); }
.cams[data-alone="true"] .cam-me { position: static; width: 130px; max-width: none; box-shadow: var(--shadow); }
.cam-bar { margin: 6px 0 0; color: var(--text); line-height: 1.4; }
.cam-bar .link { margin-left: 0.7em; }
#camera[aria-pressed="true"] { background: var(--text); color: var(--card); border-color: var(--text); }
body[data-cams="on"] .stage { grid-template-areas: "cams cams" "orb info" "orb actions"; }
body[data-face="on"][data-cams="on"] .stage { grid-template-areas: "face face" "cams cams" "orb info" "orb actions"; }
/* A wide screen, while neither is tapped bigger: the chevrusa and my chaver side by side, in the one row */
@media (min-width: 900px) {
  body[data-face="on"][data-cams="on"]:not(:has(.face[aria-pressed="true"], .cam[aria-pressed="true"])) .stage { grid-template-areas: "face face" "orb info" "orb actions"; }
  body[data-face="on"][data-cams="on"]:not(:has(.face[aria-pressed="true"], .cam[aria-pressed="true"])) .face { width: calc(50% - 5px); }
  body[data-face="on"][data-cams="on"]:not(:has(.face[aria-pressed="true"], .cam[aria-pressed="true"])) .cams { grid-area: 1 / 1 / 2 / -1; justify-self: end; align-self: start; width: calc(50% - 5px); }
}

#transcript { display: flex; flex-direction: column; gap: 12px; min-height: 0; margin: 0; padding: 4px 8px 4px 2px; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
#transcript li { max-width: 92%; padding: 10px 14px; background: var(--soft); border-radius: 16px 16px 16px 4px; }
#transcript li:has(p:empty) { display: none; }
#transcript li.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 16px 16px 4px 16px; }
#transcript .who { display: block; margin-bottom: 2px; color: var(--muted); font: 600 0.68rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
#transcript li.me .who { color: rgb(255 255 255 / 0.8); }
#transcript p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#transcript .chevrusa p { font: 400 1.02rem/1.55 var(--sans); }
#type { display: flex; gap: 10px; }
#type input { flex: 1; min-width: 0; padding: 0.65em 0.85em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); }
/* A wide screen: the English sits in the open space under the chevrusa's card, above the conversation. Fixed rows, so
   the conversation keeps its row while the English is put away. */
@media (min-width: 900px) {
  .talk { grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .talk > .stage { grid-row: 1; }
  .talk > .gloss { grid-row: 2; position: static; max-width: none; max-height: 46vh; margin: 0; box-shadow: none; }
  #transcript { grid-row: 3; }
  #type { grid-row: 4; }
}

/* Sheets */
dialog { width: min(660px, calc(100vw - 24px)); max-height: min(86dvh, 900px); padding: 0; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-lg); box-shadow: var(--lift); }
dialog::backdrop { background: rgb(12 19 34 / 0.45); }
.sheet { padding: 18px 22px 24px; }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet h2 { margin: 0; color: var(--text); font: 700 1.3rem/1.3 var(--sans); letter-spacing: -0.015em; }
.sheet h3 { margin: 24px 0 10px; color: var(--muted); font: 700 0.78rem var(--sans); text-transform: uppercase; letter-spacing: 0.07em; }
.sheet .close { width: 36px; height: 34px; padding: 0; font-size: 1.3rem; }
/* Settings: four parts (Style, Voice, About me, Privacy) under a top that stays put as a part scrolls: the name, the
   parts, and whether it's saved. The sheet keeps one height, so the parts don't jump as I go between them. */
#settings { height: min(86dvh, 760px); scrollbar-gutter: stable; }
.settings-top { position: sticky; top: 0; z-index: 2; margin: -18px -22px 14px; padding: 18px 22px 8px; background: var(--paper); border-bottom: 1px solid var(--line); }
.settings-top .tabs { margin: 4px 0 8px; }
@media (max-width: 480px) { .settings-top .tabs { gap: 6px; } .settings-top .tabs .chip { flex: 1 1 auto; padding: 0.4em 0.5em; } } /* the four on one row of a phone */
.saved { min-height: 1.4em; font: 500 0.74rem/1.4 var(--sans); }
#settings .tab > h3:first-child, #settings .keep-box h3 { margin-top: 6px; }
.rows > :first-child, .keep-box .toggle-row { border-top: 0; padding-top: 2px; }
#settings .note + .rows { margin-top: 10px; }
/* A preset: its name and what it's like; the one I'm on is blue, with a tick */
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.preset { position: relative; display: grid; gap: 4px; align-content: start; padding: 12px 14px; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r); text-align: left; cursor: pointer; transition: background 0.12s, border-color 0.12s, transform 0.08s; }
.preset strong { font: 700 0.9rem/1.3 var(--sans); }
.preset span { color: var(--muted); font: 400 0.86rem/1.35 var(--sans); }
.preset[aria-pressed="true"] { background: var(--hl); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.preset[aria-pressed="true"] strong { padding-right: 1.3em; }
.preset[aria-pressed="true"]::after { content: "\2713"; position: absolute; top: 11px; right: 13px; color: var(--accent-text); font: 700 0.9rem/1.3 var(--sans); } /* in its corner, so a long name keeps its line */
.preset:active { transform: scale(0.98); }
@media (max-width: 560px) { .presets { grid-template-columns: 1fr; } }
/* A dial: its name and where it is ("4 of 5"), five blocks filled up to there (radio buttons: a tap sets it), what
   the two ends mean, and what that level tells the chevrusa */
.dial { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.dial-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dial-label { font: 600 0.9rem var(--sans); }
.dial-count { flex: none; color: var(--muted); font: 500 0.76rem var(--sans); }
.blocks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.blocks input { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 0; background: var(--field); border: 1px solid var(--edge-strong); border-radius: 10px; cursor: pointer; }
.blocks input.on { background: var(--accent); border-color: var(--accent); }
.blocks input:checked { box-shadow: 0 0 0 3px var(--hl); }
.ends { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font: 500 0.72rem var(--sans); }
.level { margin: 2px 0 0; padding-left: 10px; border-left: 3px solid var(--accent); font-size: 0.95rem; }
/* How long it waits: a slider in the site's look, with a knob big enough for a thumb */
.dial input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; background: none; cursor: pointer; }
.dial input[type="range"]::-webkit-slider-runnable-track { box-sizing: border-box; height: 6px; background: var(--edge-strong); border: 0; border-radius: 3px; }
.dial input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; box-sizing: border-box; width: 24px; height: 24px; margin-top: -9px; background: var(--accent); border: 3px solid #ffffff; border-radius: 50%; box-shadow: 0 1px 4px rgb(18 32 58 / 0.35); }
.dial input[type="range"]::-moz-range-track { box-sizing: border-box; height: 6px; background: var(--edge-strong); border: 0; border-radius: 3px; }
.dial input[type="range"]::-moz-range-thumb { box-sizing: border-box; width: 24px; height: 24px; background: var(--accent); border: 3px solid #ffffff; border-radius: 50%; box-shadow: 0 1px 4px rgb(18 32 58 / 0.35); }
/* A switch: the whole row is the button, its name and what it does on the left, on or off on the right */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle-text { display: grid; gap: 2px; }
.toggle-label { font: 600 0.9rem var(--sans); }
.toggle { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 50px; height: 30px; margin: 0; background: var(--edge-strong); border: 0; border-radius: var(--pill); cursor: pointer; transition: background 0.15s; }
.toggle::before { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #ffffff; border-radius: 50%; box-shadow: 0 1px 3px rgb(18 32 58 / 0.3); transition: transform 0.15s; }
.toggle:checked { background: var(--accent); }
.toggle:checked::before { transform: translateX(20px); }
/* End, with the chevrusa there: where am I stopping? */
.stop-choices { display: grid; gap: 12px; margin: 16px 0 6px; }
.stop-choices .btn { justify-content: flex-start; min-height: 52px; font-size: 0.95rem; }
.field { display: grid; gap: 4px; margin-top: 14px; font: 600 0.85rem var(--sans); }
.field textarea, .invite input, .invite textarea { width: 100%; padding: 0.65em 0.85em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 0.98rem var(--sans); resize: vertical; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 12px 6px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); text-align: center; }
.stat strong { display: block; font: 700 1.6rem/1.15 var(--sans); }
.stat span { color: var(--muted); font: 500 0.72rem var(--sans); }
.grids { margin-top: 14px; }
.masechta summary { margin: 10px 0; font: 700 0.95rem var(--sans); text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; }
.masechta[open] summary { margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.grid button { padding: 7px 0; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-xs); font: 600 0.82rem var(--sans); cursor: pointer; }
.grid .started { background: var(--hl); color: var(--accent-text); border-color: var(--hl); }
.grid .current { outline: 2px solid var(--accent); outline-offset: 1px; }
.history, .members { margin: 0; padding: 0; list-style: none; }
.history li, .members li { padding: 12px 0; border-top: 1px solid var(--line); }
.history .when { font: 600 0.8rem var(--sans); }
.history p { margin: 6px 0 0; white-space: pre-wrap; font-size: 0.95rem; }
.members li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.members .note { font-size: 0.8rem; }
.invite { display: flex; gap: 10px; margin-top: 12px; }
/* The owner's view: each session's numbers in one line, and what was marked "that was off" */
.history .metrics, .members .metrics { margin: 6px 0 0; color: var(--muted); font: 500 0.74rem/1.5 var(--sans); white-space: normal; }
.history .off, .members .off { margin: 4px 0 0; font: 600 0.78rem var(--sans); white-space: normal; }
.history .off::before, .members .off::before { content: "⚑ "; color: var(--muted); }
.off q { display: block; font: italic 400 0.92rem var(--sans); }
.members li:has(.numbers) { flex-wrap: wrap; }
.members .numbers { flex-basis: 100%; }
.members .numbers summary { font: 600 0.78rem var(--sans); cursor: pointer; }
.members .numbers .session { padding: 8px 0 0; }
.members .numbers .when { font: 600 0.76rem var(--sans); }

/* "That was off" on a chevrusa line: faint until you point at the line (always faint on a touch screen, where a long
   press opens it too) */
#transcript .flag { float: right; margin: -2px -6px 0 10px; padding: 2px 6px; background: none; color: var(--muted); border: 0; font: 500 0.66rem var(--sans); cursor: pointer; opacity: 0; }
#transcript li.chevrusa:hover .flag, #transcript .flag:focus-visible { opacity: 1; }
#transcript li.flagged .flag { opacity: 1; cursor: default; }
@media (hover: none) { #transcript .flag { opacity: 0.6; min-height: 32px; } }
.kinds { display: flex; flex-wrap: wrap; gap: 10px; }
.kinds .chip { min-height: 40px; padding: 0.5em 0.9em; cursor: pointer; }
/* Keeping the conversations: the notice by the mic (before a session only), the switch and the tips in Settings, and
   one session's conversation for the owner */
.keep-note { margin-top: 4px; }
body:not([data-state="idle"]) .keep-note { display: none; }
.link { padding: 0; background: none; color: var(--accent-text); border: 0; font: inherit; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.tips { margin: 8px 0 0; padding: 0; list-style: none; }
.tips li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.tips li.note { display: block; border-top: 0; padding: 0; }
.keep-box .check { margin-top: 4px; font-size: 0.95rem; }
.members .said, .history .said { margin-top: 6px; }
.conversation-lines { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.conversation-lines li { max-width: 92%; padding: 8px 12px; background: var(--soft); border-radius: 14px 14px 14px 4px; }
.conversation-lines li.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 14px 14px 4px 14px; }
.conversation-lines .who { display: flex; gap: 8px; color: var(--muted); font: 600 0.68rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.conversation-lines li.me .who { color: rgb(255 255 255 / 0.8); }
.conversation-lines p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 1rem/1.5 var(--sans); }
/* Chaverim: friends, their learning, and dedications. "Learning for…" sits by the mic before a session. */
.learning-for { margin-top: 4px; }
.learning-for:has(.link[hidden]) { display: none; }
body:not([data-state="idle"]) .learning-for { display: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.tabs .chip { min-height: 36px; padding: 0.4em 0.9em; cursor: pointer; }
.tabs .chip[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.feed { margin: 10px 0 0; padding: 0; list-style: none; }
.feed li { padding: 12px 0; border-top: 1px solid var(--line); }
.feed li.note { border-top: 0; padding: 0; }
/* Chat with a friend (Chaverim's Chat tab): the list, then one chat: theirs on the left, mine on the right */
.chat-row { min-width: 0; }
.chat-last { max-width: 44ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head { display: flex; align-items: center; gap: 12px; }
.chat-head h3 { margin: 0; color: var(--text); font: 700 1.08rem/1.3 var(--sans); text-transform: none; letter-spacing: -0.01em; }
.chat-log { display: flex; flex-direction: column; gap: 8px; height: min(44dvh, 420px); margin: 12px 0 0; padding: 12px; overflow-y: auto; list-style: none; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); }
.chat-log .note, .chat-earlier { align-self: center; margin: 0; }
.msg { align-self: flex-start; max-width: 82%; padding: 8px 12px; background: var(--soft); color: var(--text); border: 1px solid transparent; border-radius: 16px 16px 16px 4px; }
.msg.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 16px 16px 4px 16px; }
.msg.mine .msg-meta { color: rgb(255 255 255 / 0.8); }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { display: flex; justify-content: space-between; gap: 14px; margin-top: 4px; color: var(--muted); font: 500 0.68rem var(--sans); }
.msg-report { padding: 0; background: none; color: inherit; border: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.msg.sending { opacity: 0.6; } /* shown at once, until the moderator lets it through (app.js) */
.msg.unsent { border-style: dashed; border-color: currentColor; } /* stopped, with Edit to bring it back */
.chat-form textarea { max-height: 120px; resize: none; }
.moderation q { display: block; margin-top: 6px; font-size: 0.92rem; }
.feed .when { font: 600 0.8rem var(--sans); }
.feed .for { margin: 4px 0 0; font: italic 400 0.95rem var(--sans); }
.feed .yk { margin-top: 8px; }
.yk[aria-pressed="true"], .actions [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.profile { margin-bottom: 14px; }
.profile .field input, .dedication-form input, .dedication-form select { width: 100%; padding: 0.6em 0.8em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 0.98rem var(--sans); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.new-dedication { margin: 14px 0; }
.new-dedication summary { display: inline-block; list-style: none; cursor: pointer; }
.new-dedication summary::-webkit-details-marker { display: none; }
.dedication-form { display: grid; gap: 2px; padding: 4px 0 8px; }
.dedication-form .btn { justify-self: start; margin-top: 12px; }
.dedication-view { margin-top: 10px; padding-top: 4px; border-top: 1px solid var(--edge); }
.grid .taken { background: repeating-linear-gradient(135deg, var(--field), var(--field) 4px, var(--edge) 4px, var(--edge) 8px); color: var(--muted); cursor: default; }
.kinds .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#flag-send { margin-top: 14px; }

/* Words our own reading of the page doubted (vilna.py --doubtful): dotted underline, the note on hover and in the
   English below */
.doubt { text-decoration: underline dotted; text-decoration-color: var(--muted); text-decoration-thickness: 0.08em; text-underline-offset: 0.22em; cursor: help; }
.gloss-doubt { margin: 6px 0 0; color: var(--muted); font: 500 0.78rem/1.4 var(--sans); }

/* The chevrusa's star (app.js drawStar): a Rashi or Tosfos it wants me to read with it, blue, pulsing gently until I
   tap it, a little bigger under the pointer or the keyboard. Line by line it heads the comment, its notes open; on
   the page it floats just above the comment's first words, out of the text's flow, so daf-renderer's layout doesn't
   change (a siman's Biur Halacha box has room for it inside). */
.star { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.32em 0.7em; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--pill); box-shadow: 0 4px 12px -4px rgb(31 95 214 / 0.6); font: 600 0.74rem/1.1 var(--sans); white-space: nowrap; cursor: pointer; transition: scale 0.15s; }
.star.pulse { animation: star-pulse 1.8s ease-in-out infinite; }
.star:hover, .star:focus-visible { scale: 1.1; animation: none; }
@keyframes star-pulse { 0%, 100% { scale: 1; } 50% { scale: 1.12; } }
.note .star { display: flex; width: fit-content; margin: 2px 0 6px; }
.note.starred { border-inline-start-color: var(--accent); }
.daf-page .c > .star { position: absolute; z-index: 1; padding: 0.2em 0.5em; font-size: 0.68rem; translate: var(--star-x, 0px) calc(-100% - 2px); }
.daf-page .c > .star.compact { gap: 0; padding: 0.1em 0.35em; font-size: 0.95rem; }
.daf-page .c > .star.compact .star-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.daf-page .c > .star.compact::after { content: ""; position: absolute; inset: -12px -8px; } /* a finger's 44 px */
.daf-page .mb-note > .star { margin-inline-end: 0.4em; vertical-align: 0.1em; } /* a Shaar HaTziyun's, on its note */
.daf-page .mb-bh.c > .star { position: static; display: flex; width: fit-content; margin: 0 0 6px; translate: none; }
.daf-page .c.starred { background: var(--here); }
/* What the chevrusa is explaining in English (app.js markShown): a tint of its own on the page, a dashed frame line by
   line; the yad and the line I'm on stay as they are. */
.daf-page .seg.shown, .daf-page .c.shown, .daf-page .mb-sa.shown, .daf-page .mb-note.shown { background: var(--shown); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.line.shown { outline: 2px dashed var(--shown-line); outline-offset: -2px; }
.notes .note.shown { border-inline-start-color: var(--shown-line); background: var(--shown); }
@media (prefers-reduced-motion: reduce) {
  .star.pulse { animation: none; }
  .star { transition: none; }
}

/* Words to know (glossary.json; app.js showTerm, openWords): a thin solid blue underline under each, in both views,
   that takes no room (the page's layout stays as daf-renderer worked it out); a word that's doubted too has it blue
   and dotted. A tap shows what it means in a card by the word, which never covers the yad's word. */
.term { text-decoration: underline solid var(--term-line); text-decoration-thickness: 0.07em; text-underline-offset: 0.26em; cursor: pointer; }
.term:hover { text-decoration-thickness: 0.12em; }
.term.doubt { text-decoration-style: dotted; text-decoration-thickness: 0.1em; }
.term-card { position: absolute; z-index: 4; width: max-content; max-width: min(22rem, 100%); padding: 8px 8px 12px 14px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--lift); font: 400 0.95rem/1.45 var(--sans); }
.term-card .term-go { margin: 8px 0 0; } /* a word on another line: the yad goes there only from here */
.w.at.term { text-decoration-color: currentColor; } /* the blue line on the blue of the yad's word wouldn't show */
.term-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.term-head { margin: 4px 0 0; }
.term-head b { font: 600 0.84rem/1.3 var(--sans); }
.term-what { margin: 4px 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.term-card .close { flex: none; width: 28px; height: 26px; padding: 0; font-size: 1.1rem; line-height: 1; }
/* A drawing the chevrusa made (app.js openPicture): a card at the corner, beside the text, not over the page; tapped,
   large. The drawing keeps its white ground in the dark look, like the daf. Never saved by a long press (the iPhone app
   has no permission for Photos). */
.picture-card { position: fixed; inset: auto 16px 16px auto; width: min(420px, calc(100vw - 32px)); max-height: min(58dvh, 620px); margin: 0; padding: 0; overflow: auto; z-index: 40; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-sm); box-shadow: var(--lift); }
.picture-card.big, .picture-card.owner { inset: 16px auto auto 50%; transform: translateX(-50%); width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.picture-card:not(.big):not(.owner) img { max-height: 30dvh; object-fit: contain; } /* small in the corner: the session's buttons stay in sight */
.picture-card .sheet { padding: 10px 14px 12px; }
.picture-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.picture-card h2 { margin: 4px 0 8px; font: 600 1rem/1.35 var(--sans); }
.picture-card img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--edge); background: #ffffff; cursor: zoom-in; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.picture-card.big img { cursor: zoom-out; }
.picture-key { margin: 10px 0 4px; padding-left: 1.6em; font-size: 0.92rem; }
.picture-key li { margin: 2px 0; }
.picture-key .he { font: 500 1.05rem/1.3 var(--hebrew); }
.picture-thumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.picture-thumbs .note { margin: 0; }
@media (max-width: 760px) { .picture-card { inset: auto 8px 8px 8px; width: auto; max-height: 52dvh; } .picture-card.big, .picture-card.owner { inset: 8px; transform: none; width: auto; max-height: none; } }
/* The list: each word's Hebrew on the right (its other forms under it), how it's said and what it means, what it does */
.words { margin: 0; padding: 0; list-style: none; }
.words li { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(40%); gap: 0 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.word-he { grid-column: 2; grid-row: 1 / span 2; margin: 0; font: 600 1.3rem/1.35 var(--hebrew); text-align: right; }
.word-he span { display: block; }
.word-he .word-also { color: var(--muted); font-size: 0.72em; font-weight: 500; }
.word-say { grid-column: 1; grid-row: 1; margin: 0; }
.word-say b { font: 600 0.86rem var(--sans); }
.word-what { grid-column: 1; grid-row: 2; margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }

/* Plain letters (app.js): Rashi and Tosfos, and a siman's Rashi script, in the square letters */
body[data-plain="true"] { --rashi: var(--hebrew); }
/* The Rashi letters: each one large in Rashi script (whatever Plain letters says), its square letter, its name */
.rashi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.rashi-grid li { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; background: var(--daf-bg); color: var(--daf-ink); border: 1px solid var(--line); border-radius: 10px; }
.rashi-letter { font: 400 2.6rem/1.15 "Noto Rashi Hebrew", var(--hebrew); }
.square-letter { color: var(--muted); font: 500 1.3rem/1.2 var(--hebrew); }
.letter-name { font: 600 0.68rem/1.3 var(--sans); text-align: center; }

/* Signing in */
.center { max-width: 400px; margin: 16vh auto 0; padding: 0 16px; }
.center.card { display: grid; gap: 12px; padding: 26px; transform: none; }
.center.card h1 { justify-self: start; margin: 0 0 6px; font-size: 2.2rem; }
.center.card label { font: 600 0.85rem var(--sans); }
.center.card input { padding: 0.65em 0.85em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); }
#loading { display: table; margin: 30vh auto 0; color: var(--muted); }

/* A phone: the amud fills the screen, with the chevrusa in a bar under it; "Conversation" swaps them. The chevrusa's
   bar stays at the bottom in both, under the thumb, with the typing box above it. Whatever you tap is at least 44 px;
   whatever you type in is 16 px or more, or iOS Safari zooms in when you tap it; and on a phone on its side the notch
   keeps its room (env(safe-area-inset-*): the page is drawn edge to edge, viewport-fit=cover). */
@media (max-width: 899px) {
  #app { grid-template-columns: minmax(0, 1fr); } /* never wider than the screen, whatever the picker holds */
  .bar { gap: 8px; padding: 16px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); }
  .bar .brand { display: none; }
  .daf { min-width: 0; margin-inline-start: 0; }
  .daf .btn.small { flex: none; min-width: 44px; min-height: 44px; font-size: 1.1rem; }
  .daf .pick-open { flex: 0 1 auto; align-items: center; gap: 0.4em; min-height: 44px; padding-inline: 0.5em; font-size: 16px; } /* it gives way to the menu */
  .pick-open-more { display: none; }
  .menu { flex: none; }
  .menu summary { width: 44px; height: 44px; }
  .bar .learner { min-height: 44px; max-width: 28vw; padding-inline: 0.6em; }
  .seats select { min-height: 44px; font-size: 16px; }
  .menu-list .btn { min-height: 44px; }
  .menu-list a.signout { display: block; padding: 12px 2px; }
  .split { display: flex; flex-direction: column; gap: 0; padding: 0; }
  .text { flex: 1; padding: 14px max(12px, env(safe-area-inset-right)) 24px max(12px, env(safe-area-inset-left)); border: 0; border-radius: 0; box-shadow: none; touch-action: manipulation; }
  body[data-text="page"] .text { padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  .views { gap: 6px; margin-bottom: 14px; }
  .views .chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.6em; font-size: 0.8rem; }
  /* the help gets a row of its own, a little smaller so its three fit across a phone */
  .views-help { margin-inline-start: 0; }
  .views-help .chip { padding: 0 0.45em; font-size: 0.74rem; }
  .term-card .close { width: 44px; height: 44px; }
  .he { font-size: 1.45rem; }
  .notes { margin-top: 0; }
  .notes summary { padding: 14px 0; }
  .gloss-head { padding: 4px 0 2px; }
  .gloss .close { width: 44px; height: 44px; }
  /* The Vilna print: tap it to look closer (app.js), and move around it with a finger */
  .zoom-hint { display: block; margin: 0 0 8px; color: var(--muted); font: 500 0.74rem var(--sans); text-align: center; }
  .scan.zoomed { overflow-x: auto; overflow-y: hidden; }
  .scan.zoomed img { width: 300%; max-width: none; }
  .talk { flex: none; grid-template-rows: auto; gap: 10px; padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); background: var(--card); border-top: 1px solid var(--edge); }
  .stage { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "orb info actions"; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  /* his face floats over the corner of the amud, just above his bar (the bar is too slim to hold it); in the
     conversation it sits at the top */
  .talk { position: relative; }
  body[data-face="on"] .stage { grid-template-areas: "orb info actions"; }
  .face { position: absolute; z-index: 3; right: max(10px, env(safe-area-inset-right)); bottom: calc(100% + 10px); width: 42vw; max-width: 230px; margin: 0; box-shadow: var(--lift); }
  .face[aria-pressed="true"] { width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)); max-width: 520px; }
  body[data-view="talk"] .face { top: 10px; bottom: auto; }
  /* my chaver's picture floats over the other corner, the same way (camera.js); whichever is tapped bigger is on top */
  body[data-cams="on"] .stage, body[data-face="on"][data-cams="on"] .stage { grid-template-areas: "orb info actions"; }
  /* grid-area: auto, or its place would be reckoned from the bar's own grid (as the face's is, which hangs from the right) */
  .cams { grid-area: auto; position: absolute; z-index: 3; left: max(10px, env(safe-area-inset-left)); bottom: calc(100% + 10px); width: 42vw; max-width: 230px; margin: 0; }
  .cams:has(.cam[aria-pressed="true"]) { z-index: 4; width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)); max-width: 520px; }
  .face[aria-pressed="true"] { z-index: 4; }
  body[data-view="talk"] .cams { top: 10px; bottom: auto; }
  .cam, .cams[data-alone="true"] .cam-me { box-shadow: var(--lift); }
  .cams[data-alone="true"] .cam-me { width: 30vw; max-width: 130px; }
  .cam-bar { width: fit-content; max-width: 100%; margin: 4px 0 0; padding: 4px 10px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: 10px; box-shadow: var(--lift); font-size: 0.8rem; }
  .cam-bar .link { min-height: 28px; }
  /* With a chaver at the table the bar holds more buttons (Ask the chevrusa, Camera): they get a row of their own, or
     they squeeze what the bar says into a column a word wide */
  .stage:has(#ask:not([hidden])) { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "orb info" "actions actions"; row-gap: 8px; }
  .stage:has(#ask:not([hidden])) .stage-actions { justify-content: flex-start; }
  /* in a session the player needs the room too: the bar's buttons get a row of their own, the player first */
  .stage:has(#player:not([hidden])) { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "orb info" "actions actions"; row-gap: 8px; }
  .stage:has(#player:not([hidden])) .stage-actions { justify-content: flex-start; }
  .player .btn.small { width: 48px; }
  .player .btn.small.way-turn { width: auto; }
  /* the ways in a session: the chip alone, the bar is the player's */
  body:not([data-state="idle"]) .way-pick { display: none; }
  body:not([data-state="idle"]) .way-chip:not([hidden]) { display: inline; }
  .stage-actions { gap: 8px; justify-content: flex-end; }
  .stage-actions .btn.small { min-height: 44px; }
  #orb { width: 56px; height: 56px; box-shadow: 0 6px 16px -6px rgb(31 95 214 / 0.7); }
  #orb::after { inset: -6px; }
  .stage-info .note { font-size: 0.78rem; }
  .view-toggle { display: inline-flex !important; }
  /* his personality: the word alone, over "Conversation" (a column, so what the bar says keeps its width), while no
     session is on; in a session its buttons need the bar, and the menu has the personality */
  body[data-state="idle"] .stage-actions { flex-direction: column; align-items: stretch; }
  body:not([data-state="idle"]) #tune { display: none; }
  .tune-now { display: none; }
  #transcript, #type { display: none !important; }
  body[data-view="talk"] .text { display: none; }
  body[data-view="talk"] .talk { flex: 1; grid-template-rows: minmax(0, 1fr) auto auto; }
  body[data-view="talk"] #transcript { display: flex !important; grid-row: 1; }
  body[data-view="talk"] #type:not([hidden]) { display: flex !important; grid-row: 2; }
  body[data-view="talk"] .stage { grid-row: 3; padding-top: 10px; border-top: 1px solid var(--line); }
  #type .btn { min-width: 64px; }
  /* The sheets */
  .sheet .close { flex: none; width: 44px; height: 44px; }
  .presets .btn, .invite .btn, .members .btn, .tips .btn, .history .said, .feed .btn, .tabs .chip, .new-dedication summary, .dedication-form .btn { min-height: 44px; }
  .profile .field input, .dedication-form input, .dedication-form select { font-size: 16px; }
  .grid.siyum button { min-height: 44px; }
  .keep-note .link { min-height: 32px; }
  .members li { flex-wrap: wrap; }
  .dial input[type="range"] { height: 36px; margin: 0; }
  .blocks input { height: 44px; }
  .toggle-row { min-height: 56px; }
  .check { min-height: 44px; }
  .check input { flex: none; width: 22px; height: 22px; }
  .field textarea, .invite input { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .grid button { min-height: 44px; }
  .masechta summary { margin: 0; padding: 12px 0; }
}

/* A siman of the Mishnah Berurah (app.js layoutSiman, renderSimanLines). On its page, as the old print sets it: each
   se'if of the Shulchan Aruch in square letters, opening with its letter, the Rema's glosses in Rashi script; the
   Mishnah Berurah's notes under it in two columns of Rashi script (one on a phone), each opening with its number and
   its words in square letters; then the Biur Halacha in a box, which a tap opens in English. */
.mb-page { color: var(--daf-ink); }
.mb-seif { padding: 12px 0 16px; border-bottom: 1px solid var(--line); }
.mb-seif:last-child { border-bottom: 0; }
.mb-sa { margin: 0 0 10px; font: 500 1.32rem/1.75 var(--hebrew); text-align: justify; }
.mb-sa .mb-seif-n { font-size: 1.35em; font-weight: 900; }
.mb-sa .rema { font-family: var(--rashi); font-size: 0.86em; font-weight: 400; }
.mb-notes { column-count: 2; column-gap: 20px; column-rule: 1px solid var(--line); }
.mb-note { margin: 0 0 7px; font: 400 1.02rem/1.6 var(--rashi); text-align: justify; }
.mb-note .mb-n, .mb-note .w.dh { font-family: var(--hebrew); font-weight: 700; }
.mb-bh { margin: 12px 0 0; padding: 8px 12px; border: 1px solid var(--line); font: 400 0.98rem/1.6 var(--rashi); text-align: justify; cursor: pointer; }
.mb-bh .sq { font-family: var(--hebrew); font-weight: 700; }
.mb-bh-who { display: block; color: var(--muted); font: 700 0.86rem var(--hebrew); }
.daf-page .mb-sa.here, .daf-page .mb-note.here { background: var(--here); }
.daf-page .mb-sa.done, .daf-page .mb-note.done { box-shadow: inset -3px 0 0 var(--line); }
/* line by line: the se'if and each note, labelled */
.line-who { display: block; color: var(--muted); font: 600 0.7rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; }
.line.sa .he { font-weight: 600; }
.line.mb .he { font-size: 1.36rem; line-height: 1.95; }
.scan .scan-more { margin-top: 10px; }
@media (max-width: 899px) {
  .mb-notes { column-count: 1; }
  .mb-sa { font-size: 1.22rem; }
}
/* The narrowest phones (320 px): the views bar keeps to two rows, as from 360 px up */
@media (max-width: 359px) {
  .views .chip { padding: 0 0.4em; font-size: 0.7rem; }
  .views-help .chip { padding: 0 0.35em; font-size: 0.66rem; }
}

/* Masmid Central: the Masmid of the Week and of the Month, each on a card of the blue, and the standings */
.crowns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 18px; }
.crown { position: relative; padding: 22px 16px 18px; background: linear-gradient(150deg, #3a78ea, #1a4fb8); color: #ffffff; border-radius: var(--r); box-shadow: 0 14px 30px -18px rgb(31 95 214 / 0.8); text-align: center; }
.crown p { margin: 0; }
.crown .crown-he { color: rgb(255 255 255 / 0.92); font: 700 1.3rem/1.3 var(--hebrew); letter-spacing: 0.04em; }
.sheet .crown h3 { margin: 2px 0 10px; color: rgb(255 255 255 / 0.8); font: 600 0.68rem var(--sans); letter-spacing: 0.1em; }
.crown .crown-name { font: 700 1.35rem/1.2 var(--sans); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.crown .crown-what { margin-top: 5px; font: 500 0.76rem var(--sans); }
.crown .crown-when { margin-top: 2px; color: rgb(255 255 255 / 0.8); font: 500 0.72rem var(--sans); }
/* Masmid Central's motto, over the titles and the standings: kinas soifrim (Bava Basra 21a), a fine rule on each side */
.masmid-motto { margin: 22px 0 16px; text-align: center; }
.masmid-motto p { margin: 0; }
.masmid-motto .masmid-motto-he { display: flex; align-items: center; gap: 14px; color: var(--brand); font: 700 1.55rem/1.3 var(--hebrew); letter-spacing: 0.03em; }
.masmid-motto-he::before, .masmid-motto-he::after { content: ""; flex: 1; height: 1px; background: var(--edge); }
.masmid-motto .masmid-motto-say { margin-top: 3px; color: var(--text); font: 700 0.7rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.masmid-motto .masmid-motto-what { margin-top: 6px; color: var(--muted); font: 500 0.82rem/1.45 var(--sans); text-wrap: balance; }
/* Klal Yisrael's learning: everyone's time on iShtaig, added up, on a card of deep blue above the rest (masmid.js klalBox) */
.klal { margin: 14px 0 4px; padding: 20px 18px 16px; background: radial-gradient(120% 90% at 50% 0%, #2f6ee6 0%, #1a4aa8 55%, #12306f 100%); color: #ffffff; border-radius: var(--r); box-shadow: 0 16px 34px -18px rgb(18 48 111 / 0.85); text-align: center; }
.klal p { margin: 0; }
.klal .klal-he { color: var(--lamp); font: 700 1.3rem/1.3 var(--hebrew); letter-spacing: 0.04em; }
.sheet .klal h3 { margin: 2px 0 4px; color: rgb(255 255 255 / 0.8); font: 600 0.68rem var(--sans); letter-spacing: 0.1em; }
.klal .klal-big { margin-top: 2px; font: 800 clamp(2.4rem, 9vw, 3.4rem)/1.05 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.klal .klal-unit { font-size: 0.42em; font-weight: 700; letter-spacing: 0; }
.klal .klal-more { color: rgb(255 255 255 / 0.78); font-size: 0.32em; font-weight: 600; letter-spacing: 0; }
.klal .klal-sub { margin-top: 4px; color: rgb(255 255 255 / 0.85); font: 500 0.82rem var(--sans); }
.klal-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.klal .klal-tile { display: grid; gap: 2px; padding: 8px 6px; background: rgb(255 255 255 / 0.12); border-radius: var(--r-sm); }
.klal-tile small { color: rgb(255 255 255 / 0.78); font: 600 0.7rem var(--sans); letter-spacing: 0.04em; }
.klal-tile b { font: 700 0.95rem/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.klal .klal-what { margin-top: 12px; font: 600 0.84rem/1.4 var(--sans); }
.klal .klal-fine { margin-top: 4px; color: rgb(255 255 255 / 0.72); font: 500 0.74rem/1.4 var(--sans); }
@media (max-width: 380px) {
  .klal { padding: 16px 12px 14px; }
  .klal-tiles { gap: 6px; }
  .klal-tile b { font-size: 0.84rem; }
}
.board { margin: 8px 0 0; padding: 0; overflow: hidden; list-style: none; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); }
.board:empty { display: none; }
.board > li:first-child { border-top: 0; }
.board li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--line); }
.board li.me { background: var(--hl); }
.board li.note { display: block; padding: 0; border-top: 0; }
.board .rank { display: grid; place-items: center; width: 2.1em; height: 2.1em; background: var(--soft); color: var(--text); border-radius: 50%; font: 700 0.85rem var(--sans); }
.board li.first .rank { background: var(--accent); color: var(--accent-ink); }
.board .name { font-weight: 600; overflow-wrap: anywhere; }
.board .note { margin: 0; font-size: 0.8rem; }
.board .time { font: 700 0.95rem var(--sans); white-space: nowrap; }
.masmid-join .invite { margin-top: 10px; }
@media (max-width: 480px) {
  .crowns { grid-template-columns: 1fr; gap: 12px; }
  .crown { padding: 16px 14px 14px; }
}

/* Masmid Central's beis medrash (public/masmid.js), seen from above and drawn flat: a pale floor, the Shas on the
   mizrach wall, tables, and at each place a sefer, a lamp and a name. Nobody is drawn. A lamp is lit, and the sefer
   open, while that learner is learning. */
.bm-art { position: absolute; width: 0; height: 0; }
/* The shtetl (masmid.js; drawn into app/index.html by tools/shtetl_svg.py): Klal Yisrael's learning under a night sky,
   and at its foot the street to the beis medrash as you stand in it. Its layers shift a little with the pointer and
   the scroll (--mx, --sy from masmid.js), the nearer ones more: that is its depth. Nobody is drawn. */
.shtetl { --mx: 0; --sy: 0; position: relative; isolation: isolate; margin: 14px 0 4px; overflow: hidden; background: linear-gradient(180deg, #0b2159 0%, #163c93 48%, #2a64d4 100%); color: #ffffff; border-radius: var(--r); box-shadow: 0 22px 44px -22px rgb(11 33 89 / 0.9); }
.shtetl .klal { position: relative; z-index: 1; margin: 0; padding-bottom: 4px; background: none; border-radius: 0; box-shadow: none; }
.shtetl .klal .klal-tile { background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.shtetl-sky { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.shtetl-street { position: relative; z-index: 0; display: block; width: 100%; height: auto; aspect-ratio: 800 / 300; margin-top: -10px; overflow: visible; }
.shtetl-sky g, .shtetl-street g { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.shtetl-sky .sh-stars { transform: translate(calc(var(--mx) * 3px), calc(var(--sy) * -8px)); }
.shtetl-sky .sh-moon { transform: translate(calc(var(--mx) * 5px), calc(var(--sy) * -12px)); }
.shtetl-street .sh-far { transform: translateX(calc(var(--mx) * -2px)); }
.shtetl-street .sh-bm { transform: translateX(calc(var(--mx) * -3px)); }
.shtetl-street .sh-mid { transform: translate(calc(var(--mx) * -8px), calc(var(--sy) * 2px)); }
.shtetl-street .sh-near { transform: translate(calc(var(--mx) * -16px), calc(var(--sy) * 5px)); }
@keyframes sh-twinkle { 50% { opacity: 0.12; } }
@keyframes sh-smoke { from { transform: translateY(5px); opacity: 0; } 35% { opacity: 1; } to { transform: translateY(-12px); opacity: 0; } }
@keyframes sh-flicker { 0%, 100% { opacity: 1; } 45% { opacity: 0.8; } 60% { opacity: 0.94; } }
.sh-tw { animation: sh-twinkle 3.6s ease-in-out infinite; }
.sh-tw2 { animation-duration: 4.6s; animation-delay: -1.3s; }
.sh-tw3 { animation-duration: 5.4s; animation-delay: -2.6s; }
.sh-smoke { animation: sh-smoke 7s ease-in-out infinite; }
.sh-flame { animation: sh-flicker 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .sh-tw, .sh-smoke, .sh-flame { animation: none; }
  .shtetl-sky g, .shtetl-street g { transition: none; }
}
@media (max-width: 600px) { .shtetl-street { width: max(100%, 534px); margin: -8px 0 0 min(0px, 50% - 267px); } } /* a phone sees the middle of the street, 200px tall */
/* The shtetl by the learner's own clock (masmid.js sets data-sky from sun.js; the owner, 2026-11-23): the drawing is
   made for the night (tools/shtetl_svg.py), and by day its colours are taken over here by what they were drawn in.
   Daylight on the houses, the sun for the moon and stars, the lamps out and the houses' windows glass; the beis
   medrash's windows stay lit, its learning goes on by day too. At dawn and dusk, the night drawing under a sky with
   the light low on the horizon. */
.shtetl[data-sky="twilight"] { background: linear-gradient(180deg, #102766 0%, #2f3f8f 34%, #6f5a9e 56%, #d98a72 74%, #f2b77c 86%); }
.shtetl[data-sky="twilight"] .sh-stars { opacity: 0.35; }
.shtetl[data-sky="day"] { background: radial-gradient(circle at calc(100% - 46px) 38px, #fffdf2 0 14px, rgb(255 244 200 / 0.8) 17px, rgb(255 236 170 / 0.3) 40px, transparent 92px), linear-gradient(180deg, #72aaee 0%, #a6cbf6 50%, #dcecfd 78%); box-shadow: 0 22px 44px -22px rgb(40 90 170 / 0.55); }
.shtetl[data-sky="day"] :is(.sh-stars, .sh-moon) { display: none; }
.shtetl[data-sky="day"] .klal { color: #0b2159; }
.shtetl[data-sky="day"] .klal .klal-he { color: #17408f; }
.sheet .shtetl[data-sky="day"] .klal h3, .shtetl[data-sky="day"] .klal :is(.klal-sub, .klal-more, .klal-fine), .shtetl[data-sky="day"] .klal .klal-tile small { color: rgb(11 33 89 / 0.78); }
.shtetl[data-sky="day"] .klal .klal-tile { background: rgb(255 255 255 / 0.55); box-shadow: inset 0 0 0 1px rgb(11 33 89 / 0.08); }
.shtetl[data-sky="day"] .sh-far path { fill: #8db0e2; } /* the hills far off */
.shtetl[data-sky="day"] .sh-far polygon { fill: #7397d0; }
.shtetl[data-sky="day"] .sh-far rect { fill: #e4eefb; }
.shtetl[data-sky="day"] #sh-ground stop:first-child { stop-color: #a7bfe4; }
.shtetl[data-sky="day"] #sh-ground stop:last-child { stop-color: #87a2d1; }
.shtetl[data-sky="day"] #sh-street stop:nth-child(1) { stop-color: #edf3fc; }
.shtetl[data-sky="day"] #sh-street stop:nth-child(2) { stop-color: #d3dff2; }
.shtetl[data-sky="day"] #sh-street stop:nth-child(3) { stop-color: #b9cae7; }
.shtetl[data-sky="day"] .sh-ground [stroke="#ffffff"] { stroke: #0b2159; }
.shtetl[data-sky="day"] :is([fill="url(#sh-spill)"], [fill="url(#sh-dawn)"], [fill="url(#sh-halo)"]), .shtetl[data-sky="day"] :is(.sh-mid, .sh-near) [fill="#f5c84c"] { opacity: 0; } /* lamplight and its glow */
.shtetl[data-sky="day"] .sh-bm [fill="#0a2055"] { fill: #2b4785; }
.shtetl[data-sky="day"] .sh-bm [fill="#122f73"] { fill: #4f6dab; }
.shtetl[data-sky="day"] [fill="#0f2c6c"], .shtetl[data-sky="day"] [fill="#0a2054"] { fill: #2f4c88; } /* roofs and chimneys */
.shtetl[data-sky="day"] [fill="#163a84"] { fill: #6683bf; } /* walls */
.shtetl[data-sky="day"] [fill="#102c68"] { fill: #5d79b4; }
.shtetl[data-sky="day"] [stroke="#163a84"], .shtetl[data-sky="day"] [stroke="#102c68"] { stroke: #44619c; } /* window frames */
.shtetl[data-sky="day"] [fill="#081a45"] { fill: #3e5a93; } /* doors and dark windows */
.shtetl[data-sky="day"] :is(.sh-mid, .sh-near) [fill="url(#sh-win)"] { fill: #dbe7f8; } /* the houses' windows: glass */
.shtetl[data-sky="day"] [stroke="#06112e"] { stroke: #2b3d63; } /* lamp posts */
.shtetl[data-sky="day"] .sh-flame { fill: #eef3fb; animation: none; } /* their lamps out */
.shtetl[data-sky="day"] .sh-smoke { stroke: #6f84ad; }
.shtetl[data-sky="day"] .sh-near [fill="#071640"] { fill: #27427d; }
.shtetl[data-sky="day"] .sh-near [fill="#0b2052"] { fill: #536fac; }
.shtetl[data-sky="day"] .sh-near [stroke="#0b2052"] { stroke: #3a5590; }
.shtetl[data-sky="day"] .sh-near [fill="#061233"] { fill: #3a5590; }
/* A wide screen: the standings use its width. The street becomes a panorama (the drawing is fitted by its height, so the
   houses nearest you, past its sides, come into view), the numbers sit beside the big one, and the list goes beside
   my week, the motto and the titles. */
@media (min-width: 1100px) {
  dialog.place.masmid-wide .sheet { max-width: 1240px; }
  #masmid-standings:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); column-gap: 30px; align-items: start; }
  #masmid-standings > .note, #masmid-standings > .shtetl { grid-column: 1 / -1; }
  .masmid-list { padding-top: 14px; }
  .shtetl-street { height: 340px; aspect-ratio: auto; }
  .shtetl .klal { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; align-items: center; max-width: 940px; margin: 0 auto; padding-top: 24px; }
  .shtetl .klal .klal-he { grid-area: 1 / 1; }
  .sheet .shtetl .klal h3 { grid-area: 2 / 1; }
  .shtetl .klal .klal-big { grid-area: 3 / 1; }
  .shtetl .klal .klal-sub { grid-area: 4 / 1; }
  .shtetl .klal .klal-tiles { grid-area: 1 / 2 / 4 / 3; align-self: center; margin: 0; }
  .shtetl .klal .klal-what { grid-area: 4 / 2; margin: 0; }
  .shtetl .klal .klal-fine { grid-area: 5 / 1 / 6 / 3; margin-top: 8px; }
}
/* The two titles as two houses on either side of that street, each under its roof, turned a little toward each other */
.crowns { margin-top: 60px; perspective: 1100px; }
.crown { isolation: isolate; border-radius: 4px 4px var(--r) var(--r); }
.crown::before { content: ""; position: absolute; right: -9px; bottom: calc(100% - 1px); left: -9px; height: 46px; background: radial-gradient(circle at 50% 66%, #ffe9a8 0 3.5px, rgb(245 200 76 / 0.35) 4.5px, transparent 9px), linear-gradient(180deg, #0e2a6a, #1848ab); clip-path: polygon(50% 0, 100% 100%, 0 100%); } /* its roof, a light in the attic */
.crown::after { content: ""; position: absolute; right: 22%; bottom: calc(100% + 4px); z-index: -1; width: 16px; height: 32px; background: #0e2a6a; border-radius: 2px 2px 0 0; } /* and its chimney */
@media (min-width: 481px) {
  .crown:first-child { transform: rotateY(9deg); transform-origin: 0 50%; }
  .crown:last-child { transform: rotateY(-9deg); transform-origin: 100% 50%; }
}
@media (max-width: 480px) { .crowns { gap: 58px; } }
.bm {
  --floor: #e8f0fb; --tile: rgb(31 95 214 / 0.06); --wood-1: #f2e4ca; --wood-2: #e6d1ab; --wood-ink: #6d5836; --chair: #b3c3dc;
  --lamp-off: #c3ccda; --spot: rgb(18 32 58 / 0.24); --band: #f0d78c;
  position: relative; margin: 0 0 12px; padding: 22px 22px 20px; color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-lg);
  background:
    linear-gradient(var(--tile) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, var(--tile) 1px, transparent 1px) 0 0 / 30px 30px,
    var(--floor);
}
@media (prefers-color-scheme: dark) {
  .bm { --floor: #101b30; --tile: rgb(141 178 255 / 0.06); --wood-1: #4d3f2b; --wood-2: #3f3323; --wood-ink: #ead9b8; --chair: #34476e; --lamp-off: #46557a; --spot: rgb(255 255 255 / 0.25); }
}
.bm p { margin: 0; }
.bm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bm-he { color: var(--brand); font: 700 1.3rem/1.2 var(--hebrew); letter-spacing: 0.04em; white-space: nowrap; }
.bm-now { display: inline-flex; align-items: center; gap: 0.6em; color: var(--muted); font: 600 0.78rem/1.2 var(--sans); }
.bm-dot { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 2px var(--card), 0 0 10px 3px rgb(245 200 76 / 0.6); }
.bm-dot.is-off { background: #b9c4d6; box-shadow: 0 0 0 2px var(--card); }
.bm-mizrach { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.bm-shelf { display: flex; align-items: flex-end; height: 46px; padding: 4px 4px 6px; overflow: hidden; background: var(--card); border: 1px solid var(--edge); border-radius: 10px; box-shadow: inset 0 -5px 0 var(--wood-2); }
.bm-spine {
  --c: #2b4c8c;
  flex: 0 0 13px; height: 100%; margin-right: 1px; border-radius: 2px 2px 0 0; box-shadow: inset -2px 0 0 rgb(0 0 0 / 0.2);
  background: linear-gradient(to bottom, var(--c) 0 14%, var(--band) 14% 19%, var(--c) 19% 26%, var(--band) 26% 28%, var(--c) 28% 72%, var(--band) 72% 74%, var(--c) 74% 81%, var(--band) 81% 86%, var(--c) 86%);
}
.bm-shelf.is-mixed .bm-spine { --c: #2f5fa8; }
.bm-shelf.is-mixed .bm-spine:nth-child(9n + 4), .bm-shelf.is-mixed .bm-spine:nth-child(9n + 7) { --c: #3d6b55; }
.bm-shelf.is-mixed .bm-spine:nth-child(9n + 5) { --c: #7a3434; }
.bm-shelf.is-mixed .bm-spine:nth-child(9n + 6) { --c: #3b414e; }
.bm-shelf.is-mixed .bm-spine:nth-child(9n) { --c: #1f3a6e; }
.bm-shelf.is-mixed .bm-spine:nth-child(3n + 1) { flex-basis: 11px; height: 86%; }
.bm-shelf.is-mixed .bm-spine:nth-child(4n + 2) { flex-basis: 16px; height: 94%; }
.bm-shelf.is-mixed .bm-spine:nth-child(5n + 3) { flex-basis: 14px; height: 82%; }
.bm-plaque { padding: 0.08em 0.8em 0.14em; background: var(--card); color: var(--brand); border: 1px solid var(--edge); border-radius: var(--pill); box-shadow: 0 6px 16px -10px rgb(18 32 58 / 0.45); font: 700 1.3rem/1.35 var(--hebrew); letter-spacing: 0.06em; }
/* A table and the places at it. The chairs stand outside its edge. The places fill the table, so the chairs stay at
   its edge when the table beside it is taller. */
.bm-table {
  position: relative; display: flex; border: 1px solid rgb(18 32 58 / 0.08); border-radius: 14px; box-shadow: 0 12px 24px -18px rgb(18 32 58 / 0.55);
  background: repeating-linear-gradient(90deg, rgb(0 0 0 / 0.035) 0 2px, transparent 2px 26px), linear-gradient(180deg, var(--wood-1), var(--wood-2));
}
.bm-places { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: space-between; gap: 8px 6px; padding: 12px 8px; }
.bm-head { width: min(340px, 100%); margin: 40px auto 0; }
.bm-head .bm-places { display: flex; justify-content: space-evenly; }
.bm-head .bm-seat { flex: 0 1 150px; }
.bm-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 58px 24px; margin-top: 50px; }
.bm p.bm-table-name { grid-column: 1 / -1; color: var(--wood-ink); font: 700 0.6rem/1 var(--sans); letter-spacing: 0.16em; text-align: center; text-transform: uppercase; opacity: 0.85; }
.bm-seat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 8px 2px 6px; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.bm-seat[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -1px; background: rgb(31 95 214 / 0.1); }
.bm-seat::before { content: ""; position: absolute; left: 50%; width: 42px; height: 16px; margin-left: -21px; background: var(--chair); border: 0; }
.bm-seat.is-top::before { top: -30px; border-radius: 8px 8px 3px 3px; }
.bm-seat.is-bottom::before { bottom: -30px; border-radius: 3px 3px 8px 8px; }
.bm-book { position: relative; display: block; width: 68px; max-width: 100%; }
.bm-seat.is-honor .bm-book { width: 78px; }
.bm-sefer { display: block; width: 100%; height: auto; aspect-ratio: 72 / 48; }
.bm-lamp { position: absolute; top: -7px; right: -7px; width: 16px; height: 16px; border-radius: 50%; background: var(--lamp-off); border: 2px solid var(--card); }
.bm-seat.is-lit .bm-lamp { background: radial-gradient(circle at 40% 35%, #fffbe6, var(--lamp) 70%); box-shadow: 0 0 14px 6px rgb(245 200 76 / 0.65), 0 0 34px 16px rgb(245 200 76 / 0.28); animation: bm-glow 3.4s ease-in-out infinite; }
.bm-seat.is-lit::after { content: ""; position: absolute; inset: -8px -4px; background: radial-gradient(closest-side, rgb(255 226 140 / 0.3), transparent); pointer-events: none; }
@keyframes bm-glow { 50% { box-shadow: 0 0 17px 8px rgb(245 200 76 / 0.78), 0 0 46px 22px rgb(245 200 76 / 0.36); } }
@media (prefers-reduced-motion: reduce) { .bm-seat.is-lit .bm-lamp { animation: none; } }
.bm-seat.is-out .bm-book { filter: saturate(0.7) brightness(0.92); }
/* a long name takes a second line, not more, so no seat grows past its place */
.bm-name { position: relative; z-index: 1; display: -webkit-box; max-width: 100%; padding: 0.22em 0.5em; overflow: hidden; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: 7px; font: 600 0.66rem/1.25 var(--sans); text-align: center; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.bm-seat.is-me .bm-name { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bm-spot { display: block; width: 68px; max-width: 100%; aspect-ratio: 72 / 48; border: 2px dashed var(--spot); border-radius: 6px; }
.bm-seat.is-open .bm-name { background: none; color: var(--wood-ink); border: 1px dashed currentColor; }
.bm-keser { width: 38px; height: 26px; margin-bottom: -1px; filter: drop-shadow(0 1px 1px rgb(18 32 58 / 0.3)); }
.bm-title { color: var(--wood-ink); font: 700 0.56rem/1.2 var(--sans); letter-spacing: 0.09em; text-align: center; text-transform: uppercase; }
.bm p.bm-more { margin-top: 44px; color: var(--muted); font: 500 0.78rem/1.4 var(--sans); text-align: center; }
/* Whose seat I tapped: a name and time learned, never the amud */
.bm-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 14px; min-height: 70px; margin-top: 50px; padding: 12px 16px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: 0 12px 28px -20px rgb(18 32 58 / 0.55); }
.bm-more + .bm-card { margin-top: 14px; }
/* A seat's card, once tapped, stays on the screen along the bottom of the room (masmid.js pick): its buttons, the
   call and the camera among them, are never a scroll away under the tables. Its × closes it. */
.bm-card.is-open { position: sticky; bottom: 12px; z-index: 3; padding-right: 54px; box-shadow: 0 -6px 28px -8px rgb(18 32 58 / 0.45), 0 12px 28px -20px rgb(18 32 58 / 0.55); }
.bm-card .bm-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: none; color: var(--muted); border: 0; border-radius: 10px; font: 400 1.5rem/1 var(--sans); cursor: pointer; }
.bm-card .bm-close:hover, .bm-card .bm-close:focus-visible { background: var(--soft); color: var(--text); }
.bm-card .bm-hint { grid-column: 1 / -1; color: var(--muted); font-size: 0.92rem; }
.bm-card .bm-who { font: 700 1.12rem/1.25 var(--sans); overflow-wrap: anywhere; }
.bm-card .bm-who .chip { margin-left: 0.5em; padding: 0.15em 0.5em; background: var(--soft); color: var(--text); border-color: transparent; font-size: 0.64rem; vertical-align: 0.2em; }
.bm-card .bm-status { display: flex; align-items: center; gap: 0.6em; margin-top: 3px; font: 600 0.76rem/1.3 var(--sans); }
.bm-card .bm-week { text-align: right; font: 700 0.95rem/1.25 var(--sans); white-space: nowrap; }
.bm-card .bm-week small { display: block; color: var(--muted); font: 500 0.68rem/1.3 var(--sans); }
.bm-card .bm-won { grid-column: 1 / -1; margin-top: 6px; font: 600 0.74rem/1.3 var(--sans); }
.bm-card .bm-won b { padding: 0.1em 0.45em; background: var(--hl); color: var(--accent-text); border-radius: 6px; }
.bm-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 6px; color: var(--muted); font: 500 0.76rem/1.4 var(--sans); }
.bm-legend span { display: inline-flex; align-items: center; gap: 0.6em; }
@media (max-width: 600px) {
  .bm { padding: 20px 14px 18px; }
  .bm-tables { grid-template-columns: 1fr; }
  .bm-card { grid-template-columns: 1fr; }
  .bm-card .bm-week { margin-top: 4px; text-align: left; }
  .bm-card .bm-week small { display: inline; margin-right: 0.6em; }
}
/* Here without learning: a glass of tea on the table (and beside "Here now" in a card, and in the legend) */
.bm-tea { position: absolute; top: -14px; left: -10px; width: 17px; height: 21px; filter: drop-shadow(0 1px 1px rgb(18 32 58 / 0.3)); }
.bm-tea-mark { flex: none; width: 13px; height: 16px; }
.bm-card .bm-chat { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
/* Finding someone to learn with (public/meet.js). On a seat: its sign at the table for that, how many Shkoyachs it
   got today, and whether its learner asks to be chaverim. */
.bm-sign { position: relative; z-index: 1; max-width: 100%; padding: 0.22em 0.5em; background: var(--hl); color: var(--accent-text); border-radius: 6px; font: 700 0.56rem/1.25 var(--sans); text-align: center; overflow-wrap: anywhere; }
.bm-gap { display: block; }
.bm-shk, .bm-asks { position: absolute; z-index: 2; min-width: 17px; padding: 0 4px; border: 2px solid var(--card); border-radius: 9px; font: 700 0.56rem/1.45 var(--sans); text-align: center; }
.bm-shk { bottom: 4px; left: -13px; background: var(--accent); color: var(--accent-ink); }
.bm-asks { bottom: 4px; right: -22px; background: var(--badge); color: #ffffff; }
/* In a card: what's between us, the buttons, and the small print */
.bm-card p { margin: 0; }
.bm-card .bm-line { grid-column: 1 / -1; margin-top: 6px; font: 600 0.76rem/1.4 var(--sans); }
.bm-card .bm-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 10px; }
.bm-card .bm-acts .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); opacity: 1; }
.bm-card .bm-fine { grid-column: 1 / -1; margin-top: 8px; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.bm-card .bm-said:empty { display: none; }
.bm-card .bm-said { color: var(--text); font-weight: 600; }
/* The sign's form: what, and when */
.bm-form { grid-column: 1 / -1; margin-top: 4px; }
.bm-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 8px; }
.bm-card select, .week-box select { min-height: 36px; padding: 0.3em 0.5em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: 10px; font: 500 0.8rem var(--sans); }
.bm-when { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-when .chip { min-height: 36px; padding: 0.4em 0.85em; background: var(--field); color: var(--text); cursor: pointer; }
.bm-when .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bm-when .chip:disabled { opacity: 0.45; cursor: default; }
/* Masmid Central: a row of the standings opens its learner's card; my own week and the beis medrash's, above */
.board li { display: block; padding: 0; }
.board .row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; background: none; color: inherit; border: 0; font: inherit; text-align: left; cursor: pointer; }
.board .row[aria-expanded="true"] { box-shadow: inset 4px 0 0 var(--accent); }
.board li .bm-card { margin: 0 8px 14px; }
.weeks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 4px; }
.week-box { padding: 14px 16px 16px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); }
.week-box.is-shared { background: linear-gradient(150deg, #3a78ea, #1a4fb8); color: #ffffff; border-color: transparent; }
.week-box.is-shared .link { color: inherit; }
.week-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sheet .week-box h3 { margin: 0; font: 700 0.7rem var(--sans); letter-spacing: 0.1em; }
.week-box.is-shared h3 { color: rgb(255 255 255 / 0.8); }
.week-box .big { margin: 8px 0 0; font: 700 1.1rem/1.3 var(--sans); }
.week-box .note { margin: 6px 0 0; font-size: 0.84rem; }
.week-box .note:empty { display: none; }
.week-box .fine { font-size: 0.76rem; }
.week-box.is-shared .note { color: rgb(255 255 255 / 0.88); }
.goal-bar { height: 10px; margin-top: 10px; overflow: hidden; background: var(--edge); border-radius: var(--pill); }
.goal-bar i { display: block; height: 100%; background: var(--accent); border-radius: var(--pill); }
.goal-bar.is-full i { box-shadow: none; }
.week-box.is-shared .goal-bar { background: rgb(255 255 255 / 0.25); }
.week-box.is-shared .goal-bar i { background: #ffffff; }
@media (max-width: 600px) {
  .weeks { grid-template-columns: 1fr; }
  .bm-card select, .week-box select { font-size: 16px; } /* or a phone zooms in on it */
}
/* My lamp is dark: said where I'll see it, above the room */
.lamp-call { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; background: var(--hl); border-radius: var(--r-sm); font-size: 0.92rem; }
/* The chat's tab says when there's something new, as the door on the bar does */
.tabs .chip.has-new { background: var(--hl); color: var(--accent-text); border-color: var(--accent); }
.bar .door { position: relative; flex: none; width: 40px; height: 36px; padding: 0; background: var(--hl); color: var(--accent-text); border-color: transparent; }
.bar .door svg { width: 22px; height: 22px; }
/* its name beside the lamp, where the bar has room for it: on a phone the lamp alone */
.door-label { display: none; }
@media (min-width: 900px) {
  .bar .door { width: auto; padding: 0 0.75em; }
  .door-label { display: inline; font: 600 0.8rem/1 var(--sans); white-space: nowrap; }
}
/* The amud's chooser is as wide as its longest name (a siman's), which pushed the bar's buttons off a laptop's window
   even before the door: it gives way now, and its name is cut short instead. */
#app { grid-template-columns: minmax(0, 1fr); } /* as on a phone: never wider than the window, whatever the chooser holds */
.bar .daf { min-width: 0; }
.bar .daf .pick-open { min-width: 0; max-width: 100%; }
.door-new { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; background: var(--badge); color: #ffffff; border: 2px solid var(--card); border-radius: 11px; font: 700 0.66rem/1 var(--sans); }
/* A friend who's in, on the chat's list */
.chat-name .chip.in { margin-left: 0.6em; padding: 0.15em 0.45em; font-size: 0.64rem; vertical-align: 0.15em; }
.chat-name .chip.in.is-learning { background: var(--lamp-soft); color: var(--lamp-ink); border-color: transparent; }
.chat-ring { margin: 10px 0 2px; font-size: 0.9rem; }
/* Calls and messages with iShtaig closed (push.js), under the ring: a box of its own, offered until it's on */
.push-box { margin: 10px 0 14px; padding: 12px 16px 14px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); }
.push-box h3 { margin: 2px 0 6px; }
.push-box .note { margin: 0 0 8px; }
.push-box .rows { margin: 4px 0 8px; }
.push-box #push-note:empty { display: none; }
/* From the moderator, under the last message: Torah in every conversation */
.chat-log .chat-nudge { align-self: center; max-width: 92%; margin: 4px 0; padding: 6px 12px; background: var(--hl); color: var(--text); border-radius: 10px; font: 500 0.76rem/1.45 var(--sans); text-align: center; }
/* The board: divrei Torah, drawn as the Kotel (2026-11-21; board.js wall()). The wall is courses of Jerusalem stone with
   dark joints between them; each stone is the one stone picture shown from its own place, with a drafted margin round
   its face like the Herodian stones, and a tint of its own. Each post is a note of paper tucked into the crack over its
   stone: a course lies over the one below it (z-index from board.js), so the top of a note goes in under the stone above.
   Small folded notes sit in the other cracks. A note is paper in the dark theme too, only dimmer, the wall lit at night. */
.post-form textarea {
  display: block; width: 100%; min-height: 6.2em; margin-top: 10px; padding: 12px 16px 10px;
  background: repeating-linear-gradient(#fdfbf4 0 23px, #cfdcef 23px 24px) 0 12px / 100% 24px #fdfbf4;
  color: #1c2840; border: 1px solid #e3dac6; border-radius: 3px; box-shadow: 0 1px 2px rgb(60 45 20 / 0.12), 0 6px 14px -8px rgb(60 45 20 / 0.35);
  font: 400 0.98rem/24px var(--sans); resize: vertical;
}
.post-form textarea::placeholder { color: #8a8574; }
.post-send { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 4px; }

.kotel {
  display: grid; gap: 5px; margin: 14px 0 0; padding: 5px;
  background: linear-gradient(#2c241a, #3a3022); border-radius: var(--r);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.25);
}
.kotel-msg { margin: 14px 0 0; color: var(--muted); }
.kotel-course { position: relative; display: flex; gap: 5px; }
.kotel-stone {
  position: relative; flex: var(--g, 1) 1 0; min-width: 0; min-height: 72px; padding: 0 12px 18px;
  background: #ddd0ad url("/art/kotel-stone.webp") 0 0 / 1024px 1024px;
  box-shadow: inset 0 1px 0 rgb(255 250 232 / 0.4), inset 2px 0 3px rgb(255 250 232 / 0.14),
              inset 0 -3px 4px rgb(54 40 20 / 0.38), inset -3px 0 5px rgb(54 40 20 / 0.28);
}
/* the drafted margin: a flat band round the edge, the face (the boss) standing a little proud inside it */
.kotel-stone::before {
  content: ""; position: absolute; inset: 9px; border-radius: 3px; pointer-events: none;
  box-shadow: -1px -1px 0 rgb(255 250 232 / 0.32), 1px 1px 0 rgb(70 54 28 / 0.3), 0 0 0 9px rgb(120 100 64 / 0.1);
}
.kotel-stone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tint, transparent); mix-blend-mode: multiply; pointer-events: none; }
.kotel-course.is-top .kotel-stone { min-height: 34px; padding: 0; }
.kotel-course.is-top .kotel-stone::before { inset: 5px; box-shadow: -1px -1px 0 rgb(255 250 232 / 0.3), 1px 1px 0 rgb(70 54 28 / 0.28), 0 0 0 5px rgb(120 100 64 / 0.1); }
.kotel-course.is-base .kotel-stone { min-height: 84px; }
.kotel-stone.has-note { display: flex; flex-direction: column; align-items: center; }

/* a note: tucked in at the top, tilted, a shadow on the stone under it */
.kotel-note {
  position: relative; z-index: 1; width: var(--w, 88%); max-width: 440px; margin-top: -13px;
  transform: rotate(var(--rot, 0deg)); transform-origin: 50% 0;
  filter: drop-shadow(0 2px 2px rgb(40 28 10 / 0.3)) drop-shadow(0 9px 10px rgb(40 28 10 / 0.24));
}
.kotel-paper {
  --paper: #fbf8ef;
  position: relative; padding: 24px 16px 12px; color: #1c2840;
  background: linear-gradient(rgb(52 36 12 / 0.42), rgb(52 36 12 / 0) 24px),
              linear-gradient(rgb(0 0 0 / 0) calc(42% - 1px), rgb(80 60 30 / 0.07) 42%, rgb(255 255 255 / 0.55) calc(42% + 1px), rgb(0 0 0 / 0) calc(42% + 2px)),
              var(--paper);
}
.kotel-paper.is-lined {
  --paper: #fdfcf7;
  background: linear-gradient(rgb(52 36 12 / 0.42), rgb(52 36 12 / 0) 24px),
              linear-gradient(90deg, rgb(0 0 0 / 0) 26px, rgb(222 120 120 / 0.45) 26px 27px, rgb(0 0 0 / 0) 27px),
              repeating-linear-gradient(rgb(0 0 0 / 0) 0 23px, #cfdcef 23px 24px) 0 0 / 100% 24px,
              var(--paper);
  padding-left: 36px;
}
.kotel-paper.is-squared {
  --paper: #fbfbf8;
  background: linear-gradient(rgb(52 36 12 / 0.42), rgb(52 36 12 / 0) 24px),
              repeating-linear-gradient(90deg, rgb(0 0 0 / 0) 0 15px, #dbe3ee 15px 16px),
              repeating-linear-gradient(rgb(0 0 0 / 0) 0 15px, #dbe3ee 15px 16px),
              var(--paper);
}
.kotel-paper.is-yellow { --paper: #f8eeb4; }
.kotel-text {
  display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 7;
  font: 400 0.95rem/24px var(--sans); overflow-wrap: anywhere; white-space: pre-wrap;
}
.kotel-paper.is-open .kotel-text { display: block; -webkit-line-clamp: none; }
.kotel-paper.can-open { cursor: pointer; }
.kotel-paper.is-empty .kotel-text { color: #4c556a; }
.kotel-by { margin: 6px 0 0; color: #4c556a; font: 400 0.76rem/1.4 var(--sans); text-align: end; }
.kotel-by b { color: #1c2840; font-weight: 600; }
.kotel-acts { display: flex; justify-content: flex-end; gap: 14px; min-height: 1.2em; margin-top: 2px; color: #5d6478; font-size: 0.76rem; }
.kotel-acts .link { color: #1f4fae; }
.kotel-acts .kotel-more { margin-inline-end: auto; }

/* the small folded notes in the cracks: a slip folded in two, or rolled up tight */
.kotel-kv {
  position: absolute; z-index: 1; top: -9px; left: var(--x); width: var(--w); height: var(--h); border-radius: 1px 1px 2px 2px;
  background: linear-gradient(90deg, #f5f0e2 0 46%, #ddd5c2 50%, #faf6ec 54%);
  transform: rotate(var(--rot)); transform-origin: 50% 0;
  box-shadow: 0 2px 3px rgb(40 28 10 / 0.45), 1px 4px 6px rgb(40 28 10 / 0.2); pointer-events: none;
}
.kotel-stone.has-note .kotel-kv { z-index: 0; } /* beside a post they go in behind its note, never over its words */
.kotel-kv.is-rolled { border-radius: 3px; background: linear-gradient(90deg, #cfc6b0, #fbf7ec 40%, #e7dfcc 75%, #bdb39b); }
.kotel-kv.is-yellow { background: linear-gradient(90deg, #f4e7a1 0 46%, #dccd84 50%, #f8eeb4 54%); }
.kotel-kv.is-blue { background: linear-gradient(90deg, #e9eff8 0 46%, #cfd9e8 50%, #f1f5fb 54%); }

@media (prefers-color-scheme: dark) {
  /* the Kotel at night: the stone lit warm against the dark, the joints deeper */
  .kotel { background: linear-gradient(#120e09, #1d170f); }
  .kotel-stone { background-color: #9a8358; }
  .kotel-stone::after { background: linear-gradient(rgb(214 150 62 / 0.5), rgb(120 80 30 / 0.58)), var(--tint, transparent); }
  .kotel-paper, .kotel-kv { filter: brightness(0.84); }
  .post-form textarea { filter: brightness(0.9); }
}
@media (max-width: 660px) {
  .post-form textarea { font-size: 16px; }
  .kotel-stone { padding: 0 8px 14px; }
  .kotel-paper { padding: 22px 13px 10px; }
  .kotel-paper.is-lined { padding-left: 30px; background-position: 0 0, -4px 0, 0 0, 0 0; }
}

/* The plan (pay.js): where the account stands on paying, and the way to Stripe's page. Shown only once billing is on. */
#plan .plan-lead { margin: 4px 0 14px; font-size: 1.05rem; }
#plan .plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }
#plan label.plan-row { margin-top: 18px; font: 700 0.85rem var(--sans); }
#plan select { min-height: 40px; padding: 6px 10px; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: 10px; font: inherit; }
#plan .plan-problem:empty { display: none; }
#plan .plan-problem { color: var(--danger); }

/* Learning together (together.js): the invitation across the top, who is at the table, and the chaver's lines */
.together-ask { position: fixed; z-index: 40; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: min(560px, calc(100vw - 20px)); padding: 14px 16px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: 20px; box-shadow: var(--lift); }
.together-ask[hidden] { display: none; }
/* a call: it stands out as a ringing phone does, with room for the thumb on each answer */
.together-ask.call { padding: 16px; border-width: 2px; box-shadow: var(--lift); animation: call-ring 1.6s ease-in-out infinite; }
.together-ask.call p { flex-basis: 100%; font-size: 1.05rem; }
.together-ask.call .btn { flex: 1 1 auto; min-height: 44px; }
.together-ask .btn[hidden] { display: none; }
@keyframes call-ring { 0%, 100% { border-color: var(--edge); } 50% { border-color: var(--accent); } }
@media (prefers-reduced-motion: reduce) { .together-ask.call { animation: none; } }
/* who I'm calling, by the mic; and the two call buttons at the top of a chat */
.calling[hidden] { display: none; }
.calling .link { margin-left: 0.5em; font-weight: 600; }
.chat-head h3 { flex: 1; }
.chat-head .call { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; padding: 0.4em 0.6em; }
.chat-head .call[hidden] { display: none; }
.chat-head .call svg { width: 20px; height: 20px; }
.together-ask p { flex: 1 1 220px; margin: 0; font-weight: 600; }
/* The one-time offer of calls and messages with iShtaig closed (push.js): the call card's shape, without the ring */
.push-offer p { flex-basis: 100%; }
.push-offer .btn { flex: 1 1 auto; min-height: 44px; }
.table-note { color: var(--text); }
#ask[aria-pressed="true"] { background: var(--text); color: var(--card); border-color: var(--text); }
#transcript li.me.chaver { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--edge-strong); }
#transcript li.me.chaver .who { color: var(--muted); }

/* Getting around (places.js), set up like WhatsApp: five places on a bar that stays put, each a full screen. On a
   computer the bar is a row under the top one; on a phone it runs along the bottom. A place's panel (dialog.place,
   open without being modal) lies over the amud in the page's own grid, so both bars stay in reach. */
#app { grid-template-rows: auto auto minmax(0, 1fr); }
#app > .bar { grid-row: 1; }
#app > main { grid-row: 3; grid-column: 1; }
.places { grid-row: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 18px 12px; }
/* touch-action: a tap on a place is a tap at once; a phone doesn't wait to see whether a second one follows, to zoom */
.places a { position: relative; display: inline-flex; align-items: center; gap: 0.5em; padding: 0.55em 0.95em; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--pill); font: 600 0.8rem/1.1 var(--sans); text-decoration: none; touch-action: manipulation; transition: background 0.12s, color 0.12s; }
.places a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.places svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.places .short { display: none; }
.places a[hidden] { display: none; } /* Mail, where it isn't open */
.places-new { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; background: var(--badge); color: #ffffff; border: 2px solid var(--card); border-radius: 10px; font: 700 0.62rem/1 var(--sans); font-style: normal; }
/* a session is on, wherever I am */
#place-learn.is-live::after { content: ""; flex: none; width: 9px; height: 9px; background: #ffe27a; border-radius: 50%; box-shadow: 0 0 0 2px var(--card), 0 0 8px 3px rgb(245 200 76 / 0.75); }
dialog.place { position: relative; inset: auto; z-index: 4; grid-row: 3; grid-column: 1; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; overflow: auto; background: var(--bg); color: var(--text); border: 0; border-top: 1px solid var(--edge); border-radius: 0; box-shadow: none; }
dialog.place .sheet { max-width: 780px; margin: 0 auto; }
/* the amud's chooser belongs to Learn: out of the way elsewhere, its room kept so the bar doesn't jump */
body:not([data-place="learn"]) .bar .daf { visibility: hidden; }
@media (max-width: 899px) {
  #app { grid-template-rows: auto minmax(0, 1fr) auto; }
  #app > main, dialog.place { grid-row: 2; }
  .places { grid-row: 3; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; padding: 0 0 env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--edge); } /* five or six (Mail, where it's open) */
  .places a { flex-direction: column; gap: 3px; padding: 8px 2px 9px; background: none; color: var(--muted); border: 0; border-radius: 0; box-shadow: none; font-size: 0.6rem; text-align: center; }
  .places a[aria-current="page"] { background: none; color: var(--accent-text); }
  .places .long { display: none; }
  .places .short { display: inline; }
  .places .places-new { position: absolute; top: 2px; left: 50%; margin-left: 4px; }
  #place-learn.is-live::after { position: absolute; top: 6px; left: 50%; margin-left: 9px; }
  .together-ask { bottom: calc(64px + env(safe-area-inset-bottom)); } /* an invitation sits above the places' bar */
}

/* The night look along the bottom (look.js; the owner, 2026-11-23: "maybe at the botom or somewhere? and the ability
   to hide it after?"): a small row at the foot of the window on a computer, a strip just over the places' bar on a
   phone, in every place, until its x puts it away on this device (the menu keeps the switch). Never in a session,
   in a shiur, in full screen or with the keyboard up. */
#app { grid-template-rows: auto auto minmax(0, 1fr) auto; }
#app > .look-hint { grid-row: 4; grid-column: 1; }
.look-hint { display: flex; align-items: center; gap: 10px; justify-self: center; margin: 0 0 12px; padding: 4px 4px 4px 14px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--pill); box-shadow: 0 4px 14px rgb(13 40 110 / 0.08); font: 600 0.8rem/1.2 var(--sans); }
.look-hint > svg, .look-hint-menu { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.look-hint > svg { color: var(--muted); }
.look-hint-label { white-space: nowrap; }
.look-hint-chips { display: inline-flex; gap: 4px; }
.look-hint .chip { min-height: 32px; padding-inline: 0.8em; cursor: pointer; }
.look-hint .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.look-hint-away { flex: none; width: 32px; height: 32px; background: none; color: var(--muted); border: 0; border-radius: 50%; font: 400 1.3rem/1 var(--sans); cursor: pointer; }
.look-hint-said { display: none; align-items: center; gap: 0.4em; min-height: 32px; padding-inline-end: 10px; color: var(--muted); font-weight: 500; }
.look-hint.is-going > :not(.look-hint-said) { display: none; }
.look-hint.is-going > .look-hint-said { display: inline-flex; }
html[data-look-hint="away"] .look-hint, body:has(#place-learn.is-live) .look-hint, body.in-shiur .look-hint, body[data-full="on"] .look-hint, body.kb-open .look-hint { display: none; }
@media (pointer: coarse) {
  .look-hint .chip { min-height: 40px; min-width: 44px; }
  .look-hint-away { width: 44px; height: 44px; }
  .look-hint-said { min-height: 44px; }
}
@media (max-width: 899px) {
  #app { grid-template-rows: auto minmax(0, 1fr) auto auto; }
  #app > .look-hint { grid-row: 3; justify-self: stretch; justify-content: center; margin: 0; padding: 3px max(4px, env(safe-area-inset-right)) 3px max(12px, env(safe-area-inset-left)); border: 0; border-top: 1px solid var(--edge); border-radius: 0; box-shadow: none; }
  .places { grid-row: 4; }
  body:has(#chats-place[open] #chat-view:not([hidden])) .look-hint { display: none; } /* a chat open runs down to its box */
}
/* four looks on a narrow phone: the moon gives way and the chips sit closer */
@media (max-width: 374px) {
  #app > .look-hint { gap: 6px; padding-left: max(8px, env(safe-area-inset-left)); }
  .look-hint > svg { display: none; }
  .look-hint-chips { gap: 3px; }
  .look-hint .chip { min-width: 0; padding-inline: 0.6em; }
  .look-hint-away { width: 36px; }
  .menu-look { flex-wrap: wrap; }
  .menu-look .chip { min-width: 0; padding-inline: 0.6em; }
}

/* Chats, as a place: one row a chaver, the whole row to tap; and a chat open fills the screen down to the box */
#chats .chat-open { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: 100%; padding: 10px 2px; background: none; color: inherit; border: 0; font: inherit; text-align: start; cursor: pointer; }
#chats { padding: 0 14px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); }
#chats:empty { display: none; }
#chats li { padding: 0; border-top: 1px solid var(--line); }
#chats > li:first-child { border-top: 0; }
#chats li.note { padding: 12px 2px; }
.chat-mark { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; background: var(--soft); border-radius: 50%; }
.chat-mark i { width: 12px; height: 12px; background: #b9c4d6; border-radius: 50%; }
.chat-mark.is-learning i { background: var(--lamp); box-shadow: 0 0 9px 3px rgb(245 200 76 / 0.7); }
.chat-mark svg { width: 17px; height: 21px; }
#chats .chat-name { min-width: 0; overflow: hidden; font: 600 1.02rem/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.chat-when { color: var(--muted); font: 500 0.66rem/1.3 var(--sans); white-space: nowrap; }
#chats .chat-last { max-width: none; min-width: 0; font-size: 0.86rem; }
#chats .places-new { justify-self: end; } /* a row's count: a round badge at its end */
.chat-in { color: var(--muted); font: 600 0.62rem/1.3 var(--sans); white-space: nowrap; }
#chats-place .sheet { display: flex; flex-direction: column; min-height: 100%; }
#chats-place .chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#chats-place .chat-log { flex: 1; height: auto; min-height: 220px; }
/* One chat open, as in WhatsApp (2026-11-19/20, from Jason and the owner): on a phone, an iPad or a computer it fills
   Chats' panel, its own head (back, name, call) at the top, the messages scrolling in between and the box to write in
   at the foot, so it opens at the newest message with nothing to scroll; Chats' title steps aside while it's open,
   and on a phone (or an iPad held upright) the places bar too (Back brings them). With the keyboard up the whole app
   is as tall as what's left above it (app.js fitKeyboard), so the head and the box stay in sight. On a touch screen
   the box's letters are 16px (under that an iPhone zooms the page in as it's tapped, and can stay zoomed) and the
   head's buttons are a finger's size. */
#chats-place:has(#chat-view:not([hidden])) { overflow: hidden; }
#chats-place:has(#chat-view:not([hidden])) .sheet { height: 100%; min-height: 0; }
#chats-place:has(#chat-view:not([hidden])) .chats-head { display: none; }
#chats-place .chat-log { min-height: 0; }
#chats-place .chat-form { align-items: flex-end; }
@media (pointer: coarse) {
  .chat-form textarea { font-size: 16px; }
  .chat-head .btn, #chats-place .chat-form .btn { min-width: 44px; min-height: 44px; }
}
@media (max-width: 899px) {
  body:has(#chats-place[open] #chat-view:not([hidden])) .places { display: none; }
  #chats-place:has(#chat-view:not([hidden])) .sheet { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  body.kb-open #chats-place:has(#chat-view:not([hidden])) .sheet { padding-bottom: 8px; } /* the keyboard covers the home bar */
  #chats-place .chat-log { margin-top: 10px; }
  #chats-place .chat-form { margin-top: 10px; }
}
body.kb-open #app { height: var(--app-h, 100dvh); }

/* Changing what was sent (app.js, 2026-11-20): Unsend on mine for 2 minutes while it's unread, and Edit for 15; a
   message taken back leaves a quiet line in both chats; one that will disappear has a small clock by its time. */
.msg-when { display: inline-flex; align-items: center; gap: 4px; }
.msg-clock { display: inline-grid; }
.msg-clock svg { width: 11px; height: 11px; }
.msg-actions { display: inline-flex; align-items: center; gap: 12px; }
.msg.saving { opacity: 0.6; }
.msg.is-editing { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-log .msg-gone { align-self: center; margin: 2px 0; color: var(--muted); font: italic 500 0.76rem/1.4 var(--sans); }
.chat-editing { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 6px 6px 6px 12px; background: var(--soft); color: var(--text); border-left: 3px solid var(--accent); border-radius: var(--r-sm); font: 600 0.82rem var(--sans); }
.chat-editing[hidden] { display: none; }
#chats-place .chat-editing + .chat-form { margin-top: 6px; }
/* Disappearing messages: the head's clock, lit with its hours while it's on; above the messages, a chaver's asking
   to answer, mine while it waits, and the panel the clock opens */
.chat-head .chat-timer { display: inline-flex; gap: 3px; }
.chat-head .chat-timer b { font: 700 0.7rem var(--sans); }
.chat-head .chat-timer b:empty { display: none; }
.chat-head .chat-timer.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chat-vanish { display: grid; gap: 8px; margin-top: 10px; }
.chat-vanish[hidden] { display: none; }
.chat-vanish > div { padding: 10px 12px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-sm); }
.chat-vanish p { margin: 0; }
.chat-vanish-ask { border-left: 4px solid var(--accent) !important; }
.chat-vanish-ask p { font-weight: 600; }
.chat-vanish-ask p.note { margin-top: 6px; font-weight: 400; }
.chat-vanish-ask .actions { justify-content: flex-start; margin-top: 8px; }
.chat-vanish-mine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: 0.88rem; }
.chat-vanish-mine p { flex: 1 1 220px; }
.chat-vanish-panel { display: grid; gap: 10px; }
.chat-vanish-panel .chat-vanish-mine { padding: 0; border: 0; }
.chat-vanish-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-vanish-panel > .btn { justify-self: start; }
.chat-vanish-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.chat-vanish .note { color: var(--muted); font-size: 0.8rem; }
#chats .chat-last.is-asking { color: var(--accent-text, var(--accent)); font-weight: 600; }
@media (pointer: coarse) {
  .msg-actions .msg-report { padding: 8px 2px; margin: -8px 0; } /* Unsend and Edit: a finger's reach, the bubble no taller */
  .chat-vanish .btn, .chat-editing .btn { min-height: 40px; }
}

/* Choosing what to learn (picker.js): the sheet the bar's title opens. Its top (the question and the box to type in)
   stays put and the rest scrolls under it; on a phone it fills the screen. Every sefer we have stands on the shelf
   on a card of its own; a masechta opens to its dapim under their perakim, a daf to its
   two amudim; the Mishnah Berurah to its simanim under their halachos. Blue is what I've started. */
#pick[open] { display: flex; flex-direction: column; width: min(720px, calc(100vw - 24px)); height: min(88dvh, 820px); overflow: hidden; }
.pick { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-bottom: 0; }
.pick header { justify-content: flex-start; }
.pick header h2 { margin-inline-end: auto; }
.pick-search { flex: none; width: 100%; padding: 0.7em 0.9em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 1.02rem var(--sans); appearance: none; }
.pick-search::placeholder { color: var(--muted); }
.pick-body { flex: 1; min-height: 0; margin: 14px -22px 0; padding: 2px 22px 26px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.pick-body > h3:first-child, .pick-body > .pick-perek:first-of-type { margin-top: 14px; }
.pick-how { margin: 12px 0 0; font-size: 0.85rem; }
.pick-count { padding: 0.15em 0.55em; background: var(--hl); color: var(--accent-text); border-radius: var(--pill); font: 600 0.66rem/1.3 var(--sans); white-space: nowrap; }
/* Where I left off: a card each */
.pick-lately { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pick-go { display: grid; gap: 3px; padding: 12px 14px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); text-align: start; cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s, transform 0.08s; }
.pick-go b { font: 700 0.95rem/1.25 var(--sans); }
.pick-go span { color: var(--muted); font: 500 0.72rem/1.3 var(--sans); }
.pick-go.is-wide { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; width: 100%; margin-top: 14px; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pick-go.is-wide span { color: rgb(255 255 255 / 0.85); }
/* The shelf */
/* The shelf runs right to left, the way seforim stand and Hebrew reads: the first masechta at the top right
   (a tester's ask, 2026-11-22). Each card still reads left to right. */
.pick-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 16px 14px; direction: rtl; }
.pick-shelf > .pick-book { direction: ltr; }
.pick-book { position: relative; display: grid; align-content: center; justify-items: center; gap: 5px; min-height: 138px; padding: 20px 12px 16px; color: var(--text); background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); text-align: center; cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s, transform 0.08s; }
.pick-he { color: var(--brand); font: 700 1.55rem/1.15 var(--hebrew); letter-spacing: 0.03em; }
.pick-name { font: 600 0.84rem/1.25 var(--sans); }
.pick-range { color: var(--muted); font: 500 0.68rem/1.3 var(--sans); }
.pick-book .pick-count { margin-top: 3px; }
.pick-book.is-here::after { content: "You're here"; position: absolute; top: -10px; inset-inline-start: 10px; padding: 0.15em 0.65em; background: var(--accent); color: var(--accent-ink); border-radius: var(--pill); font: 700 0.6rem/1.4 var(--sans); }
/* A masechta: a perek's heading, its dapim, and under a daf I tapped its two amudim */
.pick-perek { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 22px 0 8px; }
.pick-perek h3 { margin: 0; }
.pick-perek-he { font: 700 1.2rem/1.2 var(--hebrew); }
.pick-perek .link { margin-inline-start: auto; color: var(--muted); font: 600 0.74rem var(--sans); }
.pick-dapim { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.pick-daf { min-height: 40px; padding: 0; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-xs); font: 600 0.86rem var(--sans); cursor: pointer; }
.pick-daf.a { background: linear-gradient(90deg, var(--hl) 50%, var(--field) 50%); } /* its first side started: the left half */
.pick-daf.b { background: linear-gradient(90deg, var(--field) 50%, var(--hl) 50%); }
.pick-daf.a.b { background: var(--hl); }
.pick-daf.is-here { outline: 2px solid var(--accent); outline-offset: 1px; }
.pick-daf[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pick-sides { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 2px 0 4px; padding: 12px 14px; background: var(--soft); border-radius: var(--r-sm); }
.pick-sides-he { margin-inline-end: auto; font: 700 1.25rem/1.2 var(--hebrew); }
.pick-side { flex: 1 1 120px; display: grid; grid-template-columns: auto auto; justify-content: center; align-items: baseline; gap: 3px 12px; min-height: 54px; padding: 0.5em 0.9em; background: var(--card); color: var(--text); }
.pick-side b { font: 700 1.2rem/1.2 var(--sans); }
.pick-side span { color: var(--muted); font: 700 1.2rem/1.2 var(--hebrew); }
.pick-side small { grid-column: 1 / -1; font: 500 0.68rem/1.2 var(--sans); }
.pick-side.is-started { background: var(--hl); }
.pick-side.is-here { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The Mishnah Berurah: a section, and its simanim one to a row */
.pick-section { border-top: 1px solid var(--line); }
.pick-how + .pick-section { margin-top: 12px; }
.pick-section summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 13px 2px; list-style: none; cursor: pointer; }
.pick-section summary::-webkit-details-marker { display: none; }
.pick-section summary::before { content: "▸"; flex: none; width: 0.9em; font: 700 0.9rem/1.3 var(--sans); } /* it opens */
.pick-section[open] summary::before { content: "▾"; }
.pick-section summary b { font: 700 0.92rem/1.3 var(--sans); }
.pick-section-he { font: 500 1.02rem/1.2 var(--hebrew); }
.pick-section-n { margin-inline-start: auto; color: var(--muted); font: 600 0.74rem var(--sans); white-space: nowrap; }
.pick-simanim, .pick-found { margin: 0; padding: 0; list-style: none; }
.pick-simanim { margin-bottom: 10px; }
.pick-siman { display: grid; grid-template-columns: 3.1em minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 8px 4px; background: none; color: inherit; border: 0; border-top: 1px solid var(--line); border-radius: 0; font: 400 0.98rem/1.4 var(--sans); text-align: start; cursor: pointer; }
.pick-siman .n { padding: 0.2em 0; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: 6px; font: 600 0.82rem/1.3 var(--sans); text-align: center; }
.pick-siman.is-started .n { background: var(--hl); color: var(--accent-text); border-color: var(--hl); }
.pick-siman.is-here { background: var(--here); }
/* What the typing found */
.pick-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; width: 100%; padding: 11px 8px; background: none; color: inherit; border: 0; border-top: 1px solid var(--line); border-radius: 0; font: inherit; text-align: start; cursor: pointer; }
.pick-found li:first-child .pick-result { border-top: 0; }
.pick-result b { font: 700 0.95rem/1.3 var(--sans); }
.pick-result i { color: var(--muted); font: 600 0.7rem/1.3 var(--sans); font-style: normal; white-space: nowrap; }
.pick-result i.is-started { padding: 0.1em 0.5em; background: var(--hl); color: var(--accent-text); border-radius: var(--pill); }
.pick-result span { grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; }
.pick-result.is-active { background: var(--here); box-shadow: inset 4px 0 0 var(--accent); }
.pick-none { margin: 18px 0 6px; font: 600 0.95rem var(--sans); }
@media (hover: hover) {
  .daf .pick-open:hover { background: var(--hover); border-color: color-mix(in srgb, var(--accent) 45%, var(--edge-strong)); }
  .pick-book:hover, .pick-go:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--edge)); box-shadow: 0 12px 26px -18px rgb(31 95 214 / 0.6); }
  .pick-daf:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .pick-siman:hover, .pick-result:hover { background: var(--hover); }
}
.pick-book:active, .pick-go:active { transform: scale(0.98); }
@media (max-width: 899px) {
  #pick[open] { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .pick { padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
  .pick header h2 { font-size: 1.05rem; }
  .pick header .btn { flex: none; min-height: 44px; }
  .pick-search { min-height: 46px; font-size: 16px; } /* or a phone zooms in on it */
  .pick-body { margin-inline: -14px; padding: 2px 14px calc(26px + env(safe-area-inset-bottom)); }
  /* typing on a phone: its keyboard lies over the bottom of the sheet, so what was found can be pushed up past it */
  .pick:has(.pick-search:focus) .pick-body { padding-bottom: 50dvh; }
  .pick-lately { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-go { min-height: 52px; }
  .pick-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .pick-dapim { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .pick-daf { min-height: 44px; }
  .pick-perek .link { min-height: 32px; }
  .pick-siman { min-height: 48px; }
  .pick-result { min-height: 52px; }
}

/* The mefarshim from the back of the volume (the Maharsha): not printed on the Vilna page, so marked on it (app.js
   markMefarshim): a small blue bead by the first letter of the words he quotes, or of the Rashi or Tosafot he is on,
   over the page and out of its flow, so the page keeps the print's shape. A tap opens his comments in the box. */
.daf-plain { position: relative; }
.mef-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.mef-mark { position: absolute; width: 9px; height: 9px; padding: 0; background: var(--accent); border: 1.5px solid var(--daf-bg); border-radius: 50%; cursor: pointer; pointer-events: auto; translate: 0 -35%; }
.mef-mark::after { content: ""; position: absolute; inset: -14px; } /* a finger's room */
.mef-mark.on { background: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.mef-mark.shown { box-shadow: 0 0 0 3px var(--shown-line); }
.mef-mark.starred { box-shadow: 0 0 0 2.5px var(--daf-bg), 0 0 0 4.5px var(--accent); }
.mef-dot { display: inline-block; flex: none; width: 0.62em; height: 0.62em; margin-inline-end: 0.5em; background: var(--accent); border: 0; border-radius: 50%; vertical-align: 0.02em; }
/* The box: when a mefaresh speaks on the line or comment open in it, its label becomes the first of a row of names */
.gloss-tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.gloss-tabs .chip { display: inline-flex; align-items: center; cursor: pointer; }
.gloss-tabs .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.gloss-tabs .chip[aria-pressed="true"] .mef-dot { background: #ffffff; }
.gloss-head:has(.gloss-tabs) { align-items: flex-start; padding: 10px 0 8px; }
.mef-piece > .star { display: flex; width: fit-content; margin: 2px 0 6px; }
.mef-piece + .mef-piece { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.mef-he { margin: 2px 0 8px; color: var(--daf-ink); font: 500 1.08rem/1.8 var(--rashi); text-align: justify; }
.mef-he b { font-family: var(--hebrew); font-weight: 700; }
.gloss:has(.mef-piece) { max-height: 46dvh; }
/* Line by line: his comments folded under the line, after Rashi and Tosafot's */
.notes.mef-notes > summary { color: var(--text); }
.notes .note.mef-note { border-inline-start-color: var(--accent); }
/* Under the page: all of them on the amud, by sefer */
.mef-foot { max-width: 880px; margin: 28px auto 0; padding: 16px 18px 10px; background: var(--bg); border: 1px solid var(--edge); border-radius: var(--r); }
body[data-text="scan"] .mef-foot { display: none; }
.mef-foot h2 { width: fit-content; margin: 0 0 8px; color: var(--text); font: 700 1.05rem/1.3 var(--sans); }
.mef-foot .note { margin: 0; }
.mef-foot h3 { display: flex; align-items: center; margin: 18px 0 2px; font: 700 0.86rem var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
.mef-list { margin: 0; padding: 0; list-style: none; }
.mef-list li + li { border-top: 1px solid var(--line); }
.mef-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 46px; padding: 6px 2px; background: none; color: var(--text); border: 0; text-align: start; cursor: pointer; }
.mef-where { flex: none; color: var(--muted); font: 600 0.72rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; }
.mef-dh { min-width: 0; font: 500 1.1rem/1.4 var(--hebrew); text-align: right; }
.mef-source { margin: 14px 0 4px; color: var(--muted); font: 500 0.72rem/1.5 var(--sans); }
#open-mef { align-items: center; }
@media (max-width: 899px) {
  #open-mef { display: none !important; } /* a phone's top rows are full; the list is under the page */
  .gloss-tabs .chip { min-height: 40px; padding: 0 0.7em; font-size: 0.8rem; }
}
@media (min-width: 900px) {
  .talk > .gloss:has(.mef-piece) { max-height: 56vh; }
}

/* Full screen (full.js; body[data-full="on"]): the amud big, the conversation under it, and nothing else. The bar,
   the places and the amud's own buttons (its views, the help with the words) are put away; what stays is the
   chevrusa's own (the mic, End) and the way back out. Its button is on the bar (a small phone has no room there: it's
   the menu's first line). These rules name what they move by id, so they hold whatever the face and the camera add. */
.full-open, .full-exit { flex: none; }
.full-open svg, .full-exit svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: square; }
.full-menu { display: none; }
body:not([data-place="learn"]) .bar .full-open { visibility: hidden; } /* it's Learn's, like the amud's chooser */
body[data-full="on"] #app > .bar, body[data-full="on"] #places, body[data-full="on"] #text > .views { display: none; }
/* בס״ד goes from the bar to the head of the page, and moves with it */
body[data-full="on"] > .bsd { display: none; }
body[data-full="on"] #text::before { content: "בס״ד"; display: block; margin: 0 0 4px; color: var(--muted); font: 500 0.75rem/1.3 var(--hebrew); direction: rtl; text-align: start; }
@media (min-width: 900px) {
  /* the amud across the screen, as wide as leaves about twenty of the Gemara's lines in sight (app.js pageMax) */
  body[data-full="on"] .split { display: flex; flex-direction: column; gap: 0; padding: 0; }
  body[data-full="on"] #text { flex: 1; min-height: 0; padding: 12px 24px 40px; border: 0; border-radius: 0; box-shadow: none; }
  body[data-full="on"][data-text="page"] .lines-wrap { max-width: clamp(880px, 125dvh, 1500px); }
  body[data-full="on"][data-text="scan"] .lines-wrap { max-width: clamp(880px, 125dvh, 1160px); } /* the print, no wider than it was scanned */
  body[data-full="on"] #scan { max-width: none; }
  /* line by line: the letters a third bigger */
  body[data-full="on"][data-text="lines"] .lines-wrap { max-width: 1040px; }
  body[data-full="on"] #lines .he { font-size: 2.1rem; }
  body[data-full="on"] #lines .line.mb .he { font-size: 1.8rem; }
  body[data-full="on"] #lines .en { font-size: 1.3rem; }
  body[data-full="on"] #lines .note-he { font-size: 1.4rem; }
  body[data-full="on"] #gloss .gloss-en { font-size: 1.06rem; }
  /* Under it, one strip, what was beside the page laid side by side: the chevrusa (its face and my chaver's picture
     by the mic), the conversation with the box to type in, and the way out. The English of the line we're on sits
     over the conversation; a wide window with no pictures in the strip has room for it beside the conversation
     instead (below), which keeps the strip low. (The English box is the page's: line by line has each line's English
     under it.) */
  body[data-full="on"] #talk { --stage-info: 300px; flex: none; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage log exit" "stage type exit"; gap: 8px 24px; align-items: start; padding: 12px max(18px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: var(--card); border-top: 1px solid var(--edge); }
  body[data-full="on"][data-state="idle"] #talk { --stage-info: 420px; } /* room for what it says before a session */
  body[data-full="on"][data-text="page"] #talk:has(> #gloss:not([hidden]):not(:empty)) { grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "stage gloss exit" "stage log exit" "stage type exit"; }
  body[data-full="on"][data-text="page"] #talk:has(> #gloss:not([hidden]):not(:empty)) > #transcript { max-height: clamp(64px, 10dvh, 110px); }
  body[data-full="on"] #talk > .stage { grid-area: stage; align-self: center; grid-template-columns: auto fit-content(var(--stage-info)); grid-template-areas: "orb info" "orb actions"; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  body[data-full="on"][data-face="on"] #talk > .stage, body[data-full="on"][data-cams="on"] #talk > .stage { grid-template-columns: auto auto fit-content(var(--stage-info)); }
  body[data-full="on"][data-face="on"] #talk > .stage { grid-template-areas: "face orb info" "face orb actions"; }
  body[data-full="on"][data-cams="on"] #talk > .stage { grid-template-areas: "cams orb info" "cams orb actions"; }
  body[data-full="on"][data-face="on"][data-cams="on"] #talk > .stage { grid-template-columns: auto auto auto fit-content(var(--stage-info)); grid-template-areas: "face cams orb info" "face cams orb actions"; }
  body[data-full="on"] #talk > #gloss { grid-area: gloss; max-height: clamp(96px, 15dvh, 160px); box-shadow: none; }
  body[data-full="on"] #talk > #gloss:has(.mef-piece) { max-height: clamp(180px, 40dvh, 440px); } /* a mefaresh's piece is long */
  body[data-full="on"] #face, body[data-full="on"] #cams { justify-self: start; align-self: center; width: clamp(170px, 17vw, 250px); max-width: none; margin: 0; }
  body[data-full="on"] #face { grid-area: face; }
  body[data-full="on"] #cams { grid-area: cams; }
  body[data-full="on"][data-face="on"][data-cams="on"] #face, body[data-full="on"][data-face="on"][data-cams="on"] #cams { width: clamp(150px, 12vw, 190px); } /* both: smaller, or the conversation has no room */
  body[data-full="on"][data-full] #face[aria-pressed="true"], body[data-full="on"][data-full] #cams:has(.cam[aria-pressed="true"]),
  body[data-full="on"][data-face="on"][data-cams="on"] #face[aria-pressed="true"], body[data-full="on"][data-face="on"][data-cams="on"] #cams:has(.cam[aria-pressed="true"]) { width: clamp(280px, 28vw, 440px); } /* tapped bigger */
  body[data-full="on"] #orb { width: 64px; height: 64px; box-shadow: 0 8px 18px -8px rgb(31 95 214 / 0.7); }
  body[data-full="on"] #orb::after { inset: -7px; }
  body[data-full="on"] #transcript { grid-area: log; max-height: clamp(84px, 18dvh, 200px); }
  body[data-full="on"] #transcript:empty { display: none; }
  body[data-full="on"] #type { grid-area: type; }
  body[data-full="on"] #full-exit { grid-area: exit; }
}
/* a wide window with no pictures in the strip: the English beside the conversation, or with no conversation yet in
   the middle by itself, so the strip stays low */
@media (min-width: 1200px) {
  body[data-full="on"][data-text="page"]:not([data-face="on"], [data-cams="on"]) #talk:has(> #gloss:not([hidden]):not(:empty)) { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage gloss log exit" "stage gloss type exit"; }
  body[data-full="on"][data-text="page"]:not([data-face="on"], [data-cams="on"]) #talk:has(> #gloss:not([hidden]):not(:empty)):has(> #transcript:empty) { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "stage gloss exit" "stage type exit"; }
  body[data-full="on"]:not([data-face="on"], [data-cams="on"]) #talk > #gloss { max-height: clamp(130px, 24dvh, 260px); }
  body[data-full="on"][data-text="page"]:not([data-face="on"], [data-cams="on"]) #talk:has(> #gloss:not([hidden]):not(:empty)) > #transcript { max-height: clamp(84px, 18dvh, 200px); }
  body[data-full="on"]:not([data-face="on"], [data-cams="on"]) #talk > #gloss:has(.mef-piece) { max-height: clamp(180px, 40dvh, 440px); }
}
/* a narrower window: less room for what the chevrusa says by the mic, and the way out is its sign alone */
@media (min-width: 900px) and (max-width: 1199px) {
  body[data-full="on"] #talk { --stage-info: 240px; }
  body[data-full="on"][data-state="idle"] #talk { --stage-info: 320px; }
  body[data-full="on"] #full-exit { width: 40px; height: 36px; padding: 0; }
  body[data-full="on"] #full-exit span { display: none; }
}
@media (max-width: 899px) {
  .bar .full-open { width: 44px; height: 44px; padding: 0; } /* the sign alone, a finger's size */
  .bar .full-open span { display: none; }
  /* A phone: the amud up to the top of the screen. Under it the chevrusa's bar, what it says over its buttons (a row
     each, so neither squeezes the other) and the way out at its end; and over the bar the newest of the conversation,
     a few lines that scroll. "Conversation" is put away with the rest: the conversation is here (app.js goes back to
     the amud on the way in). */
  body[data-full="on"] #text { padding-top: max(10px, env(safe-area-inset-top)); }
  body[data-full="on"] #talk { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "stage exit"; column-gap: 8px; }
  body[data-full="on"] #talk:has(> #transcript:not(:empty)) { grid-template-areas: "log log" "stage exit"; }
  body[data-full="on"] #talk > .stage { grid-area: stage; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "orb info" "orb actions"; row-gap: 6px; }
  body[data-full="on"] #talk .stage-actions { justify-content: flex-start; }
  body[data-full="on"] #view { display: none !important; }
  body[data-full="on"] #full-exit { grid-area: exit; align-self: center; width: 44px; height: 44px; padding: 0; }
  body[data-full="on"] #full-exit span { display: none; }
  body[data-full="on"] #transcript:not(:empty) { display: flex !important; grid-area: log; max-height: clamp(56px, 15dvh, 128px); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
}
/* between a phone and a computer (a tablet held upright): room for more of the conversation, and the box to type in */
@media (min-width: 600px) and (max-width: 899px) {
  body[data-full="on"] #talk:has(> #type:not([hidden])) { grid-template-areas: "log log" "type type" "stage exit"; }
  body[data-full="on"] #type:not([hidden]) { display: flex !important; grid-area: type; }
  body[data-full="on"] #transcript:not(:empty) { max-height: clamp(84px, 16dvh, 180px); }
}
@media (max-width: 599px) {
  .bar .full-open { display: none; }
  body[data-place="learn"] .full-menu { display: inline-flex; }
}

/* A chevrusa, not a rav (notice.js): what the chevrusa is and isn't. A sheet in the app, which each learner reads
   before their first session on a device and finds in the menu after; and a part of the front page, in the same
   words, on a sheet of paper that lies straight. */
.notice-text p { margin: 0 0 0.8em; }
.notice-text ul { margin: 0 0 0.9em; padding-inline-start: 1.2em; }
.notice-text li { margin: 0 0 0.6em; }
.notice-text > :last-child { margin-bottom: 0; }
#notice .notice-text { margin-top: 14px; }
/* its button stays in sight at the foot of the sheet, the words going by above it, however short the screen */
.notice-go { position: sticky; bottom: 0; margin: 14px -22px -24px; padding: 12px 22px 18px; background: var(--paper); border-top: 1px solid var(--line); }
.notice-go:has(#notice-start[hidden]) { display: none; }
/* Before you learn (consent.js): the same sheet of words, with "I agree" at its foot and the way out beside it */
dialog.consent { width: min(600px, calc(100vw - 24px)); }
.consent .notice-text { margin-top: 14px; }
.consent-go { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
@media (max-width: 899px) { #consent-yes { min-height: 48px; flex: 1 1 100%; } }
/* Delete my account (account.js): asked once more, the button that does it in red */
dialog.delete-account { width: min(520px, calc(100vw - 24px)); }
.delete-account .sheet > p { margin: 14px 0 0; }
.delete-account .check { margin-top: 16px; }
.delete-go { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.btn.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn.danger:disabled { opacity: 0.45; }
:root[data-look="paper"] .btn.danger { filter: grayscale(1); }
#settings .keep-box + .keep-box { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
#settings #blocked-list { margin-top: 8px; }
#delete-open { margin-top: 10px; }
.shiur-block { color: var(--muted); }
.honest { position: relative; max-width: 1100px; margin: 0 auto; padding: 72px max(24px, env(safe-area-inset-right)) 72px max(24px, env(safe-area-inset-left)); }
.honest .card { max-width: 720px; margin-left: 0; transform: none; }
/* Who's behind it (front page, 2026-11-24): the people, each with a face, and the way to the About page */
.behind { position: relative; max-width: 1100px; margin: 0 auto; padding: 72px max(24px, env(safe-area-inset-right)) 72px max(24px, env(safe-area-inset-left)); }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; max-width: 760px; margin: 40px 0 0; }
.behind .person { max-width: none; margin: 0; padding: 24px 26px; transform: none; }
.behind .person:only-child { max-width: 440px; }
.person-face { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 0 14px; border-radius: 50%; object-fit: cover; box-shadow: var(--lift); }
.person-initials { background: var(--lamp-soft); color: var(--lamp-ink); border: 3px solid var(--lamp); box-shadow: none; font: 600 1.8rem/1 var(--sans); }
.person-unseen { background: transparent; border: 2px dashed color-mix(in srgb, var(--muted) 55%, transparent); box-shadow: none; }
.person-quote span { display: block; color: var(--text); font: 500 1.3rem/1.5 var(--hebrew); }
.person-quote small { display: block; margin-top: 6px; color: var(--muted); font: 400 0.85rem/1.45 var(--sans); }
.person h3 { margin: 0; font: 700 1.12rem/1.3 var(--sans); }
.behind .person-role { margin: 2px 0 10px; color: var(--muted); font: 500 0.85rem/1.4 var(--sans); }
.behind-more { margin: 26px 0 0; }
@media (max-width: 899px) { #notice-start { min-height: 48px; width: 100%; } }

/* Adding a chaver (2026-11-17): Chats' own button at its top, as a phone's new chat; requests to answer above the
   list and mine waiting below it; the add screen in place of the list, with the invite for someone not here yet. */
.chats-head .add-chaver { display: inline-flex; align-items: center; gap: 0.45em; }
.chats-head .add-chaver svg { width: 18px; height: 18px; flex: none; }
.chats-head .add-chaver[hidden], .is-adding .chats-head .add-chaver { display: none; }
.chat-asks:empty, #chat-list-note:empty { display: none; }
.chat-asks li { padding: 12px 14px; margin-bottom: 8px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-left: 4px solid var(--accent); border-radius: var(--r-sm); }
.chat-asks li > div:first-child > div:first-child { font: 600 1.02rem/1.3 var(--sans); }
.chat-asks .note { color: var(--muted); }
.chat-sent { margin-top: 18px; }
.chat-sent h3 { margin: 0 0 4px; font: 600 0.8rem var(--sans); color: var(--muted); }
.chat-start { display: block !important; padding: 22px 0 16px !important; text-align: left; }
.chat-start-title { margin: 0 0 6px; font: 600 1.15rem/1.3 var(--sans); }
.chat-start .note { margin: 0 0 14px; max-width: 46ch; }
.chat-rules { margin-top: 18px; }

/* iShtaig's rebbe (rebbe.js, 2026-11-22): his card at the top of Chats, warm as a lit lamp; his page in the list's
   place; his chat's note and how many more before he answers; for him, Questions above his chats. His picture is his
   initials in a gold ring until he approves a photo. */
.rebbe-card { margin: 0 0 12px; padding: 14px 16px; background: color-mix(in srgb, var(--lamp-soft) 55%, var(--card)); color: var(--text); border: 1px solid color-mix(in srgb, var(--lamp) 55%, var(--edge)); border-radius: var(--r); }
.rebbe-card[hidden] { display: none; }
.rebbe-card.is-questions { padding: 12px 14px 4px; background: var(--card); border-color: var(--edge); }
.rebbe-kicker { margin: 0 0 8px; color: var(--lamp-ink); font: 600 0.72rem/1.2 var(--sans); letter-spacing: 0.02em; }
.rebbe-who { display: flex; align-items: center; gap: 12px; }
.rebbe-words { display: grid; min-width: 0; flex: 1; }
.rebbe-name { font: 600 1.04rem/1.3 var(--sans); }
.rebbe-line { color: var(--muted); font: 400 0.84rem/1.35 var(--sans); }
.rebbe-face { display: grid; place-items: center; flex: none; background: var(--lamp-soft); color: var(--lamp-ink); border: 2px solid var(--lamp); border-radius: 50%; font: 600 1rem/1 var(--sans); object-fit: cover; }
.rebbe-face.is-card { width: 48px; height: 48px; }
.rebbe-face.is-big { width: 92px; height: 92px; margin: 0 auto; border-width: 3px; font-size: 1.7rem; }
.rebbe-face.is-small { width: 26px; height: 26px; border-width: 1.5px; font-size: 0.62rem; }
.rebbe-last { margin: 10px 0 0; color: var(--muted); font: 400 0.86rem/1.4 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rebbe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rebbe-card .rebbe-q-title { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; color: var(--text); font: 600 1rem/1.3 var(--sans); letter-spacing: normal; text-transform: none; }
.rebbe-q-title .places-new { position: static; }
.rebbe-card.is-questions > .note { margin: 0 0 4px; font-size: 0.84rem; }
.rebbe-questions { margin: 0; padding: 0; list-style: none; }
.rebbe-questions li { border-top: 1px solid var(--line); }
.rebbe-questions .chat-open { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: 100%; padding: 10px 2px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; }
.rebbe-questions .chat-name { font: 600 1.02rem/1.3 var(--sans); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rebbe-questions .chat-last { grid-column: 2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rebbe-questions .places-new { position: static; grid-column: 3; grid-row: 2; justify-self: end; }
.chat-mark.rebbe-initial { color: var(--accent-text); font: 600 0.92rem/1 var(--sans); }
#chats-place.is-about .chats-head .add-chaver, #chats-place.is-about .place-seg { display: none; }
.rebbe-page { display: grid; gap: 14px; max-width: 520px; padding-bottom: 8px; }
.rebbe-page-head { text-align: center; }
#rebbe-page .rebbe-page-name { margin: 12px 0 2px; color: var(--text); font: 600 1.3rem/1.25 var(--sans); letter-spacing: normal; text-transform: none; }
.rebbe-page-head .rebbe-kicker { margin: 0; }
.rebbe-about-line { margin: 8px auto 0; max-width: 38ch; color: var(--muted); }
.rebbe-summary { display: grid; gap: 10px; padding: 14px 16px; background: var(--card); border: 1px solid var(--edge); border-radius: 14px; line-height: 1.55; }
.rebbe-summary p { margin: 0; }
.rebbe-page-go { display: grid; gap: 6px; margin-top: 6px; }
.rebbe-page-go .btn { justify-self: stretch; }
.rebbe-page-go .note { margin: 0; text-align: center; font-size: 0.84rem; }
.chat-rebbe { margin: 10px 0 0; padding: 10px 14px; background: color-mix(in srgb, var(--lamp-soft) 55%, var(--card)); color: var(--lamp-ink); border: 1px solid color-mix(in srgb, var(--lamp) 50%, var(--edge)); border-radius: var(--r-sm); font: 400 0.88rem/1.45 var(--sans); }
.chat-rebbe[hidden] { display: none; }
.chat-rebbe p { margin: 0; }
.chat-rebbe-who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 0.8rem; }
.chat-rebbe.is-asker { color: var(--text); background: var(--card); border-color: var(--edge); }
.chat-rebbe .rebbe-actions { margin-top: 8px; }
.chat-left { margin: 6px 0 0; text-align: center; font-size: 0.8rem; }
.chat-left.is-waiting { color: var(--lamp-ink); }
.notice-rebbe { margin: 4px 0 12px; padding: 10px 14px; background: color-mix(in srgb, var(--lamp-soft) 55%, var(--card)); border: 1px solid color-mix(in srgb, var(--lamp) 50%, var(--edge)); border-radius: var(--r-sm); }
.notice-rebbe[hidden] { display: none; }
.notice-rebbe-go { padding: 0; background: none; border: 0; color: var(--accent-text); font: 600 1em var(--sans); text-decoration: underline; cursor: pointer; }
.chat-add .chat-head { margin-bottom: 6px; }
.chat-add-form { display: grid; gap: 12px; max-width: 460px; }
.chat-add-form input { width: 100%; padding: 0.65em 0.85em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 1rem var(--sans); }
.chat-add-form .btn { justify-self: start; }
.chat-add > .note { max-width: 52ch; }
#chat-add-note:empty { display: none; }
.chat-invite { margin-top: 14px; max-width: 520px; padding: 14px 16px 16px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); }
.chat-invite p { margin: 0 0 10px; }
.chat-invite .actions { justify-content: flex-start; }
.chat-invite .btn[hidden] { display: none; }
@media (max-width: 760px) {
  .chat-add-form input { font-size: 16px; } /* no zoom on an iPhone */
  .chat-add-form .btn, .chat-invite .btn, .chat-start .btn { min-height: 44px; }
}

/* Pricing (2026-11-18, monetization) */
.price h2 { margin: 0; font: 700 clamp(1.6rem, 4vw, 2.6rem)/1.2 var(--sans); letter-spacing: -0.03em; }
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 30px 0 0; }
.price-cards .card { padding: 22px 24px 24px; border-radius: var(--r); }
.price-cards .tag { margin: 0; }
.price-cards .amount { margin: 12px 0 8px; font: 500 1.05rem/1.4 var(--sans); }
.price-cards .amount strong { display: block; font: 700 clamp(2rem, 5vw, 2.6rem)/1.1 var(--sans); letter-spacing: -0.03em; }
.price-cards ul { margin: 0; padding-left: 1.1em; }
.price-cards li + li { margin-top: 6px; }
.price-note { max-width: 640px; margin: 18px 0 0; color: var(--muted); }
.price-go { margin: 22px 0 0; }
.price-note a { color: inherit; }

/* Mail (mail.js), a place of its own: the welcome and the name the first time; then the folders, one conversation
   open, or a letter being written. A conversation or a letter fills Mail's panel, as an open chat fills Chats': on a
   phone (or an iPad held upright) the places bar steps aside for it (Back brings it). Cards are postcards: a colour
   each, the words large. */
.mail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mail-top h2 { margin-bottom: 2px; }
.mail-top .note { margin: 0; overflow-wrap: anywhere; }
.mail-write { display: inline-flex; align-items: center; gap: 0.45em; flex: none; }
.mail-write svg { width: 18px; height: 18px; flex: none; }
.mail-write[hidden] { display: none; }
.mail-welcome { margin: 14px 0 22px; padding: 16px 18px 18px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-left: 4px solid var(--accent); border-radius: var(--r); }
.mail-welcome h3 { margin: 0 0 6px; color: var(--text); font: 700 1.1rem/1.3 var(--sans); text-transform: none; letter-spacing: -0.01em; }
.mail-welcome p { margin: 0 0 8px; max-width: 60ch; }
.mail-points { margin: 0 0 4px; padding-left: 1.1em; max-width: 62ch; }
.mail-points li { margin: 6px 0; }
.mail-name-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 520px; margin-top: 8px; }
.mail-name-form .field { margin-top: 6px; }
.mail-name-form .note { margin: 0; }
.mail-name-form .btn { justify-self: start; }
.mail-name-row { display: flex; align-items: center; gap: 6px; }
.mail-name-row input { flex: 1; min-width: 0; padding: 0.65em 0.85em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 1rem var(--sans); }
.mail-name-row span { color: var(--muted); font: 500 0.95rem var(--sans); white-space: nowrap; }
#mail-name-note:empty, #mail-list-note:empty, #mail-read-note:empty, #mail-compose-note:empty { display: none; }
.mail-list.is-waiting { display: none; } /* no name yet, and nothing waiting: the welcome alone */
.mail-folders { margin-top: 14px; }
.mail-folders .chip { display: inline-flex; align-items: center; gap: 6px; }
.mail-folders .places-new { border-color: transparent; }
.mail-count { font-style: normal; color: inherit; opacity: 0.75; font-size: 0.72rem; }
.mail-threads { margin: 0; padding: 0 14px; list-style: none; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); }
.mail-threads li { border-top: 1px solid var(--line); }
.mail-threads li:first-child { border-top: 0; }
.mail-threads li.note { padding: 14px 2px; }
.mail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; width: 100%; padding: 11px 2px; background: none; color: inherit; border: 0; font: inherit; text-align: start; cursor: pointer; }
.mail-who { min-width: 0; overflow: hidden; font: 500 0.98rem/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.mail-when { color: var(--muted); font: 500 0.7rem/1.3 var(--sans); white-space: nowrap; }
.mail-subj { min-width: 0; overflow: hidden; font: 500 0.92rem/1.35 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.mail-row .places-new, .mail-n { justify-self: end; }
.mail-n { color: var(--muted); font: 600 0.7rem/1.3 var(--sans); }
.mail-snippet { grid-column: 1 / -1; min-width: 0; margin: 0; overflow: hidden; font-size: 0.84rem; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.is-unread .mail-who, .mail-row.is-unread .mail-subj { font-weight: 700; }
.mail-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; background: var(--soft); color: var(--accent-text); border-radius: var(--pill); font: 600 0.62rem/1.5 var(--sans); vertical-align: 2px; }
.mail-earlier { margin-top: 12px; }
.mail-earlier[hidden] { display: none; }
.mail-rules { margin-top: 18px; max-width: 64ch; }
#mail-place .sheet { display: flex; flex-direction: column; min-height: 100%; }
#mail-place.is-deep { overflow: hidden; }
#mail-place.is-deep .sheet { height: 100%; min-height: 0; }
#mail-place.is-deep .mail-top { display: none; }
.mail-read, .mail-compose { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mail-read[hidden], .mail-compose[hidden], .mail-list[hidden] { display: none; }
.mail-head { flex: none; }
.mail-head h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-head .btn[hidden] { display: none; }
.mail-danger { color: var(--danger); border-color: var(--danger); }
.mail-letters { flex: 1; min-height: 0; margin: 12px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.mail-letters > li.note { padding: 12px 2px; }
.mail-letter { margin-bottom: 12px; padding: 14px 16px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); }
.mail-letter.mine { background: var(--soft); border-color: transparent; }
.mail-letter-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.mail-from { font: 600 0.95rem/1.35 var(--sans); overflow-wrap: anywhere; }
.mail-addr { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.mail-to { margin: 2px 0 10px; font-size: 0.78rem; }
.mail-letter-subj { margin: 0 0 8px; font: 600 0.92rem var(--sans); }
.mail-body { margin: 0; font-size: 1rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-report { display: inline-block; margin-top: 10px; color: var(--muted); font-size: 0.75rem; }
.mail-reply { flex: none; display: grid; gap: 8px; margin-top: 10px; }
.mail-reply[hidden] { display: none; }
.mail-reply textarea, .mail-form textarea, .mail-form input, .mail-form select { width: 100%; padding: 0.65em 0.85em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 0.98rem/1.5 var(--sans); }
.mail-reply textarea { max-height: 30vh; resize: vertical; }
.mail-form textarea { min-height: 12em; resize: vertical; }
.mail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; }
.mail-reply .mail-actions { margin-top: 0; }
.mail-actions .btn[hidden] { display: none; }
.mail-saved { margin: 0; font-size: 0.78rem; }
.mail-compose { overflow-y: auto; }
.mail-kinds { margin: 14px 0 0; }
.mail-form { display: grid; max-width: 720px; }
.mail-letter-fields[hidden], .mail-cards[hidden] { display: none; }
/* the cards: postcards to pick from, two or three to a row */
.mail-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.mail-card-tile { display: grid; align-content: start; gap: 6px; min-height: 112px; padding: 14px 14px 16px; color: var(--text); border: 2px solid transparent; border-radius: var(--r); font: inherit; text-align: start; }
button.mail-card-tile { cursor: pointer; }
.mail-card-tile strong { font: 700 1.02rem/1.25 var(--sans); letter-spacing: -0.01em; }
.mail-card-tile p { margin: 0; font-size: 0.86rem; line-height: 1.45; }
.mail-card-tile[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--hl); }
.mail-letter.is-card .mail-card-tile { max-width: 340px; min-height: 0; padding: 18px 18px 20px; }
.mail-letter.is-card .mail-card-tile strong { font-size: 1.25rem; }
.mail-letter.is-card .mail-card-tile p { font-size: 1rem; }
.tone-a { background: #e3ecfb; }
.tone-b { background: #fff1c7; }
.tone-c { background: #dcf2e4; }
.tone-d { background: #fbe3ec; }
@media (prefers-color-scheme: dark) {
  .tone-a { background: #1b2944; }
  .tone-b { background: #4a3a12; }
  .tone-c { background: #173a27; }
  .tone-d { background: #47202f; }
}
@media (pointer: coarse) {
  .mail-reply textarea, .mail-form textarea, .mail-form input, .mail-form select, .mail-name-row input { font-size: 16px; } /* under 16px an iPhone zooms in as it's tapped */
  .mail-head .btn, .mail-actions .btn { min-height: 44px; }
  .mail-head .btn:first-child { min-width: 44px; }
}
@media (max-width: 899px) {
  body:has(#mail-place[open].is-deep) .places { display: none; }
  #mail-place.is-deep .sheet { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  body.kb-open #mail-place.is-deep .sheet { padding-bottom: 8px; } /* the keyboard covers the home bar */
  .mail-top .btn { margin-top: 2px; }
}
@media (max-width: 480px) {
  .mail-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail-folders { gap: 6px; }
  .mail-folders .chip { padding: 0.4em 0.7em; }
}

/* Help me answer and Help me write (mail.js, web/mailai.js): the drafted choices as tiles, each with the way it goes
   (a colour at its edge), what it says in a few words, and the start of the letter. Two to a row, as a game's answers. */
.mail-wheel { max-height: 50vh; margin: 0 0 8px; padding: 10px; overflow-y: auto; background: var(--soft); border-radius: var(--r); }
.mail-wheel[hidden], .mail-write-help[hidden], .mail-words-row[hidden], .mail-help[hidden] { display: none; }
.mail-wheel > .note { margin: 4px 2px; }
.mail-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mail-choice { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 10px 12px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-left: 4px solid var(--accent); border-radius: var(--r-sm); font: inherit; text-align: start; cursor: pointer; }
.mail-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--hl); }
.mail-choice-dir { color: var(--muted); font: 600 0.64rem/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; }
.mail-choice-label { font: 600 0.9rem/1.3 var(--sans); overflow-wrap: anywhere; }
.mail-choice-text { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 0.8rem; line-height: 1.4; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.dir-warm, .dir-short { border-left-color: #e0a526; }
.dir-learn, .dir-full { border-left-color: var(--accent); }
.dir-ask { border-left-color: #2f9e6a; }
.dir-brief { border-left-color: #8a96ab; }
.mail-wheel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mail-wheel-foot .note { flex: 1 1 100%; margin: 0; font-size: 0.75rem; }
.mail-write-help { margin-top: 14px; padding: 12px; background: var(--soft); border-radius: var(--r); }
.mail-help-title { margin: 0 0 8px; font: 600 0.85rem var(--sans); }
.mail-purposes { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-purposes .chip { min-height: 36px; cursor: pointer; }
.mail-purposes .chip[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mail-words-row { display: flex; gap: 8px; margin-top: 10px; }
.mail-words-row input { flex: 1; min-width: 0; padding: 0.55em 0.8em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 0.95rem var(--sans); }
.mail-write-help .mail-wheel { max-height: none; margin: 10px 0 0; padding: 0; background: none; }
.mail-helped { margin: 8px 0 0; font-size: 0.74rem; font-style: italic; }
@media (pointer: coarse) { .mail-words-row input { font-size: 16px; } }

/* Group chats (2026-11-20; app.js, web/groups.js): a group is a row in Chats like a chaver's, with a group mark; "New
   group" sits beside "Add a chaver"; in a group's chat, whose each message is, the lines about the group, its name with
   who's in it under it, and its panel (members, add, rename, mute, leave). */
.chats-head .new-group { margin-left: 8px; }
.chats-head:has(.new-group:not([hidden])) h2 { margin-right: auto; }
.chat-mark.is-group { background: var(--hl); color: var(--accent-text); }
.chat-mark.is-group svg { width: 22px; height: 22px; }
.places-new.is-muted { background: var(--muted); }
.msg-from { display: block; margin-bottom: 2px; color: var(--accent-text, var(--accent)); font: 700 0.74rem/1.3 var(--sans); }
.chat-log .msg-event { font-style: normal; text-align: center; }
.chat-head h3 .chat-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head h3 .chat-sub { display: block; overflow: hidden; color: var(--muted); font: 500 0.74rem/1.35 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.chat-head h3 .chat-sub:empty { display: none; }
.chat-view.is-group .chat-head h3 { min-width: 0; cursor: pointer; }
.chat-head .call.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chat-group[hidden] { display: none; }
.chat-group-panel { display: grid; gap: 12px; max-height: min(52dvh, 460px); overflow-y: auto; }
.chat-group-rename { display: flex; gap: 8px; }
.chat-group-rename input { flex: 1; min-width: 0; padding: 0.5em 0.8em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 0.95rem var(--sans); }
.chat-group-members { margin: 0; padding: 0; list-style: none; }
.chat-group-members li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.chat-group-members li:first-child { border-top: 0; }
.chat-group-members li > div:first-child { min-width: 0; font-weight: 600; }
.chat-group-members .note { font-weight: 400; }
.chat-group-members .note:empty { display: none; }
.chat-group-members .actions { display: flex; gap: 8px; margin: 0; }
.chat-group-add summary { cursor: pointer; font: 600 0.9rem var(--sans); color: var(--accent-text, var(--accent)); }
.chat-group-add .btn { margin-top: 8px; }
.chat-pick { margin: 14px 0 0; padding: 0; border: 0; }
.chat-pick legend { padding: 0; margin-bottom: 4px; font: 600 0.85rem var(--sans); }
.chat-pick-list { max-height: min(40dvh, 320px); margin: 6px 0 0; padding: 4px 12px; overflow-y: auto; list-style: none; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-sm); }
.chat-pick-list li { padding: 6px 0; border-top: 1px solid var(--line); }
.chat-pick-list li:first-child { border-top: 0; }
/* the form's boxes are full width: not its ticks */
.chat-add-form .chat-pick-list input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 0; padding: 0; }
.chat-pick-list .check { justify-content: flex-start; font: 500 1rem var(--sans); }
.chat-group-panel > .btn, .chat-group-leave { justify-self: start; }
.chat-group-leave { color: var(--danger); border-color: var(--danger); }
#chat-group-note:empty { display: none; }
.chat-group-new .chat-add-form .btn { margin-top: 4px; }
@media (pointer: coarse) {
  .chat-group-rename input { font-size: 16px; }
  .chat-group-panel .btn, .chat-group-new .btn { min-height: 44px; }
}
@media (max-width: 420px) {
  /* a phone: "New group" as its mark alone, so both buttons fit beside "Chats" */
  .chats-head .new-group span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chats-head .new-group { min-width: 44px; justify-content: center; }
}

/* Shiur rooms (2026-11-20; rooms.js, web/rooms.js): "Live now" at the top of the beis medrash; the room as a sheet
   (on a phone the whole screen above the places bar, elsewhere a panel at the side) with the stage as faces, the one
   speaking ringed; put away, a pill above the bar brings it back. */
.shiur-live { position: relative; z-index: 1; margin: 0 0 14px; padding: 12px 14px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); }
.shiur-live[hidden] { display: none; }
.shiur-live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shiur-live-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 1rem var(--sans); color: var(--text); text-transform: none; letter-spacing: 0; }
.shiur-dot { display: inline-block; flex: none; width: 9px; height: 9px; background: var(--muted); border-radius: 50%; }
.shiur-dot.is-live { background: var(--danger); box-shadow: 0 0 0 3px rgb(196 55 43 / 0.18); }
.shiur-start { display: grid; gap: 4px; margin-top: 8px; max-width: 520px; }
.shiur-start[hidden] { display: none; }
.shiur-start input { width: 100%; padding: 0.6em 0.8em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--r-sm); font: 400 1rem var(--sans); }
.shiur-start .btn { justify-self: start; margin-top: 10px; }
.shiur-start .note { margin: 6px 0 0; }
#shiur-start-note:empty, #shiur-full[hidden] { display: none; }
.shiur-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.shiur-card { display: grid; gap: 2px; width: 100%; padding: 10px 12px; background: var(--soft); color: inherit; border: 1px solid transparent; border-radius: var(--r-sm); font: inherit; text-align: start; cursor: pointer; }
.shiur-card.is-live { border-color: var(--accent); }
.shiur-card-head { display: flex; align-items: center; gap: 6px; color: var(--muted); font: 700 0.68rem var(--sans); text-transform: uppercase; letter-spacing: 0.04em; }
.shiur-card.is-live .shiur-card-when { color: var(--danger); }
.shiur-card-title { font: 700 1.02rem/1.3 var(--sans); }
.shiur-card-who { font: 500 0.86rem var(--sans); }
.shiur-card-more { margin: 0; font-size: 0.78rem; }
.shiur-none { margin: 0; }

dialog.shiur { position: fixed; inset: auto 16px 16px auto; z-index: 60; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: 0; padding: 0; overflow: auto; background: var(--paper); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: 0 18px 50px rgb(0 0 0 / 0.25); }
.shiur-sheet { display: grid; gap: 10px; padding: 14px 16px 16px; }
.shiur-head { display: flex; align-items: flex-start; gap: 10px; }
.shiur-head-text { flex: 1; min-width: 0; }
.shiur-head h2 { margin: 0; font: 700 1.1rem/1.3 var(--sans); color: var(--text); overflow-wrap: anywhere; }
.shiur-head .note { margin: 2px 0 0; }
.shiur-leave { color: var(--danger); border-color: var(--danger); }
.shiur-status { margin: 0; color: var(--accent-text); font-weight: 600; }
.shiur-status:empty { display: none; }
.shiur-stage { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px 8px; margin: 4px 0; padding: 0; list-style: none; }
.shiur-person { display: grid; justify-items: center; gap: 2px; text-align: center; }
.shiur-face { display: grid; place-items: center; width: 62px; height: 62px; background: var(--hl); color: var(--accent-text); border: 3px solid transparent; border-radius: 50%; font: 700 1.5rem var(--sans); transition: border-color 0.15s, box-shadow 0.15s; }
.shiur-person.is-host .shiur-face { background: var(--accent); color: var(--accent-ink); }
.shiur-person.is-speaking .shiur-face { border-color: var(--lamp, #f5c84c); box-shadow: 0 0 0 4px rgb(245 200 76 / 0.35); }
.shiur-person.is-muted .shiur-face { opacity: 0.55; }
.shiur-name { max-width: 100%; overflow: hidden; font: 600 0.88rem/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.shiur-role { color: var(--muted); font: 500 0.7rem var(--sans); }
.shiur-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.shiur-acts .btn { padding: 0.25em 0.55em; font-size: 0.72rem; }
.shiur-hands { padding: 8px 10px; background: var(--card); border: 1px solid var(--edge); border-left: 4px solid var(--accent); border-radius: var(--r-sm); }
.shiur-hands ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.shiur-hands li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; font-weight: 600; }
.shiur-hands .actions { display: flex; gap: 6px; margin: 0; }
.shiur-audience { margin: 0; }
.shiur-lines { display: grid; gap: 4px; max-height: 140px; margin: 0; padding: 8px 10px; overflow-y: auto; list-style: none; background: var(--soft); border-radius: var(--r-sm); font: 500 0.8rem/1.4 var(--sans); }
.shiur-lines[hidden] { display: none; }
.shiur-line.is-stop { color: var(--danger); font-weight: 600; }
.shiur-line.is-nudge { color: var(--accent-text); }
.shiur-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.shiur-controls .btn[hidden] { display: none; }
.shiur-report { margin-left: auto; color: var(--muted); }
.shiur-pill { position: fixed; right: 16px; bottom: 16px; z-index: 59; display: inline-flex; align-items: center; gap: 8px; max-width: min(420px, calc(100vw - 32px)); padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--pill, 999px); box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); font: 600 0.9rem var(--sans); cursor: pointer; }
.shiur-pill[hidden] { display: none; }
.shiur-pill strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 899px) {
  /* a phone or a narrow window: the room is the screen, down to the places bar */
  dialog.shiur { inset: 0 0 var(--places-h, 64px) 0; width: 100%; max-width: none; height: auto; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .shiur-sheet { min-height: 100%; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); align-content: start; }
  .shiur-controls { position: sticky; bottom: 0; padding-bottom: 6px; background: var(--paper); }
  .shiur-pill { right: 12px; left: 12px; bottom: calc(var(--places-h, 64px) + 10px); max-width: none; justify-content: center; }
  .shiur-controls .btn, .shiur-head .btn, .shiur-hands .btn { min-height: 44px; }
  .shiur-start input { font-size: 16px; }
}

/* The switches at the top of Chats and Mail, and of Masmid Central and the board (places.js; 2026-11-20, when Mail and
   the board left the bar): two halves of one pill, the place on show filled in. */
.place-seg { display: inline-flex; align-self: flex-start; width: fit-content; gap: 2px; margin: 0 0 12px; padding: 3px; background: var(--soft); border: 1px solid var(--edge); border-radius: var(--pill, 999px); }
.place-seg[hidden], .place-seg:has(#place-mail[hidden]) { display: none; }
.place-seg a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0.45em 1.1em; color: var(--text); border-radius: var(--pill, 999px); font: 600 0.86rem/1.1 var(--sans); text-decoration: none; touch-action: manipulation; }
.place-seg a[hidden] { display: none; }
@media (max-width: 520px) { .place-seg .seg-long { display: none; } } /* "Chevrusa Kingdom" is "Kingdom" on a phone */
.place-seg a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.place-seg .places-new { position: static; border-color: transparent; }
#chats-place:has(#chat-view:not([hidden])) .place-seg, #chats-place.is-adding .place-seg { display: none; } /* a chat open, or adding: the chat's own head */
@media (max-width: 899px) { .place-seg a { min-height: 40px; padding: 0.5em 1.2em; } }
#mail-place.is-deep .place-seg { display: none; } /* a conversation or a letter open fills Mail */

/* The maggid shiur (2026-11-20; rooms.js): its five as camera tiles, the one speaking ringed; my own picture mirrored;
   the kind of room to open, as two choices. */
.shiur-kind[hidden] { display: none; }
.shiur-kind { display: grid; gap: 6px; margin: 4px 0 6px; padding: 0; border: 0; }
.shiur-kind legend { padding: 0; margin-bottom: 4px; font: 600 0.85rem var(--sans); }
.shiur-kind .check { align-items: flex-start; padding: 8px 10px; background: var(--soft); border-radius: var(--r-sm); }
.shiur-kind .check input { margin-top: 3px; }
.shiur-kind .note { display: block; margin-top: 2px; font-size: 0.8rem; }
.shiur-card-kind { margin-left: auto; color: var(--accent-text); }
.shiur-stage.is-video { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shiur-tile { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #0f1b33; border: 3px solid transparent; border-radius: var(--r-sm); }
.shiur-tile video { width: 100%; height: 100%; object-fit: cover; }
.shiur-tile.is-me video { transform: scaleX(-1); }
.shiur-tile .shiur-face { width: 56px; height: 56px; }
.shiur-person.is-speaking .shiur-tile { border-color: var(--lamp, #f5c84c); }
.shiur-stage.is-video .shiur-person { justify-items: stretch; }
.shiur-stage.is-video .shiur-name, .shiur-stage.is-video .shiur-role { text-align: center; }
.shiur-audience[hidden] { display: none; }
@media (max-width: 899px) { .shiur-stage.is-video { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A maggid shiur as Hangouts lays one out (the owner, 2026-11-20: "the squares for each person get smaller... like
   hangouts"): every tile on the screen at once, sharing it, smaller as more come in; the name on the picture. */
.shiur-stage.is-video { --cols: 2; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 6px; }
.shiur-stage.is-video[data-count="1"] { --cols: 1; }
.shiur-stage.is-video[data-count="5"] { --cols: 3; }
.shiur-stage.is-video .shiur-person { position: relative; gap: 4px; }
.shiur-stage.is-video[data-count="1"] .shiur-tile, .shiur-stage.is-video[data-count="2"] .shiur-tile { aspect-ratio: 4 / 3; }
.shiur-stage.is-video .shiur-tile { aspect-ratio: 1 / 1; }
.shiur-tile-name { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); overflow: hidden; padding: 2px 8px; background: rgb(0 0 0 / 0.55); color: #ffffff; border-radius: 999px; font: 600 0.75rem/1.4 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.shiur-tile-name small { font-weight: 500; opacity: 0.85; }
@media (max-width: 899px) {
  /* a phone held up: two share it one above the other, then two across, smaller as more come in */
  .shiur-stage.is-video[data-count="2"] { --cols: 1; }
  .shiur-stage.is-video[data-count="2"] .shiur-tile { aspect-ratio: 16 / 9; }
  .shiur-stage.is-video[data-count="5"] { --cols: 2; }
  .shiur-stage.is-video .shiur-tile-name { font-size: 0.7rem; }
}
.shiur-tile .shiur-acts { position: absolute; top: 6px; right: 6px; left: 6px; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin: 0; }
.shiur-tile .shiur-acts .btn { padding: 0.2em 0.55em; background: rgb(0 0 0 / 0.55); color: #ffffff; border-color: rgb(255 255 255 / 0.35); font-size: 0.68rem; min-height: 0; }
@media (max-width: 899px) { .shiur-tile .shiur-acts .btn { min-height: 30px; } }

/* The workspace (the owner, 2026-11-21: "fit 6 chats the width of the screen ... or have them side by side or let them
   snap like windows lets you do"). On a computer's wide window (app.js deskWide) Chats is the list at the side and the
   chats that are open as tiles beside it: columns, and in a column one tile above another, each placed by percentages
   of the canvas (panes.js), with a line between two to drag. A tile is a card holding a copy of the one chat's parts
   (.chat-view), which keep their own rules; here is only what differs: the tile's frame, a head to drag it by with
   smaller buttons, a tighter box. Every rule is under .is-desk or a desk- name: none reaches a phone's chat. */
#chats-place.is-desk { overflow: hidden; }
#chats-place.is-desk .sheet { display: grid; grid-template-columns: 320px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); max-width: none; height: 100%; min-height: 0; margin: 0; padding: 0; }
#chats-place.is-desk .place-seg { grid-column: 1; grid-row: 1; margin: 14px 16px 0; }
#chats-place.is-desk .chats-head { grid-column: 1; grid-row: 2; margin: 12px 16px 10px; }
#chats-place.is-desk #chat-list, #chats-place.is-desk .chat-add { grid-column: 1; grid-row: 3; min-height: 0; padding: 0 16px 18px; overflow-y: auto; }
#chats-place.is-desk .desk { grid-column: 2; grid-row: 1 / 4; }
/* the list put away: the chats have the whole width */
#chats-place.is-desk.desk-nolist .sheet { grid-template-columns: minmax(0, 1fr); }
#chats-place.is-desk.desk-nolist .desk { grid-column: 1; border-left: 0; }
#chats-place.is-desk.desk-nolist :is(.place-seg, .chats-head, #chat-list, .chat-add) { display: none; }
/* the list's column is narrow: New group is its picture alone, as on a phone */
#chats-place.is-desk .chats-head .new-group span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#chats-place.is-desk .chats-head .new-group { min-width: 40px; justify-content: center; }
/* which chats are open, and the one I'm in */
#chats-place.is-desk #chats { padding: 0; overflow: hidden; }
#chats-place.is-desk #chats li { padding: 0 12px; }
#chats-place.is-desk #chats li.note, #chats-place.is-desk #chats li.chat-start { padding: 12px; }
#chats-place.is-desk #chats li.is-open { background: var(--hover); }
#chats-place.is-desk #chats li.is-current { background: var(--hl); box-shadow: inset 3px 0 0 var(--accent); }

.desk { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); border-left: 1px solid var(--edge); }
.desk[hidden] { display: none; }
.desk-bar { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px 4px; }
.desk-tool { display: inline-flex; align-items: center; gap: 0.45em; min-height: 32px; padding: 0.35em 0.7em; }
.desk-tool svg { flex: none; width: 18px; height: 18px; }
.desk-tool[aria-pressed="true"] { background: var(--hl); border-color: var(--hl); color: var(--accent-text); }
.desk-hint { flex: 1; min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font: 500 0.78rem/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.desk-menu { position: absolute; top: calc(100% - 2px); right: 12px; z-index: 6; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 252px; padding: 10px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--lift); }
.desk-menu[hidden] { display: none; }
.desk-menu button { display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; background: none; color: inherit; border: 1px solid transparent; border-radius: var(--r-sm); font: 600 0.74rem/1.2 var(--sans); cursor: pointer; }
.desk-menu button:hover, .desk-menu button:focus-visible { background: var(--hover); border-color: var(--edge); }
.desk-menu svg { width: 48px; height: 34px; fill: var(--soft); stroke: var(--accent); stroke-width: 1.2; }
.desk-menu .desk-close-all { grid-column: 1 / -1; padding: 8px; color: var(--muted); }

.desk-work { position: relative; flex: 1; min-height: 0; padding: 4px 8px 8px; overflow-x: auto; overflow-y: hidden; }
.desk-canvas { position: relative; height: 100%; }
.desk-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 24px; color: var(--muted); text-align: center; pointer-events: none; }
.desk-work:not(.is-empty) .desk-empty { display: none; }
.desk-empty svg { width: 96px; height: 66px; margin-bottom: 8px; color: var(--edge-strong); }
.desk-empty-title { margin: 0; color: var(--text); font: 700 1.1rem/1.3 var(--sans); }
.desk-empty .note { max-width: 430px; margin: 0; }

.desk-tile { position: absolute; display: flex; min-width: 0; min-height: 0; padding: 4px; container-type: inline-size; }
.desk-tile > .chat-view { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 8px 10px 10px; overflow: hidden; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: 14px; }
.desk-tile.is-current > .chat-view { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.desk-tile.is-moving { opacity: 0.45; }
/* something new from a chaver in a chat I'm not in, until I go to it */
.desk-tile.has-news::after { content: ""; position: absolute; top: 0; right: 0; width: 13px; height: 13px; background: var(--badge); border: 2px solid var(--bg); border-radius: 50%; }
@keyframes desk-flash { 30% { box-shadow: 0 0 0 5px var(--hl); } }
@media (prefers-reduced-motion: no-preference) {
  .desk-tile { transition: left 0.16s ease, top 0.16s ease, width 0.16s ease, height 0.16s ease; }
  .desk-canvas.is-sizing .desk-tile { transition: none; }
  .desk-tile.is-flash > .chat-view { animation: desk-flash 0.7s ease; }
  .desk-drop { transition: left 0.09s ease, top 0.09s ease, width 0.09s ease, height 0.09s ease; }
}
/* a tile's chat: dragged by its head; Close where a phone's chat has Back, at the end */
.desk-tile .chat-head { gap: 6px; min-height: 34px; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.desk-tile .chat-head h3 { min-width: 0; overflow: hidden; font-size: 0.98rem; text-overflow: ellipsis; white-space: nowrap; }
.desk-tile .chat-head .btn { min-width: 32px; min-height: 30px; padding: 0.25em 0.45em; }
.desk-tile .chat-head .call svg { width: 17px; height: 17px; }
.desk-tile .desk-close { order: 9; color: var(--muted); font-size: 0.78rem; line-height: 1; }
#chats-place .desk-tile .chat-log { margin-top: 8px; padding: 10px; background: var(--bg); border: 0; border-radius: 10px; }
.desk-tile .msg { max-width: 88%; font-size: 0.93rem; }
#chats-place .desk-tile .chat-form { gap: 6px; margin-top: 8px; }
.desk-tile .chat-form textarea { padding: 0.5em 0.7em; font-size: 0.93rem; }
.desk-tile .chat-form textarea::placeholder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* a narrow pane: one line, not two */
.desk-tile .chat-form .btn { padding: 0.5em 0.75em; }
.desk-tile .chat-view > .note { margin-top: 6px; font-size: 0.8rem; }
.desk-tile .chat-view > .note:empty { display: none; }
/* a pane's panels (disappearing messages, a group's own) keep to its width, and scroll inside it as one */
.desk-tile .chat-vanish { flex: none; grid-template-columns: minmax(0, 1fr); max-height: 55%; margin-top: 8px; overflow-y: auto; }
.desk-tile .chat-vanish-panel, .desk-tile .chat-group-panel { grid-template-columns: minmax(0, 1fr); max-height: none; overflow: visible; }
.desk-tile .chat-editing { margin-top: 8px; }
@container (max-width: 300px) {
  .desk-tile > .chat-view { padding: 6px 8px 8px; }
  .desk-tile .chat-head { gap: 4px; }
  .desk-tile .chat-head h3 { font-size: 0.9rem; }
  .desk-tile .chat-head .btn { min-width: 27px; padding: 0.2em 0.3em; }
  .desk-tile .chat-head .call svg { width: 15px; height: 15px; }
}

/* the line between two columns, or two tiles of a column: dragged to resize */
.desk-line { position: absolute; z-index: 2; touch-action: none; }
.desk-line.is-v { width: 12px; margin-left: -6px; cursor: col-resize; }
.desk-line.is-h { height: 12px; margin-top: -6px; cursor: row-resize; }
.desk-line::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; opacity: 0; transition: opacity 0.12s; }
.desk-line.is-v::after { inset: 16px 5px; }
.desk-line.is-h::after { inset: 5px 16px; }
.desk-line:hover::after, .desk-canvas.is-sizing .desk-line:active::after { opacity: 0.75; }
/* dragging a chat: where it would go, and its name at the pointer */
.desk-drop { position: absolute; z-index: 3; background: rgb(31 95 214 / 0.16); border: 2px solid var(--accent); border-radius: 14px; pointer-events: none; }
.desk-drop[hidden] { display: none; }
.desk-ghost { position: fixed; z-index: 60; max-width: 240px; padding: 6px 12px; overflow: hidden; background: var(--accent); color: var(--accent-ink); border-radius: var(--pill); box-shadow: var(--lift); font: 600 0.82rem/1.2 var(--sans); text-overflow: ellipsis; white-space: nowrap; pointer-events: none; transform: translate(12px, 14px); }
body.desk-dragging, body.desk-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
/* The workspace for a finger (2026-11-22: an iPad held sideways, in the app or in Safari): the head's buttons and the
   lines between a finger's size, the lines showing where to take hold (no hover to show them), the box's letters 16px
   (under that an iPad zooms the page in as the box is tapped), and a row of the list held to lift it out: no callout. */
.desk-hint-touch { display: none; }
@media (pointer: coarse) {
  .desk-hint-mouse { display: none; }
  .desk-hint-touch { display: inline; }
  .desk-tool { min-height: 40px; }
  .desk-menu button { padding: 12px 6px 10px; }
  .desk-tile .chat-head { min-height: 44px; }
  .desk-tile .chat-head .btn { min-width: 40px; min-height: 40px; }
  .desk-tile .chat-form textarea { font-size: 16px; }
  #chats-place .desk-tile .chat-form .btn { min-height: 44px; }
  .desk-line.is-v { width: 24px; margin-left: -12px; }
  .desk-line.is-h { height: 24px; margin-top: -12px; }
  .desk-line::after { opacity: 0.35; }
  .desk-line.is-v::after { inset: calc(50% - 24px) 10px; }
  .desk-line.is-h::after { inset: 10px calc(50% - 24px); }
  .desk-line:active::after { opacity: 0.8; }
  #chats-place.is-desk #chats .chat-open { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
/* The screen's keyboard up while writing in a chat of the workspace (an iPad): it takes half the screen, so while it's up
   that chat has all that's left; the bars, the list and the other chats step aside until it goes down. (Writing in the
   list's column, adding a chaver, nothing steps aside.) */
body.kb-open:has(.desk-tile :focus) #app > .bar, body.kb-open:has(.desk-tile :focus) .places { display: none; }
body.kb-open:has(.desk-tile :focus) #chats-place.is-desk .sheet { grid-template-columns: minmax(0, 1fr); }
body.kb-open:has(.desk-tile :focus) #chats-place.is-desk :is(.place-seg, .chats-head, #chat-list, .chat-add, .desk-bar) { display: none; }
body.kb-open:has(.desk-tile :focus) #chats-place.is-desk .desk { grid-column: 1; grid-row: 1 / 4; border-left: 0; }
body.kb-open:has(.desk-tile :focus) .desk-line, body.kb-open:has(.desk-tile :focus) .desk-tile:not(:has(:focus)) { display: none; }
body.kb-open:has(.desk-tile :focus) .desk-tile:has(:focus) { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; transition: none; }
/* Replying (2026-11-22): what a message answers, above its words (whose and its start, a tap to go there); the bar above
   the box while I answer one message or several; the picked ones outlined; the one gone to, lit for a moment */
.msg-quotes { display: grid; gap: 4px; margin: 0 0 6px; }
.msg-quote { display: grid; gap: 1px; width: 100%; min-width: 0; padding: 5px 9px; background: var(--bg); color: var(--text); border: 0; border-left: 3px solid var(--accent); border-radius: 8px; font: inherit; text-align: start; cursor: pointer; }
.msg.mine .msg-quote { background: rgb(255 255 255 / 0.16); color: inherit; border-left-color: rgb(255 255 255 / 0.85); }
.msg-quote b { overflow: hidden; color: var(--accent-text); font: 700 0.74rem/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.msg.mine .msg-quote b { color: inherit; }
.msg-quote span { display: -webkit-box; overflow: hidden; font-size: 0.82rem; line-height: 1.35; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; opacity: 0.88; }
.msg-quote.is-gone span { font-style: italic; opacity: 0.7; }
.msg.is-replying { outline: 2px solid var(--accent); outline-offset: 2px; }
.msg.mine.is-replying { outline-color: var(--accent-text); }
@keyframes msg-found { 0%, 60% { box-shadow: 0 0 0 4px var(--hl); } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg.msg-found { animation: msg-found 1.6s ease; }
.chat-replying { display: grid; gap: 6px; margin-top: 10px; padding: 8px 8px 8px 12px; background: var(--soft); color: var(--text); border-left: 3px solid var(--accent); border-radius: var(--r-sm); }
.chat-replying[hidden] { display: none; }
.chat-replying-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 0.86rem/1.3 var(--sans); }
.chat-replying-list { display: grid; gap: 3px; max-height: 26vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.chat-replying-list li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.84rem; }
.chat-replying-list b { flex: none; max-width: 40%; overflow: hidden; color: var(--accent-text); text-overflow: ellipsis; white-space: nowrap; }
.chat-replying-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-replying-drop { flex: none; width: 28px; height: 28px; padding: 0; background: none; color: var(--muted); border: 0; border-radius: 50%; font: 600 0.8rem var(--sans); cursor: pointer; }
.chat-replying-drop:hover { background: var(--hover); color: var(--text); }
.chat-replying .note { margin: 0; color: var(--muted); font-size: 0.76rem; }
#chats-place .chat-replying + .chat-editing[hidden] + .chat-form { margin-top: 6px; }
@media (pointer: coarse) {
  .chat-replying .btn { min-height: 40px; }
  .chat-replying-drop { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .msg.msg-found { animation: none; box-shadow: 0 0 0 4px var(--hl); } }


/* ---- The Heichal (rooms.js, heichal.js; the hall is drawn into app/index.html by tools/heichal_svg.py). The owner,
   2026-11-22: the live shiur "more apparent", a tab of its own in the beis medrash, "3d like the masmid central".
   The inside of the building at the end of Masmid Central's street, in its blues: a hall seen through one eye, four
   doors for the four rooms there can be. Its depth: the layers shift with the pointer and the scroll and the whole
   hall turns a little (--mx, --sy from masmid.js), and a live room's door swings open (heichal.js). Nobody is drawn. */
body:not([data-rooms="on"]) #bm-seg { display: none; } /* where shiur rooms aren't open, the beis medrash has no second tab */
.place-seg .shiur-dot.is-live { width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--card); animation: hl-pulse 2s ease-in-out infinite; }
@keyframes hl-pulse { 50% { opacity: 0.45; } }
/* a shiur is on, wherever I am: a red dot on the bar's Beis medrash */
.places-live { flex: none; width: 9px; height: 9px; background: var(--danger); border-radius: 50%; box-shadow: 0 0 0 2px var(--card), 0 0 0 5px rgb(196 55 43 / 0.2); animation: hl-pulse 2s ease-in-out infinite; }
.places-live[hidden] { display: none; }
@media (max-width: 899px) { .places .places-live { position: absolute; top: 6px; left: 50%; margin-left: -20px; } }
/* and in the beis medrash, where "Live now" used to be: the way to it */
.heichal-call { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-sm); font: 500 0.92rem/1.3 var(--sans); text-decoration: none; }
.heichal-call[hidden], #masmid:not([data-face="room"]) .heichal-call { display: none; }
.heichal-call > span:nth-child(2) { flex: 1; min-width: 0; }
/* and on Learn: a strip at the top of the amud, never in a session with the chevrusa and never while I'm in a room */
.heichal-strip { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: -6px auto 14px; padding: 6px 6px 6px 14px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: var(--pill, 999px); box-shadow: 0 4px 14px rgb(13 40 110 / 0.08); font: 500 0.88rem/1.3 var(--sans); }
.heichal-strip[hidden], body:not([data-place="learn"]) .heichal-strip, body.in-shiur .heichal-strip, body:has(#place-learn.is-live) .heichal-strip, body[data-full="on"] .heichal-strip { display: none; }
.heichal-strip .shiur-dot.is-live { animation: hl-pulse 2s ease-in-out infinite; }
.heichal-strip-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heichal-strip-lead { color: var(--danger); font-weight: 700; }
.heichal-strip-who { color: var(--muted); }
.heichal-strip-away { flex: none; width: 32px; height: 32px; background: none; color: var(--muted); border: 0; border-radius: 50%; font: 400 1.3rem/1 var(--sans); cursor: pointer; }
@media (max-width: 899px) { .heichal-strip-lead { display: none; } }

/* the hall's card */
.shiur-live.heichal { --mx: 0; --sy: 0; isolation: isolate; margin: 14px 0 12px; padding: 0; overflow: hidden; background: linear-gradient(180deg, #0a2055 0%, #0d2866 100%); color: #ffffff; border: 0; border-radius: var(--r); box-shadow: 0 12px 32px rgb(13 40 110 / 0.28); }
.heichal .shiur-live-head { position: relative; z-index: 3; padding: 12px 14px 10px; }
.heichal .shiur-live-head h3 { color: #ffffff; }
.heichal .shiur-live-head .shiur-dot:not(.is-live) { background: rgb(255 255 255 / 0.35); }
.heichal .shiur-live-head .shiur-dot.is-live { background: #ff6b5e; box-shadow: 0 0 0 3px rgb(255 107 94 / 0.25); animation: hl-pulse 2s ease-in-out infinite; }
.hl-stage { position: relative; width: 100%; aspect-ratio: 2 / 1; margin: 0 auto; container-type: inline-size; transform: perspective(1400px) rotateY(calc(var(--mx) * 1.4deg)) rotateX(calc(var(--sy) * -0.8deg)); transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hl-hall { display: block; width: 100%; height: 100%; overflow: visible; }
.hl-hall > g { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hl-far { transform: translate(calc(var(--mx) * 3px), calc(var(--sy) * 1px)); }
.hl-mid { transform: translateX(calc(var(--mx) * -2px)); }
.hl-near { transform: translate(calc(var(--mx) * -9px), calc(var(--sy) * 3px)); }
.hl-flame { animation: sh-flicker 2.8s ease-in-out infinite; }
/* a door: shut and dark; ajar while its room opens; open, its doorway and the floor before it lit, while it's live */
.hl-glow { opacity: 0; transition: opacity 0.6s; }
.hl-door.is-opening .hl-glow { opacity: 0.4; }
.hl-door.is-live .hl-glow { opacity: 1; animation: sh-flicker 3.4s ease-in-out infinite; }
.hl-spill { opacity: 0; pointer-events: none; transition: opacity 0.8s; }
.hl-spill.is-opening { opacity: 0.3; }
.hl-spill.is-live { opacity: 1; }
.hl-leaf.is-in { fill: #2450a8; stroke: #ffe9a8; } /* the side toward its room, catching the room's light at its edge */
.hl-door.is-live, .hl-door.is-opening, .hl-door.is-free { cursor: pointer; }
.hl-door.is-free:hover .hl-leaf { fill: #17398a; }
/* its tag: the two near doors' on the floor before them, the two far ones' over theirs on the end wall */
.hl-tag { position: absolute; z-index: 2; display: grid; gap: 1px; width: 19.5%; min-width: 0; padding: 0.5em 0.75em; background: rgb(6 17 46 / 0.8); color: #ffffff; border: 1px solid rgb(255 255 255 / 0.18); border-radius: 10px; font: 500 12px/1.25 var(--sans); font-size: clamp(9.5px, 1.5cqw, 13px); text-align: start; cursor: pointer; }
.hl-tag[hidden] { display: none; }
.hl-tag-1 { left: 25.5%; bottom: 2%; }
.hl-tag-2 { right: 25.5%; bottom: 2%; }
.hl-tag-3 { right: 51.75%; bottom: 72%; }
.hl-tag-4 { left: 51.75%; bottom: 72%; }
.hl-tag.is-live { border-color: #f5c84c; box-shadow: 0 0 0 1px rgb(245 200 76 / 0.3), 0 6px 22px rgb(245 200 76 / 0.28); }
.hl-tag-head { display: flex; align-items: center; gap: 0.45em; overflow: hidden; color: rgb(255 255 255 / 0.75); font-size: 0.8em; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.hl-tag-head .shiur-dot { width: 0.7em; height: 0.7em; }
.hl-tag-head .shiur-dot.is-live { background: #ff6b5e; box-shadow: none; animation: hl-pulse 2s ease-in-out infinite; }
.hl-tag.is-live .hl-tag-when { color: #ff9a8f; }
.hl-tag-more { overflow: hidden; font-weight: 500; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; }
.hl-tag-title { display: -webkit-box; overflow: hidden; font-size: 1.05em; font-weight: 700; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.hl-tag-who { overflow: hidden; color: rgb(255 255 255 / 0.82); text-overflow: ellipsis; white-space: nowrap; }
.hl-tag.is-free { width: auto; padding: 0.5em 1em; background: #f5c84c; color: #12203a; border-color: transparent; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px rgb(0 0 0 / 0.3); }
.hl-tag:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .hl-stage, .hl-hall > g, .hl-glow, .hl-spill { transition: none; }
  .hl-stage { transform: none; }
  .hl-flame, .hl-door.is-live .hl-glow, .places-live, .shiur-dot.is-live { animation: none; }
}
/* a phone sees the middle of the hall, with all four doors */
@media (max-width: 700px) { .hl-stage { width: max(100%, 660px); margin-left: min(0px, 50% - 330px); } }
/* a wide screen: the hall is fitted by its height, and its walls go on past both sides, with their seforim */
@media (min-width: 1100px) { .hl-stage { width: auto; height: 420px; } }
/* under the hall: the shiurim as a list, side by side where there's room; and earlier today */
#masmid-heichal .shiur-list, .shiur-earlier-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
#masmid-heichal .shiur-none { grid-column: 1 / -1; }
.shiur-earlier { margin-top: 20px; }
.shiur-earlier h3 { margin: 0 0 8px; color: var(--muted); font: 700 0.74rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.shiur-earlier-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shiur-was { display: grid; gap: 1px; padding: 9px 12px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-sm); }
.shiur-was-title { font: 600 0.94rem/1.3 var(--sans); }
.shiur-was-more { margin: 0; font-size: 0.78rem; }
/* Coming up: the shiurim that were announced, each with its bell ("Remind me"); a maggid's own with Cancel */
.shiur-next { margin-top: 20px; }
.shiur-next[hidden] { display: none; }
.shiur-next-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.shiur-next-head h3 { margin: 0; color: var(--muted); font: 700 0.74rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.shiur-plan { margin: 0 0 14px; }
/* (the kind's two choices, here and where a room is opened: the form's rule for its text boxes stretched their dots) */
.shiur-kind .check input { flex: none; width: auto; }
@media (pointer: coarse) { .shiur-kind .check input { width: 22px; } }
.shiur-plan input[type="datetime-local"] { min-height: 2.6em; }
.shiur-next-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.shiur-soon { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-sm); transition: border-color 0.3s, box-shadow 0.3s; }
.shiur-soon.is-shown { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(29 78 216 / 0.14); }
.shiur-soon-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.shiur-soon-when { display: flex; flex-wrap: wrap; column-gap: 0.6em; color: var(--accent-text); font: 700 0.8rem var(--sans); letter-spacing: 0.02em; }
.shiur-soon-when > span { white-space: nowrap; }
.shiur-soon-in { color: var(--muted); font-weight: 500; }
.shiur-soon-title { font: 700 1rem/1.3 var(--sans); overflow-wrap: anywhere; }
.shiur-soon-who { margin: 0; font-size: 0.8rem; }
.shiur-soon-acts { display: grid; flex: none; justify-items: end; gap: 6px; }
.shiur-bell { display: inline-flex; align-items: center; gap: 0.45em; min-height: 36px; white-space: nowrap; }
.shiur-bell-icon { flex: none; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shiur-bell.is-on { background: var(--soft); color: var(--accent-text); border-color: var(--accent); }
.shiur-bell.is-on .shiur-bell-icon { fill: currentColor; }
.shiur-soon-cancel { font-size: 0.8rem; }
.shiur-next-note { margin: 8px 0 0; }
.shiur-next-note:empty { display: none; }
@media (pointer: coarse) { .shiur-bell { min-height: 44px; } }
/* a reminder that came while iShtaig is open: a pill over the page, above the pill of a room I'm in */
.shiur-soon-pill { bottom: 68px; background: #12203a; color: #ffffff; text-align: start; }
.shiur-soon-pill strong { white-space: normal; font-weight: 600; }
.shiur-soon-pill-bell { display: inline-flex; flex: none; color: #f5c84c; }
.shiur-soon-pill .shiur-bell-icon { fill: currentColor; }
@media (max-width: 899px) { .shiur-soon-pill { bottom: calc(var(--places-h, 64px) + 62px); justify-content: flex-start; } }
/* in the hall, a free door's tag for the next one: as a live room's, without its light */
.hl-tag.is-next { border-style: dashed; border-color: rgb(255 255 255 / 0.4); }
.hl-tag.is-next .hl-tag-when { color: #f5c84c; }
@media (prefers-reduced-motion: reduce) { .shiur-soon { transition: none; } }

/* The chevrusa's one question to a visitor (ask.js; landing-seen.js on the front page, try.js at the end of a try): a
   card at the corner, a sheet at the foot of a phone; at the end of a try it sits in the page. His face moves while
   he asks (a short video with no sound over his picture). */
.ask-card { box-sizing: border-box; position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 16px 16px 18px; background: var(--card); color: var(--text); border: 1px solid var(--edge); border-radius: 20px; font: 400 0.95rem/1.45 var(--sans); text-align: start; }
.ask-card.float { position: fixed; z-index: 40; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); width: min(410px, calc(100vw - 32px)); box-shadow: 0 24px 60px -18px rgb(10 18 34 / 0.5), 0 2px 8px rgb(10 18 34 / 0.12); opacity: 0; translate: 0 18px; transition: opacity 0.25s, translate 0.25s; }
.ask-card.float.in { opacity: 1; translate: 0 0; }
.ask-card.inline { max-width: 34rem; margin-top: 28px; background: var(--field); }
.ask-face { position: relative; width: 64px; height: 64px; margin: 2px 0 0; overflow: hidden; border-radius: 50%; background: #1b2436; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.ask-card.inline .ask-face { box-shadow: 0 0 0 2px var(--field), 0 0 0 4px var(--accent); }
/* The still is his own portrait cut square (art/chevrusa-face.webp, from avatar/chevrusa-1.png); the moving face is the
   wide clip, placed so that his head sits where it does in the still. */
.ask-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ask-face video { position: absolute; left: -59.3%; top: -0.4%; width: 211%; height: 118.7%; max-width: none; object-fit: fill; }
.ask-face video { opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.ask-face video.on { opacity: 1; }
.ask-body { min-width: 0; }
.ask-body .who { display: block; margin-bottom: 2px; color: var(--muted); font: 600 0.68rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.ask-card .ask-q { max-width: none; min-height: 2.9em; margin: 0 26px 12px 0; color: var(--text); font-weight: 500; }
.ask-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ask-pick { min-height: 38px; padding: 0.5em 0.95em; background: var(--card); color: var(--text); border: 1px solid var(--edge-strong); border-radius: var(--pill); font: 500 0.86rem/1.2 var(--sans); cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.ask-pick:hover, .ask-pick:focus-visible { border-color: var(--accent); background: var(--hl); }
.ask-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font: 400 1.35rem/1 var(--sans); cursor: pointer; }
.ask-x:hover, .ask-x:focus-visible { background: var(--field); color: var(--text); }
.ask-line { display: flex; flex: 1 1 100%; gap: 8px; }
.ask-line input { flex: 1; min-width: 0; padding: 0.55em 0.8em; background: var(--field); color: var(--text); border: 1px solid var(--edge-strong); border-radius: 12px; font: 400 16px var(--sans); }
.ask-skip { padding: 0.3em 0.2em; background: none; color: var(--muted); border: 0; font: 500 0.82rem var(--sans); text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
@media (max-width: 760px) {
  .ask-card.float { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: auto; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 14px 14px 14px 14px; }
  .ask-card.float .ask-face { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .ask-card.float { transition: none; } }
/* "See it learn" waits where it is while he asks */
.front .demo { transition: filter 0.3s; }
.front .demo.held { filter: saturate(0.55) brightness(0.95); }

/* The pointer on the front page is a yad (the owner, 2026-11-23: "add a torah pointer to the mouse"): the page's own
   silver yad made small (art/yad-pointer.png, from art/yad.webp), its fingertip the point; over something to press, a
   warm light at the fingertip (yad-press.png). Only where there is a mouse; a phone has no pointer. */
@media (hover: hover) and (pointer: fine) {
  body.front:not(.inner) { cursor: url("/art/yad-pointer.png") 9 9, auto; cursor: image-set(url("/art/yad-pointer.png") 1x, url("/art/yad-pointer-2x.png") 2x) 9 9, auto; }
  body.front:not(.inner) :is(a, button, summary, label, .btn, .chip, .tour-dot, .ask-pick) { cursor: url("/art/yad-press.png") 9 9, pointer; cursor: image-set(url("/art/yad-press.png") 1x, url("/art/yad-press-2x.png") 2x) 9 9, pointer; }
  body.front:not(.inner) :is(input, textarea) { cursor: text; }
}

/* ---- What's new: the "+" on Chats, the bell and its list, the ticker (news.js; the owner, 2026-11-23) ---- */
:root { --up: #14804a; --tape: #0f1b33; --tape-ink: #e8eef9; --tape-muted: #9fb0cd; --tape-edge: #22335a; }
@media (prefers-color-scheme: dark) { :root { --up: #5fd08f; --tape: #070c18; } }
/* someone asks to be my chaver: a "+" the colour of a lit lamp, apart from the red count of messages */
.places-plus { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; background: var(--lamp); color: #3d2c00; border: 2px solid var(--card); border-radius: 10px; font: 800 0.8rem/1 var(--sans); font-style: normal; }
@media (max-width: 899px) { .places .places-plus { position: absolute; top: 2px; right: 50%; margin-right: 6px; } }
/* the bell */
.bar .news-open { position: relative; flex: none; width: 40px; height: 36px; padding: 0; }
.news-open svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.news-open .places-new { position: absolute; top: -8px; right: -8px; }
@media (max-width: 899px) { .bar .news-open { width: 44px; height: 44px; } }
/* its list */
dialog.news { width: min(520px, calc(100vw - 24px)); }
.news-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.news-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 6px 8px; border-radius: var(--r-sm); }
.news-row.is-new { background: var(--soft); }
.news-sign { display: grid; place-items: center; width: 24px; height: 24px; background: var(--hl); color: var(--accent-text); border-radius: 50%; font: 800 0.85rem/1 var(--sans); }
.news-row:not(.is-ask, .is-chaver) .news-sign::before { content: ""; width: 8px; height: 8px; background: currentColor; border-radius: 50%; }
.news-row:not(.is-new) .news-sign { background: none; color: var(--edge-strong); }
.news-row.is-ask .news-sign { background: var(--lamp); color: #3d2c00; }
.news-row.is-shiur .news-sign { background: none; color: var(--danger); }
.news-line { min-height: 36px; padding: 4px 0; background: none; color: var(--text); border: 0; font: 400 0.92rem/1.35 var(--sans); text-align: start; cursor: pointer; }
.news-line b { font-weight: 700; }
.news-when { color: var(--muted); font: 500 0.72rem/1 var(--sans); white-space: nowrap; }
.news-actions { grid-column: 2 / -1; display: flex; gap: 8px; padding-bottom: 4px; }
.news-none { padding: 14px 8px; }
.news-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--edge); }
.news-ticker-label { font: 600 0.8rem var(--sans); }
.news-ticker-chips { display: inline-flex; gap: 4px; }
.news-foot .chip { min-height: 32px; padding-inline: 0.9em; cursor: pointer; }
.news-foot .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 899px) { .news-line { min-height: 44px; } .news-foot .chip { min-height: 40px; min-width: 48px; } .news-actions .btn { min-height: 40px; } }
/* The ticker: a dark tape in the bar's own row, at its foot (the bar makes room below itself while it's there). Not in a
   session, in a shiur, in full screen, or while typing; nor on a phone inside an open chat or letter. */
#app > .bar { grid-column: 1; } /* (named, so the tape shares its cell and doesn't push it into a second column) */
#app > .ticker { display: none; grid-row: 1; grid-column: 1; align-self: end; margin-bottom: 12px; /* room before the places' buttons under it (the owner, 2026-11-24: "too close with the buttons below") */ z-index: 1; min-width: 0; height: 30px; align-items: stretch; background: var(--tape); color: var(--tape-ink); border-block: 1px solid var(--tape-edge); font: 500 0.74rem/1 var(--sans); }
body.has-ticker:not(.in-shiur, .kb-open, [data-full="on"], :has(#place-learn.is-live)) #app > .ticker { display: flex; }
body.has-ticker:not(.in-shiur, .kb-open, [data-full="on"], :has(#place-learn.is-live)) #app > .bar { padding-bottom: 54px; } /* 12 over the tape, its 30, 12 under */
/* (the menu's list, z-index 10 on the page itself, opens over the tape: the menu gets no z-index of its own, which would put its list under an open place) */
.ticker-tag { flex: none; padding: 0 10px 0 max(12px, env(safe-area-inset-left)); background: var(--badge); color: #ffffff; border: 0; font: 800 0.66rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.ticker-window { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.ticker-window { touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: grab; } /* dragged either way (news.js) */
.ticker-window.is-dragging, .ticker-window.is-dragging .tk { cursor: grabbing; }
.ticker-track { display: flex; width: max-content; height: 100%; will-change: transform; }
.ticker-away { flex: none; display: grid; place-items: center; width: 38px; padding: 0 max(0px, env(safe-area-inset-right)) 0 0; background: none; color: var(--tape-muted); border: 0; border-inline-start: 1px solid var(--tape-edge); cursor: pointer; }
.ticker-away svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* minimized: it says where it went, a moment, and goes */
.ticker-said { flex: 1; align-self: center; padding: 0 14px; color: var(--tape-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker.is-going > :not(.ticker-said) { display: none; }
.tk { display: inline-flex; align-items: center; gap: 0.5em; flex: none; height: 100%; padding: 0 16px; background: none; color: var(--tape-ink); border: 0; border-inline-end: 1px solid var(--tape-edge); font: inherit; white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .tk:hover { background: rgb(255 255 255 / 0.07); } }
.tk-sym { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.tk-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.tk-up { color: #5fd08f; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-down { color: var(--tape-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-note, .tk-rank { color: var(--tape-muted); }
.tk-rank { font-variant-numeric: tabular-nums; }
.tk-plus { display: inline-grid; place-items: center; width: 17px; height: 17px; background: var(--lamp); color: #3d2c00; border-radius: 50%; font: 800 0.8rem/1 var(--sans); font-style: normal; }
.tk-n { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; background: var(--badge); color: #ffffff; border-radius: 9px; font: 700 0.64rem/1 var(--sans); font-style: normal; }
.tk-lamp { flex: none; width: 8px; height: 8px; background: #ffe27a; border-radius: 50%; box-shadow: 0 0 6px 2px rgb(245 200 76 / 0.7); }
.tk-live { flex: none; width: 8px; height: 8px; background: #ff5a4d; border-radius: 50%; }
.tk-ask { color: #ffe27a; }
.tk-ask .tk-sym { color: #ffffff; }
@media (max-width: 899px) {
  #app > .ticker { margin-bottom: 0; } /* a phone's places are at the bottom: what's under the tape has its own room */
  body.has-ticker:not(.in-shiur, .kb-open, [data-full="on"], :has(#place-learn.is-live)) #app > .bar { padding-bottom: 38px; }
  body:has(#chats-place[open] #chat-view:not([hidden])) #app > .ticker, body:has(#mail-place[open].is-deep) #app > .ticker { display: none; }
  body.has-ticker:has(#chats-place[open] #chat-view:not([hidden])) #app > .bar, body.has-ticker:has(#mail-place[open].is-deep) #app > .bar { padding-bottom: 8px; }
}
@media (max-width: 599px) { .ticker-tag-long { display: none; } }
/* less motion asked for: it stands, and is pushed along by hand */
@media (prefers-reduced-motion: reduce) { .ticker-window { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; } }
