/* CEA-HOW Audio: player bar, Up next panel, toast. Loads on every page; scoped to .cam-ui. */
/* CEA-HOW Audio Library mockup. Everything scoped under .cam. */
body.cam-has-bar { padding-bottom: 84px; }

.cam, .cam-ui {
	--ground: #f5f3ee; --ink: #1f2433; --muted: #5a6072; --soft: #4a5064;
	--navy: #374785; --coral: #f76c6c; --coral-ink: #2a1414; --live: #2fbf71;
	--line: #e6e1d6; --pill-line: #cfcabd;
	--serif: 'Roboto Serif', Georgia, serif;
}
.cam-ui *, .cam-ui *::before, .cam-ui *::after { box-sizing: border-box; }
.cam-ui button { font: inherit; cursor: pointer; margin: 0; line-height: 1; text-transform: none; letter-spacing: normal; box-shadow: none; }
.cam-ui svg { display: block; flex-shrink: 0; }
.cam-ui .cam-live { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--live); color: #0c2a18; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.cam-ui .cam-live i { width: 8px; height: 8px; border-radius: 50%; background: #0c2a18; }
.cam-queue[hidden] { display: none !important; }
/* ---- Player bar ---- */
.cam-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990; height: 84px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 20px; padding: 0 32px; font-family: Inter, system-ui, sans-serif; }
.cam-bar-art { flex-shrink: 0; width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 18px; background: var(--bg); color: var(--ink2); }
.cam-bar-info { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cam-bar-info b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-bar-info small { font-size: 12px; color: #b9bfd3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-bar-ctrls { display: flex; align-items: center; gap: 14px; }
.cam-bar-ico { width: 40px; height: 40px; border: 0; background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%; }
.cam-bar-ico:hover { background: rgba(255,255,255,.08); }
.cam-bar-main { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cam-bar-prog { flex-grow: 1; display: flex; align-items: center; gap: 12px; font-size: 12px; color: #b9bfd3; font-variant-numeric: tabular-nums; }
.cam-bar-track { flex-grow: 1; height: 6px; border-radius: 999px; background: #3a4154; position: relative; cursor: pointer; }
.cam-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--coral); }
.cam-bar-fill.is-radio { background: var(--live); }
.cam-bar-track.is-live { cursor: default; }
.cam-bar-win { display: inline-flex; gap: 2px; margin-left: -6px; }
.cam-bar-win .cam-bar-ico { width: 34px; height: 34px; color: #b9bfd3; }
.cam-bar-win .cam-bar-ico:hover { color: #fff; }
/* Minimized: a small pill in the corner */
.cam-bar.is-min { width: auto; max-width: calc(100vw - 40px); height: 64px; padding: 0 8px 0 18px; gap: 10px; border-radius: 999px; box-shadow: 0 12px 32px rgba(31,36,51,.35); overflow: hidden; }
.cam-bar.is-min .cam-bar-art { width: 40px; height: 40px; border-radius: 50%; font-size: 14px; }
.cam-bar.is-min .cam-bar-info { width: auto; flex: 0 1 250px; min-width: 0; max-width: 250px; gap: 2px; }
/* shrunk bar, V2 (Jason, Sep 28): a small label ("CEA-HOW Radio" or the collection) above the talk's title, which scrolls when it doesn't fit */
.cam-bar.is-min .cam-bar-info small { font-size: 11px; color: #9aa2b8; }
.cam-marq-clip { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cam-marq { display: inline; font-size: 15px; font-weight: 700; }
.cam-marq-clip.is-over { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
.cam-marq.is-scroll { display: inline-block; animation: cam-marq var(--dur, 20s) linear infinite; }
@keyframes cam-marq { 0%, 15% { transform: translateX(0); opacity: 1; } 70%, 86% { transform: translateX(var(--shift)); opacity: 1; } 92% { transform: translateX(var(--shift)); opacity: 0; } 93% { transform: translateX(0); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cam-marq.is-scroll { animation: none; display: inline; } .cam-marq-clip.is-over { text-overflow: ellipsis; -webkit-mask-image: none; mask-image: none; } }
.cam-bar.is-min .cam-bar-main { width: 44px; height: 44px; }
.cam-bar.is-min .cam-bar-ico { width: 34px; height: 34px; color: #b9bfd3; } /* same grey as the full bar's minimize / close (Jason, Sep 28) */
.cam-bar.is-min .cam-bar-ico:hover { color: #fff; }
.cam-bar-mini-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #3a4154; }
.cam-bar-pill { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid #4a5268; background: transparent; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cam-bar-pill:hover { border-color: #8a91a8; }
.cam-bar-pill.is-live { border-color: var(--live); font-weight: 700; }
.cam-bar-pill.is-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.cam-bar-pill.is-on { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); font-weight: 700; }
/* ---- Up next panel ---- */
.cam-queue { position: fixed; right: 32px; bottom: 100px; z-index: 99991; width: 360px; max-height: calc(100vh - 140px); overflow: auto; background: #fff; border: 1px solid #e0dbcf; border-radius: 18px; box-shadow: 0 16px 40px rgba(31,36,51,.22); color: var(--ink); font-family: Inter, system-ui, sans-serif; }
.cam-queue-head { padding: 16px 18px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cam-queue-head b { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.cam-queue-head small { font-size: 12px; color: var(--muted); text-align: right; }
.cam-queue-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid #f0ece3; cursor: pointer; }
.cam-queue-row:hover { background: #faf8f4; }
.cam-queue-row > span:first-child { width: 22px; font-size: 13px; font-weight: 700; color: #9aa0b0; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.cam-queue-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cam-queue-text b { font-size: 14px; font-weight: 600; }
.cam-queue-text small { font-size: 12px; color: var(--muted); }
.cam-queue-len { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cam-queue-foot { padding: 10px 18px 14px; border-top: 1px solid #f0ece3; font-size: 13px; color: var(--muted); }
@media (max-width: 782px) {
	.cam-bar { padding: 0 12px; gap: 10px; }
	.cam-bar-ctrls { gap: 4px; }
	.cam-bar .cam-bar-ico[data-act="back"] { display: none; }
	.cam-bar-pill[data-act="speed"] { display: none; }
	.cam-bar-pill .cam-bar-pill-label { display: none; }
	.cam-queue { left: 12px; right: 12px; width: auto; bottom: 96px; }
}
.cam-toast { transform: translateX(-50%) translateY(8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; background: #1f2433; color: #fff; font: 600 14px/1.3 Inter, system-ui, sans-serif; padding: 12px 18px; border-radius: 999px; box-shadow: 0 10px 28px rgba(31,36,51,.3); max-width: calc(100vw - 32px); }
.cam-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.cam-toast { position: fixed; left: 50%; z-index: 99992; }
.cam-bar-note { flex-grow: 1; font-size: 13px; color: #b9bfd3; }
.cam-bar a.cam-bar-ico, .cam-bar a.cam-bar-ico:hover { color: #fff; text-decoration: none; }
.cam-bar { font-size: 14px; line-height: 1.3; }
.cam-bar b, .cam-queue b { color: inherit; }
/* Up next: the theme's tall line height leaked in on other pages (Jason, Sep 27) */
.cam-queue, .cam-queue * { line-height: 1.3; }
.cam-queue-text { gap: 3px; }
.cam-queue-text b, .cam-queue-text small { display: block; margin: 0; }
.cam-queue-row { padding: 12px 18px; }
.cam-queue-head { line-height: 1.2; }

/* full-width bar edges (the phone rule below floats it) */
.cam-bar:not(.is-min) { left: 0 !important; right: 0 !important; bottom: 0 !important; }

/* ---- Phone: the bar is a floating card (Phone board): cover, title, play, Up next, close; a thin progress line ---- */
.cam-bar-phone-track { display: none; }
@media (max-width: 640px) {
	.cam-bar:not(.is-min) { left: 8px !important; right: 8px !important; bottom: 10px !important; height: 68px; border-radius: 16px; padding: 0 6px 0 10px; gap: 8px; overflow: hidden; box-shadow: 0 10px 28px rgba(31,36,51,.3); }
	.cam-bar:not(.is-min) .cam-bar-phone-track { display: block; }
	.cam-bar .cam-bar-art { width: 46px; height: 46px; font-size: 15px; }
	.cam-bar .cam-live { padding: 4px 9px; font-size: 11px; }
	.cam-bar .cam-bar-info { flex: 1 1 auto; width: auto; min-width: 0; }
	.cam-bar .cam-bar-info b { font-size: 14px; }
	.cam-bar .cam-bar-main { width: 44px; height: 44px; flex-shrink: 0; }
	.cam-bar .cam-bar-ctrls { gap: 0; }
	.cam-bar [data-act="back"], .cam-bar [data-act="next"], .cam-bar .cam-bar-dl, .cam-bar [data-act="speed"], .cam-bar [data-act="live"],
	.cam-bar .cam-bar-prog, .cam-bar .cam-bar-note, .cam-bar .cam-bar-win [data-act="min"] { display: none !important; }
	.cam-bar .cam-bar-pill[data-act="queue"] { width: 40px; height: 40px; padding: 0; justify-content: center; border: 0; flex-shrink: 0; }
	.cam-bar .cam-bar-pill-label { display: none; }
	.cam-bar .cam-bar-win { margin-left: 0; flex-shrink: 0; }
	.cam-bar.is-min { right: 12px !important; bottom: 12px !important; }
	body.cam-has-bar { padding-bottom: 90px; }
	.cam-queue { left: 8px !important; right: 8px !important; width: auto; bottom: 86px !important; max-height: calc(100vh - 120px); }
	.cam-toast { bottom: 90px !important; }
}

/* ---------- Screen readers and keyboard ---------- */
/* the hidden status line that speaks what started or paused */
.cam-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
/* a ring only when moving with the keyboard (never on a click or tap) */
.cam-ui a:focus-visible, .cam-ui button:focus-visible, .cam-ui [tabindex]:focus-visible { outline: 3px solid #1c7eff !important; outline-offset: 2px !important; }

/* ---------- Your queue (Up next panel) ---------- */
.cam-bar-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: var(--coral-ink); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.cam-bar-pill.is-back { border-color: var(--coral); }
.cam-q-user { padding: 6px 10px 6px 18px; cursor: default; }
.cam-ui .cam-q-main { flex-grow: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 4px 0; border: 0; background: none; color: inherit; text-align: left; line-height: 1.3; }
.cam-q-main > span:first-child { width: 22px; font-size: 13px; font-weight: 700; color: #9aa0b0; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.cam-q-btns { display: inline-flex; gap: 2px; flex-shrink: 0; }
.cam-ui .cam-q-btn { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.cam-ui .cam-q-btn svg { width: 16px; height: 16px; }
.cam-ui .cam-q-btn:hover { background: #f0ece3; color: var(--ink); }
.cam-ui .cam-q-btn[disabled] { opacity: .3; cursor: default; background: none; }
.cam-ui .cam-q-clear, .cam-ui .cam-q-link { border: 0; background: none; padding: 0; font-size: 12px; font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.cam-queue-note { padding: 0 18px 8px; font-size: 13px; color: var(--muted); }
/* the "More" menu on a talk (Play next / Add to queue) */
.cam-menu { position: fixed; z-index: 99993; min-width: 190px; padding: 6px; background: #fff; border: 1px solid #e0dbcf; border-radius: 12px; box-shadow: 0 10px 28px rgba(28,33,48,.18); font-family: Inter, system-ui, sans-serif; }
.cam-ui .cam-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; }
.cam-ui .cam-menu-item:hover, .cam-ui .cam-menu-item:focus { background: #f5f3ee; outline: none; }
.cam-ui .cam-menu-item:focus-visible { outline: 3px solid #1c7eff !important; outline-offset: -3px !important; }
.cam-ui .cam-menu-item svg { width: 18px; height: 18px; color: var(--muted); }

/* drag to reorder (handle on the left of each queued talk) */
.cam-q-user { padding-left: 8px; }
.cam-ui .cam-q-handle { cursor: grab; touch-action: none; color: #9aa0b0; }
.cam-q-user.is-dragging { background: #f5f3ee; box-shadow: 0 6px 18px rgba(28,33,48,.14); position: relative; z-index: 1; }
.cam-q-user.is-dragging .cam-q-handle { cursor: grabbing; }

/* ---------- "Your talks | Live radio" switch, first in the bar (option A, Jason Sep 27) ---------- */
.cam-bar-switch { display: flex; flex-shrink: 0; padding: 3px; border: 1px solid #4a5268; border-radius: 999px; }
.cam-ui .cam-sw { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.cam-ui .cam-sw:hover:not([aria-pressed="true"]):not([disabled]) { background: rgba(255,255,255,.08); }
.cam-ui .cam-sw[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 700; cursor: default; }
.cam-ui .cam-sw[disabled] { opacity: .45; cursor: default; }
.cam-sw.is-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.cam-ui .cam-sw.is-live[aria-pressed="true"] { background: var(--live); color: #0c2a18; font-weight: 800; }
.cam-sw.is-live[aria-pressed="true"] i { background: #0c2a18; }
/* on the radio the switch already says Live: no LIVE pill; the title lines up with a talk's title */
.cam-bar.is-radio:not(.is-min) .cam-live { display: none; }
.cam-bar.is-radio:not(.is-min) .cam-bar-info { margin-left: 72px; }
@media (max-width: 782px) {
	.cam-bar-info { width: auto; flex: 0 1 200px; }
	.cam-bar.is-radio:not(.is-min) .cam-bar-info { margin-left: 0; }
}
/* phone: the switch is its own full-width row under the talk */
@media (max-width: 640px) {
	.cam-bar:not(.is-min) { height: auto; flex-wrap: wrap; row-gap: 10px; padding: 10px 6px 12px 10px; }
	.cam-bar:not(.is-min) .cam-bar-switch { order: 5; flex: 1 0 100%; margin-right: 4px; }
	.cam-bar:not(.is-min) .cam-sw { flex: 1 1 0; height: 36px; }
	.cam-bar.is-radio:not(.is-min) .cam-live { display: inline-flex; }
	.cam-bar .cam-bar-info { flex: 1 1 0; }
	body.cam-has-bar { padding-bottom: 140px; }
	.cam-queue { bottom: 150px !important; max-height: calc(100vh - 180px); }
	.cam-toast { bottom: 150px !important; }
}

/* ---- Covers (colour + big type + a shape): here, not in library.css, so the player bar can draw one ---- */
.cam-cover { position: relative; overflow: hidden; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; background: var(--bg); color: var(--ink2); }
.cam-cover-shape { position: absolute; }
.cam-cover-kicker { position: relative; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.cam-cover-word { position: relative; font-family: var(--serif); font-weight: 800; line-height: .95; letter-spacing: -.02em; word-break: break-word; }
.cam-shape-circle { right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: var(--tint); }
.cam-shape-ring { right: 18px; top: 18px; width: 110px; height: 110px; border-radius: 50%; border: 18px solid var(--tint); }
.cam-shape-stripes { right: 0; top: 0; width: 55%; height: 60%; background: repeating-linear-gradient(135deg, var(--tint) 0 12px, transparent 12px 26px); }
.cam-shape-half { right: -10px; top: 20px; width: 150px; height: 75px; border-radius: 150px 150px 0 0; background: var(--tint); }
/* dots run off the top-right corner (Jason, Sep 27) */
.cam-shape-dots { right: -8px; top: -8px; width: 150px; height: 118px; background-image: radial-gradient(var(--tint) 5px, transparent 6px); background-size: 20px 20px; }
.cam-shape-square { right: 22px; top: 22px; width: 84px; height: 84px; border-radius: 14px; transform: rotate(12deg); background: var(--tint); }

/* the bar's art: the collection's real cover drawn at 280 px, then shrunk to fit (Jason, Sep 27) */
.cam-bar-art.is-cover { position: relative; overflow: hidden; padding: 0; display: block; --s: .1857; }
.cam-bar-art.is-cover .cam-cover { position: absolute; left: 0; top: 0; width: 280px; height: 280px; padding: 20px; transform: scale(var(--s)); transform-origin: 0 0; }
.cam-bar-art.is-cover .cam-cover-word { font-size: 56px; }
.cam-bar.is-min .cam-bar-art.is-cover { --s: .1429; }
@media (max-width: 640px) { .cam-bar .cam-bar-art.is-cover { --s: .1643; } }

/* a collection's big word: shrunk to fit by fitWords() in player.js, never broken mid-word */
.cam-cover-word.is-fit { overflow-wrap: normal; word-break: normal; }

/* the progress track never collapses: on a full bar (1280 px screens) the title gives up room first (Jason, Sep 27) */
.cam-bar:not(.is-min) .cam-bar-prog { min-width: 180px; }
.cam-bar:not(.is-min) .cam-bar-info { flex: 0 1 260px; width: auto; min-width: 120px; }
.cam-bar.is-radio:not(.is-min) .cam-bar-info { margin-left: 0; }
@media (max-width: 640px) { .cam-bar:not(.is-min) .cam-bar-prog { min-width: 0; } .cam-bar:not(.is-min) .cam-bar-info { flex: 1 1 0; min-width: 0; } }

/* ---------- Layout 5, spacing C (Jason, Sep 27): two rows on computers.
   Row 1: switch, cover, title, back / play / next, download, speed, Up next, minimize, close.
   Row 2: the progress bar, full width, 18px above it and 22px below. Phones keep their own layout. ---------- */
@media (min-width: 641px) {
	.cam-bar:not(.is-min) { height: auto; flex-wrap: wrap; column-gap: 16px; row-gap: 18px; padding: 14px 24px 22px; }
	.cam-bar:not(.is-min) .cam-bar-info { flex: 1 1 0; width: auto; min-width: 120px; }
	.cam-bar:not(.is-min) .cam-bar-info b { font-size: 16px; }
	.cam-bar:not(.is-min) .cam-bar-info small { font-size: 13px; }
	.cam-bar:not(.is-min) .cam-bar-ctrls, .cam-bar.is-radio:not(.is-min) .cam-bar-main { margin-right: 24px; }
	.cam-bar:not(.is-min) .cam-bar-prog, .cam-bar:not(.is-min) .cam-bar-note { order: 10; flex: 1 0 100%; min-width: 0; }
	body.cam-has-bar { padding-bottom: 130px; }
}

/* ---------- Full bar, V2 of the player bar options (Jason, Sep 28): title first and bigger, every extra button
   outlined the same way (download, back, next, speed, Up next), a thicker 720 px progress bar with bigger times ---------- */
.cam-bar:not(.is-min) .cam-bar-kick { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9aa2b8; }
.cam-bar:not(.is-min) .cam-bar-info { gap: 5px; }
@media (min-width: 641px) {
	.cam-bar:not(.is-min) .cam-marq { font-size: 19px; }
	.cam-bar:not(.is-min) .cam-bar-ctrls .cam-bar-ico, .cam-bar:not(.is-min) .cam-bar-dl { width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.3); box-sizing: border-box; }
	.cam-bar:not(.is-min) .cam-bar-ctrls .cam-bar-ico:hover, .cam-bar:not(.is-min) .cam-bar-dl:hover { border-color: #fff; background: rgba(255,255,255,.06); }
	.cam-bar:not(.is-min) .cam-bar-pill { height: 46px; padding: 0 18px; border-color: rgba(255,255,255,.3); font-size: 15px; }
	.cam-bar:not(.is-min) .cam-bar-pill:hover { border-color: #fff; }
	.cam-bar:not(.is-min) .cam-bar-main { width: 60px; height: 60px; }
	.cam-bar:not(.is-min) .cam-bar-prog { max-width: 720px; margin: 0 auto; font-size: 16px; font-weight: 600; color: #fff; gap: 14px; }
	.cam-bar:not(.is-min) .cam-bar-track { height: 8px; }
}
@media (max-width: 640px) { .cam-bar:not(.is-min) .cam-marq { font-size: 14px; } }
.cam-bar:not(.is-min) .cam-bar-pill.is-on, .cam-bar:not(.is-min) .cam-bar-pill.is-back { border-color: var(--coral); }
