﻿* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; color-scheme: light; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: #081736;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(201, 233, 232, .9) 0%, rgba(201, 233, 232, .52) 16%, rgba(201, 233, 232, 0) 42%),
    linear-gradient(180deg, #edf2fa 0%, #eef3fa 100%);
  overflow-x: hidden;
}
.swal2-container {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
}
.swal2-popup {
  max-width: min(86vw, 360px) !important;
  border-radius: 20px !important;
}
body::before,
body::after {
  content: "";
  position: fixed;
  bottom: -18px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(30px);
}
body::before {
  left: 14%;
  width: 220px;
  height: 88px;
  background: rgba(198, 242, 237, .55);
}
body::after {
  right: 9%;
  width: 180px;
  height: 78px;
  background: rgba(213, 236, 255, .5);
}
.page-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 47px 0 36px;
}
.phone-card {
  position: relative;
  width: min(81.72vw, 353px);
  min-height: 803px;
  border-radius: 27px;
  padding: 79px 18px 31px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,.52) 14%, rgba(255,255,255,.78) 38%, rgba(248,249,252,.94) 100%);
  border: 1px solid rgba(255,255,255,.93);
  box-shadow:
    0 25px 60px rgba(92, 108, 134, .16),
    inset 0 0 0 1px rgba(255,255,255,.35),
    inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
}
.card-edge-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.6),
    inset 0 55px 80px rgba(255,255,255,.08);
}
.hero-aurora {
  position: absolute;
  inset: 0 0 auto;
  height: 245px;
  pointer-events: none;
  overflow: hidden;
}
.hero-aurora svg {
  width: 100%;
  height: 100%;
  display: block;
  opacity: .98;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  box-shadow: 0 0 7px rgba(255,255,255,.6);
}
.st1 { width: 4px; height: 4px; left: 17px; top: 48px; }
.st2 { width: 2px; height: 2px; left: 92px; top: 82px; opacity: .76; }
.st3 { width: 2px; height: 2px; left: 129px; top: 39px; opacity: .84; }
.st4 { width: 3px; height: 3px; right: 126px; top: 72px; }
.st5 { width: 4px; height: 4px; right: 45px; top: 60px; }
.st6 { width: 2px; height: 18px; left: 32px; top: 96px; border-radius: 999px; transform: rotate(14deg); opacity: .45; }
.hero-title,
.upload-shell,
.form-area,
.notice-box { position: relative; z-index: 1; }
.hero-title {
  text-align: center;
  margin-bottom: 34px;
}
.hero-title h1 {
  margin: 0;
  color: #09163e;
  font-size: 31px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: .4px;
}
.hero-title p {
  margin: 21px 0 0;
  font-size: 17px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .3px;
  background: linear-gradient(90deg, #4ea2ff 0%, #5b86ff 48%, #9e7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glass-box {
  background: linear-gradient(180deg, rgba(255,255,255,.54), rgba(255,255,255,.46));
  border: 1px solid rgba(255,255,255,.92);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.65),
    0 14px 26px rgba(116, 128, 176, .08),
    0 0 26px rgba(211, 171, 255, .10);
}
.upload-shell {
  border-radius: 30px;
  padding: 16px;
  margin-bottom: 33px;
  position: relative;
}
.upload-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 100% 0, rgba(255,226,244,.48) 0%, transparent 22%),
    radial-gradient(circle at 0 100%, rgba(252, 196, 255, .26) 0%, transparent 24%);
  pointer-events: none;
}
.upload-box {
  position: relative;
  height: 247px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(245,247,251,.44) 0%, rgba(255,255,255,.32) 100%);
}
.upload-box::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 20px;
  border: 1.5px dashed rgba(168, 184, 245, .92);
  background:
    radial-gradient(circle at 42% 42%, rgba(118, 161, 255, .10) 0%, rgba(118,161,255,0) 2.6%),
    radial-gradient(circle at 76% 44%, rgba(177, 142, 255, .08) 0%, rgba(177,142,255,0) 2.6%),
    linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.upload-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 70%, rgba(190,225,255,.08) 0%, transparent 18%),
    radial-gradient(circle at 79% 70%, rgba(198,171,255,.10) 0%, transparent 18%);
  pointer-events: none;
}
.upload-box input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tutorial-btn {
  position: absolute;
  top: 26px;
  right: 24px;
  z-index: 4;
  height: 34px;
  padding: 0 11px 0 13px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5860ff;
  background: rgba(255,255,255,.88);
  box-shadow: 0 8px 18px rgba(111, 113, 193, .12);
  font-size: 12.8px;
  font-weight: 700;
}
.tutorial-book { width: 18px; height: 18px; fill: currentColor; }
.tutorial-arrow { width: 12px; height: 12px; fill: currentColor; }
.upload-icon,
.upload-box strong,
.upload-box > span,
.dot { position: relative; z-index: 2; }
.upload-icon {
  width: 156px;
  height: 112px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 14px rgba(155, 132, 255, .08));
}
.upload-box strong {
  margin-top: 23px;
  color: #081536;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: .2px;
}
.upload-box > span:not(.tutorial-btn span) {
  margin-top: 14px;
  color: #68748f;
  font-size: 11.6px;
  line-height: 1.2;
  letter-spacing: .05px;
}
.dot {
  position: absolute;
  border-radius: 50%;
}
.d1 { left: 31.8%; top: 35.3%; width: 8px; height: 8px; background: rgba(170, 180, 247, .72); }
.d2 { left: 13.8%; top: 60%; width: 6px; height: 6px; background: rgba(205, 221, 255, .78); }
.d3 { right: 20.5%; top: 36%; width: 6px; height: 6px; background: rgba(215, 218, 255, .78); }
.d4 { right: 14%; top: 68%; width: 8px; height: 8px; background: rgba(192, 166, 255, .72); }
.form-area { padding: 0 8px; }
.field-label {
  display: block;
  margin-bottom: 14px;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 900;
  color: #09163e;
}
.input-wrap {
  position: relative;
  height: 54px;
  border-radius: 18px;
  background: rgba(255,255,255,.22);
  border: 2px solid rgba(102, 149, 255, .95);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.38),
    0 10px 20px rgba(95, 120, 170, .05);
}
.lock-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  fill: #838ca2;
}
.input-wrap input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 16px 0 54px;
  font-size: 13.2px;
  color: #535c73;
}
.input-wrap input::placeholder { color: #8f95aa; }
.hint-text {
  margin: 14px 0 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #7a8097;
  font-size: 11.9px;
  line-height: 1.25;
}
.hint-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(180deg, #808cff 0%, #766fff 100%);
  box-shadow: 0 7px 13px rgba(116, 122, 255, .20);
}
.generate-btn {
  width: 100%;
  height: 61px;
  border: 0;
  border-radius: 999px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .2px;
  background: linear-gradient(90deg, #5cc7ff 0%, #4b92ff 43%, #816dff 79%, #b066ff 100%);
  box-shadow:
    0 12px 20px rgba(104, 119, 255, .17),
    inset 0 2px 0 rgba(255,255,255,.32),
    inset 0 -2px 0 rgba(114, 88, 220, .12);
}
.generate-btn::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.24);
}
.generate-btn svg { width: 22px; height: 22px; fill: currentColor; }
.notice-box {
  margin-top: 20px;
  border-radius: 18px;
  padding: 15px 16px 15px 14px;
  border: 1px solid rgba(200, 207, 239, .92);
  background: linear-gradient(180deg, rgba(243,245,251,.84) 0%, rgba(244,246,251,.72) 100%);
  display: flex;
  align-items: center;
  gap: 14px;
}
.notice-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: #5f6eff;
}
.notice-icon svg { width: 100%; height: 100%; }
.notice-box p {
  margin: 0;
  color: #697797;
  font-size: 11.45px;
  line-height: 1.62;
}
.notice-box strong { color: #6f7892; font-weight: 700; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, label:focus-within {
  outline: 2px solid rgba(108, 132, 255, .38);
  outline-offset: 2px;
}
@media (max-width: 380px) {
  .page-shell { padding-top: 36px; }
  .phone-card { width: min(84vw, 353px); }
}

.upload-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* v5: exact extracted top background + upload layout hard-fix */
.hero-aurora {
  height: 214px !important;
  background-image: url("/assets/ui/top-bg-exact.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.hero-aurora svg {
  display: none !important;
}

.upload-box {
  height: 257px !important;
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.tutorial-btn {
  top: 25px !important;
  right: 23px !important;
}

.upload-icon {
  position: absolute !important;
  left: 50%;
  top: 93px;
  width: 112px !important;
  height: 78px !important;
  margin: 0 !important;
  transform: translateX(-50%);
}

.upload-box strong {
  position: absolute !important;
  left: 0;
  right: 0;
  top: 169px;
  margin: 0 !important;
  text-align: center;
  font-size: 18px !important;
  line-height: 22px !important;
}

.upload-box > span:not(.tutorial-btn span) {
  position: absolute !important;
  left: 18px;
  right: 18px;
  top: 204px;
  margin: 0 !important;
  max-width: none !important;
  text-align: center;
  font-size: 11.2px !important;
  line-height: 14px !important;
  white-space: nowrap;
}

.upload-shell {
  padding: 16px !important;
}

.dot {
  position: absolute !important;
}


/* v7 fine tuning: larger upload icon + smoother side/background transition */
.hero-aurora {
  height: 206px !important;
  background-size: 102% 100% !important;
  background-position: center top !important;
}
.hero-aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 54%, rgba(244,246,250,.32) 74%, rgba(245,247,251,.88) 100%),
    linear-gradient(90deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 11%, rgba(255,255,255,0) 89%, rgba(255,255,255,.10) 100%);
}
.phone-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 176px;
  height: 118px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(246,248,251,0) 0%, rgba(246,248,251,.38) 45%, rgba(246,248,251,.82) 100%);
  z-index: 0;
}
.upload-shell {
  background: linear-gradient(180deg, rgba(255,255,255,.60), rgba(255,255,255,.48)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.66),
    0 14px 30px rgba(116, 128, 176, .07),
    0 0 28px rgba(214, 183, 255, .08) !important;
}
.upload-shell::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.34);
}
.upload-box {
  height: 257px !important;
}
.upload-icon {
  top: 82px !important;
  width: 144px !important;
  height: 101px !important;
}
.upload-box strong {
  top: 176px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 210px !important;
}


