/* HOO — navy stage, cream text, amber = the one "do this" colour. Phone first. */
:root {
  --navy: #070F23; --navy2: #0B1730; --navy3: #122244;
  --cream: #F8EFDB; --cream-70: rgba(248, 239, 219, .7); --cream-40: rgba(248, 239, 219, .4);
  --amber: #F8B02C; --danger: #E05A5A;
  --r: 18px; --gutter: 16px; --tap: 48px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--navy); color: var(--cream);
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tap) + 48px + env(safe-area-inset-bottom));
}
a { color: inherit; }
h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; margin: 28px 0 12px; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3.day { font-size: 14px; color: var(--cream-70); margin: 18px 0 6px; font-weight: 600; }
p { margin: 0 0 12px; }
.lead { font-size: 18px; color: var(--cream-70); }
.muted { color: var(--cream-40); }
.hint { color: var(--cream-40); font-size: 15px; margin-top: 20px; }
code { font-size: 13px; color: var(--cream-70); word-break: break-all; display: block; margin-top: 6px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--gutter) 4px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: .04em; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c, var(--amber)); color: var(--navy); font-weight: 800; }
.top-nav a { display: inline-flex; min-width: var(--tap); min-height: var(--tap); align-items: center; justify-content: center; }
.page { padding: 0 var(--gutter); max-width: 720px; margin: 0 auto; }

/* The hero: one card per kid, colour rail on the left. */
.sorted h1 { margin-top: 20px; }
.kidcard { position: relative; background: var(--navy2); border-radius: var(--r); padding: 16px 16px 14px 22px; margin-bottom: 12px; overflow: hidden; }
.kidcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c, var(--amber)); }
.kidcard h2 { display: flex; align-items: center; gap: 10px; }
.calm { color: var(--cream-40); margin: 0; }

ul.plain { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: auto 64px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid rgba(248, 239, 219, .08); }
.kidcard .row { grid-template-columns: 64px 1fr; }
.row:last-child { border-bottom: 0; }
.row.off .what { text-decoration: line-through; color: var(--cream-40); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--cream)); display: inline-block; flex: none; }
.time { font-variant-numeric: tabular-nums; color: var(--cream-70); font-size: 15px; }
.what { font-weight: 600; }
.what b { color: var(--amber); font-weight: 700; }
.lock { opacity: .6; vertical-align: -1px; margin-left: 4px; }

.todo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(248, 239, 219, .08); }
.todo small { display: flex; align-items: center; gap: 8px; color: var(--cream-70); margin-top: 2px; }
.todo .dot { width: 8px; height: 8px; }
.tag { display: inline-block; background: var(--navy3); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 700; margin-right: 6px; }

.card { background: var(--navy2); border-radius: var(--r); padding: 18px; margin: 14px 0; }
.item .itemtext { font-size: 22px; font-weight: 800; line-height: 1.25; margin-bottom: 4px; letter-spacing: -.01em; }
.item .itemmeta { color: var(--amber); font-weight: 600; margin-bottom: 0; }
.btns.stack form:first-child { flex-basis: 100%; }
.btn { white-space: nowrap; }
.ask { color: var(--amber); font-weight: 600; }

.btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btns form { flex: 1 1 0; display: flex; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap);
  padding: 0 18px; border-radius: 14px; border: 2px solid var(--cream-40); background: transparent; color: var(--cream);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; width: 100%;
}
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--navy); }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; width: auto; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.saveall { margin: 6px 0 20px; }

.form label { display: block; font-weight: 600; margin: 12px 0; }
.form input, .form textarea, .form select {
  display: block; width: 100%; margin-top: 6px; min-height: var(--tap); padding: 10px 12px; border-radius: 12px;
  border: 2px solid var(--cream-40); background: var(--navy); color: var(--cream); font: inherit;
}
.form textarea { resize: vertical; }
.form label.file { border: 2px dashed var(--cream-40); border-radius: 12px; padding: 14px; text-align: center; min-height: var(--tap); cursor: pointer; }
.form label.file input { position: absolute; width: 1px; height: 1px; opacity: 0; min-height: 0; margin: 0; padding: 0; }
.form label.file.has-file { border-style: solid; border-color: var(--amber); }
.form label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.form label.check input { width: 24px; height: 24px; margin: 2px 0 0; min-height: 0; }
.bullets { padding-left: 20px; color: var(--cream-70); }
.bullets li { margin-bottom: 8px; }
.links li { margin-bottom: 14px; }

