/* =====================================================================
   Mundo do Igor — Design System (camada visual)
   Carregado depois de child.css. Só aparência e layout: nenhuma regra
   daqui muda fases, respostas, pontos ou navegação.
   Faixas: celular < 768px · tablet 768–1199px · desktop ≥ 1200px
   ===================================================================== */

:root {
    /* Cores */
    --ds-blue: #2b5fe0;
    --ds-blue-deep: #1d46b3;
    --ds-blue-ink: #163a9c;
    --ds-sky: #e9f0ff;
    --ds-sky-2: #dce7ff;
    --ds-yellow: #ffc83d;
    --ds-yellow-deep: #e9a600;
    --ds-yellow-soft: #fff4cf;
    --ds-green: #22c55e;
    --ds-green-soft: #dcfce7;
    --ds-red: #ef4444;
    --ds-orange-soft: #ffedd5;
    --ds-ink: #14254a;
    --ds-muted: #6b7a99;
    --ds-bg: #f3f6fc;
    --ds-card: #ffffff;
    --ds-line: #e3e9f5;

    /* Forma */
    --ds-r-xl: 32px;
    --ds-r-lg: 26px;
    --ds-r-md: 20px;
    --ds-r-sm: 14px;
    --ds-shadow-sm: 0 2px 6px rgba(20, 37, 74, .05);
    --ds-shadow-md: 0 10px 28px rgba(20, 37, 74, .08);
    --ds-shadow-lg: 0 20px 44px rgba(20, 37, 74, .12);
    --ds-ring: 0 0 0 4px rgba(43, 95, 224, .22);

    /* Espaço e movimento */
    --ds-gap: 16px;
    --ds-pad: 16px;
    --ds-sidebar: 248px;
    --ds-content: 1180px;
    --ds-ease: cubic-bezier(.22, 1, .36, 1);
    --ds-spring: cubic-bezier(.34, 1.56, .64, 1);

    /* Compatibilidade com as variáveis antigas */
    --blue: var(--ds-blue);
    --blue-deep: var(--ds-blue-deep);
    --blue-soft: var(--ds-sky);
    --ink: var(--ds-ink);
    --muted: var(--ds-muted);
    --bg: var(--ds-bg);
    --line: var(--ds-line);
    --shadow: var(--ds-shadow-md);
}

body.child-body,
body.child-body .device-stage,
body.child-body .device-frame {
    background: var(--ds-bg);
    color: var(--ds-ink);
}

body.child-body :focus-visible {
    outline: none;
    box-shadow: var(--ds-ring);
}

/* ---------------------------------------------------------------------
   Base de cartões e títulos
   --------------------------------------------------------------------- */
body.child-body .page-head { margin: 4px 0 18px; }

body.child-body .section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3.4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ds-ink);
}

body.child-body .page-lead {
    margin: 6px 0 0;
    color: var(--ds-muted);
    font-size: .95rem;
    font-weight: 600;
}

body.child-body .ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--ds-card);
    color: var(--ds-blue);
    font-weight: 700;
    font-size: .9rem;
    box-shadow: var(--ds-shadow-sm);
}

body.child-body .panel-card,
body.child-body .story-card,
body.child-body .player-card,
body.child-body .world-card,
body.child-body .destination-card,
body.child-body .year-card {
    border: 1px solid rgba(227, 233, 245, .8);
    border-radius: var(--ds-r-lg);
    background: var(--ds-card);
    box-shadow: var(--ds-shadow-md);
}

body.child-body .soft-copy { color: var(--ds-muted); font-weight: 600; }

/* ---------------------------------------------------------------------
   Botões
   --------------------------------------------------------------------- */
body.child-body .kid-button {
    min-height: 56px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--ds-yellow);
    color: var(--ds-ink);
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 6px 0 var(--ds-yellow-deep), 0 12px 24px rgba(233, 166, 0, .25);
    transition: transform .18s var(--ds-spring), box-shadow .18s ease, filter .18s ease;
}

body.child-body .kid-button.secondary {
    background: var(--ds-blue);
    color: #fff;
    box-shadow: 0 6px 0 var(--ds-blue-deep), 0 12px 24px rgba(43, 95, 224, .25);
}

body.child-body .kid-button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--ds-yellow-deep);
}

body.child-body .kid-button.secondary:active { box-shadow: 0 2px 0 var(--ds-blue-deep); }

body.child-body .icon-button {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: var(--ds-card);
    color: var(--ds-ink);
    box-shadow: var(--ds-shadow-md);
}

/* ---------------------------------------------------------------------
   Cabeçalho
   --------------------------------------------------------------------- */
body.child-body .child-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) var(--ds-pad) 8px;
    background: transparent;
}

body.child-body .topbar-hello { gap: 12px; }

body.child-body .topbar-logo {
    height: 52px;
    width: auto;
    max-width: 140px;
    filter: drop-shadow(0 4px 8px rgba(20, 37, 74, .12));
}

body.child-body .topbar-greeting {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.child-body .topbar-wave,
body.child-body .topbar-sub,
body.child-body .topbar-avatar { display: none; }

body.child-body .topbar-words { display: grid; min-width: 0; }

body.child-body .topbar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ds-ink);
}

body.child-body .topbar-sub {
    color: var(--ds-muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.child-body .child-actions { gap: 10px; }

body.child-body .stars-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 46px;
    padding: 0 16px 0 12px;
    border-radius: 999px;
    background: var(--ds-yellow-soft);
    color: var(--ds-ink);
    font-size: 1.08rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(233, 166, 0, .18);
}

body.child-body .stars-pill .ui-icon { color: #f5b301; font-size: 24px !important; }

body.child-body .topbar-avatar {
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--ds-sky);
    box-shadow: 0 0 0 3px #fff, var(--ds-shadow-md);
}

body.child-body .topbar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

/* ---------------------------------------------------------------------
   Navegação inferior (celular e tablet): barra flutuante
   --------------------------------------------------------------------- */
html:not(.await-splash) body.child-body:not(.is-play) .child-bottomnav {
    width: auto;
    margin: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
    padding: 8px;
    gap: 6px;
    border: 1px solid var(--ds-line);
    border-radius: 28px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 32px rgba(20, 37, 74, .12);
    backdrop-filter: blur(10px);
}

body.child-body .child-bottomnav a {
    min-height: 58px;
    gap: 2px;
    border-radius: 20px;
    color: #8a97b2;
    font-size: .72rem;
    font-weight: 700;
    transition: background .2s ease, color .2s ease, transform .2s var(--ds-spring);
}

body.child-body .child-bottomnav a.is-active {
    background: var(--ds-blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(43, 95, 224, .3);
}

/* Menu lateral: só no desktop */
body.child-body .igor-sidebar { display: none; }

/* ---------------------------------------------------------------------
   Seletor de idioma
   --------------------------------------------------------------------- */
body.child-body .lang-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--ds-sky);
}

body.child-body .lang-switch button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ds-muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

body.child-body .lang-switch button.is-active {
    background: #fff;
    color: var(--ds-blue);
    box-shadow: var(--ds-shadow-sm);
}

body.child-body .settings-lang { margin-bottom: 6px; }

/* ---------------------------------------------------------------------
   Início: cartão "Continue jogando"
   --------------------------------------------------------------------- */
body.child-body .home-screen { gap: 18px; }

body.child-body .continue-panel {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 132px !important;
    min-height: 230px;
    padding: 22px 12px 22px 22px;
    overflow: visible;
    isolation: isolate;
    border: 1px solid rgba(220, 231, 255, .9);
    border-radius: var(--ds-r-xl);
    background:
        radial-gradient(circle at 88% 30%, rgba(255, 255, 255, .9) 0 18%, transparent 19%),
        radial-gradient(120% 140% at 100% 0%, #cfe0ff 0%, #e9f0ff 45%, #ffffff 75%);
    box-shadow: var(--ds-shadow-lg);
}

body.child-body .continue-deco {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

body.child-body .deco-star {
    position: absolute;
    color: var(--ds-yellow);
    text-shadow: 0 4px 10px rgba(233, 166, 0, .35);
    line-height: 1;
}

body.child-body .deco-star-a { right: 30%; top: 12%; font-size: 2rem; transform: rotate(-12deg); }
body.child-body .deco-star-b { right: 6%; top: 8%; font-size: 1.2rem; color: #9db8f5; text-shadow: none; }
body.child-body .deco-star-c { right: 4%; bottom: 16%; font-size: 1.5rem; transform: rotate(14deg); }

body.child-body .continue-kicker {
    margin: 0 0 8px;
    color: var(--ds-muted);
    font-size: .85rem;
    font-weight: 700;
}

body.child-body .continue-copy h2 {
    margin: 0 0 10px;
    font-size: clamp(1.9rem, 6.6vw, 3.1rem);
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--ds-ink);
}

body.child-body .continue-copy h2 span { display: block; }
body.child-body .continue-accent { color: var(--ds-blue); }

body.child-body .continue-copy .xp-label {
    margin: 0 0 18px;
    color: var(--ds-muted);
    font-size: .9rem;
}

body.child-body .continue-start {
    min-height: 58px;
    padding: 0 10px 0 26px;
    gap: 14px;
}

body.child-body .start-play {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ds-ink);
    color: #fff;
}

body.child-body .continue-igor {
    width: 150px;
    height: 230px;
    margin: -46px -18px -22px -8px;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 16px 18px rgba(20, 37, 74, .18));
    transition: transform .4s var(--ds-spring);
}

