:root {
  color-scheme: light;
  --ink: #111833;
  --muted: #7b8194;
  --line: #ececf6;
  --soft: #f8f8ff;
  --card: rgba(255, 255, 255, 0.86);
  --blue: #5e77ff;
  --purple: #b967ee;
  --danger: #df4d48;
  --shadow: 0 24px 60px rgba(70, 72, 122, 0.16);
  --gradient: linear-gradient(135deg, #5b77ff 0%, #7e6cff 52%, #bd65ed 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 8%, rgba(151, 133, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(114, 210, 255, 0.14), transparent 24%),
    #f7f7fc;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

html,
body,
.screen,
.action-scroll,
.tabbed-scroll {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.screen::-webkit-scrollbar,
.action-scroll::-webkit-scrollbar,
.tabbed-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.phone {
  position: relative;
  width: min(390px, calc(100vw - 28px));
  height: min(844px, calc(100vh - 28px));
  min-height: 720px;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(180deg, #fff 0%, #fbfbff 100%);
  box-shadow: var(--shadow);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow: auto;
  padding: 28px 22px 24px;
  background:
    radial-gradient(circle at 86% 96px, rgba(176, 140, 255, 0.23), transparent 56px),
    radial-gradient(circle at 18% 262px, rgba(123, 150, 255, 0.13), transparent 86px),
    #fdfdff;
}

.screen[data-screen="product"] {
  padding-bottom: 96px;
}

.screen[data-screen="result"] {
  overflow: hidden;
  padding-bottom: 0;
}

.screen[data-screen="result"].active {
  display: flex;
  flex-direction: column;
}

.action-screen {
  overflow: hidden;
  padding-bottom: 96px;
}

.action-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 18px;
}

.screen.active {
  display: block;
}

.tab-screen {
  overflow: hidden;
  padding-bottom: 96px;
}

.tabbed-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-bottom: 18px;
  -webkit-overflow-scrolling: touch;
}

.screen[data-screen="home"] .tabbed-scroll {
  overflow-y: auto;
  padding-bottom: 18px;
}

.screen[data-screen="home"] {
  padding: 0 0 96px;
}

.nav-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 36px;
  margin-bottom: 18px;
}

.nav-header h2 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.icon-button,
.plain-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  font-size: 25px;
  line-height: 32px;
}

.plain-button {
  font-size: 13px;
  color: #6b6f80;
}

.home-hero {
  position: relative;
  min-height: 520px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
}

.home-hero::after {
  content: none;
}

.home-hero-copy {
  position: absolute;
  top: 42px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin-left: 0;
  pointer-events: none;
}

.gradient-button {
  border: 0;
  border-radius: 18px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 12px 22px rgba(111, 103, 255, 0.28);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
}

.home-hero .gradient-button {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 186px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 29px;
  font-size: 21px;
  box-shadow: 0 18px 34px rgba(111, 103, 255, 0.3);
  pointer-events: auto;
}

.home-hero .gradient-button i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #6672ff;
  font-size: 25px;
  font-style: normal;
  line-height: 1;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: auto;
  opacity: 1;
}

.hero-carousel-track {
  height: 100%;
  display: flex;
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  touch-action: pan-y;
}

.hero-carousel-track.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.hero-carousel-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: center;
  user-select: none;
}

.hero-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  object-position: center bottom;
  cursor: zoom-in;
}

.recommend {
  padding: 0 22px;
}

.credit-panel,
.package-panel,
.credit-strip {
  margin: 14px 22px 0;
  padding: 14px;
  border: 1px solid #eef0fa;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(83, 80, 150, 0.08);
}

.credit-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.credit-balance,
.package-panel > div,
.credit-strip > div {
  display: grid;
  gap: 4px;
}

.credit-balance span,
.package-panel span,
.credit-strip span {
  color: #8a8da0;
  font-size: 12px;
  font-weight: 900;
}

.credit-balance strong,
.package-panel strong,
.credit-strip strong {
  color: #212a6a;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.package-panel strong {
  font-size: 20px;
}

