/* Carryover Kids: one stylesheet, from the design tokens in docs/designs.
   Phone first; tablet from 700px; desktop from 1100px.
   The practice colour comes from /theme/<practice>.css. */

:root {
  --brand: #0e6e68;
  --brand-soft: #e3f1ef;
  --brand-ink: #0a4f4b;
  --ground: #f4f6f8;
  --card: #ffffff;
  --line: #dde3e8;
  --line-soft: #e9edf0;
  --ink: #16242c;
  --ink-2: #33434c;
  --muted: #4e5d66;
  --easy: #1d4f8c;
  --easy-bg: #e2ecf8;
  --easy-line: #9dbde3;
  --tricky: #9a3a0b;
  --tricky-bg: #fcebdd;
  --tricky-line: #f0b48d;
  --video: #22323a;
  --radius: 16px;
  /* Nunito is self-hosted later; until then, rounded system fonts. */
  --font-display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.15; }
p, ol, ul { margin: 0; }
a { color: var(--brand); }
svg { flex: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }

/* Header and footer */
.site { background: var(--card); border-bottom: 1px solid var(--line); }
.site-inner { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.spacer { flex: 1; }
.logo {
  width: 36px; height: 36px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--brand); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
}
.logo-small { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.site-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; }

/* Carryover Kids' own brand: fixed colours, separate from each practice's --brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: #0e6e68; text-decoration: none; }
.brand-mark { display: block; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.staff-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.staff-id { display: flex; flex-direction: column; line-height: 1.15; }
.brand-eyebrow { font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #0e6e68; }
.made-with { margin: 0 0 4px; }
.made-with a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.made-with a:hover span, .made-with a:focus-visible span { text-decoration: underline; }
.made-with strong { color: #0e6e68; font-family: var(--font-display); font-weight: 800; }
.made-with svg { border-radius: 5px; }
.print-made-with { display: flex; align-items: center; justify-content: center; gap: 6px; }
.print-made-with svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.back {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  margin-left: -6px; padding-right: 8px;
  color: var(--brand); font-weight: 700; text-decoration: none;
}
.site-foot {
  margin-top: auto; padding-block: 20px 28px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; color: var(--muted);
}
.with-icon { display: flex; gap: 8px; align-items: flex-start; }
.with-icon svg { width: 16px; height: 16px; margin-top: 2px; }

/* Shared pieces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-tight { display: flex; flex-direction: column; gap: 4px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); }
.display { font-size: 30px; }
.h2 { font-size: 20px; }
.sub { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.muted { font-size: 14px; color: var(--muted); }
.label { font-size: 13px; font-weight: 700; color: var(--muted); }
.center { text-align: center; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 20px;
  border: 2px solid transparent; border-radius: 14px;
  font: inherit; font-size: 17px; font-weight: 700; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-done { background: var(--brand-soft); color: var(--brand-ink); cursor: default; }
.btn-soft { min-height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-size: 16px; }
.btn-easy { background: var(--easy-bg); color: var(--easy); border-color: var(--easy-line); }
.btn-tricky { background: var(--tricky-bg); color: var(--tricky); border-color: var(--tricky-line); }

.chip { align-self: flex-start; margin-top: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip-easy { background: var(--easy-bg); color: var(--easy); }
.chip-tricky { background: var(--tricky-bg); color: var(--tricky); }

/* Homework page: what to do today first, progress after, Done fixed at the bottom */
.hw {
  display: grid; gap: 16px; padding-block: 20px 24px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "today" "note" "acts" "side";
}
.hw-today { grid-area: today; }
.hw-note { grid-area: note; display: flex; gap: 12px; align-items: flex-start; }
.hw-acts { grid-area: acts; }
.hw-side { grid-area: side; display: flex; flex-direction: column; gap: 16px; }
.lead { font-size: 17px; color: var(--ink-2); line-height: 1.4; }
.note-avatar {
  width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink);
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
}
.hw-week { display: flex; flex-direction: column; gap: 14px; }
.hw-week .chart { padding: 0; border: 0; gap: 10px 2px; }
.hw-week .dot { width: 38px; height: 38px; }
.hw-week .dot svg { width: 22px; height: 22px; }
.week-plant { display: flex; gap: 12px; align-items: center; }
.week-plant .plant { width: 54px; height: 70px; flex: none; }
.hw-week .welldone { padding: 10px 12px; border-radius: 12px; }
.hw-week .welldone-icon { width: 32px; height: 32px; }
.remind-btn { white-space: nowrap; }
.remind-btn svg { flex: none; }
.done-bar {
  position: sticky; bottom: 0; z-index: 5;
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(22, 36, 44, 0.06);
}
.done-inner { max-width: 640px; display: flex; flex-direction: column; gap: 2px; }
.done-inner .btn { width: 100%; }
.plant { width: 84px; height: 108px; }