@media (hover: hover) {
    body.child-body .continue-panel:hover .continue-igor { transform: translateY(-4px) rotate(-2deg); }
}

/* ---------------------------------------------------------------------
   Início: destinos (Mapa, Biblioteca, Prêmios, Loja)
   --------------------------------------------------------------------- */
body.child-body .destination-grid { gap: 14px; }

body.child-body .destination-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    gap: 12px 6px;
    min-height: 168px;
    padding: 18px;
}

body.child-body .destination-icon {
    grid-column: 1 / -1;
    width: 72px;
    height: 72px;
    margin: 0;
    border-radius: 22px;
    box-shadow: none;
}

body.child-body .destination-icon .ui-icon { font-size: 40px !important; }

body.child-body .dest-map .destination-icon { background: linear-gradient(160deg, #e3edff, #cddcff); color: #2b5fe0; }
body.child-body .dest-library .destination-icon { background: linear-gradient(160deg, #fff6d6, #ffe7a0); color: #e07a00; }
body.child-body .dest-trophy .destination-icon { background: linear-gradient(160deg, #fff3cc, #ffdf86); color: #e0a100; }
body.child-body .dest-shop .destination-icon { background: linear-gradient(160deg, #dcfbe9, #b9f3d1); color: #16a34a; }

body.child-body .destination-words { display: grid; gap: 4px; align-self: end; min-width: 0; }

body.child-body .destination-card strong {
    font-size: 1.08rem;
    line-height: 1.15;
    color: var(--ds-ink);
}

body.child-body .destination-card small {
    display: none;
    color: var(--ds-muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: none;
}

body.child-body .destination-chevron {
    align-self: end;
    color: #9aa8c4;
    transition: transform .2s var(--ds-spring), color .2s ease;
}

@media (hover: hover) {
    body.child-body .destination-card:hover .destination-chevron { color: var(--ds-blue); transform: translateX(3px); }
}

/* ---------------------------------------------------------------------
   Mapa: mundos
   --------------------------------------------------------------------- */
body.child-body .world-grid { gap: 14px; }

body.child-body .world-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    gap: 12px 6px;
    min-height: 156px;
    padding: 18px;
    overflow: hidden;
}

body.child-body .world-card::before {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--world-color, var(--ds-blue));
    opacity: .1;
}

body.child-body .world-icon {
    grid-column: 1 / -1;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--world-color, var(--ds-blue));
    color: #fff;
    box-shadow: 0 10px 20px rgba(20, 37, 74, .14);
}

body.child-body .world-card strong {
    align-self: end;
    font-size: 1.05rem;
    line-height: 1.15;
}

body.child-body .world-chevron { align-self: end; color: #9aa8c4; }

/* ---------------------------------------------------------------------
   Mundo: anos escolares
   --------------------------------------------------------------------- */
body.child-body .activity-list {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.child-body .year-block {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: var(--ds-r-xl);
    background: var(--ds-card);
    box-shadow: var(--ds-shadow-md);
}

body.child-body .year-block-title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    color: var(--ds-ink);
}

body.child-body .year-grid { display: grid; gap: 10px; }

body.child-body .year-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 74px;
    padding: 10px 14px 10px 10px;
    border-radius: var(--ds-r-md);
    box-shadow: var(--ds-shadow-sm);
    transition: transform .18s var(--ds-spring), box-shadow .18s ease;
}

body.child-body .year-badge {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}

body.child-body .year-1 .year-badge { background: #22c55e; }
body.child-body .year-2 .year-badge { background: #0ea5e9; }
body.child-body .year-3 .year-badge { background: #2b5fe0; }
body.child-body .year-4 .year-badge { background: #8b5cf6; }
body.child-body .year-5 .year-badge { background: #f97316; }

body.child-body .year-copy { display: grid; gap: 2px; }
body.child-body .year-copy strong { font-size: 1.05rem; }
body.child-body .year-copy small { color: var(--ds-muted); font-weight: 600; text-transform: none; }

body.child-body .year-go {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ds-yellow);
    color: var(--ds-ink);
}

@media (hover: hover) {
    body.child-body .year-card:hover { transform: translateY(-2px); box-shadow: var(--ds-shadow-md); }
}

/* ---------------------------------------------------------------------
   Prêmios e loja
   --------------------------------------------------------------------- */
body.child-body .world-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

body.child-body .mundinho-columns { display: grid; gap: 18px; }

body.child-body .panel-card { padding: 20px; }

body.child-body .panel-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 1.2rem;
}

body.child-body .panel-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

body.child-body .panel-icon.is-trophy { background: var(--ds-yellow-soft); color: #e0a100; }
body.child-body .panel-icon.is-shop { background: var(--ds-green-soft); color: #16a34a; }

body.child-body .achievement-grid,
body.child-body .mundinho-room {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.child-body .reward-item {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 6px;
    min-height: 150px;
    padding: 16px 12px;
    border-radius: var(--ds-r-md);
    background: var(--ds-bg);
    text-align: center;
    transition: transform .18s var(--ds-spring);
}

body.child-body .reward-item .reward-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    font-size: 2rem;
    box-shadow: var(--ds-shadow-sm);
}

body.child-body .reward-item strong { font-size: .95rem; line-height: 1.15; }
body.child-body .reward-item span:last-child { color: var(--ds-muted); font-size: .8rem; font-weight: 600; text-transform: none; }
body.child-body .reward-item .reward-cost {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ds-yellow-soft);
    color: var(--ds-ink) !important;
    font-weight: 700 !important;
}

body.child-body .reward-item.locked { opacity: .5; filter: grayscale(.9); }

/* ---------------------------------------------------------------------
   Perfil
   --------------------------------------------------------------------- */
body.child-body .player-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.child-body .player-card {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 18px 12px;
    font: inherit;
    cursor: pointer;
    transition: transform .18s var(--ds-spring), box-shadow .18s ease;
}

body.child-body .player-card.is-current { box-shadow: 0 0 0 4px var(--ds-blue), var(--ds-shadow-md); }

body.child-body .player-avatar {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ds-sky);
    color: var(--ds-blue);
}

body.child-body .player-stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--ds-yellow-soft);
    font-weight: 700;
}

body.child-body .player-stars .ui-icon { color: #f5b301; }

body.child-body .kid-input {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    border: 2px solid var(--ds-line);
    border-radius: var(--ds-r-sm);
    background: #fff;
    color: var(--ds-ink);
    font: inherit;
    font-size: 1.05rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

body.child-body .kid-input:focus { border-color: var(--ds-blue); box-shadow: var(--ds-ring); outline: none; }
body.child-body .field-label { display: block; margin-bottom: 8px; font-weight: 700; }

/* ---------------------------------------------------------------------
   Biblioteca
   --------------------------------------------------------------------- */
body.child-body .story-grid { display: grid; gap: 16px; }
body.child-body .story-card { overflow: hidden; padding: 0; }
body.child-body .story-body { padding: 18px 20px 20px; }
body.child-body .story-kicker { margin: 0; color: var(--ds-blue); font-size: .8rem; font-weight: 700; }
body.child-body .story-text {
    margin: 12px 0 0;
    padding: 14px 16px;
    border-radius: var(--ds-r-sm);
    background: var(--ds-sky);
    color: var(--ds-ink) !important;
    font-size: 1.05rem;
    line-height: 1.55;
    text-transform: none;
}

/* ---------------------------------------------------------------------
   Ajustes (gaveta) e instalar
   --------------------------------------------------------------------- */
body.child-body .settings-card,
body.child-body .install-sheet-card {
    border-radius: var(--ds-r-xl) var(--ds-r-xl) 0 0;
    background: #fff;
    box-shadow: var(--ds-shadow-lg);
}

body.child-body .settings-label {
    margin: 18px 0 8px;
    color: var(--ds-muted);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
}

body.child-body .settings-row {
    min-height: 58px;
    border-radius: var(--ds-r-sm);
    background: var(--ds-bg);
}

/* ---------------------------------------------------------------------
   Tela do jogo
   --------------------------------------------------------------------- */
body.child-body .play-bar {
    gap: 12px;
    padding: 6px 0 12px;
    background: var(--ds-bg);
}

body.child-body .play-progress {
    height: 14px;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--ds-line);
}

/* Muitas fases (até 60 no 5º ano): pedacinhos mais juntos para caber no celular */
body.child-body .play-progress:has(> span:nth-child(16)) { gap: 2px; }
body.child-body .play-progress:has(> span:nth-child(31)) { gap: 1px; padding: 3px 4px; }

body.child-body .play-progress span {
    min-width: 0;
    flex: 1;
    border-radius: 999px;
    background: #e3e9f5;
    transition: background .3s ease;
}

body.child-body .play-progress span.is-done { background: var(--ds-green); }
body.child-body .play-progress span.is-now { background: var(--ds-yellow); box-shadow: 0 0 0 2px rgba(255, 200, 61, .35); }

body.child-body .play-screen,
body.child-body .play-board,
body.child-body .play-stage,
body.child-body .game-area { min-width: 0; max-width: 100%; }

body.child-body .play-stage {
    border: 1px solid rgba(227, 233, 245, .8);
    border-radius: var(--ds-r-xl);
    background: var(--ds-card);
    box-shadow: var(--ds-shadow-lg);
}

body.child-body .option-button,
body.child-body .memory-card,
body.child-body .sequence-chip {
    border: 1px solid rgba(227, 233, 245, .9);
    border-radius: var(--ds-r-md);
    box-shadow: var(--ds-shadow-md);
}

body.child-body .prompt-sample {
    border-radius: var(--ds-r-lg);
    background: linear-gradient(180deg, #f6f9ff, #eef3fd);
}

body.child-body .play-guide img {
    filter: drop-shadow(0 12px 16px rgba(20, 37, 74, .16));
}

body.child-body .igor-says {
    border-radius: var(--ds-r-md);
    background: #fff;
    box-shadow: var(--ds-shadow-md);
}

/* Vitória */
body.child-body .victory-card,
.victory-overlay .victory-card {
    border-radius: var(--ds-r-xl);
    box-shadow: var(--ds-shadow-lg);
}

/* Celular estreito: o cumprimento inteiro cabe ao lado do logo */
@media (max-width: 430px) {
    body.child-body .child-topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
    body.child-body .topbar-hello { gap: 8px; }
    body.child-body .topbar-logo { height: 44px; max-width: 96px; }
    body.child-body .topbar-title { font-size: 1rem; white-space: normal; line-height: 1.1; }
    body.child-body .child-actions { gap: 6px; }
    body.child-body .stars-pill { min-height: 42px; padding: 0 12px 0 9px; font-size: 1rem; }
    body.child-body .stars-pill .ui-icon { font-size: 20px !important; }
    body.child-body .gear-button { width: 42px; min-width: 42px; height: 42px; min-height: 42px; }
}

/* =====================================================================
   Tablet — 768px a 1199px
   ===================================================================== */
@media (min-width: 768px) {
    :root { --ds-pad: 28px; }

    /* Largura total no tablet: o conteúdo usa a tela inteira, só com a margem lateral */
    body.child-body .child-topbar,
    body.child-body .child-main {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.child-body .child-main { padding: 8px var(--ds-pad) 28px; }
    body.child-body .topbar-avatar { display: block; }
    body.child-body .topbar-title { font-size: 1.35rem; }

    body.child-body .continue-panel {
        grid-template-columns: minmax(0, 1fr) 250px !important;
        min-height: 300px;
        padding: 34px 20px 34px 40px;
    }

    body.child-body .continue-copy h2 { font-size: 3.2rem; }

    body.child-body .continue-igor {
        width: 260px;
        height: 340px;
        margin: -70px -24px -34px 0;
    }

    body.child-body .destination-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

    body.child-body .destination-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        justify-items: center;
        text-align: center;
        min-height: 200px;
        padding: 22px 14px;
    }

    body.child-body .destination-icon { grid-column: auto; width: 84px; height: 84px; border-radius: 26px; }
    body.child-body .destination-icon .ui-icon { font-size: 46px !important; }
    body.child-body .destination-card small { display: block; }
    body.child-body .destination-chevron { display: none; }

    body.child-body .world-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    body.child-body .year-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    body.child-body .achievement-grid,
    body.child-body .mundinho-room { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.child-body .player-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.child-body .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

    html:not(.await-splash) body.child-body:not(.is-play) .child-bottomnav {
        width: min(640px, calc(100% - 48px));
        margin: 0 auto calc(14px + env(safe-area-inset-bottom, 0px));
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Respostas maiores no tablet: mais fáceis de ver e de tocar */
    body.child-body .option-grid .option-button { min-height: 170px; font-size: 1.15rem; }
    body.child-body .option-grid.dense-grid .option-button { min-height: 130px; }
    body.child-body .option-button .symbol-option { font-size: 3.6rem; }
    body.child-body .option-button .shape-art { width: 96px; height: 96px; }
    body.child-body .prompt-sample { min-height: 170px; }
    body.child-body .prompt-sample .symbol-option { font-size: 5rem; }
    body.child-body .pattern-cell { width: 66px; height: 66px; }
    body.child-body .pattern-option-art { width: 92px; height: 92px; }
    body.child-body .memory-card { min-height: 150px; font-size: 2.8rem; }

    /* Jogo no tablet: área maior e Igor ao lado */
    body.child-body.is-play .child-main {
        width: 100% !important;
    }

    /* Ajustes viram janela centralizada, com o fundo escurecido */
    body.child-body .settings-drawer:not([hidden]) {
        display: grid;
        place-items: center;
        padding: 24px;
        background: rgba(20, 37, 74, .45);
        backdrop-filter: blur(4px);
    }

    body.child-body .settings-card {
        width: min(480px, 100%);
        min-height: 0;
        max-height: calc(100% - 16px);
        overflow: auto;
        border-radius: var(--ds-r-xl);
    }

    body.child-body .install-sheet-card {
        width: min(480px, calc(100% - 48px));
        border-radius: var(--ds-r-xl);
    }
}

/* Tablet em paisagem / telas médias: jogo com Igor ao lado */
@media (min-width: 900px) {
    body.child-body .play-board {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 240px !important;
        align-items: start;
        gap: 20px;
    }

    body.child-body .play-guide {
        position: sticky;
        top: 8px;
        display: grid;
        justify-items: center;
        gap: 12px;
        padding: 20px 16px;
        border-radius: var(--ds-r-xl);
        background: linear-gradient(180deg, #e9f0ff, #fff);
        box-shadow: var(--ds-shadow-md);
        text-align: center;
    }

    body.child-body .play-guide img { width: 170px; }
}

/* =====================================================================
   Desktop — a partir de 1200px: menu lateral + cabeçalho completo
   ===================================================================== */
@media (min-width: 1024px) {
    body.child-body .device-frame {
        display: grid !important;
        grid-template-columns: var(--ds-sidebar) minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas: "top top" "side main";
    }

    body.child-body .igor-loader,
    body.child-body .settings-drawer,
    body.child-body .install-sheet { grid-area: 1 / 1 / -1 / -1; }

    body.child-body .child-topbar {
        grid-area: top;
        width: 100% !important;
        max-width: none;
        margin: 0 !important;
        padding: 18px 32px 12px 24px;
    }

    body.child-body .topbar-hello { gap: 24px; }
    body.child-body .topbar-logo { height: 70px; max-width: 200px; width: calc(var(--ds-sidebar) - 48px); object-fit: contain; object-position: left center; }

    body.child-body .topbar-greeting {
        padding: 10px 22px 10px 14px;
        border-radius: 999px;
        background: #fff;
        box-shadow: var(--ds-shadow-md);
    }

    body.child-body .topbar-wave {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--ds-yellow-soft);
        font-size: 1.35rem;
    }

    body.child-body .topbar-sub { display: block; }
    body.child-body .topbar-title { font-size: 1.45rem; }

    body.child-body .igor-sidebar {
        grid-area: side;
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin: 8px 0 24px 24px;
        padding: 14px;
        overflow: auto;
        border: 1px solid var(--ds-line);
        border-radius: var(--ds-r-xl);
        background: #fff;
        box-shadow: var(--ds-shadow-md);
    }

    body.child-body .igor-sidebar a {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 52px;
        padding: 0 16px;
        border-radius: 16px;
        color: #5b6b8c;
        font-weight: 700;
        font-size: .98rem;
        transition: background .2s ease, color .2s ease, transform .2s var(--ds-spring);
    }

    body.child-body .igor-sidebar a .ui-icon { font-size: 24px !important; }
    body.child-body .igor-sidebar a:hover { background: var(--ds-sky); color: var(--ds-blue); }

    body.child-body .igor-sidebar a.is-active {
        background: var(--ds-blue);
        color: #fff;
        box-shadow: 0 10px 20px rgba(43, 95, 224, .28);
    }

    body.child-body .sidebar-lang { margin-top: auto; }

    body.child-body .child-main {
        grid-area: main;
        width: 100% !important;
        max-width: none;
        margin: 0 !important;
        padding: 8px 32px 40px;
        justify-self: stretch;
    }

    html:not(.await-splash) body.child-body:not(.is-play) .child-bottomnav { display: none !important; }

    body.child-body .continue-panel {
        grid-template-columns: minmax(0, 1fr) 320px !important;
        min-height: 330px;
        padding: 44px 30px 44px 52px;
    }

    body.child-body .continue-copy h2 { font-size: 3.8rem; }
    body.child-body .continue-kicker { font-size: .95rem; }

    body.child-body .continue-igor {
        width: 320px;
        height: 400px;
        margin: -84px -30px -44px 0;
    }

    body.child-body .destination-card { min-height: 220px; }
    body.child-body .world-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    body.child-body .year-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

    body.child-body .year-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        justify-items: center;
        text-align: center;
        min-height: 190px;
        padding: 18px 12px;
    }

    body.child-body .mundinho-columns { grid-template-columns: 1.4fr 1fr !important; align-items: start; }
    body.child-body .achievement-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.child-body .mundinho-room { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.child-body .player-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    body.child-body .profile-screen { grid-template-columns: 1fr 1fr; align-items: start; }
    body.child-body .profile-screen > :not(.profile-form) { grid-column: 1 / -1; }
    body.child-body .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    body.child-body .story-card.is-featured { grid-column: span 1; }

    /* Jogo: foco total, sem menu, conteúdo largo e centralizado */
    body.child-body.is-play .device-frame { grid-template-areas: "main main" "main main"; }
    body.child-body.is-play .igor-sidebar { display: none; }
    body.child-body.is-play .child-main {
        grid-area: 1 / 1 / -1 / -1;
        width: 100% !important;
        max-width: none;
        padding: 20px 40px 40px;
    }

    body.child-body.is-play .play-screen { max-width: 1500px; margin: 0 auto; }

    body.child-body .play-board { grid-template-columns: minmax(0, 1fr) 280px !important; gap: 24px; }
    body.child-body .play-guide img { width: 200px; }
}

/* =====================================================================
   "Mais contraste": cores mais fortes e bordas visíveis
   ===================================================================== */
html.high-contrast body.child-body {
    --ds-ink: #000;
    --ds-muted: #1f2937;
    --ds-blue: #12357a;
    --ds-blue-deep: #0b2257;
    --ds-line: #111;
    --ds-bg: #fff;
}

html.high-contrast body.child-body .panel-card,
html.high-contrast body.child-body .world-card,
html.high-contrast body.child-body .destination-card,
html.high-contrast body.child-body .year-card,
html.high-contrast body.child-body .option-button,
html.high-contrast body.child-body .play-stage,
html.high-contrast body.child-body .player-card,
html.high-contrast body.child-body .story-card {
    border: 2px solid #111;
    box-shadow: none;
}

/* =====================================================================
   Movimento reduzido e modo calmo: sem animações decorativas
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    body.child-body *,
    body.child-body *::before,
    body.child-body *::after { transition: none !important; animation: none !important; }
}

/* =====================================================================
   Ícones e tipografia refinados
   ===================================================================== */
/* Blocos de ícone com degradê suave e brilho no topo */
body.child-body .world-icon {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: var(--world-color, var(--ds-blue));
    background: linear-gradient(150deg, color-mix(in srgb, var(--world-color, #2b5fe0) 62%, #fff) 0%, var(--world-color, #2b5fe0) 70%);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 10px 20px color-mix(in srgb, var(--world-color, #2b5fe0) 35%, transparent);
}

body.child-body .world-icon .ui-icon {
    font-size: 40px !important;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .15));
}

body.child-body .destination-icon {
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 8px 18px rgba(20, 37, 74, .08);
}

/* Textos de apoio: peso médio para não competir com os títulos */
body.child-body .page-lead,
body.child-body .continue-kicker,
body.child-body .xp-label { font-weight: 600; letter-spacing: .01em; }

@media (min-width: 1024px) {
    body.child-body .section-title { font-size: 2.6rem; }
    body.child-body .page-lead { font-size: 1.08rem; }
    body.child-body .world-card { min-height: 190px; padding: 22px; }
    body.child-body .world-icon { width: 84px; height: 84px; border-radius: 26px; }
    body.child-body .world-icon .ui-icon { font-size: 48px !important; }
    body.child-body .world-card strong { font-size: 1.25rem; }
    body.child-body .destination-card strong { font-size: 1.25rem; }
    body.child-body .destination-card small { font-size: .95rem; }
    body.child-body .igor-sidebar a { min-height: 56px; font-size: 1.05rem; }
    body.child-body .igor-sidebar a .ui-icon { font-size: 26px !important; }
    body.child-body .year-copy strong { font-size: 1.2rem; }
    body.child-body .year-badge { width: 64px; height: 64px; font-size: 1.25rem; }
}

/* Bandeiras nos botões de idioma */
body.child-body .lang-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.child-body .lang-flag {
    width: 28px;
    height: 20px;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(20, 37, 74, .12), 0 2px 4px rgba(20, 37, 74, .12);
    filter: saturate(.75) opacity(.7);
    transition: filter .2s ease, transform .2s var(--ds-spring);
}

body.child-body .lang-switch button.is-active .lang-flag { filter: none; transform: scale(1.08); }

/* =====================================================================
   Dicas de primeiro acesso (assets/js/coach.js)
   ===================================================================== */
.coach-bubble {
    position: fixed;
    z-index: 55; /* abaixo dos Ajustes (60), do aviso de instalar (90) e do carregamento (100) */
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 10px 12px;
    padding: 14px 16px;
    border: 3px solid var(--ds-yellow);
    border-radius: 24px;
    background: #fff;
    color: var(--ds-ink);
    box-shadow: 0 18px 40px rgba(20, 37, 74, .25);
    animation: coach-in .35s var(--ds-spring);
}

/* Setinha apontando para o item */
.coach-bubble::before {
    content: '';
    position: absolute;
    top: -11px;
    left: calc(var(--arrow-x, 50%) - 9px);
    width: 18px;
    height: 18px;
    border-top: 3px solid var(--ds-yellow);
    border-left: 3px solid var(--ds-yellow);
    background: #fff;
    transform: rotate(45deg);
}

.coach-bubble.is-above::before {
    top: auto;
    bottom: -11px;
    transform: rotate(225deg);
}

.coach-face {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 30%;
    background: var(--ds-sky);
}

.coach-text {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.coach-ok {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--ds-blue);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--ds-blue-deep);
}

/* Anel amarelo pulsando no item que a criança deve tocar */
.coach-target {
    position: relative;
    z-index: 2;
    animation: coach-ring 1.6s ease-in-out infinite;
}

@keyframes coach-ring {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 200, 61, .95), 0 0 0 10px rgba(255, 200, 61, .35); }
    50% { box-shadow: 0 0 0 4px rgba(255, 200, 61, .95), 0 0 0 18px rgba(255, 200, 61, 0); }
}

@keyframes coach-in {
    from { transform: translateY(8px) scale(.96); }
    to { transform: none; }
}

/* Sem animação no modo calmo / menos animações: o anel fica parado */
html.calm-mode .coach-target,
html.reduced-motion .coach-target {
    animation: none !important;
    box-shadow: 0 0 0 4px rgba(255, 200, 61, .95) !important;
}

@media (prefers-reduced-motion: reduce) {
    .coach-target { animation: none !important; box-shadow: 0 0 0 4px rgba(255, 200, 61, .95) !important; }
}

body.child-body .coach-reset-mark { visibility: hidden; color: var(--ds-green); font-weight: 700; }
body.child-body [data-coach-reset].is-done .coach-reset-mark { visibility: visible; }

/* =====================================================================
   Carregamento: Igor animado, sem cartão
   Quica devagar (andando no lugar) e troca suavemente de pose:
   andando → acenando → pulando. Sem animação no modo calmo.
   ===================================================================== */
body.child-body .igor-loader-v2 {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    background: radial-gradient(circle at 50% 42%, #ffffff 0%, #eaf1ff 45%, #d6e4ff 100%);
}

body.child-body .igor-loader-v2[hidden] { display: none !important; }

.loader-igor-stage {
    position: relative;
    width: 220px;
    height: 250px;
}

.loader-glow {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 214, 102, .55) 0%, rgba(255, 214, 102, 0) 70%);
    transform: translate(-50%, -50%);
}

.loader-bounce {
    position: absolute;
    inset: 0 0 16px;
    animation: loader-bounce .9s ease-in-out infinite alternate;
    transform-origin: 50% 100%;
}

.loader-pose {
    position: absolute;
    left: 50%;
    bottom: 0;
    height: 100%;
    width: auto;
    transform: translateX(-50%);
    filter: drop-shadow(0 10px 14px rgba(20, 37, 74, .16));
}

/* Troca de pose: cada uma aparece por 1/3 do ciclo, com transição suave */
.loader-pose-b,
.loader-pose-c { opacity: 0; }
.loader-pose-a { animation: loader-pose 3.6s ease-in-out infinite; }
.loader-pose-b { animation: loader-pose 3.6s ease-in-out -2.4s infinite; }
.loader-pose-c { animation: loader-pose 3.6s ease-in-out -1.2s infinite; height: 90%; }

.loader-shadow {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 120px;
    height: 16px;
    border-radius: 50%;
    background: rgba(20, 37, 74, .16);
    transform: translateX(-50%);
    animation: loader-shadow .9s ease-in-out infinite alternate;
}

.loader-spark {
    position: absolute;
    color: #ffc83d;
    font-size: 1.4rem;
    line-height: 1;
    text-shadow: 0 3px 8px rgba(233, 166, 0, .35);
    animation: loader-twinkle 1.8s ease-in-out infinite;
}

.loader-spark-a { left: 4px; top: 30px; }
.loader-spark-b { right: 0; top: 70px; font-size: 1rem; animation-delay: .6s; color: #8fb0f5; text-shadow: none; }
.loader-spark-c { right: 22px; top: 0; animation-delay: 1.2s; }

.loader-caption {
    margin: 0;
    color: var(--ds-ink);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.loader-dots-v2 { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.loader-dots-v2 span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ds-blue);
    animation: loader-dot 1s ease-in-out infinite;
}
.loader-dots-v2 span:nth-child(2) { animation-delay: .15s; background: var(--ds-yellow); }
.loader-dots-v2 span:nth-child(3) { animation-delay: .3s; background: var(--ds-green); }

@keyframes loader-bounce {
    from { transform: translateY(0) rotate(-1.5deg); }
    to { transform: translateY(-14px) rotate(1.5deg); }
}

@keyframes loader-shadow {
    from { transform: translateX(-50%) scale(1); opacity: 1; }
    to { transform: translateX(-50%) scale(.78); opacity: .6; }
}

@keyframes loader-pose {
    0%, 28% { opacity: 1; }
    34%, 94% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes loader-twinkle {
    0%, 100% { transform: scale(.7) rotate(0deg); opacity: .4; }
    50% { transform: scale(1.15) rotate(20deg); opacity: 1; }
}

@keyframes loader-dot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (min-width: 768px) {
    .loader-igor-stage { width: 260px; height: 300px; }
    .loader-caption { font-size: 1.3rem; }
}

/* Modo calmo / menos animações: Igor parado acenando, sem pulos */
html.calm-mode .loader-pose-a,
html.reduced-motion .loader-pose-a { opacity: 0 !important; }
html.calm-mode .loader-pose-b,
html.reduced-motion .loader-pose-b { opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
    .loader-pose-a { opacity: 0 !important; }
    .loader-pose-b { opacity: 1 !important; }
}

/* Reações do Igor ao lado do jogo */
body.child-body .guide-igor { transform-origin: 50% 100%; }
body.child-body .guide-igor.is-cheer { animation: igor-cheer .7s var(--ds-spring); }
body.child-body .guide-igor.is-headshake { animation: igor-headshake .6s ease-in-out; }

@keyframes igor-cheer {
    0% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-18px) scale(1.06); }
    70% { transform: translateY(0) scale(.98, 1.02); }
    100% { transform: none; }
}

@keyframes igor-headshake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(4deg); }
    75% { transform: rotate(-2deg); }
}

body.child-body .victory-igor { width: min(240px, 60vw); height: auto; animation: igor-cheer 1.2s var(--ds-spring) infinite alternate; }
html.calm-mode body.child-body .victory-igor,
html.reduced-motion body.child-body .victory-igor { animation: none; }

/* Tocar no carregamento pula a espera (assets/js/loader.js) */
body.child-body .igor-loader-v2 { cursor: pointer; }

/* =====================================================================
   MAPA DE ILHAS (Início e Mapa do mundo): céu, ilhas, caminho, Igor
   ===================================================================== */

/* Céu com nuvens nas páginas do mapa */
body.child-body.is-sky,
body.child-body.is-sky .device-stage,
body.child-body.is-sky .device-frame {
    background: linear-gradient(180deg, #3d9bff 0%, #7cc2ff 42%, #cfe9ff 100%);
}

body.child-body.is-sky .device-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 160px 52px at 12% 18%, rgba(255, 255, 255, .85), transparent 70%),
        radial-gradient(ellipse 110px 40px at 18% 14%, rgba(255, 255, 255, .7), transparent 70%),
        radial-gradient(ellipse 220px 64px at 62% 10%, rgba(255, 255, 255, .7), transparent 70%),
        radial-gradient(ellipse 180px 56px at 88% 32%, rgba(255, 255, 255, .75), transparent 70%),
        radial-gradient(ellipse 260px 70px at 40% 62%, rgba(255, 255, 255, .45), transparent 70%),
        radial-gradient(ellipse 300px 80px at 92% 88%, rgba(255, 255, 255, .6), transparent 70%),
        radial-gradient(ellipse 260px 80px at 6% 92%, rgba(255, 255, 255, .6), transparent 70%);
}

body.child-body.is-sky .child-topbar,
body.child-body.is-sky .child-main,
body.child-body.is-sky .child-bottomnav { position: relative; z-index: 1; }

body.child-body.is-sky .sky-head .section-title,
body.child-body.is-sky .sky-head .page-lead {
    color: #fff;
    text-shadow: 0 2px 10px rgba(20, 37, 74, .35);
}

.island-map {
    position: relative;
    padding: 10px 0 18px;
}

.island-path {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    overflow: visible;
    pointer-events: none;
}

.island-path path {
    fill: none;
    stroke: #f0fbff;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 1 13;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, .95));
    animation: path-march 8s linear infinite;
}

@keyframes path-march { to { stroke-dashoffset: -280; } }

.island-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
}

/* Celular: zigue-zague (1 e 2, desce, 4 e 3, desce, 5 e 6 ...) */
.island-node:nth-child(1) { grid-area: 1 / 1; }
.island-node:nth-child(2) { grid-area: 1 / 2; margin-top: 34px; }
.island-node:nth-child(3) { grid-area: 2 / 2; margin-top: 34px; }
.island-node:nth-child(4) { grid-area: 2 / 1; }
.island-node:nth-child(5) { grid-area: 3 / 1; }
.island-node:nth-child(6) { grid-area: 3 / 2; margin-top: 34px; }
.island-node:nth-child(7) { grid-area: 4 / 2; margin-top: 34px; }
.island-node:nth-child(8) { grid-area: 4 / 1; }

.island-node {
    position: relative;
    display: grid;
    justify-items: center;
    min-width: 0;
    color: #fff;
    animation: island-float 5.5s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

@keyframes island-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.island-art {
    width: 100%;
    max-width: 240px;
    height: auto;
    margin-top: -6px;
    filter: drop-shadow(0 18px 16px rgba(20, 37, 74, .22));
    transition: transform .25s var(--ds-spring);
}

@media (hover: hover) {
    .island-node:hover .island-art { transform: translateY(-8px) scale(1.05); }
}

.island-node:active .island-art { transform: scale(.96); }

/* Rótulo do mundo: pílula azul com o ícone colorido */
.island-label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 4px 14px 4px 4px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    background: linear-gradient(180deg, #2f66f0, #1d46b3);
    box-shadow: 0 8px 18px rgba(20, 37, 74, .28);
}

.island-icon {
    flex: none;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--world-color, #2b5fe0);
    color: #fff;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 0 0 3px #fff;
}

.island-label strong {
    min-width: 0;
    font-size: .74rem;
    line-height: 1.1;
    text-align: left;
    color: #fff;
}

/* Selo "Continuar" na ilha do último mundo jogado */
.island-continue {
    position: absolute;
    left: 50%;
    bottom: 22%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    background: var(--ds-yellow);
    color: var(--ds-ink);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 0 var(--ds-yellow-deep), 0 10px 18px rgba(20, 37, 74, .25);
    transform: translateX(-50%);
    animation: continue-pulse 1.8s ease-in-out infinite;
}

@keyframes continue-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.07); }
}

/* Balão de ar decorativo */
.sky-balloon {
    position: absolute;
    right: 2%;
    top: -14px;
    z-index: 0;
    width: 42px;
    animation: balloon-float 7s ease-in-out infinite;
}

.sky-balloon svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgba(20, 37, 74, .2)); }

