:root {
  --bg: #fff2d7;
  --ink: #2a1712;
  --brown: #6f3b1f;
  --orange: #f06d22;
  --yellow: #ffd15c;
  --cream: #fffaf0;
  --green: #2f7d4a;
  --red: #d94332;
  --blue: #4d7ed9;
  --skin: #f0b07b;
  --skin-dark: #b86a3f;
  --shadow: 0 18px 40px rgba(61, 32, 17, 0.2);
  --line: 4px solid #2a1712;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 209, 92, 0.75), transparent 32%),
    radial-gradient(circle at bottom right, rgba(240, 109, 34, 0.25), transparent 38%),
    repeating-linear-gradient(135deg, rgba(42, 23, 18, 0.035) 0 10px, transparent 10px 20px),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 22px;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.game-shell {
  width: min(1160px, 100%);
}

.hero-card,
.game-card {
  background: rgba(255, 250, 240, 0.94);
  border: var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 42px);
  position: relative;
  overflow: hidden;
}

.hero-card::before,
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 12px 12px, rgba(42,23,18,.08) 2px, transparent 3px);
  background-size: 18px 18px;
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.hero-card > *, .game-card > * { position: relative; z-index: 1; }
.hidden { display: none !important; }

.brand-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.logo-badge {
  width: 150px;
  height: 150px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  text-align: center;
  border: var(--line);
  border-radius: 50%;
  background: var(--yellow);
  transform: rotate(-4deg);
  box-shadow: 8px 8px 0 var(--orange);
  padding: 12px;
}

.logo-o {
  display: block;
  font-size: 36px;
  font-weight: 950;
  line-height: 1;
}

.logo-title {
  display: block;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-badge small {
  display: block;
  margin-top: 6px;
  font-weight: 800;
  color: var(--brown);
}

.speech-bubble {
  background: #fff;
  border: var(--line);
  border-radius: 24px;
  padding: 18px 20px;
  font-size: clamp(16px, 2vw, 20px);
  max-width: 640px;
  box-shadow: 7px 7px 0 rgba(42, 23, 18, 0.13);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  background: var(--green);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 950;
  margin-bottom: 14px;
  box-shadow: 4px 4px 0 rgba(42,23,18,.15);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 7vw, 74px);
  line-height: 0.92;
  letter-spacing: -2px;
  text-transform: uppercase;
}

p {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  margin: 0;
}

