/* ===== PAGE SHELL ===== */
.page { padding-top: calc(var(--header-h) + var(--s5)); padding-bottom: var(--s10); min-height: 60vh; }
.page--flush { padding-top: var(--header-h); }

.page-head { padding-inline: var(--gutter); margin-bottom: var(--s6); }
.page-head h1 { font-size: clamp(var(--fs-2xl), .9rem + 2.4vw, 3rem); font-weight: var(--w-black); letter-spacing: -.03em; }
.page-head p { color: var(--tx-3); margin-top: 6px; max-width: 640px; }

/* ===== BROWSE / CATALOG ===== */
.browse-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
  padding-inline: var(--gutter); margin-bottom: var(--s5);
}
.chip-scroller {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  flex: 1; min-width: 0; padding-block: 4px;
}
.chip-scroller::-webkit-scrollbar { display: none; }
.sort-select {
  appearance: none; -webkit-appearance: none;
  background: var(--bg-200) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e8e99' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line); color: var(--tx-1);
  border-radius: var(--r-full); padding: 8px 38px 8px 16px;
  font-size: var(--fs-sm); font-weight: var(--w-semi); cursor: pointer;
}
.sort-select:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }

.grid {
  display: grid;
  grid-template-columns: repeat(var(--gcols), minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 26px) var(--rail-gap);
  padding-inline: var(--gutter);
}
.grid .pcard { width: auto; }
.result-count { padding-inline: var(--gutter); color: var(--tx-3); font-size: var(--fs-sm); margin-bottom: var(--s4); }

