/* «Сейчас» as one river (screens/now.js) and the pair sheet (screens/pair.js). Content is solid: no glass here.
   Tokens only (app.css: --bg --bg2 --text --hint --subtitle --accent --sep, the *-rgb triplets; shell.css: the
   subject tints .tint-0…7 → --tint-rgb). No colour mixing functions: translucent fills are rgb(var(--x-rgb) / a).
   Logical properties (RTL-ready), 320–430 px first, light and dark from the theme, tiers A / B / C, reduced
   motion, more contrast. Colour never carries meaning alone: every tinted thing has its abbreviation too.
   The three springs (spec §8.1) are the shell's own (chrome.js samples them into linear(); app.css has the
   fallbacks): navigation ≈ 350 ms without bounce (a day unfolds), glass ≈ 500 ms, micro ≈ 250 ms with a short
   bounce (the check, the ring) — so a day unfolds exactly as a screen is pushed. */

.rv {
  --rv-nav: var(--spring-navigation-dur) var(--spring-navigation);
  --rv-micro: var(--spring-micro-dur) var(--spring-micro);
  --rv-radius: 18px;
  --rv-gap: 8px;
}

/* ---------- the header ---------- */

.rv-head { padding-block: 8px 4px; padding-inline: 4px; }
.rv-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rv-title { flex: 1; min-width: 0; }
.rv-avatar { flex: none; display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.rv-sub { margin-block-start: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- the card ---------- */
/* The card's facts are one button for assistive tech (.rv-card-main, role=button); the verb is its own button. */
.rv-card-main { display: grid; gap: 4px; min-width: 0; border-radius: 16px; outline: none; }
.rv-card-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.rv-card-host { margin-block-start: 12px; }
.rv-card {
  position: relative;
  display: grid; gap: 4px;
  padding: 16px;
  border-radius: 22px;
  /* Solid in the subject's tint: a translucent tint over the solid secondary background (no color-mix). */
  background: linear-gradient(rgb(var(--tint-rgb, var(--accent-rgb)) / 0.16), rgb(var(--tint-rgb, var(--accent-rgb)) / 0.16)), var(--bg2);
  box-shadow: inset 0 0 0 1px rgb(var(--tint-rgb, var(--accent-rgb)) / 0.28);
  contain: paint;
  cursor: pointer;
  transition: scale .2s ease;
}
.rv-card:active { scale: .99; }
.rv-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-card-plain { background: var(--bg2); box-shadow: none; cursor: default; }
.rv-card-plain:active { scale: 1; }
.rv-card-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rv-card-label {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 600; color: var(--subtitle); font-variant-numeric: tabular-nums;
}
.rv-when { white-space: pre; }
.rv-card-big { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; row-gap: 0; margin-block-start: 6px; }
.rv-room { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rv-time { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-card-subject { font-size: 17px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.rv-card-meta, .rv-card-note { font-size: 15px; line-height: 1.35; color: var(--subtitle); overflow-wrap: anywhere; margin: 0; }
.rv-card-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.rv-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
/* The verb never leaves the card: a long one ("Shu darsgacha topshirish: …") wraps to a second line. */
.rv-card-actions .btn { min-height: 44px; max-width: 100%; height: auto; padding-block: 10px; white-space: normal;
                        text-align: start; line-height: 1.25; overflow-wrap: anywhere; }

/* The abbreviation: never colour alone. */
.rv-badge {
  flex: none; display: inline-grid; place-items: center;
  inline-size: 40px; block-size: 40px; border-radius: 12px;
  background: rgb(var(--tint-rgb, var(--accent-rgb)) / 0.22);
  box-shadow: inset 0 0 0 1.5px rgb(var(--tint-rgb, var(--accent-rgb)));
  color: var(--text); font-size: 15px; font-weight: 800; letter-spacing: .02em;
}
.rv-badge.sm { inline-size: 30px; block-size: 30px; border-radius: 9px; font-size: 12px; }
/* "Eko.", "Iqti." — the Week grid's and Study's label (one subject, one label): longer ones take a smaller size. */
.rv-badge.long { font-size: 12px; letter-spacing: -.01em; }
.rv-badge.sm.long { font-size: 10px; letter-spacing: -.02em; }

/* ---------- skeletons: reserved height, no spinner ---------- */

.rv-skel { border-radius: var(--rv-radius); background: var(--bg2); animation: breathe 1.6s ease-in-out infinite; }
.rv-skel-card { block-size: 176px; border-radius: 22px; }
.rv-skel-row { block-size: 56px; margin-block-start: var(--rv-gap); }

/* ---------- "Needs attention" ---------- */

.rv-attn { margin-block-start: 22px; }
.rv-attn-title { margin: 0; padding: 0 4px 7px; font-size: 15px; font-weight: 600; color: var(--section-header); }
.rv-attn-list { background: var(--bg2); border-radius: 14px; overflow: hidden; contain: paint; }
.rv-att { position: relative; display: flex; align-items: center; gap: 8px; padding-inline-end: 12px; min-block-size: 56px; }
.rv-att + .rv-att::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 56px 0;
  border-block-start: .5px solid var(--sep);
}
.rv-att-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  min-block-size: 56px; padding-block: 8px; padding-inline: 16px 0;
  border: 0; background: none; color: var(--text); text-align: start; font: inherit; cursor: pointer;
}
.rv-att-main:active { background: rgb(var(--text-rgb) / 0.06); }
.rv-att-ico {
  flex: none; display: grid; place-items: center; inline-size: 28px; block-size: 28px; border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.14); color: var(--accent);
}
.rv-att-ico .ico { inline-size: 18px; block-size: 18px; }
.rv-att.kind-overdue .rv-att-ico { background: rgb(255 59 48 / 0.12); color: var(--destructive); }
.rv-att-text { min-width: 0; display: flex; flex-direction: column; }
.rv-att-line { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.rv-att-sub { font-size: 13px; line-height: 1.3; color: var(--hint); overflow-wrap: anywhere; }
.rv-att-act { flex: none; min-block-size: 44px; max-inline-size: 42%; }     /* 44 pt: §10 */
.rv-att-act span, .rv-att-act { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-calm {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px;
  border-radius: 14px; background: var(--bg2); font-size: 15px; font-weight: 500;
}
.rv-calm-mark {
  display: grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 12px;
  background: var(--accent); color: var(--accent-text); font-size: 14px; font-weight: 800;
}

/* ---------- the river ---------- */

.rv-river { margin-block-start: 16px; }
.rv-river > * + * { margin-block-start: var(--rv-gap); }

/* "Week 7 · odd": sentence case in semibold, like iOS 26 section headers (capitals made "5-Я НЕДЕЛЯ"). */
.rv-week {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-block: 14px 2px; padding-inline: 4px;
  font-size: 15px; font-weight: 600; color: var(--hint);
}
.rv-week.current .rv-week-label { color: var(--text); }
.rv-ring { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--subtitle); }
.rv-ring i {
  flex: none; inline-size: 18px; block-size: 18px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1turn), rgb(var(--text-rgb) / 0.12) 0);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px);
  mask: radial-gradient(circle, transparent 5px, #000 5.5px);
  transition: --p var(--rv-micro);
}
.rv-ring.full i { background: var(--accent); }
.rv-ring-text { font-variant-numeric: tabular-nums; }

.rv-day { position: relative; }
.rv-day-head {
  position: sticky; inset-block-start: var(--sat); z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding-block: 8px 6px; padding-inline: 4px;
  background: var(--bg);
  font-size: 15px; font-weight: 700; line-height: 1.3;
}
.rv-day.today .rv-day-head .rv-day-label { color: var(--accent); }
.rv-dots { display: inline-flex; gap: 3px; flex: none; }
.rv-dots i { inline-size: 6px; block-size: 6px; border-radius: 3px; background: var(--hint); }
.rv-day.today .rv-dots i { background: var(--accent); }

.rv-lessons { display: grid; gap: 6px; }
.rv-lesson, .rv-exam, .rv-dl-main, .rv-goal {
  display: flex; align-items: center; gap: 10px; inline-size: 100%;
  min-block-size: 52px; padding-block: 8px; padding-inline: 12px;
  border: 0; border-radius: 14px; background: var(--bg2); color: var(--text);
  text-align: start; font: inherit; cursor: pointer;
  transition: opacity .3s ease, scale .15s ease;
}
.rv-lesson:active, .rv-exam:active, .rv-dl-main:active, .rv-goal:active { scale: .985; }
.rv-lesson { border-inline-start: 3px solid rgb(var(--tint-rgb)); }
.rv-lesson.past { opacity: .5; }
.rv-lesson.now { box-shadow: inset 0 0 0 2px var(--accent); }
.rv-l-time { flex: none; display: flex; flex-direction: column; inline-size: 44px; font-variant-numeric: tabular-nums; }
.rv-l-time b { font-size: 15px; font-weight: 600; }
.rv-l-time span { font-size: 12px; color: var(--hint); }
.rv-l-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rv-l-subject { font-size: 15px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.rv-l-meta { font-size: 13px; line-height: 1.3; color: var(--subtitle); overflow-wrap: anywhere; }
.rv-l-pair { flex: none; font-size: 12px; font-weight: 600; color: var(--hint); }
.rv-exam { margin-block-start: 6px; background: linear-gradient(rgb(var(--tint-rgb) / 0.12), rgb(var(--tint-rgb) / 0.12)), var(--bg2); }

.rv-dl { display: flex; align-items: stretch; gap: 0; margin-block-start: 6px; }
/* A step of the student's own goal (chain): a quiet row with a flag; "no margin" / "too late" in its meta line. */
.rv-goal { margin-block-start: 6px; padding-inline-start: 0; }
.rv-goal-ico { flex: none; display: grid; place-items: center; inline-size: 44px; color: var(--hint); }
.rv-goal-ico .ico { inline-size: 22px; block-size: 22px; }
.rv-goal.warn .rv-goal-ico { color: var(--accent); }
.rv-check {
  flex: none; display: grid; place-items: center; inline-size: 44px; min-block-size: 44px;
  border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0;
}
.rv-check .ico {
  inline-size: 26px; block-size: 26px; padding: 4px; border-radius: 13px; stroke-width: 2.6;
  box-shadow: inset 0 0 0 2px var(--hint); color: transparent;
  transition: background-color var(--rv-micro), color var(--rv-micro), scale var(--rv-micro);
}
.rv-dl.done .rv-check .ico { background: var(--accent); box-shadow: none; color: var(--accent-text); scale: 1.06; }
.rv-dl.done .rv-dl-main .rv-l-subject { text-decoration: line-through; color: var(--hint); }
.rv-dl-main { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }

.rv-note { margin: 0 0 6px; padding-inline: 4px; font-size: 14px; color: var(--subtitle); overflow-wrap: anywhere; }
.rv-holiday b { color: var(--text); }

/* A future day is ONE row: "Mon 12 Oct · 4 classes · 08:30–14:20 •••• ›"; a tap unfolds its classes below on the
   navigation spring, and the row then stays on top as the day's header while they scroll. */
.rv-sum-head { margin: 0; font: inherit; }
.rv-day.folding.open > .rv-sum-head { position: sticky; inset-block-start: var(--sat); z-index: 1; background: var(--bg); }
.rv-summary {
  display: flex; align-items: center; gap: 8px;
  inline-size: 100%; min-block-size: 50px; padding-block: 8px; padding-inline: 14px 12px;
  border: 0; border-radius: 14px; background: var(--bg2); color: var(--text);
  font: inherit; font-size: 15px; text-align: start; cursor: pointer; font-variant-numeric: tabular-nums;
}
.rv-sum-day { flex: none; font-weight: 600; white-space: nowrap; }
.rv-sum-text { flex: 1; min-width: 0; text-align: end; font-size: 14px; color: var(--subtitle); }
.rv-chev { display: grid; color: var(--hint); transition: rotate var(--rv-nav); }
.rv-chev .ico { inline-size: 16px; block-size: 16px; stroke-width: 2.2; }
.rv-day.open > .rv-sum-head .rv-chev, .rv-day-done.open > .rv-done .rv-chev { rotate: 90deg; }
:root[dir="rtl"] .rv-chev { scale: -1 1; }
.rv-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--rv-nav); }
.rv-fold-inner { min-height: 0; overflow: hidden; }
.rv-day.open > .rv-fold { grid-template-rows: 1fr; }
.rv-day.open > .rv-fold > .rv-fold-inner { padding-block-start: 6px; }
.rv-day:not(.open) > .rv-fold > .rv-fold-inner { visibility: hidden; transition: visibility 0s .35s; }

