:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
  color: #f7f3ff;
  background: #090811;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 45% 40% at 12% 12%, #44207175, transparent 75%),
    radial-gradient(ellipse 40% 38% at 92% 25%, #1652a866, transparent 72%),
    radial-gradient(ellipse 44% 35% at 65% 95%, #a2238755, transparent 74%),
    #090811;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background-image: linear-gradient(#ffffff09 1px, transparent 1px), linear-gradient(90deg, #ffffff09 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 78%, transparent);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 820px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 42px); }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid #d6a2ff55;
  border-radius: 13px;
  background: linear-gradient(140deg, #8f4dde, #5c428e 56%, #2b4b8d);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 8px 25px #8e4cdb55, inset 0 1px #ffffff55;
}
.brand-copy h1 { margin: 5px 0 0; font-size: 16px; line-height: 1.2; font-weight: 750; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #b587ff55;
  border-radius: 999px;
  background: #a867ff16;
  color: #d8bfff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #f58cde; box-shadow: 0 0 12px #f58cde; }
.intro { padding: 0 3px 13px; }
.step-label, .section-kicker { margin: 0; color: #bba3da; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.intro h2 { max-width: 760px; margin: 12px 0 10px; font-size: clamp(33px, 6vw, 52px); line-height: 1.06; letter-spacing: -.035em; }
.intro h2 .plain { margin-left: .12em; }
.intro h2 .accent { background: linear-gradient(95deg, #ca9bff, #78b7ff 47%, #f498d8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro p:last-child { max-width: 650px; margin: 0 0 15px; color: #c1b8d1; font-size: 15px; line-height: 1.5; }
.card {
  position: relative;
  overflow: hidden;
  margin: 15px 0;
  padding: 22px;
  border: 1px solid #ffffff27;
  border-radius: 18px;
  background: linear-gradient(150deg, #222035ee, #141321f2 70%);
  box-shadow: 0 20px 70px #0006, inset 0 1px #ffffff15;
}
.card::after { content: ""; position: absolute; top: -130px; right: -95px; width: 250px; height: 250px; border-radius: 50%; filter: blur(45px); opacity: .32; pointer-events: none; }
.card.purple::after { background: #a957fc; }
.card.blue::after { background: #338bff; }
.card > * { position: relative; z-index: 1; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head h2, .finish-card h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.03em; }
.pill { flex: none; padding: 7px 10px; border: 1px solid #b587ff55; border-radius: 999px; background: #a867ff18; color: #dec5ff; font-size: 11px; font-weight: 750; white-space: nowrap; }
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 178px;
  padding: 20px;
  border: 1.5px dashed #9f83bd8c;
  border-radius: 15px;
  background: #a867ff0b;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.upload-zone:hover { border-color: #d4a2ff; background: #a867ff16; }
.upload-zone:active { transform: scale(.99); }
.upload-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border: 1px solid #ffffff35; border-radius: 12px; background: #9d62f53b; color: #dfbaff; font-size: 27px; }
.upload-main { color: #f7f3ff; font-size: 15px; font-weight: 750; }
.upload-sub { max-width: 290px; margin-top: 5px; color: #aaa1bc; font-size: 12px; line-height: 1.4; }
#card-image { position: absolute; left: -9999px; width: 1px; height: 1px; }
.image-tools { margin-top: 16px; }
.preview-wrap { display: flex; justify-content: center; align-items: center; overflow: hidden; min-height: 185px; padding: 10px; border: 1px solid #ffffff22; border-radius: 13px; background: #0f0d1a; }
.preview-wrap img { display: block; max-width: 100%; max-height: 340px; object-fit: contain; }
.tool-row { display: flex; gap: 8px; margin: 11px 0; }
.subtle-button { flex: 1; min-height: 42px; padding: 10px 12px; border: 1px solid #ffffff35; border-radius: 10px; background: #ffffff0e; color: #e0d3f3; font-size: 13px; font-weight: 700; }
.subtle-button:hover { background: #ffffff1d; }
.retry-button { width: 100%; margin-top: 10px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 15px; border: 0; border-radius: 10px; background: linear-gradient(110deg, #d4a2ff, #f49bda); color: #0a0810; font-size: 14px; font-weight: 800; box-shadow: 0 8px 25px #d679f342; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 28px #d679f35c; }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.status { min-height: 17px; margin: 12px 2px 0; color: #a99fba; font-size: 12px; line-height: 1.45; }
.status.error { color: #ffb3b0; }
.status.success { color: #b7efcf; }
#form-status { overflow-wrap: anywhere; }
.settings-card input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #ffffff2a; border-radius: 10px; outline: none; background: #0f0e1d; color: #f7f3ff; font-size: 15px; }
.settings-card input:focus { border-color: #bd93f0; box-shadow: 0 0 0 3px #a867ff2e; }
.field-note { color: #ffcf9d; font-size: 12px; font-weight: 500; line-height: 1.4; }
.raw-panel { margin-top: 17px; padding-top: 14px; border-top: 1px solid #ffffff20; color: #d5cce2; font-size: 13px; }
.raw-panel summary { cursor: pointer; font-weight: 700; }
.raw-panel pre { padding: 13px; border: 1px solid #ffffff18; border-radius: 10px; background: #0f0e1d; color: #c5bbd5; font: 12px/1.5 ui-monospace, SFMono-Regular, monospace; white-space: pre-wrap; word-break: break-word; }
.finish-card { width: 100%; }
.finish-card p:not(.step-label) { color: #c6bfd2; font-size: 13px; line-height: 1.55; }
.finish-card .primary-button { margin-top: 15px; background: linear-gradient(110deg, #82b8ff, #a7d8ff); box-shadow: 0 8px 25px #5e99f347; }
.finish-card .primary-button:hover { box-shadow: 0 10px 28px #5e99f365; }
.finish-card .status.error { color: #ffb3b0; }
.embedded-form { width: 100%; margin: 17px auto 0; padding: 0; background: transparent; }
.embedded-form iframe { display: block; width: 100%; height: 500px; border: 0; background: #141321 !important; }
.embedded-form #form-fallback { display: block; margin: 8px 6px 4px; color: #cfa9ff; font-size: 12px; text-align: center; }
#minicrm-direct-host, #minicrm-direct-host #Web { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; background: transparent !important; }
#minicrm-direct-host #Web fieldset { width: 100% !important; min-width: 0; margin: 0 !important; padding: 17px !important; border: 1px solid #d4a2ff !important; border-radius: 13px; background: #222035 !important; }
#minicrm-direct-host #Web legend { max-width: 100%; padding: 0 7px; color: #f7f3ff !important; font-size: 17px; font-weight: 750; }
#minicrm-direct-host #Web .InputBlock { display: grid !important; grid-template-columns: 1fr; gap: 7px; float: none !important; width: 100% !important; min-height: 0 !important; margin: 0 0 14px !important; padding: 0 !important; }
#minicrm-direct-host #Web .InputBlock:last-child { margin-bottom: 0 !important; }
#minicrm-direct-host #Web .InputBlock > label { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; color: #f7f3ff !important; font-size: 13px; font-weight: 650; text-align: left !important; }
#minicrm-direct-host #Web .InputBlock > input[type="text"] { display: block; float: none !important; width: 100% !important; max-width: none !important; height: 43px !important; margin: 0 !important; padding: 9px 11px !important; border: 1px solid #d4a2ff !important; border-radius: 8px; background: #090811 !important; color: #f7f3ff !important; font-size: 15px; }
#minicrm-direct-host #Web .InputBlock > input[type="file"] { display: block; float: none !important; box-sizing: border-box; width: 100% !important; max-width: none !important; min-height: 49px; margin: 0 !important; padding: 6px !important; border: 1px solid #d4a2ff !important; border-radius: 8px; background: #090811 !important; color: #f7f3ff !important; color-scheme: dark; font-size: 13px; line-height: 34px; }
#minicrm-direct-host #Web .InputBlock > input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 11px; border: 1px solid #d4a2ff; border-radius: 6px; background: #3a2b52; color: #f7f3ff; font: inherit; line-height: 1.2; cursor: pointer; }
#minicrm-direct-host #Web .InputBlock > input[type="file"]::file-selector-button:hover { background: #51396f; }
#minicrm-direct-host #Web .SetLabel { display: flex !important; align-items: flex-start; gap: 8px; width: auto !important; margin: 0 !important; color: #f7f3ff !important; font-size: 13px; line-height: 1.5; }
#minicrm-direct-host #Web .SetLabel input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #b981ef; }
#minicrm-direct-host #Web .SetLabel a { display: inline; color: #92beff; }
#minicrm-direct-host #Web input[type="submit"] { display: block; min-width: 115px; min-height: 43px; margin: 17px auto 0 !important; padding: 9px 18px; border: 0; border-radius: 9px; background: linear-gradient(110deg, #d4a2ff, #f49bda); color: #090811; font-size: 14px; font-weight: 800; }
#minicrm-direct-host #Web input[type="submit"]:disabled { opacity: .55; cursor: not-allowed; }
#minicrm-direct-host #Web .Response { color: #f7f3ff !important; }
.settings-card summary { cursor: pointer; font-size: 14px; font-weight: 750; }
.settings-card p { color: #b9b1c8; font-size: 12px; line-height: 1.5; }
.settings-card label { display: block; margin: 14px 0 7px; color: #d5cce2; font-size: 12px; font-weight: 750; }
.settings-card input { display: block; font-size: 13px; }
.settings-card .subtle-button { width: 100%; margin-top: 10px; }
.settings-card .status.error { color: #ffb3b0; }
.settings-card .status.success { color: #b7efcf; }
footer { padding: 10px 8px 0; color: #9f96af; font-size: 11px; line-height: 1.5; text-align: center; }
.hidden { display: none !important; }
@media (max-width: 480px) {
  .shell { padding-left: 13px; padding-right: 13px; }
  .topbar { margin-bottom: 27px; }
  .intro h2 { font-size: 35px; }
  .card { padding: 18px; }
  .pill { padding: 6px 8px; font-size: 10px; }
}
