/* Альбом малюка: паперова тема поверх основних стилів */
:root {
  --bg: #dce8f1; --surface: #fffdf6; --ink: #20345a; --muted: #4c5f80;
  --accent: #20345a; --accent-ink: #ffffff;
  --mint: #eef4f9; --pink: #fff1cc; --white: #ffffff;
  --red: #c6432f; --clip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 64' fill='none' stroke='%238a97ab' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M20 18v32a7 7 0 0 1-14 0V12a5 5 0 0 1 10 0v34a2.500 2.500 0 0 1-5 0V18'/%3E%3C/svg%3E") center / contain no-repeat;
  --paper-shadow: 0 14px 24px -18px rgba(32, 52, 90, .55);
  --step-head: clamp(2.5rem, 1.7rem + 3.4vw, 4.25rem);
  --step-hero: clamp(3rem, 1.9rem + 4.6vw, 5.5rem);
}
body { font: 400 var(--step-body)/1.62 "Literata", Georgia, serif; }
h1, h2, .age, .mark, .tipc h3, .note h3 { font-family: "Caveat", cursive; font-weight: 700; letter-spacing: 0; }
h1, h2 { line-height: 1.02; }
h3 { font-family: "Literata", Georgia, serif; font-weight: 600; letter-spacing: 0; }
.btn, .chip, .tabs, .links, label, table, input, .ring b { font-family: "Nunito", system-ui, sans-serif; }
.mark { font-size: 1.75rem; }
.mark i { background: var(--red); }
.mark i::after { background: #fff4d6; }
.lead { font-weight: 400; }
.bar { background: var(--bg); }
.links a[aria-current="page"] { background: #fff; }
.btn { border-radius: 14px; }
.btn.alt { color: var(--ink); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline-color: var(--red); }

/* Папір і скотч */
.field, .brands article, .day, .types > div, .steps4 > div, .rcp, .kit li, .faq-list details, .cut li, .never li, .alg li { background: var(--white); border-radius: 6px; box-shadow: var(--paper-shadow); }
.field.mint { background: #fffdf6; }
.field.pink { background: #fff1cc; }
.field { position: relative; }
.field::before { content: ""; position: absolute; left: 22px; top: -20px; width: 22px; height: 52px; background: var(--clip); transform: rotate(-4deg); }
.head, .dial, .band, .ft { background: transparent; }
.head.pink { background: transparent; }
.dial { background: #cfdfeb; }
.band { background: #fff1cc; }

/* Фото як знімки */
.head .pic, .band .fig { position: relative; padding: 10px 10px 34px; border-radius: 0; overflow: visible; background: #fff; box-shadow: var(--paper-shadow); rotate: -1.6deg; animation: none; }
.head .pic::before, .band .fig::before { content: ""; position: absolute; z-index: 1; left: 22px; top: -20px; width: 24px; height: 56px; background: var(--clip); transform: rotate(-4deg); }
.head .pic img, .band .fig img { aspect-ratio: 1; height: auto; }
.path-row .c { border-radius: 0; padding: 7px 7px 20px; background: #fff; box-shadow: var(--paper-shadow); }
.path-row a:nth-child(odd) .c { rotate: -1.4deg; }
.path-row a:nth-child(even) .c { rotate: 1.2deg; }
.path-row .c img { aspect-ratio: 1; height: auto; }
.types img, .grow img, .kit img, .rcp img, .alg img, .log img { border-radius: 4px; }
.food .ph { padding: 6px 6px 16px; border-radius: 0; background: #fff; box-shadow: var(--paper-shadow); overflow: visible; }
.food:nth-child(3n + 1) .ph { rotate: -1.1deg; }
.food:nth-child(3n + 2) .ph { rotate: .9deg; }
.food img { aspect-ratio: 1; height: auto; }
.tk { right: -4px; top: -6px; background: var(--red); }

/* Стос фото на головній */
.hero { align-items: center; overflow: hidden; }
.stack { position: absolute; top: 50%; right: clamp(16px, 7vw, 120px); width: min(40vw, 460px); aspect-ratio: 1 / 1.13; transform: translateY(-50%); touch-action: pan-y; user-select: none; }
.pol { position: absolute; inset: 0; display: block; padding: 12px 12px 54px; background: #fff; box-shadow: var(--paper-shadow); text-decoration: none; color: var(--ink); cursor: grab; will-change: transform; transition: transform .3s var(--out); }
.pol.drag, .note.drag { transition: none; }
.pol:active { cursor: grabbing; }
.pol img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.pol span { position: absolute; left: 8px; right: 8px; bottom: 10px; text-align: center; font: 700 1.6rem/1.1 "Caveat", cursive; }
.pol:nth-last-child(1) { transform: rotate(-2.2deg); }
.pol:nth-last-child(2) { transform: rotate(2.4deg); }
.pol:nth-last-child(3) { transform: rotate(-4deg); }
.pol:nth-last-child(4) { transform: rotate(4.5deg); }
.stack::before { content: ""; position: absolute; z-index: 9; left: 26px; top: -22px; width: 26px; height: 60px; background: var(--clip); transform: rotate(-4deg); pointer-events: none; }
.stk-next { position: absolute; z-index: 9; right: -8px; bottom: -14px; }
.round { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; transition: transform .16s var(--out); }
.round:active { transform: scale(.92); }

/* Блокнот порад */
.pad { position: relative; height: 196px; max-width: 560px; margin-inline: auto; touch-action: pan-y; user-select: none; }
.note { position: absolute; inset: 0; display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px; background: #fffbea repeating-linear-gradient(transparent 0 31px, #cfdcea 31px 32px); box-shadow: var(--paper-shadow); text-decoration: none; color: var(--ink); cursor: grab; will-change: transform; transition: transform .3s var(--out); }
.note:nth-last-child(1) { transform: rotate(-.8deg); }
.note:nth-last-child(2) { transform: rotate(1.2deg); }
.note:nth-last-child(n + 3) { transform: rotate(-2deg); }
.note img { width: 124px; height: 124px; object-fit: cover; padding: 5px; background: #fff; pointer-events: none; -webkit-user-drag: none; }
.note p { font-size: 1rem; line-height: 1.3; }
.note h3 { font-size: 2.1rem; line-height: 1.05; margin: 2px 0; }
.note b { font: 800 .95rem "Nunito", sans-serif; color: var(--red); }
.padbar { display: flex; justify-content: center; margin-top: 18px; }

/* Ложка на повзунку */
input[type=range]::-webkit-slider-runnable-track { height: 6px; background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 20px); }
input[type=range]::-moz-range-track { height: 6px; background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 20px); }
input[type=range]::-webkit-slider-thumb { width: 76px; height: 44px; margin-top: -19px; border-radius: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 44'%3E%3Cpath d='M4 25c14-3 26-4 40-4' fill='none' stroke='%2320345a' stroke-width='6' stroke-linecap='round'/%3E%3Cellipse cx='57' cy='21' rx='17' ry='12' fill='%23c6432f'/%3E%3Cellipse cx='57' cy='19' rx='11' ry='7' fill='%23e8694f'/%3E%3C/svg%3E") center / contain no-repeat; }
input[type=range]::-moz-range-thumb { width: 76px; height: 44px; border-radius: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 44'%3E%3Cpath d='M4 25c14-3 26-4 40-4' fill='none' stroke='%2320345a' stroke-width='6' stroke-linecap='round'/%3E%3Cellipse cx='57' cy='21' rx='17' ry='12' fill='%23c6432f'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Тарілка як знімок */
.p3d-card { padding: 0; border: 10px solid #fff; border-radius: 0; background: #fff; box-shadow: var(--paper-shadow); }
.p3d-tag { border-radius: 8px; }
.p3d-tag img { border-radius: 4px; }

/* Печатка */
.sh-top { position: relative; }
.stamp { position: absolute; left: 6px; top: 6px; z-index: 2; display: grid; place-items: center; min-width: 96px; padding: 6px 10px; border: 3px solid var(--red); border-radius: 8px; color: var(--red); background: rgba(255, 255, 255, .78); font: 800 .95rem "Nunito", sans-serif; transform: rotate(-11deg); pointer-events: none; }
.stamp.hit { animation: stamp .42s cubic-bezier(.3, 1.4, .5, 1) backwards; }
@keyframes stamp { from { opacity: 0; transform: rotate(-11deg) scale(2.2); } 60% { opacity: 1; transform: rotate(-11deg) scale(.94); } }
.hb { position: fixed; z-index: 90; color: var(--red); font-size: 22px; line-height: 1; pointer-events: none; }

/* Альбом смаків */
.alb { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; margin-top: 20px; perspective: 900px; }
.flip { position: relative; aspect-ratio: 1 / 1.2; }
.flip:nth-child(odd) { rotate: -1deg; }
.flip:nth-child(even) { rotate: 1deg; }
.flip-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s var(--out); }
.flip.on .flip-in { transform: rotateY(180deg); }
.fc, .bk { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; box-shadow: var(--paper-shadow); }
.fc { display: block; width: 100%; padding: 7px 7px 36px; border: 0; font: inherit; color: inherit; cursor: pointer; }
.fc img { width: 100%; height: 100%; object-fit: cover; }
.fc span { position: absolute; left: 4px; right: 4px; bottom: 6px; text-align: center; font: 700 1.3rem/1.1 "Caveat", cursive; }
.fc i { position: absolute; right: 12px; top: 12px; color: var(--red); font-style: normal; font-size: 1.4rem; line-height: 1; text-shadow: 0 0 4px #fff; }
.bk { display: grid; align-content: center; gap: 6px; padding: 12px; transform: rotateY(180deg); background: #fffbea; font-size: .95rem; line-height: 1.3; text-align: center; }
.bk b { font: 700 1.5rem "Caveat", cursive; }
.bk em { font-style: normal; font-weight: 600; }
.bk em.no { color: var(--red); }
.bk a { font-weight: 600; }
.bk button { justify-self: center; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--bg); color: var(--ink); font: 800 .85rem "Nunito", sans-serif; cursor: pointer; }
@media screen { .log { display: none; } }
@media print { .alb, .pad, .stack { display: none; } }

@media (max-width: 860px) {
  h2 { font-size: 2.35rem; }
  .two h2, .band h2 { font-size: 2.15rem; }
  h3 { font-size: 1.2rem; }
  .mark { font-size: 1.5rem; }
  body { font-size: 1.0625rem; line-height: 1.62; }
  .hero { display: block; padding-bottom: 34px; min-height: 0; }
  .hero-txt { max-width: none; padding-block: 18px 8px; }
  .hero h1 { font-size: 3rem; line-height: 1; }
  .hero .sub { font-size: 1.0625rem; font-weight: 400; margin-top: 12px; }
  .hero .acts { margin-top: 16px; }
  .stack { position: relative; top: auto; right: auto; width: min(78vw, 310px); margin: 26px auto 0; transform: none; }
  .pol span { font-size: 1.4rem; }
  .tabs { background: var(--ink); box-shadow: none; }
  .tabs a, .tabs button { color: #c7d3e4; font-family: "Nunito", sans-serif; }
  .tabs [aria-current="page"], .tabs .on { color: #ffd77a; }
  .types > div { border-radius: 6px; }
  .note { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .note img { width: 96px; height: 96px; }
  .note h3 { font-size: 1.8rem; }
  .pad { height: 168px; }
  .mi { border-radius: 8px; background: var(--bg); color: var(--ink); }
  .mi.pk { background: #fff1cc; color: var(--ink); }
  #more a { border-radius: 6px; font-family: "Nunito", sans-serif; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-in { transition: none; }
  .stamp.hit { animation: none; }
}

html { scroll-behavior: auto; }
/* Плавність: жодних рухів від скролу, фото не стрибають під пальцем */
html { -webkit-tap-highlight-color: transparent; }
img { -webkit-touch-callout: none; }
.field, .steps4 > div, .day, .brands article, .avoid li, .kit li, .rcp, .types > div, .grow > div, .tummy > div, .cut li, .never li, .faq-list details, .alg li, .order li, .wday, .head .pic img, .band .fig img, .path-row .c img { animation: none !important; }
.bar::after { display: none; }
main .kit img:active, main .types img:active, main .grow img:active, main .alg img:active, main .rcp img:active, .food:active .ph, .food:hover .ph, .path-row a:hover .c, .path-row a:active .c { transform: none; }
.rv { transform: translateY(10px); transition-duration: .32s; }
.rv.in { transform: none; }
.wd > span, .wr .wd > span { transform: none; transition: none; }
::view-transition-old(root) { animation: vt-fade-out .14s ease both; }
::view-transition-new(root) { -webkit-mask-image: none; mask-image: none; animation: vt-fade-in .2s ease both; }
.tabs { view-transition-name: tabs; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* Готовність дитини */
.ready label { font-weight: 600; font-family: "Literata", serif; font-size: 1.125rem; padding: 10px 0; }
.ready input, .ready input:checked { appearance: none; -webkit-appearance: none; width: 32px; height: 32px; border-radius: 8px; border: 3px solid var(--ink); background: #fff; box-shadow: none; transform: none; display: grid; place-items: center; transition: background .16s; }
.ready input::after { content: ""; width: 8px; height: 15px; margin-top: -3px; border: solid #fff; border-width: 0 3px 3px 0; rotate: 40deg; opacity: 0; }
.ready input:checked { background: var(--ink); }
.ready input:checked::after { opacity: 1; }
.ready-out { padding: 10px 14px; border-radius: 6px; background: var(--bg); font-weight: 600; }
.ready-out.no { background: #fde4dc; color: #8f2c1d; }
.ready-out.yes { background: #dcefdc; color: #1f5a33; }

/* Значки кроків */
.order li > i, .order li:nth-child(even) > i { display: grid; place-items: center; background: #fff; color: var(--ink); box-shadow: var(--paper-shadow); font-style: normal; border-radius: 50%; }
.order li > i svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Проста дата */
.dt { width: 100%; max-width: 280px; min-height: 52px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); font: 700 1.0625rem "Nunito", sans-serif; }

/* Профілі дітей */
.profs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.prof { display: grid; justify-items: center; gap: 2px; padding: 16px 10px; background: #fff; border: 0; box-shadow: var(--paper-shadow); text-align: center; text-decoration: none; color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; transition: transform .16s var(--out); }
.prof:active { transform: scale(.98); }
.prof b { font: 700 1.6rem/1.1 "Caveat", cursive; }
.av { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 6px; border-radius: 50%; background: var(--bg); font: 700 2.4rem "Caveat", cursive; font-style: normal; }
.prof.add { background: transparent; box-shadow: none; border: 2px dashed #9fb2c8; }
.back { font: 800 1rem "Nunito", sans-serif; text-decoration: none; }
.kname { display: grid; gap: 4px; max-width: 320px; margin-top: 12px; font-weight: 800; }
.kname input { min-height: 50px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font: 700 1.0625rem "Nunito", sans-serif; color: var(--ink); }

/* Правки після перевірки: легше малювати, легше натискати */
.tabs :focus-visible { outline: 3px solid #ffd77a; outline-offset: -3px; }
.snd, .lang-btn, .disc-list button, .pl, .ms-on, .gh .chip { min-height: 44px; }
.snd { min-width: 44px; }
.p3d-tag { min-height: 40px; font-size: .875rem; }
.bk a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.dt, .kname input, .kids input { border-color: var(--muted); }
@media (hover: none) { .p3d-dot::after { display: none; } }
@media (max-width: 860px) {
  :root { --paper-shadow: 0 2px 5px rgba(32, 52, 90, .2); }
  .food .ph, .food:nth-child(3n + 1) .ph, .food:nth-child(3n + 2) .ph { rotate: none; }
  .tabs a, .tabs button { font-size: .8125rem; }
  .tabs [aria-current="page"] span { text-decoration: underline; text-underline-offset: 3px; }
  .steps4 { display: grid; grid-template-columns: 1fr; overflow: visible; margin-inline: 0; padding: 0; gap: 12px; }
  .steps4 > * { flex: none; }
}
