﻿:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --paper: #ffffff;
  --ink: #17211d;
  --muted: #66736c;
  --soft: #eef4f1;
  --line: #dce5df;
  --green: #0f7a4f;
  --green-dark: #095f3b;
  --graphite: #111917;
  --silver: #eef2f0;
  --warning: #95640f;
  --danger: #b42318;
  --shadow: 0 20px 58px rgba(17, 25, 23, .10);
  --surface: #ffffff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

/* v28: device-environment viewport fitting for APK, WeChat, and mobile browsers. */
@media (max-width: 980px) {
  html,
  body:not(.readiness-body) {
    width: var(--app-viewport-width, 100vw) !important;
    min-height: var(--app-viewport-height, 100svh) !important;
    overflow: hidden !important;
  }

  body:not(.readiness-body) .app-shell {
    height: var(--app-viewport-height, 100svh) !important;
    min-height: var(--app-viewport-height, 100svh) !important;
    max-height: var(--app-viewport-height, 100svh) !important;
  }

  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height, 50px)) !important;
    max-height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height, 50px)) !important;
  }

  body:not(.readiness-body) .chat-panel,
  body:not(.readiness-body).has-dialog .chat-panel {
    height: 100% !important;
    max-height: 100% !important;
  }

  body.app-env-compact-height:not(.readiness-body) .message-list,
  body.app-env-narrow:not(.readiness-body) .message-list {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

body.app-env-apk:not(.readiness-body) .topbar {
    min-height: var(--mobile-topbar-height, 50px) !important;
  }
}

/* v30: Android WebView IME alignment and image-only answer cards. */
@media (max-width: 720px) {
  body:not(.readiness-body) {
    --youyou-keyboard-lift: var(--composer-effective-bottom, var(--composer-keyboard-bottom, 0px));
  }

  body:not(.readiness-body) .composer.is-keyboard-active,
  body:not(.readiness-body).has-dialog .composer.is-keyboard-active,
  body:not(.readiness-body).native-keyboard-active .composer,
  body:not(.readiness-body).native-keyboard-active.has-dialog .composer {
    bottom: calc(max(7px, env(safe-area-inset-bottom, 0px)) + var(--youyou-keyboard-lift)) !important;
    z-index: 220 !important;
  }

  body:not(.readiness-body).composer-keyboard-active .messages,
  body:not(.readiness-body).native-keyboard-active .messages {
    scroll-padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
    padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
  }
}

body:not(.readiness-body) .image-card .image-open-button {
  display: block !important;
  height: auto !important;
  cursor: pointer !important;
}

body:not(.readiness-body) .image-card img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
  background: #f3f7f5;
}

/* v29: Android APK native keyboard bridge and external-media mode. */
@media (max-width: 720px) {
  body:not(.readiness-body) {
    --youyou-keyboard-lift: var(--composer-effective-bottom, var(--composer-keyboard-bottom, 0px));
  }

  body:not(.readiness-body) .composer.is-keyboard-active,
  body:not(.readiness-body).has-dialog .composer.is-keyboard-active,
  body:not(.readiness-body).native-keyboard-active .composer,
  body:not(.readiness-body).native-keyboard-active.has-dialog .composer {
    position: fixed !important;
    left: 9px !important;
    right: 9px !important;
    bottom: calc(max(7px, env(safe-area-inset-bottom, 0px)) + var(--youyou-keyboard-lift)) !important;
    z-index: 190 !important;
    width: auto !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    will-change: transform;
  }

  body:not(.readiness-body).composer-keyboard-active .messages,
  body:not(.readiness-body).native-keyboard-active .messages {
    scroll-padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
    padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
  }
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f9fbfa 0%, #f4f7f5 42%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
}

a {
  color: var(--green-dark);
}

.app-shell {
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #17211d);
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(15, 122, 79, .18);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 950;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

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

.top-actions a,
.top-actions button,
.ghost-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.tool-toggle {
  border-color: rgba(15, 122, 79, .28);
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 122, 79, .2);
  font-weight: 700;
}

.tool-toggle-btn,
.tool-close-btn {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.workspace {
  min-height: calc(100dvh - 90px);
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  gap: 14px;
}

.side-panel,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  position: relative;
}

.tool-close-btn {
  justify-self: end;
  display: none;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.intro-block {
  padding: 10px 0 8px;
}

.intro-block h1 {
  margin: 0;
  max-width: 10em;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.05;
  font-weight: 950;
}

.intro-block p,
.qr-panel p,
.chat-header p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.prompt-panel,
.package-panel,
.channel-panel,
.consult-panel,
.lead-panel,
.qr-panel {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.prompt-panel h2,
.package-panel h2,
.channel-panel h2,
.consult-panel h2,
.lead-panel h2,
.qr-panel h2,
.chat-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 950;
}

.package-panel p,
.channel-panel p,
.consult-panel p,
.lead-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.quick-grid button,
.package-grid button,
.consult-actions a,
.consult-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.quick-grid button:hover,
.quick-grid button.active,
.package-grid button:hover,
.package-grid button.active,
.consult-actions a:hover,
.consult-actions button:hover {
  border-color: rgba(15, 122, 79, .4);
  background: #edf7f2;
  color: var(--green-dark);
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.package-grid button {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.package-grid strong,
.package-grid span {
  display: block;
}

.package-grid strong {
  font-size: 14px;
}

.package-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.consult-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.consult-actions a,
.consult-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-align: center;
  text-decoration: none;
}

.consult-actions a {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 10px;
  border: 1px solid rgba(15, 122, 79, .18);
  border-radius: 8px;
  padding: 6px 10px;
  background: #f5fbf8;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.channel-form,
.channel-link-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.channel-form {
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: end;
}

.channel-form label,
.channel-link-field {
  min-width: 0;
}

.channel-form span,
.channel-link-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.channel-form input,
.channel-link-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fbfdfc;
  outline: none;
  font-size: 13px;
  line-height: 1.45;
}

.channel-link-field input {
  color: var(--green-dark);
  font-weight: 760;
}

.channel-form input:focus,
.channel-link-field input:focus {
  border-color: rgba(15, 122, 79, .45);
  box-shadow: 0 0 0 4px rgba(15, 122, 79, .08);
}

.channel-form button,
.channel-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.channel-form button,
.channel-actions button:first-child {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.channel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.channel-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.channel-share-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid rgba(15, 122, 79, .18);
  border-radius: 8px;
  padding: 10px;
  background: #f7fbf8;
}

.channel-share-card[hidden] {
  display: none;
}

.channel-qr-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  text-decoration: none;
}

.channel-qr-link img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.channel-share-copy {
  min-width: 0;
}

.channel-share-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.channel-share-copy p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
}

.channel-share-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.channel-share-actions button,
.channel-share-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  text-align: center;
  text-decoration: none;
}

