/* Result card overlay — shared by map full-card view (subset of styles.css) */
:root {
  --rc-slop: #ff1818;
  --rc-warn: #ffb800;
  --rc-based: #00d166;
  --rc-neon: #00e5ff;
  --rc-border: #2a2a2a;
  --rc-display: "Bungee", system-ui, sans-serif;
  --rc-hand: "Patrick Hand", "Comic Sans MS", system-ui, sans-serif;
  --rc-drip: "Creepster", "Bungee", system-ui, sans-serif;
  --rc-marker: "Permanent Marker", "Bungee", system-ui, sans-serif;
}

body.map-full-card-open { overflow: hidden; }

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.result-modal.is-open {
  display: flex;
  animation: rc-fade 0.25s ease both;
}
.result-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.result {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(720px, 94vw);
  max-height: min(94dvh, calc(100dvh - 32px));
  overflow: hidden;
  padding: 16px 16px max(14px, env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 24, 24, 0.22), transparent 60%),
    linear-gradient(180deg, #0d0d0d, #050505);
  border: 2px solid var(--rc-slop);
  border-radius: 22px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 24, 24, 0.15),
    0 0 60px rgba(255, 24, 24, 0.25);
  animation: rc-pop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes rc-fade { from { opacity: 0; } }
@keyframes rc-pop {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes rc-title-glow {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(255, 24, 24, 0.6)); }
  50% { filter: drop-shadow(0 0 32px rgba(255, 24, 24, 0.85)); }
}
@keyframes rc-reaction-pop {
  0% { transform: scale(0.5) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(-4deg); }
}
@keyframes rc-stamp-slam {
  0% { transform: scale(1.8) rotate(-22deg); opacity: 0; }
  60% { transform: scale(0.92) rotate(-8deg); opacity: 1; }
  100% { transform: scale(1) rotate(-12deg); opacity: 0.95; }
}

.result__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--rc-border);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
}
.result__close:hover { background: var(--rc-slop); border-color: var(--rc-slop); }

.result__title {
  display: block;
  flex-shrink: 0;
  width: min(400px, 82%);
  margin: 0 auto 10px;
  filter: drop-shadow(0 0 22px rgba(255, 24, 24, 0.6));
  animation: rc-title-glow 3s ease-in-out infinite;
}

.result__title--text {
  width: auto;
  max-width: 94%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.32em;
  font-family: var(--display, "Bungee", "Impact", system-ui, sans-serif);
  font-size: clamp(18px, 5.4vw, 30px);
  line-height: 1.04;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #ffd400;
  -webkit-text-stroke: 1px #1c0900;
  text-shadow:
    2px 2px 0 #3a0a00,
    -1px -1px 0 #2a0700,
    0 0 2px #000,
    0 0 18px rgba(255, 24, 24, 0.55);
}
.result__title-sep { color: #ff4e1a; }
.result__title-site { color: #ffe45e; }

.result__panel-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.result__panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(0, 209, 102, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  position: relative;
}
.result.is-based .result__panel { border-color: rgba(0, 209, 102, 0.55); box-shadow: 0 0 24px rgba(0, 209, 102, 0.18) inset; }
.result.is-slop .result__panel { border-color: rgba(255, 24, 24, 0.55); box-shadow: 0 0 24px rgba(255, 24, 24, 0.18) inset; }
.result.is-mid .result__panel { border-color: rgba(255, 184, 0, 0.55); box-shadow: 0 0 24px rgba(255, 184, 0, 0.18) inset; }

.result__panel-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result__reaction {
  position: absolute;
  top: 14px;
  left: 14px;
  width: clamp(72px, 16vw, 120px);
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.7));
  z-index: 2;
  pointer-events: none;
}
.result__reaction.is-chad {
  top: -4px;
  left: auto;
  right: 0;
  width: clamp(140px, 30vw, 210px);
  filter: drop-shadow(0 6px 18px rgba(0, 209, 102, 0.55));
}
.result__reaction.is-pop { animation: rc-reaction-pop 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }

.result__stamp {
  position: absolute;
  top: 28px;
  left: 16px;
  width: clamp(85px, 20vw, 140px);
  height: auto;
  transform: rotate(-12deg);
  filter: drop-shadow(0 4px 14px rgba(0, 209, 102, 0.55));
  z-index: 3;
  pointer-events: none;
  opacity: 0.95;
  animation: rc-stamp-slam 0.45s cubic-bezier(0.3, 1.6, 0.4, 1);
}