.rv-empty-run { margin: 0; padding-block: 6px; padding-inline: 4px; font-size: 14px; color: var(--hint); }

/* "Done for today ✓": today folded; a tap opens it. */
.rv-done {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  inline-size: 100%; min-block-size: 48px; padding-block: 10px; padding-inline: 14px;
  border: 0; border-radius: 14px; background: var(--bg2); color: var(--text);
  font: inherit; font-size: 16px; font-weight: 600; text-align: start; cursor: pointer;
}

/* The week the file doesn't cover: hatched, with the "send the new file" door. Hatching, not colour. */
.rv-uncovered, .rv-before {
  display: grid; gap: 6px; justify-items: start;
  padding: 14px 16px; border-radius: var(--rv-radius);
  background: repeating-linear-gradient(-45deg, rgb(var(--text-rgb) / 0.06) 0 6px, transparent 6px 12px), var(--bg2);
  box-shadow: inset 0 0 0 1px var(--sep);
}
.rv-uncovered b { font-size: 16px; overflow-wrap: anywhere; }
.rv-uncovered p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--subtitle); }
.rv-before { font-size: 15px; font-weight: 600; }

.rv-sentinel { block-size: 1px; }
.rv-foot { margin-block-start: 16px; padding-inline: 4px; font-size: 13px; color: var(--hint); text-align: center; }
.rv-foot .link-btn { font-size: 13px; }

