
    :root {
      --bg: #f4f5f7; --surface: #fff; --ink: #192323; --muted: #596565;
      --border: #e1e6e5; --soft: #f1f5f3; --accent: #126b55; --accent-soft: #e9f5ef;
      --danger: #a32c32; --danger-soft: #fff0f0; --warning: #805513; --warning-soft: #fff6e7;
      --focus: #137b64; --radius: 12px; --header: 64px;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      color: var(--ink); background: var(--bg); font-synthesis: none;
    }
    * { box-sizing: border-box; }
    body { margin: 0; font-size: 14px; line-height: 1.6; }
    button, input, textarea { font: inherit; }
    button { cursor: pointer; touch-action: manipulation; }
    button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
    :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
    button { min-height: 44px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--ink); padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: background-color .15s, border-color .15s; }
    button:hover:enabled { background: var(--soft); border-color: #c6d1cc; }
    button:active:enabled { background: #e5ece8; }
    button:disabled { cursor: not-allowed; opacity: .45; }
    button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
    button.primary:hover:enabled { background: #0c5946; }
    button.quiet { border-color: transparent; color: var(--muted); background: transparent; }
    button.quiet:hover:enabled { background: var(--soft); }
    svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
    [hidden] { display: none !important; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; background: var(--surface); padding: 8px 16px; }
    .skip-link:focus { top: 8px; }
    .app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
    .app-header { min-height: var(--header); padding: 10px 24px; padding-top: max(10px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
    .brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
    .brand-logo { display: block; width: 144px; height: auto; max-width: 100%; flex-shrink: 0; }
    .brand h1 { padding-left: 20px; border-left: 1px solid var(--border); white-space: nowrap; }
    h1 { font-size: 17px; line-height: 1.2; letter-spacing: -.025em; margin: 0; font-weight: 650; }
    .brand-sub { color: var(--muted); margin-left: 9px; font-size: 12px; font-weight: 400; letter-spacing: 0; }
    .header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
    .session-label { color: var(--muted); font-size: 12px; }
    .workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(330px, 390px) minmax(0, 1fr); }
    .chat-panel { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
    .panel-heading { padding: 21px 22px 16px; border-bottom: 1px solid var(--border); }
    .eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
    .task-status { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 24px; }
    .dot { width: 7px; height: 7px; border-radius: 50%; background: #7d8984; display: inline-block; flex: 0 0 auto; }
    .task-status[data-tone="active"] .dot { background: var(--accent); }
    .task-status[data-tone="warning"] .dot { background: #ad751a; }
    .task-status[data-tone="error"] .dot { background: var(--danger); }
    .status-message { font-size: 12px; color: var(--muted); margin: 5px 0 0; overflow-wrap: anywhere; min-height: 19px; }
    .feed { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px; scrollbar-gutter: stable; }
    .welcome { padding: 16px 0 24px; }
    .welcome-icon { width: 40px; height: 40px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; border-radius: 12px; margin-bottom: 17px; }
    .welcome h2 { margin: 0 0 9px; font-size: 23px; font-weight: 620; line-height: 1.4; letter-spacing: -.035em; }
    .welcome p { margin: 0; color: var(--muted); font-size: 14px; }
    .suggestions { display: grid; gap: 9px; margin-top: 22px; }
    .suggestion { text-align: left; justify-content: flex-start; align-items: flex-start; padding: 12px 13px; color: #364640; font-size: 13px; line-height: 1.5; border-color: var(--border); }
    .suggestion svg { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
    .message { margin: 0 0 23px; overflow-wrap: anywhere; }
    .message-meta { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 7px; display: flex; align-items: center; gap: 7px; }
    .message-meta .assistant-mark { background: var(--accent); width: 15px; height: 15px; display: inline-block; border-radius: 4px; }
    .message-body { white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
    .message.user .message-body { padding: 12px 14px; background: var(--soft); border-radius: 11px 11px 3px 11px; }
    .message.streaming .message-body::after { content: ""; width: 5px; height: 14px; margin-left: 4px; display: inline-block; background: var(--accent); vertical-align: -2px; }
    .activity { margin: 8px 0 20px; padding-top: 17px; border-top: 1px solid var(--border); }
    .activity summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: 12px; min-height: 36px; font-size: 12px; font-weight: 600; list-style: none; }
    .activity summary::-webkit-details-marker { display: none; }
    .activity summary::after { content: "+"; color: var(--muted); font-size: 17px; }
    .activity[open] summary::after { content: "−"; }
    .activity-count { color: var(--muted); font-weight: 400; margin-left: 6px; }
    .timeline { list-style: none; padding: 8px 0 0; margin: 0; }
    .timeline li { position: relative; padding: 0 0 15px 28px; }
    .timeline li::before { content: ""; width: 1px; background: var(--border); position: absolute; top: 19px; bottom: 0; left: 8px; }
    .timeline li:last-child::before { display: none; }
    .step-number { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 10px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
    .step-title { color: #34423b; font-size: 12px; overflow-wrap: anywhere; }
    .step-detail { font-size: 11px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
    .new-content { align-self: center; margin: 0 0 9px; font-size: 12px; min-height: 32px; box-shadow: 0 2px 10px #17352b10; }
    .task-progress, .downloads-panel { margin: 16px 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
    .task-progress summary, .downloads-panel h3 { font-size: 13px; font-weight: 600; margin: 0; }
    .task-progress summary { cursor: pointer; min-height: 28px; }
    .requirement-list, .download-list { padding: 0; margin: 8px 0 0; list-style: none; }
    .requirement-list li { padding: 6px 0; font-size: 13px; overflow-wrap: anywhere; }
    .requirement-status { color: var(--muted); margin-right: 8px; }
    .requirement-status[data-state="verified"] { color: var(--accent); }
    .pending-result { color: #885512; background: #fff8e8; padding: 9px; border-radius: 6px; font-size: 13px; }
    .download-list li { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; }
    .download-list a { color: var(--accent); overflow-wrap: anywhere; padding: 10px 0; }
    .download-note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
    .error-banner { margin: 0 17px 10px; padding: 11px 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid #f0c6c8; border-radius: 9px; font-size: 12px; display: flex; align-items: flex-start; gap: 8px; }
    .error-banner p { margin: 0; flex: 1; overflow-wrap: anywhere; }
    .error-banner button { padding: 0 4px; min-height: 25px; min-width: 25px; color: var(--danger); border: 0; background: transparent; }
    .error-banner .retry { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; font-size: 11px; }
    .composer { padding: 14px 18px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
    .url-settings { margin: 0 0 10px; }
    .url-settings summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 3px 0; }
    .url-settings label { margin-top: 8px; font-size: 12px; display: block; }
    .url-settings input { width: 100%; margin-top: 5px; border: 1px solid #c5ceca; border-radius: 7px; padding: 8px 10px; background: var(--surface); color: var(--ink); font-size: 13px; }
    .url-hint { color: var(--muted); font-size: 11px; margin: 5px 0 0; }
    .input-shell { border: 1px solid #c5ceca; border-radius: var(--radius); padding: 11px 11px 9px; background: var(--surface); transition: border-color .15s; }
    .input-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #126b5510; }
    .input-label { color: var(--muted); font-size: 11px; margin-bottom: 6px; display: block; }
    textarea { display: block; width: 100%; min-height: 64px; max-height: 150px; border: 0; resize: vertical; color: var(--ink); background: transparent; font-size: 14px; line-height: 1.6; padding: 0; }
    textarea:focus { outline: none; }
    textarea::placeholder { color: #75817c; }
    .composer-bottom { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .keyboard-hint { color: var(--muted); font-size: 10px; }
    #send { min-height: 36px; padding: 7px 12px; font-size: 12px; }
    .composer-note { font-size: 10px; color: var(--muted); margin: 9px 0 0; text-align: center; }
    .browser-panel { min-width: 0; min-height: 0; padding: 22px 24px 16px; display: flex; flex-direction: column; gap: 13px; }
    .browser-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .browser-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
    .browser-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .browser-actions button { min-height: 36px; font-size: 12px; padding: 7px 11px; }
    .browser-actions svg { width: 15px; height: 15px; }
    .browser-card { flex: 1; min-height: 200px; min-width: 0; display: flex; flex-direction: column; border: 1px solid #d7dfdb; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 3px 15px #1b302607; }
    .browser-card:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: var(--surface); }
    .browser-card:-webkit-full-screen { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: var(--surface); }
    .fullscreen-exit { min-height: 32px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
    .browser-chrome { background: #fbfcfb; min-height: 45px; display: flex; align-items: center; padding: 9px 15px; gap: 12px; border-bottom: 1px solid var(--border); }
    .window-dots { display: flex; gap: 5px; flex: 0 0 auto; }
    .window-dots span { width: 7px; height: 7px; border: 1px solid #d0d7d3; border-radius: 50%; }
    .current-url { min-width: 0; flex: 1; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
    .live-label { display: flex; align-items: center; gap: 5px; font-size: 10px; white-space: nowrap; color: var(--muted); }
    .live-label[data-connected="true"] { color: var(--accent); }
    .live-label[data-connected="true"] .dot { background: var(--accent); }
    .browser-content { flex: 1; min-height: 0; position: relative; background: #fafcfb; }
    iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--surface); }
    iframe[data-interactive="false"] { pointer-events: none; }
    .browser-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 28px; }
    .browser-empty-inner { max-width: 350px; }
    .empty-illustration { width: 116px; height: 82px; border: 1.5px solid #c9d8ce; border-radius: 9px; margin: 0 auto 25px; background: #fff; box-shadow: 12px 12px 0 #eaf0ec; position: relative; }
    .empty-illustration::before { content: ""; position: absolute; top: 16px; left: 0; right: 0; height: 1px; background: var(--border); }
    .empty-illustration svg { width: 25px; height: 25px; position: absolute; top: 37px; left: 44px; color: #65917d; }
    .browser-empty h3 { margin: 0 0 8px; font-size: 17px; font-weight: 550; }
    .browser-empty p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
    .browser-footer { min-height: 22px; display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
    .view-permission { display: flex; align-items: center; gap: 6px; }
    .view-permission svg { width: 13px; height: 13px; }
    .metric-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
    .metric-strip .lagging { color: var(--warning); }
    .connection-note { min-height: 19px; font-size: 11px; color: var(--muted); text-align: right; }
    @media (min-width: 1600px) { .workspace { grid-template-columns: minmax(380px, 430px) minmax(0, 1fr); } .browser-panel { padding: 26px 32px 20px; } }
    @media (max-width: 1023px) { .workspace { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); } .browser-panel { padding: 18px 16px 12px; } .brand-sub { display: none; } .header-right { gap: 8px; } }
    @media (max-width: 760px) {
      body { font-size: 16px; }
      .app { height: auto; min-height: 100dvh; }
      .app-header { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
      .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
      .brand-logo { width: 120px; }
      .brand h1 { padding-left: 0; border-left: 0; }
      h1 { font-size: 16px; } .session-label { display: none; } #end { font-size: 12px; padding: 8px; }
      .workspace { display: flex; flex-direction: column; min-height: auto; }
      .chat-panel { border-right: 0; border-bottom: 1px solid var(--border); min-height: 450px; max-height: 75dvh; }
      .panel-heading { padding: 16px 18px 12px; } .eyebrow { display: none; } .feed { padding: 18px; min-height: 130px; }
      .welcome { padding: 2px 0 8px; } .welcome-icon { display: none; } .welcome h2 { font-size: 21px; }
      .suggestions { margin-top: 14px; gap: 8px; } .suggestion { min-height: 44px; padding: 10px 12px; }
      .composer { padding: 12px 16px max(15px, env(safe-area-inset-bottom)); }
      textarea, .url-settings input { font-size: 16px; } .keyboard-hint { display: none; } .composer-bottom { justify-content: flex-end; }
      #send { min-height: 44px; min-width: 78px; } .browser-panel { padding: 17px 12px 20px; min-height: 57dvh; }
      .browser-card { min-height: 350px; } .browser-actions { gap: 6px; } .browser-actions button { min-height: 44px; padding: 8px 10px; }
      .browser-chrome { padding: 10px; gap: 9px; } .window-dots { display: none; } .connection-note { text-align: left; }
    }
    @media (max-width: 380px) { .browser-heading { align-items: flex-start; } .browser-actions { width: 100%; } .browser-actions button { flex: 1; } .chat-panel { max-height: 85dvh; } }
    @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
  