/* ─────────────────────────────────────────────────────────────────────────────
   Conference Program Builder — Public Program (Elegant Refresh)
   ───────────────────────────────────────────────────────────────────────────── */

:root {
    --pp-color:         #0066cc;
    --pp-color-dark:    #004fa3;
    --pp-color-light:   rgba(0,102,204,.12);
    --pp-color-lighter: rgba(0,102,204,.05);

    --pp-text:          #0b1220;
    --pp-text-muted:    #5b6776;
    --pp-text-soft:     #8593a3;

    --pp-border:        #eef1f5;
    --pp-border-strong: #dfe4eb;

    --pp-bg:            #f4f6fa;
    --pp-bg-alt:        #fafbfd;
    --pp-surface:       #ffffff;

    --pp-shadow-xs:     0 1px 2px rgba(15,23,42,.04);
    --pp-shadow-sm:     0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.04);
    --pp-shadow:        0 2px 6px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --pp-shadow-md:     0 8px 24px -8px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.05);
    --pp-shadow-lg:     0 24px 48px -16px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.06);
    --pp-shadow-xl:     0 32px 80px -20px rgba(15,23,42,.28), 0 8px 24px rgba(15,23,42,.10);

    --pp-radius:        14px;
    --pp-radius-sm:     10px;
    --pp-radius-xs:     6px;

    --pp-font:          -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --pp-ease:          cubic-bezier(.4,0,.2,1);
    --pp-ease-out:      cubic-bezier(.16,1,.3,1);

    --pp-px-per-min:    2;
    --pp-time-col:      78px;
    --pp-col-min:       210px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ── Normal document scrolling ────────────────────────────────────────────────
   The program page is a standalone template, but the active theme's stylesheet
   still loads on it, and themes very commonly set "overflow-x: hidden" on
   <body>. Per the CSS spec, as soon as one overflow axis is not "visible" the
   other computes to "auto" rather than "visible" — so <body> quietly became a
   scroll container of its own, with the content scrolling inside the body box
   while the window scrolled as well. That nested scrolling is what feels stuck
   and jumpy, and on phones it also kills momentum scrolling and stops the
   address bar collapsing. A constrained body height does the same thing, so
   both are released here. The event class is on <html> and <body> alike.
   overflow uses !important to win against the theme; the modal's scroll lock
   is a class (below) rather than an inline style precisely so it can still
   beat this rule when a dialog is open. */
html.pp-page,
body.pp-page {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
body.pp-page.pp-scroll-locked { overflow: hidden !important; }

/* ── The schedule table must never widen the page ─────────────────────────────
   The table is wider than a phone on any day with several hall columns, and it
   is meant to scroll inside its own container. If that container's overflow is
   switched off, the table spills, the whole document becomes wider than the
   screen, and the phone zooms out to fit — which shrinks every page and leaves
   the session popup cropped off the left edge, because a fixed-position
   overlay sizes to the widened layout viewport rather than the visible one.
   Per-event custom CSS has switched this off with !important more than once,
   so the guard is deliberately specific enough to win: two elements plus two
   classes beats a ".pp-event-N .pp-sched-*" override. Nothing is hidden —
   the columns stay reachable by swiping the table itself. */
html body.pp-page .pp-sched-outer  { max-width: 100% !important; overflow-x: auto !important; }
html body.pp-page .pp-sched-scroll { overflow-x: auto !important; }

/* A dialog is a flex item, and flex items refuse to shrink below their content
   by default (min-width:auto). That lets a long title push the popup wider
   than the screen, and a centred over-wide box loses its left edge where it
   cannot be scrolled back into view. */
.pp-modal-dialog { min-width: 0; }

.pp-page {
    font-family: var(--pp-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--pp-text);
    background:
        radial-gradient(1200px 600px at -10% -20%, color-mix(in oklab, var(--pp-color) 7%, transparent), transparent 60%),
        radial-gradient(900px 500px at 110% -10%, color-mix(in oklab, var(--pp-color) 5%, transparent), transparent 60%),
        var(--pp-bg);
    min-height: 100vh;
    text-rendering: optimizeLegibility;
}

/* ── Page Header ────────────────────────────────────────────────────────────── */
.pp-header {
    background: var(--pp-color);
    color: #fff;
    position: relative;
    width: 100%;
    height: 42vh;
    min-height: 180px;
    max-height: 360px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15,23,42,.18);
}
.pp-header__bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1.04);
    transition: transform .6s var(--pp-ease-out);
    will-change: transform;
}
.pp-header__bg::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.45) 70%, rgba(0,0,0,.65) 100%),
        linear-gradient(135deg, color-mix(in oklab, var(--pp-color) 55%, transparent) 0%, transparent 60%);
    pointer-events: none;
}
.pp-header__inner {
    position: relative; z-index: 1;
    width: 100%; height: 100%;
    padding: 22px 28px;
    display: flex; align-items: flex-end; gap: 18px;
}
.pp-header__logo {
    height: 60px; width: auto;
    border-radius: 10px;
    object-fit: contain; flex-shrink: 0;
    background: rgba(255,255,255,.92);
    padding: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.pp-header__info { flex: 1; min-width: 0; }
.pp-header__title {
    font-size: clamp(20px, 3.2vw, 32px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.pp-header__sub {
    font-size: 13px;
    margin-top: 10px;
    display: flex; gap: 6px;
    flex-wrap: wrap;
}
.pp-header__sub-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .01em;
}
.pp-header__sub-item svg { opacity: .9; }

@media (max-width: 768px) {
    .pp-header { height: auto; min-height: 0; max-height: none; }
    .pp-header__inner { padding: 16px 16px; align-items: center; }
    .pp-header__logo { height: 44px; }
    .pp-header__sub { gap: 4px; margin-top: 6px; }
    .pp-header__sub-item { font-size: 11px; padding: 3px 8px; }
}

/* ── Day Hero (per-day header image, admin-configurable) ─────────────────────── */
.pp-day-hero {
    position: relative;
    width: 100%;
    min-height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pp-color) 0%, var(--pp-color-dark) 100%);
    color: #fff;
    display: flex;
    align-items: flex-end;
    border-radius: 0 0 26px 26px;
    box-shadow: 0 12px 32px -18px rgba(15,23,42,.35);
}
.pp-page--no-header .pp-day-hero { border-radius: 0 0 28px 28px; }
.pp-day-hero--compact { min-height: 156px; }
.pp-day-hero--large   { min-height: 340px; }

/* ── Natural-size banner ──────────────────────────────────────────────────
   With height set to "Auto" the hero becomes exactly the shape of the image
   it is showing: --pp-hero-ar carries the banner's real width/height, so a
   1920x500 file is 500px tall on a 1920px screen and keeps that proportion
   at every width. Nothing is cropped. min-height is only zeroed where
   aspect-ratio is actually supported, so older browsers keep the old
   fixed-height behaviour rather than collapsing to nothing.            */
/* Specificity note: this is intentionally three classes deep. Per-event custom
   CSS commonly targets ".pp-event-N .pp-day-hero" (two classes) and copies the
   default rule wholesale, including a min-height. At equal specificity that
   inline <style> block wins on source order and pins the hero to a fixed
   height, which silently defeats the ratio. Three classes outrank it without
   resorting to !important, so custom CSS can still override deliberately.
   Applies in every height mode: if a banner has real dimensions, showing the
   whole of it is what "the header is the photo" means. The Compact/Large
   settings still govern days that have no image. */
