:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #ececf0;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: #d9d9de;
  --accent: #0a84ff;
  --accent-text: #ffffff;
  --rec: #ff3b30;
  --good: #30b25a;
  --warn: #e08a00;
  --stage: #1c1c1e;
  --tile: #2c2c2e;
  --tile-text: #f5f5f7;
  --radius: 12px;
  --dot-off: rgba(120, 120, 128, 0.25);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --border: #3a3a3c;
    --accent: #0a84ff;
    --stage: #000000;
    --tile: #1c1c1e;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111113;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --border: #3a3a3c;
  --stage: #000000;
  --tile: #1c1c1e;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* `hidden` wins over any display set below. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: 0.01em; }
.brand .logo { width: 28px; height: 28px; margin: -4px -4px -4px -6px; }
/* As tall on the join page as in the room, where the tabs make it so. */
.bar { position: relative; min-height: 56px; }
.tabs { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-2); }
.tab { border: 0; background: transparent; padding: 5px 14px; font-size: 14px; color: var(--muted); }
.tab.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.unread.idle { background: var(--muted); }
.stored { margin-top: -8px; }
.stored summary { font-weight: 600; }
.recording .kept { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.recording .kept.ok { color: var(--good); }
.level-hint { margin: -8px 0 14px; font-size: 13px; color: var(--warn); }
.transfers-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.transfers-head .hint { margin: 0; }
.recording .host { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr); gap: 4px 12px; align-items: center; margin-top: 8px; font-size: 13px; }
.recording .host .to { font-weight: 600; }
.recording .host progress { width: 100%; height: 6px; accent-color: var(--accent); }
.recording .host .status { grid-column: 2; color: var(--muted); }
.recording .host .status.ok { color: var(--good); }
.recording .host .status.fail { color: var(--rec); }
.recording .host details { grid-column: 2; }
.recording .host details summary { font-weight: 400; font-size: 12px; color: var(--muted); }
.recording .host details ul { margin: 4px 0 0; padding: 0; list-style: none; color: var(--muted); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok::before, .pill.bad::before, .pill.wait::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pill.ok::before { background: var(--good); }
.pill.wait::before { background: var(--warn); }
.pill.bad::before { background: var(--rec); }

main { max-width: 1200px; margin: 0 auto; padding: 16px; }
/*
 * The call page fits the window's height (2026-10-06; before, a fixed width
 * with tiles sized by it, so a wide window pushed the controls off the
 * bottom): header, notices and controls take what they need, the stage (and
 * the chat beside it) the rest, and the tiles are as large as fits in it
 * (`fitStage`). Too low a window scrolls, past the stage's least height.
 */
body.call-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
body.call-page main { max-width: none; width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.call-page #room, body.call-page #page-call, body.call-page #in-call { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.call-page .call-area { flex: 1; min-height: 240px; }
body.call-page .stage-wrap { min-height: 0; height: 100%; }
body.call-page .stage { min-height: 0; }
body.call-page .stage { overflow: hidden; }
body.call-page .chat { max-height: none; min-height: 0; }
body.call-page .controls { margin-bottom: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.setup { max-width: 560px; margin: 24px auto; }
h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); margin-bottom: 18px; }
.notice.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); }
.notice.warn svg { color: var(--warn); }
.notice svg { width: 26px; height: 26px; flex: none; color: var(--accent); }

