.ma-panel { margin: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.ma-panel[hidden] { display: none; }
.ma-editor [hidden], #pairing-form[hidden], #pairing-intro[hidden] { display: none !important; }
.ma-panel h3 { margin: 0 0 10px; font-size: 16px; }
.ma-panel p, .ma-editor-body p { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ma-source { color: var(--muted); }
.ma-current { color: var(--cyan); }
.ma-form { margin: 16px 0 0; }
.ma-form fieldset { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ma-form label { display: grid; gap: 8px; min-width: 0; font-size: 13px; }
.ma-form select { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); font: inherit; text-overflow: ellipsis; }
.ma-form .ma-check { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.ma-check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--cyan); }
.ma-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ma-button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.ma-primary { border-color: var(--cyan); background: var(--cyan-soft); }
.ma-panel :disabled, .ma-editor :disabled { opacity: .5; cursor: default; }
.ma-panel :focus-visible, .ma-editor :focus-visible, .ma-correct:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.ma-message { min-height: 20px; color: var(--cyan); }
.ma-message.error { color: var(--red); }
.ma-panel details { margin: 16px 0; font-size: 13px; overflow-wrap: anywhere; }
.ma-panel summary { cursor: pointer; padding: 10px 0; }
.ma-panel li { margin-bottom: 8px; }
.ma-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ma-editor { z-index: 70; }
.ma-editor .modal-card { width: min(560px, 100%); }
.ma-editor .modal-head { gap: 12px; }
.ma-editor .modal-head h2 { min-width: 0; font-size: 18px; }
.ma-editor .close-button { flex-shrink: 0; }
.ma-editor-body { padding: 0 20px 20px; }
.ma-history { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.history-main .ma-property, .activity-item .ma-property { color: var(--cyan); overflow-wrap: anywhere; }
.ma-correct { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface-2); font-size: 12px; }
.vacuum-property { display: block; margin-top: 6px; color: var(--cyan); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.ma-history-row .history-main { min-width: 0; }
.ma-history-row { padding: 10px 0; }
#pairing-modal.ma-pairing-active { z-index: 65; }
@media (max-width: 600px) {
  .ma-panel { margin: 14px; padding: 14px; }
  .ma-actions { flex-direction: column; }
  .ma-actions .ma-button { width: 100%; }
  .ma-history { align-items: flex-start; flex-direction: column; }
  .ma-history-row .history-energy { grid-column: 2; }
  .ma-editor .modal-card { width: 100%; max-height: 100dvh; min-height: 100dvh; }
}
