@font-face {
  font-family:SourceHan;
  src:local('Source Han Sans SC Normal'),local('SourceHanSansSC-Normal');
  font-weight:350;
  font-display:swap
}

@font-face {
  font-family:SourceHan;
  src:local('Source Han Sans SC Regular'),local('SourceHanSansSC-Regular');
  font-weight:400;
  font-display:swap
}

@font-face {
  font-family:SourceHan;
  src:local('Source Han Sans SC Bold'),local('SourceHanSansSC-Bold');
  font-weight:700;
  font-display:swap
}

@font-face {
  font-family:ShuHei;
  src:local('Alimama ShuHeiTi Bold'),local('AlimamaShuHeiTi-Bold');
  font-weight:700;
  font-display:swap
}

@font-face {
  font-family:JinBu;
  src:local('DingTalk JinBuTi'),local('DingTalkJinBuTi');
  font-display:swap
}

:root {
  --red:#dc222f;
  --surface:#f5f5f5;
  --placeholder:#d9d9d9;
  --text:#000;
  --muted:#939393;
  --u:clamp(.65px,.052083333vw,1px);
  --sidebar:calc(400 * var(--u));
  font-family:SourceHan,'Source Han Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
  font-size:clamp(14px,.833333vw,16px);
  color:var(--text);
  background:var(--surface);
  font-synthesis:none
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

button,a,input,textarea {
  -webkit-tap-highlight-color:transparent
}

button,input,textarea {
  font:inherit;
  color:inherit
}

button {
  border:0;
  background:none;
  cursor:pointer;
  padding:0
}

a {
  color:inherit;
  text-decoration:none
}

button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible {
  outline:2px solid var(--red);
  outline-offset:5px
}

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

button,a {
  touch-action:manipulation
}

button {
  transition:background .18s,color .18s,box-shadow .18s
}

img {
  max-width:100%;
  display:block
}

svg {
  display:block
}

h1,h2,p {
  margin:0
}

[hidden] {
  display:none!important
}

.icon-library {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}

.icon {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0
}

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

.skip-link {
  position:fixed;
  top:-100px;
  left:20px;
  z-index:20;
  padding:12px;
  background:#fff
}

.skip-link:focus {
  top:10px
}

.app-shell {
  display:grid;
  grid-template-columns:var(--sidebar) minmax(0,1fr);
  min-height:100vh
}

.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:var(--sidebar);
  z-index:4;
  background:#fff;
  padding:calc(49 * var(--u)) calc(55 * var(--u)) 30px
}

.brand {
  display:block;
  width:calc(289 * var(--u));
  height:calc(40 * var(--u))
}

.brand img {
  width:100%;
  height:100%;
  object-fit:contain
}

.new-task {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:calc(16 * var(--u));
  width:100%;
  height:calc(48 * var(--u));
  min-height:40px;
  margin-top:calc(43 * var(--u));
  border-radius:calc(8 * var(--u));
  background:var(--red);
  color:#fff;
  font-weight:700
}

.new-task:hover,.send-button:hover,.primary-button:hover {
  background:#be1b27
}

.new-task .icon {
  width:calc(20 * var(--u));
  height:calc(20 * var(--u))
}

.nav-section {
  border-top:1px solid var(--muted)
}

.personal-nav {
  margin-top:calc(40 * var(--u));
  padding-top:calc(27 * var(--u))
}

.nav-section h2 {
  font-size:1rem;
  color:var(--muted);
  font-weight:700;
  line-height:calc(29 * var(--u))
}

.nav-items {
  display:flex;
  flex-direction:column;
  gap:calc(8 * var(--u));
  margin-top:calc(25 * var(--u))
}

.nav-item {
  display:flex;
  align-items:center;
  height:calc(38 * var(--u));
  min-height:32px;
  padding-left:calc(42 * var(--u));
  border-radius:calc(8 * var(--u));
  text-align:left;
  font-weight:700;
  white-space:nowrap
}

.nav-item:hover {
  background:var(--surface)
}

.nav-item[aria-current="page"] {
  background:var(--surface);
  color:var(--red)
}

.service-nav {
  margin-top:calc(34 * var(--u));
  padding-top:calc(27 * var(--u))
}

.service-nav .nav-items {
  margin-top:calc(26 * var(--u))
}

.sidebar-placeholder {
  height:calc(162 * var(--u));
  margin-top:calc(49 * var(--u));
  border-radius:calc(18 * var(--u));
  background:var(--surface)
}

.sidebar-account {
  display:flex;
  align-items:center;
  gap:calc(11 * var(--u));
  margin-top:calc(44 * var(--u));
  font-weight:400;
  white-space:nowrap
}

