/* ==========================================================================
   ЯДРО-2026 programme — design system & components
   Plain CSS, no build step. Tokens first, then layout, then components.
   ========================================================================== */

/* ---------- Typeface: Onest (OFL), bundled locally ------------------------ */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(assets/fonts/onest-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(assets/fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* Math slice: only codepoints that exist in onest-math.woff2 (Onest has no Greek,
   √ U+221A, or super/subscripts — those fall through to the system stack). */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(assets/fonts/onest-math.woff2) format("woff2");
  unicode-range: U+00A7, U+00B1, U+00D7, U+00F7, U+0302-0303, U+0307-0308, U+0312, U+0326-0327, U+2117, U+2190-2193, U+2196-2199, U+21A9, U+21B6-21B7, U+21BA-21BB, U+2212, U+2248, U+2260, U+2264-2265, U+27F5-27F6; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(assets/fonts/onest-latin-ext.woff2) format("woff2");
  /* U+1D00-1DBF (incl. ᵐ) is not in the woff2 — omit so isomer marks fall back. */
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(assets/fonts/onest-latin.woff2) format("woff2");
  /* Omit ¹ ² ³ (U+00B2, B3, B9): Onest has those but not ⁰⁴–⁹, so mixed masses
     like ¹⁹⁷ sat 1 in Onest and 9 in Segoe at different heights. */
  unicode-range: U+0000-00B1, U+00B4-00B8, U+00BA-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens -------------------------------------------------------- */
:root {
  --font-sans: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-2xl: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 380ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  --topbar-h: 60px;
  --daybar-h: 56px;
  --bottom-nav-h: 64px;
  --content-max: 1200px;
  --rail-w: 5.4rem;
  --rail-dot: 12px;
  --rail-line: 2px;
  --slot-collapse-h: 42px;

  /* light theme (hsl fallbacks; oklch below when supported) */
  --bg: hsl(230 15% 97.5%);
  --surface: hsl(0 0% 100%);
  --surface-2: hsl(230 14% 95%);
  --surface-3: hsl(230 12% 91%);
  --text: hsl(232 22% 16%);
  --text-2: hsl(232 12% 38%);
  --text-3: hsl(232 10% 55%);
  --border: hsl(230 14% 89%);
  --border-2: hsl(230 12% 82%);
  --accent: hsl(228 70% 52%);
  --accent-ink: #fff;
  --accent-soft: hsl(228 80% 95%);
  --accent-soft-2: hsl(228 70% 89%);
  --now: hsl(8 82% 55%);
  --now-soft: hsl(8 90% 95%);
  --warn: hsl(38 92% 45%);
  --warn-soft: hsl(38 100% 93%);
  --danger: hsl(2 70% 50%);
  --glass: hsl(230 15% 97.5% / .78);
  --shadow-sm: 0 1px 2px hsl(232 30% 10% / .06), 0 1px 1px hsl(232 30% 10% / .04);
  --shadow-md: 0 2px 4px hsl(232 30% 10% / .05), 0 10px 28px -10px hsl(232 30% 10% / .18);
  --shadow-lg: 0 8px 20px hsl(232 30% 10% / .08), 0 30px 60px -20px hsl(232 30% 10% / .3);
  --scrim: hsl(232 30% 10% / .45);

  /* section colour maths */
  --sec-l-tint: 96%;  --sec-c-tint: .035;
  --sec-l-stripe: 60%; --sec-c-stripe: .17;
  --sec-l-text: 38%;  --sec-c-text: .13;
  --sec-l-soft: 92%;  --sec-c-soft: .06;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: hsl(232 14% 9.5%);
  --surface: hsl(232 13% 13%);
  --surface-2: hsl(232 12% 17%);
  --surface-3: hsl(232 11% 22%);
  --text: hsl(230 20% 93%);
  --text-2: hsl(230 12% 70%);
  --text-3: hsl(230 9% 55%);
  --border: hsl(232 12% 22%);
  --border-2: hsl(232 12% 30%);
  --accent: hsl(224 80% 72%);
  --accent-ink: hsl(232 30% 12%);
  --accent-soft: hsl(226 40% 22%);
  --accent-soft-2: hsl(226 40% 28%);
  --now: hsl(10 90% 66%);
  --now-soft: hsl(10 40% 20%);
  --warn: hsl(40 90% 62%);
  --warn-soft: hsl(40 40% 20%);
  --danger: hsl(2 80% 66%);
  --glass: hsl(232 14% 9.5% / .74);
  --shadow-sm: 0 1px 2px hsl(0 0% 0% / .3);
  --shadow-md: 0 2px 4px hsl(0 0% 0% / .25), 0 12px 32px -12px hsl(0 0% 0% / .5);
  --shadow-lg: 0 10px 24px hsl(0 0% 0% / .35), 0 40px 80px -24px hsl(0 0% 0% / .6);
  --scrim: hsl(232 30% 4% / .6);
  --sec-l-tint: 24%;  --sec-c-tint: .045;
  --sec-l-stripe: 72%; --sec-c-stripe: .15;
  --sec-l-text: 84%;  --sec-c-text: .09;
  --sec-l-soft: 30%;  --sec-c-soft: .07;
  color-scheme: dark;
}

@supports (color: oklch(50% 0.1 200)) {
  :root {
    --bg: oklch(98.2% 0.005 265);
    --surface: oklch(100% 0 0);
    --surface-2: oklch(96.4% 0.007 265);
    --surface-3: oklch(93% 0.009 265);
    --text: oklch(24% 0.025 270);
    --text-2: oklch(46% 0.022 270);
    --text-3: oklch(62% 0.018 270);
    --border: oklch(91% 0.01 265);
    --border-2: oklch(85.5% 0.013 265);
    --accent: oklch(54% 0.19 262);
    --accent-soft: oklch(95% 0.035 262);
    --accent-soft-2: oklch(90% 0.06 262);
    --now: oklch(62% 0.2 30);
    --now-soft: oklch(95.5% 0.03 30);
    --warn: oklch(70% 0.15 75);
    --warn-soft: oklch(95% 0.05 85);
    --glass: oklch(98.2% 0.005 265 / .78);
  }
  html[data-theme="dark"] {
    --bg: oklch(18.5% 0.015 270);
    --surface: oklch(22.5% 0.016 270);
    --surface-2: oklch(26.5% 0.017 270);
    --surface-3: oklch(31% 0.018 270);
    --text: oklch(94% 0.01 270);
    --text-2: oklch(74% 0.015 270);
    --text-3: oklch(60% 0.015 270);
    --border: oklch(30% 0.015 270);
    --border-2: oklch(37% 0.017 270);
    --accent: oklch(78% 0.12 262);
    --accent-ink: oklch(20% 0.03 262);
    --accent-soft: oklch(30% 0.06 262);
    --accent-soft-2: oklch(36% 0.08 262);
    --now: oklch(74% 0.16 30);
    --now-soft: oklch(30% 0.06 30);
    --warn: oklch(80% 0.13 80);
    --warn-soft: oklch(32% 0.06 80);
    --glass: oklch(18.5% 0.015 270 / .74);
  }
}

/* section hues (OKLCH hue angles); --cm scales chroma for the neutral plenary tone */
[data-color] { --cm: 1; }
[data-color="blue"]   { --h: 255; }
[data-color="green"]  { --h: 150; }
[data-color="orange"] { --h: 60; }
[data-color="red"]    { --h: 22; }
[data-color="purple"] { --h: 305; }
[data-color="teal"]   { --h: 195; }
[data-color="pink"]   { --h: 350; }
[data-color="slate"]  { --h: 265; --cm: .28; }

[data-color] {
  --sec-tint:   hsl(var(--h) 60% 94%);
  --sec-soft:   hsl(var(--h) 60% 88%);
  --sec-stripe: hsl(var(--h) 60% 50%);
  --sec-text:   hsl(var(--h) 55% 32%);
}
html[data-theme="dark"] [data-color] {
  --sec-tint:   hsl(var(--h) 25% 20%);
  --sec-soft:   hsl(var(--h) 25% 26%);
  --sec-stripe: hsl(var(--h) 60% 68%);
  --sec-text:   hsl(var(--h) 60% 82%);
}
@supports (color: oklch(50% 0.1 200)) {
  [data-color] {
    --sec-tint:   oklch(var(--sec-l-tint) calc(var(--sec-c-tint) * var(--cm)) var(--h));
    --sec-soft:   oklch(var(--sec-l-soft) calc(var(--sec-c-soft) * var(--cm)) var(--h));
    --sec-stripe: oklch(var(--sec-l-stripe) calc(var(--sec-c-stripe) * var(--cm)) var(--h));
    --sec-text:   oklch(var(--sec-l-text) calc(var(--sec-c-text) * var(--cm)) var(--h));
  }
}

/* font-size steps (A / A+ / A++) */
html[data-font="1"] { font-size: 100%; }
html[data-font="2"] { font-size: 112.5%; }
html[data-font="3"] { font-size: 125%; }

/* ---------- Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (max-width: 899px) { html { overscroll-behavior-x: none; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  min-height: 100dvh;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
html.is-sheet-open { overflow: hidden; overscroll-behavior: none; scroll-behavior: auto; }
html.is-sheet-open body {
  position: fixed; left: 0; right: 0; width: 100%; overflow: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.012em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm); }
.skip-link:focus { top: 8px; }

.ico { display: inline-flex; width: 1.25em; height: 1.25em; flex: 0 0 auto; vertical-align: -0.28em; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.filled svg { fill: currentColor; }

/* ---------- Top bar ------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--content-max); margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 clamp(12px, 3vw, 24px);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; flex: 1 1 0; min-width: 0; overflow: hidden; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto;
  background:
    radial-gradient(circle at 30% 30%, oklch(90% 0.08 262 / .9), transparent 45%),
    linear-gradient(135deg, var(--accent), oklch(60% 0.2 300));
  box-shadow: inset 0 0 0 1px hsl(0 0% 100% / .25), var(--shadow-sm);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  border: 2px solid hsl(0 0% 100% / .85); border-right-color: transparent; transform: rotate(-30deg);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-title { font-weight: 750; letter-spacing: -0.02em; font-size: 1.05rem; overflow: visible; white-space: normal; line-height: 1.1; overflow-wrap: normal; word-break: keep-all; }
.brand-sub { font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  :root { --topbar-h: 72px; }
  .brand-sub { display: none; }
  .topbar-inner { gap: 8px; }
  .brand { gap: 8px; }
}

.nav-desktop { display: none; margin-left: 12px; gap: 2px; }
@media (min-width: 900px) { .nav-desktop { display: flex; } }
.nav-desktop .tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-pill); border: 0; background: transparent;
  color: var(--text-2); font-weight: 550; font-size: var(--fs-sm);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-desktop .tab:hover { background: var(--surface-2); color: var(--text); }
.nav-desktop .tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.nav-desktop .tab .count { font-size: var(--fs-xs); background: var(--surface-3); color: var(--text-2); padding: 1px 7px; border-radius: var(--r-pill); }
.nav-desktop .tab[aria-selected="true"] .count { background: var(--accent); color: var(--accent-ink); }

.controls { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ctl {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px;
  padding: 0 12px; border-radius: var(--r-pill); border: 1px solid transparent;
  background: transparent; color: var(--text-2); font-size: var(--fs-sm); font-weight: 550;
  position: relative;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.ctl:hover { background: var(--surface-2); color: var(--text); }
.ctl:active { transform: scale(.96); }
.ctl-icon { padding: 0; width: 40px; justify-content: center; }
.ctl .ico { width: 1.3em; height: 1.3em; }
.ctl-label { display: none; }
@media (min-width: 720px) { .ctl-label { display: inline; } }
.ctl.lang { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ctl.lang .lang-sep { color: var(--text-3); margin: 0 2px; }
.ctl.lang span { opacity: .55; }
.ctl.lang[data-lang="ru"] .lang-ru, .ctl.lang[data-lang="en"] .lang-en { opacity: 1; color: var(--text); font-weight: 700; }
@media (max-width: 560px) {
  .controls { gap: 4px; }
  .ctl { padding: 0 8px; }
  .ctl-icon { padding: 0; }
}
.badge {
  position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; min-width: 8px; padding: 0;
  border-radius: 50%; background: var(--now); font-size: 0; line-height: 0;
}

/* ---------- Day bar ------------------------------------------------------- */
.daybar { border-top: 1px solid var(--border); }
.daybar-inner {
  max-width: var(--content-max); margin: 0 auto; height: var(--daybar-h);
  padding: 0 clamp(12px, 3vw, 24px);
  display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
}
.daybar-inner::-webkit-scrollbar { display: none; }
.daypill {
  flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 64px; height: 44px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid transparent; background: transparent; color: var(--text-2); line-height: 1.1;
  transition: background var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease), transform var(--dur-fast) var(--ease);
  position: relative;
}
.daypill .dow { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.daypill .dom { font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.daypill:hover { background: var(--surface-2); color: var(--text); }
.daypill[aria-selected="true"] { background: var(--text); color: var(--bg); }
html[data-theme="dark"] .daypill[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.daypill.is-today::after { content: ""; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 2px var(--bg); }
.daypill[aria-selected="true"].is-today::after { box-shadow: 0 0 0 2px var(--text); }
.day-week {
  display: flex; align-items: center; gap: 2px; flex: 0 0 auto;
  border-radius: var(--r-pill); padding: 2px;
  background: transparent;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.day-week.is-overview {
  background: var(--text);
}
html[data-theme="dark"] .day-week.is-overview { background: var(--accent); }
.day-week.is-overview .daypill { color: color-mix(in srgb, var(--bg) 78%, transparent); background: transparent; }
.day-week.is-overview .daypill:hover { background: hsl(0 0% 100% / .14); color: var(--bg); }
.day-week.is-overview .daypill[aria-selected="true"] { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .day-week.is-overview .daypill[aria-selected="true"] { background: var(--surface); color: var(--text); }
.day-week.is-overview .daypill.is-today::after { box-shadow: 0 0 0 2px var(--text); }
html[data-theme="dark"] .day-week.is-overview .daypill.is-today::after { box-shadow: 0 0 0 2px var(--accent); }
.day-week.is-overview .daypill[aria-selected="true"].is-today::after { box-shadow: 0 0 0 2px var(--bg); }
html[data-theme="dark"] .day-week.is-overview .daypill[aria-selected="true"].is-today::after { box-shadow: 0 0 0 2px var(--surface); }
.daybar .spacer { flex: 1; }
.daybar .daybar-action, .daybar-changes { flex: 0 0 auto; }
@media (max-width: 719px) {
  .topbar:has(#daybar:not([hidden])) #btn-changes { display: none; }
}
@media (min-width: 720px) {
  .daybar-changes { display: none; }
}
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--r-pill); padding: 2px; background: var(--surface); flex: 0 0 auto; }
.seg-btn {
  min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--text-2); font-weight: 650; font-size: var(--fs-xs); white-space: nowrap;
}
.seg-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
html[data-theme="dark"] .seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- Main ---------------------------------------------------------- */
.main { max-width: var(--content-max); margin: 0 auto; padding: clamp(14px, 2.5vw, 28px) clamp(12px, 3vw, 24px) 40px; }
.main:focus { outline: none; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.page-title { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: -0.025em; }
.page-title .dim { color: var(--text-3); font-weight: 500; }
.page-sub { color: var(--text-2); font-size: var(--fs-sm); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.page-sub .sep { color: var(--text-3); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: var(--fs-sm); box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: var(--fs-xs); }
.btn.danger { color: var(--danger); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.chips.scroll::-webkit-scrollbar { display: none; }
@media (min-width: 900px), (hover: hover) and (pointer: fine) {
  .chips.scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
}
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: var(--fs-sm); font-weight: 550;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip:active { transform: scale(.97); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sec-stripe, var(--text-3)); flex: 0 0 auto; }
.chip[aria-pressed="true"] { background: var(--sec-tint, var(--accent-soft)); color: var(--sec-text, var(--accent)); border-color: var(--sec-soft, var(--accent-soft-2)); }
.chip.plain[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
html[data-theme="dark"] .chip.plain[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* filter row */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.filters .filters-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 650; }

/* now / next */
.now-card {
  display: grid; gap: 10px; padding: 14px 16px; margin-bottom: 18px;
  border-radius: var(--r-md); background: var(--now-soft); border: 1px solid color-mix(in srgb, var(--now) 30%, transparent);
}
.now-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.now-label { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--now); }
.now-label.next { color: var(--text-2); }
.now-label .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 0 var(--now); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--now) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.now-items { display: flex; flex-wrap: wrap; gap: 6px; }
.now-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text); }
.now-item:hover { border-color: var(--border-2); text-decoration: none; }
.now-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sec-stripe, var(--text-3)); }

/* ---------- Timeline ------------------------------------------------------ */
.timeline { position: relative; display: grid; gap: 14px; }
.timeline::before {
  content: ""; position: absolute; top: 10px; bottom: 10px; pointer-events: none;
  /* Dot sits in the last 12px of --rail-w; subtract half the 2px stroke (original `… / 2 - 1px`). */
  left: calc(var(--rail-w) - var(--rail-dot) / 2 - var(--rail-line) / 2);
  width: var(--rail-line);
  background: var(--border);
}
.timeline.is-start::before { top: var(--rail-cap-top, 10px); }
.timeline.is-end::before { bottom: var(--rail-cap-bottom, 10px); }
.slot { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: 0 10px; align-items: start; position: relative; scroll-margin-top: calc(var(--topbar-h) + var(--daybar-h) + 3.25rem + 8px); }
.slot:not(:has(.parallel)) { align-items: center; }
.slot:has(.parallel) { align-items: stretch; }
.slot:has(.parallel) .slot-time { align-self: start; }
@media (max-width: 599px) { :root { --rail-w: 4.5rem; } .timeline { gap: 10px; } }
.slot-time {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-dot); grid-template-rows: auto auto;
  align-items: center; column-gap: 8px; padding: 0; text-align: right; z-index: 1;
}
.slot:has(.parallel-grid:not(.is-collapsed)) .slot-time {
  position: sticky; top: 45vh; top: 45dvh;
}
.slot-time .t-start, .slot-time .t-end {
  grid-column: 1; background: var(--bg); padding: 0 4px; position: relative; z-index: 1; border-radius: 4px; justify-self: end;
}
.slot-time .t-start { grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--fs-md); letter-spacing: -0.01em; }
.slot-time .t-end { grid-row: 2; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.slot-time .rail-dot {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: center;
  width: var(--rail-dot); height: var(--rail-dot); margin: 0; border-radius: 50%;
  background: var(--surface); border: var(--rail-line) solid var(--border-2);
  box-shadow: 0 0 0 4px var(--bg);
}
.slot.is-past .slot-time { opacity: .55; }
.slot.is-now .slot-time .rail-dot { background: var(--now); border-color: var(--now); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--now-soft); animation: pulse 2.2s ease-out infinite; }
.slot.is-now .slot-time .t-start { color: var(--now); }
.slot-body { min-width: 0; display: grid; gap: 10px; }
.slot-group { display: grid; gap: 14px; }
@media (max-width: 599px) { .slot-group { gap: 10px; } }
.slot-group-label {
  margin-left: var(--rail-w); text-align: center; font-size: var(--fs-xs); font-weight: 750;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 2px 0 0;
}
html[data-slot-groups="off"] .slot-group-label { display: none; }

