/* BiteBuff — companion theme aligned with BitBuff brand */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #201c2b;
  --bg-deep: #18181b;
  --surface: #1f1f23;
  --border: #3a3a3d;
  --purple: #9147ff;
  --purple-deep: #772ce8;
  --purple-soft: #a970ff;
  --purple-dim: rgba(145, 71, 255, 0.12);
  --text: #efeff1;
  --muted: #adadb8;
  --danger: #e91916;
  --ok: #00c74f;
  --radius: 8px;
  --nav-h: 60px;
  --max: 1200px;
  --rail: 160px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--purple-soft);
  text-decoration: underline;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

.container.narrow {
  max-width: 720px;
}

/* —— Nav —— */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-deep);
  border-bottom: 2px solid var(--purple);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-h);
  gap: 12px;
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  margin-right: 8px;
}

.brand-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.5px;
}

.navbar-icon {
  width: 36px;
  height: 36px;
  display: block;
}

.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 4px;
  text-decoration: none !important;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.login-wrap {
  position: relative;
}

.login-button,
.cta-button {
  background: var(--purple);
  color: #fff !important;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
  text-decoration: none !important;
}

.login-button:hover,
.cta-button:hover {
  background: var(--purple-deep);
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none !important;
}

.cta-button {
  width: 100%;
  margin-top: 8px;
  padding: 14px 20px;
  font-size: 16px;
}

.cta-button.download-all-btn,
.download-all-btn {
  width: auto;
  display: inline-block;
  margin-top: 8px;
  padding: 12px 20px;
}

.download-btn {
  margin-top: 4px;
}

.cta-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-size: 13px;
  color: var(--muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--purple-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 4px 6px;
}

.text-btn:hover {
  color: #fff;
  text-decoration: underline;
}

/* Unobtrusive login callout (not a blocking modal) */
.login-callout {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(260px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--purple);
  border-radius: var(--radius);
  padding: 12px 28px 12px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 1100;
  animation: callout-in 0.25s ease;
}

.login-callout p {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}

.login-callout strong {
  color: var(--purple-soft);
}

.callout-arrow {
  position: absolute;
  top: -7px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-left: 1px solid var(--purple);
  border-top: 1px solid var(--purple);
  transform: rotate(45deg);
}

.callout-dismiss {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.callout-dismiss:hover {
  color: #fff;
}

@keyframes callout-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  background: var(--bg-deep);
  border-bottom: 2px solid var(--purple);
  padding: 48px 0 40px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(145, 71, 255, 0.25), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(119, 44, 232, 0.18), transparent 50%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 18px,
      rgba(145, 71, 255, 0.03) 18px,
      rgba(145, 71, 255, 0.03) 19px
    );
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.55) 0%, rgba(32, 28, 43, 0.85) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 5vw, 36px);
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 12px;
  line-height: 1.35;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
  font-size: clamp(16px, 2.5vw, 20px);
  color: #fff;
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
}

.hero-party {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.party-sprite {
  position: absolute;
  bottom: auto;
  top: 50%;
  width: clamp(110px, 16vw, 160px);
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0.92;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
  animation: party-idle 4.5s ease-in-out infinite;
}

/* Sit beside the centered title block — clear of the hero copy */
.party-sprite-left.party-sprite-front {
  left: calc(50% - 420px);
  z-index: 2;
  animation-delay: 0s;
}

.party-sprite-left.party-sprite-back {
  left: calc(50% - 510px);
  top: calc(50% + 6px);
  width: clamp(90px, 13vw, 130px);
  opacity: 0.55;
  animation-delay: -1.2s;
  z-index: 1;
}

.party-sprite-right.party-sprite-front {
  left: calc(50% + 260px);
  right: auto;
  z-index: 2;
  animation-delay: -2.1s;
}

.party-sprite-right.party-sprite-back {
  left: calc(50% + 350px);
  right: auto;
  top: calc(50% + 6px);
  width: clamp(90px, 13vw, 130px);
  opacity: 0.55;
  animation-delay: -3s;
  z-index: 1;
}

@keyframes party-idle {
  0%,
  100% {
    transform: translateY(-50%);
  }
  50% {
    transform: translateY(calc(-50% - 6px));
  }
}

.party-lineup {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 12px;
}

.party-lineup img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  animation: party-idle 4.8s ease-in-out infinite;
}

