      * { box-sizing: border-box; }
      body { margin: 0; height: 100vh; overflow: hidden; color: #172027; font-family: "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; background: #dfe6e9; }
      body.booting .login-view, body.booting .home, body.booting .app { visibility: hidden; }
      button, input, select, textarea { font: inherit; }
      button { border: 0; cursor: pointer; transition: transform .12s ease, filter .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease; -webkit-tap-highlight-color: transparent; }
      button:hover { filter: brightness(.985); }
      button:active, button.is-pressing { transform: translateY(1px) scale(.985); filter: brightness(.94); }
      button:disabled { cursor: not-allowed; opacity: .58; transform: none; filter: none; }
      .project-card.is-pressing .project-thumb, .project-card:active .project-thumb { transform: scale(.985); box-shadow: inset 0 0 0 2px rgba(31,122,140,.32); }
      .login-view { position: fixed; inset: 0; z-index: 1000; display: flex; background: #fcfbfa; color: #222; font-family: "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; overflow: hidden; opacity: 0; animation: loginFadeInPage 1.2s cubic-bezier(.22,1,.36,1) forwards; }
      .login-view * { font-family: "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; }
      .login-view.hidden { display: none; }
      .login-stage { display: flex; width: 100vw; height: 100vh; }
      .login-visual-pane { flex: 1.2; position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 5vw; overflow: hidden; background: #f2efe9; animation: loginPaneIn .8s cubic-bezier(.16,1,.3,1) .3s both; }
      .login-fluid-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(34,34,34,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(34,34,34,.04) 1px, transparent 1px); background-size: 66px 66px; pointer-events: none; transition: transform .35s cubic-bezier(.22,1,.36,1); }
      .login-brand-mark { position: relative; z-index: 2; color: #222; font-size: 1.1rem; font-weight: 600; letter-spacing: .15em; }
      .login-hero { position: relative; z-index: 2; max-width: 500px; margin-bottom: 10vh; padding: 20px 20px 20px 0; cursor: default; }
      .login-hero h1 { margin: 0 0 1.8rem; color: #222; font-family: "Segoe UI Light", "Segoe UI", "Helvetica Neue", sans-serif; font-size: clamp(2.8rem, 5.5vw, 5rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.04em; }
      .login-word-space, .login-word-amp, .login-word-order, .login-word-dot, .login-hero-desc { display: inline-block; transition: all .8s cubic-bezier(.22,1,.36,1); }
      .login-hero:hover .login-word-space { letter-spacing: .06em; transform: translateX(-2px); }
      .login-hero:hover .login-word-amp { opacity: .2; transform: scale(.95); }
      .login-hero:hover .login-word-dot { color: transparent; position: relative; }
      .login-hero:hover .login-word-dot::after { content: ""; position: absolute; bottom: 10px; left: 2px; width: 8px; height: 8px; background: #222; animation: loginCursorBlink 1s step-end infinite; }
      .login-hero:hover .login-hero-desc { transform: translateX(12px); color: #555; }
      .login-word-dot { color: #222; }
      .login-hero-desc { margin: 0; color: #888; font-size: 1.1rem; font-weight: 300; line-height: 1.9; letter-spacing: .02em; transform-origin: left center; }
      .login-form-pane { flex: 0 0 460px; position: relative; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 4rem; background: #fcfbfa; animation: loginFormIn .8s cubic-bezier(.16,1,.3,1) .5s both; }
      .login-card { width: 100%; max-width: 360px; display: block; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
      .login-header { margin-bottom: 3rem; }
      .login-header h1 { margin: 0 0 .7rem; color: #222; font-size: 1.7rem; font-weight: 500; line-height: 1.15; letter-spacing: .06em; }
      .login-header p { margin: 0; min-height: 0; color: #888; font-size: .95rem; line-height: 1.7; }
      .login-header p:empty { display: none; }
      .login-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 3.4rem; border-bottom: 1px solid #e0dcd5; }
      .login-tabs button { appearance: none; position: relative; min-height: 0; padding: 0 0 1rem; border: 0; border-radius: 0; background: transparent; color: #888; font-size: .88rem; font-weight: 500; letter-spacing: .12em; text-align: center; transition: color .5s cubic-bezier(.22,1,.36,1); }
      .login-tabs button:hover, .login-tabs button:active { transform: none; filter: none; box-shadow: none; }
      .login-tabs button.active { color: #222; background: transparent; }
      .login-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #222; transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.22,1,.36,1); }
      .login-tabs button.active::after { transform: scaleX(1); }
      .login-form { display: block; }
      .login-form.hidden { display: none; }
      .login-input-group { position: relative; margin-bottom: 3.2rem; }
      .login-input-group input { width: 100%; min-height: 0; border: 0; border-bottom: 1px solid #e0dcd5; border-radius: 0; padding: 10px 0; outline: 0; background: transparent; color: #222; font: inherit; font-size: 1.1rem; transition: border-color .6s cubic-bezier(.22,1,.36,1); }
      .login-input-group label { position: absolute; left: 0; top: 10px; color: #888; font-size: 1.1rem; font-weight: 400; letter-spacing: 0; pointer-events: none; transition: all .5s cubic-bezier(.22,1,.36,1); }
      .login-input-group::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #222; transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.22,1,.36,1); }
      .login-input-group:focus-within::after, .login-input-group.has-value::after { transform: scaleX(1); }
      .login-input-group input:focus, .login-input-group input:valid { border-bottom-color: transparent; }
      .login-input-group input:focus ~ label, .login-input-group input:valid ~ label, .login-input-group.has-value label { top: -24px; color: #222; font-size: .85rem; font-weight: 500; letter-spacing: .05em; }
      .password-eye { position: absolute; right: 0; top: 7px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 4px; background: transparent; color: #777; cursor: pointer; }
      .password-eye:hover { background: rgba(34,34,34,.06); color: #222; }
      .password-eye svg { width: 17px; height: 17px; }
      .login-input-group.has-password-eye input { padding-right: 38px; }
      .login-submit { appearance: none; display: block; width: 100%; min-height: 0; margin-top: 1.2rem; padding: 1.2rem; border: 0; border-radius: 0; background: #222; color: #fcfbfa; font-size: 1rem; font-weight: 500; letter-spacing: .12em; transition: all .5s cubic-bezier(.16,1,.3,1); }
      .login-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,.15); background: #000; }
      .login-submit:active { transform: translateY(0) scale(.99); box-shadow: 0 4px 8px rgba(0,0,0,.1); }
      .login-error { min-height: 1.4rem; margin-top: 1.4rem; color: #9d3328; font-size: .85rem; font-weight: 500; letter-spacing: .03em; }
      .language-toggle { position: absolute; z-index: 20; top: 28px; right: 28px; min-width: 54px; min-height: 34px; border: 1px solid #ded8cf; border-radius: 999px; background: rgba(252,251,250,.78); color: #222; font-size: 12px; font-weight: 700; letter-spacing: .08em; backdrop-filter: blur(12px); }
      .home-language-toggle { position: static; min-width: 48px; min-height: 30px; border-color: #d8e0e6; background: #fff; color: #52616b; }
      @keyframes loginFadeInPage { 0% { opacity: 0; } 100% { opacity: 1; } }
      @keyframes loginPaneIn { 0% { opacity: 0; transform: translateX(-50px); } 100% { opacity: 1; transform: translateX(0); } }
      @keyframes loginFormIn { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); } }
      @keyframes loginCursorBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
      @keyframes loginPaneInTop { 0% { opacity: 0; transform: translateY(-50px); } 100% { opacity: 1; transform: translateY(0); } }
      @keyframes loginPaneInBottom { 0% { opacity: 0; transform: translateY(50px); } 100% { opacity: 1; transform: translateY(0); } }
      @media (max-width: 1024px) {
        .login-view { overflow-y: auto; }
        .login-stage { flex-direction: column; min-height: 100vh; height: auto; overflow: visible; }
        .login-visual-pane { flex: none; min-height: 40vh; padding: 4rem; animation-name: loginPaneInTop; }
        .login-form-pane { flex: none; width: 100%; min-height: 60vh; align-items: center; padding: 3rem; animation-name: loginPaneInBottom; }
      }
      @media (max-width: 640px) {
        .login-visual-pane { min-height: 38vh; padding: 2.2rem; }
        .login-form-pane { padding: 2.2rem; align-items: flex-start; }
        .login-header { margin-bottom: 2.4rem; }
        .login-tabs { margin-bottom: 2.8rem; }
      }
      .role-badge { display: inline-grid; place-items: center; min-width: 54px; min-height: 28px; padding: 0 10px; border-radius: 8px; background: #eef8f9; color: #1f7a8c; font-size: 12px; font-weight: 900; }
      body.role-guest .admin-only { display: none !important; }
      body.role-guest #apiSettingsSection { display: none !important; }
      body.role-guest #rolePurposeSection { display: none !important; }
      body.role-guest .guest-duplicate-tool { display: none !important; }
      body.role-guest .side-drawer { display: none !important; }
      body.role-guest .panel.chat-mode .chat-scroll { flex: 1 1 auto; min-height: 0; }
      body.role-admin .guest-only { display: none !important; }
      .home { display: flex; height: 100vh; background: #fbfcfd; color: #172027; }
      .home.hidden, .app.hidden { display: none; }
      .home-rail { width: 54px; border-right: 1px solid #e0e6ea; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 18px; }
      .home-dot { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #172027; font-weight: 900; }
      .home-dot.active { background: #172027; color: #fff; }
      .home-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 120px 44px 48px; overflow: auto; }
      .home-session { position: fixed; z-index: 5; top: 18px; right: 24px; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #d8e0e6; border-radius: 12px; background: rgba(255,255,255,.92); box-shadow: 0 12px 28px rgba(23,32,39,.08); }
      .credit-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; max-width: 220px; padding: 0 14px; border: 1px solid #111; border-radius: 8px; background: #111; color: #fff; font-size: 14px; font-weight: 800; line-height: 1; white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
      .credit-pill:hover { background: #000; transform: translateY(-1px); }
      .workspace-credit-pill { min-width: max-content; background: #111; }
      .credit-dropdown { position: fixed; z-index: 220; top: 64px; right: 24px; display: none; width: min(360px, calc(100vw - 24px)); max-height: min(430px, calc(100vh - 90px)); overflow: hidden; border: 1px solid #2a2a2a; border-radius: 8px; background: #111; color: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
      .credit-dropdown.open { display: grid; grid-template-rows: auto minmax(0, 1fr); }
      .credit-dropdown-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #303030; }
      .credit-dropdown-head strong { font-size: 14px; }
      .credit-dropdown-head span { color: #d8d8d8; font-size: 12px; }
      .credit-dropdown-list { overflow: auto; padding: 6px; }
      .credit-dropdown-empty { padding: 18px 12px; color: #bdbdbd; font-size: 13px; text-align: center; }
      .credit-transaction-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 10px; border-bottom: 1px solid #242424; }
      .credit-transaction-row:last-child { border-bottom: 0; }
      .credit-transaction-row strong { display: block; overflow: hidden; color: #fff; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
      .credit-transaction-row span { display: block; margin-top: 4px; color: #bdbdbd; font-size: 12px; }
      .credit-transaction-row b { font-size: 14px; font-variant-numeric: tabular-nums; }
      .credit-transaction-row b.negative { color: #ffcf7a; }
      .credit-transaction-row b.positive { color: #8ce0b6; }
      .hero { width: min(720px, 100%); text-align: center; margin-bottom: 80px; }
      .hero h1 { font-size: 34px; margin: 0 0 10px; }
      .hero p { margin: 0 0 28px; color: #7b8790; }
      .hero-box { min-height: 116px; border: 1px solid #d8e0e6; border-radius: 16px; background: #fff; box-shadow: 0 14px 40px rgba(23,32,39,.08); padding: 18px; text-align: left; color: #99a3aa; }
      .hero-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
      .pill { min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #d8e0e6; background: #fff; color: #52616b; font-size: 12px; font-weight: 800; }
      .projects { width: min(1120px, 100%); }
      .projects-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
      .projects-head h2 { margin: 0; font-size: 18px; }
      .account-admin { width: min(1280px, 100%); margin-top: 60px; padding-top: 40px; border-top: 1px solid #e0dcd5; }
      .account-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
      .account-admin-head h2 { position: relative; margin: 0; color: #222; font-size: 24px; font-weight: 500; letter-spacing: .04em; }
      .account-admin-head h2::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 22px; height: 2px; background: #222; }
      .account-admin-tools { display: flex; gap: 12px; flex-wrap: wrap; }
      .account-admin .ghost { min-height: 34px; padding: 0 14px; border: 1px solid #e0dcd5; border-radius: 4px; background: rgba(255,255,255,.72); color: #222; font-size: 13px; font-weight: 500; letter-spacing: .05em; }
      .account-admin .ghost:hover { border-color: #222; background: #222; color: #fcfbfa; }
      .account-admin-status { min-height: 18px; margin-bottom: 24px; color: #888; font-size: .85rem; letter-spacing: .05em; }
      .account-admin-status.status-success { color: #13724a; }
      .account-admin-status.status-error { color: #b42318; }
      .account-admin-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; }
      .account-admin-grid .account-admin-panel:nth-child(n+3) { grid-column: 1 / -1; }
      .account-admin-panel { display: grid; align-content: start; gap: 20px; min-width: 0; height: 100%; padding: 24px; border: 1px solid #e0dcd5; border-radius: 0; background: rgba(252,251,250,.72); }
      .account-admin-panel h3 { margin: 0 0 16px; color: #222; font-size: 1.1rem; font-weight: 500; }
      .account-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px 0; border-top: 1px solid #f0efeb; }
      .account-admin-row:first-of-type { border-top: 1px solid #f0efeb; }
      .account-admin-row strong { display: block; min-width: 0; overflow: hidden; color: #2b2b2b; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
      .account-admin-row span { color: #888; font-size: 12px; }
      .account-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
      .account-admin-actions-inline { justify-content: flex-start; margin-top: 12px; }
      .account-admin-actions button { min-height: 30px; padding: 0 11px; border-radius: 4px; background: #222; color: #fcfbfa; font-size: 12px; font-weight: 500; letter-spacing: .05em; }
      .account-admin-actions button:hover { background: #000; transform: translateY(-1px); }
      .account-admin-actions button.ghosty { border: 1px solid #222; background: transparent; color: #222; }
      .account-admin-actions button.ghosty:hover { background: #222; color: #fcfbfa; }
      .account-admin-actions button.danger { border: 1px solid #c64747; background: #c64747; color: #fff; }
      .account-admin-actions button.danger:hover { background: #a93a3a; }
      .account-admin-controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; align-items: end; width: 100%; max-width: 100%; margin-top: 14px; padding: 16px; border: 1px solid #f0efeb; border-radius: 0; background: #f2efe9; }
      .account-admin-control { display: grid; gap: 8px; color: #222; font-size: .8rem; font-weight: 400; }
      .account-admin-control input, .account-admin-control textarea, .account-admin-control select, .account-admin-filter select { width: 100%; min-height: 38px; border: 1px solid #e0dcd5; border-radius: 2px; background: #fff; color: #222; font: inherit; font-size: .85rem; }
      .account-admin-control textarea { min-height: 82px; padding: 8px; resize: vertical; }
      .credit-wallet-panel, .credit-reconcile-panel, .credit-allocation-panel, .apimart-usage-panel { align-content: start; }
      .wallet-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
      .wallet-card { display: grid; gap: 12px; min-height: 124px; padding: 18px; border: 1px solid #e0dcd5; border-radius: 8px; background: #fff; }
      .wallet-card span { color: #777; font-size: 12px; }
      .wallet-card strong { color: #111; font-size: 24px; font-weight: 800; letter-spacing: 0; }
      .wallet-card small { color: #777; font-size: 12px; line-height: 1.5; }
      .wallet-card-primary { border-color: #111; }
      .wallet-card-danger { border-color: #c64747; background: #fff7f6; }
      .wallet-card-danger span, .wallet-card-danger small { color: #9d3328; }
      .wallet-card-danger strong { color: #b42318; }
      .reconcile-admin-controls { grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(280px, 1.6fr); }
      .credit-admin-controls { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
      .credit-user-select-control { margin-top: 10px; max-width: 420px; }
      .apimart-log-controls { grid-template-columns: minmax(180px, 260px); }
      .apimart-log-table-wrap { max-height: 320px; overflow: auto; border: 1px solid #e0dcd5; background: #fff; }
      .apimart-log-table { width: 100%; min-width: 860px; border-collapse: collapse; color: #222; font-size: 12px; }
      .apimart-log-table th, .apimart-log-table td { padding: 8px 9px; border-bottom: 1px solid #f0efeb; text-align: left; vertical-align: middle; }
      .apimart-log-table th { position: sticky; top: 0; z-index: 1; background: #f2efe9; color: #555; font-weight: 600; }
      .apimart-log-pager span { align-self: center; color: #555; font-size: 13px; }
      .apimart-log-pager button:disabled { opacity: .45; cursor: not-allowed; }
      .generation-log-detail { max-height: 260px; margin: 0; overflow: auto; white-space: pre-wrap; border: 1px solid #e0dcd5; background: #151515; color: #f5f1e8; padding: 14px; font-size: 12px; line-height: 1.5; }
      .generation-log-action { min-height: 28px; padding: 5px 9px; border: 1px solid #d7d2ca; background: #fff; color: #222; font-size: 12px; cursor: pointer; }
      .generation-log-status { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid #ded8cf; background: #f7f4ef; color: #555; font-size: 12px; }
      .generation-log-status.failed, .generation-log-status.blocked { border-color: #d88d83; background: #fff3f1; color: #a13024; }
      .generation-log-status.succeeded { border-color: #91c59b; background: #f0fbf1; color: #2f7338; }
      .generation-log-status.running { border-color: #b8b0a5; background: #fff; color: #333; }
      .generation-log-status.cancelled { border-color: #c9c4bc; background: #f2f0ec; color: #777; }
      .credit-cookie-control { min-width: 0; }
      .credit-sync-summary { padding: 10px 12px; border: 1px solid #e0dcd5; background: #fff; color: #555; font-size: 12px; line-height: 1.6; }
      .wallet-overview-grid.credit-sync-summary { padding: 0; border: 0; background: transparent; }
      .selected-credit-summary { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid #e0dcd5; border-radius: 8px; background: #fff; color: #222; }
      .selected-credit-summary strong { font-size: 15px; }
      .selected-credit-summary span { color: #777; font-size: 13px; }
      .credit-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
      .credit-summary-head span { color: #111; font-weight: 700; }
      .credit-summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px; margin-top: 4px; }
      .credit-summary-metrics div { display: grid; gap: 4px; padding: 10px; border: 1px solid #ece8e1; border-radius: 8px; background: #faf9f6; }
      .credit-summary-metrics strong { font-size: 18px; color: #111; }
      @media (max-width: 760px) { .credit-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
      .pricing-admin-controls { grid-template-columns: repeat(6, minmax(140px, 1fr)); }
      .pricing-import-control input { padding: 8px; }
      .gemini-rules-admin-panel { grid-column: 1 / -1; }
      .gemini-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 18px; }
      .gemini-rule-wide { grid-column: 1 / -1; }
      .gemini-rule-grid textarea { min-height: 118px; resize: vertical; line-height: 1.6; }
      .pricing-table-wrap { max-height: 360px; overflow: auto; border: 1px solid #e0dcd5; background: #fff; }
      .pricing-table { width: 100%; border-collapse: collapse; min-width: 840px; color: #222; font-size: 12px; }
      .pricing-table th, .pricing-table td { padding: 8px 9px; border-bottom: 1px solid #f0efeb; text-align: left; vertical-align: middle; }
      .pricing-table th { position: sticky; top: 0; z-index: 1; background: #f2efe9; color: #555; font-weight: 600; }
      .pricing-table input, .pricing-table select { width: 100%; min-height: 30px; border: 1px solid #e0dcd5; border-radius: 2px; background: #fff; color: #222; font: inherit; }
      .pricing-table .pricing-points-cell { color: #666; font-variant-numeric: tabular-nums; }
      .account-admin-control select:focus, .account-admin-filter select:focus { outline: 0; border-color: #222; }
      .account-admin-filter { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
      .invite-picker-button { display: flex; min-width: 0; min-height: 38px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; border: 1px solid #e0dcd5; border-radius: 2px; background: transparent; color: #222; text-align: left; font-size: .85rem; }
      .invite-picker-button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .invite-picker-menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 182px; right: 0; display: none; max-height: 300px; overflow-y: auto; border: 1px solid #e0dcd5; border-radius: 0; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.06); }
      .invite-picker-menu.open { display: grid; }
      .invite-picker-item { display: grid; gap: 4px; width: 100%; padding: 11px 12px; border-bottom: 1px solid #f0efeb; background: transparent; color: #222; text-align: left; }
      .invite-picker-entry { grid-template-columns: minmax(0, 1fr) 34px; align-items: center; cursor: pointer; }
      .invite-copy-button { display: inline-grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d8d2c8; border-radius: 4px; background: #fff; color: #222; }
      .invite-copy-button:hover { border-color: #111; background: #111; color: #fff; }
      .invite-copy-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
      .invite-picker-item:hover, .invite-picker-item.active { background: #f2efe9; filter: none; transform: none; }
      .invite-picker-item strong { font-size: 13px; font-weight: 500; }
      .invite-picker-item span { color: #888; font-size: 12px; }
      .account-admin-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 14px; color: #888; font-size: 12px; }
      .account-admin-pager button { min-height: 30px; padding: 0 10px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: #222; font-weight: 500; }
      .account-admin-pager button:hover { border-color: #e0dcd5; background: #fff; }
      .account-admin-code { padding: 7px 9px; border: 1px solid #e0dcd5; border-radius: 4px; background: #f2efe9; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; word-break: break-all; }
      .inline-confirm { display: inline-flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid #e9b9b9; border-radius: 6px; background: #fff7f7; color: #b33939; font-size: 11px; font-weight: 800; }
      .inline-confirm button { min-height: 24px; padding: 0 7px; border-radius: 4px; }
      @media (max-width: 1100px) { .account-admin-grid { grid-template-columns: 1fr; } .wallet-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
      @media (max-width: 900px) { .account-admin-row { grid-template-columns: 1fr; } .account-admin-actions { justify-content: flex-start; } .account-admin-controls, .account-admin-filter, .wallet-overview-grid, .gemini-rule-grid { grid-template-columns: 1fr; } .gemini-rule-wide { grid-column: auto; } .invite-picker-menu { left: 0; } }
      @media (max-width: 640px) {
        .account-admin { margin-top: 48px; padding-top: 32px; }
        .account-admin-head { align-items: flex-start; flex-direction: column; }
        .account-admin-head h2 { font-size: 22px; white-space: nowrap; }
        .account-admin-tools { width: 100%; }
        .account-admin-tools .ghost { flex: 1 1 130px; }
        .account-admin-panel { padding: 20px; }
      }
      .account-auth-links { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; color: #999; font-size: 13px; }
      .account-auth-links button, .login-text-button { border: 0; background: transparent; color: #333; text-decoration: underline; font-weight: 800; cursor: pointer; }
      .account-auth-grid { margin-top: 18px; border-top: 1px solid #e8e3dc; padding-top: 18px; }
      .account-auth-panel { display: grid; gap: 10px; }
      .account-auth-panel.hidden, .account-auth-grid.hidden { display: none; }
      .account-auth-panel h2 { margin: 0 0 4px; font-size: 13px; letter-spacing: .14em; color: #555; }
      .account-auth-panel input { width: 100%; border: 0; border-bottom: 1px solid #d8d2c8; padding: 12px 0; outline: 0; background: transparent; color: #222; font-size: 15px; }
      .password-field-wrap { position: relative; display: block; width: 100%; }
      .password-field-wrap input { padding-right: 38px !important; }
      .password-field-wrap .password-eye { top: 50%; transform: translateY(-50%); }
      .login-mini-button { min-height: 40px; border-radius: 0; background: #333; color: #fff; font-weight: 800; letter-spacing: .08em; }
      .account-list { display: grid; gap: 10px; }
      .account-row { display: grid; gap: 10px; padding: 14px; border: 1px solid #d8e0e6; border-radius: 10px; background: #fff; }
      .account-row-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
      .account-row strong { display: block; color: #172027; }
      .account-row span { color: #7b8790; font-size: 12px; }
      .account-controls { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 8px; }
      .account-control { display: grid; gap: 5px; color: #52616b; font-size: 12px; font-weight: 800; }
      .account-control select { min-height: 36px; border: 1px solid #d8e0e6; border-radius: 8px; background: #fff; padding: 0 8px; }
      .account-actions { display: flex; justify-content: flex-end; gap: 8px; }
      .account-code { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 8px; background: #f2f6f8; color: #172027; font-weight: 900; }
      .project-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; align-items: start; }
      .project-card { display: block; width: 100%; text-align: left; padding: 0; background: transparent; color: inherit; }
      .project-thumb { width: 100%; aspect-ratio: 16 / 10; min-height: 132px; border: 1px solid #e0e6ea; border-radius: 10px; background: #f2f4f6; overflow: hidden; display: grid; place-items: center; color: #8d989f; font-size: 30px; }
      .project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
      .project-thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #9aa5ac; font-size: 12px; letter-spacing: .12em; background: linear-gradient(135deg, #f4f6f7, #e9eef1); }
      .project-card:hover .project-thumb { outline: 3px solid rgba(31,122,140,.18); border-color: #1f7a8c; }
      .project-card-wrap { position: relative; width: 100%; min-width: 0; }
      .project-delete, .project-rename { position: absolute; top: 8px; width: 38px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.92); color: #293640; font-size: 12px; font-weight: 900; box-shadow: 0 8px 20px rgba(23,32,39,.12); opacity: 0; }
      .project-delete { right: 8px; color: #a23e48; }
      .project-rename { right: 52px; color: #116273; }
      .project-card-wrap:hover .project-delete, .project-card-wrap:hover .project-rename { opacity: 1; }
      .project-name { margin-top: 10px; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .project-date { margin-top: 3px; color: #7b8790; font-size: 12px; }
      .new-thumb { border-style: dashed; background: #f8fafb; }
      .app { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; height: 100vh; }
      .rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 10px; background: #f8fafb; border-right: 1px solid #ccd5db; z-index: 5; }
      .logo { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border-radius: 8px; background: #172027; color: #fff; font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: 0; text-transform: uppercase; }
      .tool { width: 40px; height: 40px; border-radius: 8px; background: transparent; color: #42515b; font-size: 15px; font-weight: 800; }
      .tool:hover, .tool.active { background: #e7ecef; color: #111827; }
      .tool.danger { margin-top: auto; color: #a23e48; }
      .rail-role-badge { display: block; width: 42px; max-width: 42px; min-width: 0; min-height: 26px; padding: 0 3px; border-radius: 8px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 26px; }
      .work { position: relative; min-width: 0; }
      .topbar { position: absolute; z-index: 4; top: 18px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 10px 14px 10px 18px; border: 1px solid rgba(188,199,207,.9); border-radius: 8px; background: rgba(248,250,251,.94); box-shadow: 0 14px 34px rgba(23,32,39,.08); }
      .topbar strong, .topbar span { display: block; }
      .topbar strong { font-size: 15px; }
      .topbar span { color: #62717c; font-size: 12px; }
      .project-name-line { display: flex; align-items: center; gap: 8px; }
      .rename-btn { min-height: 24px; padding: 0 8px; border-radius: 7px; background: #eaf6f7; color: #116273; font-size: 12px; font-weight: 900; }
      .topbar .actions { display: flex; align-items: center; gap: 10px; }
      .app .topbar { top: 18px; left: 22px; right: 22px; min-height: 58px; max-height: 58px; padding: 9px 12px 9px 16px; border: 1px solid #e0dcd5; border-radius: 0; background: rgba(252,251,250,.86); box-shadow: 0 4px 12px rgba(0,0,0,.03); backdrop-filter: blur(8px); overflow: hidden; }
      .app .topbar > div:first-child { flex: 0 0 168px; min-width: 0; }
      .app .topbar .actions { flex: 1 1 auto; min-width: 0; gap: 7px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
      .app .topbar .actions::-webkit-scrollbar { height: 4px; }
      .app .topbar .actions::-webkit-scrollbar-thumb { background: #d8d2c8; }
      .app .topbar strong { color: #222; font-size: 15px; font-weight: 500; letter-spacing: .04em; }
      .app .topbar span, .app .save-status, .app #scaleText { color: #888; font-size: 12px; font-weight: 300; }
      .app .save-status.auth-expired { color: #a23e48; min-width: max-content; }
      .app .save-status.auth-expired + #scaleText { display: none; }
      .back { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 10px; border-radius: 8px; background: #eef2f4; color: #293640; text-decoration: none; font-weight: 800; }
      .primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 8px; background: #172027; color: #fff; font-weight: 800; }
      .ghost { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #cbd5dc; background: #fff; color: #293640; font-size: 13px; font-weight: 800; }
      .ghost.active { border-color: #1f7a8c; background: #eaf6f7; color: #116273; }
      .project-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
      .save-status { color: #62717c; font-size: 12px; min-width: 72px; text-align: right; }
      .project-title-input { width: 100%; min-height: 36px; border: 1px solid #cbd5dc; border-radius: 8px; padding: 0 10px; background: #fff; color: #172027; font: inherit; font-size: 14px; font-weight: 800; }
      .field { display: grid; gap: 6px; }
      .field label { color: #62717c; font-size: 12px; font-weight: 800; }
      .field input { width: 100%; min-height: 36px; border: 1px solid #cbd5dc; border-radius: 8px; padding: 0 10px; background: #fff; color: #172027; font: inherit; font-size: 13px; }
      .secret-input-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 6px; align-items: center; }
      .secret-input-wrap input { min-width: 0; }
      .secret-input-wrap button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #cbd5dc; border-radius: 8px; background: #fff; color: #293640; font-size: 14px; cursor: pointer; }
      .secret-input-wrap button.active { border-color: #222; background: #222; color: #fff; }
      .field .password-field-wrap input { padding-right: 42px !important; }
      .checkline { display: flex; align-items: center; gap: 8px; color: #293640; font-size: 13px; font-weight: 800; }
      .checkline input { width: 16px; height: 16px; }
      .detail-grid { display: grid; gap: 8px; }
      .detail-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; }
      .detail-row span { color: #62717c; }
      .detail-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .chatbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
      .history-list, .chat-list { display: grid; gap: 8px; max-height: 180px; overflow: auto; }
      .history-item, .chat-item { border: 1px solid #d7dee3; border-radius: 8px; background: #fff; padding: 9px 10px; font-size: 12px; color: #42515b; }
      .chat-item { cursor: pointer; }
      .chat-item.active { border-color: #1f7a8c; background: #eaf6f7; color: #116273; font-weight: 800; }
      .history-item strong { display: block; color: #172027; font-size: 13px; margin-bottom: 4px; }
      .mention-wrap { position: relative; }
      .mention-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); display: none; z-index: 20; border: 1px solid #cbd5dc; border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(23,32,39,.14); overflow: hidden; }
      .mention-option { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 10px; background: #fff; color: #293640; font-size: 13px; text-align: left; }
      .mention-option:hover { background: #eef8f9; }
      .mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; height: 100%; gap: 2px; background: #e0e6ea; }
      .mini-grid img, .mini-cell { width: 100%; height: 100%; object-fit: cover; background: #f2f4f6; display: block; }
      .modal-backdrop { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(23,32,39,.34); padding: 20px; }
      .modal-backdrop.open { display: flex; }
      .modal { width: min(520px, 100%); border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(23,32,39,.24); padding: 18px; display: grid; gap: 14px; }
      .api-settings-modal { width: min(760px, 100%); max-height: min(86vh, 820px); overflow: auto; }
      .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
      .modal-head h2 { margin: 0; font-size: 20px; }
      .modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
      .confirm-modal { width: min(440px, 100%); }
      .confirm-modal p { margin: 0; color: #42515b; line-height: 1.6; }
      .modal-close-x { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 8px; border: 1px solid #d5dde3; background: #fff; color: #293640; font-size: 20px; line-height: 1; font-weight: 700; }
      .modal-close-x:hover { background: #eef2f4; }
      .floating-notice { position: fixed; z-index: 1200; left: 50%; bottom: 28px; transform: translate(-50%, 18px); max-width: min(520px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #e0dcd5; border-radius: 4px; background: rgba(252,251,250,.96); color: #222; box-shadow: 0 14px 36px rgba(0,0,0,.12); font-size: 14px; line-height: 1.6; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
      .floating-notice.open { opacity: 1; transform: translate(-50%, 0); }
      .delete-project-text { display: grid; gap: 6px; margin: 0; color: #42515b; line-height: 1.65; font-size: 15px; }
      .delete-project-text strong { color: #172027; font-weight: 850; }
      .delete-project-text span { display: block; }
      .danger-action { background: #9f4d8f; color: #fff; }
      .danger-action:hover { background: #803b73; }
      .permission-card { display: grid; gap: 14px; padding: 16px; border: 1px solid #d8e0e6; border-radius: 12px; background: #fff; }
      .permission-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
      .permission-card-head h3 { margin: 0 0 6px; font-size: 16px; }
      .permission-card-head p { margin: 0; color: #7b8790; font-size: 12px; line-height: 1.55; }
      .permission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
      .permission-models { display: flex; flex-wrap: wrap; gap: 8px; }
      .permission-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid #d8e0e6; border-radius: 999px; background: #f8fafb; color: #293640; font-size: 12px; font-weight: 850; }
      .permission-chip input { width: 14px; height: 14px; margin: 0; }
      @media (max-width: 720px) { .permission-grid { grid-template-columns: 1fr; } }
      .panel.chat-mode { position: relative; display: flex; flex-direction: column; height: 100vh; width: clamp(400px, 28vw, 920px); min-width: 400px; max-width: 50vw; padding: 0; gap: 0; overflow: hidden; background: #fff; }
      .panel-resizer { position: absolute; z-index: 20; left: 0; top: 0; width: 18px; height: 100%; cursor: ew-resize; background: transparent; touch-action: none; }
      .panel-resizer::after { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: transparent; transition: background .12s; }
      .panel-resizer:hover::after, .panel-resizer.dragging::after { background: transparent; }
      body.resizing-panel { cursor: ew-resize; user-select: none; }
      .chat-header { position: relative; flex: 0 0 auto; padding: 10px 10px 8px 16px; border-bottom: 1px solid #e8edf1; background: #fff; }
      .chat-header-row { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 10px; }
      .chat-title-block { min-width: 0; display: grid; gap: 2px; }
      .chat-session-title { min-width: 0; max-width: 235px; overflow: hidden; color: #141a20; font-size: 14px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
      .chat-session-subtitle { color: #8b949d; font-size: 11px; font-weight: 750; }
      .chat-header-actions { display: flex; align-items: center; gap: 4px; }
      .chat-icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #4b5660; cursor: pointer; line-height: 1; transition: background .14s, color .14s, transform .14s; }
      .chat-icon-btn svg { width: 17px; height: 17px; }
      .chat-icon-btn:hover { background: #f1f4f6; color: #111827; }
      .chat-icon-btn:active { transform: scale(.96); background: #e7ecef; }
      .chat-icon-btn.active { background: #eaf8f9; color: #007d8d; }
      .conversation-popover { position: absolute; z-index: 30; right: 10px; top: calc(100% + 4px); width: min(365px, calc(100% - 20px)); display: none; gap: 10px; padding: 12px; border: 1px solid #e1e6ea; border-radius: 14px; background: #fff; box-shadow: 0 18px 50px rgba(23,32,39,.16); }
      .conversation-popover.open { display: grid; }
      .conversation-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
      .conversation-popover h2 { margin: 0; font-size: 15px; color: #172027; }
      .conversation-search { min-height: 38px; border: 1px solid #e1e6ea; border-radius: 12px; padding: 0 12px; outline: 0; font: inherit; font-size: 13px; }
      .conversation-search:focus { border-color: #00a7c7; box-shadow: 0 0 0 3px rgba(0,167,199,.12); }
      .conversation-popover-list { display: grid; gap: 6px; max-height: min(270px, 42vh); overflow: auto; }
      .conversation-popover .chat-item { padding: 9px 10px; border-color: transparent; border-radius: 11px; font-size: 12px; }
      .conversation-popover .chat-item:hover { background: #f6f8f9; }
      .conversation-popover .chat-item.active { border-color: #d8f1f4; background: #eaf8f9; color: #116273; }
      .conversation-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
      .conversation-item-main { min-width: 0; cursor: pointer; }
      .conversation-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 850; }
      .conversation-item-preview { overflow: hidden; margin-top: 2px; color: #7b8790; text-overflow: ellipsis; white-space: nowrap; }
      .conversation-delete { width: auto; min-width: 38px; height: 28px; border-radius: 8px; background: transparent; color: #a23e48; font-size: 12px; font-weight: 800; opacity: .65; }
      .conversation-delete:hover { background: #fff0f2; color: #8d2636; }
      .chat-scroll { flex: 1 1 34vh; min-height: 160px; max-height: none; overflow-y: auto; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 20px; border-bottom: 1px solid #e8edf1; background: #fff; user-select: text; }
      .panel.chat-mode.tools-collapsed .chat-scroll { flex: 1 1 auto; min-height: 0; }
      .chat-composer { flex: 0 0 auto; padding: 10px 10px 12px; border-top: 1px solid #e8edf1; background: #fff; }
      .message { display: grid; gap: 7px; user-select: text; }
      .message-card { user-select: text; }
      .message-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
      .message-meta { color: #a0a8b1; font-size: 11px; font-weight: 800; }
      .message-title { color: #293640; font-size: 14px; font-weight: 900; line-height: 1.35; }
      .message-body { color: #293640; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
      .message.user { justify-items: end; margin-left: 26px; }
      .message.user .message-card { position: relative; border-radius: 16px; background: #f5f6f7; padding: 11px 13px; }
      .message.pending-send .message-card { outline: 1px solid rgba(31,122,140,.18); background: #eef8f9; }
      .message.thinking-pending .message-card { color: #52616b; }
      .message.cancelled .message-card { opacity: .82; background: #f6f2ee; }
      .message-copy { flex: 0 0 auto; display: inline-grid; width: 22px; height: 22px; min-height: 22px; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #8a949d; cursor: pointer; user-select: none; opacity: .72; }
      .message-copy svg { width: 14px; height: 14px; stroke-width: 1.9; }
      .message-copy:hover { background: rgba(255,255,255,.72); color: #293640; opacity: 1; }
      .message-copy.copied { color: #0f6b7c; background: #eefafb; opacity: 1; }
      .message-mention-chip { vertical-align: middle; margin: 0 2px; }
      .message.assistant { margin-right: 8px; }
      .message.assistant .message-card { display: grid; gap: 7px; }
      .thinking-dots { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
      .thinking-dots i { display: block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .28; animation: thinkingDot 1s infinite ease-in-out; }
      .thinking-dots i:nth-child(2) { animation-delay: .16s; }
      .thinking-dots i:nth-child(3) { animation-delay: .32s; }
      @keyframes thinkingDot {
        0%, 80%, 100% { transform: translateY(0); opacity: .28; }
        40% { transform: translateY(-3px); opacity: .9; }
      }
      .message-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
      .message-action { border: 1px solid #d7dde2; background: #fff; color: #293640; border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
      .message-action:hover { background: #f5f7f8; }
      .message img.message-output-image { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid #e0e6ea; border-radius: 9px; box-shadow: 0 10px 28px rgba(23,32,39,.08); cursor: zoom-in; }
      .message.empty-state { min-height: 170px; align-content: center; color: #5c6872; }
      .message.empty-state .message-card { padding: 18px; border: 1px dashed #d6dee3; border-radius: 16px; background: #fbfcfd; }
      .composer-box { position: relative; border: 1px solid #d8e0e6; border-radius: 24px; background: #fff; box-shadow: 0 10px 30px rgba(23,32,39,.08); padding: 12px; transition: border-color .14s, box-shadow .14s; }
      .composer-box:focus-within { border-color: #00a7c7; box-shadow: 0 14px 36px rgba(0,95,125,.13); }
      .composer-box textarea#composerInput { display: none; }
      .composer-editor { min-height: 86px; max-height: 240px; overflow-y: auto; outline: 0; color: #172027; font-size: 15px; line-height: 1.65; resize: vertical; white-space: break-spaces; overflow-wrap: anywhere; user-select: text; }
      .composer-editor:empty::before { content: attr(data-placeholder); color: #c6ccd1; pointer-events: none; }
      .composer-editor:empty:focus::before { content: ""; }
      .composer-box .mentionbar { display: none; }
      .composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
      .composer-icons { display: flex; gap: 6px; align-items: center; color: #52616b; font-weight: 900; }
      .composer-tool-btn { min-height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: #52616b; font-size: 13px; font-weight: 850; }
      .composer-tool-btn.icon-only { display: grid; width: 34px; height: 34px; min-height: 34px; place-items: center; padding: 0; }
      .composer-tool-btn.icon-only svg { width: 18px; height: 18px; }
      .composer-tool-btn:hover { background: #f1f4f6; color: #172027; }
      .composer-tool-btn:focus, .composer-tool-btn:focus-visible { outline: 0; box-shadow: none; }
      .composer-send-zone { position: relative; display: flex; align-items: center; gap: 7px; }
      .guest-quick-settings { display: flex; align-items: center; gap: 3px; }
      .guest-quick-btn { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 999px; background: transparent; color: #3478ff; cursor: pointer; transition: background .14s, color .14s, transform .14s; }
      .guest-quick-btn svg { width: 19px; height: 19px; }
      .guest-quick-btn:hover, .guest-quick-btn.active { background: #edf5ff; color: #0f62fe; }
      .guest-quick-btn:active { transform: scale(.95); }
      .style-transfer-btn { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 999px; background: transparent; color: #7a838c; cursor: pointer; transition: background .14s, color .14s, transform .14s; }
      .style-transfer-btn svg { width: 19px; height: 19px; }
      .style-transfer-btn:hover, .style-transfer-btn.active { background: #fff3df; color: #af6b12; }
      .style-transfer-btn.full { background: #2c2f33; color: #fff; }
      .style-transfer-btn:active { transform: scale(.95); }
      .style-transfer-btn:disabled { cursor: not-allowed; opacity: .42; }
      .style-transfer-menu { position: absolute; right: 44px; bottom: 48px; z-index: 38; display: none; width: min(300px, calc(100vw - 42px)); padding: 8px; border: 1px solid #e2e8ee; border-radius: 12px; background: #fff; box-shadow: 0 18px 44px rgba(23,32,39,.16); }
      .style-transfer-menu.open { display: grid; gap: 5px; }
      .style-transfer-menu button { display: grid; gap: 3px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #2f3944; cursor: pointer; text-align: left; }
      .style-transfer-menu button:hover { background: #f6f8f9; }
      .style-transfer-menu button.active { border-color: #f4d39e; background: #fff6e8; color: #7a4500; }
      .style-transfer-menu button:disabled { cursor: not-allowed; opacity: .46; }
      .style-transfer-menu strong { font-size: 13px; }
      .style-transfer-menu span { color: #7b8790; font-size: 11px; line-height: 1.35; }
      .guest-quick-popover { position: absolute; z-index: 35; right: 10px; bottom: 58px; display: none; width: min(320px, calc(100% - 20px)); max-height: min(390px, 54vh); overflow: auto; padding: 12px; border: 1px solid #e2e8ee; border-radius: 14px; background: #fff; box-shadow: 0 18px 44px rgba(23,32,39,.16); }
      .guest-quick-popover.open { display: grid; gap: 9px; }
      .guest-quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
      .guest-quick-head h2 { margin: 0; color: #29313a; font-size: 15px; }
      .guest-quick-current { color: #7b8790; font-size: 11px; font-weight: 800; }
      .guest-quick-options { display: grid; gap: 5px; }
      .guest-quick-option { display: grid; gap: 3px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #2f3944; cursor: pointer; text-align: left; }
      .guest-quick-option:hover { background: #f6f8f9; }
      .guest-quick-option.active { border-color: #ccecf0; background: #eaf8f9; color: #106071; }
      .guest-quick-option.pending { border-color: #00a7c7; background: #eaf8f9; color: #0d6f7f; }
      .guest-quick-option:disabled { cursor: not-allowed; opacity: .45; }
      .guest-quick-option strong { font-size: 13px; }
      .guest-quick-option span { color: #7b8790; font-size: 11px; line-height: 1.35; }
      .send-round { width: 38px; height: 38px; border-radius: 50%; background: #172027; color: #fff; cursor: pointer; font-weight: 900; transition: transform .14s, background .14s; }
      .send-round:hover { background: #0f171d; }
      .send-round:active { transform: scale(.96); }
      .send-round.generating { background: #1f7a8c; }
      .send-round.pending-send { background: #8f2f2f; font-size: 23px; line-height: 1; }
      .send-round.pending-send:hover { background: #6f2020; }
      .side-drawer { flex: 1 1 38vh; min-height: 0; overflow: auto; padding: 12px 18px; border-top: 0; background: #fbfcfd; display: grid; gap: 12px; }
      .side-drawer.collapsed { display: none; }
      select { min-height: 36px; border: 1px solid #cbd5dc; border-radius: 8px; padding: 0 10px; background: #fff; color: #172027; font: inherit; font-size: 13px; }
      .canvas { position: absolute; inset: 0; overflow: hidden; cursor: default; user-select: none; touch-action: none; }
      .canvas:focus { outline: none; }
      .canvas.panning, .canvas.panning:active { cursor: grabbing; }
      .grid { position: absolute; inset: -100%; background-image: linear-gradient(rgba(111,128,140,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(111,128,140,.16) 1px, transparent 1px); background-size: 32px 32px; pointer-events: none; }
      .drop-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 13px 16px; border: 1px dashed #8aa0ad; border-radius: 8px; background: rgba(255,255,255,.72); color: #52616b; font-size: 13px; pointer-events: none; }
      .context-menu { position: absolute; z-index: 30; display: none; min-width: 170px; padding: 8px; border: 1px solid #d8e0e6; border-radius: 10px; background: #fff; box-shadow: 0 18px 46px rgba(23,32,39,.18); }
      .context-menu.open { display: grid; gap: 4px; }
      .context-menu button { min-height: 34px; padding: 0 10px; border-radius: 8px; background: transparent; color: #293640; text-align: left; font-weight: 800; }
      .context-menu button:hover { background: #eef4f6; }
      .download-shelf { position: absolute; right: 18px; bottom: 18px; z-index: 31; display: none; width: 280px; max-height: 260px; overflow: auto; padding: 10px; border: 1px solid #d8e0e6; border-radius: 10px; background: #fff; box-shadow: 0 18px 46px rgba(23,32,39,.18); }
      .download-shelf.open { display: grid; gap: 8px; }
      .download-shelf a { display: block; padding: 8px 10px; border-radius: 8px; background: #eef8f9; color: #116273; font-size: 12px; font-weight: 800; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .marquee { position: absolute; display: none; z-index: 6; border: 1px solid #1f7a8c; background: rgba(31,122,140,.12); pointer-events: none; }
      .world { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; }
      .relation-layer { position: absolute; z-index: 0; overflow: visible; pointer-events: none; }
      .relation-line { fill: none; stroke: rgba(78,87,94,.22); stroke-width: 2; stroke-dasharray: 10 12; vector-effect: non-scaling-stroke; }
      .relation-line.reference { stroke: rgba(78,87,94,.13); stroke-width: 1.5; stroke-dasharray: 4 10; }
      .relation-line.active { stroke: rgba(34,34,34,.58); stroke-width: 3; }
      .canvas-group { position: absolute; z-index: 1; min-width: 0; min-height: 160px; border: 1px dashed rgba(34,34,34,.22); background: rgba(246,242,236,.62); box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); backdrop-filter: blur(2px); }
      .canvas-group.selected { outline: 3px solid rgba(34,34,34,.32); outline-offset: 5px; }
      .canvas-group.locked { border-style: solid; }
      .canvas-group.collapsed { height: 92px !important; overflow: visible; }
      .group-toolbar { position: absolute; left: 50%; bottom: calc(-78px * var(--group-toolbar-scale, 1)); z-index: 45; display: none; align-items: center; gap: 10px; max-width: min(900px, calc(100vw - 56px)); min-height: 56px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; background: rgba(24,24,24,.96); color: #fff; box-shadow: 0 22px 54px rgba(0,0,0,.34); transform: translateX(-50%) scale(var(--group-toolbar-scale, 1)); transform-origin: center bottom; overflow: visible; backdrop-filter: blur(12px); }
      .canvas-group.selected .group-toolbar { display: flex; }
      .group-toolbar strong { flex: 0 1 180px; min-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; color: rgba(255,255,255,.9); }
      .group-toolbar button { flex: 0 0 auto; min-width: max-content; height: 42px; border: 0; border-radius: 21px; background: transparent; color: rgba(255,255,255,.8); font-size: 15px; font-weight: 850; white-space: nowrap; writing-mode: horizontal-tb; text-orientation: mixed; line-height: 1; }
      .group-toolbar button { padding: 0 15px; }
      .group-toolbar button:hover, .group-toolbar button.active { background: rgba(255,255,255,.12); color: #fff; }
      .group-columns-picker, .group-more-picker { position: relative; flex: 0 0 auto; }
      .group-columns-toggle { min-width: 150px; }
      .group-columns-toggle::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 11px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
      .group-more-toggle::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
      .group-columns-menu, .group-more-menu { position: absolute; left: 0; top: calc(100% + 11px); z-index: 60; display: none; min-width: 178px; padding: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(30,30,30,.98); box-shadow: 0 18px 42px rgba(0,0,0,.36); }
      .group-more-menu { right: 0; left: auto; min-width: 204px; }
      .group-columns-picker.open .group-columns-menu, .group-more-picker.open .group-more-menu { display: grid; gap: 6px; }
      .group-columns-menu button, .group-more-menu button { width: 100%; justify-content: flex-start; text-align: left; border: 0; border-radius: 12px; background: transparent; color: rgba(255,255,255,.84); }
      .group-columns-menu button:hover, .group-columns-menu button.active, .group-more-menu button:hover { background: rgba(255,255,255,.13); color: #fff; }
      .group-meta { padding: 8px 14px; color: #8a8176; font-size: 13px; pointer-events: none; }
      .node { position: absolute; border: 1px solid rgba(23,32,39,.12); border-radius: 8px; background: #fff; box-shadow: 0 18px 46px rgba(23,32,39,.13); cursor: grab; }
      .node { z-index: 2; }
      .node.group-member { z-index: 12; box-shadow: 0 10px 26px rgba(23,32,39,.1); }
      .node.history-placeholder { background: rgba(250,248,244,.86); box-shadow: none; }
      .image-lightbox { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: 34px; background: rgba(9,12,16,.72); backdrop-filter: blur(4px); }
      .image-lightbox.open { display: flex; }
      .image-lightbox-frame { position: relative; max-width: 96vw; max-height: 94vh; }
      .image-lightbox img { display: block; max-width: 96vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #111; box-shadow: 0 26px 80px rgba(0,0,0,.38); }
      .image-lightbox-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #172027; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.2); }
      .image-lightbox-close:hover { background: #fff; }
      .node.selected { outline: 7px solid #00a7c7; outline-offset: 8px; box-shadow: 0 0 0 3px #fff, 0 0 0 13px rgba(0,167,199,.18), 0 24px 62px rgba(0,95,125,.32); }
      .node.selected::before, .node.selected::after { content: ""; position: absolute; z-index: 4; width: 16px; height: 16px; border-radius: 4px; background: #fff; border: 3px solid #00a7c7; pointer-events: none; }
      .node.selected::before { left: -18px; top: -18px; }
      .node.selected::after { right: -18px; bottom: -18px; }
      .node.overlap-warning.image-node { opacity: .5; outline: 6px solid #ff3b30; outline-offset: 7px; box-shadow: 0 0 0 3px #fff, 0 0 0 14px rgba(255,59,48,.18), 0 22px 60px rgba(255,59,48,.28); }
      .node.overlap-warning.image-node::before, .node.overlap-warning.image-node::after { border-color: #ff3b30; }
      .resize-handle { position: absolute; right: -30px; bottom: -30px; z-index: 8; display: none; width: 54px; height: 54px; border-radius: 12px; background: transparent; cursor: nwse-resize; touch-action: none; }
      .resize-handle::after { content: ""; position: absolute; right: 13px; bottom: 13px; width: 22px; height: 22px; border-radius: 6px; background: #fff; border: 3px solid #00a7c7; box-shadow: 0 6px 14px rgba(0,95,125,.22); }
      .resize-handle:hover::after { transform: scale(1.12); }
      .node.selected.image-node .resize-handle { display: block; }
      .node.mentioned-source { outline: 3px solid #e23d5b; outline-offset: 4px; }
      .node.mentioned-reference { outline: 3px solid #2b78e4; outline-offset: 4px; }
      .node.mentioned-output { outline: 3px solid #269b62; outline-offset: 4px; }
      .node.selected.mentioned-source, .node.selected.mentioned-reference, .node.selected.mentioned-output { outline-width: 5px; }
      .node img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; pointer-events: none; background: #f8fafb; }
      .continuation-marker { position: absolute; left: 50%; top: 50%; z-index: 15; display: grid; place-items: center; width: clamp(58px, 18%, 112px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid rgba(255,255,255,.28); border-radius: 999px; background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.18), rgba(35,31,29,.86) 58%, rgba(11,10,10,.92)); color: rgba(255,255,255,.72); font-size: 46px; font-weight: 900; line-height: 1; cursor: pointer; box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.36); opacity: .72; }
      .continuation-marker:hover { opacity: .92; color: #fff; transform: translate(-50%, -50%) scale(1.04); }
      .continuation-marker:active { transform: translate(-50%, -50%) scale(.98); }
      .continuation-marker.selected { opacity: 1; color: #fff; border-color: rgba(255,255,255,.82); box-shadow: inset 0 0 18px rgba(255,255,255,.1), 0 0 0 5px rgba(0,167,199,.36), 0 16px 40px rgba(0,0,0,.42); }
      .continuation-picker-toolbar { position: absolute; left: 50%; top: calc(50% + clamp(48px, 12%, 76px)); z-index: 16; display: flex; gap: 8px; align-items: center; padding: 8px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(29,29,28,.94); box-shadow: 0 14px 36px rgba(0,0,0,.32); }
      .continuation-picker-toolbar button { display: grid; place-items: center; width: 38px; height: 34px; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; font-weight: 900; cursor: pointer; }
      .continuation-picker-toolbar button:hover { background: rgba(255,255,255,.18); }
      .continuation-picker-toolbar [data-continuation-action="confirm"] { color: #7ee2a8; }
      .continuation-picker-toolbar [data-continuation-action="cancel"] { color: #ff6b7d; }
      .badge, .title { position: absolute; z-index: 2; left: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 8px; }
      .badge { top: 10px; padding: 5px 8px; background: rgba(23,32,39,.82); color: #fff; font-size: 12px; font-weight: 800; }
      .badge.source { background: #e23d5b; }
      .badge.reference { background: #2b78e4; }
      .badge.output { background: #269b62; }
      .title { bottom: 10px; padding: 7px 9px; background: rgba(255,255,255,.88); font-size: 13px; font-weight: 800; }
      .textnode { height: 100%; padding: 26px; display: flex; flex-direction: column; justify-content: center; background: #fffdf7; border-radius: 8px; }
      .textnode h3 { margin: 0 0 12px; font-size: 18px; }
      .textnode p { margin: 0; color: #42515b; line-height: 1.55; }
      .panel { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: #f8fafb; border-left: 1px solid #ccd5db; overflow: auto; z-index: 5; }
      .heading { display: flex; gap: 12px; align-items: center; }
      .bot { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: #1f7a8c; color: #fff; font-weight: 900; }
      h1 { margin: 0; font-size: 20px; }
      .heading p, .muted { margin: 4px 0 0; color: #62717c; font-size: 13px; line-height: 1.5; }
      .section { display: flex; flex-direction: column; gap: 10px; }
      .prompt-input-section { display: none; }
      .section.collapsible { border-top: 1px solid #e4eaee; padding-top: 10px; }
      .section-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 0; background: transparent; color: #42515b; font-size: 13px; font-weight: 900; text-align: left; }
      .section-toggle::after { content: "-"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #eef2f4; color: #52616b; }
      .section.collapsed .section-toggle::after { content: "+"; }
      .section-body { display: grid; gap: 10px; }
      .section.collapsed .section-body { display: none; }
      .section-title { color: #42515b; font-size: 13px; font-weight: 800; }
      .selection { display: grid; gap: 8px; }
      .item { display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; gap: 8px; padding: 10px; border: 1px solid #d7dee3; border-radius: 8px; background: #fff; }
      .item span { color: #1f7a8c; font-size: 12px; font-weight: 800; }
      .item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
      .rolebar { display: flex; flex-wrap: wrap; gap: 8px; }
      .mentionbar { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; }
      .mention-chip { display: inline-flex; align-items: center; max-width: 100%; gap: 6px; padding: 5px 9px 5px 5px; border-radius: 10px; background: #fff; color: #172027; border: 1px solid #d8e0e6; font-size: 12px; font-weight: 800; box-shadow: 0 1px 4px rgba(23,32,39,.08); }
      .mention-chip.dragging { opacity: .45; }
      .mention-chip.selected { border-color: #222; background: #f7f4ee; box-shadow: 0 0 0 2px rgba(34,34,34,.1); }
      .mention-chip img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; background: #eef2f4; }
      .mention-chip.source { border: 1px solid rgba(226,61,91,.28); background: #fff0f3; color: #b4213e; }
      .mention-chip.reference { border: 1px solid rgba(43,120,228,.28); background: #edf5ff; color: #1f5fb4; }
      .mention-chip.output { border: 1px solid rgba(38,155,98,.26); background: #ecf9f2; color: #167447; }
      .mention-chip.note { border: 1px solid rgba(82,97,107,.2); background: #f4f6f7; color: #52616b; }
      .mention-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .mention-chip em { font-style: normal; opacity: .75; }
      .download-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
      textarea { width: 100%; min-height: 122px; resize: vertical; border: 1px solid #cbd5dc; border-radius: 8px; padding: 12px; outline: 0; line-height: 1.5; }
      textarea::placeholder { color: #c6ccd1; }
      textarea:focus::placeholder { color: transparent; }
      textarea:focus { border-color: #1f7a8c; box-shadow: 0 0 0 3px rgba(31,122,140,.15); }
      pre { max-height: 260px; margin: 0; overflow: auto; white-space: pre-wrap; border: 1px solid #d7dee3; border-radius: 8px; padding: 12px; background: #fff; color: #293640; font: 12px/1.6 Consolas, monospace; }
      .note { padding: 12px; border: 1px solid #d7dee3; border-radius: 8px; background: #eef8f9; color: #42515b; font-size: 12px; line-height: 1.55; }
      .spin { animation: spin .9s linear infinite; display: inline-block; }
      @keyframes spin { to { transform: rotate(360deg); } }
      @media (max-width: 980px) {
        .home-main { padding: 80px 18px 32px; }
        .project-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
        .app { grid-template-columns: 56px minmax(0, 1fr); }
        .panel { position: absolute; right: 14px; bottom: 14px; width: min(370px, calc(100vw - 84px)); max-height: 58vh; border: 1px solid #ccd5db; border-radius: 8px; box-shadow: 0 18px 44px rgba(23,32,39,.18); }
        .panel.chat-mode { height: calc(100vh - 28px); max-height: calc(100vh - 28px); min-width: 0; width: min(560px, calc(100vw - 84px)); }
        .panel.chat-mode.tools-collapsed .chat-scroll { min-height: 0; }
      }
      .home, .app, .modal-backdrop .modal { font-family: "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; }
      .home *, .app *, .modal-backdrop .modal * { font-family: "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; }
      .home { background-color: #fcfbfa; background-image: linear-gradient(rgba(34,34,34,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(34,34,34,.025) 1px, transparent 1px); background-size: 66px 66px; color: #222; }
      .home-main { padding: 40px 4vw 48px; }
      .hero { width: min(1280px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; margin: 4vh 0 80px; }
      .hero h1 { margin: 0 0 22px; color: #222; font-family: "Segoe UI Light", "Microsoft YaHei UI Light", "Microsoft YaHei Light", "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: clamp(2.15rem, 3.15vw, 3rem); font-weight: 300 !important; line-height: 1.12; letter-spacing: .045em; text-shadow: none; }
      .hero p { display: block; margin: 0 0 28px; color: #888; font-size: .95rem; font-weight: 300; line-height: 1.7; letter-spacing: .02em; }
      .hero-box { width: min(820px, 100%); min-height: 0; border: 1px solid #e0dcd5; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.03); padding: 20px 28px; text-align: left; color: #222; transition: border-color .2s cubic-bezier(.22,1,.36,1), box-shadow .2s cubic-bezier(.22,1,.36,1), transform .2s cubic-bezier(.22,1,.36,1); }
      .hero-box:focus-within { border-color: #222; box-shadow: 0 16px 40px rgba(0,0,0,.05); transform: translateY(-2px); }
      .hero-box input { width: 100%; border: 0; outline: 0; background: transparent; color: #222; font: inherit; font-size: 17px; }
      .hero-box input::placeholder { color: #888; font-weight: 350; letter-spacing: .02em; }
      .hero-actions { display: none; }
      .projects { width: min(1280px, 100%); }
      .projects-head { margin-bottom: 24px; }
      .projects-head h2, .account-admin-head h2 { position: relative; margin: 0; color: #222; font-size: 24px; font-weight: 500; letter-spacing: .04em; }
      .projects-head h2::after, .account-admin-head h2::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 22px; height: 2px; background: #222; }
      .projects .ghost, .account-admin .ghost { min-height: 34px; padding: 0 14px; border: 1px solid #e0dcd5; border-radius: 4px; background: rgba(255,255,255,.72); color: #222; font-size: 13px; font-weight: 500; letter-spacing: .05em; }
      .projects .ghost:hover, .account-admin .ghost:hover { border-color: #222; background: #222; color: #fcfbfa; filter: none; }
      .project-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; max-height: 400px; overflow-y: auto; overflow-x: hidden; padding: 4px; overscroll-behavior: contain; scrollbar-gutter: stable; }
      .project-card { padding: 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; transition: transform .2s cubic-bezier(.22,1,.36,1), border-color .2s, background .2s, box-shadow .2s; }
      .project-card:hover { border-color: #f0efeb; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.03); transform: translateY(-2px); }
      .project-thumb { border: 1px solid #e0dcd5; border-radius: 2px; background: #f2efe9; color: #888; font-size: 2rem; font-weight: 300; }
      .project-thumb-placeholder { color: #9b9892; background: #f2efe9; }
      .project-delete, .project-rename { top: 20px; width: auto; height: 30px; min-height: 30px; padding: 0 9px; border: 1px solid #e0dcd5; border-radius: 4px; background: rgba(255,255,255,.94); font-size: 12px; font-weight: 500; box-shadow: 0 8px 20px rgba(34,34,34,.08); }
      .project-delete { right: 20px; color: #c64747; }
      .project-rename { right: 70px; color: #42515b; }
      .project-delete:hover { border-color: #c64747; background: #c64747; color: #fff; }
      .project-rename:hover { border-color: #222; background: #222; color: #fff; }
      .project-name { margin-top: 14px; color: #222; font-size: 14px; font-weight: 500; }
      .project-date { margin-top: 5px; color: #888; font-size: 12px; }
      .app { background-color: #fcfbfa; background-image: linear-gradient(rgba(34,34,34,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(34,34,34,.025) 1px, transparent 1px); background-size: 66px 66px; color: #222; }
      .app .rail { background: rgba(252,251,250,.92); border-right: 1px solid #e0dcd5; gap: 12px; padding: 18px 10px; }
      .app .logo { width: 30px; height: 30px; margin-bottom: 8px; border-radius: 6px; background: #222; color: #fcfbfa; font-size: 13px; font-weight: 500; letter-spacing: .04em; }
      .app .tool { width: 34px; height: 34px; border-radius: 4px; color: #222; font-size: 13px; font-weight: 500; }
      .app .tool:hover, .app .tool.active { background: #f2efe9; color: #222; filter: none; }
      .app .tool.danger { color: #c64747; }
      .app .rail-role-badge { border-radius: 4px; background: #f2efe9; color: #222; font-size: 10px; font-weight: 500; }
      .app .grid { background-image: linear-gradient(rgba(34,34,34,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(34,34,34,.035) 1px, transparent 1px); background-size: 66px 66px; }
      .app .topbar { top: 18px; left: 22px; right: 22px; min-height: 58px; max-height: 58px; padding: 9px 12px 9px 16px; border: 1px solid #e0dcd5; border-radius: 0; background: rgba(252,251,250,.86); box-shadow: 0 4px 12px rgba(0,0,0,.03); backdrop-filter: blur(8px); overflow: hidden; }
      .app .topbar > div:first-child { flex: 0 0 150px; min-width: 0; }
      .app .topbar .actions { flex: 1 1 auto; min-width: 0; gap: 8px; flex-wrap: nowrap; justify-content: flex-end; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
      .app .topbar .actions::-webkit-scrollbar { height: 4px; }
      .app .topbar .actions::-webkit-scrollbar-thumb { background: #d8d2c8; }
      .app .topbar strong { color: #222; font-size: 15px; font-weight: 500; letter-spacing: .04em; }
      .app .topbar span, .app .save-status, .app #scaleText { color: #888; font-size: 12px; font-weight: 300; }
      .app .save-status.auth-expired { color: #a23e48; min-width: max-content; }
      .app .save-status.auth-expired + #scaleText { display: none; }
      .app .project-name-line span { color: #222; font-weight: 500; }
      .app .rename-btn, .app .back, .app .ghost, .app .primary { flex: 0 0 auto; min-height: 32px; border: 1px solid #e0dcd5; border-radius: 2px; background: rgba(255,255,255,.72); color: #222; font-size: 12px; font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
      .app .rename-btn { min-height: 24px; padding: 0 8px; background: transparent; }
      .app .back, .app .ghost { padding: 0 10px; }
      .app .primary { padding: 0 14px; background: #222; color: #fcfbfa; border-color: #222; }
      .app .rename-btn:hover, .app .back:hover, .app .ghost:hover { border-color: #222; background: #222; color: #fcfbfa; filter: none; }
      .app .primary:hover { background: #000; filter: none; }
      .app .panel.chat-mode, .app .panel { background: rgba(252,251,250,.96); border-left: 1px solid #e0dcd5; color: #222; box-shadow: none; }
      .app .chat-header { padding: 14px 14px 12px 18px; border-bottom: 1px solid #e0dcd5; background: rgba(252,251,250,.96); }
      .app .chat-session-title { color: #222; font-size: 14px; font-weight: 500; letter-spacing: .02em; }
      .app .chat-session-subtitle, .app .guest-quick-current, .app .message-meta { color: #888; font-size: 11px; font-weight: 300; }
      .app .chat-icon-btn, .app .composer-tool-btn, .app .guest-quick-btn, .app .style-transfer-btn { border-radius: 4px; color: #222; font-weight: 500; }
      .app .chat-icon-btn:hover, .app .chat-icon-btn.active, .app .composer-tool-btn:hover, .app .guest-quick-btn:hover, .app .guest-quick-btn.active, .app .style-transfer-btn:hover, .app .style-transfer-btn.active { background: #f2efe9; color: #222; }
      .app .style-transfer-btn.full { background: #222; color: #fcfbfa; }
      .app .conversation-popover, .app .guest-quick-popover, .app .style-transfer-menu, .app .context-menu, .app .download-shelf { border: 1px solid #e0dcd5; border-radius: 0; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.06); }
      .app .conversation-popover h2, .app .guest-quick-head h2 { color: #222; font-size: 15px; font-weight: 500; }
      .app .conversation-search, .app .project-title-input, .app .field input, .app select, .app textarea { border: 1px solid #e0dcd5; border-radius: 2px; background: #fff; color: #222; font: inherit; font-size: 13px; box-shadow: none; }
      .app .conversation-search:focus, .app .project-title-input:focus, .app .field input:focus, .app select:focus, .app textarea:focus { outline: 0; border-color: #222; box-shadow: none; }
      .app .chat-scroll, .app .chat-composer { border-color: #e0dcd5; background: #fcfbfa; }
      .app .composer-box { border: 1px solid #e0dcd5; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.03); }
      .app .composer-box:focus-within { border-color: #222; box-shadow: 0 12px 32px rgba(0,0,0,.06); }
      .app .composer-editor { color: #222; font-size: 14px; font-weight: 300; line-height: 1.7; }
      .app .composer-editor:empty::before { color: #888; }
      .app .send-round { background: #222; color: #fcfbfa; }
      .app .send-round:hover { background: #000; }
      .app .send-round.pending-send { background: #8f2f2f; }
      .app .send-round.pending-send:hover { background: #6f2020; }
      .app .side-drawer { background: #fcfbfa; border-top: 0; }
      .app .section.collapsible { border-top: 1px solid #e0dcd5; padding-top: 12px; }
      .app .section-toggle, .app .section-title, .app .field label, .app .checkline { color: #222; font-size: 13px; font-weight: 500; letter-spacing: .02em; }
      .app .section-toggle::after { border-radius: 2px; background: #f2efe9; color: #888; font-weight: 300; }
      .app .note, .app pre { border: 1px solid #e0dcd5; border-radius: 2px; background: #fff; color: #666; }
      .app .chat-item, .app .history-item, .app .guest-quick-option, .app .style-transfer-menu button { border: 1px solid #f0efeb; border-radius: 2px; background: #fff; color: #222; font-weight: 300; }
      .app .chat-item:hover, .app .history-item:hover, .app .guest-quick-option:hover, .app .style-transfer-menu button:hover, .app .chat-item.active, .app .guest-quick-option.active, .app .style-transfer-menu button.active { border-color: #e0dcd5; background: #f2efe9; color: #222; }
      .app .conversation-item-title, .app .message-title, .app .history-item strong, .app .guest-quick-option strong, .app .style-transfer-menu strong { color: #222; font-weight: 500; }
      .app .conversation-item-preview, .app .message-body, .app .guest-quick-option span, .app .style-transfer-menu span, .app .muted, .app .heading p { color: #666; font-weight: 300; }
      .app .node { border: 1px solid rgba(34,34,34,.12); border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.06); }
      .app .node img, .app .textnode { border-radius: 4px; background: #fff; }
      .app .node.selected { outline-color: #222; box-shadow: 0 0 0 3px #fff, 0 0 0 11px rgba(34,34,34,.12), 0 18px 46px rgba(0,0,0,.14); }
      .app .node.selected::before, .app .node.selected::after, .app .resize-handle::after { border-color: #222; border-radius: 2px; }
      .app .node.overlap-warning.image-node { opacity: .5; outline: 6px solid #ff3b30; outline-offset: 7px; box-shadow: 0 0 0 3px #fff, 0 0 0 14px rgba(255,59,48,.18), 0 22px 60px rgba(255,59,48,.28); }
      .app .node.overlap-warning.image-node::before, .app .node.overlap-warning.image-node::after { border-color: #ff3b30; }
      .app .badge { border-radius: 2px; background: rgba(34,34,34,.82); font-weight: 500; }
      .app .title { border-radius: 2px; color: #222; font-weight: 500; }
      .app .drop-hint { border-color: #d8d2c8; border-radius: 2px; background: rgba(252,251,250,.82); color: #888; font-weight: 300; }
      .app .message.user .message-card { border-radius: 4px; background: #f2efe9; }
      .app .message.empty-state .message-card { border: 1px dashed #e0dcd5; border-radius: 4px; background: rgba(255,255,255,.62); }
      .app .mention-chip { border: 1px solid #e0dcd5; border-radius: 4px; background: #fff; color: #222; font-size: 12px; font-weight: 500; box-shadow: none; }
      .app .mention-chip.selected { border-color: #222; background: #f2efe9; box-shadow: 0 0 0 2px rgba(34,34,34,.08); }
      .app .item { border: 1px solid #e0dcd5; border-radius: 2px; background: #fff; }
      .app .item span, .app .detail-row, .app .detail-row span { color: #888; font-weight: 300; }
      .app .item strong, .app .detail-row strong { color: #222; font-weight: 500; }
      .modal-backdrop { background: rgba(252,251,250,.72); backdrop-filter: blur(10px); }
      .modal-backdrop .modal { border: 1px solid #e0dcd5; border-radius: 0; background: #fcfbfa; color: #222; box-shadow: 0 12px 32px rgba(0,0,0,.10); }
      .modal-backdrop .modal-head { border-bottom: 1px solid #f0efeb; padding-bottom: 12px; }
      .modal-backdrop .modal-head h2 { color: #222; font-size: 1.05rem; font-weight: 500; letter-spacing: .04em; }
      .modal-backdrop .modal p, .modal-backdrop .delete-project-text { color: #666; font-size: 14px; font-weight: 300; line-height: 1.7; }
      .modal-backdrop .modal-actions { border-top: 1px solid #f0efeb; padding-top: 12px; }
      .modal-backdrop .ghost, .modal-backdrop .primary, .modal-backdrop .danger-action, .modal-backdrop .modal-close-x { min-height: 34px; border: 1px solid #e0dcd5; border-radius: 2px; background: #fff; color: #222; font-size: 13px; font-weight: 500; letter-spacing: .04em; box-shadow: none; }
      .modal-backdrop .primary { border-color: #222; background: #222; color: #fcfbfa; }
      .modal-backdrop .danger-action { border-color: #c64747; background: #c64747; color: #fff; }
      .modal-backdrop input, .modal-backdrop select, .modal-backdrop textarea { border: 1px solid #e0dcd5; border-radius: 2px; background: #fff; color: #222; font: inherit; font-size: 13px; box-shadow: none; }
      .permission-card { border: 1px solid #e0dcd5; border-radius: 0; background: rgba(252,251,250,.72); box-shadow: none; }
      .permission-card-head h3 { color: #222; font-weight: 500; }
      .permission-card-head p { color: #888; font-weight: 300; }
      .permission-chip { border: 1px solid #e0dcd5; border-radius: 4px; background: #fff; color: #222; font-weight: 500; }
      .app ::-webkit-scrollbar, .home ::-webkit-scrollbar, .modal-backdrop ::-webkit-scrollbar { width: 6px; height: 6px; }
      .app ::-webkit-scrollbar-thumb, .home ::-webkit-scrollbar-thumb, .modal-backdrop ::-webkit-scrollbar-thumb { background: #d8d2c8; border-radius: 999px; }
      .app ::-webkit-scrollbar-track, .home ::-webkit-scrollbar-track, .modal-backdrop ::-webkit-scrollbar-track { background: transparent; }
      @media (max-width: 980px) {
        .home-main { padding: 80px 18px 32px; }
        .project-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
        .app .panel { border: 1px solid #e0dcd5; border-radius: 0; box-shadow: 0 12px 32px rgba(0,0,0,.10); }
        .app .topbar { max-height: none; align-items: flex-start; }
        .app .topbar .actions { justify-content: flex-start; padding-bottom: 4px; }
      }
