:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  background: #f5f1fc;
  color: #251d35;
  --surface: #fff;
  --accent: #614493;
  --muted: #625770;
  --line: #ded5eb;
}
body { margin: 0; }
main {
  box-sizing: border-box;
  max-width: 37rem;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.15rem max(2rem, env(safe-area-inset-bottom));
  margin: auto;
}
header { display: flex; align-items: center; gap: .85rem; margin: .4rem 0 1.55rem; }
.portrait { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 19px; }
h1 { font-size: clamp(1.25rem, 5.4vw, 2rem); line-height: 1.2; margin: 0 0 .4rem; }
h2 { font-size: 1.15rem; margin: 0 0 .3rem; }
p { color: var(--muted); }
#connection { font-size: .875rem; margin: 0; }
#connection[data-online="true"] { color: #256448; }
nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; background: #e9e1f4; padding: .25rem; border-radius: .95rem; margin-bottom: 1rem; }
nav button { background: transparent; color: #48375f; padding-inline: .25rem; }
nav button[aria-current] { background: var(--surface); color: #392459; box-shadow: 0 1px 3px #38235129; }
section, form {
  display: grid;
  gap: .7rem;
  background: var(--surface);
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  margin-bottom: .85rem;
}
section p { margin: 0 0 .15rem; }
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"], [type="range"]), select, textarea {
  box-sizing: border-box; min-width: 0; max-width: 100%; border: 1px solid #c7b9da;
  border-radius: .65rem; padding: .6rem; background: #fbf9fe; color: inherit;
}
button { min-height: 44px; background: var(--accent); color: #fff; border: 0; border-radius: .68rem; padding: .5rem .8rem; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button.secondary { background: #eee6f7; color: #432963; }
:focus-visible { outline: 3px solid #7353a9; outline-offset: 3px; }
.buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: .5rem; }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); }
input[type="range"] { width: 100%; min-height: 44px; margin: 0; }
.volume-label { display: flex; justify-content: space-between; gap: .5rem; }
output { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--accent); }
.details { margin: 0; }
.details div { display: flex; justify-content: space-between; gap: .65rem; padding: .65rem 0; border-bottom: 1px solid #eee8f6; }
.details div:last-child { border: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; }
.hint, #install-help { font-size: .875rem; color: var(--muted); }
#install-help { padding: .35rem .4rem; }
#install-help summary { cursor: pointer; }
.feedback { position: sticky; bottom: max(.5rem, env(safe-area-inset-bottom)); background: #fdf9ff; border: 1px solid var(--line); border-radius: .8rem; padding: .75rem; margin: .75rem 0; box-shadow: 0 2px 8px #38235119; }
.feedback:empty { display: none; }
#picture { width: min(100%, 18rem); border-radius: .6rem; }
audio { width: 100%; }
[hidden] { display: none !important; }
