/* New titles and chapter feed: the approved KageShelf shell and source assets. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: -1px; border: 0; padding: 0; }
.discovery-page .header-inner { grid-template-columns: auto 1fr auto; }
.discovery-page .header-inner > .search { display: none; }
.discovery-page .main-nav { justify-content: center; }
.discovery-main { padding: 24px 0 0; }
.discovery-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.discovery-tabs { display: flex; gap: 28px; align-items: baseline; }
.discovery-tabs a { display: inline-flex; align-items: center; min-height: 52px; padding-bottom: 9px; text-decoration: none; color: var(--muted); font: 400 38px/1.1 var(--display); letter-spacing: -.025em; border-bottom: 2px solid transparent; }
.discovery-tabs a:hover { color: var(--accent-pale); }
.discovery-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.discovery-snapshot { color: var(--muted); font-size: 12px; border: 1px solid var(--line); padding: 7px 10px; border-radius: 8px; }
.discovery-description { color: var(--muted); margin: 9px 0 14px; font-size: 15px; line-height: 1.5; }
.discovery-controls { display: grid; grid-template-columns: minmax(0,1fr) 205px 205px; gap: 16px; align-items: end; }
.discovery-search { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 5px 6px 5px 16px; min-height: 56px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px; }
.discovery-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #f29a5526; }
.discovery-search input { width: 100%; min-width: 0; height: 44px; background: transparent; border: 0; outline: 0; font-size: 16px; color: var(--text); }
.discovery-search input::placeholder { color: var(--muted); opacity: 1; }
.discovery-search .button { padding-inline: 24px; min-height: 44px; border-radius: 10px; }
.select-field { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; }
.select-field select { min-height: 56px; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; color: var(--text); font: 14px/1.4 var(--sans); cursor: pointer; }
.discovery-controls :disabled { opacity: .55; cursor: wait; }
.discovery-meta { min-height: 40px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.discovery-meta p { margin: 0; font-size: 14px; font-weight: 650; }
.discovery-meta button { min-height: 44px; background: transparent; border: 0; color: var(--accent-pale); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.discovery-date-note { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.discovery-results { scroll-margin-top: 112px; }
.day-group { margin-bottom: 30px; }
.day-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.day-heading h2 { margin: 0; font: 600 20px/1.3 var(--sans); }
.day-heading span { color: var(--muted); font-size: 12px; }
.arrival-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.arrival-grid .title-card { min-height: 265px; }
.update-list { display: grid; gap: 12px; }
.update-group { display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: start; gap: 12px 20px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); scroll-margin-top: 115px; min-width: 0; }
.update-cover { grid-row: 1 / 3; position: relative; border-radius: 9px; overflow: hidden; background: #07161c; }
.update-cover > img { width: 76px; height: 114px; object-fit: contain; }
.update-cover .card-age { font-size: 11px; left: 5px; bottom: 5px; }
.update-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; min-width: 0; }
.update-heading > div { min-width: 0; }
.update-title { color: var(--text); text-decoration: none; font-size: 19px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.update-title:hover { color: var(--accent-pale); }
.update-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.update-import { display: block; color: var(--accent-pale); margin-top: 3px; }
.update-heading .card-save { position: static; width: 44px; height: 44px; flex-shrink: 0; }
.update-chapters { grid-column: 2; min-width: 0; }
.update-chapter { width: 100%; min-height: 62px; display: grid; grid-template-columns: minmax(0,1fr) auto 20px; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 14px; color: var(--text); background: #f29a5509; cursor: pointer; }
.update-chapter:hover { background: #f29a5515; border-color: var(--accent); }
.update-chapter + .update-chapter { margin-top: 8px; }
.update-chapter-copy { min-width: 0; display: grid; gap: 4px; }
.update-chapter strong { color: var(--accent-pale); font-size: 14px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.update-chapter .chapter-team { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.update-chapter time { color: var(--muted); font-size: 12px; }
.update-chapter > img { filter: invert(1); width: 18px; height: 18px; }
.update-expand { padding-top: 8px; }
.update-expand summary { padding: 10px 0; min-height: 44px; color: var(--accent-pale); font-size: 13px; cursor: pointer; }
.batch-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.update-expanded-list { display: grid; gap: 8px; }
.update-expanded-list .update-chapter { margin-top: 0; }
.batch-more { margin-top: 10px; min-height: 44px; font-size: 13px; }
.discovery-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; margin-block: 25px; }
.discovery-pagination p { color: var(--muted); font-size: 13px; }
.discovery-pagination .button { font-size: 14px; }
.discovery-footnote { max-width: 850px; margin: 0 auto; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.65; }
.discovery-empty { text-align: center; border: 1px solid var(--line); border-radius: 18px; padding: 44px 24px; background: var(--surface); }
.discovery-empty h2 { margin: 0 0 14px; font: 400 32px/1.2 var(--display); }
.discovery-empty p { max-width: 580px; margin: 0 auto 24px; color: var(--muted); line-height: 1.65; font-size: 14px; overflow-wrap: anywhere; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.discovery-empty .button { font-size: 14px; }
/* Same reader confirmation treatment as the approved title page. */
.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; color: var(--accent-pale); }
.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); }
.chapter-translator { color: var(--accent-pale); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
body.reader-demo-open { overflow: hidden; }
@media (max-width: 1180px) {
    .discovery-page .account-actions { justify-self: end; }
    .discovery-page .main-nav { align-items: stretch; }
    .arrival-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .discovery-controls { grid-template-columns: minmax(0,1fr) 180px 175px; gap: 12px; }
}
@media (max-width: 760px) {
    .discovery-page .header-inner { grid-template-columns: minmax(0,1fr) auto; }
    .discovery-main { padding-top: 15px; }
    .discovery-intro { flex-wrap: wrap; gap: 10px; }
    .discovery-tabs { gap: 24px; }
    .discovery-tabs a { min-height: 44px; padding-bottom: 7px; font-size: 29px; }
    .discovery-snapshot { display: none; }
    .discovery-description { margin: 7px 0 12px; font-size: 13px; }
    .discovery-controls { grid-template-columns: 1fr 1fr; gap: 10px 9px; }
    .discovery-search { grid-column: 1 / -1; min-height: 54px; padding-left: 12px; }
    .discovery-search .button { padding-inline: 15px; font-size: 13px; }
    .select-field { font-size: 12px; gap: 5px; }
    .select-field select { min-height: 44px; font-size: 14px; padding: 9px; border-radius: 10px; }
    .discovery-meta { margin-top: 8px; min-height: 40px; }
    .discovery-meta p { font-size: 13px; }
    .discovery-meta button { font-size: 12px; }
    .discovery-date-note { font-size: 12px; margin-bottom: 14px; }
    .day-heading { gap: 5px 12px; padding-bottom: 8px; margin-bottom: 12px; }
    .day-heading h2 { font-size: 17px; }
    .arrival-grid { gap: 10px; }
    .update-group { grid-template-columns: 54px minmax(0,1fr); gap: 12px; padding: 14px 12px; border-radius: 15px; }
    .update-cover { grid-row: 1; }
    .update-cover > img { width: 54px; height: 81px; }
    .update-cover .card-age { font-size: 10px; left: 3px; bottom: 3px; padding: 3px; }
    .update-heading { gap: 8px; }
    .update-title { font-size: 16px; }
    .update-subtitle { font-size: 12px; margin-top: 5px; }
    .update-chapters { grid-column: 1 / -1; }
    .update-chapter { padding: 10px; gap: 7px; }
    .update-chapter strong { font-size: 13px; }
    .update-chapter time { font-size: 11px; }
    .discovery-pagination { flex-direction: column; gap: 8px; }
    .discovery-pagination .button { width: 100%; }
    .discovery-empty { padding: 30px 18px; }
    .discovery-empty h2 { font-size: 27px; }
    .empty-actions .button { width: 100%; }
}
@media (max-width: 359px) {
    .discovery-tabs { gap: 20px; }
    .discovery-tabs a { font-size: 27px; }
    .update-title { font-size: 15px; }
}