/* ---------- motion: crossfade on fresh data, the jump to a day, the first-entry cascade ---------- */

.rv-xfade { animation: rv-xfade .26s ease both; }
@keyframes rv-xfade { from { opacity: .35; } to { opacity: 1; } }
.rv-flash { animation: rv-flash 1.1s ease; border-radius: 14px; }
@keyframes rv-flash { 25% { box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.45); } }
/* Release 11.1 (docs/telegram-bot/release-11-1-contract.md §7): the Island's door (now/<date>/<pair>) — that class's
   card, or its row, breathes ONCE: an accent tint comes in over the first 30 % and is gone by the end (under the text:
   the element is its own stack, the tint at -1), and the card lifts by 1.2 % and settles. No haptic, no sheet, no toast;
   now.js takes the class off when it ends (no fill: the card's own :active scale stays its own). */
.rv-pulse { position: relative; isolation: isolate; }
.rv-pulse::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: rgb(var(--accent-rgb) / 0.12); opacity: 0;
  animation: rv-pulse-tint .9s ease-in-out;
}
.rv-card.rv-pulse { animation: rv-pulse-lift .9s ease-in-out; }
@keyframes rv-pulse-tint { 30% { opacity: 1; } }
@keyframes rv-pulse-lift { 30% { scale: 1.012; } }
.rv-cascade > * { animation: rv-in var(--rv-nav) both; animation-delay: calc(var(--i, 12) * 30ms); }
@keyframes rv-in { from { opacity: 0; translate: 0 8px; } }

