[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --paper: #f5f8fc;
  --surface: #ffffffeb;
  --ink: #17283f;
  --muted: #5d7088;
  --line: #dce5ef;
  --accent: #2563eb;
  --cyan: #06b6d4;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background-image: radial-gradient(ellipse at 85% 0%, #06b6d40a, transparent 50%), linear-gradient(#2563eb03 1px, transparent 1px), linear-gradient(90deg, #2563eb03 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}
.shell { width: min(1480px, calc(100% - 64px)); margin: 24px auto 48px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 700; }
h1 { font-size: 26px; line-height: 1.4; letter-spacing: -.035em; }
h2 { font-size: 20px; line-height: 1.5; margin-bottom: 10px; letter-spacing: -.025em; }
h3 { font-size: 15px; line-height: 1.5; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 28px #27456b05; }
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-symbol { display: inline-flex; flex: 0 0 36px; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid #bfd7f4; border-radius: 10px; color: var(--accent); background: linear-gradient(135deg, #eefaff, #edf2ff); }
.brand-symbol svg { width: 28px; height: 28px; }
.brand { font-weight: 800; letter-spacing: -.055em; }
.wordmark { font-size: 27px; line-height: 1.2; margin: 0; }
.eyebrow { color: #476888; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .09em; line-height: 1.7; margin-bottom: 12px; }
.section-number { color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; margin-right: 8px; }
.intro { color: var(--muted); line-height: 1.8; margin-bottom: 20px; font-size: 13px; }
label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
input, textarea { display: block; width: 100%; min-width: 0; min-height: 48px; border: 1px solid #ccd9e7; border-radius: 10px; padding: 12px 13px; font: inherit; font-size: 16px; color: var(--ink); background: #f8fafd; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; height: 144px; min-height: 120px; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #6c7d93; }
input:focus, textarea:focus { border-color: var(--accent); outline: 3px solid #2563eb20; outline-offset: 2px; background: #fff; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; border: 1px solid transparent; border-radius: 9px; padding: 10px 15px; font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; text-align: center; overflow-wrap: anywhere; cursor: pointer; line-height: 1.5; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.primary { color: #fff; background: var(--accent); box-shadow: 0 4px 12px #2563eb20; }
.primary:hover { background: #1d4ed8; box-shadow: 0 5px 16px #2563eb30; }
.quiet { color: #52667f; background: #ffffffa6; border-color: var(--line); }
.quiet:hover { color: var(--ink); background: #edf3fb; border-color: #bacce2; }
.download { color: #1d55c6; background: #f0f6ff; border-color: #cedef6; }
.download:hover { background: #e3eeff; border-color: #9cbbef; }
.button:focus-visible, summary:focus-visible, .variant-select:focus-visible { outline: 3px solid #2563eb80; outline-offset: 3px; }
button:disabled, input:disabled, textarea:disabled { cursor: wait; opacity: .65; }
form[aria-busy="true"] .primary { background: #5c79b2; }
.helper { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 9px 0 0; overflow-wrap: anywhere; }
.status { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 16px 0 0; padding-left: 10px; border-left: 2px solid #b9cee7; overflow-wrap: anywhere; }
.status:empty { margin: 0; padding: 0; border: 0; }
.status.error { color: #b42336; border-color: #e9a5ae; }
.status.success { color: #14735d; border-color: #87caba; }
.auth-card { display: grid; grid-template-columns: 1fr 1fr; width: min(840px, 100%); margin: clamp(32px, 12vh, 120px) auto 0; overflow: hidden; box-shadow: 0 20px 70px #2448780b; }
.auth-intro { padding: 36px; background: linear-gradient(145deg, #edf7ff, #f7fbff 65%, #eaf9fb); border-right: 1px solid var(--line); }
.auth-intro > .eyebrow { margin-top: 14px; margin-bottom: 30px; }
.auth-intro h2 { font-size: 27px; line-height: 1.5; margin-bottom: 14px; }
.auth-form-panel { padding: 64px 36px 36px; align-self: center; min-width: 0; }
.auth-form-panel h1 { margin-bottom: 10px; }
.auth-form-panel .primary { width: 100%; margin-top: 22px; }
.auth-visual { margin-top: 26px; padding: 0 16px; }
.visual-window { border: 1px solid #b5cee9; border-radius: 12px; background: #ffffffb3; box-shadow: 10px 10px 0 #daeaf750; overflow: hidden; }
.visual-toolbar { display: flex; gap: 5px; padding: 10px 12px; border-bottom: 1px solid #d9e7f3; }
.visual-toolbar i { width: 4px; height: 4px; border-radius: 50%; background: #87a9ce; }
.visual-play { display: grid; place-items: center; height: 92px; color: #2584ce; background: radial-gradient(circle, #d9f1ff, transparent 65%); }
.visual-play svg { width: 42px; height: 42px; }
.visual-timeline { margin: 0 14px 14px; height: 3px; background: #e0eaf6; border-radius: 4px; }
.visual-timeline span { display: block; width: 38%; height: 3px; background: var(--cyan); }
.visual-caption { display: block; text-align: center; margin-top: 20px; color: #587591; font: 10px/1.5 var(--mono); letter-spacing: .12em; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.header-title { display: flex; align-items: center; gap: 20px; min-width: 0; }
.app-header h1 { margin: 0; border-left: 1px solid var(--line); padding-left: 20px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .03em; }
.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.auth-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.auth-indicator > span { width: 6px; height: 6px; border-radius: 50%; background: #1b9a87; box-shadow: 0 0 0 3px #1b9a8710; }
.workspace { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 24px; align-items: start; }
.workspace-sidebar { position: sticky; top: 24px; min-width: 0; }
.parse-card { padding: 24px 22px; }
.parse-card .intro { margin-bottom: 20px; }
.form-footer { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.form-footer .helper { margin: 0; font-size: 11px; }
.form-footer .primary { width: 100%; }
.workflow { padding: 24px 18px 0; }
.workflow ol { list-style: none; margin: 0; padding: 0; }
.workflow li { display: flex; gap: 12px; margin-bottom: 17px; }
.workflow li > span { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border: 1px solid var(--line); border-radius: 7px; color: #68839f; background: #ffffff80; font: 10px var(--mono); }
.workflow strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.6; }
.workflow li p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 3px 0 0; }
.result-column { min-width: 0; }
.empty-state { position: relative; min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 52px 24px 30px; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(ellipse at 50% 40%, #e4f6ff90, transparent 60%), #ffffff80; }
.empty-topline { position: absolute; top: 18px; left: 24px; right: 24px; display: flex; justify-content: space-between; color: #6c829b; font: 10px/1.5 var(--mono); letter-spacing: .09em; }
.frame-marker { color: #7899bb; font-size: 17px; }
.empty-art { width: 240px; max-width: 100%; margin-bottom: 18px; }
.empty-art svg { display: block; width: 100%; }
.schematic-line { stroke: #acc3dd; stroke-width: 1.2; }
.schematic-back { fill: #eaf3fd; stroke: #c2d6ec; }
.schematic-front { fill: #ffffffd9; stroke: #8bb2de; }
.schematic-circle { fill: #e8f5ff; stroke: #b9dcf6; }
.schematic-play { fill: #3186d7; }
.schematic-accent { stroke: #0891b2; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty-state .eyebrow { font-size: 10px; margin-bottom: 8px; }
.empty-state h2 { font-size: 20px; margin-bottom: 10px; }
.empty-state > p:not(.eyebrow) { font-size: 13px; line-height: 1.8; color: var(--muted); margin-bottom: 18px; }
.empty-formats { display: flex; gap: 8px; }
.empty-formats span { border: 1px solid #dce8f4; border-radius: 6px; background: #ffffff90; padding: 4px 12px; color: #5d7893; font-size: 10px; }
.result-card { padding: 24px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 13px; }
.badge { display: inline-block; max-width: 100%; padding: 3px 8px; border: 1px solid #d0e2f8; border-radius: 5px; background: #eff6ff; color: #285db1; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.result-title { font-size: 21px; line-height: 1.5; letter-spacing: -.025em; margin-bottom: 10px; overflow-wrap: anywhere; }
.result-intro { min-width: 0; }
.description { white-space: pre-wrap; line-height: 1.8; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; margin-bottom: 14px; }
.metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.metadata > * { min-width: 0; max-width: 100%; }
.avatar { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; object-fit: cover; }
.result-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 16px; }
.summary-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: #486683; background: #f7faff; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.notice, .preview-message, .resource-empty { padding: 12px 14px; border: 1px solid #ead9ac; border-radius: 8px; color: #7c5d1d; background: #fffbef; font-size: 12px; line-height: 1.8; margin-bottom: 16px; overflow-wrap: anywhere; }
.preview-message { margin: 10px 0 0; }
.resource-empty { color: var(--muted); background: #f7faff; border-color: var(--line); }
.media-section { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; min-width: 0; }
.media-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.media-heading h3 { margin: 0; font-size: 14px; }
.media-count { color: #6d86a0; font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.video-grid { grid-template-columns: minmax(0, 1fr); }
.media-item { min-width: 0; }
.media-label { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 500; }
.media-frame { overflow: hidden; background: #edf2f8; min-width: 0; border-radius: 10px; }
.media-image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; background: #edf2f8; border: 1px solid var(--line); border-radius: 9px; }
video { display: block; width: 100%; max-height: 400px; aspect-ratio: 16 / 9; object-fit: contain; background: #101722; border-radius: 10px; }
audio { display: block; width: 100%; min-width: 0; height: 44px; }
.media-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.image-grid .media-actions .button { flex: 1 1 auto; padding: 8px 10px; font-size: 11px; }
.video-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 18px; align-items: start; }
.video-preview, .video-options { min-width: 0; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 28px; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.preview-heading .media-label { margin: 0; }
.preview-quality { color: #1d55c6; background: #ecf4ff; border: 1px solid #d5e5fa; border-radius: 5px; padding: 3px 8px; font-family: var(--mono); font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.video-options { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafd; }
.video-options-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.video-options-heading h4 { margin: 0; font-size: 12px; line-height: 1.6; }
.variant-list { display: grid; gap: 9px; }
.variant-option { min-width: 0; padding: 10px; border: 1px solid #d9e4f0; border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.variant-option.is-active { border-color: #6597f0; background: #f0f6ff; box-shadow: 0 0 0 1px #2563eb10; }
.variant-option:has(.variant-select[aria-pressed="true"]) { border-color: #6597f0; background: #f0f6ff; }
.preview-title { margin: 0; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.6; }
.options-count { color: #627e9c; font: 10px/1.6 var(--mono); white-space: nowrap; }
.author-id { color: #6b7d93; font: 10px/1.6 var(--mono); overflow-wrap: anywhere; }
.variant-select { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 0 0 8px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.variant-select:hover .variant-quality { color: var(--accent); }
.variant-topline { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 5px; }
.variant-quality { font-size: 14px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.variant-tag { color: #3f6ca8; background: #edf4ff; border-radius: 4px; padding: 2px 5px; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.is-active .variant-tag { color: #fff; background: #2563eb; }
.variant-detail { display: block; color: var(--muted); font: 10px/1.7 var(--mono); overflow-wrap: anywhere; }
.variant-download { width: 100%; min-height: 44px; padding: 7px 10px; font-size: 11px; }
.is-active .variant-download { color: #fff; background: #2563eb; border-color: #2563eb; }
.is-active .variant-download:hover { background: #1d4ed8; }
.variant-hint { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 12px 0 0; overflow-wrap: anywhere; }
.audio-strip, .audio-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f5f8fc; border: 1px solid var(--line); border-radius: 10px; }
.audio-strip audio, .audio-row audio { flex: 1; width: 0; }
.audio-strip .button, .audio-row .button { flex-shrink: 0; }
.media-section:has(> audio) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; }
.media-section:has(> audio) > .media-heading { grid-column: 1 / -1; margin-bottom: 0; }
.media-section:has(> audio) > .media-actions { margin: 0; }
.cover { max-width: 180px; }
.cover .media-image { max-height: 180px; aspect-ratio: 1; }
.cover-section { padding-top: 8px; }
.cover-section .cover { display: flex; align-items: center; gap: 14px; max-width: 100%; margin-top: 6px; }
.cover-section .cover .media-image { width: 72px; height: 72px; flex: 0 0 72px; }
.cover-section .cover .media-actions { margin-top: 0; min-width: 0; }
summary { cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1.7; min-height: 44px; padding: 12px 0; overflow-wrap: anywhere; }
summary::marker { color: #6c8bb0; }
.subtitles { margin-bottom: 0; padding-left: 24px; color: var(--muted); max-height: 300px; overflow: auto; font-size: 12px; }
.subtitles li { padding: 8px 0; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.subtitle-time { font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; color: #285db1; margin-right: 10px; }
.result-help { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 22px; font-size: 11px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 288px minmax(0, 1fr); }
  .video-workbench { grid-template-columns: minmax(0, 1fr); }
  .variant-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-grid:not(.video-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-title { gap: 14px; }
  .app-header h1 { padding-left: 14px; }
  .auth-indicator { display: none; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .workspace-sidebar { position: static; }
  .workspace:has(#result-section:not([hidden])) .workflow { display: none; }
  .workspace:has(#result-section:not([hidden])) .parse-card .intro { display: none; }
  .workspace:has(#result-section:not([hidden])) .parse-card textarea { height: 96px; min-height: 96px; }
  .workspace:has(#result-section:not([hidden])) .form-footer .helper { display: none; }
  .workflow { padding: 18px 4px 0; }
  .workflow ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .workflow li { margin: 0; gap: 8px; }
  .workflow > .eyebrow { margin-bottom: 10px; }
  .auth-intro, .auth-form-panel { padding: 30px 26px; }
  .auth-intro h2 { font-size: 24px; }
  .auth-visual { padding: 0; }
  .empty-state { min-height: 360px; }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 32px); margin: 16px auto 32px; }
  .app-header { align-items: flex-start; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; }
  .header-title { flex-direction: column; align-items: flex-start; gap: 6px; }
  .brand-lockup { gap: 7px; }
  .brand-symbol { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
  .brand-symbol svg { width: 24px; height: 24px; }
  .wordmark { font-size: 23px; }
  .app-header h1 { border: 0; padding: 0; font-size: 11px; }
  .header-actions { min-width: 0; flex-shrink: 1; }
  .app-header .quiet { font-size: 11px; padding: 8px 10px; }
  .parse-card, .result-card { padding: 20px 16px; border-radius: 12px; }
  .workflow ol { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .workflow li p { margin-top: 0; }
  .workflow li div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  .empty-state { min-height: 350px; padding: 48px 16px 24px; border-radius: 12px; }
  .empty-topline { left: 16px; right: 16px; }
  .empty-state h2 { font-size: 17px; }
  .empty-state > p:not(.eyebrow) { font-size: 12px; }
  .empty-art { width: 210px; }
  .auth-card { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
  .auth-intro { padding: 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-intro > .eyebrow { margin: 10px 0 16px; }
  .auth-intro h2 { font-size: 23px; }
  .auth-intro .intro { margin-bottom: 0; font-size: 12px; }
  .auth-visual { display: none; }
  .auth-form-panel { padding: 28px 24px; }
  .auth-form-panel h1 { font-size: 23px; }
  .result-title { font-size: 19px; }
  .video-workbench { gap: 14px; }
  .video-options { padding: 12px; }
  .variant-list { grid-template-columns: minmax(0, 1fr); }
  .variant-option { display: grid; grid-template-columns: minmax(0, 1fr) 86px; align-items: center; gap: 10px; }
  .variant-select { padding-bottom: 0; }
  .media-grid:not(.video-grid) { gap: 14px 10px; }
  .media-actions .button { flex: 1 1 auto; }
  .audio-strip, .audio-row { flex-wrap: wrap; }
  .audio-strip audio, .audio-row audio { width: 100%; flex-basis: 100%; }
  .audio-strip .button, .audio-row .button { width: 100%; }
  .media-section:has(> audio) { grid-template-columns: minmax(0, 1fr); }
  .media-section:has(> audio) > .media-actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