.day-chunk { scroll-margin-top: calc(var(--topbar-h) + var(--daybar-h) + 8px); padding-bottom: 28px; }
.day-chunk + .day-chunk { border-top: 1px solid var(--border); padding-top: 8px; }
.day-chunk-head {
  position: sticky; top: calc(var(--topbar-h) + var(--daybar-h)); z-index: 3;
  background: var(--bg); padding: 8px 0 6px; margin: 0;
}
.day-chunk-head .page-title { font-size: var(--fs-xl); }
.day-chunk > .page-sub { margin-top: 0; margin-bottom: 10px; }

.slot-collapse { display: none; }
@media (min-width: 900px) {
  .slot-collapse {
    display: inline-flex; align-items: center; gap: 6px; align-self: end; justify-self: end;
    min-height: 32px; padding: 0 12px; margin: 0 0 4px auto; border: 0; border-radius: var(--r-pill);
    background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 650;
  }
  .slot-collapse:hover { background: var(--surface-3); color: var(--text); }
  .slot:has(.parallel) .slot-time { margin-top: var(--slot-collapse-h); }
}

/* generic card */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
@media (hover: hover) { .card.hoverable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--border-2); } }
.card.dimmed { opacity: .38; filter: saturate(.6); }
.card.dimmed:hover { opacity: .8; }

