.llm-subsection { border-bottom: 1px solid #444; padding-bottom: 12px; margin-bottom: 12px; }
.llm-section-title { display: block; color: #4da6ff; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; margin-bottom: 10px; }
.llm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.llm-actions button, .llm-profile-bar button, .llm-tabs button { background: #363636; color: #ddd; border: 1px solid #505050; border-radius: 4px; padding: 7px 11px; cursor: pointer; font: inherit; }
.llm-actions button:hover, .llm-profile-bar button:hover { background: #444; }
.llm-actions button:disabled { cursor: default; opacity: .45; }
.llm-subsection > .llm-actions button { padding: 5px 10px; font-size: 12px; min-height: 0; }
.llm-compact-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: #9dbfe0; margin-top: 8px; }
.llm-player-options { display: flex; align-items: center; gap: 10px; padding: 5px 8px; font-size: 12px; }
.llm-player-options select { flex: 1; min-width: 0; }
.llm-player-options[hidden], .llm-modal [hidden], #llm-status[hidden], #llm-sidebar-status[hidden] { display: none !important; }
.llm-overlay { backdrop-filter: none; animation: none; opacity: 1; }
.llm-modal { box-sizing: border-box; width: min(780px, calc(100% - 32px)); max-width: 780px; height: min(760px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); padding: 0; display: flex; flex-direction: column; border-radius: 6px; animation: none; transform: none; overflow: hidden; font-size: 14px; }
.llm-modal .modal-header { padding: 14px 18px; margin: 0; font-size: 19px; color: #4da6ff; }
.llm-close { border: 0; background: transparent; color: #bbb; font-size: 25px; cursor: pointer; line-height: 1; padding: 0; width: 30px; height: 30px; flex: 0 0 30px; }
.llm-profile-bar { display: flex; gap: 8px; padding: 12px 18px; }
.llm-profile-bar select { min-width: 0; flex: 1; }
.llm-tabs { display: flex; flex-shrink: 0; gap: 4px; padding: 0 18px; border-bottom: 1px solid #444; overflow-x: auto; scrollbar-width: thin; }
.llm-tabs button { flex: 0 0 auto; min-width: max-content; white-space: nowrap; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; background: transparent; }
.llm-tabs button[aria-selected=true] { color: #75b8f8; background: #333; border-bottom-color: #4da6ff; }
.llm-modal-body { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #555 #292929; scrollbar-gutter: stable; padding: 18px; }
.llm-modal-body::-webkit-scrollbar { width: 8px; }
.llm-modal-body::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
.llm-field { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 12px; }
.llm-field label { color: #c4c4c4; font-size: 13px; margin: 0; }
.llm-field input, .llm-field select, .llm-field textarea, .llm-profile-bar select, #llm-model-results { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; padding: 7px 9px; border: 1px solid #555; border-radius: 4px; background: #333; color: #eee; font: inherit; color-scheme: dark; }
.llm-field input[type=checkbox] { width: 16px; height: 16px; justify-self: end; accent-color: #4da6ff; }
.llm-field input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.llm-field input::-webkit-inner-spin-button, .llm-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.llm-wide { grid-template-columns: 1fr; gap: 7px; }
.llm-field textarea { resize: vertical; scrollbar-width: thin; scrollbar-color: #666 #333; }
.llm-modal :focus-visible { outline: 2px solid #4da6ff; outline-offset: 2px; }
.llm-divider { border-top: 1px solid #444; margin: 18px 0; }
.llm-modal h3 { margin: 0 0 12px; font-size: 12px; color: #87b9ea; font-weight: 600; }
.llm-details { border-top: 1px solid #444; margin-top: 18px; padding-top: 14px; }
.llm-details summary { cursor: pointer; color: #b9b9b9; margin-bottom: 14px; }
.llm-muted, .llm-hint { color: #999; font-size: 11px; }
.llm-hint { margin: -5px 0 14px; }
.llm-modal .modal-footer { padding: 12px 18px; border-top: 1px solid #444; margin: 0; align-items: center; flex-shrink: 0; }
#llm-frozen { margin-right: auto; }
#llm-error { color: #f1b685; font-size: 12px; padding: 8px 18px; border-top: 1px solid #444; overflow-wrap: anywhere; }
.llm-inspector-board { display: block; width: min(100%, 440px); height: auto; margin: 12px auto 20px; border: 1px solid #555; }
#llm-activity-detail pre { font-size: 11px; line-height: 1.5; background: #222; color: #ccc; padding: 12px; border: 1px solid #444; border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #555 #222; }
.llm-usage { color: #aaa; font-size: 12px; }
.llm-inline-error { color: #e6a789; overflow-wrap: anywhere; }
@media(max-width: 600px) {
    .llm-modal { width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
    .llm-profile-bar, .llm-tabs { padding-left: 12px; padding-right: 12px; }
    .llm-profile-bar { gap: 5px; }
    .llm-profile-bar button { padding: 6px; font-size: 12px; }
    .llm-modal-body { padding: 14px 12px; }
    .llm-field { grid-template-columns: minmax(105px,.8fr) minmax(0,1fr); gap: 8px; }
    .llm-wide { grid-template-columns: 1fr; }
    .llm-modal .modal-footer { padding: 10px 12px; flex-wrap: wrap; }
    #llm-frozen { flex-basis: 100%; }
}