.channel-share-actions button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.channel-share-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.channel-batch {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.channel-batch summary {
  min-height: 42px;
  padding: 11px 12px;
  color: var(--green-dark);
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.channel-batch[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f7fbf8;
}

.channel-batch p {
  margin: 10px 12px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.channel-batch textarea {
  display: block;
  width: calc(100% - 24px);
  min-width: 0;
  margin: 10px 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  resize: vertical;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.channel-batch textarea:focus {
  border-color: rgba(15, 122, 79, .45);
  box-shadow: 0 0 0 4px rgba(15, 122, 79, .08);
}

.channel-batch-actions {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 8px;
  margin: 10px 12px 12px;
}

.channel-batch-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.channel-batch-actions button:first-child {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.channel-batch-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.channel-batch-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.channel-batch-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  background: #fafcfb;
}

.channel-batch-item {
  border: 1px solid rgba(15, 122, 79, .16);
  border-radius: 8px;
  padding: 10px;
  background: #f7fbf8;
}

.channel-batch-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.channel-batch-item input {
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--green-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.channel-batch-item-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.channel-batch-item-actions button,
.channel-batch-item-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  text-align: center;
  text-decoration: none;
}

.channel-batch-item-actions button:first-child {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.lead-form {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.lead-form label {
  display: grid;
  gap: 5px;
}

.lead-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.lead-form input,
.lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fbfdfc;
  outline: none;
  font-size: 13px;
  line-height: 1.45;
}

.lead-form textarea {
  min-height: 78px;
  resize: vertical;
}

.lead-form .lead-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid rgba(15, 122, 79, .18);
  border-radius: 8px;
  padding: 10px;
  background: #f7fbf8;
}

.lead-form .lead-consent input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--green);
  box-shadow: none;
}

.lead-form .lead-consent span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.lead-form input:focus,
.lead-form textarea:focus {
  border-color: rgba(15, 122, 79, .45);
  box-shadow: 0 0 0 4px rgba(15, 122, 79, .08);
}

.lead-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lead-status {
  min-height: 34px;
  border: 1px solid rgba(15, 122, 79, .14);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f5fbf8;
}

.lead-status.is-success {
  color: var(--green-dark);
  border-color: rgba(15, 122, 79, .28);
  background: #edf7f2;
}

.lead-status.is-warning {
  color: var(--warning);
  border-color: rgba(149, 100, 15, .24);
  background: #fff8eb;
}

.lead-status.is-error {
  color: var(--danger);
  border-color: rgba(180, 35, 24, .24);
  background: #fff3f1;
}

.lead-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lead-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.lead-actions button:first-child {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.lead-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.readiness-body {
  min-height: 100vh;
  background: #f4f7f5;
}

.readiness-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.readiness-hero {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgba(15, 122, 79, .14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.readiness-back {
  justify-self: start;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.readiness-hero p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.readiness-hero h1 {
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
}

.status-pill {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.status-pill.is-ready,
.status-dot.is-ready {
  border-color: rgba(15, 122, 79, .34);
  background: #eaf7f0;
  color: var(--green-dark);
}

.status-pill.is-attention,
.status-dot.is-attention {
  border-color: rgba(149, 100, 15, .28);
  background: #fff5df;
  color: #8a5a0a;
}

.status-pill.is-missing,
.status-dot.is-missing {
  border-color: rgba(180, 35, 24, .28);
  background: #fff1ee;
  color: var(--danger);
}

.status-pill.is-loading,
.status-dot.is-loading {
  background: #eef2f1;
  color: var(--muted);
}

.readiness-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.readiness-summary div,
.env-panel,
.readiness-notes {
  border: 1px solid rgba(18, 23, 20, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(13, 37, 27, .06);
}

.readiness-summary div {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.readiness-summary span,
.readiness-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.readiness-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.readiness-heading {
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 18px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.readiness-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(18, 23, 20, .1);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.readiness-card.is-ready {
  border-color: rgba(15, 122, 79, .18);
}

.readiness-card.is-attention {
  border-color: rgba(149, 100, 15, .2);
}

.readiness-card.is-missing {
  border-color: rgba(180, 35, 24, .2);
}

.readiness-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 11px;
  height: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.readiness-card h3 {
  color: var(--ink);
  font-size: 17px;
}

.readiness-card p,
.readiness-card dd,
.readiness-notes li,
.env-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.readiness-card dl {
  display: grid;
  gap: 8px;
}

.readiness-card dt {
  margin-bottom: 2px;
}

.env-panel,
.readiness-notes {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
}

.env-panel {
  grid-template-columns: minmax(0, 1fr) auto;
}

.env-panel h2,
.readiness-notes h2 {
  color: var(--ink);
  font-size: 18px;
}

.env-panel button {
  align-self: start;
  min-height: 38px;
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.env-panel pre {
  grid-column: 1 / -1;
  overflow-x: auto;
  border: 1px solid rgba(18, 23, 20, .1);
  border-radius: 8px;
  padding: 12px;
  background: #101814;
  color: #e7fff1;
  font-size: 12px;
  line-height: 1.7;
}

.readiness-notes ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.readiness-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.readiness-links a {
  border: 1px solid rgba(15, 122, 79, .2);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f5fbf8;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.install-shell {
  width: min(1020px, calc(100% - 32px));
}

.install-hero {
  min-height: 260px;
  align-content: center;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.install-actions a {
  border: 1px solid rgba(15, 122, 79, .22);
  border-radius: 999px;
  padding: 10px 14px;
  background: #f5fbf8;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.install-actions .install-primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.install-card,
.install-note {
  border: 1px solid rgba(18, 23, 20, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(13, 37, 27, .06);
}

.install-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.install-card span {
  justify-self: start;
  border: 1px solid rgba(15, 122, 79, .2);
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf8f2;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.install-card h2,
.install-note h2 {
  color: var(--ink);
  font-size: 18px;
}

.install-card ol {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.install-card li,
.install-note p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.install-note {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 18px;
}

.qr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 14px;
  align-items: center;
}

.qr-panel img {
  display: block;
  width: 112px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-drawer-backdrop {
  display: none;
}

.chat-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  min-height: 0;
}

.chat-header {
  min-height: 74px;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
}

.chat-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-title-row > div {
  min-width: 0;
}

.chat-title-row p {
  margin-top: 5px;
}

.chat-title-row h2 {
  margin: 0;
}

.chat-quick-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.chat-quick-row::-webkit-scrollbar {
  display: none;
}

.chat-quick-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 32px;
  background: #f7fbf9;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
  outline: none;
}

.chat-quick-row button:hover,
.chat-quick-row button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.chat-quick-row button:focus-visible {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 2px rgba(15, 122, 79, .16);
}

.chat-empty-state {
  padding: 10px 18px 0;
}

.chat-empty-card {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: linear-gradient(135deg, #f7fbf9, #eff6f0);
}

.chat-empty-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(120deg, var(--green), #1f2d27);
  box-shadow: 0 10px 18px rgba(15, 122, 79, .24);
}

.empty-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.empty-greet {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.chat-empty-state .chat-empty-avatar + div .empty-title + .empty-greet {
  margin-bottom: 0;
}

.chat-suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chat-suggestion-grid button,
.composer-suggestion-row button {
  text-align: left;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
}

.chat-suggestion-grid button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-radius: 12px;
  min-height: 52px;
}

.suggestion-content {
  display: grid;
  gap: 2px;
}

.suggestion-icon {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: rgba(15, 122, 79, .1);
}

.suggestion-tag {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
}

.suggestion-title-text {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.chat-suggestion-grid button:hover,
.composer-suggestion-row button:hover,
.chat-suggestion-grid button:focus-visible,
.composer-suggestion-row button:focus-visible {
  border-color: rgba(15, 122, 79, .35);
  background: #edf7f2;
}

.chat-suggestion-grid button.active {
  border-color: rgba(15, 122, 79, .45);
  background: #edf7f2;
}

.composer-suggestion-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  margin-top: 4px;
  scrollbar-width: none;
}

.composer-suggestion-row::-webkit-scrollbar {
  display: none;
}

.composer-suggestion-row button {
  min-width: 160px;
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 10px;
  background: #f8fbf9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-suggestion-row button.active {
  border-color: rgba(15, 122, 79, .45);
  background: #edf7f2;
}

.composer-suggestion-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(15, 122, 79, .1);
}

.composer-suggestion-content {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.composer-suggestion-title {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.composer-suggestion-tip {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.messages {
  min-height: 0;
  overflow: auto;
  padding: 20px 18px;
  background:
    linear-gradient(180deg, rgba(238, 244, 241, .54), rgba(255, 255, 255, .9));
}

.message {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--graphite);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.bubble {
  max-width: min(820px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 25, 23, .05);
}

.user-message {
  justify-content: flex-end;
}

.user-message .bubble {
  max-width: min(680px, 90%);
  border-color: rgba(15, 122, 79, .22);
  background: #e9f6ef;
  color: #0a3f29;
  font-weight: 640;
}

.message-body {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.message-body a {
  font-weight: 850;
}

.comparison-table-wrap {
  max-width: 100%;
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  white-space: normal;
}

.comparison-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: #eef7f2;
  color: var(--green-dark);
  font-weight: 900;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 128px;
  font-weight: 850;
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

.link-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.section-label {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 950;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfdfc;
  text-decoration: none;
}

.link-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.link-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.link-item svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: var(--green);
}

.image-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.image-list .section-label {
  grid-column: 1 / -1;
}

.image-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.image-card a,
.image-card .image-open-button {
  display: block;
  color: inherit;
  text-decoration: none;
}

.image-card .image-open-button {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--silver);
}

.knowledge-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef8f2;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.knowledge-badge.is-locked {
  background: #e6f5ed;
  color: #08623d;
}

.video-list {
  margin-top: 12px;
}

.video-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scroll-snap-type: x proximity;
}

.video-card {
  flex: 0 0 min(230px, 74vw);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  scroll-snap-align: start;
}

.video-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.video-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--silver);
}

.video-meta {
  display: block;
  padding: 9px;
}

.video-meta strong,
.video-meta span,
.video-meta small {
  display: block;
}

.video-meta strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.video-meta small {
  margin-top: 5px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.video-meta span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.message-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.message-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.message-actions .feedback-button {
  color: var(--muted);
}

.message-actions .feedback-button[data-feedback="needs-human"] {
  color: var(--green-dark);
  border-color: rgba(15, 122, 79, .25);
}

.message-actions .feedback-button[data-feedback="inaccurate"] {
  color: var(--warning);
}

.message-actions .feedback-button.submitted {
  background: #edf7f2;
  color: var(--green-dark);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  padding: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
  position: sticky;
  bottom: 0;
}

.composer textarea {
  width: 100%;
  min-height: 54px;
  max-height: 146px;
  resize: vertical;
  box-sizing: border-box;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfdfc;
  outline: none;
  line-height: 1.55;
}

.composer textarea:focus {
  border-color: rgba(15, 122, 79, .45);
  box-shadow: 0 0 0 4px rgba(15, 122, 79, .08);
}

.composer button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.composer button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.composer-suggestion-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.composer svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 24px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  animation: bounce 1s infinite ease-in-out;
}

.typing i:nth-child(2) {
  animation-delay: .15s;
}

.typing i:nth-child(3) {
  animation-delay: .3s;
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 10px;
  }

  .install-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    max-width: 45%;
  }

  .workspace {
    min-height: calc(100dvh - 76px);
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: fixed;
    top: 74px;
    left: 10px;
    width: min(380px, calc(100vw - 20px));
    height: calc(100dvh - 94px);
    max-height: calc(100dvh - 94px);
    border-radius: 16px;
    z-index: 40;
    transform: translateX(-116%);
    transition: transform .26s ease;
    overflow: auto;
    box-shadow: var(--shadow);
  }

  .side-panel.is-open {
    transform: translateX(0);
  }

  .tool-close-btn {
    display: inline-flex;
  }

  .tool-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 122, 79, .22);
  }

  .tool-drawer-backdrop[hidden] {
    display: none;
  }

  .intro-block h1 {
    max-width: 12em;
    font-size: 30px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readiness-grid {
    grid-template-columns: 1fr;
  }

  .top-actions a,
  .top-actions button {
    min-height: 34px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  body.tool-drawer-open {
    overflow: hidden;
  }

  .readiness-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0 26px;
  }

  .readiness-hero,
  .env-panel,
  .readiness-notes {
    padding: 14px;
  }

  .readiness-hero h1 {
    font-size: 32px;
  }

  .readiness-summary {
    grid-template-columns: 1fr;
  }

  .env-panel {
    grid-template-columns: 1fr;
  }

  .env-panel button {
    width: 100%;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .top-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .top-actions a,
  .top-actions button {
    min-height: 34px;
    font-size: 12px;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand small {
    font-size: 11px;
  }

  .workspace {
    gap: 10px;
  }

  .side-panel {
    padding: 14px;
  }

  .intro-block h1 {
    font-size: 28px;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .package-grid {
    grid-template-columns: 1fr;
  }

  .channel-form {
    grid-template-columns: 1fr;
  }

  .channel-share-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .channel-share-actions {
    grid-template-columns: 1fr;
  }

  .channel-batch-actions,
  .channel-batch-item-actions {
    grid-template-columns: 1fr;
  }

  .qr-panel {
    grid-template-columns: 1fr 90px;
  }

  .qr-panel img {
    width: 90px;
    height: 90px;
  }

  .chat-header {
    min-height: 64px;
    padding: 12px;
    gap: 10px;
  }

  .chat-quick-row {
    margin-right: 8px;
  }

  .chat-quick-row button {
    min-height: 30px;
    font-size: 11px;
    padding: 0 10px;
  }

  .chat-empty-state {
    padding-top: 10px;
  }

  .chat-empty-card {
    padding: 10px;
    align-items: flex-start;
  }

  .chat-empty-avatar {
    margin-top: 2px;
  }

  .chat-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .chat-suggestion-grid button,
  .composer-suggestion-row button {
    min-height: 46px;
    font-size: 12px;
  }

  .messages {
    padding: 14px 10px;
  }

  .message {
    gap: 8px;
  }

  .avatar {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .bubble {
    padding: 12px;
  }

  .image-list {
    grid-template-columns: 1fr;
  }

  .composer {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .composer button {
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Doubao-style conversational workspace refresh */
body:not(.readiness-body) {
  overflow: hidden;
  background: #f5f6f7;
}

body:not(.readiness-body) .app-shell {
  width: 100%;
  max-width: none;
  height: 100dvh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  padding: 0;
}

body:not(.readiness-body) .topbar {
  min-height: 64px;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid #eceff1;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}

body:not(.readiness-body) .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #111917;
  box-shadow: none;
  font-size: 15px;
}

body:not(.readiness-body) .brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

body:not(.readiness-body) .brand small {
  color: #7a817d;
  font-size: 11px;
}

body:not(.readiness-body) .top-actions {
  gap: 8px;
}

body:not(.readiness-body) .top-actions a,
body:not(.readiness-body) .top-actions button,
body:not(.readiness-body) .ghost-button {
  min-height: 34px;
  border-radius: 999px;
  border-color: #e6e9e8;
  background: #fff;
  color: #2a312e;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 760;
  box-shadow: none;
}

body:not(.readiness-body) .tool-toggle {
  border-color: #111917;
  background: #111917;
  color: #fff;
}

body:not(.readiness-body) .workspace {
  width: min(1480px, 100%);
  height: calc(100dvh - 64px);
  min-height: 0;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  margin: 0 auto;
  border-left: 1px solid #eef0f1;
  border-right: 1px solid #eef0f1;
  background: #fff;
}

body.tool-panel-collapsed:not(.readiness-body) .workspace {
  width: min(1080px, 100%);
  grid-template-columns: minmax(0, 1fr);
  border-left: 0;
  border-right: 0;
}

body.tool-panel-collapsed:not(.readiness-body) .side-panel {
  display: none;
}

body:not(.readiness-body) .side-panel,
body:not(.readiness-body) .chat-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:not(.readiness-body) .side-panel {
  min-height: 0;
  overflow: auto;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-right: 1px solid #eceff1;
  background: #f7f8f9;
}

body:not(.readiness-body) .tool-close-btn {
  min-height: 32px;
  border-radius: 999px;
  font-weight: 800;
}

body:not(.readiness-body) .intro-block {
  border: 1px solid #e8ecea;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

body:not(.readiness-body) .intro-block h1 {
  max-width: none;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

body:not(.readiness-body) .intro-block p,
body:not(.readiness-body) .qr-panel p,
body:not(.readiness-body) .chat-header p {
  color: #6f7773;
  font-size: 12px;
  line-height: 1.55;
}

body:not(.readiness-body) .prompt-panel,
body:not(.readiness-body) .package-panel,
body:not(.readiness-body) .channel-panel,
body:not(.readiness-body) .consult-panel,
body:not(.readiness-body) .lead-panel,
body:not(.readiness-body) .qr-panel {
  border: 1px solid #e8ecea;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

body:not(.readiness-body) .prompt-panel h2,
body:not(.readiness-body) .package-panel h2,
body:not(.readiness-body) .channel-panel h2,
body:not(.readiness-body) .consult-panel h2,
body:not(.readiness-body) .lead-panel h2,
body:not(.readiness-body) .qr-panel h2,
body:not(.readiness-body) .chat-header h2 {
  font-size: 15px;
  font-weight: 850;
}

body:not(.readiness-body) .quick-grid,
body:not(.readiness-body) .package-grid {
  gap: 7px;
}

body:not(.readiness-body) .quick-grid button,
body:not(.readiness-body) .package-grid button,
body:not(.readiness-body) .consult-actions a,
body:not(.readiness-body) .consult-actions button,
body:not(.readiness-body) .channel-form button,
body:not(.readiness-body) .channel-actions button,
body:not(.readiness-body) .lead-actions button,
body:not(.readiness-body) .channel-batch-actions button,
body:not(.readiness-body) .channel-batch-item-actions button,
body:not(.readiness-body) .channel-batch-item-actions a,
body:not(.readiness-body) .channel-share-actions button,
body:not(.readiness-body) .channel-share-actions a {
  border-radius: 12px;
  border-color: #e7ebe9;
  background: #f9fafb;
  color: #232b27;
  box-shadow: none;
}

body:not(.readiness-body) .quick-grid button:hover,
body:not(.readiness-body) .quick-grid button.active,
body:not(.readiness-body) .package-grid button:hover,
body:not(.readiness-body) .package-grid button.active,
body:not(.readiness-body) .consult-actions a:hover,
body:not(.readiness-body) .consult-actions button:hover {
  border-color: rgba(15, 122, 79, .26);
  background: #eef8f2;
  color: var(--green-dark);
}

body:not(.readiness-body) .channel-form button,
body:not(.readiness-body) .channel-actions button:first-child,
body:not(.readiness-body) .consult-actions a,
body:not(.readiness-body) .lead-actions button:first-child,
body:not(.readiness-body) .channel-batch-actions button:first-child,
body:not(.readiness-body) .channel-batch-item-actions button:first-child,
body:not(.readiness-body) .channel-share-actions button {
  border-color: #111917;
  background: #111917;
  color: #fff;
}

body:not(.readiness-body) .channel-badge,
body:not(.readiness-body) .lead-status {
  border-radius: 12px;
  border-color: #e4ebe7;
  background: #f4faf7;
}

body:not(.readiness-body) .channel-form input,
body:not(.readiness-body) .channel-link-field input,
body:not(.readiness-body) .channel-batch textarea,
body:not(.readiness-body) .channel-batch-item input,
body:not(.readiness-body) .lead-form input,
body:not(.readiness-body) .lead-form textarea {
  border-radius: 12px;
  border-color: #e6ebe8;
  background: #fbfcfc;
}

body:not(.readiness-body) .channel-share-card,
body:not(.readiness-body) .channel-batch,
body:not(.readiness-body) .channel-batch-item,
body:not(.readiness-body) .lead-form .lead-consent {
  border-radius: 14px;
  border-color: #e6ebe8;
  background: #fbfcfc;
}

body:not(.readiness-body) .chat-panel {
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: #fff;
}

body:not(.readiness-body) .chat-header {
  min-height: 72px;
  gap: 10px;
  padding: 14px clamp(16px, 4vw, 42px) 8px;
  border-bottom: 0;
  background: rgba(255, 255, 255, .96);
}

body:not(.readiness-body) .chat-title-row,
body:not(.readiness-body) .chat-quick-row,
body:not(.readiness-body) .chat-empty-state,
body:not(.readiness-body) .message {
  width: min(920px, 100%);
  margin-left: auto;
  margin-right: auto;
}

body:not(.readiness-body) .chat-title-row h2 {
  font-size: 18px;
}

body:not(.readiness-body) .chat-title-row p {
  margin-top: 3px;
}

body:not(.readiness-body) .chat-quick-row {
  padding: 2px 0 8px;
}

body:not(.readiness-body) .chat-quick-row button {
  min-height: 34px;
  border-radius: 999px;
  border-color: #e7ebe9;
  background: #f7f8f8;
  color: #343c38;
  padding: 0 13px;
  font-weight: 720;
}

body:not(.readiness-body) .chat-quick-row button:hover,
body:not(.readiness-body) .chat-quick-row button.active {
  border-color: #111917;
  background: #111917;
  color: #fff;
}

body:not(.readiness-body) .chat-empty-state {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 6vh, 62px) clamp(14px, 3vw, 28px) 8px;
}

body:not(.readiness-body) .chat-empty-state[hidden] {
  display: none;
}

body:not(.readiness-body) .chat-empty-card {
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

body:not(.readiness-body) .chat-empty-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #111917;
  box-shadow: none;
}

body:not(.readiness-body) .empty-title {
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.18;
  font-weight: 860;
}

body:not(.readiness-body) .empty-greet {
  text-align: left;
  font-size: 13px;
}

body:not(.readiness-body) .chat-suggestion-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body:not(.readiness-body) .chat-suggestion-grid button {
  min-height: 96px;
  grid-template-columns: 1fr;
  align-content: space-between;
  gap: 12px;
  border-radius: 18px;
  border-color: #e7ebe9;
  padding: 14px;
  background: #fafafa;
}

body:not(.readiness-body) .suggestion-icon,
body:not(.readiness-body) .composer-suggestion-icon {
  color: var(--green-dark);
  background: #eef8f2;
}

body:not(.readiness-body) .suggestion-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

body:not(.readiness-body) .suggestion-icon svg,
body:not(.readiness-body) .composer-suggestion-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

body:not(.readiness-body) .suggestion-title-text {
  font-size: 14px;
  font-weight: 820;
}

body:not(.readiness-body) .messages {
  min-height: 0;
  overflow: auto;
  padding: 18px clamp(14px, 4vw, 42px) 18px;
  background: #fff;
}

body:not(.readiness-body) .message {
  margin-bottom: 18px;
}

body:not(.readiness-body) .assistant-message .bubble {
  max-width: min(820px, calc(100% - 48px));
  border: 0;
  border-radius: 0;
  padding: 2px 0 0;
  background: transparent;
  box-shadow: none;
}

body:not(.readiness-body) .avatar {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #111917;
  font-size: 14px;
}

body:not(.readiness-body) .user-message .bubble {
  max-width: min(680px, 82%);
  border: 0;
  border-radius: 18px 18px 6px 18px;
  padding: 12px 15px;
  background: #edf8f1;
  color: #103f2a;
  box-shadow: none;
}

body:not(.readiness-body) .message-body {
  font-size: 15px;
  line-height: 1.78;
}

body:not(.readiness-body) .link-item {
  border-radius: 14px;
  border-color: #e7ebe9;
  background: #fbfcfc;
  padding: 11px 12px;
}

body:not(.readiness-body) .image-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body:not(.readiness-body) .image-card {
  border-radius: 14px;
  border-color: #e7ebe9;
}

body:not(.readiness-body) .video-card {
  border-radius: 14px;
  border-color: #e7ebe9;
}

body:not(.readiness-body) .image-card img {
  aspect-ratio: 1 / 1;
}

body:not(.readiness-body) .followup-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body:not(.readiness-body) .followup-row::-webkit-scrollbar {
  display: none;
}

body:not(.readiness-body) .followup-row:empty {
  display: none;
}

body:not(.readiness-body) .followup-row button,
body:not(.readiness-body) .message-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #e6ebe8;
  border-radius: 999px;
  padding: 0 11px;
  background: #fff;
  color: #424b46;
  font-size: 12px;
  font-weight: 740;
}

body:not(.readiness-body) .followup-row button:hover,
body:not(.readiness-body) .message-actions button:hover {
  border-color: rgba(15, 122, 79, .28);
  background: #f0faf4;
  color: var(--green-dark);
}

body:not(.readiness-body) .composer {
  width: min(920px, calc(100% - 28px));
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: end;
  gap: 8px;
  margin: 0 auto 16px;
  padding: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border: 1px solid #e3e8e5;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(18, 24, 21, .10);
}

body:not(.readiness-body) .composer textarea {
  grid-column: 1 / -1;
  min-height: 48px;
  max-height: 190px;
  border: 0;
  border-radius: 16px;
  padding: 12px 12px 10px;
  background: transparent;
  resize: none;
  font-size: 15px;
  line-height: 1.55;
  overflow-y: hidden;
  scrollbar-width: thin;
}

body:not(.readiness-body) .composer textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

body:not(.readiness-body) .composer #sendBtn {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  border-radius: 999px;
  background: #111917;
  color: #fff;
  padding: 0;
}

body:not(.readiness-body) .composer #sendBtn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body:not(.readiness-body) .composer-suggestion-row {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

body:not(.readiness-body) .composer-suggestion-row button {
  flex: 0 0 auto;
  min-width: 156px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e7ebe9;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f8f9f9;
  color: #28312c;
}

body:not(.readiness-body) .composer-suggestion-title {
  font-size: 12px;
  font-weight: 760;
}

body:not(.readiness-body) .composer-suggestion-tip {
  display: none;
}

@media (max-width: 1120px) {
  body:not(.readiness-body) .workspace {
    grid-template-columns: 292px minmax(0, 1fr);
  }

  body:not(.readiness-body) .chat-suggestion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body:not(.readiness-body) {
    overflow: hidden;
  }

  body:not(.readiness-body) .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  body:not(.readiness-body) .topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    padding: 8px 10px;
  }

  body:not(.readiness-body) .brand small,
  body:not(.readiness-body) .top-actions a {
    display: none;
  }

  body:not(.readiness-body) .top-actions a#installGuideLink {
    display: inline-flex;
  }

  body:not(.readiness-body) .workspace {
    width: 100%;
    height: calc(100dvh - 58px);
    min-height: 0;
    grid-template-columns: 1fr;
    border: 0;
  }

  body:not(.readiness-body) .side-panel {
    position: fixed;
    top: 10px;
    left: 10px;
    width: min(390px, calc(100vw - 20px));
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 12px;
    border: 1px solid #e8ecea;
    border-radius: 20px;
    z-index: 40;
    transform: translateX(-112%);
    transition: transform .24s ease;
    box-shadow: 0 24px 80px rgba(18, 24, 21, .22);
  }

  body:not(.readiness-body) .side-panel.is-open {
    transform: translateX(0);
  }

  body:not(.readiness-body) .tool-close-btn {
    display: inline-flex;
  }

  body:not(.readiness-body) .tool-drawer-backdrop {
    background: rgba(17, 25, 23, .28);
    backdrop-filter: blur(3px);
  }

  body:not(.readiness-body) .chat-header {
    min-height: auto;
    padding: 12px 12px 4px;
  }

  body:not(.readiness-body) .chat-title-row,
  body:not(.readiness-body) .chat-quick-row,
  body:not(.readiness-body) .chat-empty-state,
  body:not(.readiness-body) .message {
    width: 100%;
  }

  body:not(.readiness-body) .chat-title-row h2 {
    font-size: 16px;
  }

  body:not(.readiness-body) .chat-title-row p {
    font-size: 11px;
  }

  body:not(.readiness-body) .chat-quick-row {
    padding-bottom: 8px;
  }

  body:not(.readiness-body) .messages {
    padding: 12px 12px 12px;
  }

  body:not(.readiness-body) .composer {
    width: calc(100% - 20px);
    margin-bottom: 10px;
  }
}

@media (max-width: 640px) {
  body:not(.readiness-body) .topbar {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  body:not(.readiness-body) .brand strong {
    font-size: 15px;
  }

  body:not(.readiness-body) .top-actions {
    justify-content: flex-end;
  }

  body:not(.readiness-body) .top-actions a#installGuideLink {
    min-height: 32px;
    padding: 0 10px;
  }

  body:not(.readiness-body) .chat-title-row {
    align-items: center;
  }

  body:not(.readiness-body) .chat-title-row p {
    max-width: 210px;
  }

  body:not(.readiness-body) .ghost-button {
    min-height: 32px;
    padding: 0 10px;
  }

  body:not(.readiness-body) .chat-empty-state {
    padding: 28px 12px 8px;
  }

  body:not(.readiness-body) .chat-empty-card {
    justify-content: flex-start;
  }

  body:not(.readiness-body) .empty-title {
    font-size: 23px;
  }

  body:not(.readiness-body) .chat-suggestion-grid {
    grid-template-columns: 1fr;
  }

  body:not(.readiness-body) .chat-suggestion-grid button {
    min-height: 72px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-content: center;
  }

  body:not(.readiness-body) .image-list {
    grid-template-columns: 1fr;
  }

  body:not(.readiness-body) .assistant-message .bubble {
    max-width: calc(100% - 40px);
  }

  body:not(.readiness-body) .user-message .bubble {
    max-width: 88%;
  }

  body:not(.readiness-body) .composer {
    grid-template-columns: minmax(0, 1fr) 42px;
    border-radius: 20px;
  }

  body:not(.readiness-body) .composer #sendBtn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  body:not(.readiness-body) .composer-suggestion-row button {
    min-width: 142px;
  }
}

/* Minimal Youyou AI assistant mode: chat first, tools on demand. */
body:not(.readiness-body) .conversation-panel {
  display: grid;
  gap: 10px;
  min-height: 0;
}

body:not(.readiness-body) .conversation-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 4px 2px 2px;
}

body:not(.readiness-body) .conversation-head strong {
  min-width: 0;
  color: #111917;
  font-size: 17px;
  font-weight: 920;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not(.readiness-body) .conversation-head button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  background: #111917;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

body:not(.readiness-body) .conversation-search {
  display: block;
}

body:not(.readiness-body) .conversation-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #e6ebe8;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: #111917;
  outline: none;
  font-size: 13px;
}

body:not(.readiness-body) .conversation-search input:focus {
  border-color: rgba(15, 122, 79, .35);
  box-shadow: 0 0 0 4px rgba(15, 122, 79, .08);
}

body:not(.readiness-body) .chat-session-list {
  display: grid;
  gap: 4px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

body:not(.readiness-body) .chat-session-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: transparent;
  color: #25302c;
  text-align: left;
  cursor: pointer;
}

body:not(.readiness-body) .chat-session-item:hover {
  background: #edf1ef;
}

body:not(.readiness-body) .chat-session-item.active {
  background: #e6f4ed;
  color: #0b5e3e;
  font-weight: 850;
}

body:not(.readiness-body) .chat-session-item span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

body:not(.readiness-body) .chat-session-item small {
  color: #7b8681;
  font-size: 11px;
  font-weight: 700;
}

body:not(.readiness-body) .chat-session-empty {
  margin: 4px 2px;
  color: #7b8681;
  font-size: 13px;
}

body:not(.readiness-body) .side-panel > :not(.conversation-panel):not(.tool-close-btn) {
  display: none;
}

body:not(.readiness-body) .side-panel.is-open > :not(.conversation-panel):not(.tool-close-btn) {
  display: block;
}

body:not(.readiness-body) .top-actions a {
  display: none;
}

body:not(.readiness-body) .workspace,
body.tool-panel-collapsed:not(.readiness-body) .workspace {
  width: min(1080px, 100%);
  height: calc(100dvh - 64px);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  border-left: 0;
  border-right: 0;
  background: #fff;
}

body:not(.readiness-body) .side-panel,
body.tool-panel-collapsed:not(.readiness-body) .side-panel {
  display: grid;
  position: fixed;
  top: 74px;
  left: 16px;
  width: min(360px, calc(100vw - 32px));
  height: calc(100dvh - 90px);
  max-height: calc(100dvh - 90px);
  z-index: 40;
  border: 1px solid #e8ecea;
  border-radius: 22px;
  overflow: auto;
  transform: translateX(-118%);
  transition: transform .24s ease;
  box-shadow: 0 28px 90px rgba(17, 25, 23, .20);
}

body:not(.readiness-body) .side-panel.is-open {
  transform: translateX(0);
}

body:not(.readiness-body) .tool-close-btn {
  display: inline-flex;
}

body:not(.readiness-body) .tool-drawer-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(17, 25, 23, .20);
  backdrop-filter: blur(3px);
}

body:not(.readiness-body) .tool-drawer-backdrop[hidden] {
  display: none;
}

body:not(.readiness-body):not(.has-dialog) .messages {
  display: none;
}

body:not(.readiness-body):not(.has-dialog) .chat-panel {
  grid-template-rows: minmax(0, 1fr) auto;
}

body:not(.readiness-body):not(.has-dialog) .chat-header {
  display: none;
}

body:not(.readiness-body):not(.has-dialog) .chat-empty-state {
  align-content: center;
  padding-top: 0;
  padding-bottom: 18px;
}

body:not(.readiness-body) .chat-title-row,
body:not(.readiness-body) .chat-quick-row,
body:not(.readiness-body) .chat-empty-state,
body:not(.readiness-body) .message,
body:not(.readiness-body) .composer {
  width: min(860px, calc(100% - 32px));
}

body:not(.readiness-body) .chat-header {
  padding-left: 0;
  padding-right: 0;
}

body:not(.readiness-body) .chat-title-row {
  padding-top: 4px;
}

body:not(.readiness-body) .chat-quick-row {
  padding-bottom: 10px;
}

body:not(.readiness-body) .chat-suggestion-grid {
  width: min(700px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: center;
}

body:not(.readiness-body) .chat-suggestion-grid button {
  min-height: 84px;
  background: #f7f8f8;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

body:not(.readiness-body) .chat-suggestion-grid button:hover {
  transform: translateY(-1px);
}

body:not(.readiness-body) .composer {
  margin-bottom: 18px;
}

@media (min-width: 981px) {
  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    width: min(1320px, 100%);
    grid-template-columns: 288px minmax(0, 1fr);
    border-left: 1px solid #eef0f1;
    border-right: 1px solid #eef0f1;
  }

  body:not(.readiness-body) .side-panel,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel {
    display: grid;
    position: static;
    width: auto;
    height: calc(100dvh - 64px);
    max-height: calc(100dvh - 64px);
    min-height: 0;
    align-content: start;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 0;
    border-right: 1px solid #eceff1;
    border-radius: 0;
    background: #f7f8f9;
    box-shadow: none;
    overflow: hidden;
    transform: none;
    transition: none;
  }

  body:not(.readiness-body) .side-panel.is-open {
    grid-template-rows: auto auto auto auto auto auto auto auto;
    overflow: auto;
    transform: none;
  }

  body:not(.readiness-body) .tool-close-btn,
  body:not(.readiness-body) .tool-drawer-backdrop {
    display: none;
  }

  body:not(.readiness-body) .conversation-panel {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    width: 100%;
    height: calc(100dvh - 58px);
  }

  body:not(.readiness-body) .side-panel,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel {
    top: 10px;
    left: 10px;
    width: min(390px, calc(100vw - 20px));
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
  }

  body:not(.readiness-body) .chat-title-row,
  body:not(.readiness-body) .chat-quick-row,
  body:not(.readiness-body) .chat-empty-state,
  body:not(.readiness-body) .message,
  body:not(.readiness-body) .composer {
    width: calc(100% - 20px);
  }
}

@media (max-width: 640px) {
  body:not(.readiness-body) .composer textarea {
    max-height: 150px;
  }

  body:not(.readiness-body) .chat-suggestion-grid {
    grid-template-columns: 1fr;
  }

  body:not(.readiness-body) .topbar {
    min-height: 58px;
  }

  body:not(.readiness-body) .chat-empty-state {
    padding-bottom: 10px;
  }
}

/* v15: logo, model badge, wider Doubao-like workspace, stronger composer. */
body:not(.readiness-body) .brand-mark,
body:not(.readiness-body) .avatar,
body:not(.readiness-body) .chat-empty-avatar {
  overflow: hidden;
  background: #268447;
}

body:not(.readiness-body) .brand-mark img,
body:not(.readiness-body) .avatar img,
body:not(.readiness-body) .chat-empty-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body:not(.readiness-body) .avatar {
  padding: 0;
}

body:not(.readiness-body) .chat-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body:not(.readiness-body) .model-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dfe7e2;
  border-radius: 999px;
  padding: 0 12px;
  background: #f0faf4;
  color: #0c7047;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

body:not(.readiness-body) .model-badge::before,
body:not(.readiness-body) .composer-model-dot {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a05d;
  box-shadow: 0 0 0 4px rgba(22, 160, 93, .12);
}

body:not(.readiness-body) .workspace,
body.tool-panel-collapsed:not(.readiness-body) .workspace {
  width: 100%;
  max-width: none;
}

@media (min-width: 981px) {
  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    width: 100%;
    max-width: none;
    grid-template-columns: 256px minmax(0, 1fr);
    border-left: 0;
    border-right: 0;
  }

  body:not(.readiness-body) .side-panel,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel {
    padding: 12px 8px 12px 14px;
  }

  body:not(.readiness-body) .chat-title-row,
  body:not(.readiness-body) .chat-quick-row,
  body:not(.readiness-body) .chat-empty-state,
  body:not(.readiness-body) .message,
  body:not(.readiness-body) .composer {
    width: min(1120px, calc(100% - 56px));
  }

  body:not(.readiness-body) .chat-panel {
    background: #fff;
  }
}

body:not(.readiness-body) .composer {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
  padding: 14px;
  border: 2px solid #d5dfda;
  border-radius: 28px;
  background: #fff;
  box-shadow:
    0 22px 58px rgba(18, 24, 21, .13),
    0 0 0 8px rgba(15, 122, 79, .045);
}

body:not(.readiness-body) .composer:focus-within {
  border-color: rgba(15, 122, 79, .56);
  box-shadow:
    0 24px 64px rgba(18, 24, 21, .16),
    0 0 0 8px rgba(15, 122, 79, .09);
}

body:not(.readiness-body) .composer-topline {
  grid-column: 1 / -1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: #63706a;
  font-size: 12px;
  font-weight: 760;
}

body:not(.readiness-body) .composer textarea {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 68px;
  padding: 4px 4px 6px;
  color: #111917;
  font-size: 16px;
  background: #fff;
}

body:not(.readiness-body) .composer textarea::placeholder {
  color: #8a9690;
}

body:not(.readiness-body) .composer #sendBtn {
  grid-row: 3;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  background: #121a17;
}

body:not(.readiness-body) .composer-suggestion-row {
  grid-row: 3;
}

/* v16: Doubao-like navigation, deletable sessions, mobile overlap fixes. */
body:not(.readiness-body) .tool-label-mobile {
  display: none;
}

body:not(.readiness-body) .chat-session-item {
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 4px;
  padding: 3px;
}

body:not(.readiness-body) .chat-session-open {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 0 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

body:not(.readiness-body) .chat-session-delete {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  align-self: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8b9691;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .65;
}

body:not(.readiness-body) .chat-session-delete:hover,
body:not(.readiness-body) .chat-session-delete:focus-visible {
  background: #ffecec;
  color: #b42318;
  opacity: 1;
}

body:not(.readiness-body) .chat-session-item.active .chat-session-open {
  color: #0b5e3e;
  font-weight: 850;
}

@media (max-width: 980px) {
  body:not(.readiness-body) .tool-label-desktop {
    display: none;
  }

  body:not(.readiness-body) .tool-label-mobile {
    display: inline;
  }

  body:not(.readiness-body) .app-shell {
    grid-template-rows: 56px minmax(0, 1fr);
  }

  body:not(.readiness-body) .topbar {
    min-height: 56px;
    height: 56px;
    padding: 0 10px;
    gap: 8px;
  }

  body:not(.readiness-body) .brand {
    min-width: 0;
  }

  body:not(.readiness-body) .brand strong {
    max-width: 9em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
  }

  body:not(.readiness-body) .brand small {
    display: none;
  }

  body:not(.readiness-body) .top-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  body:not(.readiness-body) .top-actions button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  body:not(.readiness-body) #installBtn {
    display: none;
  }

  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    height: calc(100dvh - 56px);
    min-height: 0;
  }

  body:not(.readiness-body) .chat-panel {
    height: calc(100dvh - 56px);
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body:not(.readiness-body) .chat-header {
    min-height: 44px;
    padding: 6px 10px 2px;
  }

  body:not(.readiness-body) .chat-title-row {
    align-items: center;
    gap: 8px;
  }

  body:not(.readiness-body) .chat-title-row h2 {
    font-size: 15px;
  }

  body:not(.readiness-body) .chat-title-row p,
  body:not(.readiness-body) .chat-quick-row {
    display: none;
  }

  body:not(.readiness-body) .chat-title-actions {
    gap: 6px;
  }

  body:not(.readiness-body) .model-badge {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  body:not(.readiness-body) .ghost-button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  body:not(.readiness-body) .messages {
    min-height: 0;
    padding: 8px 0 4px;
  }

  body:not(.readiness-body) .message {
    width: calc(100% - 18px);
  }

  body:not(.readiness-body) .composer {
    width: calc(100% - 16px);
    margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 10px;
    border-radius: 22px;
  }

  body:not(.readiness-body) .composer-topline {
    min-height: 18px;
    font-size: 11px;
  }

  body:not(.readiness-body) .composer textarea {
    min-height: 76px;
    max-height: 136px;
    padding: 2px 2px 4px;
  }

  body:not(.readiness-body) .composer-suggestion-row button {
    min-width: 128px;
    min-height: 34px;
    padding: 6px 9px;
  }

  body:not(.readiness-body) .composer #sendBtn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
  }

  body:not(.readiness-body) .side-panel,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel {
    top: 8px;
    left: 8px;
    width: min(330px, calc(100vw - 16px));
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 10px;
    border-radius: 18px;
    overflow: hidden;
  }

  body:not(.readiness-body) .side-panel.is-open > :not(.conversation-panel):not(.tool-close-btn) {
    display: none;
  }

  body:not(.readiness-body) .tool-close-btn {
    display: inline-flex;
    justify-self: start;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    background: #eef2ef;
    color: #26302c;
    font-size: 13px;
  }

  body:not(.readiness-body) .conversation-panel {
    min-height: 0;
  }

  body:not(.readiness-body) .chat-session-list {
    max-height: calc(100dvh - 158px);
  }
}

@media (max-width: 640px) {
  body:not(.readiness-body) .brand-mark {
    width: 32px;
    height: 32px;
  }

  body:not(.readiness-body) .model-badge {
    min-height: 30px;
  }

  body:not(.readiness-body) .composer {
    width: calc(100% - 18px);
    border-radius: 24px;
    padding: 12px;
  }

  body:not(.readiness-body) .composer textarea {
    min-height: 84px;
    max-height: 150px;
    font-size: 15px;
  }
}

/* v17: app-like mobile shell and more reliable AI-style history navigation. */
body:not(.readiness-body) .side-panel {
  isolation: isolate;
}

body:not(.readiness-body) .conversation-panel {
  position: relative;
  z-index: 2;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

body:not(.readiness-body) .chat-session-list {
  max-height: min(420px, calc(100dvh - 184px));
  overflow: auto;
}

body:not(.readiness-body) .chat-session-item,
body:not(.readiness-body) .chat-session-open,
body:not(.readiness-body) .chat-session-delete {
  position: relative;
  z-index: 3;
}

body:not(.readiness-body) .chat-session-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

body:not(.readiness-body) .side-panel.is-open .intro-block {
  position: relative;
  z-index: 1;
}

@media (max-width: 980px) {
  body:not(.readiness-body) {
    background: #fff;
  }

  body:not(.readiness-body) .app-shell {
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    padding: 0;
    grid-template-rows: calc(54px + env(safe-area-inset-top, 0px)) minmax(0, 1fr);
  }

  body:not(.readiness-body) .topbar {
    height: calc(54px + env(safe-area-inset-top, 0px));
    min-height: calc(54px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 10px 0;
    border-bottom: 1px solid #eef0f1;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
  }

  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    height: calc(100dvh - 54px - env(safe-area-inset-top, 0px));
    border: 0;
  }

  body:not(.readiness-body) .chat-panel {
    height: calc(100dvh - 54px - env(safe-area-inset-top, 0px));
    border: 0;
  }

  body:not(.readiness-body) .chat-header {
    min-height: 40px;
    padding: 5px 10px 0;
  }

  body:not(.readiness-body) .messages {
    padding: 8px 0 2px;
  }

  body:not(.readiness-body) .composer {
    width: calc(100% - 16px);
    margin: 0 auto calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 10px;
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(18, 24, 21, .14);
  }

  body:not(.readiness-body) .composer textarea {
    min-height: 86px;
    max-height: 132px;
  }

  body:not(.readiness-body) .side-panel,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel {
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: 8px;
    width: min(360px, calc(100vw - 16px));
    height: calc(100dvh - 16px - env(safe-area-inset-top, 0px));
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px));
    z-index: 120;
    grid-template-rows: auto minmax(0, 1fr);
    box-shadow: 0 28px 90px rgba(17, 25, 23, .24);
  }

  body:not(.readiness-body) .tool-drawer-backdrop {
    z-index: 110;
    background: rgba(17, 25, 23, .24);
  }

  body:not(.readiness-body) .conversation-panel {
    height: 100%;
  }

  body:not(.readiness-body) .chat-session-list {
    max-height: none;
    min-height: 0;
    padding-bottom: 8px;
  }

  body:not(.readiness-body) .chat-session-delete {
    opacity: 1;
    background: rgba(255, 255, 255, .72);
  }
}

/* v18: AI-app answer media and cleaner in-chat composer. */
body:not(.readiness-body).has-dialog .composer-suggestion-row {
  display: none;
}

body:not(.readiness-body).has-dialog .composer {
  min-height: 154px;
  grid-template-rows: auto minmax(68px, auto) auto;
}

body:not(.readiness-body) .image-card a {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

body:not(.readiness-body) .image-card .image-open-button {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

body:not(.readiness-body) .image-card img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
  background: #f3f7f5;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: stretch;
  background: rgba(0, 0, 0, 0.94);
  color: #fff;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
}

.image-viewer-shell {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.image-viewer-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
}

.image-viewer-title {
  min-width: 0;
}

.image-viewer-title strong,
.image-viewer-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-title strong {
  font-size: 14px;
  line-height: 1.35;
}

.image-viewer-title span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.image-viewer-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.image-viewer-original,
.image-viewer-landscape,
.image-viewer-close {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

.image-viewer-landscape,
.image-viewer-close {
  cursor: pointer;
}

.image-viewer-stage {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
}

.image-viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #111;
}

.image-viewer.is-landscape-mode .image-viewer-shell {
  padding: 0;
  display: block;
}

.image-viewer.is-landscape-mode .image-viewer-toolbar {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  left: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 16px);
  padding: 0;
}

.image-viewer.is-landscape-mode .image-viewer-title,
.image-viewer.is-landscape-mode .image-viewer-original {
  display: none;
}

.image-viewer.is-landscape-mode .image-viewer-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100svh;
  height: 100svw;
  overflow: hidden;
  background: #050806;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

.image-viewer.is-landscape-mode .image-viewer-stage img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #050806;
}

@media (orientation: landscape) {
  .image-viewer.is-landscape-mode .image-viewer-stage {
    width: 100svw;
    height: 100svh;
    transform: translate(-50%, -50%);
  }
}

body.image-viewer-open {
  overflow: hidden;
}

@media (max-width: 720px), (max-height: 520px) {
  .image-viewer-shell {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .image-viewer-toolbar {
    gap: 8px;
    padding-bottom: 8px;
  }

  .image-viewer-original,
  .image-viewer-landscape,
  .image-viewer-close {
    min-height: 32px;
    padding: 6px 10px;
  }

  .image-viewer-title strong {
    font-size: 13px;
  }
}

@media (max-width: 980px) {
  body:not(.readiness-body).has-dialog .composer {
    min-height: 160px;
  }

  body:not(.readiness-body).has-dialog .composer textarea {
    min-height: 86px;
  }

  body:not(.readiness-body) .image-list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(236px, 82%);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    padding: 0 10px 8px 0;
    margin-right: -10px;
    scrollbar-width: none;
  }

  body:not(.readiness-body) .image-list::-webkit-scrollbar {
    display: none;
  }

  body:not(.readiness-body) .image-list .section-label {
    display: none;
  }

  body:not(.readiness-body) .image-card {
    scroll-snap-align: start;
  }

  body:not(.readiness-body) .image-card img {
    aspect-ratio: 4 / 3;
    padding: 7px;
  }

}

/* v20: iOS/WeChat viewport fit, Doubao-like compact composer, and stable answer reading position. */
@media (max-width: 980px) {
  body:not(.readiness-body) {
    height: var(--app-viewport-height, 100svh);
    min-height: var(--app-viewport-height, 100svh);
    overflow: hidden;
    overscroll-behavior: none;
  }

  body:not(.readiness-body) .app-shell {
    --mobile-topbar-height: calc(52px + env(safe-area-inset-top, 0px));
    height: var(--app-viewport-height, 100svh);
    min-height: var(--app-viewport-height, 100svh);
    max-height: var(--app-viewport-height, 100svh);
    grid-template-rows: var(--mobile-topbar-height) minmax(0, 1fr);
    overflow: hidden;
  }

  body:not(.readiness-body) .topbar {
    height: var(--mobile-topbar-height);
    min-height: var(--mobile-topbar-height);
    padding: env(safe-area-inset-top, 0px) 12px 0;
    flex: 0 0 auto;
  }

  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace,
  body:not(.readiness-body) .chat-panel {
    height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height));
    min-height: 0;
    max-height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height));
    overflow: hidden;
  }

  body:not(.readiness-body) .chat-panel {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body:not(.readiness-body).has-dialog .chat-panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body:not(.readiness-body) .chat-header {
    min-height: 0;
    padding: 6px 12px 0;
  }

  body:not(.readiness-body):not(.has-dialog) .chat-header {
    display: none;
  }

  body:not(.readiness-body) .messages {
    padding: 12px 10px 8px;
    scroll-padding-top: 12px;
    overscroll-behavior: contain;
    overflow-anchor: none;
  }

  body:not(.readiness-body):not(.has-dialog) .chat-empty-state {
    align-content: start;
    padding: 14px 12px 8px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  body:not(.readiness-body) .chat-empty-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 4px 2px 2px;
  }

  body:not(.readiness-body) .chat-empty-avatar {
    width: 44px;
    height: 44px;
  }

  body:not(.readiness-body) .empty-title {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.18;
  }

  body:not(.readiness-body) .empty-greet {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.55;
  }

  body:not(.readiness-body) .chat-suggestion-grid {
    gap: 10px;
  }

  body:not(.readiness-body) .chat-suggestion-grid button {
    min-height: 82px;
    padding: 12px;
    border-radius: 18px;
  }

  body:not(.readiness-body) .composer,
  body:not(.readiness-body).has-dialog .composer {
    width: calc(100% - 20px);
    min-height: 62px;
    margin: 0 auto max(8px, env(safe-area-inset-bottom, 0px));
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-rows: minmax(44px, auto);
    align-items: end;
    gap: 8px;
    padding: 8px;
    border: 1px solid #dce4df;
    border-radius: 22px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 12px 34px rgba(18, 24, 21, .14);
  }

  body:not(.readiness-body) .composer:focus-within {
    border-color: rgba(15, 122, 79, .42);
    box-shadow: 0 14px 36px rgba(18, 24, 21, .16);
  }

  body:not(.readiness-body) .composer-topline,
  body:not(.readiness-body) .composer-suggestion-row {
    display: none;
  }

  body:not(.readiness-body) .composer textarea,
  body:not(.readiness-body).has-dialog .composer textarea {
    grid-column: 1;
    grid-row: 1;
    min-height: 44px;
    max-height: 104px;
    padding: 10px 2px 8px 6px;
    font-size: 16px;
    line-height: 1.45;
  }

  body:not(.readiness-body) .composer #sendBtn,
  body:not(.readiness-body).has-dialog .composer #sendBtn {
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    align-self: end;
    border-radius: 999px;
  }
}

@media (max-width: 420px) {
  body:not(.readiness-body) .brand strong {
    max-width: 8.4em;
  }

  body:not(.readiness-body) .top-actions button {
    padding: 0 10px;
  }

  body:not(.readiness-body) .chat-suggestion-grid button {
    min-height: 76px;
  }

  body:not(.readiness-body) .composer,
  body:not(.readiness-body).has-dialog .composer {
    width: calc(100% - 18px);
    border-radius: 20px;
  }
}


/* youyou-unified-logo-style:start */
.brand-mark.youyou-logo-mark,
.mark.youyou-logo-mark,
.logo-mark.youyou-logo-mark{
  display:inline-grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:#287f43!important;
  background-image:none!important;
  border:0!important;
  color:transparent!important;
  padding:0!important;
  line-height:0!important;
}
.brand-mark.youyou-logo-mark img,
.mark.youyou-logo-mark img,
.logo-mark.youyou-logo-mark img{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:cover!important;
}
.youyou-sites-hub-float::before{
  background:#287f43 url("/assets/brand/youyou-logo.png") center/cover no-repeat!important;
  border-radius:5px!important;
}
/* youyou-unified-logo-style:end */

/* v23: Doubao-style chat shell, mobile left drawer, and persistent compact composer. */
body:not(.readiness-body) .tool-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body:not(.readiness-body) .tool-toggle::before {
  content: "";
  width: 17px;
  height: 12px;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 5px / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 10px / 100% 2px no-repeat;
  border-radius: 2px;
}

body:not(.readiness-body) .chat-title-row h2 {
  font-size: 18px;
}

body:not(.readiness-body) .chat-quick-row {
  gap: 8px;
}

body:not(.readiness-body) .chat-quick-row button:nth-last-child(n + 5) {
  display: none;
}

body:not(.readiness-body) .chat-suggestion-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body:not(.readiness-body) .composer,
body:not(.readiness-body).has-dialog .composer {
  display: grid !important;
  width: min(820px, calc(100% - 40px)) !important;
  min-height: 56px !important;
  max-height: 148px !important;
  margin: 0 auto 14px !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  grid-template-rows: minmax(40px, auto) !important;
  align-items: end !important;
  gap: 8px !important;
  padding: 7px 8px 7px 16px !important;
  border: 1px solid #d9e3dd !important;
  border-radius: 25px !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 12px 34px rgba(18, 24, 21, .13) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body:not(.readiness-body) .composer:focus-within,
body:not(.readiness-body).has-dialog .composer:focus-within {
  border-color: rgba(15, 122, 79, .42) !important;
  box-shadow: 0 14px 36px rgba(18, 24, 21, .16) !important;
}

body:not(.readiness-body) .composer-topline,
body:not(.readiness-body) .composer-suggestion-row,
body:not(.readiness-body).has-dialog .composer-suggestion-row {
  display: none !important;
}

body:not(.readiness-body) .composer textarea,
body:not(.readiness-body).has-dialog .composer textarea {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-height: 40px !important;
  max-height: 96px !important;
  padding: 9px 0 7px !important;
  border: 0 !important;
  font-size: 16px !important;
  line-height: 1.42 !important;
  resize: none !important;
  overflow-y: auto !important;
}

body:not(.readiness-body) .composer textarea::placeholder {
  color: #9aa4a0;
}

body:not(.readiness-body) .composer #sendBtn,
body:not(.readiness-body).has-dialog .composer #sendBtn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  align-self: end !important;
  border-radius: 999px !important;
}

body:not(.readiness-body) .composer #sendBtn span {
  display: none !important;
}

body:not(.readiness-body) .composer #sendBtn svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 980px) {
  body:not(.readiness-body) .app-shell {
    --mobile-topbar-height: calc(50px + env(safe-area-inset-top, 0px)) !important;
  }

  body:not(.readiness-body) .topbar {
    padding: env(safe-area-inset-top, 0px) 10px 0 !important;
    gap: 8px !important;
  }

  body:not(.readiness-body) .brand {
    min-width: 0;
    gap: 8px;
  }

  body:not(.readiness-body) .brand-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
  }

  body:not(.readiness-body) .brand strong {
    max-width: none !important;
    font-size: 18px !important;
    white-space: nowrap;
  }

  body:not(.readiness-body) .brand small {
    display: none !important;
  }

  body:not(.readiness-body) .top-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  body:not(.readiness-body) .top-actions > a:not(#installGuideLink),
  body:not(.readiness-body) .top-actions #installBtn {
    display: none !important;
  }

  body:not(.readiness-body) .top-actions #installGuideLink {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    font-size: 14px;
  }

  body:not(.readiness-body) .tool-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0 !important;
    border: 0;
    background: transparent;
    color: #111815;
    box-shadow: none;
  }

  body:not(.readiness-body) .tool-toggle .tool-label-desktop,
  body:not(.readiness-body) .tool-toggle .tool-label-mobile {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace,
  body:not(.readiness-body) .chat-panel {
    height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height)) !important;
    max-height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body:not(.readiness-body) .side-panel,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(304px, 86vw) !important;
    height: var(--app-viewport-height, 100svh) !important;
    max-height: var(--app-viewport-height, 100svh) !important;
    min-height: 0 !important;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-content: stretch !important;
    gap: 0 !important;
    border: 0 !important;
    border-right: 1px solid rgba(14, 26, 21, .08) !important;
    border-radius: 0 18px 18px 0 !important;
    background: #fbfcfb !important;
    box-shadow: 18px 0 50px rgba(8, 18, 14, .18) !important;
    transform: translateX(-105%) !important;
    transition: transform .22s ease !important;
    overflow: hidden !important;
    z-index: 130 !important;
  }

  body:not(.readiness-body) .side-panel.is-open,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel.is-open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }

  body:not(.readiness-body) .side-panel:not(.is-open) {
    pointer-events: none !important;
  }

  body:not(.readiness-body) .side-panel.is-open > :not(.conversation-panel):not(.tool-close-btn) {
    display: none !important;
  }

  body:not(.readiness-body) .tool-close-btn {
    position: absolute !important;
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    right: 10px !important;
    z-index: 3 !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 0 !important;
  }

  body:not(.readiness-body) .tool-close-btn::before {
    content: "×";
    font-size: 20px;
    line-height: 1;
  }

  body:not(.readiness-body) .conversation-panel {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 42px 2px 0 !important;
    overflow: hidden !important;
  }

  body:not(.readiness-body) .conversation-head {
    min-height: 40px !important;
  }

  body:not(.readiness-body) .conversation-head strong {
    font-size: 20px !important;
  }

  body:not(.readiness-body) #newChatBtn {
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 17px;
  }

  body:not(.readiness-body) .conversation-search input {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
  }

  body:not(.readiness-body) .chat-session-list {
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    padding-right: 2px !important;
  }

  body:not(.readiness-body) .chat-session-item {
    min-height: 48px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
  }

  body:not(.readiness-body) .tool-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(7, 16, 12, .28);
    backdrop-filter: blur(1px);
  }

  body:not(.readiness-body):not(.tool-drawer-open) .tool-drawer-backdrop {
    display: none !important;
  }

  body:not(.readiness-body).tool-drawer-open {
    overflow: hidden !important;
  }

  body:not(.readiness-body) .chat-panel,
  body:not(.readiness-body).has-dialog .chat-panel {
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }

  body:not(.readiness-body):not(.has-dialog) .chat-panel {
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  body:not(.readiness-body):not(.has-dialog) .chat-header {
    display: none !important;
  }

  body:not(.readiness-body).has-dialog .chat-header {
    display: block !important;
    padding: 4px 10px 0 !important;
    min-height: 0 !important;
  }

  body:not(.readiness-body) .chat-title-row {
    gap: 8px !important;
  }

  body:not(.readiness-body) .chat-title-row h2 {
    display: none !important;
  }

  body:not(.readiness-body) .chat-title-row p {
    font-size: 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.readiness-body) .chat-title-actions {
    gap: 6px !important;
  }

  body:not(.readiness-body) .model-badge {
    height: 28px;
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
  }

  body:not(.readiness-body) #resetBtn {
    display: none !important;
  }

  body:not(.readiness-body) .chat-quick-row {
    display: none !important;
  }

  body:not(.readiness-body) .messages {
    min-height: 0 !important;
    padding: 10px 10px 6px !important;
    scroll-padding-top: 10px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body:not(.readiness-body) .message {
    max-width: 100% !important;
  }

  body:not(.readiness-body) .bubble {
    max-width: calc(100vw - 66px) !important;
  }

  body:not(.readiness-body) .message-body {
    font-size: 16px !important;
    line-height: 1.64 !important;
  }

  body:not(.readiness-body):not(.has-dialog) .chat-empty-state {
    min-height: 0 !important;
    align-content: start !important;
    padding: 18px 14px 8px !important;
    overflow: auto !important;
  }

  body:not(.readiness-body) .chat-suggestion-grid {
    grid-template-columns: none !important;
    gap: 10px !important;
  }

  body:not(.readiness-body) .chat-suggestion-grid button {
    min-height: 68px !important;
    padding: 11px 12px !important;
    border-radius: 18px !important;
  }

  body:not(.readiness-body) .composer,
  body:not(.readiness-body).has-dialog .composer {
    width: calc(100% - 20px) !important;
    min-height: 54px !important;
    max-height: 122px !important;
    margin: 0 auto max(8px, env(safe-area-inset-bottom, 0px)) !important;
    grid-template-columns: minmax(0, 1fr) 40px !important;
    grid-template-rows: minmax(40px, auto) !important;
    gap: 7px !important;
    padding: 7px 7px 7px 14px !important;
    border-radius: 24px !important;
  }

  body:not(.readiness-body) .composer textarea,
  body:not(.readiness-body).has-dialog .composer textarea {
    min-height: 40px !important;
    max-height: 86px !important;
    padding: 9px 0 7px !important;
  }

  body:not(.readiness-body) .composer #sendBtn,
  body:not(.readiness-body).has-dialog .composer #sendBtn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 420px) {
  body:not(.readiness-body) .brand strong {
    font-size: 17px !important;
    max-width: calc(100vw - 196px) !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.readiness-body) .top-actions #installGuideLink {
    max-width: 78px;
    overflow: hidden;
  }

  body:not(.readiness-body) .composer,
  body:not(.readiness-body).has-dialog .composer {
    width: calc(100% - 16px) !important;
  }
}