@keyframes balloon-float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-14px) rotate(3deg); }
}

/* Igor apontando para as ilhas (aparece a partir de 1024px) */
.map-igor { display: none; }

body.child-body .dest-row .destination-card { min-height: 128px; }

/* =====================================================================
   Topo: rosto do Igor no cumprimento e idioma com bandeira
   ===================================================================== */
body.child-body .topbar-face {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ds-sky);
    box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(20, 37, 74, .15);
}

body.child-body .lang-menu { position: relative; display: none; }

body.child-body .lang-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 10px 0 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--ds-ink);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
    box-shadow: var(--ds-shadow-md);
}

body.child-body .lang-menu summary::-webkit-details-marker { display: none; }
body.child-body .lang-menu[open] summary .ui-icon { transform: rotate(180deg); }

body.child-body .lang-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    display: grid;
    gap: 4px;
    min-width: 190px;
    padding: 6px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--ds-shadow-lg);
}

body.child-body .lang-menu-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ds-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

body.child-body .lang-menu-list button:hover,
body.child-body .lang-menu-list button.is-active { background: var(--ds-sky); color: var(--ds-blue); }

/* =====================================================================
   Menu lateral como gaveta (celular e tablet em pé)
   ===================================================================== */
body.child-body .menu-button { display: inline-grid; place-items: center; flex: none; }
body.child-body .sidebar-head { display: none; }
body.child-body .sidebar-settings { display: none; }
body.child-body .menu-scrim { display: none; }