.pp-page .pp-day-hero.pp-day-hero--ar { aspect-ratio: var(--pp-hero-ar); }
@supports (aspect-ratio: 1 / 1) {
    .pp-page .pp-day-hero.pp-day-hero--ar { min-height: 0; height: auto; }
}

/* A wide banner gets short on a narrow screen (a 3.84:1 image is only ~100px
   tall on a phone), so the overlaid caption scales with the viewport instead
   of overflowing and being clipped. At desktop widths these clamps land on
   the original sizes, so nothing changes there. */
.pp-page .pp-day-hero.pp-day-hero--ar .pp-day-hero__inner {
    padding: clamp(8px, 2.2vw, 28px) clamp(12px, 2.4vw, 26px) clamp(8px, 2vw, 26px);
    gap: clamp(1px, .4vw, 6px);
}
.pp-page .pp-day-hero.pp-day-hero--ar .pp-day-hero__label {
    font-size: clamp(7px, 1.05vw, 11px); letter-spacing: .16em;
}
.pp-page .pp-day-hero.pp-day-hero--ar .pp-day-hero__title {
    font-size: clamp(13px, 3.1vw, 34px);
}
.pp-page .pp-day-hero.pp-day-hero--ar .pp-day-hero__date {
    font-size: clamp(8px, 1.3vw, 13.5px); gap: clamp(3px, .5vw, 8px);
}
.pp-page .pp-day-hero.pp-day-hero--ar .pp-day-hero__date svg {
    width: 1em; height: 1em;
}

.pp-day-hero__bg {
    position: absolute; inset: 0;
    background-size: cover; background-repeat: no-repeat; background-position: center center;
    transition: opacity .35s var(--pp-ease);
}
.pp-day-hero__scrim {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(8,12,22,.12) 0%, rgba(8,12,22,.32) 55%, rgba(8,12,22,.80) 100%),
        linear-gradient(90deg, rgba(8,12,22,.30) 0%, transparent 45%);
}
.pp-day-hero__decor {
    position: absolute; top: 0; right: 0; width: 240px; height: 240px;
    background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.14), transparent 70%);
    pointer-events: none;
}
.pp-day-hero.is-fallback .pp-day-hero__bg {
    background:
        radial-gradient(640px 280px at 12% 0%, rgba(255,255,255,.16), transparent 60%),
        radial-gradient(520px 240px at 100% 100%, rgba(255,255,255,.10), transparent 60%);
}
.pp-day-hero__inner {
    position: relative; z-index: 1;
    width: 100%;
    padding: 28px 26px 26px;
    display: flex; flex-direction: column; gap: 6px;
}
.pp-day-hero__label {
    font-family: var(--pp-tf-hero_label, var(--pp-font));
    color: var(--pp-tc-hero_label, rgba(255,255,255,.9));
    font-size: 11px; font-weight: var(--pp-tw-hero_label, 800); letter-spacing: .22em; text-transform: uppercase;
    display: flex; align-items: center; gap: 10px;
}
.pp-day-hero__label::before {
    content: ''; width: 22px; height: 2px; background: currentColor; border-radius: 2px; opacity: .85;
}
.pp-day-hero__title {
    font-family: var(--pp-tf-hero_title, var(--pp-font));
    color: var(--pp-tc-hero_title, #fff);
    font-size: clamp(22px, 4vw, 34px); font-weight: var(--pp-tw-hero_title, 800); letter-spacing: -.01em; line-height: 1.12;
    text-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.pp-day-hero__date {
    font-family: var(--pp-tf-hero_date, var(--pp-font));
    color: var(--pp-tc-hero_date, rgba(255,255,255,.94));
    font-size: 13.5px; font-weight: var(--pp-tw-hero_date, 600); letter-spacing: .03em;
    display: flex; align-items: center; gap: 8px; margin-top: 2px;
}
.pp-day-hero__event {
    font-family: var(--pp-tf-hero_event, var(--pp-font));
    color: var(--pp-tc-hero_event, rgba(255,255,255,.82));
    font-size: 12px; font-weight: var(--pp-tw-hero_event, 600); margin-top: 8px;
    display: flex; align-items: center; gap: 8px;
}
.pp-day-hero__event img { height: 20px; width: auto; border-radius: 3px; }

/* ── Filters Bar ────────────────────────────────────────────────────────────── */
.pp-filters {
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--pp-border);
    /* not sticky: the filter bar scrolls away with the page */
    position: relative; z-index: 80;
    box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 8px 24px -16px rgba(15,23,42,.15);
}

.pp-filters__row1 {
    width: 100%;
    display: flex; align-items: center;
    padding: 8px 14px;
    gap: 8px;
    border-bottom: 1px solid var(--pp-border);
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(0,0,0,.015) 100%);
}

.pp-day-tabs-list {
    display: flex; align-items: center;
    overflow-x: auto; scrollbar-width: none;
    flex: 1;
    gap: 5px;
    padding: 2px 0;
}
.pp-day-tabs-list::-webkit-scrollbar { display: none; }

.pp-day-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 6px 18px;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-family: inherit; cursor: pointer; white-space: nowrap;
    transition: background .18s var(--pp-ease), color .18s var(--pp-ease), border-color .18s var(--pp-ease), box-shadow .18s var(--pp-ease);
    flex-shrink: 0;
    color: var(--pp-text-muted);
    min-width: 70px;
}
.pp-day-tab:hover {
    color: var(--pp-color);
    background: rgba(var(--pp-color-rgb, 79,70,229), .07);
    border-color: rgba(var(--pp-color-rgb, 79,70,229), .15);
}
.pp-day-tab.is-active {
    color: #fff;
    background: var(--pp-color);
    border-color: var(--pp-color);
    box-shadow: 0 2px 10px -2px rgba(var(--pp-color-rgb, 79,70,229), .45);
}
.pp-day-tab__label {
    font-family: var(--pp-tf-day_tab, var(--pp-font));
    color: var(--pp-tc-day_tab, inherit);
    font-size: 9px; text-transform: uppercase; letter-spacing: .12em;
    font-weight: var(--pp-tw-day_tab, 700); opacity: .75; margin-bottom: 2px;
}
.pp-day-tab.is-active .pp-day-tab__label { opacity: .9; }
.pp-day-tab__date {
    font-family: var(--pp-tf-day_tab, var(--pp-font));
    color: var(--pp-tc-day_tab, inherit);
    font-size: 14px; font-weight: var(--pp-tw-day_tab, 800); letter-spacing: -.005em;
}

.pp-search-wrap {
    position: relative; display: flex; align-items: center;
    padding: 10px 16px; flex-shrink: 0;
    border-left: 1px solid var(--pp-border);
}
.pp-search-wrap svg {
    position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
    color: var(--pp-text-soft); pointer-events: none; z-index: 1;
}
.pp-search {
    padding: 8px 14px 8px 38px;
    border: 1px solid var(--pp-border-strong);
    border-radius: 999px;
    font-family: inherit; font-size: 13px;
    background: #fff; color: var(--pp-text);
    width: 240px; height: 38px;
    transition: border-color .18s, box-shadow .18s, width .25s var(--pp-ease-out);
}
.pp-search:focus {
    outline: none;
    border-color: var(--pp-color);
    box-shadow: 0 0 0 4px var(--pp-color-light);
    width: 300px;
}
.pp-search::placeholder { color: var(--pp-text-soft); }

