:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --ink: #1c1b1a;
  --muted: #6f6b66;
  --line: #e2ded8;
  --accent: #b8532e;
  --ok: #2f7a4f;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px 16px 60px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 620px;
  margin-inline: auto;
}

h1 {
  font-size: 22px;
  margin: 0 0 2px;
}

h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 26px 0 10px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
}

.goal {
  color: var(--muted);
  margin: 0 0 18px;
}

.task-text {
  font-size: 19px;
  margin: 0;
}

.streak {
  display: inline-block;
  background: #fff2e9;
  border: 1px solid #f0cdb8;
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 14px;
}

button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

button[disabled] {
  opacity: 0.4;
  cursor: default;
}

button.record {
  background: var(--accent);
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

audio {
  width: 100%;
  margin-top: 12px;
}

textarea,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'] {
  font: inherit;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

#status {
  margin-top: 12px;
  min-height: 22px;
  font-size: 15px;
}

#status.ok {
  color: var(--ok);
}

#status.err {
  color: var(--accent);
}

.day {
  border-left: 3px solid var(--line);
  padding: 4px 0 4px 12px;
  margin-bottom: 14px;
}

.day.submitted {
  border-left-color: #c7b48d;
}

.day.feedback-ready {
  border-left-color: var(--ok);
}

.day .date {
  font-size: 13px;
  color: var(--muted);
}

.day .feedback {
  background: #f0f6f2;
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
}

.timer {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.hidden {
  display: none;
}

/* ---- PracticeTwin additions ---- */

.chip {
  display: inline-block;
  background: #eef2f6;
  border: 1px solid #d6dde4;
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 14px;
}

button.star {
  background: #fff;
  color: #cfc8bf;
  border: 1px solid var(--line);
  font-size: 22px;
  padding: 6px 12px;
}

button.star.on {
  color: var(--accent);
  border-color: #f0cdb8;
}

button.sticker {
  font-size: 20px;
  padding: 6px 12px;
}

button.sticker.on {
  border-color: #f0cdb8;
  background: #fff2e9;
}

.sticker-row {
  margin-top: 10px;
}

#studio-row {
  justify-content: space-between;
  margin-bottom: 6px;
}

button.sample {
  text-align: left;
  font-size: 14px;
  white-space: normal;
  flex: 1 1 240px;
}

.student-row.at-risk {
  background: #fff7f4;
}

.risk {
  color: var(--accent);
  font-size: 14px;
  margin-top: 4px;
}

.task-card {
  padding: 12px;
  margin-bottom: 8px;
}

.task-card input[type='number'] {
  width: 80px;
}

.submission .draft-box {
  min-height: 60px;
}

canvas {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 8px;
}

label.row {
  cursor: pointer;
}

label.row input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

/* ---- Phase 1b: plan row, paywall, reminder ---- */

.plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.plan-row p {
  margin: 0;
}

input.short {
  max-width: 180px;
}

/* `.hidden { display: none }` is declared earlier in this file, so a later single-class rule
   with its own `display` silently beats it — an overlay that is "hidden" then covers the whole
   page and eats every click (including the sign-in button). The compound selector is what makes
   hiding win. */
.overlay.hidden {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.paywall-card {
  max-width: 420px;
  margin: 0;
}

/* Read-only is what an expired trial looks like: everything still visible, nothing writable. */
body[data-access='read-only'] textarea,
body[data-access='read-only'] #student-list button {
  opacity: 0.6;
}

.reminder-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

input[type='time'] {
  font: inherit;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
