body[data-page="archive"],
body[data-page="chat"],
body[data-page="search"],
body[data-page="theme"],
body[data-page="home"],
body.pay-page,
body.receipt-page {
  font-family: var(--fate-font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  max-width: var(--fate-mobile-max-width);
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  overflow-x: hidden;
}

body[data-page="archive"] .archive-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

body[data-page="archive"] .archive-panel-title {
  margin: 0;
}

body[data-page="archive"] .archive-empty-copy {
  margin-top: 10px;
}

body[data-page="search"] .fate-search-icon {
  color: rgba(255, 255, 255, 0.55);
}

body[data-page="search"] .fate-page-wrap {
  min-height: 100dvh;
  padding-top: var(--fate-home-topbar-h);
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
  display: grid;
  align-content: start;
  gap: 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 78, 35, 0.14), transparent 48%),
    linear-gradient(180deg, #050506 0%, #0b0b0d 100%);
}

body[data-page="search"] .fate-search-box {
  margin-top: 0;
}

body[data-page="search"] .fate-theme-list {
  margin-top: 0;
  gap: 16px;
}

body[data-page="search"] .fate-search-card {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(20, 18, 18, 0.96), rgba(10, 10, 12, 0.98));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

body[data-page="search"] .fate-search-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 100% at 100% 100%, rgba(255, 78, 35, 0.22), transparent 58%),
    linear-gradient(145deg, rgba(34, 20, 15, 0.96), rgba(12, 10, 10, 0.98));
}

body[data-page="search"] .fate-search-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="search"] .fate-search-card-adult-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 8, 12, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body[data-page="search"] .fate-search-card-adult-mask span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 78, 35, 0.96);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 14px 34px rgba(255, 78, 35, 0.38);
}

body[data-page="search"] .fate-search-card-body {
  padding: 16px 16px 18px;
  display: grid;
  gap: 10px;
}

body[data-page="search"] .fate-search-card-title {
  margin: 0;
  color: #fff;
  font-size: var(--fate-font-size-title);
  font-weight: 820;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

body[data-page="search"] .fate-search-card-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fate-font-size-caption);
  line-height: 1.6;
}

body[data-page="search"] .fate-search-card-chips {
  margin-top: 0;
}

body[data-page="search"] .fate-search-card-action-row {
  margin-top: 2px;
}

body[data-page="search"] .fate-search-card-action {
  text-decoration: none;
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 120, 72, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, #ff7448 0%, #ff4e23 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(255, 78, 35, 0.22);
}

body[data-page="search"] .fate-search-card-action:hover,
body[data-page="search"] .fate-search-card-action:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #ff825b 0%, #ff5a31 100%);
}

body[data-page="theme"] {
  height: 100dvh;
  overflow: hidden;
}

body[data-page="theme"] .fate-theme-page-wrap {
  height: calc(var(--app-vh, 1vh) * 100);
  min-height: calc(var(--app-vh, 1vh) * 100);
  padding: 0;
  overflow: hidden;
  background: #06070e;
}

body[data-page="theme"] .fate-theme-immersive {
  position: relative;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #06070e;
}

body[data-page="theme"] .fate-theme-back-btn {
  position: absolute;
  top: max(18px, calc(env(safe-area-inset-top, 0px) + 6px));
  left: 18px;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.42);
  color: rgba(255, 255, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

body[data-page="theme"] .fate-theme-back-btn .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 540, "opsz" 24;
}

body[data-page="theme"] .fate-theme-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

body[data-page="theme"] .fate-theme-media-image,
body[data-page="theme"] .fate-theme-media-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body[data-page="theme"] .fate-theme-media-image {
  background: url("/public/assets/branding/theme-default.jpeg") center / cover no-repeat;
  transform: scale(1.02);
  filter: saturate(1.06);
}

body[data-page="theme"] .fate-theme-media-video {
  opacity: 0;
  transition: opacity 0.28s ease;
  background: rgba(0, 0, 0, 0.15);
}

