:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #dce5e8;
  background: #111618;
  --edge: #344249;
  --panel: #1a2125;
  --muted: #9aabb4;
  --accent: #58e5d5;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
[hidden] { display: none !important; }
.masthead, main { max-width: 1120px; margin-inline: auto; }
.masthead { display: flex; align-items: center; gap: 12px; padding: 24px 32px 16px; border-bottom: 1px solid var(--edge); }
.brand-mark { width: 16px; height: 16px; border: 2px solid var(--accent); border-radius: 50% 50% 44% 44%; box-shadow: inset 0 0 0 3px #111618; background: var(--accent); }
.divider { color: var(--accent); margin-inline: 5px; }
main { padding: 38px 32px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 5vw, 3.1rem); line-height: 1.15; letter-spacing: -.06em; }
h2 { font-size: 1.1rem; margin-bottom: 18px; }
.wallet { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; color: var(--muted); font-size: .875rem; }
.wallet strong { color: var(--accent); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.code-form { max-width: 420px; margin-bottom: 26px; }
.code-row, .actions { display: flex; align-items: center; gap: 10px; }
.workspace { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 24px; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.model { grid-column: 1 / -1; }
label { display: block; font-size: .875rem; }
input, select, textarea, button, a.secondary { font: inherit; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; min-height: 43px; background: #12181b; color: inherit; border: 1px solid var(--edge); border-radius: 6px; }
select { appearance: none; padding-right: 28px; background: #12181b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5 -5' stroke='%239aabb4' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; }
textarea { resize: vertical; min-height: 107px; }
button, a.secondary, .picker span { padding: 9px 15px; border-radius: 6px; border: 1px solid transparent; background: var(--accent); color: #102021; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover:not(:disabled), a.secondary:hover, .picker:hover span { filter: brightness(1.12); }
button:disabled { opacity: .42; cursor: default; }
.secondary, .picker span { display: inline-block; background: #223034; border-color: #455962; color: #dce5e8; }
.quiet { padding: 5px 8px; background: none; color: var(--accent); }
:focus-visible, .picker:focus-within span { outline: 2px solid var(--accent); outline-offset: 3px; }
.prompt, .media { display: block; margin-top: 18px; }
.picker { display: inline-flex; margin: 6px 0; }
.picker input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.hint { color: var(--muted); font-size: .875rem; }
.image-list { padding: 0; list-style: none; margin: 0; }
.image-list li { display: flex; gap: 12px; align-items: center; margin-top: 8px; justify-content: space-between; }
.image-list span { overflow-wrap: anywhere; font-size: .875rem; }
.image-list select { width: auto; flex-shrink: 0; }
.actions { padding-top: 17px; border-top: 1px solid var(--edge); margin-top: 20px; justify-content: space-between; }
output { display: block; color: var(--accent); font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.preview-empty, video { width: 100%; aspect-ratio: 16 / 9; margin: 0 0 14px; border-radius: 7px; background: #12181b; }
.preview-empty { display: grid; place-items: center; border: 1px dashed var(--edge); }
.preview-empty span { width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 15px solid #53696f; }
video { display: block; object-fit: contain; max-height: 430px; }
#task-status { color: var(--muted); }
#download-area { margin-top: 15px; }
#expiry { margin-top: 8px; }
.notice { color: #ffb7a8; margin-bottom: 14px; }
@media (max-width: 740px) {
  .workspace { grid-template-columns: 1fr; }
  main, .masthead { padding-inline: 18px; }
  main { padding-top: 26px; }
  .panel { padding: 17px; }
}
@media (max-width: 420px) {
  .wallet { gap: 4px 8px; }
  .fields { gap: 7px; }
  select { padding-left: 7px; }
}
