/* ═══════════════════════════════════════════════════════════
   style.css  —  EatOrPass
   Edit this file for all visual changes.
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─────────────────────────────────────
   DESIGN TOKENS  (change colors here)
───────────────────────────────────── */
:root {
  /* Brand */
  --eat:          #e8400a;
  --eat-light:    #fff5f2;
  --eat-border:   rgba(232, 64, 10, 0.27);
  --eat-shadow:   rgba(232, 64, 10, 0.35);

  /* Rank colors */
  --gold:         #f5a623;
  --silver:       #aaa;
  --bronze:       #b07040;

  /* Neutrals */
  --bg:           #ffffff;
  --surface:      #fafafa;
  --border:       #ebebeb;
  --text:         #111111;
  --muted:        #aaaaaa;
  --subtle:       #f5f5f5;

  /* Radius */
  --radius:       20px;
  --radius-sm:    12px;
  --radius-xs:    8px;

  /* Shadow */
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-card:  0 4px 28px rgba(0, 0, 0, 0.09);

  /* Typography */
  --font-head:    'Nunito', sans-serif;
  --font-body:    'Outfit', sans-serif;
}

/* ─────────────────────────────────────
   RESET
───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ─────────────────────────────────────
   SCREENS
───────────────────────────────────── */
.screen {
  display: none !important;
  min-height: 100vh;
  flex-direction: column;
}
.screen.active {
  display: flex !important;
}

