/* Chat-specific visual treatment, based on the home and conversation references. */
body.chat-refresh {
  --chat-sidebar-width: clamp(232px, 15.6vw, 288px);
  --text: #202222;
  --muted: #858887;
  --line: #e9ebea;
  --chat-green: #709f74;
  --mode-accent: #709f74;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: #f8f9f8;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.chat-refresh button, .chat-refresh select, .chat-refresh textarea { font: inherit; }
.chat-refresh button { -webkit-tap-highlight-color: transparent; }
.chat-refresh button:focus-visible, .chat-refresh a:focus-visible, .chat-refresh select:focus-visible {
  outline: 2px solid #709f74;
  outline-offset: 4px;
}
.chat-refresh :where(.chat-shell, #sharedSidebar, .chat-history-dialog) svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.chat-refresh .desktop-stage { width: 100%; height: 100dvh; }
body.chat-refresh .app-window {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--chat-sidebar-width) minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: #f8f9f8;
  box-shadow: none;
}

/* The navigation is styled by shared/sidebar-unified.css. */

/* Home: an airy heading, one focused composer, then the task gallery. */
body.chat-refresh .chat-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  padding-top: 0;
  overflow: hidden;
  background: #f8f9f8;
}
body.chat-refresh.is-home .chat-shell {
  overflow-y: auto;
  background-color: #fafbf9;
  background-image: linear-gradient(#6a8c7a05 1px, transparent 1px), linear-gradient(90deg, #6a8c7a05 1px, transparent 1px), radial-gradient(ellipse at 34% 10%, #d9f3e369, transparent 35%), radial-gradient(ellipse at 85% 88%, #d5f1eb85, transparent 35%), radial-gradient(ellipse at 7% 85%, #edf2cf65, transparent 38%);
  background-size: 88px 88px, 88px 88px, auto, auto, auto;
}
body.chat-refresh .chat-shell > .topbar {
  position: relative;
  inset: auto;
  z-index: 35;
  flex: 0 0 64px;
  width: 100%;
  min-height: 64px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  border-bottom: 1px solid #e9ece9;
  background: #f8f9f8;
}
body.chat-refresh.is-home .chat-shell > .topbar { border-bottom-color: transparent; background: transparent; }
.chat-refresh .chat-shell > .topbar .topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-refresh .workspace-version-wrap { min-width: 0; padding: 0; }
.chat-refresh .conversation-title { max-width: 440px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.chat-refresh .conversation-title-icon { width: 17px; height: 17px; color: #c4c9c5; }
.chat-refresh .conversation-meta, .chat-refresh #creditCenterBtn, .chat-refresh #saveTemplateBtn, .chat-refresh #brandDemoPlan { display: none; }
.chat-refresh.is-home .workspace-version-wrap, .chat-refresh.is-home .conversation-title-icon { display: none; }
.chat-refresh .chat-shell > .topbar .topbar-actions { flex-wrap: nowrap; margin-left: auto; gap: 9px; }
.chat-refresh .chat-history-trigger { order: 2; display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 17px; border: 1px solid #e3e7e3; border-radius: 999px; background: #fff; color: #777f77; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chat-refresh .chat-history-trigger svg { width: 17px; height: 17px; }
.chat-refresh .chat-history-trigger:hover { border-color: #b5c7b5; color: #4c6c52; }
.chat-refresh .topbar-icon-btn { order: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 6px; border: 0; border-radius: 9px; background: #eff1ee; color: #6d756e; cursor: pointer; }
.chat-refresh .global-brand-entry { order: 1; }
.chat-refresh .global-brand-trigger { min-height: 34px; padding: 6px 10px; border-color: #e5e9e3; border-radius: 999px; background: #ffffffb0; color: #7b8578; font-size: 11px; }
.chat-refresh .global-brand-symbol { font-size: 14px; }
.chat-refresh .sidebar-mobile-toggle { display: none; place-items: center; width: 34px; height: 34px; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: #727b72; cursor: pointer; }
body.chat-refresh .workbuddy-workbench { flex-shrink: 0; padding: clamp(42px, 7vh, 80px) 20px 0; }
.chat-refresh .workbuddy-workbench h2 { display: flex; align-items: center; justify-content: center; gap: 17px; color: #161b17; font-size: clamp(28px, 2.55vw, 40px); font-weight: 650; letter-spacing: -1px; }
.chat-refresh .workbuddy-workbench h2 > span:last-child { font-weight: 650; }
.chat-refresh .chat-hero-mark { display: block; flex: 0 0 44px; width: 44px; height: 47px; background: linear-gradient(145deg, #d8ef89, #9cca4a); mask: url("./assets/hubitos-mark.svg") center / contain no-repeat; filter: drop-shadow(0 2px 1px #99ba6333); }
.chat-refresh .workbuddy-workbench > p { margin: 12px 0 0; color: #9aa69a; font-size: 12px; letter-spacing: .2px; }
body.chat-refresh .mode-switcher { position: relative; z-index: 40; display: flex; flex-shrink: 0; width: max-content; max-width: calc(100% - 32px); gap: 3px; margin: 28px auto 0; padding: 4px; border: 0; border-radius: 15px; background: #e8ece7c4; box-shadow: none; backdrop-filter: blur(12px); overflow: visible; }
.chat-refresh .mode-switcher > button { min-height: 43px; gap: 9px; padding: 0 20px; border-radius: 11px; color: #8a9289; font-size: 15px; font-weight: 550; transform: none; }
.chat-refresh .mode-switcher button.is-active { color: #222a23; background: #fff; box-shadow: 0 2px 5px #253d2510; }
.chat-refresh .mode-switcher .mode-more-trigger { width: 36px; min-width: 36px; padding: 8px; }

/* Image and video creation share one workspace, with persistent tabs. */
.chat-refresh .content-workspace-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 28px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.chat-refresh .content-workspace-tabs[hidden] { display: none; }
.chat-refresh .content-workspace-tabs button {
  position: relative;
  min-height: 54px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}
.chat-refresh .content-workspace-tabs button.is-active { color: #365f3b; }
.chat-refresh .content-workspace-tabs button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--chat-green);
}
body.chat-refresh.is-content-workspace .mode-switcher { display: none; }
body.chat-refresh.is-content-workspace .workspace-version-wrap { display: block; }
body.chat-refresh.is-content-workspace .topbar .conversation-title { display: block; font-size: 16px; }
body.chat-refresh.is-content-workspace .send-btn[hidden] { display: none; }
.chat-refresh .mode-more-trigger svg { width: 18px; height: 18px; }
.chat-refresh .mode-more-menu { position: absolute; z-index: 45; right: 0; top: calc(100% + 8px); width: 196px; padding: 6px; border: 1px solid #e7ece5; border-radius: 12px; background: #fff; box-shadow: 0 12px 34px #20362216; }
.chat-refresh .mode-more-menu[hidden] { display: none; }
.chat-refresh .mode-more-menu button { justify-content: flex-start; width: 100%; min-height: 40px; padding: 0 12px; color: #5f6b60; font-size: 13px; }
.chat-refresh .mode-more-menu button:hover { background: #f1f6ee; }
body.chat-refresh .chat-content { flex: 1; gap: 0; display: flex; flex-direction: column; width: 100%; height: auto; min-height: 0; margin: 0; padding: 0; overflow: hidden; }
body.chat-refresh.is-home .chat-content { display: block; flex: none; width: 100%; margin-top: 24px; padding: 0 clamp(24px, 4.2vw, 64px) 48px; overflow: visible; }
body.chat-refresh.is-home .chat-scroll { display: none; }
body.chat-refresh .composer-wrap { flex-shrink: 0; width: 100%; max-width: none; margin: 0 auto; gap: 0; padding: 12px clamp(24px, 4vw, 56px) 22px; }
body.chat-refresh.is-home .composer-wrap { width: 100%; padding: 0; background: transparent; }
body.chat-refresh .composer, body.chat-refresh .composer.is-workbuddy-composer { width: min(900px, 100%); max-width: 100%; min-height: 158px; margin-inline: auto; padding: 16px; border: 1px solid #e4e8e3; border-radius: 16px; background: #fff; box-shadow: 0 7px 28px #20322508; }
body.chat-refresh.is-home .composer, body.chat-refresh.is-home .composer.is-workbuddy-composer { min-height: 190px; box-shadow: 0 8px 36px #2032250c; }
body.chat-refresh .composer:focus-within { border-color: #b2c9ad; box-shadow: 0 0 0 3px #8fb67d0b, 0 8px 30px #2032250d; }
body.chat-refresh .composer textarea { min-height: 80px; max-height: 220px; padding: 4px 0 12px; color: #313833; font-size: 15px; line-height: 1.75; resize: none; }
body.chat-refresh.is-home .composer textarea { min-height: 115px; }
.chat-refresh .composer textarea::placeholder { color: #b5bcb4; }
.chat-refresh .composer-footer { gap: 10px; padding: 0; }
.chat-refresh .composer-tools { gap: 8px; }
.chat-refresh .attachment-support-copy { display: none; }
.chat-refresh .composer-icon-btn { display: grid; place-items: center; width: 35px; height: 35px; padding: 7px; border: 0; border-radius: 9px; background: #f4f5f3; color: #8c958b; box-shadow: none; cursor: pointer; }
.chat-refresh #attachFileBtn { background: transparent; font-size: 30px; font-weight: 300; }
.chat-refresh .web-search-btn[aria-pressed="true"] { color: #62a565; background: #edf7ec; box-shadow: inset 0 0 0 1px #8bbf83; }
.chat-refresh .composer-actions { gap: 9px; }
.chat-refresh .workbuddy-voice-btn { display: none; }
body.chat-refresh .model-pill { max-width: 300px; min-height: 35px; padding: 0 11px; border: 1px solid #e6eae4; border-radius: 9px; background: #fff; color: #4b564b; font-size: 12px; box-shadow: none; }
.chat-refresh #modelPickerLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-refresh .format-menu { bottom: calc(100% + 12px); max-width: calc(100vw - 40px); border: 1px solid #e1e8dc; border-radius: 14px; background: #fff; box-shadow: 0 16px 48px #2430221c; }
.chat-refresh .format-option { border-radius: 9px; }
.chat-refresh .format-option:hover, .chat-refresh .format-option.active { background: #f1f6ec; }
body.chat-refresh .send-btn { display: grid; place-items: center; width: 37px; height: 37px; padding: 0; border: 0; border-radius: 10px; background: #131714; color: #fff; box-shadow: none; font-size: 25px; font-weight: 400; }
body.chat-refresh .send-btn:disabled { background: #d2d7d0; color: #fff; }
.chat-refresh .image-settings-trigger, .chat-refresh .commerce-settings-trigger { min-height: 35px; border: 1px solid #e6eae4; background: #fff; color: #758170; font-size: 11px; }
.chat-refresh .scene-context-row { margin-bottom: 12px; background: #f7faf4; border-color: #e8eee3; }
.chat-refresh .scene-context-row strong { color: #66755b; }

/* Generous task cards; the existing template preview and prompt handoff still work. */
body.chat-refresh .template-dock { width: 100%; margin: 44px auto 0; padding: 0; border: 0; background: transparent; }
.chat-refresh .template-dock-head { align-items: end; margin-bottom: 16px; }
.chat-refresh .template-dock-head .section-kicker { display: none; }
.chat-refresh .template-dock-head h3 { color: #7e897d; font-size: 12px; font-weight: 450; letter-spacing: .5px; }
.chat-refresh .template-dock-actions { gap: 6px; }
.chat-refresh .template-dock-actions button { height: 26px; border: 0; background: #ffffff75; color: #9aa497; font-size: 11px; }
.chat-refresh #templatePrevBtn, .chat-refresh #templateNextBtn { display: none; }
.chat-refresh .template-strip, .chat-refresh .template-strip.is-commerce-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; gap: 15px; margin: 0; overflow: visible; }
.chat-refresh .template-card { position: relative; min-height: 155px; padding: 18px; gap: 18px 13px; border: 1px solid #e8ece5; border-radius: 17px; background: #ffffffdc; box-shadow: none; }
.chat-refresh .template-card:not(.has-media) { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; align-content: start; }
.chat-refresh .template-card:not(.has-media) .template-card-copy { display: contents; }
.chat-refresh .template-card:not(.has-media) h4 { grid-column: 2; margin: 0; padding-right: 26px; color: #333b33; font-size: 15px; font-weight: 600; line-height: 1.5; }
.chat-refresh .template-card:not(.has-media) p { grid-column: 1 / -1; display: -webkit-box; margin: 0; color: #99a095; font-size: 12px; line-height: 1.8; -webkit-line-clamp: 2; }
.chat-refresh .template-card-icon { width: 44px; height: 44px; border-radius: 12px; background: #eaf5e6; color: #4fa05d; }
.chat-refresh .template-card-icon svg { width: 25px; height: 25px; }
.chat-refresh .template-card-launch { position: absolute; top: 25px; right: 16px; display: grid; place-items: center; width: 29px; height: 29px; padding: 6px; border: 0; border-radius: 50%; background: #f2f7ed; color: #91aa83; cursor: pointer; }
.chat-refresh .template-card-launch svg { width: 16px; height: 16px; }
.chat-refresh .template-card:not(.has-media) .template-card-actions { display: none; }
.chat-refresh .template-card:hover { transform: translateY(-3px); border-color: #b9d3af; background: #fff; box-shadow: 0 10px 24px #46614509; }
.chat-refresh .template-card:focus-visible { outline: 2px solid #a9c49e; outline-offset: 3px; }
.chat-refresh[data-mode="work"][data-work-submode="chat"] .template-category-bar { display: none; }
.chat-refresh .template-category-bar { margin: 0 0 16px; }
.chat-refresh .template-card.has-media { padding: 0; overflow: hidden; }
.chat-refresh .template-card.has-media .template-card-copy { padding: 15px; }
.chat-refresh .template-card.has-media h4 { font-size: 14px; }
.chat-refresh .template-card.has-media p { font-size: 11px; line-height: 1.7; }
.chat-refresh .template-card.has-media .template-card-actions { padding: 0 15px 15px; }
.chat-refresh .template-card-actions button.use { background: #719d6e; color: #fff; }
.chat-refresh .template-use-primary { background: #719d6e; color: #fff; }
.chat-refresh .commerce-submode-switcher, .chat-refresh .video-submode-switcher { flex-shrink: 0; margin: 18px auto 0; }

/* Conversation: a calm reading surface with a composer anchored below the scroll area. */
body.chat-refresh:not(.is-home) .workbuddy-workbench,
body.chat-refresh:not(.is-home) .mode-switcher,
body.chat-refresh:not(.is-home) .work-submode-switcher,
body.chat-refresh:not(.is-home) .commerce-submode-switcher,
body.chat-refresh:not(.is-home) .video-submode-switcher,
body.chat-refresh:not(.is-home) .template-dock,
body.chat-refresh:not(.is-home) .social-agent-panel,
body.chat-refresh:not(.is-home) .commerce-agent-panel { display: none !important; }
body.chat-refresh .chat-shell > .chat-content > .chat-scroll { flex: 1; height: auto; min-height: 0; padding: 30px clamp(28px, 4vw, 56px) 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d6dbd5 transparent; }
.chat-refresh #messageList { width: min(1120px, 100%); margin: 0 auto; }
.chat-refresh .message-row { width: 100%; margin: 0 0 28px; }
.chat-refresh .message-row.user-row { justify-content: flex-end; }
.chat-refresh .user-message { max-width: min(74%, 720px); padding: 13px 18px; border-radius: 17px 17px 5px 17px; background: #709f74; color: #fff; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-refresh .assistant-row { align-items: flex-start; }
.chat-refresh .assistant-head { gap: 9px; margin-bottom: 10px; }
.chat-refresh .assistant-badge { position: relative; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: #719e73; font-size: 0; box-shadow: none; }
.chat-refresh .assistant-badge::before { content: ""; width: 19px; height: 20px; background: #fff; mask: url("./assets/hubitos-mark.svg") center / contain no-repeat; }
.chat-refresh .assistant-name { color: #39433a; font-size: 13px; font-weight: 550; letter-spacing: 0; text-transform: none; }
.chat-refresh .assistant-card { width: min(900px, 100%); max-width: 100%; padding: 20px 23px; border: 0; border-radius: 17px; background: #fff; box-shadow: none; }
.chat-refresh .assistant-text { color: #353b36; font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-refresh .assistant-response-footer { display: flex; align-items: center; flex-wrap: wrap; width: min(900px, 100%); gap: 4px 12px; margin-top: 8px; }
.chat-refresh .message-copy-btn, .chat-refresh .message-refresh-btn { display: grid; place-items: center; width: 26px; height: 28px; padding: 5px; border: 0; border-radius: 6px; background: transparent; color: #a0a99f; cursor: pointer; }
.chat-refresh .message-copy-btn:hover, .chat-refresh .message-refresh-btn:hover { background: #eaf0e7; color: #608564; }
.chat-refresh .message-copy-btn:focus-visible, .chat-refresh .message-refresh-btn:focus-visible { outline: 2px solid #719e73; outline-offset: 2px; }
.chat-refresh .message-copy-btn svg, .chat-refresh .message-refresh-btn svg { width: 15px; height: 15px; }
.chat-refresh .message-refresh-btn:disabled { opacity: .6; cursor: wait; }
.chat-refresh .message-refresh-btn.is-loading svg { animation: reply-refresh-spin .8s linear infinite; }
@keyframes reply-refresh-spin { to { transform: rotate(360deg); } }
@media(prefers-reduced-motion: reduce) { .chat-refresh .message-refresh-btn.is-loading svg { animation: none; } }
.chat-refresh .message-usage { gap: 6px 13px; margin-top: 8px; padding: 0; color: #9ba398; font-size: 11px; line-height: 20px; }
.chat-refresh .assistant-response-footer .message-usage { margin: 0; }
.chat-refresh .message-usage svg { width: 14px; height: 14px; flex-basis: 14px; }
.chat-refresh .message-meta-row.compact { gap: 8px; margin: 0 0 0 auto; padding: 0; }
.chat-refresh .message-meta-row .assistant-status { display: none; }
.chat-refresh .quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.chat-refresh .quick-action { min-height: 35px; padding: 6px 14px; border: 1px solid #e7ebe4; border-radius: 999px; background: #fff; color: #8c9787; font-size: 12px; font-weight: 400; line-height: 1.6; }
.chat-refresh .quick-action:hover { border-color: #b9cdb0; background: #f4f8f0; color: #5d7f56; }
.chat-refresh .compare-card { width: 100%; }
.chat-refresh .typing-card { width: max-content; }
.chat-refresh .first-post-result { max-width: 900px; }
.chat-refresh .chat-image-result { margin-top: 18px; }
.chat-refresh .social-agent-panel, .chat-refresh .commerce-agent-panel { width: min(1000px, 100%); margin: 30px auto 0; }

/* The history control is a real picker, with the same conversations as the sidebar. */
.chat-refresh .chat-history-dialog { width: min(520px, calc(100vw - 32px)); max-height: min(650px, calc(100dvh - 64px)); padding: 24px; border: 1px solid #e4eae0; border-radius: 20px; background: #fff; box-shadow: 0 24px 100px #17231c30; color: #263027; }
.chat-refresh .chat-history-dialog::backdrop { background: #17251a28; backdrop-filter: blur(5px); }
.chat-refresh .chat-history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chat-refresh .chat-history-head span { color: #9ca992; font-size: 9px; letter-spacing: 1.7px; }
.chat-refresh .chat-history-head h2 { margin: 6px 0 0; font-size: 21px; font-weight: 600; }
.chat-refresh .chat-history-head > button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f3f6ef; color: #7c8975; font-size: 21px; cursor: pointer; }
.chat-refresh .chat-history-items { display: grid; gap: 5px; }
.chat-refresh .chat-history-item { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 66px; padding: 12px; border: 0; border-radius: 12px; background: transparent; color: #83937a; text-align: left; cursor: pointer; }
.chat-refresh .chat-history-item:hover, .chat-refresh .chat-history-item.is-current { background: #f3f7ee; }
.chat-refresh .chat-history-item > span { flex: 1; min-width: 0; display: grid; gap: 6px; }
.chat-refresh .chat-history-item strong { overflow: hidden; color: #44543d; font-size: 13px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.chat-refresh .chat-history-item small { color: #a2ac9c; font-size: 10px; }
.chat-refresh .chat-history-item > svg:last-child { width: 16px; height: 16px; color: #b5c0ae; }
.chat-refresh .sidebar-scrim[hidden] { display: none; }
.chat-refresh .toast { border-color: #dce7d3; background: #fff; color: #617958; box-shadow: 0 6px 24px #30412612; }
body.chat-refresh.sidebar-collapsed .app-window { grid-template-columns: 0 minmax(0, 1fr); }
.chat-refresh.sidebar-collapsed #sharedSidebar { overflow: hidden; visibility: hidden; }
.chat-refresh.sidebar-collapsed .sidebar-mobile-toggle { display: grid; }
body.chat-refresh.is-embedded .app-window { grid-template-columns: minmax(0, 1fr); }
.chat-refresh.is-embedded #sharedSidebar { display: none !important; }

@media (max-width: 1100px) {
  .chat-refresh .template-strip, .chat-refresh .template-strip.is-commerce-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-refresh .topbar-actions .global-brand-trigger > span:nth-child(2) { max-width: 92px; overflow: hidden; }
  .chat-refresh .message-meta-row.compact { margin-left: 0; }
}
@media (max-width: 820px) {
  body.chat-refresh .app-window { grid-template-columns: minmax(0, 1fr); }
  body.chat-refresh #sharedSidebar { position: fixed; inset: 0 auto 0 0; z-index: 85; width: 250px; visibility: hidden; transform: translateX(-100%); transition: transform .2s ease, visibility .2s; }
  body.chat-refresh.sidebar-open #sharedSidebar { visibility: visible; transform: none; }
  .chat-refresh .sidebar-scrim { position: fixed; inset: 0; z-index: 80; border: 0; background: #1e2a2033; backdrop-filter: blur(3px); }
  .chat-refresh .sidebar-mobile-toggle { display: grid; }
  body.chat-refresh .chat-shell > .topbar { flex-basis: 58px; min-height: 58px; padding: 10px 16px; }
  .chat-refresh .conversation-title { max-width: 230px; font-size: 13px; }
  .chat-refresh .topbar-actions { gap: 6px; }
  .chat-refresh .global-brand-trigger { padding: 6px 8px; }
  body.chat-refresh .workbuddy-workbench { padding-top: 36px; }
  body.chat-refresh.is-home .chat-content { padding-inline: 24px; }
  body.chat-refresh .chat-shell > .chat-content > .chat-scroll { padding: 24px 24px 12px; }
  body.chat-refresh .composer-wrap { padding: 12px 24px 20px; }
  .chat-refresh .conversation-title-icon { display: none; }
}
@media (max-width: 620px) {
  body.chat-refresh.is-content-workspace .composer.is-video-composer { grid-template-columns: minmax(0, 1fr); }
  .chat-refresh.is-content-workspace .video-options-panel,
  .chat-refresh.is-content-workspace .video-options-panel select { min-width: 0; max-width: 100%; }
  .chat-refresh .workbuddy-workbench h2 { gap: 11px; font-size: 26px; }
  .chat-refresh .chat-hero-mark { width: 34px; height: 37px; flex-basis: 34px; }
  .chat-refresh .workbuddy-workbench > p { font-size: 11px; }
  .chat-refresh .topbar-actions .global-brand-entry { display: none; }
  .chat-refresh .chat-history-trigger { height: 32px; gap: 5px; padding: 0 10px; font-size: 11px; }
  .chat-refresh .topbar-icon-btn { width: 30px; height: 30px; }
  .chat-refresh .conversation-title { max-width: 160px; }
  body.chat-refresh .mode-switcher { margin-top: 23px; padding: 3px; }
  .chat-refresh .mode-switcher > button { min-height: 40px; padding: 0 16px; font-size: 13px; }
  .chat-refresh .mode-switcher .mode-more-trigger { padding: 8px; }
  body.chat-refresh.is-home .chat-content { margin-top: 22px; padding-inline: 16px; }
  body.chat-refresh .composer, body.chat-refresh .composer.is-workbuddy-composer { padding: 13px; border-radius: 14px; }
  body.chat-refresh .composer textarea { font-size: 14px; }
  body.chat-refresh .composer-wrap { padding: 10px 16px 16px; }
  .chat-refresh .composer-footer { flex-wrap: nowrap; gap: 6px; }
  .chat-refresh .composer-tools { gap: 3px; }
  .chat-refresh .composer-icon-btn { width: 30px; height: 32px; padding: 6px; }
  body.chat-refresh .model-pill { min-height: 32px; max-width: 155px; padding: 0 8px; font-size: 10px; }
  .chat-refresh .composer-actions { gap: 5px; }
  body.chat-refresh .send-btn { width: 32px; height: 32px; font-size: 22px; }
  .chat-refresh .template-strip, .chat-refresh .template-strip.is-commerce-gallery { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.chat-refresh .template-dock { margin-top: 30px; }
  .chat-refresh .template-card { min-height: 145px; }
  body.chat-refresh .chat-shell > .chat-content > .chat-scroll { padding: 20px 16px 10px; }
  .chat-refresh .user-message { max-width: 87%; font-size: 14px; }
  .chat-refresh .assistant-card { padding: 17px; border-radius: 14px; }
  .chat-refresh .assistant-text { font-size: 14px; }
  .chat-refresh .assistant-response-footer { gap: 4px 7px; }
  .chat-refresh .message-usage { gap: 4px 9px; font-size: 10px; }
  .chat-refresh .image-settings-trigger, .chat-refresh .commerce-settings-trigger { padding-inline: 6px; font-size: 9px; }
  .chat-refresh .template-dock-head h3 { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-refresh *, .chat-refresh *::before { transition: none !important; animation: none !important; }
}