.credit-balance small,
.package-panel small,
.credit-strip small {
  color: #8a8da0;
  font-size: 11px;
  font-weight: 800;
}

.credit-actions,
.package-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.credit-actions button,
.package-panel button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  background: #eef0ff;
  color: #6167e8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.credit-actions button:first-child,
.package-panel button {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 20px rgba(111, 103, 255, 0.2);
}

.credit-actions button:disabled,
.package-panel button:disabled {
  cursor: default;
  opacity: 0.58;
}

.credit-strip {
  margin: 0 0 16px;
  min-height: 54px;
  padding: 10px 12px;
  border-color: #edf0f8;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credit-strip > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.credit-strip span {
  font-size: 12px;
  color: #72768a;
}

.credit-strip strong {
  color: #6970ff;
  font-size: 20px;
}

.credit-strip small {
  max-width: 160px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f8f8ff;
  color: #6970ff;
  text-align: right;
  white-space: normal;
}

.screen[data-screen="works"] .credit-panel {
  margin: 0 0 18px;
}

.profile-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #edf0fb;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.94)),
    radial-gradient(circle at 14% 10%, rgba(110, 121, 255, 0.14), transparent 34%);
  box-shadow: 0 16px 34px rgba(83, 80, 150, 0.1);
}

.profile-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.profile-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #5b77ff, #aa63f4);
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 12px 22px rgba(97, 103, 232, 0.22);
  font-size: 18px;
  font-weight: 950;
}

.profile-identity {
  min-width: 0;
}

.profile-identity strong {
  display: block;
  overflow: hidden;
  color: #111b4c;
  font-size: 17px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity span {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef0ff;
  color: #6970ff;
  font-size: 11px;
  font-weight: 900;
}

.profile-head button,
.checkin-card-head button {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 20px rgba(111, 103, 255, 0.18);
  font-size: 12px;
  font-weight: 950;
}

.profile-head button:disabled,
.checkin-card-head button:disabled {
  cursor: default;
  opacity: 0.58;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-stats > div {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #eef0fa;
}

.profile-stats span {
  color: #8a8da0;
  font-size: 11px;
  font-weight: 900;
}

.profile-stats strong {
  display: block;
  margin-top: 6px;
  color: #212a6a;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.profile-stats small {
  display: block;
  margin-top: 7px;
  color: #7b8096;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.checkin-card {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 242, 255, 0.86), rgba(255, 255, 255, 0.92));
}

.checkin-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.checkin-card h3 {
  margin: 0;
  color: #111b4c;
  font-size: 14px;
  font-weight: 950;
}

.checkin-card p {
  margin: 5px 0 0;
  color: #6970ff;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 900;
}

.checkin-progress-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.checkin-day {
  min-width: 0;
  padding: 8px 0;
  border: 1px solid #e4e7fb;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.checkin-day span,
.checkin-day strong {
  display: block;
}

.checkin-day span {
  color: #9a9daf;
  font-size: 10px;
  font-weight: 900;
}

.checkin-day strong {
  margin-top: 4px;
  color: #6d73df;
  font-size: 11px;
  font-weight: 950;
}

.checkin-day.done {
  border-color: #7b82ff;
  background: #f3f4ff;
}

.checkin-day.current {
  border-color: #a95cff;
  box-shadow: 0 0 0 2px rgba(169, 92, 255, 0.12);
}

.points-packages {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #eef0fa;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(83, 80, 150, 0.08);
}

.points-packages h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 900;
}

.points-package-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.points-package-button {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid #edf0f8;
  border-radius: 14px;
  background: #fff;
  color: #212a6a;
  cursor: pointer;
  text-align: left;
}

.points-package-button span {
  color: #8a8da0;
  font-size: 11px;
  font-weight: 900;
}

.points-package-button strong {
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.points-package-button small {
  color: #6970ff;
  font-size: 12px;
  font-weight: 900;
}

.points-package-button.recommended {
  position: relative;
}

.points-package-button.recommended::after {
  content: "推荐";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef0ff;
  color: #6970ff;
  font-size: 10px;
  font-weight: 900;
}

.points-package-button.selected {
  border-color: #7b82ff;
  background: #f8f8ff;
}

.vip-package {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.94)) padding-box,
    linear-gradient(135deg, #6e79ff 0%, #a95cff 58%, #f2bf55 100%) border-box;
  box-shadow: 0 18px 36px rgba(88, 85, 170, 0.14);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vip-package::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0) 44%),
    linear-gradient(135deg, rgba(111, 118, 255, 0.12), rgba(242, 191, 85, 0.2));
}

