:root {
  --bg: #160c05;
  --bg2: #241304;
  --panel: #2a1708;
  --line: #4a2c12;
  --bun: #f0b45c;
  --bun-light: #f6c877;
  --cream: #f7ead2;
  --muted: #c9a97e;
  --dark: #1c0f05;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Rubik', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 70% -10%, #3a2008 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 40%, #2b1808 0%, transparent 55%),
    var(--bg);
  color: var(--cream);
  overflow-x: hidden;
  line-height: 1.55;
}

h1, h2, .brand, .marquee, .sticker, .step-num, .lore-card figcaption {
  font-family: 'Titan One', cursive;
  font-weight: 400;
}

a { color: var(--bun-light); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem clamp(1rem, 4vw, 3rem);
  background: rgba(22, 12, 5, 0.95);
  border-bottom: 2px solid var(--line);
}
.brand { font-size: 1.5rem; color: var(--bun-light); text-decoration: none; }
.nav-links { display: flex; gap: 1.25rem; margin-left: auto; }
.nav-links a { color: var(--cream); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--bun-light); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--bun);
  color: var(--dark);
  border: 3px solid var(--dark);
  border-radius: 14px;
  padding: 0.75rem 1.3rem;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--dark);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--dark); }
.btn-ghost {
  background: transparent;
  color: var(--bun-light);
  border-color: var(--bun);
  box-shadow: 0 5px 0 rgba(240, 180, 92, 0.3);
}
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  max-width: 1150px;
  margin: 0 auto;
  padding: 4rem clamp(1rem, 4vw, 3rem) 5rem;
}
.badge {
  display: inline-block;
  border: 2px solid var(--bun);
  color: var(--bun-light);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
h1 {
  font-size: clamp(4rem, 10vw, 7.5rem);
  line-height: 0.95;
  color: var(--bun);
  text-shadow: 4px 4px 0 var(--dark), 8px 8px 0 rgba(0, 0, 0, 0.35);
  letter-spacing: 0.02em;
}
.tagline { font-size: 1.35rem; margin-top: 1rem; }
.tagline span { color: var(--bun-light); font-weight: 700; }

.ca-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--dark);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  margin: 1.5rem 0 1.2rem;
  max-width: 560px;
}
.ca-label {
  font-weight: 700;
  color: var(--bun);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.ca-box code {
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--cream);
}
.copy-btn {
  flex-shrink: 0;
  background: var(--bun);
  color: var(--dark);
  border: none;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.copy-btn:hover { background: var(--bun-light); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.2rem; }

.hero-img { position: relative; justify-self: center; }
.hero-img img {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 24px;
  border: 4px solid var(--line);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}
.sticker {
  position: absolute;
  bottom: -18px;
  left: -14px;
  background: var(--bun);
  color: var(--dark);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 3px solid var(--dark);
  transform: rotate(-4deg);
  font-size: 1rem;
  box-shadow: 0 6px 0 var(--dark);
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--bun);
  color: var(--dark);
  transform: rotate(-1.2deg) scale(1.02);
  border-top: 3px solid var(--dark);
  border-bottom: 3px solid var(--dark);
  padding: 0.55rem 0;
}
.marquee-track {
  display: flex;
  gap: 2.2rem;
  white-space: nowrap;
  width: max-content;
  font-size: 1.25rem;
  animation: marquee 36s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem clamp(1rem, 4vw, 3rem);
}
h2 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--bun);
  text-shadow: 3px 3px 0 var(--dark);
  margin-bottom: 0.4rem;
}
.section-sub { color: var(--muted); margin-bottom: 2.2rem; max-width: 620px; }

/* ---------- my life (timeline) ---------- */
.timeline { display: grid; gap: 1.2rem; max-width: 760px; }
.chapter {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem 1.5rem;
  transform: rotate(-0.6deg);
  transition: transform 0.15s, border-color 0.15s;
}
.chapter:nth-child(2n) { transform: rotate(0.6deg); }
.chapter:hover { transform: rotate(0deg) scale(1.02); border-color: var(--bun); }
.chapter-emoji {
  font-size: 1.9rem;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--bg2);
  border: 3px solid var(--dark);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--dark);
}
.chapter-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bun);
}
.chapter h3 {
  font-family: 'Titan One', cursive;
  font-weight: 400;
  color: var(--bun-light);
  font-size: 1.25rem;
  margin: 0.1rem 0 0.2rem;
}
.chapter p { color: var(--muted); font-size: 0.95rem; }
.chapter-quote { color: var(--cream) !important; font-weight: 700; margin-top: 0.35rem; }

