/* ─── Frontly Recorder — mobile-first, installable ──────────────────────
 * One screen at a time (main[data-screen]); the header and footer stay.
 * Tokens follow the widget's palette (public/styles.css) so the two feel
 * like one product; dark mode follows the device.
 * ────────────────────────────────────────────────────────────────────── */

:root {
	--bg: #f6f7fb;
	--surface: #ffffff;
	--surface-2: #eef0f6;
	--fg: #0c1424;
	--fg-2: #3c4658;
	--muted: #6b7589;
	--faint: #9aa3b5;
	--border: #e3e6ee;
	--accent: #4f46e5;
	--accent-ink: #3730a3;
	--accent-soft: #eef0ff;
	--good: #16a34a;
	--warn: #d97706;
	--danger: #dc2626;
	--rec: #e11d48;
	--shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -16px rgba(15, 23, 42, .25);
	--radius: 16px;
	--radius-lg: 24px;
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0b1020;
		--surface: #121a2e;
		--surface-2: #1a2440;
		--fg: #eef1f8;
		--fg-2: #c7cde0;
		--muted: #8e98b0;
		--faint: #5f6983;
		--border: #243052;
		--accent: #818cf8;
		--accent-ink: #c7d2fe;
		--accent-soft: #1e2a55;
		--good: #4ade80;
		--warn: #fbbf24;
		--danger: #f87171;
		--rec: #fb7185;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .8);
	}
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.rec {
	min-height: 100%;
	max-width: 560px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 8px);
}

/* ─── Header ─────────────────────────────────────────────────────── */
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 14px; }
.rec-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* The Frontly mark: the same dark rounded square + bold F as the dashboard favicon. */
.rec-mark {
	width: 40px; height: 40px; border-radius: 12px; flex: none;
	display: grid; place-items: center;
	background: #111827; color: #fff; font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1;
}
.rec-mark-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 30px; margin: 0 auto 4px; }
.rec-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; }
.rec-brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--fg-2); }
.rec-id-text { min-width: 0; }
.rec-name { font-weight: 650; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-head-right { display: flex; align-items: center; gap: 10px; }
.rec-id > .rec-icon-btn { margin-right: 2px; }
.rec-id > .rec-icon-btn svg { width: 18px; height: 18px; }
.rec-id:has(> .rec-icon-btn:not([hidden])) .rec-mark { display: none; }   /* a menu or back button takes the mark's place */
@media (min-width: 420px) { .rec-id:has(> .rec-icon-btn:not([hidden])) .rec-mark { display: grid; } }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 20%, transparent); transition: background .2s; }
.rec-dot[data-state="live"] { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.rec-dot[data-state="warn"] { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }
.rec-dot[data-state="error"] { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.rec-icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.rec-icon-btn svg { width: 16px; height: 16px; }

/* ─── Screens ────────────────────────────────────────────────────── */
.rec-screen { display: none; flex: 1; min-height: 0; }
.rec[data-screen="loading"]  .rec-screen[data-for="loading"],
.rec[data-screen="signin"]   .rec-screen[data-for="signin"],
.rec[data-screen="agents"]   .rec-screen[data-for="agents"],
.rec[data-screen="consent"]  .rec-screen[data-for="consent"],
.rec[data-screen="recorder"] .rec-screen[data-for="recorder"],
.rec[data-screen="done"]     .rec-screen[data-for="done"],
.rec[data-screen="error"]    .rec-screen[data-for="error"],
.rec[data-screen="recordings"] .rec-screen[data-for="recordings"],
.rec[data-screen="recording"]  .rec-screen[data-for="recording"],
.rec[data-screen="password"]   .rec-screen[data-for="password"] { display: flex; flex-direction: column; }

.rec-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px 0; }
.rec-stack { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.rec-stack-center { justify-content: center; }
.rec-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rec-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.rec-muted { color: var(--muted); margin: 0; }
.rec-small { font-size: 13px; }
.rec-error { color: var(--danger); font-size: 13.5px; margin: 0; }

.rec-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 20px; box-shadow: var(--shadow); }
.rec-form { display: flex; flex-direction: column; gap: 8px; margin: auto 0; }
.rec-form .rec-title { margin-bottom: 2px; }
.rec-form .rec-muted { margin-bottom: 10px; }
.rec-label { font-size: 12.5px; font-weight: 600; color: var(--fg-2); margin-top: 6px; }
.rec-input {
	width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
	border: 1px solid var(--border); background: var(--surface); color: var(--fg); outline: none;
}
.rec-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

.rec-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--border);
	background: var(--surface); color: var(--fg); font-weight: 600; text-decoration: none;
	transition: transform .08s ease, background .15s;
}
.rec-btn:active { transform: scale(.985); }
.rec-btn:disabled { opacity: .55; cursor: default; }
.rec-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rec-btn-ghost { background: transparent; }
.rec-btn-big { height: 60px; font-size: 17px; border-radius: 18px; margin-top: 6px; }
.rec-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }

