/* Post AGI Vibes — a pint of ice cream as a website.
   Flat fills, thick ink outlines, hard offset shadows, clouds, hills, cows. */

:root {
  --sky: #9ED5F0; --sky-deep: #79C1E6; --cloud: #FFFFFF;
  --paper: #FFF9E8; --paper-2: #F3EAD2;
  --ink: #1F1A17; --ink-soft: #5B5049; --cream: #F6EFDD;
  --wm-fill: #FFF9E8;
  --grass: #5FB24A; --hill: #3E8F3A; --hill-deep: #2F6E2E; --on-grass: #1F1A17;
  --tomato: #E4452B; --tomato-deep: #B9331D; --on-tomato: #F6EFDD;
  --sun: #FFCF3F; --on-sun: #1F1A17;
  --moon: 0;
  --display: 'Chewy', 'Arial Black', Impact, sans-serif;
  --body: 'Fredoka', 'Trebuchet MS', sans-serif;
  --hand: 'Gloria Hallelujah', 'Comic Sans MS', cursive;
  --tilt: 0deg;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #0E1C2B; --sky-deep: #0A1522; --cloud: #2B3A4C;
    --paper: #22201C; --paper-2: #2C2924;
    --ink: #F6EFDD; --ink-soft: #C9BFAF; --cream: #F6EFDD;
    --wm-fill: #0E1C2B;
    --grass: #2A6B36; --hill: #1F4A2A; --hill-deep: #163A20; --on-grass: #F6EFDD;
    --tomato: #F0603F; --tomato-deep: #C24A2C; --on-tomato: #F6EFDD;
    --sun: #F6EFDD; --on-sun: #1F1A17;
    --moon: 1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky: #0E1C2B; --sky-deep: #0A1522; --cloud: #2B3A4C;
  --paper: #22201C; --paper-2: #2C2924;
  --ink: #F6EFDD; --ink-soft: #C9BFAF; --cream: #F6EFDD;
  --wm-fill: #0E1C2B;
  --grass: #2A6B36; --hill: #1F4A2A; --hill-deep: #163A20; --on-grass: #F6EFDD;
  --tomato: #F0603F; --tomato-deep: #C24A2C; --on-tomato: #F6EFDD;
  --sun: #F6EFDD; --on-sun: #1F1A17;
  --moon: 1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--sky); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.45;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.outlined {
  color: var(--wm-fill);
  text-shadow:
    -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink),
    0 -2px 0 var(--ink), 0 2px 0 var(--ink), -2px 0 0 var(--ink), 2px 0 0 var(--ink),
    5px 6px 0 var(--ink);
}