/* v8: use user-provided blank card background as main card background */
body {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(201, 233, 232, .78) 0%, rgba(201, 233, 232, .42) 16%, rgba(201, 233, 232, 0) 42%),
    linear-gradient(180deg, #eef2fa 0%, #eef3fa 100%) !important;
}
.page-shell {
  padding: 42px 0 34px !important;
}
.phone-card {
  width: min(82vw, 356px) !important;
  min-height: 676px !important;
  padding: 83px 18px 28px !important;
  border: 0 !important;
  border-radius: 30px !important;
  background: url("/assets/ui/phone-card-bg.png") center top / 100% 100% no-repeat !important;
  box-shadow: 0 26px 60px rgba(95, 110, 138, .13) !important;
  backdrop-filter: none !important;
  overflow: hidden;
}
.card-edge-glow,
.hero-aurora,
.phone-card::before {
  display: none !important;
}
.hero-title {
  margin-bottom: 28px !important;
}
.hero-title h1 {
  font-size: 31px !important;
  letter-spacing: .2px !important;
}
.hero-title p {
  margin-top: 18px !important;
}
.upload-shell {
  margin-bottom: 28px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.48), rgba(255,255,255,.42)) !important;
}
.upload-icon {
  top: 80px !important;
  width: 148px !important;
  height: 104px !important;
}
.upload-box strong {
  top: 178px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 212px !important;
  font-size: 11.1px !important;
}
.notice-box {
  background: linear-gradient(180deg, rgba(243,245,251,.72) 0%, rgba(244,246,251,.64) 100%) !important;
}


/* v9: optimized upload-shell material and pixel-level layout tuning */
.upload-shell {
  position: relative !important;
  height: 233px !important;
  padding: 0 !important;
  margin: 0 0 26px !important;
  border: 0 !important;
  border-radius: 28px !important;
  background: url("/assets/ui/upload-shell-bg-optimized.png") center center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  overflow: hidden;
}
.upload-shell::before,
.upload-shell::after {
  display: none !important;
}
.upload-box {
  height: 233px !important;
  background: transparent !important;
}
.upload-box::before,
.upload-box::after {
  display: none !important;
}
.tutorial-btn {
  top: 21px !important;
  right: 26px !important;
  height: 32px !important;
  padding: 0 12px 0 13px !important;
  font-size: 12.6px !important;
  box-shadow: 0 6px 14px rgba(111, 113, 193, .10) !important;
}
.upload-icon {
  top: 76px !important;
  width: 102px !important;
  height: 72px !important;
  filter: drop-shadow(0 9px 12px rgba(148, 140, 255, .10)) !important;
}
.upload-box strong {
  top: 149px !important;
  font-size: 18px !important;
  line-height: 20px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 184px !important;
  left: 20px !important;
  right: 20px !important;
  font-size: 11.4px !important;
  line-height: 14px !important;
  color: #707999 !important;
}
.dot.d1 { left: 40.8% !important; top: 92px !important; width: 6px !important; height: 6px !important; }
.dot.d2 { left: 23% !important; top: 137px !important; width: 5px !important; height: 5px !important; }
.dot.d3 { right: 28.5% !important; top: 93px !important; width: 5px !important; height: 5px !important; }
.dot.d4 { right: 19.8% !important; top: 137px !important; width: 7px !important; height: 7px !important; }


/* v10: adjust upload frame size/proportion to match original mobile design */
.phone-card {
  min-height: 804px !important;
  padding: 82px 18px 31px !important;
}
.hero-title {
  margin-bottom: 36px !important;
}
.upload-shell {
  height: 304px !important;
  margin: 0 0 40px !important;
  border-radius: 32px !important;
  background-size: 100% 100% !important;
}
.upload-box {
  height: 304px !important;
}
.tutorial-btn {
  top: 24px !important;
  right: 26px !important;
}
.upload-icon {
  top: 92px !important;
  width: 126px !important;
  height: 89px !important;
}
.upload-box strong {
  top: 190px !important;
  font-size: 18px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 226px !important;
  font-size: 11.5px !important;
}
.dot.d1 { left: 39.5% !important; top: 111px !important; }
.dot.d2 { left: 21.5% !important; top: 163px !important; }
.dot.d3 { right: 27% !important; top: 112px !important; }
.dot.d4 { right: 18.8% !important; top: 164px !important; }
.form-area {
  padding: 0 8px !important;
}
.notice-box {
  margin-top: 22px !important;
}


/* v11: enlarge central upload icon to better match reference */
.upload-shell {
  height: 304px !important;
}
.upload-box {
  height: 304px !important;
}
.upload-icon {
  top: 78px !important;
  width: 158px !important;
  height: 114px !important;
  filter: drop-shadow(0 12px 16px rgba(148, 140, 255, .12)) !important;
}
.upload-box strong {
  top: 196px !important;
  font-size: 18px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 231px !important;
  font-size: 11.5px !important;
}
.dot.d1 { left: 41.2% !important; top: 112px !important; }
.dot.d2 { left: 22.5% !important; top: 164px !important; }
.dot.d3 { right: 28% !important; top: 112px !important; }
.dot.d4 { right: 19.5% !important; top: 166px !important; }


/* v12: align title/subtitle and upload-area icon using user red-line comparison */
.phone-card {
  padding-top: 86px !important;
}
.hero-title {
  transform: translateY(6px) !important;
  margin-bottom: 30px !important;
}
.hero-title h1 {
  font-size: 34px !important;
  line-height: 1.08 !important;
  letter-spacing: .15px !important;
}
.hero-title p {
  margin-top: 16px !important;
  font-size: 18px !important;
  letter-spacing: .15px !important;
}
.upload-shell {
  height: 304px !important;
  margin: 0 0 36px !important;
}
.tutorial-btn {
  top: 22px !important;
  right: 24px !important;
}
.upload-icon {
  top: 66px !important;
  width: 174px !important;
  height: 125px !important;
  filter: drop-shadow(0 12px 16px rgba(148, 140, 255, .12)) !important;
}
.upload-box strong {
  top: 194px !important;
  font-size: 20px !important;
  line-height: 22px !important;
  letter-spacing: .1px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 230px !important;
  font-size: 11.8px !important;
  line-height: 15px !important;
}
.dot.d1 { left: 41.6% !important; top: 112px !important; }
.dot.d2 { left: 22.5% !important; top: 164px !important; }
.dot.d3 { right: 28.2% !important; top: 112px !important; }
.dot.d4 { right: 19.2% !important; top: 165px !important; }


/* v13: full alignment pass based on side-by-side red-line comparison */
.phone-card {
  width: min(81.72vw, 353px) !important;
  min-height: 804px !important;
  padding: 82px 14px 30px !important;
}
.hero-title {
  transform: translateY(1px) !important;
  margin-bottom: 28px !important;
}
.hero-title h1 {
  font-size: 33px !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}
