html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.pht {
  position: relative;
  width: min(92vw, 160vh - 12.8vw);
  aspect-ratio: 480/300;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: #fff7e6;
  outline: none;
}

.pht__toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #17141a;
}

.pht__rail {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
}

.pht__railTrack {
  display: flex;
  gap: 8px;
  will-change: transform;
}

.pht__thumb {
  flex: 0 0 auto;
  width: 40px;
  height: 52px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff7e6;
  padding: 4px;
  box-sizing: border-box;
  cursor: pointer;
}
.pht__thumb--active {
  border-color: #5b8cf8;
}

.pht__miniTitle {
  height: 4px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.4);
  margin-bottom: 4px;
}

.pht__miniLine {
  height: 2px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.22);
  margin-top: 4px;
}

.pht__miniFig {
  height: 28%;
  margin-top: 4px;
  border-radius: 4px;
  background: rgba(47, 109, 246, 0.22);
}

.pht__ringBtn {
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.pht__ring {
  display: block;
}

.pht__ringTrack {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 4;
}

.pht__ringFill {
  fill: none;
  stroke: #5b8cf8;
  stroke-width: 4;
  stroke-linecap: round;
  transition: opacity 300ms ease;
}

.pht__ringCheck {
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
  opacity: 0;
  transition: opacity 300ms ease;
}

.pht--done .pht__ringFill {
  opacity: 0;
}

.pht--done .pht__ringCheck {
  opacity: 1;
}

.pht__stage {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
}

.pht__doc {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 12px;
  box-sizing: border-box;
  scrollbar-width: none;
}
.pht__doc::-webkit-scrollbar {
  display: none;
}

.pht__docInner {
  will-change: transform;
}

.pht__page {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(23, 20, 26, 0.1);
  min-height: 120px;
  box-sizing: border-box;
}

.pht__docTitle {
  height: 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.4);
  margin-bottom: 8px;
}

.pht__docLine {
  height: 5px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.18);
  margin-top: 4px;
}

.pht__docFig {
  height: 30%;
  margin-top: 8px;
  border-radius: 8px;
  background: rgba(47, 109, 246, 0.22);
}

@media (max-width: 340px) {
  .pht__thumb {
    width: 32px;
    height: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pht__docInner, .pht__ringFill, .pht__ringCheck {
    transition: none;
  }
}