.result__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  line-height: 1;
  position: relative;
  z-index: 3;
  width: 100%;
}
.result__score-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}
.result.is-slop .result__score-main,
.result.is-mid .result__score-main {
  padding-left: clamp(84px, 18vw, 132px);
  padding-right: clamp(20px, 5vw, 40px);
}
.result.is-based .result__score-main {
  padding-left: clamp(88px, 18vw, 140px);
  padding-right: clamp(110px, 24vw, 200px);
}
.result__score-num,
.result__score-pct {
  font-family: var(--rc-drip);
  font-size: clamp(56px, 14vw, 100px);
  color: var(--rc-slop);
  text-shadow: 0 0 20px rgba(255, 24, 24, 0.55), 2px 6px 0 rgba(0, 0, 0, 0.6);
}
.result__score-word {
  font-family: var(--rc-drip);
  font-size: clamp(34px, 7vw, 60px);
  margin-left: 0.2em;
  color: var(--rc-slop);
  text-shadow: 0 0 18px rgba(255, 24, 24, 0.55), 2px 6px 0 rgba(0, 0, 0, 0.6);
}
.result.is-mid .result__score-num,
.result.is-mid .result__score-pct,
.result.is-mid .result__score-word { color: var(--rc-warn); text-shadow: 0 0 20px rgba(255, 184, 0, 0.55), 2px 6px 0 rgba(0, 0, 0, 0.6); }
.result.is-based .result__score-num,
.result.is-based .result__score-pct,
.result.is-based .result__score-word { color: var(--rc-based); text-shadow: 0 0 20px rgba(0, 209, 102, 0.55), 2px 6px 0 rgba(0, 0, 0, 0.6); }

.result__bar {
  position: relative;
  height: 14px;
  border-radius: 8px;
  background: #000;
  border: 1px solid var(--rc-border);
  overflow: hidden;
}
.result__bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--rc-based), var(--rc-warn) 50%, var(--rc-slop));
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.result__scanned {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  background: #fff;
  color: #000;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px #000, 0 6px 16px rgba(0, 0, 0, 0.5);
  font-family: var(--rc-hand);
  font-size: clamp(16px, 3.4vw, 22px);
}
.result__scanned-cat:empty { display: none; }

.result__verdict {
  margin: 0;
  text-align: center;
  font-family: var(--rc-marker);
  font-size: clamp(18px, 4vw, 26px);
  color: #fff;
}
.result.is-slop .result__verdict { color: var(--rc-slop); text-shadow: 0 0 14px rgba(255, 24, 24, 0.55); }
.result.is-mid .result__verdict { color: var(--rc-warn); text-shadow: 0 0 14px rgba(255, 184, 0, 0.55); }
.result.is-based .result__verdict { color: var(--rc-based); text-shadow: 0 0 14px rgba(0, 209, 102, 0.55); }

.result__tag {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5em;
  padding: 4px 14px;
  border-radius: 999px;
  border: 2px solid currentColor;
  font-family: var(--rc-display);
  font-size: clamp(13px, 2.8vw, 17px);
  letter-spacing: 0.1em;
}
.result__tag-lbl { color: rgba(255, 255, 255, 0.65); font-size: 0.78em; }
.result.is-slop .result__tag { color: var(--rc-slop); }
.result.is-slop .result__tag-val { color: var(--rc-slop); }
.result.is-mid .result__tag { color: var(--rc-warn); }
.result.is-mid .result__tag-val { color: var(--rc-warn); }
.result.is-based .result__tag { color: var(--rc-based); }
.result.is-based .result__tag-val { color: var(--rc-based); }

.result__breakdown {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--rc-display);
  font-size: clamp(13px, 2.8vw, 16px);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}

.result__status {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--rc-display);
  font-size: clamp(14px, 3.2vw, 18px);
  letter-spacing: 0.12em;
}
.result.is-slop .result__status { color: var(--rc-slop); }
.result.is-mid .result__status { color: var(--rc-warn); }
.result.is-based .result__status { color: var(--rc-based); }

.result__bullets {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--rc-hand);
  font-size: clamp(15px, 3vw, 19px);
}
.result__bullets li {
  position: relative;
  padding-left: 1.4em;
  line-height: 1.35;
}
.result__bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -0.05em;
  font-size: 1.6em;
  color: var(--rc-slop);
}
.result__bullets li.good::before { color: var(--rc-based); }
.result__bullets li.warn::before { color: var(--rc-warn); }