/* Category tabs */
.pp-filters__row2 {
    width: 100%; padding: 4px 12px;
    display: flex; align-items: center;
    overflow-x: auto; scrollbar-width: none;
    gap: 4px; min-height: 44px;
    border-bottom: 1px solid var(--pp-border);
}
.pp-filters__row2::-webkit-scrollbar { display: none; }

.pp-cat-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--pp-tf-cat_tab, var(--pp-font)); font-size: 12.5px; font-weight: var(--pp-tw-cat_tab, 700);
    color: var(--pp-tc-cat_tab, var(--pp-text-muted)); cursor: pointer; white-space: nowrap;
    transition: color .15s, background .15s, border-color .15s, transform .12s;
    flex-shrink: 0; letter-spacing: .005em;
}
.pp-cat-tab:hover { color: var(--pp-color); background: var(--pp-color-lighter); }
.pp-cat-tab.is-active {
    color: var(--pp-color);
    background: var(--pp-color-light);
    border-color: color-mix(in oklab, var(--pp-color) 22%, transparent);
}
.pp-cat-tab__count {
    background: rgba(15,23,42,.06); color: var(--pp-text-muted);
    border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 800;
    min-width: 20px; text-align: center; line-height: 1.5;
}
.pp-cat-tab.is-active .pp-cat-tab__count { background: #fff; color: var(--pp-color); }

/* My Program (saved sessions) toggle */
.pp-myprogram-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 0 14px; height: 40px; flex-shrink: 0;
    border-radius: 999px; border: 1px solid var(--pp-border-strong);
    background: var(--pp-surface); color: var(--pp-text-muted);
    font-family: inherit; font-size: 12.5px; font-weight: 700;
    cursor: pointer; margin-left: 8px;
    transition: color .15s var(--pp-ease), border-color .15s var(--pp-ease), background .15s var(--pp-ease);
}
.pp-myprogram-btn svg { flex-shrink: 0; transition: fill .15s var(--pp-ease); }
.pp-myprogram-btn:hover { color: var(--pp-color); border-color: color-mix(in oklab, var(--pp-color) 30%, var(--pp-border-strong)); }
.pp-myprogram-btn__count {
    background: rgba(15,23,42,.06); color: var(--pp-text-muted);
    border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 800;
    min-width: 18px; text-align: center; line-height: 1.5;
}
.pp-myprogram-btn.has-favorites { color: var(--pp-text); }
.pp-myprogram-btn.has-favorites svg { fill: #f59e0b; stroke: #f59e0b; }
.pp-myprogram-btn.is-active {
    color: #fff; background: var(--pp-color); border-color: var(--pp-color);
}
.pp-myprogram-btn.is-active svg { fill: #fff; stroke: #fff; }
.pp-myprogram-btn.is-active .pp-myprogram-btn__count { background: rgba(255,255,255,.25); color: #fff; }

/* ── Full-programme PDF button (per event; absent when no URL is set) ────── */
.pp-pdf-btn,
.pp-cal-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 0 14px; height: 40px; flex-shrink: 0;
    border-radius: 999px; border: 1px solid var(--pp-border-strong);
    background: var(--pp-surface); color: var(--pp-text-muted);
    font-family: inherit; font-size: 12.5px; font-weight: 700;
    text-decoration: none; cursor: pointer; margin-left: 8px;
    white-space: nowrap;
    transition: color .15s var(--pp-ease), border-color .15s var(--pp-ease), background .15s var(--pp-ease);
}
.pp-pdf-btn svg,
.pp-cal-btn svg { flex-shrink: 0; }
.pp-cal-btn { font-family: inherit; }
.pp-pdf-btn:hover,
.pp-pdf-btn:focus-visible,
.pp-cal-btn:hover,
.pp-cal-btn:focus-visible {
    color: #fff;
    background: var(--pp-color);
    border-color: var(--pp-color);
    text-decoration: none;
}

/* Hall chips */
.pp-hall-filters {
    display: flex; gap: 7px; padding: 10px 16px;
    width: 100%; flex-wrap: wrap;
    background: transparent;
}
.pp-hall-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px;
    border-radius: 999px; font-size: 12px;
    font-family: var(--pp-tf-hall_chip, var(--pp-font)); font-weight: var(--pp-tw-hall_chip, 600);
    border: 1px solid var(--pp-border-strong);
    background: #fff; color: var(--pp-tc-hall_chip, var(--pp-text));
    cursor: pointer;
    transition: all .18s var(--pp-ease);
    white-space: nowrap; letter-spacing: .005em;
}
.pp-hall-chip:hover {
    border-color: var(--pp-color);
    color: var(--pp-color);
    transform: translateY(-1px);
    box-shadow: var(--pp-shadow-sm);
}
.pp-hall-chip.is-active {
    background: var(--pp-color);
    border-color: var(--pp-color);
    color: #fff;
    box-shadow: 0 6px 16px -4px color-mix(in oklab, var(--pp-color) 50%, transparent);
}
.pp-hall-chip__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pp-hall-chip.is-active .pp-hall-chip__dot { background: rgba(255,255,255,.85) !important; }

.pp-results-bar {
    width: 100%; padding: 8px 20px 0;
    font-size: 12px; color: var(--pp-text-muted); display: none;
    font-weight: 600;
}
.pp-results-bar.is-visible { display: block; }

@media (max-width: 640px) {
    .pp-filters__row1 { flex-wrap: wrap; }
    .pp-pdf-btn,
    .pp-cal-btn { width: 100%; flex: 0 0 100%; margin-left: 0; justify-content: center; }
    .pp-day-tabs-list { width: 100%; flex: 0 0 100%; padding: 2px 8px; }
    .pp-search-wrap { width: 100%; flex: 0 0 100%; border-left: none; padding: 10px 14px; }
    .pp-search, .pp-search:focus { width: 100%; height: 40px; }
    .pp-day-tab { padding: 6px 12px; min-width: 58px; }
    .pp-day-tab__date { font-size: 13px; }
    .pp-hall-filters { gap: 5px; padding: 8px 12px; }
    .pp-hall-chip { padding: 5px 11px; font-size: 11px; }
}

/* ── Scheduled Table (shared wrapper) ──────────────────────────────────────── */
.pp-sched-outer {
    width: 100%; margin: 0 0 60px;
    padding: 18px 22px 0;
    /* Second line of defence for the table's horizontal scroll. The inner
       .pp-sched-scroll is what normally scrolls, but per-event custom CSS
       sometimes copies that rule and neutralises its overflow. When that
       happens the table — widest on the day with the most hall columns —
       escapes, widens the whole document, and a phone zooms out to fit, so
       the whole page looks broken rather than just the table. Containing it
       here keeps every column reachable by swiping instead of hiding them. */
    max-width: 100%;
    overflow-x: auto;
}
.pp-sched-scroll {
    position: relative;
    overflow: auto;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow-md);
    background: var(--pp-surface);
    max-height: calc(100vh - 220px);
    min-height: 320px;
    scrollbar-width: thin;
    scrollbar-color: var(--pp-border-strong) transparent;
}
.pp-sched-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.pp-sched-scroll::-webkit-scrollbar-thumb { background: var(--pp-border-strong); border-radius: 999px; }
.pp-sched-scroll::-webkit-scrollbar-track { background: transparent; }