.hero-title p {
  margin-top: 17px !important;
  font-size: 17.6px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
.upload-shell {
  height: 304px !important;
  margin: 0 0 30px !important;
}
.upload-box {
  height: 304px !important;
}
.tutorial-btn {
  top: 21px !important;
  right: 23px !important;
  height: 31px !important;
  padding: 0 11px 0 12px !important;
  font-size: 12.4px !important;
  gap: 4px !important;
}
.tutorial-book {
  width: 19px !important;
  height: 19px !important;
}
.tutorial-arrow {
  width: 12px !important;
  height: 12px !important;
}
.upload-icon {
  top: 74px !important;
  width: 164px !important;
  height: 118px !important;
}
.upload-box strong {
  top: 194px !important;
  font-size: 19px !important;
  line-height: 21px !important;
  letter-spacing: 0 !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 229px !important;
  left: 18px !important;
  right: 18px !important;
  font-size: 11.5px !important;
  line-height: 15px !important;
  letter-spacing: 0 !important;
}
.dot.d1 { left: 41.1% !important; top: 111px !important; }
.dot.d2 { left: 22.2% !important; top: 164px !important; }
.dot.d3 { right: 28.1% !important; top: 112px !important; }
.dot.d4 { right: 19.5% !important; top: 165px !important; }
.form-area {
  padding: 0 2px !important;
}
.field-label {
  margin: 0 0 13px !important;
  font-size: 18.5px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}
.input-wrap {
  height: 52px !important;
  border-radius: 16px !important;
  border-width: 2px !important;
}
.lock-icon {
  left: 16px !important;
  width: 24px !important;
  height: 24px !important;
}
.input-wrap input {
  padding: 0 16px 0 50px !important;
  font-size: 13.4px !important;
}
.hint-text {
  margin: 14px 0 18px !important;
  gap: 10px !important;
  font-size: 11.8px !important;
}
.hint-icon {
  width: 21px !important;
  height: 21px !important;
  font-size: 14px !important;
}
.generate-btn {
  height: 59px !important;
  font-size: 18px !important;
}
.notice-box {
  margin-top: 18px !important;
  padding: 15px 14px !important;
}
.notice-box p {
  font-size: 11.35px !important;
}

/* v13-fixed: restore upload icon asset + white auth input interior */
.input-wrap {
  background: #ffffff !important;
}


/* v13-refined: keep v13 baseline, restore missing background assets, refine proportions */
.phone-card {
  width: min(81.72vw, 353px) !important;
  min-height: 804px !important;
  padding: 80px 14px 30px !important;
  background: url("/assets/ui/phone-card-bg.png") center top / 100% 100% no-repeat !important;
  border: 0 !important;
  box-shadow: 0 26px 60px rgba(95, 110, 138, .13) !important;
}
.card-edge-glow,
.hero-aurora,
.phone-card::before {
  display: none !important;
}
.hero-title {
  transform: translateY(0) !important;
  margin-bottom: 30px !important;
}
.hero-title h1 {
  font-size: 32px !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
}
.hero-title p {
  margin-top: 18px !important;
  font-size: 17.2px !important;
  font-weight: 700 !important;
}
.upload-shell {
  height: 286px !important;
  margin: 0 0 40px !important;
  padding: 0 !important;
  border-radius: 28px !important;
  border: 0 !important;
  background: url("/assets/ui/upload-shell-bg-optimized.png") center center / 100% 100% no-repeat !important;
  box-shadow: none !important;
}
.upload-shell::before,
.upload-shell::after,
.upload-box::before,
.upload-box::after {
  display: none !important;
}
.upload-box {
  height: 286px !important;
  background: transparent !important;
}
.tutorial-btn {
  top: 20px !important;
  right: 24px !important;
  height: 31px !important;
  padding: 0 11px 0 12px !important;
  font-size: 12.2px !important;
  gap: 4px !important;
}
.tutorial-book { width: 18px !important; height: 18px !important; }
.tutorial-arrow { width: 11px !important; height: 11px !important; }
.upload-icon {
  top: 63px !important;
  width: 156px !important;
  height: 112px !important;
  filter: drop-shadow(0 10px 14px rgba(148, 140, 255, .11)) !important;
}
.upload-box strong {
  top: 180px !important;
  font-size: 18px !important;
  line-height: 20px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 214px !important;
  left: 18px !important;
  right: 18px !important;
  font-size: 11.4px !important;
  line-height: 15px !important;
}
.dot.d1 { left: 41.2% !important; top: 100px !important; }
.dot.d2 { left: 22.2% !important; top: 154px !important; }
.dot.d3 { right: 28.1% !important; top: 101px !important; }
.dot.d4 { right: 19.5% !important; top: 154px !important; }
.form-area {
  padding: 0 4px !important;
}
.field-label {
  margin: 0 0 16px !important;
  font-size: 17px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
}
.input-wrap {
  height: 51px !important;
  border-radius: 16px !important;
  border-width: 2px !important;
  background: #ffffff !important;
}
.lock-icon {
  left: 16px !important;
  width: 24px !important;
  height: 24px !important;
}
.input-wrap input {
  padding: 0 16px 0 50px !important;
  font-size: 13.2px !important;
}
.hint-text {
  margin: 15px 0 20px !important;
  gap: 10px !important;
  font-size: 11.7px !important;
}
.generate-btn {
  height: 59px !important;
  font-size: 18px !important;
}
.notice-box {
  margin-top: 20px !important;
  padding: 14px 14px !important;
}
.notice-box p {
  font-size: 11.2px !important;
}


/* v13-refined-btn-aligned: fine-tune tutorial button position */
.tutorial-btn {
  top: 24px !important;
  right: 21px !important;
}


/* v13-refined-btn-aligned-v2: reduce central upload icon and replace tutorial book icon */
.tutorial-btn {
  top: 24px !important;
  right: 21px !important;
}
.tutorial-book,
.tutorial-book-img {
  width: 17px !important;
  height: 17px !important;
  display: block;
  flex: 0 0 auto;
}
.upload-icon {
  top: 71px !important;
  width: 136px !important;
  height: 98px !important;
  filter: drop-shadow(0 9px 12px rgba(148, 140, 255, .10)) !important;
}
.upload-box strong {
  top: 181px !important;
  font-size: 18px !important;
  line-height: 20px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 216px !important;
  font-size: 11.4px !important;
  line-height: 15px !important;
}
.dot.d1 { left: 41.0% !important; top: 102px !important; }
.dot.d2 { left: 22.0% !important; top: 156px !important; }
.dot.d3 { right: 28.0% !important; top: 103px !important; }
.dot.d4 { right: 19.5% !important; top: 156px !important; }


/* v13-refined-btn-aligned-v3: tutorial icon down-left, smaller white pill */
.tutorial-btn {
  top: 24px !important;
  right: 21px !important;
  height: 29px !important;
  padding: 0 9px 0 10px !important;
  gap: 3px !important;
  border-radius: 15px !important;
}
.tutorial-book,
.tutorial-book-img {
  width: 16px !important;
  height: 16px !important;
  position: relative;
  left: -1px;
  top: 1.5px;
  display: block;
  flex: 0 0 auto;
}
.tutorial-btn span {
  position: relative;
  top: 0.5px;
}
.tutorial-arrow {
  width: 10px !important;
  height: 10px !important;
  position: relative;
  top: 0.5px;
}


/* v13-refined-btn-aligned-v4: replace broken tutorial book image with stable SVG */
.tutorial-book-img {
  display: none !important;
}
.tutorial-book-svg {
  width: 17px !important;
  height: 17px !important;
  display: block !important;
  flex: 0 0 auto;
  fill: #5365ff !important;
  position: relative;
  left: -1px;
  top: 1.5px;
}
.tutorial-btn {
  height: 29px !important;
  padding: 0 9px 0 10px !important;
  gap: 4px !important;
}


/* v5: bold main title, enlarge center upload icon, tighten auth hint row */
.hero-title h1 {
  font-size: 33px !important;
  font-weight: 1000 !important;
  letter-spacing: -0.2px !important;
  color: #07163d !important;
}
.upload-icon {
  top: 67px !important;
  width: 148px !important;
  height: 107px !important;
  filter: drop-shadow(0 10px 14px rgba(148, 140, 255, .11)) !important;
}
.upload-box strong {
  top: 182px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 217px !important;
}
.hint-text {
  margin: 9px 0 20px !important;
  gap: 8px !important;
}
.hint-icon {
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  font-size: 7px !important;
  box-shadow: 0 3px 6px rgba(116, 122, 255, .14) !important;
}


/* v6: enlarge center upload icon ~2x, keep centered, move title text downward */
.upload-icon {
  position: absolute !important;
  left: 50% !important;
  top: 52px !important;
  width: 212px !important;
  height: 154px !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.upload-box strong {
  top: 198px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 232px !important;
}


/* v7: reduce central upload icon to 70% of v6 while keeping centered */
.upload-icon {
  left: 50% !important;
  top: 67px !important;
  width: 148px !important;
  height: 108px !important;
  transform: translateX(-50%) !important;
}

/* v8: center generate button content, adjust icon/text spacing, reduce bottom blank space */
.generate-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  height: 58px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
}
.generate-btn svg {
  width: 21px !important;
  height: 21px !important;
  margin: 0 !important;
  flex: 0 0 21px !important;
}
.generate-btn span {
  position: relative;
  top: 0;
  margin: 0 !important;
}
.notice-box {
  margin-top: 17px !important;
}
.phone-card {
  min-height: 770px !important;
  padding-bottom: 20px !important;
}
.page-shell {
  padding-bottom: 22px !important;
}


/* v9: enlarge center upload icon 2x */
.upload-icon {
  position: absolute !important;
  left: 50% !important;
  top: 44px !important;
  width: 296px !important;
  height: 216px !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.upload-box strong {
  top: 204px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 238px !important;
}

/* v10: icon to 60% of v9 and move support text closer to title */
.upload-icon {
  position: absolute !important;
  left: 50% !important;
  top: 74px !important;
  width: 178px !important;
  height: 130px !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
}
.upload-box strong {
  top: 204px !important;
}
.upload-box > span:not(.tutorial-btn span) {
  top: 226px !important;
  font-size: 11.4px !important;
  line-height: 15px !important;
}

/* v11: upload outer frame ratio 700:650 */
.upload-shell {
  aspect-ratio: 700 / 650 !important;
  height: auto !important;
}
.upload-box {
  height: 100% !important;
}

/* v12: move support text down; move tutorial button down-left and scale to 80% */
.upload-box > span:not(.tutorial-btn span) {
  top: 233px !important;
}

.tutorial-btn {
  top: 36px !important;
  right: 33px !important;
  transform: scale(0.8) !important;
  transform-origin: top right !important;
}

/* v13: enlarge tutorial text 1.3x */
.tutorial-btn span {
  font-size: 1.3em !important;
  white-space: nowrap !important;
}

/* white-bottom test: make lower background white */
body {
  background:
    linear-gradient(180deg, #eef2fa 0%, #f4f7fc 42%, #ffffff 72%, #ffffff 100%) !important;
}
body::before,
body::after {
  display: none !important;
}
.phone-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 42%, rgba(255,255,255,.72) 66%, #ffffff 82%, #ffffff 100%),
    url("/assets/ui/phone-card-bg.png") center top / 100% 100% no-repeat !important;
}

/* Project integration styles merged from project-integration.css. */
/* Keep the homepage visually locked to the approved 353px mobile canvas. */
.phone-card {
  width: min(353px, calc(100vw - 30px)) !important;
}

@media (max-width: 480px) {
  .page-shell {
    padding-bottom: 16px !important;
  }

  .upload-icon {
    top: 74px !important;
    width: 178px !important;
    height: 130px !important;
  }

  .upload-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .upload-icon,
  .upload-icon img,
  .upload-box .dot {
    pointer-events: none !important;
  }

  .upload-box strong {
    top: 204px !important;
    font-size: 18px !important;
    line-height: 22px !important;
    font-weight: 900 !important;
    letter-spacing: .2px !important;
  }

  .upload-box > span:not(.tutorial-btn span) {
    top: 233px !important;
    font-size: 11.4px !important;
    line-height: 15px !important;
    font-weight: 400 !important;
    color: #68748f !important;
    letter-spacing: .05px !important;
  }
}

.upload-preview-img {
  position: absolute;
  inset: 22px 18px 42px;
  z-index: 5;
  width: auto;
  height: auto;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 64px);
  margin: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 40px rgba(52, 90, 150, .14);
  pointer-events: none;
}

.upload-icon,
.upload-icon img,
.upload-box .dot {
  pointer-events: none !important;
}

.upload-box.has-preview .upload-icon,
.upload-box.has-preview .dot {
  opacity: 0 !important;
  visibility: hidden !important;
}

.upload-box.has-preview > span:not(.tutorial-btn span) {
  display: none !important;
}

.upload-box.has-preview strong {
  position: absolute !important;
  left: 50% !important;
  bottom: 16px !important;
  top: auto !important;
  z-index: 6 !important;
  transform: translateX(-50%) !important;
  padding: 6px 13px !important;
  border-radius: 999px !important;
  color: #214077 !important;
  background: rgba(255, 255, 255, .9) !important;
  box-shadow: 0 10px 24px rgba(70, 110, 180, .16) !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

#workView.project-work-view.flow-app {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  overflow: hidden auto;
  background:
    radial-gradient(circle at 12% 4%, rgba(102, 178, 255, .22), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(177, 108, 255, .18), transparent 30%),
    linear-gradient(180deg, #f4f8ff 0%, #eef5ff 100%);
  color: #081736;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

#workView.project-work-view:not(.flow-app) {
  display: none !important;
}

.flow-screen {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(22px, env(safe-area-inset-top)) 14px calc(28px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.flow-phone {
  width: min(360px, calc(100vw - 30px));
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 28px 70px rgba(94, 115, 150, .16),
    inset 0 0 0 1px rgba(255, 255, 255, .42);
  backdrop-filter: blur(18px);
}

.flow-phone-top {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  color: #07132e;
  font-size: 12px;
  font-weight: 900;
  position: relative;
  z-index: 3;
}

.flow-signal {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.flow-signal i {
  width: 4px;
  background: #081228;
  border-radius: 2px;
  display: block;
}

.flow-signal i:nth-child(1) { height: 7px; }
.flow-signal i:nth-child(2) { height: 9px; }
.flow-signal i:nth-child(3) { height: 12px; }
.flow-signal b {
  width: 20px;
  height: 10px;
  border: 2px solid #081228;
  border-radius: 3px;
  margin-left: 3px;
  position: relative;
}

.flow-signal b::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2px;
  width: 2px;
  height: 4px;
  border-radius: 0 2px 2px 0;
  background: #081228;
}

.flow-mini-title {
  text-align: center;
  position: relative;
  z-index: 2;
}

.flow-mini-title h3 {
  margin: 0;
  color: #09163e;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
}

.flow-mini-title p {
  margin: 8px 0 0;
  color: #3f5e96;
  font-size: 11px;
  font-weight: 800;
}

.flow-generating-phone {
  min-height: 704px;
  border-radius: 28px;
  padding: 46px 22px 22px;
  background:
    radial-gradient(circle at 18% 4%, rgba(144, 207, 255, .24), transparent 30%),
    radial-gradient(circle at 84% 2%, rgba(203, 167, 255, .22), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .78) 0%, rgba(255,255,255,.92) 100%);
}

.flow-uploaded-card {
  width: 276px;
  margin: 36px auto 18px;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 18px 44px rgba(73, 104, 160, .14);
}

.flow-uploaded-state {
  color: #132a5d;
  font-size: 13px;
  font-weight: 900;
}

.flow-uploaded-state span {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #4c8dff;
  font-size: 10px;
}

.flow-uploaded-img {
  height: 174px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7f9fe, #eef4ff);
  overflow: hidden;
}

.flow-uploaded-img img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.flow-uploaded-name {
  margin-top: 10px;
  color: #203b76;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.flow-uploaded-size {
  margin-top: 3px;
  color: #7991c8;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.flow-ai-ring {
  --p: 0deg;
  width: 182px;
  height: 182px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background:
    conic-gradient(from 216deg, #53d7ff 0deg, #6a8cff calc(var(--p) * .54), #a957ff var(--p), rgba(221,230,255,.58) var(--p), rgba(221,230,255,.58) 360deg);
  box-shadow: 0 18px 50px rgba(92, 128, 255, .18), inset 0 0 0 1px rgba(255,255,255,.7);
}

.flow-ai-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 0 32px rgba(144, 179, 255, .18);
}

.flow-ai-core {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #21489d;
}

.flow-ai-core span {
  display: block;
  font-size: 20px;
  font-weight: 950;
}

.flow-ai-core strong {
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
  color: #4d7cff;
}

.flow-ai-core em {
  font-style: normal;
  font-size: 16px;
  font-weight: 950;
  color: #4d7cff;
}

.flow-ai-core p {
  margin: 8px 0 0;
  color: #234582;
  font-size: 15px;
  font-weight: 900;
}

.flow-process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 2px 22px;
  color: #214680;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.flow-process-row div {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.flow-process-row span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e3eafe;
  border: 2px dashed #8fa8ff;
}

.flow-process-row .done span {
  border: 0;
  color: #fff;
  background: #43cf9a;
}

.flow-process-row .active span {
  border: 0;
  background: radial-gradient(circle, #fff 28%, #44d0ff 30%);
}

.flow-process-row div:nth-child(4) span {
  border: 0;
  background: radial-gradient(circle at 35% 35%, #fff, #9b5cf6 52%, #5b7cff);
}

.flow-warm-tip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(247, 249, 255, .82);
  color: #6380b5;
}

.flow-warm-tip > span {
  color: #3b82f6;
  font-size: 22px;
}

.flow-warm-tip strong {
  display: block;
  color: #5f72a8;
  font-size: 13px;
}

.flow-warm-tip p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.flow-selector-phone,
.flow-complete-phone {
  border-radius: 26px;
  background: rgba(255,255,255,.88);
}

.flow-selector-phone {
  min-height: 720px;
  padding: 4px 20px 24px;
}

.flow-back-btn,
.flow-complete-back {
  border: 0;
  background: transparent;
  color: #081736;
  font-size: 28px;
  line-height: 1;
}

.flow-back-btn {
  position: absolute;
  left: 18px;
  top: 48px;
  z-index: 4;
}

.flow-selector-head {
  margin-top: 18px;
  padding: 0 52px;
  text-align: center;
}

.flow-selector-head h3 {
  margin: 0;
  color: #10234a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.flow-selector-head p {
  max-width: 286px;
  margin: 8px auto 0;
  color: #8d9abb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
}

.flow-main-preview {
  position: relative;
  height: 380px;
  margin: 12px 8px 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10px;
  border-radius: 20px;
  border: 2px solid rgba(139, 119, 255, .68);
  background: linear-gradient(180deg, #f6f9ff, #fff);
  box-shadow: 0 20px 42px rgba(88, 135, 255, .16), 0 0 22px rgba(187, 133, 255, .2);
}

.flow-main-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 12px;
  cursor: zoom-in;
}

#flowSelectorPreview {
  position: absolute !important;
  inset: 10px !important;
  width: calc(100% - 20px) !important;
  height: calc(100% - 20px) !important;
  max-width: calc(100% - 20px) !important;
  max-height: calc(100% - 20px) !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.flow-main-preview span {
  color: #9b5cf6;
  font-weight: 950;
}

.flow-option-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 8px;
  -webkit-overflow-scrolling: touch;
}

.flow-option-card {
  min-width: 64px;
  height: 92px;
  padding: 4px;
  border: 1px solid #e0e8fb;
  border-radius: 10px;
  background: #fff;
  color: #52617e;
  font-size: 11px;
  font-weight: 800;
}

.flow-option-card.active {
  border-color: #5a7cff;
  box-shadow: 0 10px 22px rgba(80, 122, 255, .16);
}

.flow-option-thumb {
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #f4f7ff;
}

.flow-option-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flow-option-card b {
  display: block;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-primary-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #45b9ff 0%, #5877ff 54%, #a855f7 100%);
  box-shadow: 0 15px 28px rgba(94, 112, 255, .22), inset 0 2px 0 rgba(255,255,255,.25);
  font-size: 16px;
  font-weight: 950;
}

.flow-selector-notice {
  max-width: 360px;
  min-height: 34px;
  margin: 10px auto 0;
  color: #9aa8c8;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.flow-selector-error {
  min-height: 0;
  margin: 8px auto 0;
  padding: 0;
  color: #d93752;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.flow-selector-error:not(:empty) {
  max-width: 360px;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(255, 239, 243, .96);
}

.flow-chat-phone {
  height: min(780px, calc(100dvh - 84px));
  min-height: 690px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 8%, rgba(110, 218, 255, .44), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(165, 122, 255, .34), transparent 32%),
    linear-gradient(180deg, #e9f6ff 0%, #f3f7ff 38%, #fff 100%);
}

.flow-chat-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(75, 178, 255, .28), transparent 34%),
    linear-gradient(260deg, rgba(156, 113, 255, .22), transparent 34%);
  pointer-events: none;
}

