:root {
  color-scheme: light;
  --navy: #061a33;
  --navy-soft: #0b2b51;
  --blue: #0b3f91;
  --red: #e51b23;
  --ink: #152033;
  --muted: #667085;
  --paper: #eef2f6;
  --line: #dbe2ea;
  --white: #fff;
  --shadow: 0 22px 60px rgba(4, 24, 46, .16);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #dfe5ec; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.catalog-app { width: min(100%, 720px); min-height: 100vh; margin: 0 auto; overflow: hidden; background: var(--paper); box-shadow: 0 0 80px rgba(6, 26, 51, .18); }
.topbar { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; height: 64px; align-items: center; padding: 0 16px; border-bottom: 1px solid rgba(219, 226, 234, .8); background: rgba(255, 255, 255, .95); backdrop-filter: blur(16px); }
.back-link { color: var(--blue); font-size: 13px; font-weight: 800; text-decoration: none; }
.brand { display: grid; text-align: center; line-height: 1; }
.brand strong { color: var(--navy); font-size: 15px; font-weight: 950; letter-spacing: .09em; }
.brand span { margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .2em; }
.page-badge { justify-self: end; padding: 7px 9px; color: var(--blue); border: 1px solid #cbd8ea; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }

.catalog-hero { position: relative; min-height: 440px; overflow: hidden; padding: 62px 26px 34px; color: #fff; background: radial-gradient(circle at 82% 22%, rgba(24, 83, 159, .85), transparent 31%), linear-gradient(145deg, #061a33 0%, #082d5f 67%, #0d4a91 100%); }
.catalog-hero::before { content: ""; position: absolute; top: 42px; right: -118px; width: 290px; height: 290px; border: 44px solid rgba(255, 255, 255, .045); border-radius: 50%; }
.catalog-hero::after { content: ""; position: absolute; left: 26px; bottom: 0; width: 52px; height: 5px; background: var(--red); }
.eyebrow { margin: 0; color: #91b6eb; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.catalog-hero h1 { position: relative; z-index: 1; margin: 18px 0 15px; font-size: clamp(48px, 15vw, 76px); line-height: .98; letter-spacing: -.065em; }
.hero-copy { position: relative; z-index: 1; max-width: 420px; margin: 0; color: #cfdaea; font-size: 14px; line-height: 1.75; }
.hero-meta { position: relative; z-index: 1; display: flex; gap: 18px; margin-top: 26px; }
.hero-meta span { display: grid; color: #aabbd0; font-size: 10px; }
.hero-meta b { margin-bottom: 4px; color: #fff; font-size: 17px; }
.primary { position: relative; z-index: 1; min-height: 46px; margin-top: 28px; padding: 0 19px; border: 0; color: #fff; border-radius: 8px; background: var(--red); box-shadow: 0 10px 28px rgba(229, 27, 35, .3); font-weight: 900; }
.hero-word { position: absolute; right: -24px; bottom: 8px; color: rgba(255, 255, 255, .045); font-size: 70px; font-weight: 950; letter-spacing: -.07em; }

.reader { padding: 26px 14px 18px; scroll-margin-top: 64px; }
.reader-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 11px; }
.reader-toolbar strong { color: var(--navy); font-size: 13px; text-align: center; }
.tool-button { padding: 8px 6px; border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 850; }
.tool-button:last-child { justify-self: end; }
.progress-track { height: 3px; overflow: hidden; border-radius: 99px; background: #d5dde7; }
.progress-track span { display: block; width: 2.5%; height: 100%; background: var(--red); transition: width .25s ease; }
.page-stage { position: relative; display: grid; min-height: 0; margin-top: 12px; place-items: center; overflow: hidden; border-radius: 10px; background: transparent; box-shadow: var(--shadow); touch-action: pan-y; }
.page-stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.26), transparent 30%); pointer-events: none; }
.page-frame { position: relative; z-index: 1; width: 100%; margin: 0; padding: 0; }
.page-frame img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: 3px; background: #fff; }
.page-frame figcaption { margin: 0; padding: 8px 10px; color: #6b7788; background: #eef2f6; font-size: 10px; text-align: center; }
.side-control { position: absolute; z-index: 3; top: 50%; display: grid; width: 36px; height: 52px; place-items: center; border: 0; color: #fff; background: rgba(6, 26, 51, .7); font-size: 29px; transform: translateY(-50%); }
.side-control.previous { left: 0; border-radius: 0 9px 9px 0; }
.side-control.next { right: 0; border-radius: 9px 0 0 9px; }
.side-control:disabled, .page-controls button:disabled { opacity: .28; cursor: default; }
.loading { position: absolute; z-index: 4; padding: 9px 12px; color: #fff; border-radius: 999px; background: rgba(6, 26, 51, .82); font-size: 11px; }
.loading.hidden { display: none; }
.page-controls { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 15px; }
.page-controls button { min-height: 40px; padding: 0 11px; border: 1px solid var(--line); color: var(--blue); border-radius: 8px; background: #fff; font-size: 11px; font-weight: 850; }
.page-controls input { width: 100%; accent-color: var(--red); }
.swipe-hint { margin: 10px 0 0; color: var(--muted); font-size: 10px; text-align: center; }

.catalog-note { margin: 8px 14px 28px; padding: 24px 20px; border: 1px solid #cbd8ea; border-radius: 16px; background: #f7faff; }
.catalog-note .eyebrow { color: var(--blue); }
.catalog-note h2 { margin: 8px 0; font-size: 22px; }
.catalog-note p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.catalog-note span { display: inline-block; margin-top: 15px; padding: 7px 9px; color: var(--blue); border-radius: 6px; background: #e7effb; font-size: 10px; font-weight: 850; }

dialog { padding: 0; border: 0; }
dialog::backdrop { background: rgba(3, 14, 29, .76); backdrop-filter: blur(4px); }
.sheet-dialog { width: min(100% - 18px, 700px); max-height: 86vh; margin: auto auto 0; border-radius: 22px 22px 0 0; background: #f5f7fa; }
.sheet-shell { padding: 20px 14px max(22px, env(safe-area-inset-bottom)); }
.sheet-shell header { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 14px; }
.sheet-shell header .eyebrow { color: var(--blue); }
.sheet-shell h2 { margin: 5px 0 0; font-size: 23px; }
.sheet-shell header button, .zoom-shell header button { display: grid; min-width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); color: var(--navy); border-radius: 9px; background: #fff; font-weight: 850; }
.thumbnail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 68vh; overflow-y: auto; padding: 2px 3px 14px; }
.thumbnail-grid button { position: relative; padding: 5px; border: 2px solid transparent; border-radius: 9px; background: #fff; box-shadow: 0 5px 15px rgba(7,31,60,.08); }
.thumbnail-grid button.active { border-color: var(--red); }
.thumbnail-grid img { display: block; width: 100%; border-radius: 3px; }
.thumbnail-grid span { position: absolute; right: 8px; bottom: 8px; display: grid; width: 23px; height: 23px; place-items: center; color: #fff; border-radius: 50%; background: rgba(6,26,51,.84); font-size: 9px; font-weight: 850; }

.zoom-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; background: #09121e; }
.zoom-shell { display: grid; height: 100%; grid-template-rows: 58px 1fr; }
.zoom-shell header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: #fff; background: #06101d; }
.zoom-shell header div { display: flex; gap: 6px; }
.zoom-shell header button { min-width: 34px; height: 34px; color: #fff; border-color: #334155; background: #152235; font-size: 12px; }
.zoom-stage { overflow: auto; padding: 18px; text-align: center; touch-action: pan-x pan-y pinch-zoom; }
.zoom-stage img { width: calc(100% * var(--zoom, 1)); max-width: none; height: auto; transform-origin: top center; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 40px); padding: 10px 14px; color: #fff; border-radius: 999px; background: rgba(6,26,51,.94); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 620px) {
  .catalog-hero { min-height: 500px; padding: 76px 50px 42px; }
  .reader { padding-inline: 30px; }
  .thumbnail-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
