:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --label: #1d1d1f;
  --label-2: rgba(60, 60, 67, 0.6);
  --label-3: rgba(60, 60, 67, 0.25);
  --accent: #007aff;
  --fill: rgba(120, 120, 128, 0.12);
  --glass-tint: rgba(255, 255, 255, 0.32);
  --glass-tint-strong: rgba(255, 255, 255, 0.5);
  --glass-edge: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  --gutter: 6rem;
  --nav-inset: 16px;
  --panel-w: 280px;
  --panel-gap: 12px;
  --pad: 1.5rem;
  --spread: calc(296 / 210);
  --w: min(1400px, 100vw - var(--gutter) * 2, (100svh - var(--pad) * 2) * var(--spread));
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--label);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "PingFang TC",
    "Helvetica Neue",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.book-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--pad) 0;
}
.book-stage {
  position: relative;
  width: var(--w);
  height: calc(var(--w) / var(--spread));
  --hug: 0px;
}
.book {
  width: 100%;
  height: 100%;
}
.book-stage.is-ready .book {
  transition: transform 0.7s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .book-stage.is-ready .book {
    transition: none;
  }
}
.book-stage.is-ready.is-driving .book {
  transition: none;
}
.book .stf__wrapper {
  height: 100% !important;
  padding-bottom: 0 !important;
}
.page {
  background: #fff;
  overflow: hidden;
  container-type: inline-size;
}
.page-num {
  position: absolute;
  bottom: 3%;
  font-size: max(7px, 2cqw);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--label-2);
  pointer-events: none;
  user-select: none;
}
.page-num--left {
  left: 5%;
}
.page-num--right {
  right: 5%;
}
.page:has(img, picture, video, canvas, svg, iframe) .page-num {
  display: none;
}
.page.page--blank {
  background: transparent;
}
.stf__item.page--blank::after {
  display: none;
}
.page picture {
  display: block;
  width: 100%;
  height: 100%;
}
.page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.stf__item.--left::after,
.stf__item.--right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14%;
  pointer-events: none;
}
.stf__item.--left::after {
  right: 0;
  background:
    linear-gradient(
      to left,
      rgba(0, 0, 0, 0.22),
      rgba(0, 0, 0, 0.06) 35%,
      rgba(0, 0, 0, 0));
}
.stf__item.--right::after {
  left: 0;
  background:
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.22),
      rgba(0, 0, 0, 0.06) 35%,
      rgba(0, 0, 0, 0));
}
@media (max-width: 719px) and (orientation: portrait) {
  :root {
    --gutter: 0px;
    --nav-inset: 0px;
  }
}
.nav {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: var(--label);
  cursor: pointer;
  --glass-blur: 8px;
  transition:
    opacity 0.25s ease,
    transform 0.15s ease-out,
    background-color 0.2s ease;
}
.nav--prev,
.nav--next {
  left: 0;
}
.nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav--prev svg {
  margin-left: -2px;
}
.nav--next svg {
  margin-right: -2px;
}
.nav:hover:not(:disabled) {
  background: var(--glass-tint-strong);
  transform: scale(1.06);
}
.nav:active:not(:disabled) {
  transform: scale(0.92);
}
.nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.glass {
  position: fixed;
  isolation: isolate;
  background: var(--glass-tint);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur, 14px)) saturate(180%);
  box-shadow: var(--glass-shadow);
}
.nav.glass {
  position: absolute;
}
.glass.is-refract {
  -webkit-backdrop-filter: var(--glass-refract) blur(var(--glass-blur, 14px)) saturate(180%);
  backdrop-filter: var(--glass-refract) blur(var(--glass-blur, 14px)) saturate(180%);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 0.5px var(--glass-edge),
    inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.9),
    inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.5),
    inset 0 0 12px rgba(255, 255, 255, 0.25);
}
.menu-btn {
  top: 20px;
  right: 20px;
  z-index: 40;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--label);
  cursor: pointer;
  --glass-blur: 6px;
  transition:
    transform 0.15s ease-out,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}