/* break / social rows */
.row-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--border-2); color: var(--text-2); }
.row-card .ico { color: var(--text-3); width: 1.4em; height: 1.4em; }
.row-card .row-title { font-weight: 600; color: var(--text-2); }
.row-card .row-meta { font-size: var(--fs-xs); color: var(--text-3); }
.row-card.social { background: var(--surface); border-style: solid; color: var(--text); box-shadow: var(--shadow-sm); }
.row-card.social .ico { color: var(--accent); }
.row-card.social .row-title { color: var(--text); }
.row-card.milestone { background: linear-gradient(135deg, var(--accent-soft), transparent 70%); border: 1px solid var(--accent-soft-2); }
.row-card.milestone .row-title { color: var(--text); }
.row-card.milestone .ico { color: var(--accent); }
.row-card.poster-row { background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm); cursor: pointer; }
.row-card.poster-row .ico { color: var(--accent); }
.row-card.social-link { cursor: pointer; }

/* plenary card */
.plenary { padding: 14px 8px 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px 4px; cursor: pointer; }
.plenary .kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-xs); color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; font-weight: 650; grid-column: 1; }
.plenary .kicker .sec-chip { text-transform: none; letter-spacing: 0; }
.plenary .ptitle { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.012em; line-height: 1.3; grid-column: 1; text-align: left; }
.plenary .ptitle-text { flex: 1 1 auto; min-width: 0; }
.plenary .pspeaker { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; color: var(--text-2); font-size: var(--fs-sm); grid-column: 1; text-align: left; }
.plenary .pspeaker b { color: var(--text); font-weight: 650; }
.plenary .pmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-3); font-size: var(--fs-xs); grid-column: 1; }
.plenary .star { grid-column: 2; grid-row: 1 / span 4; align-self: start; justify-self: end; }
.plenary.status-cancelled .ptitle { text-decoration: line-through; color: var(--text-3); }