/* The Now sections (iftar, weather, good night) inside the river, right after today. */
.rv-sections:empty { display: none; }
.rv-sections > .feature-section:first-child > .group-title { margin-top: 12px; }

/* ---------- the pair sheet ---------- */
.rv-pair-change { display: grid; gap: 8px; margin-block: 6px 4px; }
.rv-pair-changed { margin: 0; padding-inline: 4px; font-size: 15px; font-weight: 600; color: var(--accent); }

.rv-pair-head { display: flex; align-items: center; gap: 12px; margin-block-start: 8px; padding-inline: 4px; }
.rv-pair-head.next { margin-block-start: 26px; }
.rv-pair-title { min-width: 0; display: flex; flex-direction: column; }
.rv-pair-title b { font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.rv-pair-title span { font-size: 14px; color: var(--subtitle); }
.rv-pair .group { margin-block-start: 12px; }
.rv-copy { flex: none; }
.rv-pair-verbs { display: grid; gap: 10px; margin-block-start: 22px; }

/* ---------- release 2: the group secretary (spec §5.3, §5.11) ----------
   A corrected value: the new one, the old one struck in the hint colour beside it. A cancelled class stays in its day,
   its subject struck and dimmed, the word «Отменена» first. Classmates' reports: one grey line that changes nothing.
   The viewer's own mark: a small «ты» pill (words, never colour alone). */
.rv-was { color: var(--hint); font-weight: 400; text-decoration-thickness: 1.5px; }
.rv-room .rv-was { font-size: 20px; letter-spacing: 0; }
.rv-time .rv-was { font-size: 15px; }
.rv-l-time .rv-was { font-size: 11px; }
.rv-lesson.off { opacity: .62; }
.rv-lesson.off .rv-l-subject { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.rv-off-word { font-weight: 600; color: var(--text); }
.rv-l-note, .rv-card-fix { display: flex; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; font-size: 12px; line-height: 1.3; }
.rv-card-fix { margin-block-start: 6px; font-size: 13px; }
.rv-fix-by { color: var(--subtitle); }
.rv-hint { color: var(--hint); }
.rv-you, .rv-you-mark {
  display: inline-block; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 18px;
  color: var(--accent); background: rgb(var(--accent-rgb) / 0.12); vertical-align: middle; letter-spacing: 0;
}
.rv-room .rv-you { font-size: 13px; }
.rv-fix { display: grid; gap: 4px; margin-block: 10px 0; padding: 10px 12px; border-radius: 14px; background: var(--bg2); }
.rv-fix p { margin: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.rv-fix-title { color: var(--subtitle); }
.rv-fix-title b { color: var(--text); }
.rv-fix-vals { display: flex; flex-wrap: wrap; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.rv-fix .rv-hint { font-size: 13px; }
.rv-you-line { color: var(--subtitle); }
.rv-pair-head.off .rv-pair-title b, .rv-pair-head.off .rv-pair-title span { text-decoration: line-through; }
.rv-pair-more[hidden] { display: none; }
.rv-pair-more { margin-block-start: 10px; }

/* ---------- widths, tiers, motion and contrast preferences ---------- */

@media (max-width: 359px) {
  .rv-room { font-size: 28px; }
  .rv-time { font-size: 18px; }
  .rv-card { padding: 14px; }
  .rv-l-time { inline-size: 40px; }
  .rv-badge.sm { display: none; }        /* the tint stripe and the subject's name still say which subject */
  .rv-att-main { padding-inline-start: 12px; gap: 10px; }
  .rv-summary { padding-inline: 12px 10px; gap: 6px; }
  .rv-summary .rv-dots { display: none; }  /* "3 classes" already says how full the day is */
}

/* Tier C (solid chrome, weak GPUs, more contrast): edges instead of soft fills. */
:root[data-tier="C"] .rv-card, :root[data-tier="C"] .rv-attn-list,
:root[data-tier="C"] .rv-summary, :root[data-tier="C"] .rv-done { box-shadow: inset 0 0 0 1px var(--sep); }
:root[data-tier="C"] .rv-skel { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .rv-fold, .rv-chev, .rv-check .ico, .rv-ring i, .rv-card, .rv-lesson, .rv-exam, .rv-dl-main, .rv-goal { transition: none !important; }
  .rv-cascade > *, .rv-flash { animation: none !important; }
  .rv-xfade { animation: rv-xfade .15s linear both !important; }
  /* the Island's pulse: the tint crossfades in and out, 150 ms each, nothing moves */
  .rv-card.rv-pulse { animation: none !important; }
  .rv-pulse::after { animation: rv-pulse-fade .3s linear !important; }
}
@keyframes rv-pulse-fade { 50% { opacity: 1; } }

@media (prefers-contrast: more) {
  .rv-card, .rv-attn-list, .rv-summary, .rv-done, .rv-lesson, .rv-exam, .rv-dl-main, .rv-goal { box-shadow: inset 0 0 0 1px var(--text); }
  .rv-card-meta, .rv-card-note, .rv-l-meta, .rv-att-sub, .rv-empty-run, .rv-week, .rv-sub, .rv-foot { color: var(--text); }
  .rv-lesson.past { opacity: .75; }
  .rv-badge { box-shadow: inset 0 0 0 2px var(--text); }
  .rv-lesson.off { opacity: .8; }
  .rv-was, .rv-hint, .rv-fix-by { color: var(--text); }
  .rv-you, .rv-you-mark { box-shadow: inset 0 0 0 1px var(--accent); }
}

/* ======================================================================================================================
   Release 11 «Большой экран» (docs/telegram-bot/release-11-contract.md §7.1): Now on medium (700–1023) and wide (≥ 1024).
   Every rule is under :root:not([data-layout="compact"]) or :root[data-layout="wide"]: the phone is exactly as above.
   The root asks for the whole content area (now.js width: 'full') and lays out its own columns:
     medium (and wide below 960 px of content)   one readable column (≤ --content-max), the card's room and time larger
     wide, content ≥ 960 (now.js .rv-cols)        the river (≤ 640) | a sticky side column (340): the card, «Нужно
                                                  внимание», the Now sections; the header spans both
   ====================================================================================================================== */

:root:not([data-layout="compact"]) .rv { max-inline-size: var(--content-max); margin-inline: auto; }

/* The card on the big screen: the room and the time larger, the subject and the teacher whole. */
:root:not([data-layout="compact"]) .rv-card { padding: 18px 20px 20px; }
:root:not([data-layout="compact"]) .rv-room { font-size: 40px; }
:root:not([data-layout="compact"]) .rv-time { font-size: 22px; }
:root:not([data-layout="compact"]) .rv-room .rv-was { font-size: 22px; }
:root:not([data-layout="compact"]) .rv-card-subject { font-size: 19px; }
:root:not([data-layout="compact"]) .rv-card-meta { font-size: 16px; }

/* A day's sticky header stops under the top bar (medium, and wide with the sidebar hidden); with the sidebar there is no
   bar above the content. now.js stickyTop reads this back when it scrolls to a day. */
:root:not([data-layout="compact"]):not([data-sidebar]) .rv-day-head,
:root:not([data-layout="compact"]):not([data-sidebar]) .rv-day.folding.open > .rv-sum-head {
  inset-block-start: calc(var(--sat) + var(--topbar-h) + 18px);
}

/* Wide with room: two columns. */
:root[data-layout="wide"] .rv.rv-cols {
  display: grid; grid-template-columns: minmax(0, 640px) 340px; column-gap: 32px; justify-content: center;
  align-items: start; max-inline-size: none;
}
:root[data-layout="wide"] .rv-cols > .rv-head { grid-column: 1 / -1; grid-row: 1; }
:root[data-layout="wide"] .rv-cols > .rv-main { grid-column: 1; grid-row: 2; min-width: 0; }
:root[data-layout="wide"] .rv-cols > .rv-main > .rv-river { margin-block-start: 12px; }
:root[data-layout="wide"] .rv-cols > .rv-side {
  grid-column: 2; grid-row: 2; min-width: 0;
  position: sticky; inset-block-start: calc(var(--sat) + 16px);
  max-block-size: calc(100dvh - var(--sat) - var(--sab) - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding-block-end: 12px;
  scrollbar-width: thin; scrollbar-color: rgb(var(--text-rgb) / 0.25) transparent;
}
:root[data-layout="wide"]:not([data-sidebar]) .rv-cols > .rv-side {
  inset-block-start: calc(var(--sat) + var(--topbar-h) + 22px);
  max-block-size: calc(100dvh - var(--sat) - var(--topbar-h) - var(--sab) - 40px);
}
:root[data-layout="wide"] .rv-side > .rv-card-host { margin-block-start: 12px; }
:root[data-layout="wide"] .rv-side > .rv-attn { margin-block-start: 20px; }
:root[data-layout="wide"] .rv-side > .rv-sections > .feature-section:first-child > .group-title { margin-top: 20px; }
/* In 340 px the verb's action keeps to its row; the attention row's action may take two lines. */
:root[data-layout="wide"] .rv-side .rv-att-act { max-inline-size: 46%; }

/* Pointer: rows and cards answer the mouse (hover only with a fine pointer, never the only carrier). */
@media (hover: hover) and (pointer: fine) {
  :root:not([data-layout="compact"]) :is(.rv-lesson:not(.lp), .rv-exam, .rv-dl-main, .rv-goal, .rv-summary, .rv-done, .rv-att-main):hover {
    background-image: linear-gradient(rgb(var(--text-rgb) / 0.04), rgb(var(--text-rgb) / 0.04));
  }
  :root:not([data-layout="compact"]) .rv-card:not(.rv-card-plain):hover {
    box-shadow: inset 0 0 0 1px rgb(var(--tint-rgb, var(--accent-rgb)) / 0.5);
  }
  :root:not([data-layout="compact"]) .rv-check:hover .ico { box-shadow: inset 0 0 0 2px var(--accent); }
}
@media (prefers-contrast: more) {
  :root[data-layout="wide"] .rv-cols > .rv-side { scrollbar-color: var(--text) transparent; }
}