/* v23.1: keep desktop second-turn composer visible. */
@media (min-width: 981px) {
  body:not(.readiness-body) {
    overflow: hidden;
  }

  body:not(.readiness-body) .app-shell {
    height: 100dvh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body:not(.readiness-body) .side-panel {
    min-height: 0;
    overflow: auto;
  }

  body:not(.readiness-body) .chat-panel,
  body:not(.readiness-body).has-dialog .chat-panel {
    min-height: 0 !important;
    height: 100% !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    overflow: hidden !important;
  }

  body:not(.readiness-body):not(.has-dialog) .chat-panel {
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  body:not(.readiness-body) .messages {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body:not(.readiness-body) .composer,
  body:not(.readiness-body).has-dialog .composer {
    position: relative !important;
    bottom: auto !important;
    flex: 0 0 auto !important;
  }
}

/* v24: assistant markdown cleanup. */
body:not(.readiness-body) .message-body strong {
  font-weight: 900;
}

/* v25: assistant markdown star sanitizer. */
body:not(.readiness-body) .message-body em {
  font-style: normal;
  font-weight: 800;
}

/* v26: compact Doubao-like mobile conversation history. */
@media (max-width: 980px) {
  body:not(.readiness-body) .side-panel,
  body.tool-panel-collapsed:not(.readiness-body) .side-panel {
    inset: 50px auto 0 0 !important;
    top: 50px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(315px, 82vw) !important;
    height: calc(100dvh - 50px) !important;
  }

  body:not(.readiness-body) .conversation-panel {
    gap: 14px !important;
    padding: 42px 2px 0 !important;
  }

  body:not(.readiness-body) .chat-session-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  body:not(.readiness-body) .chat-session-item {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 8px 0 12px !important;
    border-radius: 12px !important;
    grid-template-columns: minmax(0, 1fr) 28px !important;
    gap: 6px !important;
  }

  body:not(.readiness-body) .chat-session-open {
    min-height: 44px !important;
    height: 44px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 !important;
  }

  body:not(.readiness-body) .chat-session-open span {
    font-size: 14px !important;
    line-height: 1.15 !important;
  }

  body:not(.readiness-body) .chat-session-open small {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  body:not(.readiness-body) .chat-session-delete {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    align-self: center !important;
  }
}

/* v27: compact Doubao-like mobile composer; avoid a tall input block above the keyboard. */
@media (max-width: 720px) {
  body:not(.readiness-body) .composer,
  body:not(.readiness-body).has-dialog .composer {
    width: calc(100% - 18px) !important;
    min-height: 46px !important;
    max-height: 104px !important;
    margin: 0 auto max(7px, env(safe-area-inset-bottom, 0px)) !important;
    grid-template-columns: minmax(0, 1fr) 38px !important;
    grid-template-rows: minmax(36px, auto) !important;
    align-items: end !important;
    gap: 6px !important;
    padding: 5px 5px 5px 14px !important;
    border-radius: 24px !important;
  }

  body:not(.readiness-body) .composer textarea,
  body:not(.readiness-body).has-dialog .composer textarea {
    min-height: 36px !important;
    max-height: 74px !important;
    padding: 7px 0 5px !important;
    line-height: 1.34 !important;
  }

  body:not(.readiness-body) .composer #sendBtn,
  body:not(.readiness-body).has-dialog .composer #sendBtn {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }

  body:not(.readiness-body) .composer #sendBtn svg {
    width: 19px !important;
    height: 19px !important;
  }

  body:not(.readiness-body) .composer.is-keyboard-active,
  body:not(.readiness-body).has-dialog .composer.is-keyboard-active {
    position: fixed !important;
    left: 9px !important;
    right: 9px !important;
    bottom: calc(max(7px, env(safe-area-inset-bottom, 0px)) + var(--composer-keyboard-bottom, 0px)) !important;
    z-index: 180 !important;
    width: auto !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    will-change: transform;
  }

  body:not(.readiness-body).composer-keyboard-active .messages {
    scroll-padding-bottom: calc(76px + var(--composer-keyboard-bottom, 0px)) !important;
  }
}

/* v28-final: final mobile viewport override for APK, WeChat, and browser chrome changes. */
@media (max-width: 980px) {
  html,
  body:not(.readiness-body) {
    width: var(--app-viewport-width, 100vw) !important;
    min-height: var(--app-viewport-height, 100svh) !important;
    overflow: hidden !important;
  }

  body:not(.readiness-body) .app-shell {
    height: var(--app-viewport-height, 100svh) !important;
    min-height: var(--app-viewport-height, 100svh) !important;
    max-height: var(--app-viewport-height, 100svh) !important;
  }

  body:not(.readiness-body) .workspace,
  body.tool-panel-collapsed:not(.readiness-body) .workspace {
    height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height, 50px)) !important;
    max-height: calc(var(--app-viewport-height, 100svh) - var(--mobile-topbar-height, 50px)) !important;
  }

  body:not(.readiness-body) .chat-panel,
  body:not(.readiness-body).has-dialog .chat-panel {
    height: 100% !important;
    max-height: 100% !important;
  }

  body.app-env-compact-height:not(.readiness-body) .message-list,
  body.app-env-narrow:not(.readiness-body) .message-list {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body.app-env-apk:not(.readiness-body) .topbar {
    min-height: var(--mobile-topbar-height, 50px) !important;
  }
}

/* v31-final: keep APK composer attached to the native IME after all legacy mobile overrides. */
@media (max-width: 720px) {
  body:not(.readiness-body) {
    --youyou-keyboard-lift: var(--composer-effective-bottom, var(--composer-keyboard-bottom, 0px));
  }

  body:not(.readiness-body) .composer.is-keyboard-active,
  body:not(.readiness-body).has-dialog .composer.is-keyboard-active,
  body:not(.readiness-body).native-keyboard-active .composer,
  body:not(.readiness-body).native-keyboard-active.has-dialog .composer {
    position: fixed !important;
    left: 9px !important;
    right: 9px !important;
    bottom: calc(max(7px, env(safe-area-inset-bottom, 0px)) + var(--youyou-keyboard-lift)) !important;
    z-index: 240 !important;
    width: auto !important;
    margin: 0 !important;
    transform: translateZ(0);
    will-change: transform;
  }

  body:not(.readiness-body).composer-keyboard-active .messages,
  body:not(.readiness-body).native-keyboard-active .messages {
    scroll-padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
    padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
  }

  body:not(.readiness-body) .image-card .image-open-button {
    cursor: pointer !important;
  }

  body:not(.readiness-body) .image-card img {
    aspect-ratio: 4 / 3 !important;
    object-fit: contain !important;
    padding: 8px !important;
  }
}

/* v32: Doubao-like final mobile composer contract. Keep the app input visible above IME. */
@media (max-width: 720px) {
  body:not(.readiness-body) {
    --youyou-keyboard-lift: var(--composer-effective-bottom, var(--composer-keyboard-bottom, 0px));
  }

  body:not(.readiness-body) .composer,
  body:not(.readiness-body).has-dialog .composer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 38px !important;
    grid-template-rows: minmax(36px, auto) !important;
    align-items: end !important;
    width: calc(100% - 18px) !important;
    min-height: 46px !important;
    max-height: 104px !important;
    padding: 5px 5px 5px 14px !important;
    gap: 6px !important;
    border-radius: 24px !important;
  }

  body:not(.readiness-body) .composer textarea,
  body:not(.readiness-body).has-dialog .composer textarea {
    min-height: 36px !important;
    max-height: 74px !important;
    height: 36px;
    padding: 7px 0 5px !important;
    line-height: 1.34 !important;
    font-size: 16px !important;
    overflow-y: auto !important;
  }

  body:not(.readiness-body) .composer #sendBtn,
  body:not(.readiness-body).has-dialog .composer #sendBtn {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    align-self: end !important;
  }

  body:not(.readiness-body) .composer.is-keyboard-active,
  body:not(.readiness-body).has-dialog .composer.is-keyboard-active,
  body:not(.readiness-body).native-keyboard-active .composer,
  body:not(.readiness-body).native-keyboard-active.has-dialog .composer {
    position: fixed !important;
    left: 9px !important;
    right: 9px !important;
    bottom: calc(max(7px, env(safe-area-inset-bottom, 0px)) + var(--youyou-keyboard-lift)) !important;
    z-index: 260 !important;
    width: auto !important;
    margin: 0 !important;
    transform: translateZ(0);
  }

  body:not(.readiness-body).composer-keyboard-active .messages,
  body:not(.readiness-body).native-keyboard-active .messages {
    scroll-padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
    padding-bottom: calc(76px + var(--youyou-keyboard-lift)) !important;
  }
}

