/* Builders Radio — evening palette: deep ink instead of bright navy, warm parchment text instead of pure white,
   gold only for what you can press or what's playing. Calm for long reading on a phone at night. */
:root {
  --bg: #0b0e1c;          /* page: near-black with a navy hint */
  --surface: #121628;     /* cards */
  --surface-2: #181d33;   /* raised: player bar, pop-ups */
  --input: #0f1324;
  --line: rgba(232, 226, 212, .08);
  --line-strong: rgba(232, 226, 212, .16);
  --ink: #e6e0d3;         /* main text: warm off-white, no glare */
  --ink-2: #c8c2b5;
  --muted: #8e92a6;
  --gold: #e8ac3e;        /* softer amber */
  --gold-soft: #efc777;
  --navy: #0b0e1c;        /* text on gold buttons */
  --navy-2: var(--surface);
  --danger: #f09080;
  --radius: 16px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-family: var(--body);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; padding-bottom: 104px; font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--gold-soft); text-underline-offset: 3px; }
p { margin: 0 0 10px; }
::selection { background: rgba(232,172,62,.3); }
.top { position: sticky; top: 0; z-index: 5; background: rgba(11,14,28,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }
.top nav { display: flex; gap: 14px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--gold-soft); }
main { max-width: 560px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
h1, h2 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 10px; color: var(--ink); text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: 27px; } h2 { font-size: 19px; margin-top: 32px; color: var(--ink-2); }
.muted { color: var(--muted); }
.hero { text-align: center; padding: 28px 0 8px; }
.tagline { color: var(--gold-soft); font-family: var(--display); font-style: italic; font-weight: 400; margin: 0 0 26px; letter-spacing: .01em; }
.play-big { width: 156px; height: 156px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy); font-size: 52px; cursor: pointer; box-shadow: 0 0 0 10px rgba(232,172,62,.08), 0 14px 44px rgba(232,172,62,.18); display: grid; place-items: center; margin: 0 auto; }
.play-big:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 3px; }
.now { margin-top: 18px; min-height: 48px; }
.now strong { display: block; font-size: 18px; }
.chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 14px; color: var(--ink-2); background: transparent; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-soft); background: rgba(232,172,62,.08); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.card .when { color: var(--gold); font-weight: 600; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 15px; }
label.check { grid-template-columns: 22px 1fr; align-items: start; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=number], textarea {
  width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--ink); font: inherit; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gold); margin-top: 3px; }
