/*
 * AnimeAV1 theme — CMS pieces the reference never had (or had differently):
 * the engine's bell, the sign-in dialog's states, toasts, the AnimeFLV logo,
 * dropdowns, drawers. Loads after common.css / theme.css / account.css.
 * Colours come from the reference palette (common.css: --main, --lead, --subs,
 * --line, --soft, --mute, --body, --back as RGB triples).
 */

/* Base */
html { -webkit-tap-highlight-color: transparent; }
html.av1-lock { overflow: hidden; }
body.av1 { background: rgb(var(--body)); color: rgb(var(--text, var(--subs))); font-family: Satoshi, ui-sans-serif, system-ui, sans-serif; min-height: 100%; }
.d-none { display: none !important; }
[hidden] { display: none !important; }

/* The bundled AnimeFLV logo is white "anime" + blue "flv": on the light mode
   background the white part would vanish, so it is inverted and its hue put back. */
html:not(.dark) .av1-logo-default { filter: invert(1) hue-rotate(180deg) saturate(1.4); }
.av1-logo { max-width: 160px; object-fit: contain; object-position: left center; }
/* Admin › SEO › Site Logo (light mode): the main logo in dark mode, the light one otherwise. */
html.dark .av1-logo-l, html:not(.dark) .av1-logo-d { display: none; }

/* Header nav "Más" and plain dropdowns */
.av1-more .account-dropdown { width: 13rem; }
.av1-dropdown > a.is-active { background: rgb(var(--soft)); color: rgb(var(--lead)); font-weight: 700; }
.account-dropdown form { margin: 0; }
.account-dropdown form button { display: flex; width: 100%; align-items: center; gap: .75rem; padding: .7rem .75rem; border-radius: .4rem; font-size: .875rem; font-weight: 500; color: inherit; text-align: start; }
.account-dropdown form button:hover { background: rgb(var(--soft)); color: rgb(var(--lead)); }
.account-dropdown { max-height: calc(100vh - 6rem); overflow-y: auto; }

/* The bell: main.js's dropdown plugin adds .show to .notify and slides the menu. */
.notify .user-notification { display: none; }
.notify.show .user-notification { display: block; }
.notify .toggler { width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; }
.notify .dropdown-backdrop { position: fixed; inset: 0; z-index: 50; }
.av1-bell-menu { width: min(22rem, calc(100vw - 2rem)); z-index: 61; }
.av1-bell-menu > header a { font-size: .75rem; font-weight: 700; color: rgb(var(--main)); }
.av1-bell-tabs { display: flex; gap: .25rem; padding: .5rem; border-bottom: 1px solid rgb(var(--line)); }
.av1-bell-tabs > span { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: rgb(var(--subs)); cursor: pointer; }
.av1-bell-tabs > span.active { background: rgb(var(--main) / .12); color: rgb(var(--main)); }
.av1-bell-tabs .badge { min-width: 1.1rem; padding: 0 .3rem; border-radius: 999px; background: rgb(var(--line)); color: rgb(var(--lead)); font-size: .65rem; line-height: 1.1rem; text-align: center; }
.noti-bell-pane { display: none; }
.noti-bell-pane.active { display: block; }
.av1-bell-menu .notification-items { max-height: 22rem; overflow-y: auto; }
.av1-bell-menu .notification-items a, .av1-bell-menu .notification-items .item { display: flex; gap: .75rem; padding: .75rem 1rem; font-size: .8rem; color: rgb(var(--subs)); border-bottom: 1px solid rgb(var(--line) / .5); }
.av1-bell-menu .notification-items img { width: 2.5rem; height: 3.5rem; flex-shrink: 0; border-radius: .25rem; object-fit: cover; }
.av1-bell-menu .notification-items .new, .av1-bell-menu .notification-items .unread { background: rgb(var(--main) / .06); }
.av1-bell-more { display: block; padding: .7rem; text-align: center; font-size: .75rem; font-weight: 700; color: rgb(var(--main)); }
@media (max-width: 639px) {
    .notify .user-notification { position: fixed; top: 4.5rem; left: 1rem; right: 1rem; width: auto; }
    #account-dropdown, #av1-more-menu { position: fixed; top: 4.5rem; right: 1rem; }
}

