/* ==========================================================================
   MiniBreak — Food Quiz game styles
   Warm appetizing game-area identity inside the dark arcade shell.
   Everything game-specific is scoped under #fq. Zero external requests.
   ========================================================================== */

:root {
  --fq-cream: #FFF8F0;
  --fq-cream-dim: #F7EDE0;
  --fq-orange: #E8590C;
  --fq-orange-dark: #C74A09;
  --fq-gold: #F4A261;
  --fq-brown: #3E2F25;
  --fq-muted: #8A7364;
  --fq-green: #2F9E44;
  --fq-red: #E03131;
  --fq-line: #EBD9C2;
  --fq-radius: 18px;
  --fq-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Fallback site chrome ----------
   assets/css/shell.css (built by the shell worker) is authoritative for the
   header/footer and loads AFTER this file, so its rules win on conflicts.
   These fallbacks keep the page coherent if shell.css is not present yet. */
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.site-header { position: sticky; top: 0; z-index: 40; background: #14141F; border-bottom: 1px solid #26263A; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: #1F1F30; }
.site-wordmark { font-family: var(--fq-font); font-weight: 800; font-size: 20px; color: #F5F1E8; letter-spacing: .3px; }
.site-nav { display: flex; gap: 6px; }
.site-nav a { font-family: var(--fq-font); color: #F5F1E8; text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 14px; border-radius: 12px; }
.site-nav a:hover { background: #1F1F30; }
.breadcrumb { font-family: var(--fq-font); color: #A8A8BE; font-size: 14px; padding-top: 14px; padding-bottom: 4px; }
.breadcrumb a { color: #A8A8BE; }
.site-footer { border-top: 1px solid #26263A; margin-top: 32px; background: #14141F; }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 24px; flex-wrap: wrap; }
.site-copy { font-family: var(--fq-font); color: #A8A8BE; font-size: 14px; margin: 0; }
.site-footnav { display: flex; gap: 4px; }
.site-footnav a { font-family: var(--fq-font); color: #A8A8BE; font-size: 14px; padding: 8px 10px; text-decoration: none; border-radius: 8px; }
.site-footnav a:hover { color: #F5F1E8; background: #1F1F30; }

/* ---------- Ad slot (shared component) ---------- */
.ad-slot {
  border: 2px dashed #4a4458;
  border-radius: 16px;
  color: #A8A8BE;
  text-align: center;
  padding: 26px 12px;
  margin: 24px auto;
  max-width: 520px;
  font-family: var(--fq-font);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ---------- Game root ---------- */
#fq { max-width: 520px; margin: 0 auto; padding: 8px 0 8px; font-family: var(--fq-font); color: var(--fq-brown); }
#fq [hidden] { display: none !important; }
#fq button { font-family: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; }
.fq-screen { min-height: 55vh; }

/* ---------- Panels & cards ---------- */
.fq-panel, .fq-card {
  background: var(--fq-cream);
  color: var(--fq-brown);
  border-radius: 22px;
  padding: 22px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.fq-card { padding: 14px 14px 18px; margin-top: 12px; }

@keyframes fq-pop {
  0% { transform: scale(.96); opacity: 0; }
  60% { transform: scale(1.015); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.fq-pop { animation: fq-pop .28s ease-out; }

/* ---------- Map screen ---------- */
.fq-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 3px;
  color: var(--fq-orange); background: #FDEBD9; border-radius: 999px; padding: 6px 14px;
}
.fq-title { font-size: 40px; margin: 10px 0 4px; letter-spacing: -.5px; }
.fq-sub { color: var(--fq-muted); font-size: 15px; margin: 0 0 14px; }
.fq-best { font-size: 15px; color: var(--fq-muted); margin-bottom: 14px; }
.fq-best strong { color: var(--fq-brown); font-size: 18px; }
.fq-h2 { font-size: 17px; margin: 20px 0 10px; }

.fq-daily {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--fq-cream-dim); border: 1px solid var(--fq-line);
  border-radius: var(--fq-radius); padding: 14px 16px; margin-top: 14px;
}
.fq-daily-title { font-weight: 800; font-size: 16px; }
.fq-daily-streak { color: var(--fq-muted); font-size: 14px; margin-top: 2px; }

.fq-roadmap { position: relative; width: 100%; max-width: 430px; margin: 4px auto 0; }
.fq-road { display: block; width: 100%; height: auto; }
.fq-road-base { fill: none; stroke: #3a2c22; stroke-width: 10; stroke-linecap: round; }
.fq-road-done { fill: none; stroke: url(#fqRoadGrad); stroke-width: 10; stroke-linecap: round; }
.fq-node {
  position: absolute; transform: translate(-50%, -50%); width: 78px; padding: 0;
  background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; transition: transform .12s ease;
}
.fq-node:not(.fq-locked):active { transform: translate(-50%, -50%) scale(.9); }
.fq-node-circle {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}
.fq-node.fq-done .fq-node-circle {
  background: radial-gradient(circle at 35% 30%, #ffe3a3, #f59e0b 72%);
  color: #4a2c0a; border: 3px solid #ffe9b8;
  box-shadow: 0 0 18px rgba(245, 158, 11, .55), 0 4px 10px rgba(0, 0, 0, .35);
}
.fq-node.fq-current .fq-node-circle {
  background: radial-gradient(circle at 35% 30%, #fff7e6, #fbbf24 75%);
  color: #4a2c0a; border: 3px solid #fff;
  animation: fq-pulse 1.6s ease-out infinite;
}
@keyframes fq-pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, .55); }
  70% { box-shadow: 0 0 0 14px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
.fq-node.fq-locked { cursor: not-allowed; }
.fq-node.fq-locked .fq-node-circle { background: #2b2119; color: #8a7660; border: 3px solid #453729; font-size: 20px; }
.fq-node-stars { font-size: 13px; letter-spacing: 2px; color: #c9b394; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.fq-node-stars .on { color: var(--fq-gold); }
.fq-node.fq-locked .fq-node-stars { opacity: .35; }

.fq-link { display: inline-block; margin-top: 18px; color: var(--fq-orange); font-weight: 700; text-decoration: none; font-size: 15px; }

/* ---------- Buttons ---------- */
.fq-btn {
  display: block; width: 100%; min-height: 54px; border: none; border-radius: 16px;
  font-size: 17px; font-weight: 700; padding: 14px 18px; margin-top: 10px;
  transition: transform .1s ease, background .15s ease;
}
.fq-btn:active { transform: scale(.97); }
.fq-btn:disabled { opacity: .55; cursor: default; }
.fq-primary { background: var(--fq-orange); color: #fff; box-shadow: 0 4px 0 var(--fq-orange-dark); }
.fq-primary:active { box-shadow: none; }
.fq-ghost { background: #fff; color: var(--fq-brown); border: 2px solid var(--fq-line); }
.fq-share { background: var(--fq-brown); color: var(--fq-cream); }
.fq-opt { background: #fff; color: var(--fq-brown); border: 2px solid var(--fq-line); text-align: left; font-weight: 600; }
.fq-opt.right { background: #DFF5E3; border-color: var(--fq-green); color: #1E6B32; }
.fq-opt.wrong { background: #FBE3E3; border-color: var(--fq-red); color: #A11F1F; }
.fq-locked .fq-opt, .fq-locked .fq-chip { pointer-events: none; }

/* ---------- HUD ---------- */
.fq-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fq-hud-label { color: #F5F1E8; font-weight: 700; font-size: 15px; }
.fq-hearts { color: var(--fq-orange); font-size: 22px; letter-spacing: 2px; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.fq-hearts .fq-lost { opacity: .25; }
.fq-daily-tag { color: #1F1F30; background: var(--fq-gold); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; border-radius: 999px; padding: 6px 12px; }
.fq-subhud { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.fq-score { color: #F5F1E8; font-size: 15px; }
.fq-score strong { font-size: 19px; }
.fq-streak { color: #F5F1E8; font-size: 15px; font-weight: 700; }
.fq-streak.fq-dim { opacity: .35; }

.fq-progress { height: 8px; background: rgba(255,255,255,.14); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.fq-progress-fill { height: 100%; width: 0; background: var(--fq-gold); border-radius: 99px; transition: width .3s ease; }

/* ---------- Photo & timer ---------- */
.fq-photo-wrap { position: relative; }
.fq-photo { width: 100%; height: 230px; object-fit: cover; border-radius: 14px; display: block; background: linear-gradient(135deg, #F4A261, #E8590C); }
.fq-photo.fq-broken { visibility: hidden; min-height: 120px; }
.fq-timer { height: 8px; background: #F1E4D4; border-radius: 99px; margin-top: 10px; overflow: hidden; }
.fq-timer-fill { height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--fq-gold), var(--fq-orange)); }
.fq-timer-fill.fq-low { background: var(--fq-red); }

/* ---------- Question body ---------- */
.fq-q { padding: 16px 6px 2px; }
.fq-dishname { font-size: 21px; font-weight: 800; margin: 0 0 4px; text-align: center; }
.fq-prompt { font-size: 17px; font-weight: 600; color: var(--fq-muted); margin: 0 0 14px; text-align: center; }
.fq-opts { display: flex; flex-direction: column; gap: 2px; }
.fq-note { font-size: 12.5px; color: var(--fq-muted); text-align: center; margin: 12px 0 0; }

.fq-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 6px; }
.fq-chip {
  border: 2px solid var(--fq-line); background: #fff; color: var(--fq-brown);
  border-radius: 999px; padding: 12px 18px; min-height: 48px; font-size: 15px; font-weight: 600;
  transition: transform .1s ease, background .15s ease, border-color .15s ease;
}
.fq-chip:active { transform: scale(.95); }
.fq-chip.on { background: var(--fq-orange); border-color: var(--fq-orange); color: #fff; }
.fq-chip.right { background: #DFF5E3; border-color: var(--fq-green); color: #1E6B32; }
.fq-chip.wrong { background: #FBE3E3; border-color: var(--fq-red); color: #A11F1F; }

/* ---------- Answer popup ---------- */
.fq-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(24, 12, 6, .62);
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
}
.fq-popcard {
  width: 100%; max-width: 420px; background: var(--fq-cream); color: var(--fq-brown);
  border-radius: 22px; padding: 0 22px 20px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); text-align: center;
}
.fq-popbar { height: 6px; background: #F1E4D4; border-radius: 99px; margin: 14px 0 4px; overflow: hidden; }
.fq-popbar-fill { height: 100%; width: 0; background: var(--fq-orange); border-radius: 99px; }
.fq-verdict { font-size: 44px; margin-top: 10px; }
.fq-ppoints { font-size: 34px; font-weight: 800; color: var(--fq-green); margin-top: 2px; }
.fq-verdict.fq-bad + .fq-ppoints { color: var(--fq-muted); }
.fq-pbonus { color: var(--fq-orange); font-weight: 700; font-size: 15px; margin-top: 2px; }
.fq-pdish { font-size: 19px; font-weight: 800; margin-top: 8px; }
.fq-pdish span { font-weight: 600; color: var(--fq-muted); }
.fq-ptime { font-size: 16px; font-weight: 800; color: var(--fq-red); margin-top: 6px; }
.fq-pcorrect { font-size: 15px; margin-top: 8px; background: #FDEBD9; border-radius: 12px; padding: 10px 12px; }
.fq-pfact { font-size: 14.5px; color: var(--fq-muted); margin-top: 12px; line-height: 1.5; text-align: left; }
.fq-phint { font-size: 12px; color: var(--fq-muted); margin-top: 14px; opacity: .7; }

/* ---------- Results ---------- */
.fq-results { text-align: center; }
.fq-rstars { font-size: 44px; letter-spacing: 6px; color: #D8C3A8; margin: 6px 0; }
.fq-rstars .on { color: var(--fq-gold); text-shadow: 0 2px 8px rgba(244,162,97,.5); }
.fq-rscore { font-size: 56px; font-weight: 800; letter-spacing: -1px; }
.fq-rrank { font-size: 19px; font-weight: 700; color: var(--fq-orange); margin-top: 2px; }
.fq-rbest { color: var(--fq-muted); font-size: 15px; margin-top: 8px; }
.fq-rbest strong { color: var(--fq-brown); }
.fq-newbest { display: inline-block; margin-top: 8px; background: var(--fq-gold); color: #3E2F25; font-weight: 800; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; border-radius: 999px; padding: 6px 14px; }
.fq-rbtns { margin-top: 14px; }
.fq-rfail-title { font-size: 30px; margin: 10px 0 4px; }
.fq-rfail-sub { color: var(--fq-muted); margin: 0 0 6px; }
.fq-rstreak { font-size: 22px; font-weight: 800; margin-top: 6px; }

/* ---------- Keep-playing promo ---------- */
.fq-promo { margin-top: 18px; }
.fq-promo .fq-h2 { color: #F5F1E8; }
.fq-promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fq-promo-card {
  background: #1F1F30; border: 1px solid #2c2c44; border-radius: 16px; padding: 16px 14px;
  color: #F5F1E8; text-decoration: none; display: flex; flex-direction: column; gap: 6px; min-height: 96px;
}
.fq-promo-card strong { font-size: 15px; }
.fq-promo-card span { font-size: 13px; color: #A8A8BE; }
.fq-soon { display: inline-block; align-self: flex-start; background: #2c2c44; color: #FFC93C; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; }
a.fq-promo-card span:last-child { color: var(--fq-gold); font-weight: 700; }

/* ---------- Toast ---------- */
.fq-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #1F1F30; color: #F5F1E8; font-family: var(--fq-font); font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 80; max-width: 90vw; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.fq-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Small screens ---------- */
@media (max-width: 380px) {
  .fq-title { font-size: 34px; }
  .fq-node { width: 64px; }
  .fq-node-circle { width: 52px; height: 52px; font-size: 19px; }
  .fq-photo { height: 200px; }
  .fq-rscore { font-size: 46px; }
}