textarea { min-height: 120px; resize: vertical; }
.btn { display: inline-block; text-align: center; border: 0; border-radius: 12px; padding: 12px 18px; letter-spacing: .01em; font: inherit; font-weight: 600; cursor: pointer; background: var(--gold); color: var(--navy); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold-soft); border: 1px solid var(--line-strong); }
.btn.ghost:hover { border-color: var(--gold); }
.btn[disabled] { opacity: .5; cursor: wait; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; }
.price { font-size: 32px; font-family: var(--display); color: var(--gold); }
.player { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--surface-2); border-top: 1px solid var(--line); }
.player button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy); font-size: 18px; cursor: pointer; flex: none; }
.player .np { display: grid; min-width: 0; }
.player .np strong, .player .np span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .np span { color: var(--muted); font-size: 13px; }
.live-dot { margin-left: auto; background: #c8453b; color: #fbeee8; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 92px; max-width: 528px; margin: 0 auto; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); padding: 12px 14px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.install { display: flex; gap: 12px; align-items: center; }
.install img { border-radius: 10px; }
.small { font-size: 13px; }
@media (prefers-reduced-motion: no-preference) { .play-big { transition: transform .15s; } .play-big:active { transform: scale(.96); } }
/* studio */
select.sel { width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--ink); font: inherit; }
select.sel[multiple] { min-height: 110px; }
input[type=file], input[type=date], input[type=url] { width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--ink); font: inherit; }
.clock { font: 600 28px/1.2 ui-monospace, Menlo, monospace; margin: 12px 0 6px; }
.clock.warn { color: var(--danger); }
.meter { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s linear; }
.script { background: rgba(232,172,62,.08); border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 8px; }
.slot { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.slot label.inline { display: flex; gap: 6px; align-items: center; }
.grid { display: grid; gap: 12px; }
/* on-demand */
.od-row { margin-top: 8px; }
.od-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.od-play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold); cursor: pointer; }
.od-text { display: grid; gap: 4px; min-width: 0; }
.parts { display: flex; gap: 6px; flex-wrap: wrap; }
.parts .chip { padding: 3px 10px; font-size: 13px; }
.cat-nav { justify-content: flex-start; margin-top: 20px; }
.highlight { border-color: rgba(232,172,62,.4); }
.return-card { position: fixed; left: 16px; right: 16px; bottom: 88px; max-width: 528px; margin: 0 auto; z-index: 5; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
/* engagement */
.prompt-card { position: fixed; left: 16px; right: 16px; bottom: 88px; max-width: 528px; margin: 0 auto; z-index: 6; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: grid; gap: 10px; animation: slideup .25s ease-out; }
.prompt-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.prompt-card .x, .link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }
.link { text-decoration: underline; justify-self: start; padding: 0; }
.scale { display: flex; flex-wrap: wrap; gap: 6px; }
.scale .chip { min-width: 38px; justify-content: center; }
.testimony { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--navy-2); border-radius: 8px; }
.testimony p { margin: 0 0 6px; font-family: var(--display); font-style: italic; }
li.me { color: var(--gold); font-weight: 600; }
@keyframes slideup { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .prompt-card { animation: none; } }
/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--navy-2); border: 1px solid var(--line); border-left: 5px solid #888; border-radius: 12px; padding: 10px 12px; }
.kpi.green { border-left-color: #3fbf7f; } .kpi.amber { border-left-color: var(--gold); } .kpi.red { border-left-color: #ff6b5b; }
.kpi-v { font: 700 24px/1.2 Georgia, serif; }
.src { font: 600 11px/1 system-ui; text-transform: uppercase; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; vertical-align: middle; }
.src.measured { background: rgba(63,191,127,.15); color: #7fe0ae; } .src.asked { background: rgba(232,172,62,.15); color: var(--gold-soft); }
.tbl { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
h3 { font-size: 16px; margin: 18px 0 4px; }

/* Songs: likes, playlists, sharing */
.np-line { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.heart, .song-actions .icon { background: transparent; border: 0; color: var(--gold); font-size: 22px; line-height: 1; cursor: pointer; padding: 6px; min-width: 40px; min-height: 40px; }
.heart[aria-pressed="true"] { color: var(--gold); }
.song-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-shrink: 0; }
.song-actions .icon { color: var(--muted); font-size: 20px; }
.list-link { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--ink); }
input[type=search] { width: 100%; margin: 12px 0; }

/* Progress, badges, leaderboards, live sessions */
.strip { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 14px auto 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink); text-decoration: none; max-width: 100%; }
.strip .done { color: var(--gold); }
.np-scripture { margin: 10px auto 0; max-width: 34em; font-family: var(--display); font-style: italic; color: var(--ink); font-size: 15px; line-height: 1.45; }
.np-scripture cite { display: block; font-style: normal; color: var(--gold); font-size: 13px; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; display: grid; gap: 2px; }
.stat b { font-size: 22px; color: var(--gold); }
.stat span { font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin: 8px 0 2px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 999px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 4px; opacity: .72; }
.badge.earned { opacity: 1; border-color: var(--gold); background: rgba(232,172,62,.06); }
.badge .icon, .celebrate .icon { font-size: 28px; }
.invite .code { font-size: 26px; letter-spacing: 4px; font-weight: 700; color: var(--gold); margin: 8px 0; }
.board { padding-left: 22px; }
.board li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.board li.me { color: var(--gold); }
.earn { color: var(--muted); padding-left: 20px; }
.announce { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.announce img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.live-hero { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; margin-bottom: 12px; }
.celebrate { text-align: center; }
.now { display: grid; justify-items: center; gap: 2px; }

/* Landing background: navy with gold glow, the logo's arch and keystone, faint sound bars (on-brand, ~2 KB) */
.hero { position: relative; isolation: isolate; padding-top: 28px; padding-bottom: 8px; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: -24px -16px 0; background: url("/icons/bg-hero.svg") center top / cover no-repeat; border-radius: 0 0 28px 28px;
  -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.google-box { display: grid; justify-items: center; gap: 6px; margin: 8px 0 4px; }
.google-box:empty { display: none; }
.or { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.countdown { font-variant-numeric: tabular-nums; color: var(--gold-soft); font-weight: 600; margin: 4px 0 8px; }
.recorder { display: grid; gap: 8px; margin: 6px 0 10px; } .recorder audio { width: 100%; }

/* Calm reading: long text a touch dimmer than headings; tables and lists breathe. */
.card p, .card li { color: var(--ink-2); }
.muted, .card .muted { color: var(--muted); }
ul, ol { padding-left: 20px; }
li { margin: 4px 0; }
.od-item { border-color: var(--line) !important; }
.player strong { font-weight: 600; }
button.link { background: none; border: 0; padding: 0; color: var(--gold-soft); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
footer, .foot { color: var(--muted); }
/* When people listen */
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 110px; margin: 12px 0 2px; }
.hbar { height: 100%; display: flex; align-items: flex-end; }
.hbar span { display: block; width: 100%; background: rgba(239,199,119,.35); border-radius: 3px 3px 0 0; }
.hbar.top span { background: var(--gold); }
.hticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); margin: 0 6px 10px; }
.hticks span { position: absolute; transform: translateX(-50%); }
.wdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; margin-bottom: 8px; }
.wdays div { display: grid; font-variant-numeric: tabular-nums; }
.wdays b { color: var(--ink); } .wdays span { font-size: 12px; color: var(--muted); }

/* Add songs from this phone */
.upload-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.upload-list .up { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 0.95rem; }
.upload-list .up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.upload-list .up-state { flex: none; opacity: 0.8; }
.upload-list .up.done .up-state { color: #9fd49a; opacity: 1; }
.upload-list .up.failed .up-state { color: #f2a08f; opacity: 1; white-space: normal; text-align: right; max-width: 55%; }
label.check { display: flex; gap: 10px; align-items: flex-start; }

/* Songs: browse by language / singer, collection header */
.chips.wrap { flex-wrap: wrap; overflow: visible; justify-content: flex-start; }
.browse-h { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; margin: 18px 0 8px; font-weight: 600; }
.collection-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 10px; }
