/* Paginated historical archive; original content stays in native blocks. */
body.ls-history-page .ls-reading-panel { max-width: 1200px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.ls-history-page .wp-block-post-content, body.ls-history-page .wp-block-post-content > .ls-history { width: 100%; max-width: 1200px !important; }
.ls-history, .ls-history * { box-sizing: border-box; }
.ls-history { color: #17202c; scroll-margin-top: 30px; }
.ls-history-views { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; margin: 0 0 26px; padding: 5px; border: 1px solid #e5ded3; border-radius: 10px; background: #f4f0e8; }
.ls-history-views a { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; color: #596473; font-size: 0.875rem; font-weight: 600; line-height: 1.45; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.ls-history-views a:hover { color: #801722; background: #fffdf780; }
.ls-history-views a[aria-current="page"] { border-color: #d4bdb4; color: #801722; background: #fffdf7; font-weight: 700; box-shadow: 0 1px 3px #17202c08; }
.ls-history-collections { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 0 24px; }
.ls-history-collections a { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 10px 14px; border: 1px solid #e5ded3; border-radius: 8px; color: #596473; background: #fffdf7; font-size: 0.85rem; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.ls-history-collections a:hover { border-color: #b99a92; color: #801722; }
.ls-history-collections a[aria-current="page"] { border-color: #caa69f; color: #801722; background: #f5e9e8; font-weight: 700; }
.ls-history .ls-history-gallery-source { max-width: 780px; margin-block: 20px 0; color: #596473; font-size: 0.875rem; line-height: 1.7; }
.ls-history-gallery-source a { display: inline-flex; align-items: center; min-height: 44px; color: #801722; text-underline-offset: 4px; }
.ls-history-intro > p { max-width: 780px; line-height: 1.75; }
.ls-history .ls-history-intro h2 { margin-block: 38px 24px; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.2; }
.ls-history-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-top: 20px; }
.ls-history-tools label { display: block; margin-bottom: 7px; color: #596473; font-size: 0.82rem; font-weight: 600; }
.ls-history-year { flex: 0 1 240px; min-width: 0; }
.ls-history-search { flex: 1 1 260px; min-width: 0; }
.ls-history-tools select, .ls-history-tools input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #c9c0b4; border-radius: 7px; color: #17202c; background-color: #fffdf7; font: inherit; font-size: 0.9rem; }
.ls-history-tools button { min-height: 44px; padding: 10px 20px; border: 1px solid #801722; border-radius: 7px; color: #fffdf7; background: #801722; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.ls-history-reset { display: inline-flex; align-items: center; min-height: 44px; color: #801722; font-size: 0.875rem; text-underline-offset: 4px; }
.ls-history-output { margin-top: 24px; }
.ls-history-results { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-block: 0 20px; }
.ls-history-results p { margin: 0; color: #596473; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.ls-history-output[aria-busy="true"] { opacity: 0.55; cursor: progress; }
.ls-history-tools[aria-busy="true"] { cursor: progress; }
.ls-history-results a, .ls-history-back { display: inline-flex; align-items: center; min-height: 44px; color: #801722; font-size: 0.875rem; font-weight: 600; text-underline-offset: 4px; }
.ls-history-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ls-history-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 285px; padding: 26px; border: 1px solid #e5ded3; border-radius: 12px; background: #fffdf7; overflow-wrap: anywhere; transition: border-color 160ms ease, box-shadow 160ms ease; }
.ls-history-card::before { content: ''; position: absolute; top: 0; left: 26px; width: 42px; height: 3px; border-radius: 0 0 3px 3px; background: #a51f2d; }
.ls-history-card:hover, .ls-history-card:focus-within { border-color: #ad8a83; box-shadow: 0 5px 16px #17202c08; }
.ls-history-card-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; color: #596473; font-size: 0.75rem; line-height: 1.5; }
.ls-history-card-meta span:last-child { color: #801722; }
.ls-history .ls-history-card h3 { margin: 28px 0 24px; color: #801722; font-size: clamp(1.2rem, 1.65vw, 1.5rem); line-height: 1.35; font-weight: 650; letter-spacing: -0.02em; }
.ls-history-read { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; margin-top: auto; border-top: 1px solid #e5ded3; padding-top: 14px; color: #801722; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.ls-history-read span { display: flex; align-items: center; justify-content: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: #f5e9e8; font-size: 1.1rem; }
.ls-history-pagination { margin-block: 32px 0; padding-block: 24px; border-top: 1px solid #e5ded3; }
.ls-history-pagination ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.ls-history-pagination li { margin: 0; }
.ls-history-pagination a, .ls-history-pagination span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #e5ded3; border-radius: 7px; color: #801722; background: #fffdf7; font-size: 0.875rem; text-decoration: none; }
.ls-history-pagination span.current { border-color: #801722; color: #fffdf7; background: #801722; font-weight: 700; }
.ls-history-pagination span.dots { min-width: 24px; padding-inline: 4px; border-color: transparent; background: transparent; }
.ls-history .ls-history-detail-label { max-width: 780px; margin: 22px auto 12px; color: #596473; font-size: 0.8rem; }
.ls-history-report { max-width: 780px; padding: clamp(22px, 3vw, 40px); margin-inline: auto; border: 1px solid #e5ded3; border-radius: 12px; background: #fffdf7; overflow-wrap: anywhere; }
.ls-history-report > p:first-child { margin-top: 0; font-size: 1.25rem; line-height: 1.6; font-weight: 600; }
.ls-history-report p { line-height: 1.8; }
.ls-history-report a { color: #801722; text-decoration: underline; text-underline-offset: 3px; }
.ls-history-report .wp-block-file__button { color: #fffdf7; text-decoration: none; }
.ls-history-report-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 780px; margin: 24px auto; }
.ls-history-report-navigation a { display: flex; flex-direction: column; gap: 10px; min-height: 44px; padding: 18px; border: 1px solid #e5ded3; border-radius: 9px; color: #801722; font-size: 0.8rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ls-history-report-navigation span { color: #17202c; font-size: 0.9rem; font-weight: 500; line-height: 1.5; }
.ls-history-gallery { margin-top: 24px; }
.ls-history-gallery .ls-story-section > p { max-width: 780px; }
.ls-history a:focus-visible, .ls-history-tools input:focus-visible, .ls-history-tools select:focus-visible, .ls-history-tools button:focus-visible { outline: 3px solid #a51f2d; outline-offset: 4px; }
.ls-history-reader, .ls-history-reader * { box-sizing: border-box; }
html.ls-history-reader-open { overflow: hidden; scrollbar-gutter: stable; }
.ls-history-reader { position: fixed; inset: 16px; width: calc(100% - 32px); max-width: 860px; height: fit-content; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #e5ded3; border-radius: 14px; color: #17202c; background: #fffdf7; box-shadow: 0 24px 100px #00000044; overflow: hidden; }
.ls-history-reader[open] { display: flex; flex-direction: column; }
.ls-history-reader::backdrop { background: #10171ddd; }
.ls-history-reader-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 12px 24px; border-bottom: 1px solid #e5ded3; background: #f4f0e8; }
.ls-history-reader .ls-history-reader-label { min-width: 0; margin: 0; color: #596473; font-size: 0.8rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.ls-history-reader-close { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 6px; color: #17202c; background: transparent; font: inherit; font-size: 0.875rem; line-height: 1.4; cursor: pointer; }
.ls-history-reader-close:hover { background: #e9e1d6; }
.ls-history-reader-close svg { width: 20px; height: 20px; flex-shrink: 0; }
.ls-history-reader-body { flex: 1 1 auto; min-width: 0; min-height: 0; padding: 24px 32px 32px; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.ls-history-reader-body:focus-visible { outline: 3px solid #a51f2d; outline-offset: -4px; }
.ls-history-reader[data-state="loading"] .ls-history-reader-status { padding: 24px 32px; }
.ls-history-reader .ls-history-report { width: 100%; max-width: 780px; padding: 0; margin: 0 auto; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.ls-history-reader .ls-history-report > :last-child { margin-bottom: 0; }
.ls-history-reader .ls-history-reader-status { margin: 0; color: #596473; font-size: 0.95rem; line-height: 1.7; }
.ls-history-reader .ls-history-reader-error { margin: 0 0 12px; padding: 14px 16px; border: 1px solid #e1c4bf; border-radius: 8px; color: #17202c; background: #faf0ee; font-size: 0.95rem; line-height: 1.7; }
.ls-history-reader-fallback { display: inline-flex; align-items: center; min-height: 44px; color: #801722; font-size: 0.9rem; font-weight: 600; line-height: 1.6; text-underline-offset: 4px; }
.ls-history-reader-status[hidden], .ls-history-reader-error[hidden], .ls-history-reader-fallback[hidden] { display: none !important; }
.ls-history-reader a:focus-visible, .ls-history-reader button:focus-visible { outline: 3px solid #a51f2d; outline-offset: 4px; }
@media (max-width: 1000px) { .ls-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .ls-history { padding-inline: 16px; }
    .ls-history-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .ls-history-views a { padding: 8px; font-size: 0.8125rem; }
    .ls-history-collections { display: grid; grid-template-columns: minmax(0, 1fr); }
    .ls-history-collections a { width: 100%; }
    .ls-history-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .ls-history-card { min-height: 240px; padding: 22px; }
    .ls-history .ls-history-card h3 { margin-top: 22px; font-size: 1.3rem; }
    .ls-history-tools { gap: 14px; }
    .ls-history-year, .ls-history-search { flex-basis: 100%; }
    .ls-history-report-navigation { grid-template-columns: minmax(0, 1fr); }
    .ls-history .ls-history-detail-label { margin-top: 18px; }
    .ls-history-reader { inset: 8px; width: calc(100% - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 10px; }
    .ls-history-reader-header { gap: 10px; padding: 10px 12px; }
    .ls-history-reader-body { padding: 18px 20px 24px; }
    .ls-history-reader[data-state="loading"] .ls-history-reader-status { padding: 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { .ls-history-card { transition: none; } }
@media (forced-colors: active) {
    .ls-history-card, .ls-history-report, .ls-history-pagination a, .ls-history-pagination span.current, .ls-history-views, .ls-history-collections a, .ls-history-reader, .ls-history-reader-header, .ls-history-reader-error { border-color: CanvasText; }
    .ls-history-views a[aria-current="page"], .ls-history-collections a[aria-current="page"] { border-color: Highlight; color: Highlight; background: Canvas; }
    .ls-history-reader a:focus-visible, .ls-history-reader button:focus-visible { outline-color: Highlight; }
}
