:root {
  --ink: #17191b;
  --paper: #f4f1eb;
  --surface: #fffdf8;
  --line: #d8d2c8;
  --muted: #77736d;
  --soft: #ebe7df;
  --accent: #d85b35;
  --accent-dark: #a63e24;
  --green: #4d745c;
  --violet: #7566a5;
  --shadow: 0 16px 40px rgba(36, 30, 22, .08);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(216, 91, 53, .35); outline-offset: 3px; }
.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; padding: 28px 18px 20px; background: var(--ink); color: #f4f1eb; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand small { margin-top: 4px; color: #a6aaa7; font-size: 11px; }
.main-nav { margin-top: 72px; }
.nav-label { margin: 0 12px 10px; color: #777d7a; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; margin: 3px 0; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; color: #aeb2ae; text-align: left; }
.nav-item span { width: 22px; color: #686e6b; font: 11px/1 "SF Mono", monospace; }
.nav-item:hover { background: #252927; color: #fff; }
.nav-item.is-active { background: #303531; color: #fff; }
.nav-item.is-active span { color: var(--accent); }
.nav-info { display: flex; align-items: center; gap: 10px; margin: 18px 12px 0; color: #aeb2ae; font-size: 12px; text-decoration: none; }
.nav-info span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #727874; border-radius: 50%; color: #d7d9d5; font-size: 10px; }
.nav-info:hover { color: #fff; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid #303431; color: #9a9f9c; font-size: 12px; }
.local-dot, .save-dot { width: 7px; height: 7px; border-radius: 50%; background: #83b78b; box-shadow: 0 0 0 3px rgba(131, 183, 139, .14); }
.quiet-button { margin-left: auto; border: 0; background: transparent; color: #878d89; font-size: 20px; }
.main-content { max-width: 1450px; width: 100%; margin: 0 auto; padding: 30px 44px 44px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.breadcrumb { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 3vw, 38px); font-weight: 650; letter-spacing: -.04em; line-height: 1.08; }
h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.connector-status { display: inline-flex; align-items: center; gap: 8px; min-width: 126px; color: var(--muted); }
.connector-status > span:last-child { display: grid; gap: 1px; }
.connector-status strong { color: var(--ink); font-size: 12px; font-weight: 650; }
.connector-status small { font-size: 10px; line-height: 1.2; }
.connector-pip { width: 8px; height: 8px; border-radius: 50%; background: #9b9891; box-shadow: 0 0 0 3px rgba(155, 152, 145, .14); }
.connector-status[data-state="online"] .connector-pip { background: #5d9a68; box-shadow: 0 0 0 3px rgba(93, 154, 104, .14); }
.connector-status[data-state="pairing"] .connector-pip { background: var(--accent); box-shadow: 0 0 0 3px rgba(216, 91, 53, .14); }
.connector-status[data-state="offline"] .connector-pip { background: #bf7b44; box-shadow: 0 0 0 3px rgba(191, 123, 68, .14); }
.save-state, .section-status, .preview-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.button { min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 650; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent); color: white; box-shadow: 0 8px 18px rgba(216, 91, 53, .18); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button-secondary:hover { background: var(--surface); }
.content-grid { display: grid; grid-template-columns: minmax(500px, 1fr) minmax(330px, 440px); gap: 34px; align-items: start; }
.workspace-column { max-width: 760px; }
.section-block { padding: 0 0 30px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading > div { display: flex; align-items: center; gap: 11px; }
.step-number { color: var(--accent); font: 11px/1 "SF Mono", monospace; }
.section-status.accent { color: var(--accent); }
.section-intro { max-width: 530px; margin: -3px 0 17px 29px; color: var(--muted); }
.dropzone { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px; border: 1px dashed #bdb6ab; border-radius: var(--radius); background: rgba(255, 253, 248, .62); transition: border-color .16s ease, background .16s ease; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--accent); background: #fffaf5; }
.drop-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 25px; font-weight: 300; }
.dropzone strong, .dropzone small { display: block; }
.dropzone small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.drop-action { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 650; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { position: relative; min-height: 118px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.choice-card:hover { transform: translateY(-1px); border-color: #a59d92; background: var(--surface); }
.choice-card.is-selected { border-color: var(--accent); background: #fffaf5; box-shadow: inset 0 0 0 1px var(--accent); }
.choice-index { display: block; margin-bottom: 12px; color: var(--muted); font: 11px/1 "SF Mono", monospace; }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { max-width: 190px; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.choice-card em { position: absolute; top: 14px; right: 14px; padding: 3px 7px; border-radius: 999px; background: #f7d9cd; color: var(--accent-dark); font-size: 10px; font-style: normal; }
.sub-options { display: grid; grid-template-columns: 150px 1fr; gap: 7px 14px; align-items: center; margin: 14px 0 0; padding: 14px; border-radius: 10px; background: var(--soft); }
.field-label { color: var(--muted); font-size: 12px; }
select { width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.field-note { grid-column: 2; margin: -2px 0 0; color: var(--muted); font-size: 11px; }
.setting-list { border-top: 1px solid var(--line); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row strong, .setting-row small { display: block; }
.setting-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.toggle { position: relative; width: 38px; height: 22px; flex: 0 0 auto; appearance: none; border-radius: 99px; background: #bdb8ae; cursor: pointer; transition: background .16s ease; }
.toggle::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; content: ""; transition: transform .16s ease; }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(16px); }
.advanced-section { margin-bottom: 28px; }
.advanced-toggle { display: flex; justify-content: space-between; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; }
.advanced-toggle:hover { color: var(--ink); }
.advanced-panel { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; padding: 16px 0; }
.bottom-actions { display: flex; align-items: center; gap: 14px; }
.bottom-actions p { margin: 0; color: var(--muted); font-size: 12px; }
.preview-column { position: sticky; top: 28px; }
.preview-header, .timeline-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; color: var(--muted); font-size: 12px; }
.preview-header > span:first-child { color: var(--ink); font-weight: 650; }
.preview-frame { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 9 / 16; max-height: 620px; border-radius: 16px; background: #242725; box-shadow: var(--shadow); }
.preview-frame video { display: block; width: 100%; height: 100%; object-fit: contain; }
.preview-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 30px; color: #e7e3da; text-align: center; }
.preview-empty small { color: #a4a7a2; font-size: 11px; }
.play-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #606560; border-radius: 50%; color: #d85b35; font-size: 13px; }
.timeline-card { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.timeline-head { margin-bottom: 13px; }
.timeline-head strong { color: var(--ink); }
.timeline { display: flex; gap: 3px; height: 32px; overflow: hidden; border-radius: 6px; background: var(--soft); }
.segment { display: flex; align-items: center; justify-content: center; min-width: 0; color: #fff; font-size: 10px; font-weight: 650; }
.segment-talking { background: #5d6260; }.segment-people { background: var(--violet); }.segment-cards { background: var(--green); }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.timeline-legend span { display: inline-flex; align-items: center; gap: 5px; }.dot { width: 7px; height: 7px; border-radius: 50%; }.dot-talking { background: #5d6260; }.dot-people { background: var(--violet); }.dot-cards { background: var(--green); }
.privacy-note { display: flex; gap: 10px; margin-top: 14px; padding: 13px; border: 1px solid #d7ded3; border-radius: 10px; background: #edf3eb; color: var(--green); font-size: 13px; }.privacy-note small, .privacy-note strong { display: block; }.privacy-note small { margin-top: 3px; color: #657466; font-size: 11px; }
.connector-card { margin-top: 14px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.connector-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.connector-kicker { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.connector-badge { padding: 4px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 10px; }
.connector-card[data-state="online"] .connector-badge { background: #e4efe3; color: var(--green); }
.connector-card[data-state="pairing"] .connector-badge { background: #f7e2d8; color: var(--accent-dark); }
.connector-card[data-state="offline"] .connector-badge { background: #f4e8dc; color: #9a6031; }
.connector-card h2 { margin-bottom: 6px; font-size: 16px; }
.connector-card p { margin-bottom: 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.connector-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.connector-actions .button { min-height: 36px; padding-inline: 12px; font-size: 12px; }
.connector-result { margin: 12px 0 0 !important; padding-top: 11px; border-top: 1px solid var(--line); color: var(--green) !important; }
.connector-result.is-error { color: var(--accent-dark) !important; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 340px; padding: 12px 15px; border-radius: 9px; background: var(--ink); color: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }.toast.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 1050px) { .app-shell { grid-template-columns: 76px minmax(0, 1fr); }.sidebar { padding-inline: 10px; }.brand { justify-content: center; padding: 0; }.brand > span:last-child, .nav-label, .nav-item:not(.is-active)::after, .nav-item { font-size: 0; }.nav-item { justify-content: center; padding: 12px 8px; }.nav-item span { font-size: 11px; }.nav-item.is-active span { font-size: 11px; }.sidebar-footer span:not(.local-dot), .quiet-button { display: none; }.sidebar-footer { justify-content: center; padding-inline: 0; }.main-content { padding-inline: 28px; } }
@media (max-width: 780px) { .app-shell { display: block; }.sidebar { position: sticky; top: 0; z-index: 5; display: flex; flex-direction: row; align-items: center; height: 62px; padding: 10px 16px; }.main-nav { display: flex; gap: 4px; margin: 0 0 0 auto; }.nav-item { width: auto; padding: 8px; font-size: 0; }.nav-item span { display: block; }.sidebar-footer { display: none; }.main-content { padding: 24px 18px 40px; }.topbar { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }.top-actions { flex-wrap: wrap; }.content-grid { display: flex; flex-direction: column-reverse; gap: 30px; }.preview-column { position: static; width: min(100%, 390px); margin: 0 auto; }.workspace-column { width: 100%; }.preview-frame { max-height: none; }.choice-grid { grid-template-columns: 1fr; }.sub-options { grid-template-columns: 1fr; }.field-note { grid-column: auto; }.bottom-actions { align-items: flex-start; flex-direction: column; } }
