:root {
    --brand: #0b8f35;
    --brand-ink: #076b28;
    --brand-soft: #edf8f0;
    --brand-bar: #34d364;
    --ink: #16213a;
    --ink-2: #414d66;
    --muted: #6d788f;
    --line: #e2e7ed;
    --line-soft: #eef1f5;
    --surface: #ffffff;
    --canvas: #f4f6f8;
    --radius-lg: 14px;
    --radius: 10px;
    --radius-sm: 7px;
    --header-h: 60px;
    --gutter: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background: var(--canvas);
    font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.drawer-open { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Header ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    width: min(1440px, 100%);
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand { display: block; flex: none; }
.brand img { width: min(212px, 52vw); height: auto; }
.main-nav { display: none; }
.header-search {
    margin-left: auto;
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--ink-2);
    background: var(--canvas);
    text-decoration: none;
    font-size: .88rem;
}
.header-search span { display: none; }
.mobile-tabs {
    display: flex;
    gap: 2px;
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--line-soft);
}
.mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tabs a, .mobile-tabs span {
    flex: none;
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    color: var(--ink-2);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
}
.mobile-tabs .is-active { color: var(--brand-ink); border-color: var(--brand); }
.mobile-tabs span[aria-disabled="true"] { color: var(--muted); }

/* Shell ------------------------------------------------------------------- */
.shell { width: min(1440px, 100%); margin: 0 auto; padding: 12px var(--gutter) 32px; }
.content { min-width: 0; }
.site-footer { padding: 20px var(--gutter) 28px; color: var(--muted); font-size: .8rem; text-align: center; }