/* ── Schedule table (real <table>; sticky head + sticky time column) ────────── */
.pp-sched-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.pp-sched-table thead th {
    position: relative; z-index: 30;
    background: var(--pp-bg-alt);
    border-bottom: 1px solid var(--pp-border-strong);
    box-shadow: 0 1px 0 rgba(15,23,42,.03);
    padding: 13px 16px;
    font-family: var(--pp-tf-table_header, var(--pp-font));
    font-size: 13px; font-weight: var(--pp-tw-table_header, 800); color: var(--pp-tc-table_header, var(--pp-text));
    text-align: left; letter-spacing: -.005em;
    border-right: 1px solid var(--pp-border);
    border-top: 3px solid var(--pp-th-color, var(--pp-color));
    white-space: nowrap;
}
.pp-sched-table thead th:last-child { border-right: none; }
.pp-sched-table thead th.is-hidden { display: none; }
.pp-sched-th__inner { display: flex; align-items: center; gap: 9px; }
.pp-sched-th__dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    background: var(--pp-th-color, var(--pp-color));
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--pp-th-color, var(--pp-color)) 14%, transparent);
}
/* Compound (Main Hall / Podium) headers render as two real lines, never
   "Main Hall - Podium One" squashed onto one — configurable per podium via
   the hall admin screen, smart default otherwise. */
.pp-sched-th__label { display: flex; flex-direction: column; line-height: 1.25; }
.pp-sched-th__line1 { font-size: 10px; font-weight: 700; opacity: .72; text-transform: uppercase; letter-spacing: .03em; }
.pp-sched-th__line2 { font-size: 13px; font-weight: 800; }
.pp-sched-table thead th.pp-sched-th--time {
    position: relative; z-index: 40;
    width: var(--pp-time-col); min-width: var(--pp-time-col);
    text-align: center; text-transform: uppercase;
    font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: var(--pp-text-soft);
    border-top: none; background: var(--pp-bg-alt);
}

.pp-sched-table tbody th,
.pp-sched-table tbody td {
    border-right: 1px solid var(--pp-border);
    border-bottom: 1px solid var(--pp-border);
    vertical-align: top;
    padding: 0;
}
.pp-sched-table tbody tr:last-child > th,
.pp-sched-table tbody tr:last-child > td { border-bottom: none; }
.pp-sched-table tbody td:last-child,
.pp-sched-table tbody th:last-child { border-right: none; }
.pp-sched-table tbody td.is-hidden { display: none; }