/* ---------- buttons & lids ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .02em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active, .btn.is-down { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-tomato { background: var(--tomato); color: var(--on-tomato); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.lid {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--fl, var(--paper)); color: var(--fl-fg, var(--ink));
  font-family: var(--display); font-size: 15px; letter-spacing: .02em;
  cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.lid:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.lid[aria-pressed="true"], .lid[aria-checked="true"] {
  transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink);
  outline: 3px solid var(--ink); outline-offset: 2px;
}
.chunk { flex: none; }

.seg {
  display: inline-flex; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden;
  background: var(--paper); box-shadow: 3px 3px 0 var(--ink);
}
.seg button {
  border: 0; background: transparent; padding: 8px 14px; cursor: pointer;
  font-family: var(--display); font-size: 15px; color: var(--ink);
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 6;
  display: flex; align-items: center; gap: 20px; padding: 16px 24px 6px;
  max-width: 1280px; margin: 0 auto;
}
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.wordmark {
  font-family: var(--display); font-size: 40px; text-transform: uppercase; letter-spacing: .02em;
  transform: rotate(-2deg); display: inline-block; transform-origin: left center;
}
.tagline { font-family: var(--hand); font-size: 14px; margin: 8px 0 0 2px; color: var(--ink); }
.seal { margin-left: auto; width: 92px; height: 92px; flex: none; }
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal .ring { transform-origin: 50px 50px; animation: spin 40s linear infinite; }
@media (max-width: 640px) {
  .seal { display: none; }
  .wordmark { font-size: 28px; }
  .topbar { padding: 12px 16px 4px; gap: 12px; }
  .topbar .btn { margin-left: auto; font-size: 16px; padding: 8px 14px; }
}

/* ---------- hero scene ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 24px 24px 0; }
.hero-grid {
  position: relative; z-index: 4; max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center;
  padding: 10px 0 190px;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; padding-bottom: 200px; } }
.eyebrow { font-family: var(--hand); font-size: 16px; margin: 0 0 12px; transform: rotate(-1deg); display: inline-block; }
.ribbon {
  position: relative; display: inline-block; margin: 0;
  font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.05;
  background: var(--tomato); color: var(--on-tomato);
  padding: .18em .55em .22em; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-1.5deg); text-wrap: balance; max-width: 12ch;
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; bottom: -22px; width: 26px; height: 26px;
  background: var(--tomato-deep); border: 3px solid var(--ink); z-index: -1;
}
.ribbon::before { left: -14px; transform: skewY(20deg); }
.ribbon::after { right: -14px; transform: skewY(-20deg); }
.sub { font-size: 21px; font-weight: 500; max-width: 30ch; margin: 26px 0 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.credit { font-family: var(--hand); font-size: 14px; margin: 18px 0 0; color: var(--ink-soft); }
.credit a { color: inherit; }

.tv {
  position: relative; aspect-ratio: 16 / 9; background: #1F1A17;
  border: 4px solid var(--ink); border-radius: 8px; box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(1.5deg);
}
.tv iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 3px; }
.tv-label {
  position: absolute; left: -12px; bottom: -20px; z-index: 2;
  background: var(--sun); color: var(--on-sun); border: 3px solid var(--ink);
  padding: 4px 12px; font-family: var(--display); font-size: 14px; letter-spacing: .08em;
  transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--ink);
}

.sun { position: absolute; top: 12px; right: 6%; width: 150px; z-index: 1; pointer-events: none; }
.sun .rays { transform-origin: 60px 60px; animation: spin 60s linear infinite; opacity: calc(1 - var(--moon)); }
@media (max-width: 900px) { .sun { width: 96px; right: 4%; top: 6px; } }

.cloud { position: absolute; z-index: 1; width: 170px; pointer-events: none; animation: drift linear infinite; }
.cloud-a { top: 30px; left: 6%; animation-duration: 150s; animation-delay: -20s; }
.cloud-b { top: 110px; left: 40%; width: 120px; animation-duration: 190s; animation-delay: -110s; }
.cloud-c { top: 20px; left: 70%; width: 140px; animation-duration: 170s; animation-delay: -60s; }
.cloud-d { top: 260px; left: 85%; width: 100px; animation-duration: 210s; animation-delay: -150s; }
@media (max-width: 900px) {
  .cloud-b, .cloud-d { display: none; }
  .cloud-a { top: 0; left: 30%; width: 100px; }
  .cloud-c { top: 4px; left: 62%; width: 80px; }
}

.hills { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; z-index: 2; pointer-events: none; }
.hill { position: absolute; border-radius: 50% 50% 0 0 / 100% 100% 0 0; border: 4px solid var(--ink); border-bottom: 0; }
.hill-3 { left: 18%; width: 90%; height: 150px; bottom: 10px; background: var(--hill-deep); }
.hill-2 { right: -18%; width: 80%; height: 210px; bottom: 0; background: var(--hill); }
.hill-1 { left: -14%; width: 72%; height: 170px; bottom: -6px; background: var(--grass); }
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: var(--grass); border-top: 4px solid var(--ink); z-index: 3; }

.critter { position: absolute; z-index: 5; pointer-events: none; }
.cow { width: 160px; left: 12%; bottom: 44px; }
.goat { width: 110px; right: 10%; bottom: 44px; }
@media (max-width: 900px) { .cow { width: 120px; left: 4%; } .goat { width: 84px; right: 4%; } }
.moo {
  position: absolute; z-index: 6; left: calc(12% + 130px); bottom: 150px;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px;
  padding: 6px 14px; font-family: var(--display); font-size: 16px; box-shadow: 3px 3px 0 var(--ink);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) .6s both; pointer-events: none;
}
.moo::after {
  content: ""; position: absolute; left: 10px; bottom: -13px; width: 14px; height: 14px;
  background: var(--paper); border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: skewX(30deg) rotate(45deg);
}
@media (max-width: 900px) { .moo { left: calc(4% + 96px); bottom: 124px; } }

/* ---------- flavors strip ---------- */
.flavors {
  position: sticky; top: 0; z-index: 20; background: var(--sky);
  border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); padding: 10px 24px 6px;
}
.flavors-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 10px; scrollbar-width: none; flex: 1; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.tools { display: flex; gap: 10px; flex: none; align-items: center; }
.flavor-note { max-width: 1240px; margin: 0 auto; font-family: var(--hand); font-size: 14px; min-height: 22px; color: var(--ink-soft); padding: 0 4px 2px; }
@media (max-width: 760px) {
  .flavors { padding: 8px 12px 4px; }
  .flavors-inner { flex-wrap: wrap; gap: 8px; }
  .tools { width: 100%; justify-content: space-between; padding-bottom: 6px; }
}

