:root {
    --paper: #f8efd9;
    --ink: #5f6061;
    --coral: #f2676f;
    --coral-dark: #df4d5c;
    --teal: #17afa8;
    --teal-dark: #008f8a;
    --olive: #a79c68;
    --stage-ratio: 1.6153846154;
}

* { box-sizing: border-box; }

html, body { min-width: 320px; min-height: 100%; }

body {
    margin: 0;
    overflow: clip;
    color: var(--ink);
    background: var(--paper);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid rgba(16, 174, 167, .82);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: .75rem;
    left: .75rem;
    padding: .65rem 1rem;
    color: #fff;
    background: #242424;
    border-radius: .45rem;
    transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.player {
    position: fixed;
    inset: 0;
    display: grid;
    width: 100vw;
    height: 100vh;
    place-items: center;
}

.stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: clip;
    background-color: var(--paper);
}

.intro-canvas,
.content-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(100vw, calc(100vh * var(--stage-ratio)));
    height: min(100vh, calc(100vw / var(--stage-ratio)));
    aspect-ratio: 630 / 390;
    container-type: inline-size;
    transform: translate(-50%, -50%);
}

.stage::after {
    position: absolute;
    z-index: 30;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: .14;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' seed='8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.is-hidden { display: none; }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Tela de abertura: composição em HTML e SVG, sem tela rasterizada. */
.intro-stage {
    background:
        radial-gradient(ellipse at 82% 72%, rgba(255,255,255,.32), transparent 30%),
        linear-gradient(180deg, #faf2dc 0%, #f8efd9 100%);
}

.intro-brand {
    position: absolute;
    z-index: 4;
    top: 1.5cqw;
    left: 1.7cqw;
    width: 15.5cqw;
    height: 9cqw;
}

.baby-timeline {
    position: absolute;
    z-index: 3;
    top: 6.6cqw;
    left: 5.7cqw;
    width: 88.6cqw;
    height: auto;
    object-fit: contain;
}

.timeline-baby { color: #ef7080; filter: drop-shadow(0 2px 1px rgba(113,75,50,.1)); }
.baby-salmon { color: #ee8678; }
.baby-coral { color: #ed9872; }
.baby-orange { color: #efad67; }
.baby-yellow { color: #d8cd63; }
.baby-green { color: #93c887; }
.baby-teal { color: #61bba5; }
.mini-shadow { fill: rgba(123,84,48,.12); }
.mini-body { fill: color-mix(in srgb, currentColor 62%, #fff); stroke: color-mix(in srgb, currentColor 72%, #8d5047); stroke-width: 2; }
.mini-limb { fill: none; stroke: #bd7159; stroke-width: 6; stroke-linecap: round; }
.mini-head, .mini-ear { fill: #ffd4aa; stroke: #bd7159; stroke-width: 2; }
.mini-hair, .mini-smile { fill: none; stroke: #9c5949; stroke-width: 2; stroke-linecap: round; }
.mini-eye { fill: #603d39; }
.mini-cheek { fill: #f28e87; opacity: .48; }
.toy { fill: color-mix(in srgb, currentColor 50%, #f4df68); stroke: #a06b4e; stroke-width: 2; }
.toy-line, .music-note { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.intro-copy {
    position: absolute;
    z-index: 5;
    top: 25.5cqw;
    left: 11.2cqw;
    width: 61cqw;
}

.intro-copy h1 {
    margin: 0 0 2.5cqw;
    color: #f05a71;
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 4.45cqw;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.055em;
    white-space: nowrap;
}

.intro-copy p { margin: 0; letter-spacing: .065em; }
.intro-lead {
    width: 58cqw;
    color: #12aba6;
    font-size: 1.47cqw;
    font-weight: 800;
    line-height: 1.43;
}
.intro-note {
    width: 56cqw;
    margin-top: 2.1cqw !important;
    color: #5d5e61;
    font-size: 1.23cqw;
    font-weight: 700;
    line-height: 1.48;
}

.enter-hit {
    position: absolute;
    z-index: 10;
    left: 74.2%;
    top: 52.2%;
    width: 17.8%;
    aspect-ratio: 1;
    padding: 0;
    cursor: pointer;
    background: conic-gradient(#f35b76 0deg 45deg, #f36f67 45deg 90deg, #f69a61 90deg 135deg, #f5c35f 135deg 180deg, #d9dc67 180deg 225deg, #9ece87 225deg 270deg, #6cc7a3 270deg 315deg, #4ebcb4 315deg 360deg);
    border: .55cqw solid rgba(255,255,255,.82);
    border-radius: 50%;
    box-shadow: 0 .8cqw 1.8cqw rgba(112,79,46,.18);
    transition: transform .25s ease, filter .25s ease;
}

.enter-hit::before {
    position: absolute;
    inset: 25%;
    content: "";
    background: #faf0d6;
    border-radius: 50%;
    box-shadow: 0 .4cqw .8cqw rgba(104,72,45,.18);
}

.enter-hit::after {
    position: absolute;
    top: 37%;
    left: 44%;
    width: 0;
    height: 0;
    content: "";
    border-top: 2.2cqw solid transparent;
    border-bottom: 2.2cqw solid transparent;
    border-left: 3.5cqw solid #f05270;
    filter: drop-shadow(0 .25cqw .2cqw rgba(128,67,73,.16));
}

.enter-hit:hover { transform: scale(1.055); filter: drop-shadow(0 5px 7px rgba(96,71,38,.18)); }
.enter-hit:active { transform: scale(.98); }

.fullscreen-button {
    position: absolute;
    z-index: 40;
    width: 6.4cqw;
    height: 6.4cqw;
    padding: .45cqw;
    color: var(--olive);
    cursor: pointer;
    background: rgba(248,239,217,.22);
    border: 0;
    border-radius: .8cqw;
    transition: color .2s ease, transform .2s ease, background .2s ease;
}

.fullscreen-button:hover { color: #7d7448; background: rgba(255,255,255,.48); transform: scale(1.04); }
.fullscreen-button svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.1; }
.fullscreen-button .screen-dot { fill: currentColor; stroke: none; }
.fullscreen-intro, .fullscreen-content { top: 2.3cqw; right: 2.4cqw; }
.fullscreen-intro svg { opacity: 0; }

/* Tela principal */
.content-stage {
    background:
        radial-gradient(ellipse at 50% 74%, rgba(255,255,255,.45), transparent 42%),
        linear-gradient(180deg, #faf2dc 0%, #f8efd9 72%, #f7ecd1 100%);
}

.brand-button {
    position: absolute;
    z-index: 42;
    top: 1.5cqw;
    left: 1.7cqw;
    width: 15.5cqw;
    height: 9cqw;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    border: 0;
}

.brand-logo { display: block; width: 100%; height: 100%; overflow: visible; }
.brand-triangle { fill: none; stroke: #e94758; stroke-width: 4; stroke-linejoin: round; }
.brand-mother { fill: #a8ce70; }
.brand-child { fill: #f8efd9; }
.brand-logo text, .intro-brand text { font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
.brand-rede { fill: #275a91; font-size: 18px; font-weight: 700; }
.brand-maes { fill: #e94758; font-family: "Segoe Print", cursive !important; font-size: 19px; }
.brand-minas { fill: #275a91; font-size: 14px; font-weight: 700; }

.content-canvas { z-index: 2; outline: 0; }
.text-bubble,
.tip-card {
    position: absolute;
    z-index: 6;
    border: .22cqw dashed currentColor;
    background: rgba(255,248,229,.52);
    box-shadow: 0 .5cqw 1.2cqw rgba(121,94,49,.035);
}

.behavior-bubble {
    top: 5.5cqw;
    left: 50%;
    width: auto;
    min-height: 0;
    padding: 2.1cqw 2.4cqw;
    color: var(--teal-dark);
    transform: translateX(-50%);
}

.behavior-bubble p,
.tip-card p {
    margin: 0;
    font-size: 1.76cqw;
    font-weight: 700;
    line-height: 1.43;
    letter-spacing: .012em;
}

.behavior-bubble.is-dense p { font-size: 1.72cqw; line-height: 1.36; }

.tip-bubbles { position: absolute; z-index: 5; inset: 0; }
.tip-card { color: var(--coral); padding: 1.35cqw 1.65cqw; }
.tip-card p { font-size: 1.68cqw; line-height: 1.38; }
.tip-card.is-dense p { font-size: 1.4cqw; line-height: 1.32; }
.tip-card:nth-child(1) { top: 22.5cqw; left: 3.2cqw; }
.tip-card:nth-child(2) { top: 22.5cqw; right: 3.2cqw; }
.tip-card:nth-child(3) { top: 6.2cqw; left: 3.2cqw; }
.tip-card:nth-child(4) { top: 6.2cqw; right: 3.2cqw; }
.tip-bubbles[data-count="1"] .tip-card:nth-child(1) { top: 21.5cqw; left: 4.5cqw; }
.tip-bubbles[data-count="2"] .tip-card:nth-child(1) { top: 21.5cqw; left: 4.2cqw; }
.tip-bubbles[data-count="2"] .tip-card:nth-child(2) { top: 21.5cqw; right: 4.2cqw; }
.tip-bubbles[data-count="3"] .tip-card:nth-child(1) { top: 22.5cqw; left: 3.5cqw; }
.tip-bubbles[data-count="3"] .tip-card:nth-child(2) { top: 22.5cqw; right: 3.5cqw; }
.tip-bubbles[data-count="3"] .tip-card:nth-child(3) { top: 6.2cqw; left: 3.2cqw; }
.tip-bubbles[data-count="4"] .tip-card:nth-child(1) { top: 6.2cqw; left: 3.2cqw; }
.tip-bubbles[data-count="4"] .tip-card:nth-child(2) { top: 22.5cqw; left: 3.2cqw; }
.tip-bubbles[data-count="4"] .tip-card:nth-child(3) { top: 6.2cqw; right: 3.2cqw; left: auto; }
.tip-bubbles[data-count="4"] .tip-card:nth-child(4) { top: 22.5cqw; right: 3.2cqw; }
.tip-bubbles[data-milestone="identificacao-de-dois-objetos"] .tip-card:nth-child(1) { top: 6.2cqw; left: 3.2cqw; }
.tip-bubbles[data-milestone="identificacao-de-dois-objetos"] .tip-card:nth-child(2) { top: 22.5cqw; left: 3.2cqw; right: auto; }
.tip-bubbles[data-milestone="identificacao-de-dois-objetos"] .tip-card:nth-child(3) { top: 18.5cqw; right: 3.2cqw; left: auto; }
.tip-card:nth-child(n+5) { display: none; }

.baby-illustration {
    --baby-color: #f16479;
    position: absolute;
    z-index: 8;
    left: 38cqw;
    top: 20.7cqw;
    width: 25cqw;
    height: 16.7cqw;
    color: var(--baby-color);
    filter: drop-shadow(0 .8cqw .7cqw rgba(129,80,47,.13));
    animation: babyFloat 3.1s ease-in-out infinite;
}

@keyframes babyFloat { 0%,100% { transform: translateY(0) rotate(-.3deg); } 50% { transform: translateY(-.7cqw) rotate(.35deg); } }
.baby-illustration > svg { display: none; }
.baby-illustration > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: saturate(1.3) contrast(1.07) brightness(1.015) drop-shadow(0 .55cqw .5cqw rgba(121,78,45,.12));
}

.side-illustrations {
    position: absolute;
    z-index: 4;
    inset: 0;
    pointer-events: none;
}

.side-art {
    position: absolute;
    top: 41.2cqw;
    width: 10.2cqw;
    height: 8.9cqw;
    object-fit: contain;
    filter: saturate(1.4) contrast(1.08) brightness(1.015) drop-shadow(0 .38cqw .35cqw rgba(121,78,45,.1));
    animation: sideArtIn .48s ease both;
}

.side-art[hidden] { display: none; }
.side-art-left { left: 25.5cqw; }
.side-art-right { right: 24.8cqw; }
.side-illustrations[data-age="0"] .side-art-left { left: 25.1cqw; width: 11cqw; }
.side-illustrations[data-age="0"] .side-art-right { right: 24.5cqw; width: 10cqw; }
.side-illustrations[data-age="1"] .side-art { top: 40.7cqw; width: 10.7cqw; }
.side-illustrations[data-age="2"] .side-art { top: 40.7cqw; width: 10.4cqw; }
.side-illustrations[data-age="3"] .side-art,
.side-illustrations[data-age="4"] .side-art { top: 41.1cqw; }
.side-illustrations[data-age="6"] .side-art,
.side-illustrations[data-age="7"] .side-art,
.side-illustrations[data-age="8"] .side-art { top: 40.5cqw; height: 9.5cqw; }

@keyframes sideArtIn {
    from { opacity: 0; transform: translateY(.7cqw) scale(.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.baby-shadow { fill: rgba(130,92,53,.14); }
.baby-age-scene { display: none; }
.baby-illustration[data-age="0"] .scene-0,
.baby-illustration[data-age="1"] .scene-1,
.baby-illustration[data-age="2"] .scene-2,
.baby-illustration[data-age="3"] .scene-3,
.baby-illustration[data-age="4"] .scene-4,
.baby-illustration[data-age="5"] .scene-5,
.baby-illustration[data-age="6"] .scene-6,
.baby-illustration[data-age="7"] .scene-7,
.baby-illustration[data-age="8"] .scene-8 { display: block; }
.art-skin {
    fill: #ffe1bd;
    stroke: color-mix(in srgb, var(--baby-color) 72%, #8e534a);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.art-fill, .art-toy, .block-stack rect {
    fill: color-mix(in srgb, var(--baby-color) 36%, #fff1cf);
    stroke: color-mix(in srgb, var(--baby-color) 76%, #79524a);
    stroke-width: 2.5;
    stroke-linejoin: round;
}
.art-line {
    fill: none;
    stroke: color-mix(in srgb, var(--baby-color) 55%, #77493f);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.art-limb {
    fill: none;
    stroke: color-mix(in srgb, var(--baby-color) 67%, #9b5d4c);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.art-eye { fill: #65423c; }
.art-cheek { fill: var(--baby-color); opacity: .32; }

.legend {
    position: absolute;
    z-index: 8;
    left: 3.2cqw;
    bottom: 12.2cqw;
    display: grid;
    gap: .65cqw;
    font-size: 1.62cqw;
    font-weight: 700;
}
.legend span { display: flex; align-items: center; gap: .8cqw; }
.legend i { display: block; width: 1.55cqw; height: 1.55cqw; }
.legend-does { background: var(--teal); }
.legend-do { background: var(--coral); }

.age-wheel {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: -33cqw;
    width: 57cqw;
    height: 57cqw;
    filter: drop-shadow(0 -.35cqw .2cqw rgba(104,79,42,.08));
    transition: transform .72s cubic-bezier(.2,.86,.26,1);
    transform: translateX(-50%) rotate(var(--wheel-rotation, 0deg));
}
.age-wheel svg { width: 100%; height: 100%; overflow: visible; }
.age-segment { cursor: pointer; outline: none; transition: opacity .3s ease, transform .45s ease; }
.age-segment path { stroke: rgba(255,248,229,.9); stroke-width: 4; transition: opacity .3s ease, filter .3s ease; }
.age-segment text { fill: rgba(255,255,255,.98); font-family: "Segoe Print", "Comic Sans MS", cursive; font-size: 13px; text-anchor: middle; pointer-events: none; filter: drop-shadow(0 1.3px 1.2px rgba(52,63,58,.78)); }
.age-segment text.age-months { font-size: 9px; }
.age-segment:not(.is-active) { opacity: .72; }
.age-segment.is-active path { filter: brightness(1.035) saturate(1.12) drop-shadow(0 -5px 4px rgba(135,82,56,.14)); }
.age-segment:hover { opacity: 1; }

.period-arrow {
    position: absolute;
    z-index: 9;
    bottom: calc(var(--milestone-tabs-height, 4cqw) + 3.1cqw);
    width: 5.1cqw;
    height: 6cqw;
    padding: 0;
    color: var(--coral);
    cursor: pointer;
    background: transparent;
    border: 0;
    transition: transform .2s ease;
}
.previous-period { left: 12.3cqw; }
.next-period { right: 12.3cqw; }
.previous-period:hover { transform: translateX(-.7cqw); }
.next-period:hover { transform: translateX(.7cqw); }
.period-arrow:focus-visible { outline: 0; filter: drop-shadow(0 0 .35cqw rgba(242,103,111,.72)); }
.period-arrow svg { width: 100%; height: 100%; fill: currentColor; stroke: #fff8e5; stroke-width: 3; }

.milestone-tabs {
    position: absolute;
    z-index: 20;
    right: auto;
    bottom: 0;
    left: 50%;
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    justify-content: center;
    gap: .72cqw;
    width: 100vw;
    height: auto;
    min-height: 0;
    padding: .2cqw 3cqw .24cqw;
    overflow: visible;
    background: rgba(255,251,238,.92);
    border-top: .28cqw solid rgba(255,255,255,.86);
    box-shadow: 0 -.12cqw 0 rgba(171,149,105,.32);
    transform: translateX(-50%);
}

.milestone-tab {
    flex: 0 1 auto;
    min-width: 8cqw;
    max-width: none;
    padding: .52cqw 1.1cqw .45cqw;
    color: color-mix(in srgb, var(--age-color) 64%, #465d62);
    cursor: pointer;
    background: color-mix(in srgb, var(--age-color) 25%, #fff8e8);
    border: 0;
    border-radius: 0 0 1.6cqw 1.6cqw;
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 1.32cqw;
    line-height: 1.16;
    text-align: center;
    white-space: normal;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.milestone-tab:hover { transform: translateY(-.18cqw); }
.milestone-tab.is-active { color: white; background: var(--age-color); font-family: "Trebuchet MS", "Segoe UI", sans-serif; font-weight: 800; }

.milestone-tabs[data-count="7"] {
    flex-wrap: wrap;
    gap: .48cqw .65cqw;
    padding: .2cqw 4.4cqw .28cqw;
}
.milestone-tabs[data-count="7"] .milestone-tab { padding: .44cqw .82cqw .38cqw; font-size: 1.08cqw; }
.content-stage[data-period="15-18-meses"] .milestone-tabs {
    flex-wrap: wrap;
    gap: .48cqw .8cqw;
    padding: .2cqw 12cqw .28cqw;
}
.content-stage[data-period="15-18-meses"] .milestone-tab { padding-block: .46cqw .4cqw; font-size: 1.18cqw; }

.app-toast {
    position: fixed;
    z-index: 100;
    right: 1rem;
    bottom: 1rem;
    padding: .7rem 1rem;
    color: #fff;
    background: #3d3d3d;
    border-radius: .5rem;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
    body { overflow: visible; background: white; }
    .player { display: block; width: auto; height: auto; }
    .stage { width: 100%; box-shadow: none; }
    .fullscreen-button { display: none; }
}
