:root {
  color-scheme: dark;
  --page: #101011;
  --sidebar: #151516;
  --tile: #1c1c1d;
  --hover: #2a2a2b;
  --ink: #fff;
  --muted: #a0a0a5;
  --accent: #9291ff;
  --line: #ffffff0d;
  --sidebar-width: 300px;
  --topbar-height: 56px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 170px; }
body { margin: 0; background: var(--page); color: var(--ink); }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; object-fit: cover; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus, textarea:focus, select:focus { outline: 1px solid var(--accent); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 4px; border-radius: 50%; flex: 0 0 auto; color: #b7b7bd; }
.icon-button:hover { color: #fff; background: #ffffff0d; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; background: var(--accent); color: #101011; padding: 8px 16px; z-index: 1000; }
.skip-link:focus { top: 8px; }

.wayfinder { width: var(--sidebar-width); position: fixed; top: 0; bottom: 0; left: 0; background: var(--sidebar); border-right: 1px solid var(--line); padding: 17px 16px 38px; z-index: 110; display: flex; flex-direction: column; transition: width 180ms ease, transform 180ms ease; overflow-x: hidden; overflow-y: auto; }
.wayfinder-top { min-height: 30px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; padding: 0 16px; }
.wordmark { flex-shrink: 0; }
.wordmark img { width: 118px; height: 24px; object-fit: contain; }
.fold-button { width: 24px; height: 24px; padding: 0; opacity: .7; }
.fold-button img { width: 24px; height: 24px; }
.fold-button:hover { opacity: 1; }
.primary-links { display: flex; flex-direction: column; gap: 6px; }
.nav-link { height: 47px; padding: 0 16px; display: flex; align-items: center; gap: 12px; border-radius: 24px; color: #ffffffb3; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-link > img { width: 20px; height: 20px; object-fit: contain; opacity: .7; flex: 0 0 auto; }
.nav-link:hover, .nav-link.selected { background: var(--tile); color: #fff; }
.nav-link:hover img, .nav-link.selected img { opacity: 1; }
.nav-discount { display: flex; gap: 4px; align-items: center; font-size: 12px; height: 18px; color: #d9c7ff; margin-left: auto; padding: 0 5px; background: url('icons/coin-discount.webp') center / 100% 100% no-repeat; }
.nav-discount small { font-size: 12px; }
.wayfinder-bottom { margin-top: auto; padding-top: 32px; }
.wayfinder-bottom img { margin: auto; width: 78px; height: 16px; object-fit: contain; opacity: .65; }
.workspace { margin-left: var(--sidebar-width); min-width: 0; transition: margin-left 180ms ease; }
.nav-shade, .mobile-menu { display: none; }
body.nav-compact { --sidebar-width: 80px; }
.nav-compact .wayfinder { padding-right: 16px; padding-left: 16px; }
.nav-compact .wayfinder-top { justify-content: center; padding: 0; }
.nav-compact .wordmark, .nav-compact .nav-link > span, .nav-compact .wayfinder-bottom { display: none; }
.nav-compact .fold-button { transform: rotate(180deg); }
.nav-compact .nav-link { padding: 0; width: 47px; justify-content: center; }

.topbar { height: var(--topbar-height); background: var(--page); border-bottom: 1px solid var(--line); padding: 0 24px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; position: sticky; top: 0; z-index: 100; }
.character-search { width: 100%; max-width: 480px; height: 32px; margin: 0 0 0 auto; padding: 0 12px; display: flex; align-items: center; gap: 6px; background: #ffffff1a; border: 1px solid transparent; border-radius: 18px; min-width: 120px; }
.character-search:focus-within { border-color: var(--accent); }
.character-search > .icon { width: 16px; height: 16px; color: #ffffff80; }
.character-search input { padding: 0; border: 0; background: none; color: #fff; width: 100%; height: 30px; min-width: 0; outline: 0; font-size: 14px; }
.character-search input::placeholder { color: #ffffff80; }
.character-search input::-webkit-search-cancel-button { display: none; }
.clear-search { width: 22px; height: 22px; padding: 2px; }
.clear-search .icon { width: 16px; height: 16px; }
.sale-banner { display: flex; align-items: center; justify-content: space-between; width: 254px; flex: 0 0 254px; height: 32px; background: url('icons/coupon-bg.webp') center / 100% 100% no-repeat; border-radius: 20px; padding: 0 10px 0 40px; position: relative; border: 1px solid #9a90ff60; }
.sale-banner > img { width: 42px; height: 40px; position: absolute; left: -1px; top: -4px; }
.sale-label { font-size: 12px; font-weight: 700; display: flex; align-items: baseline; white-space: nowrap; gap: 2px; }
.sale-label b { font-size: 20px; color: #ffe3ad; }
.sale-label strong { font-size: 14px; color: #ffe3ad; }
.sale-clock { display: flex; align-items: center; gap: 3px; color: #ffe3ad; font-size: 12px; }
.sale-clock > span { display: inline-flex; min-width: 20px; height: 22px; align-items: center; justify-content: center; border-radius: 4px; background: #0000004d; }
.sale-clock i { font-style: normal; }
.coin-balance { display: flex; align-items: center; justify-content: center; gap: 4px; height: 32px; min-width: 55px; padding: 0 10px 0 6px; border-radius: 18px; background: #ffffff1a; color: #ffd767; flex-shrink: 0; }
.coin-balance img { object-fit: contain; }
.language-trigger { height: 32px; width: 32px; padding: 0; border: 1px solid #ffffff1a; border-radius: 50%; background: #ffffff0d; font-size: 14px; color: #ffffffb3; flex-shrink: 0; }
.login-trigger { height: 32px; white-space: nowrap; padding: 0; font-size: 14px; font-weight: 500; }
.login-trigger:hover { color: var(--accent); }

.drama-banner { height: 192px; position: relative; overflow: hidden; }
.drama-link { display: block; height: 100%; position: relative; overflow: hidden; }
.drama-art { width: 100%; height: 248px; position: absolute; left: 0; top: -56px; object-fit: cover; object-position: center; }
.drama-words { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 1672px; padding-left: 167px; pointer-events: none; }
.drama-title { font-size: 36px; line-height: 40px; font-weight: 900; color: #ffe2a0; background: linear-gradient(90deg, #ffd57a, #fff 55%); background-clip: text; -webkit-text-fill-color: transparent; }
.drama-go { width: 130px; height: 40px; margin-top: 16px; object-fit: contain; transition: transform 150ms ease; }
.drama-link:hover .drama-go { transform: translateX(5px); }
.catalog-shell { width: calc(100% - 48px); max-width: 1334px; margin: 0 auto; padding-top: 10px; }
.character-catalog { position: relative; }
.catalog-controls { position: sticky; top: var(--topbar-height); z-index: 80; background: var(--page); padding-top: 10px; margin-top: -10px; }
.catalog-heading { display: flex; align-items: center; gap: 24px; min-height: 44px; }
.catalog-heading h1 { font-size: 24px; line-height: 28px; font-weight: 700; flex: 0 0 auto; }
.gender-options { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.gender-option { padding: 6px 12px; min-height: 28px; border-radius: 16px; color: #ffffff80; display: flex; align-items: center; gap: 2px; white-space: nowrap; font-size: 14px; line-height: 16px; }
.gender-option > img { opacity: .5; }
.gender-option:hover { color: #fff; background: #4f42b826; }
.gender-option.selected { color: var(--accent); background: #4f42b826; }
.gender-option.selected > img { opacity: 1; }
.category-row { display: flex; position: relative; gap: 8px; align-items: flex-start; padding: 12px 0; min-height: 56px; }
.category-list { display: flex; align-items: flex-start; flex: 1; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.category-list::-webkit-scrollbar { display: none; }
.category-chip { padding: 8px 16px; background: var(--tile); color: #ffffff80; border-radius: 6px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; height: 32px; flex-shrink: 0; }
.category-chip:hover { color: #ddd; background: var(--hover); }
.category-chip.selected { color: #fff; background: var(--hover); }
.category-chip[data-category="Webtoon"] { background: #32282e; color: #e7c4d4; }
.expand-categories { background: var(--page); border-radius: 4px; }
.categories-expanded .category-list { flex-wrap: wrap; overflow: visible; }
.categories-expanded .expand-categories .icon { transform: rotate(180deg); }
.search-status { color: var(--muted); font-size: 14px; padding: 0 0 12px; }
.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding-top: 2px; }
.character-tile { min-width: 0; background: var(--tile); border-radius: 12px; position: relative; transition: background 150ms ease; }
.character-tile:hover { background: #242426; }
.character-open { display: block; border-radius: inherit; overflow: hidden; height: 100%; }
.portrait { width: 100%; aspect-ratio: 1; position: relative; overflow: hidden; }
.portrait > img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px 12px 0 0; transition: transform 220ms ease; }
.character-tile:hover .portrait > img { transform: scale(1.025); }
.chat-count { position: absolute; bottom: 0; left: 0; right: 0; height: 32px; background: linear-gradient(180deg, transparent, #0006); padding: 0 8px; display: flex; align-items: center; gap: 4px; color: #fff; font-size: 12px; line-height: 16px; }
.chat-count img { width: 14px; height: 14px; object-fit: contain; }
.character-copy { height: 132px; padding: 10px 12px 14px; overflow: hidden; }
.character-copy h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.character-copy p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; height: 32px; font-size: 12px; line-height: 16px; color: #ffffff80; margin-top: 6px; overflow-wrap: anywhere; }
.character-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; max-height: 42px; overflow: hidden; }
.character-tags > span { background: #ffffff1a; border-radius: 4px; color: #b6b6be; font-size: 12px; line-height: 18px; padding: 0 6px; height: 18px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.save-character { position: absolute; top: 8px; right: 8px; background: #10101199; color: #fff; opacity: 0; transition: opacity 150ms ease; }
.character-tile:hover .save-character, .character-tile:focus-within .save-character, .save-character[aria-pressed="true"] { opacity: 1; }
.save-character[aria-pressed="true"] { color: #ff86b4; }
.save-character[aria-pressed="true"] .icon { fill: #ff86b440; }
.view-all-row { display: flex; justify-content: center; margin: 24px 0; }
.view-all { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #ffffff4d; border-radius: 24px; min-width: 272px; height: 48px; color: #ffffffb3; padding: 0 32px; font-size: 16px; }
.view-all:hover { background: #ffffff0d; color: #fff; }
.view-all:disabled { opacity: .5; cursor: default; }
.empty-catalog { padding: 72px 20px; text-align: center; }
.empty-catalog > .icon { width: 36px; height: 36px; color: var(--muted); margin-bottom: 12px; }
.empty-catalog h2 { font-size: 20px; margin-bottom: 6px; }
.empty-catalog p { color: var(--muted); margin-bottom: 20px; }

.collections { margin: 40px 0 0; min-width: 0; }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 16px; }
.section-heading h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.carousel-controls { display: flex; gap: 4px; }
.carousel-controls button { width: 28px; height: 28px; border: 1px solid #ffffff1a; }
.carousel-controls button:disabled { opacity: .25; cursor: default; }
.collection-track { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-behavior: smooth; padding-bottom: 4px; }
.collection-track::-webkit-scrollbar { display: none; }
.collection-tile { flex: 0 0 220px; width: 220px; background: var(--tile); border-radius: 12px; overflow: hidden; scroll-snap-align: start; transition: background 150ms ease; }
.collection-tile:hover { background: #242426; }
.collection-tile > img { width: 220px; height: 99px; object-fit: cover; }
.collection-tile > div { padding: 12px; }
.collection-tile h3 { font-size: 16px; font-weight: 600; line-height: 22px; margin-bottom: 8px; }
.collection-tile p { font-size: 14px; line-height: 20px; color: #ffffff80; height: 120px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; }
.series-track .collection-tile > img { height: 111px; }
.collection-track.expanded { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); overflow: visible; }
.collection-track.expanded .collection-tile { width: auto; }
.collection-track.expanded .collection-tile > img { width: 100%; height: auto; aspect-ratio: 2; }
.faq { padding: 24px 0 40px; }
.text-button { display: flex; align-items: center; gap: 4px; font-size: 14px; color: #ffffffb3; }
.text-button .icon { width: 16px; height: 16px; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid #ffffff0d; border-radius: 8px; background: #ffffff05; }
.faq-list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; line-height: 22px; padding: 12px 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { width: 16px; height: 16px; color: var(--muted); }
.faq-list details[open] summary .icon { transform: rotate(180deg); }
.faq-list details p { padding: 0 16px 16px; color: #ffffffb3; font-size: 14px; line-height: 22px; }

.site-footer { background: #151516; padding: 40px 24px 48px; border-top: 1px solid var(--line); }
.footer-inner { max-width: 1334px; margin: 0 auto; display: flex; gap: 48px; align-items: flex-start; }
.footer-about { width: 300px; flex: 0 0 300px; }
.footer-brand { display: flex; gap: 24px; align-items: center; margin-bottom: 18px; }
.footer-brand > a > img { object-fit: contain; }
.download-link { display: inline-flex; align-items: center; gap: 4px; color: #ffffffb3; font-size: 14px; }
.download-link img { object-fit: contain; }
.footer-about p { color: #ffffff80; font-size: 12px; line-height: 18px; }
.social-links { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.social-links img { width: 20px; height: 20px; object-fit: contain; opacity: .7; }
.social-links a:hover img { opacity: 1; }
.footer-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; flex: 1; min-width: 0; }
.footer-links section { min-width: 0; }
.footer-links h3 { font-size: 14px; line-height: 20px; font-weight: 600; margin-bottom: 16px; }
.footer-links a { display: block; color: #ffffff80; font-size: 12px; line-height: 18px; margin-bottom: 12px; overflow-wrap: break-word; }
.footer-links a:hover { color: #fff; }
.back-top { width: 40px; height: 40px; position: fixed; bottom: 24px; right: 24px; border: 1px solid #ffffff1a; background: #2a2a2bee; z-index: 90; }

dialog { color: var(--ink); background: #1c1c1d; border: 1px solid #ffffff1a; border-radius: 12px; padding: 0; max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); box-shadow: 0 24px 100px #0009; }
dialog::backdrop { background: #000b; backdrop-filter: blur(4px); }
dialog[open] { animation: dialog-in 150ms ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: #101011b3; color: #fff; }
.character-dialog { width: 800px; overflow: auto; }
.character-dialog[open] { display: grid; grid-template-columns: 46% 54%; }
.character-detail-image { min-height: 400px; background: #151516; }
.character-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.character-detail-copy { padding: 36px 28px 28px; min-width: 0; }
.detail-eyebrow { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 12px; }
.detail-eyebrow img { object-fit: contain; }
.character-detail-copy h2 { font-size: 25px; line-height: 32px; margin-top: 12px; overflow-wrap: anywhere; }
.fiction-note { font-size: 12px; color: #ffffff66; margin: 8px 0 20px; }
#detail-description { white-space: pre-wrap; overflow-wrap: anywhere; color: #d0d0d7; font-size: 14px; line-height: 22px; max-height: 220px; overflow: auto; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
.detail-tags span { font-size: 12px; padding: 3px 8px; color: #c9c9d0; background: #ffffff0d; border-radius: 4px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.primary-button, .subtle-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px; min-height: 42px; font-size: 14px; font-weight: 600; }
.primary-button { background: #7673ff; color: #fff; }
.primary-button:hover { background: #8986ff; }
.subtle-button { border: 1px solid #ffffff26; color: #ddd; background: #ffffff05; }
.subtle-button:hover { background: #ffffff0d; }
.primary-button .icon, .subtle-button .icon { width: 18px; height: 18px; }
.detail-save.saved { color: #ff86b4; }
.surface-dialog { padding: 28px; width: 480px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.dialog-heading h2 { font-size: 22px; line-height: 28px; }
.service-dialog { text-align: center; padding: 36px 28px 28px; }
.service-logo { margin: 0 auto 16px; object-fit: contain; }
.service-dialog h2 { font-size: 26px; }
.service-description { margin: 12px auto 24px; color: var(--muted); max-width: 340px; font-size: 14px; line-height: 22px; }
.service-continue { width: 100%; }
.library-dialog { width: 540px; }
.library-tabs { display: flex; gap: 24px; border-bottom: 1px solid #ffffff1a; margin-bottom: 20px; }
.library-tabs button { padding: 0 0 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.library-tabs button.selected { color: #fff; border-color: var(--accent); }
.library-empty { text-align: center; padding: 40px 0 24px; color: var(--muted); }
.library-empty .icon { width: 32px; height: 32px; margin-bottom: 12px; }
.library-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.library-row > img { width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0; }
.library-row > span { min-width: 0; flex: 1; }
.library-row b { font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-row small { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.language-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px; font-size: 14px; border-radius: 6px; }
.language-list a:hover { background: #ffffff0d; }
.language-list .selected { color: var(--accent); background: #4f42b826; }
.language-list .icon { width: 16px; height: 16px; }
.character-form { display: grid; gap: 20px; }
.character-form > label, .form-row > label { display: grid; gap: 8px; font-size: 14px; color: #d3d3da; }
.character-form input:not([type="file"]), .character-form textarea, .character-form select { width: 100%; min-width: 0; border: 1px solid #ffffff1a; border-radius: 6px; padding: 10px 12px; background: #101011; color: #fff; font-size: 14px; }
.character-form textarea { resize: vertical; }
.character-form .avatar-upload { display: flex; align-items: center; gap: 16px; cursor: pointer; flex-wrap: wrap; }
.avatar-upload > img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: #151516; }
.avatar-upload small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.avatar-upload input { max-width: 100%; font-size: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.form-error { color: #ff8e98; font-size: 13px; }
.topic-dialog { width: 520px; }
.topic-detail-image { width: 100%; height: auto; max-height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 20px; }
.topic-detail-description { font-size: 14px; line-height: 22px; color: #b7b7c0; margin-bottom: 24px; }
.toast { position: fixed; bottom: 28px; left: calc(50% + var(--sidebar-width) / 2); transform: translateX(-50%); z-index: 400; width: max-content; max-width: calc(100% - 32px); padding: 12px 20px; border: 1px solid #ffffff26; border-radius: 8px; background: #303033; box-shadow: 0 4px 20px #0006; text-align: center; font-size: 14px; }

@media (max-width: 1700px) { .drama-words { padding-left: 300px; } }
@media (max-width: 1440px) { .drama-words { width: 1200px; padding-left: 180px; } }
@media (max-width: 1200px) {
  .topbar { gap: 12px; }
  .sale-banner { display: none; }
  .drama-words { padding-left: 280px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-about { width: 100%; flex-basis: auto; max-width: 500px; }
  .footer-links { width: 100%; }
  .catalog-heading { gap: 12px; flex-wrap: wrap; }
  .gender-option { padding: 6px 8px; }
}
@media (max-width: 1000px) and (min-width: 901px) {
  .drama-words { padding-left: 300px; }
  .drama-title { font-size: 30px; line-height: 36px; }
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 0px; --topbar-height: 48px; }
  body.nav-compact { --sidebar-width: 0px; }
  html { scroll-padding-top: 170px; }
  .workspace { margin-left: 0; }
  .wayfinder, .nav-compact .wayfinder { width: 300px; max-width: calc(100% - 40px); padding: 17px 16px 24px; transform: translateX(-100%); }
  .wayfinder-top, .nav-compact .wayfinder-top { justify-content: space-between; padding: 0 16px; }
  .nav-compact .wordmark, .nav-compact .nav-link > span, .nav-compact .wayfinder-bottom { display: block; }
  .nav-compact .nav-link { padding: 0 16px; width: 100%; justify-content: flex-start; }
  .nav-compact .nav-discount { display: flex !important; }
  .nav-compact .fold-button { transform: none; }
  .menu-open .wayfinder { transform: translateX(0); }
  .menu-open .nav-shade { position: fixed; inset: 0; display: block; background: #0009; z-index: 105; }
  .mobile-menu { display: inline-flex; width: 28px; height: 28px; color: #fff; }
  .topbar { gap: 12px; padding: 0 12px; justify-content: flex-start; }
  .character-search { max-width: none; min-width: 0; margin: 0 auto 0 0; background: #ffffff0d; border-color: #ffffff1a; }
  .character-search input { font-size: 14px; }
  .coin-balance { display: none; }
  .language-trigger { width: 30px; height: 30px; font-size: 12px; }
  .login-trigger { min-width: 42px; font-size: 14px; }
  .drama-banner { margin: 8px 12px 0; border-radius: 12px; height: auto; aspect-ratio: 4.2; }
  .drama-art { top: 0; height: 100%; object-position: 63% center; }
  .drama-words { top: 50%; left: 16px; width: auto; padding: 0; transform: translateY(-50%); }
  .drama-title { font-size: 16px; line-height: 20px; }
  .drama-go { width: 65px; height: 20px; margin-top: 5px; }
  .catalog-shell { width: calc(100% - 24px); padding-top: 12px; }
  .catalog-controls { padding-top: 10px; }
  .catalog-heading { min-height: 38px; gap: 6px 12px; justify-content: space-between; }
  .catalog-heading h1 { font-size: 20px; line-height: 26px; }
  .gender-options { gap: 0; }
  .gender-option { font-size: 12px; padding: 6px 8px; gap: 2px; }
  .gender-option img { width: 14px; height: 14px; }
  .category-row { padding: 8px 0 12px; min-height: 52px; }
  .category-chip { padding: 8px 12px; }
  .character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .character-copy { height: 124px; padding: 6px 10px 12px; }
  .character-tags { gap: 4px; max-height: 40px; }
  .character-tags > span { padding: 0 4px; }
  .save-character { opacity: 1; width: 28px; height: 28px; top: 6px; right: 6px; background: #10101188; }
  .save-character .icon { width: 16px; height: 16px; }
  .collections { margin-top: 28px; }
  .collection-tile { flex-basis: 220px; }
  .faq { padding-bottom: 24px; }
  .site-footer { padding: 32px 12px 40px; }
  .footer-inner { gap: 28px; }
  .footer-about { max-width: 520px; }
  .footer-links { gap: 20px 12px; }
  .back-top { right: 12px; bottom: 16px; }
  .toast { left: 50%; }
}
@media (max-width: 600px) {
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-heading { align-items: center; }
  .gender-option { padding: 5px 6px; }
  .gender-option img { display: none; }
  .gender-option:first-child img { display: block; }
  .catalog-heading h1 { font-size: 20px; }
  .view-all { height: 44px; min-width: 240px; }
  .section-heading { margin-bottom: 12px; }
  .collection-tile { flex-basis: 200px; width: 200px; }
  .collection-tile > img { width: 200px; height: 90px; }
  .collection-tile h3 { font-size: 15px; line-height: 20px; }
  .collection-tile p { height: 100px; -webkit-line-clamp: 5; }
  .collection-tile > div { padding: 10px; }
  .series-track .collection-tile > img { height: 101px; }
  .collection-track.expanded { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .faq-list summary { font-size: 14px; line-height: 20px; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .footer-links h3 { margin-bottom: 12px; }
  .footer-links a { font-size: 13px; }
  .character-dialog[open] { display: block; }
  .character-dialog { width: 400px; }
  .character-detail-image { min-height: 0; height: 260px; }
  .character-detail-image img { object-position: center 32%; }
  .character-detail-copy { padding: 20px; }
  .character-detail-copy h2 { font-size: 22px; line-height: 28px; }
  #detail-description { max-height: 140px; }
  .detail-tags { margin: 16px 0; }
  .surface-dialog { padding: 22px 20px; }
  .dialog-heading { margin-bottom: 20px; }
  .dialog-heading h2 { font-size: 20px; }
  .create-actions { gap: 8px; }
  .create-actions > * { flex: 1; padding: 10px; white-space: nowrap; }
}
@media (max-width: 374px) {
  .topbar { gap: 8px; }
  .language-trigger { display: none; }
  .catalog-heading { gap: 4px; }
  .catalog-heading h1 { font-size: 18px; }
  .gender-option { padding: 5px; }
  .gender-option img { display: none !important; }
  .drama-words { left: 12px; }
  .drama-title { font-size: 14px; line-height: 17px; }
  .drama-go { width: 58px; height: 18px; margin-top: 3px; }
  .character-copy { padding-right: 8px; padding-left: 8px; }
  .character-copy h3 { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html, .collection-track { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.knowledge-nav { border-top: 1px solid var(--line); margin: 16px 8px 0; padding-top: 12px; display: grid; }
.knowledge-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 6px 8px; color: var(--muted); font-size: 13px; }
.knowledge-nav a:hover { color: #fff; }
.knowledge-nav .icon { width: 14px; height: 14px; }
.nav-compact .knowledge-nav { display: none; }
.footer-links { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.footer-links a .icon { display: none; }
.footer-legal { display: flex; gap: 16px; margin-top: 24px; font-size: 12px; color: var(--muted); }
.footer-legal a:hover { color: #fff; }
.footer-legal .icon { display: none; }
.home-directory { border-top: 1px solid var(--line); padding: 28px 0 36px; }
.home-directory h2 { font-size: 20px; line-height: 28px; margin-bottom: 16px; }
.home-directory-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.home-directory-links a, .reading-link-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 12px 0; border-bottom: 1px solid var(--line); color: #d3d3dc; }
.home-directory-links a:hover, .reading-link-list a:hover { color: var(--accent); }
.home-directory-links .icon, .reading-link-list .icon { width: 16px; height: 16px; }
.header-guide { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 36px; color: #b9b7ed; font-size: 13px; }
.header-guide .icon { width: 18px; height: 18px; }
.header-guide:hover { color: #fff; }
.catalog-intro { color: #aaaab4; margin: 4px 0 0; font-size: 14px; line-height: 22px; }
.catalog-heading h1 { flex: 0 1 auto; overflow-wrap: break-word; }
.home-story { margin-top: 36px; padding: 28px 0 12px; border-top: 1px solid var(--line); color: #c3c3cd; font-size: 15px; line-height: 25px; }
.home-story > h2 { color: #f1f1f5; font-size: 24px; line-height: 32px; margin-bottom: 16px; }
.home-story > p { max-width: 80ch; }
.home-story-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; margin-top: 28px; }
.home-story-sections section { min-width: 0; scroll-margin-top: 88px; }
.home-story h3 { color: #eeeef4; font-size: 18px; line-height: 26px; margin-bottom: 12px; }
.home-story p + p { margin-top: 12px; }
.home-story a { color: #b1aeff; text-decoration: underline; text-underline-offset: 3px; }
.home-story em { font-style: normal; color: #e2e2e9; }
.faq, .home-story { scroll-margin-top: 80px; }
.faq .text-button { flex: 0 0 auto; white-space: nowrap; }
.reading-shell { max-width: 1168px; margin: 0 auto; padding: 28px 32px 64px; }
.breadcrumbs { margin-bottom: 32px; color: #96969f; font-size: 12px; line-height: 20px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 10px; }
.breadcrumbs li + li::before { content: '/'; opacity: .5; }
.breadcrumbs a { color: #b2b2bc; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs a .icon { display: none; }
.reading-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
.reading-contents { position: sticky; top: 88px; border-right: 1px solid var(--line); padding-right: 24px; }
.reading-contents > span { display: block; color: #ebebef; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.reading-contents a { display: block; color: #94949f; font-size: 13px; line-height: 20px; padding: 7px 0; }
.reading-contents a:hover { color: var(--accent); }
.reading-article { min-width: 0; max-width: 800px; font-size: 16px; line-height: 26px; color: #c3c3cd; }
.reading-header { padding-bottom: 24px; border-bottom: 1px solid #ffffff12; margin-bottom: 32px; }
.reading-header h1 { font-size: 36px; font-weight: 700; line-height: 44px; color: #fff; max-width: 780px; overflow-wrap: break-word; }
.reading-header > p { margin-top: 20px; font-size: 17px; line-height: 28px; color: #aaaab6; }
.reading-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.reading-section { margin: 0 0 32px; scroll-margin-top: 88px; }
.reading-article h2 { font-size: 22px; line-height: 30px; margin: 0 0 16px; font-weight: 600; color: #f1f1f5; }
.reading-section p + p { margin-top: 14px; }
.reading-section ol, .reading-section ul { padding-left: 24px; margin: 0 0 16px; }
.reading-section li { padding-left: 3px; margin: 8px 0; }
.reading-section em { color: #d5d5df; font-style: normal; }
.reading-section a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.reading-image { width: 100%; height: auto; max-width: 600px; border-radius: 8px; margin: 0 0 32px; }
.profile-portrait { max-width: 320px; }
.profile-fiction { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.profile-facts { margin: 0 0 32px; font-size: 14px; line-height: 23px; }
.profile-facts > div { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; overflow-wrap: anywhere; }
.reading-section blockquote { margin: 0; padding: 12px 18px; border-left: 2px solid var(--accent); color: #dedee7; }
.reading-directory, .related-reading, .reading-faq, .reading-characters { padding-top: 24px; margin: 32px 0; border-top: 1px solid var(--line); }
.reading-link-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; font-size: 14px; line-height: 22px; }
.reading-character-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.reading-character-grid .character-copy { height: 132px; }
.reading-mobile-contents { display: none; }

@media (max-width: 1300px) {
  .reading-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 32px; }
  .reading-shell { padding-left: 24px; padding-right: 24px; }
  .reading-header h1 { font-size: 32px; line-height: 40px; }
  .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 1100px) {
  .header-guide { display: none; }
  .home-story-sections { grid-template-columns: 1fr; }
  .reading-layout { display: block; }
  .reading-contents { display: none; }
  .reading-mobile-contents { display: block; margin-top: 24px; font-size: 14px; line-height: 22px; }
  .reading-mobile-contents summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; padding: 12px 0; color: #d5d5df; }
  .reading-mobile-contents summary::-webkit-details-marker { display: none; }
  .reading-mobile-contents summary .icon { width: 16px; height: 16px; }
  .reading-mobile-contents[open] summary .icon { transform: rotate(180deg); }
  .reading-mobile-contents nav { display: grid; gap: 8px; padding: 4px 0 12px; }
  .reading-mobile-contents a { color: #b1afd7; }
}
@media (max-width: 900px) {
  .nav-compact .knowledge-nav { display: grid; }
  .reading-shell { padding-top: 20px; }
  .breadcrumbs { margin-bottom: 24px; }
  .reading-article { max-width: none; }
}
@media (max-width: 600px) {
  .catalog-heading h1 { flex-basis: 100%; font-size: 22px; line-height: 28px; }
  .catalog-heading .gender-options { margin-top: 8px; }
  .home-story { margin-top: 28px; padding-top: 24px; }
  .home-story > h2 { font-size: 22px; line-height: 30px; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .home-directory-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .reading-shell { padding: 18px 16px 32px; }
  .reading-header { margin-bottom: 26px; }
  .reading-header h1 { font-size: 28px; line-height: 35px; }
  .reading-header > p { font-size: 16px; line-height: 26px; margin-top: 16px; }
  .reading-article { font-size: 15px; line-height: 25px; }
  .reading-article h2 { font-size: 20px; line-height: 27px; margin-bottom: 12px; }
  .reading-link-list { grid-template-columns: 1fr; }
  .reading-character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .reading-section { margin-bottom: 28px; }
}