/* ---------- the board ---------- */
.board-wrap { max-width: 1240px; margin: 0 auto; padding: 30px 24px 70px; }
.board-stat { font-family: var(--hand); font-size: 16px; margin: 0 0 22px; text-align: center; }
.board-stat b { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .02em; }
.board { columns: 1; column-gap: 24px; }
@media (min-width: 600px) { .board { columns: 2; } }
@media (min-width: 900px) { .board { columns: 3; } }
@media (min-width: 1240px) { .board { columns: 4; } }
.empty { text-align: center; font-family: var(--hand); font-size: 18px; padding: 40px 0; }

.vibe {
  display: inline-block; width: 100%; break-inside: avoid; margin: 0 0 28px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: 6px 6px 0 var(--ink); transform: rotate(var(--tilt));
  transition: transform .15s ease; position: relative; overflow: hidden;
}
.vibe:hover { transform: rotate(0deg) translateY(-2px); }
.vibe.fresh { animation: drop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.vibe-band {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--fl); color: var(--fl-fg); border-bottom: 3px solid var(--ink);
  font-family: var(--display); font-size: 13px; text-transform: uppercase; letter-spacing: .09em;
}
.vibe-band .chunk { flex: none; }
.vibe-band .band-tag { margin-left: auto; font-family: var(--hand); text-transform: none; letter-spacing: 0; font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.vibe-photo { border-bottom: 3px solid var(--ink); background: var(--paper-2); }
.vibe-photo img { width: 100%; height: auto; cursor: zoom-in; }
.vibe-body { padding: 14px 14px 10px; position: relative; }
.vibe.no-photo .vibe-body { background: color-mix(in srgb, var(--fl) 18%, var(--paper)); padding-top: 22px; padding-bottom: 14px; }
.vibe-mark { position: absolute; right: 10px; bottom: 6px; opacity: .16; pointer-events: none; }
.vibe-text { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; cursor: pointer; position: relative; }
.vibe.no-photo .vibe-text { font-size: 20px; }
.vibe-by { margin: 8px 0 0; font-family: var(--hand); font-size: 14px; color: var(--ink-soft); position: relative; }
.vibe-actions { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; flex-wrap: wrap; }
.same { position: relative; }
.same[aria-pressed="true"] { background: var(--tomato); color: var(--on-tomato); }
.same.bump { animation: squash .35s ease-out; }
.same .n { font-family: var(--display); }
.share-btn { margin-left: auto; }
.hide-btn { display: none; border-style: dashed; }
body.mod .hide-btn { display: inline-flex; }
.plusone {
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%);
  font-family: var(--display); font-size: 18px; color: var(--tomato);
  animation: floatup .8s ease-out forwards; pointer-events: none;
}

/* picking mode (freezer) */
body.picking .vibe { cursor: pointer; }
body.picking .vibe-actions { pointer-events: none; opacity: .45; }
.vibe.picked { outline: 4px solid var(--tomato); outline-offset: 3px; }
.vibe.picked::after {
  content: "PICKED"; position: absolute; top: 12px; right: -8px; z-index: 3;
  background: var(--tomato); color: var(--on-tomato); font-family: var(--display);
  font-size: 13px; letter-spacing: .1em; padding: 4px 12px; border: 3px solid var(--ink);
  transform: rotate(8deg); box-shadow: 3px 3px 0 var(--ink);
}
.pickbar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  border-radius: 24px; padding: 10px 14px; max-width: calc(100% - 24px);
}
.pickbar .count { font-family: var(--display); font-size: 18px; padding: 0 6px; }

