.especial-game[hidden], .cp-app [hidden] { display: none !important; }
body.jogo-aberto { overflow: hidden; }
body.jogo-aberto .topbar, body.jogo-aberto .footer, body.jogo-aberto .skip, body.jogo-aberto main > section:not(.especial-game) { display: none; }
/* A vitrine define display inline ao carregar; o jogo aberto tem prioridade. */
body.jogo-aberto #secao-vitrine { display: none !important; }
.especial-game.wrap { width: min(1240px, calc(100% - 32px)); height: 100vh; height: 100dvh; margin: 0 auto; padding: 7px 0 10px; display: grid; grid-template-rows: 45px minmax(0, 1fr); gap: 7px; }
.especial-game #container-conteudo-jogo { min-height: 0; min-width: 0; }
.cp-button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border: 2px solid transparent; border-radius: 13px; background: #216d53; color: #fff; font: 900 .91rem 'Nunito', sans-serif; cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 #174532; transition: transform .17s ease, filter .17s ease; }
@media (hover:hover) and (pointer:fine) { .cp-button:hover { transform: translateY(-2px); filter: brightness(1.08); } }
.cp-button:active { transform: translateY(2px); box-shadow: 0 2px 0 #174532; }
.cp-button:disabled { opacity: .48; cursor: default; transform: none; }
.cp-button:focus-visible, .cp-app button:focus-visible, .cp-choice input:focus-visible + span { outline: 3px solid #f5c861; outline-offset: 3px; }
.cp-ghost { background: #fff9e8; border-color: #e9d6a5; color: #265346; box-shadow: 0 3px 0 #c6b88c; }
.game-card .cp-button { margin-top: auto; width: 100%; }
.cp-app { --cp-accent: #25b57a; position: relative; isolation: isolate; height: 100%; min-height: 0; overflow: hidden; padding: 17px clamp(18px, 2.4vw, 32px); border: 3px solid #ffd781; border-radius: 26px; color: #fff; background: radial-gradient(circle at 83% 8%, #26856b 0, transparent 37%), linear-gradient(138deg, #0b4b3c, #136b50 56%, #0a453e); box-shadow: inset 0 0 0 2px #ffffff25, 0 12px 38px #102b2b44; font-family: 'Nunito', sans-serif; }
.cp-app[data-tema="natal"] { background: linear-gradient(135deg, #0a423ad9, #0f604bd5 58%, #0a423bd8), url('../img/fundo-natal.jpg') center / cover; }
.cp-app[data-tema="ano"] { --cp-accent: #c49bff; background: radial-gradient(circle at 84% 8%, #8262bd 0, transparent 39%), linear-gradient(138deg, #32245f, #4c3378 57%, #212a61); border-color: #e6c2ff; }
.cp-app[data-tema="ferias"] { --cp-accent: #75e3ed; background: radial-gradient(circle at 83% 8%, #66bfaa 0, transparent 36%), linear-gradient(138deg, #105d72, #19879a 60%, #175b8a); border-color: #ffe299; }
.cp-app::before { content: ''; position: absolute; width: 260px; height: 260px; right: -95px; top: -105px; border: 1px solid #ffffff31; border-radius: 50%; box-shadow: 0 0 0 35px #ffffff08, 0 0 0 70px #ffffff07; pointer-events: none; z-index: -1; }
.cp-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; opacity: .75; }
.cp-sky::before, .cp-sky::after { content: '✦'; position: absolute; color: #ffe29a; font-size: 1.3rem; text-shadow: 0 0 15px #ffe3a9; animation: cp-twinkle 4s ease-in-out infinite; }
.cp-sky::before { left: 5%; top: 18%; }
.cp-sky::after { right: 11%; bottom: 14%; font-size: .9rem; animation-delay: -2s; }
.cp-app h2, .cp-app h3 { font-family: 'Baloo 2', sans-serif; line-height: 1.08; }
.cp-app h2 { font-size: clamp(1.7rem, 2.5vw, 2.35rem); font-weight: 800; }
.cp-app h3 { font-size: 1.45rem; }
.cp-app p { line-height: 1.4; }
.cp-kicker { font-size: .69rem; font-weight: 900; text-transform: uppercase; letter-spacing: .13em; color: #ffe39f; }
.cp-app[data-tema="ano"] .cp-kicker { color: #e6d3ff; }
.cp-app[data-tema="ferias"] .cp-kicker { color: #ffeaad; }
.cp-setup { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: min(2vh, 16px); }
.cp-setup-hero { display: flex; align-items: center; justify-content: center; gap: 20px; padding-top: 4px; text-align: left; }
.cp-setup-hero p:last-child { font-size: .93rem; color: #f3fbf3; }
.cp-mascot { width: 112px; height: 105px; flex: 0 0 112px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fff9df 0, #d8fff0 68%, #ffffff21 72%); box-shadow: 0 0 0 6px #ffffff16, 0 0 28px #ffe6a966; }
.cp-mascot img { width: 116px; height: 100px; object-fit: contain; filter: drop-shadow(0 4px 4px #073b3544); }
.cp-config { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; min-height: 0; align-items: stretch; }
.cp-choice { min-width: 0; margin: 0; padding: 11px; display: flex; flex-direction: column; gap: 9px; border: 1px solid #ffffff56; border-radius: 17px; background: #ffffff14; }
.cp-choice legend { float: left; width: 100%; padding: 0 3px 6px; font-weight: 900; font-size: .94rem; }
.cp-choice legend span { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 5px; border-radius: 50%; background: #ffe1a0; color: #244037; }
.cp-choice label { position: relative; display: block; flex: 1; min-height: 0; cursor: pointer; }
.cp-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cp-choice label > span { height: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 2px solid #e3e7d8; border-radius: 12px; background: #fffcf3; color: #214d40; font-weight: 900; box-shadow: 0 3px 0 #0000001b; line-height: 1.2; }
.cp-choice label:hover > span { filter: brightness(.97); }
.cp-choice input:checked + span { border-color: #ffd56d; background: #fff1ba; color: #244435; box-shadow: 0 0 0 2px #ffe4a966, 0 3px 0 #c4953b; }
.cp-themes b, .cp-modes b { font-size: 1.5rem; line-height: 1; }
.cp-modes label > span, .cp-levels label > span { flex-wrap: wrap; gap: 3px 8px; }
.cp-modes small, .cp-levels small { width: 100%; font-size: .72rem; font-weight: 700; color: #5c6b61; }
.cp-levels strong { font-size: 1.13rem; }
.cp-setup-bottom { display: flex; align-items: center; gap: 18px; justify-content: space-between; padding: 10px 13px; border-radius: 14px; background: #ffffff16; border: 1px solid #ffffff30; }
.cp-setup-bottom p { max-width: 710px; font-size: .78rem; color: #f3fbf3; }
.cp-start { white-space: nowrap; min-width: 162px; background: #ffcf67; color: #204237; box-shadow: 0 4px 0 #c89637; font-size: 1.02rem; }
.cp-playing { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 9px; }
.cp-hud { display: flex; align-items: center; gap: 16px; min-height: 55px; }
.cp-hud-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cp-hud-title > span { font-size: 2rem; }
.cp-hud-mascot { display: none; }
.cp-hud-title h2 { font-size: clamp(1.45rem, 2vw, 1.9rem); }
.cp-stats { display: flex; gap: 7px; }
.cp-stats > div { min-width: 72px; padding: 4px 10px; text-align: center; border: 1px solid #ffffff4f; border-radius: 10px; background: #ffffff15; }
.cp-stats small, .cp-stats strong { display: block; line-height: 1.18; }
.cp-stats small { font-size: .59rem; text-transform: uppercase; letter-spacing: .07em; color: #d5f4df; font-weight: 900; }
.cp-stats strong { font-size: 1.08rem; font-weight: 900; }
.cp-hud .cp-ghost { flex: none; min-height: 40px; }
.cp-progress-row { display: flex; align-items: center; gap: 12px; font-size: .76rem; font-weight: 900; }
.cp-progress-row > span:first-child { white-space: nowrap; }
.cp-progress-row strong { margin-left: 3px; color: #ffe2a1; }
.cp-progress-row progress { flex: 1; height: 13px; accent-color: #ffd16d; }
.cp-level-badge { white-space: nowrap; padding: 3px 9px; background: #ffffff24; border-radius: 20px; }
.cp-play-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 312px); gap: 16px; }
.cp-board-wrap { min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; border: 2px solid #ffffff5c; border-radius: 20px; background: radial-gradient(circle at 50% 50%, #ffffff31, #ffffff14 72%); }
.cp-board { width: min(100%, calc(100dvh - 260px), 610px); aspect-ratio: 1; min-width: 0; display: grid; grid-template-columns: repeat(var(--cp-size), minmax(0, 1fr)); gap: 3px; padding: 7px; border: 3px solid #f6cf78; border-radius: 14px; background: #e9f5e7; box-shadow: 0 7px 0 #092d2866, inset 0 2px 8px #0000001d; user-select: none; -webkit-user-select: none; touch-action: none; }
.cp-cell { min-width: 0; aspect-ratio: 1; padding: 0; display: grid; place-items: center; border: 1px solid #d0dac9; border-radius: 6px; background: #fffefa; color: #253c37; font: 900 clamp(.69rem, 2.3vh, 1.27rem) 'Nunito', sans-serif; box-shadow: 0 2px 0 #cbd8c8; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cp-cell.cp-found { background: var(--cp-word-color); color: var(--cp-word-ink); border-color: #ffffff77; box-shadow: inset 0 0 0 2px #ffffff50, 0 2px 0 #00000025; }
.cp-cell.cp-found-pop { animation: cp-letter-pop .38s ease-out; }
.cp-cell.cp-selected { background: #ffe27c; color: #3b3117; border-color: #d2941b; box-shadow: 0 0 0 2px #e9ad22, 0 0 13px #ffe488; z-index: 1; }
.cp-cell.cp-radar-fade { opacity: .65; }
.cp-cell.cp-radar-brilho { box-shadow: inset 0 0 0 2px #e9ad22, 0 0 8px #ffe48966; }
.cp-board.cp-error { animation: cp-shake .35s ease-out; }
.cp-side { min-height: 0; display: flex; flex-direction: column; gap: 9px; padding: 14px; border: 2px solid #fff6dc; border-radius: 18px; background: #fffcf3; color: #25473e; box-shadow: 0 7px 0 #092d283b; }
.cp-side-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cp-side-heading .cp-kicker { color: #a46d1b; }
.cp-side-heading h3 { margin: 2px 0 0; color: #20473c; }
.cp-side-heading > span { font-size: 1.8rem; }
.cp-side-mascot { width: 57px; height: 53px; object-fit: contain; filter: drop-shadow(0 4px 5px #00000022); }
.cp-side-guide { font-size: .74rem; color: #5f6d62; }
.cp-words { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; align-content: start; }
.cp-words li { min-width: 0; min-height: 34px; display: flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid #dfe9d8; border-radius: 10px; background: #f3f8ed; font-weight: 900; font-size: .75rem; line-height: 1.1; overflow: hidden; }
.cp-word-name { overflow-wrap: anywhere; }
.cp-word-mark { color: #b5ae91; font-size: .86rem; }
.cp-words li.cp-word-found { background: var(--cp-word-color); color: var(--cp-word-ink); border-color: #ffffff80; animation: cp-word-pop .4s ease-out; }
.cp-word-found .cp-word-mark { color: inherit; }
.cp-secret { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 7px 9px; border: 1px solid #e7c25a; border-radius: 11px; background: linear-gradient(90deg, #fff0b8, #fff8db); color: #60491a; }
.cp-secret > span:first-child { font-size: 1.22rem; }
.cp-secret strong, .cp-secret small { display: block; line-height: 1.2; }
.cp-secret strong { font-size: .72rem; }
.cp-secret small { font-size: .64rem; }
.cp-secret-check { margin-left: auto; font-weight: 900; font-size: 1.2rem; }
.cp-secret-found { background: #ffe284; box-shadow: 0 0 14px #ffd760; animation: cp-word-pop .5s ease-out; }
.cp-side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cp-side-actions .cp-button { min-width: 0; min-height: 39px; padding: 5px; font-size: .74rem; }
.cp-hint-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #1e644e; }
.cp-feedback { min-height: 28px; margin: 0; padding: 4px 10px; border-radius: 9px; background: #ffffff19; color: #fff3cb; font-size: .84rem; font-weight: 900; }
.cp-spark-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.cp-spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 10px currentColor; animation: cp-sparkle .72s ease-out forwards; }
.cp-score-popup { position: absolute; padding: 4px 8px; border: 2px solid #fff; border-radius: 9px; color: #fff; font: 900 .88rem 'Nunito', sans-serif; white-space: nowrap; box-shadow: 0 4px 12px #0005; animation: cp-score-rise 1s ease-out forwards; }
.cp-confetti { position: absolute; top: -16px; width: 11px; height: 14px; border-radius: 2px; animation: cp-confetti-fall linear forwards; }
.cp-victory { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: #082b2ac9; }
.cp-victory-card { width: min(440px, 100%); padding: 27px; text-align: center; background: #fffcf2; color: #25473e; border: 4px solid #ffd36b; border-radius: 24px; box-shadow: 0 0 0 8px #ffffff25, 0 24px 55px #00000055; animation: cp-entrar .45s cubic-bezier(.17,.86,.32,1.28); }
.cp-victory-icon { display: inline-block; font-size: 3.4rem; animation: cp-trophy .9s ease-in-out infinite alternate; }
.cp-victory-art { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cp-victory-art img { width: 100px; height: 90px; object-fit: contain; filter: drop-shadow(0 7px 5px #0000002b); }
.cp-victory h3 { margin: 0 0 5px; font-size: 2.65rem; color: #21765c; }
.cp-victory p { margin: 0 0 14px; font-weight: 800; }
.cp-final-stats { display: flex; justify-content: center; gap: 14px; margin-bottom: 18px; }
.cp-final-stats span { padding: 8px 10px; border-radius: 9px; background: #eaf5e9; font-size: .85rem; }
.cp-victory button { width: 100%; margin: 5px 0; }
.cp-victory small { display: block; margin-top: 10px; color: #64736b; }
@keyframes cp-twinkle { 50% { opacity: .2; transform: scale(.65); } }
@keyframes cp-letter-pop { 50% { transform: scale(1.18); filter: brightness(1.2); } }
@keyframes cp-word-pop { 50% { transform: scale(1.06); } }
@keyframes cp-shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-3px); } }
@keyframes cp-sparkle { to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }
@keyframes cp-score-rise { from { opacity: 0; transform: translate(-50%, 8px) scale(.7); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -45px) scale(1.12); } }
@keyframes cp-confetti-fall { to { transform: translateY(105dvh) rotate(700deg); opacity: 0; } }
@keyframes cp-entrar { from { opacity: 0; transform: translateY(20px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes cp-trophy { to { transform: rotate(9deg) scale(1.08); } }
@media (max-height: 700px) and (min-width: 761px) {
  .cp-app { padding-block: 10px; }
  .cp-setup-hero { gap: 10px; }
  .cp-mascot { width: 84px; height: 78px; flex-basis: 84px; }
  .cp-mascot img { width: 88px; height: 76px; }
  .cp-choice { gap: 6px; padding: 8px; }
  .cp-choice label > span { padding-block: 5px; }
  .cp-setup-bottom { padding: 7px 10px; }
  .cp-side { padding: 9px; gap: 5px; }
  .cp-side-heading h3 { font-size: 1.18rem; }
  .cp-side-guide { font-size: .66rem; }
  .cp-words { gap: 4px; }
  .cp-words li { min-height: 27px; padding: 2px 5px; font-size: .69rem; }
  .cp-secret { padding: 4px 6px; }
  .cp-secret small { font-size: .58rem; }
}
@media (max-width: 760px) {
  .especial-game.wrap { width: calc(100% - 12px); grid-template-rows: 42px minmax(0, 1fr); padding-block: 4px; gap: 4px; }
  .cp-app { padding: 8px; border-radius: 15px; border-width: 2px; }
  .cp-setup { gap: 7px; }
  .cp-setup-hero { gap: 8px; justify-content: flex-start; }
  .cp-mascot { width: 64px; height: 62px; flex-basis: 64px; }
  .cp-mascot img { width: 68px; height: 60px; }
  .cp-setup-hero h2 { font-size: 1.55rem; }
  .cp-setup-hero p:last-child { font-size: .7rem; }
  .cp-config { grid-template-columns: 1fr; gap: 5px; overflow: hidden; }
  .cp-choice { padding: 5px; gap: 5px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-choice legend { grid-column: 1 / -1; font-size: .74rem; padding: 0; }
  .cp-choice legend span { width: 18px; height: 18px; }
  .cp-choice label > span { justify-content: center; padding: 5px 2px; text-align: center; font-size: .7rem; flex-direction: column; gap: 2px; }
  .cp-themes b, .cp-modes b { font-size: 1.2rem; }
  .cp-modes small, .cp-levels small { font-size: .53rem; }
  .cp-levels strong { font-size: .84rem; }
  .cp-setup-bottom { padding: 5px; gap: 6px; flex-direction: column; }
  .cp-setup-bottom p { font-size: .63rem; }
  .cp-start { width: 100%; min-height: 36px; }
  .cp-playing { gap: 4px; grid-template-rows: auto auto minmax(0,1fr) auto; }
  .cp-hud { min-height: 0; gap: 4px; flex-wrap: wrap; }
  .cp-hud-title { gap: 4px; }
  .cp-hud-title > span { font-size: 1.2rem; }
  .cp-hud-title > span { display: none; }
  .cp-hud-mascot { display: block; width: 34px; height: 32px; object-fit: contain; }
  .cp-hud-title h2 { font-size: 1.16rem; }
  .cp-hud .cp-kicker { font-size: .5rem; letter-spacing: .04em; }
  .cp-stats { gap: 2px; }
  .cp-stats > div { min-width: 39px; padding: 2px; }
  .cp-stats small { font-size: .45rem; }
  .cp-stats strong { font-size: .72rem; }
  .cp-hud .cp-ghost { display: none; }
  .cp-progress-row { gap: 5px; font-size: .6rem; }
  .cp-progress-row progress { height: 8px; }
  .cp-level-badge { padding: 1px 5px; }
  .cp-play-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) auto; gap: 5px; }
  .cp-board-wrap { padding: 3px; border-radius: 10px; }
  .cp-board { width: min(calc(100vw - 34px), calc(100dvh - 340px), 410px); gap: 2px; padding: 4px; border-width: 2px; border-radius: 8px; }
  .cp-cell { font-size: clamp(.68rem, 3.6vw, 1.1rem); border-radius: 3px; box-shadow: none; }
  .cp-side { padding: 5px; gap: 4px; border-radius: 10px; }
  .cp-side-heading, .cp-side-guide { display: none; }
  .cp-words { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 3px; }
  .cp-words li { min-height: 25px; padding: 2px 3px; font-size: .57rem; gap: 2px; border-radius: 5px; }
  .cp-word-mark { font-size: .55rem; }
  .cp-secret { padding: 3px 5px; margin-top: 0; }
  .cp-secret > span:first-child { font-size: .9rem; }
  .cp-secret strong { font-size: .58rem; }
  .cp-secret small { font-size: .52rem; }
  .cp-secret-check { font-size: .8rem; }
  .cp-side-actions .cp-button { min-height: 30px; font-size: .65rem; box-shadow: none; }
  .cp-feedback { min-height: 22px; padding: 2px 5px; font-size: .66rem; }
  .cp-victory-card { padding: 16px; }
}
@media (max-width: 760px) and (max-height: 650px) {
  .cp-setup-hero p:last-child, .cp-setup-bottom p { display: none; }
  .cp-board { width: min(calc(100vw - 34px), calc(100dvh - 305px), 390px); }
  .cp-secret small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-button, .cp-sky::before, .cp-sky::after, .cp-cell.cp-found-pop, .cp-words li.cp-word-found, .cp-board.cp-error, .cp-victory-card, .cp-victory-icon { animation: none; transition: none; }
  .cp-button:hover, .cp-button:active { transform: none; }
}

/* Menu: duas escolhas principais, modos extras recolhidos e exemplo visual. */
.cp-setup h2:focus { outline:none; }
.cp-setup .cp-config { grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr); align-items:center; gap:26px; overflow:visible; }
.cp-simple-choices { display:flex; flex-direction:column; justify-content:center; gap:22px; min-width:0; min-height:0; }
.cp-setup .cp-choice { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:0; gap:12px; border:0; background:none; }
.cp-setup .cp-choice legend { float:none; width:auto; margin-bottom:12px; padding:0; font-size:1rem; }
.cp-setup .cp-choice label { min-width:0; }
.cp-setup .cp-choice label > span { position:relative; flex-direction:column; justify-content:center; gap:8px; padding:12px 7px; text-align:center; border-radius:16px; }
.cp-setup .cp-choice input:checked + span::after { content:'✓'; position:absolute; top:5px; right:5px; display:grid; place-items:center; width:20px; height:20px; border-radius:50%; background:#216d53; color:#fff; font-size:.8rem; }
.cp-setup .cp-themes label > span { min-height:clamp(105px,17vh,170px); }
.cp-themes img { display:block; width:100%; max-width:140px; height:clamp(52px,9vh,96px); object-fit:cover; border-radius:10px; }
.cp-setup .cp-themes strong { font-size:1rem; }
.cp-setup .cp-levels label > span { min-height:85px; flex-wrap:nowrap; }
.cp-setup .cp-levels strong { font-size:1.05rem; }
.cp-setup .cp-levels small { font-size:.8rem; }
.cp-extras { position:relative; z-index:4; border:1px solid #fff2bb66; border-radius:12px; background:#0c3d367a; }
.cp-extras summary { cursor:pointer; padding:10px 12px; font-size:.85rem; font-weight:900; }
.cp-extras summary:focus-visible { outline:3px solid #ffda86; outline-offset:3px; border-radius:12px; }
.cp-current-mode { display:inline-block; margin-left:7px; font-size:.7rem; font-weight:700; color:#ffecb4; }
.cp-setup .cp-extras .cp-modes { position:absolute; bottom:calc(100% + 8px); left:0; right:0; grid-template-columns:1fr; padding:12px; gap:7px; border:2px solid #ffda86; border-radius:15px; background:#124e40; box-shadow:0 10px 25px #0005; }
.cp-setup .cp-modes legend { float:left; margin:0; padding:0 0 7px; font-size:.85rem; }
.cp-setup .cp-modes label > span { display:grid; grid-template-columns:30px minmax(0,1fr); justify-items:start; gap:3px 8px; padding:8px 28px 8px 9px; text-align:left; border-radius:10px; }
.cp-setup .cp-modes b { grid-column:1; grid-row:1/3; font-size:1.45rem; }
.cp-setup .cp-modes strong { font-size:.85rem; }
.cp-setup .cp-modes small { grid-column:2; font-size:.7rem; }
.cp-demo { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; min-width:0; min-height:0; padding:20px; border:1px solid #fff1bd66; border-radius:22px; background:#0a352f80; text-align:center; }
.cp-demo h3 { font-size:1.3rem; color:#ffe3a1; }
.cp-demo-example { min-width:0; display:flex; flex-direction:column; align-items:center; gap:12px; }
.cp-demo-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; width:min(28vh,260px); aspect-ratio:1; padding:8px; border:2px solid #ffd781; border-radius:13px; background:#e9f5e7; }
.cp-demo-grid > span { display:grid; place-items:center; border-radius:6px; background:#fffefa; color:#25473e; font-size:clamp(1rem,2.3vh,1.5rem); font-weight:900; }
.cp-demo-target { animation:cp-demo-mark 5s infinite; animation-delay:calc(var(--cp-letra)*.22s); }
.cp-demo-word { color:#ffe4a7; font-size:1.05rem; }
.cp-demo > p { font-size:.85rem; font-weight:800; color:#fff3d2; }
.cp-setup .cp-setup-bottom { flex-direction:row; border:0; background:none; padding:0; gap:12px; }
.cp-setup .cp-start { min-width:220px; min-height:48px; }
.cp-setup-bottom .cp-button { -webkit-appearance:none; appearance:none; -webkit-text-fill-color:currentColor; }
.cp-setup-bottom .cp-button > span { display:block; }
.cp-menu-help { position:absolute; inset:0; margin:auto; width:min(530px,calc(100% - 24px)); max-height:calc(100% - 24px); overflow:auto; padding:24px; border:3px solid #ffd781; border-radius:22px; background:#fffaf0; color:#264d3f; font-family:'Nunito',sans-serif; box-shadow:0 15px 40px #001c2d66; }
.cp-menu-help::backdrop { background:#082d2bdd; }
.cp-menu-help h3 { color:#216d53; margin-bottom:14px; }
.cp-menu-help p { font-size:.88rem; margin:10px 0; }
.cp-menu-help .cp-button { width:100%; margin-top:12px; }
@keyframes cp-demo-mark { 0%,18%,92%,100% { background:#fffefa; color:#25473e; } 35%,78% { background:#229c65; color:white; } }
@media (min-width:761px) and (max-height:740px) {
  .cp-simple-choices { gap:12px; }
  .cp-setup .cp-choice legend { font-size:.9rem; margin-bottom:8px; }
  .cp-setup .cp-themes label > span { min-height:90px; padding:7px; gap:5px; }
  .cp-themes img { height:48px; max-width:100px; }
  .cp-setup .cp-levels label > span { min-height:65px; padding:8px 5px; }
  .cp-extras summary { padding:8px 10px; }
  .cp-demo { padding:14px; gap:10px; }
  .cp-demo-grid { width:min(25vh,190px); }
  .cp-setup .cp-start { min-height:42px; }
}
@media (max-width:760px) {
  .cp-setup .cp-config { grid-template-columns:1fr; grid-template-rows:auto minmax(0,1fr); gap:9px; }
  .cp-simple-choices { gap:10px; }
  .cp-setup .cp-choice { gap:6px; }
  .cp-setup .cp-choice legend { font-size:.73rem; margin-bottom:7px; }
  .cp-setup .cp-themes label > span { min-height:78px; padding:6px 4px; gap:5px; border-radius:11px; }
  .cp-themes img { height:44px; max-width:85px; border-radius:7px; }
  .cp-setup .cp-themes strong { font-size:.76rem; }
  .cp-setup .cp-choice input:checked + span::after { width:15px; height:15px; top:3px; right:3px; font-size:.6rem; }
  .cp-setup .cp-levels label > span { min-height:54px; gap:3px; padding:7px 4px; border-radius:11px; }
  .cp-setup .cp-levels strong { font-size:.83rem; }
  .cp-setup .cp-levels small { font-size:.64rem; }
  .cp-extras summary { padding:7px 9px; font-size:.7rem; }
  .cp-current-mode { font-size:.58rem; margin-left:4px; }
  .cp-setup .cp-extras .cp-modes { padding:8px; gap:5px; }
  .cp-setup .cp-modes label > span { padding:6px 23px 6px 7px; }
  .cp-setup .cp-modes strong { font-size:.74rem; }
  .cp-setup .cp-modes small { font-size:.6rem; }
  .cp-demo { height:100%; flex-direction:row; gap:12px; padding:8px 12px; border-radius:13px; }
  .cp-demo h3 { display:none; }
  .cp-demo-example { gap:3px; flex:none; height:100%; max-width:46%; }
  .cp-demo-grid { width:auto; height:calc(100% - 20px); max-height:140px; min-height:0; padding:4px; gap:3px; border-radius:8px; }
  .cp-demo-grid > span { font-size:clamp(.6rem,2vh,.95rem); border-radius:3px; }
  .cp-demo-word { font-size:.65rem; }
  .cp-demo > p { flex:1; font-size:.7rem; }
  .cp-setup .cp-start { min-width:0; width:auto; flex:1; min-height:38px; font-size:.9rem; }
  .cp-menu-help-button { font-size:.7rem; min-height:36px; padding:6px 9px; }
  .cp-menu-help { padding:16px; }
  .cp-menu-help p { font-size:.8rem; }
}
@media (max-width:760px) and (max-height:480px) {
  .cp-setup-hero { padding-top:0; }
  .cp-setup-hero h2 { font-size:1.2rem; }
  .cp-mascot { width:43px; height:40px; flex-basis:43px; }
  .cp-mascot img { width:44px; height:40px; }
  .cp-setup-hero .cp-kicker { font-size:.42rem; }
  .cp-setup .cp-config { grid-template-columns:1.3fr .8fr; grid-template-rows:minmax(0,1fr); gap:10px; }
  .cp-simple-choices { gap:5px; }
  .cp-setup .cp-choice legend { font-size:.62rem; margin-bottom:4px; }
  .cp-setup .cp-themes label > span { min-height:46px; padding:3px; gap:2px; }
  .cp-themes img { height:24px; max-width:52px; }
  .cp-setup .cp-themes strong { font-size:.62rem; }
  .cp-setup .cp-levels label > span { min-height:39px; padding:4px 3px; }
  .cp-setup .cp-levels strong { font-size:.65rem; }
  .cp-setup .cp-levels small { font-size:.49rem; }
  .cp-extras summary { font-size:.59rem; padding:5px 7px; }
  .cp-current-mode { font-size:.5rem; }
  .cp-demo { flex-direction:column; padding:7px; gap:5px; }
  .cp-demo-example { max-width:100%; flex:1; min-height:0; }
  .cp-demo-grid { max-height:95px; }
  .cp-demo > p { flex:none; font-size:.57rem; }
  .cp-setup .cp-start { min-height:30px; font-size:.74rem; }
  .cp-menu-help-button { min-height:29px; font-size:.6rem; }
}
@media (prefers-reduced-motion:reduce) { .cp-demo-target { animation:none; background:#229c65!important; color:#fff!important; } }

/* A lista permite ouvir uma palavra por escolha do jogador. */
.cp-words li { padding:0; }
.cp-word-listen { display:flex; align-items:center; gap:5px; width:100%; min-width:0; min-height:32px; height:100%; padding:4px 6px; border:0; border-radius:inherit; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; -webkit-appearance:none; appearance:none; }
.cp-word-listen .cp-word-name { min-width:0; flex:1; }
.cp-word-audio { margin-left:auto; flex:none; font-size:.65rem; }
.cp-word-listen:disabled { cursor:default; }
.cp-word-listen:disabled .cp-word-audio { visibility:hidden; }
@media (hover:hover) and (pointer:fine) { .cp-word-listen:not(:disabled):hover { background:#ffffff44; } }
.cp-victory:not([hidden]) [data-acao="nova"],.cp-victory:not([hidden]) [data-acao="proxima"] { animation:cp-replay-glow 1.4s ease-in-out infinite; }
@keyframes cp-replay-glow { 0%,100% { background:#216d53; box-shadow:0 4px 0 #174532,0 0 0 0 #f5c86100; } 50% { background:#2c8769; box-shadow:0 4px 0 #174532,0 0 0 5px #f5c86155,0 0 20px #f5c86177; } }
@media (max-width:760px) { .cp-word-listen { min-height:24px; padding:2px 3px; gap:2px; } .cp-word-audio { font-size:.5rem; } }
@media (prefers-reduced-motion:reduce) { .cp-victory:not([hidden]) [data-acao="nova"],.cp-victory:not([hidden]) [data-acao="proxima"] { animation:none; box-shadow:0 4px 0 #174532,0 0 0 3px #f5c86188; } }

/* Safari móvel: alturas definidas e grade sem dependência do tamanho do texto. */
.cp-app { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.cp-word-listen { height:auto; }
.cp-setup .cp-choice { display:block; }
.cp-setup .cp-choice legend { float:none; width:100%; line-height:1.25; }
.cp-choice-items { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; min-width:0; }
.cp-setup .cp-choice label { display:block; flex:none; }
.cp-setup .cp-choice label > span { height:auto; }
.cp-setup .cp-extras .cp-modes { display:block; }
.cp-modes .cp-choice-items { grid-template-columns:minmax(0,1fr); gap:7px; }
.cp-board-wrap { overflow:hidden; }
.cp-board { flex:none; grid-template-rows:repeat(var(--cp-size),minmax(0,1fr)); }
.cp-board .cp-cell { width:100%; height:100%; min-height:0; min-width:0; aspect-ratio:auto; line-height:1; font-size:var(--cp-cell-font,1rem); -webkit-appearance:none; appearance:none; }
.cp-demo-grid { flex:none; grid-template-rows:repeat(4,minmax(0,1fr)); height:min(28vh,260px); }
.cp-demo-grid > span { min-width:0; min-height:0; line-height:1; }
@media (min-width:761px) and (max-height:740px) { .cp-demo-grid { height:min(25vh,190px); } }
@media (max-width:760px) {
  .cp-setup .cp-config { align-items:stretch; }
  .cp-choice-items { gap:6px; }
  .cp-setup .cp-themes label > span { height:78px; min-height:0; }
  .cp-setup .cp-levels label > span { height:54px; min-height:0; }
  .cp-setup .cp-modes label > span { height:auto; }
  .cp-demo { height:auto; }
  .cp-demo-example { height:auto; max-width:none; flex:0 0 auto; }
  .cp-demo-grid { width:82px; height:82px; max-height:none; aspect-ratio:auto; }
  .cp-demo-grid > span { font-size:.75rem; }
  .cp-demo-word { line-height:1; }
  .cp-hud { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px; }
  .cp-hud-title { grid-column:1; min-width:0; }
  .cp-hud-title > div { min-width:0; }
  .cp-hud-title h2 { white-space:normal; }
  .cp-stats { grid-column:1/-1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
  .cp-stats > div { min-width:0; padding:3px 5px; }
  .cp-stats small { display:inline; margin-right:5px; font-size:.5rem; }
  .cp-stats strong { display:inline; font-size:.75rem; }
  .cp-playing .cp-play-layout { grid-template-rows:minmax(0,1fr) auto; min-height:0; }
  .cp-words li { min-height:0; }
  .cp-word-listen { min-height:24px; line-height:1.1; }
  .cp-feedback { line-height:1.2; }
  .cp-setup.cp-small-viewport { gap:6px; }
  .cp-small-viewport .cp-mascot { width:52px; height:50px; flex-basis:52px; }
  .cp-small-viewport .cp-mascot img { width:54px; height:48px; }
  .cp-small-viewport .cp-setup-hero h2 { font-size:1.35rem; }
  .cp-small-viewport .cp-setup-hero p:last-child { display:none; }
  .cp-setup.cp-small-viewport .cp-config { gap:7px; }
  .cp-small-viewport .cp-simple-choices { gap:7px; }
  .cp-setup.cp-small-viewport .cp-choice legend { margin-bottom:5px; font-size:.7rem; }
  .cp-setup.cp-small-viewport .cp-themes label > span { height:66px; padding:4px 3px; gap:3px; }
  .cp-small-viewport .cp-themes img { height:35px; }
  .cp-setup.cp-small-viewport .cp-levels label > span { height:46px; padding:5px 3px; }
  .cp-small-viewport .cp-extras summary { padding:6px 8px; }
  .cp-small-viewport .cp-demo { padding:6px 9px; }
  .cp-small-viewport .cp-demo-grid { width:62px; height:62px; gap:2px; padding:3px; }
  .cp-small-viewport .cp-demo-grid > span { font-size:.63rem; }
  .cp-small-viewport .cp-demo-word { font-size:.6rem; }
}
@media (max-width:760px) and (max-height:480px) {
  .cp-setup .cp-themes label > span,.cp-setup.cp-small-viewport .cp-themes label > span { height:46px; padding:3px; }
  .cp-setup .cp-levels label > span,.cp-setup.cp-small-viewport .cp-levels label > span { height:39px; padding:4px 3px; }
  .cp-small-viewport .cp-themes img { height:24px; }
  .cp-demo-example { flex:0 0 auto; }
  .cp-demo-grid,.cp-small-viewport .cp-demo-grid { width:58px; height:58px; }
  .cp-playing .cp-play-layout { grid-template-columns:minmax(0,1fr) minmax(150px,.85fr); grid-template-rows:minmax(0,1fr); }
  .cp-playing .cp-words { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cp-playing .cp-word-listen { min-height:18px; font-size:.5rem; }
  .cp-playing .cp-secret { padding:2px 4px; }
  .cp-playing .cp-side-actions .cp-button { min-height:25px; font-size:.57rem; }
}
