:root {
  color-scheme: light;
  --ink: #30283b;
  --muted: #81788d;
  --line: #eee8f4;
  --pink: #db68ad;
  --violet: #8a72c4;
  --paper: #fffaff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #f5f0f8; }

body {
  margin: 0;
  color: var(--ink);
  background: #f5f0f8;
  font-size: 16px;
  line-height: 1.5;
  -webkit-touch-callout: none;
}

button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #8c71c7; outline-offset: 3px; }

.landing-page {
  width: min(100%, 430px);
  min-height: 100vh;
  margin-inline: auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 30px rgba(79, 54, 108, .08);
}

.campaign-page { position: relative; width: 100%; line-height: 0; background: #fffaff; }
.campaign-page-image { width: 100%; height: auto; display: block; }

.guide-hotspot {
  position: absolute;
  z-index: 1;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  touch-action: manipulation;
}

.guide-hotspot:focus-visible { outline-offset: 1px; border-radius: 8px; }
.guide-hotspot-poster { top: 52.7%; left: 32.5%; width: 35%; height: 2.2%; }
.guide-hotspot-douyin { top: 75.5%; left: 29.5%; width: 14.5%; height: 2.5%; }
.guide-hotspot-xiaohongshu { top: 75.5%; left: 54.2%; width: 14.5%; height: 2.5%; }

.floating-helper {
  width: 48px;
  height: 48px;
  position: fixed;
  right: max(12px, calc((100vw - 430px) / 2 + 12px));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 8;
  padding: 0;
  border: 1px solid #e7dcf5;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--violet);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 4px 14px rgba(91, 67, 128, .18);
  transition: transform .16s ease, box-shadow .16s ease;
}

.floating-helper:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(91, 67, 128, .22); }
.helper-orbit { width: 28px; height: 26px; position: relative; display: block; }
.helper-orbit::before { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 18px; border: 2px solid #d8c8ef; border-radius: 7px; background: #9178c5; }
.helper-orbit::after { content: ""; position: absolute; width: 4px; height: 4px; top: 11px; left: 10px; border-radius: 50%; background: #fff; box-shadow: 7px 0 #fff; }
.helper-orbit i:first-child { width: 2px; height: 5px; position: absolute; left: 13px; top: 0; background: #c9b5e9; }
.helper-orbit i:last-child { width: 5px; height: 2px; position: absolute; left: 1px; top: 13px; background: #c9b5e9; box-shadow: 21px 0 #c9b5e9; }

.visually-hidden {
  width: 1px;
  height: 1px;
  position: absolute;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dialog {
  width: min(calc(100% - 28px), 480px);
  max-width: 480px;
  max-height: min(92dvh, 780px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  overflow: visible;
}

.dialog::backdrop { background: rgba(37, 29, 48, .55); backdrop-filter: blur(3px); }
.dialog-panel, .poster-panel { max-height: min(92dvh, 780px); border-radius: 10px; background: var(--paper); overflow: auto; box-shadow: 0 16px 48px rgba(45, 32, 61, .2); }
.dialog-header { min-height: 74px; padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.dialog-brand { display: flex; align-items: center; gap: 11px; }
.dialog-brand-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--violet); font-size: 19px; }
.dialog-kicker { margin: 0; color: var(--pink); font-size: 9px; font-weight: 750; line-height: 1.3; text-transform: uppercase; }
.dialog-header h2 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; }
.icon-button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; color: #62586c; background: transparent; font-size: 26px; line-height: 1; }
.icon-button:hover { background: #f3edf8; }
.dialog-body { padding: 22px 20px 18px; }
.dialog-lead { margin: 0; font-size: 17px; font-weight: 760; }
.dialog-caption { margin: 5px 0 18px; color: var(--muted); font-size: 12px; }
.upload-list { display: grid; gap: 9px; margin-bottom: 10px; }
.upload-item { min-height: 66px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; background: #fff; }
.upload-item img { width: 48px; height: 48px; border-radius: 5px; display: block; object-fit: cover; background: #f1edf5; }
.upload-file-name { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.upload-status { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.upload-status.is-success { color: #4b8873; }
.upload-status.is-error { color: #bd4e59; }
.upload-remove { padding: 7px; border: 0; color: #77717c; background: transparent; font-size: 12px; }
.upload-picker { width: 100%; min-height: 78px; padding: 12px; border: 1px dashed #d6c9e3; border-radius: 8px; display: flex; align-items: center; gap: 12px; color: var(--ink); background: #fff; text-align: left; }
.upload-picker:hover { border-color: var(--violet); background: #fcf8ff; }
.picker-plus { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #7d5eac; background: #f1e9fa; font-size: 24px; }
.upload-picker strong, .upload-picker small { display: block; }
.upload-picker strong { font-size: 13px; }
.upload-picker small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.picker-count { margin-left: auto; color: var(--muted); font-size: 11px; }
.upload-error { margin: 11px 0 0; color: #bd4650; font-size: 12px; }

.button { min-height: 46px; padding: 0 17px; border: 1px solid transparent; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 720; }
.dialog [hidden] { display: none !important; }
.button-dark { color: #fff; background: #51436d; }
.button-dark:hover { background: #433658; }
.button-submit { width: 100%; min-height: 48px; margin-top: 17px; color: #fff; background: linear-gradient(100deg, #8871bd, #d766ae); }
.dialog-footnote { margin: 12px 0 0; color: #98929d; text-align: center; font-size: 10px; }
.download-state { padding-block: 36px 30px; text-align: center; }
.success-mark { width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #5f9b80; font-size: 27px; }
.download-state .dialog-caption { max-width: 300px; margin-inline: auto; }
.download-platform-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 17px; }
.download-platform-options .button-submit { margin-top: 0; padding-inline: 10px; }
.dialog-text-button { margin-top: 14px; padding: 7px; border: 0; color: var(--muted); background: transparent; font-size: 12px; }

.helper-dialog { width: min(calc(100% - 16px), calc(100dvh - 24px), 434px); max-width: none; max-height: none; }
.helper-dialog .assistant-panel { position: relative; width: 100%; max-height: none; border-radius: 0; background: transparent; overflow: visible; box-shadow: none; }
.assistant-state { position: relative; width: 100%; aspect-ratio: 866 / 782; }
.success-state { aspect-ratio: 871 / 803; }
.upload-state::after { content: ""; position: absolute; inset: 72.5% 8% 2.5%; z-index: 3; background: rgba(255, 255, 255, .95); }
.assistant-prototype-image { width: 100%; height: 100%; position: absolute; inset: 0; display: block; pointer-events: none; }
.prototype-close { position: absolute; top: 24%; right: 1.7%; z-index: 5; width: 10%; height: 12%; padding: 0; border: 0; border-radius: 0; color: transparent; background: transparent; font-size: 0; }
.prototype-close:focus-visible { outline: 3px solid #8c71c7; outline-offset: -2px; border-radius: 8px; }
.prototype-upload-picker { position: absolute; top: 40%; left: 5.2%; z-index: 1; width: 85.5%; height: 30.5%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; }
.prototype-upload-list { position: absolute; top: 40%; left: 5.2%; z-index: 2; width: 85.5%; height: 30.5%; margin: 0; padding: 7px; border: 2px dashed #c8c8c8; border-radius: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; background: rgba(255, 255, 255, .97); overflow: hidden; pointer-events: none; }
.prototype-upload-list:empty { display: none; }
.prototype-upload-list .upload-item { min-width: 0; min-height: 0; height: 100%; padding: 6px; border-color: #eee8f4; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 3px 6px; }
.prototype-upload-list .upload-item img { width: 38px; height: 38px; grid-column: 1; grid-row: 1 / span 2; }
.prototype-upload-list .upload-item > div:nth-child(2) { min-width: 0; grid-column: 2; grid-row: 1; align-self: end; }
.prototype-upload-list .upload-item > div:last-child { display: flex; grid-column: 2; grid-row: 2; justify-content: flex-end; gap: 4px; pointer-events: auto; }
.prototype-upload-list .upload-file-name { font-size: 10px; }
.prototype-upload-list .upload-status { margin-top: 1px; font-size: 9px; }
.prototype-upload-list .upload-remove { padding: 2px 4px; font-size: 9px; }
.prototype-upload-error { position: absolute; top: 72%; left: 8%; z-index: 4; width: 84%; margin: 0; padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, .94); text-align: center; }
.prototype-submit { position: absolute; top: 76.5%; left: 17.5%; z-index: 4; width: 65%; height: 13.8%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(100deg, #c978f0, #e576dd); font-size: 18px; font-weight: 700; }
.prototype-download { position: absolute; top: 80.3%; left: 17.5%; z-index: 4; width: 65%; height: 14%; padding: 0; border: 0; border-radius: 999px; color: transparent; background: transparent; }
.download-platform-options { position: absolute; top: 80.3%; left: 17.5%; z-index: 4; width: 65%; height: 14%; margin: 0; grid-template-columns: 1fr 1fr; gap: 7px; }
.download-platform-options .button-submit { min-width: 0; min-height: 0; margin: 0; padding: 0 5px; border-radius: 999px; background: linear-gradient(100deg, #b83ef3, #e844cf); font-size: 11px; }
.assistant-state [hidden] { display: none !important; }

.poster-dialog { width: min(calc(100% - 28px), 420px); }
.poster-panel { padding: 0 18px 18px; }
.poster-header { margin: 0 -18px; }
.poster-hint { margin: 13px 0 10px; color: var(--muted); text-align: center; font-size: 12px; }
.poster-loading { height: min(58dvh, 584px); margin: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.poster-image { width: auto; height: min(58dvh, 584px); max-width: 100%; aspect-ratio: 1125 / 2436; margin: 0 auto; border-radius: 6px; display: block; object-fit: contain; background: #f1edf5; -webkit-touch-callout: none; -webkit-user-select: auto; user-select: auto; touch-action: auto; }
.wechat-browser-tip { margin: 12px 0; padding: 11px 12px; border: 1px solid #f2c9db; border-radius: 7px; color: #743d5b; background: #fff2f8; text-align: center; font-size: 12px; line-height: 1.6; }
.poster-dialog.is-wechat #poster-preview-hint { display: none; }
.poster-dialog.is-wechat .poster-actions { display: none; }
.poster-actions { max-width: 270px; margin: 12px auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.poster-actions .button { min-width: 0; min-height: 42px; padding-inline: 10px; font-size: 12px; }
.button-outline-light { color: var(--ink); border-color: var(--line); background: #fff; }
.button-outline-light:hover { background: #f7f3fa; }
.toast { max-width: calc(100% - 36px); position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 10000; padding: 10px 14px; border-radius: 8px; color: #fff; background: rgba(47, 39, 60, .94); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
  .floating-helper { width: 46px; height: 46px; }
  .dialog-body { padding: 20px 16px 17px; }
  .dialog-header { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