/* moderator bar */
.modbar {
  max-width: 1240px; margin: 16px auto 0; padding: 10px 16px;
  background: var(--sun); color: var(--on-sun); border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink); display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  font-family: var(--display);
}
.modbar .btn { color: var(--on-sun); border-color: #1F1A17; box-shadow: 3px 3px 0 #1F1A17; }
.vibe.is-hidden { opacity: .7; }
.vibe.is-hidden .vibe-band::after { content: "HIDDEN"; margin-left: 8px; }

/* ---------- dialogs ---------- */
dialog {
  border: 4px solid var(--ink); background: var(--paper); color: var(--ink);
  border-radius: 16px; box-shadow: 10px 10px 0 var(--ink); padding: 0;
  width: min(580px, calc(100% - 28px)); max-height: calc(100vh - 40px); overflow: auto;
}
dialog.wide { width: min(720px, calc(100% - 28px)); }
dialog::backdrop { background: rgba(31, 26, 23, .55); }
dialog[open] { animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.dlg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 3px solid var(--ink); background: var(--sun); color: var(--on-sun);
  position: sticky; top: 0; z-index: 2;
}
.dlg-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; }
.dlg-body { padding: 18px; }
.x {
  border: 3px solid #1F1A17; background: var(--paper); color: var(--ink); border-radius: 50%;
  width: 38px; height: 38px; font-family: var(--display); font-size: 20px; line-height: 1;
  cursor: pointer; box-shadow: 3px 3px 0 #1F1A17; flex: none;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .field > .label { font-family: var(--display); font-size: 17px; letter-spacing: .02em; }
.hint { font-family: var(--hand); font-size: 13px; color: var(--ink-soft); font-weight: 400; }
textarea, input[type="text"] {
  font: inherit; font-size: 17px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink); width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
.counter { align-self: flex-end; font-family: var(--display); font-size: 14px; }
.counter.over { color: var(--tomato); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-grid .lid { font-size: 14px; padding: 6px 12px; }
.file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preview { width: 88px; height: 88px; object-fit: cover; border: 3px solid var(--ink); border-radius: 8px; display: none; }
.preview.on { display: block; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.form-error { font-family: var(--hand); color: var(--tomato); min-height: 20px; }
.cooldown { font-family: var(--hand); font-size: 13px; color: var(--ink-soft); margin-right: auto; }

.spot .vibe { transform: none; box-shadow: none; margin: 0; }
.spot .vibe:hover { transform: none; }
.spot .vibe-text { font-size: 24px; cursor: default; }
.spot .vibe-actions { display: none; }
.spot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.melted { text-align: center; font-family: var(--hand); font-size: 18px; padding: 30px 10px; }

.share-stage { margin: 14px 0; }
.share-preview {
  width: 100%; max-height: 62vh; object-fit: contain; border: 3px solid var(--ink); border-radius: 10px;
  background: var(--paper-2); min-height: 200px;
}
.share-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.share-actions .btn { font-size: 16px; padding: 10px 12px; }
.share-caption { font-family: var(--hand); font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--tomato); color: var(--on-tomato); border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink); border-radius: 999px; padding: 10px 24px;
  font-family: var(--display); font-size: 20px; transition: transform .25s ease, opacity .25s ease;
  pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.footer { background: var(--grass); color: var(--on-grass); border-top: 4px solid var(--ink); padding: 44px 24px 64px; position: relative; overflow: hidden; }
.mission {
  max-width: 720px; margin: 0 auto; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); border-radius: 18px;
  padding: 24px 28px; transform: rotate(-.6deg);
}
.mission h2 { font-family: var(--display); font-weight: 400; margin: 0 0 12px; font-size: 28px; }
.mission dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 17px; }
.mission dt { font-family: var(--display); letter-spacing: .04em; text-transform: uppercase; font-size: 15px; padding-top: 3px; }
.mission dd { margin: 0; }
.footer-lines { max-width: 720px; margin: 26px auto 0; font-family: var(--hand); font-size: 14px; text-align: center; display: grid; gap: 6px; }
.footer-lines a { color: inherit; }

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(30vw); } to { transform: translateX(-140vw); } }
@keyframes drop {
  0% { transform: translateY(-16px) rotate(var(--tilt)); opacity: 0; }
  60% { transform: translateY(4px) rotate(calc(var(--tilt) + 2deg)); opacity: 1; }
  100% { transform: translateY(0) rotate(var(--tilt)); opacity: 1; }
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -30px); } }
@keyframes squash { 0% { transform: scale(1); } 40% { transform: scale(1.18, .82); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cloud { transform: none !important; }
}
