:root {
  color-scheme: dark;
  --bg: #08070c;
  --panel: #0f0e14;
  --panel-2: #15131c;
  --panel-3: #1b1824;
  --line: #2b2736;
  --line-soft: #211e2a;
  --text: #f6f5f8;
  --muted: #a4a0ae;
  --soft: #ccc9d2;
  --purple: #a84df0;
  --purple-2: #7f38db;
  --pink: #e547a8;
  --sidebar: 244px;
  --filter: 230px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 65% -20%, #21112f 0, transparent 31%), var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.appShell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; width: var(--sidebar); flex-direction: column; border-right: 1px solid var(--line-soft); background: rgba(12, 11, 17, .98); transition: width .22s ease, transform .25s ease; }
.sidebarHeader { display: flex; min-height: 66px; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.brand { position: relative; display: inline-flex; min-width: 0; flex: 1; align-items: center; }
.brandLogo { width: auto; height: 52px; max-width: 160px; object-fit: contain; object-position: left center; }
.iconButton, .topIcon, .filterButton { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #17151d; cursor: pointer; }
.sidebarToggle { margin-left: auto; font-size: 27px; }
.mobileClose, .mobileMenu { display: none; }
.sideNav { overflow-y: auto; padding: 10px 8px 16px; scrollbar-width: thin; scrollbar-color: #393344 transparent; }
.navSection { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.navSection:last-child { border-bottom: 0; }
.navHeading { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px 5px; color: #777280; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.navHeading b { color: #5d5965; font-size: 17px; }
.navItem { display: flex; min-height: 40px; align-items: center; gap: 11px; margin: 2px 0; padding: 8px 10px; border-radius: 9px; color: #bdb9c4; font-size: 14px; font-weight: 550; transition: .16s ease; }
.navItem:hover, .navItem.active { background: #211b2a; color: #fff; }
.navItem.active { box-shadow: inset 3px 0 var(--purple); }
.navIcon { display: inline-grid; width: 23px; flex: 0 0 23px; place-items: center; color: #b989e0; font-size: 18px; line-height: 1; }
.navItem em { margin-left: auto; padding: 2px 6px; border-radius: 999px; background: rgba(168,77,240,.16); color: #c58af2; font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.sidebarBottom { margin-top: auto; padding: 10px 10px 14px; border-top: 1px solid var(--line-soft); }
.sideSignIn { display: flex; width: 100%; min-height: 40px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 9px; background: #f2f0f5; color: #151219; font-weight: 800; cursor: pointer; }
.sidebarDetails { padding-top: 12px; }
.socials { display: flex; gap: 7px; margin-bottom: 10px; }
.socials a { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #9d98a5; font-size: 11px; font-weight: 800; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 11px; }
.legal a { color: #716d79; font-size: 10px; }
.storeBadge { width: 97px; margin-top: 12px; }
.version { margin: 8px 0 0; color: #5d5964; font-size: 9px; }

.pageColumn { min-width: 0; margin-left: var(--sidebar); transition: margin .22s ease; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: 66px; align-items: center; justify-content: flex-end; padding: 10px 22px; border-bottom: 1px solid rgba(43,39,54,.85); background: rgba(8,7,12,.88); backdrop-filter: blur(18px); }
.mobileBrand { display: none; }
.topActions { display: flex; align-items: center; gap: 9px; }
.premiumButton, .loginButton { min-height: 38px; padding: 0 15px; border: 1px solid #41394f; border-radius: 10px; background: #17141e; cursor: pointer; font-weight: 750; }
.premiumButton { border-color: #70429a; color: #d9a8ff; background: linear-gradient(135deg, rgba(126,54,190,.25), rgba(229,71,168,.12)); }
.loginButton { border: 0; background: #efedf2; color: #17131c; }
.topIcon { position: relative; color: #b9b5c0; font-size: 18px; }
.topIcon small { position: absolute; right: 2px; bottom: 1px; font-size: 7px; font-weight: 800; }

.mainContent { display: grid; grid-template-columns: var(--filter) minmax(0, 1fr); gap: 22px; width: 100%; padding: 20px 24px 0; }
.filters { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 100px); }
.filterPanel { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(17,15,23,.9); }
.filterPanelTitle { display: flex; min-height: 43px; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.filterPanelTitle span { color: #8c8595; }
.filterPanelTitle button { display: none; margin-left: auto; border: 0; background: transparent; font-size: 23px; }
.filterInner { padding: 10px; }
.miniSearch { display: flex; height: 36px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #302b39; border-radius: 8px; background: #0d0c11; color: #77717f; }
.miniSearch input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #ddd9e2; font-size: 12px; }
.tagList { overflow: auto; max-height: 410px; margin-top: 9px; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #3c3548 transparent; }
.filterCheck { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 8px; min-height: 31px; color: #b3afba; font-size: 12px; cursor: pointer; }
.filterCheck input { accent-color: var(--purple); }
.filterCheck small { color: #625d69; font-size: 10px; }
.collapsedFilter { display: flex; width: 100%; min-height: 43px; align-items: center; gap: 9px; margin-top: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(17,15,23,.9); color: #b8b4be; font-size: 12px; text-align: left; cursor: pointer; }
.collapsedFilter span { color: #77717f; font-size: 21px; }

.discovery { min-width: 0; }
.heroBanner { position: relative; overflow: hidden; aspect-ratio: 1440 / 225; min-height: 154px; border: 1px solid #31283b; border-radius: 13px; background: #120d19; }
.heroBanner img { width: 100%; height: 100%; object-fit: cover; }
.heroCta { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); min-width: 168px; min-height: 39px; padding: 0 16px; border: 0; border-radius: 9px; background: #fff; color: #17111d; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-weight: 850; cursor: pointer; }
.searchToolbar { display: grid; grid-template-columns: auto minmax(200px,1fr) auto 142px; gap: 10px; margin: 18px 0 10px; }
.filterButton { display: none; }
.searchBox { display: flex; min-width: 0; height: 42px; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #111016; color: #77717f; }
.searchBox:focus-within { border-color: #74409c; box-shadow: 0 0 0 3px rgba(168,77,240,.1); }
.searchBox input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #eeeaf1; font-size: 13px; }
.searchBox button { width: 25px; height: 25px; border: 0; border-radius: 50%; background: #2a2631; cursor: pointer; }
.switchLabel { display: flex; align-items: center; gap: 8px; color: #b9b5c0; font-size: 12px; font-weight: 700; }
.switch { position: relative; width: 42px; height: 24px; padding: 0; border: 1px solid #393441; border-radius: 999px; background: #24212a; cursor: pointer; transition: .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #9b96a1; transition: .2s; }
.switch[aria-checked="true"] { border-color: var(--purple); background: var(--purple-2); }
.switch[aria-checked="true"] span { left: 21px; background: white; }
.searchToolbar select { min-width: 0; height: 42px; padding: 0 33px 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #111016; color: #d4d0d8; font-size: 12px; }
.resultsMeta { display: flex; min-height: 32px; align-items: center; justify-content: space-between; color: #716c79; font-size: 11px; }
.resultsMeta button { border: 0; background: transparent; color: #bb7bea; font-size: 11px; cursor: pointer; }

.characterGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.characterCard { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #111016; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.characterCard:hover { transform: translateY(-3px); border-color: #5a3a70; box-shadow: 0 15px 34px rgba(0,0,0,.28); }
.portraitWrap { position: relative; }
.portraitLink { position: relative; display: block; overflow: hidden; aspect-ratio: 1; background: #1b1820; }
.portrait { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.characterCard:hover .portrait { transform: scale(1.025); }
.ageBadge { position: absolute; left: 8px; top: 8px; padding: 3px 6px; border: 1px solid rgba(255,255,255,.22); border-radius: 5px; background: rgba(9,7,12,.72); color: #fff; font-size: 9px; font-weight: 900; backdrop-filter: blur(8px); }
.favoriteButton { position: absolute; top: 7px; right: 7px; display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; background: rgba(8,7,12,.65); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.favoriteButton.active { color: #f05cae; }
.cardBody { padding: 10px 10px 11px; }
.cardTitleRow { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.cardTitleRow h3 { overflow: hidden; margin: 0; color: #f4f2f6; font-size: 15px; font-weight: 760; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.creator { display: block; overflow: hidden; margin-top: 2px; color: #6996d5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.description { display: -webkit-box; overflow: hidden; min-height: 31px; margin: 8px 0 8px; color: #b6b1bc; font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tagRow { display: flex; overflow: hidden; gap: 4px; min-height: 18px; }
.tagChip { flex: 0 0 auto; padding: 2px 5px; border: 0; border-radius: 4px; background: #28242e; color: #d4d0d8; font-size: 8px; line-height: 14px; }
.stats { display: flex; min-height: 22px; align-items: end; gap: 10px; color: #77727f; font-size: 9px; }
.stats span:first-child { margin-right: auto; }

.createPromo { position: relative; overflow: hidden; min-height: 180px; margin: 26px 0 18px; border: 1px solid #382c42; border-radius: 13px; background: #17101f; }
.createPromo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.createPromo > div { position: relative; z-index: 1; display: flex; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.createPromo h2 { margin: 0 0 7px; font-size: clamp(22px,3vw,34px); }
.createPromo p { margin: 0 0 16px; color: #c1bbc7; font-size: 13px; }
.createPromo button { min-height: 39px; padding: 0 17px; border: 0; border-radius: 9px; background: white; color: #17111c; font-weight: 850; cursor: pointer; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 25px 0 58px; }
.pagination button, .pagination span { display: grid; min-width: 34px; height: 34px; place-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #121017; color: #a7a2ad; font-size: 11px; cursor: pointer; }
.pagination button.active { border-color: var(--purple); background: var(--purple-2); color: #fff; }
.pagination button:disabled { opacity: .35; cursor: default; }
.emptyState { grid-column: 1 / -1; padding: 50px 20px; border: 1px dashed #342f3c; border-radius: 12px; color: #aaa5b0; text-align: center; }

.longread { max-width: 980px; margin: 0 auto 84px; color: #c9c9d0; font-size: 16px; line-height: 1.78; }
.longread h1 { margin: 0 0 24px; color: #f7f7f9; font-size: clamp(30px, 4vw, 48px); line-height: 1.13; letter-spacing: -.035em; }
.longread h2 { margin: 54px 0 18px; color: #f1f1f4; font-size: clamp(23px, 2.8vw, 32px); line-height: 1.22; letter-spacing: -.02em; }
.longread p { margin: 0 0 18px; }
.longread .articleMeta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: -10px 0 24px; color: #92919b; font-size: 13px; line-height: 1.5; }
.longreadIntro { color: #e3e3e8; font-size: 19px; line-height: 1.68; }
.longread strong { color: #f2f2f5; font-weight: 700; }
.longread ul { margin: 24px 0; padding-left: 24px; }
.longread li { margin-bottom: 10px; padding-left: 5px; }
.longread li::marker { color: #aa52ee; }

.siteFooter { border-top: 1px solid var(--line-soft); background: #0a090e; }
.footerMain { display: grid; grid-template-columns: minmax(220px,1fr) minmax(420px,1.4fr); gap: 48px; max-width: 1320px; margin: 0 auto; padding: 48px 30px 34px; }
.footerIdentity p { max-width: 320px; margin: 15px 0 0; color: #797580; font-size: 12px; }
.footerBrand { max-width: 180px; }
.footerLinks { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.footerLinks h3 { margin: 0 0 13px; color: #d9d5dd; font-size: 12px; }
.footerLinks a { display: block; margin: 8px 0; color: #77727e; font-size: 11px; }
.footerBottom { display: flex; justify-content: space-between; gap: 20px; max-width: 1320px; margin: 0 auto; padding: 17px 30px 25px; border-top: 1px solid var(--line-soft); color: #625e69; font-size: 10px; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modalBackdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.modalCard { position: relative; width: min(420px,100%); padding: 34px; border: 1px solid #3e3549; border-radius: 17px; background: #15121b; box-shadow: 0 30px 80px rgba(0,0,0,.6); text-align: center; }
.modalClose { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: #a49daa; font-size: 27px; cursor: pointer; }
.modalBrand { max-width: 170px; margin: 0 auto 22px; justify-content: center; }
.footerBrand .brandLogo, .modalBrand .brandLogo { height: 76px; object-position: center; }
.modalCard h2 { margin: 0 0 8px; font-size: 27px; }
.modalCard p { margin: 0 0 24px; color: #9993a1; font-size: 13px; line-height: 1.5; }
.modalAction, .modalSecondary { width: 100%; min-height: 45px; margin-top: 9px; border-radius: 10px; font-weight: 800; cursor: pointer; }
.modalAction { border: 0; background: white; color: #18121c; }
.modalSecondary { border: 1px solid #463b51; background: #211b29; color: white; }
.scrim { position: fixed; inset: 0; z-index: 40; border: 0; background: rgba(0,0,0,.62); }

body.sidebarCollapsed { --sidebar: 72px; }
body.sidebarCollapsed .brandLogo, body.sidebarCollapsed .navLabel, body.sidebarCollapsed .navHeading span, body.sidebarCollapsed .navHeading b, body.sidebarCollapsed .navItem em, body.sidebarCollapsed .sidebarDetails { display: none !important; }
body.sidebarCollapsed .sidebarHeader { justify-content: center; }
body.sidebarCollapsed .sidebarToggle { margin: 0; transform: rotate(180deg); }
body.sidebarCollapsed .navItem { justify-content: center; padding-inline: 5px; }
body.sidebarCollapsed .sideSignIn { padding: 0; }

@media (max-width: 1180px) {
  .characterGrid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mainContent { gap: 16px; padding-inline: 18px; }
  .longread { max-width: 760px; }
}

@media (max-width: 900px) {
  :root { --sidebar: 268px; }
  .sidebar { transform: translateX(-100%); width: var(--sidebar); box-shadow: 25px 0 60px rgba(0,0,0,.4); }
  body.navOpen .sidebar { transform: translateX(0); }
  .sidebarToggle { display: none; }
  .mobileClose, .mobileMenu { display: inline-grid; }
  .mobileClose { margin-left: auto; }
  .pageColumn { margin-left: 0; }
  .topbar { justify-content: space-between; padding-inline: 14px; }
  .mobileBrand { display: block; width: 145px; }
  .mobileBrand .brandLogo { width: auto; height: 46px; }
  .mainContent { display: block; padding: 14px 14px 0; }
  .filters { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(310px,88vw); max-height: none; padding: 12px; transform: translateX(-105%); background: #0c0a10; transition: transform .23s ease; }
  body.filtersOpen .filters { transform: translateX(0); }
  .filterPanelTitle button { display: block; }
  .filterPanel { max-height: calc(100vh - 24px); }
  .tagList { max-height: calc(100vh - 170px); }
  .collapsedFilter { display: none; }
  .filterButton { display: inline-grid; }
  .searchToolbar { grid-template-columns: auto minmax(0,1fr) auto 126px; }
  .footerMain { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { min-height: 58px; }
  .mobileBrand { width: 120px; }
  .mobileBrand .brandLogo { width: auto; height: 42px; }
  .premiumButton span, .loginButton span, .topActions .topIcon:nth-of-type(1) { display: none; }
  .premiumButton, .loginButton { width: 38px; padding: 0; }
  .topActions { gap: 6px; }
  .mainContent { padding: 10px 10px 0; }
  .heroBanner { min-height: 118px; border-radius: 10px; }
  .heroBanner img { object-position: center; }
  .heroCta { bottom: 9px; min-width: 138px; min-height: 34px; font-size: 11px; }
  .searchToolbar { grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; margin-top: 12px; }
  .searchToolbar select { grid-column: 1 / -1; width: 100%; }
  .switchLabel { font-size: 10px; }
  .characterGrid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .cardBody { padding: 8px; }
  .cardTitleRow h3 { font-size: 13px; }
  .description { min-height: 29px; font-size: 10px; }
  .tagChip { font-size: 7px; }
  .createPromo { min-height: 150px; margin-top: 18px; }
  .createPromo > div { min-height: 150px; padding: 22px 16px; }
  .createPromo h2 { font-size: 21px; }
  .pagination { margin-bottom: 44px; }
  .pagination button, .pagination span { min-width: 31px; height: 31px; padding-inline: 7px; }
  .longread { margin-bottom: 58px; font-size: 15px; line-height: 1.72; }
  .longread h1 { margin-bottom: 20px; font-size: 29px; }
  .longread h2 { margin-top: 42px; font-size: 23px; }
  .longreadIntro { font-size: 17px; }
  .footerMain { gap: 30px; padding: 38px 18px 27px; }
  .footerLinks { gap: 16px; }
  .footerBottom { padding-inline: 18px; }
  .modalCard { padding: 30px 22px 25px; }
}

@media (max-width: 390px) {
  .mobileBrand { width: 104px; }
  .mobileBrand .brandLogo { width: auto; height: 38px; }
  .topbar { padding-inline: 9px; }
  .characterGrid { gap: 7px; }
  .stats { gap: 5px; }
}