.chef-card {
  min-height: 330px;
  border: var(--line);
  border-radius: 30px;
  background:
    linear-gradient(160deg, #fff 0%, #ffe0a1 100%);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 10px 10px 0 rgba(42, 23, 18, 0.12);
}

.chef-avatar {
  position: relative;
  width: 190px;
  height: 250px;
  display: grid;
  place-items: center;
  filter: drop-shadow(8px 10px 0 rgba(42,23,18,.12));
  animation: chefBounce 1.8s ease-in-out infinite;
}

.chef-avatar.small {
  width: 104px;
  height: 120px;
  transform: scale(.95);
  animation: none;
  filter: none;
}

.chef-hat-shape {
  position: absolute;
  top: 0;
  left: 22px;
  width: 146px;
  height: 78px;
  z-index: 5;
}
.chef-avatar.small .chef-hat-shape {
  width: 82px;
  height: 42px;
  left: 10px;
}
.chef-hat-shape::before {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 0;
  height: 34px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 14px 14px 8px 8px;
  z-index: 2;
}
.chef-avatar.small .chef-hat-shape::before {
  height: 20px;
  left: 8px;
  right: 8px;
  border-width: 3px;
  border-radius: 8px;
}
.chef-hat-shape span {
  position: absolute;
  bottom: 22px;
  width: 54px;
  height: 54px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 50%;
}
.chef-avatar.small .chef-hat-shape span {
  bottom: 13px;
  width: 30px;
  height: 30px;
  border-width: 3px;
}
.chef-hat-shape span:nth-child(1) { left: 0; }
.chef-hat-shape span:nth-child(2) { left: 46px; top: 0; }
.chef-hat-shape span:nth-child(3) { right: 0; }
.chef-avatar.small .chef-hat-shape span:nth-child(2) { left: 26px; }

.chef-face {
  position: absolute;
  top: 58px;
  width: 132px;
  height: 128px;
  background: var(--skin);
  border: 4px solid var(--ink);
  border-radius: 44% 44% 48% 48%;
  overflow: hidden;
  z-index: 3;
}
.chef-avatar.small .chef-face {
  top: 33px;
  width: 74px;
  height: 72px;
  border-width: 3px;
}
.chef-face::before,
.chef-face::after {
  content: "";
  position: absolute;
  top: 40px;
  width: 22px;
  height: 30px;
  background: var(--skin);
  border: 4px solid var(--ink);
  border-radius: 50%;
  z-index: -1;
}
.chef-face::before { left: -15px; }
.chef-face::after { right: -15px; }

.eyebrows::before,
.eyebrows::after {
  content: "";
  position: absolute;
  top: 38px;
  width: 28px;
  height: 8px;
  background: var(--ink);
  border-radius: 999px;
}
.eyebrows::before { left: 24px; transform: rotate(-8deg); }
.eyebrows::after { right: 24px; transform: rotate(8deg); }
.chef-avatar.small .eyebrows::before,
.chef-avatar.small .eyebrows::after { top: 21px; width: 15px; height: 5px; }
.chef-avatar.small .eyebrows::before { left: 13px; }
.chef-avatar.small .eyebrows::after { right: 13px; }

.eyes::before,
.eyes::after {
  content: "";
  position: absolute;
  top: 54px;
  width: 13px;
  height: 13px;
  background: var(--ink);
  border-radius: 50%;
}
.eyes::before { left: 34px; }
.eyes::after { right: 34px; }
.chef-avatar.small .eyes::before,
.chef-avatar.small .eyes::after { top: 31px; width: 8px; height: 8px; }
.chef-avatar.small .eyes::before { left: 20px; }
.chef-avatar.small .eyes::after { right: 20px; }

.nose {
  position: absolute;
  top: 62px;
  left: 58px;
  width: 18px;
  height: 26px;
  border: 3px solid var(--skin-dark);
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 12px 0;
}
.chef-avatar.small .nose { top: 36px; left: 33px; width: 10px; height: 14px; border-width: 2px; }

.moustache {
  position: absolute;
  left: 35px;
  top: 82px;
  width: 62px;
  height: 20px;
  background: var(--ink);
  border-radius: 50% 50% 45% 45%;
  transform: rotate(-1deg);
}
.moustache::before,
.moustache::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 38px;
  height: 22px;
  background: var(--ink);
  border-radius: 50%;
}
.moustache::before { left: -13px; transform: rotate(12deg); }
.moustache::after { right: -13px; transform: rotate(-12deg); }
.chef-avatar.small .moustache { left: 20px; top: 47px; width: 34px; height: 12px; }
.chef-avatar.small .moustache::before,
.chef-avatar.small .moustache::after { width: 20px; height: 12px; }
.chef-avatar.small .moustache::before { left: -7px; }
.chef-avatar.small .moustache::after { right: -7px; }

.smile {
  position: absolute;
  left: 52px;
  top: 93px;
  width: 28px;
  height: 17px;
  border-bottom: 4px solid #fff;
  border-radius: 50%;
  z-index: 2;
}
.chef-avatar.small .smile { left: 30px; top: 53px; width: 15px; height: 10px; border-width: 3px; }

.beard {
  position: absolute;
  bottom: -4px;
  left: 18px;
  width: 96px;
  height: 50px;
  background: var(--ink);
  border-radius: 18px 18px 45px 45px;
  opacity: .96;
}
.chef-avatar.small .beard { left: 10px; width: 54px; height: 28px; }

.chef-jacket {
  position: absolute;
  bottom: 0;
  width: 170px;
  height: 86px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 24px 24px 16px 16px;
  z-index: 2;
}
.chef-avatar.small .chef-jacket {
  width: 96px;
  height: 45px;
  border-width: 3px;
  border-radius: 14px;
}
.chef-jacket::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--ink);
}
.chef-jacket span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--ink);
  border-radius: 50%;
  left: 62px;
}
.chef-jacket span:nth-child(1) { top: 22px; }
.chef-jacket span:nth-child(2) { top: 44px; }
.chef-jacket span:nth-child(3) { top: 66px; }
.chef-avatar.small .chef-jacket span { width: 6px; height: 6px; left: 35px; }
.chef-avatar.small .chef-jacket span:nth-child(1) { top: 10px; }
.chef-avatar.small .chef-jacket span:nth-child(2) { top: 22px; }
.chef-avatar.small .chef-jacket span:nth-child(3) { top: 34px; }

