/* HomeBoard YouTube — fits the calendar rail and a dedicated full player tab. */
.hb-youtube{min-width:0;max-width:100%;overflow:hidden;padding:20px}
.hb-yt-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.hb-yt-heading h2{margin:4px 0 0;font-size:21px;letter-spacing:-.5px}
.hb-yt-symbol{display:inline-flex;background:#e62117;color:white;border-radius:7px;width:30px;height:22px;align-items:center;justify-content:center;font-size:13px;vertical-align:2px;margin-right:4px}
.hb-yt-search{display:flex;gap:8px;min-width:0;margin:0}
.hb-yt-search .text-input{flex:1;min-width:0}
.hb-yt-search .primary-button{min-height:44px;padding:8px 15px}
.hb-yt-feedback{font-size:12px;line-height:1.5;color:var(--muted);margin:7px 0;min-height:12px}
.hb-yt-player{width:100%;aspect-ratio:16/9;min-height:200px;overflow:hidden;border-radius:12px;background:#171717}
.hb-yt-frame{width:100%;height:100%;border:0;display:block}
.hb-yt-placeholder{height:200px;border-radius:12px;background:linear-gradient(145deg,#29352f,#161e1a);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#eaf0ec;gap:14px;font-size:12px}
.hb-yt-placeholder span{display:flex;align-items:center;justify-content:center;color:white;background:#e62117;border-radius:11px;width:66px;height:43px;font-size:25px}
.hb-yt-placeholder p{margin:0;color:#e2e8e1}
.hb-yt-playing{font-size:12px;font-weight:750;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:8px 0}
.hb-yt-results{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}
.hb-yt-result{border:1px solid var(--edge);background:var(--paper);border-radius:12px;display:flex;align-items:center;gap:9px;padding:7px;text-align:left;color:var(--ink);min-width:0;min-height:70px;cursor:pointer}
.hb-yt-result:hover,.hb-yt-result.is-playing{border-color:var(--accent);background:var(--accent2)}
.hb-yt-result img{width:95px;min-width:95px;aspect-ratio:16/9;object-fit:cover;border-radius:7px}
.hb-yt-result span{min-width:0;display:block}
.hb-yt-result strong{font-size:12px;line-height:1.35;font-weight:700;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-word}
.hb-yt-result small{display:block;color:var(--muted);font-size:10px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hb-yt-note{font-size:11px;line-height:1.4;color:var(--muted);margin:10px 0 0}
.hb-youtube-page{max-width:1000px;margin:auto}
.hb-youtube-page .hb-yt-player,.hb-youtube-page .hb-yt-placeholder{max-width:860px;margin:auto}
.hb-youtube-page .hb-yt-results{grid-template-columns:repeat(2,minmax(0,1fr))}
/* Home tile: rail at least 245px wide, iframe at least 200 x 200 (YouTube minimum). */
.landscape-workspace:has(.hb-youtube-tile){grid-template-columns:minmax(0,1fr) clamp(245px,26vw,345px)}
.daily-rail .hb-youtube-tile{padding:10px;border-radius:14px;flex-shrink:0}
.hb-youtube-tile .hb-yt-heading{margin-bottom:9px}
.hb-youtube-tile .hb-yt-heading h2{font-size:17px}
.hb-youtube-tile .hb-yt-heading .link-button{font-size:11px}
.hb-youtube-tile .hb-yt-search{gap:5px;flex-wrap:wrap}
.hb-youtube-tile .hb-yt-search .text-input{min-height:40px;font-size:12px;flex-basis:100%}
.hb-youtube-tile .hb-yt-search button{min-height:37px;min-width:100%;font-size:11px}
.hb-youtube-tile .hb-yt-player{aspect-ratio:auto;height:200px;min-height:200px}
.hb-youtube-tile .hb-yt-placeholder{height:145px}
.hb-youtube-tile .hb-yt-results{grid-template-columns:minmax(0,1fr);gap:5px;margin-top:8px}
.hb-youtube-tile .hb-yt-result{min-height:55px;padding:5px}
.hb-youtube-tile .hb-yt-result img{width:76px;min-width:76px}
.hb-youtube-tile .hb-yt-result strong{font-size:11px}
.hb-youtube-tile .hb-yt-note{font-size:10px}
@media(max-width:799px){.landscape-workspace:has(.hb-youtube-tile){grid-template-columns:1fr}.daily-rail .hb-youtube-tile{grid-column:1 / -1}.hb-youtube-tile .hb-yt-player{aspect-ratio:16/9;height:auto;min-height:200px}.hb-youtube-tile .hb-yt-search{flex-wrap:nowrap}.hb-youtube-tile .hb-yt-search .text-input{flex-basis:auto}.hb-youtube-tile .hb-yt-search button{min-width:auto}}
@media(max-width:540px){.hb-youtube-page .hb-yt-results{grid-template-columns:1fr}.hb-yt-heading{flex-wrap:wrap}}

/* Calendar-first home: daily agenda stays ahead of the video hub.
   Allow the rail itself to scroll, rather than crushing the agenda. */
.daily-rail:has(.hb-youtube-tile) .rail-agenda {flex: 0 0 auto; min-height: 175px; overflow: visible;}
.daily-rail:has(.hb-youtube-tile) .hb-youtube-tile {flex-shrink: 0;}
@media(max-width:799px){.daily-rail .hb-youtube-tile{grid-column:1 / -1;}}
