.assistant-launcher {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  display: block;
  width: 98px;
  height: 98px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 7px 8px rgba(30, 26, 22, .2));
}
.assistant-launcher[hidden] { display: none; }
.assistant-figure { position: relative; display: block; flex: 0 0 auto; width: 100%; height: 100%; transform-origin: 50% 82%; animation: assistant-idle 5.4s ease-in-out infinite; }
.assistant-figure-depth { position: absolute; inset: 0; display: block; transform: perspective(360px) rotateY(var(--assistant-look-x, 0deg)) rotateX(var(--assistant-look-y, 0deg)); transform-style: preserve-3d; transition: transform .2s ease-out; }
.assistant-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: hidden; }
.assistant-pose-idle { opacity: 1; transition: opacity .16s ease; }
.assistant-pose-idle-blink { opacity: 0; animation: assistant-blink 7.8s steps(1) infinite; }
.assistant-pose-wave, .assistant-pose-wave-blink { opacity: 0; }
.assistant-launcher:hover .assistant-figure, .assistant-launcher:focus-visible .assistant-figure { animation: assistant-greet .9s ease-in-out 1; }
.assistant-launcher:is(:hover, :focus-visible) .assistant-pose-idle, .assistant-figure:hover .assistant-pose-idle, .assistant-panel[data-state="greeting"] .assistant-pose-idle, .assistant-panel[data-state="success"] .assistant-pose-idle { opacity: 0; }
.assistant-launcher:is(:hover, :focus-visible) .assistant-pose-idle-blink, .assistant-figure:hover .assistant-pose-idle-blink, .assistant-panel[data-state="greeting"] .assistant-pose-idle-blink, .assistant-panel[data-state="success"] .assistant-pose-idle-blink { animation: none; opacity: 0; }
.assistant-launcher:is(:hover, :focus-visible) .assistant-pose-wave, .assistant-figure:hover .assistant-pose-wave, .assistant-panel[data-state="greeting"] .assistant-pose-wave, .assistant-panel[data-state="success"] .assistant-pose-wave { opacity: 1; }
.assistant-launcher:is(:hover, :focus-visible) .assistant-pose-wave-blink, .assistant-figure:hover .assistant-pose-wave-blink, .assistant-panel[data-state="success"] .assistant-pose-wave-blink { animation: assistant-wave-blink 3.6s steps(1) infinite; }
.assistant-launcher-label { position: absolute; right: 92px; top: 30px; display: none; width: max-content; padding: 7px 11px; border-radius: 6px; background: var(--theme-text, #262322); color: var(--theme-surface, #fff); font-size: 13px; }
.assistant-launcher:hover .assistant-launcher-label, .assistant-launcher:focus-visible .assistant-launcher-label { display: block; }
.assistant-panel {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 108px;
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100vw - 32px));
  height: min(720px, calc(100dvh - 130px));
  overflow: hidden;
  border: 1px solid var(--theme-line, #e5e1dc);
  border-radius: 8px;
  background: var(--theme-surface, #fff);
  color: var(--theme-text, #24221f);
  box-shadow: 0 20px 60px rgba(26, 20, 18, .18);
}
.assistant-panel[hidden], .assistant-attachment[hidden], .assistant-recorder[hidden] { display: none; }
.assistant-panel.is-expanded { inset: 0; width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
.assistant-panel.is-expanded .assistant-messages,
.assistant-panel.is-expanded .assistant-items,
.assistant-panel.is-expanded .assistant-welcome,
.assistant-panel.is-expanded .assistant-result { width: min(900px, 100%); margin-inline: auto; }
.assistant-panel.is-expanded .assistant-compose { padding-inline: max(16px, calc((100vw - 900px) / 2)); }
.assistant-input-mode, .assistant-voice-hold { display: none; }
.assistant-voice-overlay[hidden] { display: none; }
.assistant-voice-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; background: rgba(21, 20, 19, .54); }
.assistant-voice-bubble { display: grid; justify-items: center; gap: 12px; min-width: 210px; padding: 28px 24px; border-radius: 12px; background: var(--theme-surface, #fff); color: var(--theme-text, #24221f); box-shadow: 0 18px 48px rgba(0, 0, 0, .2); }
.assistant-voice-bubble strong { font-size: 16px; }
.assistant-voice-bubble > span:last-child { color: var(--theme-muted, #74736f); font-size: 13px; }
.assistant-voice-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 46px; }
.assistant-voice-wave i { width: 4px; height: 15px; border-radius: 3px; background: var(--front-red, #8c0000); animation: assistant-voice-wave .85s ease-in-out infinite alternate; }
.assistant-voice-wave i:nth-child(3n) { animation-delay: -.4s; height: 27px; }
.assistant-voice-wave i:nth-child(4n) { animation-delay: -.65s; height: 34px; }
@keyframes assistant-voice-wave { to { transform: scaleY(.38); opacity: .65; } }
.assistant-conversations[hidden] { display: none; }
.assistant-conversations { flex: 0 1 auto; min-height: 0; max-height: min(290px, 42dvh); overflow-y: auto; padding: 10px 12px 12px; border-bottom: 1px solid var(--theme-line, #e5e1dc); background: var(--theme-surface, #fff); scrollbar-width: thin; }
.assistant-history-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.assistant-history-heading strong { font-size: 13px; white-space: nowrap; }
.assistant-history-heading span { color: var(--theme-muted, #74736f); font-size: 11px; text-align: right; }
.assistant-history-empty { margin: 14px 0 8px; color: var(--theme-muted, #74736f); font-size: 13px; text-align: center; }
.assistant-history-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.assistant-history-table th { padding: 5px 6px; border-bottom: 1px solid var(--theme-line, #e5e1dc); color: var(--theme-muted, #74736f); font-weight: 500; text-align: left; }
.assistant-history-table th:first-child { width: 52%; }
.assistant-history-table th:nth-child(2) { width: 25%; }
.assistant-history-table th:last-child { width: 23%; text-align: right; }
.assistant-history-table td { height: 39px; padding: 4px 6px; border-bottom: 1px solid var(--theme-line, #e5e1dc); }
.assistant-history-table tr.is-active td { background: color-mix(in srgb, var(--front-red, #8c0000) 7%, var(--theme-surface, #fff)); }
.assistant-history-open { display: block; width: 100%; overflow: hidden; padding: 5px 0; border: 0; background: transparent; color: var(--theme-text, #24221f); font: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.assistant-history-open:hover { color: var(--front-red, #8c0000); }
.assistant-history-date { color: var(--theme-muted, #74736f); white-space: nowrap; font-variant-numeric: tabular-nums; }
.assistant-history-actions { text-align: right; white-space: nowrap; }
.assistant-history-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--theme-muted, #74736f); cursor: pointer; }
.assistant-history-icon svg { width: 15px; height: 15px; }
.assistant-history-icon:hover, .assistant-history-icon[aria-pressed="true"] { background: color-mix(in srgb, var(--front-red, #8c0000) 10%, transparent); color: var(--front-red, #8c0000); }
.assistant-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--theme-line, #e5e1dc); }
.assistant-head .assistant-figure { width: 48px; height: 48px; }
.assistant-head div { flex: 1; min-width: 0; }
.assistant-head strong, .assistant-head small { display: block; }
.assistant-head strong { color: var(--front-red, #8c0000); font-size: 16px; }
.assistant-head small { margin-top: 2px; color: var(--theme-muted, #74736f); font-size: 12px; }
.assistant-head button, .assistant-icon-button { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid var(--theme-line, #e5e1dc); border-radius: 6px; background: var(--theme-surface, #fff); color: var(--theme-text, #24221f); cursor: pointer; }
.assistant-head button { flex-basis: 27px; width: 27px; height: 27px; }
.assistant-head svg, .assistant-icon-button svg, .assistant-send svg { width: 17px; height: 17px; }
.assistant-scopes { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 7px 12px; border-bottom: 1px solid var(--theme-line, #e5e1dc); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.assistant-scopes::-webkit-scrollbar { display: none; }
.assistant-scopes > span:first-child { margin-right: 2px; color: var(--theme-muted, #74736f); font-size: 11px; }
.assistant-scope-fixed, .assistant-scopes label { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 25px; padding: 3px 8px; box-sizing: border-box; border: 1px solid var(--theme-line, #e5e1dc); border-radius: 5px; color: var(--theme-text, #24221f); font-size: 11px; line-height: 1.2; }
.assistant-scope-fixed { background: var(--theme-raised, #f5f4f2); }
.assistant-scopes label { cursor: pointer; }
.assistant-scopes label:has(input:checked) { border-color: color-mix(in srgb, var(--front-red, #8c0000) 42%, var(--theme-line, #e5e1dc)); color: var(--front-red, #8c0000); background: color-mix(in srgb, var(--front-red, #8c0000) 7%, var(--theme-surface, #fff)); }
.assistant-scopes input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.assistant-scopes label:has(input:focus-visible) { outline: 2px solid var(--front-red, #8c0000); outline-offset: 2px; }
.assistant-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--front-red, #8c0000) 35%, transparent) transparent; }
.assistant-welcome { display: flex; gap: 10px; align-items: center; padding: 8px 0 20px; }
.assistant-welcome .assistant-figure { width: 80px; height: 80px; }
.assistant-welcome strong { color: var(--front-red, #8c0000); font-size: 17px; }
.assistant-welcome p { margin: 5px 0 0; color: var(--theme-muted, #74736f); font-size: 13px; line-height: 1.5; }
.assistant-messages { display: flex; flex-direction: column; gap: 9px; }
.assistant-message { max-width: 90%; padding: 11px 13px; border-radius: 8px; background: var(--theme-raised, #f5f4f2); font-size: 15px; line-height: 1.58; overflow-wrap: anywhere; white-space: normal; }
.assistant-message p { margin: 0 0 6px; }
.assistant-message p:last-child { margin-bottom: 0; }
.assistant-message h1, .assistant-message h2, .assistant-message h3 { margin: 10px 0 5px; color: var(--theme-text, #24221f); line-height: 1.35; font-size: 15px; }
.assistant-message h1:first-child, .assistant-message h2:first-child, .assistant-message h3:first-child { margin-top: 0; }
.assistant-message ul, .assistant-message ol { margin: 4px 0 7px; padding-left: 21px; }
.assistant-message li { margin: 0; padding: 1px 0; }
.assistant-message li + li { margin-top: 2px; }
.assistant-message li p { margin: 0; }
.assistant-message li::marker { color: var(--front-red, #8c0000); }
.assistant-message > :last-child { margin-bottom: 0; }
.assistant-message pre { max-width: 100%; overflow-x: auto; padding: 9px; border-radius: 5px; background: var(--theme-surface, #fff); font-size: 12px; }
.assistant-message :not(pre) > code { padding: 1px 4px; border-radius: 3px; background: var(--theme-surface, #fff); font-size: .9em; }
.assistant-message blockquote { margin: 7px 0; padding: 3px 9px; border-left: 2px solid var(--front-red, #8c0000); color: var(--theme-muted, #74736f); }
.assistant-message blockquote p { margin: 0; }
.assistant-message table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 12px; }
.assistant-message th, .assistant-message td { padding: 5px 7px; border-bottom: 1px solid var(--theme-line, #e5e1dc); text-align: left; }
.assistant-math-inline { white-space: nowrap; }
.assistant-math-block { display: block; max-width: 100%; margin: 8px 0; overflow-x: auto; overflow-y: hidden; text-align: center; scrollbar-width: thin; }
.assistant-math-block .katex-display { margin: 4px 0; }
.assistant-math-error { color: var(--theme-muted, #74736f); font-family: ui-monospace, monospace; font-size: 12px; white-space: normal; }
.assistant-message-attachment { display: block; max-width: min(230px, 100%); max-height: 210px; width: auto; height: auto; margin-top: 6px; border-radius: 6px; object-fit: contain; }
.assistant-message a { color: var(--front-red, #8c0000); }
.assistant-thinking { display: flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; color: var(--theme-muted, #74736f); font-size: 13px; }
.assistant-thinking .assistant-figure { width: 42px; height: 42px; animation: assistant-think 2.2s ease-in-out infinite; }
.assistant-thinking-copy { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--theme-line, #e5e1dc); border-radius: 8px; background: var(--theme-raised, #f5f4f2); }
.assistant-thinking-dots { display: inline-flex; gap: 3px; align-items: center; }
.assistant-thinking-dots i { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--front-red, #8c0000); animation: assistant-dot 1.2s ease-in-out infinite; }
.assistant-thinking-dots i:nth-child(2) { animation-delay: .15s; }
.assistant-thinking-dots i:nth-child(3) { animation-delay: .3s; }
.assistant-message-tools { display: flex; align-items: center; align-self: flex-start; gap: 3px; margin: -5px 0 3px 4px; }
.assistant-message-tools button, .assistant-message-tools a { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--theme-muted, #74736f); cursor: pointer; text-decoration: none; }
.assistant-message-tools button:hover, .assistant-message-tools a:hover { background: color-mix(in srgb, var(--front-red, #8c0000) 9%, var(--theme-surface, #fff)); color: var(--front-red, #8c0000); }
.assistant-message-tools button:focus-visible, .assistant-message-tools a:focus-visible { outline: 2px solid var(--front-red, #8c0000); outline-offset: 1px; }
.assistant-message-tools button:disabled { opacity: .45; cursor: wait; }
.assistant-message-tools svg { width: 15px; height: 15px; stroke-width: 1.9; }
.assistant-source-list { display: grid; gap: 6px; margin-top: 10px; }
.assistant-source-list summary { color: var(--theme-muted, #74736f); font-size: 12px; cursor: pointer; }
.assistant-search-state { margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--theme-line, #e5e1dc); color: var(--theme-muted, #74736f); font-size: 11px; }
.assistant-search-state.is-unavailable { color: var(--front-red, #8c0000); }
.assistant-source-list a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--front-red, #8c0000); font-size: 12px; }
.assistant-image-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.assistant-image-results a { display: block; min-width: 0; text-decoration: none; color: var(--theme-muted, #74736f); font-size: 11px; }
.assistant-image-results img { display: block; width: 100%; height: 105px; object-fit: cover; border-radius: 5px; background: var(--theme-raised, #f5f4f2); }
.assistant-image-results span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 3px; }
.assistant-message-checklist { max-width: 100%; width: 100%; box-sizing: border-box; padding: 15px 17px; border-left: 2px solid var(--front-red, #8c0000); white-space: normal; }
.assistant-message-intro { margin: 0 0 4px; font-weight: 600; line-height: 1.6; }
.assistant-message-list { margin: 0; padding: 0; list-style: none; counter-reset: assistant-point; }
.assistant-message-list li { display: grid; grid-template-columns: 25px minmax(0, 1fr); column-gap: 4px; padding: 11px 0; border-top: 1px solid var(--theme-line, #e5e1dc); line-height: 1.65; counter-increment: assistant-point; }
.assistant-message-list li::before { grid-column: 1; grid-row: 1 / span 2; content: counter(assistant-point) "."; color: var(--front-red, #8c0000); font-weight: 800; font-variant-numeric: tabular-nums; }
.assistant-message-point { grid-column: 2; min-width: 0; }
.assistant-choice-row { display: flex; flex-wrap: wrap; gap: 7px; grid-column: 2; margin-top: 9px; }
.assistant-choice-row button { min-width: 56px; padding: 5px 12px; border: 1px solid var(--theme-line, #ddd); border-radius: 6px; background: var(--theme-surface, #fff); color: var(--theme-text, #24221f); cursor: pointer; font: inherit; font-size: 12px; }
.assistant-choice-row button:hover, .assistant-choice-row button[aria-pressed="true"] { border-color: var(--front-red, #8c0000); color: var(--front-red, #8c0000); background: color-mix(in srgb, var(--front-red, #8c0000) 9%, var(--theme-surface, #fff)); }
.assistant-choice-row button:focus-visible { outline: 2px solid var(--front-red, #8c0000); outline-offset: 2px; }
.assistant-message[data-role="user"] { align-self: flex-end; white-space: pre-wrap; background: color-mix(in srgb, var(--front-red, #8c0000) 10%, var(--theme-surface, #fff)); }
.assistant-message[data-role="error"] { color: #ad3527; border: 1px solid #e7b7af; background: var(--theme-surface, #fff); }
.assistant-items { margin-top: 16px; }
.assistant-items:empty { display: none; }
.assistant-items-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.assistant-item { margin: 0 0 10px; padding: 12px; border: 1px solid var(--theme-line, #e5e1dc); border-radius: 7px; background: var(--theme-surface, #fff); box-shadow: 0 3px 11px rgba(24, 20, 16, .04); }
.assistant-item-top { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.assistant-item-top input[type="checkbox"], .assistant-weekdays input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; min-width: 16px; margin: 0; accent-color: var(--front-red, #8c0000); }
.assistant-item-top strong { flex: 1; min-width: 0; white-space: nowrap; font-size: 13px; }
.assistant-item-top button, .assistant-actions button, .assistant-result a { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--theme-line, #e5e1dc); border-radius: 6px; background: var(--theme-surface, #fff); color: var(--front-red, #8c0000); cursor: pointer; text-decoration: none; white-space: nowrap; font-size: 12px; }
.assistant-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.assistant-item-grid label { display: grid; gap: 3px; min-width: 0; color: var(--theme-muted, #74736f); font-size: 11px; }
.assistant-item-grid .wide { grid-column: 1 / -1; }
.assistant-item-grid input, .assistant-item-grid select { width: 100%; min-width: 0; height: 34px; padding: 5px 7px; box-sizing: border-box; border: 1px solid var(--theme-line, #ddd); border-radius: 5px; background: var(--theme-input, #fff); color: var(--theme-text, #24221f); font: inherit; font-size: 12px; }
.assistant-item-grid .assistant-weekdays { display: flex; flex-wrap: wrap; gap: 5px; }
.assistant-weekdays label { display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 4px; color: var(--theme-text, #24221f); font-size: 12px; }
.assistant-item-grid .assistant-weekdays input { width: auto; height: auto; accent-color: var(--front-red, #8c0000); }
.assistant-choice-field { display: grid; gap: 5px; min-width: 0; color: var(--theme-muted, #74736f); font-size: 11px; }
.assistant-card-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.assistant-card-tabs button { min-height: 28px; padding: 4px 8px; border: 1px solid var(--theme-line, #e5e1dc); border-radius: 5px; background: var(--theme-surface, #fff); color: var(--theme-text, #24221f); cursor: pointer; font-size: 11px; }
.assistant-card-tabs button[aria-pressed="true"] { border-color: var(--front-red, #8c0000); background: color-mix(in srgb, var(--front-red, #8c0000) 9%, var(--theme-surface, #fff)); color: var(--front-red, #8c0000); font-weight: 700; }
.assistant-card-tabs button:focus-visible { outline: 2px solid var(--front-red, #8c0000); outline-offset: 2px; }
.assistant-item-count { margin: 8px 0 0; color: var(--theme-muted, #74736f); font-size: 12px; }
.assistant-item-target { margin: 0 0 8px; color: var(--theme-muted, #74736f); font-size: 12px; overflow-wrap: anywhere; }
.assistant-item-warning { margin: 0; padding: 9px 10px; border-left: 2px solid var(--front-red, #8c0000); background: var(--theme-tint, #f8f4f1); color: var(--theme-text, #24221f); font-size: 12px; line-height: 1.5; }
.assistant-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
.assistant-actions .primary, .assistant-send { border-color: var(--front-red, #8c0000); background: var(--front-red, #8c0000); color: #fff; }
.assistant-actions button:disabled { cursor: default; opacity: .6; }
.assistant-result { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.assistant-result:empty { display: none; }
.assistant-result p { margin: 5px 0; }
.assistant-compose { flex: 0 0 auto; padding: 10px 12px 9px; border-top: 1px solid var(--theme-line, #e5e1dc); background: var(--theme-surface, #fff); }
.assistant-compose-toolbar { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.assistant-compose-toolbar .assistant-send { margin-left: auto; }
.assistant-compose-row { display: flex; }
.assistant-compose .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.assistant-compose textarea { flex: 1; width: 100%; min-width: 0; height: 76px; min-height: 76px; max-height: 76px; overflow-y: auto; resize: none; padding: 10px 11px; box-sizing: border-box; border: 1px solid var(--theme-line, #ddd); border-radius: 6px; background: var(--theme-input, #fff); color: var(--theme-text, #24221f); font: inherit; font-size: 13px; line-height: 1.5; scrollbar-width: thin; }
.assistant-compose textarea:focus { outline: 2px solid color-mix(in srgb, var(--front-red, #8c0000) 23%, transparent); outline-offset: 0; border-color: var(--front-red, #8c0000); }
.assistant-send { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid; border-radius: 6px; cursor: pointer; }
.assistant-compose small { display: block; margin-top: 5px; color: var(--theme-muted, #74736f); font-size: 11px; }
.assistant-attachment { margin-bottom: 7px; font-size: 12px; }
.assistant-attachment img { width: 40px; height: 40px; object-fit: cover; vertical-align: middle; border-radius: 4px; }
.assistant-attachment button { margin-left: 6px; border: 0; background: transparent; color: var(--front-red, #8c0000); cursor: pointer; }
.assistant-recorder { display: grid; gap: 7px; margin-bottom: 9px; padding: 9px; border: 1px solid var(--theme-line, #e5e1dc); border-radius: 6px; background: var(--theme-raised, #f5f4f2); }
.assistant-recorder-head, .assistant-recorder-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.assistant-recorder-head { justify-content: space-between; font-size: 12px; }
.assistant-recorder-head span { color: var(--theme-muted, #74736f); }
.assistant-recorder textarea { width: 100%; min-height: 72px; max-height: 105px; resize: vertical; box-sizing: border-box; border: 1px solid var(--theme-line, #ddd); border-radius: 5px; padding: 7px; background: var(--theme-input, #fff); color: var(--theme-text, #24221f); font: inherit; font-size: 12px; }
.assistant-recorder-actions button { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--theme-line, #ddd); border-radius: 5px; padding: 5px 7px; background: var(--theme-surface, #fff); color: var(--theme-text, #24221f); cursor: pointer; font-size: 11px; }
.assistant-recorder-actions button:disabled { opacity: .5; cursor: default; }
.assistant-recorder-actions svg { width: 13px; height: 13px; }
.assistant-panel[data-state="thinking"] .assistant-head .assistant-figure { animation: assistant-think 2s ease-in-out infinite; }
.assistant-panel[data-state="thinking"] .assistant-head strong::after { content: " ···"; animation: assistant-pulse 1s ease-in-out infinite; }
.assistant-panel[data-state="success"] .assistant-head .assistant-figure { animation: assistant-nod .9s ease-in-out 1; }
.schedule-form-grid [data-time-range][hidden] { display: none; }
.schedule-choice-field { display: grid; grid-column: 1 / -1; gap: 6px; color: var(--theme-muted, #656d68); font-size: 12px; font-weight: 700; }
.schedule-editor-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-editor-tabs button { min-height: 32px; padding: 5px 11px; border: 1px solid var(--theme-line, #dfe3de); border-radius: 5px; background: var(--theme-surface, #fafbf9); color: var(--theme-text, #252b27); cursor: pointer; font-size: 12px; }
.schedule-editor-tabs button[aria-pressed="true"] { border-color: var(--front-red, #8c0000); background: color-mix(in srgb, var(--front-red, #8c0000) 9%, var(--theme-surface, #fff)); color: var(--front-red, #8c0000); font-weight: 700; }
.schedule-editor-tabs button:focus-visible { outline: 2px solid var(--front-red, #8c0000); outline-offset: 2px; }
@keyframes assistant-idle { 0%, 100% { transform: translateY(0) scale(1) rotate(0); } 45% { transform: translateY(-3px) scale(1.015) rotate(.8deg); } 75% { transform: translateY(-1px) scale(1.005) rotate(-.4deg); } }
@keyframes assistant-greet { 0%, 100% { transform: rotate(0) translateY(0); } 22% { transform: rotate(-6deg) translateY(-4px); } 44% { transform: rotate(5deg) translateY(-5px); } 67% { transform: rotate(-3deg) translateY(-3px); } }
@keyframes assistant-blink { 0%, 66%, 68%, 96%, 98%, 100% { opacity: 0; } 66.3%, 67.5%, 96.3%, 97.5% { opacity: 1; } }
@keyframes assistant-wave-blink { 0%, 13%, 18%, 100% { opacity: 0; } 14%, 17% { opacity: 1; } }
@keyframes assistant-think { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-5deg) translateY(-2px); } }
@keyframes assistant-pulse { 50% { opacity: .45; } }
@keyframes assistant-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes assistant-nod { 0%, 100% { transform: translateY(0) rotate(0); } 32% { transform: translateY(5px) rotate(2deg); } 65% { transform: translateY(-3px) rotate(-1deg); } }
@media (max-width: 760px) {
  body.assistant-mobile-open { overflow: hidden; }
  body.assistant-mobile-open .mobile-tabbar { visibility: hidden; }
  .assistant-launcher { right: 12px; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); width: 68px; height: 68px; }
  .assistant-panel, .assistant-panel.is-expanded { z-index: 2500; top: var(--assistant-viewport-top, 0px); right: 0; bottom: auto; left: 0; width: 100%; height: var(--assistant-viewport-height, 100dvh); max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .assistant-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) repeat(4, 32px); grid-template-rows: 46px; gap: 6px; padding: calc(5px + env(safe-area-inset-top, 0px)) 12px 7px; }
  .assistant-head .assistant-figure { grid-column: 1; grid-row: 1; width: 40px; height: 40px; }
  .assistant-head div { grid-column: 2; grid-row: 1; }
  .assistant-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .assistant-head button { width: 32px; height: 32px; flex-basis: 32px; }
  .assistant-head [data-assistant-new] { grid-column: 3; grid-row: 1; }
  .assistant-head [data-assistant-history] { grid-column: 4; grid-row: 1; }
  .assistant-head [data-assistant-clear] { grid-column: 5; grid-row: 1; }
  .assistant-head [data-assistant-minimize], .assistant-head [data-assistant-expand] { display: none; }
  .assistant-head [data-assistant-close] { grid-column: 6; grid-row: 1; }
  .assistant-head small { display: none; }
  .assistant-scopes { padding: 7px 12px; }
  .assistant-scopes > span:first-child { display: none; }
  .assistant-scroll { padding: 16px 14px; background: color-mix(in srgb, var(--theme-surface, #fff) 72%, var(--theme-raised, #f5f4f2)); overscroll-behavior: contain; }
  .assistant-messages { gap: 12px; }
  .assistant-message { position: relative; max-width: calc(100% - 48px); padding: 10px 12px; border-radius: 10px; font-size: 15px; line-height: 1.58; box-shadow: 0 1px 3px rgba(25, 27, 26, .04); }
  .assistant-message[data-role="assistant"] { margin-left: 34px; background: var(--theme-surface, #fff); }
  .assistant-message[data-role="assistant"]::before { content: ""; position: absolute; top: 0; left: -34px; width: 28px; height: 28px; border-radius: 7px; background: var(--theme-surface, #fff) url("./assets/assistant-student-idle.png") center / contain no-repeat; }
  .assistant-message[data-role="user"] { background: color-mix(in srgb, var(--front-red, #8c0000) 12%, var(--theme-surface, #fff)); }
  .assistant-message-checklist { width: auto; }
  .assistant-message-tools { margin-left: 34px; }
  .assistant-compose { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px 38px; gap: 6px; align-items: center; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -5px 18px rgba(25, 27, 26, .04); }
  .assistant-compose-row, .assistant-compose-toolbar { display: contents; }
  .assistant-input-mode { display: grid; place-items: center; grid-column: 1; grid-row: 2; width: 38px; height: 42px; padding: 0; border: 0; background: transparent; color: var(--theme-text, #24221f); }
  .assistant-input-mode svg { width: 21px; height: 21px; }
  .assistant-compose textarea { grid-column: 2; grid-row: 2; height: 42px; min-height: 42px; max-height: 42px; padding: 8px 10px; font-size: 16px; }
  .assistant-voice-hold { grid-column: 2; grid-row: 2; width: 100%; height: 42px; border: 1px solid var(--theme-line, #ddd); border-radius: 6px; background: var(--theme-input, #fff); color: var(--theme-text, #24221f); font: inherit; font-size: 15px; font-weight: 650; touch-action: none; user-select: none; -webkit-user-select: none; }
  .assistant-compose[data-input-mode="voice"] .assistant-voice-hold { display: block; }
  .assistant-compose[data-input-mode="voice"] textarea { display: none; }
  .assistant-compose-toolbar .assistant-icon-button { grid-column: 3; grid-row: 2; width: 38px; height: 42px; }
  .assistant-compose-toolbar #assistant-mic { display: none; }
  .assistant-compose-toolbar .assistant-send { grid-column: 4; grid-row: 2; width: 38px; height: 42px; margin: 0; }
  .assistant-compose[data-input-mode="voice"] .assistant-send { display: none; }
  .assistant-compose[data-input-mode="voice"] .assistant-compose-toolbar .assistant-icon-button { grid-column: 4; }
  .assistant-attachment { grid-column: 1 / -1; grid-row: 1; margin: 0; }
  .assistant-attachment[hidden] { display: none; }
  .assistant-compose small { grid-column: 1 / -1; grid-row: 3; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 400px) {
  .assistant-head { gap: 5px; padding: 6px 8px; grid-template-columns: 36px minmax(0, 1fr) repeat(4, 28px); }
  .assistant-head .assistant-figure { width: 39px; height: 39px; }
  .assistant-head strong { font-size: 14px; }
  .assistant-head button { flex-basis: 28px; width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-figure, .assistant-figure-depth, .assistant-figure img, .assistant-panel .assistant-head strong::after { animation: none !important; transition: none !important; }
  .assistant-thinking-dots i { animation: none !important; opacity: .7; }
  .assistant-pose-idle { opacity: 1 !important; }
  .assistant-pose-idle-blink, .assistant-pose-wave, .assistant-pose-wave-blink { opacity: 0 !important; }
  .assistant-voice-wave i { animation: none !important; }
}