.pp-sched-time-cell {
    position: relative; z-index: 20;
    width: var(--pp-time-col); min-width: var(--pp-time-col);
    background: linear-gradient(90deg, var(--pp-surface) 0%, var(--pp-surface) calc(100% - 8px), rgba(15,23,42,.04) 100%);
    text-align: right;
    padding: 10px 10px 0 4px !important;
    font-family: var(--pp-tf-table_time, var(--pp-font));
    font-size: 11px; font-weight: var(--pp-tw-table_time, 800); color: var(--pp-tc-table_time, var(--pp-text-muted));
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pp-sched-time-cell small { display: block; font-size: 9px; opacity: .65; font-weight: 700; letter-spacing: .04em; }

.pp-sched-cell { min-width: var(--pp-col-min); padding: 6px !important; }
.pp-sched-cell-empty { background: var(--pp-bg-alt); }

/* ── Session Row / Card (desktop cell content AND mobile row content) ───────── */
.pp-sess {
    --pp-c: var(--pp-color);
    position: relative;
    border-radius: var(--pp-radius-sm);
    border-left: 3px solid var(--pp-c);
    padding: 9px 11px;
    background: var(--pp-surface);
    box-shadow: 0 1px 2px rgba(15,23,42,.04), inset 0 0 0 1px rgba(15,23,42,.04);
    cursor: pointer;
    display: flex; flex-direction: column; gap: 4px;
    min-height: 40px;
    height: 100%;
    transition: box-shadow .2s var(--pp-ease), transform .2s var(--pp-ease), border-left-width .15s var(--pp-ease);
    word-break: break-word;
}
.pp-sess:hover, .pp-sess:focus-visible {
    box-shadow: 0 4px 12px rgba(15,23,42,.08), 0 12px 24px -8px rgba(15,23,42,.16), inset 0 0 0 1px color-mix(in oklab, var(--pp-c) 20%, transparent);
    transform: translateY(-1px);
    border-left-width: 5px;
}
.pp-sess:focus-visible { outline: 2px solid var(--pp-c); outline-offset: 2px; }
.pp-sess.is-dimmed { opacity: .28; filter: saturate(.5); }
.pp-sess.is-dimmed:hover { transform: none; }
.pp-sess.is-live { box-shadow: 0 0 0 1px var(--pp-c), 0 4px 16px -4px color-mix(in oklab, var(--pp-c) 45%, transparent); }

/* ── Saved to My Program ─────────────────────────────────────────────────────
   Without a marker on the card itself there was no way to see what had been
   saved: an attendee saved a session, the grid looked identical, so they
   opened it again and pressed the same button — which toggles it back off.
   That is the "sometimes it saves, sometimes it vanishes" behaviour. */
.pp-sess.is-saved { box-shadow: inset 0 0 0 1px #f59e0b, 0 1px 2px rgba(15,23,42,.06); }
.pp-sess.is-saved::after {
    content: '★';
    position: absolute; top: 4px; right: 6px;
    font-size: 11px; line-height: 1; color: #f59e0b;
    pointer-events: none;
}
.pp-sess.is-saved.is-live { box-shadow: 0 0 0 1px var(--pp-c), inset 0 0 0 1px #f59e0b; }
.pp-sess.is-hidden { display: none !important; }

.pp-sess-time {
    font-family: var(--pp-tf-session_time, var(--pp-font));
    font-size: 10.5px; font-weight: var(--pp-tw-session_time, 800); letter-spacing: .03em; text-transform: uppercase;
    color: var(--pp-tc-session_time, var(--pp-c)); font-variant-numeric: tabular-nums;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.pp-sess-name {
    font-family: var(--pp-tf-session_title, var(--pp-font));
    font-size: 12.5px; font-weight: var(--pp-tw-session_title, 700); color: var(--pp-tc-session_title, var(--pp-text)); line-height: 1.32; letter-spacing: -.005em;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pp-sess-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 1px; }
.pp-sess-badge {
    font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
    padding: 2px 6px; border-radius: 999px;
}
.pp-sess-badge--type { background: color-mix(in oklab, var(--pp-c) 14%, transparent); color: var(--pp-c); }
.pp-sess-badge--cat  { background: #ede9fe; color: #5b21b6; }
.pp-sess-badge--hall { background: color-mix(in oklab, var(--pp-c) 12%, transparent); color: var(--pp-c); font-weight: 900; }
.pp-sess-roles { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 1px; }
.pp-sess-role-chip { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.pp-sess-role-chip--moderator   { background: #dcfce7; color: #166534; }
.pp-sess-role-chip--chairperson { background: #ede9fe; color: #5b21b6; }
.pp-sess-role-chip--panelist    { background: #fef9c3; color: #854d0e; }

.pp-sess-live-dot {
    display: none; align-items: center; gap: 4px;
    font-size: 8.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
    color: #dc2626;
}
.pp-sess.is-live .pp-sess-live-dot { display: inline-flex; }
.pp-sess-live-dot::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: #dc2626;
    animation: pp-live-pulse 1.6s ease-in-out infinite;
}
@keyframes pp-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
    50%      { box-shadow: 0 0 0 5px rgba(220,38,38,0); }
}

/* ── Narrow viewports: the SAME grid table stays a table — columns are never
   dropped or converted to hall tabs/stacked cards (Part 8). The wrapping
   .pp-sched-scroll already scrolls horizontally; here we just tighten
   padding/font-size so more columns fit before scroll kicks in. ── */
@media (max-width: 768px) {
    .pp-sched-table--desktop thead th { padding: 9px 10px; }
    .pp-sched-table--desktop .pp-sched-cell { padding: 5px !important; }
    .pp-sched-table--desktop .pp-sess { padding: 7px 9px; }
    .pp-sched-table--desktop .pp-sess-name { font-size: 12px; -webkit-line-clamp: 3; }
}

/* ── Free time (registration / breaks / lunch) — spans every hall column ───── */
.pp-sched-cell--freetime {
    background: linear-gradient(90deg,
        color-mix(in oklab, var(--pp-color) 6%, transparent),
        color-mix(in oklab, var(--pp-color) 2%, transparent));
    padding: 0 !important;
}
.pp-freetime {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 11px 16px; min-height: 40px;
    text-align: center;
}
.pp-freetime__time {
    font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
    color: var(--pp-color); font-variant-numeric: tabular-nums;
}
.pp-freetime__name {
    font-family: var(--pp-tf-session_title, var(--pp-font));
    font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--pp-text-muted);
}

/* Break / filler row label */
.pp-sched-break {
    font-size: 11px; font-weight: 700; color: var(--pp-text-soft); text-transform: uppercase;
    letter-spacing: .06em; text-align: center; padding: 10px 6px;
}

/* ── Combined-days view (small programs): one compact 2-column table per day ─ */
.pp-sched-combined {
    padding: 18px 18px 6px;
    display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 22px;
}
.pp-day-block {
    flex: 1 1 320px; min-width: 280px;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    overflow: hidden;
    box-shadow: var(--pp-shadow-sm);
    background: var(--pp-surface);
}
@media (max-width: 700px) {
    .pp-sched-combined { flex-direction: column; }
    .pp-day-block { flex: 1 1 auto; min-width: 0; width: 100%; }
}
.pp-sched-table--daymini {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.pp-sched-table--daymini thead th {
    position: relative; z-index: 15;
    background:
        linear-gradient(90deg, color-mix(in oklab, var(--pp-color) 9%, transparent), color-mix(in oklab, var(--pp-color) 3%, transparent));
    border-bottom: 1px solid var(--pp-border-strong);
    padding: 12px 18px;
    text-align: left;
}
.pp-sched-table--daymini thead th.pp-sched-th--time { width: 64px; min-width: 64px; text-align: left; }
.pp-sched-th--daylabel {
    font-family: var(--pp-tf-day_divider, var(--pp-font));
    font-size: 11.5px; font-weight: var(--pp-tw-day_divider, 800);
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--pp-tc-day_divider, var(--pp-color));
}
.pp-sched-table--daymini tbody tr { border-bottom: 1px solid var(--pp-border); }
.pp-sched-table--daymini tbody tr:last-child { border-bottom: none; }
.pp-sched-table--daymini tbody td { border: none; vertical-align: top; padding: 0; }
.pp-sched-table--daymini tbody td.pp-sched-time-cell {
    position: static; width: 64px; min-width: 64px;
    background: none; padding: 12px 8px 0 14px !important;
}
.pp-sched-table--daymini tbody td.pp-sched-cell { padding: 8px 14px 8px 4px !important; }
.pp-sched-table--daymini .pp-sess {
    border-radius: 8px; border-left-width: 3px;
    box-shadow: none; background: transparent; padding: 3px 0 3px 10px; min-height: 0;
}
.pp-sched-table--daymini .pp-sess:hover,
.pp-sched-table--daymini .pp-sess:focus-visible {
    box-shadow: none; transform: none; background: var(--pp-bg-alt); border-radius: 8px;
}
.pp-sched-table--daymini .pp-sess-name { -webkit-line-clamp: 2; font-size: 13px; }

/* ── Modal ──────────────────────────────────────────────────────────────────── */
/* The whole dialog scrolls as one document: the overlay is the scroller and
   nothing inside is pinned. align-items:flex-start with margin:auto on the
   dialog keeps a short dialog centred while making sure a tall one starts at
   the top — with align-items:center a dialog taller than the viewport has its
   top clipped and unreachable, which is the classic centred-modal trap. */
.pp-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.pp-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(11,18,32,.55);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    animation: pp-fade-in .22s var(--pp-ease);
}
@keyframes pp-fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes pp-slide-in {
    from { opacity:0; transform: translateY(20px) scale(.97); }
    to   { opacity:1; transform: none; }
}

.pp-modal-dialog {
    position: relative; z-index: 1;
    background: var(--pp-surface);
    border-radius: 18px;
    box-shadow: var(--pp-shadow-xl);
    width: 100%; max-width: 720px;
    max-height: none;
    margin: auto;
    display: flex; flex-direction: column;
    animation: pp-slide-in .28s var(--pp-ease-out);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.6);
}
.pp-modal-header {
    display: flex; flex-direction: column;
    flex-shrink: 0;
    position: static;
    background: var(--pp-surface);
}

/* Image banner (uses that day's hero image; falls back to a hall/event color gradient) */
.pp-modal-hero {
    position: relative;
    width: 100%; height: 148px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--pp-c, var(--pp-color)) 0%, var(--pp-color-dark) 100%);
    overflow: hidden;
}
.pp-modal-hero__bg {
    position: absolute; inset: 0;
    background-size: cover; background-repeat: no-repeat; background-position: center center;
}
.pp-modal-hero__scrim {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(8,12,22,.42) 0%, rgba(8,12,22,.05) 55%, transparent 100%),
        radial-gradient(420px 160px at 100% 0%, rgba(255,255,255,.14), transparent 70%);
}
.pp-modal-hero.is-fallback .pp-modal-hero__scrim {
    background: radial-gradient(420px 200px at 15% 0%, rgba(255,255,255,.16), transparent 60%);
}
.pp-modal-hero__top {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px;
}
.pp-modal-day {
    font-family: var(--pp-tf-modal_day_label, var(--pp-font));
    font-size: 10.5px; font-weight: var(--pp-tw-modal_day_label, 800); letter-spacing: .12em; text-transform: uppercase;
    color: var(--pp-tc-modal_day_label, rgba(255,255,255,.92));
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}

/* Title area — sits under the image, on the modal surface */
.pp-modal-header__main {
    position: relative;
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px 26px 6px;
}
.pp-modal-code {
    background: var(--pp-color-light); color: var(--pp-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px; font-weight: 800;
    letter-spacing: .08em; padding: 4px 10px; border-radius: 999px;
    white-space: nowrap; flex-shrink: 0;
    align-self: flex-start;
}
.pp-modal-title {
    font-family: var(--pp-tf-modal_title, var(--pp-font));
    font-size: 20px; font-weight: var(--pp-tw-modal_title, 800); color: var(--pp-tc-modal_title, var(--pp-text));
    line-height: 1.28; letter-spacing: -.01em;
}
.pp-modal-close {
    position: relative;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .15s, transform .15s;
}
.pp-modal-close:hover { background: rgba(255,255,255,.34); transform: rotate(90deg); }
.pp-modal-body { padding: 22px 26px; overflow: visible; flex: 0 0 auto; }
.pp-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--pp-border);
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
    background: var(--pp-bg-alt);
    flex-shrink: 0;
}
.pp-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 10px;
    font-family: inherit; font-size: 13px; font-weight: 700;
    cursor: pointer; border: none;
    transition: all .15s var(--pp-ease);
}
.pp-btn--ghost {
    background: var(--pp-surface);
    border: 1px solid var(--pp-border-strong);
    color: var(--pp-text);
}
.pp-btn--ghost:hover {
    border-color: var(--pp-color);
    color: var(--pp-color);
    background: var(--pp-color-lighter);
}