.name-tag {
  position: absolute;
  right: 2px;
  bottom: 26px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 950;
  transform: rotate(-4deg);
  z-index: 6;
}

.plate-preview {
  position: absolute;
  bottom: 26px;
  right: 30px;
  font-size: 70px;
  filter: drop-shadow(6px 8px 0 rgba(42,23,18,.12));
  animation: plateSpin 2.4s ease-in-out infinite;
}

.steam {
  position: absolute;
  width: 22px;
  height: 62px;
  border-radius: 999px;
  border-left: 6px solid rgba(42,23,18,.35);
  top: 32px;
  animation: steam 2.2s ease-in-out infinite;
}
.steam-a { left: 20%; }
.steam-b { left: 77%; animation-delay: .4s; }

.rules-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 30px 0;
}

.rules-card div {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 14px 16px;
  font-weight: 800;
  box-shadow: 5px 5px 0 rgba(42,23,18,.12);
}

.actions,
.bottom-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.primary-btn,
.ghost-btn {
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 950;
  transition: transform .15s ease, box-shadow .15s ease;
}

.primary-btn {
  background: var(--orange);
  color: #fff;
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 20px;
}

.ghost-btn {
  background: #fff;
  color: var(--ink);
  box-shadow: 5px 5px 0 rgba(42,23,18,.16);
}