.vip-package::after {
  content: "VIP";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #222a6d, #7b4dff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(90, 77, 255, 0.22);
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
}

.vip-package:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(88, 85, 170, 0.18);
}

.vip-package:focus-visible {
  outline: 3px solid rgba(123, 77, 255, 0.25);
  outline-offset: 3px;
}

.vip-package.selected {
  box-shadow: 0 22px 42px rgba(88, 85, 170, 0.2), 0 0 0 2px rgba(123, 77, 255, 0.22);
}

.vip-package > div {
  max-width: calc(100% - 58px);
  gap: 6px;
}

.vip-package span {
  color: #6e5bc6;
  font-size: 12px;
}

.vip-package small {
  width: fit-content;
  margin-top: 1px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(123, 77, 255, 0.1);
  color: #7b4dff;
  font-weight: 950;
  line-height: 1.35;
}

.vip-benefits {
  display: grid;
  gap: 3px;
}

.vip-benefits span {
  display: block;
}

.recharge-copy {
  padding: 18px;
  border: 1px solid #eef0fa;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(83, 80, 150, 0.08);
}

.recharge-copy h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 900;
}

.recharge-copy p {
  margin: 10px 0 0;
  color: #777c93;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.hero-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 94px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.hero-carousel-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(112, 118, 255, 0.28);
  transition: width 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.hero-carousel-dots button.active {
  width: 18px;
  background: #6970ff;
}

.tabbar button,
.work-tabs button {
  border: 0;
  background: transparent;
  color: #8a8da0;
  cursor: pointer;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}

.section-title h2,
.versions h3,
.settings-block h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.section-title button {
  border: 0;
  background: transparent;
  color: #999bad;
  font-size: 12px;
}

.recommend-empty {
  min-height: 86px;
}

.version-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}

.recommend-card {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  background: #edf3ff;
  box-shadow: 0 12px 26px rgba(83, 80, 150, 0.1);
  cursor: zoom-in;
  -webkit-user-drag: none;
}

.recommend-card:focus-visible {
  outline: 3px solid rgba(105, 112, 255, 0.3);
  outline-offset: 3px;
}

.home-endline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 8px;
  color: #a0a4b8;
  font-size: 12px;
  font-weight: 800;
}

.home-endline::before,
.home-endline::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e3e6f2;
}

.recommend-preview[hidden] {
  display: none;
}

.recommend-preview {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: inherit;
  overflow: hidden;
}

.recommend-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 21, 48, 0.64);
  backdrop-filter: blur(12px);
}

.recommend-preview-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 42px 0 12px;
}

.recommend-preview-panel img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.24);
  touch-action: none;
  transform-origin: center center;
  transition: transform 0.12s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.recommend-preview-panel img.zoomed {
  cursor: grab;
}

.recommend-preview-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #252b5b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.recommend-save-button {
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 14px 28px rgba(111, 103, 255, 0.24);
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
}

.tabbar {
  position: absolute;
  left: 22px;
  right: 22px;
  z-index: 12;
  bottom: 18px;
  height: 58px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(79, 79, 132, 0.12);
}

.tabbar button {
  font-size: 12px;
  font-weight: 900;
}

