:root {
  --bg: #090b12;
  --panel: rgba(17, 20, 31, .78);
  --panel-strong: #11141f;
  --panel-soft: #151927;
  --text: #f5f7fb;
  --muted: #9299aa;
  --muted-2: #697084;
  --line: rgba(255,255,255,.085);
  --accent: #9b8cff;
  --accent-2: #70c9ff;
  --accent-soft: rgba(155,140,255,.14);
  --danger: #ff7e91;
  --success: #7ee8b5;
  --warning: #ffd07a;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 20% -10%, #14182a 0, transparent 34%), var(--bg);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
.noise { position: fixed; inset: 0; pointer-events:none; z-index:-1; opacity:.035; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.ambient { position: fixed; width: 380px; height: 380px; filter: blur(90px); opacity:.11; border-radius:50%; z-index:-2; pointer-events:none; }
.ambient-a { background:#765cff; top:20%; left:-150px; }
.ambient-b { background:#39b9ff; right:-120px; top:50%; }
.topbar, .detail-topbar {
  width:min(1500px, calc(100% - 48px));
  height:86px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:relative;
  z-index:20;
}
.brand { display:flex; align-items:center; gap:12px; font-family:Manrope,sans-serif; font-weight:800; letter-spacing:.12em; }
.brand-mark { width:36px; height:36px; border:1px solid var(--line); border-radius:12px; display:grid; place-items:center; background:rgba(255,255,255,.04); box-shadow: inset 0 0 20px rgba(155,140,255,.06); }
.brand.compact .brand-text { display:inline; }
.top-actions { display:flex; align-items:center; gap:8px; padding:6px; border:1px solid var(--line); border-radius:16px; background:rgba(12,14,22,.68); backdrop-filter:blur(18px); }
.chip-btn { border:0; background:transparent; display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:11px; cursor:pointer; color:var(--muted); transition:.25s ease; }
.chip-btn strong { font-size:11px; min-width:22px; height:22px; padding:0 6px; display:grid; place-items:center; border-radius:7px; background:rgba(255,255,255,.06); color:var(--muted); }
.chip-btn:hover, .chip-btn.active { color:var(--text); background:rgba(255,255,255,.06); }
.chip-btn.active strong { color:var(--accent-2); background:rgba(112,201,255,.1); }
.page-shell { width:min(1500px, calc(100% - 48px)); margin:0 auto 80px; }
.hero { min-height:270px; padding:46px 0 28px; display:grid; grid-template-columns:1fr auto; gap:44px; align-items:end; }
.eyebrow, .section-kicker { display:block; font-size:11px; letter-spacing:.2em; color:var(--accent-2); font-weight:800; margin-bottom:16px; }
.hero h1 { font-family:Manrope,sans-serif; font-size:clamp(38px,5vw,74px); line-height:.98; letter-spacing:-.045em; max-width:980px; margin:0; }
.hero h1 span { color:transparent; background:linear-gradient(90deg,var(--accent),var(--accent-2)); background-clip:text; -webkit-background-clip:text; }
.hero p { margin:22px 0 0; color:var(--muted); font-size:16px; max-width:650px; line-height:1.7; }
.hero-stat { min-width:170px; border:1px solid var(--line); background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.018)); border-radius:22px; padding:20px; box-shadow:var(--shadow); }
.hero-stat span,.hero-stat small { color:var(--muted); font-size:12px; }
.hero-stat strong { font:800 48px/1 Manrope,sans-serif; display:block; margin:6px 0 4px; }
.controls-panel { padding:16px; border:1px solid var(--line); border-radius:22px; background:rgba(14,17,27,.76); backdrop-filter: blur(20px); box-shadow:0 16px 50px rgba(0,0,0,.2); }
.search-wrap { height:58px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.035); display:flex; align-items:center; gap:12px; padding:0 16px; transition:.25s; }
.search-wrap:focus-within { border-color:rgba(155,140,255,.45); box-shadow:0 0 0 4px rgba(155,140,255,.08); }
.search-wrap svg { width:21px; color:var(--muted); }
.search-wrap input { flex:1; min-width:0; background:transparent; border:0; outline:0; color:var(--text); font-size:15px; }
.search-wrap input::placeholder { color:#646b7a; }
kbd { color:var(--muted-2); background:rgba(255,255,255,.05); border:1px solid var(--line); border-bottom-color:rgba(255,255,255,.15); border-radius:7px; padding:3px 7px; font-size:11px; }
.filters-row { display:grid; grid-template-columns:1fr 1fr 1.2fr auto; gap:10px; margin-top:10px; }
.select-wrap { position:relative; }
.select-wrap label { position:absolute; z-index:2; left:13px; top:8px; font-size:9px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted-2); pointer-events:none; }
.select-wrap select { width:100%; height:58px; padding:20px 36px 5px 13px; appearance:none; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.028); color:var(--text); outline:0; cursor:pointer; }
.select-wrap::after { content:'⌄'; position:absolute; right:14px; top:50%; transform:translateY(-45%); color:var(--muted); pointer-events:none; }
.select-wrap select option { background:#151927; }
.view-switch { display:flex; gap:6px; padding:5px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.028); }
.view-btn { width:47px; height:46px; border:0; border-radius:10px; background:transparent; color:var(--muted); cursor:pointer; display:grid; place-items:center; transition:.2s; }
.view-btn svg { width:19px; }
.view-btn:hover,.view-btn.active { background:rgba(255,255,255,.07); color:var(--text); }
.catalog-head { display:flex; justify-content:space-between; align-items:end; margin:54px 0 20px; }
.catalog-head h2 { margin:0; font:800 30px/1.1 Manrope,sans-serif; letter-spacing:-.03em; }
.catalog-head .section-kicker { margin-bottom:10px; }
.result-count { color:var(--muted); font-size:13px; }
.result-count strong { color:var(--text); }
.catalog-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:18px; }
.anime-card { position:relative; opacity:0; transform:translateY(16px); transition:opacity .5s ease var(--delay), transform .5s ease var(--delay), border-color .25s, background .25s; border:1px solid transparent; border-radius:22px; padding:8px; background:rgba(255,255,255,.015); overflow:hidden; }
.anime-card.show { opacity:1; transform:none; }
.anime-card:hover { background:rgba(255,255,255,.035); border-color:var(--line); transform:translateY(-4px); }
.card-link { position:absolute; inset:0; z-index:3; }
.poster-wrap { position:relative; aspect-ratio:.7; border-radius:17px; overflow:hidden; background:#171b27; }
.poster { width:100%; height:100%; object-fit:cover; display:block; transition:transform .6s cubic-bezier(.2,.8,.2,1), filter .35s; }
.anime-card:hover .poster { transform:scale(1.035); filter:saturate(1.08); }
.poster-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.02) 45%,rgba(7,9,14,.68) 100%); }
.status-badge { display:inline-flex; align-items:center; min-height:27px; padding:0 9px; border:1px solid rgba(255,255,255,.12); border-radius:9px; font-size:10px; font-weight:800; letter-spacing:.02em; background:rgba(10,12,18,.7); backdrop-filter:blur(12px); }
.poster-wrap > .status-badge { position:absolute; left:10px; top:10px; }
.status-planned { color:#d9d4ff; background:rgba(125,105,255,.16); }
.status-watching { color:#b8e7ff; background:rgba(77,182,255,.16); }
.status-completed { color:#bcf7db; background:rgba(73,205,145,.16); }
.status-paused { color:#ffe0a5; background:rgba(255,183,77,.14); }
.status-dropped { color:#ffc1cb; background:rgba(255,102,126,.14); }
.card-actions { position:absolute; z-index:5; top:10px; right:10px; display:flex; flex-direction:column; gap:6px; }
.mini-action { width:32px; height:32px; padding:0; display:grid; place-items:center; border:1px solid rgba(255,255,255,.11); background:rgba(9,11,18,.72); backdrop-filter:blur(12px); border-radius:10px; color:#c8cdd8; cursor:pointer; transition:.2s; }
.mini-action svg { width:16px; }
.mini-action:hover,.mini-action.active { color:var(--accent-2); transform:scale(1.04); }
.mini-action.liked { color:#ff8ca0; }
.card-body { padding:15px 6px 8px; }
.card-body h3 { margin:0; font:700 15px/1.35 Manrope,sans-serif; letter-spacing:-.018em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-meta { display:flex; justify-content:space-between; gap:10px; margin-top:8px; color:var(--muted-2); font-size:10px; }
.card-meta span:first-child { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-body p { display:none; }
.catalog-list { display:flex; flex-direction:column; gap:10px; }
.catalog-list .anime-card { display:grid; grid-template-columns:86px 1fr; gap:14px; padding:9px; border-color:var(--line); background:rgba(255,255,255,.02); }
.catalog-list .poster-wrap { aspect-ratio:.7; min-height:116px; }
.catalog-list .poster-wrap > .status-badge { display:none; }
.catalog-list .card-actions { top:8px; right:8px; flex-direction:row; }
.catalog-list .card-body { align-self:center; padding:8px 66px 8px 2px; }
.catalog-list .card-body h3 { font-size:18px; }
.catalog-list .card-meta { justify-content:flex-start; gap:16px; margin-top:6px; }
.catalog-list .card-body p { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; max-width:950px; margin:11px 0 0; color:var(--muted); line-height:1.6; font-size:12px; }
.empty-state { border:1px dashed var(--line); border-radius:24px; min-height:270px; display:grid; place-items:center; align-content:center; text-align:center; color:var(--muted); }
.empty-state.hidden { display:none; }
.empty-icon { font-size:32px; color:var(--accent); }
.empty-state h3 { margin:8px 0 4px; color:var(--text); }
.empty-state p { margin:0; }
.toast { position:fixed; left:50%; bottom:24px; transform:translate(-50%,20px); opacity:0; pointer-events:none; padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:rgba(18,21,32,.9); backdrop-filter:blur(16px); box-shadow:var(--shadow); color:var(--text); font-size:12px; z-index:99; transition:.25s; }
.toast.show { opacity:1; transform:translate(-50%,0); }
.reveal { animation:reveal .7s cubic-bezier(.2,.8,.2,1) both; }
.delay-1 { animation-delay:.08s; }.delay-2{animation-delay:.16s}.delay-3{animation-delay:.24s}
@keyframes reveal { from { opacity:0; transform:translateY(12px);} to {opacity:1;transform:none;} }

/* Detail page */
.title-page { background:#080a10; }
.detail-topbar { position:absolute; left:50%; transform:translateX(-50%); top:0; width:min(1500px,calc(100% - 48px)); }
.back-link { height:42px; padding:0 14px; border:1px solid rgba(255,255,255,.12); border-radius:12px; display:flex; align-items:center; background:rgba(9,11,17,.48); backdrop-filter:blur(16px); color:#d7dbe4; font-size:12px; transition:.2s; }
.back-link:hover { background:rgba(255,255,255,.07); }
.title-hero { min-height:730px; position:relative; display:flex; align-items:flex-end; padding-top:120px; overflow:hidden; }
.banner-bg { position:absolute; inset:0; background:var(--banner) center/cover no-repeat; filter:saturate(.9); transform:scale(1.04); animation:bannerIn 1.2s cubic-bezier(.2,.8,.2,1) both; }
.banner-vignette { position:absolute; inset:0; background:linear-gradient(180deg,rgba(6,8,12,.22),rgba(6,8,12,.34) 30%,#080a10 94%),linear-gradient(90deg,rgba(6,8,12,.74),transparent 58%); }
@keyframes bannerIn { from{opacity:0;transform:scale(1.08)} to{opacity:1;transform:scale(1.04)} }
.title-shell { position:relative; z-index:2; width:min(1320px,calc(100% - 48px)); margin:0 auto; }
.title-hero .title-shell { display:grid; grid-template-columns:260px minmax(0,760px); gap:42px; align-items:end; padding-bottom:56px; }
.title-poster-wrap { border-radius:24px; padding:7px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); backdrop-filter:blur(16px); box-shadow:0 30px 80px rgba(0,0,0,.45); }
.title-poster { display:block; width:100%; aspect-ratio:.7; object-fit:cover; border-radius:18px; }
.title-tags { display:flex; gap:8px; align-items:center; margin-bottom:18px; }
.group-pill { min-height:27px; display:inline-flex; align-items:center; padding:0 9px; border-radius:9px; color:#d8dce6; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); font-size:10px; font-weight:700; }
.title-info h1 { margin:0; max-width:950px; font:800 clamp(42px,6vw,82px)/.98 Manrope,sans-serif; letter-spacing:-.052em; text-wrap:balance; }
.title-description { margin:24px 0 0; max-width:720px; color:#c0c5d0; font-size:15px; line-height:1.75; text-shadow:0 2px 16px rgba(0,0,0,.28); }
.detail-actions { display:flex; gap:9px; margin-top:24px; }
.detail-action { height:44px; padding:0 14px; display:flex; align-items:center; gap:8px; border-radius:12px; border:1px solid rgba(255,255,255,.12); background:rgba(9,11,17,.5); backdrop-filter:blur(14px); color:#d7dbe4; cursor:pointer; transition:.2s; }
.detail-action svg { width:17px; }
.detail-action:hover,.detail-action.active { border-color:rgba(112,201,255,.3); color:var(--accent-2); background:rgba(112,201,255,.08); }
.detail-action.liked { color:#ff9caf; border-color:rgba(255,126,145,.26); background:rgba(255,126,145,.07); }
.detail-content { display:grid; grid-template-columns:1.35fr .65fr; gap:48px; padding:74px 0 110px; }
.detail-main h2 { margin:0; font:800 34px/1.15 Manrope,sans-serif; letter-spacing:-.035em; }
.detail-main p { max-width:820px; color:#a7aebb; line-height:1.9; font-size:15px; }
.sources-card { padding:20px; border:1px solid var(--line); border-radius:22px; background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.018)); align-self:start; }
.sources-head .section-kicker { margin-bottom:8px; }
.sources-head h3 { margin:0 0 17px; font:700 18px Manrope,sans-serif; }
.source-list { display:flex; flex-direction:column; gap:8px; }
.source-btn { min-height:50px; padding:0 14px; border:1px solid var(--line); border-radius:13px; display:flex; align-items:center; justify-content:space-between; background:rgba(255,255,255,.025); color:#d8dce5; transition:.22s; }
.source-btn:hover { transform:translateX(3px); background:rgba(155,140,255,.08); border-color:rgba(155,140,255,.26); }
.source-arrow { color:var(--accent-2); }
.source-empty { color:var(--muted); font-size:13px; }
.not-found { min-height:100vh; display:grid; place-items:center; align-content:center; gap:16px; }
.not-found a { color:var(--accent-2); }

@media (max-width:1250px) { .catalog-grid{grid-template-columns:repeat(4,1fr)} }
@media (max-width:1000px) {
  .catalog-grid{grid-template-columns:repeat(3,1fr)}
  .hero{grid-template-columns:1fr}.hero-stat{display:none}
  .filters-row{grid-template-columns:1fr 1fr}.view-switch{grid-column:2; justify-self:end; position:absolute; transform:translateY(68px)}
  .controls-panel{padding-bottom:74px}
  .title-hero .title-shell{grid-template-columns:210px 1fr}
}
@media (max-width:720px) {
  .topbar,.page-shell,.detail-topbar,.title-shell{width:min(100% - 28px,1500px)}
  .topbar{height:auto; padding:18px 0; align-items:flex-start; gap:14px}.top-actions{overflow:auto; max-width:72vw}.chip-btn{white-space:nowrap}
  .hero{padding-top:34px; min-height:240px}.hero h1{font-size:42px}.hero p{font-size:14px}
  .filters-row{grid-template-columns:1fr}.controls-panel{padding-bottom:16px}.view-switch{position:static; transform:none; grid-column:auto; justify-self:stretch}.view-btn{flex:1;width:auto}
  .catalog-grid{grid-template-columns:repeat(2,1fr);gap:10px}.anime-card{padding:5px;border-radius:17px}.poster-wrap{border-radius:13px}.card-body{padding:11px 3px 6px}.card-body h3{font-size:13px}.card-meta{font-size:9px;display:block}.card-meta span:last-child{display:none}
  .catalog-head{margin-top:38px}.catalog-head h2{font-size:24px}
  .catalog-list .anime-card{grid-template-columns:72px 1fr}.catalog-list .card-body{padding-right:52px}.catalog-list .card-body h3{font-size:15px}.catalog-list .card-body p{font-size:11px;-webkit-line-clamp:1}
  .detail-topbar{z-index:30}.detail-topbar .brand-text{display:none}.title-hero{min-height:auto;padding-top:170px}.title-hero .title-shell{grid-template-columns:1fr;gap:22px;padding-bottom:34px}.title-poster-wrap{width:150px}.title-info h1{font-size:44px}.title-description{font-size:13px}.banner-vignette{background:linear-gradient(180deg,rgba(6,8,12,.2),rgba(6,8,12,.55) 35%,#080a10 93%)}
  .detail-content{grid-template-columns:1fr;gap:26px;padding-top:40px}.detail-main h2{font-size:28px}
}
@media (max-width:450px){ .brand-text{display:none}.top-actions{max-width:calc(100vw - 78px)}.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.status-badge{font-size:9px}.mini-action{width:29px;height:29px}.hero h1{font-size:36px} }

/* Notion loading state */
.loading-grid { min-height: 420px; }
.skeleton-card { border:1px solid var(--line); border-radius:22px; padding:8px; background:rgba(255,255,255,.015); overflow:hidden; }
.skeleton-poster, .skeleton-line { position:relative; overflow:hidden; background:rgba(255,255,255,.055); }
.skeleton-poster { aspect-ratio:.7; border-radius:17px; }
.skeleton-line { height:13px; border-radius:6px; margin:15px 6px 0; }
.skeleton-line.short { width:58%; height:9px; margin-top:9px; margin-bottom:8px; }
.skeleton-poster::after, .skeleton-line::after { content:''; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgba(255,255,255,.08),transparent); animation:skeletonSweep 1.4s infinite; }
@keyframes skeletonSweep { to { transform:translateX(100%); } }
.detail-loader { width:38px; height:38px; border-radius:50%; border:3px solid rgba(255,255,255,.1); border-top-color:var(--accent-2); animation:detailSpin .8s linear infinite; }
@keyframes detailSpin { to { transform:rotate(360deg); } }
@media (max-width:1250px) { .loading-grid { grid-template-columns:repeat(4,1fr); } }
@media (max-width:1000px) { .loading-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:720px) { .loading-grid { grid-template-columns:repeat(2,1fr); } }


/* Detail page refinements */
.title-hero { min-height: 0; }
.title-hero .title-shell { grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 48px; padding-bottom: 64px; }
.title-side { display:flex; flex-direction:column; gap:18px; }
.title-control-stack { display:grid; gap:12px; }
.control-block { display:grid; gap:8px; }
.control-label { font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:#7fa7d8; }
.control-dropdown { position:relative; }
.control-dropdown-btn {
  width:100%; min-height:50px; padding:0 14px; display:flex; align-items:center; justify-content:space-between; gap:14px;
  border:1px solid rgba(255,255,255,.12); border-radius:15px; background:rgba(9,11,17,.58); color:#e2e6ef; cursor:pointer;
  backdrop-filter:blur(16px); transition:.22s;
}
.control-dropdown-btn:hover, .control-dropdown.open .control-dropdown-btn { border-color:rgba(112,201,255,.32); background:rgba(112,201,255,.08); }
.dropdown-caret, .source-group-caret { font-size:18px; line-height:1; color:#92d3ff; transition:transform .28s ease; }
.control-dropdown.open .dropdown-caret, .source-group.open .source-group-caret { transform:rotate(180deg); }
.control-dropdown-menu {
  position:absolute; top:calc(100% + 8px); left:0; right:0; z-index:14; padding:10px; display:grid; gap:8px;
  border:1px solid rgba(255,255,255,.1); border-radius:18px; background:rgba(10,12,19,.96); box-shadow:0 22px 60px rgba(0,0,0,.42);
  backdrop-filter:blur(22px); opacity:0; visibility:hidden; pointer-events:none; transform:translateY(-8px) scale(.98); transition:.22s;
}
.control-dropdown.open .control-dropdown-menu { opacity:1; visibility:visible; pointer-events:auto; transform:none; }
.dropdown-option {
  width:100%; padding:10px 12px; display:flex; align-items:center; justify-content:flex-start; background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08); border-radius:12px; color:#edf1f7; cursor:pointer; transition:.18s;
}
.dropdown-option:hover, .dropdown-option.selected { background:rgba(112,201,255,.09); border-color:rgba(112,201,255,.28); }
.dropdown-option.add-new { border-style:dashed; }
.detail-actions-vertical { margin-top:0; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.detail-actions-vertical .detail-action { justify-content:center; }
.title-poster-wrap { margin-top:4px; }
.title-info { padding-top: 96px; }
.title-description { margin-top: 22px; max-width: 760px; }
.detail-links { padding: 28px 0 110px; }
.sources-card-wide { max-width: 920px; margin-left:auto; }
.sources-summary { margin: -6px 0 0; color:#8f98aa; font-size:13px; }
.source-groups { display:grid; gap:12px; margin-top:18px; }
.source-group {
  border:1px solid rgba(255,255,255,.08); border-radius:18px; background:rgba(255,255,255,.025); overflow:hidden; transition:.25s ease;
}
.source-group.open { background:rgba(255,255,255,.04); border-color:rgba(112,201,255,.18); }
.source-group-trigger {
  width:100%; min-height:60px; padding:0 16px; display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:transparent; border:0; color:#edf1f7; cursor:pointer;
}
.source-group-info { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.source-group-info strong { font-size:17px; font-family:Manrope,sans-serif; }
.source-group-info small { color:#8f98aa; font-size:12px; font-weight:700; letter-spacing:.03em; }
.source-group-body {
  display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows .34s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
.source-group.open .source-group-body { grid-template-rows:1fr; opacity:1; }
.source-group-list { min-height:0; overflow:hidden; padding:0 14px; }
.source-group.open .source-group-list { padding:0 14px 14px; }
.source-entry {
  opacity:0; transform:translateX(20px); transition:opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1);
  transition-delay:0s; margin-top:8px;
}
.source-group.open .source-entry {
  opacity:1; transform:none; transition-delay:calc(120ms + (var(--entry-index) * 60ms));
}
.source-group:not(.open) .source-entry {
  opacity:0; transform:translateX(20px);
}
@media (max-width:1000px) {
  .title-hero .title-shell { grid-template-columns: 250px 1fr; gap:32px; }
  .title-info { padding-top: 84px; }
}
@media (max-width:720px) {
  .title-hero { padding-top: 138px; }
  .title-hero .title-shell { grid-template-columns:1fr; gap:24px; padding-bottom:34px; }
  .title-side { order:2; }
  .title-info { order:1; padding-top:0; }
  .title-poster-wrap { width:min(220px, 58vw); }
  .detail-actions-vertical { grid-template-columns:1fr; }
  .sources-card-wide { max-width:none; margin-left:0; }
  .source-group-trigger { min-height:54px; }
}

/* Keep the title banner only once at the top of the page. */
.title-hero {
  background:#080a10;
  overflow:visible;
}
.title-hero .banner-bg,
.title-hero .banner-vignette {
  top:0;
  right:0;
  bottom:auto;
  left:0;
  height:min(590px, 72vh);
}
.title-hero .banner-bg {
  background-position:center top;
  background-size:cover;
  background-repeat:no-repeat;
}
.title-hero .banner-vignette {
  background:
    linear-gradient(180deg,rgba(6,8,12,.18),rgba(6,8,12,.36) 48%,#080a10 100%),
    linear-gradient(90deg,rgba(6,8,12,.76),rgba(6,8,12,.16) 58%,rgba(6,8,12,.28));
}
@media (max-width:720px) {
  .title-hero .banner-bg,
  .title-hero .banner-vignette {
    height:470px;
  }
}

/* Seamless banner fade: the image ends first, the dark veil continues below it. */
.title-hero {
  --title-banner-height: min(720px, 86vh);
  --title-fade-tail: 180px;
  background:#080a10;
}
.title-hero .banner-bg {
  height:var(--title-banner-height);
  -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 58%,rgba(0,0,0,.94) 68%,rgba(0,0,0,.56) 82%,transparent 100%);
  mask-image:linear-gradient(to bottom,#000 0%,#000 58%,rgba(0,0,0,.94) 68%,rgba(0,0,0,.56) 82%,transparent 100%);
}
.title-hero .banner-vignette {
  height:calc(var(--title-banner-height) + var(--title-fade-tail));
  background:
    linear-gradient(180deg,
      rgba(6,8,12,.16) 0%,
      rgba(6,8,12,.28) 42%,
      rgba(8,10,16,.58) 64%,
      rgba(8,10,16,.9) 77%,
      #080a10 88%,
      #080a10 100%),
    linear-gradient(90deg,rgba(6,8,12,.76),rgba(6,8,12,.16) 58%,rgba(6,8,12,.28));
  pointer-events:none;
}
@media (max-width:720px) {
  .title-hero {
    --title-banner-height: 540px;
    --title-fade-tail: 150px;
  }
}

/* Add-title and media picker */
.add-title-chip { color:#dff3ff; background:rgba(112,201,255,.08); border:1px solid rgba(112,201,255,.14); }
.add-title-chip:hover { background:rgba(112,201,255,.14); color:#fff; }
body.modal-open { overflow:hidden; }
.modal-shell { position:fixed; inset:0; z-index:200; display:grid; place-items:center; padding:24px; }
.modal-shell.hidden { display:none; }
.modal-backdrop { position:absolute; inset:0; background:rgba(3,5,10,.72); backdrop-filter:blur(14px); animation:modalFade .2s ease both; }
.modal-card { position:relative; z-index:1; width:min(920px,100%); max-height:min(88vh,920px); overflow:auto; border:1px solid rgba(255,255,255,.12); border-radius:26px; background:linear-gradient(180deg,rgba(19,23,35,.98),rgba(10,12,19,.985)); box-shadow:0 40px 120px rgba(0,0,0,.58); padding:26px; animation:modalUp .32s cubic-bezier(.2,.8,.2,1) both; }
.modal-x { position:absolute; top:16px; right:16px; width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.04); color:#cbd1dc; cursor:pointer; font-size:22px; line-height:1; }
.modal-x:hover { background:rgba(255,255,255,.08); }
.modal-head { padding-right:48px; }
.modal-head .section-kicker { margin-bottom:8px; }
.modal-head h2 { margin:0; font:800 30px/1.15 Manrope,sans-serif; letter-spacing:-.035em; }
.modal-head p { margin:10px 0 0; color:var(--muted); line-height:1.65; font-size:13px; }
@keyframes modalFade { from{opacity:0} to{opacity:1} }
@keyframes modalUp { from{opacity:0;transform:translateY(18px) scale(.985)} to{opacity:1;transform:none} }

.discover-search { display:grid; grid-template-columns:1fr auto; gap:10px; margin-top:22px; }
.discover-search input,
.discover-add-form input,
.discover-add-form select,
.manual-media-form input { width:100%; min-height:50px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); color:var(--text); outline:0; padding:0 14px; }
.discover-search input:focus,
.discover-add-form input:focus,
.discover-add-form select:focus,
.manual-media-form input:focus { border-color:rgba(112,201,255,.36); box-shadow:0 0 0 4px rgba(112,201,255,.06); }
.discover-add-form select { appearance:none; }
.primary-btn,.ghost-btn { min-height:46px; padding:0 16px; border-radius:13px; cursor:pointer; transition:.2s; font-weight:700; }
.primary-btn { border:1px solid rgba(112,201,255,.28); background:linear-gradient(180deg,rgba(112,201,255,.18),rgba(112,201,255,.1)); color:#eaf8ff; }
.primary-btn:hover:not(:disabled) { transform:translateY(-1px); border-color:rgba(112,201,255,.46); background:rgba(112,201,255,.18); }
.primary-btn:disabled,.ghost-btn:disabled { opacity:.45; cursor:not-allowed; }
.ghost-btn { border:1px solid var(--line); background:rgba(255,255,255,.03); color:#cdd3de; }
.ghost-btn:hover:not(:disabled) { background:rgba(255,255,255,.07); }
.discover-status { min-height:22px; margin:14px 0 2px; color:var(--muted); font-size:12px; }
.discover-status.loading { color:#bce8ff; }
.discover-status.ok { color:var(--success); }
.discover-status.error { color:#ff9aaa; }
.discover-results { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.discover-result { width:100%; display:grid; grid-template-columns:64px 1fr auto; gap:13px; align-items:center; min-width:0; padding:8px; text-align:left; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); cursor:pointer; transition:.2s; }
.discover-result:hover { transform:translateY(-2px); background:rgba(112,201,255,.07); border-color:rgba(112,201,255,.22); }
.discover-result img { width:64px; height:88px; object-fit:cover; border-radius:11px; background:#171b27; }
.discover-result-copy { min-width:0; display:flex; flex-direction:column; gap:6px; }
.discover-result-copy strong { font:700 14px/1.35 Manrope,sans-serif; }
.discover-result-copy small { color:var(--muted); font-size:11px; line-height:1.45; }
.discover-result-arrow { color:var(--accent-2); font-size:20px; }
.discover-loading,.discover-empty { grid-column:1/-1; min-height:120px; border:1px dashed var(--line); border-radius:16px; display:flex; align-items:center; justify-content:center; gap:12px; color:var(--muted); }
.discover-selected { display:grid; grid-template-columns:116px 1fr; gap:18px; align-items:center; margin-top:16px; padding:14px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.025); }
.discover-selected img { width:116px; aspect-ratio:.7; object-fit:cover; border-radius:14px; }
.discover-selected h3 { margin:0; font:800 24px/1.15 Manrope,sans-serif; }
.discover-selected p { margin:8px 0 0; color:var(--muted); }
.discover-add-form { display:grid; gap:14px; margin-top:16px; }
.discover-add-form label,.manual-media-form label { display:grid; gap:7px; color:#aab2c0; font-size:11px; font-weight:700; letter-spacing:.04em; }
.discover-form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.discover-check { grid-template-columns:auto 1fr !important; align-items:center; gap:9px !important; cursor:pointer; color:#cbd2dc !important; }
.discover-check input { width:17px; height:17px; min-height:0; accent-color:#70c9ff; }
.discover-add-actions { display:flex; justify-content:space-between; gap:10px; margin-top:4px; }

.media-repair-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.media-repair-btn { min-height:42px; border:1px dashed rgba(112,201,255,.3); border-radius:12px; background:rgba(112,201,255,.06); color:#bce8ff; cursor:pointer; font-size:11px; font-weight:800; transition:.2s; }
.media-repair-btn:hover { background:rgba(112,201,255,.12); border-style:solid; transform:translateY(-1px); }
.title-poster-wrap { position:relative; }
.poster-add-overlay { position:absolute; left:50%; bottom:18px; transform:translateX(-50%); min-height:40px; padding:0 15px; white-space:nowrap; border:1px solid rgba(112,201,255,.32); border-radius:12px; background:rgba(8,10,16,.78); backdrop-filter:blur(12px); color:#dff5ff; cursor:pointer; font-weight:800; }
.poster-missing .title-poster { filter:saturate(.45) brightness(.72); }
.media-picker { width:min(980px,100%); }
.media-picker-results { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.media-candidate { display:grid; grid-template-columns:86px 1fr auto; gap:12px; align-items:center; min-width:0; padding:9px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); }
.media-candidate img { width:86px; height:72px; object-fit:cover; border-radius:11px; background:#171b27; }
.media-candidate div { min-width:0; display:grid; gap:5px; }
.media-candidate strong { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.media-candidate small { color:var(--muted); font-size:11px; }
.media-candidate.unavailable { opacity:.62; }
.manual-media-form { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end; margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.manual-media-form label { min-width:0; }

@media (max-width:720px) {
  .modal-shell { padding:12px; align-items:end; }
  .modal-card { width:100%; max-height:92vh; border-radius:22px 22px 14px 14px; padding:20px; }
  .discover-search { grid-template-columns:1fr; }
  .discover-results,.media-picker-results { grid-template-columns:1fr; }
  .discover-form-row { grid-template-columns:1fr; }
  .discover-selected { grid-template-columns:84px 1fr; }
  .discover-selected img { width:84px; }
  .discover-selected h3 { font-size:19px; }
  .discover-add-actions { flex-direction:column-reverse; }
  .discover-add-actions button { width:100%; }
  .manual-media-form { grid-template-columns:1fr; }
  .media-repair-actions { grid-template-columns:1fr; }
  .media-candidate { grid-template-columns:72px 1fr; }
  .media-candidate img { width:72px; height:64px; }
  .media-candidate button { grid-column:1/-1; }
}

.hidden { display:none !important; }


/* v4.4: Google source discovery */
.discover-results { display:block; }
.google-source-groups { display:grid; gap:10px; margin-top:12px; max-height:54vh; overflow:auto; padding-right:4px; scrollbar-width:thin; }
.google-source-group { border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.022); overflow:hidden; transition:.25s ease; }
.google-source-group.open { background:rgba(255,255,255,.035); border-color:rgba(112,201,255,.18); }
.google-source-trigger { width:100%; min-height:64px; border:0; background:transparent; color:var(--text); padding:11px 14px; display:flex; align-items:center; justify-content:space-between; gap:14px; text-align:left; cursor:pointer; }
.google-source-trigger > span:first-child { min-width:0; display:flex; flex-direction:column; gap:4px; }
.google-source-trigger strong { font:800 15px Manrope,sans-serif; }
.google-source-trigger small { max-width:620px; color:var(--muted); font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.google-source-meta { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.google-source-meta b { min-width:30px; height:26px; padding:0 8px; display:grid; place-items:center; border-radius:9px; color:#dff3ff; background:rgba(112,201,255,.11); border:1px solid rgba(112,201,255,.16); font-size:11px; }
.google-source-meta i { font-style:normal; color:var(--accent-2); font-size:18px; transition:transform .25s ease; }
.google-source-group.open .google-source-meta i { transform:rotate(180deg); }
.google-source-body { display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.google-source-group.open .google-source-body { grid-template-rows:1fr; opacity:1; }
.google-source-list { min-height:0; overflow:hidden; display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0 10px; }
.google-source-group.open .google-source-list { padding:0 10px 10px; }
.source-discover-result { opacity:0; transform:translateY(-5px); transition:.22s ease; }
.google-source-group.open .source-discover-result { opacity:1; transform:none; }
.source-discover-result.processing { border-color:rgba(112,201,255,.42); box-shadow:0 0 0 3px rgba(112,201,255,.08); }
.source-discover-result:disabled { cursor:default; }
.source-discover-result small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; }
.source-search-error,.source-search-empty { grid-column:1/-1; padding:14px; border:1px dashed var(--line); border-radius:13px; color:var(--muted); font-size:12px; }
.source-search-error { color:#ff9aaa; border-color:rgba(255,126,145,.2); }
@media (max-width:720px) {
  .google-source-groups { max-height:58vh; }
  .google-source-list { grid-template-columns:1fr; }
  .google-source-trigger small { max-width:64vw; }
}


/* Google Programmable Search bridge (v4.5) */
.google-cse-host {
  position: fixed !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 2px !important;
  height: 2px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}
.google-cx-setup {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(112,201,255,.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(112,201,255,.045), rgba(255,255,255,.018));
  display: grid;
  gap: 14px;
}
.google-cx-setup h3 { margin: 5px 0 7px; font: 800 18px/1.2 Manrope,sans-serif; }
.google-cx-setup p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.google-cx-field { display: grid; gap: 7px; }
.google-cx-field > span { color: #aeb7c7; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.google-cx-field input {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(6,8,13,.55);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}
.google-cx-field input:focus { border-color: rgba(112,201,255,.45); box-shadow: 0 0 0 3px rgba(112,201,255,.08); }
.google-cx-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.secondary-btn {
  min-height:46px;
  padding:0 16px;
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.035);
  color:#dce2ec;
  font-weight:700;
  transition:.2s;
}
.secondary-btn:hover { border-color:rgba(112,201,255,.28); background:rgba(112,201,255,.07); }
.google-cx-hint b { color:#d9e7f6; }

/* v4.9 streaming full-search progress */
.discover-progress {
  margin: 10px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgba(112,201,255,.16);
  border-radius: 14px;
  background: rgba(112,201,255,.045);
}
.discover-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.075);
}
.discover-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #70c9ff, #9b8cff);
  box-shadow: 0 0 18px rgba(112,201,255,.35);
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}
.discover-progress-meta {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 11px;
  line-height: 1.45;
}
.discover-progress-meta strong { color: #dff4ff; font-size: 12px; }
.discover-progress-meta span { color: var(--muted); }

/* v5.0 UI glow, filter panel, source marks */
:root {
  --status-none: #d5dceb;
  --row-red: rgba(182, 52, 68, .20);
  --row-red-border: rgba(255, 106, 124, .34);
  --row-green: rgba(48, 128, 91, .20);
  --row-green-border: rgba(113, 230, 172, .30);
}

.select-wrap label {
  display:flex;
  align-items:center;
  gap:7px;
}
.select-wrap label::before,
.filter-toggle-icon {
  content:'';
  width:14px;
  height:14px;
  display:inline-block;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  flex:0 0 14px;
}
.status-select label::before {
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMTIgMTIiPgoJPHBhdGggZD0iTTAgMGgxMnYxMkgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTEuOTc0IDYuNjU5YS41LjUgMCAwIDEtLjk0OC0uMzE3Yy0uMDEuMDMgMC0uMDAxIDAtLjAwMWEyIDIgMCAwIDEgLjA2Mi0uMTYyYy4wNC0uMDk1LjA5OS0uMjI2LjE4LS4zODFjLjE2NS0uMzEuNDIyLS43MjMuODAxLTEuMTM2QzIuODM0IDMuODI3IDQuMDg3IDMgNiAzczMuMTY2LjgyNyAzLjkzMSAxLjY2MmE1LjUgNS41IDAgMCAxIC45OCAxLjUxN2wuMDQ2LjExM2MuMDAzLjAwOC4wMTMuMDYuMDIzLjExTDExIDYuNXMuMDg0LjMzMy0uMzQyLjQ3NGEuNS41IDAgMCAxLS42MzItLjMxNH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hMS41IDEuNSAwIDAgMSAzIDBtMC0xMWExLjUgMS41IDAgMSAxLTMgMGExLjUgMS41IDAgMCAxIDMgMG0tMTEgMTFhMS41IDEuNSAwIDEgMS0zIDBhMS41IDEuNSAwIDAgMSAzIDAiIC8+Cjwvc3ZnPgo=");
}
.sort-select label::before {
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTExLjI5IDEwLjIxYTEgMSAwIDAgMCAxLjQyIDBsMy0zYTEgMSAwIDEgMC0xLjQyLTEuNDJMMTIgOC4wOWwtMi4yOS0yLjNhMSAxIDAgMCAwLTEuNDIgMS40MlptMS40MiA0LjU4YTEgMSAwIDAgMC0xLjQyIDBsLTMgM2ExIDEgMCAwIDAgMS40MiAxLjQybDIuMjktMi4zbDIuMjkgMi4zYTEgMSAwIDAgMCAxLjQyIDBhMSAxIDAgMCAwIDAtMS40MloiIC8+Cjwvc3ZnPgo=");
}
.filter-toggle-icon {
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTE0LjAzNyAyMC45MzdhMSAxIDAgMCAxLS41MTgtLjE0NWwtMy4zMzQtMmEyLjU1IDIuNTUgMCAwIDEtMS4yMzMtMi4xNzZ2LTQuNTI1YTEuNTMgMS41MyAwIDAgMC0uMjg0LS44OTFMNC4wMTMgNC42NThhMS4wMSAxLjAxIDAgMCAxIC44MjItMS42aDE0LjMzYTEuMDA5IDEuMDA5IDAgMCAxIC44MjIgMS42TDE1LjMzMiAxMS4yYTEuNTMgMS41MyAwIDAgMC0uMjg1Ljg5MXY3LjgzNGExLjAxMyAxLjAxMyAwIDAgMS0xLjAxIDEuMDEyTTQuODM1IDQuMDYzbDQuNjQ3IDYuNTU3YTIuNSAyLjUgMCAwIDEgLjQ3IDEuNDcxdjQuNTI0YTEuNTQgMS41NCAwIDAgMCAuNzQ3IDEuMzE4bDMuMzM0IDJsLjAxNC03Ljg0M2EyLjUgMi41IDAgMCAxIC40NzEtMS40NzFsNC42NTQtNi41NDJaIiAvPgo8L3N2Zz4K");
}

.filters-row {
  grid-template-columns:1fr 1fr 1.2fr auto auto;
  align-items:stretch;
}
.filter-menu {
  position:relative;
}
.filter-toggle {
  width:100%;
  min-width:140px;
  height:58px;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.028);
  color:var(--text);
  cursor:pointer;
  transition:.2s ease;
}
.filter-toggle strong {
  min-width:20px;
  height:20px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:var(--muted);
  font-size:11px;
}
.filter-toggle:hover,
.filter-menu.open .filter-toggle,
.filter-toggle.has-active {
  border-color:rgba(112,201,255,.28);
  background:rgba(112,201,255,.08);
}
.filter-toggle.has-active strong,
.filter-menu.open .filter-toggle strong { color:var(--accent-2); }
.filter-panel {
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:35;
  width:min(320px, calc(100vw - 40px));
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:18px;
  background:rgba(10,12,19,.96);
  box-shadow:0 20px 60px rgba(0,0,0,.42);
  backdrop-filter:blur(20px);
}
.filter-field {
  display:grid;
  gap:6px;
  color:#aab2c0;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
}
.filter-field select {
  width:100%;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  color:var(--text);
  outline:0;
}
.filter-check {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  color:#dce2ec;
  cursor:pointer;
}
.filter-check input {
  width:16px;
  height:16px;
  accent-color:#70c9ff;
}
.ghost-filter-btn {
  min-height:42px;
  border:1px dashed rgba(255,255,255,.14);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  color:#d5dceb;
  cursor:pointer;
  font-weight:700;
}
.ghost-filter-btn:hover { background:rgba(255,255,255,.07); }

.anime-card,
.title-poster-wrap {
  --status-accent: var(--status-none);
  --status-accent-glow: rgba(213,220,235,.22);
  --status-accent-border: rgba(213,220,235,.4);
}
.anime-card {
  border-color:rgba(255,255,255,.04);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 0 1px var(--status-accent-border),
    0 0 22px var(--status-accent-glow),
    0 18px 48px rgba(0,0,0,.20);
}
.anime-card:hover {
  border-color:var(--status-accent-border);
  background:rgba(255,255,255,.04);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.05),
    0 0 0 1px var(--status-accent-border),
    0 0 34px var(--status-accent-glow),
    0 0 72px var(--status-accent-glow),
    0 22px 64px rgba(0,0,0,.26);
}
.catalog-list .anime-card {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 0 1px var(--status-accent-border),
    0 0 18px var(--status-accent-glow),
    0 14px 36px rgba(0,0,0,.18);
}
.status-default {
  color:#edf1f7;
  background:rgba(213,220,235,.12);
}
.title-poster-wrap {
  border-color:var(--status-accent-border);
  box-shadow:
    0 0 0 1px var(--status-accent-border),
    0 0 26px var(--status-accent-glow),
    0 30px 80px rgba(0,0,0,.45);
}
.title-poster-wrap:hover {
  box-shadow:
    0 0 0 1px var(--status-accent-border),
    0 0 40px var(--status-accent-glow),
    0 0 84px var(--status-accent-glow),
    0 34px 96px rgba(0,0,0,.5);
}

.source-group-head {
  display:flex;
  align-items:center;
  gap:10px;
  padding-right:14px;
}
.source-group-trigger {
  flex:1 1 auto;
  min-width:0;
}
.source-group-tools {
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.source-mark-btn {
  width:34px;
  height:34px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  background:rgba(255,255,255,.045);
  color:#c8d0dc;
  cursor:pointer;
  transition:.2s ease;
}
.source-mark-btn svg { width:16px; height:16px; }
.source-mark-btn:hover { transform:translateY(-1px); }
.source-mark-red:hover,
.source-mark-red.active {
  color:#ff97a7;
  border-color:rgba(255, 116, 136, .34);
  background:rgba(255, 96, 120, .14);
}
.source-mark-green:hover,
.source-mark-green.active {
  color:#8cf0bd;
  border-color:rgba(126, 232, 181, .34);
  background:rgba(73, 205, 145, .15);
}
.source-group.marked-red {
  background:linear-gradient(180deg, var(--row-red), rgba(255,255,255,.02));
  border-color:var(--row-red-border);
  box-shadow:0 0 0 1px rgba(255,110,126,.08) inset, 0 0 28px rgba(255,96,120,.08);
}
.source-group.marked-green {
  background:linear-gradient(180deg, var(--row-green), rgba(255,255,255,.02));
  border-color:var(--row-green-border);
  box-shadow:0 0 0 1px rgba(113,230,172,.08) inset, 0 0 28px rgba(73,205,145,.08);
}
.source-group.marked-red .source-btn {
  border-color:rgba(255,106,124,.16);
  background:rgba(255,255,255,.035);
}
.source-group.marked-green .source-btn {
  border-color:rgba(113,230,172,.16);
  background:rgba(255,255,255,.035);
}
.source-group.marked-red.open {
  background:linear-gradient(180deg, rgba(182,52,68,.28), rgba(255,255,255,.04));
}
.source-group.marked-green.open {
  background:linear-gradient(180deg, rgba(48,128,91,.28), rgba(255,255,255,.04));
}

@media (max-width:1000px) {
  .filters-row {
    grid-template-columns:1fr 1fr auto auto;
  }
  .sort-select { grid-column:1 / -1; }
  .view-switch,
  .filter-menu { position:static; transform:none; justify-self:end; }
  .controls-panel { padding-bottom:16px; }
}
@media (max-width:720px) {
  .filters-row {
    grid-template-columns:1fr;
  }
  .filter-toggle,
  .view-switch { width:100%; }
  .filter-panel {
    left:0;
    right:0;
    width:auto;
  }
  .source-group-head {
    align-items:flex-start;
    padding:0 12px 0 0;
  }
  .source-group-tools {
    padding-top:10px;
  }
}

/* v5.2 — unified custom dropdowns + icon-only toolbar */
.controls-panel {
  position:relative;
  z-index:120;
  overflow:visible;
}
.controls-panel .search-wrap { position:relative; z-index:1; }
.compact-controls-row {
  position:relative;
  z-index:130;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin-top:10px;
}
.catalog-head,
.catalog-grid,
.catalog-list,
.empty-state { position:relative; z-index:1; }

.custom-native-select {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
  clip:rect(0 0 0 0) !important;
  clip-path:inset(50%) !important;
}
.custom-select {
  position:relative;
  flex:0 0 auto;
}
.custom-select.open { z-index:1000; }

.icon-control {
  position:relative;
  width:58px;
  min-width:58px;
  height:58px;
  padding:0;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.028);
  color:#cfd6e2;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.icon-control:hover,
.custom-select.open > .icon-control,
.filter-menu.open > .icon-control,
.icon-control.active {
  color:#eef8ff;
  border-color:rgba(112,201,255,.28);
  background:rgba(112,201,255,.08);
  box-shadow:0 0 0 1px rgba(112,201,255,.04) inset;
}
.icon-control:hover { transform:translateY(-1px); }
.icon-control[data-tooltip]::after {
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 9px);
  transform:translate(-50%,6px);
  width:max-content;
  max-width:300px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  background:rgba(10,12,19,.97);
  color:#e7ebf2;
  box-shadow:0 12px 36px rgba(0,0,0,.36);
  backdrop-filter:blur(16px);
  font-size:11px;
  font-weight:700;
  line-height:1.3;
  white-space:nowrap;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:.16s ease;
  z-index:4000;
}
.icon-control[data-tooltip]:hover::after,
.icon-control[data-tooltip]:focus-visible::after {
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0);
}
.custom-select.open > .icon-control::after,
.filter-menu.open > .icon-control::after { display:none; }

.control-symbol,
.filter-toggle-icon {
  width:20px;
  height:20px;
  display:block;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  filter:brightness(1.12);
}
.control-symbol-group {
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjAgMjAiPgoJPHBhdGggZD0iTTAgMGgyMHYyMEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTcgNC41cTAgLjI1Ny0uMDUuNUgxMGExIDEgMCAwIDEgMSAxdjJoLTFhMiAyIDAgMCAwLTIgMnYxSDZhMSAxIDAgMCAxLTEtMVY2Ljk1YTIuNSAyLjUgMCAwIDEtMSAwVjEwYTIgMiAwIDAgMCAyIDJoMnYyYTIgMiAwIDAgMCAyIDJoMy4wNWEyLjUgMi41IDAgMCAxIDAtMUgxMGExIDEgMCAwIDEtMS0xdi0yaDFhMiAyIDAgMCAwIDItMlY5aDJhMSAxIDAgMCAxIDEgMXYzLjA1YTIuNSAyLjUgMCAwIDEgMSAwVjEwYTIgMiAwIDAgMC0yLTJoLTJWNmEyIDIgMCAwIDAtMi0ySDYuOTVxLjA1LjI0My4wNS41TTExIDl2MWExIDEgM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I1bC0uMDMuMDc4ek02IDVhMiAyIDAgMSAwIDAgNGEyIDIgMCAwIDAgMC00TTUgN2ExIDEgMCAxIDEgMiAwYTEgMSAwIDAgMS0yIDAiIC8+Cjwvc3ZnPgo=");
}
.control-symbol-sort {
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTExLjI5IDEwLjIxYTEgMSAwIDAgMCAxLjQyIDBsMy0zYTEgMSAwIDEgMC0xLjQyLTEuNDJMMTIgOC4wOWwtMi4yOS0yLjNhMSAxIDAgMCAwLTEuNDIgMS40MlptMS40MiA0LjU4YTEgMSAwIDAgMC0xLjQyIDBsLTMgM2ExIDEgMCAwIDAgMS40MiAxLjQybDIuMjktMi4zbDIuMjkgMi4zYTEgMSAwIDAgMCAxLjQyIDBhMSAxIDAgMCAwIDAtMS40MloiIC8+Cjwvc3ZnPgo=");
}

.custom-select-menu,
.control-dropdown-menu,
.filter-panel {
  border:1px solid rgba(255,255,255,.1);
  background:linear-gradient(180deg,rgba(18,21,31,.985),rgba(9,11,17,.985));
  box-shadow:0 24px 70px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter:blur(22px);
}
.custom-select-menu {
  position:absolute;
  top:calc(100% + 9px);
  right:0;
  z-index:2200;
  width:260px;
  max-height:330px;
  overflow:auto;
  padding:9px;
  border-radius:16px;
  scrollbar-width:thin;
  scrollbar-color:rgba(112,201,255,.3) transparent;
}
.custom-select-option {
  width:100%;
  min-height:42px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:#d9dee8;
  text-align:left;
  cursor:pointer;
  transition:.16s ease;
}
.custom-select-option + .custom-select-option { margin-top:3px; }
.custom-select-option i {
  opacity:0;
  font-style:normal;
  color:#86d8ff;
}
.custom-select-option:hover {
  background:rgba(255,255,255,.055);
  border-color:rgba(255,255,255,.07);
  color:#fff;
}
.custom-select-option.selected {
  background:rgba(112,201,255,.09);
  border-color:rgba(112,201,255,.18);
  color:#f5fbff;
}
.custom-select-option.selected i { opacity:1; }

.filter-toggle {
  min-width:58px;
  width:58px;
  padding:0;
  display:grid;
  place-items:center;
}
.filter-toggle strong {
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border:1px solid rgba(112,201,255,.18);
  background:#172431;
  color:#70c9ff;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
}
.filter-panel {
  top:calc(100% + 9px);
  right:0;
  z-index:2100;
  width:320px;
  border-radius:18px;
}
.filter-field { position:relative; }
.nested-select { width:100%; }
.nested-select-trigger {
  width:100%;
  min-height:44px;
  padding:0 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  background:rgba(255,255,255,.032);
  color:#e4e8f0;
  cursor:pointer;
  transition:.18s ease;
}
.nested-select-trigger:hover,
.nested-select.open .nested-select-trigger {
  background:rgba(112,201,255,.07);
  border-color:rgba(112,201,255,.2);
}
.nested-select-caret { color:#8dd8ff; transition:transform .2s ease; }
.nested-select.open .nested-select-caret { transform:rotate(180deg); }
.nested-select .custom-select-menu {
  top:calc(100% + 7px);
  left:0;
  right:auto;
  width:100%;
  z-index:2300;
}

.view-switch {
  padding:5px;
  height:58px;
  position:relative;
  z-index:130;
}
.view-switch .icon-control {
  width:46px;
  min-width:46px;
  height:46px;
  border:0;
  border-radius:10px;
  background:transparent;
}
.view-switch .icon-control.active,
.view-switch .icon-control:hover { background:rgba(255,255,255,.075); }

/* Keep detail-page dropdowns in exactly the same visual family. */
.control-dropdown-menu {
  z-index:2200;
  padding:9px;
  border-radius:16px;
}
.dropdown-option {
  min-height:42px;
  border-color:transparent;
  background:transparent;
  border-radius:11px;
}
.dropdown-option:hover,
.dropdown-option.selected {
  background:rgba(112,201,255,.09);
  border-color:rgba(112,201,255,.18);
}
.title-control-stack,
.control-dropdown { position:relative; z-index:80; }
.control-dropdown.open { z-index:2300; }

@media (max-width:720px) {
  .compact-controls-row {
    display:flex;
    justify-content:flex-end;
    flex-wrap:wrap;
  }
  .custom-select-menu { right:0; width:min(280px,calc(100vw - 36px)); }
  .filter-panel { width:min(320px,calc(100vw - 36px)); }
  .icon-control[data-tooltip]::after { display:none; }
}

/* Make supplied monochrome SVGs inherit the toolbar color correctly. */
.control-symbol,
.filter-toggle-icon {
  background-image:none !important;
  background-color:currentColor;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-position:center;
  -webkit-mask-size:contain;
  mask-size:contain;
}
.control-symbol-group {
  -webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjAgMjAiPgoJPHBhdGggZD0iTTAgMGgyMHYyMEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTcgNC41cTAgLjI1Ny0uMDUuNUgxMGExIDEgMCAwIDEgMSAxdjJoLTFhMiAyIDAgMCAwLTIgMnYxSDZhMSAxIDAgMCAxLTEtMVY2Ljk1YTIuNSAyLjUgMCAwIDEtMSAwVjEwYTIgMiAwIDAgMCAyIDJoMnYyYTIgMiAwIDAgMCAyIDJoMy4wNWEyLjUgMi41IDAgMCAxIDAtMUgxMGExIDEgMCAwIDEtMS0xdi0yaDFhMiAyIDAgMCAwIDItMlY5aDJhMSAxIDAgMCAxIDEgMXYzLjA1YTIu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TFMNC4wMTMgNC42NThhMS4wMSAxLjAxIDAgMCAxIC44MjItMS42aDE0LjMzYTEuMDA5IDEuMDA5IDAgMCAxIC44MjIgMS42TDE1LjMzMiAxMS4yYTEuNTMgMS41MyAwIDAgMC0uMjg1Ljg5MXY3LjgzNGExLjAxMyAxLjAxMyAwIDAgMS0xLjAxIDEuMDEyTTQuODM1IDQuMDYzbDQuNjQ3IDYuNTU3YTIuNSAyLjUgMCAwIDEgLjQ3IDEuNDcxdjQuNTI0YTEuNTQgMS41NCAwIDAgMCAuNzQ3IDEuMzE4bDMuMzM0IDJsLjAxNC03Ljg0M2EyLjUgMi41IDAgMCAxIC40NzEtMS40NzFsNC42NTQtNi41NDJaIiAvPgo8L3N2Zz4K");
}

/* v5.3 merge flow */
.merge-pick-mode .page-shell { padding-top:150px; }
.merge-selection-dock {
  position:fixed;
  z-index:160;
  top:84px;
  left:18px;
  width:min(360px, calc(100vw - 36px));
  padding:14px;
  border:1px solid var(--status-accent-border, rgba(255,255,255,.12));
  border-radius:20px;
  background:rgba(10,12,19,.9);
  box-shadow:0 0 28px var(--status-accent-glow, rgba(112,201,255,.16)), 0 20px 60px rgba(0,0,0,.45);
  backdrop-filter:blur(22px);
}
.merge-selection-back {
  position:absolute;
  top:10px;
  right:10px;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  background:rgba(255,255,255,.04);
  color:#d9dfeb;
  font-size:20px;
}
.merge-selection-kicker {
  display:block;
  margin:0 38px 10px 0;
  color:var(--accent-2);
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
}
.merge-selection-card { display:grid; grid-template-columns:64px 1fr; gap:12px; align-items:center; }
.merge-selection-card img { width:64px; height:86px; object-fit:cover; border-radius:12px; }
.merge-selection-card strong { display:block; font:800 14px/1.3 Manrope,sans-serif; }
.merge-selection-card small { display:block; margin-top:7px; color:var(--muted); font-size:11px; }
.merge-selection-dock p { margin:11px 2px 0; color:#9ba5b6; font-size:11px; line-height:1.55; }
.merge-candidate-card::after {
  content:'ОБ’ЄДНАТИ';
  position:absolute;
  z-index:5;
  inset:auto 14px 14px;
  min-height:34px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,178,75,.22);
  border-radius:11px;
  background:rgba(255,158,48,.12);
  color:#ffd198;
  opacity:0;
  transform:translateY(6px);
  transition:.2s ease;
  font-size:10px;
  font-weight:900;
  letter-spacing:.1em;
  pointer-events:none;
}
.merge-candidate-card:hover::after { opacity:1; transform:none; }

.title-record-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin:16px 0 0;
}
.record-action-btn {
  min-height:46px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:13px;
  background:rgba(255,255,255,.035);
  color:#dce2ec;
  cursor:pointer;
  font-weight:800;
  transition:.2s ease;
}
.record-action-btn b { font-size:18px; font-weight:500; }
.merge-record-btn:hover { border-color:rgba(112,201,255,.34); background:rgba(112,201,255,.1); color:#eaf8ff; }
.delete-record-btn:hover { border-color:rgba(255,105,126,.34); background:rgba(255,85,110,.1); color:#ffb0bc; }
.delete-title-modal { width:min(520px, 100%); }
.danger-kicker { color:#ff8798 !important; }
.delete-title-preview {
  display:grid;
  grid-template-columns:72px 1fr;
  gap:14px;
  align-items:center;
  margin-top:20px;
  padding:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.025);
}
.delete-title-preview img { width:72px; height:98px; object-fit:cover; border-radius:11px; }
.delete-title-preview strong { display:block; font:800 16px/1.35 Manrope,sans-serif; }
.delete-title-preview small { display:block; margin-top:7px; color:var(--muted); font-size:11px; }
.delete-title-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.danger-btn {
  min-height:46px;
  padding:0 18px;
  border:1px solid rgba(255,105,126,.36);
  border-radius:13px;
  background:rgba(255,76,105,.13);
  color:#ffb4bf;
  cursor:pointer;
  font-weight:800;
}
.danger-btn:hover:not(:disabled) { background:rgba(255,76,105,.2); }
.danger-btn:disabled { opacity:.55; cursor:wait; }

.merge-page {
  min-height:100vh;
  background:#080a10;
  color:var(--text);
}
.merge-background {
  position:fixed;
  inset:0;
  z-index:-2;
  background:
    radial-gradient(circle at 14% 25%, rgba(255,180,63,.25), transparent 34%),
    radial-gradient(circle at 86% 25%, rgba(79,125,255,.27), transparent 35%),
    linear-gradient(90deg, rgba(126,80,21,.25) 0%, #090b12 46%, #090b12 54%, rgba(32,66,138,.27) 100%);
}
.merge-background::after {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(238,156,52,.08), transparent 43%, transparent 57%, rgba(94,111,255,.09));
}
.merge-root { width:min(1500px, calc(100% - 40px)); margin:0 auto; padding:18px 0 60px; }
.merge-loading { min-height:100vh; display:grid; place-items:center; align-content:center; gap:16px; text-align:center; color:var(--muted); }
.merge-loading h1 { color:var(--text); }
.merge-loading a { color:var(--accent-2); }
.merge-topbar {
  position:sticky;
  z-index:80;
  top:12px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:20px;
  min-height:72px;
  padding:10px 12px 10px 18px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;
  background:rgba(9,11,18,.78);
  box-shadow:0 18px 55px rgba(0,0,0,.28);
  backdrop-filter:blur(22px);
}
.merge-back { justify-self:start; color:#c8d0dc; font-size:12px; font-weight:800; }
.merge-top-copy { text-align:center; display:grid; gap:3px; }
.merge-top-copy span { color:#9da7bb; font-size:9px; font-weight:800; letter-spacing:.14em; }
.merge-top-copy strong { font:800 16px Manrope,sans-serif; }
.merge-submit {
  justify-self:end;
  min-height:48px;
  padding:0 20px;
  border:1px solid rgba(157,132,255,.4);
  border-radius:14px;
  background:linear-gradient(135deg, rgba(255,157,47,.17), rgba(135,111,255,.18));
  color:#fff;
  cursor:pointer;
  font-weight:900;
  box-shadow:0 0 28px rgba(139,111,255,.1);
  transition:.2s ease;
}
.merge-submit:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 0 36px rgba(139,111,255,.18); }
.merge-submit:disabled { opacity:.55; cursor:wait; }
.merge-hero-head {
  display:grid;
  grid-template-columns:minmax(0,1fr) 190px minmax(0,1fr);
  gap:18px;
  align-items:stretch;
  margin:30px 0 24px;
}
.merge-source-summary {
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:16px;
  align-items:center;
  min-height:132px;
  padding:14px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(14,17,25,.68);
  backdrop-filter:blur(16px);
}
.merge-source-summary.merge-side-left { border-color:rgba(255,165,55,.28); box-shadow:inset 0 0 0 1px rgba(255,166,59,.04); }
.merge-source-summary.merge-side-right { border-color:rgba(137,113,255,.3); box-shadow:inset 0 0 0 1px rgba(137,113,255,.05); }
.merge-source-summary img { width:92px; height:124px; object-fit:cover; border-radius:14px; }
.merge-source-summary span { color:#8d97aa; font-size:9px; font-weight:900; letter-spacing:.11em; }
.merge-source-summary h2 { margin:7px 0 8px; font:800 21px/1.25 Manrope,sans-serif; }
.merge-source-summary p { margin:0; color:#a2abbb; font-size:12px; }
.merge-center-label { display:grid; place-items:center; align-content:center; text-align:center; gap:7px; }
.merge-center-label span { color:#99a3b5; font-size:9px; font-weight:900; letter-spacing:.13em; }
.merge-center-label b { font-size:30px; color:#d5dbea; }
.merge-center-label small { max-width:150px; color:#737e91; font-size:10px; line-height:1.45; }
.merge-fields { display:grid; gap:14px; }
.merge-field-row {
  position:relative;
  padding:16px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:24px;
  background:rgba(10,12,19,.5);
  backdrop-filter:blur(13px);
}
.merge-field-heading { margin-bottom:10px; text-align:center; }
.merge-field-heading span { color:#8994a6; font-size:10px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.merge-field-grid { display:grid; grid-template-columns:minmax(0,1fr) 94px minmax(0,1fr); gap:14px; align-items:stretch; }
.merge-data-card {
  min-width:0;
  min-height:108px;
  padding:14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(136,145,160,.07);
  color:#dbe1eb;
  text-align:left;
  cursor:pointer;
  transition:.24s ease;
  overflow:hidden;
}
.merge-data-card.unselected { filter:saturate(.28); opacity:.58; background:rgba(126,133,145,.07); }
.merge-data-card.selected.merge-side-left {
  filter:none;
  opacity:1;
  border-color:rgba(255,171,62,.48);
  background:linear-gradient(135deg, rgba(255,155,41,.18), rgba(255,184,82,.07));
  box-shadow:0 0 30px rgba(255,149,35,.11), inset 0 0 0 1px rgba(255,186,95,.04);
}
.merge-data-card.selected.merge-side-right {
  filter:none;
  opacity:1;
  border-color:rgba(150,126,255,.52);
  background:linear-gradient(135deg, rgba(119,95,255,.18), rgba(160,125,255,.08));
  box-shadow:0 0 30px rgba(125,98,255,.12), inset 0 0 0 1px rgba(158,139,255,.05);
}
.merge-data-card.unavailable { cursor:not-allowed; opacity:.32; filter:grayscale(1); }
.merge-title-value { display:grid; gap:8px; }
.merge-title-value strong { font:800 20px/1.3 Manrope,sans-serif; }
.merge-title-value small { color:#a3adbd; font-size:12px; }
.merge-poster-value { width:116px; height:164px; object-fit:cover; border-radius:13px; display:block; margin:auto; }
.merge-banner-value { width:100%; height:150px; object-fit:cover; border-radius:13px; display:block; }
.merge-description-value { margin:0; color:#c4ccd8; line-height:1.65; font-size:13px; }
.merge-empty-value { min-height:100px; display:grid; place-items:center; color:#778194; font-size:12px; }
.merge-marks-value { display:flex; flex-wrap:wrap; gap:8px; }
.merge-marks-value span { padding:8px 10px; border:1px solid rgba(255,255,255,.09); border-radius:10px; background:rgba(255,255,255,.035); color:#aab4c4; font-size:11px; font-weight:700; }
.merge-marks-value span.on { color:#ecf3ff; border-color:rgba(255,255,255,.16); }
.merge-field-switch { display:grid; place-items:center; }
.merge-choice-switch { width:64px; height:36px; padding:0; border:0; background:transparent; cursor:pointer; }
.merge-choice-switch:disabled { cursor:not-allowed; }
.merge-choice-track {
  position:relative;
  width:64px;
  height:34px;
  display:block;
  border:2px solid rgba(236,240,248,.8);
  border-radius:999px;
  background:rgba(8,10,16,.8);
  box-shadow:0 6px 18px rgba(0,0,0,.28);
}
.merge-choice-track i {
  position:absolute;
  top:4px;
  left:4px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#f4f6fb;
  box-shadow:0 2px 8px rgba(0,0,0,.3);
  transition:left .22s cubic-bezier(.2,.8,.2,1), background .22s ease, box-shadow .22s ease;
}
.merge-choice-switch.right .merge-choice-track { border-color:rgba(150,126,255,.78); background:rgba(111,88,255,.16); }
.merge-choice-switch.right .merge-choice-track i { left:36px; background:#a68cff; box-shadow:0 0 18px rgba(142,112,255,.52); }
.merge-choice-switch.left .merge-choice-track { border-color:rgba(255,177,73,.78); background:rgba(255,151,34,.14); }
.merge-choice-switch.left .merge-choice-track i { left:4px; background:#ffad4f; box-shadow:0 0 18px rgba(255,151,34,.48); }
.merge-choice-switch.locked { opacity:.7; }
.merge-links-row {
  display:grid;
  grid-template-columns:220px 1fr;
  gap:24px;
  align-items:center;
  padding:20px;
  border:1px dashed rgba(255,255,255,.11);
  border-radius:20px;
  background:rgba(255,255,255,.02);
}
.merge-links-row div { display:grid; gap:4px; }
.merge-links-row span { color:#8d97aa; font-size:9px; font-weight:900; letter-spacing:.13em; }
.merge-links-row strong { font:800 19px Manrope,sans-serif; }
.merge-links-row p { margin:0; color:#9ba5b6; font-size:12px; line-height:1.6; }
.merge-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:24px;
  padding:18px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  background:rgba(10,12,19,.65);
}
.merge-footer div { display:grid; gap:4px; }
.merge-footer strong { font:800 14px Manrope,sans-serif; }
.merge-footer small { color:#858fa1; font-size:11px; }
.merge-submit-bottom { min-width:160px; }

@media (max-width:900px) {
  .merge-root { width:min(100% - 20px, 1500px); }
  .merge-topbar { grid-template-columns:1fr auto; }
  .merge-top-copy { display:none; }
  .merge-hero-head { grid-template-columns:1fr; }
  .merge-center-label { order:2; min-height:80px; }
  .merge-source-summary.merge-side-left { order:1; }
  .merge-source-summary.merge-side-right { order:3; }
  .merge-field-grid { grid-template-columns:1fr 72px 1fr; gap:8px; }
  .merge-poster-value { width:90px; height:128px; }
}
@media (max-width:620px) {
  .merge-pick-mode .page-shell { padding-top:210px; }
  .merge-selection-dock { width:calc(100vw - 24px); left:12px; top:76px; }
  .title-record-actions { flex-direction:column; }
  .record-action-btn { width:100%; }
  .merge-topbar { top:6px; padding:8px; }
  .merge-back { font-size:0; }
  .merge-back::after { content:'←'; font-size:20px; }
  .merge-submit { min-height:44px; padding:0 14px; }
  .merge-field-row { padding:10px; }
  .merge-field-grid { grid-template-columns:1fr; }
  .merge-field-switch { min-height:52px; }
  .merge-data-card.merge-side-left { order:1; }
  .merge-field-switch { order:2; }
  .merge-data-card.merge-side-right { order:3; }
  .merge-links-row { grid-template-columns:1fr; gap:10px; }
  .merge-footer { flex-direction:column; align-items:stretch; }
  .merge-submit-bottom { width:100%; }
}

/* v5.5 group picker + full editor */
.group-dropdown-menu {
  width:min(360px, calc(100vw - 36px));
  max-height:440px;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0, 1fr) auto;
}
.dropdown-search-wrap {
  display:grid;
  grid-template-columns:22px minmax(0, 1fr);
  align-items:center;
  gap:8px;
  padding:8px 10px;
  margin-bottom:8px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  background:rgba(255,255,255,.035);
  color:#7fcfff;
}
.dropdown-search-wrap input {
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:#eef3fb;
  font:700 12px Inter,sans-serif;
}
.dropdown-search-wrap input::placeholder { color:#6f7889; }
.dropdown-options-scroll {
  min-height:0;
  max-height:300px;
  overflow:auto;
  display:grid;
  gap:7px;
  padding-right:3px;
  scrollbar-width:thin;
  scrollbar-color:rgba(112,201,255,.25) transparent;
}
.dropdown-options-scroll::-webkit-scrollbar { width:7px; }
.dropdown-options-scroll::-webkit-scrollbar-thumb { background:rgba(112,201,255,.22); border-radius:999px; }
.sticky-add-group { margin-top:8px; }

.edit-record-btn:hover {
  border-color:rgba(154,127,255,.38);
  background:rgba(139,111,255,.11);
  color:#ddd4ff;
}
.edit-title-shell {
  z-index:1000;
  overflow:auto;
  align-items:flex-start;
  padding:18px;
}
.edit-title-modal {
  position:relative;
  z-index:2;
  width:min(1480px, 100%);
  margin:0 auto;
  padding:20px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:24px;
  background:rgba(9,12,20,.97);
  box-shadow:0 30px 100px rgba(0,0,0,.6);
  backdrop-filter:blur(24px);
}
.edit-title-header,
.edit-title-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.edit-title-header {
  position:sticky;
  top:0;
  z-index:20;
  padding:8px 4px 16px;
  background:linear-gradient(180deg, rgba(9,12,20,.99) 75%, rgba(9,12,20,0));
}
.edit-title-header h2 { margin:5px 0 4px; font:800 26px/1.2 Manrope,sans-serif; }
.edit-title-header p,
.edit-links-head p { margin:0; color:#8f99aa; font-size:12px; line-height:1.6; }
.edit-header-actions { display:flex; gap:10px; flex:0 0 auto; }
.edit-title-columns {
  display:grid;
  grid-template-columns:minmax(0, 1.04fr) minmax(320px, .96fr);
  gap:16px;
  margin-top:14px;
}
.edit-input-pane,
.edit-existing-pane,
.edit-links-panel {
  border:1px solid rgba(255,255,255,.09);
  border-radius:20px;
  background:rgba(255,255,255,.025);
}
.edit-input-pane,
.edit-existing-pane { padding:16px; }
.edit-input-pane h3,
.edit-existing-pane h3,
.edit-links-panel h3 { margin:0 0 14px; font:800 17px Manrope,sans-serif; }
.edit-field,
.edit-media-field {
  display:grid;
  gap:7px;
  margin-bottom:12px;
}
.edit-field > span,
.edit-media-field > span {
  color:#8fa0b5;
  font-size:10px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.edit-field input,
.edit-field textarea,
.edit-media-field input[type=url] {
  width:100%;
  border:1px solid rgba(255,255,255,.1);
  border-radius:12px;
  outline:0;
  background:rgba(255,255,255,.035);
  color:#eef3fb;
  padding:11px 12px;
  font:600 13px/1.45 Inter,sans-serif;
  resize:vertical;
}
.edit-field input:focus,
.edit-field textarea:focus,
.edit-media-field input[type=url]:focus {
  border-color:rgba(112,201,255,.34);
  box-shadow:0 0 0 3px rgba(112,201,255,.06);
}
.edit-two-cols { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.edit-suggestion-row {
  display:flex;
  gap:7px;
  overflow:auto;
  padding:0 0 10px;
  scrollbar-width:thin;
}
.edit-suggestion-row button {
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,.09);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:#c9d1de;
  padding:7px 9px;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}
.edit-suggestion-row button:hover { border-color:rgba(112,201,255,.28); color:#e9f8ff; }
.edit-group-suggestions { max-height:78px; flex-wrap:wrap; overflow:auto; }
.edit-media-field {
  padding:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}
.edit-file-button {
  min-height:40px;
  display:grid;
  place-items:center;
  border:1px dashed rgba(112,201,255,.28);
  border-radius:11px;
  background:rgba(112,201,255,.055);
  color:#d9f4ff;
  font-weight:800;
  cursor:pointer;
}
.edit-file-button input { display:none; }
.edit-media-field small { color:#7f899b; font-size:10px; }
.edit-flags { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.edit-flags label {
  min-height:44px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  color:#d7deea;
  cursor:pointer;
}
.edit-flags input { width:16px; height:16px; accent-color:#9d87ff; }
#editExistingCards { display:grid; gap:10px; }
.edit-existing-card {
  display:grid;
  gap:7px;
  padding:12px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:13px;
  background:rgba(255,255,255,.022);
}
.edit-existing-card > span {
  color:#7f899c;
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.edit-existing-card strong { color:#dce3ef; font-size:12px; line-height:1.55; white-space:pre-wrap; }
.edit-existing-image { display:block; width:100%; object-fit:cover; border-radius:11px; }
.edit-existing-image.poster { width:130px; height:182px; }
.edit-existing-image.banner { height:150px; }
.edit-links-panel { margin-top:16px; padding:16px; }
.edit-links-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.edit-links-head p { max-width:620px; text-align:right; }
.edit-catalogs-root { gap:10px; }
.edit-catalog-domain { color:#6f7b90; font-size:9px; font-weight:800; }
.edit-link-list { display:grid; gap:8px; }
.edit-link-input-row {
  display:grid;
  grid-template-columns:minmax(140px,.7fr) minmax(220px,1.3fr) 36px;
  gap:8px;
  align-items:center;
}
.edit-link-input-row input {
  min-height:40px;
  width:100%;
  border:1px solid rgba(255,255,255,.09);
  border-radius:10px;
  outline:0;
  background:rgba(7,10,16,.55);
  color:#e6ecf5;
  padding:0 10px;
  font:600 11px Inter,sans-serif;
}
.edit-link-input-row input:focus { border-color:rgba(112,201,255,.3); }
.edit-link-remove {
  width:36px;
  height:36px;
  border:1px solid rgba(255,107,128,.18);
  border-radius:10px;
  background:rgba(255,89,113,.06);
  color:#ff9bad;
  cursor:pointer;
}
.edit-add-link-btn {
  min-height:40px;
  border:1px dashed rgba(112,201,255,.23);
  border-radius:10px;
  background:rgba(112,201,255,.055);
  color:#d9f5ff;
  font-weight:800;
  cursor:pointer;
}
.edit-title-footer { margin-top:16px; justify-content:flex-end; }

@media (max-width:960px) {
  .edit-title-columns { grid-template-columns:1fr; }
  .edit-existing-pane { order:2; }
}
@media (max-width:680px) {
  .edit-title-shell { padding:7px; }
  .edit-title-modal { padding:12px; border-radius:18px; }
  .edit-title-header { align-items:flex-start; }
  .edit-title-header p { display:none; }
  .edit-header-actions .ghost-btn { display:none; }
  .edit-two-cols,
  .edit-flags { grid-template-columns:1fr; }
  .edit-links-head { display:grid; }
  .edit-links-head p { text-align:left; }
  .edit-link-input-row { grid-template-columns:1fr 36px; }
  .edit-link-input-row [data-edit-link-url] { grid-column:1 / -1; grid-row:2; }
  .edit-link-remove { grid-column:2; grid-row:1; }
}

/* v5.8 — Notion group colors, settings, viewed counter */
.card-group-tag,
.colored-group-pill,
.group-setting-preview,
.edit-group-suggestion {
  color:var(--group-accent,#d8dce6)!important;
  background:var(--group-soft,rgba(255,255,255,.07))!important;
  border:1px solid var(--group-border,rgba(255,255,255,.1))!important;
}
.card-group-tag {
  display:inline-flex; align-items:center; min-height:23px; padding:0 8px; border-radius:8px;
  font-size:10px; font-weight:750; white-space:nowrap;
}
.custom-option-label { display:flex; align-items:center; gap:9px; min-width:0; }
.group-color-dot { width:9px; height:9px; flex:0 0 9px; border-radius:999px; background:var(--dot,#a8b0bf); box-shadow:0 0 0 3px color-mix(in srgb,var(--dot,#a8b0bf) 16%,transparent); }

.settings-modal-card { width:min(980px,100%); }
.settings-layout { display:grid; grid-template-columns:180px minmax(0,1fr); gap:18px; margin-top:20px; }
.settings-nav { padding:8px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); align-self:start; }
.settings-nav-item { width:100%; min-height:44px; border:0; border-radius:11px; background:rgba(112,201,255,.09); color:#e8f6ff; font-weight:800; text-align:left; padding:0 13px; }
.settings-content { min-width:0; }
.settings-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:10px; }
.settings-section-head h3 { margin:4px 0 0; font-size:20px; }
.settings-groups-list { display:grid; gap:10px; max-height:58vh; overflow:auto; padding:3px 5px 3px 1px; }
.settings-groups-list::-webkit-scrollbar { width:7px; }
.settings-groups-list::-webkit-scrollbar-thumb { background:rgba(112,201,255,.2); border-radius:999px; }
.group-setting-row { display:grid; grid-template-columns:minmax(220px,1fr) minmax(290px,1.2fr) auto; align-items:center; gap:12px; padding:12px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); }
.group-setting-main { display:grid; grid-template-columns:auto minmax(120px,1fr); align-items:center; gap:10px; }
.group-setting-preview { display:inline-flex; align-items:center; justify-content:center; min-height:32px; padding:0 10px; border-radius:9px; font-size:11px; font-weight:800; white-space:nowrap; }
.group-setting-name { min-width:0; height:40px; padding:0 11px; border:1px solid var(--line); border-radius:10px; background:#131823; color:var(--text); outline:0; font-weight:700; }
.group-setting-name:focus { border-color:rgba(112,201,255,.35); box-shadow:0 0 0 3px rgba(112,201,255,.07); }
.group-color-palette { display:flex; flex-wrap:wrap; gap:7px; }
.group-color-swatch { width:27px; height:27px; border-radius:8px; border:1px solid rgba(255,255,255,.12); background:var(--swatch); cursor:pointer; box-shadow:inset 0 0 0 2px rgba(0,0,0,.1); transition:.18s ease; }
.group-color-swatch:hover { transform:translateY(-2px) scale(1.06); }
.group-color-swatch.selected { box-shadow:0 0 0 2px #0b0e15,0 0 0 4px var(--swatch),0 0 18px color-mix(in srgb,var(--swatch) 35%,transparent); }
.group-setting-save { min-height:40px; padding:0 13px; border:1px solid rgba(112,201,255,.3); border-radius:10px; background:rgba(112,201,255,.09); color:#e2f6ff; font-weight:800; cursor:pointer; }
.group-setting-save:hover { background:rgba(112,201,255,.14); }
.group-setting-save:disabled { opacity:.5; cursor:wait; }
.settings-empty { padding:30px; border:1px dashed var(--line); border-radius:16px; color:var(--muted); text-align:center; }

.viewed-action { grid-column:1 / -1; position:relative; justify-content:center!important; border-color:rgba(216,181,91,.22); background:rgba(216,181,91,.06); }
.viewed-action b { color:#f0ca70; font-size:13px; }
.viewed-action strong { min-width:28px; height:24px; display:grid; place-items:center; padding:0 7px; border-radius:8px; background:rgba(216,181,91,.12); color:#f4d789; font-size:11px; }
.viewed-action:hover { border-color:rgba(216,181,91,.42)!important; color:#f4d789!important; background:rgba(216,181,91,.1)!important; }
.edit-group-suggestion { border-radius:9px!important; }

@media (max-width:820px) {
  .settings-layout { grid-template-columns:1fr; }
  .settings-nav { display:none; }
  .group-setting-row { grid-template-columns:1fr; }
  .group-setting-main { grid-template-columns:1fr; }
  .group-setting-preview { justify-self:start; }
  .group-setting-save { width:100%; }
}

/* v6.0 season / episode controls */
.watch-progress-group {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  width:100%;
}
.watch-progress-field {
  display:grid;
  gap:7px;
}
.watch-progress-label {
  color:#8fa1b8;
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.watch-number-field {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 42px;
  align-items:center;
  min-height:42px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.11);
  border-radius:13px;
  background:rgba(15,19,29,.76);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.watch-number-field button {
  align-self:stretch;
  border:0;
  background:rgba(255,255,255,.025);
  color:#9ca8ba;
  font:800 22px/1 system-ui;
  cursor:pointer;
  transition:.18s ease;
}
.watch-number-field button:first-child { border-right:1px solid rgba(255,255,255,.08); }
.watch-number-field button:last-child { border-left:1px solid rgba(255,255,255,.08); }
.watch-number-field button:hover {
  color:#fff;
  background:rgba(112,201,255,.09);
}
.watch-number-field button:disabled { opacity:.45; cursor:default; }
.watch-number-field input {
  width:100%;
  min-width:0;
  height:40px;
  border:0;
  outline:0;
  background:transparent;
  color:#f3f6fb;
  text-align:center;
  font:800 14px/1 system-ui;
  appearance:textfield;
  -moz-appearance:textfield;
}
.watch-number-field input::-webkit-inner-spin-button,
.watch-number-field input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.watch-number-field:focus-within {
  border-color:rgba(112,201,255,.34);
  box-shadow:0 0 0 3px rgba(112,201,255,.07);
}
@media (max-width:720px) {
  .watch-progress-group { grid-template-columns:1fr; }
}

/* v6.2 — tags, notes and Added status */
.status-added {
  color:#d2d2cf;
  background:rgba(155,154,151,.16);
  border-color:rgba(155,154,151,.22);
}

.card-tags {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:7px 0 2px;
  max-height:44px;
  overflow:hidden;
}
.card-tags span {
  display:inline-flex;
  align-items:center;
  min-height:21px;
  padding:2px 7px;
  border:1px solid rgba(112,201,255,.13);
  border-radius:999px;
  background:rgba(112,201,255,.055);
  color:#8fcfea;
  font-size:9px;
  font-weight:750;
  line-height:1.1;
}
.catalog-list .card-tags { margin:5px 0 0; }

.title-info { min-width:0; }
.title-tags {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  margin:14px 0 18px;
}
.title-tag {
  min-height:29px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid rgba(112,201,255,.17);
  border-radius:999px;
  background:rgba(112,201,255,.06);
  color:#a7ddf6;
  font:750 11px/1 Inter,sans-serif;
  cursor:pointer;
  transition:.18s ease;
}
.title-tag span { color:#68778b; font-size:13px; }
.title-tag:hover {
  border-color:rgba(112,201,255,.34);
  background:rgba(112,201,255,.11);
  color:#d8f3ff;
}
.title-tag:hover span { color:#ff9cac; }
.title-tag-add {
  border-style:dashed;
  color:#9aa5b5;
  background:rgba(255,255,255,.025);
}

.title-text-grid {
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);
  gap:18px;
  align-items:stretch;
}
.title-description-card,
.title-notes-card {
  min-width:0;
  border:1px solid rgba(255,255,255,.085);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.018));
  box-shadow:0 18px 50px rgba(0,0,0,.16);
}
.title-description-card { padding:17px 18px 19px; }
.title-description-card .title-description {
  max-width:none;
  margin:10px 0 0;
  color:#c0c5d0;
  font-size:14px;
  line-height:1.78;
  white-space:pre-wrap;
}
.title-notes-card {
  padding:15px;
  display:grid;
  grid-template-rows:auto minmax(170px,1fr);
  gap:12px;
  background:linear-gradient(180deg,rgba(155,140,255,.055),rgba(255,255,255,.018));
  border-color:rgba(155,140,255,.14);
}
.title-notes-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.title-notes-head h3 {
  margin:5px 0 0;
  font:800 15px/1.1 Manrope,sans-serif;
}
.notes-save-btn {
  min-height:34px;
  padding:0 11px;
  border:1px solid rgba(112,201,255,.22);
  border-radius:10px;
  background:rgba(112,201,255,.08);
  color:#d9f4ff;
  font:800 11px Inter,sans-serif;
  cursor:pointer;
}
.notes-save-btn:hover { background:rgba(112,201,255,.14); }
.notes-save-btn:disabled { opacity:.55; cursor:default; }
.title-notes-input {
  width:100%;
  min-height:170px;
  resize:vertical;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  padding:11px 12px;
  outline:0;
  background:rgba(4,7,12,.36);
  color:#d9dee8;
  font:600 12px/1.65 Inter,sans-serif;
  box-sizing:border-box;
}
.title-notes-input::placeholder { color:#636d7c; }
.title-notes-input:focus {
  border-color:rgba(155,140,255,.3);
  box-shadow:0 0 0 3px rgba(155,140,255,.055);
}

@media (max-width:1150px) {
  .title-text-grid { grid-template-columns:1fr; }
  .title-notes-card { grid-template-rows:auto auto; }
}
@media (max-width:720px) {
  .title-tags { margin:10px 0 14px; gap:5px; }
  .title-tag { min-height:27px; padding:0 8px; font-size:10px; }
  .title-description-card,.title-notes-card { border-radius:15px; padding:13px; }
  .title-description-card .title-description { font-size:13px; }
}

/* v6.3 — tag suggestions + status/group rules */
.settings-nav { display:grid; gap:6px; }
.settings-nav-item { background:transparent; color:#9ca9bb; cursor:pointer; transition:.18s ease; }
.settings-nav-item:hover { background:rgba(255,255,255,.045); color:#e8f6ff; }
.settings-nav-item.active { background:rgba(112,201,255,.09); color:#e8f6ff; }
.settings-section-head p { margin:7px 0 0; max-width:720px; color:var(--muted); font-size:12px; line-height:1.5; }
.group-setting-main { grid-template-columns:auto auto minmax(120px,1fr); }
.group-star-toggle {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.11);
  border-radius:10px;
  background:rgba(255,255,255,.035);
  color:#7f8999;
  cursor:pointer;
  font-size:19px;
  transition:.18s ease;
}
.group-star-toggle:hover { color:#f1d57d; border-color:rgba(241,213,125,.28); background:rgba(241,213,125,.07); }
.group-star-toggle.active { color:#ffd66b; border-color:rgba(255,214,107,.4); background:rgba(255,214,107,.11); box-shadow:0 0 18px rgba(255,214,107,.12); }
.settings-statuses-list { display:grid; gap:12px; max-height:58vh; overflow:auto; padding:3px 5px 3px 1px; }
.settings-statuses-list::-webkit-scrollbar { width:7px; }
.settings-statuses-list::-webkit-scrollbar-thumb { background:rgba(112,201,255,.2); border-radius:999px; }
.status-setting-row { padding:14px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); }
.status-setting-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; }
.status-setting-head > div { display:flex; align-items:center; gap:10px; min-width:0; flex-wrap:wrap; }
.status-setting-head small { color:var(--muted); font-size:11px; }
.status-group-options { display:flex; flex-wrap:wrap; gap:8px; }
.status-group-option {
  min-height:36px;
  padding:0 10px;
  border:1px solid var(--group-border,var(--line));
  border-radius:10px;
  background:rgba(255,255,255,.025);
  color:#b5c0cf;
  cursor:pointer;
  font:750 11px/1.2 Inter,system-ui,sans-serif;
  transition:.18s ease;
}
.status-group-option:hover { color:var(--group-accent,#fff); background:var(--group-soft,rgba(255,255,255,.05)); transform:translateY(-1px); }
.status-group-option.selected { color:var(--group-accent,#fff); background:var(--group-soft,rgba(255,255,255,.07)); border-color:var(--group-accent,#8aa); box-shadow:0 0 0 1px color-mix(in srgb,var(--group-accent,#fff) 18%,transparent),0 0 18px color-mix(in srgb,var(--group-accent,#fff) 10%,transparent); }
.status-group-option.selected::before { content:'✓'; margin-right:6px; font-size:10px; }
.settings-empty-inline { color:var(--muted); font-size:12px; }

.title-tag-entry { position:relative; display:grid; grid-template-columns:minmax(170px,280px) auto; gap:7px; align-items:center; }
.title-tag-entry.hidden { display:none; }
.title-tag-entry input,
.edit-tag-field input {
  min-height:34px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:9px;
  background:#151a27;
  color:#edf3fb;
  outline:0;
  padding:0 10px;
  font:700 11px/1 Inter,system-ui,sans-serif;
}
.title-tag-entry input:focus,
.edit-tag-field input:focus { border-color:rgba(112,201,255,.4); box-shadow:0 0 0 3px rgba(112,201,255,.07); }
.title-tag-entry > button[data-tag-entry-save] {
  min-height:34px;
  border:1px solid rgba(112,201,255,.25);
  border-radius:9px;
  background:rgba(112,201,255,.08);
  color:#dff5ff;
  cursor:pointer;
  font-weight:800;
  padding:0 11px;
}
.tag-suggestion-popover {
  position:absolute;
  z-index:80;
  left:0;
  top:calc(100% + 6px);
  width:min(360px,80vw);
  max-height:190px;
  overflow:auto;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:9px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:12px;
  background:rgba(11,14,22,.98);
  box-shadow:0 18px 50px rgba(0,0,0,.42);
  backdrop-filter:blur(18px);
}
.tag-suggestion-popover.hidden { display:none; }
.tag-suggestion-popover button {
  min-height:30px;
  padding:0 9px;
  border:1px solid rgba(112,201,255,.16);
  border-radius:8px;
  background:rgba(112,201,255,.055);
  color:#c9eaff;
  cursor:pointer;
  font:750 10px/1 Inter,system-ui,sans-serif;
}
.tag-suggestion-popover button:hover { background:rgba(112,201,255,.12); border-color:rgba(112,201,255,.32); }
.edit-tag-field { position:relative; }
.edit-tag-field .tag-suggestion-popover { top:calc(100% + 4px); width:100%; box-sizing:border-box; }

@media (max-width:820px) {
  .settings-nav { display:grid; grid-template-columns:1fr 1fr; }
  .group-setting-main { grid-template-columns:auto 1fr; }
  .group-setting-preview { grid-column:2; justify-self:start; }
  .group-setting-name { grid-column:1 / -1; }
  .status-setting-head { align-items:flex-start; flex-direction:column; }
  .status-setting-head .group-setting-save { width:100%; }
  .title-tag-entry { grid-template-columns:1fr auto; width:100%; }
}


/* v7.2 — genre/theme taxonomy */
.taxonomy-control-glyph {
  width:22px; height:22px; display:grid; place-items:center;
  border:1px solid currentColor; border-radius:7px;
  color:currentColor; font-size:11px; font-weight:900; line-height:1;
  letter-spacing:-.04em; opacity:.92;
}
.title-taxonomy { display:grid; gap:8px; margin:12px 0 4px; }
.title-taxonomy:empty { display:none; }
.title-taxonomy-row { display:flex; align-items:flex-start; gap:10px; min-width:0; }
.title-taxonomy-label {
  flex:0 0 54px; padding-top:6px; color:#697587; font-size:9px; font-weight:850; letter-spacing:.12em;
}
.title-taxonomy-chips { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.title-taxonomy-chip {
  min-height:26px; padding:0 9px; display:inline-flex; align-items:center;
  border:1px solid rgba(255,255,255,.10); border-radius:999px;
  background:rgba(255,255,255,.035); color:#c8d0dc;
  font-size:10px; font-weight:750; line-height:1;
}
.title-taxonomy-genres .title-taxonomy-chip { border-color:rgba(126,232,181,.17); background:rgba(126,232,181,.055); color:#a9e3c8; }
.title-taxonomy-themes .title-taxonomy-chip { border-color:rgba(167,150,255,.18); background:rgba(167,150,255,.055); color:#c3b8ff; }
@media (max-width:720px) {
  .title-taxonomy { margin-top:9px; }
  .title-taxonomy-row { gap:7px; }
  .title-taxonomy-label { flex-basis:45px; font-size:8px; }
  .title-taxonomy-chip { min-height:24px; padding:0 8px; font-size:9px; }
}
