/* ============ Scratch on the Break ============ */

:root {
  --felt-dark: #082818;
  --felt: #0c3521;
  --felt-light: #14532f;
  --chalk: #eef4ee;
  --chalk-dim: #b9ccbf;
  --cue-blue: #5db6e8;
  --cream: #f3efe4;
  --ink: #14181a;
  --danger: #e86a5d;
  --gold: #e8c95d;
  --card-bg: rgba(0, 0, 0, 0.30);
  --card-border: rgba(255, 255, 255, 0.10);
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--chalk);
  background-color: var(--felt);
  background-image:
    radial-gradient(ellipse 120% 90% at 50% -10%, var(--felt-light) 0%, var(--felt) 55%, var(--felt-dark) 100%);
  background-repeat: no-repeat;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(16px, 4vw, 40px) 16px 24px;
  line-height: 1.5;
}

/* ---------- header ---------- */

.site-header { margin-bottom: clamp(18px, 4vw, 34px); }

.logo-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-block;
}

.logo-ball {
  display: block;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
  animation: float 4.5s ease-in-out infinite;
  transition: transform 0.15s ease;
}

.logo-btn:active .logo-ball { transform: scale(0.92); }

.logo-ball.shaking { animation: shake 0.5s ease; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-6px) rotate(-8deg); }
  40% { transform: translateX(6px) rotate(8deg); }
  60% { transform: translateX(-4px) rotate(-5deg); }
  80% { transform: translateX(4px) rotate(5deg); }
}

.magic-bubble {
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translate(-50%, 100%) scale(0.8);
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  padding: 8px 14px;
  border-radius: 14px;
  width: max-content;
  max-width: min(260px, 80vw);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.magic-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--cream);
}

.magic-bubble.show {
  opacity: 1;
  transform: translate(-50%, 100%) scale(1);
}

.wordmark {
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-top: 10px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.wordmark-thin {
  font-weight: 300;
  color: var(--chalk-dim);
}

.tagline {
  font-size: 14px;
  color: var(--chalk-dim);
  font-style: italic;
  margin-top: 2px;
}

.rail-diamonds {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 16px;
}

.rail-diamonds span {
  width: 8px;
  height: 8px;
  background: var(--cream);
  opacity: 0.55;
  transform: rotate(45deg);
  border-radius: 2px;
}

/* ---------- main / cards ---------- */

main {
  width: 100%;
  max-width: 680px;
  flex: 1;
}

.view { animation: fadeUp 0.35s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 40px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.card p { margin-bottom: 16px; font-size: clamp(16px, 2.4vw, 18px); }
.card p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(18px, 2.8vw, 21px) !important; }

.step-label {
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--chalk-dim);
  margin: 22px 0 6px !important;
}

.question {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}

.question em { color: var(--cue-blue); font-style: normal; }

.verdict {
  display: inline-block;
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 900;
  letter-spacing: 1px;
  padding: 6px 18px;
  border: 4px solid currentColor;
  border-radius: 10px;
  transform: rotate(-2deg);
  margin-bottom: 22px !important;
  animation: stamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  animation-delay: 0.15s;
}

@keyframes stamp {
  from { opacity: 0; transform: rotate(-2deg) scale(1.7); }
  to   { opacity: 1; transform: rotate(-2deg) scale(1); }
}

.verdict-good  { color: var(--cue-blue); }
.verdict-maybe { color: var(--gold); }
.verdict-shrug { color: var(--danger); }

/* ---------- buttons ---------- */

.button-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  background: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 14px 46px;
  min-width: 130px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { background: #ffffff; transform: translateY(-2px); box-shadow: 0 7px 0 rgba(0, 0, 0, 0.35); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }

.btn-share { background: var(--cue-blue); color: var(--ink); }
.btn-share:hover { background: #79c6ef; }

.btn-quiet {
  background: transparent;
  color: var(--chalk);
  border: 2px solid var(--card-border);
  box-shadow: none;
}
.btn-quiet:hover { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
.btn-quiet:active { transform: translateY(1px); }

/* ---------- receipts ---------- */

.receipts {
  margin-top: 34px;
  text-align: left;
}

.receipts-title {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 900;
  text-align: center;
}

.receipts-sub {
  text-align: center;
  color: var(--chalk-dim);
  margin: 4px 0 20px;
  font-size: 15px;
}

.receipt {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 5px solid var(--cue-blue);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.receipt h4 { font-size: 19px; font-weight: 800; }

.org-full { font-weight: 400; color: var(--chalk-dim); font-size: 15px; }

.org-note {
  font-size: 13px;
  color: var(--chalk-dim);
  font-style: italic;
  margin: 2px 0 10px;
}

.receipt p { font-size: 15px; margin-bottom: 10px; }

.receipt-link {
  display: inline-block;
  color: var(--cue-blue);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  margin-right: 18px;
  margin-top: 2px;
}

.receipt-link:hover { text-decoration: underline; }

/* ---------- footer ---------- */

.site-footer { margin-top: 40px; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--cue-blue);
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 4px; /* bigger tap target */
}

.footer-links a:hover { text-decoration: underline; }

.copyright { font-size: 13px; color: var(--chalk-dim); }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 40px);
  z-index: 10;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small screens ---------- */

@media (max-width: 420px) {
  .button-bar { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .rail-diamonds { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-ball, .view, .verdict { animation: none; }
}