/* Sign-in dialog */
.av1-modal { opacity: 0; transition: opacity .18s ease; }
.av1-modal.is-open { opacity: 1; }
.av1-modal .contents-box { transform: translateY(1rem) scale(.98); transition: transform .18s ease; }
.av1-modal.is-open .contents-box { transform: none; }
.av1-modal form .alert { border-radius: .5rem; padding: .65rem .85rem; font-size: .85rem; font-weight: 500; border: 1px solid rgb(var(--line)); }
.av1-modal form .alert-danger { background: rgb(239 68 68 / .12); border-color: rgb(239 68 68 / .35); color: #f87171; }
.av1-modal form .alert-success { background: rgb(16 185 129 / .12); border-color: rgb(16 185 129 / .35); color: #34d399; }
.av1-modal form .alert .close { float: right; opacity: .7; }
.av1-captcha:has(.captcha:empty) { display: none; }
.av1-captcha { display: flex; justify-content: center; }
.av1-provider-dot { width: .75rem; height: .75rem; border-radius: 999px; }
.loading { display: none; }
.loading:not([style*="none"]) { display: block; width: 1.75rem; height: 1.75rem; margin: .25rem auto; border-radius: 999px; border: 3px solid rgb(var(--line)); border-top-color: rgb(var(--main)); animation: av1-spin .8s linear infinite; }
@keyframes av1-spin { to { transform: rotate(360deg); } }

/* Flash bars (verify e-mail, social sign-in errors) */
.av1-flash { background: rgb(var(--main) / .1); border-color: rgb(var(--main) / .3); color: rgb(var(--lead)); }
.av1-flash-error { background: rgb(239 68 68 / .1); border-color: rgb(239 68 68 / .35); color: #f87171; }

/* Toasts (Sonner look, WP toast.js) */
.av1-toaster { position: fixed; bottom: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
@media (max-width: 1023px) { .av1-toaster { bottom: 5rem; left: 1rem; } }
.av1-toast { pointer-events: auto; display: flex; align-items: center; gap: .75rem; max-width: 24rem; padding: .75rem 1rem; border-radius: .5rem; background: rgb(23 23 23 / .95); color: #fff; border: 1px solid rgb(255 255 255 / .1); box-shadow: 0 15px 40px #0006; font-size: .8rem; font-weight: 600; opacity: 0; transform: translateY(.75rem); transition: all .3s; cursor: pointer; }
.av1-toast.is-in { opacity: 1; transform: none; }
.av1-toast-dot { width: .5rem; height: .5rem; border-radius: 999px; background: rgb(var(--main)); flex-shrink: 0; }
.av1-toast-error .av1-toast-dot { background: #ef4444; }
.av1-toast-success .av1-toast-dot { background: #10b981; }
/* main.js's own #toast element */
#toast { position: fixed; bottom: 1rem; right: 1rem; z-index: 9999; }

/* Guest Continue Watching remove button */
.av1-cw-remove { position: absolute; top: .4rem; right: .4rem; z-index: 30; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 999px; background: rgb(0 0 0 / .65); color: #fff; opacity: 0; transition: opacity .15s; }
.group\/item:hover .av1-cw-remove, .av1-cw-remove:focus { opacity: 1; }
@media (hover: none) { .av1-cw-remove { opacity: 1; } }

/* Drawers (episode list on the watch page) */
.av1-drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.av1-drawer > .av1-drawer-backdrop { position: absolute; inset: 0; background: rgb(var(--back) / .8); opacity: 0; transition: opacity .2s; }
.av1-drawer:not(.is-open) > .av1-drawer-panel { visibility: hidden; }
.av1-drawer > .av1-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(24rem, 100vw); transform: translateX(100%); transition: transform .25s ease; background: rgb(var(--body)); border-left: 1px solid rgb(var(--line)); display: flex; flex-direction: column; }
.av1-drawer.is-open { pointer-events: auto; }
.av1-drawer.is-open > .av1-drawer-backdrop { opacity: 1; }
.av1-drawer.is-open > .av1-drawer-panel { transform: none; }

/* Engine tooltip (main.js Tooltip on [data-tip]) */
.tooltipster-base .tooltipster-box { background: rgb(var(--mute)) !important; border: 1px solid rgb(var(--line)) !important; border-radius: .5rem !important; }
.tooltipster-base .tooltipster-content { color: rgb(var(--subs)) !important; }

/* EN/JP title switch in the footer */
.af-title-lang-sw > span.active { background: rgb(var(--main) / .15); color: rgb(var(--main)); }

/* Ads */
.header-ad-zone:empty { display: none; }

/* Site alert (Admin › Settings › Site alert; partials/site-alert keeps its ids) */
.af-site-alert { display: flex; align-items: flex-start; gap: .85rem; padding: .85rem 1rem; border-radius: .5rem; border: 1px solid rgb(var(--line)); background: rgb(var(--mute)); color: rgb(var(--subs)); font-size: .875rem; }
.af-site-alert[hidden] { display: none !important; }
.af-site-alert-icon { display: none; }
.af-site-alert-body { flex: 1; display: grid; gap: .15rem; }
.af-site-alert-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--main)); }
.af-site-alert-text strong { color: rgb(var(--lead)); }
.af-site-alert .close { display: inline-grid; place-items: center; min-width: 2.25rem; min-height: 2.25rem; margin: -.5rem -.5rem -.5rem 0; font-size: 1.4rem; line-height: 1; color: rgb(var(--subs)); opacity: .8; }
.af-site-alert .close:hover { color: rgb(var(--lead)); }
.af-site-alert-link { display: inline-flex; align-items: center; gap: .35rem; }
.af-site-alert--critical { border-color: rgb(239 68 68 / .4); }
.af-site-alert--critical .af-site-alert-kicker { color: #f87171; }
.af-site-alert--warning .af-site-alert-kicker { color: rgb(var(--warn, 234 179 8)); }

/* Catalogue filters: drop-down menus show as grids; on phones the filter row is
   a bottom sheet (#modal-filters) opened by "Filtros". */
.av1-select-menu:not([hidden]) { display: grid; }
.av1-select-menu label input[type=checkbox] { flex-shrink: 0; }
@media (max-width: 1023px) {
    .av1-filters-sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
    .av1-filters-backdrop { position: absolute; inset: 0; background: rgb(var(--back) / .9); opacity: 0; transition: opacity .2s; }
    .av1-filters-sheet:not(.is-open) .av1-filters-panel { visibility: hidden; }
    .av1-filters-panel { position: relative; max-width: 32rem; max-height: 85vh; overflow-y: auto; padding-top: .75rem; border-radius: .75rem .75rem 0 0; background: rgb(var(--body)); transform: translateY(100%); transition: transform .25s ease; }
    .av1-filters-sheet.is-open { pointer-events: auto; }
    .av1-filters-sheet.is-open .av1-filters-backdrop { opacity: 1; }
    .av1-filters-sheet.is-open .av1-filters-panel { transform: none; }
    .av1-select-menu { position: static; margin-top: .5rem; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .av1-filters-sheet { align-items: center; }
    .av1-filters-panel { border-radius: .75rem; }
}

/* ── Anime page ── */
/* List button = main.js UserFavourite; its plugin adds .show to .favourite. */
.favourite.anime-list-control > .dropdown-menu { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 40; display: none; }
.favourite.anime-list-control.show > .dropdown-menu { display: grid; }
.anime-list-control .anime-list-dropdown > .dropdown-item { display: flex; align-items: center; gap: .5rem; height: 2.5rem; padding: .5rem .75rem; border-radius: .25rem; color: rgb(var(--subs)); font-size: .875rem; font-weight: 500; cursor: pointer; }
.anime-list-control .anime-list-dropdown > .dropdown-item:hover { background: rgb(var(--soft)); color: rgb(var(--lead)); }
.anime-list-control .anime-list-dropdown > .dropdown-item.active { background: rgb(var(--soft)); color: rgb(var(--lead)); font-weight: 700; }
.anime-list-control .anime-list-dropdown > .dropdown-item.active::after { content: "✓"; margin-left: auto; color: rgb(var(--main)); font-weight: 700; }
.anime-list-control .anime-list-dropdown > .dropdown-item[data-id="0"] { margin-top: .25rem; border-top: 1px solid rgb(var(--line)); border-radius: 0 0 .25rem .25rem; color: #f87171; }
.anime-list-control .anime-list-dropdown > .dropdown-item i { display: none; }

/* Rating (main.js Rating on #w-rating: five spans, class full / half). */
.av1-rate-menu { position: absolute; top: calc(100% + .5rem); left: 50%; z-index: 40; width: 15rem; transform: translateX(-50%); padding: 1rem; border: 1px solid rgb(var(--line)); border-radius: .6rem; background: rgb(var(--mute)); box-shadow: 0 12px 30px #0007; }
.av1-stars { display: flex; gap: .25rem; }
.av1-stars > span { position: relative; width: 2rem; height: 2rem; cursor: pointer; }
.av1-stars > span::before, .av1-stars > span::after { content: ""; position: absolute; inset: 0; -webkit-mask: var(--av1-star) center / contain no-repeat; mask: var(--av1-star) center / contain no-repeat; }
.av1-stars > span::before { background: rgb(var(--line)); }
.av1-stars > span::after { background: rgb(var(--warn, 250 204 21)); clip-path: inset(0 100% 0 0); }
.av1-stars > span.half::after { clip-path: inset(0 50% 0 0); }
.av1-stars > span.full::after { clip-path: none; }
:root { --av1-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E"); }

/* Episode cards: the VISTO toggle (top right) and the seen state. */
.av1-seen { position: absolute; top: .4rem; right: .4rem; z-index: 30; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: rgb(0 0 0 / .6); color: #fff; font-size: 1.05rem; opacity: 0; transition: opacity .15s, background .15s; }
.group\/item:hover .av1-seen, .av1-seen:focus-visible, .is-seen .av1-seen { opacity: 1; }
@media (hover: none) { .av1-seen { opacity: .85; } }
.is-seen .av1-seen { background: rgb(var(--main)); color: rgb(var(--fore, 0 0 0)); }
.is-seen figure img { opacity: .45; }

/* Sheets (share, trailer) */
.av1-sheet { opacity: 0; transition: opacity .18s ease; }
.av1-sheet.is-open { opacity: 1; }
.av1-sheet .av1-sheet-card { transform: translateY(1rem) scale(.98); transition: transform .18s ease; }
.av1-sheet.is-open .av1-sheet-card { transform: none; }

/* Rails and "Más información" */
.av1-rail-track { scrollbar-width: none; scroll-snap-type: x proximity; }
.av1-rail-track::-webkit-scrollbar { display: none; }
.av1-rail-track > * { scroll-snap-align: start; }
.av1-moreinfo summary { list-style: none; }
.av1-moreinfo summary::-webkit-details-marker { display: none; }
.av1-moreinfo[open] summary > span { transform: rotate(180deg); }
.av1-moreinfo dd a { color: rgb(var(--lead)); text-decoration: underline; text-decoration-color: rgb(var(--line)); }
.av1-moreinfo dd a:hover { color: rgb(var(--main)); }
.av1-ad:empty { display: none; }

/* ── Watch page ── */
/* Player: main.js puts the server's iframe into #player (and removes every
   other child of it), the cover and the "no videos" line sit beside it. */
.av1-player #player { position: relative; z-index: 10; }
.av1-player #player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.av1-player:has(#player iframe) .av1-player-cover { display: none; }
.av1-player .av1-novideo { display: none; }
.av1-player.af-noservers .av1-novideo { display: grid; z-index: 5; }
.av1-player.af-noservers .av1-play { display: none !important; }
.av1-play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 999px; background: rgb(var(--main) / .85); color: rgb(var(--fore, 0 0 0)); font-size: 1.9rem; padding-left: .25rem; box-shadow: 0 0 0 8px rgb(var(--main) / .25); transition: transform .15s; }
.av1-play:hover { transform: scale(1.06); }
#player > .loading, #player .loading { position: absolute; inset: 0; margin: auto; }

/* Anterior / Siguiente: at an end the button stays, disabled (the reference). */
.CapNv .af-none { opacity: .5; pointer-events: none; }

/* Server rows: main.js moves li.active. */
.av1-servers > li > a { background: rgb(var(--line)); color: rgb(var(--subs)); }
.av1-servers > li > a:hover { background: rgb(var(--edge, var(--soft))); color: rgb(var(--lead)); }
.av1-servers > li.active > a { background: rgb(var(--main)); color: rgb(var(--fore, 0 0 0)); }
#watch-main.af-svloading #w-servers { opacity: .5; pointer-events: none; }

/* Drop-down menus opened by main.js's plugin (.show on the parent). */
.av1-menu { position: absolute; top: calc(100% + .4rem); z-index: 45; display: none; min-width: 12rem; max-height: 18rem; overflow-y: auto; padding: .3rem; border: 1px solid rgb(var(--line)); border-radius: .6rem; background: rgb(var(--mute)); box-shadow: 0 16px 36px #0008; }
.show > .av1-menu { display: grid; gap: .15rem; }
.av1-menu .dropdown-item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: .4rem; color: rgb(var(--subs)); font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.av1-menu .dropdown-item:hover { background: rgb(var(--soft)); color: rgb(var(--lead)); }
.av1-menu .dropdown-item.active { background: rgb(var(--main) / .15); color: rgb(var(--main)); font-weight: 700; }
.av1-menu .dropdown-item.active::after { content: "✓"; }
.av1-menu .dropdown-item[data-id="0"] { color: #f87171; }
.av1-menu .dropdown-item i { display: none; }
.favourite.af-in > [data-toggle] { color: rgb(var(--main)); border-color: rgb(var(--main) / .6); }

/* Player settings switches (main.js OnOffControl). */
.av1-cfg-menu { min-width: 17rem; }
.av1-cfg-row { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border-radius: .4rem; color: rgb(var(--lead)); font-size: .8rem; font-weight: 600; cursor: pointer; }
.av1-cfg-row:hover { background: rgb(var(--soft)); }
.av1-switch { position: relative; width: 2.1rem; height: 1.2rem; flex-shrink: 0; border-radius: 999px; background: rgb(var(--line)); transition: background .15s; }
.av1-switch::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: .9rem; height: .9rem; border-radius: 999px; background: #fff; transition: transform .15s; }
.av1-switch.is-on { background: rgb(var(--main)); }
.av1-switch.is-on::after { transform: translateX(.9rem); }

/* VISTO button */
[data-av1-ep-seen].is-seen { color: rgb(var(--main)); border-color: rgb(var(--main) / .6); background: rgb(var(--soft)); }

/* Downloads (#DwsldCn, opened by .AAShwHdd-lnk → .show) */
#DwsldCn:not(.show) { display: none; }
.av1-dl-table th { padding: .5rem .6rem; color: rgb(var(--subs)); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-align: start; text-transform: uppercase; border-bottom: 1px solid rgb(var(--line)); }
.av1-dl-table td { padding: .6rem; color: rgb(var(--lead)); border-bottom: 1px solid rgb(var(--line) / .5); }
.av1-dl-table tr:last-child td { border-bottom: 0; }
.av1-dl-table td .Button { display: inline-flex; align-items: center; gap: .35rem; height: 2rem; padding: 0 .8rem; border-radius: .4rem; background: rgb(var(--main)); color: rgb(var(--fore, 0 0 0)); font-size: .7rem; font-weight: 700; }
.av1-dl-table td .Button::before { font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f019"; }
.av1-dl-table .af-dl-empty td { color: rgb(var(--subs)); text-align: center; }

/* Episode drawer (WP drawer.php) */
.av1-ctrl { display: flex; align-items: center; justify-content: center; gap: .5rem; height: 2.5rem; border-radius: .5rem; border: 1px solid rgb(var(--line)); background: rgb(var(--soft)); color: rgb(var(--subs)); font-size: .8rem; font-weight: 600; transition: background .15s, color .15s; }
.av1-ctrl:hover { color: rgb(var(--lead)); border-color: rgb(var(--edge, var(--line))); }
[data-av1-drawer-order].is-desc > span { transform: rotate(180deg); }
.av1-drawer-search { border: 1px solid rgb(var(--main)); background: rgb(var(--soft)); box-shadow: 0 0 10px rgb(var(--main) / .2); }
.av1-drawer-search.is-open { display: flex; }
.av1-drawer-search input { color: rgb(var(--lead)); background: transparent; box-sizing: border-box; height: 100%; min-height: 0; padding: 0 .5rem; border: 0; box-shadow: none; }
.av1-drawer-search input::-webkit-search-cancel-button { display: none; }
.av1-ep-grid { position: relative; max-height: 460px; overflow-y: auto; padding: .25rem .25rem .25rem 0; scrollbar-width: thin; scrollbar-color: rgb(var(--line)) transparent; }
.av1-ep-grid ul.ep-range { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.av1-ep-grid ul.ep-range[style*="none"] { display: none; }
.av1-ep-box { display: flex; align-items: center; justify-content: center; height: 2.4rem; border-radius: .5rem; border: 1.5px solid transparent; background: rgb(var(--soft)); color: rgb(var(--subs)); font-size: .8rem; font-weight: 700; transition: all .15s; }
.av1-ep-box:hover { color: rgb(var(--lead)); background: rgb(var(--line)); }
.av1-ep-box.active { border-color: rgb(var(--main)); color: rgb(var(--main)); background: rgb(var(--main) / .08); box-shadow: 0 0 10px rgb(var(--main) / .25); font-weight: 800; }
.av1-ep-box.highlight { border-color: rgb(var(--lead) / .6); color: rgb(var(--lead)); }
.av1-ep-box.af-seen:not(.active) { opacity: .55; }
.av1-ep-box.af-filler { font-style: italic; }
.av1-ep-box[enabled="0"] { opacity: .35; }
.af-eps.af-searching ul.ep-range { display: grid !important; }
.af-eps.af-searching .av1-ep-grid { display: grid; gap: .5rem; }
.af-eps.af-searching ul.ep-range:not(:has(> li:not(.af-miss))) { display: none !important; }
.af-eps li.af-miss { display: none; }
@media (max-width: 1023px) { .av1-ep-grid { max-height: 320px; } }
@media (min-width: 1024px) { .av1-ep-drawer { position: sticky; top: 1rem; } }

/* Pills (comment scope, episode type filter) */
.av1-pill { display: inline-flex; align-items: center; gap: .25rem; height: 2rem; padding: 0 .9rem; border-radius: 999px; border: 1px solid rgb(var(--line)); color: rgb(var(--subs)); font-size: .8rem; font-weight: 700; cursor: pointer; }
.av1-pill:hover { color: rgb(var(--lead)); }
.av1-pill.af-active, .filter.type .av1-pill.active { background: rgb(var(--main) / .15); border-color: rgb(var(--main) / .5); color: rgb(var(--main)); }

/* Lights off (animeflv-watch.js: .lgtbx-lnk / .lgtbx toggle body.lgtbx-on) */
.lgtbx { display: none; }
body.lgtbx-on .lgtbx { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .92); }
body.lgtbx-on #player-wrapper { z-index: 56; }

/* Bootstrap modals on AnimeAV1 pages (#w-report): engine.js's BS4 JS sets
   .show on the dialog and adds .modal-backdrop. */
.av1-native .modal { position: fixed; inset: 0; z-index: 1050; display: none; overflow-y: auto; }
.av1-native .modal.show { display: flex !important; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .av1-native .modal.show { align-items: center; padding: 1rem; } }
.av1-native .modal-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgb(var(--back)); }
.av1-native .modal-backdrop.fade { opacity: 0; transition: opacity .15s; }
.av1-native .modal-backdrop.show { opacity: .9; }
.av1-native .modal.fade .modal-dialog { transform: translateY(1rem); transition: transform .18s; }
.av1-native .modal.show .modal-dialog { transform: none; }
body.modal-open { overflow: hidden; }
.av1-bs-modal .alert { border-radius: .5rem; padding: .65rem .85rem; font-size: .85rem; font-weight: 500; border: 1px solid rgb(var(--line)); }
.av1-bs-modal .alert-danger { background: rgb(239 68 68 / .12); border-color: rgb(239 68 68 / .35); color: #f87171; }
.av1-bs-modal .alert-success { background: rgb(16 185 129 / .12); border-color: rgb(16 185 129 / .35); color: #34d399; }
.av1-field { width: 100%; padding: .6rem .8rem; border-radius: .5rem; border: 1px solid rgb(var(--line)); background: rgb(var(--soft)); color: rgb(var(--lead)); font-size: .875rem; outline: none; }
.av1-field:focus { border-color: rgb(var(--main) / .6); }

/* ── Schedule (frontend/schedule.blade.php) ── day buttons: animeflv-misc.js
   moves .active, so the btn-line / btn-main looks hang off that class. */
.av1-sch-days { scrollbar-width: none; }
.av1-sch-days::-webkit-scrollbar { display: none; }
.av1-sch-days .tab-btn { background: rgb(var(--line)); color: rgb(var(--subs)); }
.av1-sch-days .tab-btn:hover { background: rgb(var(--edge)); color: rgb(var(--lead)); }
.av1-sch-days .tab-btn.active { background: rgb(var(--main)); color: rgb(var(--fore)); }
.av1-sch-list { transition: opacity .15s; }
.av1-sch-list.is-loading { opacity: .5; pointer-events: none; }

/* ── Static pages (frontend/page) — the title reads like the reference's
   h2 (text-lg, lead, bold); common.css .entry does the prose. ── */
.av1-page { padding-block: 1.5rem 3rem; }
.av1-page .av1-page-title { font-size: var(--text-lg); line-height: var(--text-lg--line-height); font-weight: 600; margin-top: 0; }

/* ── Forms (frontend/contact) ── */
.av1-alert { border-radius: .5rem; padding: .75rem 1rem; font-size: .875rem; font-weight: 500; border: 1px solid rgb(var(--line)); }
.av1-alert-err { background: rgb(239 68 68 / .12); border-color: rgb(239 68 68 / .35); color: #f87171; }
.av1-alert-ok { background: rgb(16 185 129 / .12); border-color: rgb(16 185 129 / .35); color: #34d399; }
.av1-field.is-invalid { border-color: rgb(239 68 68 / .6); }
.av1-err { color: #f87171; font-size: .75rem; font-weight: 600; }
textarea.av1-field { resize: vertical; }
.av1-check { flex-shrink: 0; width: 1.1rem; height: 1.1rem; margin-top: .1rem; accent-color: rgb(var(--main)); cursor: pointer; }

/* ── match-ref: anime/watch ── */
/* Watch: prev / next sit straight in .CapOptns (the reference's row); the
   missing neighbour is drawn disabled. */
.CapOptns .af-none { opacity: .5; pointer-events: none; }
/* Watch drawer: the box stretches beside the player column and, from lg,
   the number grid scrolls inside it (the reference's lg:absolute list). */
.av1-ep-drawer #w-episodes .av1-ep-grid ul.ep-range { grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr)); }
@media (min-width: 1024px) {
  .av1-ep-drawer { position: static; }
  .av1-ep-drawer #w-episodes .af-eps { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .75rem; padding: .25rem; }
  .av1-ep-drawer #w-episodes .av1-ep-grid { flex: 1; min-height: 0; max-height: none; padding: 0; }
}
@media (max-width: 1023px) { .av1-ep-drawer #w-episodes .av1-ep-grid { max-height: 18rem; padding: .25rem; } }
/* Watch player: the reference's iframe is aspect-video with min-h-64 (taller on phones). */
.av1-player #player { min-height: 16rem; }
/* Watch: the Episodio N / Anime comment pills (animeflv-watch.js moves .af-active). */
.av1-cm-tabs .cm-by.af-active { background-color: rgb(var(--main)); border-color: rgb(var(--main)); color: rgb(var(--fore)); }

/* Watch2gether button: a "group" icon in the theme's mask-icon vocabulary
   (the theme ships no Font Awesome on native pages). */
.ic-users-01{--ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M22 21v-2a4 4 0 00-3-3.87M15.5 3.29a4 4 0 010 7.42M17 21c0-1.86 0-2.8-.3-3.53a4 4 0 00-2.17-2.17C13.8 15 12.86 15 11 15H8c-1.86 0-2.8 0-3.53.3a4 4 0 00-2.17 2.17C2 18.2 2 19.14 2 21M13.5 7a4 4 0 11-8 0 4 4 0 018 0z'/%3E%3C/svg%3E")}
