.availability-modal { z-index: 1500; }
#availability-alerts-btn { position: relative; }
.av-unread-badge { position: absolute; top: -5px; right: -5px; background: var(--accent); color: #fff; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; font: 600 .65rem/18px var(--font-body); text-align: center; }
.av-unread-badge[hidden] { display: none; }
.availability-modal .av-container { max-width: 720px; max-height: min(90vh, 900px); display: flex; flex-direction: column; overflow: hidden; }
.availability-modal .av-wide { max-width: 1050px; }
.av-header { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.75rem 1.75rem 1.25rem; border-bottom: 1px solid var(--border-color); flex: 0 0 auto; }
.av-header h2 { font: 600 1.8rem/1.2 var(--font-heading); margin: .25rem 0 .5rem; }
.av-header p { max-width: 48rem; color: var(--text-secondary); font-size: .9rem; line-height: 1.5; }
.av-eyebrow { font-size: .7rem; font-weight: 600; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }
.av-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; color: var(--text-secondary); background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 50%; cursor: pointer; }
.av-close:hover { color: var(--text-primary); border-color: var(--border-hover); }
.av-close svg { width: 20px; height: 20px; }
.av-body { padding: 1.25rem 1.75rem 1.5rem; overflow-y: auto; overscroll-behavior: contain; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border-hover) transparent; }
.av-body::-webkit-scrollbar { width: 6px; }
.av-body::-webkit-scrollbar-track { background: transparent; }
.av-body::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 5px; }
.av-body h3 { font-size: 1rem; font-weight: 600; }
.av-empty { padding: 2.5rem 1rem; text-align: center; color: var(--text-secondary); font-size: .9rem; line-height: 1.6; display: flex; flex-direction: column; align-items: center; gap: .65rem; }
.av-empty > svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: .4rem; }
.av-empty h4 { color: var(--text-primary); font-size: 1rem; }
.av-empty p { max-width: 440px; }
.av-empty .btn { margin-top: .5rem; }
.av-text-button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; color: var(--accent); background: transparent; border: 0; font: 500 .8rem/1.4 var(--font-body); text-decoration: none; cursor: pointer; min-height: 40px; padding: .35rem 0; }
.av-text-button svg { width: 15px; height: 15px; flex-shrink: 0; }
.av-text-button:hover { text-decoration: underline; }
.av-text-button:disabled { cursor: wait; opacity: .6; }
.av-body .btn { min-height: 42px; }
.av-meta, .av-attribution { color: var(--text-secondary); font-size: .75rem; line-height: 1.5; }
.av-attribution { margin-top: 1rem; font-size: .68rem; }
.av-inline-status { color: var(--text-secondary); font-size: .8rem; line-height: 1.5; }
.av-inline-status:empty { display: none; }
.av-inline-status:not(:empty) { margin-bottom: 1rem; }
.av-alert-preference { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: 1.1rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; }
.av-alert-preference p { color: var(--text-secondary); font-size: .8rem; line-height: 1.6; margin-top: .3rem; max-width: 440px; }
.av-switch { position: relative; display: flex; flex: 0 0 44px; width: 44px; height: 44px; align-items: center; cursor: pointer; }
.av-switch input { position: absolute; inset: 0; z-index: 1; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.av-switch-track { width: 44px; height: 26px; border-radius: 20px; background: var(--text-muted); position: relative; transition: background .15s; }
.av-switch-track::after { content: ""; width: 20px; height: 20px; position: absolute; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.av-switch input:checked + .av-switch-track { background: var(--accent); }
.av-switch input:checked + .av-switch-track::after { transform: translateX(18px); }
.av-switch input:disabled + .av-switch-track { opacity: .35; }
.av-switch input:focus-visible + .av-switch-track { outline: 2px solid var(--accent); outline-offset: 4px; }
.av-settings-line { display: flex; align-items: center; gap: .75rem; justify-content: space-between; margin: .65rem .15rem 1.2rem; }
.av-settings-line p { color: var(--text-secondary); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.av-settings-line button { flex-shrink: 0; }
.av-list-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.av-alert-row { display: flex; align-items: center; gap: .85rem; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.av-alert-symbol { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-card); color: var(--text-secondary); }
.av-alert-symbol svg { width: 18px; height: 18px; }
.av-unread .av-alert-symbol { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.av-alert-copy { flex: 1; min-width: 0; }
.av-alert-copy h4 { font-size: .9rem; margin-bottom: .2rem; overflow-wrap: anywhere; }
.av-alert-copy p { font-size: .8rem; color: var(--text-secondary); line-height: 1.5; }
.av-current-note { display: block; font-size: .67rem; margin-top: .2rem; }
.av-alert-watch { flex-shrink: 0; }
.av-watch-options { padding: 1.1rem 0; border-top: 1px solid var(--border-color); margin-top: 1rem; }
.av-watch-options h4 { display: flex; align-items: center; gap: .4rem; font-size: .95rem; line-height: 1.4; margin: 0; }
.av-watch-options h4 svg { width: 17px; height: 17px; color: var(--accent); }
.av-watch-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.av-provider-group { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: .75rem; margin: .7rem 0; }
.av-provider-label { color: var(--text-secondary); font-size: .75rem; line-height: 1.5; }
.av-provider-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.av-provider { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--text-secondary); padding: .3rem .5rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 7px; min-width: 0; }
.av-provider img { width: 22px; height: 22px; border-radius: 4px; object-fit: contain; flex-shrink: 0; }
.av-provider > span { overflow-wrap: anywhere; }
.av-provider.av-selected { color: var(--text-primary); border-color: var(--accent); }
.av-yours { color: var(--accent); font-size: .63rem; }
.av-watch-link { margin-top: .6rem; font-size: .8rem; }
.av-watch-link svg { width: 16px; height: 16px; }
.av-fresh-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; }
.av-fresh-toolbar p { color: var(--text-primary); font-size: .85rem; }
.av-check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .8rem; min-height: 44px; flex-shrink: 0; color: var(--text-secondary); }
.av-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.av-fresh-context { font-size: .78rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.25rem; }
.av-fresh-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.35rem 1rem; }
.av-fresh-card { min-width: 0; display: flex; flex-direction: column; border-radius: 11px; background: var(--bg-card); border: 1px solid var(--border-color); overflow: hidden; }
.av-poster-button { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; border: none; padding: 0; cursor: pointer; background: var(--bg-base); color: var(--text-primary); overflow: hidden; }
.av-poster-button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-poster-hint { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.3rem .75rem .65rem; display: flex; justify-content: space-between; align-items: center; color: #fff; font-size: .7rem; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); }
.av-poster-hint svg { width: 15px; height: 15px; }
.av-poster-button:hover .av-poster-hint { color: #ddd0ff; }
.av-no-poster { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; gap: 1rem; color: var(--text-secondary); font: 500 1rem/1.4 var(--font-heading); }
.av-no-poster svg { width: 36px; height: 36px; opacity: .6; }
.av-fresh-copy { padding: .8rem; flex: 1; display: flex; flex-direction: column; }
.av-fresh-copy h3 { font: 600 .95rem/1.3 var(--font-heading); margin-bottom: .3rem; overflow-wrap: anywhere; }
.av-fresh-copy .av-meta { font-size: .67rem; }
.av-fresh-reason { color: var(--text-secondary); font-size: .73rem; line-height: 1.5; margin: .65rem 0 .3rem; }
.av-evidence { font-size: .65rem; color: var(--text-secondary); margin-bottom: .8rem; }
.av-fresh-copy .av-add { margin-top: auto; padding: .5rem .55rem; font-size: .77rem; width: 100%; gap: .35rem; justify-content: center; }
.av-add svg { width: 15px; height: 15px; }
.av-add[aria-disabled="true"] { opacity: .65; cursor: default; }
.av-card-status:not(:empty) { color: var(--text-secondary); font-size: .73rem; line-height: 1.5; margin-top: .5rem; }
.av-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.av-container button:focus-visible, .av-container a:focus-visible, .av-container input:focus-visible, .av-watch-options button:focus-visible, .av-watch-options a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.av-poster-button:focus-visible { outline-offset: -3px !important; }
@media (max-width: 760px) {
    .av-fresh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .availability-modal { padding: .5rem; }
    .availability-modal .av-container { max-height: calc(100dvh - 1rem); border-radius: 16px; }
    .av-header { padding: 1.15rem 1rem 1rem; gap: .75rem; }
    .av-header h2 { font-size: 1.5rem; }
    .av-header p { font-size: .8rem; }
    .av-body { padding: 1rem; }
    .av-fresh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; }
    .av-fresh-toolbar { flex-wrap: wrap; gap: .25rem; }
    .av-fresh-copy { padding: .65rem; }
    .av-fresh-copy h3 { font-size: .88rem; }
    .av-settings-line { align-items: flex-start; flex-direction: column; gap: .15rem; }
    .av-alert-row { flex-wrap: wrap; gap: .65rem; }
    .av-alert-copy { flex-basis: calc(100% - 50px); }
    .av-alert-watch { margin-left: 47px; min-height: 36px; }
    .av-alert-preference { padding: .85rem; }
    .av-provider-group { grid-template-columns: 1fr; gap: .35rem; }
    .av-watch-heading { flex-wrap: wrap; gap: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
    .availability-modal, .availability-modal .modal-container { animation: none; }
    .av-switch-track, .av-switch-track::after { transition: none; }
}