/* Modal meta */
.pp-modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    background: var(--pp-bg-alt);
    border-radius: var(--pp-radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--pp-border);
}
.pp-modal-meta-item { display: flex; flex-direction: column; gap: 3px; }
.pp-modal-meta-label {
    font-size: 9.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .08em; color: var(--pp-text-soft);
}
.pp-modal-meta-value {
    font-size: 13.5px; font-weight: 600; color: var(--pp-text);
    letter-spacing: -.005em;
}

/* Modal sections */
.pp-modal-section-title {
    font-family: var(--pp-tf-modal_section_title, var(--pp-font));
    font-size: 10px; font-weight: var(--pp-tw-modal_section_title, 800); text-transform: uppercase;
    letter-spacing: .1em; color: var(--pp-tc-modal_section_title, var(--pp-text-soft));
    margin: 22px 0 12px;
    display: flex; align-items: center; gap: 10px;
}
.pp-modal-section-title::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--pp-border), transparent);
}
.pp-modal-role-group { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; align-items: center; }
.pp-modal-role-label {
    font-size: 9.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; flex-shrink: 0;
}
.pp-modal-role-label--mod   { background: #dcfce7; color: #166534; }
.pp-modal-role-label--chair { background: #ede9fe; color: #5b21b6; }
.pp-modal-role-label--panel { background: #fef9c3; color: #854d0e; }
.pp-modal-role-label--instr { background: #dbeafe; color: #1e40af; }
.pp-modal-role-name { font-size: 13.5px; font-weight: 600; color: var(--pp-text); }
.pp-modal-role-country { color: var(--pp-text-muted); font-size: 12px; margin-left: 4px; font-weight: 500; }

/* Faculty handover inside the running order.
   A session whose moderators change partway through gets one of these rows at
   each changeover, sitting above the talks it covers — the same reading order
   as the printed programme. */
.pp-modal-handover {
    display: flex; align-items: baseline; gap: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--pp-c, var(--pp-color));
    background: var(--pp-bg-alt);
    border-radius: var(--pp-radius-xs);
    margin: 4px 0 2px;
}
.pp-modal-handover__time {
    font-size: 11px; font-weight: 800; letter-spacing: .03em;
    color: var(--pp-c, var(--pp-color));
    font-variant-numeric: tabular-nums; flex-shrink: 0;
    min-width: 42px;
}
.pp-modal-handover__people {
    display: flex; flex-wrap: wrap; gap: 7px; align-items: center; flex: 1; min-width: 0;
}
.pp-modal-handover .pp-modal-role-group { margin-bottom: 0; }

/* Modal talks */
.pp-modal-talks { display: flex; flex-direction: column; gap: 9px; }
.pp-modal-talk-card {
    background: var(--pp-bg-alt);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-sm);
    padding: 12px 14px;
    display: flex; gap: 12px; align-items: flex-start;
    transition: border-color .18s, background .18s, transform .12s;
}
.pp-modal-talk-card:hover {
    border-color: color-mix(in oklab, var(--pp-color) 40%, var(--pp-border-strong));
    background: var(--pp-surface);
    transform: translateY(-1px);
    box-shadow: var(--pp-shadow-sm);
}
.pp-modal-talk-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px; font-weight: 800;
    color: var(--pp-color); background: var(--pp-color-light);
    border-radius: 6px; padding: 3px 7px;
    flex-shrink: 0; margin-top: 1px;
    visibility: hidden;
}
.pp-modal-talk-body { flex: 1; min-width: 0; }
.pp-modal-talk-time {
    font-size: 10.5px; font-weight: 800; color: var(--pp-color);
    letter-spacing: .03em; font-variant-numeric: tabular-nums;
}
.pp-modal-talk-speaker {
    font-family: var(--pp-tf-modal_talk_speaker, var(--pp-font));
    font-size: 13.5px; font-weight: var(--pp-tw-modal_talk_speaker, 700); color: var(--pp-tc-modal_talk_speaker, var(--pp-text));
    margin-top: 3px; letter-spacing: -.005em;
}
.pp-modal-talk-country { color: var(--pp-text-muted); font-weight: 500; font-size: 12px; margin-left: 5px; }
.pp-modal-talk-title {
    font-family: var(--pp-tf-modal_talk_title, var(--pp-font));
    font-size: 12.5px; font-weight: var(--pp-tw-modal_talk_title, 400); color: var(--pp-tc-modal_talk_title, var(--pp-text-muted));
    margin-top: 3px; line-height: 1.45;
}
.pp-modal-no-talks {
    text-align: center; padding: 22px;
    color: var(--pp-text-muted); font-size: 13px;
    background: var(--pp-bg-alt);
    border-radius: var(--pp-radius-sm);
    border: 1px dashed var(--pp-border-strong);
}

/* ── Modal Drag Handle (mobile bottom sheet) ─────────────────────────────────── */
.pp-modal-drag-handle {
    display: none;
    width: 40px; height: 4px;
    background: rgba(255,255,255,.55);
    border-radius: 999px;
    margin: 9px auto 0;
    flex-shrink: 0;
}

/* ── Modal Action Bar ─────────────────────────────────────────────────────────── */
.pp-modal-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 14px 22px 0;
}
.pp-btn--primary { background: var(--pp-color); color: #fff; }
.pp-btn--primary:hover { background: var(--pp-color-dark); }
.pp-btn--primary.is-active { background: #f59e0b; }
.pp-btn--icon-only { padding: 9px 11px; }

/* ── Live badge (modal + table) ──────────────────────────────────────────────── */
.pp-modal-live {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
    color: #fff; background: #dc2626; padding: 3px 9px; border-radius: 999px;
    margin-left: 8px; vertical-align: middle;
}
.pp-modal-live::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff;
    animation: pp-live-pulse 1.6s ease-in-out infinite;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    :root { --pp-col-min: 180px; --pp-time-col: 64px; }
    .pp-search { width: 200px; }
}
@media (max-width: 700px) {
    .pp-search-wrap { padding: 6px 10px 6px 10px; }
    .pp-search { width: 170px; height: 34px; font-size: 12px; padding: 6px 10px 6px 32px; }
    .pp-search-wrap svg { left: 20px; }
}
@media (max-width: 600px) {
    :root { --pp-col-min: 148px; --pp-time-col: 54px; }
    .pp-search { width: 100%; height: 34px; font-size: 12px; }
    .pp-sched-outer { padding: 0 10px; margin-top: 12px; }
    .pp-sched-scroll { border-radius: 12px; }
    /* Compact meta box on phones. The label and value carried no line-height
       of their own, so they inherited the theme's (sized for 15px body text)
       onto a 9px label — every row came out roughly twice as tall as its
       content. Two elements + two classes so a ".pp-event-N .pp-modal-meta"
       block in per-event custom CSS, which has no media query and otherwise
       reinstates the desktop padding here, does not win. */
    html body.pp-page .pp-modal-meta {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 10px;
    }
    html body.pp-page .pp-modal-meta-item { gap: 1px; }
    html body.pp-page .pp-modal-meta-label { font-size: 9px; line-height: 1.3; }
    html body.pp-page .pp-modal-meta-value { font-size: 12px; line-height: 1.3; }
    .pp-modal-dialog { max-width: 100%; max-height: none; border-radius: 14px; }
    .pp-modal-overlay { padding: 10px; }
    .pp-sess-name { -webkit-line-clamp: 2; font-size: 12px; }
    .pp-cat-tab { padding: 6px 11px; font-size: 11px; }
}
@media (max-width: 400px) {
    :root { --pp-col-min: 126px; }
}

/* Print */
@media print {
    .pp-page { background: #fff; }
    .pp-header, .pp-filters { position: static !important; box-shadow: none !important; }
    .pp-sched-scroll { max-height: none !important; overflow: visible !important; box-shadow: none !important; }
    .pp-sess { box-shadow: none !important; border: 1px solid var(--pp-border-strong) !important; }
    .pp-modal-overlay { display: none !important; }
}

/* ── Search: Clear Button ──────────────────────────────────────────────────── */
.pp-search-clear {
    position: absolute;
    right: 20px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px;
    background: var(--pp-text-soft);
    border: none; border-radius: 50%;
    color: #fff; font-size: 10px; font-weight: 900;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: .7; transition: opacity .15s, background .15s;
    line-height: 1; padding: 0;
}
.pp-search-clear:hover { opacity: 1; background: var(--pp-text-muted); }
.pp-search.is-loading { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%23cbd5e1' stroke-width='3'/%3E%3Cpath d='M12 2a10 10 0 0 1 10 10' stroke='%234f46e5' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }

/* ── Search Dropdown ──────────────────────────────────────────────────────── */
.pp-search-dropdown {
    position: absolute;
    z-index: 8888;
    background: var(--pp-surface);
    border: 1px solid var(--pp-border-strong);
    border-radius: 14px;
    box-shadow:
        0 4px 12px rgba(15,23,42,.08),
        0 16px 40px -8px rgba(15,23,42,.22);
    max-height: 440px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--pp-border-strong) transparent;
}
.pp-search-dropdown::-webkit-scrollbar { width: 5px; }
.pp-search-dropdown::-webkit-scrollbar-thumb { background: var(--pp-border-strong); border-radius: 999px; }

.pp-search-dropdown__fuzzy-note {
    padding: 9px 16px;
    font-size: 11.5px; font-weight: 600; color: var(--pp-color);
    background: var(--pp-color-lighter);
    border-bottom: 1px solid var(--pp-border);
}

.pp-search-dropdown__section-title {
    padding: 10px 16px 6px;
    font-size: 9.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .08em; color: var(--pp-text-soft);
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--pp-border);
    position: relative;
    background: var(--pp-surface);
    z-index: 1;
}
.pp-search-dropdown__clear-btn {
    background: none; border: none; color: var(--pp-color); font-size: 10px;
    cursor: pointer; font-weight: 700; padding: 2px 6px; border-radius: 4px;
}
.pp-search-dropdown__clear-btn:hover { background: var(--pp-color-light); }

.pp-search-dropdown__item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--pp-border);
    transition: background .12s;
}
.pp-search-dropdown__item:last-child { border-bottom: none; }
.pp-search-dropdown__item:hover { background: var(--pp-bg-alt); }