/* ─── Agents ─────────────────────────────────────────────────────── */
.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec-agent {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
	padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border);
	background: var(--surface); box-shadow: var(--shadow);
}
.rec-agent:active { background: var(--surface-2); }
.rec-agent-name { font-weight: 650; font-size: 16px; }
.rec-agent-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rec-agent svg { width: 18px; height: 18px; color: var(--faint); flex: none; }

/* ─── Consent / start ────────────────────────────────────────────── */
.rec-consent { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); }
.rec-consent-icon { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.rec-consent-icon svg { width: 22px; height: 22px; }
.rec-consent-text { margin: 0; font-size: 15px; line-height: 1.5; }
.rec-modes { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rec-mode {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
	padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
}
.rec-mode[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.rec-mode-label { font-weight: 600; font-size: 14.5px; }
.rec-mode-hint { font-size: 12.5px; color: var(--muted); }
@media (min-width: 420px) { .rec-modes { grid-template-columns: 1fr 1fr 1fr; } .rec-mode { padding: 12px; } }

/* ─── Recording ──────────────────────────────────────────────────── */
.rec-live { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 12px; }
.rec-timer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rec-timer { font-size: 44px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.rec-vu { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.rec-vu i { display: block; width: 5px; height: 6px; border-radius: 3px; background: var(--accent); opacity: .35; transition: height .08s linear, opacity .08s linear; }
.rec-vu i.on { opacity: 1; }
.rec-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rec-chip { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); }
.rec-chip-ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }

.rec-transcript {
	flex: 1; min-height: 160px; overflow-y: auto; -webkit-overflow-scrolling: touch;
	padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
	display: flex; flex-direction: column; gap: 8px;
}
.rec-transcript-empty { margin: auto; text-align: center; }
.rec-turn { display: flex; flex-direction: column; gap: 2px; }
.rec-turn-who { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.rec-turn-text { font-size: 15.5px; line-height: 1.5; color: var(--fg); word-break: break-word; }
.rec-partial { font-size: 15.5px; line-height: 1.5; color: var(--muted); font-style: italic; min-height: 1.5em; word-break: break-word; }
.rec-partial:empty { display: none; }

.rec-notice { padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.rec-notice[data-level="error"] { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.rec-notice[data-level="info"] { background: var(--accent-soft); color: var(--accent-ink); }

/* An earlier recording being finished in the background */
.rec-resume { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--accent-soft); color: var(--accent-ink); }
.rec-resume[data-state="done"] { background: color-mix(in srgb, var(--ok, #16a34a) 14%, transparent); color: var(--ok, #15803d); }
.rec-resume-text { flex: 1; min-width: 0; }
.rec-resume-spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rec-spin .9s linear infinite; }
.rec-resume[data-state="done"] .rec-resume-spin { display: none; }
.rec-resume-btn { flex: none; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.rec-resume-btn:disabled { opacity: .5; }
@keyframes rec-spin { to { transform: rotate(360deg); } }

.rec-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 0 4px; }
.rec-status { font-size: 12.5px; color: var(--muted); }
.rec-status-right { text-align: right; }
.rec-stop {
	width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--rec); color: #fff;
	display: grid; place-items: center; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--rec) 70%, transparent);
	animation: rec-pulse 1.8s ease-in-out infinite;
}
.rec-stop:active { transform: scale(.96); }
.rec-stop:disabled { animation: none; opacity: .6; }
.rec-stop-square { width: 26px; height: 26px; border-radius: 6px; background: #fff; }
@keyframes rec-pulse {
	0%, 100% { box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--rec) 70%, transparent), 0 0 0 0 color-mix(in srgb, var(--rec) 35%, transparent); }
	50% { box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--rec) 70%, transparent), 0 0 0 14px color-mix(in srgb, var(--rec) 0%, transparent); }
}

/* ─── Done / error ───────────────────────────────────────────────── */
.rec-done-icon { position: relative; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 6px; }
.rec-done-icon svg { width: 34px; height: 34px; }
.rec-done-icon[data-state="working"] .rec-done-check { display: none; }
.rec-done-icon[data-state="done"] { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.rec-done-icon[data-state="done"] .rec-done-spin { display: none; }
.rec-done-icon[data-state="error"] { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.rec-done-icon[data-state="error"] .rec-done-spin { display: none; }

.rec-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: rec-spin .9s linear infinite; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.rec-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 2px 0; font-size: 11.5px; color: var(--faint); }

@media (min-width: 640px) {
	.rec { padding-top: 28px; }
	.rec-timer { font-size: 52px; }
}

/* ─── Menu (drawer) ──────────────────────────────────────────────── */
.rec-scrim { position: fixed; inset: 0; background: rgba(8, 12, 24, .45); z-index: 40; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.rec-drawer {
	position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); z-index: 41;
	display: flex; flex-direction: column; gap: 6px;
	padding: calc(var(--safe-top) + 14px) 14px calc(var(--safe-bottom) + 14px);
	background: var(--surface); border-right: 1px solid var(--border); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .5);
	transform: translateX(-104%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); overflow-y: auto;
}
.rec-drawer.open { transform: none; }
.rec-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 4px 6px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.rec-drawer-user { min-width: 0; }
.rec-drawer-name { font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-drawer-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-drawer-kind { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.rec-drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.rec-drawer-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 8px; }
.rec-nav {
	display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
	padding: 12px 12px; border-radius: 12px; border: 0; background: transparent; color: var(--fg); font-weight: 600; font-size: 15px;
}
.rec-nav svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.rec-nav.on { background: var(--accent-soft); color: var(--accent-ink); }
.rec-nav.on svg { color: var(--accent-ink); }
.rec-nav:active { background: var(--surface-2); }
.rec-nav-sub { font-weight: 500; font-size: 14px; color: var(--fg-2); }
.rec-nav-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-drawer-section { padding: 10px 12px 6px; }
.rec-drawer-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.rec-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.rec-seg-btn { height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.rec-seg-btn[aria-checked="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.rec-drawer-hint { margin: 4px 12px 0; font-size: 12.5px; color: var(--warn); }

/* ─── Recordings list ────────────────────────────────────────────── */
.rec-recordings { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.rec-toolbar { display: flex; gap: 8px; align-items: center; }
.rec-search { position: relative; flex: 1; display: block; }
.rec-search svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.rec-search .rec-input { padding-left: 38px; height: 44px; }
.rec-select { height: 40px; }
.rec-items { gap: 8px; }
.rec-item {
	display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
	padding: 13px 12px 13px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
}
.rec-item:active { background: var(--surface-2); }
.rec-item-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rec-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rec-item-title { font-weight: 650; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-item-meta { font-size: 12.5px; color: var(--muted); }
.rec-item-summary { font-size: 13.5px; color: var(--fg-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-item-err { color: var(--danger); }
.rec-item-chevron { flex: none; width: 18px; height: 18px; color: var(--faint); }
.rec-item-chevron svg { width: 18px; height: 18px; }
.rec-pill { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); text-transform: uppercase; }
.rec-pill[data-state="done"] { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.rec-pill[data-state="processing"] { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.rec-pill[data-state="recording"] { background: color-mix(in srgb, var(--rec) 14%, transparent); color: var(--rec); }
.rec-pill[data-state="failed"] { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.rec-list-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 4px; }
.rec-center-text { text-align: center; padding: 24px 0; }

/* ─── One recording ──────────────────────────────────────────────── */
.rec-detail { display: flex; flex-direction: column; gap: 12px; }
.rec-d-head { display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 4px; }
.rec-d-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.rec-d-date { font-size: 13.5px; color: var(--muted); }
.rec-d-link { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--border); background: transparent; color: var(--accent-ink); font-size: 13.5px; line-height: 1.4; }
.rec-d-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.rec-d-h { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.rec-d-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; }
.rec-d-fields { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.rec-d-fields dt { font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 8px; }
.rec-d-fields dd { margin: 0; font-size: 15px; font-weight: 600; padding: 2px 0 8px; border-bottom: 1px solid var(--border); word-break: break-word; }
.rec-d-fields dd.long { font-weight: 400; white-space: pre-wrap; line-height: 1.5; }
.rec-d-fields dd:last-child { border-bottom: 0; }
.rec-d-audio { width: 100%; }
.rec-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.rec-tab { flex: 1; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.rec-tab[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.rec-turns { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.rec-notes { display: flex; flex-direction: column; gap: 8px; }
.rec-note { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.rec-note-text { font-size: 14.5px; white-space: pre-wrap; line-height: 1.45; }
.rec-note-meta { margin-top: 6px; font-size: 12px; color: var(--muted); }
.rec-note-form { display: flex; flex-direction: column; gap: 8px; }
.rec-textarea { height: auto; min-height: 64px; padding: 10px 14px; resize: vertical; }

/* ─── A recording's tabbed sections ──────────────────────────────── */
.rec-dtabs { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.rec-dtabs::-webkit-scrollbar { display: none; }
.rec-dtab {
	flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px;
	border: 1px solid var(--border); background: var(--surface); color: var(--fg-2); font-weight: 600; font-size: 13.5px; white-space: nowrap;
}
.rec-dtab[aria-selected="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.rec-dtab-n { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.rec-dtab[aria-selected="true"] .rec-dtab-n { background: color-mix(in srgb, var(--bg) 25%, transparent); color: var(--bg); }
.rec-d-panel { min-height: 160px; }
.rec-d-media { display: flex; flex-direction: column; gap: 14px; }
.rec-d-sub { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rec-d-audiobox { display: flex; flex-direction: column; gap: 8px; }
.rec-d-tblock { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
