/*!
 * Inkfold public theme
 * Author: Ahsan Alam (https://artintechsolution.com/)
 * --brand and --accent come from Settings → Appearance.
 */
:root {
    --brand: #1f3a5f;
    --accent: #c8102e;
    --ink: #14161a;
    --text: #2a2f37;
    --muted: #6b7380;
    --line: #e2e4e8;
    --paper: #fbfaf7;
    --bg: #f3f2ee;
    --white: #ffffff;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(20, 22, 26, .06), 0 8px 24px rgba(20, 22, 26, .06);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); margin: 0; line-height: 1.2; }
p { margin: 0 0 1rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.topbar { background: var(--ink); color: #c9ccd2; font-size: 12.5px; }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: #e3e5e9; }
.topbar a:hover { color: #fff; }
.topbar .grow { flex: 1; }
.topbar .social a { margin-left: 10px; font-size: 14px; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding-top: 20px; padding-bottom: 16px; }
.masthead .logo { text-align: center; }
.masthead .logo a { font: 700 44px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; }
.masthead .logo img { max-height: 76px; }
.masthead .logo small { display: block; font: italic 14px/1.3 var(--serif); color: var(--muted); margin-top: 6px; }
.masthead .left { font-size: 13px; color: var(--muted); }
.masthead .left strong { display: block; color: var(--ink); font-size: 14px; }
.masthead .right { display: flex; justify-content: flex-end; }
.search-mini { display: flex; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; background: #fff; }
.search-mini input { border: 0; padding: 8px 14px; font: inherit; font-size: 14px; width: 190px; outline: 0; background: transparent; }
.search-mini button { border: 0; background: none; padding: 0 14px; color: var(--muted); cursor: pointer; }
.mainnav { background: var(--brand); position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 0 var(--accent); }
.mainnav .wrap { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mainnav .wrap::-webkit-scrollbar { display: none; }
.mainnav a { color: rgba(255,255,255,.88); padding: 12px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.mainnav a:hover, .mainnav a.active { color: #fff; background: rgba(255,255,255,.1); }
.mainnav .home { font-size: 16px; }
.ad-row { padding: 16px 0 0; text-align: center; }

/* ---------- Generic blocks ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 20px; }
.section-head h2 { font-size: 24px; }
.section-head a { font-size: 13.5px; font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 30px; font: 600 14px/1.2 var(--sans); border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { filter: brightness(1.1); color: #fff; border-color: var(--brand); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.08); color: #fff; border-color: var(--accent); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.alert { padding: 12px 16px; border-radius: 8px; margin: 16px 0; border: 1px solid; }
.alert.success { background: #ebf7ef; border-color: #bfe5cb; color: #14532d; }
.alert.error { background: #fdecec; border-color: #f3c3c3; color: #7f1d1d; }
.alert.info { background: #eef3fb; border-color: #c9d7ef; color: #1e3a6b; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--muted); }
.pill.premium { background: #1b1b1b; color: #ffd76a; }
.pill.accent { background: var(--accent); color: #fff; }

/* ---------- Home hero: today's edition ---------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 44px; padding-top: 36px; padding-bottom: 40px; align-items: center; }
.hero-cover { position: relative; display: block; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 24px 50px rgba(20, 22, 26, .22); transform: rotate(-1.2deg); transition: transform .3s; background: #fff; }
.hero-cover:hover { transform: rotate(0) scale(1.01); }
.hero-cover img { display: block; width: 100%; border-radius: 4px; }
.hero-cover .badge { position: absolute; top: 14px; left: -10px; background: var(--accent); color: #fff; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px; border-radius: 3px; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.hero-text .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--accent); }
.hero-text h1 { font-size: 46px; margin: 10px 0 8px; }
.hero-text .date { font: italic 20px/1.4 var(--serif); color: var(--muted); margin-bottom: 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-pages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.hero-pages a { display: block; position: relative; }
.hero-pages img { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 3px; background: #fff; transition: transform .15s, box-shadow .15s; }
.hero-pages a:hover img { transform: translateY(-3px); box-shadow: var(--shadow); }
.hero-pages span { position: absolute; bottom: 4px; left: 4px; background: rgba(20,22,26,.8); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.hero-empty { padding: 60px 0; text-align: center; }

/* ---------- Edition cards ---------- */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px 22px; }
.cover { display: block; color: inherit; }
.cover .img { position: relative; background: #fff; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 26px rgba(20,22,26,.12); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.cover:hover .img { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 18px 34px rgba(20,22,26,.18); }
.cover img { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; object-position: top; }
.cover .img .pill { position: absolute; top: 8px; right: 8px; }
.cover .band { height: 4px; }
.cover h3 { font-size: 17px; margin-top: 12px; }
.cover .meta { font-size: 13px; color: var(--muted); }
.cover:hover h3 { color: var(--accent); }

/* ---------- Publication page & calendar ---------- */
.pub-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 30px 0; }
.pub-head .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pub-head h1 { font-size: 36px; }
.pub-head .grow { flex: 1; }
.pub-head img.logo { max-height: 64px; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.calendar { padding: 16px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.calendar-head strong { font-family: var(--serif); font-size: 18px; }
.calendar-head a, .calendar-head span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); }
.calendar-head span { opacity: .35; }
.calendar table { width: 100%; border-collapse: collapse; text-align: center; font-size: 13.5px; }
.calendar th { font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0; text-transform: uppercase; }
.calendar td { padding: 2px; }
.calendar td a, .calendar td span { display: block; padding: 7px 0; border-radius: 6px; }
.calendar td a { background: var(--brand); color: #fff; font-weight: 700; }
.calendar td a:hover { background: var(--accent); color: #fff; }
.calendar td span { color: #b5b9c0; }
.calendar td.today span, .calendar td.today a { box-shadow: inset 0 0 0 2px var(--accent); }
.side-box { margin-bottom: 24px; }
.side-box h3 { font-size: 18px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.side-box ul { list-style: none; margin: 0; padding: 6px 0; }
.side-box li a { display: flex; justify-content: space-between; padding: 8px 16px; color: var(--text); }
.side-box li a:hover { background: var(--bg); }

/* ---------- Archive filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.filters select, .filters input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }

/* ---------- Story & clip pages ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding: 34px 0; align-items: start; }
.story-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.story .kicker { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; color: var(--accent); }
.story h1 { font-size: 36px; margin: 8px 0 12px; }
.story .source { font-size: 13.5px; color: var(--muted); padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.story .clipping { background: var(--paper); border: 1px solid var(--line); padding: 14px; border-radius: 6px; text-align: center; margin-bottom: 22px; }
.story .clipping img { box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.story .body { font: 18px/1.75 var(--serif); color: #23262b; }
.story .continued { margin-top: 18px; padding: 12px 16px; background: var(--bg); border-left: 4px solid var(--accent); border-radius: 4px; font-weight: 600; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 0; }
.share a, .share button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 16px; cursor: pointer; }
.share a:hover, .share button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Search ---------- */
.search-bar { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 10px; margin-bottom: 26px; }
.search-bar input, .search-bar select { padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; min-width: 0; }
.result { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.result img { width: 140px; height: 100px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.result h3 { font-size: 20px; margin-bottom: 4px; }
.result mark { background: #fff2b3; padding: 0 2px; }

/* ---------- Static pages & forms ---------- */
.prose { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 40px; box-shadow: var(--shadow); }
.prose h1 { font-size: 34px; margin-bottom: 18px; }
.prose h2 { font-size: 24px; margin: 26px 0 10px; }
.prose p, .prose li { font: 17px/1.75 var(--serif); }
.form-card { max-width: 440px; margin: 40px auto; padding: 32px; }
.form-card h1 { font-size: 28px; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field input { width: 100%; padding: 11px 14px; border: 1px solid #d3d6dc; border-radius: 8px; font: inherit; }
.field input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,58,95,.15); }
.field .error { color: #b91c1c; font-size: 13px; margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aab0ba; margin-top: 40px; font-size: 14px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 24px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font: 700 15px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.site-footer .brand { font: 700 28px/1.1 var(--serif); color: #fff; margin-bottom: 10px; }
.site-footer a { color: #d5d9df; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }

/* ---------- Ad slots ---------- */
.ad-slot { text-align: center; margin: 0 auto; }
.ad-slot img { display: block; margin: 0 auto; border-radius: 4px; }
.ad-slot .ad-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #9aa0a8; margin-bottom: 4px; }

/* ---------- Pagination ---------- */
.ink-pagination { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; padding: 20px 0; }
.ink-pagination a, .ink-pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border-radius: 30px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; }
.ink-pagination .active { background: var(--brand); color: #fff; border-color: var(--brand); }
.ink-pagination .disabled { opacity: .4; }

/* =================== E-paper reader =================== */
body.reader-body { background: #23272e; overflow: hidden; }
.reader { display: grid; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; color: #e6e8eb; }
.r-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #15181d; border-bottom: 1px solid #2f343c; flex-wrap: wrap; position: relative; z-index: 20; }
.r-brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-right: 8px; min-width: 0; }
.r-brand:hover { color: #fff; }
.r-brand .mark { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 17px/1 var(--serif); flex: none; }
.r-brand strong { display: block; font: 700 15px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.r-brand small { display: block; color: #9aa1ab; font-size: 12px; white-space: nowrap; }
.r-group { display: flex; align-items: center; gap: 4px; background: #22262d; border-radius: 8px; padding: 3px; }
.r-btn { min-width: 34px; height: 34px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: #d7dbe0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 13px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.r-btn:hover { background: #343a43; color: #fff; }
.r-btn.on { background: var(--accent); color: #fff; }
.r-btn[disabled] { opacity: .35; cursor: default; background: none; }
.r-btn i { font-size: 16px; }
.r-select, .r-date { height: 34px; border: 0; border-radius: 6px; background: #2c3139; color: #fff; font: 600 13px var(--sans); padding: 0 8px; }
.r-date::-webkit-calendar-picker-indicator { filter: invert(1); }
.r-spacer { flex: 1; }
.r-zoom { min-width: 48px; text-align: center; font-size: 12px; color: #9aa1ab; }
.r-body { display: grid; grid-template-columns: 150px minmax(0, 1fr) 300px; min-height: 0; }
.r-body.no-side { grid-template-columns: 150px minmax(0, 1fr); }
.r-thumbs { overflow-y: auto; background: #1b1e24; border-right: 1px solid #2f343c; padding: 10px; }
.r-thumbs .supp { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8d949f; margin: 10px 2px 6px; font-weight: 700; }
.r-thumb { display: block; margin-bottom: 10px; color: #b9bec6; font-size: 11.5px; text-align: center; position: relative; }
.r-thumb img { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; object-position: top; border-radius: 3px; border: 2px solid transparent; background: #fff; }
.r-thumb.active img { border-color: var(--accent); }
.r-thumb.active { color: #fff; font-weight: 700; }
.r-thumb .lock { position: absolute; inset: 0 0 18px; display: grid; place-items: center; background: rgba(20,22,26,.55); color: #ffd76a; font-size: 20px; border-radius: 3px; }
.r-stage { position: relative; overflow: hidden; background: #2a2f37; cursor: grab; touch-action: none; }
.r-stage.dragging { cursor: grabbing; }
.r-stage.clipping { cursor: crosshair; }
.r-sheet { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 10px 40px rgba(0,0,0,.45); background: #fff; }
.r-sheet img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.r-hot { position: absolute; border: 2px solid transparent; border-radius: 2px; cursor: pointer; transition: background .15s, border-color .15s; }
.r-hot:hover, .r-hot.flash { background: rgba(255, 213, 79, .22); border-color: rgba(230, 160, 0, .9); }
.r-stage.show-hot .r-hot { background: rgba(255, 213, 79, .12); border-color: rgba(230, 160, 0, .55); }
.r-stage.clipping .r-hot { pointer-events: none; }
.r-clipbox { position: absolute; border: 2px dashed #fff; background: rgba(200, 16, 46, .18); box-shadow: 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }
.r-lock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.r-lock .box { position: relative; z-index: 1; background: #fff; color: var(--ink); border-radius: 14px; padding: 30px; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.r-lock .box i { font-size: 34px; color: #d39b00; }
.r-lock .box h2 { font-size: 24px; margin: 8px 0; }
.r-lock .preview { position: absolute; inset: 0; background-size: cover; background-position: top; filter: blur(14px) brightness(.65); transform: scale(1.06); }
.r-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(21,24,29,.75); color: #fff; font-size: 22px; cursor: pointer; z-index: 5; display: grid; place-items: center; }
.r-nav:hover { background: var(--accent); }
.r-nav.prev { left: 14px; } .r-nav.next { right: 14px; }
.r-nav[disabled] { display: none; }
.r-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(21,24,29,.85); color: #fff; padding: 8px 16px; border-radius: 30px; font-size: 13px; z-index: 6; pointer-events: none; transition: opacity .3s; }
.r-side { overflow-y: auto; background: #1b1e24; border-left: 1px solid #2f343c; padding: 14px; }
.r-side h3 { color: #fff; font: 700 13px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; margin: 4px 0 10px; }
.r-stories a { display: block; padding: 9px 10px; border-radius: 6px; color: #d7dbe0; font-size: 13.5px; line-height: 1.35; border-bottom: 1px solid #2a2f37; }
.r-stories a:hover { background: #2a2f37; color: #fff; }
.r-stories small { display: block; color: var(--accent); filter: brightness(1.6); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.r-side .ad-slot { margin: 16px 0; }
.r-side .r-edition { font-size: 12.5px; color: #9aa1ab; border-top: 1px solid #2f343c; padding-top: 12px; margin-top: 12px; }
.r-side .r-edition a { color: #fff; }

/* Modal (story, clip, share) */
.modal { position: fixed; inset: 0; background: rgba(10, 12, 15, .72); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: #fff; color: var(--text); border-radius: 14px; width: 100%; max-width: 760px; box-shadow: 0 30px 80px rgba(0,0,0,.5); position: relative; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-head .pill { margin-right: auto; }
.modal-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; flex: none; }
.modal-body { padding: 22px 26px 26px; }
.modal-body h2 { font-size: 28px; margin-bottom: 14px; }
.modal-body .clipping { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 12px; text-align: center; margin-bottom: 18px; }
.modal-body .clipping img { max-height: 60vh; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.modal-body .text { font: 17px/1.75 var(--serif); }
.modal-body .jump { margin-top: 16px; padding: 10px 14px; background: var(--bg); border-left: 4px solid var(--accent); border-radius: 4px; font-weight: 600; display: block; color: var(--ink); width: 100%; text-align: left; cursor: pointer; border-top: 0; border-right: 0; border-bottom: 0; font-family: var(--sans); font-size: 14px; }
.copy-row { display: flex; gap: 8px; margin-top: 14px; }
.copy-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; min-width: 0; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .r-body { grid-template-columns: 120px minmax(0, 1fr); }
    .r-side { display: none; }
    .layout-side, .story { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
    .hero-cover { max-width: 380px; margin: 0 auto; }
    .hero-text h1 { font-size: 34px; }
    .masthead .wrap { grid-template-columns: 1fr; text-align: center; }
    .masthead .left, .masthead .right { display: none; }
    .site-footer .cols { grid-template-columns: 1fr; }
    .search-bar { grid-template-columns: 1fr 1fr; }
    .search-bar input[name=q] { grid-column: span 2; }
}
@media (max-width: 720px) {
    .r-body, .r-body.no-side { grid-template-columns: minmax(0, 1fr); }
    .r-thumbs { display: none; }
    .r-brand strong { max-width: 140px; }
    .r-hide-sm { display: none !important; }
    .hero-pages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .masthead .logo a { font-size: 32px; }
    .story-main, .prose { padding: 22px; }
    .story h1 { font-size: 28px; }
    .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
    .result { grid-template-columns: 90px minmax(0, 1fr); }
    .result img { width: 90px; height: 70px; }
}