body[data-page="theme"] .fate-theme-media-video.is-ready {
  opacity: 1;
}

body[data-page="theme"] .fate-theme-media-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 8, 8, 0.2) 0%, rgba(9, 8, 8, 0.54) 55%, rgba(9, 8, 8, 0.92) 100%),
    radial-gradient(120% 58% at 0% 0%, rgba(255, 120, 84, 0.18), transparent 55%),
    radial-gradient(120% 62% at 100% 100%, rgba(255, 78, 35, 0.24), transparent 58%);
  z-index: 2;
  pointer-events: none;
}

body[data-page="theme"] .fate-theme-video-unblock {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100vw;
  height: 100dvh;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  padding: 0;
}

body[data-page="theme"] .fate-theme-video-unblock[hidden] {
  display: none;
}

body[data-page="theme"] .fate-theme-media-content {
  position: relative;
  z-index: 3;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 94px var(--fate-space-4) calc(env(safe-area-inset-bottom, 0px) + 30px);
}

body[data-page="theme"] .fate-theme-copy {
  width: 100%;
}

body[data-page="theme"] .fate-theme-copy h1 {
  margin: 10px 0 0;
  font-size: var(--fate-font-size-31);
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 820;
  text-wrap: balance;
}

body[data-page="theme"] .fate-theme-copy p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.58;
  font-size: var(--fate-font-size-body);
  text-wrap: pretty;
}

body[data-page="theme"] .fate-theme-detail-actions {
  margin-top: 16px;
}

body[data-page="theme"] .fate-live-activity-badge {
  top: var(--theme-live-badge-top, max(120px, calc(env(safe-area-inset-top, 0px) + 108px)));
  bottom: auto;
}

body[data-page="home"] .fate-page-wrap {
  min-height: 100dvh;
  display: grid;
  gap: 22px;
  align-content: start;
  padding-top: var(--fate-home-topbar-h);
  padding-left: 0;
  padding-right: 0;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
  background:
    radial-gradient(140% 80% at 0% 0%, rgba(255, 78, 35, 0.12), transparent 52%),
    linear-gradient(180deg, #050506 0%, #09090a 100%);
}

.home-tag-shell,
.home-banner-shell,
.home-section-shell {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: clip;
  padding-left: var(--fate-space-4);
  padding-right: var(--fate-space-4);
  width: 100%;
  box-sizing: border-box;
}

.home-tag-shell {
  position: sticky;
  top: var(--fate-home-topbar-h);
  z-index: 24;
  padding-top: var(--fate-space-2_5);
  padding-bottom: var(--fate-space-1);
  background:
    linear-gradient(180deg, rgba(5, 5, 6, 0.96), rgba(5, 5, 6, 0.88) 78%, rgba(5, 5, 6, 0));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* Constrain sticky element to body width (prevents overflow on desktop sidebar layout) */
  left: var(--app-body-left, 0);
  width: var(--app-body-width, 100%);
}


.home-tag-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-tag-track::-webkit-scrollbar {
  display: none;
}

.home-tag-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 var(--fate-space-3_5);
  border-radius: var(--fate-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fate-font-size-caption);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.home-tag-btn.is-active {
  border-color: rgba(255, 78, 35, 0.42);
  background: linear-gradient(135deg, rgba(255, 108, 71, 0.2), rgba(255, 78, 35, 0.3));
  color: #fff;
}

.home-banner-shell {
  display: grid;
  gap: 0;
  width: 100%;
}

.home-banner-card {
  position: relative;
  display: block;
  isolation: isolate;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 78, 35, 0.18);
  background: linear-gradient(160deg, rgba(29, 17, 13, 0.92), rgba(9, 8, 8, 0.98));
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.38);
}

.home-banner-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  transition: transform 0.18s ease;
}

.home-banner-track.is-dragging {
  cursor: grabbing;
  transform: translate3d(var(--home-banner-drag-x, 0), 0, 0);
  transition: none;
}