/* v33: Android APK uses a native composer, so WebView no longer fights the IME. */
body.app-env-native-composer:not(.readiness-body) .composer,
body.app-env-native-composer:not(.readiness-body).has-dialog .composer {
  display: none !important;
}

body.app-env-native-composer:not(.readiness-body) .messages,
body.app-env-native-composer:not(.readiness-body).has-dialog .messages {
  padding-bottom: calc(var(--native-composer-height, 76px) + max(18px, env(safe-area-inset-bottom, 0px))) !important;
  scroll-padding-bottom: calc(var(--native-composer-height, 76px) + max(18px, env(safe-area-inset-bottom, 0px))) !important;
}

/* v34: native-feeling input and long-press partial copy for iOS, Android WebView, and mobile browsers. */
body:not(.readiness-body) .composer,
body:not(.readiness-body) .composer textarea,
body:not(.readiness-body).has-dialog .composer textarea {
  pointer-events: auto !important;
}

body:not(.readiness-body) .composer textarea {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
  touch-action: manipulation;
  cursor: text;
}

body:not(.readiness-body) .message,
body:not(.readiness-body) .bubble,
body:not(.readiness-body) .message-body,
body:not(.readiness-body) .message-body * {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

body:not(.readiness-body) .message-actions,
body:not(.readiness-body) .message-actions *,
body:not(.readiness-body) .followup-row,
body:not(.readiness-body) .followup-row *,
body:not(.readiness-body) .link-card,
body:not(.readiness-body) .image-card,
body:not(.readiness-body) .video-card,
body:not(.readiness-body) button {
  -webkit-user-select: none;
  user-select: none;
}

.composer,
.composer textarea,
.message,
.bubble,
.message-body,
.message-body * {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

.composer textarea {
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: text;
}

/* v35: in-chat question outline, per-turn delete, and iOS true-viewport composer follow. */
.question-outline-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.question-outline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #0f241d;
  font-size: 13px;
}

.question-outline-head small {
  color: #7a8b84;
  font-weight: 700;
}

.question-outline-list {
  display: grid;
  gap: 7px;
}

.question-outline-empty {
  margin: 0;
  color: #899891;
  font-size: 13px;
}

.question-outline-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(17, 82, 58, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 9px;
  color: #163d2e;
  cursor: pointer;
  text-align: left;
}

.question-outline-item span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(22, 163, 111, 0.12);
  color: #0c7a52;
  font-size: 12px;
  font-weight: 900;
}

