/* Power Hour redesign (PM project 3, Rick approved 2026-10-27, chat-20261027-201928-f7a0).
 * Gospel Library look: 3-across portrait covers, short title underneath, tap a cover and its
 * detail slides up from the bottom. A LAYER on top of style.css: the tiles, their bodies and every
 * <audio> stay exactly where main.js puts them, so Play All, the offline download and the stats
 * keep working untouched. Colors come from the style.css variables, so dark mode follows. */

.ph-next .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
}
@media (min-width: 700px) { .ph-next .dashboard-grid { grid-template-columns: repeat(4, 1fr); gap: 26px 18px; } }
@media (min-width: 1000px) { .ph-next .dashboard-grid { grid-template-columns: repeat(6, 1fr); } }

/* A cover card: no box, no header, no body in the grid. */
.ph-next .dash-tile.ph-card { background: none; border: 0; border-radius: 0; overflow: visible; box-shadow: none; grid-column: auto !important; }
/* In the grid a card shows ONLY its cover; everything main.js put in the tile waits for the sheet. */
.ph-next .dash-tile.ph-card:not(.ph-open) > :not(.ph-cover) { display: none !important; }

.ph-cover { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; color: var(--brown-dark); font: inherit; }
.ph-cover-art { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden;
    background: var(--tan-light); box-shadow: 0 2px 8px rgba(60, 40, 20, .18); transition: transform .15s ease; }
.ph-cover:active .ph-cover-art { transform: scale(.97); }
.ph-cover-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cover-title { display: block; margin-top: 7px; font-size: .92rem; font-weight: 500; line-height: 1.2; }

/* Little badges on the cover: done today (check) and saved for offline (dot). */
.ph-badge { position: absolute; display: none; align-items: center; justify-content: center; font-size: 12px; line-height: 1; }
.ph-badge-done { top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #3fa34d; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ph-badge-off { bottom: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #3fa34d; border: 2px solid #fff; }
.ph-card.ph-done .ph-badge-done, .ph-card.ph-saved .ph-badge-off { display: flex; }
.ph-card.now-playing .ph-cover-art { outline: 3px solid #5a7a4a; outline-offset: 2px; }

/* The slide-up sheet: the tile's own header + body, shown fixed at the bottom. */
.ph-scrim { position: fixed; inset: 0; background: rgba(30, 20, 10, .45); z-index: 8990; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
body.ph-sheet-open .ph-scrim { opacity: 1; pointer-events: auto; }
body.ph-sheet-open { overflow: hidden; }
.ph-next .dash-tile.ph-card.ph-open { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; max-height: 88vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch; background: var(--cream); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.25);
    padding: 0 0 calc(18px + env(safe-area-inset-bottom)); animation: ph-up .22s ease-out; max-width: 640px; margin: 0 auto; }
.ph-next .dash-tile.ph-card.ph-open > .dash-tile-header { display: flex; position: sticky; top: 0; z-index: 1; background: var(--cream); border-bottom: 1px solid var(--tan); padding-top: 18px; }
.ph-next .dash-tile.ph-card.ph-open > .ph-fb { padding: 0 16px; }
.ph-next .dash-tile.ph-card.ph-open > .ph-cover { display: none; }
.ph-sheet-grab { position: absolute; top: 6px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--tan); }
.ph-sheet-close { margin-left: auto; border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--brown-light); cursor: pointer; padding: 0 4px; }
.ph-placeholder { visibility: hidden; }
@keyframes ph-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Top bar: Play All and the Ready light first and largest. */
.ph-next .dashboard-date-bar .play-all-btn { font-size: 1rem; padding: 10px 22px; border-radius: 22px; }

/* ---- Top: Play All and the Ready light first; the rest quieter (Rick: keep both on top). ---- */
.ph-next .archive-nav-bar { display: none; }          /* the tab bar at the bottom replaces this strip */
.ph-next .disclaimer-banner { font-size: .75rem; }
.ph-next .dashboard-date-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ph-next .dashboard-date-bar .play-all-btn { order: 1; }
.ph-next .dashboard-date-bar #download-all-btn { order: 2; border-radius: 22px; }
.ph-next .dashboard-date-bar #smr-radio-btn, .ph-next .dashboard-date-bar #shuffle-btn, .ph-next .dashboard-date-bar #ph-customize-btn { order: 3; font-size: .8rem; }
.ph-next .dashboard-date-bar .power-hour-logo, .ph-next .dashboard-date-bar .dashboard-date, .ph-next .dashboard-date-bar .dashboard-time { order: 0; }
.ph-next .dashboard-date-bar .smr-bar { order: 4; }
.ph-next .sleep-timer-bar { padding: 6px 12px; font-size: .8rem; }

/* ---- Now-playing bar: main.js's own Play All strip, pinned above the tab bar. ---- */
.ph-next { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.ph-next .play-all-progress { position: fixed; left: 8px; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 8500;
    max-width: 640px; margin: 0 auto; flex-wrap: nowrap; padding: 8px 10px 10px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.22); background: var(--white); }
.ph-next .play-all-progress .progress-label { display: none; }
.ph-next .play-all-progress .progress-title { font-weight: 600; font-size: .88rem; }
.ph-np-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.ph-np-line { position: absolute; left: 0; bottom: 0; height: 3px; background: #5a7a4a; width: 0; transition: width .5s linear; }
/* The radio's own bar gets the same spot when the radio plays. */
.ph-next .smr-bar:not([hidden]) { position: fixed; left: 8px; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 8501;
    max-width: 640px; margin: 0 auto; padding: 8px 10px; border-radius: 12px; background: var(--white); box-shadow: 0 4px 18px rgba(0,0,0,.22); }

/* ---- Bottom tab bar (Gospel Library style): Home, Music, Radio, Library. ---- */
.ph-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8600; display: flex; justify-content: space-around;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); background: var(--cream); border-top: 1px solid var(--tan); }
.ph-tabs a, .ph-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none;
    color: var(--brown-light); font: inherit; font-size: .68rem; text-decoration: none; cursor: pointer; padding: 2px 0; }
.ph-tabs .ph-tab-icon { font-size: 1.35rem; line-height: 1; }
.ph-tabs .ph-tab-on { color: var(--brown-accent); font-weight: 600; }
.ph-tabs button[aria-pressed="true"] { color: #5a7a4a; font-weight: 600; }
body.ph-sheet-open .ph-tabs, body.ph-sheet-open .play-all-progress { z-index: 8400; }
.ph-next .dashboard-date-bar #smr-radio-btn, .ph-next .dashboard-date-bar #shuffle-btn { padding: 6px 10px; }
.ph-next .dashboard-date-bar .companion-bot { display: none; }   /* Buddy retired 2026-10-15 (RETIRED_PROJECTS.md) */
.ph-next .disclaimer-banner-inner { font-size: .7rem; line-height: 1.35; }