/* Channel navigator -------------------------------------------------------- */
.channel-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(88vw, 340px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
}
.channel-nav.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.channel-nav__backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(22, 33, 58, .38); }
.channel-nav__bar { display: flex; align-items: center; gap: 6px; padding: 12px 12px 10px; }
.search-field {
    flex: 1;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--canvas);
    color: var(--muted);
}
.search-field:focus-within { border-color: var(--brand); background: var(--surface); }
.search-field input { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; outline: none; color: var(--ink); }
.search-field input::placeholder { color: var(--muted); }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.channel-nav__close { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); }
.channel-nav__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 16px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.channel-nav:hover .channel-nav__scroll, .channel-nav:focus-within .channel-nav__scroll { scrollbar-color: #c9d0da transparent; }
.channel-nav__scroll::-webkit-scrollbar { width: 6px; }
.channel-nav__scroll::-webkit-scrollbar-thumb { border-radius: 99px; background: transparent; }
.channel-nav:hover .channel-nav__scroll::-webkit-scrollbar-thumb { background: #c9d0da; }
.channel-nav__section + .channel-nav__section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.channel-nav__heading {
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.channel-group summary {
    height: 36px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.channel-group summary::-webkit-details-marker { display: none; }
.channel-group summary:hover { background: var(--canvas); }
.channel-group__chevron { width: 16px; height: 16px; color: var(--muted); transition: transform .15s ease; }
.channel-group[open] > summary .channel-group__chevron { transform: rotate(90deg); }
.channel-group__label { flex: 1; }
.channel-group__count { color: var(--muted); font-size: .78rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.channel-group .channel-list { padding: 2px 0 6px; }
.channel-row {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 10px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    text-decoration: none;
}
.channel-row:hover { background: var(--canvas); color: var(--ink); }
.channel-row.is-active { background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.channel-row.is-active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--brand); }
.channel-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.channel-list__item.is-hidden { display: none; }
.channel-nav__empty { padding: 20px 10px; color: var(--muted); font-size: .88rem; text-align: center; }
.fav-remove { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--brand); }
.fav-remove .icon { width: 16px; height: 16px; fill: currentColor; }
.fav-remove:hover { background: var(--surface); color: var(--muted); }
.channel-list__item--fav { display: flex; align-items: center; gap: 2px; }
.channel-list__item--fav .channel-row { flex: 1; min-width: 0; }

.logo-box {
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-soft);
}
.logo-box img { width: 22px; height: 22px; object-fit: contain; }
.logo-box--lg { width: 52px; height: 52px; border-radius: var(--radius); }
.logo-box--lg img { width: 40px; height: 40px; }

/* Channel head ------------------------------------------------------------- */
.channel-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.channel-head h1 { font-size: 1.3rem; line-height: 1.15; letter-spacing: -.01em; }
.channel-head__text p { display: none; margin-top: 2px; color: var(--muted); font-size: .84rem; }
.channel-head__switch {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0 6px 0 12px;
    border-radius: 999px;
    color: var(--brand-ink);
    background: var(--brand-soft);
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none;
}
.channel-head__switch .icon { width: 16px; height: 16px; }
.fav-toggle {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: .86rem;
    font-weight: 600;
}
.fav-toggle:disabled { color: var(--muted); }
.fav-toggle .icon { width: 17px; height: 17px; }
.fav-toggle[aria-pressed="true"] { border-color: transparent; background: var(--brand-soft); color: var(--brand-ink); }
.fav-toggle[aria-pressed="true"] .icon { fill: currentColor; }
.fav-toggle span { display: none; }

/* Hero --------------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 12px;
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-radius: var(--radius-lg);
    color: #fff;
    background: linear-gradient(118deg, #071a2f 0%, #0d2a45 50%, #0a5a30 100%);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.6px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(115deg, transparent 40%, #000 100%);
    mask-image: linear-gradient(115deg, transparent 40%, #000 100%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 84% 18%, rgba(52, 211, 100, .28), transparent 34%),
        linear-gradient(160deg, transparent 55%, rgba(255, 255, 255, .05) 55.2%, transparent 78%);
}
.hero__main { max-width: 640px; }
.hero__eyebrow { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .78); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-bar); box-shadow: 0 0 0 3px rgba(52, 211, 100, .22); }
.hero[data-state="upcoming"] .hero__dot { background: rgba(255, 255, 255, .55); box-shadow: none; }
.hero[data-state="none"] .hero__dot { display: none; }
.hero__title { margin-top: 12px; font-size: clamp(1.75rem, 6.5vw, 2.7rem); line-height: 1.05; letter-spacing: -.025em; font-weight: 800; }
.hero[data-state="none"] .hero__title { font-size: clamp(1.3rem, 5vw, 1.75rem); color: rgba(255, 255, 255, .9); }
.hero__time { margin-top: 8px; display: flex; align-items: baseline; gap: 12px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hero__duration { color: rgba(255, 255, 255, .62); font-size: .88rem; }
.hero__duration::before { content: "|"; margin-right: 12px; color: rgba(255, 255, 255, .28); }
.hero__progress { width: min(100%, 420px); height: 6px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .2); }
.hero__progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand-bar); transition: width .6s ease; }
.hero__meta { margin-top: 10px; color: rgba(255, 255, 255, .84); font-size: .9rem; }
.hero__state { position: absolute; top: 18px; right: 18px; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 6px; color: rgba(255, 255, 255, .9); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero__next {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    background: rgba(5, 14, 28, .45);
    color: #fff;
    text-decoration: none;
}
.hero__next-label { color: rgba(255, 255, 255, .62); font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hero__next strong { display: block; font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero__next:hover { background: rgba(5, 14, 28, .62); }

/* Dates -------------------------------------------------------------------- */
.date-nav { margin-top: 14px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.date-nav::-webkit-scrollbar { display: none; }
.date-pill {
    flex: none;
    min-width: 92px;
    height: 46px;
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    line-height: 1.2;
}
.date-pill strong { font-size: .9rem; }
.date-pill span { color: var(--muted); font-size: .76rem; }
.date-pill.is-active { border-color: var(--brand); background: var(--brand); color: #fff; }
.date-pill.is-active span { color: rgba(255, 255, 255, .8); }

/* Schedule ----------------------------------------------------------------- */
.schedule { margin-top: 20px; scroll-margin-top: calc(var(--header-h) + 12px); }
.schedule__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.schedule__head h2, .page-head h1 { font-size: 1.25rem; letter-spacing: -.015em; }
.schedule__tz { color: var(--muted); font-size: .78rem; }
.schedule__list { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.schedule__earlier { margin-bottom: 8px; }
.schedule__earlier summary {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius);
    color: var(--brand-ink);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.schedule__earlier summary::-webkit-details-marker { display: none; }
.schedule__earlier summary:hover { background: #e9f1ec; }
.schedule__earlier summary .icon { width: 16px; height: 16px; transform: rotate(-90deg); }
.schedule__earlier[open] summary .icon { transform: rotate(90deg); }
.schedule__earlier .when-open, .schedule__earlier[open] .when-closed { display: none; }
.schedule__earlier[open] .when-open { display: inline; }
.schedule__earlier[open] summary { margin-bottom: 8px; }
.prog {
    position: relative;
    min-height: 54px;
    padding: 8px 8px 8px 14px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line-soft);
}
.prog:first-child { border-top: 0; }
.prog__time { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.prog__body { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.prog__title { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.prog__badge { padding: 3px 7px; border-radius: 5px; background: var(--brand); color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; }
.prog--past { color: var(--muted); }
.prog--past .prog__time { color: var(--muted); }
.prog--now { background: var(--brand-soft); }
.prog--now::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.prog--now .prog__time { color: var(--brand-ink); }
.prog--now .prog__title { font-weight: 600; color: var(--ink); }
.prog__actions { display: flex; gap: 0; }
.prog__action { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); opacity: .45; }
.prog__action .icon { width: 17px; height: 17px; }
.notice { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #f0d9a8; border-radius: var(--radius-lg); background: #fff7e6; color: #5a4300; font-size: .95rem; line-height: 1.5; }
.notice a { color: var(--brand-ink); font-weight: 600; text-decoration: underline; }
.notice__hint { margin-top: 4px; color: #7a6320; font-size: .88rem; }
.channel-group--historic .channel-group__label { color: var(--muted); }
.empty-state { padding: 28px 16px; border: 1px dashed #c7cfda; border-radius: var(--radius-lg); background: var(--surface); color: var(--muted); text-align: center; }

/* Side panel --------------------------------------------------------------- */
.side-panel { margin-top: 20px; display: grid; gap: 14px; }
.panel { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel h2 { font-size: 1.02rem; }
.tag-soon { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.panel__lead { margin-top: 8px; color: var(--muted); font-size: .88rem; }
.topic-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.topic-list li { padding: 5px 10px; border-radius: 999px; background: var(--canvas); color: var(--ink-2); font-size: .82rem; font-weight: 500; }
.panel__button { width: 100%; height: 40px; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--muted); font-weight: 600; font-size: .9rem; }
.switch-row { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-row + .switch-row { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.switch-row strong { display: block; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.switch-row div > span { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; }
.switch { position: relative; flex: none; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 99px; background: #d8dee6; opacity: .7; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }

/* Home / now routes -------------------------------------------------------- */
.page-head { padding: 4px 2px 0; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.page-head h1 { font-size: 1.5rem; letter-spacing: -.02em; }
.page-head p { margin-top: 4px; color: var(--muted); }
.page-head__link { color: var(--brand-ink); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.page-head__link:hover { text-decoration: underline; }

.time-form { margin: 14px 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.time-form label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.time-form__field { height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); }
.time-form__field input { width: 62px; height: 100%; padding: 0 10px; border: 0; background: transparent; text-align: right; }
.time-form__field input:focus { outline: none; }
.time-form__field:focus-within { border-color: var(--brand); }
.time-form button { height: 38px; padding: 0 16px; border: 0; border-radius: var(--radius-sm); background: var(--brand); color: #fff; font-weight: 600; }
.time-form__link { color: var(--brand-ink); font-weight: 600; font-size: .9rem; }

/* Shared broadcast pieces (now rows and home cards) */
.now-row__progress, .board-card__progress { display: block; width: 100%; height: 4px; overflow: hidden; border-radius: 99px; background: var(--line); }
.now-row__progress > span, .board-card__progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s ease; }
.b-next-label { color: var(--muted); }
[data-state="none"] [data-b-title] { color: var(--muted); font-weight: 500; }

.now-list__head { display: none; }
.now-list { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.now-list li + li .now-row { border-top: 1px solid var(--line-soft); }
.now-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 12px; padding: 12px 14px; color: inherit; text-decoration: none; }
.now-row:hover { background: #f8fafb; }
.now-row__channel { display: flex; align-items: center; gap: 10px; min-width: 0; }
.now-row__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.now-row__programme { min-width: 0; }
.now-row__title { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.now-row__meta { display: block; margin-top: 2px; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.now-row__progress { margin-top: 6px; }
.now-row__remaining { display: none; }
.now-row__next { display: block; margin-top: 4px; color: var(--muted); font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
.now-row__next-title { color: var(--ink-2); }
.now-row__next-time { margin-left: 6px; font-variant-numeric: tabular-nums; }

.board-group { margin-top: 24px; }
.board-group h2 { margin-bottom: 10px; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.board-card { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.board-card:hover { border-color: #c5cdd8; box-shadow: 0 2px 8px rgba(22, 33, 58, .06); }
.board-card__channel { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.board-card__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.board-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.board-card__meta { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.board-card__progress { margin-top: 2px; }
.board-card__next { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: auto; padding-top: 4px; color: var(--ink-2); font-size: .84rem; line-height: 1.35; }

/* Tablet: sidebar visible, panel below the guide --------------------------- */
@media (min-width: 760px) {
    .mobile-tabs { display: none; }
    .main-nav { display: flex; align-self: stretch; align-items: stretch; margin-left: 12px; }
    .main-nav a, .main-nav__soon { display: inline-flex; align-items: center; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 600; font-size: .95rem; text-decoration: none; }
    .main-nav a:hover { color: var(--ink); }
    .main-nav .is-active { color: var(--brand-ink); border-color: var(--brand); }
    .main-nav__soon { color: var(--muted); }
    .header-search { width: 200px; padding: 0 14px 0 12px; border: 1px solid var(--line); color: var(--muted); }
    .header-search span { display: inline; }
    .header-search:hover { border-color: #c8d0da; color: var(--ink-2); }
    .shell { padding-top: 16px; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
    .channel-nav {
        position: sticky;
        top: calc(var(--header-h) + 16px);
        inset: auto;
        z-index: 1;
        width: auto;
        max-height: calc(100vh - var(--header-h) - 32px);
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        box-shadow: none;
        transform: none;
        visibility: visible;
        transition: none;
    }
    .channel-nav__close, .channel-nav__backdrop { display: none !important; }
    .channel-head { gap: 12px; padding: 12px 14px; }
    .channel-head__text p { display: block; }
    .channel-head__switch { display: none; }
    .fav-toggle span { display: inline; }
    .hero { min-height: 300px; padding: 26px 26px 24px; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
    .hero__main { flex: 1; align-self: flex-start; }
    .hero__next { flex: 0 1 300px; }
    .hero__state { top: 24px; right: 24px; }
    .prog { grid-template-columns: 72px minmax(0, 1fr) auto; padding-left: 18px; }
    .now-list__head, .now-row { grid-template-columns: 168px minmax(0, 1.5fr) 140px 88px minmax(0, 1.1fr); align-items: center; column-gap: 16px; }
    .now-list__head { display: grid; padding: 0 14px 6px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
    .now-row { padding: 10px 14px; min-height: 56px; }
    .now-row__progress, .now-row__remaining, .now-row__next { margin-top: 0; }
    .now-row__remaining { display: block; font-weight: 600; font-size: .92rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
    .b-meta-remaining { display: none; }
    .now-row__next { font-size: .86rem; }
    .now-row__next-time { display: block; margin: 1px 0 0; color: var(--muted); }
    .now-row__next .b-next-label { display: none; }
    [data-board-mode="hour"] .now-row, [data-board-mode="next"] .now-row, .now-list__head[data-board-mode="hour"], .now-list__head[data-board-mode="next"] { grid-template-columns: 168px minmax(0, 1.5fr) minmax(0, 1.1fr); }
    [data-board-mode="hour"] .now-row__progress, [data-board-mode="hour"] .now-row__remaining, [data-board-mode="next"] .now-row__progress, [data-board-mode="next"] .now-row__remaining,
    .now-list__head[data-board-mode="hour"] span:nth-child(3), .now-list__head[data-board-mode="hour"] span:nth-child(4), .now-list__head[data-board-mode="next"] span:nth-child(3), .now-list__head[data-board-mode="next"] span:nth-child(4) { display: none; }
    .page-head h1 { font-size: 1.65rem; }
    .side-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .site-footer { grid-column: 1 / -1; }
}

/* Desktop: three columns --------------------------------------------------- */
@media (min-width: 1120px) {
    .shell { grid-template-columns: 252px minmax(0, 1fr) 300px; gap: 22px; }
    .header-search { width: 240px; }
    .hero { min-height: 320px; padding: 30px 30px 26px; }
    .hero__title { font-size: clamp(2.2rem, 3.4vw, 3rem); }
    .side-panel { position: sticky; top: calc(var(--header-h) + 16px); margin-top: 0; grid-template-columns: 1fr; }
}

/* Bar fills without inline styles (the CSP forbids style attributes) ------- */
[data-p="0"] { width: 0%; }
[data-p="1"] { width: 1%; }
[data-p="2"] { width: 2%; }
[data-p="3"] { width: 3%; }
[data-p="4"] { width: 4%; }
[data-p="5"] { width: 5%; }
[data-p="6"] { width: 6%; }
[data-p="7"] { width: 7%; }
[data-p="8"] { width: 8%; }
[data-p="9"] { width: 9%; }
[data-p="10"] { width: 10%; }
[data-p="11"] { width: 11%; }
[data-p="12"] { width: 12%; }
[data-p="13"] { width: 13%; }
[data-p="14"] { width: 14%; }
[data-p="15"] { width: 15%; }
[data-p="16"] { width: 16%; }
[data-p="17"] { width: 17%; }
[data-p="18"] { width: 18%; }
[data-p="19"] { width: 19%; }
[data-p="20"] { width: 20%; }
[data-p="21"] { width: 21%; }
[data-p="22"] { width: 22%; }
[data-p="23"] { width: 23%; }
[data-p="24"] { width: 24%; }
[data-p="25"] { width: 25%; }
[data-p="26"] { width: 26%; }
[data-p="27"] { width: 27%; }
[data-p="28"] { width: 28%; }
[data-p="29"] { width: 29%; }
[data-p="30"] { width: 30%; }
[data-p="31"] { width: 31%; }
[data-p="32"] { width: 32%; }
[data-p="33"] { width: 33%; }
[data-p="34"] { width: 34%; }
[data-p="35"] { width: 35%; }
[data-p="36"] { width: 36%; }
[data-p="37"] { width: 37%; }
[data-p="38"] { width: 38%; }
[data-p="39"] { width: 39%; }
[data-p="40"] { width: 40%; }
[data-p="41"] { width: 41%; }
[data-p="42"] { width: 42%; }
[data-p="43"] { width: 43%; }
[data-p="44"] { width: 44%; }
[data-p="45"] { width: 45%; }
[data-p="46"] { width: 46%; }
[data-p="47"] { width: 47%; }
[data-p="48"] { width: 48%; }
[data-p="49"] { width: 49%; }
[data-p="50"] { width: 50%; }
[data-p="51"] { width: 51%; }
[data-p="52"] { width: 52%; }
[data-p="53"] { width: 53%; }
[data-p="54"] { width: 54%; }
[data-p="55"] { width: 55%; }
[data-p="56"] { width: 56%; }
[data-p="57"] { width: 57%; }
[data-p="58"] { width: 58%; }
[data-p="59"] { width: 59%; }
[data-p="60"] { width: 60%; }
[data-p="61"] { width: 61%; }
[data-p="62"] { width: 62%; }
[data-p="63"] { width: 63%; }
[data-p="64"] { width: 64%; }
[data-p="65"] { width: 65%; }
[data-p="66"] { width: 66%; }
[data-p="67"] { width: 67%; }
[data-p="68"] { width: 68%; }
[data-p="69"] { width: 69%; }
[data-p="70"] { width: 70%; }
[data-p="71"] { width: 71%; }
[data-p="72"] { width: 72%; }
[data-p="73"] { width: 73%; }
[data-p="74"] { width: 74%; }
[data-p="75"] { width: 75%; }
[data-p="76"] { width: 76%; }
[data-p="77"] { width: 77%; }
[data-p="78"] { width: 78%; }
[data-p="79"] { width: 79%; }
[data-p="80"] { width: 80%; }
[data-p="81"] { width: 81%; }
[data-p="82"] { width: 82%; }
[data-p="83"] { width: 83%; }
[data-p="84"] { width: 84%; }
[data-p="85"] { width: 85%; }
[data-p="86"] { width: 86%; }
[data-p="87"] { width: 87%; }
[data-p="88"] { width: 88%; }
[data-p="89"] { width: 89%; }
[data-p="90"] { width: 90%; }
[data-p="91"] { width: 91%; }
[data-p="92"] { width: 92%; }
[data-p="93"] { width: 93%; }
[data-p="94"] { width: 94%; }
[data-p="95"] { width: 95%; }
[data-p="96"] { width: 96%; }
[data-p="97"] { width: 97%; }
[data-p="98"] { width: 98%; }
[data-p="99"] { width: 99%; }
[data-p="100"] { width: 100%; }

/* Add-to-home-screen bar (built by a2hs.js) --------------------------------- */
.a2hs { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: start; padding: 14px 44px 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 8px 24px rgba(22, 33, 58, .16); }
.a2hs:focus { outline: none; }
.a2hs__title { font-size: 1rem; }
.a2hs__text { margin-top: 2px; color: var(--muted); font-size: .9rem; }
.a2hs__steps { margin: 8px 0 0; padding-left: 20px; list-style: decimal; display: grid; gap: 3px; color: var(--ink-2); font-size: .88rem; }
.a2hs__share { width: 15px; height: 15px; vertical-align: -2px; color: var(--brand-ink); }
.a2hs__icon { width: 48px; height: 48px; border-radius: 12px; grid-row: 1 / span 2; }
.a2hs__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; grid-column: 2; }
.a2hs__primary { height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius); background: var(--brand); color: #fff; font-weight: 600; }
.a2hs__secondary { height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink-2); font-weight: 600; }
.a2hs__link { padding: 0 4px; border: 0; background: none; color: var(--brand-ink); font-weight: 600; text-decoration: underline; }
.a2hs__close { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.a2hs__close:hover { background: var(--canvas); }
.site-footer__install { margin-left: 10px; padding: 0; border: 0; background: none; color: var(--brand-ink); font-weight: 600; text-decoration: underline; font-size: inherit; }
@media (min-width: 760px) { .a2hs { left: auto; right: 20px; width: 380px; } }

/* Offline page ------------------------------------------------------------- */
.offline { max-width: 520px; margin: 48px auto; padding: 0 var(--gutter); text-align: center; }
.offline__brand { display: inline-block; margin-bottom: 28px; }
.offline__brand img { width: min(260px, 70vw); height: auto; }
.offline h1 { font-size: 1.5rem; }
.offline p { margin: 10px 0 20px; color: var(--muted); }
.offline__button { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: var(--radius); background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .channel-nav, .hero__progress span, .channel-group__chevron { transition: none; }
}

.channel-nav.is-filtering [data-favourites] { display: none; }

/* Radio: monogram badges instead of station artwork ------------------------ */
.logo-box--mono { font-size: .58rem; font-weight: 800; letter-spacing: .02em; line-height: 1; text-align: center; user-select: none; }
.logo-box--mono.logo-box--lg { font-size: .95rem; }
.mono-0 { background: #e8f1ff; color: #1f4f9c; } .mono-1 { background: #fdeaea; color: #a32323; }
.mono-2 { background: #e9f8ec; color: #1d6a34; } .mono-3 { background: #fff3e0; color: #9a5300; }
.mono-4 { background: #f1e9fb; color: #5c2d91; } .mono-5 { background: #e6f7f7; color: #106b6b; }
.mono-6 { background: #fdeef6; color: #9b2260; } .mono-7 { background: #f4f1e3; color: #6f5d00; }
.mono-8 { background: #e8f3f9; color: #0f5c8a; } .mono-9 { background: #f2ecea; color: #7a3e2b; }
.mono-10 { background: #ecf4e5; color: #3f6b12; } .mono-11 { background: #eeeef3; color: #3f3f63; }
.channel-nav .logo-box--mono { box-shadow: none; }

/* Radio: listen links under the station head ------------------------------ */
.listen { margin: 0 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.listen__primary, .listen__secondary { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: .92rem; }
.listen__primary { background: var(--brand); color: #fff; }
.listen__primary:hover { background: var(--brand-ink); }
.listen__primary .icon { fill: currentColor; stroke: none; width: 16px; height: 16px; }
.listen__secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.listen__secondary:hover { background: var(--canvas); }
.listen__secondary .icon { width: 15px; height: 15px; }
.listen__hint { flex-basis: 100%; color: var(--muted); font-size: .8rem; }

/* Radio: schedule status notice -------------------------------------------- */
.notice[role="status"] { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.notice[role="status"] strong { color: var(--ink); }

/* Radio: live player ------------------------------------------------------- */
.listen__primary { border: 0; }
.listen__primary .listen__stop { display: none; }
.listen[data-state="playing"] .listen__primary .listen__play, .listen[data-state="loading"] .listen__primary .listen__play { display: none; }
.listen[data-state="playing"] .listen__primary .listen__stop, .listen[data-state="loading"] .listen__primary .listen__stop { display: block; }
.listen[data-state="playing"] .listen__primary { background: var(--ink); }
.listen[data-state="loading"] .listen__primary { background: var(--brand-ink); opacity: .85; }
.listen__primary:disabled { background: var(--line); color: var(--muted); cursor: default; }
.listen__status { color: var(--muted); font-size: .85rem; }
.listen[data-state="playing"] .listen__status { color: var(--brand-ink); font-weight: 600; }
.listen[data-state="error"] .listen__status { color: #a32323; }
.listen__audio { flex-basis: 100%; width: min(100%, 420px); height: 36px; }
.channel-group--historic .channel-group__label { color: var(--muted); }

/* Radio: country selector and country links ------------------------------- */
.country-menu { position: relative; flex: none; }
.country-menu summary { list-style: none; height: 38px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.country-menu summary::-webkit-details-marker { display: none; }
.country-menu summary .icon { width: 14px; height: 14px; transform: rotate(90deg); }
.country-menu[open] summary .icon { transform: rotate(-90deg); }
.country-menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 200px; max-height: 60vh; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(22, 33, 58, .16); }
.country-menu__list a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: .92rem; }
.country-menu__list a:hover { background: var(--canvas); }
.country-menu__list a[aria-current="true"] { background: var(--brand-soft); font-weight: 600; }
.countries__list { display: flex; flex-wrap: wrap; gap: 8px; }
.countries__list a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 600; }
.countries__list a:hover { background: var(--canvas); }
.countries__list a[aria-current="true"] { border-color: transparent; background: var(--brand-soft); color: var(--brand-ink); }