/* ---------- quotes ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.quote-card {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  transform: rotate(-1deg);
  transition: transform 0.15s, border-color 0.15s;
}
.quote-card:nth-child(2n) { transform: rotate(1deg); }
.quote-card:nth-child(3n) { transform: rotate(-0.5deg); }
.quote-card:hover { transform: rotate(0deg) scale(1.03); border-color: var(--bun); }
.quote-card em { color: var(--bun-light); font-style: normal; }
.quote-wide {
  grid-column: 1 / -1;
  text-align: center;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  transform: rotate(0.4deg);
  border-color: var(--bun);
  background: linear-gradient(180deg, #33200d, var(--panel));
}

/* ---------- pfp generator ---------- */
.pfp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.panel {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.dropzone { border-style: dashed; cursor: pointer; }
.dropzone:hover, .dropzone.dragover { border-color: var(--bun); background: #33200d; }
.drop-inner { text-align: center; color: var(--muted); padding: 2rem; }
.drop-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spinner { text-align: center; color: var(--muted); }
.spinner .patty {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  border: 7px solid var(--bun);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pfp-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.6rem;
}
#pfp-note { margin-top: 0.9rem; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- how to buy ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.step {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem;
}
.step-num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--bun);
  color: var(--dark);
  border: 3px solid var(--dark);
  border-radius: 50%;
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
}
.step h3 { color: var(--bun-light); margin-bottom: 0.3rem; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* ---------- burger kitchen ---------- */
.game-wrap {
  position: relative;
  background: var(--bg2);
  border: 3px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
}
.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.hud-item {
  background: var(--dark);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
}
.hud-item strong { color: var(--bun-light); margin-left: 0.35rem; }

.game-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem;
}
.panel-g {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}
.g-label {
  font-family: 'Titan One', cursive;
  font-weight: 400;
  color: var(--bun-light);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.ticket-name {
  font-weight: 700;
  color: var(--bun);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.ticket-list {
  list-style: none;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  min-height: 180px;
  justify-content: flex-end;
}
.ticket-list li {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  background: var(--dark);
}
.ticket-list li.next {
  border-color: var(--bun);
  color: var(--cream);
  background: #33200d;
}
.ticket-list li.done { opacity: 0.4; text-decoration: line-through; }

.stack-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 240px;
  padding-bottom: 0.4rem;
}
.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 2px;
}
.layer {
  position: relative;
  line-height: 0;
  margin-bottom: -12px;
  animation: pop 0.18s;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35));
}
.layer:last-child { margin-bottom: 0; }
@keyframes pop { from { transform: scale(0.55) translateY(-14px); } }
.plate {
  width: 230px;
  height: 14px;
  background: #d9cbb2;
  border: 3px solid var(--dark);
  border-radius: 8px;
  box-shadow: 0 6px 0 var(--dark);
}

.kitchen.shake { animation: shake 0.3s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px) rotate(-0.5deg); }
  75% { transform: translateX(8px) rotate(0.5deg); }
}

.ingredients {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.ing-btn {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--cream);
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--dark);
  transition: transform 0.1s, border-color 0.1s, box-shadow 0.1s;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.ing-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--dark); border-color: var(--bun); }
.ing-emoji { font-size: 1.25rem; }

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 12, 5, 0.9);
  border-radius: 17px;
  text-align: center;
}
.overlay-card { max-width: 440px; padding: 2rem; }
.overlay-card h3 {
  font-family: 'Titan One', cursive;
  font-weight: 400;
  color: var(--bun);
  font-size: 1.8rem;
  text-shadow: 3px 3px 0 var(--dark);
  margin-bottom: 0.7rem;
}
.overlay-card p { color: var(--muted); margin-bottom: 1.3rem; }
.overlay-card strong { color: var(--bun-light); }

/* ---------- meme generator ---------- */
.meme-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
}
.meme-controls { display: grid; gap: 1.1rem; }
.meme-src-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.tmpl-scroller {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.tmpl-arrow {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  background: var(--bun);
  color: var(--dark);
  border: 3px solid var(--dark);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--dark);
  transition: transform 0.1s, opacity 0.15s;
  user-select: none;
}
.tmpl-arrow:hover:not(:disabled) { transform: translateY(1px); }
.tmpl-arrow:disabled { opacity: 0.22; cursor: default; }
.meme-templates {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.35rem 0 0.6rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.tmpl {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 3px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--dark);
  transition: border-color 0.12s, transform 0.12s;
}
.tmpl:hover { border-color: var(--bun); transform: translateY(-2px); }
.tmpl.selected { border-color: var(--bun); box-shadow: 0 0 0 2px var(--bun); }
.tmpl img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meme-label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bun);
}
.meme-label input {
  background: var(--dark);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  color: var(--cream);
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  outline: none;
}
.meme-label input:focus { border-color: var(--bun); }
.meme-label input::placeholder { color: rgba(201, 169, 126, 0.45); }
.meme-actions { justify-content: flex-start; margin-top: 0; }
.meme-panel { padding: 0; min-height: 0; aspect-ratio: 1; }
#meme-canvas { display: block; width: 100%; height: 100%; }

/* ---------- buy cta ---------- */
.buy-cta {
  margin-top: 2.2rem;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
}
.buy-cta .ca-box { margin: 0; width: 100%; max-width: 640px; }
.buy-cta .cta-row { justify-content: center; margin-bottom: 0; }

/* ---------- footer ---------- */
.footer {
  border-top: 2px solid var(--line);
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 3rem;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer .micro { max-width: 560px; margin: 0 auto; }
.footer-fine { margin-top: 0.8rem; }

/* ---------- misc ---------- */
.micro { font-size: 0.85rem; color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bun);
  color: var(--dark);
  border: 3px solid var(--dark);
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 6px 0 var(--dark);
  z-index: 100;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; text-align: center; }
  .hero-text { order: 2; }
  .hero-img { order: 1; max-width: 340px; }
  .ca-box { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .steps, .pfp-grid, .quote-grid, .game-grid, .meme-grid { grid-template-columns: 1fr; }
  .meme-panel { order: -1; }
  .ticket-list { min-height: 0; }
}
