:root {
  --theme: #f09717;
  --safe-top: calc(env(safe-area-inset-top) + 12px);
  --safe-bottom: calc(env(safe-area-inset-bottom) + 16px);
  --safe-right: env(safe-area-inset-right);
  --app-height: 100dvh;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--theme);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  user-select: none;
  overscroll-behavior: none;
}

.app {
  width: 100%;
  height: var(--app-height);
}

.app-hidden {
  visibility: hidden;
}

.frame {
  position: relative;
  width: 100%;
  height: 100%;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.track {
  display: flex;
  height: 100%;
  will-change: transform;
  flex-direction: column;
  width: 100%;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.zoom-surface {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  -webkit-user-drag: none;
  user-drag: none;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.arrow-left {
  left: 10px;
}

.arrow-right {
  right: 10px;
}

.indicator-wrap {
  position: absolute;
  top: 50%;
  right: calc(var(--safe-right) + 10px);
  z-index: 6;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 6px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  padding: 0;
  cursor: pointer;
}

.dot.active {
  background: #fff;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme);
  opacity: 1;
  transition: opacity 0.28s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.loading-content p {
  margin: 0;
  font-size: 14px;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.36);
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