.avatar {
  width:calc(32 * var(--u));
  height:calc(32 * var(--u));
  min-width:24px;
  min-height:24px;
  background:var(--placeholder);
  border-radius:50%;
  display:inline-block;
  flex-shrink:0
}
.avatar.has-image { background-position:center; background-size:cover; background-repeat:no-repeat; }

.sidebar-account button {
  margin-left:auto;
  color:#b5b5b5
}

.sidebar-account button:hover {
  color:var(--red)
}

.main {
  grid-column:2;
  min-width:0
}

.topbar {
  height:calc(120 * var(--u));
  display:flex;
  align-items:flex-start;
  position:relative;
  padding:calc(53 * var(--u)) calc(57 * var(--u)) 0
}

.topbar-account {
  display:flex;
  gap:calc(11 * var(--u));
  align-items:center;
  font-weight:400;
  white-space:nowrap
}

.logout {
  color:#b5b5b5
}

.logout:hover {
  color:var(--red)
}

.top-nav {
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  top:calc(57 * var(--u));
  display:flex;
  justify-content:space-between;
  align-items:center;
  width:calc(360 * var(--u));
  white-space:nowrap;
  font-weight:350
}

.top-nav .active {
  color:var(--red);
  font-weight:700
}

.top-nav button:hover,.top-nav a:hover {
  color:var(--red)
}

.composer-section {
  width:77.631579%;
  max-width:1180px;
  margin:0 auto
}

.greeting-row {
  height:calc(114 * var(--u));
  position:relative;
  padding-top:calc(21 * var(--u))
}

h1,.section-title {
  font-family:ShuHei,'Alimama ShuHeiTi',SourceHan,sans-serif;
  font-weight:700;
  font-size:clamp(23px,1.666667vw,32px);
  line-height:1.22
}

h1 span {
  color:var(--red)
}

.mascot {
  position:absolute;
  width:calc(131 * var(--u));
  height:calc(146 * var(--u));
  object-fit:contain;
  right:calc(79 * var(--u));
  bottom:calc(-4 * var(--u));
  z-index:1;
  pointer-events:none
}

.composer {
  position:relative;
  min-height:calc(204 * var(--u));
  background:#fff;
  border-radius:calc(20 * var(--u));
  padding:calc(27 * var(--u)) calc(44 * var(--u)) calc(20 * var(--u)) calc(48 * var(--u));
  box-shadow:0 0 calc(50 * var(--u)) rgba(0,0,0,.11);
  display:flex;
  flex-direction:column
}

.composer:focus-within {
  box-shadow:0 0 calc(50 * var(--u)) rgba(0,0,0,.11),0 0 0 1px rgba(220,34,47,.2)
}

textarea {
  display:block;
  width:100%;
  border:none;
  resize:none;
  background:transparent;
  line-height:1.65;
  font-weight:350
}

#prompt {
  padding:0;
  min-height:calc(115 * var(--u));
  height:calc(115 * var(--u));
  outline:none
}

#prompt::placeholder {
  color:#000;
  opacity:1
}

.composer-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto
}

.composer-tools,.send-tools {
  display:flex;
  align-items:center;
  gap:calc(15 * var(--u));
  min-width:0
}

.composer-tools {
  gap:calc(12 * var(--u))
}

.image-ratio-picker {
  position:relative;
  display:inline-flex;
  align-items:center;
  height:30px;
  border:1px solid #e2e2e2;
  border-radius:7px;
  background:#fafafa
}

.image-ratio-picker::after {
  content:'⌄';
  position:absolute;
  right:7px;
  top:3px;
  color:#888;
  font-size:14px;
  pointer-events:none
}

.image-ratio-picker select {
  width:62px;
  height:100%;
  padding:0 20px 0 8px;
  border:0;
  outline:0;
  appearance:none;
  background:transparent;
  color:#333;
  font:inherit;
  font-size:12px;
  cursor:pointer
}

.image-ratio-picker:focus-within {
  border-color:rgba(220,34,47,.55);
  box-shadow:0 0 0 2px rgba(220,34,47,.1)
}

.image-ratio-picker:has(select:disabled) { opacity:.55; }

.icon-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:30px;
  flex-shrink:0;
  border-radius:6px
}

.icon-button:hover {
  background:#f0f0f0
}

.model-picker {
  position:relative
}

.model-toggle {
  display:flex;
  align-items:center;
  gap:calc(21 * var(--u));
  height:30px;
  font-weight:350;
  white-space:nowrap
}

.model-toggle .icon {
  color:#a8a8a8;
  width:20px;
  height:20px
}

