:root {
  color-scheme: light;
  --page: #eef2ef;
  --card: #fff;
  --ink: #192821;
  --muted: #53645b;
  --border: #dbe4de;
  --green: #215841;
  --soft: #edf5f0;
  --danger: #9d3541;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; background: var(--page); color: var(--ink); }
main { width: min(100%, 51rem); margin: auto; padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.masthead { display: flex; align-items: center; gap: .75rem; padding: .65rem 0 1.15rem; }
.masthead img { border-radius: .85rem; }
h1, h2 { margin: 0; letter-spacing: -.04em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.17rem; }
.mode { margin-left: auto; color: var(--muted); font-size: .86rem; text-align: right; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 1.05rem; margin-bottom: 1rem; }
.call { padding: 1.05rem; }
.call-head, .journal-head { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.call-head { flex-wrap: wrap; }
.status { display: flex; align-items: center; gap: .54rem; font-weight: 650; }
.status::before { content: ''; display: inline-block; width: .58rem; height: .58rem; border-radius: 50%; background: #85948c; flex-shrink: 0; }
.status[data-tone=ready]::before { background: #288357; }
.status[data-tone=busy]::before { background: #a87524; }
.status[data-tone=error]::before { background: var(--danger); }
.audio-mode { color: var(--muted); display: flex; align-items: center; gap: .4rem; font-size: .86rem; }
button, select, input { font: inherit; }
button, select { min-height: 2.65rem; padding: .5rem .8rem; border-radius: .66rem; border: 1px solid var(--border); background: var(--soft); color: var(--ink); }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .58; }
button.primary { background: var(--green); color: #fff; border-color: var(--green); }
button.danger { color: var(--danger); background: #fff2f3; border-color: #f3d9dd; }
:focus-visible { outline: 2px solid #4a886c; outline-offset: 2px; }
.actions, .invite { display: flex; gap: .55rem; margin-top: 1rem; flex-wrap: wrap; }
.invite { flex-wrap: nowrap; }
.invite input { padding: .45rem .65rem; border: 1px solid var(--border); border-radius: .66rem; color: var(--muted); background: #fff; min-width: 0; flex: 1; }
.meters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0 0; }
.meters div { background: #f5f8f5; border: 1px solid #e7ede7; padding: .7rem; border-radius: .7rem; min-width: 0; }
dt { font-size: .8rem; color: var(--muted); }
dd { margin: .24rem 0 0; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
dd small { font-size: .74rem; font-weight: 500; color: var(--muted); }
.journal { overflow: hidden; }
.journal-head { padding: .72rem 1.05rem; }
.journal-head button { font-size: .85rem; min-height: 2.3rem; }
pre { margin: 0; background: #183027; color: #e6f3eb; padding: .85rem 1.05rem; min-height: 13rem; max-height: 42vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: .78rem/1.65 ui-monospace, Menlo, monospace; }
@media (max-width: 36rem) {
  .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions button { flex-grow: 1; }
}
@media (max-width: 23rem) {
  .call { padding: .75rem; }
  h1 { font-size: 1.4rem; }
  .masthead { gap: .45rem; }
}
