body{background:#f4f5f7}.shell{width:min(1180px,100%);background:#fff;box-shadow:none;border-left:1px solid #edf0f3;border-right:1px solid #edf0f3;position:relative}header{height:72px!important;border-bottom:1px solid #eceef2!important;padding:0 30px!important;background:#fff}.brand .logo{width:38px;height:38px;border-radius:50%;font-size:13px;background:#58b8f4}.brand h1{font-size:16px}.brand p{font-size:11px}
.messages{padding:42px clamp(28px,7vw,92px) 170px;background:#fff}.message{margin-bottom:34px}.message.assistant:not(.welcome-message){max-width:900px}.message.assistant:not(.welcome-message) .bubble{background:transparent;border:0;padding:5px 0 5px 4px;max-width:820px}.message.assistant:not(.welcome-message) .avatar{background:#58b8f4;border-radius:50%}.message.user .bubble{background:#f0f3f7;color:#273249;border-radius:16px;border:1px solid #e8ebf0;padding:12px 17px}
.welcome-message{display:grid;grid-template-columns:72px 1fr;column-gap:22px;max-width:920px;margin:0 auto 48px}.welcome-face{grid-column:1;width:64px;height:64px;border-radius:50%;background:#59baf5;position:relative}.welcome-face:before,.welcome-face:after{content:"";position:absolute;top:20px;width:5px;height:11px;background:#17324a;border-radius:4px}.welcome-face:before{left:21px}.welcome-face:after{right:21px}.welcome-face span{position:absolute;left:22px;top:34px;width:20px;height:11px;border:4px solid #17324a;border-top:0;border-radius:0 0 20px 20px;transform:rotate(8deg)}.welcome-title{grid-column:2;margin:5px 0 30px;font-size:36px;letter-spacing:-1px;color:#101216}.welcome-message .bubble{grid-column:1/3;margin-top:8px;max-width:none!important;background:#fafbfc!important;border:1px solid #eceff3!important;border-radius:18px!important;padding:24px 28px!important}
footer{position:absolute;z-index:3;left:50%;bottom:0;transform:translateX(-50%);width:min(980px,calc(100% - 48px));border:0;background:linear-gradient(transparent,#fff 24%);padding:34px 0 16px}.composer{min-height:78px;border:1px solid #d9dce2;border-radius:18px;padding:12px 13px;box-shadow:0 8px 30px #26344c12}.composer textarea{font-size:15px;padding:10px 8px}.attach{background:#fff;border:1px solid #e2e5ea;border-radius:50%;font-size:20px}#send{border-radius:50%;background:linear-gradient(145deg,#72bfff,#9b7df5);box-shadow:0 5px 14px #7c8deb35}.hint{margin-top:7px}.ghost{background:#fff!important;border-color:#e1e4e9!important;color:#252b36!important;box-shadow:0 2px 8px #1f2d4210}.new-icon{background:transparent;color:#252b36;font-size:20px}
@media(max-width:600px){header{padding:0 12px!important}.brand h1{font-size:14px}.messages{padding:28px 16px 150px}.welcome-message{grid-template-columns:48px 1fr;column-gap:12px}.welcome-face{width:44px;height:44px}.welcome-face:before,.welcome-face:after{top:14px;width:4px;height:8px}.welcome-face:before{left:14px}.welcome-face:after{right:14px}.welcome-face span{left:15px;top:24px;width:15px;height:8px;border-width:3px}.welcome-title{font-size:25px;margin:5px 0 20px}.welcome-message .bubble{padding:18px!important}.message.assistant:not(.welcome-message) .avatar{display:none}footer{width:calc(100% - 24px)}}

/* WorkOS-inspired two-column customer layout */
.app-layout{width:min(1440px,100%);height:100vh;margin:auto;display:grid;grid-template-columns:270px minmax(0,1fr);background:#f4f5f7;overflow:hidden}
.side-panel{margin:12px 0 12px 12px;padding:26px 20px;background:#f7f7f9;border:1px solid #eceef1;border-radius:22px 0 0 22px;display:flex;flex-direction:column;gap:28px}.side-panel .brand{align-items:center}.side-panel .brand .logo{width:44px;height:44px;border-radius:50%;background:#59baf5}.side-panel .brand h1{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-panel .ghost{position:static!important;grid-column:auto!important;width:100%;height:54px;justify-content:center!important;background:#fff!important;border:1px solid #e3e5e9!important;border-radius:13px!important;font-size:16px;box-shadow:0 3px 8px #1f2d4214!important}.side-panel .ghost:hover{border-color:#cfd4dc!important;box-shadow:0 6px 16px #1f2d4220!important}.side-panel .new-icon{font-size:25px}.side-note{margin-top:auto;padding:15px 8px;color:#89919f;font-size:12px;border-top:1px solid #e4e6ea}.side-note span{display:inline-block;width:7px;height:7px;border-radius:50%;background:#4fbd83;margin-right:7px}
.app-layout>.shell{width:auto;height:calc(100vh - 24px);margin:12px 12px 12px 0;border:0;border-radius:0 22px 22px 0;overflow:hidden}.app-layout .messages{padding-top:70px}.app-layout .welcome-message{margin-left:0;margin-right:auto;max-width:820px}.app-layout footer{width:min(900px,calc(100% - 64px));bottom:10px}.app-layout .composer{display:block;min-height:116px;padding:17px 18px 12px}.app-layout .composer textarea{display:block;width:100%;min-height:50px;padding:5px 4px}.composer-actions{display:flex;align-items:center;gap:8px}.composer-actions .attach{width:31px;height:31px;border:0;font-size:22px}.upload-label{font-size:13px;color:#4f5663}.composer-actions #send{margin-left:auto}
@media(max-width:760px){.app-layout{grid-template-columns:1fr;grid-template-rows:72px minmax(0,1fr)}.side-panel{margin:0;padding:11px 14px;border-radius:0;border-width:0 0 1px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px}.side-panel .brand p,.side-note{display:none}.side-panel .ghost{width:auto;height:43px;padding:6px 12px!important}.app-layout>.shell{height:100%;margin:0;border-radius:0}.app-layout .messages{padding-top:30px}.app-layout footer{width:calc(100% - 24px)}}

/* Compact first-screen presentation: welcome content and composer fit without scrolling. */
.app-layout{grid-template-columns:230px minmax(0,1fr)}.side-panel{padding:22px 16px;gap:22px}.side-panel .brand .logo{width:40px;height:40px}.side-panel .brand h1{font-size:15px}.side-panel .ghost{height:46px;font-size:14px}.side-panel .new-icon{font-size:21px}.app-layout .messages{padding:26px clamp(24px,5vw,66px) 122px}.app-layout .welcome-message{grid-template-columns:52px 1fr;column-gap:16px;max-width:880px;margin-bottom:22px}.app-layout .welcome-face{width:48px;height:48px}.app-layout .welcome-face:before,.app-layout .welcome-face:after{top:15px;width:4px;height:9px}.app-layout .welcome-face:before{left:16px}.app-layout .welcome-face:after{right:16px}.app-layout .welcome-face span{left:16px;top:26px;width:16px;height:9px;border-width:3px}.app-layout .welcome-title{font-size:28px;margin:4px 0 14px;letter-spacing:-.5px}.app-layout .welcome-message .bubble{margin-top:0;padding:15px 20px!important;border-radius:14px!important;font-size:13px;line-height:1.5}.app-layout .welcome-message .bubble p{margin:.32em 0}.app-layout .welcome-message .bubble hr{margin:.65em 0}.app-layout .welcome-message .bubble blockquote{margin:.45em 0;padding:.42em .72em}.app-layout .welcome-message .bubble ol,.app-layout .welcome-message .bubble ul{margin:.3em 0}.app-layout footer{width:min(880px,calc(100% - 48px));padding:20px 0 10px;background:linear-gradient(transparent,#fff 18%)}.app-layout .composer{min-height:82px;padding:11px 14px 9px;border-radius:15px}.app-layout .composer textarea{min-height:34px;font-size:14px}.composer-actions .attach{width:27px;height:27px}.composer-actions #send{width:34px;height:34px}.app-layout .hint{font-size:10px;margin-top:4px}
@media(max-height:820px) and (min-width:761px){.app-layout .messages{padding-top:18px}.app-layout .welcome-title{font-size:24px;margin-bottom:8px}.app-layout .welcome-message .bubble{font-size:12px;line-height:1.42;padding:11px 16px!important}.app-layout .welcome-message .bubble hr{margin:.42em 0}.app-layout .welcome-message .bubble blockquote{margin:.3em 0}.app-layout footer{padding-top:12px}.app-layout .composer{min-height:72px}}

/* Final reading scale: broad, calm workspace with reference-sized typography. */
.app-layout .messages{padding:34px max(32px,calc((100% - 1040px)/2)) 124px}.app-layout .welcome-message{display:block;max-width:1040px;margin:0 auto 24px}.app-layout .welcome-face,.app-layout .welcome-title{display:none}.app-layout .welcome-message .bubble{display:block;margin:0;max-width:1040px!important;background:#fff!important;border:0!important;border-radius:0!important;padding:0!important;font-size:16px;line-height:1.66;color:#151923}.app-layout .welcome-message .bubble p{margin:.48em 0}.app-layout .welcome-message .bubble hr{margin:.78em 0}.app-layout .welcome-message .bubble blockquote{margin:.55em 0;padding:.45em .8em;background:#f7f8fa;border-left-color:#dfe3e8;color:#4e5665}.app-layout .welcome-message .bubble strong{color:#111827}.app-layout footer{width:min(1040px,calc(100% - 64px))}
.app-layout .message.assistant:not(.welcome-message){width:min(1040px,100%);margin-left:auto;margin-right:auto}.app-layout .message.assistant:not(.welcome-message) .bubble{font-size:16px;line-height:1.66;max-width:960px}.app-layout .message.user{width:min(1040px,100%);margin-left:auto;margin-right:auto}
@media(max-height:820px) and (min-width:761px){.app-layout .welcome-message .bubble{font-size:14px;line-height:1.5}.app-layout .welcome-message .bubble p{margin:.3em 0}.app-layout .welcome-message .bubble hr{margin:.45em 0}.app-layout .welcome-message .bubble blockquote{margin:.32em 0;padding:.3em .7em}}

/* Smaller type scale for high-DPI and browser-scaled desktop displays. */
.app-layout .messages{padding-left:max(28px,calc((100% - 920px)/2));padding-right:max(28px,calc((100% - 920px)/2))}.app-layout .welcome-message{max-width:920px}.app-layout .welcome-message .bubble{max-width:920px!important;font-size:13px;line-height:1.58}.app-layout .message.assistant:not(.welcome-message){width:min(920px,100%)}.app-layout .message.assistant:not(.welcome-message) .bubble{font-size:14px;line-height:1.58;max-width:850px}.app-layout .message.user{width:min(920px,100%)}.app-layout footer{width:min(920px,calc(100% - 56px))}.side-panel .brand h1{font-size:14px}.side-panel .brand p{font-size:11px}.side-panel .ghost{font-size:13px}.app-layout .composer textarea{font-size:13px}.upload-label{font-size:12px}
@media(max-height:820px) and (min-width:761px){.app-layout .welcome-message .bubble{font-size:12px;line-height:1.46}}

/* Match the WorkOS conversation column: a 768px reading measure and 14/22 typography. */
@media(min-width:761px){
  .app-layout .messages{
    padding-left:max(28px,calc((100% - 768px)/2));
    padding-right:max(28px,calc((100% - 768px)/2));
  }
  .app-layout .welcome-message,
  .app-layout .message.assistant:not(.welcome-message),
  .app-layout .message.user{
    width:100%;
    max-width:768px;
  }
  .app-layout .welcome-message .bubble{
    max-width:768px!important;
    font-size:14px;
    line-height:1.5714286;
  }
  .app-layout .message.assistant:not(.welcome-message) .bubble{
    max-width:700px;
    font-size:14px;
    line-height:1.5714286;
  }
  .app-layout footer{
    width:min(768px,calc(100% - 56px));
  }
  .app-layout .composer textarea{
    font-size:14px;
    line-height:22px;
  }

  /* Visually align the conversation column with the WorkOS reference. */
  .app-layout .welcome-message,
  .app-layout .message.assistant:not(.welcome-message),
  .app-layout .message.user{
    position:relative;
    left:-40px;
  }
  .app-layout footer{
    margin-left:-40px;
  }
}

/* Animated agent avatar extracted from the original WorkOS agent page. */
.agent-face{--look-x:0px;--look-y:0px;--turn-x:0deg;--turn-y:0deg;--face-scale:1;position:relative;display:block;width:100%;height:100%;transform-style:preserve-3d;will-change:transform;transform:perspective(90px) rotateX(var(--turn-x)) rotateY(var(--turn-y)) scale(var(--face-scale));transition:transform 140ms ease-out}
.agent-face img,.agent-face svg{position:absolute;inset:0;display:block;width:100%;height:100%}
.agent-face img{animation:agent-breathe 3.4s ease-in-out infinite;filter:drop-shadow(0 3px 5px rgba(32,170,255,.12))}
.agent-face svg{padding:25%;overflow:visible;color:#102f47;transform:translate(var(--look-x),var(--look-y));transition:transform 120ms ease-out}
.agent-face svg path{fill:none;stroke:currentColor}
.agent-face .agent-mouth{stroke-width:1.5;stroke-linecap:square;animation:agent-smile 3.8s ease-in-out infinite}
.agent-face .agent-eye{stroke-width:2.5;stroke-linecap:round;transform-box:fill-box;transform-origin:center;animation:agent-blink 4.4s infinite}
.agent-face .agent-eye-right{animation-delay:.06s}
.side-panel .brand .logo,.message.assistant:not(.welcome-message) .avatar{background:transparent!important;overflow:visible}
@keyframes agent-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-.6px) scale(1.025)}}
@keyframes agent-blink{0%,44%,48%,100%{transform:scaleY(1)}46%{transform:scaleY(.1)}}
@keyframes agent-smile{0%,100%{transform:translateY(0)}50%{transform:translateY(.2px)}}
@media(prefers-reduced-motion:reduce){.agent-face,.agent-face img,.agent-face .agent-eye,.agent-face .agent-mouth{animation:none;transition:none}}

/* Uploaded files become part of the user's chat turn after sending. */
.message.user .user-turn{display:flex;flex-direction:column;align-items:flex-end;gap:10px;max-width:calc(100% - 48px);min-width:0}
.message.user .user-turn>.bubble{max-width:100%}
.message-files{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;width:100%}
.message-file-card{display:flex;align-items:center;gap:11px;width:230px;min-height:56px;padding:10px 13px;border:1px solid #e1e4e9;border-radius:13px;background:#fff;color:#151923;text-decoration:none;box-shadow:0 1px 2px rgba(21,31,48,.03);transition:border-color .18s ease,box-shadow .18s ease}
.message-file-card:hover{border-color:#cdd3dc;box-shadow:0 4px 12px rgba(21,31,48,.08)}
.message-file-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:38px;border-radius:5px;background:linear-gradient(145deg,#8b5cf6,#a855f7);color:#fff}
.message-file-icon svg{width:22px;height:22px}
.message-file-icon:not(.is-video){background:linear-gradient(145deg,#5f8df7,#4774df)}
.message-file-meta{display:flex;min-width:0;flex-direction:column;gap:2px;text-align:left}
.message-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px}
.message-file-type{color:#969da9;font-size:11px;line-height:16px}
@media(max-width:600px){.message.user .user-turn{max-width:calc(100% - 40px)}.message-file-card{width:min(230px,100%)}.message-files{flex-direction:column;align-items:flex-end}}

/* Downloadable artifacts returned by the agent. */
.message.assistant .bubble a{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  margin:5px 0;
  padding:11px 15px;
  border:1px solid #dfe5ef;
  border-radius:12px;
  background:#f7f9fc;
  color:#315fce;
  font-weight:600;
  text-decoration:none;
  overflow-wrap:anywhere;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}
.message.assistant .bubble a:hover{
  border-color:#94aff4;
  background:#eef3ff;
  transform:translateY(-1px);
}

/* New-conversation confirmation. */
.confirm-dialog{
  width:min(390px,calc(100% - 32px));
  padding:28px;
  border:0;
  border-radius:20px;
  background:#fff;
  color:#182033;
  box-shadow:0 24px 70px #15203a35;
  text-align:center;
}
.confirm-dialog::backdrop{background:#11182766;backdrop-filter:blur(3px)}
.confirm-icon{display:grid;place-items:center;width:46px;height:46px;margin:0 auto 15px;border-radius:50%;background:#eef3ff;color:#5272e8;font-size:24px;font-weight:700}
.confirm-dialog h2{margin:0 0 9px;font-size:19px}
.confirm-dialog p{margin:0;color:#687186;font-size:14px;line-height:1.6}
.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:25px}
.confirm-actions button{height:42px;border-radius:11px;font-size:14px;cursor:pointer}
.confirm-cancel{border:1px solid #dfe3ea;background:#fff;color:#4e5769}
.confirm-primary{border:1px solid #5875ec;background:#5875ec;color:#fff;box-shadow:0 5px 14px #5875ec35}
.confirm-cancel:hover{background:#f7f8fa}.confirm-primary:hover{background:#4967df}

/* Make the complete “＋ 上传文件” control open the native file picker. */
.composer-actions .upload-trigger{
  display:inline-flex;
  align-items:center;
  width:auto;
  height:31px;
  padding:0 7px 0 2px;
  gap:8px;
  border:0;
  border-radius:9px;
  cursor:pointer;
  user-select:none;
}
.composer-actions .upload-trigger:hover{background:#f3f5f8}
.upload-trigger .attach-plus{font-size:22px;line-height:1;color:#465169}
.upload-trigger .upload-label{font-size:12px;color:#4f5663;white-space:nowrap}

/* Suggested prompts above the composer. */
.quick-prompts{display:flex;align-items:center;gap:7px;margin:0 0 7px}
.quick-prompts button{width:auto;min-width:0;padding:5px 10px;border:1px solid #e0e4eb;border-radius:999px;background:#fff;color:#596174;font-size:11px;line-height:1.35;text-align:center;white-space:nowrap;cursor:pointer;box-shadow:none;transition:border-color .18s ease,background .18s ease,transform .18s ease}
.quick-prompts button:hover{border-color:#98acf0;background:#f7f9ff;transform:translateY(-1px)}
@media(min-width:761px){.app-layout .messages{padding-bottom:170px}}
@media(max-width:600px){.quick-prompts{overflow-x:auto}.quick-prompts button{flex:0 0 auto}}

.confirm-actions.single{grid-template-columns:1fr}

/* Slightly smaller reading scale. */
@media(min-width:761px){
  .app-layout .welcome-message .bubble,
  .app-layout .message.assistant:not(.welcome-message) .bubble,
  .app-layout .message.user .bubble{
    font-size:13px;
    line-height:1.55;
  }
  .app-layout .composer textarea{font-size:13px;line-height:20px}
}