/* sponsor logo on plenary/sponsor cards + detail tile */
.sponsor-logo {
  flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; justify-content: flex-end;
  width: 9rem; height: 1.75rem; padding: 0; background: transparent;
}
.sponsor-logo-img {
  display: block; width: auto; height: 1.75rem; max-width: 9rem; object-fit: contain; object-position: right center;
}
html[data-theme="dark"] .sponsor-logo-img[src*="gammatech"] {
  filter: drop-shadow(0 0 0.7px #fff) drop-shadow(0 0 0.7px rgba(255,255,255,.85));
}
.sponsor-tile {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); color: inherit; text-decoration: none; border: 1px solid var(--border);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.sponsor-tile:hover { border-color: var(--accent); background: var(--accent-soft, var(--surface-3)); }
.sponsor-tile .sponsor-logo { margin-left: 0; width: 10.5rem; height: 2.25rem; justify-content: flex-start; }
.sponsor-tile .sponsor-logo-img { height: 2.25rem; max-width: 10.5rem; object-position: left center; }
.sponsor-tile-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sponsor-tile-name { font-weight: 650; line-height: 1.25; }
.sponsor-tile-host { font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; }
.sponsor-tile .ico { flex: 0 0 auto; color: var(--text-3); width: 1.15em; height: 1.15em; }

/* section chip (coloured pill) */
.sec-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: var(--r-pill); background: var(--sec-tint); color: var(--sec-text); font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; }
.sec-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sec-stripe); }

/* parallel sections grid */
.parallel { container-type: inline-size; display: grid; gap: 6px; justify-items: stretch; }
.parallel-grid { display: grid; column-gap: 10px; row-gap: 10px; grid-template-columns: 1fr; }
@container (min-width: 560px) {
  .parallel-grid {
    grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
    grid-template-rows: auto repeat(var(--talk-rows, 1), auto auto);
    align-items: stretch;
    row-gap: 0;
  }
  .parallel-grid:not(.is-collapsed) .seccard {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: 1 / span calc(var(--talk-rows, 1) * 2 + 1);
    min-width: 0;
    row-gap: 0;
  }
  .parallel-grid:not(.is-collapsed) .seccard > .talk,
  .parallel-grid:not(.is-collapsed) .seccard > .talk-slot {
    grid-row: span 2;
  }
  .parallel-grid:not(.is-collapsed) .seccard > .talk {
    grid-template-rows: subgrid;
  }
}
.parallel-grid.is-collapsed { grid-template-rows: auto; }
@media (min-width: 900px) {
  .parallel-grid.is-collapsed .talk,
  .parallel-grid.is-collapsed .talk-slot { display: none; }
}
@media (max-width: 899px) {
  .seccard:not(.open) > .talk,
  .seccard:not(.open) > .talk-slot { display: none; }
}

/* section card */
.seccard { display: flex; flex-direction: column; }
.seccard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--sec-stripe); }
.sechead {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px;
  width: 100%; height: 100%; align-self: stretch; text-align: left; padding: 12px 12px 12px 16px; border: 0; background: var(--sec-tint); color: inherit;
  transition: background var(--dur-fast) var(--ease); min-width: 0; box-sizing: border-box;
}
.sechead:hover { background: var(--sec-soft); }
.sechead .sec-name {
  flex: 1 1 0; min-width: 0; font-weight: 700; color: var(--sec-text); font-size: var(--fs-md); letter-spacing: -0.01em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; overflow-wrap: break-word;
}
.sechead .sec-meta { flex: 1 1 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: var(--fs-xs); color: var(--text-2); }
.sechead .sec-meta > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.sechead .sec-meta .ico { width: 1.1em; height: 1.1em; vertical-align: -0.2em; opacity: .8; }
.sechead .chev { flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--sec-text); background: hsl(0 0% 100% / .5); transition: transform var(--dur) var(--ease); }
html[data-theme="dark"] .sechead .chev { background: hsl(0 0% 100% / .08); }
.sechead[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (min-width: 900px) { .sechead .chev { display: none; } }

.collapsible { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease); }
.collapsible.open { grid-template-rows: 1fr; }
.collapsible > .collapsible-inner { overflow: hidden; min-height: 0; }

/* talk rows */
.talks { display: flex; flex-direction: column; }
.seccard > .talk { height: 100%; align-self: stretch; }
.talk-slot.empty { border-top: 1px solid var(--border); min-height: 0; }
.talk {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "meta title" "meta speaker";
  column-gap: 12px; align-items: start;
  padding: 10px 12px 10px 14px; border-top: 1px solid var(--border); cursor: pointer; position: relative;
  transition: background var(--dur-fast) var(--ease); text-align: left;
}
.talk:hover { background: var(--surface-2); }
.talk:focus-visible { outline-offset: -3px; }
.talk .t-meta { grid-area: meta; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 3.1em; }
.talk .t-time { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; padding-top: 2px; display: flex; flex-direction: column; gap: 2px; }
.talk .t-time .num { font-size: 10.5px; font-weight: 700; color: var(--sec-text, var(--text-3)); background: var(--sec-tint, var(--surface-2)); border-radius: var(--r-pill); padding: 1px 6px; width: max-content; }
.talk .t-title { grid-area: title; font-weight: 550; line-height: 1.35; letter-spacing: -0.005em; font-size: var(--fs-md); text-align: left; min-width: 0; }
/* Mass numbers: HTML sup/sub of Onest digits, not mixed Unicode superscript glyphs. */
.ptitle sup, .t-title sup, .p-title sup, .sheet-body h2 sup, .pt-title sup, .p-block-title sup,
.ptitle sub, .t-title sub, .p-title sub, .sheet-body h2 sub, .pt-title sub, .p-block-title sub {
  font-family: inherit; font-weight: inherit; font-size: 0.68em; line-height: 1;
}
.ptitle sup, .t-title sup, .p-title sup, .sheet-body h2 sup, .pt-title sup, .p-block-title sup { vertical-align: super; }
.ptitle sub, .t-title sub, .p-title sub, .sheet-body h2 sub, .pt-title sub, .p-block-title sub { vertical-align: sub; }
.talk .t-speaker { grid-area: speaker; color: var(--text-2); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: 2px 8px; text-align: left; min-width: 0; padding-top: 10px; }
.talk .t-speaker b { color: var(--text); font-weight: 600; }
.talk .t-speaker .org { color: var(--text-3); }
.talk .star { margin: 0; }
.talk.is-now { background: var(--now-soft); }
.talk.is-now::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--now); }
.talk.status-cancelled .t-title { text-decoration: line-through; color: var(--text-3); }
.poster.status-cancelled .p-title { text-decoration: line-through; color: var(--text-3); }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 650; }
.status-badge.cancelled { background: hsl(2 80% 95%); color: var(--danger); }
.status-badge.moved { background: var(--warn-soft); color: var(--warn); }
html[data-theme="dark"] .status-badge.cancelled { background: hsl(2 40% 22%); }