.send-button {
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--red);
  color:#fff;
  width:calc(35 * var(--u));
  height:calc(35 * var(--u));
  min-width:30px;
  min-height:30px;
  margin-left:calc(2 * var(--u))
}

.send-button .icon {
  width:24px;
  height:24px;
  stroke-width:2.5
}

.content-sections {
  width:90.460526%;
  max-width:1375px;
  margin:calc(120 * var(--u)) auto 0
}

.card-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:calc(40 * var(--u)) calc(33 * var(--u))
}

.design-card {
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  aspect-ratio:319/177;
  min-height:112px;
  padding:calc(18 * var(--u)) 8px;
  background:var(--placeholder);
  border-radius:calc(18 * var(--u));
  font-family:JinBu,'DingTalk JinBuTi',SourceHan,sans-serif;
  font-size:clamp(16px,1.041667vw,20px);
  line-height:1.2;
  text-align:center
}

.design-card:hover {
  background:#d0d0d0;
  box-shadow:0 6px 20px rgba(0,0,0,.06)
}

.design-card[data-mode="agent"],
.design-card[data-mode="agent"]:hover {
  color:#fff;
  background-color:#d9d9d9;
  background-image:linear-gradient(to top,rgba(132,45,55,.26) 0,rgba(132,45,55,0) 48%),url('./assets/home-agent-red-light.png');
  background-position:center;
  background-size:cover;
  text-shadow:0 1px 4px rgba(0,0,0,.35)
}

.design-card[data-mode="reference"],
.design-card[data-mode="reference"]:hover {
  color:#fff;
  background-color:#d9d9d9;
  background-image:linear-gradient(to top,rgba(132,45,55,.26) 0,rgba(132,45,55,0) 48%),url('./assets/home-reference-red-light.png');
  background-position:center;
  background-size:cover;
  text-shadow:0 1px 4px rgba(0,0,0,.35)
}

.design-card[data-mode="ip"],
.design-card[data-mode="ip"]:hover {
  color:#fff;
  background-color:#d9d9d9;
  background-image:linear-gradient(to top,rgba(132,45,55,.26) 0,rgba(132,45,55,0) 48%),url('./assets/home-ip-red-light.png');
  background-position:center;
  background-size:cover;
  text-shadow:0 1px 4px rgba(0,0,0,.35)
}

.design-card[data-mode="canvas"],
.design-card[data-mode="canvas"]:hover {
  color:#fff;
  background-color:#d9d9d9;
  background-image:linear-gradient(to top,rgba(132,45,55,.26) 0,rgba(132,45,55,0) 48%),url('./assets/home-canvas.png');
  background-position:center;
  background-size:cover;
  text-shadow:0 1px 4px rgba(0,0,0,.35)
}

.design-card[data-mode="competitor"],
.design-card[data-mode="competitor"]:hover {
  color:#fff;
  background-color:#fbf5f8;
  background-image:linear-gradient(to top,rgba(50,35,39,.52) 0,rgba(50,35,39,0) 42%),url('./assets/home-competitor.png');
  background-position:center;
  background-size:cover;
  text-shadow:0 1px 4px rgba(0,0,0,.35)
}

.design-card[data-mode="internet"],.design-card[data-mode="internet"]:hover,
.design-card[data-mode="manufacturing"],.design-card[data-mode="manufacturing"]:hover,
.design-card[data-mode="search"],.design-card[data-mode="search"]:hover {
  color:#fff;
  background-color:#fbf5f8;
  background-position:center;
  background-size:cover;
  text-shadow:0 1px 4px rgba(0,0,0,.35)
}
.design-card[data-mode="internet"],.design-card[data-mode="internet"]:hover {
  background-image:linear-gradient(to top,rgba(50,35,39,.52) 0,rgba(50,35,39,0) 42%),url('./assets/home-internet.png')
}
.design-card[data-mode="manufacturing"],.design-card[data-mode="manufacturing"]:hover {
  background-image:linear-gradient(to top,rgba(50,35,39,.52) 0,rgba(50,35,39,0) 42%),url('./assets/home-manufacturing.png')
}
.design-card[data-mode="search"],.design-card[data-mode="search"]:hover {
  background-image:linear-gradient(to top,rgba(50,35,39,.52) 0,rgba(50,35,39,0) 42%),url('./assets/home-search.png')
}

.section-title {
  margin-left:calc(28 * var(--u))
}

.inspiration-section {
  margin-top:calc(49 * var(--u))
}

.inspiration-section .card-grid {
  margin-top:calc(49 * var(--u))
}

.tutorial-section {
  margin-top:calc(67 * var(--u))
}