.flow-chat-tip {
  position: relative;
  z-index: 2;
  margin: 10px 14px 0;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #244a95;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 10px 24px rgba(80, 110, 160, .12);
  font-size: 12px;
  font-weight: 850;
}

.flow-chat-tip strong {
  color: #356bff;
  font-weight: 950;
}

.flow-chat-tip span {
  color: #5f76aa;
}

.flow-ps-screen .flow-chat-tip {
  min-height: 36px;
  padding: 7px 12px;
  gap: 8px;
}

.flow-ps-screen .flow-chat-tip strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.flow-ps-screen .flow-chat-tip span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.flow-recent-result {
  position: relative;
  z-index: 2;
  margin: 30px 20px 0;
  padding: 16px 16px 18px;
  border-radius: 20px;
  color: #51648f;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 42px rgba(78, 105, 160, .12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.flow-recent-head,
.flow-recent-body {
  display: flex;
  align-items: center;
}

.flow-recent-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.flow-recent-head strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #435b95;
  font-size: 14px;
  font-weight: 950;
}

.flow-recent-head strong span {
  color: #526dff;
}

.flow-recent-head button {
  border: 0;
  color: #5f55b5;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}

.flow-recent-body {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  grid-template-areas:
    "thumb info"
    "thumb action";
  gap: 10px 16px;
  align-items: center;
}

.flow-recent-thumb {
  grid-area: thumb;
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}

.flow-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.flow-recent-info {
  grid-area: info;
  min-width: 0;
}

.flow-recent-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #39b67a;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 950;
}

.flow-recent-state span {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #39c986;
  font-size: 11px;
}

.flow-recent-info p,
.flow-recent-info time {
  display: block;
  margin: 7px 0 0;
  color: #92a0bf;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 750;
}

.flow-recent-view {
  grid-area: action;
  justify-self: start;
  min-width: 128px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #57a7ff, #995df6);
  box-shadow: 0 12px 22px rgba(112, 105, 238, .24);
  font-size: 13px;
  font-weight: 950;
}

.flow-chat-preview {
  position: relative;
  z-index: 1;
  width: 228px;
  height: 342px;
  margin: 48px auto 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 20px 46px rgba(86, 116, 160, .16);
}

.flow-chat-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.flow-chat-preview.is-hidden {
  display: none;
}

.flow-generating-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(85, 155, 255, .18), transparent 36%),
    linear-gradient(180deg, rgba(8, 15, 31, .16), rgba(8, 15, 31, .42));
  backdrop-filter: blur(1.2px);
  -webkit-backdrop-filter: blur(1.2px);
  pointer-events: none;
}

.flow-generating-spinner {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, .08) 55deg,
      #72e4ff 155deg,
      #6d8cff 245deg,
      #9b67ff 320deg,
      rgba(255, 255, 255, 0) 360deg
    );
  filter:
    drop-shadow(0 0 10px rgba(84, 214, 255, .88))
    drop-shadow(0 0 22px rgba(111, 112, 255, .58));
  animation: flowGeneratingSpin 1.15s linear infinite;
}