.tabbar button::before {
  content: "";
  display: block;
  width: 19px;
  height: 19px;
  margin: 0 auto 3px;
  background: currentColor;
  opacity: 0.9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.8 12 3l9 7.8'/%3E%3Cpath d='M5.5 9.5V21h13V9.5'/%3E%3Cpath d='M9.5 21v-6h5v6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.8 12 3l9 7.8'/%3E%3Cpath d='M5.5 9.5V21h13V9.5'/%3E%3Cpath d='M9.5 21v-6h5v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tabbar button:nth-child(2)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.4 2.6a2.1 2.1 0 0 1 3 3L8.7 18.3 4 20l1.7-4.7Z'/%3E%3Cpath d='m14.5 6.5 3 3'/%3E%3Cpath d='M4 20h16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.4 2.6a2.1 2.1 0 0 1 3 3L8.7 18.3 4 20l1.7-4.7Z'/%3E%3Cpath d='m14.5 6.5 3 3'/%3E%3Cpath d='M4 20h16'/%3E%3C/svg%3E");
}

.tabbar button:nth-child(3)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 21a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 21a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E");
}

.tabbar button.active {
  color: #6970ff;
}

.product-uploader {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 116px;
  gap: 10px;
  margin-bottom: 16px;
}

.upload-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px dashed #dfe3f3;
  border-radius: 14px;
  background: linear-gradient(145deg, #f7f8fd, #edf0f8);
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.upload-slot:first-child,
.upload-slot:nth-child(2) {
  grid-column: span 1;
}

.upload-slot input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-slot img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-slot.has-image img {
  display: block;
}

.slot-plus {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(105, 112, 255, 0.13);
  color: #6970ff;
  font-size: 26px;
  font-weight: 800;
}

.upload-slot small {
  margin-top: 6px;
  color: #8b8fa4;
  font-size: 12px;
  font-weight: 900;
}

.upload-slot.has-image .slot-plus,
.upload-slot.has-image small {
  display: none;
}

.upload-slot.has-image::after {
  content: attr(data-slot);
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(17, 24, 51, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.upload-slot[data-slot="0"].has-image::after {
  content: "1/5";
}

.upload-slot[data-slot="1"].has-image::after {
  content: "2/5";
}

.upload-slot[data-slot="2"].has-image::after {
  content: "3/5";
}

.upload-slot[data-slot="3"].has-image::after {
  content: "4/5";
}

.upload-slot[data-slot="4"].has-image::after {
  content: "5/5";
}

.aspect-panel,
.watermark-panel {
  margin-top: 18px;
}

.aspect-panel h3,
.watermark-panel h3 {
  margin: 0 0 12px;
  color: #72768a;
  font-size: 13px;
  font-weight: 900;
}

.aspect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.aspect-option {
  min-height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #edf0f8;
  border-radius: 14px;
  background: #fff;
  color: #8b8fa4;
  cursor: pointer;
  font-weight: 900;
}

.aspect-option.selected {
  border-color: #7b82ff;
  color: #6970ff;
  background: #f8f8ff;
  box-shadow: 0 10px 26px rgba(112, 118, 255, 0.12);
}

.ratio-icon {
  display: block;
  border: 2px solid currentColor;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(105, 112, 255, 0.14), rgba(185, 103, 238, 0.1));
}

.ratio-3-4 {
  width: 28px;
  height: 38px;
}

.ratio-4-3 {
  width: 38px;
  height: 28px;
}

.ratio-9-16 {
  width: 24px;
  height: 42px;
}

.ratio-16-9 {
  width: 44px;
  height: 25px;
}

.watermark-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.watermark-option {
  position: relative;
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid #edf0f8;
  border-radius: 14px;
  background: #fff;
  color: #8b8fa4;
  cursor: pointer;
  font-weight: 900;
}

.watermark-option.selected {
  border-color: #7b82ff;
  color: #6970ff;
  background: #f8f8ff;
  box-shadow: 0 10px 26px rgba(112, 118, 255, 0.12);
}

.watermark-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(105, 112, 255, 0.12);
  font-size: 13px;
  line-height: 1;
}

.watermark-option small {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f4ff;
  color: #6970ff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.watermark-option.selected small {
  background: rgba(105, 112, 255, 0.13);
}

.switch-line {
  grid-template-columns: 48px 1fr;
  align-items: center;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(83, 80, 150, 0.08);
}

.switch-line input {
  position: absolute;
  opacity: 0;
}

.switch-line strong {
  font-size: 13px;
}

.switch-line small {
  grid-column: 2;
  color: #999bad;
  font-size: 11px;
}

.switch-track {
  grid-row: 1 / span 2;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d5d7e4;
  position: relative;
}

.switch-track::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.switch-line input:checked + .switch-track {
  background: #7176ff;
}

.switch-line input:checked + .switch-track::after {
  transform: translateX(18px);
}

.bottom-button {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: 14px;
  text-decoration: none;
}

.screen[data-screen="product"] .bottom-button {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 20;
}

.screen[data-screen="recharge"] .bottom-button {
  z-index: 20;
}

.toast {
  position: absolute;
  left: 50%;
  top: 20px;
  z-index: 40;
  max-width: 300px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 51, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.generation-bubble {
  position: absolute;
  right: 22px;
  bottom: 96px;
  z-index: 38;
  display: grid;
  gap: 2px;
  max-width: 230px;
  padding: 12px 16px;
  border: 0;
  border-radius: 18px;
  background: rgba(17, 24, 51, 0.94);
  color: #fff;
  text-align: left;
  box-shadow: 0 16px 42px rgba(17, 24, 51, 0.24);
  cursor: pointer;
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.generation-bubble.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.generation-bubble strong {
  font-size: 14px;
  font-weight: 900;
}

.generation-bubble span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.confirm-popover {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: end center;
  padding: 22px;
  background: rgba(17, 24, 51, 0.28);
}

.confirm-popover[hidden] {
  display: none;
}

.confirm-popover-panel {
  width: 100%;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 51, 0.22);
}

.confirm-popover-panel h3 {
  margin: 0 0 8px;
  color: #171c33;
  font-size: 18px;
}

.confirm-popover-panel p {
  margin: 0;
  color: #6d7288;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.confirm-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f2fb;
  color: #353957;
  font-weight: 900;
}

.confirm-actions .gradient-button {
  color: #fff;
}


.progress-wrap {
  min-height: 430px;
  display: grid;
  place-items: center;
}

.progress-ring {
  position: relative;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#7f80ff var(--progress, 0%), #f0effb 0);
  box-shadow: 0 16px 50px rgba(111, 103, 255, 0.16);
  will-change: background;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  border: 1px solid rgba(127, 128, 255, 0.16);
  animation: progressPulse 1.8s ease-in-out infinite;
}

.progress-ring span {
  position: relative;
  z-index: 1;
  font-size: 44px;
  font-weight: 900;
  color: #7274f4;
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s ease, opacity 0.18s ease;
  animation: numberBreath 1.35s ease-in-out infinite;
}

.progress-ring small {
  position: relative;
  z-index: 1;
  color: #8c90a4;
  font-size: 12px;
  font-weight: 900;
}

.loading-copy {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 34px;
  color: #7478f5;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
  text-align: center;
}

.loading-tip {
  margin: 12px 34px 0;
  color: #8b90a5;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.loading-copy span {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.42s ease,
    transform 0.42s ease,
    filter 0.42s ease;
}

.loading-copy span.fade-out {
  opacity: 0;
  transform: translateY(-8px);
  filter: blur(2px);
}

@keyframes progressPulse {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes numberBreath {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

.result-poster-wrap {
  min-height: 438px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f2f5ff;
  overflow: hidden;
}

.result-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 18px;
  -webkit-overflow-scrolling: touch;
}

#resultImage {
  display: none;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.empty-result {
  color: #8f93a7;
  font-size: 13px;
  font-weight: 800;
}

.versions {
  margin-top: 18px;
}

.version-list {
  margin-top: 10px;
}

.version-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(83, 80, 150, 0.09);
}

.version-card.selected {
  border-color: #6d75ff;
}

.version-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.version-card span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(17, 24, 51, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.split-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 12px;
  padding-bottom: env(safe-area-inset-bottom);
  background: #fdfdff;
}

.split-actions button {
  height: 52px;
  border-radius: 16px;
  border: 1px solid #e7e8f5;
  background: #fff;
  color: #6167e8;
  font-weight: 900;
}

.settings-block {
  margin-bottom: 30px;
}

.settings-block h3 {
  margin-bottom: 14px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.option-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.option-grid button {
  min-height: 86px;
  border: 1px solid #edf0f8;
  border-radius: 14px;
  background: #fff;
  color: #8b8fa4;
  font-weight: 900;
}

.option-grid small {
  color: #a5a8b8;
  font-size: 11px;
}

.option-grid button.selected {
  border-color: #7b82ff;
  color: #6970ff;
  background: #f8f8ff;
  box-shadow: 0 10px 26px rgba(112, 118, 255, 0.12);
}

.download-button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.56;
}

.work-tabs {
  display: flex;
  gap: 18px;
  margin: 18px 0;
}

.work-tabs button {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.work-tabs button.active {
  background: #eef0ff;
  color: #6970ff;
}

.local-works-head {
  margin: 18px 0 14px;
}

.local-works-head h3 {
  margin: 0;
  color: #111b4c;
  font-size: 16px;
  font-weight: 950;
}

.local-works-head p {
  margin: 6px 0 0;
  color: #7b8096;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.cloud-status-panel,
.points-ledger-panel {
  margin: 16px 0;
}

.section-title.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title.compact h3 {
  margin: 0;
  color: #111b4c;
  font-size: 16px;
  font-weight: 950;
}

.task-list,
.points-ledger {
  display: grid;
  gap: 10px;
}

.task-card,
.ledger-row,
.task-empty,
.ledger-empty {
  border: 1px solid #eef0fa;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(83, 80, 150, 0.06);
}

.task-card {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.task-card strong {
  color: #111b4c;
  font-size: 14px;
}

.task-card p,
.task-card small {
  margin: 0;
  color: #7b8096;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.task-card button {
  justify-self: start;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  background: #eef0ff;
  color: #5f67d8;
  font-size: 12px;
  font-weight: 900;
}

.task-card.status-failed {
  border-color: #ffd6de;
  background: #fff8fa;
}

.task-empty,
.ledger-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: #8f93a7;
  font-size: 13px;
  font-weight: 800;
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.ledger-row strong,
.ledger-row small {
  display: block;
}

.ledger-row strong {
  color: #111b4c;
  font-size: 13px;
}

.ledger-row small {
  margin-top: 3px;
  color: #8f93a7;
  font-size: 11px;
  font-weight: 800;
}

.ledger-row > div:last-child {
  text-align: right;
  font-size: 15px;
  font-weight: 950;
}

.ledger-row .positive {
  color: #16823a;
}

.ledger-row .negative {
  color: #d15068;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 16px;
}

.empty-works {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed #dde1ef;
  border-radius: 16px;
  color: #8f93a7;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.76);
}

.work-card {
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(83, 80, 150, 0.09);
}

.work-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.work-card time {
  display: block;
  color: #999bad;
  font-size: 11px;
}

.work-card-meta {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.work-card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.work-card-actions button {
  min-height: 30px;
  padding: 0;
  border: 1px solid #eef0fa;
  border-radius: 9px;
  background: #f8f9ff;
  color: #5f67d8;
  font-size: 11px;
  font-weight: 900;
}

.work-card-actions button.danger {
  color: #d15068;
  background: #fff6f8;
}

@media (max-width: 600px) {
  body {
    min-height: 100dvh;
    background: #fdfdff;
  }

  .stage {
    min-height: 100dvh;
    display: block;
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 760px) {
  .phone {
    min-height: 680px;
  }

  .screen {
    padding-top: 48px;
  }

  .home-hero {
    min-height: 480px;
    padding-top: 92px;
  }

  .home-hero-copy {
    top: 36px;
  }

  .home-hero .gradient-button {
    width: 172px;
    height: 52px;
    bottom: 16px;
    font-size: 19px;
  }

  .recommend-empty {
    min-height: 64px;
  }

  .product-uploader {
    grid-auto-rows: 104px;
  }
}

@media (max-width: 600px) {
  .phone {
    min-height: 100dvh;
  }
}