.tutorial-placeholder {
  width:100%;
  display:flex;
  min-height:150px;
  height:calc(290 * var(--u));
  overflow:hidden;
  border-radius:calc(30 * var(--u));
  margin-top:calc(49 * var(--u));
  background:#fff
}

.tutorial-cover {
  width:74.4%;
  background:var(--placeholder)
}

.tutorial-info {
  flex:1
}

.footer {
  height:calc(165 * var(--u));
  min-height:105px;
  background:#000;
  margin-top:calc(124 * var(--u));
  display:flex;
  align-items:center;
  justify-content:center
}

.footer img {
  width:calc(200 * var(--u));
  height:auto
}

.mobile-menu,.sidebar-scrim {
  display:none
}

/* Interactions keep the default frame faithful to Figma. */
.popover {
  position:absolute;
  background:#fff;
  border:1px solid #e9e9e9;
  border-radius:12px;
  box-shadow:0 10px 36px #0002;
  z-index:5
}

.skills-menu {
  left:24px;
  top:calc(100% - 8px);
  width:290px;
  padding:14px
}

.skills-menu>p {
  font-size:12px;
  color:var(--muted);
  padding:0 8px 10px
}

.skill-option {
  display:block;
  width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius:6px
}

.skill-option:hover {
  background:#f5f5f5;
  color:var(--red)
}

.model-menu {
  right:0;
  top:40px;
  width:265px;
  padding:16px
}

.model-option {
  display:flex;
  justify-content:space-between;
  gap:20px;
  font-weight:700
}

.model-option .icon {
  color:var(--red)
}