.home-banner-track::-webkit-scrollbar,
.home-release-track::-webkit-scrollbar {
  display: none;
}

.home-banner-slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  z-index: 0;
  scroll-snap-align: start;
}

.home-banner-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  isolation: isolate;
  color: inherit;
  text-decoration: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

@supports not (aspect-ratio: 1 / 1) {
  .home-banner-link::before {
    content: "";
    display: block;
    padding-top: 177.7778%;
  }
}

.home-banner-track.is-dragging .home-banner-link {
  pointer-events: none;
}

.home-banner-link.is-static {
  cursor: pointer;
}

.home-banner-media,
.home-release-media,
.home-best-thumb {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 100% at 100% 100%, rgba(255, 78, 35, 0.18), transparent 58%),
    linear-gradient(145deg, rgba(34, 20, 15, 0.96), rgba(12, 10, 10, 0.98));
}

.home-banner-media img,
.home-release-media img,
.home-best-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  color: transparent;
  font-size: 0;
}

.home-banner-media.is-fallback,
.home-release-media.is-fallback,
.home-best-thumb.is-fallback {
  background:
    radial-gradient(140% 120% at 100% 100%, rgba(255, 78, 35, 0.26), transparent 58%),
    linear-gradient(145deg, rgba(46, 24, 17, 0.98), rgba(16, 10, 10, 1));
}

.home-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 8, 9, 0.06) 0%, rgba(8, 8, 9, 0.2) 36%, rgba(8, 8, 9, 0.88) 100%),
    radial-gradient(120% 80% at 100% 100%, rgba(255, 78, 35, 0.28), transparent 60%);
}

.home-banner-scrim,
.home-banner-copy,
.home-banner-kicker,
.home-banner-title,
.home-banner-desc,
.home-banner-cta,
.home-banner-count {
  display: none;
}