@media (max-width: 1023px) {
    body.child-body .igor-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 70;
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: min(300px, 86vw);
        padding: calc(16px + env(safe-area-inset-top, 0px)) 14px 18px;
        overflow: auto;
        border-radius: 0 28px 28px 0;
        background: #fff;
        box-shadow: var(--ds-shadow-lg);
        transform: translateX(-105%);
        transition: transform .3s var(--ds-ease);
    }

    body.child-body.menu-open .igor-sidebar { transform: none; }

    body.child-body .menu-scrim:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 65;
        display: block;
        background: rgba(20, 37, 74, .4);
        backdrop-filter: blur(3px);
    }

    body.child-body .sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    body.child-body .sidebar-head img { height: 52px; width: auto; }

    body.child-body .igor-sidebar a,
    body.child-body .sidebar-settings {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 54px;
        padding: 0 16px;
        border: 0;
        border-radius: 16px;
        background: transparent;
        color: #5b6b8c;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }

    body.child-body .igor-sidebar a.is-active { background: var(--ds-blue); color: #fff; }
    body.child-body .sidebar-lang { margin-top: auto; }
}

@media (min-width: 1024px) {
    body.child-body .menu-button { display: none; }
}

/* Celular: [menu] [logo] .... [estrelas][avatar] e o cumprimento numa linha só dele */
@media (max-width: 767px) {
    body.child-body:not(.is-play) .child-topbar { flex-wrap: wrap; row-gap: 10px; }
    body.child-body .topbar-hello { display: contents; }
    body.child-body .menu-button { order: 0; }
    body.child-body .topbar-logo { order: 1; margin: 0 auto 0 4px; height: 50px; max-width: 110px; }
    body.child-body .child-actions { order: 2; }
    body.child-body .gear-button { display: none; }
    body.child-body .topbar-avatar { display: block; width: 42px; height: 42px; }
    body.child-body .topbar-greeting {
        order: 3;
        flex: 1 0 100%;
        padding: 8px 18px 8px 8px;
        border-radius: 999px;
        background: #fff;
        box-shadow: var(--ds-shadow-md);
    }
    body.child-body .topbar-sub { display: block; }
    body.child-body .topbar-title { font-size: 1.1rem; }
    body.child-body .destination-card small { display: none; }
}

/* =====================================================================
   Tablet e desktop: ilhas em duas fileiras, Igor ao lado, cards em linha
   ===================================================================== */
@media (min-width: 768px) {
    body.child-body .lang-menu { display: block; }

    .island-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px 18px;
    }

    /* Fileira de cima vai de 1 a 4; a de baixo volta de 5 a 8 */
    .island-node:nth-child(1) { grid-area: 1 / 1; margin-top: 10px; }
    .island-node:nth-child(2) { grid-area: 1 / 2; margin-top: 46px; }
    .island-node:nth-child(3) { grid-area: 1 / 3; margin-top: 0; }
    .island-node:nth-child(4) { grid-area: 1 / 4; margin-top: 36px; }
    .island-node:nth-child(5) { grid-area: 2 / 4; margin-top: 18px; }
    .island-node:nth-child(6) { grid-area: 2 / 3; margin-top: 40px; }
    .island-node:nth-child(7) { grid-area: 2 / 2; margin-top: 8px; }
    .island-node:nth-child(8) { grid-area: 2 / 1; margin-top: 36px; }

    .island-label strong { font-size: .82rem; }
    .sky-balloon { width: 56px; right: 1%; top: -30px; }

    body.child-body .dest-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

    body.child-body .dest-row .destination-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: auto;
        align-items: center;
        justify-items: start;
        gap: 14px;
        min-height: 96px;
        padding: 14px 16px;
        text-align: left;
        border-radius: 24px;
    }

    body.child-body .dest-row .destination-icon { grid-column: auto; width: 64px; height: 64px; border-radius: 20px; }
    body.child-body .dest-row .destination-icon .ui-icon { font-size: 36px !important; }
    body.child-body .dest-row .destination-words { align-self: center; }
    body.child-body .dest-row .destination-card small { display: block; }

    body.child-body .dest-row .destination-chevron {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--ds-sky);
        color: var(--ds-blue);
    }
}