.flow-generating-spinner::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: rgba(15, 23, 42, .68);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    0 0 26px rgba(91, 151, 255, .24);
}

.flow-generating-spinner::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 214, 255, .34), rgba(29, 43, 82, .08) 66%, transparent 70%);
}

.flow-generating-spinner span {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 8px #fff,
    0 0 18px #75e6ff,
    0 0 30px #7a77ff;
}

.flow-generating-text {
  position: absolute;
  left: 50%;
  top: calc(50% + 49px);
  transform: translateX(-50%);
  min-width: 130px;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: .2px;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

.flow-generating-dots::after {
  content: "";
  display: inline-block;
  width: 1.4em;
  text-align: left;
  animation: flowGeneratingDots 1.3s steps(4, end) infinite;
}

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

@keyframes flowGeneratingDots {
  0% {
    content: "";
  }

  25% {
    content: ".";
  }

  50% {
    content: "..";
  }

  75%,
  100% {
    content: "...";
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-generating-spinner,
  .flow-generating-dots::after {
    animation-duration: 2.4s;
  }
}

.flow-chat-board {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 252px;
  padding: 18px 16px 16px;
  border-radius: 28px 28px 0 0;
  background: rgba(255,255,255,.82);
  box-shadow: 0 -12px 34px rgba(72, 92, 140, .12);
  backdrop-filter: blur(14px);
}

.flow-chat-phone.is-finished .flow-chat-board {
  height: 332px;
  padding: 34px 20px 18px;
  border-radius: 28px 28px 0 0;
  background:
    linear-gradient(180deg, rgba(250,253,255,.92), rgba(255,255,255,.96) 48%, rgba(255,255,255,.98)),
    radial-gradient(circle at 18% 8%, rgba(103, 177, 255, .2), transparent 35%);
  box-shadow:
    0 -18px 42px rgba(83, 105, 150, .12),
    inset 0 1px 0 rgba(255,255,255,.78);
}

.flow-chat-list {
  height: 154px;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.flow-chat-phone.is-finished .flow-chat-list {
  height: 214px;
}

.flow-bubble {
  width: fit-content;
  max-width: 78%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #4e628d;
  background: #fff;
  box-shadow: 0 8px 18px rgba(73, 95, 140, .08);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 750;
}

.flow-bubble.me {
  margin-left: auto;
  color: #3f5f9c;
  background: #eaf3ff;
}

.flow-bubble.ai {
  margin-right: auto;
}

.flow-chat-phone.is-finished .flow-bubble.ai:first-child {
  position: relative;
  margin-left: 56px;
}

.flow-chat-phone.is-finished .flow-bubble.ai:first-child::before {
  content: "";
  position: absolute;
  left: -56px;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 56%, #152f76 0 18%, transparent 19%),
    radial-gradient(circle at 36% 46%, #4affff 0 5%, transparent 6%),
    radial-gradient(circle at 64% 46%, #4affff 0 5%, transparent 6%),
    linear-gradient(180deg, #dbe8ff, #f7fbff);
  box-shadow: 0 8px 16px rgba(86, 128, 200, .16);
}

.flow-chat-img {
  display: block;
  max-width: 150px;
  max-height: 120px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.flow-chat-compose {
  display: grid;
  grid-template-columns: 36px 1fr 38px;
  gap: 7px;
  align-items: center;
  margin-top: 10px;
}

.flow-chat-phone.is-finished .flow-chat-compose {
  grid-template-columns: 48px 1fr 48px;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.flow-chat-compose input[type="file"] {
  display: none;
}

.flow-chat-compose input[type="text"] {
  min-width: 0;
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  color: #65799f;
  background: rgba(255,255,255,.86);
  font-size: 12px;
  outline: none;
}

.flow-chat-phone.is-finished .flow-chat-compose input[type="text"] {
  height: 48px;
  padding: 0 18px;
  background: rgba(255,255,255,.96);
  box-shadow:
    0 14px 30px rgba(83, 105, 150, .12),
    inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 13px;
}

.flow-plus-btn,
.flow-send-btn {
  border: 0;
  color: #fff;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(105, 111, 255, .18);
}

.flow-plus-btn,
.flow-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #5177ff;
  font-size: 22px;
}

.flow-send-btn {
  background: linear-gradient(135deg, #58a7ff, #9b5cf6);
  color: #fff;
  font-size: 16px;
}

.flow-chat-phone.is-finished .flow-plus-btn,
.flow-chat-phone.is-finished .flow-send-btn {
  width: 48px;
  height: 48px;
  font-size: 24px;
  box-shadow: 0 16px 30px rgba(96, 114, 220, .18);
}

.flow-chat-phone.is-finished .flow-send-btn {
  background: linear-gradient(135deg, #5aa7ff, #8f5cf5);
  font-size: 18px;
}

.flow-chat-file-name {
  height: 14px;
  margin-top: 4px;
  color: #647eb8;
  font-size: 11px;
}

.flow-complete-phone {
  min-height: 720px;
  padding: 4px 26px 26px;
  text-align: center;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 13%, rgba(133, 220, 255, .34), transparent 27%),
    radial-gradient(circle at 72% 12%, rgba(170, 146, 255, .16), transparent 24%),
    radial-gradient(circle at 28% 26%, rgba(129, 212, 255, .13), transparent 24%),
    linear-gradient(180deg, #fbfdff 0%, #f4fbff 24%, rgba(255,255,255,.96) 54%, #fff 100%);
}

.flow-complete-back {
  position: absolute;
  left: 18px;
  top: 52px;
}

.flow-success-hero {
  position: relative;
  min-height: 198px;
  margin: 2px -18px 0;
  padding-top: 18px;
  overflow: hidden;
}

.flow-success-mark {
  width: 82px;
  height: 82px;
  position: relative;
  z-index: 2;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.88), rgba(255,255,255,0) 31%),
    linear-gradient(145deg, #78ddff 0%, #59a8ff 47%, #6179f7 100%);
  box-shadow:
    0 0 0 7px rgba(171, 235, 255, .46),
    0 0 0 15px rgba(134, 215, 255, .14),
    0 18px 32px rgba(72, 128, 255, .22);
}

.flow-success-mark::before {
  content: "";
  width: 34px;
  height: 20px;
  border-left: 7px solid #fff;
  border-bottom: 7px solid #fff;
  transform: translateY(-4px) rotate(-45deg);
  border-radius: 3px;
}

.flow-success-hero h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #07347f;
  font-size: 27px;
  line-height: 1.14;
  font-weight: 950;
}

.flow-success-hero p {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  color: #7188b8;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.flow-confetti,
.flow-burst {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.flow-confetti {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: .72;
}

.flow-confetti.c1 {
  left: 54px;
  top: 74px;
  background: #f36d8c;
  transform: rotate(43deg);
}

.flow-confetti.c1::after {
  content: "";
  position: absolute;
  left: 52px;
  top: -38px;
  width: 26px;
  height: 16px;
  border-bottom: 4px solid rgba(255, 194, 103, .54);
  border-left: 4px solid rgba(255, 194, 103, .34);
  border-radius: 0 0 0 18px;
  transform: rotate(20deg);
}

.flow-confetti.c2 {
  right: 50px;
  top: 94px;
  background: #7892f4;
  transform: rotate(56deg);
}

.flow-confetti.c2::after {
  content: "";
  position: absolute;
  right: 92px;
  top: 42px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(140, 219, 255, .7);
}

.flow-confetti.c3 {
  left: 124px;
  top: 94px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8ed4ff;
}

.flow-confetti.c4 {
  right: 82px;
  top: 76px;
  width: 9px;
  height: 9px;
  background: #ffbd72;
  transform: rotate(30deg);
}

.flow-confetti.c4::after {
  content: "";
  position: absolute;
  right: 66px;
  top: 58px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(244, 142, 170, .56);
  transform: rotate(18deg);
}

.flow-burst {
  width: 56px;
  height: 56px;
  opacity: .42;
  background:
    linear-gradient(90deg, transparent 48%, currentColor 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, currentColor 49% 51%, transparent 52%),
    linear-gradient(45deg, transparent 48.5%, currentColor 49.5% 50.5%, transparent 51.5%),
    linear-gradient(-45deg, transparent 48.5%, currentColor 49.5% 50.5%, transparent 51.5%);
}

.flow-burst.b1 {
  right: 68px;
  top: 18px;
  color: #b68cff;
  transform: rotate(10deg);
}

.flow-burst.b2 {
  left: 56px;
  top: 104px;
  width: 46px;
  height: 46px;
  color: #ffc3cf;
  transform: rotate(7deg);
}

.flow-complete-preview {
  width: min(304px, calc(100% - 10px));
  min-height: 430px;
  height: auto;
  margin: -8px auto 12px;
  padding: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 16%, rgba(89, 210, 255, .26), transparent 36%),
    radial-gradient(circle at 88% 20%, rgba(174, 113, 255, .22), transparent 38%),
    rgba(255,255,255,.82);
  box-shadow: 0 22px 48px rgba(93, 118, 170, .16);
}

.flow-complete-preview img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100% - 20px);
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 0;
  cursor: zoom-in;
}

.flow-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: rgba(4, 10, 24, .94);
  touch-action: none;
}

.flow-image-viewer-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.flow-image-save-hint {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 3;
  transform: translateX(-50%);
  width: min(88vw, 420px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #18305f;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 14px 34px rgba(8, 20, 45, .28);
}

.flow-image-viewer img {
  max-width: 96vw;
  max-height: 86dvh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
  transform-origin: center center;
  transition: transform .06s linear;
}

.flow-image-viewer img.dragging {
  cursor: grabbing;
  transition: none;
}

.flow-image-viewer-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  font-size: 32px;
  line-height: 1;
  font-weight: 300;
}

.flow-quality-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.flow-quality-tags span {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #3d6f99;
  background: rgba(235, 249, 244, .92);
  font-size: 11px;
  font-weight: 900;
}

.flow-quality-tags span:nth-child(2) {
  color: #4464c5;
  background: #eef4ff;
}

.flow-quality-tags span:nth-child(3) {
  color: #7d4cd9;
  background: #f4efff;
}

.flow-primary-btn.save,
.flow-outline-btn {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border-radius: 14px;
  font-size: 15px;
}

.flow-outline-btn {
  border: 1px solid #bed0ff;
  color: #4c70ff;
  background: rgba(255,255,255,.72);
  font-weight: 950;
}

.flow-complete {
  height: 100dvh;
  min-height: 100dvh;
  padding-top: max(6px, env(safe-area-inset-top));
  padding-bottom: 0;
  overflow: hidden;
}

.flow-complete-actions {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 30;
  transform: translateX(-50%);
  width: min(340px, calc(100vw - 48px));
  display: grid;
  gap: 7px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 -12px 32px rgba(62, 91, 150, .16);
  backdrop-filter: blur(14px);
}

.flow-complete-actions .flow-primary-btn.save,
.flow-complete-actions .flow-outline-btn {
  margin-top: 0;
}

.flow-complete-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.flow-complete-secondary #flowContinueChat {
  border-color: rgba(70, 150, 255, .48);
  color: #2f6df6;
  background: linear-gradient(180deg, rgba(236, 247, 255, .96), rgba(219, 237, 255, .9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 20px rgba(67, 126, 255, .12);
}

/* Compact completed page header so result image and actions stay visible on iPhone screens. */
.flow-complete-phone {
  height: calc(100dvh - max(6px, env(safe-area-inset-top)));
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 116px;
  overflow: hidden;
}

.flow-complete-back {
  top: 20px;
}

.flow-success-hero {
  min-height: 112px;
  margin-top: -2px;
  padding-top: 8px;
}

.flow-success-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 7px;
  box-shadow:
    0 0 0 5px rgba(171, 235, 255, .42),
    0 0 0 11px rgba(134, 215, 255, .12),
    0 14px 24px rgba(72, 128, 255, .18);
}

.flow-success-mark::before {
  width: 23px;
  height: 14px;
  border-left-width: 6px;
  border-bottom-width: 6px;
  transform: translateY(-3px) rotate(-45deg);
}

.flow-success-hero h3 {
  font-size: 22px;
}

.flow-success-hero p {
  margin-top: 5px;
  font-size: 12px;
}

.flow-success-hero .flow-burst {
  transform: scale(.76);
}

.flow-burst.b1 {
  top: 8px;
}

.flow-burst.b2 {
  top: 76px;
}

.flow-confetti.c1 {
  top: 58px;
}

.flow-confetti.c2 {
  top: 72px;
}

.flow-confetti.c3 {
  top: 74px;
}

.flow-confetti.c4 {
  top: 58px;
}

.flow-complete-preview {
  min-height: 0;
  height: min(500px, calc(100dvh - 150px));
  margin-top: -4px;
}

.flow-complete-preview img {
  max-height: min(480px, calc(100dvh - 170px));
}

@media (max-height: 740px) {
  .flow-complete-phone {
    height: calc(100dvh - 12px);
    min-height: 0;
    padding-bottom: 102px;
  }

  .flow-success-hero {
    min-height: 92px;
    margin-top: -10px;
    padding-top: 4px;
  }

  .flow-success-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
  }

  .flow-success-mark::before {
    width: 18px;
    height: 11px;
    border-left-width: 5px;
    border-bottom-width: 5px;
  }

  .flow-success-hero h3 {
    font-size: 18px;
  }

  .flow-success-hero p {
    margin-top: 2px;
    font-size: 10px;
  }

  .flow-burst.b1,
  .flow-burst.b2,
  .flow-confetti.c3 {
    display: none;
  }

  .flow-complete-preview {
    width: min(292px, calc(100% - 10px));
    min-height: 0;
    height: min(420px, calc(100dvh - 152px));
    margin-top: -2px;
    margin-bottom: 8px;
    padding: 8px;
  }

  .flow-complete-preview img {
    max-height: min(400px, calc(100dvh - 172px));
  }

  .flow-primary-btn.save,
  .flow-outline-btn {
    height: 36px;
    margin-top: 6px;
    border-radius: 12px;
    font-size: 13px;
  }

  .flow-complete-actions {
    width: min(320px, calc(100vw - 36px));
    bottom: max(6px, env(safe-area-inset-bottom));
    gap: 4px;
    padding: 6px;
    border-radius: 16px;
  }
}

.project-help-swal {
  width: min(382px, calc(100vw - 24px)) !important;
  padding: 29px 16px 22px !important;
  border-radius: 29px !important;
  border: 1px solid rgba(255, 255, 255, .82) !important;
  background:
    radial-gradient(circle at 95% 0%, rgba(206, 216, 255, .32), transparent 31%),
    linear-gradient(128deg, rgba(218, 244, 255, .34), transparent 33%),
    linear-gradient(180deg, rgba(253, 254, 255, .98), rgba(250, 252, 255, .95)) !important;
  box-shadow: 0 28px 70px rgba(44, 71, 113, .23), inset 0 1px 0 rgba(255, 255, 255, .95) !important;
  overflow: hidden !important;
}

.project-help-swal-html {
  margin: 0 !important;
  padding: 0 !important;
}

.project-help-close {
  position: absolute !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: 14px !important;
  width: 36px !important;
  height: 36px !important;
  top: 14px !important;
  right: 14px !important;
  color: transparent !important;
}

.project-help-close::before,
.project-help-close::after {
  content: "" !important;
  position: absolute !important;
  left: 8px !important;
  top: 17px !important;
  width: 22px !important;
  height: 2.6px !important;
  border-radius: 4px !important;
  background: #7485a4 !important;
}

.project-help-close::before { transform: rotate(45deg); }
.project-help-close::after { transform: rotate(-45deg); }

.project-help-modal {
  position: relative;
  z-index: 1;
  text-align: left;
  color: #10254d;
}

.project-help-hero {
  display: block;
  margin-bottom: 0;
  text-align: center;
}

.project-help-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 4px;
  margin-bottom: 9px;
}

.project-help-icon {
  width: 53px;
  height: 53px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #58b7ff 0%, #6f7cff 45%, #a04eff 100%);
  box-shadow: 0 0 0 6px rgba(107, 147, 255, .12), inset 0 0 0 2px rgba(255, 255, 255, .55), 0 10px 22px rgba(83, 105, 255, .27);
}

.project-help-icon svg {
  width: 31px;
  height: 31px;
  color: #fff;
  fill: currentColor;
  filter: drop-shadow(0 2px 3px rgba(45, 53, 156, .18));
}

.project-help-hero h3 {
  margin: 0;
  color: #0b1e3b;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -1.4px;
}

.project-help-hero p {
  margin: 0 0 14px;
  color: #7386a3;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 650;
  text-align: center;
}

.project-help-steps {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
}

.project-help-steps::before {
  content: "";
  position: absolute;
  left: 29px;
  top: 32px;
  bottom: 49px;
  border-left: 1.5px dashed #c8d8eb;
  z-index: 0;
}

.project-help-step {
  position: relative;
  display: grid;
  grid-template-columns: 49px 76px minmax(0, 1fr);
  align-items: center;
  min-height: 98px;
  padding: 10px 11px 10px 7px;
  border: 1px solid rgba(235, 240, 250, .95);
  border-radius: 18px;
  background: linear-gradient(104deg, rgba(255,255,255,.99), rgba(255,255,255,.89));
  box-shadow: 0 12px 25px rgba(68, 95, 136, .085), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.project-help-num {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(145deg, #45adff 4%, #667cff 47%, #9a54ff 100%);
  box-shadow: 0 9px 18px rgba(85, 112, 255, .27);
}

.project-help-art {
  width: 72px;
  height: 70px;
  display: grid;
  place-items: center;
  justify-self: center;
  transform: scale(.88);
}

.project-help-phone-art {
  position: relative;
  width: 54px;
  height: 76px;
  border: 2px solid #cbd7ff;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fbfcff);
  box-shadow: 0 0 0 10px rgba(231, 237, 255, .42);
}

.project-help-phone-art::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 5px;
  width: 12px;
  height: 3px;
  border-radius: 6px;
  background: #d7def5;
}

.project-help-shirt {
  position: absolute;
  left: 12px;
  top: 18px;
  width: 29px;
  height: 24px;
  background: linear-gradient(145deg, #59b2ff, #735eff);
  clip-path: polygon(18% 0, 38% 0, 50% 15%, 62% 0, 82% 0, 100% 25%, 81% 39%, 75% 32%, 75% 100%, 25% 100%, 25% 32%, 19% 39%, 0 25%);
  filter: drop-shadow(0 2px 3px rgba(78, 100, 244, .3));
}

.project-help-line {
  position: absolute;
  left: 14px;
  width: 25px;
  height: 3px;
  border-radius: 4px;
  background: #c6d2ff;
}

.project-help-line.one { top: 51px; }
.project-help-line.two { top: 59px; width: 19px; }

.project-help-buy-art {
  position: relative;
  width: 84px;
  height: 67px;
}

.project-help-buy-pill {
  position: absolute;
  top: 11px;
  left: 0;
  width: 70px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #4ca9ff, #6d6eff 53%, #8c54ff);
  box-shadow: 0 7px 0 rgba(110, 83, 245, .18), 0 11px 18px rgba(87, 102, 255, .25), inset 0 -2px 0 rgba(255, 255, 255, .22);
}

.project-help-cursor {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 35px;
  height: 42px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 4px 4px rgba(49, 78, 158, .22));
}

.project-help-receipt-wrap {
  position: relative;
  width: 78px;
  height: 78px;
}

.project-help-receipt {
  position: relative;
  width: 54px;
  height: 72px;
  margin-left: 0;
  border: 2px solid #d0d9ff;
  border-radius: 8px 8px 4px 4px;
  background: #fff;
  box-shadow: 0 0 0 10px rgba(232, 238, 255, .38);
  clip-path: polygon(0 0, 100% 0, 100% 93%, 88% 100%, 76% 93%, 64% 100%, 52% 93%, 40% 100%, 28% 93%, 16% 100%, 0 93%);
}

.project-help-receipt i {
  position: absolute;
  left: 12px;
  width: 27px;
  height: 3px;
  border-radius: 5px;
  background: #c6d3ff;
}

.project-help-receipt i:nth-child(1) { top: 16px; }
.project-help-receipt i:nth-child(2) { top: 26px; width: 20px; }
.project-help-receipt i:nth-child(3) { top: 36px; width: 29px; }

.project-help-money-badge {
  position: absolute;
  right: 8px;
  bottom: 4px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  background: linear-gradient(145deg, #69b9ff, #6f7dff 52%, #9d5dff);
  box-shadow: 0 7px 15px rgba(86, 102, 255, .25);
}

.project-help-mini-lock {
  position: absolute;
  right: 6px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  border: 2px solid #6b78ff;
  border-radius: 5px;
  background: #fff;
}

.project-help-mini-lock::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -9px;
  width: 8px;
  height: 8px;
  border: 2px solid #6b78ff;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.project-help-mini-lock::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 3px;
  height: 6px;
  border-radius: 3px;
  background: #6b78ff;
}

.project-help-text {
  min-width: 0;
  padding-left: 1px;
}

.project-help-text strong {
  display: block;
  margin-bottom: 6px;
  color: #132947;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 850;
  letter-spacing: -.4px;
}

.project-help-text span {
  display: block;
  margin: 0;
  color: #92a0b7;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.project-help-tip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 31px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1.5px solid #ffc78b;
  border-radius: 15px;
  background: linear-gradient(90deg, #fffaf5, #fffdfb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.project-help-tip > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(145deg, #ffb24f, #ff8f34);
  box-shadow: 0 6px 13px rgba(255, 147, 52, .22);
}

.project-help-tip strong {
  display: block;
  margin-bottom: 4px;
  color: #ff9036;
  font-size: 12.5px;
  font-weight: 850;
}

.project-help-tip p {
  margin: 0;
  color: #53647d;
  font-size: 10.8px;
  line-height: 1.45;
  font-weight: 650;
}

.project-help-confirm {
  width: 100%;
  min-height: 51px;
  margin-top: 14px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(90deg, #45a7ff 0%, #5c87ff 40%, #7b69ff 67%, #a34df6 100%);
  box-shadow: 0 13px 25px rgba(97, 92, 248, .22), inset 0 1px 0 rgba(255, 255, 255, .22);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: .5px;
}

@media (min-width: 760px) {
  .flow-screen {
    padding-top: 34px;
  }

  .flow-chat-phone,
  .flow-selector-phone,
  .flow-generating-phone,
  .flow-complete-phone {
    transform-origin: top center;
  }
}

@media (max-width: 380px) {
  .flow-phone {
    width: min(354px, calc(100vw - 22px));
  }

  .flow-generating-phone,
  .flow-selector-phone,
  .flow-complete-phone {
    min-height: 682px;
  }

  .flow-main-preview {
    height: 350px;
  }

}

@media (max-width: 380px) and (max-height: 740px) {
  .flow-complete-phone {
    height: calc(100dvh - 10px);
    min-height: 0;
    padding-bottom: 98px;
  }

  .flow-complete-preview {
    min-height: 0;
    height: min(410px, calc(100dvh - 152px));
    margin-bottom: 7px;
  }

  .flow-complete-preview img {
    max-height: min(390px, calc(100dvh - 172px));
  }

  .flow-primary-btn.save,
  .flow-outline-btn {
    height: 32px;
    margin-top: 3px;
    border-radius: 11px;
    font-size: 12px;
  }

  .flow-complete-actions .flow-primary-btn.save,
  .flow-complete-actions .flow-outline-btn {
    height: 32px;
    margin-top: 0;
  }

  .flow-complete-actions {
    width: min(316px, calc(100vw - 34px));
    bottom: max(6px, env(safe-area-inset-bottom));
    gap: 3px;
    padding: 5px;
  }

.flow-complete-secondary {
  gap: 5px;
  }
}

.flow-ps-phone {
  height: min(820px, calc(100dvh - 28px));
  min-height: 680px;
  padding-bottom: 18px;
  overflow: hidden;
}

.flow-ps-card {
  position: relative;
  z-index: 2;
  width: calc(100% - 30px);
  margin: 10px auto 12px;
  padding: 16px;
  max-height: min(500px, calc(100dvh - 276px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 44px rgba(66, 99, 160, .14);
}

.flow-ps-card.flow-ps-step-upload {
  max-height: min(370px, calc(100dvh - 430px));
}

.flow-ps-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 2px 0 0;
}

.flow-ps-upload {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.flow-ps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #163466;
  font-size: 15px;
  font-weight: 950;
}

.flow-ps-head span {
  color: #6d7fa8;
  font-size: 12px;
}

.flow-ps-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.flow-ps-progress i {
  height: 5px;
  border-radius: 999px;
  background: #dbe6ff;
}

.flow-ps-progress i.on {
  background: linear-gradient(90deg, #42bfff, #7c63ff);
}

.flow-ps-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f2f7ff;
  color: #5d73a4;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.flow-ps-note.danger {
  color: #d93752;
  background: #fff0f3;
}

.flow-ps-upload input[type="file"] {
  display: none;
}

.flow-ps-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 0;
  align-items: start;
  overflow: visible;
}

.flow-ps-pane {
  min-width: 0;
  width: 100%;
  text-align: center;
  overflow: hidden;
}

.flow-ps-pane > b {
  display: block;
  margin-bottom: 6px;
  color: #5872a8;
  font-size: 12px;
  font-weight: 950;
}

.flow-ps-crop {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  margin: 0 auto;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe6ff;
  color: #91a2c5;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.flow-ps-crop:not(.ready) {
  border-style: dashed;
  border-color: #75a9ff;
  background: rgba(235, 246, 255, .72);
}

.flow-ps-crop.is-uploading {
  pointer-events: none;
}

.flow-ps-upload-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 8px;
  background: rgba(245, 250, 255, .86);
  color: #4b6bff;
  font-size: 12px;
  font-weight: 900;
}

.flow-ps-upload-loading i {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(96, 128, 255, .18);
  border-top-color: #6d77ff;
  animation: flowSpin .78s linear infinite;
}

.flow-ps-upload-loading em {
  font-style: normal;
}

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

.flow-ps-upload-placeholder {
  padding: 0 10px;
  color: #3574ff;
  font-size: 15px;
  font-weight: 950;
  text-align: center;
  line-height: 1.35;
}

.flow-ps-example {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  border: 1px solid #dbe6ff;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  color: #91a2c5;
  font-size: 13px;
  font-weight: 850;
  padding: 0;
}

.flow-ps-example img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.flow-ps-crop img {
  width: auto;
  height: auto;
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  object-fit: contain;
  display: block;
  transition: transform .12s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.flow-ps-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6077a9;
  font-size: 12px;
  font-weight: 850;
}

.flow-ps-slider input {
  flex: 1;
}

.flow-ps-help {
  margin: 9px 0 0;
  color: #8a9abb;
  font-size: 12px;
}

.flow-ps-field {
  display: block;
  margin-bottom: 10px;
  color: #405a8c;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.flow-ps-field input {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid #dbe6ff;
  border-radius: 13px;
  outline: 0;
  background: rgba(255,255,255,.92);
  color: #10254d;
  font-weight: 800;
}

.flow-ps-field-hint {
  margin: -2px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(239, 246, 255, .9);
  color: #6680af;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
}

.flow-ps-inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.flow-ps-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(96px, .6fr) 1fr;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.92) 35%, rgba(255,255,255,.96));
  box-shadow: 0 -10px 22px rgba(255,255,255,.82);
}

.flow-ps-actions .flow-outline-btn,
.flow-ps-actions .flow-primary-btn {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
}

.flow-ps-actions .flow-outline-btn {
  border-color: rgba(74, 126, 255, .38);
  background: rgba(255, 255, 255, .92);
  color: #4a72f6;
  box-shadow: 0 10px 22px rgba(72, 110, 220, .08);
}

.flow-ps-actions .flow-outline-btn:disabled,
.flow-ps-actions .flow-primary-btn:disabled {
  cursor: not-allowed;
  opacity: .58;
  filter: grayscale(.15);
}

.flow-ps-actions .flow-primary-btn.is-loading {
  position: relative;
  opacity: .86;
  filter: none;
  overflow: hidden;
}

.flow-ps-actions .flow-primary-btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: flowPsButtonSpin .82s linear infinite;
}

.flow-ps-step-review .flow-ps-note {
  position: relative;
}

.flow-ps-step-review .flow-ps-note:has(+ .flow-ps-content .flow-primary-btn.is-loading),
.flow-ps-note:has(~ .flow-ps-content .flow-primary-btn.is-loading) {
  padding-left: 34px;
  background: #eef5ff;
  color: #3158bd;
}

.flow-ps-step-review .flow-ps-note:has(+ .flow-ps-content .flow-primary-btn.is-loading)::before,
.flow-ps-note:has(~ .flow-ps-content .flow-primary-btn.is-loading)::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -7px;
  border: 2px solid rgba(74, 126, 255, .24);
  border-top-color: #4a7eff;
  border-radius: 50%;
  animation: flowPsButtonSpin .82s linear infinite;
}

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

