/* MultiVoice 網頁版樣式：電競霓虹紫（ui-ux-pro-max「Gaming」配色）
   深藍黑底、紫色主色、玫瑰紅表示關閉／危險、霓虹綠表示正在說話。
   桌面版 crates/desktop/src/style.rs 使用同一套顏色。 */
:root {
  color-scheme: dark;
  --bg: #0f0f23;
  --bg-glow: rgb(124 58 237 / 0.22);
  --panel: #1e1c35;
  --panel-2: #27273b;
  --sunken: #0b0b1a;
  --line: #34305a;
  --line-strong: #6d3fd8;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --primary: #7c3aed;
  --primary-hi: #a78bfa;     /* 深色底上的紫色文字（對比 7:1 以上） */
  --on-primary: #fff;
  --rose: #f43f5e;
  --rose-hi: #fb7185;
  --green: #22c55e;
  --amber: #f59e0b;
  --grad: linear-gradient(135deg, #7c3aed 0%, #a21caf 100%);
  --ring: rgb(167 139 250 / 0.55);
  --hi: rgb(255 255 255 / 0.05);
  --shadow: 0 12px 32px rgb(0 0 0 / 0.35);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 16px;
  --radius-sm: 10px;
  --dock-h: 150px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f5f3ff;
    --bg-glow: rgb(124 58 237 / 0.12);
    --panel: #ffffff;
    --panel-2: #f1eefb;
    --sunken: #e9e5f7;
    --line: #ddd6fe;
    --line-strong: #8b5cf6;
    --fg: #1e1b4b;
    --muted: #5b5675;
    --primary: #6d28d9;
    --primary-hi: #6d28d9;
    --rose: #e11d48;
    --rose-hi: #e11d48;
    --green: #16a34a;
    --amber: #b45309;
    --grad: linear-gradient(135deg, #6d28d9 0%, #a21caf 100%);
    --ring: rgb(109 40 217 / 0.4);
    --hi: rgb(255 255 255 / 0.8);
    --shadow: 0 8px 24px rgb(46 16 101 / 0.08);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(800px 420px at 50% -180px, var(--bg-glow), transparent 70%),
    radial-gradient(520px 360px at 100% 0, rgb(162 28 175 / 0.08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--rose-hi); margin: 0 0 12px; font-size: 0.9rem; }
.warn { color: var(--amber); margin: 0; }
.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.view {
  max-width: 640px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow);
  padding: 18px;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.3em;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--primary-hi);
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap;
}
.badge:empty { display: none; }

/* ---------------------------------------------------------------- 加入畫面 */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 0 4px; }
.hero .logo {
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 10px 40px color-mix(in srgb, var(--primary) 55%, transparent);
  margin-bottom: 6px;
}
.hero h1 {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--fg) 35%, var(--primary-hi));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 0; color: var(--muted); }
.hero .badge { margin-top: 6px; }

.notes h2 { margin-bottom: 10px; }
.notes ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.notes li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 0.92rem; }
.notes li b { color: var(--fg); }
.notes li .ic {
  width: 34px; height: 34px; padding: 7px; border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary-hi);
}

