/* Apexify Kids — mobile-first: base = 390px; ecrãs maiores por min-width. Sem recursos recentes (Chrome 119/Android 7). */
:root { --bg:#FFF1DC; --card:#FFFFFF; --ink:#3B2F2F; --acc:#F28AAE; --go:#3FA66B; --sun:#FFC93C; --sky:#BFE3F5; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow-x: hidden; background: var(--bg); color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", Roboto, Arial, sans-serif; font-size: 28px; line-height: 1.25; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
#app { display: flex; flex-direction: column; min-height: 100%; height: 100%; max-width: 100%; }
#apx-screen { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
#apx-caption { flex: 0 0 auto; min-height: 64px; margin: 0; border: 0; border-top: 4px solid var(--sun); background: #FFFBEF;
  font-size: 28px; padding: 8px 16px; text-align: center; width: 100%; }
#apx-caption[hidden] { display: none; }

.apx-titulo, .apx-grande { font-size: 34px; text-align: center; margin: 12px 16px; font-weight: bold; }
.apx-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 16px; text-align: center; }
.apx-picker { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 16px; gap: 16px; }
.apx-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.apx-face { width: 160px; min-height: 200px; border: 6px solid var(--acc); border-radius: 32px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; }
.apx-face-e { font-size: 96px; line-height: 1; }
.apx-face-n { font-size: 32px; font-weight: bold; }

.apx-btn { min-width: 220px; min-height: 80px; border: 0; border-radius: 40px; background: var(--sky); font-size: 34px; font-weight: bold; padding: 8px 32px; }
.apx-btn-go { background: var(--go); color: #fff; align-self: center; margin: 16px; min-height: 96px; min-width: 260px; box-shadow: 0 6px 0 #2C7D50; }
.apx-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.apx-top-nome { flex: 1; font-size: 30px; font-weight: bold; text-align: center; }
.apx-back { min-width: 80px; min-height: 64px; border: 3px solid var(--sky); border-radius: 32px; background: var(--card); font-size: 30px; }
.apx-pais-ic { position: absolute; right: 8px; top: 8px; width: 48px; height: 48px; border-radius: 24px; border: 0; background: transparent; font-size: 28px; opacity: .35; touch-action: none; -webkit-user-select: none; user-select: none; }
.apx-top .apx-pais-ic { position: static; flex: 0 0 48px; }
.apx-pressing { opacity: 1; background: var(--sun); transition: background 3s linear; }

.apx-dia { flex: 1; display: flex; flex-direction: column; }
.apx-dia-area { flex: 1; min-height: 0; padding: 8px 12px; }
.apx-feito { color: var(--go); }
.apx-jardim-wrap { background: linear-gradient(#DFF3FB 0, #DFF3FB 55%, #B9E4A0 55%); border-radius: 24px; padding: 12px; min-height: 200px; }
.apx-jardim { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.apx-flor { font-size: 52px; line-height: 1.1; }
.apx-jardim-vazio { font-size: 28px; padding: 24px 8px; }
.apx-jardim-n { text-align: center; font-size: 28px; margin-top: 8px; font-weight: bold; }

.apx-cards { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.apx-card { width: 160px; min-height: 180px; border: 6px solid var(--sun); border-radius: 28px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; }
.apx-card-ic { font-size: 72px; line-height: 1; }
.apx-card-ic svg, .apx-face-e svg { width: 1em; height: 1em; }
.apx-card-n { font-size: 28px; font-weight: bold; }

.apx-mod { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.apx-time-bar { flex: 0 0 8px; background: #EAD9BF; }
.apx-time-fill { height: 100%; width: 100%; background: var(--go); }
.apx-stage { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 8px; }

.apx-flor-nova { font-size: 160px; line-height: 1; animation: apxgrow 1.6s ease-out both; }
@keyframes apxgrow { 0% { transform: scale(.1) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.2) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }

/* teclado */
.apx-kp { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 100%; }
.apx-kp-disp { min-width: 200px; max-width: 100%; min-height: 64px; border: 4px solid var(--sky); border-radius: 16px; background: #fff; font-size: 40px; text-align: center; padding: 4px 12px; }
.apx-kp-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 264px; max-width: 100%; }
.apx-key { width: 80px; height: 76px; min-width: 72px; min-height: 72px; border: 0; border-radius: 16px; background: var(--card); border-bottom: 4px solid #D9C8A8; font-size: 36px; font-weight: bold; }
.apx-key-ok { background: var(--go); color: #fff; }
.apx-key-ap { background: #FFE0B2; }
.apx-key-x { background: var(--sky); }

/* cantinho dos pais: texto pequeno e denso (não é para a criança) */
.apx-pais { font-size: 17px; padding: 12px; max-width: 900px; width: 100%; margin: 0 auto; }
.apx-pais-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.apx-pais h2 { margin: 0; font-size: 24px; }
.apx-pais h3 { margin: 4px 0; }
.apx-pais p { margin: 6px 0; word-break: break-word; }
.apx-psec { background: var(--card); border-radius: 12px; padding: 10px; margin: 10px 0; }
.apx-pbtn { min-height: 44px; min-width: 44px; padding: 6px 16px; font-size: 17px; border: 2px solid var(--sky); border-radius: 12px; background: #fff; margin: 4px 0; }
.apx-psel { min-height: 44px; font-size: 17px; max-width: 100%; }
.apx-prow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.apx-pnome { min-width: 140px; font-weight: bold; }
.apx-pnome svg { width: 1em; height: 1em; vertical-align: -2px; }
.apx-pult { font-size: 15px; color: #6B5B5B; margin: 2px 0 6px; }
.apx-pconv { background: #FFF3C4; border-radius: 8px; padding: 8px; }
.apx-aviso { background: #FFD9D0; border-radius: 8px; padding: 8px; }
.apx-pta { width: 100%; font-size: 16px; font-family: monospace; }
.apx-p30 { display: flex; flex-wrap: wrap; gap: 3px; }
.apx-p30 span { width: 28px; height: 28px; font-size: 13px; text-align: center; line-height: 28px; border-radius: 6px; }
.apx-p30-ok { background: var(--go); color: #fff; }
.apx-p30-no { background: #EEE2CC; }

@media (min-width: 700px) {
  .apx-face { width: 240px; min-height: 280px; } .apx-face-e { font-size: 128px; }
  .apx-card { width: 220px; min-height: 220px; } .apx-card-ic { font-size: 96px; }
  .apx-flor { font-size: 64px; }
  .apx-titulo, .apx-grande { font-size: 44px; }
}
@media (min-width: 700px) and (max-height: 600px) { .apx-face { min-height: 200px; } }