.flow-ps-actions .flow-primary-btn:only-child {
  grid-column: 1 / -1;
}

.flow-ps-next {
  box-shadow: 0 12px 24px rgba(86, 112, 255, .2);
}

.flow-ps-review {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  text-align: left;
}

.flow-ps-review-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(102, 133, 255, .12);
  background: linear-gradient(135deg, rgba(242, 247, 255, .98), rgba(249, 251, 255, .94));
  text-align: left;
}

.flow-ps-review-icon {
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4bb8ff, #7a61f6);
  box-shadow: 0 7px 14px rgba(91, 117, 255, .2);
}

.flow-ps-review-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.flow-ps-review-icon path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-ps-review-head strong {
  display: block;
  color: #122958;
  font-size: 13px;
  line-height: 1.25;
}

.flow-ps-review-head > div > span {
  display: block;
  margin-top: 2px;
  color: #6f86b6;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.flow-ps-review p {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 6px 9px;
  border-radius: 10px;
  background: #f6f9ff;
}

.flow-ps-review b {
  flex: 0 0 auto;
  color: #7790bd;
  font-size: 10px;
  line-height: 1.2;
}

.flow-ps-review span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #132a58;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.flow-ps-card.flow-ps-step-review {
  flex: 0 0 auto;
  padding: 12px;
}

