/* Nano · denník/zápisník. Len svetlý režim (podľa špecifikácie). */

@font-face {
  font-family: 'Caveat';
  src: url('fonts/caveat.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --primary: #8E5BD9;
  --primary-dark: #6E3FBF;
  --primary-light: #EFE6FC;
  --accent: #E8458B;
  --accent-light: #FDE3EE;
  --ink: #2E2440;
  --ink-soft: #6B6180;
  --paper: #FFFDF7;
  --line: #DDE8F7;
  --margin: #F6B8C8;
  --ok: #2E9E6A;
  --ok-light: #E2F6EC;
  --warn: #C2306E;
  --gold: #FFC94D;
  --radius: 18px;
  --shadow: 0 3px 0 rgba(46, 36, 64, 0.12), 0 6px 18px rgba(142, 91, 217, 0.12);
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--paper);
  /* linajky zápisníka + červený okraj */
  background-image:
    linear-gradient(90deg, transparent 27px, var(--margin) 27px, var(--margin) 29px, transparent 29px),
    repeating-linear-gradient(180deg, transparent 0, transparent 29px, var(--line) 29px, var(--line) 30px);
  background-attachment: local;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--hand);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--primary-dark);
}
h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 26px; }

p { margin: 0 0 10px; }

.muted { color: var(--ink-soft); font-size: 15px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
.mt { margin-top: 16px; }

/* ---------- tlačidlá ---------- */
button, .btn {
  font: inherit;
  cursor: pointer;
  border: none;
  -webkit-appearance: none;
  appearance: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--primary-dark);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.2s;
  width: 100%;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-dark); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.accent { background: var(--accent); box-shadow: 0 4px 0 var(--warn); }
.btn.soft { background: #fff; color: var(--primary-dark); box-shadow: 0 0 0 2px var(--primary-light) inset, 0 4px 0 var(--primary-light); }
.btn.small { min-height: 44px; font-size: 16px; padding: 8px 14px; width: auto; }
.btn.ghost { background: transparent; color: var(--ink-soft); box-shadow: none; min-height: 44px; font-weight: 700; font-size: 15px; width: auto; padding: 8px 10px; }

.link {
  background: none;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: 14px;
  min-height: 44px;
  padding: 8px;
}

/* ---------- karty a nálepky ---------- */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
.card.tape::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 84px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(232, 69, 139, 0.28);
  border-radius: 3px;
}

.sticker {
  display: inline-block;
  font-family: var(--hand);
  font-size: 22px;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--warn);
  transform: rotate(-2deg);
}

/* ---------- domov ---------- */
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.topbar h1 { margin: 0; font-size: 34px; }

.hero { text-align: center; margin: 4px 0 8px; position: relative; }
.hero .bubble {
  display: inline-block;
  background: #fff;
  border-radius: 18px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  max-width: 300px;
  margin-bottom: 4px;
  position: relative;
}
.hero .bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  border: 10px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
  transform: translateX(-50%);
}

.levelbar { margin: 6px 0 16px; }
.levelbar .meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.levelbar .meta b { font-family: var(--hand); font-size: 24px; color: var(--primary-dark); }
.bar {
  height: 16px;
  border-radius: 999px;
  background: var(--primary-light);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.8s ease;
}

.menu { display: grid; gap: 12px; }
.menu .btn { justify-content: flex-start; padding-left: 18px; }
.menu .btn .ico { font-size: 24px; width: 30px; text-align: center; }
.menu .btn .badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  border-radius: 999px;
  padding: 2px 10px;
}

.next { font-size: 15px; color: var(--ink-soft); text-align: center; margin-top: 14px; }

/* ---------- úloha ---------- */
.progress { display: flex; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.progress i {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary-light);
  display: block;
}
.progress i.done { background: var(--primary); }
.progress i.now { background: var(--accent); transform: scale(1.3); }