.pp-search-dropdown__item-icon {
    font-size: 16px; flex-shrink: 0; margin-top: 1px; opacity: .8;
}
.pp-search-dropdown__item-body { flex: 1; min-width: 0; }
.pp-search-dropdown__item-title {
    font-size: 13px; font-weight: 700; color: var(--pp-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: -.005em;
}
.pp-search-dropdown__item-meta {
    font-size: 11px; color: var(--pp-text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp-search-dropdown__item-meta--session {
    font-size: 10.5px; color: var(--pp-color); margin-top: 3px;
}

.pp-search-dropdown__empty {
    padding: 24px 18px; text-align: center;
    color: var(--pp-text-muted); font-size: 13px; font-weight: 500;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pp-search-dropdown__footer {
    padding: 8px 16px; text-align: center;
    font-size: 11px; color: var(--pp-text-soft);
    background: var(--pp-bg-alt); border-top: 1px solid var(--pp-border);
    font-style: italic;
}

/* Search highlight */
mark.pp-highlight {
    background: rgba(var(--pp-color-rgb, 79,70,229), .15);
    color: var(--pp-color);
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 800;
}

/* Block highlight (scroll-to) */
@keyframes pp-block-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--pp-color-rgb, 79,70,229), .5); }
    60%  { box-shadow: 0 0 0 10px rgba(var(--pp-color-rgb, 79,70,229), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--pp-color-rgb, 79,70,229), 0); }
}
.pp-block-highlight {
    animation: pp-block-pulse 1.4s ease 3;
    border-left-width: 5px !important;
    z-index: 20 !important;
}

