:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #6e778b;
  --line: #dde2ec;
  --surface: #ffffff;
  --surface-soft: #f4f6fa;
  --canvas: #edf0f5;
  --navy: #121a2b;
  --navy-soft: #1b263d;
  --violet: #7459ef;
  --violet-dark: #5e43dc;
  --mint: #19b99a;
  --coral: #f06f5f;
  --green: #168d73;
  --shadow: 0 18px 48px rgba(27, 39, 69, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }

.topbar { height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255, 255, 255, 0.9); border-bottom: 1px solid rgba(23, 32, 51, 0.08); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 50; }
.brand-link { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, var(--violet), #4fd3c4); box-shadow: 0 10px 28px rgba(116, 89, 239, 0.28); }
.brand-mark svg { width: 24px; fill: #fff; }
.brand-link > span:last-child { display: grid; gap: 1px; }
.brand-link strong { font-size: 18px; letter-spacing: -0.02em; }
.brand-link small { color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.health-pill { height: 34px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 650; }
.health-pill i { width: 8px; height: 8px; border-radius: 50%; background: #a4acbc; box-shadow: 0 0 0 4px rgba(164, 172, 188, 0.15); }
.health-pill.is-ready { color: #0f7a63; background: #eaf8f4; }
.health-pill.is-ready i { background: var(--mint); box-shadow: 0 0 0 4px rgba(25, 185, 154, 0.14); }
.health-pill.is-error { color: #b04437; background: #fff0ed; }
.health-pill.is-error i { background: var(--coral); }

.app-shell { width: min(1500px, 100%); margin: 0 auto; padding: 26px; display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar { min-height: calc(100vh - 124px); position: sticky; top: 98px; overflow: hidden; color: #f8f9fd; border-radius: var(--radius-xl); padding: 32px; background: radial-gradient(circle at 85% 15%, rgba(116, 89, 239, 0.42), transparent 30%), radial-gradient(circle at 10% 85%, rgba(25, 185, 154, 0.2), transparent 34%), var(--navy); box-shadow: 0 26px 70px rgba(18, 26, 43, 0.24); }
.sidebar::after { content: ""; position: absolute; inset: auto -70px -70px auto; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,0.08); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,0.025), 0 0 0 70px rgba(255,255,255,0.018); pointer-events: none; }
.eyebrow { display: block; color: var(--violet-dark); font-size: 10px; line-height: 1; font-weight: 850; letter-spacing: 0.18em; text-transform: uppercase; }
.eyebrow.light { color: #9fe4d6; }
.sidebar-intro h1 { margin: 16px 0 14px; font-size: 35px; line-height: 1.17; letter-spacing: -0.045em; }
.sidebar-intro p { margin: 0; color: #aeb7ca; font-size: 13px; line-height: 1.85; }
.workflow-list { margin: 34px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.workflow-list li { padding: 12px; display: flex; align-items: center; gap: 13px; border-radius: 14px; color: #8490a8; }
.workflow-list li.is-active { color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08); }
.workflow-list li > span { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; color: #a8b2c5; background: rgba(255,255,255,0.06); font-size: 10px; font-weight: 800; }
.workflow-list li.is-active > span { color: #10221f; background: #9fe4d6; }
.workflow-list div { display: grid; gap: 3px; }
.workflow-list strong { font-size: 13px; }
.workflow-list small { font-size: 10px; color: inherit; }
.privacy-card { position: relative; z-index: 1; padding: 16px; display: flex; gap: 12px; border-radius: 16px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.09); }
.privacy-icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; color: #aaf0e3; background: rgba(25,185,154,0.14); font-size: 19px; }
.privacy-card strong { font-size: 12px; }
.privacy-card p { margin: 5px 0 0; color: #9ba7bd; font-size: 10px; line-height: 1.65; }
.sidebar-footer { position: absolute; z-index: 1; left: 32px; right: 32px; bottom: 28px; display: grid; gap: 4px; color: #68758f; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-footer strong { color: #95a2b9; font-size: 9px; }

.workspace { min-width: 0; display: grid; gap: 18px; }
.workspace-header { min-height: 118px; padding: 24px 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow); border: 1px solid rgba(23,32,51,0.055); }
.workspace-header h2 { margin: 9px 0 6px; font-size: 29px; line-height: 1.15; letter-spacing: -0.035em; }
.workspace-header p { margin: 0; color: var(--muted); font-size: 13px; }
.local-badge { padding: 8px 11px; border-radius: 999px; color: #0c7e67; background: #e9f8f4; font-size: 11px; font-weight: 750; white-space: nowrap; }

.mode-tabs { padding: 5px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; background: #dfe3eb; border-radius: 16px; }
.mode-tab { min-width: 0; min-height: 86px; padding: 13px 15px; border: 0; border-radius: 12px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 11px; align-content: center; text-align: left; background: transparent; cursor: pointer; transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.mode-tab:hover { background: rgba(255,255,255,0.62); }
.mode-tab.is-active { color: #fff; background: linear-gradient(135deg, #654ae0, #806af0); box-shadow: 0 10px 28px rgba(94,67,220,0.28); transform: translateY(-1px); }
.mode-index { grid-row: 1 / 3; align-self: center; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #727b8e; background: rgba(255,255,255,0.56); font-size: 9px; font-weight: 850; }
.mode-tab.is-active .mode-index { color: #5140ae; background: rgba(255,255,255,0.9); }
.mode-tab strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mode-tab small { color: #7c8597; font-size: 10px; }
.mode-tab.is-active small { color: rgba(255,255,255,0.72); }

.panel { padding: 23px; display: grid; gap: 18px; background: var(--surface); border-radius: var(--radius-xl); border: 1px solid rgba(23,32,51,0.055); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading > div:first-child { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.section-number { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #5a44c9; background: #eeebff; font-size: 10px; font-weight: 850; }
.section-number.success { color: #08745e; background: #e1f7f1; font-size: 15px; }
.panel-heading h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.limit-note, .queue-status { padding: 7px 10px; border-radius: 999px; color: #727c8f; background: var(--surface-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.upload-grid > :only-child { grid-column: 1 / -1; }
.upload-block { min-width: 0; display: grid; gap: 8px; }
.field-label { font-size: 11px; font-weight: 750; }
.drop-zone { min-height: 150px; position: relative; padding: 20px; display: grid; place-items: center; align-content: center; gap: 6px; overflow: hidden; text-align: center; border: 1.5px dashed #b7c0d1; border-radius: var(--radius-lg); background: linear-gradient(145deg, #f8f9fc, #f1f3f8); cursor: pointer; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--violet); background: #f2efff; transform: translateY(-1px); }
.drop-zone.is-cover:hover, .drop-zone.is-cover.is-dragging { border-color: var(--mint); background: #ecfaf7; }
.drop-zone.has-files { border-style: solid; border-color: #8f7df0; background: #f4f1ff; }
.drop-zone.is-cover.has-files { border-color: #5ccdb6; background: #effaf7; }
.file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #654ae0; background: #e8e3ff; font-size: 20px; }
.is-cover .drop-icon { color: #0c8069; background: #dff7f1; }
.drop-zone strong { font-size: 13px; }
.drop-zone small { color: var(--muted); font-size: 10px; }
.file-summary { min-height: 17px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 9px; }
.preview-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.preview-media { aspect-ratio: 4 / 3; display: block; width: 100%; object-fit: cover; background: #e9ecf2; }
.preview-name { padding: 8px; display: block; color: #596277; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-editor { padding-top: 4px; display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 13px; align-items: center; }
.focus-copy { display: grid; gap: 5px; }
.focus-copy strong { font-size: 11px; }
.focus-copy span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.focus-stage { min-height: 118px; position: relative; overflow: hidden; padding: 0; border: 0; border-radius: 14px; background: #101826; cursor: crosshair; }
.focus-stage img { width: 100%; height: 160px; display: block; object-fit: cover; }
.focus-ring { width: 24px; height: 24px; position: absolute; left: 50%; top: 50%; border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 999px rgba(7,13,25,0.18), 0 2px 10px rgba(0,0,0,0.3); pointer-events: none; }

.field-grid, .advanced-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.advanced-grid { padding: 13px; border-radius: 15px; background: #f0f2f7; }
.control-field { min-width: 0; display: grid; gap: 7px; }
.control-field > span { font-size: 10px; font-weight: 750; }
.control-field input, .control-field select { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: #f8f9fb; color: var(--ink); font-size: 12px; }
.control-field input:focus, .control-field select:focus { border-color: #8d7bf0; box-shadow: 0 0 0 3px rgba(116,89,239,0.12); background: #fff; }
.text-button { border: 0; padding: 5px 0; color: var(--violet-dark); background: none; font-size: 10px; font-weight: 750; cursor: pointer; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.metric { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.metric span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.metric strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.verified-metric { border-color: #ccece5; background: #f1fbf8; }
.verified-metric strong { color: #0d7d66; }

.task-list { display: grid; border-top: 1px solid var(--line); }
.task-row { min-height: 66px; padding: 10px 2px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
.task-number { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #667086; background: #f0f2f7; font-size: 9px; font-weight: 850; }
.task-copy { min-width: 0; display: grid; gap: 4px; }
.task-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.task-copy span { color: var(--muted); font-size: 9px; }
.status-chip { padding: 6px 8px; border-radius: 8px; color: #697388; background: #f0f2f7; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-chip.running { color: #5a44c9; background: #eeebff; }
.status-chip.success { color: #0a7c64; background: #e8f8f4; }
.status-chip.error { color: #b1463a; background: #fff0ed; }
.empty-state { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 5px; color: #8a93a5; text-align: center; }
.empty-state > span { font-size: 24px; color: #b5bdcb; }
.empty-state strong { color: #697388; font-size: 11px; }
.empty-state p { margin: 0; font-size: 9px; }
.progress-wrap { display: grid; gap: 7px; }
.progress-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.progress-head strong { color: var(--ink); }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e6e9f0; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--mint)); transition: width 300ms ease; }
.action-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
.queue-download-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.primary-button, .danger-button, .ghost-button, .primary-link { border: 0; border-radius: 12px; font-weight: 750; cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease; }
.primary-button { min-height: 52px; padding: 10px 18px; display: grid; place-items: center; gap: 2px; color: #fff; background: linear-gradient(135deg, #654ae0, #7a67e9 65%, #318fbd); box-shadow: 0 12px 26px rgba(94,67,220,0.24); }
.primary-button span { font-size: 13px; }
.primary-button small { color: rgba(255,255,255,0.72); font-size: 8px; font-weight: 500; }
.primary-button:hover:not(:disabled), .primary-link:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(94,67,220,0.3); }
.primary-button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.primary-link[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.danger-button { min-height: 52px; padding: 0 14px; color: #b44a3e; background: #fff1ee; }
.danger-button:disabled { color: #9aa2b1; background: #eef0f4; cursor: not-allowed; }
.queue-download-button { min-height: 44px; padding: 0 14px; border: 1px solid #d9dceb; border-radius: 12px; color: #5545bd; background: #f0edff; font-size: 11px; font-weight: 780; cursor: pointer; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.queue-download-button:hover:not(:disabled) { border-color: #bcb3ee; background: #e9e4ff; transform: translateY(-1px); }
.queue-download-button:disabled { color: #969daa; border-color: #e0e2e8; background: #eef0f4; cursor: not-allowed; transform: none; }
.ghost-button { min-height: 40px; padding: 0 14px; color: #4e5a70; background: #f0f2f7; }
.ghost-button.compact { min-height: 34px; font-size: 11px; }
.ghost-button:hover { background: #e8eaf0; }
.primary-link { min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--violet-dark); text-decoration: none; font-size: 11px; }

.access-card { min-height: 122px; padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; overflow: hidden; position: relative; border: 1px solid #dcd6ff; border-radius: var(--radius-xl); background: linear-gradient(135deg, #fff 0%, #f5f2ff 58%, #eefaf8 100%); box-shadow: var(--shadow); }
.access-card::after { content: ""; width: 150px; height: 150px; position: absolute; right: -68px; top: -84px; border-radius: 50%; border: 24px solid rgba(116,89,239,0.08); pointer-events: none; }
.access-copy { min-width: 0; position: relative; z-index: 1; display: grid; gap: 7px; }
.access-copy > strong { font-size: 17px; letter-spacing: -0.02em; }
.access-copy p { max-width: 620px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.access-actions { min-width: 218px; position: relative; z-index: 1; display: grid; gap: 9px; justify-items: stretch; }
.access-button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #654ae0, #7a67e9); box-shadow: 0 11px 24px rgba(94,67,220,0.22); font-size: 11px; font-weight: 800; cursor: pointer; }
.access-button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(94,67,220,0.28); }
.access-button:disabled { opacity: 0.5; cursor: wait; transform: none; box-shadow: none; }
.trial-counter { min-height: 26px; padding: 6px 10px; display: flex; align-items: baseline; justify-content: center; gap: 4px; border-radius: 9px; color: #645c78; background: rgba(255,255,255,0.82); font-size: 9px; }
.trial-counter strong { color: var(--violet-dark); font-size: 13px; }
.access-card.is-exhausted { border-color: #f2c4bd; background: linear-gradient(135deg, #fff 0%, #fff2ef 100%); }
.access-card.is-exhausted .trial-counter strong { color: #b2483c; }
.access-card.is-licensed { border-color: #bfe8df; background: linear-gradient(135deg, #fff 0%, #eaf9f5 100%); }
.access-card.is-licensed .access-button { background: linear-gradient(135deg, #0b8d72, #19b99a); box-shadow: 0 11px 24px rgba(25,185,154,0.2); }
.access-card.is-licensed .trial-counter strong { color: #0a8068; }

.error-banner { padding: 13px 15px; color: #a53e34; background: #fff0ed; border: 1px solid #f7c9c3; border-radius: 14px; font-size: 11px; line-height: 1.6; }
.results-heading { align-items: center; }
.results-actions { display: flex !important; align-items: center !important; gap: 8px !important; }
.save-explainer { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; border-radius: 15px; background: #f2f4f8; }
.save-explainer > div { padding: 8px 10px; display: flex; gap: 9px; align-items: flex-start; }
.save-explainer span { padding: 4px 7px; border-radius: 7px; color: #5b46c7; background: #e9e5ff; font-size: 9px; font-weight: 850; }
.save-explainer > div:last-child span { color: #087660; background: #dff6f0; }
.save-explainer p { margin: 1px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.result-preview { aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: #101724; }
.result-preview video { width: 100%; height: 100%; display: block; object-fit: contain; }
.verified-flag { position: absolute; top: 10px; left: 10px; padding: 6px 8px; border-radius: 8px; color: #075e4e; background: rgba(230,250,245,0.92); backdrop-filter: blur(8px); font-size: 9px; font-weight: 800; }
.result-body { padding: 13px; display: grid; gap: 10px; }
.result-title { display: flex; justify-content: space-between; gap: 10px; }
.result-title > div { min-width: 0; }
.result-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.result-title span { color: var(--muted); font-size: 9px; }
.asset-id { max-width: 120px; color: #7b8497; font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.result-button, .result-link { min-height: 34px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; color: #4d586e; background: #fff; text-decoration: none; font-size: 9px; font-weight: 750; cursor: pointer; }
.result-button.primary { color: #fff; border-color: var(--violet); background: var(--violet); }
.result-link.pair { color: #0b7a64; border-color: #bfe7de; background: #effaf7; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 48px)); padding: 13px 16px; color: #fff; background: #172033; border-radius: 13px; box-shadow: 0 18px 48px rgba(23,32,51,0.25); font-size: 11px; line-height: 1.55; }
.modal-backdrop { position: fixed; z-index: 90; inset: 0; padding: 22px; display: grid; place-items: center; background: rgba(12,18,32,0.58); backdrop-filter: blur(13px); }
.guide-modal { width: min(600px, 100%); max-height: min(760px, calc(100vh - 44px)); overflow: auto; position: relative; padding: 30px; border-radius: 24px; background: #fff; box-shadow: 0 32px 90px rgba(0,0,0,0.3); }
.modal-close { position: absolute; right: 18px; top: 16px; width: 34px; height: 34px; border: 0; border-radius: 11px; color: #677187; background: #eff1f5; font-size: 20px; cursor: pointer; }
.guide-modal h2 { margin: 12px 0 9px; font-size: 25px; letter-spacing: -0.035em; }
.guide-lede { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.guide-steps { margin: 22px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.guide-steps li { padding: 13px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 14px; }
.guide-steps li > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #5b46c7; background: #eae6ff; font-size: 10px; font-weight: 850; }
.guide-steps strong { font-size: 11px; }
.guide-steps p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.guide-steps a { display: inline-block; margin-top: 7px; color: var(--violet-dark); font-size: 9px; font-weight: 750; }
.guide-note { padding: 14px; display: grid; gap: 5px; border-radius: 13px; color: #0b715d; background: #eaf9f5; }
.guide-note strong { font-size: 10px; }
.guide-note span { font-size: 9px; line-height: 1.55; }
.modal-done { width: 100%; margin-top: 16px; }
.license-modal { width: min(540px, 100%); }
.license-device-panel { margin-top: 18px; padding: 15px; display: grid; gap: 8px; border-radius: 14px; color: #4e4764; background: #f7f5ff; border: 1px solid #e2ddfa; }
.license-device-panel > strong { font-size: 11px; }
.license-device-panel > span { color: var(--muted); font-size: 9px; line-height: 1.6; }
.license-device-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.license-device-row code { min-width: 0; padding: 10px 11px; overflow-wrap: anywhere; border-radius: 10px; color: #51408f; background: #fff; font: 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.license-success, .official-access-panel, .license-unavailable { margin-top: 18px; padding: 15px; display: grid; gap: 6px; border-radius: 14px; }
.license-success { color: #087660; background: #e8f8f4; border: 1px solid #c6ebe2; }
.license-success strong, .official-access-panel strong, .license-unavailable strong { font-size: 11px; }
.license-success span, .license-unavailable span { font-size: 9px; line-height: 1.6; }
.official-access-panel { background: #f4f1ff; border: 1px solid #dcd5ff; }
.official-access-panel p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.official-access-panel .primary-link { width: max-content; margin-top: 4px; }
.activation-form { margin-top: 14px; padding-top: 16px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.activation-form > label { font-size: 10px; font-weight: 800; }
.activation-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 9px; }
.activation-input-row input { min-width: 0; height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #f8f9fb; font-size: 11px; }
.activation-input-row input:focus { border-color: #8d7bf0; box-shadow: 0 0 0 3px rgba(116,89,239,0.12); background: #fff; }
.activation-input-row .primary-button { min-height: 48px; }
.license-error { margin: 0; padding: 9px 11px; border-radius: 9px; color: #a53e34; background: #fff0ed; font-size: 9px; line-height: 1.55; }
.license-unavailable { color: #775a19; background: #fff8e8; border: 1px solid #f0dfb4; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 260px minmax(0, 1fr); padding: 18px; gap: 16px; }
  .sidebar { padding: 25px; }
  .sidebar-intro h1 { font-size: 29px; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-footer { left: 25px; right: 25px; }
}

@media (max-width: 860px) {
  .topbar { padding: 0 17px; }
  .health-pill span { display: none; }
  .health-pill { width: 34px; padding: 0; justify-content: center; }
  .app-shell { grid-template-columns: 1fr; padding: 14px; }
  .sidebar { display: none; }
  .workspace { gap: 14px; }
  .result-grid { grid-template-columns: 1fr; }
  .access-card { grid-template-columns: 1fr; gap: 16px; }
  .access-actions { min-width: 0; grid-template-columns: minmax(130px, 0.7fr) minmax(190px, 1fr); align-items: center; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; }
  .brand-link small, .topbar .ghost-button { display: none; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .brand-mark svg { width: 21px; }
  .brand-link strong { font-size: 17px; }
  .app-shell { padding: 10px 10px 28px; }
  .workspace { gap: 10px; }
  .workspace-header { min-height: 0; padding: 18px; align-items: center; border-radius: 19px; }
  .workspace-header .eyebrow { display: none; }
  .workspace-header h2 { margin: 0 0 7px; font-size: 25px; line-height: 34px; }
  .workspace-header p { max-width: 255px; font-size: 12px; line-height: 1.55; }
  .local-badge { padding: 8px 10px; font-size: 11px; }
  .mode-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 5px; overflow: hidden; background: #dfe3eb; }
  .mode-tab { min-height: 96px; padding: 12px 6px; grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 5px; justify-items: center; border: 0; border-radius: 12px; text-align: center; background: transparent; box-shadow: none; }
  .mode-index { display: none; }
  .mode-tab:not(.is-active):hover { background: rgba(255,255,255,0.62); }
  .mode-tab.is-active, .mode-tab.is-active:hover { color: #fff; background: linear-gradient(135deg, #654ae0, #806af0); transform: none; box-shadow: 0 9px 22px rgba(94,67,220,0.22); }
  .mode-tab strong { overflow: visible; white-space: normal; font-size: 13px; line-height: 1.35; }
  .mode-tab small { font-size: 11px; line-height: 1.4; }
  .panel { padding: 18px; gap: 16px; border-radius: 19px; }
  .panel-heading h3 { font-size: 18px; }
  .panel-heading p { font-size: 12px; }
  .text-button { font-size: 12px; }
  .upload-panel .panel-heading { display: none; }
  .upload-grid, .field-grid, .advanced-grid { grid-template-columns: 1fr; }
  .metric-grid, .save-explainer { grid-template-columns: 1fr 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-grid > :only-child { grid-column: auto; }
  .field-label { font-size: 14px; }
  .drop-zone { min-height: 180px; }
  .drop-zone strong { font-size: 16px; }
  .drop-zone small { font-size: 12px; }
  .file-summary { font-size: 11px; }
  .field-grid { gap: 10px; }
  .advanced-grid { padding: 0; background: transparent; }
  .control-field { padding: 16px; gap: 10px; border: 1px solid var(--line); border-radius: 16px; background: #f4f5f8; }
  .control-field > span { font-size: 14px; }
  .control-field input, .control-field select { height: 56px; border-radius: 13px; background: #fff; font-size: 16px; }
  .metric span { font-size: 11px; }
  .metric strong { font-size: 13px; }
  .limit-note, .queue-status { font-size: 11px; }
  .task-copy strong { font-size: 13px; }
  .task-copy span, .status-chip { font-size: 11px; }
  .empty-state strong { font-size: 13px; }
  .empty-state p { font-size: 11px; }
  .primary-button span { font-size: 15px; }
  .primary-button small { font-size: 10px; }
  .focus-editor { grid-template-columns: 1fr; }
  .action-row { grid-template-columns: 1fr; }
  .queue-download-actions { grid-column: auto; grid-template-columns: 1fr; }
  .queue-download-button { min-height: 52px; font-size: 14px; }
  .danger-button { min-height: 44px; font-size: 14px; }
  .results-heading { display: grid; }
  .results-actions { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .guide-modal { padding: 24px 18px 18px; border-radius: 20px; }
  .access-card { padding: 18px; border-radius: 19px; }
  .access-copy > strong { font-size: 20px; }
  .access-copy p { font-size: 12px; }
  .access-button { min-height: 48px; font-size: 14px; }
  .trial-counter { font-size: 11px; }
  .trial-counter strong { font-size: 15px; }
  .access-actions { grid-template-columns: 1fr; }
  .license-device-row { grid-template-columns: 1fr; }
  .activation-input-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
