.wm-card { padding: 0; overflow: hidden; }

/* Slim, professional toolbar - matches the recorder/contrast tool pattern used elsewhere in the hub */
.wm-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 22px; border-bottom: 1px solid #eee; background: #fafbfc; }
.wm-toolbar-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: #1f2937; font-size: 1.02em; }
.wm-toolbar-brand i { color: var(--site-dark-2); }

/* 80 / 20 layout: preview + meter on the left, a narrow vertical control rail on the right */
.wm-tool-row { display: flex; gap: 22px; padding: 22px; align-items: stretch; }
.wm-preview-col { flex: 0 0 80%; max-width: 80%; min-width: 0; display: flex; flex-direction: column; }
.wm-side-controls { flex: 0 0 20%; max-width: 20%; min-width: 170px; display: flex; flex-direction: column; gap: 10px; }

.wm-status { text-align: center; color: #6b7280; font-size: .88em; margin-bottom: 12px; min-height: 1.4em; }

.wm-preview-wrap { background: #111318; border-radius: 10px; overflow: hidden; flex: 1; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; position: relative; }
/* Mirrored like a real mirror - the expected convention for a front-camera self-test */
.wm-preview-wrap video { width: 100%; height: 100%; object-fit: cover; background: #111318; transform: scaleX(-1); }
.wm-preview-placeholder { color: #6b7280; text-align: center; padding: 20px; }
.wm-preview-placeholder i { font-size: 2.6em; margin-bottom: 10px; display: block; }

.wm-mic-meter-wrap { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.wm-mic-label { font-size: .85em; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.wm-mic-label i { color: var(--site-dark-2); }
.wm-mic-track { flex: 1; height: 14px; background: #eee; border-radius: 8px; overflow: hidden; }
.wm-mic-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #22c55e, var(--site-accent) 70%, #ef4444 100%); border-radius: 8px; transition: width .08s linear; }

.wm-error { margin-top: 12px; background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.25); color: var(--site-danger); padding: 10px 14px; border-radius: 8px; font-size: .88em; line-height: 1.5; }

.wm-side-divider { border-top: 1px solid #eee; margin: 4px 0; }

.wm-btn { border: none; border-radius: 8px; padding: 12px 16px; font-weight: 600; cursor: pointer; font-size: .9em; display: flex; align-items: center; justify-content: center; gap: 8px; transition: filter .15s ease; width: 95%; align-self: center; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-btn:disabled { opacity: .45; cursor: not-allowed; }
.wm-btn:not(:disabled):hover { filter: brightness(1.08); }
.wm-btn-start { background: var(--site-dark-2); color: #fff; }
.wm-btn-stop { background: #1f2937; color: #fff; }

.wm-device-select-wrap { width: 95%; align-self: center; }
.wm-device-select-wrap label { display: flex; align-items: center; gap: 6px; font-size: .82em; font-weight: 600; color: #374151; margin-bottom: 4px; }
.wm-device-select-wrap select { width: 100%; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: .85em; background: #fff; color: #23272f; }

.wm-privacy-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 22px 22px; padding: 14px 16px; background: var(--site-success-bg); border: 1px solid var(--site-success-border); border-radius: 10px; color: var(--site-success); font-size: .88em; line-height: 1.6; }
.wm-privacy-note i { margin-top: 2px; color: var(--site-success); flex-shrink: 0; }

@media (max-width: 700px) {
    .wm-tool-row { flex-direction: column; }
    .wm-preview-col, .wm-side-controls { flex: 1 1 auto; max-width: 100%; }
    .wm-privacy-note { margin: 0 16px 16px; }
}