.task-text { font-size: 20px; line-height: 1.5; font-weight: 600; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.option {
  min-height: 64px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 0 0 2px var(--primary-light) inset, 0 4px 0 var(--primary-light);
  padding: 10px;
}
.option:active { transform: translateY(3px); }
.option.wrong { background: #F4F1F8; color: #B0A8C0; text-decoration: line-through; box-shadow: none; }
.option.right { background: var(--ok-light); color: var(--ok); box-shadow: 0 0 0 3px var(--ok) inset; }

.number-input { display: flex; gap: 10px; margin-top: 16px; }
.number-input input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 3px solid var(--primary-light);
  background: #fff;
  color: var(--ink);
}
.number-input input:focus { outline: none; border-color: var(--primary); }
.number-input .unit { align-self: center; font-weight: 800; font-size: 20px; color: var(--ink-soft); }

.helper-row { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; }
.helper-row .nano-mini { flex: 0 0 auto; }

.hint {
  background: #FFF8E1;
  border-left: 5px solid var(--gold);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
}
.hint + .hint { margin-top: 8px; }

.feedback { margin-top: 14px; border-radius: var(--radius); padding: 14px 16px; }
.feedback.bad { background: var(--accent-light); }
.feedback.good { background: var(--ok-light); }
.feedback h3 { margin-bottom: 4px; }
.feedback.good h3 { color: var(--ok); }
.feedback.bad h3 { color: var(--warn); }
.xp-pop { font-family: var(--hand); font-size: 30px; color: var(--accent); font-weight: 700; animation: pop 0.5s ease; display: inline-block; }

.timer { font-family: var(--hand); font-size: 26px; color: var(--accent); }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.messages { flex: 1; overflow-y: auto; padding: 4px 0 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 17px; white-space: pre-wrap; word-wrap: break-word; }
.msg.nano { background: #fff; box-shadow: var(--shadow); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.me { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg.typing { color: var(--ink-soft); font-style: italic; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 0 0 2px var(--primary-light) inset;
}
.composer { display: flex; gap: 8px; }
.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  max-height: 120px;
  resize: none;
  font: inherit;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 3px solid var(--primary-light);
  background: #fff;
}
.composer textarea:focus { outline: none; border-color: var(--primary); }
.composer .btn { width: 56px; padding: 0; }

.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(46, 36, 64, 0.35);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  background: var(--paper);
  width: 100%;
  max-width: 480px;
  height: 78dvh;
  border-radius: 24px 24px 0 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  animation: up 0.25s ease;
}

/* ---------- šatník ---------- */
.wardrobe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.item {
  background: #fff;
  border-radius: var(--radius);
  padding: 6px 4px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--primary-light) inset;
  color: var(--ink);
  min-height: 44px;
}
.item.on { box-shadow: 0 0 0 3px var(--accent) inset; background: var(--accent-light); }
.item.locked { opacity: 0.55; filter: grayscale(0.8); }
.item svg { display: block; margin: 0 auto; }

/* ---------- prihlásenie ---------- */
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 16px 0; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--primary); display: block; }
.pin-dots i.on { background: var(--primary); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 0 auto; }
.pinpad button {
  min-height: 64px;
  border-radius: 50%;
  aspect-ratio: 1;
  font-size: 26px;
  font-weight: 800;
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 0 0 2px var(--primary-light) inset, 0 4px 0 var(--primary-light);
}
.pinpad button:active { transform: translateY(3px); }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--primary-light);
  background: #fff;
}

.error { color: var(--warn); font-weight: 700; min-height: 24px; text-align: center; }