a.download {
  display: flex; align-items: center; gap: 14px;
  color: var(--fg); text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
a.download > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.download-ic {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad); color: #fff;
}
a.download .arrow { color: var(--primary-hi); transition: transform 0.2s var(--ease); }
a.download:hover { border-color: var(--line-strong); }
a.download:hover .arrow { transform: translateX(3px); }
a.download:active { transform: scale(0.99); }
a.download:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------------------------------------------------------------- 輸入框 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field.compact { margin: 0; }
.field > span { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.field b { color: var(--fg); font-weight: 700; }
input, textarea, select, button { font: inherit; color: inherit; }
input:not([type]), textarea, select {
  font-size: 16px; /* 16px 以上：iPhone 的 Safari 點到字比較小的輸入框會自動放大畫面 */
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  width: 100%;
  min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
input:not([type])::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input:not([type]):hover, textarea:hover, select:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
input:not([type]):focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}
textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

/* 開關：勾選框畫成可以滑動的開關 */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--sunken);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
  transition: transform 0.22s var(--ease), background-color 0.2s;
}
input[type="checkbox"]:checked {
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 45%, transparent);
}
input[type="checkbox"]:checked::before { transform: translateX(18px); background: #fff; }
input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.check { display: flex; align-items: center; gap: 12px; margin: 12px 0; cursor: pointer; min-height: 32px; }
/* 屬於上一個選項的子選項（降噪底下的強力降噪） */
.sub { margin-left: 30px; }
p.sub { margin-top: -6px; }
.check:has(input:disabled) { opacity: 0.5; cursor: default; }

/* 滑桿：已填滿的部分是漸層（--fill 由 app.js 設定） */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --fill: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--grad) 0 / var(--fill) 100% no-repeat, var(--sunken);
  box-shadow: inset 0 0 0 1px var(--line);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent);
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
}
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb {
  transform: scale(1.12);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 28%, transparent);
}
input[type="range"]:focus { outline: none; }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--sunken); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--grad); }
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* ---------------------------------------------------------------- 按鈕 */
button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  min-height: 44px;
  font-weight: 600;
  transition: transform 0.12s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, filter 0.2s;
}
button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  background-color: color-mix(in srgb, var(--primary) 12%, var(--panel-2));
}
button:active:not(:disabled) { transform: scale(0.97); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary {
  overflow: hidden;
  background: var(--grad);
  border-color: transparent;
  color: var(--on-primary);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 40%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.2);
}
/* 滑過時一道光澤掃過 */
button.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgb(255 255 255 / 0.25) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}
button.primary:hover:not(:disabled) {
  background: var(--grad);
  border-color: transparent;
  filter: brightness(1.1);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 55%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.2);
}
button.primary:hover:not(:disabled)::after { transform: translateX(110%); }
button.big { width: 100%; min-height: 52px; font-size: 1.05rem; border-radius: 12px; }
button.ghost { background: transparent; }
button.danger { color: var(--rose-hi); border-color: color-mix(in srgb, var(--rose) 45%, var(--line)); }
button.danger:hover:not(:disabled) {
  border-color: var(--rose);
  background-color: color-mix(in srgb, var(--rose) 14%, transparent);
}
button.icon-only { width: 44px; padding: 0; }
.small-btn { min-height: 32px; padding: 4px 10px; font-size: 0.85rem; border-radius: 8px; }
.row { display: flex; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- 房間 */
.view.room { padding-bottom: calc(var(--dock-h) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 5;
  margin: calc(-1 * max(16px, env(safe-area-inset-top))) -16px 0;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.status { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; min-width: 0; }
.status span:last-child { overflow-wrap: anywhere; line-height: 1.3; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--green); animation: pulse 2.2s ease-out infinite; }
.dot.warn { background: var(--amber); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px transparent; }
}
.top-actions { display: flex; gap: 8px; flex: none; }
#invite-btn.copied { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, var(--line)); }
.hint {
  margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 0.85rem;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  color: var(--muted);
}

/* 底部操作列 */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgb(0 0 0 / 0.25);
}
.dock-inner {
  max-width: 640px; margin: 0 auto;
  padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 10px;
}
.mic-line { display: flex; align-items: center; gap: 12px; }
.mic-line .meter { flex: 1; }
#mic-text { margin: 0; flex: 0 1 auto; max-width: 60%; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mic-warning { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
#meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  transition: width 80ms linear;
}
#meter-fill.voiced { background: linear-gradient(90deg, color-mix(in srgb, var(--green) 65%, #000), var(--green)); box-shadow: 0 0 10px color-mix(in srgb, var(--green) 60%, transparent); }
#meter-gate { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber); }

