:root {
  --bg: #f6f3ff; --card: #fff; --ink: #24213a; --muted: #6f6a8a;
  --accent: #7c4dff; --star: #ffb300; --danger: #d93a3a; --radius: 16px;
  font-family: system-ui, "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
main { max-width: 720px; margin-inline: auto; padding: 12px; }
h1, h2 { margin-block: 0 8px; }
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: var(--accent); }
nav a, nav button.link { color: #fff; text-decoration: none; font-weight: 600; }
nav form { margin-inline-start: auto; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-block-end: 12px; box-shadow: 0 2px 8px #0000000d; }
.muted { color: var(--muted); }
button { font: inherit; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; }
button.link { background: none; color: var(--accent); padding: 0; }
button.danger, .danger { color: var(--danger); }
input, select { font: inherit; padding: 8px; border: 1px solid #ccc; border-radius: 8px; }
.wide { width: 100%; }
form p { margin-block: 0 12px; }
form ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; border-block-end: 1px solid #eee; }
.item.off { opacity: .5; }
.actions { display: flex; gap: 12px; align-items: center; }
.grid-wrap { overflow-x: auto; }
.grid { border-collapse: collapse; width: 100%; text-align: center; }
.grid th, .grid td { padding: 4px 2px; font-size: 13px; }
.grid tr > th:first-child { text-align: start; white-space: nowrap; padding-inline-end: 8px; }
.grid th.today { color: var(--accent); }
.cell { display: inline-block; width: 40px; height: 40px; font-size: 24px; line-height: 40px; padding: 0; background: #f1effa; color: #bbb; border-radius: 10px; }
.cell.on { color: var(--star); background: #fff6d6; }
.cell.locked { opacity: .35; }

/* Kid tablet page */
body.kid { font-size: 20px; }
.kid main { max-width: 900px; }
.kid h1 { font-size: 34px; text-align: center; }
.tasks { list-style: none; padding: 0; margin: 0; }
.tasks li { display: flex; align-items: center; gap: 14px; padding: 12px; font-size: 24px; border-block-end: 1px solid #eee; }
.tasks .s { font-size: 36px; color: #ccc; }
.tasks .s.on { color: var(--star); }
.progress { height: 22px; background: #eee; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--star), #ff7a00); }
.stats { display: flex; justify-content: space-around; text-align: center; margin-block-start: 12px; }
.stats b { display: block; font-size: 36px; }
.wheel-box { position: relative; width: min(80vw, 480px); margin: 12px auto; }
.wheel-box canvas { width: 100%; height: auto; display: block; transition: transform 4.5s cubic-bezier(.17,.67,.2,1); }
.pointer { position: absolute; inset-block-start: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0;
  border-inline: 18px solid transparent; border-block-start: 34px solid var(--danger); z-index: 1; }
#spin { display: block; margin: 12px auto; font-size: 28px; padding: 14px 48px; border-radius: 99px; }
#result { text-align: center; font-size: 30px; font-weight: 700; min-height: 1.5em; }
