:root {
  --bg: #140b24;
  --bg-2: #1e1235;
  --card: #26173f;
  --card-2: #2f1d4d;
  --line: #3d2763;
  --goo: #8cff3a;
  --goo-dark: #4fc41a;
  --pink: #ff5cc8;
  --purple: #a66bff;
  --text: #f3eaff;
  --muted: #b5a4d4;
  --radius: 22px;
  --head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--body);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .3;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
body::before { width: 520px; height: 520px; top: -160px; left: -160px; background: var(--goo-dark); }
body::after { width: 460px; height: 460px; bottom: -180px; right: -140px; background: var(--pink); animation-delay: -9s; }

@keyframes drift { to { transform: translate(80px, 60px) scale(1.15); } }

h1, h2, h3 { margin: 0 0 .4em; font-family: var(--head); font-weight: 700; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--goo); }
img { display: block; max-width: 100%; }

.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hl { color: var(--goo); }
section { padding: 64px 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.spread { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.spread h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }


/* nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: max(14px, env(safe-area-inset-top)) max(20px, calc((100% - 1140px) / 2)) 14px;
  background: var(--bg-2);
}
/* drippy bottom edge */
.nav::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cpath fill='%231e1235' d='M0 0H120V4C112 4 110 13 104 13S97 4 90 4H62C56 4 56 18 48 18S40 4 33 4H0Z'/%3E%3C/svg%3E") 0 0 / 120px 18px repeat-x;
  pointer-events: none;
}

.logo { color: var(--text); font: 700 1.55rem var(--head); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--goo); }

.nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-links a[aria-current] { color: #10200a; background: var(--goo); }


/* buttons
   main.js adds a .goo layer with drip elements; the svg #goo filter
   merges them with the button background so they look like one blob. */

.btn {
  --c: var(--goo);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85em 1.6em;
  border: 0;
  background: none;
  color: #10200a;
  font: 800 1rem/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn--pink { --c: var(--pink); color: #2a0420; }
.btn--purple { --c: var(--purple); color: #fff; }
.btn--sm { padding: .65em 1.15em; font-size: .9rem; }
.btn--lg { padding: 1em 2.1em; font-size: 1.12rem; }
.btn:focus-visible { outline: 3px dashed var(--c); outline-offset: 6px; }
.btn:disabled { opacity: .6; cursor: wait; }

.btn-label { position: relative; z-index: 2; pointer-events: none; }

.goo { position: absolute; inset: 0; z-index: 1; filter: url(#goo); pointer-events: none; }
.goo::before { content: ""; position: absolute; inset: 0; border-radius: 999px; background: var(--c); transition: transform .25s; }
.goo i {
  position: absolute;
  top: calc(100% - 18px);
  left: var(--x);
  width: var(--s);
  height: var(--s);
  margin-left: calc(var(--s) / -2);
  border-radius: 50%;
  background: var(--c);
}

.btn:is(:hover, :focus-visible) .goo::before { animation: wobble .6s ease-out; }
.btn:is(:hover, :focus-visible) .goo i { animation: drip var(--t) var(--delay) ease-in infinite; }
.btn:active .goo::before { transform: scale(.93, 1.08); }

@keyframes wobble {
  30% { transform: scale(1.08, .9); }
  55% { transform: scale(.96, 1.05); }
  80% { transform: scale(1.02, .98); }
}
@keyframes drip {
  0% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(calc(var(--d) * .6)) scale(.9, 1.2); }
  80% { transform: translateY(var(--d)) scale(.75); opacity: 1; }
  100% { transform: translateY(calc(var(--d) + 22px)) scale(.15); opacity: 0; }
}

.splat { position: fixed; z-index: 9999; width: 400px; height: 520px; filter: url(#goo-splat); pointer-events: none; }
.splat i { position: absolute; left: 200px; top: 200px; border-radius: 50%; background: var(--c); }


/* cards */

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), border-color .3s, box-shadow .3s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--goo);
  box-shadow: 0 14px 40px -14px rgb(140 255 58 / .5);
}
.card--still:hover { transform: none; }

.pad { padding: 22px; }

.ph {
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(140 255 58 / .06) 14px 28px), var(--card-2);
}
.ph > p { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: .9rem; }
.ph img, .ph iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }


/* home */

.hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 40px; padding-top: 72px; }
.hero .lead { max-width: 36ch; color: var(--muted); font-size: 1.2rem; }
.hero-art { width: min(100%, 360px); justify-self: center; animation: bob 5s ease-in-out infinite; }

@keyframes bob { 50% { transform: translateY(-14px) rotate(-3deg); } }

.friend { display: flex; flex-direction: column; gap: 4px; }
.friend h3 { margin: 10px 0 0; }
.friend .muted { flex: 1; }
.avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font: 700 1.6rem var(--head);
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.friend img.avatar,
.friend > img:first-child {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}
.friend:nth-child(2) .avatar { background: var(--pink); color: #2a0420; }
.friend:nth-child(3) .avatar { background: var(--goo); color: #10200a; }

.social {
  align-self: start;
  margin-top: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #9146ff;
  color: #fff;
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none;
  transition: background .2s;
}
.social:hover { background: #a970ff; }

.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 36px; }
.banner h2 { margin-bottom: .2em; }
.banner p { margin: 0; }
.banner--goo { background: linear-gradient(160deg, var(--goo), var(--goo-dark)); border-color: var(--goo); color: #10200a; }
.banner--goo p { color: #1d3a0c; }
.banner--goo .btn { --c: #10200a; color: var(--goo); }


/* streams page */

.page-head { padding: 60px 0 10px; }

.player { aspect-ratio: 16 / 9; width: 100%; max-width: 920px; border-radius: var(--radius); }

.clip .ph { aspect-ratio: 16 / 9; }
.clip-body { padding: 14px 16px 18px; }
.clip-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.clip:hover { transform: none; }

.empty { padding: 36px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }


/* stats */

.channel { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; padding: 60px 0 32px; }
.channel-pic { flex: none; width: 130px; height: 130px; border-radius: 50%; box-shadow: 0 0 0 6px rgb(140 255 58 / .15); }
.channel-info { flex: 1; min-width: 240px; }
.channel-info h1 { margin: 0; }
.channel-info p { max-width: 60ch; margin: 4px 0 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 22px; }
.stat dt { color: var(--muted); font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.stat dd { margin: 0; color: var(--goo); font: 700 clamp(1.5rem, 3vw, 2.1rem) var(--head); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat--big { grid-column: 1 / -1; align-items: center; padding: 34px; text-align: center; }
.stat--big dd { font-size: clamp(3rem, 10vw, 5.4rem); line-height: 1; }

.progress { height: 32px; padding: 4px; overflow: hidden; background: var(--card); border: 2px solid var(--line); border-radius: 999px; }
.progress div {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--goo) 0 14px, var(--goo-dark) 14px 28px) 0 0 / 40px 40px;
  transition: width 1.6s cubic-bezier(.3, 1.3, .5, 1);
  animation: ooze 1.2s linear infinite;
}
@keyframes ooze { to { background-position: 40px 0; } }

.video { color: inherit; text-decoration: none; }
.video .ph { aspect-ratio: 16 / 9; }
.video h3 {
  display: -webkit-box;
  margin-bottom: 6px;
  overflow: hidden;
  font-size: 1.02rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}


/* guestbook */

.guestbook { display: grid; grid-template-columns: 370px 1fr; align-items: start; gap: 32px; padding-bottom: 40px; }

.note-form { position: sticky; top: 100px; display: grid; gap: 16px; padding: 24px; }
.note-form h2 { font-size: 1.5rem; margin: 0; }
.note-form .btn { justify-self: start; }

label { display: grid; gap: 6px; font-weight: 800; }
label small { font-weight: 600; }
input, textarea {
  width: 100%;
  padding: 13px 15px;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--bg-2);
  color: var(--text);
  font: 600 1rem var(--body);
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { border-color: var(--goo); box-shadow: 0 0 0 5px rgb(140 255 58 / .15); }

.trap { position: absolute; left: -9999px; }

.status { min-height: 1.4em; margin: 0; font-weight: 800; }
.status.ok { color: var(--goo); }
.status.err { color: var(--pink); }

.entries { display: grid; gap: 18px; padding: 26px; border-left: 10px solid var(--goo); }
.entry { padding-bottom: 18px; border-bottom: 2px dashed var(--line); }
.entry:last-child { padding-bottom: 0; border-bottom: 0; }
.entry p { margin: 0 0 8px; font-size: 1.06rem; white-space: pre-line; overflow-wrap: anywhere; }
.entry footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 0; padding: 0; border: 0; font-size: 1rem; }
.entry b { color: var(--goo); font-family: var(--head); overflow-wrap: anywhere; }


/* footer */

.site-footer { margin-top: 60px; padding: 36px 0 max(44px, calc(env(safe-area-inset-bottom) + 24px)); border-top: 2px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--goo); }


/* installed app + install prompt */

.standalone body { overscroll-behavior-y: none; }
.standalone .nav > .btn { display: none; }

.install {
  position: fixed;
  z-index: 9000;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(460px, 100% - 24px);
  padding: 10px 10px 10px 12px;
  background: var(--card-2);
  border: 2px solid var(--goo);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgb(0 0 0 / .5);
  transform: translate(-50%, 160%);
  transition: transform .5s cubic-bezier(.3, 1.5, .5, 1);
}
.install.show { transform: translate(-50%, 0); }
.install img { flex: none; width: 40px; height: 40px; border-radius: 11px; }
.install p { flex: 1; margin: 0; font-weight: 800; font-size: .92rem; line-height: 1.25; }
.install button { border: 0; background: none; color: var(--muted); font: 900 .9rem var(--body); cursor: pointer; }
.install .install-yes { padding: 9px 16px; border-radius: 999px; background: var(--goo); color: #10200a; }


@media (max-width: 900px) {
  .hero, .guestbook { grid-template-columns: 1fr; }
  .hero-art { width: 240px; }
  .note-form { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding: 48px 0; }
  .nav { flex-wrap: wrap; gap: 12px; }
  .nav > .btn { display: none; }
  .nav-links { order: 3; justify-content: space-between; width: 100%; margin: 0; gap: 2px; }
  .nav-links a { padding: 7px 8px; font-size: .88rem; }
  .banner { padding: 26px; }
  .channel-pic { width: 96px; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}