/* ─────────────────────────────────────
   BUTTONS
───────────────────────────────────── */
.btn-primary {
  background: var(--eat);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2.4rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px var(--eat-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-primary:hover  { background: #c93308; transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.3; pointer-events: none; box-shadow: none; }

.btn-outline {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.8rem 1.8rem;
  color: #666;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover { border-color: #aaa; color: #111; }

.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s;
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
}
.back-btn img { width: 16px; height: 16px; opacity: 0.5; }
.back-btn:hover { color: #555; }
.back-btn:hover img { opacity: 0.8; }

/* ─────────────────────────────────────
   LOGO
───────────────────────────────────── */
.logo {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 7vw, 3rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
}
.logo .eat  { color: var(--eat); }
.logo .or   { color: #ccc; font-size: 0.58em; }
.logo .pass { color: var(--text); }

/* ─────────────────────────────────────
   PROGRESS BAR
───────────────────────────────────── */
.prog-bar  { height: 4px; background: #f0f0f0; flex-shrink: 0; }
.prog-fill { height: 100%; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* ═══════════════════════════════════════════
   HOME SCREEN
═══════════════════════════════════════════ */
#home { background: #fff; }

.home-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.home-top::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(232,64,10,0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Mode cards — equal 2 columns */
.home-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: 380px;
}

.mode-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
  text-align: left;
}
.mode-card:hover {
  border-color: #ccc;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.mode-card.solo-card {
  background: linear-gradient(135deg, var(--eat-light), #fff);
  border-color: var(--eat-border);
}
.mode-card.solo-card:hover {
  box-shadow: 0 8px 28px rgba(232, 64, 10, 0.15);
  border-color: rgba(232, 64, 10, 0.6);
}

.mode-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.65rem;
  display: block;
}
.mode-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.mode-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ─────────────────────────────────────
   HOME SEO SECTIONS
───────────────────────────────────── */
.home-seo {
  padding: 1.75rem 1.5rem 1rem;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}
.seo-section  { margin-bottom: 2rem; }
.seo-h2       { font-family: var(--font-head); font-size: 1.3rem; font-weight: 900; color: var(--text); margin-bottom: 0.65rem; }
.seo-p        { font-size: 0.87rem; color: #555; line-height: 1.75; }

.how-steps  { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }
.how-step   { display: flex; gap: 0.75rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 1rem; }
.how-num    { font-family: var(--font-head); font-weight: 900; color: var(--eat); font-size: 1.1rem; min-width: 24px; }
.how-text   { font-size: 0.84rem; color: #444; line-height: 1.5; }

.cats-grid       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.6rem; }
.cat-chip        { background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 0.55rem 0.5rem; text-align: center; }
.cat-chip-emoji  { font-size: 1.4rem; display: block; margin-bottom: 0.25rem; }
.cat-chip-name   { font-size: 0.62rem; font-weight: 700; color: #555; font-family: var(--font-head); }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid #f0f0f0; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.85rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color 0.2s;
}
.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  transition: transform 0.25s, color 0.2s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}
.faq-q:hover           { color: var(--eat); }
.faq-item.open .faq-q  { color: var(--eat); }
.faq-item.open .faq-q::after { transform: rotate(45deg); color: var(--eat); }
.faq-a {
  font-size: 0.83rem;
  color: #666;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
  padding: 0;
}
.faq-item.open .faq-a { max-height: 200px; padding-bottom: 0.85rem; }

/* ─────────────────────────────────────
   FOOTER
───────────────────────────────────── */
.site-footer {
  background: #fafafa;
  border-top: 1.5px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  margin-top: auto;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.footer-links a {
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
  cursor: pointer;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.66rem; color: #ccc; font-weight: 500; }

/* ═══════════════════════════════════════════
   EDITION PICKER
═══════════════════════════════════════════ */
#edition-pick { align-items: center; padding: 1.5rem; }
.ed-wrap      { width: 100%; max-width: 440px; }
.ed-mode-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.ed-search {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  background: var(--surface) url('icons/search.svg') 0.75rem center / 18px no-repeat;
  margin-bottom: 0.75rem;
  color: var(--text);
  transition: border-color 0.15s;
}
.ed-search:focus { border-color: #ccc; }

#editionsContainer {
  max-height: 54vh;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 0.2rem;
}
#editionsContainer::-webkit-scrollbar { width: 4px; }
#editionsContainer::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }

.ed-group-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.85rem 0 0.4rem 0.2rem;
}

.editions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.4rem;
}

.ed-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.ed-card:hover {
  border-color: #ccc;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}
.ed-card.selected {
  border-color: var(--eat);
  background: var(--eat-light);
}
.ed-card.selected .ed-name { color: var(--eat); }

.ed-emoji { font-size: 1.6rem; display: block; margin-bottom: 0.35rem; }
.ed-name  { font-family: var(--font-head); font-weight: 800; font-size: 0.86rem; color: var(--text); }
.ed-count { font-size: 0.65rem; color: var(--muted); margin-top: 0.1rem; }
.ed-badge {
  position: absolute;
  top: .45rem; right: .45rem;
  font-size: .52rem;
  color: #fff;
  border-radius: 50px;
  padding: .15rem .5rem;
  font-weight: 800;
  font-family: var(--font-head);
  background: linear-gradient(135deg, #e8400a, #e8a000, #7c3aed, #e8400a);
  background-size: 300% 300%;
  animation: badge-aurora 4s ease infinite;
  box-shadow: 0 2px 8px rgba(232,64,10,.4);
}

@keyframes badge-aurora {
  0%   { background-position: 0% 50%;   }
  33%  { background-position: 50% 100%; }
  66%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%;   }
}

/* ═══════════════════════════════════════════
   PLAYERS SETUP
═══════════════════════════════════════════ */
#players-setup { align-items: center; padding: 2rem; }
.setup-wrap    { width: 100%; max-width: 380px; }
.setup-title   { font-family: var(--font-head); font-size: 1.5rem; font-weight: 900; margin-bottom: 0.25rem; }
.setup-sub     { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.5rem; }

.players-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }

.player-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  transition: border-color 0.15s;
}
.player-row:focus-within { border-color: #ccc; }

.p-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.p-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
  caret-color: var(--eat);
}
.p-input::placeholder { color: #ccc; }
.rm-btn {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.15s;
  line-height: 1;
}
.rm-btn:hover { color: #888; }

.add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 2px dashed #ddd;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: #bbb;
  font-size: 0.84rem;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s, color 0.15s;
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
}
.add-btn:hover { border-color: #aaa; color: #666; }

/* ═══════════════════════════════════════════
   GAME SCREEN
═══════════════════════════════════════════ */
#game { align-items: center; padding: 0; background: #fff; }

.challenge-banner {
  display: none;
  background: linear-gradient(135deg, #e8400a, #e8a000);
  color: #fff;
  padding: .6rem 0;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .85rem;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
}
.challenge-banner.show { display: block; }

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1.5px solid #f0f0f0;
  flex-shrink: 0;
}
.gh-who    { display: flex; align-items: center; gap: 0.65rem; }
.gh-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.gh-name   { font-family: var(--font-head); font-weight: 800; font-size: 1rem; }
.gh-turn   { font-size: 0.68rem; color: var(--muted); margin-top: 0.1rem; }
.gh-right  { text-align: right; }
.gh-prog   { font-size: 0.78rem; color: var(--muted); font-family: var(--font-head); font-weight: 700; }
.gh-streak { font-size: 0.72rem; margin-top: 0.1rem; min-height: 0.9rem; font-weight: 700; }

/* Achievements bar */
.ach-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem 1.5rem;
  overflow-x: auto;
  flex-shrink: 0;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  scrollbar-width: none;
}
.ach-bar::-webkit-scrollbar { display: none; }

.ach-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 50px;
  padding: 0.22rem 0.65rem;
  font-size: 0.62rem;
  color: #bbb;
  white-space: nowrap;
  font-weight: 700;
  transition: background 0.35s, border-color 0.35s, color 0.35s;
}
.ach-badge img  { width: 16px; height: 16px; opacity: 0.3; transition: opacity 0.35s; }
.ach-badge.earned {
  background: var(--eat-light);
  border-color: var(--eat-border);
  color: var(--eat);
}
.ach-badge.earned img { opacity: 1; }

/* Card area */
.card-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.swipe-label {
  position: absolute;
  top: 50%;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.1s;
  pointer-events: none;
  z-index: 10;
  padding: 0.4rem 1rem;
  border-radius: 12px;
}
.swipe-eat  {
  right: 1.2rem;
  color: var(--eat);
  background: var(--eat-light);
  border: 3px solid var(--eat);
  transform: translateY(-50%) rotate(8deg);
}
.swipe-pass {
  left: 1.2rem;
  color: #666;
  background: #f4f4f4;
  border: 3px solid #bbb;
  transform: translateY(-50%) rotate(-8deg);
}

/* Food card */
.food-card {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 26px;
  width: 100%;
  max-width: 340px;
  padding: 0 0 1.25rem;
  text-align: center;
  position: relative;
  touch-action: none;
  user-select: none;
  box-shadow: var(--shadow-card);
  will-change: transform;
}

.food-img-wrap {
  width: 100%;
  height: 210px;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5, #efefef);
  margin-bottom: 1rem;
  position: relative;
}
.food-emoji-big {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}
.food-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Difficulty strip */
.diff-strip {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.3rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(transparent, rgba(0,0,0,0.32));
}
.diff-dots  { display: flex; gap: 3px; }
.diff-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.3);
}
.diff-dot.on { background: #fff; }
.diff-label  { color: rgba(255,255,255,0.8); font-size: 0.55rem; font-weight: 700; }

/* Card text */
.f-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
  color: var(--text);
  padding: 0 1.25rem;
}
.f-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 230px;
  margin: 0 auto 0.7rem;
  padding: 0 0.5rem;
}
.f-tags {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 1rem;
}
.f-tag {
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 50px;
  padding: 0.15rem 0.55rem;
  font-size: 0.6rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Hint row */
.hint-row {
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem 0.6rem;
  flex-shrink: 0;
}
.hint-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #ccc;
  font-weight: 600;
}
.hint-key {
  width: 24px; height: 24px;
  border: 1.5px solid #e8e8e8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #bbb;
}

/* Action buttons */
.action-btns {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  padding: 0 1.5rem 2rem;
  flex-shrink: 0;
}
.action-btn {
  flex: 1;
  max-width: 150px;
  padding: 0.9rem;
  border-radius: 16px;
  border: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
}
.btn-pass {
  background: #f4f4f4;
  color: #888;
  border: 1.5px solid #e8e8e8;
}
.btn-pass:hover, .btn-pass.active {
  background: #e8e8e8;
  color: #111;
  transform: scale(1.06);
}
.btn-eat {
  background: var(--eat);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 64, 10, 0.4);
}
.btn-eat:hover, .btn-eat.active {
  background: #c93308;
  transform: scale(1.06);
}
.btn-sub { font-size: 0.6rem; font-weight: 600; opacity: 0.65; }

/* ═══════════════════════════════════════════
   TRANSITION SCREEN
═══════════════════════════════════════════ */
#transition {
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

/* ═══════════════════════════════════════════
   SOLO RESULT
═══════════════════════════════════════════ */
#solo-result {
  align-items: center;
  padding: 1.5rem 1.5rem 3rem;
  overflow-y: auto;
}
.result-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Score card */
.score-card {
  background: linear-gradient(145deg, #fff5f2 0%, #fff 45%, #fffae8 100%);
  border: 1.5px solid #eee;
  border-radius: 24px;
  width: 100%;
  padding: 1.25rem 1.25rem 1.25rem;
  text-align: center;
  box-shadow: 0 6px 32px rgba(232, 64, 10, 0.1);
  position: relative;
  overflow: hidden;
}
.quick-play-btn {
  margin-top: .75rem;
  background: var(--eat);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .4rem 1rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .75rem;
  cursor: pointer;
  transition: background .15s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.quick-play-btn:hover { background: #c93308; transform: scale(1.04); }
.score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(232,64,10,0.05), transparent);
  pointer-events: none;
}

.sc-watermark {
  position: absolute;
  top: 0.7rem; right: 0.85rem;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.7rem;
  color: rgba(232, 64, 10, 0.4);
}
.sc-edition {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.28rem 0.85rem;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Score X / 12 */
.sc-score-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem;
  margin-bottom: 0.15rem;
}
.sc-score { font-family: var(--font-head); font-size: 4.5rem; font-weight: 900; line-height: 1; color: var(--eat); }
.sc-slash { font-family: var(--font-head); font-size: 3rem; font-weight: 900; color: #ddd; line-height: 1; }
.sc-total { font-family: var(--font-head); font-size: 3rem; font-weight: 900; color: #ccc; line-height: 1; }

.sc-out-of { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; font-weight: 500; }
.sc-verdict { font-family: var(--font-head); font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 1.25rem; }
.sc-divider { height: 1.5px; background: #f0f0f0; margin: 1rem 0; }

.sc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sc-stat     { background: #fff; border-radius: 12px; padding: 0.7rem 0.5rem; text-align: center; border: 1px solid #f0f0f0; }
.sc-stat-num { font-family: var(--font-head); font-size: 1.25rem; font-weight: 900; }
.sc-stat-lbl { font-size: 0.58rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.15rem; font-weight: 700; }

.sc-pills {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.pill-eat {
  background: var(--eat-light);
  border: 1px solid var(--eat-border);
  color: var(--eat);
  border-radius: 50px;
  padding: 0.22rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
}
.pill-pass {
  background: #f5f5f5;
  border: 1px solid var(--border);
  color: #bbb;
  border-radius: 50px;
  padding: 0.22rem 0.65rem;
  font-size: 0.7rem;
  text-decoration: line-through;
  font-weight: 500;
}

.sc-ach-row  { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center; margin: 0.5rem 0 0.25rem; }
.sc-ach-chip {
  font-size: 0.68rem;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 50px;
  padding: 0.18rem 0.6rem;
  font-weight: 700;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.sc-ach-chip img { width: 14px; height: 14px; }

.sc-phrase {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: #888;
  font-style: italic;
  margin: 0.5rem 0 0.25rem;
}
.sc-url {
  font-size: 0.62rem;
  color: #bbb;
  font-weight: 700;
  font-family: var(--font-head);
}

/* Download button */
.dl-section { width: 100%; margin-top: 1.25rem; }
.dl-btn {
  width: 100%;
  padding: 0.88rem;
  border-radius: 14px;
  border: none;
  background: var(--eat);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(232, 64, 10, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.dl-btn img  { width: 20px; height: 20px; }
.dl-btn:hover { background: #c93308; transform: translateY(-1px); }

.result-actions {
  display: flex;
  gap: 0.6rem;
  flex-direction: column;
  margin-top: 0.75rem;
  width: 100%;
}

/* ═══════════════════════════════════════════
   GROUP RESULT
═══════════════════════════════════════════ */
#group-result { padding: 1.5rem; align-items: center; overflow-y: auto; }

.gr-header { text-align: center; margin-bottom: 1.5rem; }
.gr-ed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.28rem 0.85rem;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
  font-weight: 700;
}
.gr-title { font-family: var(--font-head); font-size: 1.7rem; font-weight: 900; margin-bottom: 0.25rem; }
.gr-sub   { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

.leaderboard { width: 100%; max-width: 520px; margin-bottom: 1.5rem; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  margin-bottom: 0.4rem;
  border: 1.5px solid var(--border);
  background: var(--surface);
}
.lb-row.rank-1 { background: var(--eat-light); border-color: var(--eat-border); }
.lb-rank       { font-family: var(--font-head); font-weight: 900; font-size: 1rem; min-width: 24px; text-align: center; }
.lb-rank.gold   { color: var(--gold); }
.lb-rank.silver { color: var(--silver); }
.lb-rank.bronze { color: var(--bronze); }
.lb-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.lb-name   { flex: 1; font-family: var(--font-head); font-weight: 800; font-size: 0.92rem; }
.lb-right  { text-align: right; }
.lb-score  { font-family: var(--font-head); font-weight: 900; font-size: 1.1rem; }
.lb-detail { font-size: 0.64rem; color: var(--muted); margin-top: 0.1rem; font-weight: 600; }

.matches-section { width: 100%; max-width: 520px; margin-bottom: 1.5rem; }
.ms-title  { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.75rem; font-weight: 700; }
.match-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1.5px solid #f5f5f5; }
.mr-emoji  { font-size: 1rem; width: 26px; text-align: center; flex-shrink: 0; }
.mr-name   { flex: 1; font-size: 0.82rem; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mr-chips  { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.mr-chip   { font-size: 0.62rem; padding: 0.15rem 0.45rem; border-radius: 50px; white-space: nowrap; font-weight: 700; }
.chip-e    { background: var(--eat-light); color: var(--eat); border: 1px solid var(--eat-border); }
.chip-p    { background: #f5f5f5; color: #bbb; border: 1px solid var(--border); }

.bottom-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

/* ═══════════════════════════════════════════
   MODAL
═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 1.75rem 1.5rem 2.5rem;
  width: 100%;
  max-width: 500px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle { width: 40px; height: 4px; background: #e0e0e0; border-radius: 50px; margin: 0 auto 1.25rem; }
.modal-title  { font-family: var(--font-head); font-weight: 900; font-size: 1.2rem; margin-bottom: 0.6rem; }
.modal-body   { font-size: 0.87rem; color: #555; line-height: 1.7; }

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #111;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.84rem;
  font-weight: 600;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Confetti */
#confettiCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.84); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  60%     { transform: translateX(-5px); }
  80%     { transform: translateX(5px); }
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

.anim-fade-up         { animation: fadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }
.anim-pop             { animation: popIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.anim-shake           { animation: shake 0.4s ease both; }
.food-card.entering   { animation: popIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ═══════════════════════════════════════════
   RESPONSIVE — ALL DEVICES & BROWSERS
═══════════════════════════════════════════ */

/* ── Safari iOS fixes ── */
@supports (-webkit-touch-callout: none) {
  .screen {
    min-height: -webkit-fill-available;
  }
  .card-area {
    padding-bottom: env(safe-area-inset-bottom, 1.2rem);
  }
  .action-btns {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Firefox fixes ── */
@-moz-document url-prefix() {
  .food-emoji-big { font-size: 5.5rem; }
  .ed-badge       { padding: .2rem .55rem; }
}

/* ── Global ── */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── Mode cards — all screen sizes ── */
.mode-card.solo-card {
  background: linear-gradient(135deg, #fff5f2 0%, #fff 60%, #fff8f0 100%);
  border-color: rgba(232,64,10,.35);
  overflow: hidden;
  position: relative;
}
.mode-card.solo-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 50%; height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.3) 50%, transparent 60%);
  transform: skewX(-15deg);
  animation: card-shine 3.5s ease infinite;
  pointer-events: none;
}
@keyframes card-shine {
  0%   { left: -60%; }
  35%  { left: 130%; }
  100% { left: 130%; }
}
.mode-card:not(.solo-card) {
  background: linear-gradient(135deg, #f8f8f8 0%, #fff 60%, #f5f5f5 100%);
}
.quick-play-btn {
  animation: btn-pulse 2.5s ease infinite;
}
@keyframes btn-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,64,10,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(232,64,10,.0); }
}

/* ── Small phones (360px and below) ── */
@media (max-width: 360px) {
  .logo          { font-size: 2rem; }
  .food-img-wrap { height: 170px; }
  .f-name        { font-size: 1.1rem; }
  .f-desc        { font-size: .72rem; }
  .action-btn    { padding: .75rem; font-size: .85rem; }
  .sc-score      { font-size: 4rem; }
  .sc-slash,
  .sc-total      { font-size: 2.2rem; }
  .editions-grid { grid-template-columns: 1fr 1fr; }
  .game-header   { padding: .75rem 1rem; }
  .ach-bar       { padding: .4rem 1rem; }
}

/* ── Mobile (max 1023px) ── */
@media (max-width: 1023px) {

  #game {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .card-area {
    flex: 1;
    min-height: 0;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .game-header {
  max-width: 100%;
  width: 100%;
  padding: 1rem 1.5rem;
  box-sizing: border-box;
}

 .ach-bar {
  max-width: 100%;
  width: 100%;
  padding: .4rem 1.5rem;
  overflow-x: auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  box-sizing: border-box;
}

  .hint-row {
    max-width: 100%;
    margin: 0;
    padding: 0 1.5rem .6rem;
  }

  .action-btns {
    max-width: 100%;
    margin: 0;
    padding: 0 1.5rem 2rem;
    justify-content: center;
  }

  .food-card     { max-width: 340px; }
  .food-img-wrap { height: 210px; }
  .f-name        { font-size: 1.4rem; }
  .f-desc        { font-size: .8rem; }

  .mode-card     { padding: 1.5rem 1.25rem; }
  .mode-icon     { width: 38px; height: 38px; }
  .mode-name     { font-size: 1.05rem; }
  .mode-desc     { font-size: .75rem; }
}

/* ── Tablet (768px and up) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .home-top      { padding: 3rem 2rem 2.5rem; }
  .home-modes    { max-width: 480px; gap: 1rem; }
  .mode-card     { padding: 1.75rem 1.5rem; }
  .food-card     { max-width: 380px; }
  .food-img-wrap { height: 230px; }
  .f-name        { font-size: 1.55rem; }
  .action-btns   { gap: 1.2rem; padding: 0 2rem 2.5rem; }
  .action-btn    { max-width: 180px; padding: 1.1rem; }
  .result-wrap   { max-width: 480px; }
  .ed-wrap       { max-width: 520px; }
  .editions-grid { grid-template-columns: repeat(3, 1fr); }
  .cats-grid     { grid-template-columns: repeat(4, 1fr); }
  .sc-score      { font-size: 6.5rem; }
  .home-seo      { padding: 2rem 2.5rem 1rem; }
}

/* ── Desktop (1024px and up) ── */
@media (min-width: 1024px) {

  body   { background: #fff; }
  #home  { width: 100%; }

  .home-top  { padding: 4rem 2rem 2rem; }
  .logo      { font-size: 4rem; }
  .home-modes { max-width: 700px; gap: 1.25rem; }

  .mode-card         { padding: 2.5rem 2rem; border-radius: 24px; transition: all .25s; }
  .mode-card:hover   { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.1); }
  .mode-card.solo-card:hover { box-shadow: 0 16px 40px rgba(232,64,10,.18); }
  .mode-icon         { width: 56px; height: 56px; margin-bottom: .85rem; }
  .mode-name         { font-size: 1.3rem; margin-bottom: .4rem; }
  .mode-desc         { font-size: .85rem; line-height: 1.5; }

  .home-seo,
  .home-seo .seo-section,
  .home-seo .seo-p,
  .home-seo .how-steps,
  .home-seo .how-step,
  .home-seo .faq-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .home-seo    { padding: 2rem 8rem !important; }
  .seo-h2      { font-size: 1.6rem; margin-bottom: .85rem; }
  .seo-p       { font-size: 1rem; line-height: 1.85; }
  .how-text    { font-size: .95rem; line-height: 1.6; }
  .faq-q       { font-size: .95rem; }
  .faq-a       { font-size: .9rem; line-height: 1.7; }
  .cats-grid   { grid-template-columns: repeat(5, 1fr); gap: .75rem; }
  .site-footer { width: 100%; padding: 1.5rem 8rem; }

  /* Game screen */
  #game {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .game-header {
    flex-shrink: 0;
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
    padding: .85rem 2rem;
    box-sizing: border-box;
  }
  .gh-avatar { width: 46px; height: 46px; font-size: .9rem; }
  .gh-name   { font-size: 1.15rem; }
  .gh-turn   { font-size: .72rem; }
  .gh-prog   { font-size: .95rem; }
  .gh-streak { font-size: .78rem; }

  .prog-bar { flex-shrink: 0; width: 100%; }

  .ach-bar {
    flex-shrink: 0;
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
    padding: .35rem 2rem;
    box-sizing: border-box;
    overflow-x: visible;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: center;
  }
  .ach-badge { font-size: .72rem; padding: .28rem .85rem; }

  .card-area {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem 1rem;
  }

  .food-card {
    max-width: 440px;
    width: 100%;
    padding-bottom: .75rem;
  }
  .food-img-wrap { height: 195px; }
  .f-name        { font-size: 1.35rem; }
  .f-desc        { font-size: .78rem; margin-bottom: .35rem; }
  .f-tags        { gap: .2rem; }
  .f-tag         { font-size: .56rem; padding: .1rem .45rem; }

  .hint-row {
    flex-shrink: 0;
    width: 100%;
    max-width: 440px;
    margin: 0 auto .4rem;
    padding: 0;
    box-sizing: border-box;
  }
  .hint-item { font-size: .78rem; }

  .action-btns {
    flex-shrink: 0;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0 0 1rem;
    gap: 1.25rem;
    justify-content: center;
    box-sizing: border-box;
  }
  .action-btn { max-width: 170px; padding: 1rem; border-radius: 18px; }
  .action-btn span:first-child { font-size: 2.6rem; line-height: 1; }
  .btn-sub    { font-size: .7rem; }

  /* Result screens */
  #solo-result,
  #group-result { min-height: 100vh; }

  #solo-result,
  #group-result,
  #edition-pick,
  #players-setup,
  #transition {
    max-width: 660px;
    margin: 0 auto;
  }

  .result-wrap     { max-width: 540px; }
  .sc-score        { font-size: 6rem; }
  .ed-wrap         { max-width: 600px; }
  .editions-grid   { grid-template-columns: repeat(3, 1fr); }
  .setup-wrap      { max-width: 500px; }
  .leaderboard     { max-width: 640px; }
  .matches-section { max-width: 640px; }
}

/* ── Large desktop (1400px and up) ── */
@media (min-width: 1400px) {
  .home-seo    { padding: 2rem 12rem !important; }
  .site-footer { padding: 1.5rem 12rem; }
  .seo-h2      { font-size: 1.8rem; }
  .seo-p       { font-size: 1.05rem; }
  .home-modes  { max-width: 800px; }
  .cats-grid   { grid-template-columns: repeat(6, 1fr); }

  #solo-result,
  #group-result,
  #edition-pick,
  #players-setup,
  #transition    { max-width: 720px; }

  .food-card     { max-width: 460px; }
  .food-img-wrap { height: 210px; }
  .action-btn    { max-width: 190px; padding: 1.2rem; }
  .action-btn span:first-child { font-size: 2.8rem; }
}