/* Jornada da Palavra — interface do jogo (o canvas é do Phaser; menus, HUD e controles são HTML) */
.jogo-wrap { padding: 8px 0 40px; }
.jogo { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; aspect-ratio: 16 / 9; background: #05060a; border: 1px solid var(--gold-line); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(232, 181, 3, .35); user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.jogo.is-full { position: fixed; inset: 0; z-index: 150; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; }
html.jg-noscroll, html.jg-noscroll body { overflow: hidden; }
.jg-stage { position: absolute; inset: 0; }
.jg-stage canvas { display: block; image-rendering: pixelated; }

.jg-round { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(10,10,14,.6); color: #fff; font-size: 15px; cursor: pointer; backdrop-filter: blur(4px); }
.jg-round:hover { border-color: var(--gold); color: var(--gold); }
.jg-full { position: absolute; right: 10px; bottom: 10px; z-index: 10; }
.jogo.is-playing .jg-full { bottom: auto; top: 54px; }

/* HUD */
.jg-hud { position: absolute; inset: 8px 8px auto 8px; z-index: 4; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.jg-hud[hidden] { display: none; }
.jg-hud__info { background: rgba(10,10,14,.62); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px 12px; display: flex; flex-direction: column; line-height: 1.25; backdrop-filter: blur(4px); max-width: 68%; }
.jg-hud__info strong { color: var(--gold); font-size: 13px; letter-spacing: .02em; }
.jg-hud__info span { color: #fff; font-size: 13px; font-weight: 600; }
.jg-hud__side { display: flex; gap: 6px; align-items: center; pointer-events: auto; }
.jg-hearts { color: #ff5a5f; font-size: 18px; letter-spacing: 2px; text-shadow: 0 1px 2px #000; }
.jg-chip { background: rgba(10,10,14,.62); border: 1px solid rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 700; }

.jg-toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 5; background: rgba(15,15,20,.88); color: #fff; border: 1px solid var(--gold-line); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; max-width: 90%; text-align: center; pointer-events: none; animation: jgToast .25s ease; }
.jg-toast[hidden] { display: none; }
@keyframes jgToast { from { opacity: 0; transform: translate(-50%, -6px); } }

/* Controle de toque */
.jg-pad { position: absolute; inset: auto 0 0 0; z-index: 4; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 14px 12px; pointer-events: none; }
.jg-pad[hidden] { display: none; }
.jg-pad button { pointer-events: auto; touch-action: none; width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: rgba(20,20,28,.45); color: #fff; font-size: 22px; font-weight: 800; backdrop-filter: blur(3px); -webkit-user-select: none; user-select: none; }
.jg-pad button.is-on { background: rgba(232,181,3,.55); border-color: var(--gold); color: #111; }
.jg-pad__dir, .jg-pad__act { display: flex; gap: 14px; align-items: flex-end; }
.jg-pad .jg-a { width: 74px; height: 74px; background: rgba(232,181,3,.35); border-color: rgba(232,181,3,.8); }
.jg-pad .jg-b { margin-bottom: 30px; }

/* Camada de menus e caixas de texto */
.jg-layer { position: absolute; inset: 0; z-index: 7; display: none; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.jg-layer.is-open { display: flex; }
.jg-layer--panel { background: rgba(5,6,10,.45); }
.jg-layer--menu { background: radial-gradient(ellipse at 50% 0%, rgba(232,181,3,.18), transparent 60%), linear-gradient(180deg, #0d0d14, #060609); align-items: flex-start; }
.jg-panel { width: 100%; max-width: 560px; margin: auto; background: rgba(16,16,22,.96); border: 1px solid var(--gold-line); border-radius: 18px; padding: 20px 22px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.8); animation: jgIn .25s ease; }
@keyframes jgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.jg-panel h2 { font-size: clamp(19px, 2.4vw, 24px); margin: 4px 0 8px; color: #fff; }
.jg-panel p { color: #d8d8de; font-size: 15px; line-height: 1.55; margin: 0 0 8px; }
.jg-kicker { display: inline-block; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.jg-ref { color: var(--gold-2) !important; font-size: 13px !important; font-weight: 600; }
.jg-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.jg-actions--col { flex-direction: column; align-items: stretch; }
.jg-actions--small { justify-content: center; }

.jg-answers { display: grid; gap: 8px; margin: 10px 0 6px; }
.jg-answer { text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); color: #fff; font: inherit; font-size: 15px; cursor: pointer; transition: border-color .2s, background .2s; }
.jg-answer:hover:not(:disabled), .jg-answer:focus-visible { border-color: var(--gold); background: var(--gold-soft); }
.jg-answer.is-right { border-color: #43a047; background: rgba(67,160,71,.2); }
.jg-answer.is-wrong { border-color: #e53935; background: rgba(229,57,53,.14); opacity: .7; }
.jg-feedback { min-height: 1.4em; font-weight: 600; }
.jg-feedback.is-right { color: #81c784 !important; }
.jg-feedback.is-wrong { color: #ef9a9a !important; }

.jg-stars { color: var(--gold); letter-spacing: 2px; }
.jg-stars i { color: rgba(255,255,255,.2); font-style: normal; }
.jg-bigstars { font-size: 34px; text-align: center; margin: 2px 0 4px; }
.jg-why { text-align: center; font-size: 13px !important; color: #a9a9b3 !important; }
.jg-verse { margin: 10px 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 12px 12px 0; font-family: 'Lora', Georgia, serif; font-style: italic; color: #fff; font-size: 15px; line-height: 1.55; }
.jg-verse cite { display: block; margin-top: 4px; font-family: inherit; font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.jg-talents { font-size: 13px !important; }
.jg-talents a { color: var(--gold); text-decoration: underline; }

/* Tela inicial */
.jg-start, .jg-map { width: 100%; max-width: 760px; margin: auto; text-align: center; padding: 6px 0; }
.jg-title { font-size: clamp(28px, 5vw, 48px); line-height: 1.05; margin: 6px 0; color: #fff; }
.jg-title span { color: var(--gold); }
.jg-start > p { color: #c9c9d1; margin: 0 0 10px; }
.jg-start h3 { font-size: 13px; color: #a9a9b3; text-transform: uppercase; letter-spacing: .12em; margin: 14px 0 8px; }
.jg-choice { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.jg-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 16px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: border-color .2s, transform .2s; }
.jg-opt canvas { image-rendering: pixelated; width: 54px; height: 72px; }
.jg-opt:hover { transform: translateY(-2px); }
.jg-opt.is-on { border-color: var(--gold); background: var(--gold-soft); }
.jg-opt--mode { max-width: 250px; text-align: left; align-items: flex-start; }
.jg-opt--mode small { font-weight: 500; color: #c9c9d1; font-size: 13px; line-height: 1.35; }
.jg-start .jg-actions { justify-content: center; }

/* Mapa */
.jg-map h2 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 12px; color: #fff; }
.jg-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; position: relative; }
.jg-level { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 12px; border-radius: 16px; border: 1px solid var(--gold-line); background: linear-gradient(180deg, rgba(232,181,3,.12), rgba(255,255,255,.02)); color: #fff; font: inherit; cursor: pointer; transition: transform .2s, border-color .2s; }
.jg-level:hover:not(:disabled), .jg-level:focus-visible { transform: translateY(-3px); border-color: var(--gold); }
.jg-level strong { font-size: 15px; }
.jg-level small { color: #c9c9d1; font-size: 12px; line-height: 1.3; }
.jg-level__n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #141414; font-weight: 800; font-size: 18px; }
.jg-level__ref { font-size: 11px; color: var(--gold-2); font-weight: 600; }
.jg-level.is-locked { opacity: .45; cursor: not-allowed; background: rgba(255,255,255,.03); }
.jg-level.is-locked .jg-level__n { background: rgba(255,255,255,.12); font-size: 16px; }
.jg-level.is-done .jg-level__n { background: #43a047; color: #fff; }
.jg-soon { color: #a9a9b3; font-size: 13px; margin: 14px 0 4px; }

@media (max-width: 760px) {
  .jg-levels { grid-template-columns: repeat(2, 1fr); }
  .jg-panel { padding: 14px 16px; }
  .jg-panel p { font-size: 14px; }
  .jg-hud__info span, .jg-chip { font-size: 12px; }
}
@media (max-height: 460px) {
  .jg-panel { padding: 12px 16px; }
  .jg-panel h2 { margin: 2px 0 4px; }
  .jg-panel p { font-size: 13.5px; line-height: 1.45; margin-bottom: 4px; }
  .jg-pad button { width: 56px; height: 56px; }
  .jg-pad .jg-a { width: 64px; height: 64px; }
  .jg-levels { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .jg-level { padding: 10px 6px 8px; }
  .jg-level small { display: none; }
}

/* Celular: o jogo fica fora da tela até tocar em "Jogar agora", e abre direto em tela cheia */
.jogo.is-mobile.is-closed { position: fixed; top: 0; left: -300vw; width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; visibility: hidden; }
.jogo.is-mobile .jg-full { top: 8px; right: 50%; bottom: auto; transform: translateX(50%); width: 34px; height: 34px; font-size: 14px; }
.jogo.is-mobile.is-playing .jg-full { top: 8px; right: 50%; }
.jogo-cta[hidden] { display: none; }
.jogo-cta { margin: 4px 0 0; }
.jogo-cta__btn { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px 28px; border-radius: 22px; border: 1px solid var(--gold-line); color: #fff; font: inherit; cursor: pointer; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, rgba(232,181,3,.32), transparent 65%), linear-gradient(180deg, #17140a, #07070b); box-shadow: 0 24px 60px -24px rgba(232,181,3,.5); }
.jogo-cta__play { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--gold); color: #141414; font-size: 34px; padding-left: 6px; box-shadow: 0 0 0 10px rgba(232,181,3,.18); animation: jgPulse 1.8s ease-in-out infinite; }
.jogo-cta__btn strong { font-size: 24px; margin-top: 8px; }
.jogo-cta__btn small { color: #c9c9d1; font-size: 14px; }
@keyframes jgPulse { 50% { box-shadow: 0 0 0 18px rgba(232,181,3,.06); } }
.jg-rotate { display: none; }
@media (orientation: portrait) {
  .jogo.is-mobile.is-full .jg-rotate { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(5,6,10,.94); color: #fff; text-align: center; padding: 24px; }
  .jg-rotate span { font-size: 48px; }
  .jg-rotate strong { font-size: 20px; }
  .jg-rotate small { color: #c9c9d1; }
}

/* Página */
.jogo-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.jogo-info > div { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 18px; }
.jogo-info h3 { font-size: 17px; margin: 0 0 8px; }
.jogo-info p, .jogo-info li { color: #c9c9d1; font-size: 14.5px; line-height: 1.55; }
.jogo-info ul { margin: 0; padding-left: 18px; }
.jogo-info kbd { display: inline-block; padding: 1px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); font-size: 12px; font-family: inherit; }
@media (max-width: 860px) { .jogo-info { grid-template-columns: 1fr; } }

/* Celular deitado (tela baixa): menus compactos para caber sem rolar */
@media (max-height: 460px) {
  .jogo.is-mobile .jg-layer--menu { padding-top: 46px; }
  .jg-start > .jg-kicker, .jg-start > p { display: none; }
  .jg-title { font-size: 24px; margin: 0 0 2px; }
  .jg-start h3 { margin: 6px 0 4px; font-size: 11px; }
  .jg-opt { padding: 6px 12px; gap: 2px; border-radius: 12px; }
  .jg-opt canvas { width: 30px; height: 40px; }
  .jg-choice { gap: 8px; }
  .jg-start .jg-choice:first-of-type .jg-opt { flex-direction: row; gap: 8px; }
  .jg-opt--mode { max-width: 230px; }
  .jg-opt--mode small { font-size: 11.5px; }
  .jg-start .jg-actions, .jg-map .jg-actions { margin-top: 8px; }
  .jg-map h2 { font-size: 22px; margin-bottom: 8px; }
  .jg-soon { margin: 6px 0 0; font-size: 12px; }
}
