:root {
  color-scheme: light;
  --ink: #153640;
  --muted: #5d737b;
  --accent: #08738a;
  --paper: #fff;
  --canvas: #e9edef;
  --bar: 68px;
  --button-radius: 6px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--bar) + 14px);
}
body {
  margin: 0;
  padding-top: var(--bar);
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
.download-frame {
  position: fixed;
  left: -10000px;
  width: 1px;
  height: 1px;
  border: 0;
  visibility: hidden;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid #0797b7;
  outline-offset: 3px;
}
.toolbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  min-height: var(--bar);
  padding: 10px max(20px, env(safe-area-inset-right)) 10px
    max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #dce3e5;
  box-shadow: 0 2px 16px #183a4506;
}
.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 17px;
  font-weight: 650;
  white-space: nowrap;
}
.brand-divider {
  color: #b1bfc4;
  margin: 0 5px;
  font-weight: 400;
}
.brand-subtitle {
  font-weight: 500;
}
.reader-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.language-button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--button-radius);
  background: transparent;
  color: var(--accent);
  font-size: 14px;
}
.language-button:hover {
  background: #edf6f7;
}
.language-option,
.language-separator {
  color: var(--muted);
}
html[lang="zh-CN"] .language-option[data-language="zh"],
html[lang="en"] .language-option[data-language="en"] {
  color: var(--accent);
  font-weight: 700;
}
.contents-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
  padding: 0 13px;
  border-radius: var(--button-radius);
  color: var(--accent);
  background: #edf6f7;
}
.contents-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}
#progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.12s linear;
}
#reader {
  overflow-anchor: none;
  width: min(100%, 720px);
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page {
  margin: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 1654;
  background: var(--paper);
  box-shadow: 0 3px 18px #17353d0d;
  scroll-margin-top: calc(var(--bar) + 14px);
  isolation: isolate;
}
.page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  user-select: none;
}
.page-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.page-placeholder button {
  margin: auto;
  border: 1px solid #bccfd5;
  border-radius: var(--button-radius);
  color: var(--accent);
  background: #fff;
  padding: 10px 16px;
  min-height: 44px;
}
.page-placeholder.loaded {
  visibility: hidden;
}
.page img.failed {
  visibility: hidden;
}
.hotspot {
  position: absolute;
  z-index: 2;
  left: 11.9%;
  width: 76.6%;
  border-radius: 3px;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.hotspot:hover,
.hotspot:focus-visible {
  background: #e99b1819;
  box-shadow: inset 0 0 0 2px #dc7e15;
  outline-offset: 2px;
}
.hotspot:active {
  background: #e99b182d;
}
.reading-status[hidden] {
  display: none;
}
.reading-status {
  position: fixed;
  z-index: 8;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  padding: 10px 17px;
  border: 1px solid #d5e0e4;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px #15364013;
  pointer-events: none;
  font-size: 13px;
  color: var(--muted);
}
.notice {
  position: fixed;
  z-index: 20;
  top: calc(var(--bar) + 10px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  width: max-content;
  margin: 0;
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  background: #224651;
  font-size: 14px;
  box-shadow: 0 4px 20px #15364022;
}
.noscript {
  padding: 30px;
  text-align: center;
}
@media (max-width: 600px) {
  :root {
    --bar: 60px;
  }
  .toolbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand {
    font-size: 14px;
  }
  .brand-divider {
    display: none;
  }
  .brand-subtitle {
    display: block;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
  }
  .reader-controls {
    gap: 6px;
  }
  .language-button {
    font-size: 13px;
    padding: 0 6px;
  }
  .contents-button {
    padding: 0 8px;
    gap: 5px;
  }
  #reader {
    margin-top: 0;
    gap: 8px;
  }
  .page {
    box-shadow: none;
  }
  .reading-status[hidden] {
    display: none;
  }
  .reading-status {
    bottom: calc(12px + env(safe-area-inset-bottom));
    font-size: 12px;
    padding: 9px 14px;
  }
}
.cover-download {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 5px 11px;
  border: 1px solid #08738a45;
  border-radius: var(--button-radius);
  background: #fffffff2;
  color: var(--accent);
  box-shadow: 0 3px 12px #15364012;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}
.cover-download:hover {
  background: #edf6f7;
  border-color: var(--accent);
}
.cover-download:active {
  background: #dceef1;
}
.contents-hint {
  position: absolute;
  z-index: 2;
  left: 34%;
  right: 12%;
  top: 20.5%;
  transform: translateY(-50%);
  margin: 0;
  color: var(--accent);
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  pointer-events: none;
  animation: contents-hint-pulse 2.4s ease-in-out infinite;
}
@keyframes contents-hint-pulse {
  0%,
  100% {
    transform: translateY(-50%);
    text-shadow: 0 0 0 #08738a00;
  }
  45%,
  60% {
    transform: translateY(calc(-50% - 4px));
    text-shadow: 0 0 12px #08738a99;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .contents-hint {
    animation: none;
    text-shadow: none;
  }
}
@media print {
  body {
    padding: 0;
    background: #fff;
  }
  .toolbar,
  .reading-status,
  .notice {
    display: none;
  }
  #reader {
    width: 100%;
    margin: 0;
    gap: 0;
  }
  .page {
    break-after: page;
    box-shadow: none;
  }
  .hotspot,
  .cover-download,
  .contents-hint {
    display: none;
  }
}