form label { display: block; font-weight: 500; margin-bottom: 14px; }
form label small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
label.check { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }
label.check small { display: inline; margin: 0; }
input:not([type="checkbox"]), select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button {
  font: inherit;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.danger { background: var(--rec); border-color: var(--rec); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button.small { padding: 4px 12px; font-size: 13px; }
button.toggle.off { background: var(--rec); border-color: var(--rec); color: #fff; }
#setup-form > button { width: 100%; margin-top: 6px; }
#allow { margin: 0 0 16px; }

.error { color: var(--rec); margin: 8px 0; }
.access { margin: -6px 0 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.access small { color: var(--muted); font-size: 12px; }

.meter-row { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; }
.meter-row.compact { margin: 0; min-width: 160px; }
.meter { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 120px; }
/* On the join page: bigger dots, a set width rather than the whole column. */
#setup-meter { flex: 0 1 340px; }
#setup-meter .dot { width: 9px; height: 18px; }
#setup-meter .sign, #setup-meter .sign svg { width: 18px; height: 18px; }
.meter .dots { flex: 1; display: flex; justify-content: space-between; gap: 2px; }
.meter .dot { width: 7px; height: 14px; border-radius: 999px; background: var(--dot-off); }
.meter .dot.on.green { background: var(--good); }
.meter .dot.on.yellow { background: #ffd60a; }
.meter .dot.on.red { background: var(--rec); }
.meter .dot.on.grey { background: var(--muted); }
.meter .sign { flex: none; width: 16px; height: 16px; display: inline-flex; }
.meter .sign svg { width: 16px; height: 16px; }
.tile .meter { min-width: 0; gap: 6px; }
.tile .meter .dot { width: 4px; height: 9px; }
.tile .meter .sign, .tile .meter .sign svg { width: 10px; height: 10px; }
.meter.peer-muted .dots { display: none; }
.tile .meter.peer-muted .sign, .tile .meter.peer-muted .sign svg { width: 14px; height: 14px; }

/* Recording, in the call bar's left: a red pill, orange while starting. */
.rec-banner { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: #d93025; color: #fff; font-size: 13px; white-space: nowrap; }
.rec-banner[hidden] { display: none; }
.rec-banner.armed { background: #e37400; }
.rec-banner .icon { width: 16px; height: 16px; }
.rec-banner button { padding: 2px 10px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }
.mono { font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }

.message, .alarm { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.message { background: var(--surface); border: 1px solid var(--border); }
.message.elsewhere { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.message.elsewhere[hidden] { display: none; }
.alarm { background: var(--rec); color: #fff; font-weight: 600; }

.stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: var(--stage);
  border-radius: var(--radius);
  padding: 8px;
  min-height: 240px;
}
/* Columns as wide as `fitStage` works out, so every large tile fits the stage's height too. */
.stage .grid { display: grid; gap: 8px; justify-content: center; grid-template-columns: minmax(0, 1fr); }
.tile { position: relative; background: var(--tile); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; color: var(--tile-text); user-select: none; -webkit-user-select: none; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.tile.screen video { object-fit: contain; }
/* What we share, framed red as on a Mac: it goes out. (An outline: an inset shadow lies under the video.) */
.corner .tile.sharing-self { outline: 2px solid #ff453a; outline-offset: -2px; }
.tile.mirrored video { transform: scaleX(-1); }
.tile .placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 600; color: var(--muted); }
.tile .tag { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 8px; }
/* As the Mac's name tags: small and semibold. */
.tile .tag .name { background: rgba(0, 0, 0, 0.5); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tag .name .icon { width: 16px; height: 16px; flex: none; }
.tile .tag .name .version { font-weight: 400; opacity: 0.7; }
.tile .tag .name .version.old { color: #ff9f0a; opacity: 1; }
.tile.me .tag .name { display: inline-flex; align-items: center; gap: 5px; }
.tile .tag .meter { max-width: 110px; }
.tile .state { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, 0.55); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.tile .tag .name { min-width: 0; flex: 0 1 auto; }
/* Your own level is in the controls already. */
.tile.me .tag .meter { display: none; }
.stage { position: relative; }
/* The stage and the bar under it, in one frame. */
.stage-wrap { position: relative; min-height: 240px; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--stage); }
.stage-wrap .stage { flex: 1; min-height: 0; border-radius: 0; }

/* The corner tiles, as the Mac's picture in picture: stacked over the stage, dragged to a corner, resized by the handle. */
.corner { position: absolute; z-index: 2; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.corner-tiles { display: flex; flex-direction: column; gap: 4px; }
.corner .tile { width: 100%; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.corner .tile .tag .meter { flex: 0 0 60px; }
.corner .tile.handle-left .tag { left: 34px; }
.corner-handle { position: absolute; width: 22px; height: 22px; margin: 4px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; display: grid; place-items: center; cursor: nwse-resize; touch-action: none; }
.corner-handle svg { width: 12px; height: 12px; }
.corner-handle[data-at^="top"] { top: 0; }
.corner-handle[data-at^="bottom"] { bottom: 0; }
.corner-handle[data-at$="left"] { left: 0; }
.corner-handle[data-at$="right"] { right: 0; }
.corner-handle[data-at="top-right"], .corner-handle[data-at="bottom-left"] { cursor: nesw-resize; }

/* The call's bar, above the stage and in its frame, as the Mac's (after Google Meet's). */
.call-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; background: #202124; color: #e8eaed; }
.call-bar .bar-main { display: flex; gap: 12px; }
.call-bar .bar-side.right { display: flex; justify-content: flex-end; align-items: center; gap: 2px; min-width: 0; flex-wrap: wrap; }
.call-bar .bar-group { display: contents; }
.call-bar .bar-group[hidden] { display: none; }
.call-bar .divider { width: 1px; height: 22px; margin: 0 6px; background: rgba(255, 255, 255, 0.2); }
.call-bar .icon-button { width: 38px; height: 38px; padding: 0; border-radius: 50%; justify-content: center; position: relative; }
.call-bar .icon-button .icon { width: 19px; height: 19px; }
.call-bar #chat-unread { position: absolute; top: -2px; right: -4px; margin: 0; }
/* Microphone, camera and share: grey pills, the icon red while off (or sharing); Leave a wider red one. */
.bar-pill { width: 56px; height: 44px; border: none; border-radius: 999px; background: #3c4043; color: #fff; display: grid; place-items: center; padding: 0; }
.bar-pill:hover:not(:disabled) { background: #4a4e52; }
.bar-pill.off { color: #ff453a; }
.bar-pill.leave, .bar-pill.leave:hover:not(:disabled) { background: #ea4335; }
.bar-pill.leave { width: 72px; }
.bar-pill:disabled { opacity: 0.45; }
.bar-pill .icon { width: 22px; height: 22px; display: block; }
.icon-button { background: transparent; border: none; color: inherit; padding: 4px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.icon-button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.icon-button .icon { width: 20px; height: 20px; display: block; }
.icon-button.active { background: rgba(255, 255, 255, 0.22); }
.segmented { display: inline-flex; border-radius: 7px; background: rgba(255, 255, 255, 0.08); padding: 1px; }
.segmented .icon-button { border-radius: 6px; }
.menu-anchor { position: relative; display: inline-flex; }
/* Opening down from the bar, kept inside the window on the right. */
.menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; gap: 2px; z-index: 5; }
.menu[hidden] { display: none; }
.menu button { background: transparent; border: none; text-align: left; padding: 6px 10px 6px 28px; border-radius: 6px; white-space: nowrap; position: relative; }
.menu button:hover { background: var(--surface-2); }
.menu button.checked::before { content: '✓'; position: absolute; left: 10px; }
.menu label.check { padding: 6px 10px; white-space: nowrap; margin: 0; }

.call-area { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.call-area.with-chat { grid-template-columns: minmax(0, 1fr) 320px; }
.chat { display: flex; flex-direction: column; padding: 0; min-height: 240px; max-height: 70vh; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.chat-head h2 { margin: 0; font-size: 15px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-line .who { font-size: 12px; font-weight: 600; }
.chat-line .when { font-size: 12px; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.chat-line .text { white-space: pre-wrap; word-break: break-word; user-select: text; }
.chat-line .text a { color: var(--accent); text-decoration: underline; }
.chat-form { display: flex; gap: 6px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--border); }
.chat-form textarea { flex: 1; resize: none; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; max-height: 120px; }
#chat-saved { padding: 0 10px 10px; margin: 0; }
/* Images in the chat: small, opened large in a new tab. */
.chat-image { display: block; max-width: 100%; max-height: 220px; width: auto; margin-top: 4px; border-radius: 8px; background: var(--surface-2); cursor: zoom-in; }
.chat-attachment { display: flex; align-items: center; gap: 10px; padding: 10px 10px 0; }
.chat-attachment[hidden] { display: none; }
.chat-attachment img { max-height: 72px; max-width: 160px; border-radius: 6px; }
.chat.dropping { outline: 2px dashed var(--accent); outline-offset: -4px; }
.unread { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--rec); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: 4px; }
@media (max-width: 800px) {
  .call-area.with-chat { grid-template-columns: minmax(0, 1fr); }
  /* The bar's buttons in the middle, what to see and the chat under them. */
  .call-bar { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; padding: 10px; }
  /* The left (recording) only while it has something to show. */
  .call-bar .bar-side:first-child:not(:has(> :not([hidden]))) { display: none; }
  .call-bar .bar-side.right { justify-content: center; }
  /* The chat below the stage: both in the window's height. */
  body.call-page .call-area.with-chat { grid-template-rows: minmax(0, 3fr) minmax(160px, 2fr); }
}
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.controls .spacer { flex: 1; }

/*
 * The join screen (2026-10-23, after Google Meet's): your picture (up to 1280
 * wide, and as high as the window leaves), the devices under it (a little
 * wider and further apart as it grows, within reason), and beside it, centred
 * on the picture, who is in the call and Join. Under one another on a narrow window.
 */
.lobby { display: grid; grid-template-columns: minmax(0, 1280px) 300px; grid-template-areas: "video side" "below ."; column-gap: 48px; row-gap: 16px; justify-content: center; padding: 24px 0; }
.lobby-main { display: contents; }
.lobby-video { grid-area: video; position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100dvh - 330px) * 16 / 9)); min-width: min(100%, 360px); justify-self: center; background: #000; border-radius: 14px; overflow: hidden; }
.lobby-below { grid-area: below; }
.lobby-side { grid-area: side; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
@media (max-width: 980px) {
  .lobby { grid-template-columns: minmax(0, 1fr); grid-template-areas: "video" "below" "side"; }
  .lobby-side { max-width: 420px; justify-self: center; }
}
.lobby-video video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.camera-cover { position: absolute; inset: 0; display: grid; place-items: center; background: #2a2a2c; }
.camera-cover span { width: 84px; height: 84px; border-radius: 50%; background: #4a4a4e; color: #fff; display: grid; place-items: center; font-size: 32px; font-weight: 600; }
.lobby-name { position: absolute; top: 12px; left: 14px; color: #fff; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.lobby-toggles { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 16px; }
button.round { width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.85); color: #000; display: grid; place-items: center; }
button.round.off { background: var(--rec); color: #fff; }
button.round .icon { width: 22px; height: 22px; }
.lobby #allow { margin: 0 0 14px; }
.lobby .devices { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; column-gap: clamp(12px, 3vw, 56px); row-gap: 12px; }
.lobby .devices label { font-size: 13px; margin-bottom: 6px; }
.lobby .devices small.warn { color: var(--warn); }
.lobby .devices .meter-row { margin: 0; }
@media (max-width: 700px) { .lobby .devices { grid-template-columns: minmax(0, 1fr); } }
.lobby-side h1 { font-size: 30px; font-weight: 400; margin: 0; }
.lobby-side .hint { margin: 0; }
/* The people in the call: a darker header row, the names under it. */
.lobby-people { width: 100%; text-align: left; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.lobby-people > .hint { background: color-mix(in srgb, var(--surface-2) 70%, #000); color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 14px; }
.lobby-people .person { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.lobby-people .person:last-child { padding-bottom: 12px; }
.lobby-people .initials { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.lobby-people .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-people .icon { width: 16px; height: 16px; flex: none; }
.lobby-recording { color: var(--rec); display: flex; align-items: center; gap: 8px; margin: 0; }
button.big { font-size: 17px; padding: 12px 24px; min-width: 200px; }

.panels { display: grid; gap: 12px; }
.recording { border-top: 1px solid var(--border); padding: 10px 0; }
.recording:first-of-type { border-top: 0; }
.recording .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recording .head .title { font-weight: 600; margin-right: auto; }
.recording .files { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.recording .files li { display: flex; gap: 8px; flex-wrap: wrap; }
.recording .files .to { color: var(--text); min-width: 100px; }
.recording .files .ok { color: var(--good); }
.recording .files .fail { color: var(--rec); }
details summary { cursor: pointer; font-weight: 600; }
#log { max-height: 320px; overflow: auto; font-size: 11px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; color: var(--muted); }

dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); width: min(480px, calc(100vw - 32px)); padding: 20px; }
dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.dialog-buttons { display: flex; justify-content: flex-end; }

@media (max-width: 600px) {
  .controls .meter-row.compact { order: 10; flex-basis: 100%; }
}
.field-hint { display: block; color: var(--muted); font-size: 12px; margin: -10px 0 14px; }