.chart {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px 4px;
  padding: 12px 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dot { width: 42px; height: 42px; border-radius: 50%; background: var(--line-soft); display: flex; align-items: center; justify-content: center; }
.day-today { color: var(--brand); font-weight: 800; }
.day-today .dot { background: #fff; border: 2px solid var(--brand); }
.day-done .dot { background: var(--brand-soft); }
.st-star { background: #fff6d6 !important; }
.st-sun { background: #ffebd2 !important; }
.st-heart { background: #fde4ee !important; }
.st-moon { background: #e7e7fb !important; }
.st-flower { background: #e3f5e6 !important; }
.st-bolt { background: #dcebfb !important; }

.welldone { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--brand-soft); font-size: 14px; line-height: 1.4; }
.welldone-icon { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--brand); }
.welldone-title { font-size: 15px; font-weight: 700; color: var(--brand-ink); }
.note-text { margin-top: 6px; font-size: 16px; }

.hw-acts h2 { margin: 8px 0 12px; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.act { display: flex; flex-direction: column; gap: 14px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.act-link { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.thumb { width: 68px; height: 120px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--video); }
.play { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; }
.act-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.act-kicker { font-size: 12px; font-weight: 700; color: var(--muted); }
.act-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.2; }
.act-meta { font-size: 14px; color: var(--muted); }
.act-chevron { color: var(--muted); }
.act-preview, .act-open { display: none; }

/* Activity page */
.activity {
  display: grid; gap: 20px; padding-block: 16px 8px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "video" "body";
}
.activity-head { grid-area: head; display: flex; flex-direction: column; gap: 4px; }
.activity-body { grid-area: body; display: flex; flex-direction: column; gap: 20px; }
.video {
  grid-area: video; aspect-ratio: 9 / 16; margin-inline: -20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--video); color: #fff;
}
.video-note { padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); font-size: 14px; font-weight: 700; }
.steps { list-style: none; padding: 0; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); line-height: 1.35; }
.step-current { border: 2px solid var(--brand); background: var(--brand-soft); }
.step-num { width: 28px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--line-soft); font-size: 14px; font-weight: 800; }
.step-current .step-num { background: var(--brand); color: #fff; }
.tips { display: grid; gap: 12px; }
.tips h3 { margin-bottom: 2px; font-family: var(--font-body); font-size: 15px; font-weight: 700; }
.tips p { font-size: 15px; color: var(--ink-2); }
.tips-fold { padding: 0; }
.tips-fold summary {
  min-height: 56px; padding: 8px 16px; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.tips-fold summary::-webkit-details-marker { display: none; }
.tips-fold summary > svg { flex: none; color: var(--muted); transform: rotate(90deg); }
.tips-fold[open] summary > svg { transform: rotate(-90deg); }
.tips-title { font-size: 16px; font-weight: 700; }
.tips-fold .tips { padding: 0 16px 16px; }
.act-end { display: flex; flex-direction: column; gap: 14px; }
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rate-q { font-size: 16px; font-weight: 700; }
.rate-buttons { display: flex; gap: 8px; }
.rate-buttons .btn { min-height: 44px; min-width: 84px; padding: 0 16px; border-radius: 999px; font-size: 15px; }
.message { padding-block: 32px; }
.message ul { padding-left: 20px; }

/* Tablet */
@media (min-width: 700px) {
  .wrap { padding-inline: 32px; }
  .display { font-size: 36px; }
  .hw { gap: 20px; padding-block: 28px 32px; }
  .hw-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .plant { width: 90px; height: 116px; }
  .act-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .act { padding: 16px; }
  .thumb { width: 120px; height: 213px; border-radius: 12px; }
  .play { width: 44px; height: 44px; }
  .act-title { font-size: 20px; }
  .act-chevron { display: none; }
  .act-preview { display: block; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
  .act-open { display: flex; margin-top: auto; }
  .video { margin-inline: 0; border-radius: 18px; }
}

/* Video beside the steps once there's room */
@media (min-width: 900px) {
  .activity {
    grid-template-columns: 400px minmax(0, 1fr); column-gap: 28px; padding-block: 24px 8px;
    grid-template-areas: "video head" "video body";
    grid-template-rows: min-content 1fr;
    align-items: start;
  }
}

/* Desktop */
@media (min-width: 1100px) {
  .hw {
    grid-template-columns: minmax(0, 1fr) 360px; column-gap: 32px; row-gap: 16px; padding-block: 36px 32px;
    grid-template-areas: "today side" "note side" "acts side";
    grid-template-rows: min-content min-content 1fr;
  }
  .hw-side { display: flex; position: sticky; top: 20px; align-self: start; }
  .display { font-size: 32px; }
  .act-list { grid-template-columns: minmax(0, 1fr); }
  .act { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 24px; row-gap: 10px; padding: 20px; }
  .act-link { display: contents; }
  .thumb { grid-row: 1 / span 3; width: 150px; height: 267px; }
  .act-body { grid-column: 2; }
  .act-preview { grid-column: 2; font-size: 15px; line-height: 1.6; }
  .act-open { grid-column: 2; justify-self: start; padding-inline: 22px; }
  .activity { grid-template-columns: 440px minmax(0, 1fr); column-gap: 40px; padding-block: 32px 8px; }
}

/* ---- Staff pages ---- */
.narrow { max-width: 520px; padding-block: 40px; }
.staff-main { padding-block: 28px 40px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.staff-bar { flex-wrap: wrap; row-gap: 0; }
.staff-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.staff-nav a, .link-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--ink-2); font: inherit; font-weight: 600; text-decoration: none;
}
.staff-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.link-button { border: 0; background: none; cursor: pointer; }
.staff-nav a:hover, .link-button:hover { color: var(--brand); }
.inline-form { display: inline; margin: 0; }

.field-label { font-size: 15px; font-weight: 700; }
.field {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1px solid #a9b5bd; border-radius: 12px; background: #fff;
  font: inherit; font-size: 17px; color: var(--ink);
}
.field:focus { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .form-grid { grid-template-columns: 1fr 1.3fr 0.9fr auto; align-items: end; }
}

.notice { padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.notice-ok { background: var(--brand-soft); color: var(--brand-ink); }
.notice-error { background: var(--tricky-bg); color: var(--tricky); }

.btn-small { min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; background: #fff; color: var(--ink-2); border: 1px solid #c5ced5; }
.btn-small.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-danger { color: #a61e1e; border-color: #e6b3b3; }
.table-box { overflow-x: auto; margin-top: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .inline-form + .inline-form { margin-left: 6px; }
.row-actions .btn { display: inline-flex; }
.table-note { margin-top: 12px; }
.plain-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 699px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .table td { padding: 2px 0; border: 0; }
  .table td:first-child { font-weight: 700; }
  .row-actions { text-align: left; padding-top: 8px !important; white-space: normal; }
}

/* ---- Video ---- */
.thumb { position: relative; overflow: hidden; }
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .play { position: relative; }
.player { display: block; width: 100%; height: auto; background: var(--video); }
.video-real { aspect-ratio: auto; display: block; background: var(--video); }
.video-real .player { max-height: 80vh; object-fit: contain; }
.video-size { padding: 8px 20px; background: var(--card); font-size: 13px; color: var(--muted); }
.steps-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.step-link { padding: 0; }
.step-button {
  width: 100%; min-height: 56px; padding: 10px 12px; display: flex; gap: 12px; align-items: center;
  border: 0; border-radius: 12px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.step-text { flex: 1; }
.step-time { font-size: 13px; font-weight: 700; color: var(--muted); }
.step-current .step-time { color: var(--brand-ink); }
@media (min-width: 700px) {
  .video-real { border-radius: 18px; overflow: hidden; }
  .video-size { padding-inline: 16px; }
}

/* ---- Staff: activities ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head .btn { min-height: 48px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; margin-top: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-2); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--brand-ink); border-bottom-color: var(--brand); }
.list { list-style: none; margin: 0; padding: 0 16px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-main { min-width: 0; }
.list-title { font-weight: 700; font-size: 17px; }
.list-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--brand-soft); color: var(--brand-ink); }
.badge-wait { background: var(--easy-bg); color: var(--easy); }
.badge-bad { background: var(--tricky-bg); color: var(--tricky); }
.badge-none { background: var(--line-soft); color: var(--muted); }

.editor { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1000px) { .editor { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-row-small { grid-template-columns: repeat(2, minmax(0, 120px)); }
.inline-label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
.step-input { display: flex; align-items: center; gap: 10px; }
.field-area { min-height: 90px; padding: 12px 14px; line-height: 1.4; resize: vertical; }
.field-file { padding: 10px; min-height: auto; font-size: 15px; }
.field-time { width: 80px; flex: none; text-align: center; }
.field-error { color: var(--tricky); font-size: 14px; font-weight: 600; }
.field[aria-invalid="true"] { border-color: var(--tricky); }
.upload-progress { width: 100%; height: 12px; accent-color: var(--brand); }
.player-staff { max-height: 70vh; border-radius: 12px; object-fit: contain; }
.numbered { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.mark-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.mark-text { flex: 1 1 180px; font-size: 15px; }

/* ---- Send homework ---- */
.send legend.h2 { margin-bottom: 4px; }
.pick-list { display: grid; gap: 8px; }
@media (min-width: 700px) { .pick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pick {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff;
}
.pick:has(input:checked) { border: 2px solid var(--brand); background: var(--brand-soft); padding: 11px 13px; }
.pick input, .radio input, .day-pick input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.pick-body { display: flex; flex-direction: column; gap: 2px; }
.pick-title { font-weight: 700; }
.radio-list { display: grid; gap: 4px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; flex-wrap: wrap; }
.radio-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.custom { padding: 14px; border-radius: 12px; background: var(--ground); }
.radio-list:not(:has(input[value="custom"]:checked)) + .custom { display: none; }
.day-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.day-pick { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.field-num { width: 64px; text-align: center; }
.field-date { width: auto; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- Share (QR on screen) ---- */
.share-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .share-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.share-qr { align-items: center; }
.qr-big { width: min(100%, 320px); height: auto; display: block; }
.share-code { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: 3px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.button-row .btn { flex: 1 1 160px; }
.library-actions { align-items: center; }
.library-actions .btn { flex: 0 1 auto; }

/* ---- Printable A4 page ---- */
.print-toolbar { display: flex; justify-content: space-between; align-items: center; padding-block: 16px; }
.print-page {
  width: 100%; max-width: 210mm; margin: 0 auto 32px; padding: 14mm; background: #fff; color: #000;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12); font-size: 11pt; line-height: 1.4;
}
.print-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6mm; border-bottom: 1px solid #ccc; }
.print-name { margin-left: auto; display: flex; align-items: flex-end; gap: 6px; font-weight: 700; }
.print-line { display: inline-block; width: 55mm; border-bottom: 1px solid #000; height: 1em; }
.print-top { display: grid; grid-template-columns: 1fr 48mm; gap: 8mm; padding-block: 6mm; }
.print-title { font-size: 20pt; }
.print-note { padding: 3mm 4mm; border-left: 3px solid var(--brand); background: #f6f6f6; }
.print-days { display: flex; flex-wrap: wrap; gap: 3mm; margin-top: 2mm; }
.print-day { display: flex; flex-direction: column; align-items: center; gap: 1mm; font-size: 9pt; font-weight: 700; }
.print-box { width: 14mm; height: 14mm; border: 1.5px dashed #555; border-radius: 50%; }
.print-small { font-size: 9pt; color: #333; }
.print-qr { text-align: center; font-size: 10pt; }
.qr-print { width: 46mm; height: 46mm; display: block; margin: 0 auto 2mm; }
.print-activities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6mm; border-top: 1px solid #ccc; padding-top: 6mm; }
.print-activity { break-inside: avoid; }
.print-activity h2 { font-size: 13pt; margin-bottom: 2mm; }
.print-activity ol { padding-left: 5mm; display: flex; flex-direction: column; gap: 1mm; }
.print-foot { margin-top: 8mm; padding-top: 3mm; border-top: 1px solid #ccc; font-size: 8.5pt; color: #333; }
@media (max-width: 699px) {
  .print-page { padding: 16px; box-shadow: none; }
  .print-top, .print-activities { grid-template-columns: 1fr; }
}
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; display: block; min-height: 0; }
  .print-toolbar { display: none; }
  .print-page { box-shadow: none; margin: 0; max-width: none; width: 210mm; min-height: 297mm; }
  .print-top { grid-template-columns: 1fr 48mm; }
  .print-activities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Parent: messages, stickers, reminder, finish line ---- */
.hw-notice { margin-bottom: 4px; }
.small-link { font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.narrow-parent { max-width: 560px; padding-block: 24px 8px; }
.radio .field-time-input { width: auto; min-height: 44px; }
.btn.is-chosen { box-shadow: 0 0 0 3px currentColor inset; }
.prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

.finish { position: relative; align-items: center; text-align: center; overflow: hidden; padding: 24px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.finish .plant { width: 150px; height: 190px; }
.finish .chart { width: 100%; text-align: left; }
.confetti span { position: absolute; width: 10px; height: 16px; border-radius: 2px; }
.confetti span:nth-child(1) { left: 8%; top: 6%; background: #fcc419; transform: rotate(20deg); }
.confetti span:nth-child(2) { left: 20%; top: 30%; background: #d6336c; transform: rotate(-30deg); }
.confetti span:nth-child(3) { left: 12%; top: 52%; background: #1c7ed6; border-radius: 50%; width: 10px; height: 10px; }
.confetti span:nth-child(4) { right: 10%; top: 8%; background: #2f9e44; transform: rotate(-15deg); }
.confetti span:nth-child(5) { right: 22%; top: 34%; background: #e8590c; border-radius: 50%; width: 10px; height: 10px; }
.confetti span:nth-child(6) { right: 8%; top: 50%; background: #5b5bd6; transform: rotate(35deg); }
.confetti span:nth-child(7) { left: 34%; top: 4%; background: #e8590c; border-radius: 50%; width: 8px; height: 8px; }
.confetti span:nth-child(8) { right: 36%; top: 3%; background: #d6336c; transform: rotate(50deg); }
.certificate { border: 3px solid var(--brand); text-align: center; align-items: stretch; }
.certificate .stack-tight { text-align: left; }
.cert-kicker { font-size: 13px; font-weight: 800; letter-spacing: 2px; color: var(--brand); }
.cert-line { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.3; }
.cert-name { font-size: 18px; }

@media print {
  .hw-finished ~ .site-foot, .site, .hw-finished > :not(.finish-side), .finish-side > :not(.certificate) { display: none !important; }
  .hw-finished { display: block; }
  .certificate { margin: 30mm auto; max-width: 150mm; border-width: 4px; padding: 16mm; }
  .certificate [data-print], .cert-hint, .certificate .muted:first-of-type { display: none; }
  .cert-name { border: 0; border-bottom: 2px solid #000; border-radius: 0; text-align: center; font-size: 24pt; font-weight: 800; }
  .cert-line { font-size: 22pt; }
}

/* ---- The child's moment: sticker and plant ---- */
.kid { min-height: 100vh; min-height: 100dvh; background: #fff8e7; }
.kid-inner {
  max-width: 560px; min-height: 100vh; min-height: 100dvh; margin-inline: auto; box-sizing: border-box;
  padding: 12px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px;
}
.kid-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kid-back { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; color: var(--muted); text-decoration: none; }
.kid-back svg { width: 18px; height: 18px; }
.kid-pill { padding: 6px 10px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.kid-title { margin-top: 8px; text-align: center; font-size: 38px; }
.kid-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(140px, 1fr); gap: 14px; }
.kid-sticker {
  border: 0; border-radius: 28px; background: #fff; box-shadow: 0 4px 0 #f1e3bf; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 18px; font-weight: 800; color: var(--ink);
}
.kid-sticker:active { transform: translateY(2px); box-shadow: 0 2px 0 #f1e3bf; }
.kid-sticker.is-current { box-shadow: 0 0 0 4px var(--brand); }
.kid-stuck .kid-inner { align-items: center; text-align: center; padding-top: 40px; }
.kid-lead { font-size: 18px; color: var(--ink-2); }
.kid-plant { position: relative; width: 240px; }
.kid-plant .plant { width: 240px; height: 308px; }
.kid-badge {
  position: absolute; right: -6px; top: 6px; width: 92px; height: 92px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 6px 18px rgba(22, 36, 44, 0.12);
}
.kid-count { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.kid-actions { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.kid-actions .small-link { color: var(--muted); }
.leaf-new { transform-box: fill-box; animation: leaf-grow 0.9s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.leaf-left { transform-origin: 100% 100%; }
.leaf-right { transform-origin: 0% 100%; }
@keyframes leaf-grow { from { transform: scale(0); } to { transform: scale(1); } }
@media (min-width: 700px) { .kid-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .leaf-new { animation: none; } }
.finish-side { display: flex; flex-direction: column; gap: 18px; }

/* Tablets and up: the child's moment fills the screen, and the finish line uses two columns */
@media (min-width: 700px) {
  .kid-inner { max-width: 820px; padding: 20px 40px calc(48px + env(safe-area-inset-bottom)); gap: 24px; }
  .kid-pill { padding: 8px 14px; font-size: 14px; }
  .kid-title { margin-top: 24px; font-size: 52px; }
  .kid-grid { gap: 24px; grid-auto-rows: minmax(220px, 1fr); max-height: 760px; }
  .kid-sticker { border-radius: 36px; box-shadow: 0 6px 0 #f1e3bf; font-size: 24px; gap: 12px; }
  .kid-sticker svg { width: 128px; height: 128px; }
  .kid-stuck .kid-inner { padding-top: 96px; gap: 22px; }
  .kid-lead { font-size: 22px; }
  .kid-plant { width: 340px; }
  .kid-plant .plant { width: 340px; height: 436px; }
  .kid-badge { right: -20px; top: 10px; width: 128px; height: 128px; }
  .kid-badge svg { width: 84px; height: 84px; }
  .kid-count { font-size: 20px; }
  .kid-actions { width: 480px; }
  .kid-actions .btn { min-height: 60px; font-size: 20px; }
  .hw-finished.narrow-parent {
    max-width: 900px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 28px 8px;
  }
  .hw-finished > .hw-acts { grid-column: 1 / -1; }
  .hw-finished .finish .plant { width: 200px; height: 256px; }
}

/* ---- Growing friends: picker, idle movement, changes between stages ---- */
.kid-friends { flex: 1; display: grid; grid-auto-rows: minmax(120px, 1fr); gap: 14px; }
.kid-friend {
  border: 0; border-radius: 28px; background: #fff; box-shadow: 0 4px 0 #f1e3bf; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; font: inherit; color: var(--ink); text-align: left;
}
.kid-friend:active { transform: translateY(2px); box-shadow: 0 2px 0 #f1e3bf; }
.kid-friend .plant { width: 120px; height: 132px; flex: none; }
.kid-friend-text { display: flex; flex-direction: column; gap: 4px; }
.kid-friend-name { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.kid-friend-blurb { font-size: 15px; color: var(--muted); }
.kid-friend .idle-wobble { animation-delay: .4s; }
.kid-friend:nth-child(2) .idle-wobble { animation-delay: 1.3s; }

.idle-wobble, .idle-breathe, .flap, .flap-slow, .swish, .twinkle, .idle-waddle, .paddle, .paddle-back, .sway, .t-from, .t-to, .t-puff, .t-burst { transform-box: fill-box; }
.idle-wobble { transform-origin: 50% 100%; animation: wobble 2.6s ease-in-out infinite; }
.idle-glow { animation: glow 2.4s ease-in-out infinite; }
.idle-breathe { transform-origin: 50% 100%; animation: breathe 2.6s ease-in-out infinite; }
.idle-bob { animation: bob 2.2s ease-in-out infinite; }
.idle-waddle { transform-origin: 50% 100%; animation: waddle 1.4s ease-in-out infinite; }
.flap { transform-origin: 0% 100%; animation: flap .9s ease-in-out infinite; }
.flap-slow { transform-origin: 0% 100%; animation: flap 2.6s ease-in-out infinite; }
.swish { transform-origin: 0% 50%; animation: swish 2.2s ease-in-out infinite; }
.paddle { transform-origin: 0% 50%; animation: paddle 1.6s ease-in-out infinite; }
.paddle-back { transform-origin: 100% 0%; animation: paddle 1.6s .4s ease-in-out infinite; }
.sway { transform-origin: 50% 100%; animation: sway 3s ease-in-out infinite; }
.sway-late { animation-delay: 1.2s; }
.twinkle { transform-origin: 50% 50%; animation: twinkle 1.8s ease-in-out infinite; }
.twinkle-late { animation-delay: .9s; }
.bubbles { animation: rise-up 3s ease-in infinite; }
.fish { animation: swim-by 7s linear infinite; }
.wave { animation: glow 2s ease-in-out infinite; }
@keyframes wobble { 0%, 55%, 100% { transform: rotate(0); } 65% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } 85% { transform: rotate(-3deg); } 92% { transform: rotate(2deg); } }
@keyframes glow { 0%, 100% { opacity: .35; } 50% { opacity: .75; } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes waddle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateX(2px); } }
@keyframes flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-16deg); } }
@keyframes swish { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
@keyframes paddle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(.6); opacity: .4; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes rise-up { 0% { transform: translateY(20px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }
@keyframes swim-by { 0% { transform: translateX(-60px); } 100% { transform: translateX(200px); } }

.idle-hop, .flutter-l, .flutter-r, .swing, .flicker, .steam { transform-box: fill-box; }
.idle-hop { animation: hop 1.3s ease-in-out infinite; }
.flutter-l { transform-origin: 100% 50%; animation: flutter .5s ease-in-out infinite; }
.flutter-r { transform-origin: 0% 50%; animation: flutter .5s ease-in-out infinite; }
.swing { transform-origin: 50% 0%; animation: swing 3s ease-in-out infinite; }
.flicker { transform-origin: 50% 0%; animation: flicker .18s ease-in-out infinite alternate; }
.zzz { animation: rise-up 2.6s ease-in infinite; }
.steam { transform-origin: 50% 100%; animation: steam 2.4s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } 60% { transform: translateY(-12px); } }
@keyframes flutter { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.55); } }
@keyframes swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes flicker { from { transform: scaleY(.9); } to { transform: scaleY(1.15); } }
@keyframes steam { 0%, 100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } }

/* Stage changes on the Stuck on! screen, about 2 seconds */
.t-from { transform-origin: 50% 100%; animation: shake 1.1s ease-in-out both, vanish .2s 1.1s ease-in both; }
.change-fly .t-from { animation: crouch .9s ease-in-out both, vanish .2s .9s ease-in both; }
.t-to { transform-origin: 50% 100%; animation: pop .75s 1.2s cubic-bezier(.34, 1.56, .64, 1) both; }
.change-arrive .t-to { animation: drop-in .8s .2s cubic-bezier(.34, 1.56, .64, 1) both; }
.change-fly .t-to { animation: rise .9s 1s cubic-bezier(.25, 1.4, .5, 1) both; }
.t-fade-out { animation: vanish .4s 1s ease-in both; }
.t-fade-in { animation: appear .4s 1.1s ease-out both; }
.t-puff { transform-origin: 50% 50%; animation: puff .9s .8s ease-out both; }
.t-burst { transform-origin: 50% 50%; animation: burst .9s 1.45s ease-out both; }
.change-arrive .t-burst { animation-delay: .8s; }
@keyframes shake { 0%, 20% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 40% { transform: rotate(7deg); } 50% { transform: rotate(-8deg); } 60% { transform: rotate(8deg); } 70% { transform: rotate(-5deg); } 80% { transform: rotate(5deg) scale(1.04); } 100% { transform: rotate(0) scale(1.06); } }
@keyframes crouch { 0% { transform: scale(1, 1); } 60% { transform: scale(1.06, .86); } 100% { transform: scale(.96, 1.08) translateY(-10px); } }
@keyframes vanish { to { opacity: 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes drop-in { 0% { transform: translateY(-120px); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes rise { 0% { transform: translateY(80px) scale(.7); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes puff { 0% { transform: scale(.2); opacity: 0; } 35% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes burst { 0% { transform: scale(0); opacity: 0; } 40% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .idle-wobble, .idle-glow, .idle-breathe, .idle-bob, .idle-waddle, .flap, .flap-slow, .swish, .paddle, .paddle-back, .sway, .twinkle, .bubbles, .fish, .wave, .idle-hop, .flutter-l, .flutter-r, .swing, .flicker, .zzz, .steam { animation: none; }
  .t-from, .t-fade-out { animation: vanish .3s both; }
  .t-to, .t-fade-in, .change-arrive .t-to, .change-fly .t-to { animation: appear .4s .2s both; }
  .t-puff, .t-burst { animation: none; opacity: 0; }
}

.share-tip { background: var(--brand-soft); color: var(--ink-2); font-size: 14px; font-weight: 400; line-height: 1.5; }

/* Other homework this phone has opened (remember.js) */
.home-main { padding-block: 28px 48px; }
.home-intro { max-width: 40rem; }
.home-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.home-mine:not([hidden]) { display: flex; flex-direction: column; gap: 10px; }
.home-code-row { display: flex; gap: 10px; flex-wrap: wrap; }
.home-code-row .field { flex: 1 1 12rem; text-transform: uppercase; letter-spacing: 0.08em; }
.home-foot { padding-block: 8px 32px; }
.other-hw:not([hidden]) { display: flex; flex-direction: column; gap: 10px; padding-block: 4px 24px; }
.other-hw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.other-hw-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; text-decoration: none; }
.other-hw-title { font-weight: 700; color: var(--brand-ink); }
@media (min-width: 700px) { .other-hw-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Client records */
.staff-main > .small-link { align-self: flex-start; justify-content: flex-start; }
.narrow-form { max-width: 640px; }
@media (max-width: 699px) {
  .clients-table td:nth-child(2)::before { content: "With "; color: var(--muted); }
  .clients-table td:nth-child(3)::before { content: "Homework sets: "; color: var(--muted); }
  .clients-table td:nth-child(4)::before { content: "Latest: "; color: var(--muted); }
}

/* ---- Dashboard ---- */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile-number { font-family: var(--font-display); font-weight: 800; font-size: 32px; margin-top: 4px; }
.tile-of { font-size: 18px; color: var(--muted); }
.tile-text { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-top: 6px; line-height: 1.3; }
.code-link { font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.used { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots span { width: 10px; height: 10px; border-radius: 3px; }
.dots .dot-done { background: var(--brand); }
.dots .dot-missed { background: #c5ced5; }
.dots .dot-future { background: var(--line-soft); box-shadow: inset 0 0 0 1px var(--line); }
.dots .dots-more { width: auto; height: auto; font-size: 12px; color: var(--muted); }
.badge-running { background: var(--brand-soft); color: var(--brand-ink); }
.badge-finished { background: var(--line-soft); color: var(--ink-2); }
.badge-waiting { background: var(--easy-bg); color: var(--easy); }
.btn-welldone { color: var(--brand); border-color: var(--brand); gap: 6px; }
.btn-welldone svg { width: 16px; height: 16px; }
.sent-note { display: block; font-size: 12px; margin-top: 4px; }
.muted-cell { color: var(--ink-2); }
@media (max-width: 699px) {
  .dashboard-table td { padding: 3px 0; }
  .dashboard-table td:nth-child(2)::before { content: "Sent "; color: var(--muted); }
  .dashboard-table td:nth-child(3)::before { content: "By "; color: var(--muted); }
  .dashboard-table td:nth-child(7)::before { content: "Tricky: "; color: var(--muted); }
}

/* ---- Word lists ---- */
.pick-wrap { display: flex; flex-direction: column; gap: 8px; }
.pick-words { padding: 0 4px 6px 38px; }
.pick-wrap:not(:has(input[type="checkbox"]:checked)) .pick-words { display: none; }
.field-words { min-height: 64px; }
.words { display: flex; flex-direction: column; gap: 8px; }
.word-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.word-list li {
  padding: 8px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink);
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.print-words { margin-top: 2mm; font-size: 10pt; }

/* ---- Library filters, kinds, guides, plain style ---- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.filter { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.filter .field { min-height: 44px; font-size: 15px; width: auto; }
.filters .btn-small { min-height: 44px; }
.badge-kind { background: var(--easy-bg); color: var(--easy); }
.badge-taught { background: var(--tricky-bg); color: var(--tricky); }
.pick-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pick-badges:empty { display: none; }
.pick-taught { margin: 0 4px 0 38px; font-size: 14px; }
.pick-wrap:not(:has(input[type="checkbox"]:checked)) .pick-taught { display: none; }
.check-row { align-items: flex-start; }
.check-row input { margin-top: 3px; }
.thumb-guide { background: var(--brand-soft); color: var(--brand); }
.thumb-guide svg { width: 36px; height: 36px; }
.guide-points { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.guide-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; line-height: 1.45; }
.guide-points svg { color: var(--brand); flex: none; margin-top: 2px; }
.chart-plain .day-done .dot { background: var(--brand); color: #fff; }
.chart-plain .dot svg { width: 20px; height: 20px; }
.finish-plain { gap: 12px; }
.filter .field-num { width: 90px; }

/* ---- Search and stars ---- */
.filter-search { flex: 1 1 220px; }
.filter-search .field { width: 100%; }
.filter-check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.filter-check input { width: 20px; height: 20px; accent-color: var(--brand); }
.filter-check svg, .pick-star svg { width: 18px; height: 18px; vertical-align: -3px; }
.list-row { align-items: center; }
.list-main { flex: 1 1 260px; }
.star-form { flex: none; }
.star-button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: none; color: #a9b5bd; cursor: pointer;
}
.star-button:hover { background: var(--line-soft); color: #b88a00; }
.pick-star { margin-right: 4px; }
.filter-more { flex: 1 1 100%; order: 3; }
.filter-more summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; color: var(--brand); }
.filter-more-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding-top: 6px; }
.filters > .btn-small { order: 2; }
.filters > .small-link { order: 4; }
.more-acts { margin-top: 4px; }
.more-acts > summary {
  cursor: pointer; min-height: 48px; display: flex; align-items: center; padding: 0 14px;
  border: 1px dashed var(--line); border-radius: 12px; font-weight: 700; color: var(--brand);
}
.more-acts[open] > summary { margin-bottom: 8px; }

/* ---- Family app (/app) ---- */
.app-account { margin-left: auto; }
.child-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 14px 4px; }
.child-tab {
  min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; text-decoration: none;
}
.child-tab[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.child-add { width: 44px; padding: 0; justify-content: center; border-style: dashed; color: var(--muted); font-size: 20px; }
.app-main { max-width: 900px; padding-block: 12px 110px; }
.app-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.app-tabs a {
  min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none;
}
.app-tabs a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
@media (min-width: 700px) {
  .app-tabs { display: flex; justify-content: center; gap: 12px; }
  .app-tabs a { flex-direction: row; gap: 8px; padding: 0 18px; font-size: 15px; }
}
.app-cards { display: grid; gap: 14px; }
@media (min-width: 700px) { .app-cards { grid-template-columns: 1fr 1fr; } }
.app-hw { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.app-hw-art .plant { width: 96px; height: 106px; }
.app-hw-body .btn { margin-top: 6px; }
.app-hw-body .h2 { margin: 0; }
.app-pill { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); }
.app-pill-ot { background: #ede7f8; color: #4b3a8c; }
.app-done { display: inline-flex; align-items: center; gap: 6px; color: #1c6b3a; font-weight: 700; }
.app-ratings { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.app-ratings .chip { margin: 0; }
.app-welldone { margin: 0; padding: 8px 12px; border-radius: 12px; background: #fff6e0; }
.app-big { margin: 0; font-size: 18px; }
.app-big strong { font-family: var(--font-display); font-size: 32px; font-weight: 800; }
.app-cal { display: grid; gap: 6px; }
.app-cal-row { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 34px)); gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.app-cal-row [role="columnheader"] { text-align: center; font-weight: 700; }
.app-day { aspect-ratio: 1; border-radius: 8px; background: var(--line-soft); }
.app-day-speech { background: #0e6e68; }
.app-day-ot { background: #6b57c9; }
.app-day-both { background: linear-gradient(135deg, #0e6e68 50%, #6b57c9 50%); }
.app-day-future { background: none; border: 1.5px dashed #c8d1d8; }
.app-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 13px; }
.app-key-speech::before, .app-key-ot::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.app-key-speech::before { background: #0e6e68; }
.app-key-ot::before { background: #6b57c9; }
.app-growing { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: #fff8e7; border-color: #f1e3bf; }
.app-friends { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.app-friend {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 12px;
  border-radius: 20px; background: #fff; box-shadow: 0 3px 0 #f1e3bf; text-align: center;
}
.app-friend .plant { width: 110px; height: 121px; }
.app-hero { display: flex; justify-content: center; gap: 8px; }
.app-hero .plant { width: 100px; height: 110px; }
.app-ticks { display: grid; gap: 8px; }
.app-ticks li { padding-left: 26px; position: relative; }
.app-ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 800; }
.app-list { padding: 4px 16px; }
.app-list li { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: 1px solid var(--line-soft); }
.app-list li:last-child { border-bottom: 0; }
.app-list-name { font-weight: 700; }
.app-found { display: grid; gap: 4px; }
.add-to-app { padding-block: 4px 12px; }
.narrow > .small-link { align-self: flex-start; justify-content: flex-start; }
.app-hw-body .button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.app-hw-body .button-row .btn { margin-top: 0; }
.admin-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-block: 4px; }
.admin-choice input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); }
.admin-nav a[aria-current="page"] { background: var(--brand); color: #fff; }
.admin-email { overflow-wrap: anywhere; }
