:root{
      --bg:#FAF9F5;
      --bg-soft:#F5F1E8;
      --panel:#FFFFFF;
      --panel-strong:#FFFFFF;
      --ink:#1F1F1B;
      --muted:#6B6B63;
      --faint:#9A9A90;
      --line:rgba(31,31,27,0.10);
      --line-strong:rgba(31,31,27,0.18);
      --accent:#D97757;
      --accent-hover:#C56646;
      --accent-soft:#F5E6DD;
      --green:#5C8A6B;
      --warn:#B07B3A;
      --err:#B14A3C;
      --radius-sm:6px;
      --radius:10px;
      --radius-lg:14px;
      --shadow-sm:0 1px 2px rgba(31,31,27,0.04);
      --shadow:0 1px 3px rgba(31,31,27,0.06),0 4px 12px rgba(31,31,27,0.04);
      --serif:"Tiempos Headline","Tiempos Text","Source Serif Pro","Noto Serif SC",Georgia,"Songti SC",serif;
      --sans:"Söhne","Inter",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
      --mono:"SFMono-Regular",Menlo,Consolas,monospace;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--ink);
      font-family: var(--sans);
      background: var(--bg);
      overflow: hidden;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    .app {
      position: relative;
      z-index: 1;
      width: min(920px, calc(100vw - 32px));
      height: min(860px, calc(100vh - 32px));
      margin: 16px auto;
      display: grid;
      grid-template-rows: auto 1fr auto;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .topbar {
      height: 78px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 0 22px;
      border-bottom: 1px solid var(--line);
      background: transparent;
    }

    .brand {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .brand-title {
      font-family: var(--serif);
      font-size: 26px;
      letter-spacing: -.055em;
      line-height: 1;
    }

    .brand-sub {
      color: var(--muted);
      font-family: var(--mono);
      font-size: 11px;
      letter-spacing: .13em;
      text-transform: uppercase;
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 0 0 auto;
    }

    button {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: transparent;
      color: var(--ink);
      padding: 10px 15px;
      font: 800 13px/1 var(--sans);
      cursor: pointer;
      transition: background .16s ease, border-color .16s ease;
      white-space: nowrap;
    }

    button:hover {
      background: var(--bg-soft);
      border-color: var(--line-strong);
    }

    .tool-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: transparent;
      color: var(--ink);
      padding: 10px 15px;
      font: 800 13px/1 var(--sans);
      text-decoration: none;
      transition: background .16s ease, border-color .16s ease;
      white-space: nowrap;
    }

    .tool-link:hover {
      background: var(--bg-soft);
      border-color: var(--line-strong);
    }

    button.primary {
      background: var(--accent);
      border-color: var(--accent);
      color: #FFFFFF;
    }

    button.primary:hover {
      background: var(--accent-hover);
      border-color: var(--accent-hover);
    }

    button.soft {
      color: var(--accent);
      border-color: rgba(217,119,87,.25);
      background: var(--accent-soft);
    }

    button.soft:hover {
      background: rgba(217,119,87,.18);
      border-color: var(--accent);
    }

    .chat {
      overflow: auto;
      padding: 34px 28px 120px;
      scroll-behavior: smooth;
    }

    .welcome {
      text-align: center;
      margin: 22px auto 34px;
      max-width: 650px;
    }

    .eyebrow {
      color: var(--accent);
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .16em;
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .welcome h1 {
      margin: 0;
      font-family: var(--serif);
      font-weight: 600;
      font-size: clamp(46px, 8vw, 96px);
      letter-spacing: -.09em;
      line-height: .9;
    }

    .welcome p {
      margin: 14px auto 0;
      color: var(--muted);
      font-size: 18px;
      line-height: 1.6;
      letter-spacing: -.035em;
    }

    .messages {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .msg {
      max-width: 78%;
      animation: rise .28s ease both;
    }

    .msg.user {
      align-self: flex-end;
    }

    .bubble {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      background: var(--panel);
      line-height: 1.7;
      font-size: 15px;
      color: var(--ink);
    }

    .msg.user .bubble {
      background: var(--ink);
      border-color: var(--ink);
      color: #FFFFFF;
    }

    .bubble-title {
      font-weight: 900;
      font-size: 16px;
      margin-bottom: 4px;
    }

    .bubble-muted {
      color: var(--muted);
      font-size: 13px;
    }

    .msg.user .bubble-muted {
      color: rgba(255, 250, 242, .68);
    }

    .suggestions {
      display: grid;
      gap: 10px;
      margin-top: 10px;
    }

    .suggestion {
      display: grid;
      gap: 9px;
      padding: 13px 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--bg-soft);
    }

    .suggestion-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
    }

    .suggestion-title {
      font-weight: 900;
      letter-spacing: -.02em;
    }

    .suggestion-meta {
      color: var(--muted);
      font-size: 12px;
      white-space: nowrap;
    }

    .option-row,
    .type-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .chip {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 10px;
      color: var(--ink);
      background: var(--bg-soft);
      font-size: 12px;
      font-weight: 800;
    }

    .chip.ok {
      color: var(--green);
      border-color: rgba(92,138,107,.28);
      background: rgba(92,138,107,.08);
    }

    .chip.warn {
      color: var(--accent);
      border-color: rgba(217,119,87,.26);
      background: rgba(217,119,87,.08);
    }

    .dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: currentColor;
      opacity: .7;
    }

    .composer-wrap {
      padding: 16px;
      border-top: 1px solid var(--line);
      background: var(--bg-soft);
    }

    .composer {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
      padding: 12px;
      box-shadow: var(--shadow);
    }

    .composer.dragging {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .composer textarea {
      width: 100%;
      min-height: 54px;
      max-height: 120px;
      resize: none;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--ink);
      padding: 6px 8px;
      font: 600 16px/1.55 var(--sans);
    }

    .composer textarea::placeholder {
      color: rgba(17, 17, 15, .42);
    }

    .composer-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 4px 4px 0;
    }

    .engine {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .action-buttons {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    input[type="file"] {
      display: none;
    }

    @keyframes rise {
      from { opacity: 0; transform: translateY(7px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 720px) {
      body { overflow: auto; }
      .app {
        width: 100vw;
        min-height: 100vh;
        height: auto;
        margin: 0;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
      }
      .topbar {
        height: auto;
        padding: 18px;
        align-items: flex-start;
        flex-direction: column;
      }
      .chat {
        padding: 24px 16px 18px;
      }
      .msg {
        max-width: 100%;
      }
      .composer-actions {
        align-items: flex-start;
        flex-direction: column;
      }
      .action-buttons {
        width: 100%;
        justify-content: flex-end;
      }
    }

    /* Minimal workbench mode */
    .app {
      width: min(940px, calc(100vw - 40px));
      height: min(820px, calc(100vh - 40px));
      margin: 20px auto;
      border-radius: var(--radius-lg);
    }

    .topbar {
      height: 86px;
      padding: 0 26px;
      border-bottom-color: var(--line);
    }

    .brand-title {
      font-size: 25px;
    }

    .chat {
      display: grid;
      align-items: center;
      padding: 28px 30px;
    }

    .welcome {
      margin: 0 auto;
    }

    .welcome h1 {
      font-size: clamp(48px, 7.4vw, 86px);
    }

    .welcome p {
      margin-top: 18px;
      font-size: 17px;
    }

    .messages {
      width: 100%;
      max-width: 760px;
      margin: 0 auto;
      display: block;
    }

    .workspace-panel {
      width: 100%;
      display: grid;
      gap: 18px;
      animation: rise .24s ease both;
    }

    .workspace-panel.has-runnable .result-card:first-of-type {
      border-color: rgba(217, 119, 87, .42);
      box-shadow: 0 24px 70px rgba(32,28,24,.08), 0 0 0 1px rgba(217,119,87,.12);
    }

    .file-strip {
      width: min(860px, 100%);
      margin: 0 auto;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
      align-items: center;
    }

    .file-pill {
      max-width: min(100%, 340px);
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-height: 42px;
      border: 1px solid rgba(217,119,87,.28);
      border-radius: var(--radius);
      padding: 9px 13px;
      background: transparent;
      color: var(--ink);
      font-size: 13px;
      font-weight: 800;
      box-shadow: var(--shadow-sm);
    }

    .file-pill::before {
      content: "";
      width: 6px;
      height: 6px;
      flex: 0 0 auto;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 0 3px rgba(91,137,104,.10);
    }

    .file-pill span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .file-pill small {
      color: var(--muted);
      font: 800 11px/1 var(--sans);
      white-space: nowrap;
    }

    .file-pill.warn {
      border-color: rgba(217,119,87,.46);
      background: transparent;
      color: var(--accent);
    }

    .file-pill.warn::before {
      background: var(--accent);
      box-shadow: 0 0 0 3px rgba(217,119,87,.10);
    }

    .purpose-switch { display: flex; justify-content: center; margin-top: 10px; }
    button.ghost-tool {
      color: var(--muted);
      border-color: var(--line);
      background: transparent;
      font-weight: 600;
    }

    button.ghost-tool:hover {
      color: var(--accent);
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .result-list {
      display: grid;
      gap: 12px;
    }

    .result-card {
      position: relative;
      overflow: hidden;
      text-align: center;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 36px 38px;
      background: var(--panel);
      box-shadow: var(--shadow);
    }

    .result-card.secondary {
      padding: 24px 28px;
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-sm);
      background: var(--bg-soft);
    }

    .result-card.selected {
      border-color: var(--accent);
    }

    .result-status {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 14px;
      color: var(--muted);
      font: 900 12px/1 var(--mono);
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--muted);
    }

    .status-dot.ok {
      background: var(--green);
    }

    .status-dot.warn {
      background: var(--accent);
    }

    .result-card h2 {
      margin: 0;
      font-family: var(--serif);
      font-size: clamp(42px, 6vw, 72px);
      font-weight: 600;
      letter-spacing: -.09em;
      line-height: .95;
    }

    .result-card.secondary h2 {
      font-size: clamp(30px, 4vw, 44px);
    }

    .setup-business-choices { flex-wrap: wrap; gap: 12px; margin: 24px 0; }
    .setup-business-choices button { white-space: normal; }
    .deposit-date-control { margin: 22px 0; }
    .deposit-date-control input { padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; }
    .deposit-daily { margin: 20px 0; text-align: left; }
    .deposit-daily summary { cursor: pointer; font-weight: 600; }

    .result-card p {
      max-width: 560px;
      margin: 16px auto 0;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.65;
      letter-spacing: -.02em;
    }

    .intent-warnings {
      max-width: 600px;
      margin: 14px auto 0;
      color: var(--accent);
      font-size: 13px;
      line-height: 1.55;
      letter-spacing: 0;
    }

    details.intent-details {
      width: fit-content;
      max-width: min(640px, 100%);
      margin: 14px auto 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
      text-align: left;
    }

    details.intent-details summary {
      width: fit-content;
      margin: 0 auto;
      cursor: pointer;
      user-select: none;
      font: 800 12px/1 var(--mono);
      letter-spacing: .08em;
      color: var(--muted);
    }

    details.intent-details summary:hover {
      color: var(--accent);
    }

    details.intent-details:not([open]) .intent-detail-panel {
      display: none;
    }

    .intent-detail-panel {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--line);
      display: grid;
      gap: 8px;
    }

    .intent-detail-title {
      color: var(--muted);
      font-weight: 800;
    }

    .intent-detail ul {
      margin: 4px 0 0;
      padding-left: 18px;
    }

    .action-row {
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 24px;
    }

    .action-row button {
      min-width: 132px;
      padding: 13px 18px;
    }

    .run-state {
      margin: 22px auto 0;
      max-width: 650px;
      display: grid;
      gap: 14px;
    }

    .run-metrics {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .run-metric {
      flex: 1 1 auto;
      min-width: 100px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 13px 14px;
      background: var(--bg-soft);
      text-align: left;
    }

    .run-metric span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      margin-bottom: 7px;
    }

    .run-metric strong {
      display: block;
      font-family: var(--serif);
      font-size: 30px;
      line-height: .95;
      letter-spacing: -.06em;
    }

    .run-note {
      color: var(--ink);
      font-size: 14px;
      font-weight: 600;
      line-height: 1.6;
    }

    .run-error {
      margin: 10px 0 12px;
      text-align: left;
      line-height: 1.6;
      color: var(--err);
      border: 1px solid rgba(177,74,60,.25);
      border-radius: var(--radius-lg);
      padding: 13px 14px;
      background: rgba(177,74,60,.08);
      font-size: 13px;
      font-weight: 800;
    }

    .result-table-wrap {
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
    }
    .result-table-wrap table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }
    .result-table-wrap caption {
      text-align: left;
      padding: 10px 14px 0;
      color: var(--muted);
      font-size: 11px;
    }
    .result-table-wrap th {
      text-align: left;
      padding: 10px 14px;
      background: var(--bg-soft);
      font-weight: 800;
      color: var(--muted);
      white-space: nowrap;
      border-bottom: 1px solid var(--line);
    }
    .result-table-wrap td {
      padding: 8px 14px;
      border-bottom: 1px solid var(--line);
      max-width: 240px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .result-table-wrap tr:last-child td {
      border-bottom: none;
    }
    .result-panel-html {
      font-size: 13px;
      line-height: 1.7;
      color: var(--muted);
    }
    .ops-subcard {
      margin-bottom: 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      background: var(--bg);
    }
    .ops-subcard-hd {
      font-weight: 700;
      font-size: 14px;
      padding: 10px 14px;
      background: var(--bg-soft);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .ops-subcard-bd {
      padding: 10px 14px;
      overflow-x: auto;
    }
    .mini-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    .mini-table th {
      font-weight: 700;
      text-align: left;
      padding: 6px 8px;
      border-bottom: 2px solid var(--border);
      white-space: nowrap;
    }
    .mini-table td {
      padding: 5px 8px;
      border-bottom: 1px solid var(--border-subtle);
      white-space: nowrap;
    }
    .svs-red {
      background: #FEE7E7;
      font-weight: 600;
      color: #B03030;
    }
    .svs-green {
      background: #E7F6EA;
      font-weight: 600;
      color: #1A7A3A;
    }
    .badge.warn {
      display: inline-block;
      padding: 1px 7px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 700;
      background: #FBE8E0;
      color: #B45F06;
    }
    .muted {
      color: var(--muted);
      font-style: italic;
    }
    .date-tag {
      display: inline-block;
      padding: 2px 8px;
      margin: 2px;
      border-radius: 4px;
      background: var(--bg-soft);
      font-size: 12px;
      font-weight: 600;
      color: var(--ink);
    }
    .confirm-block {
      display: grid;
      gap: 10px;
      border: 1px solid rgba(217,119,87,.25);
      border-radius: var(--radius-lg);
      padding: 14px;
      background: var(--accent-soft);
    }

    .confirm-row {
      display: grid;
      gap: 10px;
      color: var(--ink);
      font-size: 13px;
      font-weight: 800;
    }

    .composer-wrap {
      padding: 18px 20px 22px;
      background: var(--bg-soft);
    }

    .composer {
      width: min(820px, 100%);
      margin: 0 auto;
      border-radius: var(--radius-lg);
      padding: 14px 16px;
      box-shadow: var(--shadow);
    }

    .composer textarea {
      min-height: 38px;
      max-height: 68px;
      padding: 2px 4px;
      font-size: 16px;
    }

    .composer-actions {
      padding-top: 8px;
    }

    @media (max-width: 720px) {
      .app {
        width: 100vw;
        height: auto;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
      }

      .chat {
        min-height: 54vh;
        padding: 24px 18px;
      }

      .result-card {
        padding: 30px 22px;
      }

      .composer {
        border-radius: 24px;
      }
    }

    /* Refined single-entry shell */
    .app {
      width: 100vw;
      height: 100vh;
      min-height: 100vh;
      margin: 0;
      border: 0;
      border-radius: 0;
      grid-template-rows: auto 1fr;
      background: transparent;
      box-shadow: none;
      backdrop-filter: none;
      overflow: hidden;
    }

    .topbar {
      height: 78px;
      padding: 0 34px;
      border-bottom: 1px solid var(--line);
      background: transparent;
    }

    .brand-title {
      font-size: 24px;
      letter-spacing: -.06em;
    }

    .brand-sub {
      letter-spacing: .16em;
    }

    .top-actions button,
    .top-actions .tool-link {
      min-width: 74px;
      height: 44px;
      padding: 0 18px;
      background: transparent;
    }

    .chat {
      position: relative;
      min-height: calc(100vh - 78px);
      display: grid;
      align-items: center;
      padding: 68px 32px 168px;
      overflow: auto;
    }

    .welcome {
      margin: 0 auto;
      transform: translateY(-28px);
    }

    .welcome h1 {
      font-size: clamp(74px, 10vw, 132px);
      letter-spacing: -.105em;
    }

    .welcome p {
      margin-top: 24px;
      font-size: clamp(18px, 2vw, 28px);
      letter-spacing: -.04em;
    }

    .messages {
      width: min(920px, calc(100vw - 96px));
      max-width: 920px;
      margin: 0 auto;
    }

    .workspace-panel {
      gap: 18px;
    }

    .result-card {
      max-width: 880px;
      margin: 0 auto;
      padding: 44px 48px;
      border-radius: var(--radius-lg);
      background: var(--panel);
      box-shadow: var(--shadow);
    }

    .result-card.secondary {
      max-width: 820px;
      background: var(--bg-soft);
    }

    .result-card h2 {
      font-size: clamp(50px, 7.2vw, 92px);
    }

    .result-card.secondary h2 {
      font-size: clamp(34px, 4.4vw, 52px);
    }

    .guide-panel {
      width: 100%;
    }

    .guide-card {
      padding: 46px 38px 40px;
      overflow: visible;
    }

    .guide-card h2 {
      font-size: clamp(38px, 5vw, 58px);
      line-height: 1;
      margin-bottom: 16px;
    }

    .guide-setup-notice {
      margin: 0 0 18px;
      padding: 11px 13px;
      border: 1px solid rgba(92,138,107,.22);
      border-left: 3px solid var(--green);
      border-radius: 7px;
      background: rgba(92,138,107,.07);
      color: var(--ink);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.65;
    }

    .guide-list {
      display: grid;
      gap: 10px;
      text-align: left;
    }

    .guide-item {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 12px 14px;
      background: var(--panel);
    }

    .guide-item-title {
      font-weight: 800;
      font-size: 14px;
      margin-bottom: 4px;
    }

    .guide-item-purpose {
      max-width: 720px;
      margin: 0 0 8px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.65;
    }

    .guide-item-files {
      font-size: 13px;
      color: var(--ink);
      margin-bottom: 2px;
      line-height: 1.8;
    }

    .guide-file {
      display: inline-block;
      background: var(--bg-soft);
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 2px 10px;
      font-weight: 600;
      font-size: 12px;
      cursor: pointer;
      transition: background .15s, border-color .15s;
    }

    .guide-file:hover {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    .guide-file-path {
      font-size: 12px;
      color: var(--ink);
      line-height: 1.7;
      font-weight: 700;
      padding: 9px 11px;
      margin: 7px 0;
      background: var(--accent-soft);
      border-radius: 6px;
      border-left: 3px solid var(--accent);
    }

    .guide-action-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 9px;
      margin-top: 12px;
    }

    .guide-action-button {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      width: 100%;
      padding: 10px 14px;
      border: 1px solid var(--line-strong);
      border-radius: 7px;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.35;
      cursor: pointer;
      white-space: normal;
      transition: background .15s, border-color .15s, color .15s;
    }

    .guide-action-button.export {
      border-color: rgba(217,119,87,.42);
      background: var(--accent-soft);
      color: var(--accent-hover);
    }

    .guide-action-button.export:hover {
      border-color: var(--accent);
      background: rgba(217,119,87,.18);
    }

    .guide-action-button.report {
      background: var(--panel);
      color: var(--ink);
    }

    .guide-action-button.report:hover {
      border-color: var(--line-strong);
      background: var(--bg-soft);
    }

    .guide-export-detail {
      margin-top: 12px;
      border-top: 1px solid var(--line);
      padding-top: 14px;
    }

    .guide-export-card {
      overflow: hidden;
      margin-top: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--bg-soft);
    }

    .guide-export-head {
      display: grid;
      gap: 10px;
      padding: 14px;
      border-bottom: 1px solid var(--line);
      background: var(--panel);
    }

    .guide-export-title {
      font-size: 13px;
      font-weight: 900;
    }

    .guide-route {
      display: flex;
      align-items: stretch;
      flex-wrap: wrap;
      gap: 7px;
    }

    .guide-route-step {
      display: inline-flex;
      align-items: center;
      min-height: 34px;
      padding: 7px 10px;
      border: 1px solid rgba(217,119,87,.30);
      border-radius: 6px;
      background: var(--accent-soft);
      color: var(--ink);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.35;
    }

    .guide-route-arrow {
      display: inline-grid;
      place-items: center;
      color: var(--accent);
      font-size: 14px;
      font-weight: 900;
    }

    .guide-export-body {
      display: grid;
      grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
      gap: 0;
    }

    .guide-export-steps {
      padding: 15px;
      border-right: 1px solid var(--line);
      background: var(--panel);
    }

    .guide-export-step {
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr);
      gap: 8px;
      align-items: start;
      margin-bottom: 11px;
      color: var(--ink);
      font-size: 12px;
      line-height: 1.6;
    }

    .guide-export-step:last-child {
      margin-bottom: 0;
    }

    .guide-export-step-number {
      display: grid;
      place-items: center;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-size: 10px;
      font-weight: 900;
    }

    .guide-export-note {
      margin-top: 12px;
      padding: 9px 10px;
      border: 1px solid rgba(92,138,107,.20);
      border-radius: 6px;
      background: rgba(92,138,107,.08);
      color: var(--green);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.55;
    }

    .guide-export-screen-link {
      display: grid;
      align-items: center;
      padding: 14px;
      color: inherit;
      text-decoration: none;
      background: #ece9e2;
    }

    .guide-export-screen {
      position: relative;
      overflow: hidden;
      width: 100%;
      border: 1px solid var(--line-strong);
      background: #e7e4dd;
      box-shadow: 0 5px 16px rgba(31,31,27,.08);
    }

    .guide-export-screen img {
      display: block;
      width: 100%;
      height: auto;
    }

    .guide-screen-mark {
      position: absolute;
      border: 2px solid var(--accent);
      background: rgba(217,119,87,.09);
      pointer-events: none;
    }

    .guide-screen-pin {
      position: absolute;
      display: grid;
      place-items: center;
      width: 23px;
      height: 23px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-size: 10px;
      font-weight: 900;
      box-shadow: 0 2px 7px rgba(31,31,27,.22);
      pointer-events: none;
    }

    .guide-screen-mark.f5 { left:81.7%; top:85.3%; width:16.5%; height:12.3%; }
    .guide-screen-pin.f5 { left:78.6%; top:82%; }
    .guide-screen-mark.date { left:23.5%; top:16.4%; width:74.2%; height:12.2%; }
    .guide-screen-pin.date { left:20.4%; top:13.2%; }
    .guide-screen-mark.line-status { left:30.4%; top:38.1%; width:58%; height:5.3%; }
    .guide-screen-pin.line-status { left:27%; top:35%; }
    .guide-screen-mark.layaway-menu { left:6.1%; top:22.8%; width:87.7%; height:8.5%; }
    .guide-screen-pin.layaway-menu { left:3%; top:19.7%; }
    .guide-screen-mark.enter { left:49.8%; top:85.8%; width:16%; height:11.4%; }
    .guide-screen-pin.enter { left:46.5%; top:82.5%; }
    .guide-screen-mark.movement { left:23.4%; top:41%; width:74.4%; height:4.3%; }
    .guide-screen-pin.movement { left:20.2%; top:37.8%; }

    .guide-export-zoom-hint {
      margin-top: 7px;
      color: var(--muted);
      font-size: 10px;
      text-align: right;
    }

    .guide-detail {
      margin-top: 10px;
      padding-top: 11px;
      border-top: 1px solid var(--line);
    }

    .guide-detail[hidden] {
      display: none;
    }

    .guide-detail-label {
      margin-bottom: 7px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .08em;
    }

    .guide-output-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 10px;
    }

    .guide-output {
      display: inline-block;
      padding: 4px 8px;
      border: 1px solid var(--line);
      border-radius: 5px;
      background: var(--bg-soft);
      color: var(--muted);
      font-size: 10px;
      line-height: 1.25;
    }

    .guide-output:first-child {
      border-color: rgba(221, 119, 84, .42);
      background: var(--accent-soft);
      color: var(--accent);
      font-weight: 800;
    }

    .guide-example + .guide-example {
      margin-top: 9px;
    }

    .guide-example-title {
      margin-bottom: 5px;
      color: var(--ink);
      font-size: 11px;
      font-weight: 800;
    }

    .guide-example-scroll {
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
    }

    .guide-example-table {
      width: 100%;
      min-width: 560px;
      border-collapse: collapse;
      table-layout: auto;
    }

    .guide-example-table th,
    .guide-example-table td {
      padding: 7px 8px;
      border-right: 1px solid var(--line);
      text-align: left;
      white-space: nowrap;
      font-size: 10px;
      line-height: 1.4;
    }

    .guide-example-table th:last-child,
    .guide-example-table td:last-child {
      border-right: 0;
    }

    .guide-example-table th {
      background: var(--accent-soft);
      font-weight: 800;
    }

    .guide-example-table tbody tr:nth-child(even) td {
      background: var(--bg-soft);
    }

    .guide-example-note {
      margin-top: 6px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.55;
    }

    .guide-catalog-card {
      display: grid;
      grid-template-columns: 126px minmax(0, 1fr);
      gap: 22px;
      align-items: stretch;
      padding: 20px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
    }

    .guide-catalog-image {
      display: grid;
      place-items: center;
      min-height: 126px;
      border: 1px solid var(--line-strong);
      background: var(--bg-soft);
      color: var(--muted);
      font-size: 12px;
    }

    .guide-catalog-info {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px 28px;
      align-content: center;
    }

    .guide-catalog-field {
      min-width: 0;
    }

    .guide-catalog-label {
      display: block;
      margin-bottom: 5px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
    }

    .guide-catalog-value {
      color: var(--ink);
      font-size: 13px;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }

    .guide-card .file-strip {
      max-width: 760px;
      margin: 26px auto 0;
      gap: 10px;
    }

    .guide-card .file-pill {
      max-width: 100%;
      padding: 10px 16px;
      font-size: 14px;
      box-shadow: none;
    }

    .composer-wrap {
      position: absolute;
      left: 50%;
      top: clamp(560px, 52vh, 620px);
      bottom: auto;
      z-index: 5;
      width: auto;
      padding: 0;
      border: 0;
      background: transparent;
      transform: translateX(-50%);
      transition: bottom .28s ease, transform .28s ease;
    }

    .app.has-files .composer-wrap,
    .app.guide-open .composer-wrap {
      top: auto;
      bottom: 34px;
    }

    .composer {
      width: auto;
      min-width: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin: 0;
      padding: 8px;
      border-radius: var(--radius-lg);
      background: var(--panel);
      box-shadow: var(--shadow);
    }

    .composer.dragging {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .composer textarea,
    .engine {
      display: none;
    }

    .composer-actions {
      display: block;
      padding: 0;
    }

    .action-buttons {
      gap: 8px;
      flex-wrap: nowrap;
    }

    .action-buttons button {
      height: 48px;
      min-width: 94px;
      padding: 0 24px;
      font-size: 14px;
    }

    .action-buttons button.soft {
      background: var(--accent-soft);
    }

    @media (max-width: 720px) {
      body {
        overflow: hidden;
      }

      .topbar {
        height: 76px;
        padding: 0 18px;
        flex-direction: row;
        align-items: center;
      }

      .brand-title {
        font-size: 22px;
      }

      .chat {
        min-height: calc(100vh - 76px);
        padding: 38px 18px 148px;
      }

      .welcome {
        transform: translateY(-18px);
      }

      .messages {
        width: calc(100vw - 36px);
      }

      .workspace-panel, .result-list, .result-card, .file-strip { min-width: 0; max-width: 100%; }
      .result-card { width: 100%; }
      .file-pill { min-width: 0; max-width: 100%; }
      .setup-business-choices { flex-direction: column; align-items: stretch; }
      .setup-business-choices button { min-width: 0; width: 100%; }
      .result-card h2 { overflow-wrap: anywhere; }

      .result-card,
      .guide-card {
        padding: 34px 22px;
        border-radius: 30px;
      }

      .result-card h2 {
        font-size: clamp(44px, 16vw, 70px);
      }

      .guide-card h2 {
        font-size: clamp(34px, 11vw, 48px);
        margin-bottom: 14px;
      }

      .guide-setup-notice {
        margin-bottom: 16px;
        padding: 10px 12px;
        font-size: 11px;
      }

      .guide-catalog-card {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
        padding: 12px;
      }

      .guide-catalog-image {
        min-height: 92px;
      }

      .guide-catalog-info {
        gap: 12px 16px;
      }

      .guide-export-body {
        grid-template-columns: 1fr;
      }

      .guide-export-steps {
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }

      .guide-route {
        display: grid;
        grid-template-columns: 1fr;
      }

      .guide-route-step {
        width: 100%;
      }

      .guide-route-arrow {
        min-height: 12px;
        transform: rotate(90deg);
      }

      .guide-export-screen-link {
        padding: 10px;
      }

      .composer-wrap {
        top: 58vh;
        bottom: auto;
      }

      .app.has-files .composer-wrap,
      .app.guide-open .composer-wrap {
        top: auto;
        bottom: 20px;
      }

      .action-buttons button {
        min-width: 82px;
        padding: 0 18px;
      }
    }

    /* ==================== 配置中心 ==================== */
    .config-overlay {
      position: fixed;
      inset: 0;
      z-index: 100;
      background: rgba(31,31,27,.42);
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding: 22px 16px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .config-overlay.open {
      display: flex;
    }
    .config-panel {
      width: min(800px, 100%);
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 30px 32px 36px;
      margin-bottom: 40px;
      animation: rise .2s ease both;
    }
    .config-panel-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 22px;
    }
    .config-panel-header h2 {
      margin: 0;
      font-family: var(--serif);
      font-size: 28px;
      letter-spacing: -.05em;
      line-height: 1;
    }
    .config-panel-header .subtitle {
      color: var(--muted);
      font-size: 12px;
      margin-top: 4px;
    }
    .config-close {
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 24px;
      cursor: pointer;
      padding: 4px 8px;
      line-height: 1;
    }
    .config-close:hover {
      color: var(--ink);
    }
    .config-section {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      margin-bottom: 12px;
      overflow: hidden;
    }
    .config-section summary {
      padding: 13px 16px;
      font-weight: 800;
      font-size: 14px;
      cursor: pointer;
      background: var(--bg-soft);
      user-select: none;
      letter-spacing: -.01em;
      border-bottom: 1px solid transparent;
    }
    .config-section[open] > summary {
      border-bottom-color: var(--line);
    }
    .config-section summary:hover {
      background: var(--accent-soft);
    }
    .config-section-body {
      padding: 16px;
      display: grid;
      gap: 14px;
    }
    .cfg-hint {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.55;
    }
    .cfg-textarea {
      width: 100%;
      min-height: 110px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      font: 12px/1.55 var(--mono);
      color: var(--ink);
      background: var(--bg);
      resize: vertical;
    }
    .cfg-textarea:focus {
      outline: 0;
      border-color: var(--accent);
    }
    .cfg-input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 8px 10px;
      font: 12px/1.4 var(--mono);
      color: var(--ink);
      background: var(--bg);
    }
    .cfg-input:focus {
      outline: 0;
      border-color: var(--accent);
    }
    .cfg-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }
    .cfg-actions button {
      font-size: 12px;
      padding: 8px 14px;
    }
    .cfg-link-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      padding: 8px 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--panel);
      color: var(--ink);
      font-size: 12px;
      font-weight: 800;
      text-decoration: none;
    }
    .cfg-link-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }
    .cfg-label {
      font-weight: 800;
      font-size: 13px;
      margin-bottom: 4px;
      letter-spacing: -.01em;
    }
    .cfg-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .cfg-col {
      display: grid;
      gap: 6px;
    }
    .cfg-kpi-row {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
      padding: 12px 16px;
      background: var(--bg-soft);
      border-radius: var(--radius);
      border: 1px solid var(--line);
    }
    .cfg-kpi-item {
      display: grid;
      gap: 2px;
      min-width: 80px;
    }
    .cfg-kpi-item .kpi-k {
      font-size: 11px;
      color: var(--muted);
      font-weight: 800;
    }
    .cfg-kpi-item .kpi-v {
      font-family: var(--serif);
      font-size: 26px;
      letter-spacing: -.04em;
      line-height: 1;
    }
    .cfg-upload-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .cfg-demo-trigger {
      width: 100%;
      min-height: 42px;
      margin-top: 4px;
      border: 1px solid rgba(217,119,87,.38);
      border-radius: 7px;
      padding: 10px 14px;
      background: var(--accent-soft);
      color: var(--accent-hover);
      font-size: 13px;
      font-weight: 900;
      box-shadow: none;
    }
    .cfg-demo-trigger:hover {
      border-color: var(--accent);
      background: rgba(217,119,87,.18);
      color: var(--accent-hover);
    }
    .cfg-demo-panel {
      margin-top: 4px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel);
      overflow: hidden;
    }
    .cfg-demo-panel[hidden] {
      display: none;
    }
    .cfg-demo-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
    }
    .cfg-demo-title {
      font-size: 12px;
      font-weight: 800;
    }
    .cfg-demo-close {
      width: 28px;
      height: 28px;
      padding: 0;
      border: 0;
      color: var(--muted);
      font-size: 20px;
      line-height: 1;
    }
    .cfg-demo-timeline {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      padding: 10px 12px 0;
    }
    .cfg-demo-step {
      min-width: 0;
      color: var(--faint);
      font-size: 10px;
      font-weight: 800;
      text-align: center;
      transition: color .2s ease;
    }
    .cfg-demo-step::before {
      content: "";
      display: block;
      width: 7px;
      height: 7px;
      margin: 0 auto 5px;
      border-radius: 50%;
      background: var(--line-strong);
      transition: background .2s ease, box-shadow .2s ease;
    }
    .cfg-demo-step.active {
      color: var(--ink);
    }
    .cfg-demo-step.active::before {
      background: var(--accent);
      box-shadow: 0 0 0 3px rgba(217,119,87,.12);
    }
    .cfg-demo-canvas {
      position: relative;
      min-height: 194px;
      margin: 10px 12px 0;
      padding: 48px 10px 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--bg-soft);
      overflow: hidden;
    }
    .cfg-demo-actions {
      position: absolute;
      top: 10px;
      left: 10px;
      right: 10px;
      display: flex;
      justify-content: space-between;
      gap: 8px;
    }
    .cfg-demo-fake-btn {
      min-width: 0;
      padding: 7px 9px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--panel);
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      transition: border-color .2s ease, color .2s ease, background .2s ease;
    }
    .cfg-demo-panel[data-stage="download"] [data-demo-target="download"],
    .cfg-demo-panel[data-stage="upload"] [data-demo-target="upload"] {
      border-color: var(--accent);
      background: var(--accent-soft);
      color: var(--accent);
    }
    .cfg-demo-sheet {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--panel);
      overflow: hidden;
      opacity: .42;
      transform: translateY(5px);
      transition: opacity .25s ease, transform .25s ease;
    }
    .cfg-demo-panel[data-stage="edit"] .cfg-demo-sheet,
    .cfg-demo-panel[data-stage="upload"] .cfg-demo-sheet,
    .cfg-demo-panel[data-stage="success"] .cfg-demo-sheet,
    .cfg-demo-panel[data-reduced="true"] .cfg-demo-sheet {
      opacity: 1;
      transform: translateY(0);
    }
    .cfg-demo-grid {
      display: grid;
      grid-template-columns: minmax(90px, .85fr) minmax(120px, 1.15fr);
    }
    [data-config-demo-panel="owners"] .cfg-demo-grid {
      grid-template-columns: minmax(150px, 1.35fr) minmax(80px, .65fr);
    }
    .cfg-demo-cell {
      min-width: 0;
      padding: 7px 8px;
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      color: var(--ink);
      font: 10px/1.35 var(--mono);
      overflow-wrap: anywhere;
    }
    .cfg-demo-cell:nth-child(2n) {
      border-right: 0;
    }
    .cfg-demo-cell:nth-last-child(-n+2) {
      border-bottom: 0;
    }
    .cfg-demo-cell.head {
      background: var(--accent-soft);
      font-family: var(--sans);
      font-weight: 800;
    }
    .cfg-demo-success {
      position: absolute;
      left: 50%;
      bottom: 20px;
      width: max-content;
      max-width: calc(100% - 24px);
      padding: 9px 12px;
      border: 1px solid rgba(92,138,107,.3);
      border-radius: var(--radius-sm);
      background: var(--panel);
      color: var(--green);
      font-size: 11px;
      font-weight: 800;
      opacity: 0;
      transform: translate(-50%, 6px);
      transition: opacity .22s ease, transform .22s ease;
      box-shadow: var(--shadow-sm);
    }
    .cfg-demo-panel[data-stage="success"] .cfg-demo-success,
    .cfg-demo-panel[data-reduced="true"] .cfg-demo-success {
      opacity: 1;
      transform: translate(-50%, 0);
    }
    .cfg-demo-cursor {
      position: absolute;
      z-index: 3;
      width: 14px;
      height: 14px;
      border: 3px solid var(--panel);
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 1px 5px rgba(31,31,27,.28);
      pointer-events: none;
      transition: left .42s ease, right .42s ease, top .42s ease, opacity .2s ease;
    }
    .cfg-demo-panel[data-stage="download"] .cfg-demo-cursor {
      top: 17px;
      left: 60px;
      right: auto;
      opacity: 1;
    }
    .cfg-demo-panel[data-stage="edit"] .cfg-demo-cursor {
      top: 92px;
      left: calc(50% - 7px);
      right: auto;
      opacity: 1;
    }
    .cfg-demo-panel[data-stage="upload"] .cfg-demo-cursor {
      top: 17px;
      left: auto;
      right: 52px;
      opacity: 1;
    }
    .cfg-demo-panel[data-stage="success"] .cfg-demo-cursor,
    .cfg-demo-panel[data-reduced="true"] .cfg-demo-cursor {
      opacity: 0;
    }
    .cfg-demo-controls {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      padding: 9px 12px 11px;
    }
    .cfg-demo-controls button {
      padding: 6px 9px;
      border-radius: var(--radius-sm);
      font-size: 10px;
    }
    .cfg-demo-panel[data-reduced="true"] .cfg-demo-timeline {
      padding-bottom: 2px;
    }
    .cfg-demo-panel[data-reduced="true"] .cfg-demo-step {
      color: var(--ink);
    }
    .cfg-demo-panel[data-reduced="true"] .cfg-demo-step::before {
      background: var(--green);
    }
    @media (prefers-reduced-motion: reduce) {
      .cfg-demo-panel *,
      .cfg-demo-panel *::before {
        animation: none !important;
        transition: none !important;
      }
    }
    .cfg-split {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }
    .cfg-split.demo-active {
      grid-template-columns: minmax(0, 1fr);
    }
    .cfg-split.demo-active .cfg-col:not(.demo-source) {
      display: none;
    }
    @media (max-width: 600px) {
      .cfg-split {
        grid-template-columns: 1fr;
      }
      .cfg-row {
        grid-template-columns: 1fr;
      }
      .cfg-demo-canvas {
        min-height: 202px;
      }
      .cfg-demo-grid {
        grid-template-columns: minmax(82px, .8fr) minmax(110px, 1.2fr);
      }
      [data-config-demo-panel="owners"] .cfg-demo-grid {
        grid-template-columns: minmax(124px, 1.35fr) minmax(64px, .65fr);
      }
    }

    /* ==================== 问题反馈 ==================== */
    .feedback-overlay {
      box-sizing: border-box;
      position: fixed;
      inset: 0;
      z-index: 110;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding: 22px 16px;
      overflow-y: auto;
      background: rgba(31,31,27,.42);
      -webkit-overflow-scrolling: touch;
    }
    .feedback-overlay *,
    .feedback-overlay *::before,
    .feedback-overlay *::after {
      box-sizing: border-box;
    }
    .feedback-overlay.open {
      display: flex;
    }
    .feedback-panel {
      width: min(680px, calc(100vw - 32px));
      margin-bottom: 40px;
      padding: 28px 30px 30px;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
      box-shadow: var(--shadow);
      animation: rise .2s ease both;
    }
    .feedback-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 22px;
    }
    .feedback-header h2 {
      margin: 0;
      font-family: var(--serif);
      font-size: 30px;
      line-height: 1;
      letter-spacing: -.055em;
    }
    .feedback-subtitle {
      margin-top: 6px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
    }
    .feedback-close {
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 24px;
      line-height: 1;
      padding: 4px 8px;
    }
    .feedback-close:hover {
      color: var(--ink);
      background: transparent;
    }
    .feedback-form {
      display: grid;
      gap: 16px;
    }
    .feedback-field {
      display: grid;
      gap: 8px;
    }
    .feedback-field label {
      color: var(--ink);
      font-size: 13px;
      font-weight: 900;
    }
    .feedback-field select,
    .feedback-field textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--bg-soft);
      color: var(--ink);
      font: 700 14px/1.5 var(--sans);
      outline: none;
    }
    .feedback-field select {
      height: 44px;
      padding: 0 12px;
    }
    .feedback-field textarea {
      min-height: 88px;
      resize: vertical;
      padding: 12px;
    }
    .feedback-field select:focus,
    .feedback-field textarea:focus {
      border-color: rgba(217,119,87,.55);
      box-shadow: 0 0 0 3px rgba(217,119,87,.10);
    }
    .feedback-upload-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .feedback-upload {
      display: grid;
      gap: 8px;
      min-height: 112px;
      padding: 14px;
      border: 1px dashed rgba(31,31,27,.24);
      border-radius: var(--radius);
      background: var(--bg-soft);
    }
    .feedback-upload strong {
      font-size: 13px;
      line-height: 1.4;
    }
    .feedback-upload span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }
    .feedback-upload button {
      width: fit-content;
      min-width: 88px;
      padding: 8px 11px;
      border-radius: var(--radius-sm);
      font-size: 12px;
    }
    .feedback-file-list {
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }
    .feedback-file-list b {
      color: var(--ink);
      font-weight: 800;
    }
    .feedback-current {
      padding: 11px 12px;
      border: 1px solid rgba(92,138,107,.22);
      border-radius: var(--radius);
      background: rgba(92,138,107,.07);
      color: var(--muted);
      font-size: 12px;
      line-height: 1.6;
    }
    .feedback-current strong {
      color: var(--ink);
    }
    .feedback-contact {
      display: grid;
      grid-template-columns: 170px 1fr;
      gap: 16px;
      align-items: center;
      padding: 14px;
      border: 1px solid rgba(217,119,87,.24);
      border-radius: var(--radius);
      background: var(--accent-soft);
    }
    .feedback-qr-placeholder {
      display: grid;
      place-items: center;
      width: 96px;
      height: 96px;
      border: 1px solid rgba(217,119,87,.34);
      border-radius: var(--radius-sm);
      background:
        linear-gradient(90deg, rgba(31,31,27,.08) 1px, transparent 1px),
        linear-gradient(rgba(31,31,27,.08) 1px, transparent 1px),
        var(--panel);
      background-size: 12px 12px;
      color: var(--muted);
      text-align: center;
      font-size: 11px;
      font-weight: 900;
      line-height: 1.35;
    }
    .feedback-qr {
      width: 160px;
      height: auto;
      object-fit: contain;
      border: 1px solid rgba(217,119,87,.34);
      border-radius: var(--radius-sm);
      background: var(--panel);
    }
    .feedback-contact-title {
      color: var(--ink);
      font-size: 14px;
      font-weight: 900;
      margin-bottom: 5px;
    }
    .feedback-contact-text {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
    }
    .feedback-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
      padding-top: 2px;
    }
    .feedback-preview {
      display: none;
      white-space: pre-wrap;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--bg-soft);
      color: var(--muted);
      font: 12px/1.55 var(--mono);
    }
    .feedback-preview.show {
      display: block;
    }
    @media (max-width: 640px) {
      .feedback-panel {
        padding: 24px 20px 24px;
      }
      .feedback-upload-grid,
      .feedback-contact {
        grid-template-columns: 1fr;
      }
      .feedback-qr {
        width: min(100%, 220px);
        justify-self: center;
      }
      .feedback-actions {
        justify-content: stretch;
      }
      .feedback-actions button {
        flex: 1 1 auto;
      }
    }

    .welcome.flow-welcome {
      width: min(1220px, 100%);
      max-width: none;
      height: min(560px, calc(100vh - 250px));
      min-height: 360px;
      margin: 0 auto;
      overflow: hidden;
      transform: none;
      background: var(--bg);
      isolation: isolate;
    }

    .flow-hero-video {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: var(--bg);
      mix-blend-mode: darken;
      pointer-events: none;
    }

    @media (max-width: 720px) {
      .topbar {
        height: auto;
        min-height: 112px;
        padding: 14px 18px;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 10px;
      }
      .brand-title,
      .brand-sub {
        white-space: nowrap;
      }
      .top-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
      }
      .top-actions button,
      .top-actions .tool-link {
        min-height: 38px;
        padding: 10px 12px;
        font-size: 12px;
      }
      .welcome.flow-welcome {
        width: 100%;
        height: min(420px, calc(100vh - 250px));
        min-height: 220px;
      }
    }
