:root { --workspace-nav-height: calc(64px + env(safe-area-inset-bottom, 0px)); }
.chat-assistant-view { --workspace-nav-height: 0px; }
.workspace-bottom-nav {
  position: fixed !important; inset: auto 0 0 !important; z-index: 40;
  width: 100% !important; min-height: var(--workspace-nav-height);
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 5px max(12px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: #fff; border-top: 1px solid #e5e9ef; gap: 4px;
}
.workspace-bottom-nav .workspace-nav-button {
  min-width: 0; min-height: 52px; border: 0; border-radius: 12px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 4px; color: #637083; background: transparent; text-decoration: none;
  font: 500 12px/1.3 system-ui, sans-serif; cursor: pointer; touch-action: manipulation;
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}
.workspace-bottom-nav .workspace-nav-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.workspace-bottom-nav .workspace-nav-button.active { color: #245bdb; background: #edf3ff; font-weight: 750; }
.workspace-bottom-nav .workspace-nav-button:focus-visible { outline: 3px solid #3370ff; outline-offset: -3px; }
.chat-workspace-view .topbar, .chat-workspace-view .workspace-top-nav, .chat-workspace-view .sidebar { display: none !important; }
.chat-workspace-view .app { display: block; min-height: 100dvh; }
.chat-workspace-view .content { width: min(1200px, 100%); padding: 24px clamp(16px, 4vw, 44px) calc(var(--workspace-nav-height) + 28px); }
.chat-workspace-view .workspace-view { min-height: calc(100dvh - var(--workspace-nav-height) - 48px); }
.chat-workspace-view .view-head { margin-bottom: 20px; }
.chat-workspace-view .view-head h1 { font-size: clamp(25px, 4vw, 34px); margin-top: 0; }
.chat-workspace-view .profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.chat-workspace-view .profile-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 5px 14px; padding: 18px; text-align: left; align-items: center; }
.chat-workspace-view .profile-card .avatar { width: 44px; height: 44px; border-radius: 13px; font-size: 19px; margin: 0; grid-row: 1 / span 3; }
.chat-workspace-view .profile-card h2 { margin: 0; font-size: 18px; }
.chat-workspace-view .profile-email, .chat-workspace-view .profile-tags { grid-column: 2; margin: 0; overflow-wrap: anywhere; }
.chat-workspace-view #view-profile .eyebrow { display: none; }
.chat-workspace-view .workspace-account a[href="/learning/chat"] { display: none; }
dialog.workspace-fullscreen-page[open] {
  position: fixed !important; inset: 0 !important; z-index: 80 !important;
  display: block; width: 100vw !important; height: 100dvh !important;
  max-width: none !important; max-height: none !important; margin: 0 !important;
  padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important; overflow-y: auto; background: #f5f7fb;
}
dialog.workspace-fullscreen-page .modal-inner { width: min(1120px, 100%); max-width: none; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 36px; }
dialog.workspace-fullscreen-page .modal-head { position: sticky; top: 0; z-index: 1; background: #f5f7fb; padding: 12px 0; }
dialog.workspace-fullscreen-page .task-close { width: auto; min-width: 80px; padding: 8px 12px; font-size: 14px; white-space: nowrap; }
body:has(dialog.workspace-fullscreen-page[open]) { overflow: hidden; }
body:has(dialog.workspace-fullscreen-page[open]) .workspace-bottom-nav { display: none !important; }
.chat-assistant-view { padding-bottom: var(--workspace-nav-height); }
.chat-assistant-view #app, .chat-assistant-view .app-shell { height: calc(100dvh - var(--workspace-nav-height)) !important; min-height: 0 !important; }
.chat-assistant-view .workspace { min-height: 0 !important; }
.chat-assistant-view .village-nav-item, .chat-assistant-view button[aria-label="新手村"] { display: none !important; }
@media (max-width: 640px) {
  .chat-workspace-view .content { padding-top: 18px; }
  .chat-workspace-view .profile-card { padding: 14px; }
  dialog.workspace-fullscreen-page .modal-head { align-items: flex-start; gap: 12px; }
}

/* The original Chat shell had an unfinished navigation row. */
.chat-assistant-view .chat-primary-navigation { display: none !important; }

/* Assistant header: laboratory title, account menu, and new-chat control. */
.chat-assistant-view .topbar .desktop-lab-brand,.chat-assistant-view .topbar-actions>:not(.new-chat-bottom):not(.settings-trigger),.chat-assistant-view .om-orientation-link,.chat-assistant-view .sidebar .om-orientation-link{display:none!important}
.chat-assistant-view .topbar{min-height:58px;gap:12px}.chat-assistant-view .topbar-title{min-width:0}.chat-assistant-view .topbar .lab-name{display:block!important;font-size:17px!important;line-height:1.4;white-space:normal}
.chat-assistant-view .topbar-actions>.new-chat-bottom{display:flex!important;position:static!important;inset:auto!important;margin:0!important;width:40px!important;height:40px!important;min-width:40px;border:1px solid #e0e7ed;border-radius:11px;padding:8px!important;justify-content:center;align-items:center;background:#fff}
.chat-assistant-view .topbar-actions>.new-chat-bottom span{display:none!important}.chat-assistant-view .topbar-actions>.new-chat-bottom svg{width:23px;height:23px}
@media(max-width:600px){.chat-assistant-view .topbar{padding:10px 14px!important}.chat-assistant-view .topbar .lab-name{font-size:16px!important}}

.chat-assistant-view .topbar-actions>.new-chat-bottom{color:#245bdb!important}.chat-assistant-view .lab-name:after,.chat-assistant-view .om-orientation-nav{display:none!important}

@media(max-width:960px){body.chat-assistant-view .sidebar,body.chat-assistant-view .collapse-handle{display:none!important}body.chat-assistant-view #app{grid-template-columns:minmax(0,1fr)!important}body.chat-assistant-view .workspace{width:100%!important;max-width:100%!important;margin-left:0!important}body.chat-assistant-view .topbar-actions>:not(.new-chat-bottom):not(.settings-trigger){display:none!important}}

@media(max-width:960px){body.chat-assistant-view .student-login-trigger,body.chat-assistant-view .om-orientation-card,body.chat-assistant-view .om-orientation-link,body.chat-assistant-view .om-orientation-nav{display:none!important}}

@media(max-width:960px){
body.chat-assistant-view{height:100dvh;min-height:0!important;overflow:hidden;padding-bottom:0!important}
body.chat-assistant-view #app,body.chat-assistant-view .app-shell{height:calc(100dvh - var(--workspace-nav-height))!important;min-height:0!important;overflow:hidden}
body.chat-assistant-view .workspace{height:100%!important;margin:0!important;border-radius:0;display:flex!important;flex-direction:column;overflow:hidden}
body.chat-assistant-view .topbar{display:flex!important;height:auto!important;min-height:58px;flex:0 0 auto;padding:10px 14px!important;overflow:visible!important}
body.chat-assistant-view .chat-surface{display:flex!important;flex-direction:column;flex:1;min-height:0;height:auto!important;overflow:hidden;padding:0 10px max(8px,env(safe-area-inset-bottom,0px));gap:6px}
body.chat-assistant-view .empty-state{position:relative!important;inset:auto!important;order:1;flex:1;min-height:0;padding-top:24px!important;overflow:auto}
body.chat-assistant-view.chat-active .empty-state{display:none!important}
body.chat-assistant-view .conversation{display:none;position:relative!important;inset:auto!important;order:1;flex:1;min-height:0;overflow:hidden}
body.chat-assistant-view.chat-active .conversation{display:block}
body.chat-assistant-view .message-list{position:absolute!important;inset:0!important;transform:none!important;width:100%!important;padding:12px 2px 18px!important;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body.chat-assistant-view .suggestions{position:relative!important;inset:auto!important;transform:none!important;order:2;flex:0 0 auto;width:100%!important;display:flex!important;gap:8px;overflow-x:auto;overflow-y:hidden;padding:3px 0;opacity:1!important;visibility:visible!important;pointer-events:auto!important;scrollbar-width:thin}
body.chat-assistant-view .suggestions .suggestion{display:flex!important;flex:0 0 auto;max-width:80vw;min-height:36px;padding:7px 10px;font-size:12px;white-space:nowrap}
body.chat-assistant-view .composer-wrap{position:relative!important;inset:auto!important;transform:none!important;order:3;flex:0 0 auto;width:100%!important;margin:0;transition:none!important}
body.chat-assistant-view .prompt-input{font-size:16px!important;max-height:96px!important}
}

@media(max-width:960px){body.chat-assistant-view .suggestions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible!important;gap:6px}body.chat-assistant-view .suggestions .suggestion{width:100%;max-width:none;min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left}body.chat-assistant-view .suggestions .suggestion:nth-child(n+5){display:none!important}}