/* ── Skeleton Loading ─────────────────────────────────────────────────────── */
.pp-skeleton-wrap {
    padding: 22px 22px 40px;
}
.pp-skeleton-header {
    height: 44px; border-radius: 10px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: pp-shimmer 1.6s infinite;
    margin-bottom: 20px;
    max-width: 340px;
}
.pp-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.pp-skeleton-card {
    border-radius: 10px;
    border: 1px solid var(--pp-border);
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    height: 110px;
}
.pp-skeleton-line {
    height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: pp-shimmer 1.6s infinite;
}
.pp-skeleton-line--short  { width: 40%; }
.pp-skeleton-line--medium { width: 65%; }
@keyframes pp-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Toast Notifications ──────────────────────────────────────────────────── */
.pp-toast-container {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 99999;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
.pp-toast {
    display: flex; align-items: center; gap: 10px;
    background: var(--pp-surface);
    border: 1px solid var(--pp-border-strong);
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 8px 24px -4px rgba(15,23,42,.18);
    font-size: 13px; font-weight: 600; color: var(--pp-text);
    opacity: 0; transform: translateY(12px) scale(.96);
    transition: opacity .3s var(--pp-ease-out), transform .3s var(--pp-ease-out);
    pointer-events: auto;
    max-width: 300px;
    min-width: 200px;
}
.pp-toast--visible { opacity: 1; transform: none; }
.pp-toast__icon {
    font-size: 16px; flex-shrink: 0;
}
.pp-toast--success { border-left: 3px solid #16a34a; }
.pp-toast--error   { border-left: 3px solid #dc2626; }
.pp-toast--info    { border-left: 3px solid var(--pp-color); }
.pp-toast--success .pp-toast__icon { color: #16a34a; }
.pp-toast--error   .pp-toast__icon { color: #dc2626; }
.pp-toast--info    .pp-toast__icon { color: var(--pp-color); }

/* ── Presenter Type Badge in Modal ───────────────────────────────────────── */
.pp-modal-talk-ptype {
    font-size: 9.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: var(--pp-text-soft);
    margin-top: 2px;
}

/* ── Hall Chip Sub-label ──────────────────────────────────────────────────── */
.pp-hall-chip__sub {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; opacity: .65; margin-left: 2px;
}

/* ── Enhanced Mobile Responsive ──────────────────────────────────────────── */

/* Stack search below day tabs on narrow screens, better touch targets */
@media (max-width: 768px) {
    .pp-filters { position: relative; z-index: 80; }

    .pp-filters__row1 {
        flex-wrap: wrap;
        padding: 6px 10px;
    }
    .pp-day-tabs-list {
        width: 100%; flex: 0 0 100%;
        padding: 2px 0;
        gap: 4px;
    }
    .pp-day-tab {
        padding: 7px 14px; min-width: 60px;
        border-radius: 999px;
    }
    .pp-day-tab__label { font-size: 8px; }
    .pp-day-tab__date  { font-size: 13px; }

    .pp-search-wrap {
        width: 100%; flex: 0 0 100%;
        border-left: none;
        border-top: 1px solid var(--pp-border);
        padding: 8px 12px;
    }
    .pp-search, .pp-search:focus {
        width: 100%; height: 40px;
        font-size: 14px;
        border-radius: 12px;
    }

    .pp-myprogram-btn {
        width: 100%; flex: 0 0 100%; margin-left: 0;
        justify-content: center;
        border-top: 1px solid var(--pp-border);
        border-radius: 0; height: 40px;
    }

    .pp-pdf-btn,
    .pp-cal-btn {
        width: 100%; flex: 0 0 100%; margin-left: 0;
        justify-content: center;
        border-top: 1px solid var(--pp-border);
        border-radius: 0; height: 40px;
    }

    .pp-filters__row2 { padding: 2px 10px; min-height: 40px; }

    .pp-hall-filters { padding: 8px 12px; gap: 6px; }
    .pp-hall-chip { padding: 7px 13px; font-size: 12px; min-height: 36px; }

    .pp-sched-outer { padding: 0 12px; margin-top: 10px; }
    /* No internal vertical scroll on mobile. A capped height with overflow:auto
       turned the programme into a small window that had to be scrolled on its
       own, and a vertical swipe over it was swallowed by that inner box instead
       of moving the page. With no height cap the table grows to fit its rows
       and the page does all the vertical scrolling. Horizontal stays:
       overflow-x keeps wider days swipeable, and because the element can no
       longer overflow vertically it cannot trap a vertical swipe.
       overscroll-behavior-x stops a sideways swipe turning into the browser's
       back gesture when the table reaches its end.

       Written as two elements + two classes on purpose. Per-event custom CSS
       tends to copy this rule as ".pp-event-N .pp-sched-scroll", which carries
       no media query and outranks a plain ".pp-sched-scroll" at every width —
       so the height cap would survive on exactly the sites that need this most.
       Only the cap is forced; overflow stays overridable. */
    html body.pp-page .pp-sched-scroll {
        max-height: none;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }
    .pp-sched-scroll { border-radius: 12px; }

    .pp-toast-container { bottom: 12px; right: 12px; left: 12px; }
    .pp-toast { max-width: 100%; min-width: 0; }

    .pp-search-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 65vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(15,23,42,.18);
        border-bottom: none;
    }
    .pp-search-dropdown::before {
        content: '';
        display: block;
        width: 40px; height: 4px;
        background: var(--pp-border-strong);
        border-radius: 999px;
        margin: 10px auto 4px;
    }
}

@media (max-width: 480px) {
    .pp-header__inner { padding: 12px 14px; }
    .pp-header__title { font-size: 18px; }
    .pp-header__logo  { height: 36px; }

    .pp-modal-overlay { padding: 0; align-items: flex-start; }
    .pp-modal-dialog  {
        max-width: 100%; max-height: none;
        border-radius: 20px 20px 0 0;
        animation: pp-slide-up .3s var(--pp-ease-out);
    }
    @keyframes pp-slide-up {
        from { transform: translateY(100%); opacity: .8; }
        to   { transform: none; opacity: 1; }
    }
    .pp-modal-hero    { height: 118px; }
    .pp-modal-hero__top { padding: 12px 14px; }
    .pp-modal-header__main { padding: 14px 18px 4px; }
    .pp-modal-title   { font-size: 16px; }
    .pp-modal-body    { padding: 16px 18px; }
    .pp-modal-footer  { padding: 10px 16px; }
    html body.pp-page .pp-modal-meta { grid-template-columns: 1fr 1fr; gap: 6px; padding: 9px; }

    .pp-sess-name { font-size: 11.5px; -webkit-line-clamp: 2; }
    .pp-sess-time { font-size: 10px; }

    :root { --pp-col-min: 130px; --pp-time-col: 50px; }
    .pp-sched-outer { padding: 0 8px; }
    .pp-sched-scroll { border-radius: 10px; }
    html body.pp-page .pp-sched-scroll { max-height: none; }
    .pp-cat-tab { padding: 5px 10px; font-size: 11px; }
    .pp-hall-chip { padding: 6px 11px; font-size: 11px; }

    .pp-no-sessions { padding: 60px 24px; }
    .pp-no-sessions__icon { font-size: 40px; }
}

/* ── Day Hero / Sched table responsive fine-tuning ───────────────────────────── */
@media (max-width: 768px) {
    .pp-day-hero { min-height: 176px; }
    .pp-day-hero--large { min-height: 240px; }
    .pp-day-hero__inner { padding: 20px 16px 18px; }
    .pp-day-hero__title { font-size: clamp(19px, 6vw, 26px); }
    .pp-modal-actions { padding: 12px 16px 0; }
    .pp-modal-actions .pp-btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 480px) {
    .pp-day-hero { min-height: 148px; }
    .pp-day-hero__inner { padding: 16px 14px 16px; }
    .pp-day-hero__label { font-size: 10px; letter-spacing: .18em; }
    .pp-modal-drag-handle { display: block; }
}

/* ── High DPI / Sharp display optimizations ───────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pp-sess { border-left-width: 3px; }
}

/* ── Focus-visible accessibility ──────────────────────────────────────────── */
.pp-day-tab:focus-visible,
.pp-cat-tab:focus-visible,
.pp-hall-chip:focus-visible,
.pp-sess:focus-visible,
.pp-btn:focus-visible {
    outline: 2px solid var(--pp-color);
    outline-offset: 2px;
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .pp-sess,
    .pp-toast,
    .pp-modal-dialog,
    .pp-modal-backdrop,
    .pp-hall-chip,
    .pp-sess-live-dot::before,
    .pp-modal-live::before {
        transition: none;
        animation: none;
    }
    .pp-skeleton-header,
    .pp-skeleton-line {
        animation: none;
        background: #e2e8f0;
    }
}
