/* DOOMRAT: ink, uncoated paper, panel gutters. Approved art stays untouched. */
:root {
  --page-width: 1680px;
  --page-gutter: clamp(20px, 4vw, 88px);
  --muted: #665b4c;
  --print-rule: #332d25;
  --print-space: clamp(56px, 6vw, 104px);
  --print-ease: cubic-bezier(.23, 1, .32, 1);
  --motion-press:120ms;
  --motion-ui:200ms;
  --motion-dialog:250ms;
  --motion-reveal:600ms;
  --motion-group:300ms;
  --motion-stagger:50ms;
  --print-shadow: 5px 10px 18px #32271b26;
}
body {
  background-image: none;
  background-size: auto, 100% 100svh;
  background-attachment: scroll;
}
::selection { color: var(--paper); background: var(--red); }
html { scrollbar-color: #9b8670 #f5ebd5; scrollbar-width: thin; }
:where(a,button,summary) { -webkit-tap-highlight-color: #a13e3622; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.ui-icon { display: inline-block; width: 22px; height: 22px; flex: 0 0 22px; vertical-align: middle; }
.print-rails { position: absolute; inset: 20px calc(var(--page-gutter) * -.5); z-index: 0; pointer-events: none; color: var(--muted); }
.print-rail-title { position: absolute; top: 50%; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); font: 600 11px/1 var(--text); letter-spacing: .16em; }
.print-rail-inks { position: absolute; right: 0; bottom: 16px; display: grid; gap: 4px; }
.print-rail-inks i { width: 9px; height: 18px; background: var(--ink); }
.print-rail-inks i:nth-child(2) { background: var(--red); }
.print-rail-inks i:nth-child(3) { background: #b99e77; }
.home-page .opening-header { --dock-height: 92px; }
.home-page .masthead-mark { width: 68px; height: 68px; }
.opening-header::before { background: var(--paper); height: calc(var(--header-clearance,160px) - 24px); }
.home-page .masthead-bottom { border-top-width: 2px; padding-block: 5px; letter-spacing: .1em; }
.home-page .masthead-bottom nav { font-size: 15px; }
.home-page .masthead-bottom nav a { min-height: 40px; }
.home-page .intro-meta { border-bottom-color: #332d2540; font-size: 11px; }
.home-page .intro-caption p { letter-spacing: .12em; }
.home-page .intro-scroll { font-size: 11px; }
.scroll-arrow { border-radius: 0; border: 1px solid var(--ink); transform: rotate(-5deg); }
@media(hover:hover) and (pointer:fine) {
  .intro-scroll:hover .scroll-arrow { transform: translateY(3px) rotate(0); }
}
.intro-folio { font-size: 11px; }
.has-intro .opening-header::after {
  content: ''; position: absolute; right: 0; top: 17svh; width: 140px; height: 140px;
  background-image: radial-gradient(var(--red) .9px, transparent 1px); background-size: 7px 7px;
  opacity: calc(var(--intro-opacity,1) * .22); pointer-events: none;
}
.home-page .home-cover { grid-template-columns: minmax(0,.8fr) minmax(0,1.35fr); gap: clamp(28px,4vw,72px); padding: 56px 0 64px; }
.home-page .home-cover h1 { font-family: var(--display); font-weight: 900; font-size: clamp(64px,7vw,96px); letter-spacing: -.025em; line-height: .94; margin: 0 0 28px; }
.marked-word { color: var(--red); }
.marked-word svg { bottom: -8px; }
.home-cover .home-lead { font-size: clamp(20px,1.65vw,25px); line-height: 1.5; letter-spacing: -.02em; margin: 0 0 20px; }
.home-cover .cover-description { max-width: 42ch; font-size: var(--body-size); line-height: 1.75; color: var(--muted); margin: 0 0 28px; }
.home-page .home-hero-art { position: relative; width: 100%; max-width: none; margin: 0; border: 2px solid var(--ink); transform: rotate(1deg); background: var(--paper); }
.home-hero-art img { mix-blend-mode: normal; }
.hero-caption { padding: 12px 18px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-align: right; }
.read-button, .solid-button { box-shadow: none; border: 0; font-size: 16px; font-weight: 700; padding: 18px 24px; min-height: 56px; gap: 32px; transition: background var(--motion-ui) ease, transform var(--motion-press) var(--print-ease); }
.read-button::after, .solid-button::after { display: none; }
.read-button:hover, .solid-button:hover { background: var(--ink); color: var(--paper); }
.home-page .news-strip { padding: 13px 0; background: var(--ink); color: var(--paper); border-block: 0; }
.news-strip > div { padding-inline: 0; }
.news-strip span { font-size: 11px; letter-spacing: .12em; }
.news-strip span+span::before { content: ''; display: inline-block; height: 12px; border-left: 1px solid #f5ebd56b; transform: rotate(20deg); margin-right: 24px; vertical-align: middle; }
/* Publications are objects, not little images boxed beside oversized blurbs. */
.home-page .issues-section { padding: var(--print-space) 0; border-block: 0; position: relative; }
.issues-section::before { display: none; }
.issues-section .section-heading { align-items: end; gap: 24px; border-bottom: 2px solid var(--ink); padding-bottom: 24px; }
.issues-section .section-heading h2 { background: var(--ink); color: var(--paper); padding: 10px 22px 14px; transform: rotate(-1deg); font: 900 clamp(48px,5vw,72px)/.94 var(--display); letter-spacing: -.025em; margin: 0; }
.issue-shelf-note { margin: 0; font-size: 11px; line-height: 1.8; letter-spacing: .07em; }
#issue-count { display: block; color: var(--muted); text-align: right; letter-spacing: 0; font-size: 13px; }
.shelf-filters { margin: 20px 0 40px; gap: 0; border-bottom: 1px solid #332d2540; }
.shelf-filters button { min-height: 48px; border: 0; background: transparent; padding: 12px 20px; font-size: 14px; color: var(--muted); }
.shelf-filters button:first-child { padding-left: 0; padding-right: 24px; }
.shelf-filters button[aria-pressed=true] { background: transparent; color: var(--ink); border-color: transparent; font-weight: 700; }
.shelf-filters button::after { left: 0; bottom: -1px; width: 100%; background: var(--red); height: 3px; transform: scaleX(0); }
.shelf-filters button[aria-pressed=true]::after { transform: scaleX(1); }
.shelf-filters button:hover { color: var(--red); }
.issue-shelf { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 56px; align-items: start; }
.shelf-card { grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 28px; border: 0; background: transparent; transform: none; box-shadow: none; min-width: 0; }
.shelf-card .shelf-art { min-height: 0; border: 0; display: block; align-self: start; box-shadow: var(--print-shadow); transform: rotate(-2deg); transition: transform var(--motion-ui) var(--print-ease); }
.shelf-card:nth-child(even) .shelf-art { transform: rotate(2deg); }
@media(hover:hover) and (pointer:fine) {
  .shelf-card .shelf-art:hover { transform: rotate(0) translateY(-3px); }
}
.shelf-card .shelf-art .shelf-cover { width: 100%; height: auto; max-height: none; aspect-ratio: 2/3; object-fit: contain; }
.shelf-card-copy { padding: 0; min-height: 0; min-width: 0; }
.shelf-edition { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; border-bottom: 1px solid #332d2540; padding: 0 0 12px; }
.status-label { border: 0; padding: 0; font-size: 11px; letter-spacing: .03em; display: inline-flex; align-items: center; gap: 4px; }
.status-label .ui-icon { width: 14px; height: 14px; flex-basis: 14px; }
.shelf-card h3 { font: 800 clamp(32px,2.8vw,46px)/1 var(--display); letter-spacing: -.02em; margin: 20px 0 16px; overflow-wrap: anywhere; text-wrap: balance; }
.shelf-card-copy p { font-size: var(--body-size); line-height: 1.75; margin: 0 0 18px; color: #4d4338; }
.shelf-synopsis { margin: 0 0 24px; font-size: 13px; }
.shelf-synopsis summary { cursor: pointer; color: var(--muted); padding: 6px 0; text-decoration: underline; text-underline-offset: 4px; }
.shelf-synopsis p { margin: 12px 0 0; }
.shelf-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid #332d2540; padding-top: 12px; }
.shelf-meta { font-size: 12px; }
.shelf-link { display: inline-flex; align-items: center; gap: 8px; padding: 0; margin: 0; min-height: 44px; font-size: 14px; font-weight: 700; }
.reading-storage-note { font-size: 12px; margin-top: 36px; }
.soon-card { display: flex; padding: 32px; border: 1px dashed #8f7963; background-image: none; background-color: #e9dcc5; min-height: 280px; }
.soon-card h3 { font: 800 40px/1.05 var(--display); }
.soon-card p { font-size: 16px; }
.shelf-empty { padding: 32px; border: 1px dashed #8f7963; font-size: var(--body-size); line-height: 1.7; }
/* The rest of the journal uses a deliberate panel rhythm. */
.home-page .editorial { display: block; padding: var(--print-space) 0; border-top: 2px solid var(--ink); }
.editorial-copy { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.4fr); gap: 64px; }
.editorial h2 { font: 800 clamp(40px,4vw,64px)/1.02 var(--display); letter-spacing: -.02em; margin: 0; }
.editorial h2 em { display: inline-block; margin-top: 8px; font: italic .8em/1.15 Georgia,serif; }
.editorial-columns { display: block; columns: 2; column-gap: 36px; }
.editorial-columns > div { display: contents; }
.editorial-columns p { font-size: var(--body-size); line-height: 1.85; margin: 0 0 20px; }
.dropcap:first-letter { font: 900 72px/.8 var(--display); margin: 8px 8px 0 0; }
.home-page .themes { grid-template-columns: minmax(0,.75fr) minmax(0,1.4fr); padding: 0 0 var(--print-space); gap: 64px; }
.themes-heading h2 { font: 800 clamp(40px,4vw,64px)/1.02 var(--display); letter-spacing: -.02em; margin: 0; }
.theme-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 2px solid var(--ink); }
.theme-list article { display: block; padding: 24px 24px 28px 0; position: relative; border-bottom: 1px solid #332d2560; }
.theme-list article:first-child { padding-top: 24px; }
.theme-list article:nth-child(even) { padding-left: 24px; padding-right: 0; }
.theme-list h3 { font: 700 26px/1.1 var(--display); letter-spacing: 0; margin: 0 0 12px; padding-right: 18px; }
.theme-list p { font-size: var(--body-size); line-height: 1.8; margin: 0; }
.theme-mark { display: none; }
.home-page .characters { padding: var(--print-space) 0; border-top: 2px solid var(--ink); }
.characters .section-heading h2 { font: 800 clamp(48px,5vw,72px)/.96 var(--display); letter-spacing: -.025em; margin: 0; }
.character-grid { gap: 32px; margin: 36px 0 0; align-items:stretch; grid-auto-rows:1fr; }
.character-card { grid-template-columns: minmax(0,1fr) minmax(0,1fr); margin: 0; transform: none; box-shadow: none; border: 2px solid var(--ink); }
.character-card:nth-child(2) { margin: 0; transform: none; }
.character-image { min-height:0; border:0; position:relative; align-self:start; }
.character-image.character-doom,.character-image.character-mik { aspect-ratio:2 / 3; background-size:contain; background-position:center; background-repeat:no-repeat; background-color:var(--paper); }
.character-name { position: absolute; bottom: 18px; left: 0; padding: 8px 20px; font: 800 26px/1 var(--display); color: var(--paper); background: var(--ink); letter-spacing: .04em; }
.character-text { padding: 28px; background: var(--paper); }
.character-text h3 { font: 800 36px/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 20px; }
.character-text h3 em { font-style: normal; font-family: inherit; color: var(--red); }
.character-text p { font-size: var(--body-size); line-height: 1.85; }
.home-page .site-footer, .reader-page .site-footer { margin-top: 0; padding-block: 14px; border-top: 2px solid var(--ink); }
.site-footer .footer-logo { width: 152px; }
.site-footer .footer-meta { font-size: 12px; }
.site-footer .footer-nav a { gap: 8px; min-height: 44px; }
.footer-nav .ui-icon { transform: rotate(180deg); width: 16px; height: 16px; flex-basis: 16px; }
/* In the reader, the original page is the entire visual event. */
.reader-page .reader-masthead { width: min(1680px,calc(100% - 2 * var(--reader-gutter))); gap: 24px; min-height: 60px; }
.reader-back { gap: 8px; font-size: 14px; }
.reader-issue-label { color: var(--ink); font-size: 13px; }
#bookmark { border: 1px solid #332d2540; }
#bookmark[aria-pressed=true] { color: var(--red); }
#bookmark[aria-pressed=true] .ui-icon { fill: #a13e3620; }
.reader-page .reader-book { width: min(100%,calc((100svh - 190px) * 1.333333)); }
.reader-page .reader-opening { box-shadow: 3px 6px 14px #32271b26; }
.reader-pager { position: relative; bottom: auto; min-height: 64px; padding: 10px 0; width: min(100%,calc((100svh - 190px) * 1.333333)); gap: 16px; }
.reader-pager > button { min-height: 44px; min-width: 104px; padding: 10px 16px; border: 0; box-shadow: none; font-size: 14px; gap: 12px; }
.reader-pager > button:hover:not(:disabled) { box-shadow: none; background: var(--ink); color: var(--paper); }
.reader-pager .page-location { background: transparent; border: 0; gap: 16px; padding: 0; }
#page-position { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#page-tabs { gap: 2px; }
#page-tabs button { min-height: 40px; min-width: 32px; font-size: 12px; }
.reader-footnote { width: min(100%,calc((100svh - 190px) * 1.333333)); margin-inline: auto; font-size: 11px; }
.reader-ending { width: min(100%,900px); margin-inline: auto !important; }
.reader-ending .end-actions a, .reader-ending .end-actions button { display: inline-flex; align-items: center; gap: 8px; }
.book-backdrop { background: var(--paper); }
#frame-dialog { background: var(--paper); border: 1px solid var(--ink); box-shadow: 10px 18px 60px #201a1450; }
#frame-dialog::backdrop { background: #201a14c2; }
.close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
@media(min-width:1900px) { .home-page .home-cover { padding-block: 72px; } .shelf-card { gap: 40px; } .shelf-card-copy p { font-size: var(--body-size); } }
@media(max-width:1279px) {
  .issue-shelf { grid-template-columns: 1fr; gap: 48px; }
  .shelf-card { grid-template-columns: minmax(0,.7fr) minmax(0,1fr); gap: 44px; max-width: 900px; margin-inline: auto; width: 100%; }
  .shelf-card h3 { font-size: 48px; }
  .shelf-card-copy p { font-size: var(--body-size); }
  .character-card { grid-template-columns: 1fr; grid-template-rows:auto minmax(0,1fr); }
  .editorial-copy, .home-page .themes { gap: 40px; grid-template-columns: minmax(0,.7fr) minmax(0,1.4fr); }
  .editorial-columns { columns: 1; }
  .home-page .home-cover h1 { font-size: 80px; }
}
@media(max-width:1100px) {
  .reader-page .reader-book, .reader-pager, .reader-footnote { width: min(100%,760px); }
  .reader-pager { position: sticky; bottom: 8px; background: var(--paper); padding: 8px; box-shadow: 0 4px 18px #32271b20; }
}
@media(max-width:900px) {
  .home-page .home-cover { grid-template-columns: 1fr; padding-block: 36px; gap: 32px; }
  .home-page .home-cover-copy { max-width: none; }
  .home-cover .cover-description { max-width: 65ch; }
  .home-page .home-hero-art { transform: none; }
  .home-page .home-cover h1 { font-size: 80px; }
  .editorial-copy, .home-page .themes { grid-template-columns: 1fr; gap: 32px; }
  .editorial-columns { columns: 2; }
  .reader-pager .page-location { flex-direction: column; gap: 0; }
  #page-position { font-size: 11px; }
  .print-rails { display: none; }
}
@media(max-width:600px) {
  :root { --page-gutter: 20px; --print-space: 48px; }
  .home-page .opening-header { --dock-height: 76px; }
  .home-page .masthead-mark { width: 52px; height: 52px; }
  .home-page .masthead-bottom { padding-block: 0; }
  .home-page .masthead-bottom nav { font-size: 14px; }
  .home-page .home-cover { gap: 20px; padding-block: 32px 36px; }
  .home-page .home-cover h1 { font-size: clamp(60px,17vw,80px); margin-bottom: 0; order: 1; }
  .home-cover-copy > .home-lead { order: 3; font-size: 20px; margin: 0; }
  .home-cover-copy > .cover-description { order: 4; font-size: 18px; margin: 0; }
  .home-cover-copy > .read-button { order: 5; width: 100%; justify-content: space-between; }
  .home-page .home-hero-art { order: 2; margin: 0; width: 100%; }
  .hero-caption { font-size: 11px; padding: 9px 12px; }
  .news-strip > div { grid-template-columns: 1fr 1fr; gap: 12px; }
  .news-strip span { font-size: 11px; letter-spacing: .08em; }
  .news-strip span+span::before { display: none; }
  .issue-shelf-note { font-size: 11px; }
  .shelf-filters { margin: 16px 0 28px; justify-content: space-between; }
  .shelf-filters button { padding: 10px 8px; font-size: 12px; }
  .shelf-filters button:first-child { padding-right: 12px; }
  .shelf-card { grid-template-columns: 1fr; gap: 26px; align-items: start; }
  .shelf-card .shelf-art { width: min(82%,300px); justify-self: center; }
  .shelf-card h3 { font-size: 40px; margin-block: 16px 12px; }
  .shelf-card-copy p { font-size: 18px; line-height: 1.7; }
  .shelf-edition { font-size: 11px; padding-bottom: 10px; flex-wrap: wrap; }
  .status-label { font-size: 11px; }
  .shelf-card-bottom { align-items: start; flex-direction: column; gap: 0; padding-top: 8px; }
  .shelf-meta { font-size: 11px; }
  .shelf-link { font-size: 13px; }
  .shelf-synopsis { margin-bottom: 16px; font-size: 12px; }
  .shelf-synopsis[open] { grid-column: 1/-1; }
  .editorial-columns { columns: 1; }
  .editorial-columns p { font-size: var(--body-size); }
  .theme-list h3 { font-size: 25px; }
  .theme-list p { font-size: 18px; }
  .theme-list article, .theme-list article:nth-child(even) { padding: 20px 12px 24px 0; }
  .theme-list article:nth-child(even) { padding-left: 0; padding-right: 0; }
  .character-grid { gap: 24px; }
  .character-card { grid-template-columns: 1fr; grid-template-rows:auto minmax(0,1fr); }
  .character-image { background-size: contain; background-position: center; background-repeat: no-repeat; }
  .theme-list { grid-template-columns: 1fr; }

  .character-text { padding: 20px; }
  .character-text h3 { font-size: 30px; }
  .character-text p { font-size: 18px; line-height: 1.7; }
  .character-name { padding: 7px 12px; font-size: 20px; }
  .site-footer .footer-logo { width: 132px; }
  .site-footer .footer-meta { font-size: 11px; }
  .reader-page .reader-masthead { gap: 12px; }
  .reader-back { font-size: 13px; gap: 5px; }
  .reader-issue-label { font-size: 11px; }
  .reader-pager > button { min-width: 44px; padding: 10px; }
  .reader-pager > button > span { display: none; }
  .reader-pager .ui-icon { display: block; }
  .reader-footnote { padding-block: 12px; }
  .has-intro .opening-header::after { width: 70px; height: 70px; top: 27svh; }
}
@media(max-width:380px) {
  .shelf-card { grid-template-columns: 1fr; gap: 24px; }
  .shelf-card .shelf-art { width: 78%; justify-self: center; }
  .shelf-card h3 { font-size: 40px; }
  .shelf-card-copy p { font-size: 18px; }
  .character-card { grid-template-columns: 1fr; grid-template-rows:auto minmax(0,1fr); }
  .reader-pager { gap: 4px; padding-inline: 4px; }
  .reader-pager #page-tabs { background: transparent; border: 0; }
  .reader-pager #page-position { background: transparent; border: 0; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  .shelf-card .shelf-art, .read-button, .solid-button, .scroll-arrow { transition: none; transform: none; }
  .shelf-card:nth-child(even) .shelf-art { transform: none; }
}

.masthead-bottom nav a:hover, .footer-nav a:hover, .shelf-synopsis summary:hover { color: var(--red); }

/* Constrained polish of approved 4cc9411. Composition, print character and footer stay fixed. */
body { background-image:url('assets/decor/print-grain.png'); background-size:128px 128px; }
.opening-header::before { background-image:url('assets/decor/print-grain.png'); background-size:128px 128px; }
.home-cover .cover-description { color:#4d4338; }
.shelf-card h3 { overflow-wrap:break-word; }
.shelf-synopsis summary { min-height:44px; display:list-item; align-content:center; font-size:14px; }
.home-page .masthead-bottom nav a { min-height:44px; }
.read-button .ui-icon,.solid-button .ui-icon,.shelf-link .ui-icon { transition:transform var(--motion-ui) var(--print-ease); }
@media(hover:hover) and (pointer:fine) {
  .read-button:hover .ui-icon,.solid-button:hover .ui-icon,.shelf-link:hover .ui-icon { transform:translateX(3px); }
}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .home-hero-art { transition:transform var(--motion-ui) var(--print-ease); }
  .home-hero-art:hover { transform:rotate(0deg) translateY(-2px); }
  .character-card:hover .character-name { background:var(--red); }
}
@media(max-width:600px) {
  .shelf-filters button { font-size:14px; }
  .shelf-edition,.status-label,.shelf-meta { font-size:12px; }
  .shelf-link { font-size:15px; }
  .shelf-synopsis summary { font-size:14px; }
}
@media(prefers-reduced-motion:reduce) {
  .read-button .ui-icon,.solid-button .ui-icon,.shelf-link .ui-icon { transition:none; transform:none; }
}

/* Wide-screen refinement: the approved journal fills the window, not a 1680px island. */
.home-page { --page-width:100%; --page-gutter:clamp(20px,3vw,88px); }
.home-page .home-cover { gap:clamp(32px,3vw,80px); }
.home-page .home-cover h1 { font-size:clamp(64px,6.8vw,156px); }
.home-cover .home-lead { font-size:clamp(22px,1.4vw,30px); }
.home-cover .cover-description { max-width:46ch; line-height:1.7; }
.home-page .masthead-bottom nav { font-size:clamp(15px,.8vw,18px); }
.hero-caption { font-size:clamp(11px,.65vw,14px); letter-spacing:.1em; }
.home-page .news-strip { padding-block:16px; }
.news-strip span { font-size:clamp(12px,.75vw,17px); letter-spacing:.1em; }
.issues-section .section-heading h2,.characters .section-heading h2 { font-size:clamp(48px,4.2vw,104px); }
.issue-shelf { gap:clamp(40px,3vw,76px); }
.shelf-card { gap:clamp(28px,2vw,48px); }
.shelf-card h3 { font-size:clamp(34px,2.5vw,64px); }
.shelf-edition { font-size:clamp(12px,.65vw,16px); }
.status-label,.shelf-meta { font-size:clamp(12px,.6vw,15px); }
.shelf-link { font-size:clamp(15px,.75vw,18px); }
.shelf-synopsis summary { font-size:clamp(14px,.7vw,17px); }
.editorial h2,.themes-heading h2 { font-size:clamp(42px,3.5vw,88px); }
.editorial-columns { column-gap:clamp(36px,3vw,72px); }
.editorial-columns p,.theme-list p,.character-text p { line-height:1.7; }
.theme-list h3 { font-size:clamp(26px,1.6vw,38px); }
.character-text { padding:clamp(24px,2vw,48px); }
.character-text h3 { font-size:clamp(36px,2.2vw,60px); }
.character-name { font-size:clamp(26px,1.5vw,38px); }
@media(min-width:1600px) {
  .home-page .home-cover { padding-block:48px 64px; }
  .shelf-card-copy { align-self:start; padding:24px; background:#f9f0dc; border-top:3px solid var(--ink); }
  .shelf-card-bottom { margin-top:24px; }
}
@media(max-width:1279px) {
  .home-page .home-cover h1 { font-size:80px; }
  .shelf-card h3 { font-size:48px; }
  .shelf-card { gap:40px; }
}
@media(max-width:900px) {
  .home-page .home-cover { gap:32px; }
  .home-page .home-cover h1 { font-size:80px; }
}
@media(max-width:600px) {
  .home-page .home-cover { gap:20px; }
  .home-page .home-cover h1 { font-size:clamp(60px,17vw,80px); }
  .home-cover .home-lead { font-size:20px; }
  .home-page .news-strip { padding-block:14px; }
  .news-strip span { font-size:12px; }
  .issues-section .section-heading h2,.characters .section-heading h2 { font-size:48px; }
  .shelf-card { gap:26px; }
  .shelf-card h3 { font-size:40px; }
  .shelf-card-copy { padding:0; background:transparent; border:0; }
  .editorial h2,.themes-heading h2 { font-size:40px; }
  .theme-list h3 { font-size:25px; }
  .character-text { padding:20px; }
  .character-text h3 { font-size:30px; }
  .character-name { font-size:20px; }
}

/* Shared motion: ink responds quickly, paper settles softly. No cloned reading surfaces. */
.shelf-stage,#frame-large {
  opacity:1;
  transition:opacity var(--motion-press) var(--print-ease);
}
.shelf-stage[data-surface-phase="out"],#frame-large[data-surface-phase="out"] { opacity:0; }
/* Native anchoring must not pull the filters away while their results reflow. */
html[data-shelf-motion] { overflow-anchor:none; }
[data-shelf-reflow="start"] { transition:none !important; }
[data-shelf-reflow="settle"] { transition:transform var(--motion-press) var(--print-ease); }
.shelf-stage[data-shelf-clip="start"] { clip-path:inset(0); }
.shelf-stage[data-shelf-clip="settle"] { transition:opacity var(--motion-press) var(--print-ease),clip-path var(--motion-press) var(--print-ease); }
[data-motion-skip] { transition:none !important; }
.shelf-filters button::after,.masthead-bottom a::after {
  transition:transform var(--motion-ui) var(--print-ease);
}
.shelf-filters button:active { transform:none; }
.read-button span { transition:none; }
.read-button:hover span { transform:none; }
.read-button,.solid-button,.reader-pager > button,.frame-controls button,.dialog-top button,#bookmark,.end-actions button {
  transition:transform var(--motion-press) var(--print-ease),background-color var(--motion-ui) ease,color var(--motion-ui) ease;
}
:where(.masthead-bottom nav a,.footer-nav a,.shelf-link,.shelf-filters button,.shelf-synopsis summary,.page-transcript summary) {
  transition:color var(--motion-ui) ease;
}
.scroll-arrow { transition:transform var(--motion-ui) var(--print-ease),background-color var(--motion-ui) ease,color var(--motion-ui) ease; }
@media(hover:hover) and (pointer:fine) {
  .read-button:hover,.solid-button:hover { transform:translateY(-2px); }
}
html[data-input="pointer"] :where(.read-button,.solid-button,.reader-pager > button,.frame-controls button,.dialog-top button,#bookmark,.end-actions button):active:not(:disabled) {
  transform:scale(.97);
}
/* Native top-layer entry and exit keep focus, Escape and rapid reopening intact. */
#frame-dialog {
  opacity:1; transform:scale(1); transform-origin:center;
  transition:opacity var(--motion-dialog) var(--print-ease),transform var(--motion-dialog) var(--print-ease),
    display var(--motion-dialog) allow-discrete,overlay var(--motion-dialog) allow-discrete;
}
#frame-dialog:not([open]) { opacity:0; transform:scale(.96); }
#frame-dialog::backdrop {
  opacity:0;
  transition:opacity var(--motion-dialog) var(--print-ease),display var(--motion-dialog) allow-discrete,overlay var(--motion-dialog) allow-discrete;
}
#frame-dialog[open]::backdrop { opacity:1; }
@starting-style {
  #frame-dialog[open] { opacity:0; transform:scale(.96); }
  #frame-dialog[open]::backdrop { opacity:0; }
}
@media(hover:none), (pointer:coarse) {
  .intro-scroll:hover .scroll-arrow { transform:rotate(-5deg); }
}
/* Reduced motion keeps useful fades; the older blanket rule is overridden only here. */
@media(prefers-reduced-motion:reduce) {
  .shelf-stage,#frame-large { transition:opacity var(--motion-press) var(--print-ease) !important; }
  #frame-dialog {
    transform:none !important;
    transition:opacity var(--motion-ui) var(--print-ease),display var(--motion-ui) allow-discrete,overlay var(--motion-ui) allow-discrete !important;
  }
  #frame-dialog::backdrop {
    transition:opacity var(--motion-ui) var(--print-ease),display var(--motion-ui) allow-discrete,overlay var(--motion-ui) allow-discrete !important;
  }
  .read-button:hover,.solid-button:hover,.intro-scroll:hover .scroll-arrow,
  .shelf-card .shelf-art:hover,.shelf-card:nth-child(even) .shelf-art:hover,
  html[data-input="pointer"] :where(.read-button,.solid-button,.reader-pager > button,.frame-controls button,.dialog-top button,#bookmark,.end-actions button):active {
    transform:none !important;
  }
}
html[data-input="keyboard"] { scroll-behavior:auto; }
html[data-anchor-motion] { scroll-behavior:auto !important; overflow-anchor:none; }
html[data-input="keyboard"] :where(a,button,summary,.ui-icon,.scroll-arrow,.shelf-stage,#frame-large,#frame-dialog),
html[data-input="keyboard"] :where(a,button)::after,
html[data-input="keyboard"] #frame-dialog,
html[data-input="keyboard"] #frame-large,
html[data-input="keyboard"] #frame-dialog::backdrop {
  transition:none !important;
}
html[data-input="keyboard"] .shelf-card .shelf-art:focus-visible { transform:rotate(-2deg); }
html[data-input="keyboard"] .shelf-card:nth-child(even) .shelf-art:focus-visible { transform:rotate(2deg); }

/* Armed only after JS mounts; cleanup, keyboard input and focus restore readable content. */
[data-print-enter] { opacity:0; }
html[data-input="keyboard"] [data-print-enter], [data-print-enter]:focus-within { opacity:1; }