.pending { display: block; background: var(--amber); color: var(--navy); border-radius: 14px; padding: 12px 16px; margin-top: 12px; text-decoration: none; font-weight: 600; }
.toast { background: var(--navy3); border-radius: 12px; padding: 12px 16px; margin-top: 12px; }
.notice { padding: 8px 0; color: var(--cream-70); border-bottom: 1px solid rgba(248, 239, 219, .08); }

.empty { text-align: center; padding: 28px 12px; color: var(--cream-70); }
.empty img { opacity: .9; margin-bottom: 8px; }
.hero { text-align: center; padding: 40px 0 10px; }
.hero.small { padding: 16px 0 0; }
.hero h1 { font-size: 40px; letter-spacing: .08em; margin: 12px 0; }

.dock {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px; border-radius: 999px;
  background: var(--amber); color: var(--navy); font-weight: 800; text-decoration: none; font-size: 17px;
  box-shadow: 0 10px 30px rgba(7, 15, 35, .6); white-space: nowrap;
}
@media (min-width: 900px) { .dock { left: auto; right: 32px; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .kidcard { animation: rise .35s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* language picker (Frost 10-23) */
.langs { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.langs .btn { width: auto; min-width: 140px; }

/* big file button (Frost 10-23) */
.file.big { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:120px;
  border:3px dashed var(--amber); border-radius:18px; background:rgba(248,176,44,.08); cursor:pointer; text-align:center; padding:16px; }
.file.big input { position:absolute; opacity:0; width:1px; height:1px; }
.file.big span { font-size:22px; font-weight:800; color:var(--amber); }
.file.big small { opacity:.75; }
.or { text-align:center; opacity:.7; margin:14px 0 6px; }
.card.warn { border-left:5px solid var(--amber); }

.kidform { display:grid; grid-template-columns: 1fr 70px; gap:8px; margin:10px 0; }
.kidform label { display:flex; flex-direction:column; font-size:13px; opacity:.9; }
.kidform label:nth-child(3) { grid-column: 1 / -1; }
.kidform input { min-height:44px; border-radius:10px; border:2px solid var(--cream-40); background:transparent; color:inherit; padding:0 10px; font:inherit; }
.kidform .btn { grid-column: 1 / -1; justify-self:start; }

.tabs { display:flex; gap:8px; margin:6px 0 10px; }
.tab { flex:1; text-align:center; padding:10px 8px; border-radius:999px; border:2px solid var(--cream-40); color:inherit; text-decoration:none; font-weight:800; min-height:44px; }
.tab.on { background:var(--amber); border-color:var(--amber); color:var(--navy); }

/* month calendar (Frost 10-23) */
.monthbar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:4px 0 10px; }
.monthbar h1 { margin:0; font-size:24px; }
.grid7 { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.grid7.head span { text-align:center; font-size:12px; opacity:.7; font-weight:700; }
.cell { aspect-ratio:1/1; border-radius:12px; background:var(--navy2); color:inherit; text-decoration:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; }
.cell.empty { background:transparent; }
.cell b { font-size:16px; }
.cell.today { outline:2px solid var(--amber); }
.cell.sel { background:var(--amber); color:var(--navy); }
.cell .dots { display:flex; gap:3px; min-height:7px; }
.cell .dots i { width:7px; height:7px; border-radius:50%; background:var(--c); }
.cell.sel .dots i { outline:1px solid var(--navy); }

.top-nav { display:flex; align-items:center; gap:14px; }
.navcal { color:var(--cream); display:flex; }

.wrongfile { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; padding:8px 12px; border-radius:12px; background:var(--navy2); }
.toggle{display:flex;gap:.75rem;align-items:center;margin:.5rem 0}
/* Settings kids: one per block, join link wraps (was squashed into a column, Frost 10-24) */
#kids .todo { flex-direction: column; align-items: stretch; }
#kids .todo small { display: block; }
#kids .todo code { word-break: break-all; }
.toggle .btn { flex: 0 0 96px; }
.top .back { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: 4px; color: var(--cream); border-radius: 50%; }
.top .back:active { background: var(--navy3); }
#invite code { word-break: break-all; }
.kidform .check { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 8px; }
.usage { width: 100%; border-collapse: collapse; font-size: 14px; }
.usage th, .usage td { text-align: left; padding: 6px 4px; border-bottom: 1px solid rgba(248, 239, 219, .08); }
