/* VoxLock demo widget. Uses the host page's --fg, --bg, --soft, --faint, --accent, --line, --mono, --ease tokens. */
.vl { container-type: inline-size; --vl-good: #1f7a4d; --wave-on: var(--vl-good); --wave-off: color-mix(in srgb, var(--fg) 22%, transparent); }
.vl *, .vl *::before, .vl *::after { box-sizing: border-box; }
.vl button, .vl input, .vl select, .vl label { font: inherit; color: inherit; }
.vl-section { margin-top: 2rem; }
.vl-h { margin: 0 0 0.4rem; font-size: 1.15rem; }
.vl-clips li::before, .vl-clips li::marker { content: none; }
.vl-clips li { margin: 0 !important; padding: 0 !important; }
.vl-note { margin: 0 0 1.2rem; max-width: 42rem; color: var(--soft); }
.vl-fine { margin: 1.1rem 0 0; max-width: 46rem; color: var(--faint); font-size: 0.8rem; line-height: 1.5; }


.vl-layout { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.vl-clips { list-style: none; margin: 0 !important; padding: 0 !important; border-top: 1px solid var(--line); }
.vl-clips li { border-bottom: 1px solid var(--line); }
.vl-clip { width: 100%; display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.2rem 0.4rem; padding: 0.55rem 0.4rem; background: none; border: 0; text-align: left; cursor: pointer; border-radius: 0; }
.vl-clip:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.vl-clip[aria-current="true"] { background: color-mix(in srgb, var(--vl-good) 10%, transparent); }
.vl-clip .n { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); padding-top: 0.15rem; }
.vl-clip[aria-current="true"] .n { color: var(--vl-good); }
.vl-clip b { font-weight: 500; font-size: 0.9rem; line-height: 1.3; }
.vl-clip small { grid-column: 2; color: var(--faint); font-size: 0.74rem; }

.vl-player { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem 1.1rem; background: var(--bg); }
.vl-p-title { margin: 0; font-weight: 600; }
.vl-p-meta { margin: 0.1rem 0 0.9rem; color: var(--soft); font-size: 0.82rem; }
.vl-wave { position: relative; width: 100%; height: 120px; cursor: pointer; touch-action: none; }
.vl-wave canvas { width: 100%; height: 100%; display: block; }
.vl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem; margin-top: 0.9rem; }
.vl-time { font-family: var(--mono); font-size: 0.8rem; color: var(--soft); font-variant-numeric: tabular-nums; }
.vl-switch { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.9rem 0.35rem 0.4rem; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer; }
.vl-switch .track { width: 2.6rem; height: 1.5rem; border-radius: 999px; background: var(--wave-off); position: relative; transition: background 160ms var(--ease); }
.vl-switch .track::after { content: ""; position: absolute; top: 0.18rem; left: 0.2rem; width: 1.14rem; height: 1.14rem; border-radius: 50%; background: #fff; transition: transform 160ms var(--ease); }
.vl-switch[aria-checked="true"] .track { background: var(--vl-good); }
.vl-switch[aria-checked="true"] .track::after { transform: translateX(1.06rem); }
.vl-switch b { font-weight: 600; min-width: 7.4rem; text-align: left; }
.vl-scores { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0.9rem 0 0; padding: 0.6rem 0 0; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--soft); }
.vl-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.vl-heard span { display: block; font-size: 0.72rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.vl-heard p { margin: 0.2rem 0 0; color: var(--soft); font-size: 0.86rem; line-height: 1.4; }
.vl-heard.on span { color: var(--vl-good); }
.vl-heard.on p { color: var(--fg); }
@container (max-width: 640px) { .vl-scores { grid-template-columns: 1fr; } }
.vl-scores b { font-family: var(--mono); font-weight: 400; color: var(--fg); }

.vl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0.4rem 1rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); background: var(--bg); cursor: pointer; transition: background 160ms var(--ease); }
.vl-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.vl-btn:disabled { opacity: 0.45; cursor: default; }
.vl .vl-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); min-width: 7rem; }
.vl-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 85%, var(--bg)); }
.vl-primary.live { background: var(--accent); border-color: var(--accent); }
.vl-quiet { color: var(--soft); }
.vl-rec { border-top: 1px solid var(--line); padding-top: 1rem; margin-bottom: 1.2rem; }
.vl-rec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.8rem; }
.vl-check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.vl-rec select { min-height: 2.5rem; padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 0.88rem; }
.vl-tip { margin: 0.7rem 0 0; color: var(--faint); font-size: 0.8rem; }
.vl-status { margin-top: 0.8rem; min-height: 1.4rem; font-size: 0.9rem; color: var(--soft); }
.vl-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 0.4rem; max-width: 30rem; }
.vl-bar div { height: 100%; width: 0; background: var(--accent); transition: width 200ms var(--ease); }

@container (max-width: 640px) {
  .vl-layout { grid-template-columns: 1fr; }
  .vl-player { order: -1; }
  .vl-wave { height: 96px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vl { --vl-good: #4cb782; } }
:root[data-theme="dark"] .vl { --vl-good: #4cb782; }