.home-banner-copy {
  position: absolute;
  inset: auto var(--fate-space-4_5) 62px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.home-banner-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 var(--fate-space-3);
  border-radius: var(--fate-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--fate-font-size-overline);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-banner-title {
  margin: 0;
  max-width: 312px;
  color: #fff;
  font-size: clamp(32px, 10vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 900;
  text-wrap: balance;
}

.home-banner-desc {
  margin: 0;
  max-width: 296px;
  color: rgba(240, 240, 240, 0.82);
  font-size: var(--fate-font-size-caption);
  line-height: 1.55;
  text-wrap: pretty;
}

.home-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
  min-width: 154px;
  padding: 0 var(--fate-space-5);
  border-radius: var(--fate-radius-pill);
  background: #f7f3f1;
  color: #171312;
  font-size: var(--fate-font-size-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.home-banner-cta .material-symbols-outlined {
  font-size: 20px;
}

.home-banner-count {
  position: absolute;
  top: var(--fate-space-3_5);
  right: var(--fate-space-3_5);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 var(--fate-space-2_5);
  border-radius: var(--fate-radius-pill);
  background: rgba(17, 13, 12, 0.62);
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--fate-font-size-caption);
  font-weight: 800;
  letter-spacing: -0.01em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-banner-dots {
  position: absolute;
  left: 50%;
  bottom: var(--fate-space-4);
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--fate-space-1_5) var(--fate-space-2_5);
  border-radius: var(--fate-radius-pill);
  background: rgba(10, 8, 8, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-banner-dot {
  width: 8px;
  height: 8px;
  border: 0;
  padding: 0;
  border-radius: var(--fate-radius-pill);
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.22s ease, background-color 0.22s ease;
}

.home-banner-dot.is-on {
  width: 24px;
  background: linear-gradient(135deg, var(--fate-color-brand), var(--fate-color-brand-strong));
}

.home-section-shell {
  display: grid;
  gap: 16px;
}

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-section-head h2 {
  margin: 0;
  font-size: var(--fate-font-size-title);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.home-section-title {
  margin: 0;
}

.home-section-link,
.home-section-note {
  margin: 0;
  color: rgba(255, 78, 35, 0.96);
  font-size: var(--fate-font-size-caption);
  font-weight: 700;
  text-decoration: none;
}

.home-release-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: clip;
  padding-bottom: var(--fate-space-1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-release-card {
  position: relative;
  flex: 0 0 156px;
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
  isolation: isolate;
  color: #fff;
  text-decoration: none;
}

button.home-release-card,
button.home-best-card {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
}

.home-release-media {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 78, 35, 0.12);
  background: rgba(18, 12, 10, 0.92);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
}

.home-release-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 9, 0.04), rgba(8, 8, 9, 0.18) 58%, rgba(8, 8, 9, 0.44)),
    radial-gradient(90% 80% at 100% 100%, rgba(255, 78, 35, 0.18), transparent 60%);
}

.home-release-badge {
  position: absolute;
  top: var(--fate-space-2);
  left: var(--fate-space-2);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 var(--fate-space-2);
  border-radius: var(--fate-radius-pill);
  background: linear-gradient(135deg, var(--fate-color-brand), var(--fate-color-brand-strong));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.home-release-copy {
  display: grid;
  gap: 4px;
}

.home-release-copy h3 {
  margin: 0;
  font-size: var(--fate-font-size-caption);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.home-release-copy p {
  margin: 0;
  color: rgba(240, 240, 240, 0.54);
  font-size: var(--fate-font-size-overline);
  line-height: 1.4;
}

.home-best-list {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 0;
}

.home-best-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: var(--fate-space-4);
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 78, 35, 0.12);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(255, 78, 35, 0.08), transparent 58%),
    linear-gradient(145deg, rgba(22, 14, 11, 0.96), rgba(12, 9, 9, 0.98));
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.home-release-card.is-blocked,
.home-best-card.is-blocked {
  cursor: pointer;
}

.home-best-rank {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.96);
  text-align: center;
}

.home-best-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.home-best-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.home-best-copy h3 {
  margin: 0;
  font-size: var(--fate-font-size-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.24;
}

.home-best-copy p {
  margin: 0;
  color: rgba(240, 240, 240, 0.62);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-best-meta,
.home-best-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.home-best-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 var(--fate-space-2);
  border-radius: var(--fate-radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(240, 240, 240, 0.82);
  font-size: var(--fate-font-size-overline);
  font-weight: 700;
}

.home-best-stats {
  color: rgba(255, 78, 35, 0.94);
  font-size: var(--fate-font-size-overline);
  font-weight: 700;
}

.home-empty-state {
  display: grid;
  gap: 8px;
  padding: var(--fate-space-6) var(--fate-space-4_5);
  border-radius: 24px;
  border: 1px solid rgba(255, 78, 35, 0.16);
  background: linear-gradient(145deg, rgba(22, 14, 11, 0.94), rgba(10, 9, 9, 0.98));
}

.home-empty-state h2 {
  margin: 0;
  font-size: var(--fate-font-size-title);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-empty-state p {
  margin: 0;
  color: rgba(240, 240, 240, 0.62);
  font-size: var(--fate-font-size-caption);
  line-height: 1.55;
}

body.pay-page {
  --pay-bg-0: #121212;
  --pay-bg-1: #171717;
  --pay-bg-2: #2a1f18;
  --pay-accent: #ff5c35;
  --pay-accent-2: #e54d2a;
  --pay-card: #1e1e1e;
  --pay-card-soft: rgba(255, 255, 255, 0.04);
  --pay-fixed-cta-height: 60px;
  --pay-text: #f8fafc;
  --pay-muted: #94a3b8;
  --pay-line: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 92, 53, 0.18), transparent 58%),
    linear-gradient(180deg, var(--pay-bg-2) 0%, var(--pay-bg-1) 36%, var(--pay-bg-0) 100%);
  color: var(--pay-text);
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
}

.pay-wrap {
  width: min(100%, 448px);
  margin: 0 auto;
  min-height: calc(var(--app-vh, 1vh) * 100);
  min-height: 100dvh;
  padding: 0 16px calc(152px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.pay-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  margin: 0 -16px;
  padding: 10px 16px 12px;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pay-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--fate-radius-pill);
  border: 1px solid var(--pay-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pay-text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
}

.pay-back-arrow {
  line-height: 1;
  transform: translateX(1px);
}

.pay-top-title {
  margin: 0;
  min-width: 0;
  text-align: center;
  font-size: var(--fate-font-size-body-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-top-spacer {
  width: 40px;
  height: 40px;
}

.pay-main {
  display: grid;
  gap: 16px;
  padding-top: 18px;
}

.pay-title-block {
  display: grid;
  gap: 8px;
  padding: 4px 4px 2px;
  text-align: center;
}

.pay-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.pay-sub {
  margin: 0 auto;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--pay-muted);
}

.pay-card {
  border-radius: 24px;
  border: 1px solid var(--pay-line);
  background: var(--pay-card);
  padding: 20px;
  overflow: clip;
}

.pay-price-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--pay-card);
  padding: 24px;
  display: grid;
  gap: 18px;
}

.pay-price-flag-row {
  display: flex;
  justify-content: flex-end;
}

.pay-price-card-top {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.pay-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pay-card-title h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.pay-amount {
  margin-top: 4px;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.07em;
  font-weight: 900;
  color: #fff;
}

.pay-price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: var(--fate-radius-pill);
  border: 1px solid rgba(255, 92, 53, 0.22);
  background: rgba(255, 92, 53, 0.1);
  color: var(--pay-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.pay-price-badge.is-sale {
  background: rgba(255, 92, 53, 0.1);
}

.pay-price-original {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.pay-price-original-label {
  color: #64748b;
}

.pay-price-original strong {
  color: rgba(148, 163, 184, 0.9);
  font-weight: 800;
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.8);
}

.pay-price-caption {
  margin: 0;
  color: var(--pay-muted);
  font-size: 12px;
  line-height: 1.45;
}

.pay-theme-recs {
  display: grid;
  gap: 12px;
}

.pay-theme-recs-head {
  align-items: flex-start;
}

.pay-theme-recs-sub {
  margin: 6px 0 0;
  color: var(--pay-muted);
  font-size: 12px;
  line-height: 1.45;
}

.pay-theme-recs-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 188px);
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

.pay-theme-recs-track::-webkit-scrollbar {
  display: none;
}

.pay-theme-recs-track.is-dragging {
  cursor: grabbing;
}

.pay-theme-recs-track.is-dragging .pay-theme-rec-card {
  pointer-events: none;
}

.pay-theme-rec-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: var(--pay-card);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  appearance: none;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.pay-theme-rec-card.is-selected {
  border-color: var(--pay-accent);
  box-shadow: 0 0 0 1px rgba(255, 92, 53, 0.56), 0 14px 30px rgba(255, 92, 53, 0.18);
}

.pay-theme-rec-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 24%),
    linear-gradient(180deg, rgba(7, 10, 15, 0) 0%, rgba(7, 10, 15, 0.18) 38%, rgba(7, 10, 15, 0.88) 100%);
  pointer-events: none;
}

.pay-theme-rec-card:disabled {
  cursor: default;
  opacity: 0.78;
}

.pay-theme-rec-check {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--pay-accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 92, 53, 0.32);
  opacity: 0;
  transform: scale(0.84);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.pay-theme-rec-check svg {
  width: 16px;
  height: 16px;
}

.pay-theme-rec-card.is-selected .pay-theme-rec-check {
  opacity: 1;
  transform: scale(1);
}

.pay-theme-rec-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: 100%;
}

