/* =========================================================
   Game Quiz 2: "Missão na Cozinha do Ricardo"
   (usa a base de assets/game/game.css)
   ========================================================= */

/* ---------- Jogo: sem seleção de texto nem menu de copiar ao segurar ---------- */
.g2 { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.g2 input { -webkit-user-select: text; user-select: text; }

/* ---------- HUD ---------- */
.g2 .g-hud { gap: 8px; }
.g2-track { max-width: 300px; }
.g2-score { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: var(--ink-2); color: #fff; font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; box-shadow: 0 4px 12px rgba(60, 20, 5, .25); }
.g2-score span { color: var(--saffron); }
.g2-score.pop { animation: pop .5s var(--spring); }
@keyframes pop { 40% { transform: scale(1.25); } }
.g2-badge { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--paper); box-shadow: 0 4px 12px rgba(60, 20, 5, .2), inset 0 0 0 2px var(--flame); font-size: .78rem; font-weight: 800; max-width: 130px; }
.g2-badge__av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--flame); color: #fff; font-size: .8rem; flex: none; }
.g2-badge__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g2-badge[hidden] { display: none; }
@media (max-width: 420px) { .g2-badge__name { display: none; } .g2-badge { padding: 4px; } .g2-track { gap: 4px; } }

/* ---------- Tabuleiro (tábua de corte) ---------- */
.g2-board { background: radial-gradient(120% 90% at 50% 0%, #fffaf2 0%, #f7ead6 100%); }
.g2-board::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: 26px 26px 0 0; background: linear-gradient(90deg, var(--flame), var(--saffron), var(--leaf)); opacity: .85; }
.g2-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 4px 10px; border-radius: 999px; background: rgba(200, 22, 29, .1); color: var(--flame); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.g2-hint { margin: 10px 0 0; text-align: center; font-size: .82rem; font-weight: 700; color: rgba(42, 26, 18, .55); }
.g2-plus { position: fixed; z-index: 60; pointer-events: none; font: 800 1.6rem var(--font-b); color: var(--saffron); text-shadow: 0 2px 0 var(--ink-2), 0 0 10px rgba(0, 0, 0, .3); }
.g2-fly { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.g2-fly img { position: absolute; width: 64px; height: 64px; }

/* ---------- 1. Gancho: o tomate ---------- */
.g2-hook { position: relative; height: 230px; display: grid; place-items: center; }
.g2-hook__tomato { position: relative; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; touch-action: manipulation; }
.g2-hook__tomato img { width: 110px; height: 110px; filter: drop-shadow(0 10px 14px rgba(120, 20, 10, .35)); }
.g2-hook__tomato::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 4px solid var(--saffron); animation: ringp 1.1s ease-out infinite; }
@keyframes ringp { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.g2-hook__tag { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-weight: 800; color: var(--flame); letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }

/* ---------- 2. Crachá ---------- */
.g2-cracha { position: relative; margin: 4px auto 16px; max-width: 360px; padding: 16px 18px; border-radius: 18px; background: #fff; box-shadow: 0 10px 24px -12px rgba(60, 20, 5, .45), inset 0 0 0 3px var(--flame); outline: 2px dashed rgba(200, 22, 29, .45); outline-offset: -10px; text-align: center; }
.g2-cracha__hole { width: 46px; height: 8px; margin: 0 auto 10px; border-radius: 6px; background: #e9dccb; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .15); }
.g2-cracha small { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: rgba(42, 26, 18, .5); }
.g2-cracha__name { min-height: 1.3em; margin: 4px 0 2px; font-family: var(--font-d); font-style: italic; font-size: clamp(1.8rem, 8vw, 2.4rem); line-height: 1.1; color: var(--ink-2); border-bottom: 2px solid rgba(42, 26, 18, .15); }
.g2-cracha__name:empty::before { content: "seu nome aqui"; color: rgba(42, 26, 18, .25); }
.g2-cracha__role { font-weight: 800; font-size: .82rem; color: var(--flame); }
.g2-stamp { position: absolute; right: -6px; top: -14px; padding: 6px 10px; border: 3px solid var(--flame); border-radius: 8px; color: var(--flame); font: 800 .78rem var(--font-b); letter-spacing: .1em; text-transform: uppercase; background: rgba(255, 255, 255, .9); transform: rotate(12deg) scale(0); opacity: 0; }
.g2-stamp.is-on { animation: stamp .55s var(--spring) forwards; }
@keyframes stamp { 0% { transform: rotate(12deg) scale(2.6); opacity: 0; } 100% { transform: rotate(12deg) scale(1); opacity: 1; } }

/* ---------- 3. Esteira da feira ---------- */
.g2-belt { position: relative; height: 112px; margin: 6px -16px 14px; overflow: hidden; background: repeating-linear-gradient(90deg, #4a3426 0 22px, #3d2a1f 22px 44px); box-shadow: inset 0 8px 10px -6px rgba(0, 0, 0, .5), inset 0 -8px 10px -6px rgba(0, 0, 0, .5); animation: beltbg 1.4s linear infinite; }
@keyframes beltbg { to { background-position: 44px 0; } }
.g2-belt::before, .g2-belt::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: #8a5126; z-index: 2; }
.g2-belt::before { top: 0; } .g2-belt::after { bottom: 0; }
.g2-belt__track { position: absolute; left: 0; top: 14px; display: flex; gap: 14px; will-change: transform; }
.g2-item { flex: none; width: 84px; height: 84px; border-radius: 20px; display: grid; place-items: center; background: #fffaf2; box-shadow: 0 4px 0 rgba(0, 0, 0, .3); touch-action: manipulation; transition: transform .2s var(--spring), opacity .3s; }
.g2-item img { width: 60px; height: 60px; pointer-events: none; }
.g2-item:active { transform: scale(.9); }
.g2-item.is-taken { opacity: .2; pointer-events: none; transform: scale(.8); }
.g2-basket { display: flex; justify-content: center; gap: 10px; }
.g2-slot { position: relative; width: 78px; height: 78px; border-radius: 20px; display: grid; place-items: center; background: rgba(42, 26, 18, .06); border: 2px dashed rgba(42, 26, 18, .2); }
.g2-slot img { width: 56px; height: 56px; }
.g2-slot.is-full { background: #fff; border: 2px solid var(--flame); animation: pop .4s var(--spring); }
.g2-slot.is-full::after { content: "×"; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-2); color: #fff; font-size: .9rem; line-height: 1; }
.g2-slot small { position: absolute; bottom: -18px; font-size: .68rem; font-weight: 700; white-space: nowrap; }

/* ---------- 4a. Relógio ---------- */
.g2-dial { position: relative; width: min(250px, 70vw); aspect-ratio: 1; margin: 6px auto 4px; touch-action: none; user-select: none; }
.g2-dial svg { width: 100%; height: 100%; overflow: visible; }
.g2-dial .sec { cursor: pointer; transition: opacity .3s; }
.g2-dial .sec.on path { fill: #ffe2b8; }
.g2-dial .hand { transform-origin: 125px 125px; transition: transform .45s var(--spring); }
.g2-dial.dragging .hand { transition: none; }
.g2-dial__label { text-align: center; font-family: var(--font-d); font-size: 1.3rem; min-height: 1.6em; }

/* ---------- 4b. Mesa de pratos ---------- */
.g2-table { position: relative; width: min(260px, 72vw); aspect-ratio: 1; margin: 4px auto 6px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #c88a4f, #8a5126 75%); box-shadow: inset 0 0 0 10px #6b3d1c, 0 14px 24px -12px rgba(0, 0, 0, .5); touch-action: manipulation; }
.g2-plate { position: absolute; width: 22%; aspect-ratio: 1; margin: -11% 0 0 -11%; border-radius: 50%; background: radial-gradient(circle, #fff 45%, #eee3d4 47%, #fff 60%); box-shadow: 0 3px 6px rgba(0, 0, 0, .3); animation: plate .45s var(--spring); }
@keyframes plate { from { transform: scale(0) rotate(-90deg); } }
.g2-table__n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-d); font-size: 2.4rem; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .4); pointer-events: none; }
.g2-stepper { display: flex; align-items: center; justify-content: center; gap: 14px; }
.g2-stepper button { width: 54px; height: 54px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .2), 0 3px 0 rgba(42, 26, 18, .15); font-size: 1.6rem; font-weight: 800; }
.g2-stepper strong { min-width: 120px; text-align: center; font-family: var(--font-d); font-size: 1.15rem; }

/* ---------- 4c. Superpoderes ---------- */
.g2-powers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; perspective: 900px; }
.g2-power { position: relative; min-height: 118px; padding: 14px 10px; border-radius: 18px; background: linear-gradient(160deg, #fff, #fbe8cf); box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .12), 0 4px 0 rgba(42, 26, 18, .1); text-align: center; transition: transform .5s var(--spring), box-shadow .3s, opacity .3s; transform-style: preserve-3d; }
.g2-power__ico { font-size: 2rem; display: block; }
.g2-power strong { display: block; font-family: var(--font-d); font-size: 1.15rem; margin-top: 4px; }
.g2-power small { font-size: .78rem; color: rgba(42, 26, 18, .62); }
.g2-power.is-on { transform: translateY(-4px) rotateY(360deg) scale(1.04); box-shadow: inset 0 0 0 3px var(--flame), 0 0 0 6px rgba(240, 168, 62, .35), 0 14px 24px -10px rgba(200, 22, 29, .5); background: linear-gradient(160deg, #fff4e3, #ffd9a3); }
.g2-powers.has-choice .g2-power:not(.is-on) { opacity: .45; transform: scale(.96); }

/* ---------- 4d. Escudos ---------- */
.g2-shields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g2-shield { position: relative; padding: 16px 10px 14px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .12); text-align: center; font-weight: 800; transition: transform .3s var(--spring); }
.g2-shield svg { width: 64px; height: 72px; display: block; margin: 0 auto 6px; }
.g2-shield .fill { fill: #efe3d3; transition: fill .3s; }
.g2-shield[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--leaf); transform: translateY(-3px); }
.g2-shield[aria-pressed="true"] .fill { fill: #8fcf72; }
.g2-shield[aria-pressed="true"]::after { content: ""; position: absolute; inset: -4px; border-radius: 24px; border: 3px solid rgba(79, 154, 69, .5); animation: ringp 1s ease-out; }

/* ---------- 4e. Dificuldade ---------- */
.g2-levels { display: grid; gap: 10px; }
.g2-level { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .12), 0 3px 0 rgba(42, 26, 18, .08); text-align: left; transition: transform .25s var(--spring); }
.g2-level strong { display: block; font-size: 1.05rem; }
.g2-level small { color: rgba(42, 26, 18, .6); font-size: .82rem; }
.g2-level__ico { font-size: 1.6rem; }
.g2-bars { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.g2-bars i { width: 6px; border-radius: 2px; background: rgba(42, 26, 18, .15); }
.g2-bars i:nth-child(1) { height: 8px; } .g2-bars i:nth-child(2) { height: 14px; } .g2-bars i:nth-child(3) { height: 22px; }
.g2-bars i.on { background: var(--flame); }
.g2-level:active { transform: scale(.97); }

/* ---------- 6. Tempero: arrastar até a panela ---------- */
.g2-cook { position: relative; display: grid; justify-items: center; gap: 12px; }
.g2-pan { position: relative; width: min(220px, 60vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #3d2c24 58%, #1b1311 60%); box-shadow: 0 16px 24px -12px rgba(0, 0, 0, .6); transition: transform .3s var(--spring); }
.g2-pan::after { content: ""; position: absolute; right: -36%; top: 46%; width: 42%; height: 12%; border-radius: 8px; background: #1b1311; }
.g2-pan.hit { transform: scale(1.06) rotate(-3deg); }
.g2-pan.target { box-shadow: 0 0 0 6px rgba(240, 168, 62, .6), 0 16px 24px -12px rgba(0, 0, 0, .6); }
.g2-pan__food { position: absolute; inset: 16%; border-radius: 50%; overflow: hidden; }
.g2-pan__food i { position: absolute; border-radius: 40%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.g2-pan__dust { position: absolute; inset: 16%; border-radius: 50%; pointer-events: none; }
.g2-jars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; }
.g2-jar { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .1); font-size: .68rem; font-weight: 800; touch-action: none; user-select: none; cursor: grab; }
.g2-jar img { width: 42px; height: 42px; pointer-events: none; }
.g2-jar.is-used { opacity: .35; pointer-events: none; }
.g2-drag { position: fixed; z-index: 70; width: 70px; height: 70px; margin: -35px 0 0 -35px; pointer-events: none; transform: rotate(-12deg) scale(1.15); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); }
@media (max-width: 420px) { .g2-jars { grid-template-columns: repeat(3, 1fr); } .g2-jar img { width: 46px; height: 46px; } }

/* ---------- 7. Carta colecionável ---------- */
.g2-cardwrap { perspective: 1200px; width: min(300px, 78vw); margin: 0 auto; }
.g2-card { position: relative; aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform 1s var(--ease); cursor: pointer; }
.g2-card.is-open { transform: rotateY(180deg); cursor: default; }
.g2-card__face { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.g2-card__back { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #b3141b 0 14px, #a0111a 14px 28px); box-shadow: inset 0 0 0 8px #fffaf2, inset 0 0 0 11px var(--saffron); }
.g2-card__back img { width: 58%; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4)); animation: bob 2.4s ease-in-out infinite; }
.g2-card__back p { position: absolute; bottom: 14%; margin: 0; color: #fff; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; animation: blinkt 1.2s steps(2) infinite; }
@keyframes blinkt { 50% { opacity: .4; } }
.g2-card__front { transform: rotateY(180deg); display: flex; flex-direction: column; padding: 14px; background: linear-gradient(170deg, #fffaf2, #f6e5cc); box-shadow: inset 0 0 0 6px var(--rar, #c58b56); }
.g2-card[data-rar="rara"] { --rar: #4a86c5; }
.g2-card[data-rar="lendaria"] { --rar: #e0a31b; }
.g2-card[data-rar="lendaria"] .g2-card__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .7) 45%, transparent 60%); background-size: 250% 100%; animation: shine 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.g2-card__rar { align-self: center; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: var(--rar, #c58b56); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.g2-card__art { position: relative; flex: 1; display: grid; place-items: center; margin: 8px 0; border-radius: 14px; background: radial-gradient(circle, #fff 30%, #fbe0bb 75%); overflow: hidden; }
.g2-card__art .g2-pan { width: 62%; }
.g2-card__owner { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--flame); text-align: center; }
.g2-card h3 { margin: 2px 0 6px; font-family: var(--font-d); font-weight: 600; font-size: 1.22rem; line-height: 1.08; text-align: center; }
.g2-stats { display: grid; gap: 4px; font-size: .7rem; font-weight: 800; }
.g2-stat { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 6px; }
.g2-stat i { height: 7px; border-radius: 6px; background: rgba(42, 26, 18, .12); overflow: hidden; }
.g2-stat i b { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--saffron), var(--flame)); transition: width 1.2s var(--ease) .8s; }
.g2-card.is-open .g2-stat i b { width: var(--v); }

/* ---------- 8. Desbloqueio ---------- */
.g2-progress { position: relative; height: 16px; border-radius: 10px; background: rgba(42, 26, 18, .1); overflow: hidden; margin: 6px 0 4px; }
.g2-progress b { position: absolute; inset: 0 auto 0 0; width: var(--p, 80%); border-radius: 10px; background: linear-gradient(90deg, var(--leaf), #8fcf72); transition: width 1.2s var(--ease); }
.g2-progress b::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .25) 0 8px, transparent 8px 16px); animation: beltbg 1s linear infinite; }
.g2-progress__lbl { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 800; color: rgba(42, 26, 18, .65); }
.g2-unlock { margin-top: 14px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .1); }
.g2-unlock__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.g2-lock { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fbe8cf; font-size: 1.2rem; }
.g2-unlock.is-open .g2-lock { background: #d9f0cf; animation: pop .5s var(--spring); }
.g2-unlock__head strong { display: block; }
.g2-unlock__head small { color: rgba(42, 26, 18, .6); font-size: .82rem; }
.g2-unlock.is-open form { display: none; }
.g2-unlock.is-done-msg::after { content: "Liberado ✓"; display: block; font-weight: 800; color: var(--leaf); }
.g2-reco { margin-top: 12px; }

/* ---------- 9. Final ---------- */
.g2-offer { display: block; margin-top: 12px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, var(--flame), #7d0c12); color: #fff; text-decoration: none; box-shadow: 0 10px 22px -10px rgba(158, 16, 22, .7); }
.g2-offer small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--saffron); }
.g2-offer strong { display: block; font-family: var(--font-d); font-size: 1.3rem; line-height: 1.15; margin: 4px 0; }
.g2-offer span { font-size: .88rem; opacity: .9; }
.g2-tomorrow { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: #fff4e3; border: 2px dashed var(--saffron); font-size: .88rem; }

/* ---------- Desktop: tabuleiro mais largo ---------- */
@media (min-width: 900px) and (min-height: 560px) {
  .g2 .g-panel { width: min(540px, 42vw); }
  .g2-belt { margin-inline: -26px; }
  .g2-hook { height: 280px; }
}
@media (orientation: landscape) and (max-height: 559px) {
  .g2-hook { height: 150px; }
  .g2-belt { height: 96px; }
  .g2-item { width: 72px; height: 72px; }
  .g2-dial, .g2-table { width: min(170px, 40vh); }
  .g2-cardwrap { width: min(200px, 60vh); }
  .g2-pan { width: min(130px, 34vh); }
  /* tempero lado a lado: panela à esquerda, potes à direita (tudo cabe sem rolar) */
  .g2-cook { grid-template-columns: auto 1fr; align-items: center; gap: 22px; }
  .g2-jars { grid-template-columns: repeat(3, 1fr); }
  .g2-jar img { width: 34px; height: 34px; }
  .g2 .g-panel h2 { font-size: 1.2rem; }
  .g2 .g-panel .g-sub { margin-bottom: 8px; font-size: .8rem; }
  .g2-kicker { margin-bottom: 2px; }
  .g2-powers .g2-power { min-height: 0; padding: 8px; }
  .g2-shield svg { width: 44px; height: 50px; }
  .g2-level { padding: 8px 12px; }
  .g2-card h3 { font-size: 1rem; }
}