.flow-ps-step-review .flow-ps-progress {
  margin: 8px 0;
}

.flow-ps-step-review .flow-ps-note {
  margin-bottom: 8px;
  padding: 8px 10px;
}

.flow-ps-step-review .flow-ps-review {
  gap: 6px;
  margin-bottom: 6px;
}

.flow-ps-step-review .flow-ps-review-head {
  margin-bottom: 5px;
  padding: 8px 9px;
}

.flow-ps-step-review .flow-ps-review-head strong {
  font-size: 13px;
}

.flow-ps-step-review .flow-ps-review-head span {
  font-size: 10px;
}

.flow-ps-step-review .flow-ps-review p {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 9px;
  border-radius: 10px;
}

.flow-ps-step-review .flow-ps-review b {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1.2;
}

.flow-ps-step-review .flow-ps-review span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.25;
}

.flow-ps-step-review .flow-ps-actions {
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
}

.flow-ps-step-review .flow-ps-actions .flow-outline-btn,
.flow-ps-step-review .flow-ps-actions .flow-primary-btn {
  height: 38px;
}

.flow-ps-chat-board {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 252px;
  min-height: 230px;
  margin-top: 0;
}

@media (max-height: 740px) {
  .flow-ps-phone {
    min-height: 0;
    height: calc(100dvh - 16px);
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .flow-ps-card {
    margin-top: 6px;
    padding: 12px;
    max-height: min(420px, calc(100dvh - 244px));
  }

  .flow-ps-card.flow-ps-step-upload {
    max-height: min(320px, calc(100dvh - 386px));
  }

  .flow-ps-crop {
    width: 100%;
  }

  .flow-ps-chat-board {
    height: 230px;
    min-height: 190px;
  }
}

/* Keep the PS confirmation flow scrollable: the chat panel occupies space instead of covering fields. */
.flow-ps-screen {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.flow-ps-phone {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.flow-ps-phone .flow-phone-top,
.flow-ps-phone .flow-chat-tip {
  flex: 0 0 auto;
}

.flow-ps-screen .flow-phone-top {
  display: none;
}

.flow-ps-screen {
  padding-top: max(6px, env(safe-area-inset-top));
}

.flow-ps-screen .flow-chat-tip {
  margin-top: 0;
}

.flow-ps-card {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  margin-bottom: 4px;
}

.flow-ps-card:not(.flow-ps-step-upload) {
  max-height: none;
}

.flow-ps-content {
  touch-action: pan-y;
}

.flow-ps-chat-board {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.flow-ps-chat-board .flow-chat-list {
  flex: 1 1 auto;
  min-height: 0;
}

.flow-ps-chat-board .flow-chat-compose {
  flex: 0 0 auto;
  margin-top: auto;
}

@media (max-height: 740px) {
  .flow-ps-card,
  .flow-ps-card:not(.flow-ps-step-upload) {
    max-height: none;
  }

  .flow-ps-card {
    padding: 10px;
  }

  .flow-ps-progress {
    margin: 8px 0;
  }

  .flow-ps-note {
    margin-bottom: 8px;
    padding: 8px 10px;
    line-height: 1.3;
  }

  .flow-ps-upload-actions .flow-primary-btn {
    height: 42px;
  }
}

@media (max-height: 720px) {
  .flow-ps-card.flow-ps-step-upload {
    padding-bottom: 10px;
  }

  .flow-ps-upload-actions {
    margin-top: 10px;
  }
}

@media (max-height: 680px) {
  .flow-ps-step-upload .flow-ps-compare {
    margin-top: 6px;
  }

  .flow-ps-step-upload .flow-ps-crop,
  .flow-ps-step-upload .flow-ps-example {
    aspect-ratio: 1 / .72;
  }
}

/* Upload step: keep the next button below the image panes, not floating over them. */
.flow-ps-upload-actions {
  position: relative;
  z-index: 1;
  display: block;
  flex-shrink: 0;
  margin-top: 16px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.flow-ps-step-upload .flow-ps-compare {
  flex: 0 0 auto;
}

.flow-ps-step-upload .flow-ps-crop,
.flow-ps-step-upload .flow-ps-example {
  aspect-ratio: 1 / .88;
}

.flow-ps-example.has-video {
  position: relative;
  overflow: hidden;
}

.flow-ps-example.has-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flow-ps-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.flow-ps-play::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(104, 126, 255, .26);
  box-shadow: 0 8px 18px rgba(52, 84, 180, .16);
  backdrop-filter: blur(4px);
}

.flow-ps-play::after {
  content: "";
  position: absolute;
  border-left: 12px solid #6b73ff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  transform: translateX(2px);
}

.flow-video-viewer .flow-image-viewer-stage {
  width: min(92vw, 520px);
}

.flow-video-viewer video {
  display: block;
  width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  background: #000;
}

.flow-ps-step-upload .flow-ps-help {
  flex: 0 0 auto;
  margin: 6px 0 0;
  display: none;
}

.flow-ps-step-upload .flow-ps-help.is-error {
  display: block;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 240, 243, .96);
  color: #d93752;
  font-weight: 900;
  line-height: 1.35;
}

.flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) {
  min-height: clamp(352px, calc(100dvh - 330px), 392px);
}

.flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-compare {
  margin-top: 8px;
}

.flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-crop,
.flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-example {
  aspect-ratio: 1 / .74;
}

.flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-upload-actions {
  margin-top: 8px;
}

.flow-ps-upload-actions .flow-primary-btn {
  width: 100%;
  height: 52px;
  margin: 0;
  box-shadow: 0 10px 22px rgba(86, 112, 255, .18), inset 0 1px 0 rgba(255,255,255,.18);
}

.flow-ps-step-upload .flow-ps-actions {
  position: static;
  bottom: auto;
  margin-top: 12px;
}

.flow-ps-step-upload .flow-ps-content {
  overflow-y: auto;
}

.flow-ps-step-upload .flow-ps-upload {
  flex: 1 1 auto;
}

.flow-ps-card.flow-ps-step-upload {
  min-height: 0;
  flex: 0 0 auto;
}

.flow-ps-phone .flow-ps-card.flow-ps-step-upload {
  min-height: clamp(330px, calc(100dvh - 330px), 370px);
}

.flow-ps-step-upload .flow-ps-content {
  display: flex;
}

.flow-ps-step-upload .flow-ps-upload-actions {
  margin-top: 12px;
}

.flow-ps-step-upload .flow-ps-crop img,
.flow-ps-step-upload .flow-ps-example img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

@media (max-height: 740px) {
  .flow-ps-step-upload .flow-ps-compare {
    gap: 8px;
    margin-top: 8px;
  }

  .flow-ps-step-upload .flow-ps-crop,
  .flow-ps-step-upload .flow-ps-example {
    aspect-ratio: 1 / .72;
    border-radius: 14px;
  }

  .flow-ps-step-upload .flow-ps-help {
    display: none;
  }

  .flow-ps-upload-actions {
    margin-top: 6px;
  }

  .flow-ps-upload-actions .flow-primary-btn {
    height: 42px;
  }
}

@media (max-height: 900px) {
  .flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-crop,
  .flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-example {
    aspect-ratio: 1 / .68;
  }

  .flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-help.is-error {
    margin-top: 7px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .flow-ps-card.flow-ps-step-upload:has(.flow-ps-help.is-error) .flow-ps-upload-actions {
    margin-top: 7px;
  }
}

/* Uploaded product images should shrink into the frame instead of being cropped. */
.flow-ps-step-upload .flow-ps-crop.ready > img#flowPsCropImg,
.flow-ps-step-upload .flow-ps-example > img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  padding: 8px !important;
  box-sizing: border-box !important;
}

.flow-ps-step-upload .flow-ps-example.has-video > img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  padding: 0 !important;
}

/* Mobile browsers zoom the whole page when focused inputs render below 16px. */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="email"],
input:not([type]),
textarea,
.input-wrap input,
.flow-chat-compose input[type="text"],
.project-chat-compose input[type="text"],
.flow-ps-field input {
  font-size: 16px !important;
}

