:root {
  color-scheme: light;
  --ink: #211739;
  --muted: #605574;
  --accent: #643dd4;
  --accent-hover: #512cb9;
  --canvas: #f9f8ff;
  --surface: #fff;
  --line: #e9e3f5;
  --input: #fcfbff;
  --radius: 1.25rem;
  --sans: 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --display: 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 1rem; }

body {
  margin: 0;
  min-width: 16rem;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 78% 12%, #f0eaff 0%, transparent 45%), var(--canvas);
  font: 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: min(64rem, 100% - 3rem);
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 750 1.2rem/1 var(--display);
  text-decoration: none;
}

.brand-mark {
  width: 2.125rem;
  height: 2.125rem;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  border-radius: 0.6rem;
  box-shadow: 0 3px 7px #6842cf2b;
}

.brand-mark .icon { width: 1.4rem; height: 1.4rem; margin-left: -0.13rem; }

.nav-link {
  padding-block: 0.65rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.3em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.81fr);
  min-height: 17.75rem;
  align-items: center;
  gap: 1.5rem;
}

.hero-copy { padding: 2.75rem 0; }

.hero h1 {
  font: 800 clamp(2.4rem, 5.2vw, 4.35rem)/1.14 var(--display);
  letter-spacing: -0.075em;
}

.hero p {
  max-width: 28rem;
  margin-top: 1.05rem;
  color: var(--muted);
  font-size: 1.075rem;
  line-height: 1.8;
  text-wrap: pretty;
}

