#modal .season-guide-trigger{display:inline-flex;align-items:center;gap:4px;background:transparent;color:var(--text);border:1px solid var(--edge);border-radius:9px;font:inherit;font-size:12px;font-weight:650;padding:5px 7px;min-height:32px;cursor:pointer;white-space:nowrap}
.season-guide{padding:0;border:1px solid var(--edge);border-radius:22px;background:var(--surface);color:var(--text);width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:hidden;box-shadow:0 22px 80px #0007}
.season-guide[open]{display:flex;flex-direction:column}
.season-guide::backdrop{background:rgba(0,0,0,.48);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.season-guide-header{display:flex;align-items:flex-start;gap:16px;padding:18px 20px;border-bottom:1px solid var(--edge);flex:none}
.season-guide-header>div{min-width:0;flex:1}.season-guide-header h2{font-size:20px;line-height:1.3;margin:0;overflow-wrap:anywhere}.season-guide-header p{margin:4px 0 0}
.season-guide-header .season-guide-close{box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;flex:none;padding:0;display:inline-flex;align-items:center;justify-content:center;gap:0;line-height:1}
.season-guide-close svg{display:block;width:24px;height:24px;flex:none;margin:0;pointer-events:none}
.season-guide-body{overflow:auto;overscroll-behavior:contain;padding:18px 20px;min-height:0;-webkit-overflow-scrolling:touch}
.season-guide-body label{display:block;margin-bottom:6px;font-weight:650}.season-guide-body select{width:100%;font-size:16px}
.season-guide-meta{font-weight:650;margin:16px 0 4px}.season-guide-date-note{margin:0 0 12px}
.season-guide-episodes{list-style:none;padding:0;margin:0}.season-guide-episodes li{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--edge)}
.season-guide-number{width:24px;flex:none;color:var(--muted);text-align:center}.season-guide-episodes li>div{min-width:0}.season-guide-episodes strong{font-size:15px;font-weight:650;overflow-wrap:anywhere}.season-guide-episodes li>div>span{display:block;color:var(--muted);font-size:13px;margin-top:3px}
@media(max-width:720px){.season-guide{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:calc(85dvh - env(safe-area-inset-top,0px));border-radius:22px 22px 0 0}.season-guide-body{padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))}.season-guide-header h2{font-size:18px}}

/* Keep the action proportional to the metadata badges, with a distinct button surface. */
html #modal.wide .detail-category-row{align-items:center!important}
html #modal.wide .detail-category-row .season-guide-trigger{
 height:28px!important;min-height:28px!important;max-height:28px!important;
 padding:0 8px!important;font-size:12px!important;line-height:1!important;
 flex:0 0 auto;gap:5px;border:1px solid var(--thyme)!important;
 background:var(--soft-bg)!important;color:var(--text)!important;border-radius:8px;
 box-shadow:0 1px 2px rgba(0,0,0,.14);touch-action:manipulation;
}
html #modal.wide .season-guide-trigger svg{width:16px;height:16px;flex:none}
html.ll-mouse-input #modal.wide .season-guide-trigger:hover{background:var(--chip-active)!important;color:var(--chip-selected-text)!important}
html #modal.wide .season-guide-trigger:active{transform:translateY(1px);box-shadow:none}
@media(max-width:720px),(pointer:coarse) and (max-height:560px){
 html #modal.wide .detail-category-row{gap:4px!important}
 html #modal.wide .detail-category-row .season-guide-trigger{width:26px!important;height:26px!important;min-height:26px!important;max-height:26px!important;padding:0!important;justify-content:center}
 html #modal.wide .season-guide-trigger>span{display:none}
 html #modal.wide .detail-category-row :is(.tag,.content-rating-badge){font-size:10px!important;line-height:1.2!important;padding:5px 6px!important;height:26px!important;min-height:26px!important;display:inline-flex;align-items:center}
}

/* Pointer focus should not leave a keyboard ring on a tapped or auto-focused button. */
html[data-dialog-input="pointer"] :is(button,[role="button"]):focus{outline:none!important}
html[data-dialog-input="keyboard"] :is(.season-guide button,.season-guide-trigger):focus-visible{outline:2px solid var(--thyme)!important;outline-offset:3px}
.season-guide-close{border-radius:50%;font-weight:400;box-shadow:none}

/* Standard dialog titles reserve a dedicated close-button column and wrap normally. */
html #modal:not(.wide)>#modal-title{
 box-sizing:border-box;max-width:100%;padding-inline-end:56px!important;
 white-space:normal!important;overflow-wrap:anywhere;word-break:normal;
 line-height:1.25;min-height:44px;
}
