:root {
  --ink: #201032;
  --purple: #25003d;
  --paper: #f4f1f6;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 50% 0, rgb(122 72 160 / 0.12), transparent 26rem), var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.viewer-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px max(18px, env(safe-area-inset-left));
  color: #fff;
  background: rgb(37 0 61 / 0.92);
  border-bottom: 1px solid rgb(255 255 255 / 0.14);
  box-shadow: 0 10px 30px rgb(22 0 39 / 0.2);
  backdrop-filter: blur(16px) saturate(140%);
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 116px;
  height: 44px;
  padding: 5px 9px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.55), 0 6px 18px rgb(14 0 24 / 0.2);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.title-group { min-width: 0; }
.title-group h1, .title-group p { margin: 0; }
.title-group h1 { font-size: 16px; font-weight: 700; letter-spacing: 0.03em; }
.title-group p { margin-top: 3px; overflow: hidden; color: rgb(255 255 255 / 0.68); font-size: 11px; letter-spacing: 0.04em; text-overflow: ellipsis; white-space: nowrap; }

.back-to-top {
  padding: 8px 11px;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}

.brochure {
  display: flex;
  width: min(100%, 920px);
  margin-inline: auto;
  padding: clamp(14px, 3vw, 30px);
  flex-direction: column;
  gap: clamp(14px, 2vw, 24px);
}

.page {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 45px rgb(32 16 50 / 0.12), 0 2px 8px rgb(32 16 50 / 0.08);
}

.page img { display: block; width: 100%; height: auto; }

.page figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border: 1px solid rgb(255 255 255 / 0.34);
  border-radius: 999px;
  color: #fff;
  background: rgb(28 8 43 / 0.66);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

footer {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: center;
  padding: 30px 20px calc(36px + env(safe-area-inset-bottom));
  color: #5e4a6c;
  font-size: 12px;
  letter-spacing: 0.05em;
}

footer strong { color: var(--purple); font-size: 14px; }

@media (max-width: 520px) {
  .viewer-header { min-height: 64px; padding-block: 10px; }
  .brand-logo { width: 102px; height: 40px; padding: 5px 8px; }
  .title-group h1 { font-size: 14px; }
  .back-to-top { padding: 7px 9px; font-size: 11px; }
  .brochure { padding: 10px; gap: 10px; }
  .page { border-radius: 4px; box-shadow: 0 8px 22px rgb(32 16 50 / 0.11); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
