.skip-link { position: fixed; z-index: 90; top: 8px; left: 12px; transform: translateY(-160%); padding: 14px; background: var(--accent-pale); color: #07161c; border-radius: 10px; }
.skip-link:focus { transform: none; }
.title-main { padding-top: 18px; }
.detail-breadcrumb { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; margin-bottom: 16px; }
.detail-breadcrumb a { display: inline-flex; align-items: center; min-height: 40px; gap: 7px; color: var(--muted); text-decoration: none; font-size: 14px; }
.detail-breadcrumb img { width: 18px; height: 18px; filter: invert(1); }
.detail-breadcrumb > span { color: var(--muted); font-size: 12px; }
.detail-hero { display: grid; grid-template-columns: 238px minmax(0,1fr); gap: 18px 36px; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: #0b2027; }
.detail-cover { grid-column: 1; grid-row: 1 / 5; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; align-self: start; background: #07161c; border-radius: 14px; }
.detail-heading { grid-column: 2; min-width: 0; }
.detail-eyebrow { margin: 0 0 10px; color: var(--accent-pale); font-size: 13px; line-height: 1.5; }
.detail-heading h1 { max-width: 27ch; margin: 0 0 12px; font: 700 clamp(30px,3.3vw,46px)/1.1 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.detail-pitch { max-width: 690px; margin: 0; font-size: 18px; line-height: 1.5; color: #ccd5d0; }
.detail-stats { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 15px; border-block: 1px solid var(--line); }
.detail-score { display: flex; align-items: center; gap: 10px; }
.detail-score > strong { font-size: 30px; color: var(--accent-pale); line-height: 1; font-variant-numeric: tabular-nums; }
.detail-score div { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.detail-score a { color: var(--muted); text-underline-offset: 3px; }
.detail-count { display: grid; gap: 4px; font-size: 15px; }
.detail-count span { color: var(--muted); font-size: 12px; }
.detail-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-actions .button { min-height: 50px; font-size: 15px; cursor: pointer; }
.detail-actions .button:disabled { cursor: wait; opacity: .6; }
.detail-actions .detail-primary { min-width: 200px; }
.detail-chapter-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding-inline: 8px; color: var(--accent-pale); font-size: 14px; text-underline-offset: 4px; }
.detail-reader-hint { grid-column: 2; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-reader-hint strong { color: var(--text); font-weight: 500; }
.detail-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin-top: 22px; border-bottom: 1px solid var(--line); }
.detail-nav a { display: flex; min-height: 54px; align-items: center; gap: 8px; color: #d6dcd8; text-decoration: none; font-size: 15px; font-weight: 650; border-bottom: 2px solid transparent; }
.detail-nav a:hover, .detail-nav a:focus-visible { border-bottom-color: var(--accent); color: var(--accent-pale); }
.detail-nav span { color: var(--muted); font-size: 12px; }
.detail-body { display: grid; grid-template-columns: minmax(0,1fr) 290px; align-items: start; gap: 30px 44px; margin-top: 28px; }
.detail-body section { min-width: 0; scroll-margin-top: 112px; }
.detail-body h2 { margin: 0 0 16px; font: 700 28px/1.15 var(--display); }
.detail-about { grid-column: 1; }
.detail-about > p { max-width: 860px; margin: 0; color: #cbd4cf; font-size: 16px; line-height: 1.75; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.detail-tags a { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 13px; }
.detail-tags a:hover { border-color: var(--line-strong); color: var(--accent-pale); }
.detail-sidebar { grid-column: 2; grid-row: 1 / 3; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #0a1d24; }
.detail-sidebar h2 { font-family: var(--sans); font-size: 17px; }
.detail-sidebar dl { display: grid; gap: 19px; margin: 0; }
.detail-sidebar dt { margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.detail-sidebar dd { margin: 0; font-size: 14px; line-height: 1.5; }
.detail-sidebar a { color: var(--accent-pale); text-underline-offset: 4px; }
.detail-sidebar-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.chapter-section { grid-column: 1; }
.chapter-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.chapter-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.chapter-tools { display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 12px; margin-bottom: 12px; }
.chapter-tools label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.chapter-tools input, .chapter-tools select { min-height: 46px; width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #0b2027; font: 14px var(--sans); }
.chapter-tools input::placeholder { color: #a8b0ad; }
.chapter-availability-note { margin: 0 0 12px; color: var(--accent-pale); font-size: 13px; line-height: 1.55; }
.chapter-list { display: grid; padding: 0; margin: 0; list-style: none; border-block: 1px solid var(--line); }
.chapter-list li + li { border-top: 1px solid var(--line); }
.chapter-row { display: grid; width: 100%; grid-template-columns: minmax(0,1fr) auto 20px; gap: 12px; align-items: center; min-height: 67px; padding: 13px 12px; text-align: left; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.chapter-row:hover { background: #102a32; }
.chapter-row:focus-visible { outline-offset: -3px; }
.chapter-copy { min-width: 0; display: grid; gap: 5px; }
.chapter-copy strong { font-size: 14px; font-weight: 650; }
.chapter-copy > span { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.chapter-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.chapter-row img { width: 18px; height: 18px; filter: invert(1); }
.chapter-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; }
.chapter-result { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.chapter-empty { padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.chapter-empty p { color: var(--muted); font-size: 14px; }
.detail-similar { grid-column: 1 / -1; }
.similar-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.similar-item { min-width: 0; display: flex; flex-direction: column; }
.similar-item .title-card { flex: 1; }
.similar-reason { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-not-found { padding: 44px 26px; border: 1px solid var(--line); border-radius: 22px; }
.detail-not-found p { color: var(--muted); line-height: 1.6; }
.reader-demo { width: min(490px,calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100svh - 24px); padding: 26px; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: #0b2027; }
.reader-demo::backdrop { background: #01080cdd; backdrop-filter: blur(4px); }
.reader-demo h2 { margin: 18px 0 10px; padding-right: 22px; font-size: 26px; }
.reader-demo-note { color: var(--muted); line-height: 1.65; font-size: 14px; }
.reader-demo .detail-eyebrow { padding-right: 40px; font-size: 12px; }
.reader-demo-close { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #102a32; cursor: pointer; }
.reader-demo-close img { filter: invert(1); }
body.reader-demo-open { overflow: hidden; }

.chapter-copy > .chapter-translator, .chapter-translator { color: var(--accent-pale); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.chapter-translator > span { color: var(--muted); }
.detail-comments { grid-column: 1; padding-top: 24px; border-top: 1px solid var(--line); }
.comments-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.detail-comments h2 { margin: 0; }
.comments-heading h2 > span { margin-left: 7px; color: var(--muted); font: 500 16px var(--sans); }
.comments-sort-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.comments-sort-label select { min-height: 44px; padding: 10px 32px 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #0b2027; font: 14px var(--sans); }
.comments-scope { margin: 0 0 18px; max-width: 680px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.comments-form { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #0b2027; }
.comments-form > label { font-size: 14px; font-weight: 650; }
.comments-form textarea { display: block; width: 100%; min-width: 0; min-height: 112px; max-height: 480px; resize: vertical; padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: #07161c; font: 15px/1.6 var(--sans); }
.comments-form textarea::placeholder { color: var(--muted); }
.comment-compose-meta, .comment-compose-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
.comment-spoiler-choice { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; font-size: 13px; cursor: pointer; }
.comment-spoiler-choice input { width: 18px; height: 18px; accent-color: var(--accent); }
#comment-counter { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.comment-compose-actions > button { min-height: 46px; cursor: pointer; }
.comment-rules { flex: 1 1 200px; max-width: 600px; font-size: 13px; color: var(--muted); }
.comment-rules summary { display: list-item; width: fit-content; padding: 12px 0; cursor: pointer; }
.comment-rules p { margin: 0 0 10px; line-height: 1.6; }
.comment-error { margin: 0; color: #ffb6aa; font-size: 13px; line-height: 1.6; }
.comments-form textarea[aria-invalid="true"] { border-color: #ffb6aa; }
.comment-storage-warning { padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--accent-pale); font-size: 13px; line-height: 1.6; }
.comment-feedback { margin: 14px 0; color: #98d9b8; font-size: 13px; line-height: 1.6; }
.comment-feedback:empty { display: none; }
.comments-empty { padding: 24px 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.comments-empty strong { color: var(--text); }
.comments-empty p { margin: 8px 0 0; }
.comments-list { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.comment-card { min-width: 0; padding: 18px 20px 8px; border: 1px solid var(--line); border-radius: 14px; background: #0b2027; }
.comment-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; margin-bottom: 12px; }
.comment-meta strong { font-size: 14px; }
.comment-meta strong span, .comment-meta time { color: var(--muted); font-size: 12px; font-weight: 400; }
.comment-text { margin: 0 0 8px; color: #d6ded9; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.comment-spoiler summary { padding: 12px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--accent-pale); font-size: 13px; cursor: pointer; }
.comment-spoiler[open] summary { margin-bottom: 12px; }
.comment-delete { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.comment-delete:hover { color: #ffb6aa; text-decoration: underline; }
.comments-more { margin-top: 16px; cursor: pointer; }

@media (max-width: 1180px) {
    .detail-hero { grid-template-columns: 200px minmax(0,1fr); column-gap: 26px; padding: 24px; }
    .detail-heading h1 { font-size: 36px; }
    .detail-body { grid-template-columns: minmax(0,1fr) 250px; gap: 28px; }
    .similar-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .title-main { padding-top: 8px; }
    .detail-breadcrumb { gap: 6px; margin-bottom: 10px; }
    .detail-breadcrumb a { font-size: 13px; }
    .detail-breadcrumb > span { font-size: 11px; }
    .detail-hero { grid-template-columns: 106px minmax(0,1fr); gap: 16px 14px; padding: 15px; border-radius: 20px; }
    .detail-cover { grid-column: 1; grid-row: 1; }
    .detail-heading { grid-column: 2; grid-row: 1; }
    .detail-heading h1 { font: 700 26px/1.25 var(--sans); letter-spacing: -.025em; }
    .detail-eyebrow { font-size: 12px; margin-bottom: 8px; }
    .detail-pitch { font-size: 14px; line-height: 1.5; }
    .detail-stats { grid-column: 1 / -1; grid-row: 2; padding-block: 12px; gap: 12px 22px; }
    .detail-score > strong { font-size: 25px; }
    .detail-count { font-size: 14px; }
    .detail-count:last-child { display: none; }
    .detail-actions { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 10px; }
    .detail-actions .detail-primary { min-width: 0; }
    .detail-actions .button { font-size: 14px; padding: 11px 9px; min-height: 48px; }
    .detail-chapter-link { grid-column: 1 / -1; justify-content: center; min-height: 34px; }
    .detail-reader-hint { grid-column: 1 / -1; grid-row: 4; font-size: 12px; }
    .detail-nav { margin-top: 12px; gap: 8px 12px; }
    .detail-nav a { font-size: 14px; min-height: 50px; }
    .detail-body { display: flex; flex-direction: column; gap: 28px; margin-top: 24px; }
    .detail-body > * { width: 100%; }
    .detail-body h2 { font-size: 25px; }
    .detail-about > p { font-size: 15px; line-height: 1.65; }
    .detail-about { order: 1; }
    .chapter-section { order: 2; }
    .detail-comments { order: 3; }
    .detail-sidebar { order: 4; padding: 18px; }
    .detail-similar { order: 5; }
    .comments-form { padding: 15px; }
    .comments-form textarea { padding: 12px; font-size: 16px; }
    .comment-compose-actions > button { width: 100%; }
    .comment-card { padding: 16px 15px 6px; }
    .comment-meta { flex-direction: column; gap: 7px; }
    .comments-sort-label { font-size: 12px; }
    .comments-sort-label select { font-size: 13px; }
    .comments-more { width: 100%; }
    .detail-tags { gap: 7px; }
    .detail-tags a { font-size: 12px; }
    .chapter-tools { grid-template-columns: minmax(0,1fr) 154px; gap: 9px; }
    .chapter-tools input, .chapter-tools select { padding: 10px; font-size: 13px; }
    .chapter-row { grid-template-columns: minmax(0,1fr) 18px; gap: 5px 9px; padding: 12px 8px; }
    .chapter-date { grid-column: 1; grid-row: 2; }
    .chapter-row > img { grid-column: 2; grid-row: 1 / 3; }
    .chapter-footer { align-items: stretch; }
    .chapter-footer > button { width: 100%; }
    .similar-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .detail-page .main-nav.is-open { display: flex; position: absolute; z-index: 4; top: 75px; right: 8px; min-width: 205px; flex-direction: column; align-items: stretch; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #102a32; }
    .detail-page .main-nav.is-open a { min-height: 42px; display: flex; align-items: center; }
}
@media (max-width: 359px) {
    .detail-hero { grid-template-columns: 84px minmax(0,1fr); padding: 12px; gap: 14px 12px; }
    .detail-heading h1 { font-size: 23px; }
    .detail-pitch { font-size: 13px; }
    .detail-stats { gap: 12px 18px; }
    .chapter-tools { grid-template-columns: 1fr; }
}