.toggle { flex: 1; min-height: 52px; border-radius: 14px; font-size: 1rem; }
.tg-ic { position: relative; display: inline-grid; }
.tg-ic .ic { grid-area: 1 / 1; width: 22px; height: 22px; }
.tg-ic .slash { display: none; }
.toggle[aria-pressed="true"] .slash { display: block; }
.toggle[aria-pressed="false"] { color: var(--fg); }
.toggle[aria-pressed="true"],
.toggle[aria-pressed="true"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--rose) 18%, var(--panel-2));
  border-color: var(--rose);
  color: var(--rose-hi);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rose) 25%, transparent);
}

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
#channels { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow);
  padding: 14px 16px;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.card.joined {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 12%, var(--panel)), var(--panel) 70%);
}
.card.talking {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green) inset, 0 0 24px color-mix(in srgb, var(--green) 28%, transparent);
  animation: talk-glow 1.4s ease-in-out infinite alternate;
}
@keyframes talk-glow {
  to { box-shadow: 0 0 0 1px var(--green) inset, 0 0 34px color-mix(in srgb, var(--green) 42%, transparent); }
}
.card-head { display: flex; align-items: center; gap: 10px; }
.ch-ic {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--panel-2); color: var(--muted);
  transition: background-color 0.25s, color 0.25s;
}
.ch-ic .ic { width: 18px; height: 18px; }
.card.joined .ch-ic { background: var(--grad); color: #fff; }
.card.talking .ch-ic { background: var(--green); color: #fff; }
.card-head .ch-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.card-head .join { min-width: 72px; }
.card:not(.joined) .join {
  background: color-mix(in srgb, var(--primary) 20%, var(--panel-2));
  border-color: color-mix(in srgb, var(--primary) 60%, var(--line));
  color: var(--fg);
}
.card:not(.joined) .join:hover { background: color-mix(in srgb, var(--primary) 32%, var(--panel-2)); border-color: var(--primary); }
.card.joined .join { background: transparent; color: var(--muted); }

/* 成員清單預設折疊（人多時卡片才不會很長）；折疊時旁邊列出誰在說話 */
.members-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 32px; }
.members-bar:has(.members-toggle[hidden]):has(.speaking-summary:empty) { display: none; }
.speaking-summary { color: var(--green); font-weight: 600; overflow-wrap: anywhere; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.chips:empty { display: none; }
.card:not(.show-members) .chips { display: none; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px 4px 8px; font-size: 0.85rem; min-height: 30px;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.chips li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; transition: background-color 0.2s, box-shadow 0.2s; }
.chips li.me { border-color: color-mix(in srgb, var(--primary) 60%, var(--line)); }
.chips li.speaking {
  background: color-mix(in srgb, var(--green) 22%, var(--panel-2));
  border-color: var(--green);
  box-shadow: 0 0 12px color-mix(in srgb, var(--green) 40%, transparent);
}
.chips li.speaking::before { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 35%, transparent); }
.chips li .tag { color: var(--muted); }
.chips li[data-idx] { cursor: context-menu; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

.ch-controls { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.card:not(.joined) .ch-controls { display: none; }
.ctl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: end; }
@media (max-width: 420px) { .ctl-grid { grid-template-columns: 1fr; } }

.ptt {
  display: none;
  width: 100%;
  min-height: 92px;
  margin-top: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: 2px dashed color-mix(in srgb, var(--primary) 55%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--panel-2));
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ptt .ic { width: 26px; height: 26px; }
.card.mode-ptt .ptt { display: flex; }
.ptt.held,
.ptt.held:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 65%, #000));
  border: 2px solid var(--green);
  color: #fff;
  transform: scale(0.985);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent), 0 10px 30px color-mix(in srgb, var(--green) 40%, transparent);
}

.new-channel { display: flex; gap: 8px; margin-top: 12px; }
.new-channel input { flex: 1; }
.new-channel button { flex: none; }

/* 音訊設定 */
.settings { padding: 0; }
.settings summary {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; min-height: 52px;
  cursor: pointer; font-weight: 700; list-style: none;
  border-radius: var(--radius);
}
.settings summary::-webkit-details-marker { display: none; }
.settings summary .ic { color: var(--primary-hi); }
.settings summary .chev { margin-left: auto; color: var(--muted); transition: transform 0.2s var(--ease); }
.settings[open] summary .chev { transform: rotate(180deg); }
.settings summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.settings > :not(summary) { margin-left: 18px; margin-right: 18px; }
.settings > :last-child { margin-bottom: 18px; }
.settings .sub { margin-left: 48px; }

/* 成員音量（底部彈出） */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(5 5 20 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
  animation: fade-in 0.2s ease-out;
}
.sheet {
  width: min(640px, 100%);
  border-radius: 20px 20px 0 0;
  border-bottom: 0;
  padding: 10px 18px max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: sheet-up 0.28s var(--ease);
}
.grabber { align-self: center; width: 40px; height: 4px; border-radius: 999px; background: var(--line); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet .row { gap: 12px; }
.sheet .row button { flex: 1; }
.vol-val-big { min-width: 4.5em; text-align: right; font-size: 1.1rem; color: var(--primary-hi); }

.log { list-style: none; padding: 0 4px; margin: 0; font-size: 0.82rem; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
