* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Scope error page styling to avoid affecting global layout */
.error-page {
  background-color: #ffffff;
  color: #111827;
  line-height: 1.6;
}

.error-container {
  max-width: 1280px;
  width: 100%;
  display: flex;
  gap: 2.25rem; /* 36px (was 48px) */
  align-items: center; /* vertically center columns */
  margin: 48px auto; /* was 64px */
  padding: 0 18px; /* was 24px */
  min-height: 70vh; /* ensure vertical centering visible */
}
@media (min-width: 1280px) {
  .error-container { gap: 3.75rem; } /* 60px (was 80px) */
}
@media (min-width: 1024px) {
  .left-column { flex: 0 0 45%; max-width: 45%; }
  .right-column { flex: 0 0 55%; max-width: 55%; }
}

/* Left Column */
.left-column {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* 24px (was 32px) */
}

/* Queen Container */
.queen-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.desktop-queen {
  max-width: 21rem; /* 336px (was 448px) */
  width: 100%;
}

.mobile-queen {
  flex-shrink: 0;
}

.queen-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Fun Quiz Section (desktop only) */
.fun-quiz-section {
  background: #fef3c7; /* solid amber (top-left of prior gradient) */
  border: none; /* remove border */
  border-radius: 0.75rem; /* 12px */
  padding: 1.125rem; /* 18px (was 24px) */
  display: inline-flex; /* shrink to content to help single-line */
  align-items: center;
  gap: 0.5rem; /* 8px */
  white-space: nowrap; /* keep on one line */
}

.fun-quiz-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600; /* semibold */
  font-size: 0.875rem; /* 14px (was 18px) */
  color: #92400e;
  margin: 0; /* remove bottom margin */
  white-space: nowrap; /* keep label on one line */
}

/* hide icon */
.quiz-icon { display: none; }

.fun-quiz-text {
  font-size: 0.875rem; /* 14px (was 18px) */
  color: #78350f;
  font-style: italic;
  line-height: 1.5; /* slightly tighter */
  margin: 0;
  white-space: nowrap; /* keep body on one line */
}

/* Right Column */
.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0; /* remove global gap to allow fine control */
}
.right-column > * { margin-bottom: 1rem; }
.right-column > *:last-child { margin-bottom: 0; }

/* Small error badge above title */
.error-badge {
  display: inline-block;
  align-self: flex-start;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 9999px;
  padding: 6px 12px; /* desktop downscaled (was 8px 16px) */
  font-size: 12px; /* was 14px */
  font-weight: 600; /* semibold */
}
@media (max-width: 1023px) {
  .error-badge { padding: 5px 10px; font-size: 10px; }
}

/* Error Title */
.error-title {
  font-size: 2.25rem; /* 36px (was 48px) */
  font-weight: 700; /* bold */
  color: #111827;
  line-height: 1.25; /* tight */
  letter-spacing: -0.025em; /* tight */
  margin-bottom: 0;
}
@media (min-width: 1024px) { .error-title { font-size: 2.8125rem; } } /* 45px (was 60px) */
@media (min-width: 1280px) { .error-title { font-size: 3.375rem; } } /* 54px (was 72px) */

/* Mini Story */
.mini-story {
  background: #fde7f3;
  border-left: 4px solid #f9a8d4; /* pink-400 */
  border-radius: 0 12px 12px 0; /* reduced */
  padding: 1.5rem; /* 24px (was 32px) */
  box-shadow: 0 1px 0 rgba(0,0,0,0.04) inset;
  overflow: hidden; /* prevent child margin collapse */
}
.mini-story p {
  font-size: 0.9375rem; /* default; will be overridden by desktop rule below */
  font-weight: 500; /* medium */
  color: #831843; /* pink-900 */
  line-height: 1.6;
  margin: 0 !important; /* override reboot.scss p margin */
}
@media (min-width: 1024px) { .mini-story p { font-size: 1.125rem; } } /* 18px */

/* Why Section */
.why-section {
  background: transparent; /* remove bg */
  border: none; /* remove border */
  border-radius: 0;
  padding: 0.75rem; /* a bit tighter */
  margin-top: 1rem; /* space from mini-story on all breakpoints */
}
.why-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem; /* much closer to body */
}
/* hide the info icon */
.info-icon { display: none; }
.why-header h3 { font-size: 0.9375rem; font-weight: 600; color: #111827; margin: 0; } /* remove default margins */
.why-text { font-size: 0.875rem; color: #4b5563; line-height: 1.6; } /* 14px */

/* Center mobile error badge */
.mobile-header .error-badge { display: inline-block; margin: 0 auto 0.5rem auto; }

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem; /* 12px (was 16px) */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* 8px */
  padding: 0.75rem 1.5rem; /* 12px 24px (was 16px 32px) */
  font-size: 0.875rem; /* 14px (was 18px) */
  font-weight: 600; /* semibold */
  border-radius: 9999px; /* pill */
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid;
  cursor: pointer;
}

.btn-primary {
  background: #ec4899;
  color: white;
  border-color: #ec4899;
}
.btn-primary:hover {
  background: #db2777;
  border-color: #db2777;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(236, 72, 153, 0.25);
}

.btn-secondary {
  background: white;
  color: #ec4899;
  border-color: #ec4899;
}
.btn-secondary:hover {
  background: #fdf2f8;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(236, 72, 153, 0.15);
}

/* Responsive Utilities */
.desktop-only { display: block; }
.mobile-only { display: none; }
.mobile-header { display: none; }

/* Mobile Styles */
@media (max-width: 1023px) {
  .error-container { flex-direction: column; gap: 1.5rem; }
  .left-column { width: 100%; }
  .mobile-header { display: flex; flex-direction: column; gap: 1.125rem; align-items: center; }
  .mobile-title-section { flex: none; text-align: center; }
  .mobile-only.error-title { text-align: center; }
  .mobile-queen { order: 1; margin: 0 auto; width: 13.5rem; height: 13.5rem; flex-shrink: 0; }
  .desktop-queen, .fun-quiz-section.desktop-only, .why-section.desktop-only { display: none; }
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  .error-title { font-size: 1.125rem; margin-bottom: 0; } /* 18px */
  .mini-story p { font-size: 0.9375rem; }
  .mini-story { margin-bottom: 1rem !important; } /* add space under mini-story on mobile */
  .action-buttons { flex-direction: column; }
  .btn { width: 100%; }
}

@media (max-width: 640px) {
  .error-title { font-size: 1.125rem; }
  .mobile-queen { width: 10.5rem; height: 10.5rem; }
  .mini-story { padding: 1.125rem; }
  .mini-story p { font-size: 0.875rem; }
}


