:root, [data-theme=classique] {
  --bg: #fdf6ec;
  --card: #fff;
  --ink: #2d2a32;
  --accent: #ff7a59;
  --accent2: #4f8cff;
  --ok: #3cb371;
  --ko: #e5484d;
  --cell: 42px;
}
[data-theme=ocean] { --bg: #eaf6fb; --accent: #1c8fc4; --accent2: #3b5bdb; }
[data-theme=foret] { --bg: #eef6ea; --accent: #2f9e57; --accent2: #a0712b; }
[data-theme=bonbon] { --bg: #fff0f6; --accent: #f0569a; --accent2: #9b5de5; }
[data-theme=soleil] { --bg: #fff8db; --accent: #f08c00; --accent2: #e8590c; }
[data-theme=nuit] { --bg: #e6e4f7; --accent: #6c4fe0; --accent2: #0096c7; }
[data-theme=arcenciel] { --bg: linear-gradient(135deg, #ffe3e3, #fff3bf, #d3f9d8, #d0ebff, #e5dbff); --accent: #e64980; --accent2: #7048e8; }
[data-theme=arcenciel] body { background-attachment: fixed; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
header { text-align: center; padding: 1rem; }
h1 { margin: 0; font-size: 1.8rem; color: var(--accent); }
h2 { margin: 0 0 .8rem; text-align: center; }
h3 { margin: .2rem 0 .5rem; }
main {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1rem;
  padding: 0 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
label { display: block; font-weight: bold; margin: .8rem 0 .3rem; }
label.check { font-weight: normal; display: flex; gap: .5rem; align-items: center; }
input[type=text], textarea, select {
  width: 100%;
  font: inherit;
  padding: .5rem;
  border: 2px solid #e6dccd;
  border-radius: 10px;
}
textarea { resize: vertical; }
.row { display: flex; gap: .5rem; align-items: center; margin-top: .8rem; }
.row label { margin: 0; white-space: nowrap; }
.row .primary { flex: 1; }
button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: .55rem .9rem;
}
.primary { background: var(--accent); color: #fff; font-weight: bold; }
.primary:hover { filter: brightness(1.05); }
button:disabled { opacity: .6; cursor: wait; }
.ghost { background: #f3ede4; color: var(--ink); }
.ghost:hover { background: #ebe2d4; }
.hint { font-size: .9rem; color: #7a7280; }
.hidden { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: .8rem; }
.message { text-align: center; font-size: 1.2rem; min-height: 1.6rem; margin-bottom: .5rem; }
.message.win { color: var(--ok); font-weight: bold; }

.board { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; align-items: flex-start; }
.grid { display: grid; gap: 0; user-select: none; }
.cell {
  width: var(--cell);
  height: var(--cell);
  position: relative;
}
.cell.letter {
  background: #fff;
  border: 1.5px solid var(--ink);
  margin: -0.75px;
}
.cell.letter input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font: bold calc(var(--cell) * .55) "Trebuchet MS", sans-serif;
  text-transform: uppercase;
  color: var(--ink);
  caret-color: transparent;
  padding: 0;
  outline: none;
}
.cell .num {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: calc(var(--cell) * .26);
  font-family: sans-serif;
  pointer-events: none;
}
.cell.in-word { background: #fff1c9; }
.cell.active { background: #ffd66b; }
.cell.ok input { color: var(--ok); }
.cell.ko { background: #ffe1e1; }
.cell.ko input { color: var(--ko); }
.cell.given input { color: var(--accent2); }

.clues { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.clues > div { min-width: 220px; max-width: 340px; }
.clues ol { list-style: none; padding: 0; margin: 0; }
.clues li {
  padding: .35rem .5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: .4rem;
  align-items: baseline;
}
.clues li:hover { background: #f7f2ea; }
.clues li.active { background: #fff1c9; }
.clues li.done { text-decoration: line-through; color: #9c95a3; }
.clues .n { font-weight: bold; min-width: 1.6rem; }
.clues .len { color: #9c95a3; font-size: .85rem; white-space: nowrap; }
.speak { padding: .1rem .45rem; background: #e7efff; }
.print-only { display: none; }

.off { display: none !important; }
button:disabled { cursor: default; }
#play { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.rewards { cursor: pointer; padding: .7rem 1rem; }
.r-stats { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; font-size: 1.1rem; }
.r-stars b { display: inline-block; font-size: 1.3rem; color: #e0a100; }
.r-stars b.bump { animation: bump .5s; }
.r-bar { height: 10px; background: #f3ede4; border-radius: 99px; overflow: hidden; margin: .5rem 0 .2rem; }
.r-bar div { height: 100%; background: linear-gradient(90deg, #ffd66b, var(--accent)); transition: width .5s; }
#r-progress-label { color: #7a7280; }

.tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.tabs button { background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.06); display: flex; flex-direction: column; align-items: center; font-size: 1.4rem; flex: 1; min-width: 88px; padding: .5rem; }
.tabs button span { font-size: .8rem; }
.tabs button.active { background: var(--accent); color: #fff; }

.game { text-align: center; }
.game-empty { font-size: 1.2rem; padding: 2rem 0; }
.game-head h2 { margin-bottom: .2rem; }
.round-progress { height: 8px; background: #f3ede4; border-radius: 99px; overflow: hidden; max-width: 420px; margin: .6rem auto .3rem; }
.round-progress div { height: 100%; background: var(--accent2); transition: width .4s; }
.round-count { margin: 0 0 1rem; color: #7a7280; }
.prompt { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; align-items: center; margin-bottom: 1rem; }
.speak-big { font-size: 1.4rem; background: #e7efff; padding: .7rem 1.4rem; border-radius: 99px; }
.clue { font-style: italic; margin: 0; }
.answer { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.big-input { font: bold 1.8rem "Trebuchet MS", sans-serif; text-align: center; padding: .5rem; border: 3px solid #e6dccd; border-radius: 12px; width: min(100%, 360px); }
.big-input.good, .gap-input.good { border-color: var(--ok); color: var(--ok); }
.kbd { display: flex; flex-direction: column; gap: .3rem; margin: .8rem auto; max-width: 560px; user-select: none; touch-action: manipulation; }
.kbd-row { display: flex; gap: .25rem; justify-content: center; }
.kbd button { flex: 1 1 0; min-width: 0; max-width: 3rem; font-size: 1.25rem; padding: .55rem 0; background: #fff; border: 2px solid #e6dccd; border-radius: 8px; }
.kbd button:active { background: #ffd66b; }
.kbd .kbd-wide { flex-grow: 1.6; max-width: 4.8rem; }
.kbd .primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.kbd.upper button[data-k] { text-transform: uppercase; }
.correction p { margin: .5rem 0; }
.word-show { font: bold 2.2rem "Trebuchet MS", sans-serif; letter-spacing: .12em; margin: .4rem 0; }
.l-ok { color: var(--ink); }
.l-miss { color: var(--ko); text-decoration: underline wavy; }
.game-feedback { min-height: 3rem; margin-top: 1rem; }
.game-feedback p { font-size: 1.3rem; font-weight: bold; margin: .4rem 0; }
.fb-ok { color: var(--ok); }
.fb-ko { color: var(--accent); }

.flash-word { font: bold 3rem "Trebuchet MS", sans-serif; letter-spacing: .1em; margin: 1.5rem 0; }
.flash-bar { height: 8px; background: #f3ede4; border-radius: 99px; overflow: hidden; max-width: 300px; margin: 0 auto; }
.flash-bar div { width: 100%; height: 100%; background: var(--accent); }

.slots, .tiles { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin: .8rem 0; }
.slot, .tile { width: 3rem; height: 3.2rem; font: bold 1.7rem "Trebuchet MS", sans-serif; padding: 0; border-radius: 10px; }
.slot { background: #fff; border: 3px dashed #d8cdbd; }
.slot.fixed { border: none; background: transparent; }
.slot.locked { border-style: solid; border-color: var(--ok); color: var(--ok); }
.slot.bad { border-color: var(--ko); color: var(--ko); }
.slots.solved .slot:not(.fixed) { background: #e5f7ec; }
.tile { background: #ffd66b; box-shadow: 0 3px 0 #e0a100; }
.tile.used { visibility: hidden; }

.gap-word { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .15rem; margin: 1rem 0; }
.gap-letter { font: bold 2.2rem "Trebuchet MS", sans-serif; min-width: 1.4rem; }
.gap-input { width: 2.6rem; height: 3.2rem; font: bold 2rem "Trebuchet MS", sans-serif; text-align: center; border: 3px solid var(--accent2); border-radius: 10px; background: #f3f7ff; padding: 0; }
.gap-input.bad { border-color: var(--ko); background: #ffe1e1; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; max-width: 520px; margin: 0 auto; }
.choice { font: bold 1.6rem "Trebuchet MS", sans-serif; background: #fff; border: 3px solid #e6dccd; padding: .8rem; }
.choice:hover:not(:disabled) { border-color: var(--accent2); }
.choice.good { border-color: var(--ok); background: #e5f7ec; color: var(--ok); }
.choice.bad { border-color: var(--ko); background: #ffe1e1; color: var(--ko); text-decoration: line-through; }

.game-end .big, .rw-level .big { font-size: 4rem; }
.earned { font-size: 1.6rem; font-weight: bold; color: #e0a100; }
.rw-level { display: flex; gap: 1rem; align-items: center; justify-content: center; text-align: left; }
.levels { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1rem 0; }
.levels span { display: flex; flex-direction: column; align-items: center; font-size: 1.8rem; opacity: .3; filter: grayscale(1); }
.levels span.on { opacity: 1; filter: none; }
.levels small { font-size: .7rem; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .4rem; max-width: 560px; margin: 0 auto; }
.album span { font-size: 2rem; background: #f7f2ea; border-radius: 12px; padding: .3rem; opacity: .35; }
.album span.owned { opacity: 1; background: #fff1c9; }
.mastery { margin: 0 auto; border-collapse: collapse; text-align: left; }
.mastery td { padding: .35rem .6rem; border-bottom: 1px solid #f0e8dc; }
.mastery .w { font-weight: bold; font-size: 1.1rem; }
.reset { margin-top: 2rem; }
.reset button { font-size: .8rem; }

.popup { position: fixed; inset: 0; background: rgba(45,42,50,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.popup-box { background: #fff; border-radius: 20px; padding: 1.5rem 2rem; text-align: center; max-width: 320px; animation: pop .35s; }
.popup-icon { font-size: 4.5rem; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes bump { 50% { transform: scale(1.5); } }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }

header { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.profile-btn { background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.08); border-radius: 99px; font-weight: bold; }
.profile-btn .av, .profile .av { font-size: 1.4rem; vertical-align: middle; }
.profiles-box { max-width: 460px; width: calc(100% - 2rem); position: relative; max-height: 90vh; overflow: auto; }
.profiles-box .close { position: absolute; top: .6rem; right: .6rem; padding: .3rem .6rem; }
.profile-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; margin: 1rem 0; }
.profile { position: relative; }
.profile .pick { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .2rem; background: #f7f2ea; padding: .8rem .4rem; border: 3px solid transparent; }
.profile .pick .av { font-size: 2.6rem; }
.profile.current .pick { border-color: var(--accent); background: #fff1e8; }
.profile .del { position: absolute; top: 2px; right: 2px; padding: .1rem .3rem; font-size: .8rem; opacity: .5; }
.profile .del:hover, .profile .edit:hover { opacity: 1; }
.profile .edit { position: absolute; top: 2px; left: 2px; padding: .1rem .3rem; font-size: .8rem; opacity: .5; }
.new-profile { border-top: 2px dashed #eee3d3; padding-top: .5rem; }
.avatars { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.avatars input { display: none; }
.avatars span { font-size: 1.8rem; padding: .2rem .35rem; border-radius: 10px; cursor: pointer; border: 2px solid transparent; display: inline-block; }
.avatars input:checked + span { border-color: var(--accent); background: #fff1e8; }

.modes { display: flex; background: var(--card); border-radius: 99px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.modes button { border-radius: 99px; background: transparent; font-weight: bold; }
.modes button.active { background: var(--accent2); color: #fff; }
#maths { display: none; }
.mode-tables #maths { display: block; }
.mode-tables #editor, .mode-tables #tabs, .mode-tables #puzzle, .mode-tables #game { display: none !important; }
.mode-tables main { grid-template-columns: 1fr; max-width: 900px; }
.maths { text-align: center; }
.m-head { display: flex; align-items: center; gap: 1rem; justify-content: center; position: relative; }
.m-head .back { position: absolute; left: 0; }
.table-chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: .5rem 0 1.2rem; }
.chip { background: #f3ede4; min-width: 3.4rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; position: relative; font-size: 1.3rem; }
.chip.on { background: var(--accent2); color: #fff; }
.chip i { position: absolute; top: -8px; right: -6px; font-style: normal; font-size: 1rem; }
.chip.all { font-size: 1rem; justify-content: center; }
.table-chips.small .chip { min-width: 2.6rem; font-size: 1rem; }
.mini-bar { display: block; width: 100%; min-width: 2.4rem; height: 5px; background: rgba(0,0,0,.1); border-radius: 99px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--ok); }
.activities { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.activities button { background: #fff; border: 3px solid #f0e8dc; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 1rem .5rem; }
.activities button:hover { border-color: var(--accent2); }
.activities span { font-size: 2.2rem; }
.activities small { color: #7a7280; }
.m-question { font: bold 2.8rem "Trebuchet MS", sans-serif; margin: 1rem 0; }
.num-answer { display: inline-block; min-width: 2.2em; border-bottom: 4px solid var(--accent2); color: var(--accent2); min-height: 1.1em; vertical-align: bottom; }
.num-answer.good { color: var(--ok); border-color: var(--ok); }
.num-answer.bad { color: var(--ko); border-color: var(--ko); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; max-width: 270px; margin: 0 auto; }
.keypad button { font-size: 1.6rem; padding: .6rem 0; }
.m-feedback { min-height: 3rem; margin-top: 1rem; }
.m-feedback p { font-size: 1.2rem; margin: .4rem 0; }
.dots { display: grid; gap: 4px; width: fit-content; margin: .5rem auto; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.choices.vf { grid-template-columns: 1fr 1fr; max-width: 360px; }
.tip { background: #fff8e1; border-radius: 12px; padding: .6rem 1rem; }
.learn { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .4rem .8rem; max-width: 640px; margin: 1rem auto; }
.learn-row { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; font: bold 1.5rem "Trebuchet MS", sans-serif; }
.bubble { width: 3.4rem; font: bold 1.4rem "Trebuchet MS", sans-serif; background: #ffd66b; border-radius: 99px; }
.bubble.shown { background: #e5f7ec; color: var(--ok); }
.bubble.pulse { animation: bump .4s; }
.chrono { font-size: 1.6rem; font-weight: bold; }
.pyth { display: grid; grid-template-columns: repeat(11, minmax(28px, 46px)); gap: 3px; justify-content: center; margin: 1rem auto; }
.pyth span { padding: .35rem 0; border-radius: 6px; font-weight: bold; font-size: .95rem; }
.pyth .h { background: var(--accent2); color: #fff; }
.c.new { background: #f1ede7; color: #b3aca4; }
.c.weak { background: #ffd4d4; }
.c.learning { background: #ffe6a8; }
.c.known { background: #bfeccd; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; align-items: center; font-size: .9rem; }
.legend .c { display: inline-block; width: 16px; height: 16px; border-radius: 4px; }
.table-scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem 1rem; text-align: left; max-width: 640px; margin: 0 auto; }
.table-scores .mini-bar { margin: .2rem 0; }

.missions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; font-size: .85rem; }
.m-title { font-weight: bold; }
.mission { background: #f3ede4; border-radius: 99px; padding: .15rem .6rem; }
.mission.ok { background: #e5f7ec; color: #23864f; }
.parents-box { max-width: 720px; width: calc(100% - 2rem); position: relative; max-height: 92vh; overflow: auto; text-align: left; }
.parents-box h3 { text-align: center; }
.parents-box .close { position: absolute; top: .6rem; right: .6rem; padding: .3rem .6rem; }
.p-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; text-align: center; }
.p-kpis div { background: #f7f2ea; border-radius: 12px; padding: .6rem; }
.p-kpis b { display: block; font-size: 1.4rem; color: var(--accent); }
.p-kpis small { color: #7a7280; }
.p-chart { display: flex; gap: 4px; height: 140px; align-items: flex-end; }
.p-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; font-size: .75rem; }
.p-bar { width: 100%; background: var(--accent2); border-radius: 4px 4px 0 0; min-height: 2px; }
.p-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.p-lists ul { padding-left: 1.2rem; margin: 0; }
.p-lists small { color: #7a7280; }

.voice { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center; margin: .8rem 0; }
.voice .check { margin: 0; font-size: .9rem; }
.mic { background: #e7efff; font-size: 1.15rem; border-radius: 99px; padding: .55rem 1.2rem; }
.mic.on { background: var(--ko); color: #fff; animation: pulse-mic 1.2s infinite; }
.voice-status { width: 100%; text-align: center; min-height: 1.3em; color: #7a7280; font-style: italic; }
@keyframes pulse-mic { 50% { box-shadow: 0 0 0 10px rgba(229,72,77,.15); } }

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  :root { --cell: 34px; }
}
@media (max-width: 480px) {
  .m-question { font-size: 2rem; }
  .m-head { flex-direction: column; }
  .m-head .back { position: static; }
  .tabs button { min-width: 70px; }
  .slot, .tile { width: 2.4rem; height: 2.7rem; font-size: 1.4rem; }
  :root { --cell: 28px; }
}

@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  .no-print { display: none !important; }
  main { display: block; padding: 0; }
  .card { box-shadow: none; padding: 0; }
  #puzzle { display: block !important; }
  :root { --cell: 30px; }
  .cell.in-word, .cell.active, .cell.ko { background: #fff; }
  .cell input { color: #000 !important; }
  body:not(.print-solution) .cell:not(.given) input { color: transparent !important; }
  .speak { display: none; }
  .print-only { display: inline; }
  .clues li.done { text-decoration: none; color: inherit; }
  .board { gap: 1rem; }
  .clues { page-break-inside: avoid; }
}
.photo-row button { flex: 1; }

.combo { color: var(--accent); font-weight: bold; }
.game-feedback p.combo { animation: bump .5s; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; max-width: 720px; margin: 0 auto 1rem; }
.badge { background: #f7f2ea; border-radius: 12px; padding: .5rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; opacity: .55; }
.badge > span:first-child { font-size: 2rem; filter: grayscale(1); }
.badge small { color: #7a7280; font-size: .72rem; }
.badge.on { opacity: 1; background: #fff1c9; }
.badge.on > span:first-child { filter: none; }
.family { list-style: none; padding: 0; margin: 0 auto 1rem; max-width: 520px; text-align: left; }
.family li { display: grid; grid-template-columns: 2.2rem 2rem 1fr auto; grid-template-rows: auto auto; column-gap: .5rem; align-items: center; background: #f7f2ea; border-radius: 12px; padding: .4rem .8rem; margin-bottom: .4rem; }
.family li.me { background: #fff1e8; outline: 2px solid var(--accent); }
.family .rank { font-size: 1.4rem; text-align: center; grid-row: span 2; }
.family .av { font-size: 1.6rem; grid-row: span 2; }
.family small { grid-column: 3 / 5; color: #7a7280; }
.login-form { display: flex; flex-direction: column; gap: .5rem; }
.login-form .row { margin-top: 0; }
.login-form input { width: 100%; font: inherit; padding: .5rem; border: 2px solid #e6dccd; border-radius: 10px; }
.login-error { color: var(--ko); margin: 0; min-height: 1.2em; }
#parents-btn[data-cloud=ok]::after { content: " ☁️"; }
#parents-btn[data-cloud=ko]::after { content: " ⚠️"; }
.r-xp { white-space: nowrap; }
.xp-mini { display: inline-block; width: 3.5rem; height: 6px; background: #f3ede4; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.xp-mini span { display: block; height: 100%; background: var(--accent2); transition: width .5s; }
.r-bar.xp { max-width: 420px; margin: .3rem auto; }
.r-bar.xp div { background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; max-width: 720px; margin: 0 auto 1rem; }
.gift { background: #f7f2ea; border: 3px solid transparent; border-radius: 12px; padding: .5rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.gift.on { border-color: var(--accent); background: #fff1e8; }
.gift:disabled { opacity: .5; cursor: not-allowed; }
.gift small { color: #7a7280; font-size: .72rem; }
.gift-av { font-size: 2rem; }
.gift:disabled .gift-av { filter: grayscale(1); }
.swatch { display: flex; width: 3.4rem; height: 2rem; border-radius: 8px; overflow: hidden; background: var(--bg); padding: .35rem; gap: .25rem; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch i { flex: 1; border-radius: 4px; background: var(--accent); }
.swatch i + i { background: var(--accent2); }
.p-kids { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: .8rem; }
.p-scroll { overflow-x: auto; }
.p-weeks { width: 100%; border-collapse: collapse; font-size: .85rem; }
.p-weeks th, .p-weeks td { padding: .35rem .4rem; border-bottom: 1px solid #f0e8dc; text-align: center; vertical-align: top; }
.p-weeks th { background: #f7f2ea; }
.p-weeks td:first-child, .p-weeks td:last-child { text-align: left; }
.p-weeks small, .p-missed small { color: #7a7280; }
.p-missed { columns: 2 180px; padding-left: 1.2rem; margin: 0; }