/* ---------- rodič ---------- */
.parent .card + .card { margin-top: 14px; }
.topic-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: center; font-size: 15px; margin-bottom: 8px; }
.topic-row .bar { height: 12px; }
.weeks { display: flex; gap: 6px; align-items: flex-end; height: 120px; margin-top: 8px; }
.weeks .w { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; color: var(--ink-soft); }
.weeks .w span { display: block; width: 100%; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.flag { background: var(--accent-light); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.reported { border-top: 1px dashed var(--primary-light); padding-top: 10px; margin-top: 10px; font-size: 15px; }
table.duels { width: 100%; border-collapse: collapse; font-size: 15px; }
table.duels td, table.duels th { padding: 6px 4px; border-bottom: 1px solid var(--primary-light); text-align: left; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  z-index: 20;
  max-width: calc(100% - 32px);
  animation: up 0.2s ease;
}

/* ---------- konfety a animácie ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -20px;
  font-style: normal;
  font-size: 22px;
  animation: fall 1.6s ease-in forwards;
}

.nano .twinkle { animation: twinkle 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.nano .t2 { animation-delay: 0.4s; }
.nano .t3 { animation-delay: 0.9s; }
.nano .t4 { animation-delay: 1.3s; }
.nano .blink { animation: blink 4s infinite; transform-box: fill-box; transform-origin: center; }
.nano.mood-happy .nano-body, .nano.mood-wow .nano-body { animation: bounce 0.6s ease; transform-origin: 100px 190px; }
.nano .antenna { animation: wiggle 3s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }

@keyframes fall { to { transform: translateY(110vh) rotate(360deg); opacity: 0.8; } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.6); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes bounce { 0% { transform: translateY(0); } 40% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
@keyframes pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 600px) {
  body { font-size: 18px; }
}

/* ---------- Nano 2: scény a panel (SPEC v3) ---------- */
.name-town { font-family: var(--hand); font-size: 28px; font-weight: 700; color: var(--primary-dark); line-height: 1; }
.scene { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3; margin: 0 -4px 10px; background: var(--paper); padding-bottom: 4px; }
.scene-svg { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 3px 0 rgba(46,36,64,.08), 0 8px 20px rgba(142,91,217,.14); background: #FFF4DF; }
.scene-svg.paused * { animation-play-state: paused !important; }
.hotspot { cursor: pointer; }
/* mestečko ako ulica: vodorovne sa posúva len ulica, stránka nie (touch-action len tu) */
.street { overflow-x: auto; overflow-y: hidden; touch-action: pan-x; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  max-width: 100%; margin: 0 0 8px; border-radius: 22px; box-shadow: 0 3px 0 rgba(46,36,64,.08), 0 8px 20px rgba(142,91,217,.14);
  background: #DDF1FF; cursor: grab; scrollbar-width: thin; }
.street:active { cursor: grabbing; }
.street-svg { display: block; width: 1240px; height: 300px; max-width: none; }
.street-svg [data-place]:hover { filter: brightness(1.04); }
.pickable { animation: pulse 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bounce { animation: bounce2 .6s ease; transform-box: fill-box; transform-origin: bottom center; }
.pop { animation: pop2 .5s ease; transform-box: fill-box; transform-origin: center; }
.steam { animation: steam 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
.steam.s2 { animation-delay: .8s; }
.character .blink, .scene-svg .blink { animation: blink 4s infinite; transform-box: fill-box; transform-origin: center; }
/* scale/translate (nie transform): v SVG skupinách by transform prebil atribút transform s polohou a vec by odskočila do rohu */
@keyframes pulse { 0%,100% { scale: 1; } 50% { scale: 1.07; } }
@keyframes bounce2 { 0% { translate: 0 0; } 40% { translate: 0 -14px; } 100% { translate: 0 0; } }
@keyframes pop2 { 0% { scale: .3; opacity: 0; } 70% { scale: 1.15; opacity: 1; } 100% { scale: 1; } }
@keyframes steam { 0% { transform: translateY(0) scale(.8); opacity: 0; } 30% { opacity: .7; } 100% { transform: translateY(-18px) scale(1.2); opacity: 0; } }

.panel { display: flex; flex-direction: column; gap: 10px; }
.talk { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.talk .who { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--primary-light); display: grid; place-items: center; overflow: hidden; }
.talk .who svg { width: 46px; height: 46px; display: block; }
.say { flex: 1; min-width: 0; background: #fff; border-radius: 18px; border-top-left-radius: 6px; padding: 10px 14px; font-weight: 700; font-size: 16px; box-shadow: var(--shadow); }
.say .name { display: block; font-family: var(--hand); font-size: 20px; color: var(--warn); line-height: 1; margin-bottom: 2px; }
.say.nano .name { color: var(--primary-dark); }
.say.self .name { color: var(--ok); }
.say.task { font-size: 17px; }
.say .why { color: var(--warn); display: block; }
.say .hint { display: block; margin-top: 6px; }
.say.note-box { border-top-left-radius: 18px; }
.note { font-size: 13px; color: var(--ink-soft); text-align: center; margin: 0; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.group { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.group-title { font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.opt { min-height: 44px; padding: 8px 14px; border: none; border-radius: 999px; font: inherit; font-weight: 800; font-size: 15px; background: #fff; color: var(--primary-dark); box-shadow: 0 0 0 2px var(--primary-light) inset; cursor: pointer; }
.opt[aria-pressed="true"] { background: var(--primary); color: #fff; box-shadow: none; }
.opt.locked { opacity: .55; }
.options .opt { min-height: 60px; border-radius: var(--radius); font-size: 19px; color: var(--ink); box-shadow: 0 0 0 2px var(--primary-light) inset, 0 4px 0 var(--primary-light); font-variant-numeric: tabular-nums; }
.options .opt:active { transform: translateY(3px); }
.options .opt.wrong { background: #F4F1F8; color: #B0A8C0; text-decoration: line-through; box-shadow: none; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--primary-light); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.stage { background: radial-gradient(circle at 50% 40%, #fff 0, #F6EFFF 72%); border-radius: 24px; padding: 8px 10px; box-shadow: var(--shadow); display: flex; justify-content: center; }
.stage svg { width: min(100%, 220px); height: auto; display: block; }

.numbox { display: flex; align-items: center; gap: 10px; }
.field-num { flex: 1; min-height: 54px; border-radius: 16px; border: 3px solid var(--primary-light); background: #fff; font-size: 24px; font-weight: 900; padding: 6px 14px; display: flex; align-items: center; font-variant-numeric: tabular-nums; }
.field-num.empty { color: #B0A8C0; }
.numbox .unit { font-weight: 900; font-size: 20px; color: var(--ink-soft); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { min-height: 46px; border: none; border-radius: 14px; font: inherit; font-weight: 900; font-size: 20px; background: #fff; color: var(--primary-dark); box-shadow: 0 0 0 2px var(--primary-light) inset, 0 3px 0 var(--primary-light); cursor: pointer; }
.key:active { transform: translateY(2px); }
.key.go { background: var(--primary); color: #fff; box-shadow: 0 3px 0 var(--primary-dark); grid-column: 1 / -1; }

.btn.pink { background: var(--accent); box-shadow: 0 4px 0 var(--warn); }
.btn.small .badge { margin-left: 6px; background: var(--gold); color: var(--ink); font-size: 12px; border-radius: 999px; padding: 1px 8px; }
.end { display: flex; flex-direction: column; gap: 10px; }
.end h2 { margin: 0; }
.stars { font-size: 28px; letter-spacing: 2px; }
.reward { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.reward svg { flex: 0 0 auto; }
.plant-note { margin: 0; font-weight: 700; color: var(--ink-soft); }
.sheet.auto { height: auto; max-height: 85dvh; overflow-y: auto; }
.xp-pop { font-size: 22px; }
details summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); }

.kb-approved .sticker { background: var(--ok-light); color: var(--ok); }
.kb-rejected .sticker { background: #F4F1F8; color: var(--ink-soft); }
.parent h4 { font-family: var(--hand); font-size: 22px; color: var(--primary-dark); margin: 12px 0 4px; }

/* ---------- ateliér ---------- */
.atelier select.chip { appearance: none; -webkit-appearance: none; padding-right: 14px; }
.creations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.creation { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.creation-pick { border: none; padding: 0; background: #fff; border-radius: 14px; box-shadow: 0 0 0 2px var(--primary-light) inset; cursor: pointer; width: 100%; aspect-ratio: 1; overflow: hidden; }
.creation.on .creation-pick { box-shadow: 0 0 0 3px var(--accent) inset; }
.creation img, .creation-pick img { width: 100%; height: 100%; object-fit: contain; display: block; background: repeating-conic-gradient(#F4F1F8 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 14px; }
.creation-meta { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.creation-big { max-width: 240px; max-height: 240px; margin: 0 auto; border-radius: 16px; background: repeating-conic-gradient(#F4F1F8 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.parent .creations .creation img { aspect-ratio: 1; }

/* ---------- zariaďovanie pekárne ---------- */
.decor-opt { display: inline-flex; align-items: center; gap: 6px; }
.decor-preview { width: 34px; height: 34px; }
.field-text { width: 100%; min-height: 48px; font: inherit; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--primary-light); background: #fff; }
.field-text:focus { outline: none; border-color: var(--primary); }

/* ---------- album ---------- */
.stickers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sticker-card { background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 0 0 2px var(--primary-light) inset; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 14px; min-width: 0; }
.sticker-card .who { width: 54px; height: 54px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--primary-light); display: grid; place-items: center; overflow: hidden; }
.sticker-card .who svg { width: 46px; height: 46px; }
.sticker-card b { font-size: 14px; line-height: 1.2; }
.chip.done-chip { background: var(--ok-light); color: var(--ok); box-shadow: none; }

/* Diagram k úlohe (scene/chart.js) */
.figure-box { background: #fff; border: 2px solid #3B2A3F; border-radius: 16px; padding: 6px; margin: 6px 0; }
.figure { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; }
.fig-text { font-family: Nunito, system-ui, sans-serif; font-size: 13px; font-weight: 700; fill: #3B2A3F; }

/* Jej obchod */
.ledger { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ledger li { padding: 6px 10px; background: #fff; border: 2px solid #E9DDF5; border-radius: 12px; }
input[type=range] { width: 100%; min-height: 44px; accent-color: #8E5BD9; }

/* Nájdi chybu v účtenke (pick_line) */
.receipt { background: #fff; border: 2px dashed #B9A7D6; border-radius: 10px; padding: 10px; display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.receipt-line { all: unset; box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; font-weight: 700; color: #3B2A3F; cursor: pointer; border-bottom: 1px dotted #D9CCEB; }
.receipt-line:hover, .receipt-line:focus-visible { background: #F3EEFF; outline: 2px solid #8E5BD9; }
.receipt-line.wrong { background: #EEF6EE; color: #5E7A5E; cursor: default; }
.receipt-line.wrong::after { content: ' ✓ sedí'; font-weight: 600; }
.receipt-line.right { background: #DDF6EC; outline: 2px solid #5CC9A7; }

/* Súmerný vzor na tortu */
.pattern-box { background: #fff; border-radius: 18px; padding: 8px; box-shadow: var(--shadow); margin-bottom: 10px; }
.pattern-grid { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; touch-action: manipulation; }

/* bublina „Mám pre teba novinky“ po nasadení novej verzie (app.js checkUpdate) */
.update-banner { position: fixed; left: 50%; translate: -50% 0; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 60;
  width: min(448px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: #FFFFFF; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 rgba(46,36,64,.12), 0 12px 28px rgba(142,91,217,.25);
  animation: pop2 .5s ease; }
.update-banner .who { flex: none; }
.update-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 15px; line-height: 1.3; }
.update-text span { color: var(--muted, #6B5A78); font-size: 14px; }
