/* Colours and type follow the studio's Wix site (rhythmdw.com): its teal #21ADA8,
   white space, and light geometric capitals. The site's Avenir / Brandon Grotesque
   are licensed fonts, so Jost (free, Google Fonts) stands in for both. */
:root {
  --bg: #f2fbfa;
  --card: #ffffff;
  --ink: #0b3a38;
  --muted: #4f6e6c;
  --line: #cfeceb;
  --teal: #21ada8;         /* the studio's accent */
  --brand: #167370;        /* deeper teal from their palette: readable white text on buttons */
  --brand-ink: #ffffff;
  --ok: #167370;
  --ok-soft: #ccf5f4;
  --warn-soft: #fff4e0;
  --warn-ink: #7a4f00;
  --venmo: #008cff;
  --radius: 6px;
  --shadow: 0 4px 18px rgba(11, 58, 56, 0.07);
  --display: "Jost", "Avenir Next", Avenir, "Century Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #082826;
    --card: #0e3533;
    --ink: #e9f8f7;
    --muted: #9cc4c1;
    --line: #1d4c49;
    --teal: #40dad5;
    --brand: #21ada8;
    --brand-ink: #04201f;
    --ok: #7fe7e3;
    --ok-soft: #164745;
    --warn-soft: #3a2c12;
    --warn-ink: #f3c46b;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 var(--display);
  font-weight: 400;
  min-height: 100vh;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
.top {
  text-align: center;
  padding: calc(18px + env(safe-area-inset-top)) 0 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 15px;
  color: var(--ink);
}
.top::after {  /* a short teal rule under the name, like the site's teal panels */
  content: ""; display: block; width: 36px; height: 3px;
  margin: 10px auto 0; background: var(--teal);
}
.logo { display: block; width: 190px; max-width: 60%; height: auto; margin: 0 auto; }
@media (prefers-color-scheme: dark) { .logo { filter: invert(1); } }  /* black logo → white */
/* With the logo showing, the name stays for screen readers and the tab title only. */
.top:not(.nologo) #studio {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.nologo .logo { display: none; }
.envbadge {
  display: inline-block; margin-top: 8px; line-height: 1.4; /* below the logo, not over it */
  padding: 2px 7px; border-radius: 6px;
  background: var(--warn-soft); color: var(--warn-ink); letter-spacing: 0.04em;
}
main { max-width: 440px; margin: 0 auto; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  padding: 26px 22px;
  margin: 8px 0 14px;
}
.center { text-align: center; }
h1 {
  font-size: 27px; line-height: 1.2; margin: 6px 0 8px;
  font-weight: 300; text-transform: uppercase; letter-spacing: 0.04em;
}
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

label { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
input {
  width: 100%;
  font: inherit;
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
input:focus { outline: none; border-color: var(--teal); }

.btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--brand-ink);
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: 0.6; }
.btn.secondary { background: transparent; color: var(--brand); border: 1.5px solid var(--teal); }
@media (prefers-color-scheme: dark) { .btn.secondary { color: var(--teal); } }
.btn.venmo { background: var(--venmo); color: #fff; letter-spacing: 0.02em; text-transform: none; font-weight: 600; }
.btn + .btn { margin-top: 10px; }
.linkish {
  background: none; border: 0; padding: 4px; font: inherit; font-size: 14px;
  color: var(--muted); text-decoration: underline; cursor: pointer;
}

.error { background: var(--warn-soft); color: var(--warn-ink); border-radius: 12px; padding: 10px 12px; font-size: 15px; margin-top: 12px; }

.check {
  width: 92px; height: 92px; margin: 2px auto 8px;
  border-radius: 50%; background: var(--ok-soft);
  display: grid; place-items: center;
  animation: pop 0.35s ease-out both;
}
.check svg { width: 52px; height: 52px; }
.check path {
  fill: none; stroke: var(--ok); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 70; stroke-dashoffset: 70;
  animation: draw 0.4s 0.2s ease-out forwards;
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.klass { font-size: 18px; font-weight: 500; margin-bottom: 2px; }
.acct {
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--bg); text-align: left; font-size: 16px;
}
.acct b { font-weight: 700; }
.acct .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.acct .amount { font-size: 24px; font-weight: 500; }
.paid { color: var(--ok); font-weight: 700; }

.acct hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

.klasses { list-style: none; padding: 0; margin: 4px 0 0; text-align: left; }
.klasses li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.klasses li:last-child { border-bottom: 0; }
.klasses .klass { margin: 0; }

.picks { margin-top: 12px; }
.pick {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 0; padding: 14px; border-radius: var(--radius);
  border: 1.5px solid var(--line); font-size: 17px; cursor: pointer;
}
.pick:has(input:checked:not(:disabled)) { border-color: var(--teal); background: var(--bg); }
.pick input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--brand); }
.pick .pname { flex: 1; }
.pick .time { font-weight: 600; color: var(--muted); }
.pick.done { cursor: default; opacity: 0.7; }
.pick.done .time { color: var(--ok); }

.spinner {
  width: 36px; height: 36px; margin: 18px auto;
  border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.foot { text-align: center; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .check, .check path, .spinner { animation-duration: 0.01s; }
}

/* Preview-mode toolbar (mock.js only) */
.mockbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #222; color: #eee; font-size: 13px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; justify-content: center;
}
.mockbar b { color: #ffd166; margin-right: 4px; }
.mockbar select, .mockbar button {
  font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px;
  border: 1px solid #555; background: #333; color: #eee; cursor: pointer;
}
body.mock { padding-bottom: 120px; }