.question-outline-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.question-outline-item:hover,
.question-outline-item:focus-visible {
  border-color: rgba(13, 127, 84, 0.35);
  background: rgba(231, 248, 240, 0.88);
  outline: none;
}

.message-delete-turn,
.delete-turn {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

.user-delete-turn {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 77, 53, 0.08);
  color: rgba(8, 77, 53, 0.76);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}

.user-delete-turn:hover,
.user-delete-turn:focus-visible {
  background: rgba(8, 77, 53, 0.16);
  outline: none;
}

.delete-turn {
  border: 1px solid rgba(139, 34, 34, 0.12);
  background: rgba(255, 247, 247, 0.92);
  color: #8b3a30;
}

.message-jump-highlight {
  animation: youyou-message-jump 1.25s ease-out;
}

@keyframes youyou-message-jump {
  0% { filter: drop-shadow(0 0 0 rgba(17, 127, 87, 0)); }
  18% { filter: drop-shadow(0 0 18px rgba(17, 127, 87, 0.28)); }
  100% { filter: drop-shadow(0 0 0 rgba(17, 127, 87, 0)); }
}

@media (max-width: 980px) {
  .question-outline-panel {
    margin-top: 12px;
  }

  .question-outline-list {
    max-height: 34vh;
    overflow: auto;
    padding-right: 2px;
  }
}

