.front-feature-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1rem; margin-bottom: .8rem; }
.front-feature-heading .section-title { flex: 1 1 10rem; margin: 0; }
.reader-tool-buttons, .reader-article-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.reader-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: .4rem .78rem; border: 1px solid var(--line); background: var(--surface); color: var(--deep); font-size: .875rem; font-weight: 750; text-align: center; text-decoration: none; }
.reader-button[hidden] { display: none; }
.reader-button-primary { background: var(--lime); border-color: var(--lime); }
.reader-button:hover, .reader-button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: white; }
.reader-button:disabled, .reader-button[aria-disabled="true"] { opacity: .5; cursor: default; }
.reader-button:disabled:hover, .reader-button[aria-disabled="true"]:hover { background: var(--surface); border-color: var(--line); color: var(--deep); }
.reader-article-tools { margin-top: .85rem; }
.reader-read-time { color: var(--green); font-size: .875rem; font-weight: 750; margin-inline-end: .25rem; }
.reader-focus .prose { max-width: 47rem; background: #e8ede4; color: var(--ink); padding: clamp(1.1rem, 4vw, 3rem); font-size: clamp(1.4rem, 2.6vw, 1.6rem); line-height: 1.85; }
.reader-article-progress { position: fixed; z-index: 6; inset: var(--wp-admin--admin-bar--height, 0px) 0 auto; height: .27rem; background: var(--green); transform-origin: left; pointer-events: none; }
.reader-story-contents { max-width: 48rem; margin: 0 auto 1rem; border-top: .2rem solid var(--green); background: var(--surface); }
.reader-story-contents details { padding: .65rem .8rem; }
.reader-story-contents summary { font-size: .95rem; font-weight: 850; cursor: pointer; }
.reader-story-contents ul { display: grid; gap: .18rem; list-style: none; margin: .55rem 0 0; padding: 0; }
.reader-story-contents li { min-width: 0; }
.reader-story-contents .reader-contents-subsection { padding-inline-start: .6rem; }
.reader-story-contents a { display: block; padding: .4rem .48rem; color: var(--deep); font-size: .9rem; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.reader-story-contents a:hover { text-decoration: underline; }
.reader-story-contents [aria-current="location"] { box-shadow: inset .18rem 0 var(--green); background: #e5eee1; font-weight: 800; }
.reader-story-layout :is(h2, h3)[id] { scroll-margin-block-start: calc(var(--wp-admin--admin-bar--height, 0px) + 1.25rem); }

@media (min-width: 1000px) {
    .reader-story-layout.has-reader-contents { display: grid; grid-template-columns: minmax(10rem, 13rem) minmax(0, 48rem); gap: clamp(1.25rem, 4vw, 3.2rem); align-items: start; justify-content: center; }
    .has-reader-contents .reader-story-contents { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.25rem); max-height: 63dvh; overflow: auto; margin: 0; }
    .has-reader-contents .prose { width: 100%; }
}

html:has(.reader-dialog) { scrollbar-gutter: stable; }
html:has(.reader-dialog:modal) { overflow: hidden; }
.reader-dialog { box-sizing: border-box; max-height: calc(100dvh - 2rem); width: min(100% - 2rem, 64rem); max-width: none; padding: 0; border: 1px solid var(--deep); background: var(--surface); color: var(--ink); box-shadow: 0 1.4rem 5rem #071f1bb0; overflow: auto; }
.reader-dialog:not([open]) { display: none; }
.reader-dialog::backdrop { background: #081b19c9; backdrop-filter: blur(5px); }
.reader-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem clamp(.75rem, 3vw, 1.65rem); border-bottom: .24rem solid var(--lime); background: var(--deep); color: white; }
.reader-dialog-head h2 { margin: 0; font: 900 clamp(1.2rem, 3vw, 1.9rem)/1.1 var(--sans); letter-spacing: -.04em; }
.reader-dialog-head form { margin: 0; }
.reader-dialog-head .reader-button { border-color: #73978b; background: var(--deep); color: white; }
.reader-dialog-head .reader-button:hover { background: var(--lime); border-color: var(--lime); color: var(--deep); }
.reader-dialog-head .reader-button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--deep); }
.reader-dialog-head .reader-button:focus-visible { outline-color: var(--lime); }
.reader-tour-stage { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); min-height: min(48dvh, 31rem); touch-action: pan-y pinch-zoom; }
.reader-tour-cover { display: grid; position: relative; isolation: isolate; place-items: center; overflow: hidden; min-height: 12rem; background: radial-gradient(at 36% 18%, #216a57, var(--deep) 72%); color: var(--lime); }
.reader-tour-cover span { opacity: .24; font: 950 clamp(8rem, 26vw, 20rem)/.85 var(--sans); transform: skewX(-9deg); }
.reader-tour-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.reader-tour-cover img[hidden] { display: none; }
.reader-tour-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: clamp(.65rem, 2vw, 1.25rem); border-inline-start: .2rem solid var(--lime); padding: clamp(1rem, 4vw, 3rem); }
.reader-tour-copy h3 { margin: 0; font: 700 clamp(1.9rem, 4.35vw, 3.7rem)/1.04 var(--serif); letter-spacing: -.047em; text-wrap: pretty; overflow-wrap: anywhere; }
.reader-tour-copy p { margin: 0; max-width: 45ch; }
.reader-tour-meta { display: flex; flex-wrap: wrap; gap: .35rem .65rem; align-items: center; color: var(--muted); font-size: .875rem; }
.reader-tour-meta span { color: var(--green); font-weight: 850; text-transform: uppercase; letter-spacing: .035em; }
.reader-tour-controls { display: grid; grid-template-columns: auto minmax(0, 13rem) auto; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem clamp(.75rem, 3vw, 1.65rem); background: #e7ebdf; }
.reader-tour-position { display: flex; align-items: center; justify-content: center; gap: .55rem; color: var(--deep); font-size: .875rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reader-tour-position progress { flex: 1 1 3rem; min-width: 0; height: .45rem; appearance: none; border: 0; border-radius: 1rem; background: #b8c6ba; color: var(--green); overflow: hidden; }
.reader-tour-position progress::-webkit-progress-bar { background: #b8c6ba; }
.reader-tour-position progress::-webkit-progress-value { background: var(--green); }
.reader-tour-position progress::-moz-progress-bar { background: var(--green); }
.reader-tour-presenting[open] { display: flex; flex-direction: column; position: fixed; inset: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; }
.reader-tour-presenting .reader-tour-stage { flex: 1 0 auto; }
.reader-tour-presenting .reader-tour-copy h3 { font-size: clamp(2rem, 6vw, 6.1rem); }
.reader-tour-presenting .reader-tour-copy { padding: clamp(1rem, 5vw, 5rem); }

.reader-list-dialog { max-width: 35rem; }
.reader-list-body { padding: clamp(.9rem, 4vw, 1.65rem); }
.reader-list-body p:first-child { margin-top: 0; color: var(--muted); }
.reader-list-body ul { margin: 0; padding: 0; list-style: none; }
.reader-list-body li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--line); padding: .7rem 0; }
.reader-list-body li a { color: var(--deep); font-weight: 750; overflow-wrap: anywhere; text-underline-offset: .17em; }
.reader-card-dialog { max-width: 33rem; }
.reader-card-body { display: grid; justify-items: center; padding: clamp(.8rem, 3vw, 1.4rem); gap: .8rem; }
.reader-card-body canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 54dvh; border: 1px solid var(--line); }
.reader-card-body .reader-tool-buttons { justify-content: center; }
.reader-card-body input { width: 100%; padding: .5rem; border: 1px solid var(--line); }
.reader-card-status { margin: 0; color: var(--muted); font-size: .875rem; }
.reader-card-status:empty { display: none; }
.reader-gallery-image { display: grid; min-height: 5rem; margin: 0; background: #071b18; color: white; }
.reader-gallery-image img { display: block; width: 100%; height: min(61dvh, 42rem); object-fit: contain; }
.reader-gallery-image img[hidden], .reader-gallery [data-gallery-controls][hidden] { display: none; }
.reader-gallery-image figcaption { margin: 0; padding: .6rem 1rem; text-align: center; overflow-wrap: anywhere; }
.reader-gallery-image figcaption:empty { display: none; }

@media (max-width: 650px) {
    .reader-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
    .reader-tour-stage { grid-template-columns: 1fr; }
    .reader-tour-cover { min-height: clamp(8rem, 26dvh, 15rem); }
    .reader-tour-copy { border-inline-start: 0; border-block-start: .2rem solid var(--lime); }
    .reader-tour-controls { gap: .45rem; }
    .reader-tour .reader-dialog-head { flex-wrap: wrap; }
    .reader-tour-presenting .reader-tour-cover { min-height: 31dvh; }
}

@media (max-width: 360px) {
    .reader-tour-position progress { display: none; }
}