.ghost-btn.small {
  padding: 10px 14px;
  font-size: 14px;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.game-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.mini-logo {
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 950;
  box-shadow: 4px 4px 0 rgba(42,23,18,.15);
}
.mini-logo span { font-size: 24px; }

.hud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hud-item {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 8px 14px;
  min-width: 86px;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(42,23,18,.12);
}

.hud-item small {
  display: block;
  font-weight: 800;
  color: var(--brown);
}
.hud-item strong { font-size: 25px; }

.table-scene {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.waiter {
  height: 130px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  border: var(--line);
  border-radius: 28px;
  box-shadow: 7px 7px 0 rgba(42,23,18,.14);
  overflow: hidden;
}

.order-ticket {
  background: #fff;
  border: var(--line);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 8px 8px 0 rgba(42,23,18,.12);
}

.order-ticket small {
  color: var(--red);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.order-ticket h2 {
  margin: 8px 0 16px;
  font-size: clamp(26px, 4.4vw, 50px);
  line-height: .98;
}

.progress-track {
  height: 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: #f7dcc3;
}
.progress-bar {
  height: 100%;
  width: 100%;
  background: var(--green);
  transition: width .08s linear;
}

.message {
  min-height: 34px;
  text-align: center;
  font-size: 20px;
  font-weight: 950;
  margin: 12px 0 16px;
}

.message.good { color: var(--green); }
.message.bad { color: var(--red); }

.plates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.plate-btn {
  min-height: 146px;
  background: #fff;
  border: var(--line);
  border-radius: 26px;
  padding: 13px 10px;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 8px 8px 0 rgba(42,23,18,.13);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.plate-btn:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 10px 14px 0 rgba(42,23,18,.18);
}

.plate-btn:active { transform: scale(.96); }

.plate-emoji {
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1;
}

.plate-name {
  font-size: 16px;
  font-weight: 950;
  margin-top: 8px;
}

.plate-type {
  font-size: 11px;
  font-weight: 900;
  color: var(--brown);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
}

.plate-btn.correct {
  background: #dff5d8;
  animation: pop .35s ease;
}
.plate-btn.wrong {
  background: #ffe0df;
  animation: shake .35s ease;
}

.bottom-actions {
  justify-content: center;
  margin-top: 22px;
}

.end-emoji {
  font-size: 100px;
  text-align: center;
  animation: bounce 1.5s ease-in-out infinite;
}

.result-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}
.result-box div {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 18px;
  text-align: center;
  box-shadow: 5px 5px 0 rgba(42,23,18,.13);
}
.result-box small {
  display: block;
  font-weight: 900;
  color: var(--brown);
}
.result-box strong { font-size: 38px; }
.visit-note {
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-weight: 950;
  text-align: center;
}

.paused::after {
  content: "Jogo pausado";
  position: absolute;
  inset: 0;
  background: rgba(255,250,240,.82);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  font-size: clamp(36px, 7vw, 68px);
  font-weight: 950;
  text-transform: uppercase;
  z-index: 5;
  pointer-events: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes chefBounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}
@keyframes plateSpin {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg) scale(1.08); }
}
@keyframes steam {
  0% { transform: translateY(12px) scale(.75); opacity: 0; }
  45% { opacity: .65; }
  100% { transform: translateY(-38px) scale(1); opacity: 0; }
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@media (max-width: 920px) {
  .plates-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  body { padding: 12px; }
  .brand-row, .game-header { align-items: stretch; flex-direction: column; }
  .logo-badge { width: 128px; height: 128px; }
  .intro-grid { grid-template-columns: 1fr; }
  .chef-card { min-height: 260px; }
  .rules-card, .result-box { grid-template-columns: 1fr; }
  .table-scene { grid-template-columns: 1fr; }
  .waiter { height: 106px; }
}

@media (max-width: 520px) {
  .hero-card, .game-card { border-width: 3px; border-radius: 24px; padding: 18px; }
  h1 { font-size: 38px; }
  .plates-grid { gap: 10px; }
  .plate-btn { min-height: 126px; border-width: 3px; border-radius: 22px; }
  .plate-name { font-size: 14px; }
  .plate-type { display: none; }
  .hud-item { min-width: 76px; padding: 7px 10px; }
  .order-ticket h2 { font-size: 28px; }
  .chef-avatar.big { transform: scale(.88); }
}


/* Atualização v4: logotipo oficial correto e avatar do Chef André */
.official-logo {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(3px 5px 0 rgba(42, 23, 18, 0.10));
}
.hero-logo {
  flex: 0 0 auto;
  transform: none;
}
.andre-card {
  min-height: 390px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, .88), transparent 38%),
    linear-gradient(160deg, #fff 0%, #ffd881 100%);
}
.andre-avatar {
  display: block;
  object-fit: cover;
  object-position: center;
  border: 4px solid var(--ink);
  background: #ffd15c;
  box-shadow: 9px 10px 0 rgba(42, 23, 18, 0.14);
}
.andre-avatar-big {
  width: min(350px, 88%);
  border-radius: 36px;
  animation: andreFloat 2.2s ease-in-out infinite;
}
.andre-avatar-small {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border-width: 3px;
  box-shadow: 4px 5px 0 rgba(42, 23, 18, 0.15);
}
.helper-ribbon {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) rotate(-1deg);
  width: min(92%, 360px);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 5px 6px 0 rgba(42, 23, 18, 0.14);
}
.mini-logo {
  width: 190px;
  height: 78px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-logo img {
  width: 180px;
  height: auto;
  display: block;
  filter: drop-shadow(4px 4px 0 rgba(240, 109, 34, 0.32));
}
.waiter {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.72), transparent 42%),
    var(--yellow);
}
@keyframes andreFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}
@media (max-width: 820px) {
  .official-logo { width: 220px; }
  .andre-card { min-height: 330px; }
  .andre-avatar-big { width: min(310px, 86%); }
}
@media (max-width: 520px) {
  .official-logo { width: 170px; }
  .brand-row { gap: 16px; }
  .andre-card { min-height: 292px; }
  .andre-avatar-big { width: min(260px, 86%); border-radius: 26px; }
  .helper-ribbon { font-size: 12px; padding: 8px 10px; }
  .mini-logo { width: 132px; height: 60px; }
  .mini-logo img { width: 128px; }
}


.back-entry {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(42, 23, 18, 0.90);
  color: #fffaf0;
  text-decoration: none;
  font-weight: 950;
  border: 3px solid #2a1712;
  box-shadow: 6px 6px 0 rgba(240, 109, 34, .72);
}
.back-entry:hover, .back-entry:focus-visible { transform: translateY(-1px); outline: none; }
@media (max-width: 640px) { .back-entry { right: 10px; top: 10px; padding: 8px 13px; font-size: .9rem; border-width: 2px; } }