/* v36: iOS WeChat keyboard uses a resized visual viewport. Do not add a second keyboard-sized blank area. */
@media (max-width: 720px) {
  body.app-env-ios:not(.readiness-body).composer-keyboard-active {
    --youyou-keyboard-lift: 0px !important;
  }

  body.app-env-ios:not(.readiness-body) .composer.is-keyboard-active,
  body.app-env-ios:not(.readiness-body).has-dialog .composer.is-keyboard-active {
    bottom: max(7px, env(safe-area-inset-bottom, 0px)) !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active .messages {
    padding-bottom: 88px !important;
    scroll-padding-bottom: 88px !important;
  }
}

.question-jump-toggle {
  display: none;
  border: 1px solid rgba(17, 82, 58, 0.15);
  background: rgba(232, 248, 240, 0.95);
  color: #0b6f4a;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 720px) {
  body.has-question-outline:not(.readiness-body) .question-jump-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 42px;
    padding: 0 14px;
    font-size: 15px;
  }

  body.has-question-outline:not(.readiness-body) .top-actions #installGuideLink {
    display: none;
  }

  body:not(.readiness-body) .conversation-panel .question-outline-panel {
    margin: 10px 0 12px;
    padding: 12px;
    border: 1px solid rgba(13, 127, 84, 0.14);
    border-radius: 16px;
    background: rgba(245, 253, 249, 0.9);
  }
}