/* ===== DETAIL PAGE ===== */
.detail-hero { position: relative; min-height: clamp(420px, 62vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.detail-hero__bg { position: absolute; inset: 0; }
.detail-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.detail-hero__shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.06) 30%, rgba(0,0,0,.25) 62%, rgba(0,0,0,.94) 92%, var(--bg-0) 100%),
  linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 55%);
}
html[data-theme="light"] .detail-hero__shade { background:
  linear-gradient(180deg, rgba(10,10,12,.5) 0%, rgba(10,10,12,.05) 32%, rgba(10,10,12,.22) 60%, rgba(244,244,246,.95) 94%, var(--bg-0) 100%),
  linear-gradient(90deg, rgba(10,10,12,.5) 0%, rgba(10,10,12,0) 55%);
}
.detail-wrap {
  position: relative; z-index: 2;
  width: 100%; padding: 0 var(--gutter) var(--s8);
  display: grid; grid-template-columns: 1fr; gap: var(--s6); align-items: end;
}
.detail-poster {
  width: clamp(150px, 22vw, 260px); aspect-ratio: 2/3;
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-3), 0 0 0 1px rgba(255,255,255,.09);
  background: var(--bg-300);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-main { max-width: 720px; padding-bottom: 4px; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-sm); font-weight: var(--w-semi); color: var(--tx-2);
  margin-bottom: var(--s4); transition: color var(--t-fast);
}
.back-link:hover { color: var(--tx-1); }
.back-link svg { width: 17px; height: 17px; }
.detail-title { font-size: clamp(var(--fs-2xl), 1rem + 3.4vw, 3.6rem); font-weight: var(--w-black); letter-spacing: -.028em; line-height: 1.02; text-shadow: 0 3px 28px rgba(0,0,0,.6); margin-bottom: var(--s3); }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; font-size: var(--fs-sm); font-weight: var(--w-semi); color: #dcdce2; margin-bottom: var(--s4); }
html[data-theme="light"] .detail-meta { color: #33333c; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s4); }
.genre-pill {
  font-size: var(--fs-xs); font-weight: var(--w-semibold); color: #e4e4ea;
  padding: 5px 13px; border-radius: var(--r-full);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  transition: all var(--t-fast);
}
.genre-pill:hover { background: rgba(255,255,255,.2); }
.detail-desc {
  font-size: clamp(var(--fs-sm), .85rem + .3vw, var(--fs-lg));
  line-height: 1.6; color: #e9e9ef; max-width: 640px;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
  margin-bottom: var(--s5);
}
html[data-theme="light"] .detail-desc { color: #232329; }
.detail-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s5); }
.list-btn.is-in { background: rgba(70,211,105,.18); border-color: rgba(70,211,105,.5); color: #7dedA0; }
.cast-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.cast-chip { font-size: var(--fs-xs); color: var(--tx-3); padding: 5px 11px; border-radius: var(--r-full); background: var(--bg-100); border: 1px solid var(--line-subtle); }

/* Cast section with photos */
.cast-sec { margin-top: var(--s6); margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); }
.cast-rail-wrap { position: relative; }
.cast-rail-wrap .rail-arrow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cast-rail-wrap:hover .rail-arrow:not([disabled]) { display: grid; }
}
.cast-row { display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding-bottom: var(--s4); padding-right: var(--gutter); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.cast-row::-webkit-scrollbar { display: none; }
.cast-card { flex: 0 0 auto; width: 100px; text-align: center; scroll-snap-align: start; }
.cast-img {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 8px;
  background: var(--bg-200); border: 2px solid rgba(255,255,255,.06);
}
.cast-img--ph {
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
  color: rgba(255,255,255,.3); background: linear-gradient(135deg, var(--bg-200), var(--bg-300));
}
.cast-name { display: block; font-size: var(--fs-xs); font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-role { display: block; font-size: 11px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.detail-body { padding: var(--s6) var(--gutter) 0; display: grid; gap: var(--s10); max-width: 1100px; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s5); }
.fact b { display: block; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--tx-3); margin-bottom: 5px; }
.fact span { font-size: var(--fs-sm); color: var(--tx-1); font-weight: var(--w-medium); }

/* Seasons & episodes */
.seasons-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: var(--s5); }
.episodes { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
.ep-card {
  display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: var(--s4);
  background: var(--bg-50); border: 1px solid var(--line-subtle);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
}
.ep-thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-300); }
.ep-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.ep-num {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: var(--fs-xs); font-weight: var(--w-bold);
  padding: 3px 9px; border-radius: var(--r-sm); backdrop-filter: blur(4px);
}
.ep-info { padding: var(--s4) var(--s4) var(--s4) 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.ep-title { font-size: var(--fs-md); font-weight: var(--w-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-overview {
  font-size: var(--fs-sm); color: var(--tx-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ep-runtime { font-size: var(--fs-xs); color: var(--tx-3); display: flex; align-items: center; gap: 8px; }
@media (hover:hover) and (pointer:fine) {
  .ep-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
  .ep-card:hover .ep-thumb img { transform: scale(1.06); }
}

/* ===== PLAYER ===== */
.player-layer { position: fixed; inset: 0; z-index: var(--z-player); background: #000; display: none; }
.player-layer.is-open { display: block; }
.player-stage { position: absolute; inset: 0; }
.player-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-error {
  position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: var(--s4);
  text-align: center; padding: var(--s5); color: var(--tx-2);
}
.player-error.is-shown { display: grid; }
.player-loading {
  position: absolute; inset: 0; z-index: 5; display: none; place-content: center; justify-items: center; gap: 14px;
  background: rgba(0,0,0,.6); color: #fff; font-size: var(--fs-sm); font-weight: var(--w-medium);
}
.player-loading.is-shown { display: grid; }
.player-loading-spinner {
  width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--brand-500);
  border-radius: 50%; animation: pspin .7s linear infinite;
}
@keyframes pspin { to { transform: rotate(360deg); } }
.player-ui {
  position: absolute; inset: 0; z-index: 2;
  opacity: 1; transition: opacity var(--t-med);
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 22%, transparent 74%, rgba(0,0,0,.78) 100%);
  pointer-events: none;
}
.player-ui > * { pointer-events: auto; }
.player-ui.is-hidden { opacity: 0; }
.player-ui.is-hidden .player-controls, .player-ui.is-hidden .player-top { pointer-events: none; }
.player-top { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--gutter); }
.player-tit b { display: block; font-size: var(--fs-md); font-weight: var(--w-bold); color: #fff; }
.player-tit span { font-size: var(--fs-xs); color: #b9b9c2; }
.player-bottom { padding: 0 var(--gutter) var(--s5); display: grid; gap: 10px; }
.seek { position: relative; height: 20px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek__track { position: relative; width: 100%; height: 5px; border-radius: var(--r-full); background: rgba(255,255,255,.22); overflow: visible; transition: height var(--t-fast); }
.seek:hover .seek__track { height: 8px; }
.seek__buf { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: inherit; background: rgba(255,255,255,.35); width: 0%; }
.seek__fill { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: inherit; background: var(--brand-500); width: 0%; }
.seek__knob {
  position: absolute; top: 50%; left: 0%;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--brand-500); transform: translate(-50%, -50%) scale(0);
  transition: transform var(--t-fast); box-shadow: 0 0 12px var(--brand-glow);
}
.seek:hover .seek__knob, .seek:focus-within .seek__knob { transform: translate(-50%, -50%) scale(1); }
.player-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pbtn {
  width: 46px; height: 46px; border-radius: var(--r-full);
  display: grid; place-items: center; color: #fff;
  transition: background var(--t-fast), transform var(--t-fast);
}
.pbtn svg { width: 23px; height: 23px; }
.pbtn:hover, .pbtn:focus-visible { background: rgba(255,255,255,.14); }
.pbtn--play { width: 58px; height: 58px; background: #fff; color: #000; }
.pbtn--play svg { width: 27px; height: 27px; }
.pbtn--play:hover { background: #f0f0f0; }
.pbtn--back { margin-right: 4px; }
.p-time { font-size: var(--fs-sm); color: #d5d5dc; font-variant-numeric: tabular-nums; padding-inline: 8px; white-space: nowrap; }
.player-spacer { flex: 1; }
.vol-group { display: flex; align-items: center; }
.vol-range { width: 0; opacity: 0; transition: all var(--t-med); accent-color: var(--brand-500); height: 4px; cursor: pointer; }
.vol-group:hover .vol-range, .vol-range:focus-visible { width: 88px; opacity: 1; margin-inline: 8px; }
.player-top-spacer { flex: 1; }

/* Player slide-in panel */
.player-panel { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.panel-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity var(--t-med); pointer-events: none; }
.panel-overlay.is-open { opacity: 1; pointer-events: auto; }
.panel-body {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(380px, 85vw); background: rgba(12,12,16,.96);
  backdrop-filter: blur(16px); border-left: 1px solid rgba(255,255,255,.08);
  transform: translateX(100%); transition: transform var(--t-med);
  overflow-y: auto; overscroll-behavior: contain;
  padding: var(--s5) var(--s4);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
  pointer-events: auto; z-index: 6;
  touch-action: pan-y;
}
.panel-overlay.is-open ~ .panel-body { transform: translateX(0); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s4); }
.panel-head h3 { color: #fff; font-size: var(--fs-md); font-weight: var(--w-bold); margin: 0; }
.panel-close { background: none; border: none; color: #999; cursor: pointer; padding: 4px; }
.panel-close:hover { color: #fff; }
.panel-close svg { width: 20px; height: 20px; }

/* Episode list inside panel */
.ep-season-tabs { display: flex; gap: 6px; margin-bottom: var(--s4); overflow-x: auto; scrollbar-width: none; }
.ep-season-tabs::-webkit-scrollbar { display: none; }
.ep-tab {
  flex-shrink: 0; padding: 6px 14px; border-radius: var(--r-full);
  background: rgba(255,255,255,.08); color: #b9b9c2; border: none;
  font-size: var(--fs-xs); font-weight: var(--w-semi); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.ep-tab:hover { background: rgba(255,255,255,.14); color: #fff; }
.ep-tab.is-on { background: var(--brand-500); color: #fff; }
.ep-list { display: flex; flex-direction: column; gap: 6px; }
.ep-card {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r-sm); padding: 8px; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  text-align: left; color: #d5d5dc; width: 100%;
}
.ep-card:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.12); }
.ep-card.is-playing { border-color: var(--brand-500); background: rgba(229,9,20,.12); }
.ep-card.is-unreleased { opacity: .55; cursor: default; }
.ep-card.is-unreleased:hover { background: transparent; border-color: rgba(255,255,255,.06); }
.ep-airdate { font-size: 11px; color: var(--brand-500); font-weight: 600; display: flex; align-items: center; gap: 4px; white-space: nowrap; margin-top: 2px; }
.ep-thumb { width: 100px; height: 56px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.ep-thumb--ph {
  display: grid; place-items: center; background: rgba(255,255,255,.08);
  font-weight: 700; font-size: var(--fs-lg); color: #666;
}
.ep-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep-num { font-size: 10px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.ep-name { font-size: var(--fs-xs); font-weight: var(--w-semi); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-desc { font-size: 11px; color: #777; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-now { font-size: 10px; color: var(--brand-500); font-weight: 600; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ep-now svg { width: 12px; height: 12px; }
.ep-loading { color: #666; font-size: var(--fs-sm); padding: var(--s6) 0; text-align: center; }

/* Settings groups inside panel */
.set-group { margin-bottom: var(--s5); }
.set-group label { display: block; font-size: var(--fs-xs); font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.set-options { display: flex; flex-wrap: wrap; gap: 6px; }
.set-option {
  padding: 8px 16px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.06); color: #b9b9c2; border: 1px solid rgba(255,255,255,.08);
  font-size: var(--fs-xs); font-weight: 500; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.set-option:hover { background: rgba(255,255,255,.1); color: #fff; }
.set-option.is-active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.set-note { font-size: var(--fs-xs); color: #555; margin-top: var(--s4); }

/* Server buttons in settings */
.server-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  color: #b9b9c2; cursor: pointer; text-align: left;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.server-btn:hover { background: rgba(255,255,255,.08); }
.server-btn.is-active { border-color: var(--brand-500); background: rgba(229,9,20,.1); }
.server-name { font-size: var(--fs-sm); font-weight: 600; color: #fff; }
.server-label { font-size: 11px; color: #777; }
.server-check { margin-left: auto; color: var(--brand-500); }
.server-check svg { width: 16px; height: 16px; }
.server-list { flex-direction: column; }

/* Subtitle upload */
.sub-upload-label {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.2);
  color: #b9b9c2; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.sub-upload-label:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }
.sub-upload-icon svg { width: 18px; height: 18px; }
.sub-upload-text { font-size: var(--fs-sm); }

.sub-search-row { display: flex; gap: 6px; }
.sub-search-input {
  flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: #fff; border-radius: var(--r-sm); padding: 10px 12px; font-size: var(--fs-sm);
}
.sub-search-input::placeholder { color: #666; }
.sub-search-input:focus { border-color: var(--brand-500); outline: none; }
.sub-search-btn {
  background: var(--brand-500); color: #fff; border: none; border-radius: var(--r-sm);
  padding: 10px 16px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: background var(--t-fast);
}
.sub-search-btn:hover { background: var(--brand-600); }
.sub-results { max-height: 200px; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.sub-results::-webkit-scrollbar { width: 4px; }
.sub-results::-webkit-scrollbar-track { background: transparent; }
.sub-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.sub-result-item {
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast); text-align: left;
}
.sub-result-item:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.sub-result-item.is-loading { opacity: .5; pointer-events: none; }
.sub-result-name { font-size: var(--fs-sm); color: #fff; font-weight: 500; }
.sub-result-meta { font-size: 11px; color: #888; }
.sub-offset-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sub-offset-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: #ccc; border-radius: var(--r-sm); padding: 6px 12px; font-size: 12px;
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.sub-offset-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.sub-offset-reset { color: var(--brand-400); border-color: rgba(255,100,100,.25); }
.sub-offset-reset:hover { background: rgba(255,100,100,.1); }
.sub-offset-val { font-size: var(--fs-sm); color: #fff; font-weight: 600; min-width: 50px; text-align: center; }

.sub-lang-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-lang-chip {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: #aaa; border-radius: 20px; padding: 6px 14px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all var(--t-fast);
}
.sub-lang-chip:hover { background: rgba(255,255,255,.1); color: #fff; }
.sub-lang-chip.is-active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.sub-auto-status {
  display: flex; align-items: center; gap: 8px; padding: 12px 0;
  font-size: var(--fs-xs); color: #888;
}
.sub-auto-status:empty { display: none; }
.sub-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--brand-500); border-radius: 50%;
  animation: subspin .6s linear infinite;
}
@keyframes subspin { to { transform: rotate(360deg); } }
.sub-auto-result { margin-top: 4px; }
.sub-auto-result:empty { display: none; }
.sub-auto-btn {
  display: flex; flex-direction: column; gap: 4px; width: 100%;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer;
  transition: all var(--t-fast); text-align: left;
}
.sub-auto-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }
.sub-auto-btn.is-loading { opacity: .6; pointer-events: none; }
.sub-auto-name { font-size: var(--fs-sm); color: #fff; font-weight: 500; }
.sub-auto-meta { font-size: 11px; color: #888; }
.sub-auto-load { font-size: 11px; color: var(--brand-400); font-weight: 600; margin-top: 2px; }

/* ===== SEARCH RESULTS PAGE / MY LIST / 404 reuse grid ===== */
.kv-note { padding-inline: var(--gutter); color: var(--tx-3); font-size: var(--fs-sm); margin-bottom: var(--s5); }

/* ===== REQUEST FORM ===== */
.request-form { display: flex; flex-direction: column; gap: var(--s5); margin-bottom: var(--s8); }
.req-field { display: flex; flex-direction: column; gap: 6px; }
.req-field label { font-size: var(--fs-sm); font-weight: var(--w-semi); color: var(--tx-2); }
.req-field input,
.req-field select,
.req-field textarea {
  background: var(--bg-200); border: 1px solid var(--line); color: var(--tx-1);
  border-radius: var(--r-md); padding: 12px 16px; font-size: var(--fs-md);
  transition: border-color var(--t-fast);
}
.req-field input:focus,
.req-field select:focus,
.req-field textarea:focus { border-color: var(--brand-500); outline: none; }
.req-field textarea { resize: vertical; min-height: 80px; }
.req-field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e8e99' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px;
}
.req-history { margin-top: var(--s6); }
.req-history h3 { font-size: var(--fs-lg); font-weight: var(--w-bold); margin-bottom: var(--s4); }
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--bg-100); border: 1px solid var(--line-subtle);
}
.req-item-title { font-weight: var(--w-semi); font-size: var(--fs-md); }
.req-item-meta { font-size: var(--fs-xs); color: var(--tx-3); }
.req-item-date { font-size: var(--fs-xs); color: var(--tx-3); margin-left: auto; }