.pay-theme-rec-copy {
  display: grid;
  gap: 4px;
}

.pay-theme-rec-title {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.pay-theme-rec-desc {
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.pay-theme-rec-price {
  display: grid;
  gap: 2px;
}

.pay-theme-rec-original {
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
  text-decoration: line-through;
  text-decoration-color: rgba(226, 232, 240, 0.72);
}

.pay-theme-rec-current {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pay-member-compare {
  display: grid;
  gap: 8px;
}

.pay-member-compare--member {
  margin-top: 0;
}

.pay-member-compare-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--pay-card-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 14px;
}

.pay-member-compare-line strong {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pay-member-compare-line.is-accent {
  border-color: rgba(255, 92, 53, 0.25);
  background: rgba(255, 92, 53, 0.08);
}

.pay-guest-benefit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(234, 179, 8, 0.18);
  background: rgba(234, 179, 8, 0.06);
}

.pay-guest-benefit-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.pay-guest-benefit-title {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.pay-guest-benefit-sub {
  margin: 4px 0 0;
  color: var(--pay-muted);
  font-size: 12px;
  line-height: 1.5;
}

.pay-actions {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(448px, 100vw);
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  z-index: 40;
  display: grid;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(18, 18, 18, 0.92) 28%, rgba(18, 18, 18, 0.98) 100%);
}

.pay-actions .pay-btn {
  width: 100%;
  height: var(--pay-fixed-cta-height);
}

.pay-btn {
  height: var(--pay-fixed-cta-height);
  border: 0;
  border-radius: 18px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.pay-btn:active {
  transform: translateY(1px) scale(0.995);
}

.pay-btn:disabled {
  opacity: 0.78;
  cursor: default;
}

.pay-btn.primary {
  background: linear-gradient(180deg, var(--pay-accent), var(--pay-accent-2));
  box-shadow: 0 16px 34px rgba(255, 92, 53, 0.24);
}

.pay-btn.primary:hover {
  filter: brightness(1.06);
}

.pay-btn.ghost {
  background: var(--pay-card-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 14px;
}

.pay-btn-content {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pay-guest-benefit-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--fate-radius-pill);
  background: #eab308;
  color: #3c1e1e;
  font-size: 11px;
  font-weight: 900;
}

.pay-card-help {
  margin: 12px 0 0;
  color: var(--pay-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pay-bokchae-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pay-bokchae-stat {
  min-width: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--pay-card-soft);
  padding: 14px;
}

.pay-bokchae-stat span {
  display: block;
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.01em;
}

.pay-bokchae-stat strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.pay-bokchae-btn {
  margin-top: 12px;
  width: 100%;
}

.pay-coupon-field {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.pay-coupon-field > * {
  min-width: 0;
}

.pay-coupon-input {
  height: 52px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--pay-card-soft);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 16px;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-coupon-field .pay-btn {
  height: 52px;
  min-height: 52px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 16px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.pay-coupon-input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.pay-coupon-hint {
  margin: 8px 0 0;
  color: var(--pay-muted);
  font-size: 12px;
  line-height: 1.45;
}

.pay-coupon-chip-wrap {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pay-coupon-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--pay-card-soft);
  color: #e2e8f0;
  border-radius: var(--fate-radius-pill);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pay-breakdown-list {
  margin-top: 15px;
  display: grid;
  gap: 12px;
}

.pay-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}

.pay-breakdown-row span {
  color: rgba(248, 250, 252, 0.72);
}

.pay-breakdown-row strong {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.pay-breakdown-row.is-negative span,
.pay-breakdown-row.is-negative strong {
  color: var(--pay-accent);
}

.pay-breakdown-row.is-total {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: flex-end;
}

.pay-breakdown-row.is-total span {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.pay-breakdown-row.is-total strong {
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--pay-accent);
}

.pay-panel {
  border-radius: 24px;
  border: 1px solid var(--pay-line);
  background: var(--pay-card);
  padding: 20px;
}

.pay-panel h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.pay-panel p {
  margin: 8px 0 0;
  color: var(--pay-muted);
  font-size: 14px;
  line-height: 1.58;
}

.pay-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: rgba(240, 240, 240, 0.8);
  font-size: 12px;
}

.pay-spinner {
  width: 18px;
  height: 18px;
  border-radius: var(--fate-radius-pill);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: paySpin 0.8s linear infinite;
}

.pay-flow-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--fate-space-6);
  background: rgba(10, 8, 8, 0.72);
  backdrop-filter: blur(5px);
}

.pay-flow-overlay.hidden {
  display: none;
}

.pay-flow-card {
  width: min(320px, 100%);
  border-radius: var(--fate-radius-md-plus);
  border: 1px solid rgba(255, 92, 53, 0.18);
  background: linear-gradient(160deg, rgba(33, 20, 16, 0.96), rgba(16, 10, 9, 0.98));
  padding: var(--fate-space-4_5) var(--fate-space-4);
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
}

.pay-flow-spinner {
  width: 30px;
  height: 30px;
  border-radius: var(--fate-radius-pill);
  border: 3px solid rgba(255, 255, 255, 0.26);
  border-top-color: #fff;
  animation: paySpin 0.8s linear infinite;
}

.pay-flow-title {
  margin: 0;
  font-size: var(--fate-font-size-body-lg);
  line-height: 1.35;
  font-weight: 800;
  color: #fff;
}

.pay-flow-sub {
  margin: 0;
  color: rgba(240, 240, 240, 0.75);
  font-size: var(--fate-font-size-caption);
  line-height: 1.55;
}

.receipt-card {
  border-radius: var(--fate-radius-md-plus);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 11, 10, 0.9);
  padding: var(--fate-space-4);
  display: grid;
  gap: 12px;
}

.receipt-title {
  margin: 0;
  font-size: var(--fate-font-size-title);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.receipt-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fate-font-size-caption);
  line-height: 1.5;
}

.receipt-table {
  border-radius: var(--fate-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.receipt-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: var(--fate-space-2_5) var(--fate-space-3);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}

.receipt-row:last-child {
  border-bottom: 0;
}

.receipt-k {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--fate-font-size-caption);
  font-weight: 700;
  line-height: 1.35;
}

.receipt-v {
  margin: 0;
  color: #fff;
  font-size: var(--fate-font-size-caption);
  line-height: 1.45;
  word-break: break-word;
}

.receipt-v.is-amount {
  font-size: var(--fate-font-size-title-sm);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffb48c;
}

.receipt-actions {
  display: grid;
  gap: 8px;
}

.receipt-btn {
  height: 42px;
  border-radius: var(--fate-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: var(--fate-font-size-body);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.receipt-btn.primary {
  border-color: rgba(255, 120, 84, 0.42);
  background: linear-gradient(135deg, rgba(255, 122, 69, 0.92), rgba(255, 78, 35, 0.92));
}

.guest-phone-verify-btn {
  min-height: 50px;
  border-radius: var(--fate-radius-pill);
  box-shadow: 0 12px 28px rgba(255, 78, 35, 0.26);
}

@media (max-height: 720px) {
  body[data-page="theme"] .fate-theme-media-content {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 30px);
  }

  body[data-page="theme"] .fate-theme-copy h1 {
    font-size: var(--fate-font-size-hero);
  }
}

@media (max-width: 420px) {
  body[data-page="theme"] .fate-theme-back-btn {
    left: 16px;
  }
}

@media (max-width: 520px) {
  .pay-guest-benefit {
    flex-direction: column;
    align-items: stretch;
  }

  .pay-guest-benefit-btn {
    width: 100%;
    min-height: 42px;
  }

  .pay-coupon-field {
    grid-template-columns: 1fr;
  }

  .pay-coupon-field .pay-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 768px) {
  .home-release-card {
    flex-basis: 148px;
  }

  .home-best-card {
    grid-template-columns: 34px 76px minmax(0, 1fr);
  }
}

@keyframes paySpin {
  to {
    transform: rotate(360deg);
  }
}