.menu-btn:active {
  transform: scale(0.92);
}
.menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.menu-btn span {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 1.75px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}
.menu-btn span:nth-child(1) {
  top: 15.5px;
}
.menu-btn span:nth-child(2) {
  top: 21.25px;
}
.menu-btn span:nth-child(3) {
  top: 27px;
}
.menu-btn[aria-expanded=true] span:nth-child(1) {
  transform: translateY(5.75px) rotate(45deg);
}
.menu-btn[aria-expanded=true] span:nth-child(2) {
  opacity: 0;
}
.menu-btn[aria-expanded=true] span:nth-child(3) {
  transform: translateY(-5.75px) rotate(-45deg);
}
.menu-btn[aria-expanded=true] {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.menu-btn[aria-expanded=true]::before {
  opacity: 0;
}
.panel {
  top: var(--panel-gap);
  bottom: var(--panel-gap);
  right: var(--panel-gap);
  z-index: 30;
  width: var(--panel-w);
  max-width: calc(100vw - var(--panel-gap) * 2);
  padding: 76px 12px 16px;
  overflow-y: auto;
  border-radius: 26px;
  --glass-blur: 22px;
  background: var(--glass-tint-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(100% + var(--panel-gap))) scale(0.98);
  transform-origin: right top;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.3s ease,
    visibility 0s linear 0.45s;
}
.panel.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.2s ease,
    visibility 0s;
}
.panel__title {
  margin: 0 8px 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--label-2);
}
.book-bar {
  left: 50%;
  bottom: 20px;
  z-index: 30;
  max-width: calc(100vw - 40px);
  padding: 6px;
  border-radius: 999px;
  --glass-blur: 16px;
  background: var(--glass-tint-strong);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(100% + 24px)) scale(0.96);
  transform-origin: center bottom;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.3s ease,
    visibility 0s linear 0.45s;
}
.book-bar.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.2s ease,
    visibility 0s;
}
.book-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.book-list li {
  position: relative;
  z-index: 1;
}
.book-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--thumb-w, 0px);
  transform: translateX(var(--thumb-x, 0px)) scale(var(--thumb-s, 1));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), inset 0 0 0 0.5px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.15), width 0.4s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.book-thumb.is-dragging {
  transition: width 0.2s ease;
  --thumb-s: 1.06;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), inset 0 0 0 0.5px rgba(255, 255, 255, 0.9);
}
.book-list button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--label);
  font: inherit;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease-out;
}
.book-list button:hover {
  background: var(--fill);
}
.book-list button:active {
  transform: scale(0.95);
}
.book-list button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.book-list button[aria-current=true] {
  font-weight: 600;
}
.book-list button[aria-current=true]:hover {
  background: none;
}
.book-list.is-dragging button:hover {
  background: none;
}
.book-list button.is-under {
  font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  .nav,
  .menu-btn,
  .menu-btn span,
  .panel,
  .panel.is-open,
  .book-bar,
  .book-bar.is-open,
  .book-list button,
  .book-thumb {
    transition: opacity 0.2s ease;
  }
  .panel {
    transform: none;
  }
  .book-bar {
    transform: translate(-50%, 0);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: rgba(250, 250, 252, 0.97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  .glass {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 0 0 1px #1d1d1f;
  }
}
@media (max-width: 719px) and (orientation: portrait) {
  .nav {
    width: 36px;
    height: 36px;
    margin-top: -18px;
  }
  .nav--prev {
    left: 8px;
  }
  .nav--next {
    left: auto;
    right: 8px;
  }
  .nav svg {
    width: 16px;
    height: 16px;
  }
}
.up [hidden] {
  display: none !important;
}
.up {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 8px;
}
.up__book {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.up__count {
  margin: -6px 0 4px;
  font-size: 0.8125rem;
  color: var(--label-2);
}
.up__drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 14px 20px;
  border-radius: 18px;
  border: 1.5px dashed rgba(60, 60, 67, 0.25);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease-out;
}
.up__drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.up__drop svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.up__drop-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--label);
}
.up__drop-sub {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--label-2);
}
.up__drop:hover,
.up__drop.is-over {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--accent);
}
.up__drop:active {
  transform: scale(0.98);
}
.up__drop:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.up__drop.is-busy {
  opacity: 0.5;
  pointer-events: none;
}
.up__pass {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.up__pass label {
  font-size: 0.8125rem;
  color: var(--label-2);
}
.up__pass-row {
  display: flex;
  gap: 6px;
}
.up__pass input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.18);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--label);
}
.up__pass input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.up__pass button,
.up__clear {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease-out, background-color 0.2s ease;
}
.up__pass button {
  background: var(--accent);
  color: #fff;
}
.up__pass button:active,
.up__clear:active {
  transform: scale(0.96);
}
.up__progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--label-2);
}
.up__bar {
  height: 6px;
  border-radius: 3px;
  background: var(--fill);
  overflow: hidden;
}
.up__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.up__msg {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--label-2);
}
.up__msg.is-error {
  color: #d70015;
}
.up__clear {
  align-self: flex-start;
  background: transparent;
  color: #d70015;
  padding: 0 8px;
}
.up__clear:hover {
  background: rgba(215, 0, 21, 0.08);
}
.up__clear.is-confirm {
  background: #d70015;
  color: #fff;
}
.up__clear[hidden] {
  display: none;
}
.up.is-offline .up__drop,
.up.is-offline .up__clear {
  display: none;
}
.page img.page-img {
  position: absolute;
  inset: 0;
}