.party-lineup img:nth-child(2) {
  animation-delay: -1.1s;
}
.party-lineup img:nth-child(3) {
  animation-delay: -2.2s;
}
.party-lineup img:nth-child(4) {
  animation-delay: -3.3s;
}

/* —— Layout —— */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 16px 40px;
  align-items: start;
}

.ad-rail {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  padding-top: 8px;
}

.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  position: relative;
  overflow: hidden;
}

.ad-slot::after {
  content: 'Ad space — connect AdSense';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  background: rgba(31, 31, 35, 0.92);
}

.ad-slot.ads-live::after {
  display: none;
}

.ad-label {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  z-index: 2;
}

.ad-vertical {
  min-height: 600px;
}

.ad-between {
  display: none; /* Multiplex is full-width only; kept for backwards CSS hooks */
}

.ad-footer {
  margin-top: 32px;
  min-height: 120px;
  width: 100%;
  max-width: 100%;
  isolation: isolate;
  contain: layout style;
}

.main {
  min-width: 0;
}

.section {
  margin-bottom: 40px;
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--purple);
  margin-bottom: 10px;
  text-align: center;
}

.section-lead {
  text-align: center;
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 15px;
}

/* —— Form —— */
.meal-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

/* —— Ingredient wizard —— */
.meal-wizard {
  overflow: hidden;
}

.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.wizard-progress span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.25s ease;
}

.wizard-progress span.is-done,
.wizard-progress span.is-active {
  background: var(--purple);
}

.wizard-progress span.is-active {
  box-shadow: 0 0 0 1px rgba(145, 70, 255, 0.35);
}

.wizard-viewport {
  overflow: hidden;
  width: 100%;
}

.wizard-track {
  display: flex;
  width: 500%;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.wizard-pane {
  width: 20%;
  flex-shrink: 0;
  padding-right: 4px;
  box-sizing: border-box;
}

.wizard-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}

.wizard-lead {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 14px;
}

.toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px;
  margin-bottom: 4px;
}

.toggle-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.toggle-chip:hover {
  border-color: var(--purple);
}

.toggle-chip.is-on {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(145, 70, 255, 0.45);
}

.toggle-chip:active {
  transform: scale(0.97);
}

.wizard-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.wizard-nav-spacer {
  flex: 1;
}

.wizard-picked {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .toggle-grid {
    max-height: 240px;
  }
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 20px;
  min-height: 140px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--purple);
  background: var(--purple-dim);
}

.upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.upload-prompt .hint,
.hint {
  font-size: 13px;
  color: var(--muted);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-deep);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 400;
}

.field input:focus,
.field select:focus,
.chip-add input:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
  border-color: var(--purple);
}

.ingredients-block {
  margin-bottom: 12px;
}

.ingredients-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.ingredients-header label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  margin: 10px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-dim);
  border: 1px solid rgba(145, 71, 255, 0.35);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.chip button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.chip button:hover {
  color: var(--danger);
}

.chip-add {
  display: flex;
  gap: 8px;
}

.chip-add input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--purple);
  color: var(--purple-soft);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.secondary-btn:hover {
  background: var(--purple-dim);
  color: #fff;
}

/* —— Results —— */
.results-header {
  text-align: center;
  margin-bottom: 20px;
}

.results-header .secondary-btn {
  margin-top: 8px;
}

.kitchen-summary {
  max-width: 720px;
  margin: 0 auto 16px;
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(145, 71, 255, 0.35);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
}

.kitchen-summary strong {
  color: var(--purple-soft);
}