@media (min-width: 1024px) {
    /* Igor apontando para as ilhas, de pé numa beirada de grama */
    .map-igor {
        position: absolute;
        left: 0;
        bottom: 0;
        z-index: 2;
        display: block;
        width: 21%;
        max-width: 280px;
        pointer-events: none;
    }

    .map-igor img {
        position: relative;
        z-index: 1;
        display: block;
        width: 100%;
        height: auto;
        filter: drop-shadow(0 16px 16px rgba(20, 37, 74, .25));
        animation: igor-idle 4s ease-in-out infinite;
        transform-origin: 50% 100%;
    }

    .map-ledge {
        position: absolute;
        left: -20%;
        right: -20%;
        bottom: -14px;
        height: 46px;
        border-radius: 50%;
        background: linear-gradient(180deg, #7fdc5b, #3fae3c);
        box-shadow: 0 14px 0 #a7703f, 0 20px 30px rgba(20, 37, 74, .25);
    }

    .island-map .island-grid { margin-left: 22%; }

    body.child-body .dest-row { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; margin-top: 16px; }
}

@keyframes igor-idle {
    0%, 100% { transform: rotate(0) translateY(0); }
    50% { transform: rotate(-1.5deg) translateY(-4px); }
}

/* Sem movimento no modo calmo / menos animações */
html.calm-mode .island-node,
html.reduced-motion .island-node,
html.calm-mode .island-path path,
html.reduced-motion .island-path path,
html.calm-mode .sky-balloon,
html.reduced-motion .sky-balloon,
html.calm-mode .map-igor img,
html.reduced-motion .map-igor img,
html.calm-mode .island-continue,
html.reduced-motion .island-continue { animation: none !important; }

/* Ilhas maiores e rótulo colado na ilha em telas largas */
.island-art { margin-top: -16px; }

@media (min-width: 1024px) {
    .island-art { max-width: 300px; margin-top: -22px; }
    .island-icon { width: 44px; height: 44px; }
    .island-label { padding: 5px 18px 5px 5px; }
    .island-label strong { font-size: .92rem; }
    .island-grid { gap: 0 24px; }
}

@media (min-width: 1600px) {
    .island-art { max-width: 340px; }
    .island-label strong { font-size: 1rem; }
}

/* Barra inferior com 5 itens (Início, Jogos, Biblioteca, Prêmios, Perfil) */
html:not(.await-splash) body.child-body:not(.is-play) .child-bottomnav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

body.child-body .child-bottomnav a { font-size: .66rem; padding-left: 0; padding-right: 0; }

/* Celular: rótulos das ilhas mais compactos */
@media (max-width: 767px) {
    .island-label { gap: 6px; padding: 3px 10px 3px 3px; border-width: 1.5px; }
    .island-icon { width: 30px; height: 30px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 0 0 2px #fff; }
    .island-icon .ui-icon { font-size: 18px !important; }
    .island-label strong { font-size: .64rem; }
    .island-continue { font-size: .72rem; padding: 5px 12px 5px 8px; }
}

/* 1024–1279px (tablet deitado com menu lateral): pouco espaço.
   O Igor sai do mapa, as ilhas usam a largura toda e os cards ficam 2 x 2. */
@media (min-width: 1024px) and (max-width: 1279px) {
    .map-igor { display: none; }
    .island-map .island-grid { margin-left: 0; }
    body.child-body .dest-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .island-label { padding-right: 10px; }
    .island-label strong { font-size: .68rem; }
}

.island-label strong { overflow-wrap: normal; word-break: normal; }

/* O menu de idioma do topo abre por cima das ilhas */
body.child-body .child-topbar { position: relative; z-index: 5; }
body.child-body.is-sky .child-topbar { z-index: 5; }

/* =====================================================================
   Mapa sem barra de rolagem
   Tablet/desktop: Início e Mapa ocupam exatamente a altura da tela; as duas
   fileiras de ilhas dividem o espaço e as ilhas se ajustam à altura.
   Celular: continua rolando (8 ilhas não cabem), mas sem a barra aparecendo.
   ===================================================================== */
body.child-body.is-sky .child-main { scrollbar-width: none; }
body.child-body.is-sky .child-main::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
    body.child-body.is-sky .child-main {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding-bottom: 16px;
    }

    body.child-body.is-sky .home-map,
    body.child-body.is-sky .map-screen {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    body.child-body.is-sky .map-screen .page-head { margin: 0; }

    body.child-body.is-sky .island-map {
        flex: 1;
        min-height: 0;
        padding: 0;
    }

    body.child-body.is-sky .island-grid {
        height: 100%;
        grid-template-rows: repeat(2, minmax(0, 1fr));
        row-gap: 0;
    }

    /* Cada ilha ocupa a sua célula; o desenho encolhe para caber na altura */
    body.child-body.is-sky .island-node {
        min-height: 0;
        height: 100%;
        margin-top: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    /* Desencontro das ilhas, sem empurrar a altura */
    body.child-body.is-sky .island-node:nth-child(2),
    body.child-body.is-sky .island-node:nth-child(4),
    body.child-body.is-sky .island-node:nth-child(6),
    body.child-body.is-sky .island-node:nth-child(8) { padding-top: 3%; }

    body.child-body.is-sky .island-art {
        flex: 1 1 0;
        min-height: 0;
        width: 100%;
        max-width: 300px;
        height: auto;
        object-fit: contain;
        object-position: center top;
        margin-top: -10px;
    }

    body.child-body.is-sky .dest-row { flex: none; margin-top: 0; }
    body.child-body.is-sky .dest-row .destination-card { min-height: 84px; padding: 12px 16px; }
    body.child-body.is-sky .dest-row .destination-icon { width: 56px; height: 56px; }

    /* Igor acompanha a altura do mapa */
    body.child-body.is-sky .map-igor { height: 92%; width: auto; max-width: none; }
    body.child-body.is-sky .map-igor img { height: 100%; width: auto; }
    body.child-body.is-sky .map-ledge { left: -30%; right: -30%; }
}

/* Telas baixas (notebook pequeno, tablet deitado): cards mais finos */
@media (min-width: 768px) and (max-height: 760px) {
    body.child-body.is-sky .dest-row .destination-card { min-height: 70px; padding: 8px 14px; }
    body.child-body.is-sky .dest-row .destination-icon { width: 46px; height: 46px; border-radius: 14px; }
    body.child-body.is-sky .dest-row .destination-icon .ui-icon { font-size: 28px !important; }
    body.child-body.is-sky .dest-row .destination-card small { display: none; }
}

/* Igor do tamanho da coluna dele (não invade as ilhas) */
@media (min-width: 768px) {
    body.child-body.is-sky .map-igor { width: 20%; height: 78%; }
    body.child-body.is-sky .map-igor img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
    body.child-body.is-sky .map-ledge { left: -12%; right: -12%; }

    /* Selo "Continuar" embaixo da ilha, sem cobrir a arte */
    body.child-body.is-sky .island-continue { top: auto; bottom: 4%; }

    /* Cards de destino mais compactos */
    body.child-body.is-sky .dest-row { gap: 12px; }
    body.child-body.is-sky .dest-row .destination-card { gap: 10px; }
    body.child-body.is-sky .dest-row .destination-card strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body.child-body.is-sky .dest-row .destination-card small { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body.child-body.is-sky .dest-row .destination-chevron { width: 32px; height: 32px; }
    body.child-body.is-sky .dest-row .destination-words { min-width: 0; width: 100%; }
}

/* Artes prontas (3D) têm pedrinhas e enfeites em volta: um pouco menores para ficar do tamanho das outras ilhas */
.island-art.is-art { scale: .96; transform-origin: 50% 40%; }
@media (min-width: 768px) {
    body.child-body.is-sky .dest-row .destination-card strong { white-space: normal; overflow: visible; line-height: 1.1; }
}

/* Células altas (tablet em pé): ilha centralizada e o selo logo abaixo dela */
@media (min-width: 768px) {
    body.child-body.is-sky .island-node { justify-content: center; }
    body.child-body.is-sky .island-art { flex: 0 1 auto; }

    body.child-body.is-sky .island-continue {
        position: relative;
        left: auto;
        bottom: auto;
        margin-top: -14px;
        transform: none;
        animation-name: continue-pulse-flow;
    }
}

@keyframes continue-pulse-flow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}

/* =====================================================================
   Rótulos das ilhas no estilo do mockup: quadradinho colorido com o ícone
   (borda branca) + placa azul de cantos arredondados. Menores, para não
   encostarem uns nos outros.
   ===================================================================== */
body.child-body .island-label {
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    box-shadow: none;
    filter: drop-shadow(0 6px 10px rgba(20, 37, 74, .3));
}

body.child-body .island-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--world-color, #2b5fe0) 75%, #fff), var(--world-color, #2b5fe0));
    border: 2.5px solid #fff;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45);
}

body.child-body .island-icon .ui-icon { font-size: 22px !important; }

body.child-body .island-label strong {
    display: flex;
    align-items: center;
    min-height: 34px;
    max-width: 128px;
    margin-left: -8px;
    padding: 4px 12px 4px 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(180deg, #2457e6, #1638a8);
    color: #fff;
    font-size: .66rem;
    line-height: 1.1;
    letter-spacing: .01em;
}

/* Telas largas: só um pouco maior */
@media (min-width: 1280px) {
    body.child-body .island-icon { width: 44px; height: 44px; border-radius: 12px; }
    body.child-body .island-icon .ui-icon { font-size: 24px !important; }
    body.child-body .island-label strong { min-height: 38px; max-width: 150px; font-size: .74rem; }
}

/* Celular: compacto */
@media (max-width: 767px) {
    body.child-body .island-icon { width: 32px; height: 32px; border-radius: 9px; border-width: 2px; }
    body.child-body .island-icon .ui-icon { font-size: 18px !important; }
    body.child-body .island-label strong { min-height: 28px; max-width: 110px; margin-left: -6px; padding: 3px 9px 3px 12px; font-size: .58rem; }
}

/* =====================================================================
   TELA DO JOGO no mesmo mundo do mapa: céu, placa do mundo,
   Igor de pé na ilha do mundo atual
   ===================================================================== */
body.child-body.is-play,
body.child-body.is-play .device-stage,
body.child-body.is-play .device-frame {
    background: linear-gradient(180deg, #3d9bff 0%, #7cc2ff 42%, #cfe9ff 100%);
}

body.child-body.is-play .device-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 160px 52px at 8% 22%, rgba(255, 255, 255, .8), transparent 70%),
        radial-gradient(ellipse 220px 64px at 70% 8%, rgba(255, 255, 255, .65), transparent 70%),
        radial-gradient(ellipse 200px 60px at 94% 46%, rgba(255, 255, 255, .7), transparent 70%),
        radial-gradient(ellipse 300px 80px at 30% 96%, rgba(255, 255, 255, .55), transparent 70%),
        radial-gradient(ellipse 260px 80px at 90% 94%, rgba(255, 255, 255, .55), transparent 70%);
}

body.child-body.is-play .child-main { position: relative; z-index: 1; }

/* Barra do topo: voltar, placa do mundo, progresso e estrelas */
body.child-body.is-play .play-bar {
    background: transparent;
    gap: 10px;
    padding: 4px 0 14px;
}

body.child-body .play-world { flex: none; }
body.child-body .play-world strong { max-width: 170px; }

body.child-body.is-play .play-progress {
    height: 22px;
    padding: 5px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(20, 37, 74, .14);
}

body.child-body.is-play .play-bar .stars-pill { background: #fff; box-shadow: 0 6px 16px rgba(20, 37, 74, .14); }

/* Quadro da pergunta e das respostas */
body.child-body.is-play .play-stage {
    border: 4px solid rgba(255, 255, 255, .75);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 24px 50px rgba(20, 37, 74, .2);
}

body.child-body.is-play .prompt-sample {
    background: linear-gradient(180deg, #eef5ff, #e2edff);
    box-shadow: inset 0 0 0 2px #d6e4ff;
}

/* Botões de resposta com "base" de profundidade, como os botões do mapa */
body.child-body.is-play .option-button,
body.child-body.is-play .sequence-chip,
body.child-body.is-play .memory-card {
    border: 2px solid #e3eaf7;
    box-shadow: 0 6px 0 #d7e1f2, 0 12px 22px rgba(20, 37, 74, .08);
}

body.child-body.is-play .option-button:active,
body.child-body.is-play .sequence-chip:active,
body.child-body.is-play .memory-card:active {
    box-shadow: 0 2px 0 #d7e1f2, 0 6px 12px rgba(20, 37, 74, .08);
}

/* Igor na ilha do mundo, com o balão de fala */
body.child-body.is-play .play-guide {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.guide-scene {
    position: relative;
    width: 100%;
}

.guide-island {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 16px 16px rgba(20, 37, 74, .22));
    animation: island-float 6s ease-in-out infinite;
}

/* left/right/margin centralizam sem usar transform (as reações animam o transform) */
body.child-body .guide-scene .guide-igor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50%;
    z-index: 1;
    width: 46%;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 10px 12px rgba(20, 37, 74, .25));
}

body.child-body.is-play .igor-says {
    position: relative;
    display: block;
    margin: 0 0 14px;
    padding: 12px 18px;
    border-radius: 20px;
    background: #fff;
    color: var(--ds-ink);
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 22px rgba(20, 37, 74, .15);
}

/* Pontinha do balão apontando para o Igor */
body.child-body.is-play .igor-says::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 3px;
}

/* Celular: Igor pequeno ao lado do balão, embaixo do jogo */
@media (max-width: 899px) {
    body.child-body.is-play .play-guide {
        display: flex;
        flex-direction: row-reverse;
        align-items: flex-end;
        justify-content: center;
        gap: 12px;
        padding: 12px 4px 0;
    }

    body.child-body.is-play .guide-scene { width: 150px; flex: none; }
    body.child-body.is-play .igor-says { margin: 0 0 40px; }
    body.child-body.is-play .igor-says::after { left: auto; right: -8px; bottom: 50%; transform: translateY(50%) rotate(45deg); }
}

@media (max-width: 767px) {
    /* No celular a placa mostra só o ícone do mundo, para caber o progresso */
    body.child-body .play-world strong { display: none; }
    body.child-body .play-world .island-icon { width: 36px; height: 36px; }
}

@media (min-width: 900px) {
    body.child-body.is-play .play-guide { position: sticky; top: 8px; display: block; }
}

html.calm-mode .guide-island,
html.reduced-motion .guide-island { animation: none !important; }

/* Mapa: sem o piso verde embaixo do Igor, só uma sombra suave nos pés */
body.child-body .map-ledge {
    left: 18%;
    right: 18%;
    bottom: -6px;
    height: 18px;
    background: radial-gradient(ellipse at center, rgba(20, 37, 74, .28), rgba(20, 37, 74, 0) 70%);
    box-shadow: none;
}

/* Jogo: o Igor de pé em cima da ilha, sem cobrir o balão de fala.
   A cena reserva espaço para o Igor acima da ilha. */
body.child-body.is-play .guide-scene { aspect-ratio: 240 / 400; }

body.child-body.is-play .guide-island {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
}

body.child-body.is-play .guide-scene .guide-igor {
    bottom: 31%;
    width: 46%;
}

body.child-body.is-play .igor-says { z-index: 2; }

/* =====================================================================
   Equilíbrio ilha × rótulo: ilhas menores, rótulos maiores e mais legíveis
   ===================================================================== */
body.child-body .island-art { max-width: min(80%, 230px); }

body.child-body .island-icon { width: 48px; height: 48px; border-radius: 13px; border-width: 3px; }
body.child-body .island-icon .ui-icon { font-size: 26px !important; }
body.child-body .island-label strong {
    min-height: 40px;
    max-width: 170px;
    margin-left: -10px;
    padding: 5px 14px 5px 18px;
    font-size: .84rem;
    line-height: 1.1;
}

@media (min-width: 1280px) {
    body.child-body .island-art { max-width: min(78%, 250px); }
    body.child-body .island-icon { width: 54px; height: 54px; border-radius: 15px; }
    body.child-body .island-icon .ui-icon { font-size: 30px !important; }
    body.child-body .island-label strong { min-height: 46px; max-width: 200px; font-size: .96rem; }
}

@media (max-width: 767px) {
    body.child-body .island-art { max-width: 82%; }
    body.child-body .island-icon { width: 40px; height: 40px; border-radius: 11px; border-width: 2.5px; }
    body.child-body .island-icon .ui-icon { font-size: 22px !important; }
    body.child-body .island-label strong { min-height: 34px; max-width: 120px; margin-left: -8px; padding: 4px 10px 4px 14px; font-size: .7rem; }
}

/* Idioma no menu lateral: título "Idioma" e só as bandeiras redondas */
body.child-body .sidebar-lang-block {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 14px 8px 6px;
    border-top: 1px solid var(--ds-line);
}

body.child-body .sidebar-lang-title {
    color: var(--ds-muted);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
}

body.child-body .sidebar-flags { display: flex; gap: 16px; }

body.child-body .sidebar-flags button {
    width: 48px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--ds-line), 0 4px 10px rgba(20, 37, 74, .12);
    opacity: .55;
    filter: saturate(.7);
    transition: transform .2s var(--ds-spring), opacity .2s ease, filter .2s ease, border-color .2s ease;
}

