/* Isolated assistant preview; original site layout and stage artwork remain unchanged. */
.assistant { position: fixed; z-index: 100; right: clamp(12px,2vw,28px); bottom: clamp(12px,2vw,28px); font-family: var(--font-mono); font-style: normal; font-size: 13px; line-height: 1.5; }
.assistant [hidden] { display: none !important; }
.assistant__launcher { display: flex; align-items: center; gap: 11px; background: var(--paper-raised); border: 1px solid var(--rule-strong); color: var(--ink); padding: 12px 16px; font: 700 12px var(--font-mono); letter-spacing: .12em; box-shadow: 4px 4px 0 var(--rule); }
.assistant__launcher-dot { width: 9px; height: 9px; background: var(--accent); border-radius: 50%; }
.assistant__panel { position: absolute; right: 0; bottom: calc(100% + 12px); display: flex; flex-direction: column; width: min(390px,calc(100vw - 24px)); height: min(570px,calc(100dvh - 95px)); background: var(--paper-raised); border: 1px solid var(--rule-strong); box-shadow: 8px 8px 0 var(--rule); color: var(--ink); overflow: hidden; }
.assistant__header { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: var(--paper-sunk); border-bottom: 1px solid var(--rule); letter-spacing: .12em; }
.assistant__header strong { display:block; font-size: 15px; }
.assistant__header small { display:block; margin-top: 2px; font-size: 10px; color: var(--ink-soft); }
.assistant__close { font: 27px/1 var(--font-mono); padding: 0 4px; }
.assistant__notice { margin: 0; padding: 10px 15px; border-bottom: 1px solid var(--rule); color: var(--ink-soft); font-size: 11px; }
.assistant__unlock { padding: 18px 15px; }
.assistant__unlock label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; }
.assistant__unlock-row { display: flex; gap: 6px; }
.assistant__unlock input { width: 100%; min-width: 0; }
.assistant input,.assistant textarea { font: 13px var(--font-mono); color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 0; padding: 10px; }
.assistant button { border-radius: 0; }
.assistant__unlock button,.assistant__compose button { flex-shrink: 0; background: var(--accent); color: var(--on-accent); padding: 10px 12px; font: 700 11px var(--font-mono); letter-spacing: .08em; }
.assistant button:disabled { opacity: .5; cursor: wait; }
.assistant__conversation { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.assistant__messages { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 14px; overflow-y: auto; overscroll-behavior: contain; }
.assistant__bubble { margin: 0; max-width: 93%; padding: 10px 12px; border: 1px solid var(--rule); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.assistant__bubble--bot { align-self: flex-start; background: var(--paper-sunk); }
.assistant__bubble--mine { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent); }
.assistant__compose { display: flex; align-items: flex-end; gap: 7px; padding: 10px; border-top: 1px solid var(--rule); }
.assistant__compose textarea { flex: 1; min-width: 0; resize: vertical; max-height: 135px; }
.assistant__status { min-height: 0; margin: 0; padding: 0 12px 8px; font-size: 11px; color: var(--ink-soft); }
.assistant__status:empty { display: none; }
.assistant__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 480px) { .assistant { right: 12px; bottom: 12px; } .assistant__panel { width: calc(100vw - 24px); height: min(570px,calc(100dvh - 88px)); } }
@media (prefers-reduced-motion: no-preference) { .assistant__panel:not([hidden]) { animation: assistant-open .18s ease-out; } @keyframes assistant-open { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } }

.assistant__submit { margin: 0 10px 10px; padding: 10px 12px; border: 1px solid var(--accent); color: var(--accent); font: 700 11px var(--font-mono); letter-spacing: .05em; text-align: center; }
.assistant__submit:hover { background: var(--accent-soft); }

/* Reserve the homepage's lower-right PERSONAL stage switcher. */
body.page--home .assistant { bottom: clamp(96px, 12vh, 132px); }
body.page--home .assistant__panel { height: min(570px, calc(100dvh - clamp(196px, 22vh, 235px))); }
@media (max-width: 480px) {
  body.page--home .assistant { bottom: 96px; }
  body.page--home .assistant__panel { height: min(570px, calc(100dvh - 190px)); }
}

/* In-chat progress animation: distinct from status errors and respectful of reduced motion. */
.assistant__thinking { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper-sunk); color: var(--ink-soft); font: 700 11px var(--font-mono); letter-spacing: .08em; }
.assistant__thinking-dots { display: inline-flex; align-items: center; gap: 4px; }
.assistant__thinking-dots i { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: assistant-pulse 1.2s ease-in-out infinite; }
.assistant__thinking-dots i:nth-child(2) { animation-delay: .2s; }
.assistant__thinking-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes assistant-pulse { 0%, 65%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .assistant__thinking-dots i { animation: none; opacity: .8; } }