.kitchen-summary p {
  margin-bottom: 6px;
}

.kitchen-tips {
  margin: 8px 0 0 18px;
  color: var(--text);
  font-size: 13px;
}

.recipe-tip {
  font-size: 13px;
  color: var(--purple-soft) !important;
  border-left: 3px solid var(--purple);
  padding-left: 10px;
  margin-top: 8px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.col-title {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

.col-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s, transform 0.15s;
}

.recipe-card:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
}

.recipe-card h4 {
  font-size: 16px;
  margin-bottom: 6px;
  color: #fff;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-deep);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge.health {
  color: var(--ok);
  border-color: rgba(0, 199, 79, 0.35);
}

.badge.budget {
  color: #ffb84d;
  border-color: rgba(255, 184, 77, 0.35);
}

.badge.sheet-pan {
  color: #ffb84d;
  border-color: rgba(255, 184, 77, 0.35);
}

.badge.source {
  color: var(--purple-soft);
  border-color: rgba(145, 71, 255, 0.35);
}

.recipe-portions {
  color: var(--muted);
  font-size: 0.92rem;
}

.recipe-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.recipe-card ul {
  margin: 0 0 12px 18px;
  font-size: 13px;
  color: var(--text);
}

.recipe-card li {
  margin-bottom: 4px;
}

.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.recipe-link {
  font-size: 13px;
  font-weight: 600;
}

.recipe-thumb {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 140px !important;
  max-height: 140px;
  object-fit: cover !important;
  object-position: center;
  border-radius: 6px;
  margin-bottom: 10px;
  background: var(--bg-deep);
}

.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* —— History —— */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.history-item h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.history-item .meta {
  font-size: 12px;
  color: var(--muted);
}

/* —— Modal —— */
.modal[hidden],
[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--purple);
  border-radius: 12px;
  padding: 28px 24px 24px;
  width: min(400px, 100%);
  z-index: 1;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.modal-panel h2 {
  font-size: 20px;
  margin-bottom: 6px;
  color: #fff;
}

.modal-lead {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-deep);
  border-radius: 6px;
  padding: 4px;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}

.social-btn:hover:not(:disabled) {
  border-color: var(--purple);
  background: var(--purple-dim);
}

.social-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.social-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  color: #111;
}

.social-twitch .social-icon {
  background: #9146ff;
  color: #fff;
}

.social-github .social-icon {
  background: #24292f;
  color: #fff;
}

.social-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
  margin-top: 4px;
}

.google-btn-host {
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 13px;
}

.auth-tab.active {
  background: var(--purple);
  color: #fff;
}

.auth-form .field {
  margin-bottom: 12px;
}

.form-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-bottom: 10px;
}

/* —— Loading / toast / footer —— */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.65);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-card {
  background: var(--surface);
  border: 1px solid var(--purple);
  border-radius: 12px;
  padding: 28px 36px;
  text-align: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--purple);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 8px;
  z-index: 4000;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-width: min(90vw, 420px);
  text-align: center;
}

.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .party-sprite,
  .party-lineup img {
    animation: none;
  }

  .party-sprite {
    transform: translateY(-50%);
  }
}

/* —— Responsive —— */
@media (max-width: 1100px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .ad-rail {
    display: none;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .ad-between {
    max-width: 100%;
    min-height: 120px;
  }
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .navbar-left .nav-desktop {
    display: none;
  }

  .party-sprite {
    width: 88px;
    opacity: 0.7;
  }

  .party-sprite-left.party-sprite-front {
    left: calc(50% - 220px);
  }

  .party-sprite-right.party-sprite-front {
    left: calc(50% + 130px);
  }

  .party-sprite-back {
    display: none;
  }

  .hero-content {
    padding: 0 96px;
  }

  .hero-sub {
    max-width: 420px;
  }

  .party-lineup img {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 9px;
  }

  .meal-form {
    padding: 16px;
  }

  .login-callout {
    right: -8px;
  }
}