.result__orders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rc-border);
}
.result__orders[hidden],
[hidden] { display: none !important; }

.order {
  border: 2px solid var(--rc-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
}
.order__lbl {
  font-family: var(--rc-display);
  font-size: clamp(11px, 2.4vw, 13px);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.order__txt {
  font-family: var(--rc-hand);
  font-size: clamp(15px, 3vw, 19px);
  line-height: 1.3;
}
.order--good { border-color: rgba(0, 209, 102, 0.6); }
.order--good .order__lbl { color: var(--rc-based); }
.order--bad { border-color: rgba(255, 24, 24, 0.6); }
.order--bad .order__lbl { color: var(--rc-slop); }
.order--secret { border-color: rgba(255, 184, 0, 0.6); border-style: dashed; }
.order--secret .order__lbl { color: var(--rc-warn); }
.order--side { border-color: rgba(0, 229, 255, 0.65); }
.order--side .order__lbl { color: var(--rc-neon); }

/* Ingredient autopsy — entertainment-only roast list. Collapsed by default. */
.result__ingredients {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rc-border);
}
.result__ingredients[hidden] { display: none !important; }
.result__ingredients-toggle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--rc-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.result__ingredients-toggle:hover,
.result__ingredients-toggle:focus-visible {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.06);
}
.result__ingredients-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.result__ingredients-title {
  font-family: var(--rc-display);
  font-size: clamp(11px, 2.4vw, 13px);
  letter-spacing: 0.08em;
  color: var(--rc-neon);
}
.result__ingredients-meta {
  font-family: var(--rc-body, sans-serif);
  font-size: clamp(10px, 2vw, 12px);
  color: rgba(255, 255, 255, 0.55);
}
.result__ingredients-chevron {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease;
}
.result__ingredients.is-expanded .result__ingredients-chevron {
  transform: rotate(180deg);
}
.result__ingredients-note {
  margin: 0;
  font-size: clamp(9px, 1.9vw, 11px);
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
}
.result__ingredients-panel[hidden] {
  display: none !important;
}
.result__ingredients-panel {
  margin-top: 10px;
}
.result__ingredients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ingredient {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid var(--rc-border);
  border-left-width: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.ingredient__icon { font-size: 1em; line-height: 1.35; flex: 0 0 auto; }
.ingredient__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ingredient__name {
  font-family: var(--rc-display);
  font-size: clamp(12px, 2.5vw, 14px);
  letter-spacing: 0.02em;
  color: #fff;
}
.ingredient__note {
  font-family: var(--rc-hand);
  font-size: clamp(13px, 2.7vw, 16px);
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.72);
}
.ingredient--good { border-left-color: var(--rc-based); }
.ingredient--good .ingredient__name { color: var(--rc-based); }
.ingredient--warn { border-left-color: var(--rc-warn); }
.ingredient--warn .ingredient__name { color: var(--rc-warn); }
.ingredient--bad  { border-left-color: var(--rc-slop); }
.ingredient--bad  .ingredient__name { color: var(--rc-slop); }

/* ===== Menu breakdown (bonus scan) on the full card ===== */
.result__menu-btn[hidden] { display: none !important; }

.menu-dock--full {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(57, 255, 20, 0.45);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.12);
}

.menu-dock--full .menu-dock__head {
  color: var(--rc-based, #00d166);
}

.menu-dock--full .menu-dock__spinner {
  border-color: rgba(255, 255, 255, 0.12);
  border-top-color: var(--rc-based, #00d166);
  border-right-color: var(--rc-slop, #ff1818);
}

.menu-dock--full .menu-dock__loading-txt {
  color: rgba(255, 255, 255, 0.9);
}

.menu-dock--full.is-fetching .menu-dock__head {
  color: var(--rc-warn, #ffb800);
}

.result__menu {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.result__menu .order__txt strong { color: #fff; }

.result__menu-headline {
  margin: 0;
  font-family: var(--rc-hand);
  font-size: clamp(16px, 3.2vw, 20px);
  line-height: 1.3;
  color: #fff;
}

.result__menu-tip {
  margin: 0;
  font-family: var(--rc-hand);
  font-size: 15px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 720px) {
  .result__reaction.is-chad,
  .result__stamp { display: none !important; }
  .result.is-based .result__score-main {
    padding-left: 0;
    padding-right: 0;
  }
}
