:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color-scheme: light dark;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #d1d5db;
  --accent: #111827;
  --accent-text: #ffffff;
  --ok-bg: #ecfdf5;
  --ok-text: #065f46;
  --warn-bg: #fff7ed;
  --warn-text: #9a3412;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --card: #121a2b;
    --text: #f9fafb;
    --muted: #9ca3af;
    --border: #334155;
    --accent: #f8fafc;
    --accent-text: #111827;
    --ok-bg: #052e2b;
    --ok-text: #a7f3d0;
    --warn-bg: #431407;
    --warn-text: #fed7aa;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, select, input { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.app-shell { max-width: 900px; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 18px max(40px, env(safe-area-inset-bottom)); }
.hero { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: clamp(34px, 8vw, 58px); line-height: 1; margin: 0; }
h2 { font-size: 20px; margin: 0 0 14px; }
.subtitle { max-width: 670px; line-height: 1.5; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin: 14px 0; box-shadow: 0 8px 30px rgba(0,0,0,.04); }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .grid-two { grid-template-columns: 1fr; } .hero { flex-direction: column; } }
.badge { border-radius: 999px; padding: 8px 12px; font-size: 13px; white-space: nowrap; background: var(--warn-bg); color: var(--warn-text); }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.status-list { display: grid; gap: 8px; }
.status-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: 0; }
.status-ok { color: #059669; font-weight: 700; }
.status-bad { color: #dc2626; font-weight: 700; }
.file-picker { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 16px; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-weight: 700; cursor: pointer; }
.file-picker input { display: none; }
.source-info { margin-top: 14px; line-height: 1.55; }
.preview { width: 100%; max-height: 350px; border-radius: 12px; margin-top: 14px; background: #000; }
select { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
button, .button-link { border: 0; border-radius: 12px; min-height: 46px; padding: 0 16px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary { background: var(--accent); color: var(--accent-text); }
.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
button:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
progress { width: 100%; height: 14px; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; }
.stage, .hint, .muted { color: var(--muted); }
.hint { font-size: 14px; line-height: 1.45; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; background: rgba(127,127,127,.09); border-radius: 10px; padding: 12px; }
.hidden { display: none !important; }
dl { margin: 0; display: grid; gap: 10px; }
dl div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
dt { font-weight: 700; }
dd { margin: 0; color: var(--muted); }
@media (max-width: 520px) { dl div { grid-template-columns: 1fr; gap: 2px; } }


/* v2.3.1 interaction-first layout */
.hero-compact { align-items: center; margin-bottom: 10px; }
.hero-compact h1 { font-size: clamp(30px, 7vw, 48px); }
.workflow-card { margin-top: 8px; }
.workflow-card > h2 { font-size: 24px; margin-bottom: 18px; }
.workflow-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(150px, .7fr) minmax(180px, .9fr); gap: 18px; align-items: start; }
.workflow-section { min-width: 0; }
.workflow-label { display: block; font-weight: 700; margin-bottom: 8px; }
.workflow-source { grid-row: span 1; }
.convert-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.convert-actions .primary { min-width: 180px; }
.progress-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.progress-block .stage { margin-bottom: 0; }
.info-panels { margin-top: 20px; }
.collapsible { padding: 0; overflow: hidden; box-shadow: none; }
.collapsible > summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.collapsible[open] > summary::after { content: "−"; }
.collapsible[open] > summary { border-bottom: 1px solid var(--border); }
.details-body { padding: 18px 20px 20px; }
.details-body pre { margin: 0; }
@media (max-width: 760px) {
  .workflow-grid { grid-template-columns: 1fr 1fr; }
  .workflow-source { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .hero-compact { flex-direction: row; align-items: center; }
  .hero-compact .eyebrow { display: none; }
  .hero-compact h1 { font-size: 30px; }
  .badge { white-space: normal; text-align: center; max-width: 44%; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-source { grid-column: auto; }
  .workflow-card { padding: 18px; }
  .convert-actions > * { flex: 1 1 100%; width: 100%; }
  .actions > * { flex: 1 1 100%; width: 100%; }
}

/* v3 automatic production workflow */
.workflow-grid-auto { grid-template-columns: minmax(0, 1.7fr) minmax(150px, .65fr); }
.plan-info { margin-top: 14px; padding: 12px 14px; border-radius: 12px; line-height: 1.45; border: 1px solid var(--border); }
.plan-fast { background: var(--ok-bg); color: var(--ok-text); }
.plan-transcode { background: var(--warn-bg); color: var(--warn-text); }
@media (max-width: 760px) {
  .workflow-grid-auto { grid-template-columns: 1fr; }
  .workflow-grid-auto .workflow-source { grid-column: auto; }
}


/* v3.0.1 orange camera identity */
.brand-lockup { display:flex; align-items:center; gap:0.85rem; min-width:0; }
.brand-camera { width:64px; height:78px; object-fit:cover; object-position:center; border-radius:14px; flex:0 0 auto; }
@media (max-width: 520px) {
  .brand-camera { width:52px; height:64px; border-radius:12px; }
  .brand-lockup { gap:0.65rem; }
}

/* Shared controls 1.0.0: app-owned screen adapters. */
@media screen {
}