body.child-body .sidebar-flags button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.child-body .sidebar-flags button:hover { opacity: .85; transform: scale(1.06); }

body.child-body .sidebar-flags button.is-active {
    border-color: var(--ds-blue);
    opacity: 1;
    filter: none;
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(43, 95, 224, .2), 0 6px 14px rgba(20, 37, 74, .18);
}

/* Sem nuvens e sem balão: só o céu azul em degradê (mapa e jogo) */
body.child-body.is-sky .device-frame::before,
body.child-body.is-play .device-frame::before { display: none; }
.sky-balloon { display: none; }

/* =====================================================================
   Loader: Igor trocando de pose rápido + temas do jogo girando
   em volta da cabeça (cores, formas, números, quebra-cabeça, emoções,
   rotina, animais), cada um dando pulinhos em momentos aleatórios.
   ===================================================================== */

/* 6 poses, meio segundo cada (ciclo de 3s) */
.loader-pose-v3 {
    opacity: 0;
    animation: loader-pose6 3s steps(1, end) infinite;
    animation-delay: calc(var(--k) * .5s - 3s);
}

.loader-pose-v3[style*="--k: 0"] { opacity: 1; }

@keyframes loader-pose6 {
    0% { opacity: 1; }
    16.66% { opacity: 0; }
    100% { opacity: 0; }
}

