/* Vocal Finder — warm studio theme: a practice room at golden hour.
 * Deep warm browns, amber light, cream ink. Serif display headings,
 * a piano-roll motif in the header rule. */
:root {
  --bg: #171310;
  --panel: #221a14;
  --panel2: #2b211a;
  --ink: #f3e6d3;
  --muted: #bfae94;
  --faint: #8a7965;
  --amber: #e8a33d;
  --ember: #c65a2e;
  --sage: #9db38a;
  --rose: #d98a7e;
  --line: #3a2d22;
  --gold-grad: linear-gradient(135deg, #2a1c14 0%, #3d2317 55%, #59331c 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 860px; margin: 0 auto; padding: 0 14px 48px; }
header#topbar {
  padding: 22px 6px 12px;
  background: var(--gold-grad);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 18px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
header#topbar::after {
  /* piano-roll motif: a row of key stripes along the header's foot */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
  background: repeating-linear-gradient(90deg, #f3e6d3 0 14px, #241a12 14px 17px, #f3e6d3 17px 31px, #241a12 31px 34px);
  opacity: 0.16;
}
.brand { font-family: Georgia, "Iowan Old Style", serif; font-size: 30px; letter-spacing: 0.4px; }
.brand-mark { filter: sepia(0.4); }
.brand-sub { color: var(--muted); font-size: 13px; margin-top: 2px; font-style: italic; font-family: Georgia, serif; }
nav#tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
nav#tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer;
}
.tab.active { background: var(--amber); border-color: var(--amber); color: #241708; font-weight: 700; }
.view { padding-top: 10px; }
.hidden { display: none !important; }
h1, h2, h3 { font-family: Georgia, "Iowan Old Style", serif; font-weight: 600; }
h2 { font-size: 22px; margin: 8px 0 6px; }
h3 { font-size: 17px; margin: 14px 0 6px; color: var(--amber); }
p { line-height: 1.5; color: var(--ink); }
.small { font-size: 13px; color: var(--muted); }
.faint { color: var(--faint); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin: 12px 0;
}
.card.warm { background: var(--panel2); }
button.btn {
  background: var(--amber); color: #241708; border: none; border-radius: 12px;
  padding: 11px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
}
button.btn.ghost { background: transparent; color: var(--amber); border: 1px solid var(--amber); }
button.btn.ember { background: var(--ember); color: #fff5ea; }
button.btn:disabled { opacity: 0.45; cursor: default; }
button.chip {
  background: var(--panel2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; margin: 3px;
}
button.chip.sel { background: var(--amber); color: #241708; border-color: var(--amber); font-weight: 700; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; }
input[type="text"], input[type="password"], select {
  background: #171310; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 15px;
}
canvas.roll, canvas.chart, canvas.trace {
  width: 100%; background: #120d0a; border: 1px solid var(--line); border-radius: 14px; display: block;
}
.big-note { font-family: Georgia, serif; font-size: 44px; color: var(--amber); line-height: 1; }
.cents-meter { font-size: 15px; color: var(--muted); }
.cents-meter .on { color: var(--sage); font-weight: 700; }
.verdict { border-radius: 14px; padding: 14px 16px; margin: 10px 0; border: 1px solid var(--line); }
.verdict.fits { background: #232b1c; border-color: #46543a; }
.verdict.strained { background: #33270f; border-color: #6b551f; }
.verdict.transpose { background: #2e1d16; border-color: #6e3d22; }
.verdict .vkind { font-family: Georgia, serif; font-size: 20px; }
.rangebar { position: relative; height: 54px; margin: 10px 0 4px; }
.songitem { padding: 10px 0; border-bottom: 1px solid var(--line); }
.songitem:last-child { border-bottom: none; }
.badge {
  display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); vertical-align: middle;
}
.badge.fits { color: var(--sage); border-color: #46543a; }
.badge.strained { color: var(--amber); border-color: #6b551f; }
.badge.transpose { color: var(--rose); border-color: #6e3d22; }
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #f3e6d3; color: #241708; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,0.5); z-index: 50;
}
.stepdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin: 0 3px; }
.stepdot.done { background: var(--sage); }
.stepdot.now { background: var(--amber); }
.piano { display: flex; position: relative; height: 150px; user-select: none; margin: 8px 0; }
.piano .wk {
  flex: 1; background: linear-gradient(#f7efdd, #e8dcc2); border: 1px solid #241a12;
  border-radius: 0 0 6px 6px; position: relative; cursor: pointer;
}
.piano .wk.inband { background: linear-gradient(#f3d9a4, #e8c88a); }
.piano .wk.picked { outline: 3px solid var(--ember); z-index: 2; }
.piano .bk {
  position: absolute; top: 0; width: 62%; height: 58%; left: 70%;
  background: #241a12; border-radius: 0 0 5px 5px; z-index: 3; cursor: pointer;
}
.piano .bk.inband { background: #4a2c14; }
.piano .bk.picked { outline: 3px solid var(--ember); }
.piano .klabel { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: #6b5836; pointer-events: none; }
.kbd-hint { font-size: 12px; color: var(--faint); }
.progressline { height: 8px; background: #120d0a; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progressline > div { height: 100%; background: var(--amber); }
table.kv { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.kv td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
table.kv td:first-child { color: var(--muted); width: 46%; }

/* ---------- one-time passcode setup sheet ---------- */
.setup-backdrop { position: fixed; inset: 0; background: rgba(10,7,5,.72); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.setup-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; max-width: 420px; width: 100%; padding: 22px; }
.setup-card h3 { margin: 0 0 6px; font-family: Georgia, "Iowan Old Style", serif; }
.setup-card label { display: block; font-size: 13px; color: var(--muted); margin-top: 12px; }
.setup-card input { width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.setup-note { color: var(--rose); font-size: 13px; margin: 10px 0 0; }
.setup-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