.flow-chat-compose input[type="text"],
.project-chat-compose input[type="text"],
.flow-ps-field input,
.input-wrap input {
  line-height: 1.2;
}

/* Keep PS pages reachable on mobile: allow scrolling and compact form fields. */
.flow-ps-screen .flow-ps-phone {
  height: auto;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.flow-ps-screen .flow-ps-field {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}

.flow-ps-screen .flow-ps-field input {
  height: 38px;
  margin-top: 4px;
  padding: 0 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.flow-ps-screen .flow-ps-chat-board {
  flex: 1 1 auto;
  min-height: clamp(132px, 22svh, 168px);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.flow-ps-screen .flow-ps-chat-board .flow-chat-compose {
  position: relative;
  bottom: auto;
  z-index: 8;
  margin-top: auto;
}

@media (max-height: 760px) {
  .flow-ps-screen .flow-chat-tip {
    min-height: 32px;
    padding: 6px 10px;
  }

  .flow-ps-card.flow-ps-step-upload {
    padding: 10px;
    margin-top: 6px;
    margin-bottom: 4px;
  }

  .flow-ps-card.flow-ps-step-upload .flow-ps-progress {
    margin: 7px 0;
  }

  .flow-ps-card.flow-ps-step-upload .flow-ps-note {
    margin-bottom: 7px;
    padding: 7px 10px;
  }

  .flow-ps-phone .flow-ps-card.flow-ps-step-upload {
    min-height: 0;
  }

  .flow-ps-step-upload .flow-ps-compare {
    gap: 8px;
    margin-top: 7px;
  }

  .flow-ps-step-upload .flow-ps-crop,
  .flow-ps-step-upload .flow-ps-example {
    aspect-ratio: 1 / .78;
    border-radius: 14px;
  }

  .flow-ps-step-upload .flow-ps-upload-actions {
    margin-top: 9px;
  }

  .flow-ps-upload-actions .flow-primary-btn {
    height: 44px;
  }

  .flow-ps-screen .flow-ps-chat-board {
    min-height: clamp(126px, 21svh, 154px);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-height: 680px) {
  .flow-ps-card.flow-ps-step-upload {
    padding: 9px;
  }

  .flow-ps-step-upload .flow-ps-crop,
  .flow-ps-step-upload .flow-ps-example {
    aspect-ratio: 1 / .64;
  }

  .flow-ps-upload-actions .flow-primary-btn {
    height: 40px;
  }

  .flow-ps-screen .flow-ps-chat-board {
    min-height: clamp(118px, 20svh, 142px);
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