.hero-visual {
  height: 16.2rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.visual-glow, .visual-grid { position: absolute; inset: 0; z-index: -1; }

.visual-glow {
  background: radial-gradient(ellipse at 54% 52%, #dcd0ff 2%, #ede5ff 32%, transparent 68%);
}

.visual-grid {
  background: radial-gradient(circle, #b6a5e5 0.8px, transparent 1.4px) center/0.74rem 0.74rem;
  mask-image: radial-gradient(ellipse, black 25%, transparent 69%);
}

.film-strip {
  position: absolute;
  display: grid;
  grid-template-columns: 1fr 1.32fr 1fr;
  align-items: stretch;
  gap: 0.52rem;
  top: 50%;
  left: 50%;
  width: 92%;
  max-width: 24rem;
  height: 8.8rem;
  padding: 1.16rem 0.58rem;
  border: 1px solid #916ce8;
  border-radius: 0.9rem;
  background: linear-gradient(116deg, #bea5f9, #9a73ed 47%, #7654cc);
  box-shadow: 0 1.2rem 2.1rem -0.8rem #613cb881, inset 0 1px 1px #f0e2ffb3;
  transform: translate(-50%, -50%) rotate(-11deg);
}

.film-strip::before, .film-strip::after {
  position: absolute;
  content: '';
  left: 0.65rem;
  right: 0.65rem;
  height: 0.37rem;
  background: repeating-linear-gradient(90deg, #f5efffe6 0 0.65rem, transparent 0.65rem 1.09rem);
  border-radius: 2px;
}

.film-strip::before { top: 0.39rem; }
.film-strip::after { bottom: 0.39rem; }

.film-frame {
  position: relative;
  overflow: hidden;
  border-radius: 0.48rem;
  border: 1px solid #eee2ff7a;
  background: radial-gradient(ellipse at 70% 22%, #c7a9ff 0%, #8865dc 68%);
}

.film-frame-left::after, .film-frame-right::after {
  content: '';
  position: absolute;
  width: 155%;
  aspect-ratio: 1.5;
  border: 1px solid #f7eaff80;
  border-radius: 60%;
  bottom: -39%;
  right: -23%;
  box-shadow: 0 0 0 0.6rem #f5e8ff28, 0 0 0 1.2rem #f5e8ff29;
}

.film-frame-right { background: radial-gradient(ellipse at -10% 80%, #c29afa, #7753cc 76%); }
.film-frame-right::after { right: -5%; bottom: 58%; }

.film-frame-main {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 28% 12%, #8653de, #45207f 88%);
}

.film-orbit {
  position: absolute;
  width: 86%;
  aspect-ratio: 1;
  border: 1px solid #e5c9ff64;
  border-radius: 50%;
  box-shadow: 0 0 0 0.6rem #e5c9ff23, 0 0 0 1.25rem #e5c9ff26;
}

.film-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.3rem;
  height: 3.3rem;
  border: 1px solid #ffffff78;
  border-radius: 50%;
  color: #fff;
  background: #bc97f84f;
  box-shadow: 0 0.3rem 1.2rem #21104244;
  transform: rotate(11deg);
}

.film-play .icon { width: 1.8rem; height: 1.8rem; margin-left: -0.23rem; }

.download-panel {
  background: var(--surface);
  border: 1px solid #e7e0f4;
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3.2vw, 2rem);
  box-shadow: 0 9px 32px #3a226613;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.field-header label { font-size: 1.025rem; font-weight: 750; }

.text-button {
  border: 0;
  padding: 0.35rem 0.15rem;
  color: #5931ba;
  background: transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
}

.text-button:hover { text-decoration: underline; text-underline-offset: 0.3em; }

textarea {
  display: block;
  color: var(--ink);
  width: 100%;
  min-height: 8.375rem;
  border: 1px solid #ded4ee;
  border-radius: 0.75rem;
  background: var(--input);
  padding: 0.9375rem 1rem;
  resize: vertical;
  line-height: 1.65;
}

textarea::placeholder { color: #716484; }
textarea:focus { border-color: #8b68e2; outline: 2px solid #d9c8ff; outline-offset: 1px; }
textarea[aria-invalid="true"] { border-color: #a83e59; }

.form-message {
  margin-top: 0.625rem;
  color: var(--muted);
  font-size: 0.925rem;
  overflow-wrap: anywhere;
}

.form-message.is-error { color: #a12649; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
}

.form-actions { margin-top: 1.125rem; }

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  padding: 0.55rem 1.05rem;
  font-size: 0.9375rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: white;
  background: var(--accent);
  box-shadow: 0 3px 7px #5225b32a;
  min-width: 8.375rem;
}

.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-primary:disabled { background: #6d55b0; cursor: progress; }

.button-secondary { color: #4d3969; background: #fbf9ff; border-color: #e7dff2; }
.button-secondary:hover { background: #f2ebff; border-color: #ded0f0; }

.spinner {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid #ffffff65;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.result {
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.result-copy { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.result-copy h2 { font-size: 1.15rem; line-height: 1.4; }
.result-meta { margin-top: 0.3rem; font-size: 0.875rem; color: var(--muted); }

.result-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(65vh, 30rem);
  object-fit: contain;
  border-radius: 0.75rem;
  background: #1b1525;
}

.result-preview.is-portrait {
  justify-self: center;
  width: min(100%, 18rem);
  aspect-ratio: 9 / 16;
}

.preview-message {
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: var(--input);
  color: var(--muted);
  font-size: 0.925rem;
}

.guide { padding-block: 2.75rem 2.4rem; }
.guide h2 { font: 750 1.375rem/1.4 var(--display); }

.steps {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid #e8e0f3;
  border-radius: var(--radius);
  background: #ffffffad;
}

.steps li { display: flex; align-items: flex-start; gap: 0.7rem; padding: 1.15rem 1.05rem; }
.steps li + li { border-left: 1px solid var(--line); }

.step-index {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.45rem;
  color: #5931ba;
  background: #f0e8ff;
  font-size: 0.9375rem;
  font-weight: 750;
}

.steps h3 { margin-block: 0.13rem 0.3rem; font-size: 1rem; }
.steps p { color: var(--muted); font-size: 0.925rem; }

@media (max-width: 48rem) {
  .hero { min-height: 14.75rem; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: 0.5rem; }
  .hero-visual { height: 13rem; }
  .film-strip { height: 6.8rem; }
  .film-play { width: 2.8rem; height: 2.8rem; }
  .steps li { padding-inline: 0.8rem; }
}

@media (max-width: 37.5rem) {
  .wrap { width: min(100% - 2rem, 64rem); }
  .header-inner { min-height: 3.75rem; }
  .hero { position: relative; min-height: 11.25rem; display: flex; }
  .hero-copy { position: relative; z-index: 1; padding-block: 2rem; }
  .hero h1 { font-size: clamp(2rem, 7.8vw, 3.2rem); }
  .hero p { max-width: 19rem; margin-top: 0.7rem; font-size: 1rem; }
  .hero-visual { position: absolute; right: -1rem; inset-block: 0; width: 10rem; height: auto; opacity: 0.24; }
  .film-strip { width: 10rem; height: 4.8rem; padding: 0.8rem 0.35rem; gap: 0.3rem; }
  .film-strip::before, .film-strip::after { height: 0.24rem; }
  .film-strip::before { top: 0.28rem; }
  .film-strip::after { bottom: 0.28rem; }
  .film-play { width: 2rem; height: 2rem; }
  .film-play .icon { width: 1.25rem; height: 1.25rem; margin-left: -0.17rem; }
  .guide { padding-block: 2.15rem 1.75rem; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 0.85rem 0.9rem; }
  .steps li + li { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 25rem) {
  .form-actions { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr); }
  .button { min-width: 0; padding-inline: 0.45rem; gap: 0.35rem; }
  .button .icon { width: 1.05rem; height: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