/* v37: final iOS WeChat keyboard and mobile history ordering fixes.
   Keep history directly under search, and turn the empty-state suggestions into
   compact quick chips above the keyboard instead of leaving a large covered gap. */
body:not(.readiness-body) .conversation-panel {
  display: flex !important;
  flex-direction: column !important;
  align-content: stretch !important;
  grid-template-rows: none !important;
  overflow: auto !important;
}

body:not(.readiness-body) .conversation-search {
  order: 2 !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

body:not(.readiness-body) .chat-session-list {
  order: 3 !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  max-height: min(42vh, 360px) !important;
  margin: 0 !important;
  overflow: auto !important;
}

body:not(.readiness-body) .question-outline-panel {
  order: 4 !important;
  flex: 0 0 auto !important;
}

@media (max-width: 980px) {
  body:not(.readiness-body) .conversation-panel {
    gap: 10px !important;
    padding: 42px 2px 10px !important;
  }

  body:not(.readiness-body) .chat-session-list {
    max-height: 42vh !important;
  }

  body:not(.readiness-body) .conversation-panel .question-outline-panel {
    margin: 6px 0 0 !important;
  }
}

@media (max-width: 720px) {
  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .chat-panel {
    grid-template-rows: minmax(0, 1fr) auto !important;
    overflow: hidden !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .chat-empty-state {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(64px + max(7px, env(safe-area-inset-bottom, 0px))) !important;
    z-index: 175 !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    max-height: 160px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: auto !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .chat-empty-card {
    display: none !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .chat-suggestion-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .chat-suggestion-grid button {
    display: grid !important;
    min-height: 52px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    align-items: center !important;
    align-content: center !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .chat-suggestion-grid button:nth-child(n+3) {
    display: none !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .suggestion-copy {
    min-width: 0 !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .suggestion-copy small {
    display: none !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .suggestion-copy strong {
    font-size: 15px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.app-env-ios:not(.readiness-body).composer-keyboard-active:not(.has-dialog) .messages {
    padding-bottom: 76px !important;
    scroll-padding-bottom: 76px !important;
  }
}

/* v38: iOS/WeChat visualViewport dock. The composer is positioned by JS using
   the real visual viewport bottom, so it does not disappear behind the iOS IME
   or float in the middle after the keyboard closes. */
@media (max-width: 720px) {
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active {
    --youyou-keyboard-lift: 0px !important;
    --composer-keyboard-bottom: 0px !important;
    --composer-effective-bottom: 0px !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .workspace {
    min-height: var(--ios-visual-height, var(--app-viewport-height, 100dvh)) !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .composer,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active.has-dialog .composer,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .composer.is-keyboard-active,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active.has-dialog .composer.is-keyboard-active {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    top: var(--ios-composer-top, calc(100dvh - 72px)) !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    z-index: 10020 !important;
    transform: translateZ(0) !important;
    will-change: top;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .composer textarea,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active.has-dialog .composer textarea {
    min-height: 36px !important;
    max-height: 72px !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .messages,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active.has-dialog .messages {
    padding-bottom: calc(var(--ios-composer-height, 58px) + 22px) !important;
    scroll-padding-bottom: calc(var(--ios-composer-height, 58px) + 22px) !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-empty-state {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    top: max(96px, calc(var(--ios-composer-top, 100dvh) - 124px)) !important;
    bottom: auto !important;
    z-index: 10010 !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    max-height: 112px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: auto !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-empty-card {
    display: none !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-suggestion-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-suggestion-grid button {
    display: grid !important;
    min-height: 50px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-suggestion-grid button:nth-child(n+3),
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .suggestion-copy small {
    display: none !important;
  }
}

/* v39: Doubao-like iOS typing empty state. When the keyboard is open, do not
   leave a blank field above the quick questions; keep a compact welcome block
   at the top of the available space and quick actions near the composer. */
@media (max-width: 720px) {
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-empty-state {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    top: max(94px, calc(var(--app-viewport-offset-top, 0px) + 88px)) !important;
    bottom: auto !important;
    height: max(220px, calc(var(--ios-composer-top, 100dvh) - max(116px, calc(var(--app-viewport-offset-top, 0px) + 104px)))) !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    z-index: 10010 !important;
    pointer-events: auto !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-empty-card {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 74px !important;
    padding: 10px 14px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid rgba(15, 123, 79, 0.1) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08) !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-empty-avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 13px !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .empty-title {
    margin: 0 !important;
    font-size: 17px !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .empty-greet {
    display: block !important;
    margin: 4px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #66756e !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-suggestion-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog) .chat-suggestion-grid button {
    min-height: 50px !important;
    padding: 8px 12px !important;
  }
}

/* v40: iOS WeChat final viewport anchor. Keep the app header visible while
   iOS scrolls the page for the IME, and make the chat area live between the
   fixed header and the visual-viewport composer. */
@media (max-width: 720px) {
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .app-shell {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: var(--ios-visual-height, var(--app-viewport-height, 100dvh)) !important;
    min-height: var(--ios-visual-height, var(--app-viewport-height, 100dvh)) !important;
    max-height: var(--ios-visual-height, var(--app-viewport-height, 100dvh)) !important;
    padding: var(--mobile-topbar-height, 52px) 0 0 !important;
    overflow: hidden !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .topbar {
    position: fixed !important;
    top: var(--ios-visual-offset-top, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10060 !important;
    width: 100% !important;
    height: var(--mobile-topbar-height, 52px) !important;
    min-height: var(--mobile-topbar-height, 52px) !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .08) !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .workspace,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active.tool-panel-collapsed .workspace,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .chat-panel,
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active.has-dialog .chat-panel {
    height: calc(var(--ios-visual-height, var(--app-viewport-height, 100dvh)) - var(--mobile-topbar-height, 52px)) !important;
    max-height: calc(var(--ios-visual-height, var(--app-viewport-height, 100dvh)) - var(--mobile-topbar-height, 52px)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active .chat-panel {
    position: relative !important;
  }

  body.app-env-ios:not(.readiness-body).ios-dialog-composer-anchor .messages {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: calc(var(--ios-visual-offset-top, 0px) + var(--mobile-topbar-height, 52px) + 8px) !important;
    height: calc(var(--ios-composer-top, 100dvh) - var(--ios-visual-offset-top, 0px) - var(--mobile-topbar-height, 52px) - 16px) !important;
    max-height: calc(var(--ios-composer-top, 100dvh) - var(--ios-visual-offset-top, 0px) - var(--mobile-topbar-height, 52px) - 16px) !important;
    padding-top: 12px !important;
    padding-bottom: calc(var(--ios-composer-height, 58px) + 18px) !important;
    scroll-padding-top: 12px !important;
    scroll-padding-bottom: calc(var(--ios-composer-height, 58px) + 18px) !important;
    overflow-y: auto !important;
    z-index: 10000 !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-empty-state {
    top: max(calc(var(--mobile-topbar-height, 52px) + 118px), calc(var(--app-viewport-offset-top, 0px) + 88px)) !important;
    height: max(190px, calc(var(--ios-composer-top, 100dvh) - max(calc(var(--mobile-topbar-height, 52px) + 132px), calc(var(--app-viewport-offset-top, 0px) + 104px)))) !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-empty-card {
    flex: 0 0 auto !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-suggestion-grid {
    flex: 0 0 auto !important;
  }
}

/* v41: iOS WeChat Doubao-proportioned empty keyboard layout.
   The IME already shrinks the visible viewport, so the welcome area must be
   laid out inside the space above the composer, not compressed into a tiny
   floating strip. This block intentionally comes last and wins over the older
   compact fallbacks. */
@media (max-width: 720px) {
  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor {
    --ios-empty-top: clamp(
      calc(var(--mobile-topbar-height, 52px) + 112px),
      calc(var(--ios-composer-top, 100dvh) - 320px),
      calc(var(--mobile-topbar-height, 52px) + 160px)
    );
    --ios-empty-height: clamp(
      286px,
      calc(var(--ios-composer-top, 100dvh) - var(--ios-empty-top) - 14px),
      352px
    );
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-empty-state {
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    top: var(--ios-empty-top) !important;
    height: var(--ios-empty-height) !important;
    min-height: 286px !important;
    max-height: 352px !important;
    width: auto !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    z-index: 10005 !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-empty-card {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    align-items: center !important;
    min-height: 96px !important;
    width: 100% !important;
    padding: 16px 18px !important;
    gap: 14px !important;
    border-radius: 22px !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .09) !important;
    overflow: hidden !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-empty-avatar {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    border-radius: 16px !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .empty-title {
    font-size: 20px !important;
    line-height: 1.18 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: 0 !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .empty-greet {
    font-size: 13px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 4px !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-suggestion-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-suggestion-grid button {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: center !important;
    min-height: 68px !important;
    padding: 12px 16px !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .07) !important;
  }

  body.app-env-ios:not(.readiness-body).ios-composer-dock-active:not(.has-dialog).ios-empty-composer-anchor .chat-suggestion-grid button:nth-child(n+3) {
    display: none !important;
  }
}

