.llm-page { max-width: 900px; }
.llm-panel { padding: clamp(18px, 4vw, 34px); border: 1px solid #394b3b; background: #111912e8; box-shadow: 0 22px 80px #0004; }
.llm-model-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.llm-model-row > div { display: grid; gap: 7px; }
.llm-label,.llm-panel > label { color: var(--green); font-size: 9px; letter-spacing: .12em; }
.llm-model-row strong { color: #edf4e9; font: 550 20px ui-sans-serif, system-ui, sans-serif; }
.llm-model-row small { color: var(--muted); font: 11px ui-sans-serif, system-ui, sans-serif; }
.llm-status { color: var(--green); font-size: 9px; white-space: nowrap; }
.llm-status.error { color: #ff9b85; }
.llm-note { max-width: 670px; margin: 22px 0; color: #adbaaa; font: 13px/1.55 ui-sans-serif, system-ui, sans-serif; }
.llm-actions { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--muted); font: 11px ui-sans-serif, system-ui, sans-serif; }
.llm-cache-status { margin: -10px 0 22px; color: #8fa08c; font: 10px/1.5 ui-sans-serif, system-ui, sans-serif; }
.llm-panel button { min-height: 38px; padding: 0 13px; border: 1px solid #8dbf73; border-radius: 3px; background: #172318; color: #c6e995; font-size: 9px; letter-spacing: .08em; cursor: pointer; }
.llm-panel button:hover:not(:disabled) { background: #243624; }
.llm-panel button:disabled { opacity: .45; cursor: wait; }
.llm-panel textarea,.llm-panel pre { display: block; width: 100%; margin: 8px 0 20px; padding: 13px; border: 1px solid #334333; border-radius: 2px; background: #0b100c; color: #e4eedf; font: 13px/1.6 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.llm-panel textarea { min-height: 70px; resize: vertical; }
.llm-panel pre { min-height: 150px; margin-bottom: 8px; }
.llm-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 22px; }
.llm-controls label { display: grid; gap: 7px; color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.llm-controls input { width: 112px; height: 38px; padding: 0 8px; border: 1px solid #334333; border-radius: 2px; background: #0b100c; color: #e4eedf; font: 12px ui-monospace, monospace; }
.llm-controls button { min-width: 116px; }
#llm-stop { border-color: #b87966; color: #ffb29d; }
.llm-metrics { display: flex; justify-content: space-between; gap: 10px; color: #8fa08c; font-size: 9px; }
.llm-panel details { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: #a9b6a7; font: 12px/1.55 ui-sans-serif, system-ui, sans-serif; }
.llm-panel summary { color: #cfddc9; cursor: pointer; font-size: 11px; }
.npc-chat-panel { display: grid; gap: 8px; margin: 18px 0 22px; padding: 16px; border: 1px solid #50634c; background: #0d150f; }
.npc-chat-panel[hidden] { display: none; }
.npc-chat-panel > label { margin-top: 7px; color: var(--green); font-size: 9px; letter-spacing: .1em; }
.npc-chat-panel textarea { min-height: 56px; margin: 0; }
.npc-chat-history { display: grid; gap: 9px; max-height: 220px; overflow: auto; }
.npc-chat-line { padding: 9px 11px; border-left: 2px solid #617856; background: #131d15; color: #dce8d5; font: 12px/1.5 ui-sans-serif, system-ui, sans-serif; white-space: pre-wrap; }
.npc-chat-line strong { display: block; margin-bottom: 3px; color: #a8d97f; font-size: 9px; letter-spacing: .08em; }
.npc-chat-compose { display: flex; align-items: flex-end; gap: 10px; }
.npc-chat-compose textarea { flex: 1; min-height: 64px; }
.npc-chat-compose button { min-width: 112px; }
.npc-chat-panel + .llm-controls #llm-generate { display: none; }
.llm-panel details p { max-width: 700px; }
.llm-panel details a { color: #c6e995; }
@media (max-width: 680px) { .llm-model-row { flex-direction: column; }.llm-actions { align-items: flex-start; flex-direction: column; }.llm-metrics { flex-direction: column; } }
