/* Console-style chat: neutral surfaces, thin boundaries and explicit actions. */
.assistant-console-view {
  --console-surface: #faf9f8;
  --console-header: #f1efed;
  --console-ink: #201e1c;
  --console-muted: #64615e;
  --console-border: #dedbd8;
  --console-accent: #006b8f;
  color: var(--console-ink); background: var(--console-surface);
}
.assistant-console-view { height: 100%; min-height: 0; container: assistant-console / inline-size; }
.assistant-console-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); height: 100%; min-height: 0; overflow: hidden; }
.assistant-console-view .assistant-console-chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 0; border-radius: 0; background: var(--console-surface); }
.console-bloom-stripe { flex: 0 0 8px; width: 100%; height: 8px; overflow: hidden; border: 0; box-shadow: none; background: #c8926e url("/images/console-ai/bloom-stripe-static.png") center / 100% 100%; }
.console-bloom-stripe video { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .console-bloom-stripe video, .assistant-ai-background { visibility: hidden; }
}
.console-symbol { display: inline-flex; flex: 0 0 auto; width: 1.15em; height: 1.15em; }
.console-symbol svg { display: block; width: 100%; height: 100%; }
.console-header, .console-guide-header { display: flex; align-items: center; flex: 0 0 auto; min-height: 56px; gap: .5rem; padding: .4rem 1rem; border-bottom: 1px solid var(--console-border); background: var(--console-header); }
.console-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.2rem; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.console-header-actions { display: flex; align-items: center; gap: .1rem; }
.console-icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--console-ink); font-size: 1.1rem; text-decoration: none; cursor: pointer; }
.assistant-console-view .console-icon-button, .assistant-console-view .console-icon-button:is(:hover, :focus, :visited) { color: var(--console-ink); }
.console-icon-button:hover { background: #e5e2de; }
.assistant-console-view :is(button, a, textarea):focus-visible { outline: 2px solid var(--console-accent); outline-offset: 3px; }
.assistant-console-view .button { min-height: 38px; padding: .5rem .85rem; border: 1px solid #8b8580; border-radius: 3px; background: transparent; color: rgb(22, 21, 19); box-shadow: none; font-size: .85rem; font-weight: 600; }
.assistant-console-view .button:not(.primary):not(.danger) { color: rgb(22, 21, 19); }
.assistant-console-view .button:hover:not(:disabled):not(.primary):not(.danger) { background: rgba(22, 21, 19, 0.08); }
.assistant-console-view .button.primary { background: #312e2b; border-color: #312e2b; color: #fff; }
.assistant-console-view .button.primary:hover:not(:disabled) { background: #49443f; }
.assistant-console-view button:disabled { background: #e9e7e4; border-color: #d5d1cd; color: #8a8580; cursor: default; opacity: 1; }
.assistant-console-view .chat-history { flex: 1 1 0; min-height: 0; height: auto; padding: 1.5rem; scrollbar-width: thin; }
.assistant-console-view .chat-form { flex: 0 0 auto; gap: .5rem; padding: .65rem 1rem .4rem; border: 0; background: var(--console-surface); grid-template-columns: minmax(0, 1fr); }
.assistant-console-view .chat-form textarea { min-height: 64px; max-height: min(160px, 22dvh); border: 1px solid #b8b2ad; border-radius: 3px; padding: 1rem; background: #fff; color: var(--console-ink); font-size: .875rem; }
.assistant-console-view .chat-form textarea:focus { outline: 2px solid #3175ce; outline-offset: -1px; border-color: #3175ce; }
.assistant-console-view .chat-form button { min-width: 0; min-height: 40px; align-self: center; margin: 0; }
.chat-input { position: relative; min-width: 0; }
.chat-input textarea { display: block; }
.chat-form .chat-input:has(.chat-stop) textarea { padding-inline-end: 3.5rem; }
.chat-form .chat-input .chat-stop { position: absolute; right: .5rem; bottom: .5rem; display: inline-grid; place-items: center; width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: #201e1c; color: #fff; cursor: pointer; }
.chat-form .chat-input .chat-stop .console-symbol { width: 24px; height: 24px; }
.chat-form .chat-input .chat-stop:hover:not(:disabled) { background: #49443f; }
.chat-form .chat-input .chat-stop:focus-visible { outline: 2px solid #006b8f; outline-offset: 3px; }
.chat-form .chat-input .chat-stop:disabled { background: #e9e7e4; color: #8a8580; cursor: wait; opacity: 1; }
.chat-thinking .chat-thinking-label { letter-spacing: normal; font-size: inherit; color: inherit; }
.chat-thinking .chat-thinking-dots { display: inline-flex; align-items: center; gap: .15rem; letter-spacing: normal; font-size: 1.4rem; line-height: 1; color: inherit; }
.chat-thinking-dots > span { display: inline-block; transform-origin: center 70%; animation: chat-dot-pulse 1.15s ease-in-out infinite; }
.chat-thinking-dots > span:nth-child(2) { animation-delay: .15s; }
.chat-thinking-dots > span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot-pulse { 0%, 70%, 100% { transform: scale(.65); opacity: .45; } 35% { transform: scale(1.4); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-thinking-dots > span { animation: none; transform: none; opacity: 1; } }
.message.assistant:has(.chat-response-card) { width: 100%; max-width: 100%; }
.chat-response-card { min-width: 0; overflow: hidden; border: 1px solid #dedbd8; border-radius: 8px; background: #fff; }
.chat-response-header { display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .5rem 1rem; border-bottom: 1px solid #dedbd8; }
.chat-response-header h3 { flex: 1; min-width: 0; margin: 0; color: #201e1c; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.chat-response-header .console-icon-button { color: #201e1c; }
.chat-response-preview { max-height: 225px; overflow: auto; padding: 1rem 1.25rem; scrollbar-width: thin; overflow-wrap: anywhere; }
.chat-response-card.is-expanded .chat-response-header { border-bottom: 0; }
.chat-response-card.is-expanded .chat-response-header h3, .assistant-console-view .chat-response-header button:disabled, .chat-response-header button:disabled { color: #9a948f; }
.assistant-console-view .chat-response-header button:disabled, .chat-response-header button:disabled { background: transparent; border-color: transparent; cursor: default; opacity: 1; }
.console-response .console-guide-header h2 { min-width: 0; overflow-wrap: anywhere; }
.console-response .console-guide-body { overflow-wrap: anywhere; }
.assistant-console-view .chat-keyboard-hint { color: var(--console-muted); font-size: .7rem; }
.assistant-console-view .console-welcome { max-width: 100%; min-height: 100%; padding: 1rem .5rem; }
.assistant-console-view .console-welcome h3 { margin: .8rem 0 .3rem; font-size: .9rem; font-weight: 650; }
.assistant-console-view .console-welcome p { margin: 0 0 .55rem; color: var(--console-ink); font-size: .9rem; line-height: 1.5; }
.console-welcome-mark { display: block; width: 64px; height: 31px; border-radius: 24px; background: conic-gradient(from 55deg, #d48843, #ecaf72 24%, #709c99 48%, #39596d 68%, #ad8d6a 86%, #e8b372); position: relative; }
.console-welcome-mark::after { content: ""; position: absolute; inset: 6px; border-radius: inherit; background: var(--console-surface); }
.console-guide-open { display: flex; align-items: center; gap: .65rem; }
.console-footer { flex: 0 0 auto; padding: .25rem 1.5rem .85rem; color: var(--console-muted); font-size: .72rem; line-height: 1.5; }
.console-footer p { margin: 0; }
.console-text-button { border: 0; border-radius: 0; padding: 0; background: transparent; color: var(--console-accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.console-mode { margin: 0; padding: .5rem 1.5rem 0; color: var(--console-muted); font-size: .72rem; }
.assistant-console-view .message { max-width: 100%; color: var(--console-ink); margin-bottom: 1.7rem; }
.assistant-console-view .message.user { max-width: 90%; padding: .4rem 1rem; background: #e5e2de; border-radius: 12px; }
.assistant-console-view .message.user .chat-message-label { display: none; }
.assistant-console-view .chat-message-label { color: var(--console-muted); font-weight: 500; }
.assistant-console-view .chat-markdown { font-size: .88rem; }
.assistant-console-view .chat-markdown a { color: var(--console-accent); }
.assistant-console-view .chat-markdown th { background: var(--console-header); }
.assistant-console-view .chat-feedback { border-color: var(--console-border); background: transparent; }
.assistant-console-view .feedback-rating button { min-width: 36px; padding: .4rem; border: 1px solid transparent; background: transparent; }
.assistant-console-view .feedback-rating button[aria-pressed="true"] { background: #e5e2de; border-color: #c8c2bc; color: #69635e; }
.assistant-console-view .sr-options { gap: .55rem; }
.assistant-console-view .chat-temporary-note { flex: 0 0 auto; margin: .5rem 1rem 0; background: var(--console-header); border-color: var(--console-border); }
.assistant-console-view .console-history { position: absolute; z-index: 5; inset: 64px auto 0 0; width: min(340px, 100%); min-height: 0; max-height: none; padding: 1.25rem; gap: 1rem; border-right: 1px solid var(--console-border); background: #fff; overflow: auto; box-shadow: 8px 0 20px #201e1c15; }
.assistant-console-view .console-history[hidden] { display: none; }
.assistant-console-view .console-history .chat-recents { display: grid; min-height: 0; max-height: none; margin: 0; overflow: visible; }
.assistant-console-view .console-history .chat-recent { width: 100%; max-width: 100%; min-width: 0; border-radius: 3px; }
.assistant-console-view .console-history .chat-recent.is-active { background: #e9e6e2; color: var(--console-ink); }
.assistant-console-view .console-history .chat-sidebar-tools { display: grid; margin-top: auto; }
.assistant-console-view .console-history .chat-sidebar-tools button { color: var(--console-ink); }
.console-guide { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; border: 0; }
.console-guide-header { padding-inline: 1.5rem; background: #fff; }
.console-guide-header h2 { flex: 1; margin: 0; font-size: 1rem; font-weight: 600; }
.console-guide-body { flex: 1 1 0; min-height: 0; padding: 1.5rem; overflow: auto; scrollbar-width: thin; }
.console-guide-body h3 { margin: .25rem 0 1.25rem; font-size: 1.45rem; line-height: 1.3; }
.console-guide-tabs { display: flex; flex-wrap: wrap; gap: .2rem; border-bottom: 1px solid #e6e3df; margin-bottom: 1.5rem; }
.console-guide-category { position: relative; display: flex; flex: 1 1 auto; align-items: center; }
.console-guide-category > button { display: inline-flex; align-items: center; justify-content: center; flex: 1; gap: .4rem; min-height: 48px; padding: .6rem .3rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--console-ink); font-size: .83rem; font-weight: 600; cursor: pointer; }
.console-guide-category > button[aria-selected="true"] { border-bottom-color: var(--console-accent); color: var(--console-accent); }
.console-guide-category > button:hover { background: #f6f8f8; }
.console-guide-category > button > span[aria-hidden="true"] { font-size: 1.15rem; }
.console-guide-topics { display: grid; gap: .75rem; outline-offset: 4px; }
.console-guide-topic { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.console-guide-topic .chat-starter { flex: 1; min-height: 64px; padding: 1rem; gap: .8rem; border: 1px solid #e0ddda; border-radius: 8px; background: #fff; color: var(--console-ink); text-align: left; font-size: .86rem; }
.console-guide-topic .chat-starter > span:nth-child(2) { flex: 1; }
.console-guide-topic .chat-starter > span:last-child { color: var(--console-accent); }
.console-guide-topic .chat-starter:hover:not(:disabled) { border-color: var(--console-accent); background: #f5f9fa; }
.console-guide-topic .chat-starter:disabled { background: #eeece9; color: #8b8580; border-color: #d9d5d1; }
.console-guide-topic .chat-starter:disabled > span:last-child { color: #8b8580; }
.console-info { display: inline-flex; position: relative; flex: 0 0 28px; }
.console-info-button { display: inline-grid; place-items: center; width: 28px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--console-ink); cursor: help; font-size: 1rem; }
.console-tooltip { position: absolute; z-index: 10; right: 0; top: calc(100% + 5px); width: min(260px, 65cqw); padding: .6rem .75rem; background: #312e2b; color: #fff; border-radius: 4px; box-shadow: 0 3px 12px #0002; font-size: .75rem; font-weight: 400; line-height: 1.5; text-align: left; opacity: 0; visibility: hidden; pointer-events: none; }
.console-info:hover .console-tooltip, .console-info:focus-within .console-tooltip { opacity: 1; visibility: visible; }
.console-guide-note { color: var(--console-muted); font-size: .78rem; line-height: 1.55; margin: 1.75rem 0 .5rem; }
.assistant-console-layout.has-guide { grid-template-rows: minmax(180px, 46%) minmax(0, 1fr); }
@media (min-width: 800px) {
  .assistant-console-layout.has-guide { grid-template-columns: var(--assistant-guide-width) var(--assistant-chat-width); grid-template-rows: minmax(0, 1fr); gap: 0; }
  .console-guide::after { content: ""; position: absolute; top: 8px; right: 0; bottom: 0; border-right: 1px solid var(--console-border); pointer-events: none; }
}
@container assistant-console (max-width: 480px) {
  .console-header { padding-inline: .5rem; }
  .console-header h2 { font-size: 1rem; }
  .console-header-actions { gap: 0; }
  .assistant-console-view .chat-history { padding: 1rem; }
  .assistant-console-view .chat-form { grid-template-columns: minmax(0, 1fr); }
  .assistant-console-view .chat-form button { justify-self: end; }
  .console-guide-body, .console-guide-header { padding-inline: 1rem; }
  .console-guide-body h3 { font-size: 1.15rem; }
  .console-guide-category { flex-basis: 30%; }
  .console-guide-category > button { font-size: .75rem; }
  .console-guide-topic .chat-starter { min-height: 52px; padding: .7rem; }
  .console-footer { padding-inline: 1rem; }
}
/* Shared palette on the dedicated page, while preserving its history layout. */
.assistant-console-page .chat-panel { background: #faf9f8; border-color: #dedbd8; }
.assistant-console-page .chat-toolbar { background: #f1efed; border-color: #dedbd8; }
.assistant-console-page .chat-form { background: #faf9f8; }
.assistant-console-page .message.user { background: #e5e2de; }
.assistant-console-page .button { border-radius: 3px; }
.assistant-console-page .chat-recent.is-active { background: #e5e2de; color: #201e1c; }