/* star button */
.star {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur) var(--ease-spring);
}
.star .ico { width: 1.35em; height: 1.35em; }
.star:hover { background: var(--surface-3); color: var(--text); }
.star[aria-pressed="true"] { color: var(--warn); }
.star[aria-pressed="true"] .ico svg { fill: currentColor; }
.star.pop { animation: pop var(--dur-slow) var(--ease-spring); }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- Sections view ------------------------------------------------- */
.section-hero { padding: 18px 20px; border-radius: var(--r-lg); background: var(--sec-tint); border: 1px solid var(--sec-soft); display: grid; gap: 6px; margin: 16px 0 18px; }
.section-hero .kicker { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--sec-text); }
.section-hero h2 { font-size: var(--fs-xl); color: var(--sec-text); letter-spacing: -0.02em; }
.section-hero .full { color: var(--text-2); }
.section-hero .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: var(--fs-sm); margin-top: 4px; }
.group { margin-bottom: 18px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 0 4px 8px; }
.group-head h3 { font-size: var(--fs-lg); letter-spacing: -0.015em; }
.group-head .when { color: var(--text-2); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.group .card .talk:first-child { border-top: 0; }

/* ---------- Posters ------------------------------------------------------- */
.poster-list { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .poster-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .poster-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.poster { padding: 12px 8px 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 40px; grid-template-areas: "kicker star" "title star" "speaker star"; gap: 4px 8px; cursor: pointer; }
.poster::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--sec-stripe); }
.poster .p-kicker { grid-area: kicker; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); min-width: 0; padding-right: 4px; }
.poster .p-kicker .board { font-weight: 750; color: var(--sec-text); background: var(--sec-tint); padding: 1px 8px; border-radius: var(--r-pill); }
.poster .p-title { grid-area: title; font-weight: 550; line-height: 1.35; text-align: left; min-width: 0; }
.poster .p-speaker { grid-area: speaker; color: var(--text-2); font-size: var(--fs-sm); text-align: left; min-width: 0; }
.poster .p-speaker b { color: var(--text); font-weight: 600; }
.poster .star { grid-area: star; align-self: start; }

/* ---------- Search -------------------------------------------------------- */
.search-box { position: relative; margin-bottom: 14px; }
.search-box > .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 1.3em; height: 1.3em; pointer-events: none; }
.search-box input {
  width: 100%; height: 52px; padding: 0 48px 0 48px; border-radius: var(--r-md); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-md); box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box input[type="search"] { appearance: none; -webkit-appearance: none; }
.search-box input[type="search"]::-webkit-search-cancel-button,
.search-box input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search-box .clear {
  position: absolute; right: 8px; top: 50%; margin-top: -18px;
  width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0;
  background: transparent; color: var(--text-3); display: grid; place-items: center;
}
.search-box .clear .ico {
  position: static; left: auto; top: auto; transform: none; margin: 0;
  width: 18px; height: 18px; pointer-events: none; vertical-align: 0;
}
.search-box .clear:hover { background: var(--surface-2); color: var(--text); }
.result-count { color: var(--text-2); font-size: var(--fs-sm); margin: 0 4px 10px; }
.index { display: grid; gap: 18px; }
.index-letter { display: grid; grid-template-columns: 2.4rem 1fr; gap: 12px; align-items: start; }
.index-letter .letter { font-size: var(--fs-xl); font-weight: 750; color: var(--text-3); line-height: 1; padding-top: 4px; }
.index-names { display: flex; flex-wrap: wrap; gap: 6px; }
.name-chip { padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text); }
.name-chip:hover { border-color: var(--accent); color: var(--accent); }
.name-chip .n { color: var(--text-3); font-size: var(--fs-xs); margin-left: 4px; }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- My schedule --------------------------------------------------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); display: grid; gap: 10px; justify-items: center; }
.empty .ico { width: 3em; height: 3em; color: var(--text-3); }
.empty h3 { color: var(--text); font-size: var(--fs-lg); }
.conflict { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-size: var(--fs-xs); font-weight: 650; }
.hint { font-size: var(--fs-sm); color: var(--text-2); padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.hint .ico { color: var(--text-3); flex: 0 0 auto; margin-top: 2px; }

/* ---------- Bottom nav (mobile) ------------------------------------------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--glass); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  border-top: 1px solid var(--border);
}
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .01em; position: relative; transition: color var(--dur-fast) var(--ease); }
.bottom-nav .tab .ico { width: 1.55em; height: 1.55em; transition: transform var(--dur) var(--ease-spring); }
.bottom-nav .tab[aria-selected="true"] { color: var(--accent); }
.bottom-nav .tab[aria-selected="true"] .ico { transform: translateY(-1px); }
.bottom-nav .tab[aria-selected="true"]::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 40px; height: 28px; border-radius: var(--r-pill); background: var(--accent-soft); z-index: -1; }
.bottom-nav .tab .count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--warn); color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Dialog / bottom sheet ----------------------------------------- */
.sheet {
  border: 0; padding: 0; margin: auto; background: var(--surface); color: var(--text);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: min(680px, calc(100vw - 32px));
  max-height: min(86dvh, 900px); overflow: hidden;
}
.sheet::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in var(--dur-slow) var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet .grabber { display: none; }
@media (max-width: 720px) {
  .sheet {
    width: 100vw; max-width: 100vw; margin: 0; inset: auto 0 0 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: min(92dvh, 100dvh);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sheet[open] { animation: sheet-up var(--dur-slow) var(--ease); }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .sheet.is-dragging, .sheet.is-dismissing { animation: none; }
  .sheet.is-dragging { transition: none; user-select: none; }
  .sheet.is-dismissing { transition: transform var(--dur) var(--ease); }
  .sheet .grabber {
    display: block; width: 100%; height: 28px; margin: 0; padding: 0;
    background: transparent; position: relative; flex: 0 0 auto; touch-action: none;
  }
  .sheet .grabber::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 5px;
    transform: translate(-50%, -50%); border-radius: 3px; background: var(--border-2);
  }
  .sheet-inner { touch-action: none; }
  .sheet-head { touch-action: none; }
  .sheet-body { overscroll-behavior: contain; }
}
.sheet-inner { display: flex; flex-direction: column; max-height: inherit; min-height: 0; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 0; }
.sheet-head .kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-xs); color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; font-weight: 650; }
.sheet-head .kicker .sec-chip { text-transform: none; letter-spacing: 0; }
.sheet-close { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.sheet-close:hover { background: var(--surface-3); color: var(--text); }
.sheet-body { padding: 8px 18px 18px; overflow: auto; display: grid; gap: 14px; flex: 1 1 auto; min-height: 0; }
.sheet-body h2 { font-size: var(--fs-xl); line-height: 1.25; letter-spacing: -0.02em; }
.sheet-body .speaker { font-size: var(--fs-lg); }
.sheet-body .speaker b { font-weight: 650; }
.sheet-body .speaker .org { display: block; color: var(--text-2); font-size: var(--fs-sm); margin-top: 2px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); display: grid; gap: 2px; min-width: 0; }
.fact .k { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.fact .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; flex: 0 0 auto; }
.sheet-note { color: var(--text-2); font-size: var(--fs-sm); padding: 10px 12px; border-left: 3px solid var(--border-2); }

