:root {
  --bg: #090b12;
  --bg-soft: #0d101a;
  --panel: #111521;
  --panel-2: #151b29;
  --panel-3: #1a2131;
  --line: rgba(183, 199, 226, .105);
  --line-strong: rgba(183, 199, 226, .18);
  --text: #f1f4fb;
  --muted: #8a94a8;
  --muted-2: #5c6679;
  --accent: #a3f3d1;
  --accent-2: #5fdbb0;
  --violet: #a99af8;
  --danger: #ff8e9b;
  --warning: #f5c782;
  --sidebar: 222px;
  --topbar: 74px;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0,0,0,.26);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 88% 0%, rgba(98, 111, 173, .12), transparent 34%), var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.ambient { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; filter: blur(120px); opacity: .14; pointer-events: none; }
.ambient-a { top: 12%; right: -210px; background: #5d8fbb; }
.ambient-b { bottom: -230px; left: 26%; background: #6f5bb5; opacity: .1; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 25px 15px 16px; background: rgba(10, 13, 21, .94); border-right: 1px solid var(--line); backdrop-filter: blur(24px); }
.brand-mark { display: flex; align-items: center; gap: 11px; width: 100%; padding: 0 9px 34px; border: 0; background: transparent; text-align: left; }
.brand-glyph, .profile-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; color: #07100e; background: var(--accent); font-size: 18px; font-weight: 950; font-style: italic; box-shadow: 0 0 28px rgba(163,243,209,.14); }
.brand-name { font-size: 15px; font-weight: 900; letter-spacing: .19em; }
.brand-name span, .mobile-brand b span { color: var(--accent); margin-left: 3px; }
.nav-label { padding: 0 11px 10px; color: #586276; font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.nav-label-spaced { margin-top: 28px; }
.primary-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #8993a6; text-align: left; font-size: 12px; font-weight: 650; transition: .2s ease; }
.nav-item:hover { background: rgba(255,255,255,.035); color: var(--text); }
.nav-item.active { background: linear-gradient(100deg, rgba(163,243,209,.13), rgba(163,243,209,.035)); border-color: rgba(163,243,209,.12); color: var(--accent); }
.nav-icon { display: grid; place-items: center; width: 21px; color: #778397; font-size: 19px; line-height: 1; }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-count { margin-left: auto; color: var(--muted-2); font-size: 10px; font-variant-numeric: tabular-nums; }
.sidebar-bottom { display: grid; gap: 7px; margin-top: auto; }
.connection-pill { display: flex; align-items: center; gap: 8px; margin: 13px 5px 8px; padding: 10px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; }
.connection-dot, .live-dot, .player-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #687286; box-shadow: 0 0 0 4px rgba(104,114,134,.11); }
.connection-dot.online, .live-dot, .player-live-dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(95,219,176,.1); }
.connection-dot.error { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,142,155,.1); }
.profile-chip { display: flex; align-items: center; gap: 9px; margin-top: 5px; padding: 11px 8px 3px; border-top: 1px solid var(--line); }
.profile-avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; font-size: 14px; }
.profile-copy { display: grid; gap: 2px; min-width: 0; }
.profile-copy b { overflow: hidden; color: #cfd6e4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: var(--muted-2); font-size: 9px; }
.profile-more { margin-left: auto; color: var(--muted-2); font-size: 12px; letter-spacing: 1px; }
.main-area { grid-column: 2; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; min-height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(22px, 4vw, 58px); border-bottom: 1px solid var(--line); background: rgba(9, 11, 18, .79); backdrop-filter: blur(22px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #5e687b; font-size: 11px; }
.breadcrumbs i { color: #414b5d; font-style: normal; }
.breadcrumbs b { color: #d9dfeb; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 9px; width: min(340px, 32vw); height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.035); }
.search-box:focus-within { border-color: rgba(163,243,209,.4); background: rgba(255,255,255,.05); }
.search-icon { color: #8490a4; font-size: 21px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-box input::placeholder { color: #606b7e; }
kbd { padding: 3px 5px; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; color: #7d899e; background: rgba(0,0,0,.18); font-size: 8px; white-space: nowrap; }
.icon-button, .avatar-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: #9aa4b7; background: rgba(255,255,255,.025); font-size: 15px; }
.icon-button:hover { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,.06); }
.avatar-button { width: 33px; height: 33px; border: 0; border-radius: 50%; color: #07100e; background: var(--accent); font-weight: 900; }
.mobile-brand { display: none; align-items: center; gap: 8px; }
.mobile-brand .brand-glyph { width: 29px; height: 29px; flex-basis: 29px; font-size: 15px; }
.mobile-brand b { font-size: 12px; letter-spacing: .15em; }
.view-host { width: 100%; max-width: 1660px; min-height: calc(100vh - var(--topbar) - 37px); margin: 0 auto; padding: 26px clamp(22px, 4vw, 58px) 62px; }
.app-footer { display: flex; justify-content: space-between; gap: 14px; padding: 12px clamp(22px, 4vw, 58px) 15px; border-top: 1px solid var(--line); color: #505a6d; font-size: 8px; font-weight: 750; letter-spacing: .14em; }
.app-footer i { padding: 0 5px; color: var(--accent); font-style: normal; }
.loading-state { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #dce5f2; text-align: center; }
.loading-state p { margin: 20px 0 5px; font-size: 14px; font-weight: 700; }
.loading-state small { color: var(--muted); font-size: 11px; }
.loader-orbit { width: 38px; height: 38px; border: 2px solid rgba(163,243,209,.14); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; box-shadow: 0 0 28px rgba(163,243,209,.12); }
@keyframes spin { to { transform: rotate(360deg); } }
.view-page { animation: pageIn .34s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.hero { position: relative; min-height: clamp(350px, 39vw, 510px); display: flex; align-items: flex-end; overflow: hidden; margin-bottom: 38px; border: 1px solid var(--line); border-radius: 23px; background: linear-gradient(115deg, #1b2637, #131522 58%, #242036); box-shadow: var(--shadow); isolation: isolate; }
.hero-image, .hero-overlay, .hero-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-backdrop { object-fit: cover; object-position: center 38%; opacity: .62; filter: saturate(.82); }
.hero-overlay { z-index: 1; background: linear-gradient(90deg, rgba(9,12,19,.97) 0%, rgba(9,12,19,.78) 39%, rgba(9,12,19,.17) 100%), linear-gradient(0deg, rgba(9,12,19,.93), transparent 58%); }
.hero-copy { position: relative; z-index: 2; width: min(680px, 68%); padding: clamp(26px, 4.3vw, 58px); }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #9ba8b9; font-size: 9px; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow-line { width: 28px; height: 1px; background: rgba(163,243,209,.5); }
.live-dot { width: 6px; height: 6px; }
.hero h1 { max-width: 680px; margin: 18px 0 12px; color: #f7f8fc; font-size: clamp(35px, 5.8vw, 72px); font-weight: 850; line-height: .99; letter-spacing: -.055em; text-wrap: balance; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p { max-width: 470px; margin: 0; color: #abb4c3; font-size: 12px; line-height: 1.75; }
.hero-meta { display: flex; align-items: center; gap: 11px; margin: 17px 0 19px; color: #8f9bad; font-size: 9px; font-weight: 750; letter-spacing: .13em; }
.hero-meta span:first-child { color: #f4d28c; }
.hero-meta i { color: #596477; font-style: normal; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 39px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; font-size: 10px; font-weight: 800; letter-spacing: .02em; transition: .2s ease; }
.button span { font-size: 14px; }
.button-primary { color: #07130f; background: var(--accent); box-shadow: 0 5px 24px rgba(163,243,209,.13); }
.button-primary:hover { background: #c0f8e2; transform: translateY(-1px); }
.button-ghost { border-color: rgba(255,255,255,.16); color: #e2e8f1; background: rgba(255,255,255,.055); backdrop-filter: blur(8px); }
.button-ghost:hover, .button-subtle:hover { border-color: rgba(163,243,209,.4); color: var(--accent); background: rgba(163,243,209,.08); }
.button-subtle { border-color: var(--line-strong); color: #b3bdcc; background: rgba(255,255,255,.025); }
.button-small { min-height: 31px; padding: 0 10px; font-size: 9px; }
.hero-index { position: absolute; z-index: 2; right: 27px; bottom: 25px; display: flex; align-items: baseline; gap: 6px; color: #c7d1df; }
.hero-index b { font-size: 24px; font-weight: 800; }
.hero-index span, .hero-index small { color: #7b879b; font-size: 9px; }
.hero-empty { min-height: 340px; align-items: center; background: radial-gradient(circle at 80% 48%, rgba(163,243,209,.16), transparent 28%), linear-gradient(120deg, #131e2d, #171827); }
.hero-empty .hero-copy { width: 72%; }
.hero-empty .hero-orb { position: absolute; right: 10%; color: rgba(163,243,209,.16); font-size: clamp(150px, 23vw, 300px); font-weight: 950; font-style: italic; }
.hero-orb span { color: rgba(163,243,209,.7); font-size: .2em; }
.content-section { margin: 34px 0 38px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.section-head h2 { margin: 0; color: #edf1f8; font-size: 18px; font-weight: 780; letter-spacing: -.035em; }
.section-head p { margin: 5px 0 0; color: #737e91; font-size: 10px; line-height: 1.5; }
.text-action { padding: 5px 0; border: 0; color: var(--accent); background: transparent; font-size: 10px; font-weight: 750; white-space: nowrap; }
.text-action:hover { color: #d0ffec; }
.shelf-track { display: grid; grid-auto-columns: minmax(150px, 1fr); grid-auto-flow: column; gap: 14px; overflow-x: auto; padding: 2px 1px 12px; scrollbar-width: thin; scrollbar-color: #303a4d transparent; }
.anime-card { position: relative; min-width: 0; animation: cardIn .4s ease both; animation-delay: calc(var(--card-index, 0) * 25ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.poster-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.poster-frame { position: relative; aspect-ratio: 2 / 2.82; overflow: hidden; border: 1px solid rgba(187,202,227,.12); border-radius: 13px; background: linear-gradient(145deg, #202b3d, #121722); box-shadow: 0 7px 22px rgba(0,0,0,.16); transition: border-color .2s, transform .25s, box-shadow .25s; }
.poster-image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s ease; }
.image-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(163,243,209,.38); background: radial-gradient(circle at 30% 22%, rgba(163,243,209,.14), transparent 50%), linear-gradient(145deg, #273449, #111621); font-size: 48px; font-weight: 950; font-style: italic; }
.poster-shade { position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(5,8,14,.5)); }
.poster-kind { position: absolute; top: 9px; left: 9px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; color: #e5edf6; background: rgba(7,10,16,.54); font-size: 7px; font-weight: 850; letter-spacing: .12em; backdrop-filter: blur(8px); }
.poster-rating { position: absolute; right: 8px; bottom: 8px; padding: 4px 6px; border-radius: 5px; color: #f7d994; background: rgba(8,11,17,.7); font-size: 9px; font-weight: 800; }
.poster-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: white; background: rgba(10,13,20,.44); opacity: 0; transform: translate(-50%, -43%) scale(.8); transition: .25s ease; backdrop-filter: blur(8px); }
.poster-button:hover .poster-frame { border-color: rgba(163,243,209,.52); box-shadow: 0 12px 32px rgba(0,0,0,.3); transform: translateY(-4px); }
.poster-button:hover .poster-image { transform: scale(1.05); }
.poster-button:hover .poster-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-copy { display: grid; gap: 4px; padding: 9px 2px 0; }
.card-copy strong { overflow: hidden; color: #e2e8f1; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-copy small { overflow: hidden; color: #727e92; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.card-save { position: absolute; top: 8px; right: 8px; z-index: 3; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: #e5eaf2; background: rgba(9,12,18,.68); font-size: 16px; line-height: 1; backdrop-filter: blur(10px); }
.card-save:hover, .card-save.is-saved { border-color: rgba(163,243,209,.42); color: var(--accent); background: rgba(16,40,33,.88); }
.anime-card-compact .poster-frame { border-radius: 11px; }
.anime-card-compact .card-copy strong { font-size: 9px; }
.anime-card-compact .card-save { width: 24px; height: 24px; }
.taxonomy-section { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(17,21,33,.56); }
.taxonomy-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.taxonomy-group:last-child { border: 0; }
.taxonomy-title { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: #d2d9e5; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.taxonomy-title span { color: #677489; font-size: 9px; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip, .static-chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: #aab5c6; background: rgba(255,255,255,.025); font-size: 9px; font-weight: 650; transition: .2s; }
.filter-chip:hover, .filter-chip.active { border-color: rgba(163,243,209,.34); color: var(--accent); background: rgba(163,243,209,.07); }
.static-chip { display: inline-flex; }
.home-bottom-line { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 15px; border-top: 1px solid var(--line); color: #576276; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 20px 0 27px; }
.page-heading .eyebrow { margin-bottom: 10px; }
.page-heading h1 { margin: 0; color: #f0f3fa; font-size: clamp(29px, 4vw, 46px); font-weight: 830; letter-spacing: -.055em; line-height: 1.05; }
.page-heading p { max-width: 600px; margin: 9px 0 0; color: #7f8a9c; font-size: 11px; line-height: 1.6; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.catalog-total { display: flex; align-items: baseline; gap: 8px; }
.catalog-total b { color: var(--accent); font-size: 19px; }
.catalog-total span, .quiet-meta { color: #758195; font-size: 9px; }
.catalog-filters { display: flex; gap: 6px; }
.card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 21px 15px; }
.card-grid-compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 32px 0 8px; }
.pagination span { color: #7f8a9b; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.pagination span b { color: var(--accent); }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }
.search-summary { display: flex; justify-content: space-between; gap: 15px; margin: 4px 0 22px; color: #7c8799; font-size: 10px; }
.explore-search-panel { display: grid; grid-template-columns: 46px minmax(160px, 1fr) minmax(260px, 1.5fr); align-items: center; gap: 14px; margin: 8px 0 34px; padding: 19px; border: 1px solid rgba(163,243,209,.15); border-radius: 16px; background: linear-gradient(110deg, rgba(163,243,209,.07), rgba(255,255,255,.02)); }
.explore-search-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(163,243,209,.18); border-radius: 13px; color: var(--accent); background: rgba(163,243,209,.08); font-size: 27px; }
.explore-search-panel b { color: #e8edf5; font-size: 12px; }
.explore-search-panel p { margin: 4px 0 0; color: #788499; font-size: 9px; }
.inline-search { display: flex; gap: 7px; }
.inline-search input, .parameter-test-form input, .parameter-test-form select, .settings-form input, .settings-form select, .settings-form textarea { width: 100%; min-width: 0; height: 39px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; color: #e7edf7; background: rgba(5,8,14,.38); font-size: 10px; }
.inline-search input::placeholder, .settings-form input::placeholder, .settings-form textarea::placeholder { color: #5e697b; }
.inline-search input:focus, .settings-form input:focus, .settings-form textarea:focus { border-color: rgba(163,243,209,.47); }
.inline-search .button { white-space: nowrap; }
.error-panel { max-width: 740px; margin: 70px auto; padding: 36px; border: 1px solid rgba(255,142,155,.16); border-radius: 18px; background: rgba(255,142,155,.035); text-align: center; }
.error-symbol { display: grid; place-items: center; width: 43px; height: 43px; margin: 0 auto 16px; border: 1px solid rgba(255,142,155,.32); border-radius: 13px; color: var(--danger); background: rgba(255,142,155,.08); font-size: 22px; font-weight: 800; }
.error-panel h2 { margin: 0 0 8px; font-size: 20px; }
.error-panel p { color: #9ba5b5; font-size: 11px; line-height: 1.65; }
.error-hint { margin: 17px auto; max-width: 500px; color: #778397; font-size: 9px; line-height: 1.65; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; padding: 25px; border: 1px dashed rgba(164,181,210,.15); border-radius: 14px; color: var(--muted); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 12px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--accent); background: rgba(163,243,209,.045); font-size: 22px; }
.empty-state h3 { margin: 0; color: #dce3ed; font-size: 13px; }
.empty-state p { max-width: 380px; margin: 7px 0 0; color: #788498; font-size: 10px; line-height: 1.6; }
.history-summary { display: flex; gap: 10px; margin: 10px 0 23px; }
.history-summary > div { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.history-summary b { color: var(--accent); font-size: 20px; }
.history-summary span { color: #7b879a; font-size: 9px; }
.history-list { display: grid; gap: 10px; }
.history-row { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; align-items: center; gap: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(17,21,33,.58); }
.history-poster { position: relative; width: 60px; height: 76px; overflow: hidden; padding: 0; border: 0; border-radius: 7px; background: var(--panel-3); }
.history-poster img { width: 100%; height: 100%; object-fit: cover; }
.history-poster .image-fallback { font-size: 21px; }
.history-main { min-width: 0; }
.history-main .eyebrow { font-size: 8px; }
.history-title { display: block; max-width: 100%; overflow: hidden; margin: 6px 0; padding: 0; border: 0; color: #e9eef7; background: transparent; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 760; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; color: #79869a; font-size: 8px; }
.progress-meta span:first-child { color: var(--accent); }
.progress-track { height: 4px; overflow: hidden; margin-top: 7px; border-radius: 10px; background: rgba(255,255,255,.08); }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--accent-2); }
.history-note { margin: 7px 0 0; color: #8893a5; font-size: 9px; }
.history-actions { display: flex; align-items: center; gap: 6px; }
.danger-button { color: var(--danger); }
.detail-page { margin: -26px calc(clamp(22px, 4vw, 58px) * -1) 0; }
.detail-hero { position: relative; min-height: 470px; overflow: hidden; padding: 25px clamp(22px, 4vw, 58px) 34px; border-bottom: 1px solid var(--line); background: #111623; isolation: isolate; }
.detail-backdrop, .detail-backdrop-shade { position: absolute; z-index: -1; inset: 0; }
.detail-backdrop-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: blur(1px) saturate(.75); opacity: .28; }
.detail-backdrop-shade { background: linear-gradient(90deg, rgba(8,11,18,.96), rgba(8,11,18,.65) 60%, rgba(8,11,18,.83)), linear-gradient(0deg, #111623 0%, transparent 60%); }
.detail-head-content { position: relative; z-index: 1; }
.back-link { padding: 4px 0; border: 0; color: #9ba7ba; background: transparent; font-size: 10px; }
.back-link:hover { color: var(--accent); }
.detail-title-row { display: grid; grid-template-columns: minmax(155px, 220px) minmax(0, 1fr); align-items: end; gap: clamp(24px, 4vw, 54px); margin-top: 26px; }
.detail-poster { width: 100%; max-width: 220px; aspect-ratio: 2 / 2.85; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: var(--panel-3); box-shadow: 0 22px 50px rgba(0,0,0,.35); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-poster .image-fallback { font-size: 72px; }
.detail-title-copy { max-width: 790px; padding-bottom: 8px; }
.detail-title-copy h1 { margin: 13px 0 11px; color: #f4f6fb; font-size: clamp(32px, 5vw, 57px); font-weight: 850; letter-spacing: -.055em; line-height: 1.02; }
.detail-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #a2adbf; font-size: 9px; }
.detail-facts i { color: #596579; font-style: normal; }
.detail-facts .rating-fact { color: #f3d08d; }
.detail-description { max-width: 660px; margin: 15px 0 14px; color: #a9b3c3; font-size: 11px; line-height: 1.8; }
.detail-tags { margin: 12px 0 18px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-page > .content-section { padding: 0 clamp(22px, 4vw, 58px); }
.count-chip { padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 6px; color: #9ba8b8; font-size: 8px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.season-selector { margin: 18px 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.season-label { margin-bottom: 10px; color: #68758a; font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.season-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.season-button { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: #b0bbca; background: rgba(255,255,255,.02); font-size: 9px; font-weight: 700; }
.season-button small { color: #6f7c91; font-size: 8px; }
.season-button.active { border-color: rgba(163,243,209,.34); color: var(--accent); background: rgba(163,243,209,.07); }
.episode-list { display: grid; gap: 7px; }
.episode-row { display: grid; grid-template-columns: 33px 58px minmax(0,1fr) 20px; align-items: center; gap: 12px; min-height: 75px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.022); text-align: left; transition: .2s; }
.episode-row:hover { border-color: rgba(163,243,209,.27); background: rgba(163,243,209,.04); }
.episode-number { color: #6b778b; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.episode-thumb { position: relative; width: 58px; height: 49px; overflow: hidden; border-radius: 6px; background: var(--panel-3); }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-thumb .image-fallback { font-size: 18px; }
.episode-copy { display: grid; gap: 5px; min-width: 0; }
.episode-copy b { overflow: hidden; color: #dbe3ef; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.episode-copy small { color: #748095; font-size: 9px; }
.episode-arrow { color: #718097; }
.inline-loading, .inline-error { padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: #919daf; background: rgba(255,255,255,.02); font-size: 10px; }
.inline-error { color: #ffabb4; }
.mini-spinner { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid rgba(163,243,209,.2); border-top-color: var(--accent); border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
.player-section { scroll-margin-top: 90px; }
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 13px; }
.player-frame-wrap { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 13px; background: #05070b; }
.player-frame-top { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line); color: #a6b1c0; background: #101520; font-size: 9px; font-weight: 700; }
.player-live-dot { width: 6px; height: 6px; }
.player-third-party { margin-left: auto; color: #667388; font-size: 7px; letter-spacing: .14em; }
.player-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #030406; }
.player-disclaimer { padding: 8px 11px; color: #667286; background: #0d111a; font-size: 8px; }
.server-panel { align-self: start; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(17,21,33,.65); }
.server-panel-title { display: flex; justify-content: space-between; margin: 3px 2px 11px; color: #8793a7; font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.server-panel-title b { color: var(--accent); }
.server-choice { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 6px; padding: 9px 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; }
.server-choice:hover, .server-choice.active { border-color: rgba(163,243,209,.2); background: rgba(163,243,209,.06); }
.server-num { color: #6e7b90; font-size: 10px; font-weight: 850; }
.server-choice > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.server-choice b { overflow: hidden; color: #cbd4e1; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.server-choice small { color: #718096; font-size: 8px; }
.server-open { margin-left: auto; color: var(--accent); font-size: 9px; }
.download-list { margin-top: 20px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.download-head { display: flex; justify-content: space-between; margin-bottom: 9px; color: #a4afbf; font-size: 8px; letter-spacing: .15em; }
.download-head span { color: #758398; letter-spacing: normal; }
.download-row { display: grid; grid-template-columns: 30px minmax(0,1fr) 20px; align-items: center; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--line); }
.download-row:hover { background: rgba(163,243,209,.04); }
.download-number { color: #6b788e; font-size: 10px; font-weight: 850; }
.download-row > span:nth-child(2) { display: grid; gap: 4px; }
.download-row b { color: #d9e0eb; font-size: 10px; }
.download-row small { color: #79869a; font-size: 8px; }
.download-row > span:last-child { color: var(--accent); }
.crew-grid, .metadata-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.crew-cell, .metadata-grid > div { display: grid; gap: 6px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }
.crew-cell small, .metadata-grid small { color: #768399; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.crew-cell b, .metadata-grid b { color: #cfd7e4; font-size: 10px; font-weight: 650; line-height: 1.45; }
.detail-tech { padding-bottom: 30px !important; }
.metadata-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
.diagnostic-banner { display: flex; align-items: center; gap: 16px; margin: 10px 0 29px; padding: 17px; border: 1px solid rgba(245,199,130,.17); border-radius: 13px; background: rgba(245,199,130,.035); }
.diagnostic-pulse { display: grid; place-items: center; flex: 0 0 39px; height: 39px; border: 1px solid rgba(245,199,130,.28); border-radius: 11px; color: var(--warning); background: rgba(245,199,130,.07); font-size: 18px; }
.diagnostic-banner b { color: #e8dfce; font-size: 11px; }
.diagnostic-banner p { margin: 5px 0 0; color: #9b927f; font-size: 9px; line-height: 1.6; }
.endpoint-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.endpoint-row { display: grid; grid-template-columns: minmax(180px,1fr) 55px auto minmax(100px, .8fr); align-items: center; gap: 13px; min-height: 65px; padding: 10px 13px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.018); }
.endpoint-row:last-child { border: 0; }
.endpoint-row > div { display: grid; gap: 5px; min-width: 0; }
.endpoint-row b { color: #dbe3ed; font-size: 10px; }
.endpoint-row small { overflow: hidden; color: #778499; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-row code { color: #9eabc0; font-size: 8px; }
.endpoint-encryption { color: #9eabc0; font-size: 8px; }
.endpoint-result { overflow-wrap: anywhere; color: #737f92; font-size: 8px; }
.endpoint-result.success { color: var(--accent); }
.endpoint-result.failed { color: var(--danger); }
.endpoint-result.testing { color: var(--warning); }
.parameter-test-form { display: grid; grid-template-columns: 1fr 1.4fr .55fr auto; align-items: end; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.parameter-test-form label, .settings-form label { display: grid; gap: 7px; color: #abb5c4; font-size: 9px; font-weight: 750; }
.parameter-test-form input, .parameter-test-form select { height: 37px; }
.diagnostic-output { overflow: auto; max-height: 450px; margin-top: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; color: #8996a9; background: #080b12; font-size: 9px; }
.diagnostic-output pre { max-height: 370px; margin: 10px 0 0; color: #9ee4c8; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 8px; line-height: 1.6; }
.test-pass { color: var(--accent); font-weight: 800; }
.test-fail { color: var(--danger); font-weight: 800; }
.contract-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.contract-grid > div { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }
.contract-grid b { color: #cdd6e4; font-size: 9px; }
.contract-grid code { color: #8393aa; font-size: 8px; line-height: 1.6; overflow-wrap: anywhere; }
.toast-stack { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(340px, calc(100vw - 40px)); }
.toast { padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: #e3eaf4; background: rgba(18,24,36,.96); box-shadow: var(--shadow); font-size: 10px; animation: pageIn .2s ease both; }
.toast-success { border-color: rgba(163,243,209,.3); }
.toast-warning { border-color: rgba(245,199,130,.32); }
.overlay { position: fixed; z-index: 80; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(2,4,8,.74); backdrop-filter: blur(10px); }
.overlay.visible { display: flex; }
.dialog { position: relative; width: min(560px, 100%); max-height: min(88vh, 800px); overflow-y: auto; padding: 28px; border: 1px solid var(--line-strong); border-radius: 17px; background: #111724; box-shadow: 0 30px 100px rgba(0,0,0,.55); animation: dialogIn .2s ease both; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.dialog-close { position: absolute; top: 15px; right: 16px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: #98a4b6; background: rgba(255,255,255,.03); font-size: 19px; }
.dialog-kicker { margin-bottom: 8px; color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .17em; }
.dialog h2 { margin: 0; color: #f0f3f9; font-size: 24px; font-weight: 820; letter-spacing: -.04em; }
.dialog-intro { max-width: 440px; margin: 9px 0 20px; color: #8c98ab; font-size: 10px; line-height: 1.65; }
.settings-form { display: grid; gap: 14px; }
.settings-form input { height: 40px; }
.settings-form textarea { height: auto; min-height: 75px; padding: 10px; resize: vertical; }
.settings-form label small { color: #738096; font-size: 8px; font-weight: 450; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row select { appearance: auto; }
.settings-notice { padding: 12px; border: 1px solid rgba(245,199,130,.16); border-radius: 9px; background: rgba(245,199,130,.04); }
.settings-notice b { color: #eacb94; font-size: 9px; }
.settings-notice p { margin: 5px 0 0; color: #9b927f; font-size: 9px; line-height: 1.6; }
.settings-cache { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.settings-cache > div { display: grid; gap: 4px; }
.settings-cache b { color: #cbd5e3; font-size: 9px; }
.settings-cache span { color: #78869a; font-size: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.dialog-open { overflow: hidden; }

@media (max-width: 1250px) {
  :root { --sidebar: 190px; }
  .card-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .metadata-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 980px) {
  :root { --sidebar: 74px; }
  .sidebar { align-items: center; padding: 19px 8px 13px; }
  .brand-mark { justify-content: center; padding: 0 0 28px; }
  .brand-name, .nav-label, .nav-item > span:not(.nav-icon), .connection-pill, .profile-copy, .profile-more { display: none; }
  .primary-nav { width: 100%; }
  .nav-item { justify-content: center; width: 50px; height: 48px; margin: 0 auto; padding: 0; }
  .nav-icon { width: auto; font-size: 21px; }
  .nav-count { display: none; }
  .profile-chip { justify-content: center; width: 100%; padding: 13px 0 2px; }
  .app-shell { grid-template-columns: var(--sidebar) minmax(0,1fr); }
  .main-area { grid-column: 2; }
  .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .player-layout { grid-template-columns: minmax(0,1fr) 190px; }
  .explore-search-panel { grid-template-columns: 44px minmax(130px,1fr); }
  .inline-search { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  :root { --sidebar: 0px; --topbar: 60px; }
  .app-shell { display: block; padding-bottom: 65px; }
  .sidebar { inset: auto 0 0; width: 100%; height: 62px; flex-direction: row; align-items: center; justify-content: space-around; padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-right: 0; background: rgba(9,12,19,.96); }
  .brand-mark, .nav-label, .sidebar-bottom, .profile-chip { display: none; }
  .primary-nav { display: contents; }
  .nav-item { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 3px; width: auto; height: 49px; min-height: 0; max-width: 76px; margin: 0; padding: 2px 0; border-radius: 9px; font-size: 8px; }
  .nav-item > span:not(.nav-icon) { display: block; }
  .nav-icon { font-size: 17px; }
  .nav-count { display: none !important; }
  .main-area { min-height: calc(100vh - 62px); }
  .topbar { min-height: var(--topbar); padding: 0 14px; gap: 9px; }
  .mobile-brand { display: flex; flex: 0 0 auto; }
  .breadcrumbs { display: none; }
  .topbar-actions { flex: 1; justify-content: flex-end; gap: 6px; }
  .search-box { width: min(48vw, 240px); height: 35px; gap: 6px; padding: 0 8px; }
  .search-box input { font-size: 10px; }
  .search-box kbd { display: none; }
  .icon-button { width: 32px; height: 32px; }
  .avatar-button { display: grid; width: 30px; height: 30px; font-size: 12px; }
  .view-host { min-height: calc(100vh - 97px); padding: 15px 14px 35px; }
  .app-footer { padding: 10px 14px 12px; font-size: 7px; letter-spacing: .09em; }
  .app-footer span:last-child { display: none; }
  .hero { min-height: 385px; margin-bottom: 27px; border-radius: 16px; }
  .hero-copy { width: 100%; padding: 22px 19px 25px; }
  .hero-overlay { background: linear-gradient(90deg, rgba(9,12,19,.93), rgba(9,12,19,.46)), linear-gradient(0deg, rgba(9,12,19,.97), transparent 85%); }
  .hero h1 { max-width: 94%; margin: 14px 0 9px; font-size: clamp(34px, 10vw, 49px); }
  .hero-copy > p { max-width: 92%; font-size: 10px; }
  .hero-meta { margin: 12px 0 15px; font-size: 8px; }
  .hero-actions .button { min-height: 36px; padding: 0 11px; font-size: 9px; }
  .hero-index { right: 15px; bottom: 18px; }
  .hero-index b { font-size: 18px; }
  .content-section { margin: 26px 0 30px; }
  .section-head { align-items: flex-start; margin-bottom: 13px; }
  .section-head h2 { font-size: 15px; }
  .section-head p { max-width: 280px; font-size: 9px; }
  .text-action { font-size: 9px; }
  .shelf-track { grid-auto-columns: 126px; gap: 10px; margin-right: -14px; padding-right: 14px; }
  .poster-frame { border-radius: 10px; }
  .poster-kind { top: 6px; left: 6px; padding: 4px 5px; font-size: 6px; }
  .poster-rating { right: 6px; bottom: 6px; font-size: 8px; }
  .card-copy { padding-top: 7px; }
  .card-copy strong { font-size: 9px; }
  .card-copy small { font-size: 8px; }
  .taxonomy-section { padding: 15px; }
  .taxonomy-title { font-size: 9px; }
  .filter-chip, .static-chip { padding: 6px 8px; font-size: 8px; }
  .home-bottom-line { margin-top: 34px; font-size: 7px; }
  .page-heading { align-items: flex-start; margin: 14px 0 20px; }
  .page-heading h1 { font-size: 32px; }
  .page-heading p { max-width: 95%; font-size: 9px; }
  .heading-actions { flex-shrink: 0; }
  .heading-actions .button { min-height: 32px; padding: 0 9px; font-size: 8px; }
  .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px 10px; }
  .card-grid-compact { grid-template-columns: repeat(auto-fit, minmax(115px,1fr)); }
  .poster-play { width: 33px; height: 33px; font-size: 11px; }
  .card-save { top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
  .catalog-toolbar { padding: 10px; }
  .catalog-total b { font-size: 16px; }
  .catalog-total span { font-size: 8px; }
  .pagination { gap: 9px; }
  .pagination .button { min-height: 34px; padding: 0 9px; font-size: 8px; }
  .pagination span { font-size: 8px; }
  .explore-search-panel { grid-template-columns: 38px minmax(0,1fr); gap: 9px; padding: 12px; }
  .explore-search-mark { width: 36px; height: 36px; font-size: 22px; }
  .explore-search-panel b { font-size: 10px; }
  .explore-search-panel p { font-size: 8px; }
  .inline-search { gap: 6px; }
  .inline-search input { height: 36px; }
  .inline-search .button { min-height: 36px; padding: 0 9px; font-size: 8px; }
  .search-summary { font-size: 8px; }
  .history-summary { gap: 6px; }
  .history-summary > div { padding: 10px; }
  .history-summary b { font-size: 17px; }
  .history-summary span { font-size: 7px; }
  .history-row { grid-template-columns: 48px minmax(0,1fr) auto; gap: 9px; padding: 8px; }
  .history-poster { width: 48px; height: 62px; }
  .history-main .eyebrow { font-size: 7px; }
  .history-title { margin: 5px 0; font-size: 10px; }
  .progress-meta { font-size: 7px; }
  .history-actions { flex-direction: column; }
  .history-actions .button { min-height: 27px; padding: 0 7px; font-size: 7px; }
  .history-actions .icon-button { width: 27px; height: 27px; }
  .detail-page { margin: -15px -14px 0; }
  .detail-hero { min-height: 0; padding: 18px 14px 22px; }
  .detail-title-row { grid-template-columns: 100px minmax(0,1fr); align-items: start; gap: 13px; margin-top: 19px; }
  .detail-poster { max-width: 100px; border-radius: 9px; }
  .detail-poster .image-fallback { font-size: 34px; }
  .detail-title-copy { padding: 0; }
  .detail-title-copy .eyebrow { gap: 5px; font-size: 7px; letter-spacing: .11em; }
  .detail-title-copy h1 { margin: 8px 0; font-size: clamp(23px, 7vw, 34px); }
  .detail-facts { gap: 6px; font-size: 7px; }
  .detail-description { display: -webkit-box; overflow: hidden; margin: 9px 0; -webkit-line-clamp: 4; -webkit-box-orient: vertical; font-size: 9px; line-height: 1.55; }
  .detail-tags { gap: 4px; margin: 8px 0 11px; }
  .detail-tags .static-chip { padding: 4px 6px; font-size: 7px; }
  .detail-actions { gap: 5px; }
  .detail-actions .button { min-height: 31px; padding: 0 8px; font-size: 7px; gap: 5px; }
  .detail-page > .content-section { padding: 0 14px; }
  .season-selector { padding: 11px; }
  .season-buttons { gap: 5px; }
  .season-button { min-height: 31px; padding: 0 7px; font-size: 8px; gap: 6px; }
  .episode-row { grid-template-columns: 23px 49px minmax(0,1fr) 14px; min-height: 64px; gap: 8px; padding: 6px 7px; }
  .episode-number { font-size: 10px; }
  .episode-thumb { width: 49px; height: 42px; }
  .episode-copy b { font-size: 8px; }
  .episode-copy small { font-size: 7px; }
  .player-layout { grid-template-columns: 1fr; }
  .player-frame { aspect-ratio: 16/9; }
  .server-panel { padding: 10px; }
  .server-panel-title { margin-bottom: 5px; }
  .server-choice { display: inline-flex; width: calc(50% - 4px); vertical-align: top; margin-top: 5px; }
  .server-choice b { max-width: 100px; }
  .download-list { padding: 10px; }
  .crew-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metadata-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-tech { padding-bottom: 20px !important; }
  .endpoint-row { grid-template-columns: minmax(0,1fr) 32px auto; gap: 7px; padding: 9px; }
  .endpoint-row > div { grid-column: 1 / -1; }
  .endpoint-encryption { grid-column: 1; grid-row: 2; }
  .endpoint-row .button { grid-column: 2; grid-row: 2; }
  .endpoint-result { grid-column: 3; grid-row: 2; }
  .parameter-test-form { grid-template-columns: 1fr 1fr; }
  .parameter-test-form label:first-child { grid-column: 1 / -1; }
  .parameter-test-form button { grid-column: 1 / -1; }
  .contract-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .diagnostic-banner { align-items: flex-start; padding: 12px; }
  .diagnostic-banner p { font-size: 8px; }
  .overlay { align-items: flex-end; padding: 0; }
  .dialog { width: 100%; max-height: 90vh; padding: 23px 17px calc(20px + env(safe-area-inset-bottom)); border-radius: 17px 17px 0 0; border-bottom: 0; }
  .dialog h2 { font-size: 21px; }
  .dialog-intro { font-size: 9px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .toast-stack { right: 12px; bottom: 76px; width: calc(100vw - 24px); }
  .error-panel { margin: 40px auto; padding: 24px 16px; }
}
@media (max-width: 380px) {
  .mobile-brand b { font-size: 10px; }
  .search-box { width: 43vw; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shelf-track { grid-auto-columns: 117px; }
  .detail-title-row { grid-template-columns: 84px minmax(0,1fr); }
  .detail-poster { max-width: 84px; }
  .detail-title-copy h1 { font-size: 22px; }
  .detail-actions .button { padding: 0 6px; font-size: 6.5px; }
  .parameter-test-form { grid-template-columns: 1fr; }
  .parameter-test-form label:first-child, .parameter-test-form button { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
