:root {
  color-scheme: light;
  --page: #f7f6fb;
  --surface: #fefcff;
  --ink: #201931;
  --muted: #635a72;
  --stroke: #e2ddea;
  --accent: #5631bf;
  --accent-hover: #4724a8;
  --accent-soft: #f1ebff;
  --danger: #a02f46;
  font: 16px/1.5 Geist, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei UI", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(100% - 64px, 66rem); margin-inline: auto; }
.topbar { display: flex; align-items: center; min-height: 5rem; }
.wordmark { display: inline-flex; align-items: center; gap: .68rem; font-size: 1.31rem; font-weight: 780; letter-spacing: -.045em; }
.brand-mark { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .68rem; background: var(--accent); }
.brand-mark i { display: grid; place-items: center; width: 1.02rem; height: .82rem; border: 1.5px solid #fcf7ff; border-radius: .22rem; }
.brand-mark i::after { content: ''; width: .35rem; height: .4rem; background: #fcf7ff; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.hero { position: relative; display: grid; align-items: center; min-height: clamp(15rem, 30vw, 21rem); isolation: isolate; overflow: hidden; border: 1px solid #291c40; border-radius: 1.55rem; background: #171126; color: #fbf7ff; }
.hero-copy { position: relative; z-index: 1; padding: clamp(1.5rem, 5.5vw, 4.2rem); }
.hero h1 { margin: 0; font-size: clamp(2.15rem, 6vw, 4.55rem); font-weight: 820; line-height: 1.1; letter-spacing: -.07em; }
.hero p { max-width: 23rem; margin: 1rem 0 0; color: #e3d8f2; font-size: clamp(.94rem, 1.9vw, 1.11rem); }
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 34%; overflow: hidden; mask-image: linear-gradient(to right, transparent 0%, black 34%); background: radial-gradient(ellipse at 82% 36%, #593970, #241835 53%, #171126 81%); }
.hero-art canvas { display: block; width: 100%; height: 100%; visibility: hidden; }
.hero-art canvas[data-ready] { visibility: visible; }
.workspace { margin-top: 1.1rem; padding: clamp(1rem, 3.7vw, 2.25rem); border: 1px solid var(--stroke); border-radius: 1.3rem; background: var(--surface); box-shadow: 0 10px 30px #32224a09; }
.form-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: -.5rem 0 .36rem; }
.form-heading label, legend, .video-switch label { font-size: .96rem; font-weight: 740; }
.example { min-height: 44px; padding: 0 .3rem; border: 0; background: transparent; color: var(--accent); font-size: .9rem; font-weight: 650; }
.example:hover { text-decoration: underline; text-underline-offset: .2em; }
.form-row { min-width: 0; }
.input-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-height: 3.6rem; border: 1px solid #cfc7dd; border-radius: .8rem; background: #fcfaff; }
.input-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #6740c421; }
.input-box[data-invalid] { border-color: var(--danger); }
.link-icon { position: relative; width: 1.25rem; height: 1.25rem; margin-left: .95rem; color: #746687; transform: rotate(-42deg); }
.link-icon::before, .link-icon::after { content: ''; position: absolute; top: .37rem; width: .7rem; height: .46rem; border: 1.5px solid currentColor; border-radius: .4rem; }
.link-icon::before { left: 0; }
.link-icon::after { right: 0; }
.input-box input { min-width: 0; width: 100%; height: 3.4rem; padding: .5rem .7rem; border: 0; background: transparent; color: var(--ink); outline: none; font-size: 1rem; }
.input-box input::placeholder { color: #746985; opacity: 1; }
.paste { min-height: 44px; margin-right: .37rem; padding-inline: .72rem; border: 0; border-radius: .55rem; background: var(--accent-soft); color: var(--accent); font-size: .88rem; font-weight: 730; }
.paste:hover { background: #e9e0fb; }
.button { display: inline-flex; align-items: center; justify-content: center; min-width: 8.4rem; min-height: 3.57rem; padding: .65rem 1.2rem; border: 1px solid transparent; border-radius: .8rem; font-weight: 750; text-decoration: none; text-align: center; white-space: nowrap; }
.button-primary { background: var(--accent); color: #fffcff; box-shadow: inset 0 1px #ffffff24, 0 2px 2px #2714501e; }
.button-primary:hover { background: var(--accent-hover); }
.feedback, .download-status { margin: 0; color: var(--muted); font-size: .9rem; }
.feedback:not(:empty) { margin-top: .75rem; }
.feedback[data-kind="error"] { color: var(--danger); }
.result { margin-top: 1.25rem; padding-top: 1.35rem; border-top: 1px solid var(--stroke); }
.post-summary { display: flex; align-items: center; gap: 1rem; }
.poster { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 6.5rem; height: 5.45rem; overflow: hidden; border-radius: .7rem; background: #e9e2f5; }
.poster img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.play-icon { width: .92rem; height: 1.05rem; clip-path: polygon(0 0, 100% 50%, 0 100%); background: var(--accent); }
.post-copy { min-width: 0; }
.post-meta { margin: 0 0 .32rem; color: var(--muted); font-size: .87rem; }
.post-copy h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; margin: 0; font-size: clamp(1rem, 2vw, 1.18rem); font-weight: 720; line-height: 1.43; }
.post-copy h2:focus { outline: none; }
.video-switch { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; }
select { min-height: 44px; max-width: 100%; border: 1px solid #cfc7dd; padding: 0 2.05rem 0 .65rem; border-radius: .5rem; appearance: none; color: var(--ink); background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 14px) 52% / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 9px) 52% / 5px 5px no-repeat, var(--surface); }
fieldset { min-width: 0; margin: 1.1rem 0 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: .5rem; }
.qualities { display: flex; flex-wrap: wrap; gap: .5rem; }
.quality { position: relative; cursor: pointer; }
.quality input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.quality-option { display: grid; grid-template-columns: .88rem auto; align-items: center; column-gap: .58rem; row-gap: .11rem; min-height: 54px; padding: .5rem .75rem; border: 1px solid #d2cade; border-radius: .63rem; color: var(--ink); font-weight: 650; font-size: .9rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.quality-option::before { content: ''; grid-row: 1 / 3; width: .88rem; height: .88rem; border-radius: 50%; border: 1.5px solid #998ca9; }
.quality-size { grid-column: 2; justify-self: start; min-width: 7ch; color: var(--muted); font-size: .78rem; font-weight: 550; white-space: nowrap; }
.quality input:checked + .quality-option { border-color: var(--accent); background: var(--accent-soft); color: #452299; }
.quality input:checked + .quality-option::before { border: 4px solid var(--accent); }
.quality input:focus-visible + .quality-option { outline: 2px solid var(--accent); outline-offset: 3px; }
.download-row { display: grid; gap: .5rem; margin-top: 1.2rem; }
.download-row .button { width: 100%; }
.download-status:empty { display: none; }
footer { padding: 1.2rem 0 2rem; color: var(--muted); text-align: center; font-size: .88rem; }
.noscript { text-align: center; color: var(--danger); }

@media (max-width: 560px) {
  .shell { width: calc(100% - 32px); }
  .topbar { min-height: 4.05rem; }
  .wordmark { font-size: 1.2rem; }
  .brand-mark { width: 1.95rem; height: 1.95rem; border-radius: .58rem; }
  .hero { min-height: 12.85rem; border-radius: 1.08rem; }
  .hero-copy { padding: 1.3rem; }
  .hero h1 { font-size: clamp(1.94rem, 8.2vw, 2.8rem); }
  .hero p { max-width: 11rem; margin-top: .63rem; }
  .hero-art { inset-inline-start: 25%; mask-image: linear-gradient(to right, transparent 12%, #0008 42%, black 90%); }
  .workspace { margin-top: .75rem; border-radius: 1.02rem; }
  .poster { width: 4.65rem; height: 4.15rem; }
  footer { padding-top: .95rem; }
}