.map-preview {
  display: flex; flex-direction: column;
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none;
}
.map-preview:hover { border-color: var(--border-2); }
.map-preview .map-frame { display: block; overflow: hidden; line-height: 0; background: var(--surface-2); }
.map-preview img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2);
}
.map-preview .map-open {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 12px;
  font-size: var(--fs-sm); font-weight: 650; color: var(--accent); background: var(--surface);
}
.map-preview .map-open-label { min-width: 0; }
.map-preview .map-open .ico { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
@media (max-width: 720px) {
  .map-preview .map-open { font-size: var(--fs-xs); padding: 7px 10px; gap: 5px; }
}

/* changes list */
.changes { display: grid; gap: 12px; }
.change { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.change .when { font-variant-numeric: tabular-nums; font-size: var(--fs-xs); color: var(--text-3); padding-top: 3px; white-space: nowrap; }
.change .what { line-height: 1.4; }

/* ---------- Footer -------------------------------------------------------- */
.footer { max-width: var(--content-max); margin: 0 auto; padding: 8px clamp(12px, 3vw, 24px) 40px; color: var(--text-3); font-size: var(--fs-sm); display: grid; gap: 10px; }
.footer .foot-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.footer a { color: var(--text-2); }
.footer .btn { min-height: 36px; font-size: var(--fs-xs); }

/* ---------- Toast --------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 60; padding: 12px 18px; border-radius: var(--r-pill); background: var(--text); color: var(--bg);
  font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
  animation: toast-in var(--dur) var(--ease);
}
.toast.is-action { cursor: pointer; padding: 14px 20px; }
.sheet > .toast {
  position: absolute; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 5;
}
@media (min-width: 900px) { .toast { bottom: 24px; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Overview grid ------------------------------------------------- */
.overview-wrap { overflow-x: auto; overflow-y: hidden; margin: 5px -3px 0; padding: 3px 3px 8px; -webkit-overflow-scrolling: touch; }
.overview {
  display: grid;
  grid-template-columns: 4.2rem repeat(var(--days, 6), minmax(7.2rem, 1fr));
  column-gap: 6px; row-gap: 4px; min-width: 52rem;
  height: 48rem; min-height: 48rem;
  align-items: stretch; position: relative;
}
.overview-corner { min-height: 2.4rem; }
.overview-range {
  background: var(--accent-soft); border-radius: 6px; z-index: 0; pointer-events: none;
}
.overview-time {
  font-variant-numeric: tabular-nums; text-align: right; padding: 0 6px 0 2px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  min-height: 0; overflow: visible;
  border-radius: 6px; z-index: 1; position: relative;
}
.overview-time .t-start, .overview-time .t-end {
  line-height: 1;
  transition: opacity var(--dur) var(--ease), color var(--dur) var(--ease);
}
.overview-time .t-start {
  font-size: 0.72rem; font-weight: 700; color: var(--text-2);
  letter-spacing: -0.01em;
}
.overview-time .t-end {
  font-size: 0.64rem; font-weight: 500; color: var(--text-3);
}
.overview-time .t-start.is-idle, .overview-time .t-end.is-idle {
  opacity: 0; position: absolute; pointer-events: none;
}
.overview-time:has(.t-start.is-idle):not(:has(.t-end.is-idle)) { justify-content: flex-end; }
.overview-time .t-start.is-hl { color: var(--accent); opacity: 1; }
.overview-time .t-end.is-hl { color: var(--accent); opacity: .8; }
.overview-cell {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: var(--fs-xs); font-weight: 650; min-height: 0;
  display: flex; align-items: center; justify-content: center; text-align: center; gap: 6px; overflow: hidden;
  transition: opacity var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.overview-cell:not(.head):not(.empty) { cursor: pointer; }
.overview-cell .ico { width: 1.15em; height: 1.15em; color: inherit; }
.overview-cell .overview-label {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.overview-cell:not(.kind-break):not(.kind-lunch) .overview-label {
  white-space: normal; overflow-wrap: break-word;
}
.overview-cell.head { flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; gap: 0; background: transparent; border: 0; padding: 0 4px 8px; min-height: 0; overflow: visible; }
.overview-cell.head .dow { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.overview-cell.head .dom { font-size: var(--fs-lg); font-weight: 750; }
.overview-cell.head { cursor: pointer; }
.overview-cell.head.is-active .dom, .overview-cell.head.is-focus .dom { color: var(--accent); }
.overview.is-day-focus .overview-cell:not(.head):not(.is-focus) { opacity: .45; }
.overview.is-day-focus .overview-cell.head:not(.is-focus) { opacity: .5; }
.overview-cell.empty { background: transparent; border-style: dashed; opacity: .4; cursor: default; }
.overview-cell.plenary-band { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent); }
.overview-cell.kind-break, .overview-cell.kind-lunch { background: transparent; border-style: dashed; color: var(--text-3); font-weight: 550; }
.overview-cell.kind-social, .overview-cell.kind-opening, .overview-cell.kind-closing, .overview-cell.kind-registration, .overview-cell.kind-poster {
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.overview-cell.is-picked { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); color: var(--accent); }
.overview-day {
  display: grid;
  grid-template-rows: subgrid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0; min-height: 0;
  align-items: stretch;
}
.overview-sec-cluster {
  display: grid;
  grid-template-rows: subgrid;
  grid-template-columns: repeat(var(--secs, 1), minmax(0, 1fr));
  column-gap: 3px;
  min-width: 0; min-height: 0;
  align-items: stretch;
  pointer-events: none;
}
.overview-sec-cluster > .overview-cell { pointer-events: auto; }
.overview-cell.section-block {
  padding: 2px;
  background: var(--sec-tint); color: var(--sec-text);
  border-color: var(--sec-soft, var(--border));
  font-weight: 750; font-size: 11px;
  overflow: visible;
  min-width: 0;
}
.overview-cell.section-block.is-picked {
  background: var(--sec-tint); color: var(--sec-text);
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 2;
}
.overview-wrap:has(.overview.is-day-board) { overflow-x: hidden; }
.overview.is-day-board {
  grid-template-columns: 4.6rem minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.overview.is-day-board .overview-day,
.overview.is-day-board .overview-sec-cluster,
.overview.is-day-board .overview-cell { min-width: 0; }
.overview.is-day-board .overview-cell.section-block { font-size: 13px; }
.overview.is-day-board .overview-cell.is-detail,
.overview.is-day-board .overview-cell.is-compact {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.overview.is-day-board .overview-cell.is-detail {
  flex-direction: column;
  gap: 1px;
  padding: 3px 8px;
  overflow: hidden;
}
.overview.is-day-board .sec-line {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0.35em;
  width: 100%; min-width: 0; font-weight: 750; line-height: 1.15; text-align: center;
}
.overview.is-day-board .sec-id { font-weight: 750; }
.overview.is-day-board .sec-name { font-weight: 650; min-width: 0; }
.overview.is-day-board .sec-room,
.overview.is-day-board .sec-chair {
  display: flex; align-items: flex-start; justify-content: center; gap: 0.28em;
  font-weight: 550; font-size: 0.92em; line-height: 1.15; max-width: 100%; opacity: 0.86;
}
.overview.is-day-board .sec-room .ico,
.overview.is-day-board .sec-chair .ico {
  width: 0.95em; height: 0.95em; margin-top: 0.1em;
}
.overview.is-day-board .overview-cell.is-detail .sec-room,
.overview.is-day-board .overview-cell.is-detail .sec-chair,
.overview.is-day-board .overview-cell.is-detail .sec-room > span,
.overview.is-day-board .overview-cell.is-detail .sec-chair > span {
  white-space: normal; overflow-wrap: anywhere;
}
.overview.is-day-board .overview-cell.is-compact {
  flex-direction: row;
  gap: 6px; padding: 2px 6px; font-size: 12px; font-weight: 650;
  overflow: hidden;
}
.overview.is-day-board .overview-cell.is-compact .overview-label {
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.overview.is-day-board .overview-cell.is-detail .overview-label { white-space: normal; }
@media (max-width: 719px) {
  .overview.is-day-board {
    grid-template-columns: 3rem minmax(0, 1fr);
    height: 62rem; min-height: 62rem;
  }
  .overview.is-day-board .overview-cell.section-block { font-size: 10px; line-height: 1.1; }
  .overview.is-day-board .overview-cell.is-detail { padding: 1px 2px; gap: 0; }
  .overview.is-day-board .sec-room,
  .overview.is-day-board .sec-chair { line-height: 1.1; }
  .overview.is-day-board .overview-cell.is-compact {
    flex-wrap: wrap; row-gap: 0; column-gap: 4px; padding: 1px 2px; font-size: 10px;
  }
  .overview.is-day-board .overview-time .t-start { font-size: 0.62rem; }
  .overview.is-day-board .overview-time .t-end { font-size: 0.55rem; }
}
.overview.is-zooming .overview-cell:not(.is-focus) { opacity: 0 !important; }
.daybar-action[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

.fact a.v { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; line-height: 1.3; }

/* ---------- Print --------------------------------------------------------- */
.print-root { display: none; }
@media print {
  @page { margin: 14mm 12mm; }
  html { font-size: 10.5pt; }
  body { background: #fff; color: #000; padding: 0; }
  body > *:not(.print-root) { display: none !important; }
  #tour-root { display: none !important; }
  .print-root { display: block; }
  .print-root h1 { font-size: 16pt; margin-bottom: 2pt; }
  .print-root .print-sub { color: #444; margin-bottom: 8pt; font-size: 9pt; }
  .print-root h2 { font-size: 15pt; margin: 14pt 0 6pt; padding-bottom: 3pt; border-bottom: 1.5px solid #000; break-after: avoid; }
  .print-root .p-day + .p-day { break-before: page; }
  .print-root .print-section-head { font-size: 13pt; font-weight: 700; margin: 0 0 4pt; }
  .print-root .p-talk.is-cancelled .pt-title,
  .print-root .p-block-title.is-cancelled { text-decoration: line-through; }
  .print-root .p-slot { display: grid; grid-template-columns: 5.2em 1fr; gap: 0 10pt; padding: 5pt 0; border-top: 1px solid #ddd; break-inside: avoid; }
  .print-root .p-slot.allow-break { break-inside: auto; }
  .print-root .p-time { font-variant-numeric: tabular-nums; font-weight: 700; }
  .print-root .p-time small { display: block; color: #666; font-weight: 400; }
  .print-root .p-block { margin-bottom: 4pt; }
  .print-root .p-block-title { font-weight: 700; }
  .print-root .p-block-meta { color: #555; font-size: 9pt; }
  .print-root .p-talk { display: grid; grid-template-columns: 3.4em 1fr; gap: 0 6pt; padding: 2pt 0 2pt 6pt; break-inside: avoid; }
  .print-root .p-talk .pt-time { font-variant-numeric: tabular-nums; color: #333; }
  .print-root .p-talk .pt-title { font-weight: 550; }
  .print-root .p-talk .pt-speaker { color: #444; font-size: 9pt; }
  .print-root .p-posters .p-talk { grid-template-columns: 3em 1fr; }
  .print-root .p-muted { color: #666; }
  html[data-print="overview"] {
    font-size: 7pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  html[data-print="overview"] .print-root {
    width: 285mm; height: 198mm;
    display: flex; flex-direction: column;
    overflow: hidden;
    color: #111; background: #fff;
  }
  html[data-print="overview"] .print-root h1 { font-size: 11pt; margin: 0 0 1pt; }
  html[data-print="overview"] .print-root .print-sub { margin-bottom: 3pt; font-size: 7pt; }
  html[data-print="overview"] .print-root h2 { display: none; }
  .print-overview-stage { flex: 1 1 auto; height: 184mm; overflow: hidden; }
  .print-overview-grid {
    min-width: 0; min-height: 0; height: auto; background: #fff; color: #111;
    grid-template-columns: 5.4rem repeat(var(--days, 6), minmax(7.2rem, 1fr));
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    --text: #1a1a1a; --text-2: #444; --text-3: #666;
    --bg: #fff; --surface: #fff; --surface-2: #f4f4f6;
    --border: #ccc; --border-2: #bbb;
    --accent: #3b5bdd; --accent-soft: #eef2ff; --accent-soft-2: #d0d7f5;
    --sec-l-tint: 84%; --sec-c-tint: .08;
    --sec-l-stripe: 55%; --sec-c-stripe: .18;
    --sec-l-text: 28%; --sec-c-text: .16;
    --sec-l-soft: 78%; --sec-c-soft: .10;
  }
  html[data-print="overview"] .print-overview-grid [data-color],
  html[data-print="day"] .print-overview-grid [data-color] {
    --sec-tint: hsl(var(--h) 70% 82%);
    --sec-soft: hsl(var(--h) 55% 68%);
    --sec-stripe: hsl(var(--h) 60% 46%);
    --sec-text: hsl(var(--h) 50% 22%);
  }
  .print-overview-grid .overview-time .t-start {
    font-size: 10pt; font-weight: 700; color: #1a1a1a;
  }
  .print-overview-grid .overview-cell.head {
    cursor: default;
    flex-direction: row; align-items: baseline; justify-content: flex-start;
    gap: 0.35em; padding: 0 4px 4px;
  }
  .print-overview-grid .overview-cell.head .dow {
    font-size: 10pt; font-weight: 600; color: #666;
    text-transform: uppercase; letter-spacing: .06em;
  }
  .print-overview-grid .overview-cell.head .dom {
    font-size: 14pt; font-weight: 750; color: #111; letter-spacing: 0;
  }
  .print-overview-grid .overview-cell:not(.head) { cursor: default; font-size: 10pt; }
  .print-overview-grid .overview-cell.section-block { font-size: 11pt; }
  .print-overview-grid .overview-cell .ico { width: 1.15em; height: 1.15em; }
  html[data-print="day"] {
    font-size: 12pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  html[data-print="day"],
  html[data-print="day"] body { margin: 0; padding: 0; }
  /* Fits A4 landscape (297×210mm) with the dialog's default margins, not only the 6mm CSS box that "Save as PDF" uses. */
  html[data-print="day"] .print-root {
    width: 100%;
    max-width: 270mm;
    height: 180mm;
    max-height: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex; flex-direction: column;
    overflow: hidden;
    color: #111; background: #fff;
    break-inside: avoid; page-break-inside: avoid;
    break-after: avoid; page-break-after: avoid;
  }
  html[data-print="day"] .print-root h1 { font-size: 14pt; margin: 0 0 1pt; line-height: 1.15; }
  html[data-print="day"] .print-root h2 {
    font-size: 12pt; margin: 0 0 2mm; padding: 0; border: 0; font-weight: 650; line-height: 1.15;
  }
  html[data-print="day"] .print-root .print-sub { display: none; }
  html[data-print="day"] .print-overview-stage {
    flex: 1 1 auto; height: 0; min-height: 0; width: 100%;
    overflow: hidden;
  }
  html[data-print="day"] .print-day-grid.overview {
    grid-template-columns: 14mm minmax(0, 1fr);
    width: 100% !important; height: 100% !important;
    min-width: 0 !important; min-height: 0 !important;
    max-width: 100% !important; max-height: 100% !important;
    transform: none !important; margin: 0 !important;
  }
  html[data-print="day"] .print-day-grid .overview-cell:not(.head) { font-size: 12pt; }
  html[data-print="day"] .print-day-grid .overview-cell.section-block { font-size: 13pt; }
  html[data-print="day"] .print-day-grid .sec-room,
  html[data-print="day"] .print-day-grid .sec-chair { font-size: 11pt; }
  html[data-print="day"] .print-day-grid .overview-cell.is-compact { font-size: 11pt; }
  html[data-print="day"] .print-day-grid .overview-time .t-start { font-size: 12pt; }
  html[data-print="day"] .print-day-grid .overview-time .t-end { font-size: 10pt; color: #444; }
  .install-banner { display: none !important; }
}

/* ---------- Standalone / install ------------------------------------------ */
html.is-standalone .topbar { padding-top: env(safe-area-inset-top, 0px); }
html.is-standalone .install-banner,
html.is-standalone [data-install-btn] { display: none !important; }

.install-banner {
  position: fixed; left: 12px; right: 12px; z-index: 45;
  bottom: calc(var(--bottom-nav-h) + 10px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.install-banner[hidden] { display: none !important; }
.install-banner > .ico { color: var(--accent); flex: 0 0 auto; }
.install-banner-text { flex: 1 1 auto; font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.install-banner .btn { flex: 0 0 auto; }
.install-banner-x {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.install-banner-x:hover { background: var(--surface-2); color: var(--text); }
@media (min-width: 900px) {
  .install-banner {
    left: 50%; right: auto; width: min(520px, calc(100vw - 24px));
    transform: translateX(-50%); bottom: 24px;
  }
}

/* ---------- New-user tour ------------------------------------------------- */
html.tour-lock { overscroll-behavior: none; }
#tour-root {
  position: fixed; inset: 0; z-index: 70; pointer-events: none;
}
#tour-root[hidden] { display: none !important; }
.tour-layer {
  position: absolute; inset: 0; pointer-events: auto;
  cursor: default;
}
.tour-spot {
  position: absolute; pointer-events: none;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px var(--scrim);
  outline: 2px solid var(--accent);
  outline-offset: 0;
  transition: top var(--dur) var(--ease), left var(--dur) var(--ease), width var(--dur) var(--ease), height var(--dur) var(--ease);
}
.tour-spot.is-welcome { opacity: 0; }
.tour-card {
  position: absolute; z-index: 2; pointer-events: auto;
  width: min(22rem, calc(100vw - 24px));
  max-height: min(70dvh, calc(100dvh - var(--bottom-nav-h) - 24px));
  overflow: auto;
  padding: 16px 16px 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.tour-card .tour-progress {
  font-size: var(--fs-xs); font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 6px;
}
.tour-card h2 { font-size: var(--fs-lg); letter-spacing: -0.02em; margin-bottom: 6px; }
.tour-card .tour-body { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.4; }
.tour-card .tour-extra { margin-top: 12px; }
.tour-card .tour-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px;
}
.tour-card .tour-actions .spacer { flex: 1 1 auto; min-width: 4px; }
.tour-card .btn.sm { min-height: 36px; }

.install-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.install-step { display: grid; grid-template-columns: 1.6rem 1fr; gap: 10px; align-items: start; }
.install-step .ico { color: var(--accent); margin-top: 2px; }

/* ---------- Motion preferences -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Compact chrome (short landscape / short viewport) ------------- */
@media (max-height: 540px) {
  :root {
    --topbar-h: 44px;
    --daybar-h: 40px;
  }
  body { padding-bottom: 0; }
  .topbar-inner { gap: 8px; padding: 0 12px; }
  .brand { flex: 0 1 auto; gap: 8px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 0.95rem; white-space: nowrap; }
  .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
  .brand-mark::after { inset: 8px; }
  .nav-desktop {
    display: flex;
    margin-left: 8px;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }
  .nav-desktop .tab {
    gap: 5px;
    padding: 4px 10px;
    font-size: var(--fs-xs);
  }
  .nav-desktop .tab .ico { width: 1.15em; height: 1.15em; }
  .bottom-nav { display: none; }
  .ctl-label { display: none; }
  .ctl { height: 32px; min-width: 32px; padding: 0 8px; }
  .ctl-icon { width: 32px; }
  .ctl .ico { width: 1.15em; height: 1.15em; }
  .daybar-inner { padding: 0 12px; gap: 4px; }
  .daypill { min-width: 48px; height: 32px; padding: 0 10px; }
  .daypill .dow { font-size: 0.68rem; }
  .daypill .dom { font-size: var(--fs-sm); }
  .daypill.is-today::after { right: 6px; top: 50%; transform: translateY(-50%); width: 5px; height: 5px; }
  .daybar .btn.sm { min-height: 32px; padding: 0 10px; }
  .seg-btn { min-height: 28px; padding: 0 10px; }
  .main { padding-top: 10px; }
  .toast { bottom: 16px; }
  .install-banner { bottom: 16px; }
}
@media (max-height: 540px) and (max-width: 667px) {
  .nav-desktop .tab { position: relative; padding: 4px 10px; gap: 0; }
  .nav-desktop .tab .label { display: none; }
  .nav-desktop .tab .count {
    position: absolute; top: 0; right: 2px;
    min-width: 14px; height: 14px; padding: 0 3px; font-size: 9px;
  }
}

/* ---------- View transitions (progressive enhancement) --------------------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; }
.overview-day.is-morph-source,
.overview-day.is-morph-target,
.overview.is-day-board.is-morph-source,
.overview.is-day-board.is-morph-target { view-transition-name: day-board; }
[data-print-btn].is-morph { view-transition-name: print-action; }
::view-transition-group(day-board),
::view-transition-group(print-action) {
  animation-duration: 280ms;
  animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}
