/* Table Fun — Easy Light Menu. tablet-first, no build step. */
:root {
  --bg: #16121f;
  --bg2: #221a30;
  --ink: #fff8ee;
  --muted: rgba(255, 248, 238, 0.68);
  --line: rgba(255, 248, 238, 0.14);
  --card: rgba(255, 255, 255, 0.07);
  --gold: #f2c46d;
  --good: #3ddc97;
  --bad: #ff6b6b;
  --r: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Display", "Segoe UI", system-ui, "Noto Sans", sans-serif;
  --emoji: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif;
  --pad: clamp(16px, 2.6vw, 32px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 10% -10%, rgba(242, 108, 160, 0.22), transparent 60%),
    radial-gradient(60vmax 60vmax at 110% 20%, rgba(92, 124, 250, 0.22), transparent 60%),
    radial-gradient(50vmax 50vmax at 50% 120%, rgba(242, 196, 109, 0.18), transparent 60%),
    linear-gradient(160deg, var(--bg), var(--bg2));
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-appearance: none; appearance: none; }
a { color: inherit; }
.emoji { font-family: var(--emoji); line-height: 1; }

.app { position: fixed; inset: 0; display: flex; flex-direction: column; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: fadeIn .28s ease; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 var(--pad) var(--pad); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Top bar ---------- */
.bar { display: flex; align-items: center; gap: 12px; padding: 14px var(--pad); min-height: 76px; }
.bar h1 { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; flex: 1; text-align: center; }
.bar .spacer { width: 120px; flex: none; display: flex; justify-content: flex-end; }
.btn-back, .pill-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 1.05rem; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .2s;
}
.btn-back { width: 120px; justify-content: center; padding: 0 14px; }
.btn-back:active, .pill-btn:active { transform: scale(.96); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 0 30px; border-radius: 999px;
  font-weight: 800; font-size: 1.2rem; background: var(--gold); color: #2a1d05; box-shadow: 0 10px 30px rgba(242, 196, 109, .25);
  transition: transform .12s ease, filter .2s; text-decoration: none;
}
.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.good { background: var(--good); color: #062a1b; box-shadow: 0 10px 30px rgba(61, 220, 151, .25); }
.btn.bad { background: #ff8f8f; color: #3a0707; box-shadow: 0 10px 30px rgba(255, 107, 107, .2); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Home ---------- */
.home-head { display: flex; align-items: center; gap: 18px; padding: calc(14px + 0.5vh) var(--pad) 10px; }
.home-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #000; border: 1px solid var(--line); flex: none; }
.home-title { flex: 1; min-width: 0; }
.home-title .eyebrow { margin: 0; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.home-title h1 { margin: 2px 0 0; font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.menu-btn { background: var(--ink); color: #1b1426; border: 0; min-height: 60px; font-size: 1.1rem; padding: 0 24px; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.tiles {
  flex: 1; min-height: 0; display: grid; gap: clamp(12px, 1.8vw, 20px); padding: 8px var(--pad) var(--pad);
  grid-template-columns: 1fr 1fr 1.1fr; grid-template-rows: 1.25fr 1fr 1fr;
  grid-template-areas: "picture picture kids" "trivia couples kids" "spouse spouse gtky";
}
.tile {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(16px, 2.2vw, 26px); text-align: left; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 0;
  box-shadow: 0 18px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s ease;
}
.tile:active { transform: scale(.975); }
.tile .t-emoji { position: absolute; top: clamp(12px, 2vw, 22px); right: clamp(14px, 2vw, 24px); font-size: clamp(2.6rem, 6vw, 4.2rem); filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }
.tile h2 { margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.9rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.08; padding-right: clamp(64px, 8vw, 92px); }
.tile p { margin: 0; font-size: clamp(.9rem, 1.5vw, 1.05rem); opacity: .92; line-height: 1.3; font-weight: 600; }
.tile .t-hint { font-size: .78rem; opacity: .75; margin-top: 6px; font-weight: 600; }
.tile.kids { grid-area: kids; background: linear-gradient(150deg, #ff7a59 0%, #ffb443 38%, #3fc5a5 72%, #4b8bff 100%); }
.tile.kids h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); padding-right: 0; }
.tile.kids .t-emoji { position: static; font-size: clamp(3rem, 6vw, 5rem); margin-bottom: auto; letter-spacing: .08em; white-space: nowrap; }
.tile.picture { grid-area: picture; background: linear-gradient(180deg, rgba(10,8,14,.05) 20%, rgba(10,8,14,.85) 100%), var(--cover, linear-gradient(150deg, #3b2a18, #0f0c14)) center / cover no-repeat, #1b1426; }
.tile.picture h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); padding-right: 0; }
.tile.picture::after { content: "NEW"; position: absolute; top: clamp(14px, 2vw, 22px); left: clamp(16px, 2.2vw, 26px); background: var(--gold); color: #2a1d05; font-weight: 900; font-size: .75rem; letter-spacing: .14em; padding: 5px 12px; border-radius: 999px; }
.tile.trivia { grid-area: trivia; background: linear-gradient(150deg, #8b5cf6, #ec4899); }
.tile.couples { grid-area: couples; background: linear-gradient(150deg, #0ea5a4, #2563eb); }
.tile.spouse { grid-area: spouse; background: linear-gradient(150deg, #e11d48, #f97316); }
.tile.gtky { grid-area: gtky; background: linear-gradient(150deg, #b7791f, #f2c46d); color: #2a1d05; }
.home-foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 0 0 12px; }

@media (orientation: portrait) {
  .tiles { grid-template-columns: 1fr 1fr; grid-template-rows: 1.4fr 1fr 1fr 0.8fr; grid-template-areas: "picture kids" "trivia couples" "spouse spouse" "gtky gtky"; }
  .tile.kids .t-emoji { font-size: clamp(2rem, 5vw, 3rem); }
  .tile.kids h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
  .tile.picture h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
  .tile.kids .t-emoji { margin-bottom: 0; position: absolute; top: 18px; right: 22px; }
}
@media (max-width: 700px) {
  .home-head { flex-wrap: wrap; }
  .menu-btn { width: 100%; justify-content: center; }
  body { overflow: auto; }
  .tiles { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: minmax(140px, auto); grid-template-areas: "picture" "kids" "trivia" "couples" "spouse" "gtky"; overflow-y: auto; }
}

/* ---------- Shared game UI ---------- */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 0 var(--pad) var(--pad); text-align: center; min-height: 0; }
.panel { width: min(760px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: clamp(20px, 3vw, 36px); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.panel h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 900; letter-spacing: -0.02em; }
.panel .sub { margin: 0 0 22px; color: var(--muted); font-size: 1.1rem; line-height: 1.4; }
.field-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 18px; }
.field-row .vs { font-weight: 900; color: var(--gold); font-size: 1.2rem; }
.field label { display: block; text-align: left; font-size: .85rem; font-weight: 800; color: var(--muted); margin: 0 0 6px 6px; letter-spacing: .06em; text-transform: uppercase; }
.field input {
  width: 100%; min-height: 60px; border-radius: 18px; border: 2px solid var(--line); background: rgba(0,0,0,.25); color: var(--ink);
  font: 700 1.25rem var(--font); padding: 0 18px; outline: none;
}
.field input:focus { border-color: var(--gold); }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 22px; }
.chip { min-height: 52px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--line); font-weight: 800; font-size: 1.05rem; background: rgba(0,0,0,.2); }
.chip.on { background: var(--gold); color: #2a1d05; border-color: var(--gold); }
.chip-label { margin: 0 0 4px; font-weight: 800; color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.privacy { margin: 16px 0 0; font-size: .95rem; color: var(--muted); display: flex; gap: 8px; justify-content: center; align-items: center; }

.scoreboard { display: flex; gap: 14px; justify-content: center; padding: 0 var(--pad) 12px; }
.score {
  flex: 1; max-width: 360px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-radius: 22px;
  background: var(--card); border: 2px solid var(--line); transition: all .25s ease; position: relative;
}
.score .nm { font-weight: 800; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score .pts { font-weight: 900; font-size: 2rem; font-variant-numeric: tabular-nums; }
.score.active { border-color: var(--gold); background: rgba(242, 196, 109, .16); box-shadow: 0 0 0 6px rgba(242, 196, 109, .12); }
.score .turn { position: absolute; top: -12px; left: 16px; background: var(--gold); color: #2a1d05; font-size: .72rem; font-weight: 900; padding: 3px 10px; border-radius: 999px; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translateY(4px); transition: all .2s; }
.score.active .turn { opacity: 1; transform: none; }
.progress { height: 8px; border-radius: 99px; background: var(--line); margin: 0 var(--pad) 14px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ff8fb1); border-radius: inherit; transition: width .35s ease; }

.qcard { width: min(900px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: clamp(20px, 3.2vw, 38px); text-align: center; }
.qcard .cat { display: inline-block; font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.qcard .q { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 850; line-height: 1.2; letter-spacing: -0.015em; }
.qcard .who { font-size: 1.05rem; color: var(--muted); margin: 10px 0 0; font-weight: 700; }
.answers { width: min(900px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ans {
  min-height: 84px; border-radius: 22px; background: rgba(255,255,255,.1); border: 2px solid var(--line); font-weight: 800; font-size: clamp(1.1rem, 2.1vw, 1.4rem);
  padding: 10px 20px; display: flex; align-items: center; gap: 14px; text-align: left; transition: transform .1s, background .2s, border-color .2s;
}
.ans .k { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); font-weight: 900; }
.ans:active { transform: scale(.98); }
.ans.correct { background: rgba(61, 220, 151, .25); border-color: var(--good); }
.ans.wrong { background: rgba(255, 107, 107, .22); border-color: var(--bad); }
.ans.dim { opacity: .45; }
.ans.picked { background: rgba(242,196,109,.25); border-color: var(--gold); }
.feedback { min-height: 64px; font-size: 1.15rem; color: var(--muted); max-width: 820px; line-height: 1.35; }
.feedback strong { color: var(--ink); }
.steps { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.step { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 18px; background: rgba(0,0,0,.22); font-weight: 700; font-size: 1.05rem; text-align: left; }
.step b { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #2a1d05; display: grid; place-items: center; flex: none; }

.handoff { font-size: clamp(5rem, 12vw, 8rem); }
.winner .trophy { font-size: clamp(5rem, 13vw, 9rem); animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.winner h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0; font-weight: 900; letter-spacing: -0.03em; }
.final { display: flex; gap: 18px; justify-content: center; margin: 10px 0 8px; flex-wrap: wrap; }
.final > div { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 28px; min-width: 170px; }
.final .nm { font-weight: 800; color: var(--muted); }
.final .pts { font-size: 2.6rem; font-weight: 900; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Question deck (Get to know) ---------- */
.deck { width: min(820px, 100%); aspect-ratio: 16 / 9; max-height: 52vh; position: relative; }
.card-q {
  position: absolute; inset: 0; border-radius: 34px; padding: clamp(24px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; text-align: center;
  background: linear-gradient(160deg, #fff8ee, #f6e4c4); color: #2a1d05; box-shadow: 0 30px 60px rgba(0,0,0,.4); animation: cardIn .35s cubic-bezier(.2, .9, .3, 1.2);
}
.card-q .tag { position: absolute; top: 22px; left: 26px; font-size: .78rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(42,29,5,.08); }
.card-q .num { position: absolute; top: 22px; right: 26px; font-size: .9rem; font-weight: 800; opacity: .55; font-variant-numeric: tabular-nums; }
.card-q p { margin: 0; font-size: clamp(1.6rem, 3.8vw, 2.6rem); font-weight: 850; line-height: 1.2; letter-spacing: -0.02em; }
.deck::before, .deck::after { content: ""; position: absolute; inset: 0; border-radius: 34px; background: rgba(255, 248, 238, .12); transform: rotate(-3deg) translateY(10px); }
.deck::after { transform: rotate(2.5deg) translateY(14px); background: rgba(255, 248, 238, .08); }
@keyframes cardIn { from { transform: translateX(60px) rotate(4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Grown-up corner ---------- */
.grownup-corner { position: fixed; top: 0; left: 0; width: 96px; height: 96px; z-index: 50; display: none; touch-action: none; }
body.kids-locked .grownup-corner { display: block; }
.grownup-corner svg { position: absolute; top: 14px; left: 14px; width: 56px; height: 56px; opacity: 0; transition: opacity .2s; transform: rotate(-90deg); }
.grownup-corner.holding svg { opacity: 1; }
.gu-track { fill: rgba(255,255,255,.6); stroke: rgba(0,0,0,.15); stroke-width: 5; }
.gu-fill { fill: none; stroke: #1b1426; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100.53; stroke-dashoffset: 100.53; }
.grownup-corner.holding .gu-fill { transition: stroke-dashoffset var(--hold, 3s) linear; stroke-dashoffset: 0; }

/* ---------- Confetti ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ================= KIDS MODE ================= */
body.kids { --ink: #23304d; background: #bfe9ff; }
body.kids::before {
  background:
    radial-gradient(35vmax 35vmax at 0% 0%, rgba(255, 214, 102, .8), transparent 60%),
    radial-gradient(40vmax 40vmax at 100% 100%, rgba(255, 143, 177, .55), transparent 60%),
    radial-gradient(40vmax 40vmax at 100% 0%, rgba(126, 217, 255, .8), transparent 60%),
    linear-gradient(180deg, #d9f3ff, #fff3d6);
}
.k-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--pad) 10px 110px; min-height: 90px; }
.k-home, .k-icon {
  width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center; font-size: 2.3rem; background: #fff;
  box-shadow: 0 6px 0 rgba(35, 48, 77, .15), 0 12px 24px rgba(35, 48, 77, .12); transition: transform .1s; flex: none;
}
.k-home:active, .k-icon:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(35, 48, 77, .15); }
.k-icon.on { outline: 6px solid #23304d; }
.k-title { font-size: clamp(2.2rem, 5vw, 3.4rem); display: flex; gap: 10px; }
.k-grid { flex: 1; min-height: 0; display: grid; gap: clamp(14px, 2.2vw, 26px); padding: 6px var(--pad) var(--pad); grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.k-tile {
  border-radius: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0;
  box-shadow: 0 10px 0 rgba(0,0,0,.14), 0 20px 30px rgba(35,48,77,.18); transition: transform .12s; position: relative; overflow: hidden;
}
.k-tile:active { transform: translateY(6px); box-shadow: 0 4px 0 rgba(0,0,0,.14); }
.k-tile .big { font-size: clamp(4rem, 10vw, 7.2rem); filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.k-tile .small { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: .1em; }
.k-tile:nth-child(1) { background: #ff8a65; }
.k-tile:nth-child(2) { background: #ffd166; }
.k-tile:nth-child(3) { background: #7bdcb5; }
.k-tile:nth-child(4) { background: #8ecbff; }
.k-tile:nth-child(5) { background: #c7a2ff; }
.k-tile:nth-child(6) { background: #ff9fc3; }
@media (orientation: portrait) { .k-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); } }

/* Coloring */
.palette { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.swatch { width: 62px; height: 62px; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 4px 10px rgba(35,48,77,.25); transition: transform .12s; flex: none; }
.swatch.on { transform: scale(1.18); box-shadow: 0 0 0 5px #23304d, 0 6px 14px rgba(35,48,77,.3); }
.color-wrap { flex: 1; min-height: 0; display: flex; gap: 18px; padding: 0 var(--pad) var(--pad); }
.color-stage { flex: 1; min-width: 0; min-height: 0; background: #fff; border-radius: 34px; box-shadow: 0 12px 30px rgba(35,48,77,.18); display: grid; place-items: center; padding: 16px; position: relative; overflow: hidden; }
.color-stage svg.pic { width: 100%; height: 100%; max-height: 100%; }
.color-stage svg.pic [data-fill] { cursor: pointer; transition: fill .15s; }
.color-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.color-side { width: 168px; display: flex; flex-direction: column; gap: 14px; align-items: center; overflow-y: auto; padding: 6px 4px; }
.color-side .palette { flex-direction: row; }
.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pics button { width: 64px; height: 64px; border-radius: 20px; background: #fff; font-size: 2rem; box-shadow: 0 4px 0 rgba(35,48,77,.15); }
.pics button.on { outline: 5px solid #23304d; }
.sizes { display: flex; gap: 8px; }
.sizes button { width: 48px; height: 58px; border-radius: 20px; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(35,48,77,.15); }
.sizes button i { display: block; border-radius: 50%; background: #23304d; }
.sizes button.on { outline: 5px solid #23304d; }
@media (orientation: portrait) {
  .color-wrap { flex-direction: column-reverse; }
  .color-side { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; overflow: visible; }
  .pics { grid-template-columns: repeat(6, 1fr); }
  .swatch { width: 54px; height: 54px; border-width: 4px; }
  .palette { gap: 10px; }
}

/* Memory */
.mem { flex: 1; min-height: 0; display: grid; gap: clamp(10px, 1.6vw, 18px); padding: 0 var(--pad) var(--pad); grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; perspective: 1200px; }
@media (orientation: portrait) { .mem { grid-template-columns: repeat(3, 1fr); } }
.mcard { position: relative; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); min-height: 0; }
.mcard .face { position: absolute; inset: 0; border-radius: 26px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 8px 0 rgba(0,0,0,.12); }
.mcard .front { background: #fff; transform: rotateY(180deg); font-size: clamp(3rem, 8vmin, 5.5rem); }
.mcard .back { background: repeating-linear-gradient(45deg, #8ecbff 0 18px, #7ab8f5 18px 36px); font-size: clamp(2rem, 5vmin, 3rem); }
.mcard.flip { transform: rotateY(180deg); }
.mcard.done .front { background: #d6ffe9; box-shadow: 0 0 0 6px #3ddc97, 0 8px 0 rgba(0,0,0,.12); }

/* Tic-tac-toe */
.ttt-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 60px); padding: 0 var(--pad) var(--pad); }
.ttt { height: min(100%, 78vw); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ttt button { background: #fff; border-radius: 30px; font-size: clamp(3.4rem, 10vmin, 6.5rem); box-shadow: 0 8px 0 rgba(35,48,77,.14); display: grid; place-items: center; }
.ttt button.win { background: #fff3a8; animation: bounce .6s ease infinite alternate; }
.ttt button span { animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.players { display: flex; flex-direction: column; gap: 20px; }
.player { width: 130px; height: 130px; border-radius: 36px; background: rgba(255,255,255,.6); display: grid; place-items: center; font-size: 4.2rem; transition: all .25s; border: 6px solid transparent; }
.player.on { background: #fff; border-color: #23304d; transform: scale(1.08); box-shadow: 0 12px 30px rgba(35,48,77,.25); }
@keyframes bounce { to { transform: translateY(-8px); } }
@media (orientation: portrait) { .ttt-wrap { flex-direction: column; } .players { flex-direction: row; } .ttt { height: auto; width: min(100%, 62vh); } }

/* Find the food */
.find-wrap { flex: 1; min-height: 0; display: flex; gap: clamp(16px, 2.4vw, 30px); padding: 0 var(--pad) var(--pad); }
.find-target { width: 32%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #fff; border-radius: 34px; padding: 20px; box-shadow: 0 12px 30px rgba(35,48,77,.18); }
.find-target .look { font-size: 3.4rem; }
.find-target img, .find-target .em { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 26px; border: 6px dashed #ffb443; display: grid; place-items: center; font-size: 7rem; }
.stars { font-size: 2.2rem; letter-spacing: 4px; min-height: 2.4rem; }
.find-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 14px; }
.find-grid button { border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 8px 0 rgba(35,48,77,.14); padding: 0; display: grid; place-items: center; font-size: 5rem; min-height: 0; }
.find-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.find-grid button.yes { box-shadow: 0 0 0 8px #3ddc97; animation: pop .4s; }
.find-grid button.no { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@media (orientation: portrait) { .find-wrap { flex-direction: column; } .find-target { width: 100%; flex-direction: row; padding: 14px; } .find-target img, .find-target .em { width: 30vw; } .find-grid { grid-template-columns: repeat(2, 1fr); } }

/* Kids picture menu */
.kmenu { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-top: 4px; }
.kdish { background: #fff; border-radius: 32px; overflow: hidden; box-shadow: 0 10px 0 rgba(35,48,77,.12), 0 16px 30px rgba(35,48,77,.12); position: relative; text-align: left; padding: 0; transition: transform .12s; }
.kdish:active { transform: scale(.98); }
.kdish img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #f3f3f3; }
.kdish .cap { padding: 14px 18px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kdish .nm { font-weight: 900; font-size: 1.3rem; color: #23304d; }
.kdish .pr { font-weight: 900; font-size: 1.1rem; background: #ffd166; color: #23304d; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.kdish .fav { position: absolute; top: 12px; right: 12px; width: 66px; height: 66px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; font-size: 2.2rem; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.ksec { font-size: 2.2rem; margin: 26px 0 10px; }
.zoom { position: fixed; inset: 0; background: rgba(20, 30, 50, .75); z-index: 40; display: grid; place-items: center; padding: 30px; animation: fadeIn .2s; }
.zoom figure { margin: 0; background: #fff; border-radius: 36px; overflow: hidden; max-width: min(900px, 94vw); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.zoom img { width: 100%; max-height: 70vh; object-fit: cover; display: block; }
.zoom figcaption { padding: 18px 24px; font-size: 1.8rem; font-weight: 900; color: #23304d; display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Celebrate overlay */
.yay { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(255,255,255,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .25s; }
.yay .inner { text-align: center; }
.yay .big { font-size: clamp(6rem, 18vw, 11rem); animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.yay .k-home { margin: 16px auto 0; width: 110px; height: 110px; font-size: 3.4rem; border-radius: 36px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ================= PICTURE MENU ================= */
.pm-bar h1 { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pm-bar .pm-menu { min-height: 52px; font-size: 1rem; padding: 0 20px; }
.pm-n { font-size: .9rem; font-weight: 900; background: var(--gold); color: #2a1d05; border-radius: 999px; padding: 3px 11px; }
.pm-lead { margin: 0 0 16px; color: var(--muted); font-size: 1.1rem; text-align: center; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: clamp(12px, 1.8vw, 20px); }
.pm-cat {
  position: relative; min-height: clamp(150px, 20vh, 210px); border-radius: 26px; overflow: hidden; padding: 18px 20px; text-align: left; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  background: linear-gradient(180deg, rgba(10,8,14,0) 25%, rgba(10,8,14,.88) 100%), var(--cover, linear-gradient(150deg, #3b2a18, #0f0c14)) center / cover no-repeat, #1b1426;
  box-shadow: 0 16px 34px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.12); transition: transform .15s;
}
.pm-cat:active { transform: scale(.97); }
.pm-emoji { position: absolute; top: 14px; left: 16px; font-size: 2.2rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.pm-label { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 900; letter-spacing: -0.02em; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.pm-count { font-size: .95rem; font-weight: 800; color: var(--gold); }
.pm-jump { display: flex; gap: 10px; padding: 0 var(--pad) 12px; overflow-x: auto; flex: none; }
.pm-jump .chip { flex: none; }
.pm-group { margin: 18px 0 12px; font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; color: var(--gold); }
.pm-group:first-child { margin-top: 0; }
.pm-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 22px); }
@media (orientation: portrait) { .pm-gal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pm-gal { grid-template-columns: 1fr; } .pm-bar .pm-menu span.emoji { display: none; } }
.pm-dish { background: #fff8ee; color: #2a1d05; border-radius: 26px; overflow: hidden; text-align: left; display: flex; flex-direction: column; box-shadow: 0 16px 34px rgba(0,0,0,.35); transition: transform .12s; padding: 0; }
.pm-dish:active { transform: scale(.98); }
.pm-dish img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #2a2233; }
.pm-cap { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 4px; }
.pm-name { font-weight: 900; font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.01em; }
.pm-price { font-weight: 900; font-size: 1.05rem; background: var(--gold); color: #2a1d05; padding: 4px 12px; border-radius: 999px; white-space: nowrap; flex: none; }
.pm-desc { margin: 0 16px 16px; padding: 0; font-size: .92rem; line-height: 1.35; color: rgba(42,29,5,.7); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-foot { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; padding: 26px 0 8px; }
.lb { position: fixed; inset: 0; z-index: 70; background: rgba(8, 6, 12, .94); display: grid; place-items: center; padding: 20px 90px; animation: fadeIn .2s; touch-action: pan-y; }
.lb-fig { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; background: #fff8ee; color: #2a1d05; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-fig img { width: 100%; max-height: calc(100vh - 230px); object-fit: contain; background: #0f0c14; display: block; }
.lb-fig figcaption { padding: 16px 24px 18px; position: relative; }
.lb-top { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.lb-name { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; letter-spacing: -0.02em; }
.lb-desc { margin: 6px 0 0; font-size: 1.05rem; line-height: 1.4; color: rgba(42,29,5,.75); padding-right: 70px; }
.lb-count { position: absolute; right: 24px; bottom: 16px; font-weight: 800; color: rgba(42,29,5,.5); font-size: .95rem; }
.lb-x { position: fixed; top: calc(14px + var(--safe-t)); right: 16px; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.6rem; font-weight: 900; z-index: 2; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 64px; height: 110px; border-radius: 22px; background: rgba(255,255,255,.12); color: #fff; font-size: 3rem; font-weight: 300; z-index: 2; }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
.lb-nav[disabled] { opacity: .2; }
@media (orientation: portrait) { .lb { padding: 90px 16px 20px; } .lb-nav { top: auto; bottom: 24px; transform: none; height: 72px; } }

/* Kids menu illustrated placeholder (dish photo coming) */
.kph { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; font-size: clamp(5rem, 11vw, 8rem); background: radial-gradient(circle at 50% 45%, #fff 0 30%, transparent 31%), repeating-linear-gradient(45deg, #ffe7a3 0 22px, #ffd98a 22px 44px); }
.kph.big { width: min(900px, 94vw); max-height: 70vh; font-size: 12rem; }