/* Anel de temas em volta da cabeça */
.loader-orbit {
    --r: 92px;
    position: absolute;
    left: 50%;
    top: 22%;
    z-index: 2;
    width: 0;
    height: 0;
    animation: orbit-spin 2.8s linear infinite;
}

.orbit-item {
    --a: calc(360deg / var(--n) * var(--i));
    position: absolute;
    left: 0;
    top: 0;
    transform: rotate(var(--a)) translateY(calc(-1 * var(--r)));
}

.orbit-badge {
    position: absolute;
    left: -19px;
    top: -19px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 3px solid var(--c);
    border-radius: 50%;
    background: color-mix(in srgb, var(--c) 18%, #fff);
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: 0 6px 12px rgba(20, 37, 74, .18);
    /* gira ao contrário para o ícone ficar sempre em pé; pulinho em hora aleatória */
    animation:
        orbit-counter 2.8s linear infinite,
        orbit-pop 1.5s ease-in-out var(--pop) infinite;
}

@keyframes orbit-spin { to { transform: rotate(360deg); } }

@keyframes orbit-counter {
    from { transform: rotate(calc(-1 * var(--a))); }
    to { transform: rotate(calc(-1 * var(--a) - 360deg)); }
}

@keyframes orbit-pop {
    0%, 60%, 100% { scale: 1; }
    75% { scale: 1.35; }
}

@media (min-width: 768px) {
    .loader-orbit { --r: 112px; }
    .orbit-badge { left: -22px; top: -22px; width: 44px; height: 44px; font-size: 1.3rem; }
}

/* Modo calmo / menos animações: Igor parado e o anel quieto */
html.calm-mode .loader-pose-v3,
html.reduced-motion .loader-pose-v3,
html.calm-mode .loader-orbit,
html.reduced-motion .loader-orbit,
html.calm-mode .orbit-badge,
html.reduced-motion .orbit-badge { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
    .loader-pose-v3, .loader-orbit, .orbit-badge { animation: none !important; }
}

/* Céu pintado de fundo (assets/images/sky-bg.webp) no lugar das nuvens e balões */
body.child-body.is-sky .device-frame,
body.child-body.is-play .device-frame {
    background: #7cc2ff url("../images/sky-bg.webp") center bottom / cover no-repeat;
}
