/* Help-center design, 2026-10-27. Keep article/media and maintenance styles intact. */
:root {
  --brand: #ff6955;
  --brand-dark: #f15c4b;
  --brand-soft: #fff6f5;
  --text: #1f2937;
  --muted: #8a919f;
  --line: #e9eaef;
  --content-width: 980px;
  --sidebar-width: 280px;
  --prompt-edge-space: 16px;
}
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
body { height: 100dvh; font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; }
button, select, textarea { font-family: inherit; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); height: 100dvh; transition: none; }
.sidebar { height: 100dvh; padding: 20px 16px 16px; background: #f9fafc; border-color: #e6e8ec; }
.brand { gap: 10px; min-height: 32px; margin: 0 0 28px; font-size: 18px; }
.brand strong { font-weight: 600; letter-spacing: 1px; }
.brand-status { display: none; }
.toolbar-button { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 5px; border: 0; border-radius: 6px; color: #7c8593; background: transparent; }
.toolbar-button:hover { color: var(--text); background: #f0f1f5; }
.sidebar-toggle { margin-left: auto; }
.bee-mascot { display: inline-block; position: relative; width: 40px; height: 30px; background: url("assets/ui/bee.svg") center / contain no-repeat; transform: none; animation: none; }
.bee-mascot > *, .bee-mascot::before, .bee-mascot::after { display: none; }
.bee-avatar { flex: 0 0 38px; width: 38px; height: 32px; }
.new-chat { flex-shrink: 0; min-height: 44px; gap: 10px; font-size: 14px; font-weight: 600; box-shadow: 0 1px 9px #17213908; }
.new-chat .ui-icon { width: 16px; height: 16px; }
.history-section { margin-top: 34px; }
.section-label { font-size: 14px; color: #858d9b; }
.history-list { gap: 2px; margin-top: 12px; padding: 0; }
.history-item { min-height: 38px; padding: 9px 12px; border-radius: 6px; }
.history-item .history-title { font-size: 14px; font-weight: 400; color: #303a46; }
.history-item.active .history-title { font-weight: 600; }
.history-item:hover { background: #f0f1f5; }
.history-item.active { background: #fff; box-shadow: 0 1px 10px #17213903; }
.empty-history { font-size: 13px; padding: 12px; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: 48px; padding-top: 16px; border-top: 1px solid #e0e3e9; }
.language-switcher { display: inline-flex; width: auto; gap: 8px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #697381; }
.language-switcher .ui-icon { width: 16px; height: 16px; }
.language-current { color: inherit; font-size: 12px; font-weight: 400; }
.sidebar-footer .toolbar-button { width: 28px; height: 28px; }
.sidebar-footer .ui-icon { width: 18px; height: 18px; }
.chat-panel, .chat-panel.is-empty, .chat-panel.has-conversation {
  --chat-side-space: 32px;
  --prompt-reserved-space: 260px; /* toolbar, composer and grid gaps */
  display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 24px;
  height: 100dvh; min-height: 0; padding: 72px 32px 28px; overflow: hidden;
}
.chat-toolbar { position: absolute; z-index: 12; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 24px; height: 72px; padding: 0 24px; background: #fff; }
.role-picker { display: flex; align-items: center; gap: 0; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.role-picker label { color: var(--text); font-size: 16px; font-weight: 600; white-space: nowrap; }
.role-select-wrap { position: relative; display: inline-flex; margin-left: 0; flex-shrink: 0; }
.role-picker select { width: 54px; min-width: 54px; height: 36px; padding: 0 22px 0 0; border: 0; background: transparent; appearance: none; color: var(--text); font-size: 16px; font-weight: 600; cursor: pointer; }
.role-select-wrap > .ui-icon { position: absolute; right: 0; top: 11px; width: 14px; height: 14px; pointer-events: none; }
.role-picker small { margin-left: 20px; color: #a5abb5; font-size: 12px; font-weight: 400; line-height: 1.5; white-space: nowrap; }
.help-toggle { margin-left: auto; color: #27313d; }
.help-toggle .ui-icon { width: 24px; height: 24px; stroke-width: 1.8; }
.collapsed-tools { display: none; align-items: center; gap: 8px; }
.welcome-heading { position: absolute; top: 96px; left: 50%; display: flex; align-items: center; gap: 24px; width: min(var(--content-width), calc(100% - 64px)); margin: 0; transform: translateX(-50%); }
.prompt-bee { flex: 0 0 68px; width: 68px; height: 52px; animation: none; }
.prompt-heading h1 { margin: 0 0 8px; color: var(--text); font-size: 24px; font-weight: 600; line-height: 1.3; }
.prompt-heading p { margin: 0; font-size: 16px; color: #8a919f; line-height: 1.5; }
.has-conversation .welcome-heading { display: none; }
/* The landing view and popover share one card viewport. Reserve space for
   card shadows, the 6px hover lift and focus rings without drawing a second,
   full-row panel around a single product card. Negative margins keep the cards
   aligned with the composer and preserve their original width and spacing. */
.prompt-strip, .chat-panel.is-empty .prompt-strip {
  grid-row: 2; align-self: end; justify-self: center;
  width: min(calc(var(--content-width) + 2 * var(--prompt-edge-space)), calc(100% + 2 * var(--prompt-edge-space)));
  max-height: calc(100dvh - var(--prompt-reserved-space) + 2 * var(--prompt-edge-space)); min-height: 0;
  margin: calc(-1 * var(--prompt-edge-space)); padding: var(--prompt-edge-space);
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  animation: none; transition: none;
}
.prompt-panel-content { width: 100%; min-width: 0; }
.prompt-grid, .prompt-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.prompt-card { min-height: 68px; padding: 12px 16px; gap: 7px; border: 1px solid transparent; border-radius: 12px; background: #f6f7fb; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.5; transition: border-color .15s, background-color .15s, transform .15s; }
.prompt-card small { color: #a3aab5; font-size: 12px; font-weight: 400; line-height: 1.5; }
.prompt-card:hover, .prompt-card:focus-visible { border-color: #ffccc5; background: #fef5f6; color: var(--text); box-shadow: 0 2px 7px #6a31200a; transform: none; }
.prompt-product-card { grid-template-columns: minmax(0, 1fr); gap: 4px; min-height: 162px; padding: 24px; border: 1px solid #e7eaef; border-radius: 16px; background: #fff; box-shadow: 0 6px 22px #28344c08; }
.prompt-product-mark { display: none; }
.prompt-product-title { font-size: 18px; font-weight: 600; }
.prompt-product-card > small { grid-column: auto; font-size: 14px; line-height: 1.5; }
.prompt-product-footer { grid-column: auto; margin-top: 12px; min-height: 42px; padding: 10px 16px; border-radius: 24px; background: #f6f7fb; font-weight: 400; }
.prompt-product-footer > small { color: #8c94a2; font-size: 12px; }
.prompt-product-footer > span { color: #939baa; }
.prompt-product-card:hover .prompt-product-footer { background: #fff; }
.prompt-group { padding: 24px; gap: 24px; border: 1px solid #e7eaef; border-radius: 16px; background: #fff; box-shadow: 0 6px 22px #28344c08; }
.prompt-group-heading { min-height: 24px; padding: 0; gap: 12px; font-size: 18px; }
.prompt-group-navigation { flex-wrap: nowrap; gap: 16px; }
.prompt-group-heading strong { color: var(--text); font-size: 18px; font-weight: 600; }
.prompt-group-heading > span { color: #8a919f; font-size: 14px; }
.prompt-back { min-height: 24px; padding: 0; border: 0; background: transparent; color: #8a919f; font-size: 14px; font-weight: 400; }
.prompt-back:hover { background: transparent; color: var(--brand); }
.prompt-back > span { font-size: 20px; vertical-align: -1px; }
.prompt-group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prompt-card-more { border: 1px solid transparent; background: #f6f7fb; }
.prompt-card-more > span > span { display: none; }
.prompt-card-more small { align-self: end; }
.prompt-loading { padding: 24px; border-color: #e7eaef; background: #f8f9fb; }
.prompt-collapsed-icon { display: none !important; }
.chat-panel.has-conversation .prompt-strip,
.chat-panel.has-conversation .prompt-strip.prompt-open {
  display: none; position: absolute; z-index: 10; top: auto; right: auto;
  bottom: calc(164px - var(--prompt-edge-space)); left: 50%;
  width: min(calc(var(--content-width) + 2 * var(--prompt-edge-space)), calc(100% - 2 * var(--chat-side-space) + 2 * var(--prompt-edge-space)));
  height: auto; max-height: calc(100dvh - var(--prompt-reserved-space) + 2 * var(--prompt-edge-space));
  margin: 0; padding: var(--prompt-edge-space); border: 0; border-radius: 0;
  background: transparent; box-shadow: none; overflow-x: hidden; overflow-y: auto;
  transform: translateX(-50%); animation: none;
}
.chat-panel.has-conversation .prompt-strip.prompt-open { display: block; }
.chat-panel.has-conversation .prompt-panel-content { visibility: hidden; opacity: 0; transform: none; pointer-events: none; transition: none; }
.chat-panel.has-conversation .prompt-strip.prompt-open .prompt-panel-content { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
.chat-panel.has-conversation .prompt-strip.prompt-open .prompt-panel-close { display: none; }
.messages, .chat-panel.has-conversation .messages { grid-row: 1; justify-self: center; width: min(var(--content-width), 100%); padding: 16px 0 0; gap: 32px; scrollbar-gutter: auto; scrollbar-width: thin; scroll-behavior: auto; }
.chat-panel.is-empty .messages { display: block; visibility: hidden; pointer-events: none; }
.message, .message.assistant, .message.assistant.has-tutorial, .message.assistant.has-help-browser, .message.assistant.has-guidance { max-width: 100%; width: 100%; font-size: 16px; line-height: 1.65; }
.message.assistant.has-avatar, .message.assistant.has-tutorial.has-avatar, .message.assistant.has-screenshot.has-avatar, .message.assistant.has-guidance.has-avatar, .message.assistant.has-help-browser.has-avatar { grid-template-columns: 36px minmax(0, 1fr); gap: 16px; }
.message-avatar, .message-avatar:hover { width: 36px; height: 30px; margin-top: 0; animation: none; }
.message-avatar .bee-mascot { width: 36px; height: 28px; }
.message.has-screenshot .message-body, .message.has-guidance .message-body { width: 100%; }
.message-meta { display: none; }
.message.user { max-width: calc(100% - 60px); width: fit-content; }
.message.user .message-content { padding: 16px; border-radius: 20px 20px 4px 20px; background: #f1f2f6; color: #303a46; font-size: 16px; line-height: 1.65; font-weight: 400; text-align: left; }
.message.user .message-body { gap: 0; }
.message-tools { display: flex; gap: 12px; min-height: 24px; margin-top: 10px; color: #8a919f; opacity: 1; }
.message-tools button { display: inline-grid; place-items: center; width: 22px; height: 24px; padding: 3px; border-radius: 4px; color: #8992a0; }
.message-tools button:hover { background: #f1f2f6; color: #5b6674; }
.message-tools button.active { color: var(--brand); }
.message-tools .ui-icon { width: 16px; height: 16px; }
.message-tools time { font-size: 14px; color: #8a919f; line-height: 24px; }
.message-tools button::after { position: absolute; z-index: 2; left: 50%; bottom: calc(100% + 8px); width: max-content; max-width: 180px; padding: 6px 10px; border-radius: 6px; background: #202833; color: #fff; content: attr(aria-label); font-size: 12px; opacity: 0; pointer-events: none; transform: translateX(-50%); }
.message-tools button:hover::after, .message-tools button:focus-visible::after { opacity: 1; }
.message.user .message-tools { gap: 12px; margin-top: 2px; }
.message.is-thinking .message-body { padding: 0; border: 0; background: transparent; }
.thinking-indicator { min-height: 28px; gap: 0; color: #303a46; font-size: 16px; }
.thinking-spinner { display: none; }
.guided-next { gap: 10px; margin-top: 12px; padding: 16px; border: 0; border-radius: 12px; background: #f6f7fb; }
.guided-action { padding: 6px 12px; border-color: #e5e7ed; color: #687281; background: #fff; font-size: 14px; font-weight: 400; }
.guided-action:hover { border-color: #ffccc5; color: var(--brand); background: #fef5f6; }
.answer-tutorial { border-color: #e9eaf0; border-radius: 12px; box-shadow: 0 3px 16px #26344d05; }
.tutorial-tabs { padding: 6px; background: #f6f7fb; border-color: #ececf1; }
.tutorial-tab { min-height: 42px; color: #7f8897; font-size: 16px; font-weight: 600; }
.tutorial-tab.active, .tutorial-tab:hover { color: var(--brand); }
.tutorial-tab.active::after { display: none; }
.tutorial-tab:hover { background: #fff; }
.tutorial-panel { padding: 20px; }
.help-article-heading { color: var(--text); }
.help-article-heading-1 { font-size: 20px; }
.help-article-heading-2 { font-size: 18px; }
.help-article-paragraph { color: #7e8796; }
.article-image { width: auto; max-width: 100%; border-color: #e9eaf0; }
.composer, .chat-panel.is-empty .composer, .chat-panel.has-conversation .composer { grid-row: 3; display: grid; grid-template-columns: 1fr auto; grid-template-rows: minmax(44px, 1fr) 32px; align-self: end; align-items: center; justify-self: center; gap: 4px 12px; width: min(var(--content-width), 100%); min-height: 112px; height: auto; margin: 0; padding: 12px 16px 10px; border: 1px solid #e7eaef; border-radius: 16px; background: #fff; box-shadow: 0 3px 9px #1d293b07; }
.composer:focus-within { border-color: var(--brand); }
.composer textarea { grid-column: 1 / -1; grid-row: 1; width: 100%; height: 48px; min-height: 44px; max-height: 150px; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 16px; line-height: 1.5; }
.composer textarea::placeholder { color: #a4acb8; }
.composer .icon-button { grid-column: 1; grid-row: 2; display: inline-grid; width: 22px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 4px; color: #303a46; background: transparent; }
.composer .icon-button .ui-icon { width: 22px; height: 22px; }
.send-button { grid-column: 2; grid-row: 2; width: 32px; height: 32px; padding: 7px; border: 0; border-radius: 50%; color: #fff; background: #fac3b9; box-shadow: 0 3px 12px #fa6b5520; transition: background-color .15s; }
.send-button svg { width: 18px; height: 18px; }
.send-button .send-icon path { fill: currentColor; stroke: none; }
.send-button .send-icon path + path { fill: none; stroke: #fac3b9; stroke-width: 1.3; }
.send-button:hover { background: #fac3b9; box-shadow: 0 3px 12px #fa6b5520; transform: none; }
.composer.has-input .send-button { background: var(--brand); }
.composer.has-input .send-icon path + path { stroke: var(--brand); }
.stop-icon { display: none; }
.composer.is-busy .send-button { border: 2px solid var(--brand); padding: 5px; color: var(--brand); background: #fff; box-shadow: none; }
.composer.is-busy .send-icon { display: none; }
.composer.is-busy .stop-icon { display: block; }
.shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.shell.sidebar-collapsed .sidebar { visibility: hidden; padding: 0; border: 0; }
.shell.sidebar-collapsed .collapsed-tools { display: flex; }
.sidebar-scrim { display: none; }
/* At the 1200/980px design sizes the 280px sidebar stays expanded. */
@media (max-width: 1300px) {
  .chat-panel, .chat-panel.is-empty, .chat-panel.has-conversation { --chat-side-space: 36px; padding-right: 36px; padding-left: 36px; }
  .welcome-heading { width: calc(100% - 72px); }
  .prompt-product-card { padding: 24px; }
}
@media (max-width: 760px) {
  .shell, .shell.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 30; top: 0; left: 0; width: 280px; visibility: visible; }
  .shell.sidebar-collapsed .sidebar { visibility: hidden; width: 0; }
  .collapsed-tools { display: flex; }
  .sidebar-scrim:not([hidden]) { position: fixed; z-index: 25; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: #20283355; }
  .chat-panel, .chat-panel.is-empty, .chat-panel.has-conversation { --chat-side-space: 16px; --prompt-reserved-space: 224px; padding: 64px 16px max(16px, env(safe-area-inset-bottom)); gap: 16px; }
  .chat-toolbar { height: 64px; padding: 0 12px; gap: 12px; }
  .role-picker label, .role-picker select { font-size: 14px; }
  .role-picker small { display: none; }
  .role-select-wrap { margin-left: 4px; }
  .collapsed-tools { gap: 0; }
  .toolbar-button { width: 28px; }
  .welcome-heading { top: 88px; width: calc(100% - 32px); gap: 12px; }
  .prompt-bee { flex-basis: 48px; width: 48px; height: 40px; }
  .prompt-heading h1 { font-size: 19px; }
  .prompt-heading p { font-size: 13px; }
  .prompt-grid-products { grid-template-columns: 1fr; gap: 10px; }
  .prompt-product-card { min-height: 104px; padding: 14px 16px; gap: 2px; }
  .prompt-product-title { font-size: 16px; }
  .prompt-product-card > small { font-size: 12px; }
  .prompt-product-footer { min-height: 28px; margin-top: 5px; padding: 5px 12px; }
  .prompt-group { padding: 16px; gap: 16px; }
  .prompt-group-heading, .prompt-group-heading strong { font-size: 15px; }
  .prompt-group-navigation { gap: 10px; }
  .prompt-group-heading > span { font-size: 12px; }
  .prompt-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .prompt-card { min-height: 76px; padding: 10px; font-size: 12px; }
  .prompt-card small { font-size: 11px; }
  .chat-panel.has-conversation .prompt-strip, .chat-panel.has-conversation .prompt-strip.prompt-open { bottom: calc(140px - var(--prompt-edge-space)); }
  .messages, .chat-panel.has-conversation .messages { gap: 24px; padding-top: 12px; }
  .message, .message.assistant { font-size: 14px; }
  .message.assistant.has-avatar, .message.assistant.has-tutorial.has-avatar, .message.assistant.has-screenshot.has-avatar, .message.assistant.has-guidance.has-avatar, .message.assistant.has-help-browser.has-avatar { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .message-avatar, .message-avatar .bee-mascot { width: 28px; height: 24px; }
  .message.user { max-width: calc(100% - 28px); }
  .message.user .message-content { padding: 12px; font-size: 14px; }
  .message-tools { gap: 8px; }
  .message-tools time { font-size: 12px; }
  .composer, .chat-panel.is-empty .composer, .chat-panel.has-conversation .composer { min-height: 108px; padding: 12px; }
  .composer textarea { font-size: 14px; }
  .tutorial-panel { padding: 12px; }
  .tutorial-tab { min-height: 36px; font-size: 13px; }
}
@media (max-height: 650px) {
  .welcome-heading { top: 76px; }
  .prompt-bee { height: 40px; }
  .prompt-heading h1 { font-size: 20px; }
  .prompt-product-card { min-height: 132px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
html[data-theme="dark"] { color-scheme: dark; --text: #e5e9f0; --muted: #a1a9b6; --line: #343942; --panel-soft: #242831; }
html[data-theme="dark"] .chat-panel, html[data-theme="dark"] .chat-toolbar, html[data-theme="dark"] .composer, html[data-theme="dark"] .prompt-group, html[data-theme="dark"] .prompt-product-card, html[data-theme="dark"] .answer-tutorial { background: #1b1e25; border-color: #343942; }
html[data-theme="dark"] .sidebar { background: #22262e; border-color: #343942; }
html[data-theme="dark"] .history-title, html[data-theme="dark"] .message.user .message-content { color: var(--text); }
html[data-theme="dark"] .new-chat, html[data-theme="dark"] .history-item.active, html[data-theme="dark"] .prompt-card:not(.prompt-product-card), html[data-theme="dark"] .prompt-product-footer, html[data-theme="dark"] .tutorial-tabs, html[data-theme="dark"] .guided-next, html[data-theme="dark"] .message.user .message-content { background: #2b303b; border-color: #343942; color: var(--text); }
html[data-theme="dark"] .tutorial-tab.active, html[data-theme="dark"] .guided-action { background: #383e49; }

.prompt-loading button { margin-left: 8px; padding: 4px 8px; border: 1px solid #ffccc5; border-radius: 6px; background: #fff; color: var(--brand); }

/* The role menu is drawn by the app, not the platform-native select popup. */
.role-picker select { position: absolute; width: 1px; min-width: 0; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.role-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 54px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--text); font-size: 16px; font-weight: 600; }
.role-trigger .ui-icon { width: 12px; height: 12px; }
.role-picker small { margin-left: 16px; }
/* Role labels vary by language: size to the longest option, not a fixed
   Chinese-label width. Cap unusually long copy and wrap it inside the menu. */
.role-menu { position: absolute; z-index: 20; top: 36px; left: 0; width: max-content; min-width: max(88px, 100%); max-width: min(260px, calc(100dvw - 24px)); padding: 6px 0; border: 1px solid #e7e9ef; border-radius: 5px; background: #fff; box-shadow: 0 1px 3px #26344c05; overflow: hidden; }
.role-menu button { display: block; width: 100%; min-width: 0; padding: 7px 20px; border: 0; outline-offset: -2px; background: transparent; color: #303a46; font-size: 14px; line-height: 18px; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.role-menu button:hover, .role-menu button:focus-visible { background: #f6f7fb; }
.messages { overflow-x: hidden; scrollbar-width: none; }
.messages::-webkit-scrollbar { display: none; }
.message-tools button::after { display: none; }
.message-tools button:hover::after, .message-tools button:focus-visible::after { display: block; }
.message.user .message-tools button::after { right: 0; left: auto; transform: none; }
html[data-theme="dark"] .role-menu { background: #2b303b; border-color: #343942; }
html[data-theme="dark"] .role-menu button { color: var(--text); }
html[data-theme="dark"] .role-menu button:hover { background: #383e49; }
@media (max-width: 760px) { .role-trigger { font-size: 14px; } }
.messages, .chat-panel.has-conversation .messages { overflow-x: hidden; scrollbar-width: none; }
.message-avatar, .message-avatar .bee-mascot { transform: none; }

.prompt-card:hover { transform: translateY(-6px); }
.role-picker small { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.message-tools button.active .ui-icon { fill: currentColor; }
.chat-panel.has-conversation .prompt-strip { grid-row: auto; grid-column: auto; align-self: auto; justify-self: auto; }
.prompt-card:not(.prompt-product-card) { gap: 4px; }
.prompt-card:not(.prompt-product-card) > span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.prompt-back { display: inline-flex; align-items: center; gap: 8px; }
.prompt-back > span { display: inline-block; width: 12px; }

@media (max-width: 760px) and (max-height: 650px) {
  .welcome-heading { display: none; }
  .prompt-product-card { min-height: 100px; padding: 12px 16px; }
}
/* Reset the old compact/mobile grid before applying the new drawer layout. */
.sidebar { display: flex; flex-direction: column; }
.history-section { display: flex; }
.prompt-product-card { grid-template-columns: minmax(0, 1fr); }
.prompt-product-card > small, .prompt-product-footer { grid-column: auto; }
@media (max-width: 760px) {
  .shell, .shell.sidebar-collapsed { grid-template-rows: minmax(0, 1fr); }
}

/* Four-language picker. The menu opens above the pinned sidebar footer. */
.sidebar-footer { gap: 12px; }
.language-picker { position: relative; flex: 1; min-width: 0; }
.language-switcher { width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 8px; gap: 8px; text-align: start; }
.language-switcher:hover, .language-switcher[aria-expanded="true"] { background: #e7e9ee; color: var(--text); }
.language-current { font-size: 14px; }
.language-menu { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 10px); width: 236px; max-width: calc(100vw - 32px); padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); box-shadow: 0 8px 20px #1721391c, 0 2px 4px #17213908; direction: ltr; }
.language-menu button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 18px; text-align: left; cursor: pointer; }
.language-menu button:hover, .language-menu button:focus-visible { background: #f1f2f6; }
.language-check { visibility: hidden; font-size: 18px; }
.language-menu [aria-checked="true"] .language-check { visibility: visible; }
.language-content-note { max-width: 760px; margin-top: 8px !important; font-size: 12px !important; line-height: 1.5; color: var(--muted); }
html[data-theme="dark"] .language-menu { background: #2b303b; border-color: #343942; }
html[data-theme="dark"] .language-menu button:hover, html[data-theme="dark"] .language-menu button:focus-visible,
html[data-theme="dark"] .language-switcher:hover, html[data-theme="dark"] .language-switcher[aria-expanded="true"] { background: #383e49; }
/* Arabic uses the same LTR layout and controls as every other locale.
   Plaintext bidi is restricted to text nodes, not flex/grid containers. */
html[lang="ar"] :is([data-i18n], .history-title, .message-content, .screenshot-step-text,
  .prompt-card > span:not(.prompt-product-mark), .prompt-card > small, .help-document-copy > span,
  .help-document-copy > small, .guided-next > p, .guided-action, .toast) { unicode-bidi: plaintext; }
html[lang="en"] .role-trigger, html[lang="fr"] .role-trigger { max-width: none; }
html[lang="fr"] .role-picker small, html[lang="ar"] .role-picker small { white-space: normal; }