button.model-option {
  width:100%;
  padding:10px;
  border:0;
  border-radius:8px;
  background:transparent;
  text-align:left;
  align-items:center;
  cursor:pointer;
  font:inherit;
  color:inherit
}
button.model-option:hover, button.model-option[aria-pressed="true"] { background:#f5f5f5; }
button.model-option:focus-visible { outline:2px solid var(--red); outline-offset:2px; }
.model-option-label { display:flex; flex-direction:column; gap:4px; }
.model-option-label strong { font-size:14px; }
.model-option-label small { font-size:12px; color:#777; font-weight:400; }
.model-option-check { color:var(--red); }
.model-toggle:disabled { opacity:.65; cursor:wait; }

.model-menu p {
  color:#777;
  font-size:12px;
  line-height:1.7;
  margin-top:12px
}

.attachments {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:6px 0 16px
}

.attachment {
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  background:#f5f5f5;
  border-radius:8px;
  padding:6px;
  max-width:210px
}

.attachment-preview { position:relative; display:flex; align-items:center; justify-content:center; flex-shrink:0; width:40px; height:40px; border-radius:6px; background:#e9e9e9; color:#777; font-size:10px; font-weight:700; overflow:hidden; }
.attachment-preview img { position:absolute; inset:0; width:40px; height:40px; object-fit:cover; }
.attachment-details { min-width:0; flex:1; }
.attachment .attachment-name { display:block; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attachment-status { display:block; color:#999; font-size:10px; line-height:1.5; }
.attachment.upload-error { background:#fff0f0; }
.attachment-retry { color:var(--red); font-size:11px; }
.agent-upload-link { display:flex; align-items:center; gap:8px; max-width:100%; background:#f5f5f5; padding:8px 12px; border-radius:8px; color:#555; font-size:12px; white-space:normal; overflow-wrap:anywhere; }
.agent-upload-link img { width:64px; height:64px; object-fit:cover; border-radius:5px; }
.attachment-analysis { color:#888; font-size:12px; margin:0 0 12px; line-height:1.7; }
.attachment-analysis summary { cursor:pointer; }
.attachment-analysis p { margin-top:5px; }
.agent-page .attachments { max-height:152px; overflow-y:auto; overscroll-behavior:contain; padding:2px; }
.attachment-status { white-space:normal; overflow-wrap:anywhere; }

.attachment img {
  width:40px;
  height:40px;
  object-fit:cover;
  border-radius:5px
}

.attachment span {
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.attachment button {
  flex-shrink:0
}

.attachment .icon {
  width:16px;
  height:16px
}

.form-error {
  color:var(--red);
  font-size:12px;
  margin-top:12px
}

.toast {
  position:fixed;
  bottom:30px;
  left:50%;
  transform:translateX(-50%);
  z-index:30;
  background:#242424;
  color:white;
  padding:14px 22px;
  border-radius:10px;
  box-shadow:0 6px 30px #0002;
  max-width:min(600px,90vw);
  font-size:14px;
  line-height:1.7;
  text-align:center
}

dialog {
  width:min(560px,calc(100vw - 32px));
  max-height:85vh;
  border:0;
  border-radius:18px;
  padding:0;
  color:var(--text);
  box-shadow:0 20px 90px #0003
}

dialog::backdrop {
  background:#0005;
  backdrop-filter:blur(3px)
}

.dialog-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:24px 28px 18px;
  border-bottom:1px solid #eee
}

.dialog-header h2 {
  font-size:20px
}

.dialog-content {
  padding:24px 28px 28px;
  font-size:14px;
  line-height:1.8;
  overflow-wrap:anywhere
}

.empty-state {
  padding:24px 0;
  text-align:center
}

.empty-state h3 {
  font-size:17px;
  margin:0 0 10px
}

.empty-state p,.subtle {
  color:#888
}

.primary-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 20px;
  border-radius:7px;
  background:var(--red);
  color:#fff
}

.secondary-button {
  padding:9px 16px;
  border-radius:7px;
  border:1px solid #ddd
}

.dialog-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:22px
}

.feedback-label {
  display:block;
  font-weight:700;
  margin-bottom:10px
}

.feedback-input {
  border:1px solid #ddd;
  border-radius:8px;
  padding:12px;
  resize:vertical;
  min-height:130px
}

.dialog-content .subtle {
  font-size:12px;
  margin-top:10px
}

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

.task-row {
  padding:16px;
  border:1px solid #eee;
  border-radius:10px
}

.task-row h3 {
  font-size:15px;
  margin:0 0 6px;
  white-space:pre-wrap
}

.task-row p {
  font-size:12px;
  color:#888
}

.task-badge {
  display:inline-block;
  font-size:11px;
  padding:1px 7px;
  background:#fff1f2;
  color:var(--red);
  border-radius:4px;
  margin-bottom:8px
}

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

.material-grid figure {
  margin:0;
  min-width:0
}

.material-grid img {
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
  border-radius:8px
}

.material-grid figcaption {
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.profile-line {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:20px
}

@media(min-width:1921px) {
  .main {
    max-width:calc(100vw - 400px)
  }
  .composer-section {
    margin-top:0
  }
  .content-sections {
    width:calc(100% - 144px)
  }
}

@media(max-width:1200px) and (min-width:761px) {
  :root {
    --sidebar:250px
  }
  .sidebar {
    padding-right:24px;
    padding-left:24px
  }
  .brand {
    width:100%;
    height:auto
  }
  .topbar-account {
    font-size:12px
  }
  .top-nav {
    left:auto;
    right:32px;
    transform:none;
    width:240px
  }
  .composer-section {
    width:86%
  }
  .mascot {
    right:22px
  }
  .content-sections {
    width:90%
  }
  .design-card {
    font-size:16px
  }
  .sidebar-account {
    font-size:12px
  }
  .nav-items {
    gap:4px
  }
  .nav-item {
    min-height:32px
  }
  .sidebar-placeholder {
    margin-top:24px
  }
  .sidebar-account {
    margin-top:24px
  }
}

@media(max-width:760px) {
  :root {
    --u:.75px;
    font-size:14px
  }
  .app-shell {
    display:block
  }
  .sidebar {
    display:none;
    position:fixed;
    inset:0 auto 0 0;
    width:280px;
    z-index:12;
    overflow-y:auto;
    padding:30px 28px
  }
  .sidebar.open {
    display:block
  }
  .sidebar-scrim.open {
    display:block;
    position:fixed;
    inset:0;
    background:#0006;
    z-index:11;
    width:100%;
    height:100%
  }
  .brand {
    width:224px;
    height:auto
  }
  .sidebar-placeholder {
    height:80px;
    margin-top:24px
  }
  .sidebar-account {
    margin-top:24px;
    padding-bottom:12px
  }
  .new-task {
    margin-top:28px
  }
  .personal-nav {
    margin-top:26px;
    padding-top:20px
  }
  .service-nav {
    margin-top:24px;
    padding-top:20px
  }
  .nav-items {
    margin-top:16px;
    gap:4px
  }
  .nav-item {
    height:36px
  }
  .topbar {
    height:86px;
    padding:24px 20px;
    align-items:center;
    gap:12px
  }
  .mobile-menu {
    display:inline-flex
  }
  .topbar-account {
    gap:8px
  }
  .logout {
    display:none
  }
  .top-nav {
    position:static;
    transform:none;
    margin-left:auto;
    width:auto;
    gap:20px
  }
  .top-nav a {
    display:none
  }
  .composer-section {
    width:calc(100% - 40px)
  }
  .greeting-row {
    height:105px;
    padding-top:18px
  }
  h1 {
    font-size:22px;
    max-width:calc(100% - 60px);
    line-height:1.5;
    position:relative;
    z-index:2
  }
  .mascot {
    width:80px;
    height:90px;
    right:4px;
    bottom:-3px
  }
  .composer {
    min-height:185px;
    padding:20px 18px 16px;
    border-radius:16px
  }
  #prompt {
    height:106px;
    min-height:106px;
    font-size:13px
  }
  .composer-tools {
    gap:7px
  }
  .send-tools {
    gap:10px
  }
  .model-toggle {
    gap:8px;
    font-size:12px
  }
  .content-sections {
    width:calc(100% - 40px);
    margin-top:48px
  }
  .card-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px
  }
  .design-card {
    min-height:116px;
    font-size:16px;
    border-radius:13px;
    padding:18px 5px
  }
  .section-title {
    font-size:24px;
    margin-left:0
  }
  .inspiration-section {
    margin-top:36px
  }
  .inspiration-section .card-grid {
    margin-top:24px
  }
  .tutorial-section {
    margin-top:36px
  }
  .tutorial-placeholder {
    height:170px;
    margin-top:24px;
    border-radius:18px
  }
  .tutorial-cover {
    width:70%
  }
  .footer {
    margin-top:56px;
    height:120px
  }
  .footer img {
    width:160px
  }
  .skills-menu {
    left:8px;
    max-width:calc(100% - 16px)
  }
  .dialog-header {
    padding:20px
  }
  .dialog-content {
    padding:20px
  }
  .sidebar-account button {
    font-size:12px
  }
}

.design-card {
  width:100%;
  min-width:0
}

/* Frame 3 — Agent conversation. The shared composer stays below the scrollable conversation. */
.agent-page .main {
  display:flex;
  flex-direction:column;
  height:100dvh;
  min-height:calc(1080 * var(--u));
  overflow:hidden;
}

.agent-page .sidebar {
  height:100dvh;
  min-height:calc(1080 * var(--u));
  overflow-y:auto;
  scrollbar-width:thin;
  padding-bottom:calc(27 * var(--u));
}

.agent-page .sidebar-placeholder { margin-top:calc(44 * var(--u)); }
.agent-page .topbar { height:calc(89 * var(--u)); flex-shrink:0; }
.agent-mobile-back { display:none; }

.agent-conversation {
  display:flex;
  flex-direction:column;
  gap:calc(31 * var(--u));
  width:77.631579%;
  max-width:1180px;
  min-height:160px;
  flex:1;
  margin:0 auto;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#ddd transparent;
}

.agent-conversation > * { flex-shrink:0; }
.agent-conversation:focus-visible { outline:1px solid #aaa; outline-offset:5px; }

.agent-user-message {
  align-self:flex-end;
  width:calc(636 * var(--u));
  max-width:100%;
  min-height:calc(110 * var(--u));
  padding:calc(25 * var(--u)) calc(52 * var(--u));
  border-radius:calc(20 * var(--u));
  background:#fff;
  font-weight:350;
  line-height:clamp(23px,1.5625vw,30px);
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}

.agent-user-meta {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  margin-bottom:8px;
  color:#999;
  font-size:12px;
  line-height:1.4;
  white-space:normal
}

.agent-user-meta strong { color:#666; font-weight:500; }
.agent-user-message > p { margin:0; }

.agent-example-response {
  width:calc(752 * var(--u));
  max-width:100%;
  min-height:calc(445 * var(--u));
  padding:calc(14 * var(--u)) calc(20 * var(--u));
  border-radius:calc(20 * var(--u));
  background:#fff;
  font-size:clamp(12px,.729167vw,14px);
  font-weight:350;
  line-height:1.65;
}

.agent-response-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#939393;
  padding-bottom:calc(5 * var(--u));
  border-bottom:1px solid #eee;
  margin-bottom:calc(15 * var(--u));
}

.agent-response-header button { display:flex; align-items:center; gap:4px; }
.agent-response-header .icon { width:12px; height:12px; }
.agent-response-header > span { font-size:11px; }
.agent-example-response > p { margin-top:calc(10 * var(--u)); }
.agent-example-response ol { margin:calc(10 * var(--u)) 0; padding-left:calc(28 * var(--u)); }
.agent-example-response code { background:#f3f3f3; border-radius:3px; padding:1px 5px; }
.agent-example-steps { color:#888; margin:calc(12 * var(--u)) 0; }
.agent-example-steps p { display:flex; align-items:center; gap:5px; }
.agent-example-steps .icon { width:14px; height:14px; stroke-width:1.5; }
.agent-example-steps p + p { margin-top:calc(10 * var(--u)); }

.agent-page .composer-section {
  flex-shrink:0;
  margin:0 auto calc(59 * var(--u));
}

.agent-page .greeting-row {
  height:calc(142 * var(--u));
  padding-top:calc(49 * var(--u));
  display:flex;
  align-items:flex-start;
  gap:calc(20 * var(--u));
}

.agent-history { margin-top:calc(5 * var(--u)); }
.agent-history .icon { width:calc(20 * var(--u)); height:calc(20 * var(--u)); }
.agent-page .skills-menu { top:auto; bottom:50px; max-height:55dvh; overflow-y:auto; }
.agent-page .model-menu { top:auto; bottom:40px; }
.agent-empty { margin:auto; padding:30px 15px; }
.agent-empty h3 { font-family:ShuHei,SourceHan,sans-serif; font-size:24px; }
.agent-delivery-status { align-self:flex-end; color:#888; font-size:12px; margin-top:calc(-17 * var(--u)); }
.agent-message-files { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.agent-message-files img { width:96px; height:96px; border-radius:8px; object-fit:cover; }
.agent-file-name { font-size:12px; padding:2px 8px; background:#f5f5f5; border-radius:4px; }
.agent-history-list { display:flex; flex-direction:column; gap:12px; }
.agent-history-item { width:100%; padding:16px; border:1px solid #e8e8e8; border-radius:10px; text-align:left; }
.agent-history-item strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agent-history-item span { display:block; font-size:12px; color:#888; margin-top:6px; }
.agent-history-item:hover { background:#f7f7f7; }
.agent-history-item.current { border-color:var(--red); background:#fff8f8; }

.agent-assistant-message {
  width:calc(860 * var(--u));
  max-width:100%;
  border-radius:calc(20 * var(--u));
  padding:20px 24px;
  background:#fff;
  overflow-wrap:anywhere;
}
.agent-answer-header { display:flex; align-items:center; justify-content:space-between; gap:16px; font-size:12px; color:#888; padding-bottom:12px; margin-bottom:12px; border-bottom:1px solid #eee; }
.agent-answer-text { white-space:pre-wrap; line-height:1.85; font-weight:350; }
.typing-text::after {
  content:'';
  display:inline-block;
  width:2px;
  height:1em;
  margin-left:3px;
  border-radius:1px;
  background:currentColor;
  vertical-align:-.12em;
  animation:agent-caret .72s steps(1,end) infinite
}
.agent-copy { color:#777; font-size:12px; }
.agent-copy:hover,.agent-retry:hover { color:var(--red); }
.agent-generated-image { margin:16px 0 0; }
.agent-generated-image img { display:block; width:100%; max-width:640px; height:auto; border-radius:12px; }
.agent-generated-image figcaption { display:flex; justify-content:space-between; gap:16px; margin-top:10px; font-size:12px; color:#888; }
.agent-save-image { color:var(--red); }
.agent-waiting { color:#888; font-size:14px; line-height:1.8; }
.agent-waiting::before { content:''; display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--red); margin-right:10px; animation:agent-pulse 1.4s ease-in-out infinite; }
.agent-retry { margin-left:12px; color:var(--red); font-size:12px; text-decoration:underline; }
.agent-search-toggle { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; height:30px; padding:0 9px; border:1px solid #e2e2e2; border-radius:7px; background:#fafafa; color:#888; font-size:12px; white-space:nowrap; cursor:pointer; }
.agent-search-toggle .icon { width:16px; height:16px; }
.agent-search-toggle:hover { color:var(--red); border-color:#eab3b8; }
.agent-search-toggle.is-active { background:#fff0f1; color:var(--red); border-color:#eab3b8; }
.agent-search-toggle:focus-visible { outline:2px solid #dc222f; outline-offset:3px; }
.agent-search-toggle:disabled { opacity:.5; cursor:not-allowed; }
.agent-search-toggle[hidden] { display:none; }
.agent-search-badge { border:1px solid #eebbc0; border-radius:5px; padding:1px 5px; color:var(--red); font-size:10px; white-space:nowrap; }
.agent-web-sources { margin-top:14px; border:1px solid #e9e9ef; border-radius:10px; padding:10px 12px; background:#fafafb; color:#888; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.agent-web-sources summary { color:#666; cursor:pointer; }
.agent-web-sources p { margin:7px 0; }
.agent-web-sources ol { list-style:none; padding:0; margin:10px 0 0; }
.agent-web-sources li { padding-top:8px; margin-top:8px; border-top:1px solid #ececf0; }
.agent-web-sources a { color:#b82736; text-decoration:underline; text-underline-offset:3px; }
.agent-web-sources time { font-size:11px; }
@media(max-width:760px) {
  .agent-page .composer-toolbar { flex-wrap:wrap; gap:10px; }
  .agent-page .send-tools { margin-left:auto; }
  .agent-search-toggle { padding-inline:7px; font-size:11px; }
}
.agent-delivery-status { line-height:1.8; }
.send-button.is-generating { background:#333; }
@keyframes agent-pulse { 50% { opacity:.35; } }
@keyframes agent-caret { 50% { opacity:0; } }
@media(prefers-reduced-motion:reduce) {
  .agent-waiting::before { animation:none; }
  .typing-text::after { display:none; animation:none; }
}

@media (min-width:761px) and (max-width:1200px) {
  .agent-conversation { width:86%; }
  .agent-page .sidebar-placeholder { margin-top:24px; }
}

@media (max-width:760px) {
  .agent-page .main { height:100dvh; min-height:740px; }
  .agent-page .topbar { height:80px; }
  .agent-page .sidebar { min-height:0; }
  .agent-page .sidebar-placeholder { margin-top:24px; }
  .agent-mobile-back { display:block; margin-left:auto; font-size:13px; color:#777; }
  .agent-conversation { width:calc(100% - 40px); min-height:260px; gap:20px; }
  .agent-user-message { width:90%; min-height:0; padding:16px 18px; border-radius:16px; font-size:13px; line-height:1.8; }
  .agent-example-response { width:100%; padding:14px 16px; min-height:0; border-radius:16px; font-size:12px; }
  .agent-page .composer-section { margin-bottom:20px; }
  .agent-page .greeting-row { height:95px; padding-top:26px; gap:14px; }
  .agent-page .mascot { width:76px; height:85px; }
  .agent-page h1 { font-size:23px; }
  .agent-history { margin-top:3px; }
  .agent-history .icon { width:19px; height:19px; }
  .agent-delivery-status { margin-top:-12px; font-size:11px; }
}

@media(min-width:761px) and (max-width:1050px) {
  .card-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important
  }
}

/* Keep the complete navigation anchored to the viewport, independently of the page. */
.sidebar,
.agent-page .sidebar {
  --side-u:min(var(--u), calc(100dvh / 1080));
  display:flex;
  flex-direction:column;
  height:100dvh;
  min-height:0;
  overflow:hidden;
  padding-top:calc(49 * var(--side-u));
  padding-bottom:calc(27 * var(--side-u));
}

.sidebar > :not(.sidebar-placeholder) { flex-shrink:0; }
.sidebar .brand { height:calc(40 * var(--side-u)); }
.sidebar .brand img { object-position:left center; }
.sidebar .new-task { height:calc(48 * var(--side-u)); margin-top:calc(43 * var(--side-u)); }
.sidebar .personal-nav { margin-top:calc(40 * var(--side-u)); padding-top:calc(27 * var(--side-u)); }
.sidebar .nav-section h2 { line-height:max(22px, calc(29 * var(--side-u))); }
.sidebar .nav-items { margin-top:calc(25 * var(--side-u)); gap:calc(8 * var(--side-u)); }
.sidebar .nav-item { height:calc(38 * var(--side-u)); min-height:32px; }
.sidebar .service-nav { margin-top:calc(34 * var(--side-u)); padding-top:calc(27 * var(--side-u)); }
.sidebar .sidebar-placeholder {
  flex:1 1 auto;
  min-height:0;
  max-height:calc(162 * var(--side-u));
  margin-top:calc(49 * var(--side-u));
}
.sidebar .sidebar-account { margin-top:auto; padding-top:calc(44 * var(--side-u)); padding-bottom:0; }
.sidebar .avatar { width:calc(32 * var(--side-u)); height:calc(32 * var(--side-u)); }

@media(max-height:720px) {
  .sidebar .sidebar-placeholder { display:none; }
  .sidebar .sidebar-account { padding-top:12px; }
}

@media(max-height:600px) {
  .sidebar .nav-item { min-height:28px; }
  .sidebar .new-task { min-height:36px; }
}

@media(max-width:760px) {
  .sidebar,
  .agent-page .sidebar { display:none; }
  .sidebar.open,
  .agent-page .sidebar.open { display:flex; }
}
.account-loading > :not(.account-boot-error) { visibility:hidden; }
.account-boot-error { margin:20vh auto; max-width:480px; padding:28px; text-align:center; font:14px/1.8 sans-serif; }
.account-boot-error a,.account-admin-link { color:#c12435; }
.account-sync-state { position:fixed; z-index:10000; right:22px; bottom:20px; border-radius:8px; padding:9px 14px; background:#fff9ee; color:#907444; box-shadow:0 3px 18px #0001; font-size:11px; }
.account-sync-state:empty { display:none; }
.account-admin-link { font-size:12px; margin-left:10px; }
