/* chillvibes.com — sticker-book look. Plain CSS, no build step. */
:root {
  --paper: #fff6dc;
  --ink: #1b1530;
  --ink-soft: #3a3152;
  --white: #ffffff;
  --sky: #4da3ff;      --sky-tint: #dcecff;
  --sun: #ffd23f;      --sun-tint: #fff1bf;
  --mint: #3ddc97;     --mint-tint: #d4f7e7;
  --pink: #ff8fc7;     --pink-tint: #ffe0ef;
  --tomato: #ff5a36;   --tomato-tint: #ffe0d8;
  --grape: #7b5cff;    --grape-tint: #e6e0ff;
  --ice: #9be7ff;      --ice-tint: #e3f8ff;
  --tangerine: #ffa64d; --tangerine-tint: #ffe8d1;
  --violet: #5b3fe0;
  --scribble: #d63d1c;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: Nunito, ui-rounded, system-ui, sans-serif;
  --hand: Caveat, cursive;
  --line: 3px solid var(--ink);
  --pop: 7px 7px 0 var(--ink);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(#1b153014 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 500 17px/1.55 var(--body);
  overflow-x: clip;
}
a { color: inherit; }
a:hover { color: var(--violet); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px dashed var(--violet);
  outline-offset: 4px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }

.wrap { max-width: 76rem; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.page-main { padding-bottom: 80px; }
.scribble { font: 700 30px/1 var(--hand); color: var(--scribble); display: inline-block; }

/* ---------- Header ---------- */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; position: relative; z-index: 2; }
.wordmark { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font: 800 26px var(--display); letter-spacing: -0.03em; }
.wordmark:hover { color: var(--ink); }
.wordmark .sun { width: 44px; height: 44px; flex: none; animation: cv-spin 14s linear infinite; }
.dotcom { color: var(--tomato); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 6px; }
.site-header nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; transition: background 150ms, transform 150ms; }
.site-header nav a:hover { background: var(--sun); color: var(--ink); transform: rotate(-3deg); }
.site-header nav .feed-link { border: 2.5px solid var(--ink); background: var(--white); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 14px 28px; border-radius: 999px; border: var(--line); font: 800 18px var(--body); text-decoration: none; cursor: pointer; box-shadow: 5px 5px 0 var(--ink); transition: transform 160ms var(--bounce), box-shadow 160ms; }
.btn:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 8px 8px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--grape); color: var(--white); }
.btn-primary:hover { color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-yellow { background: var(--sun); color: var(--ink); }
.btn-white:hover, .btn-yellow:hover { color: var(--ink); }
.btn svg { width: 22px; height: 22px; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 20px 120px; text-align: center; }
.hero-inner { position: relative; max-width: 62rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 28px; animation: cv-pop 700ms var(--bounce) both; }
.hero-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px; background: var(--white); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-weight: 800; font-size: 14px; letter-spacing: 0.04em; transform: rotate(-3deg); }
.hero-chip .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); border: 2px solid var(--ink); }
.hero h1 { margin: 0; font-size: clamp(54px, 9.5vw, 128px); line-height: 0.92; letter-spacing: -0.045em; text-wrap: balance; }
.hero h1 .fun { display: inline-block; padding: 0 0.12em; background: var(--sun); border: 4px solid var(--ink); border-radius: 0.25em; box-shadow: 6px 6px 0 var(--ink); transform: rotate(-3deg); }
.hero h1 .struck { position: relative; display: inline-block; white-space: nowrap; }
.hero h1 .struck s { text-decoration: none; }
.hero h1 .strike { position: absolute; left: -3%; top: 44%; width: 106%; height: 0.32em; overflow: visible; pointer-events: none; }
.hero h1 .more-fun { position: absolute; right: -34px; top: -38px; transform: rotate(9deg); font: 700 clamp(28px, 3.4vw, 46px) var(--hand); color: var(--scribble); white-space: nowrap; letter-spacing: 0; }
.hero .lede { margin: 0; max-width: 36rem; font-size: 21px; font-weight: 600; color: var(--ink-soft); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding-top: 6px; }
.doodle { position: absolute; pointer-events: none; }
.doodle-a { left: 7%; top: 50px; width: 84px; }
.doodle-b { right: 9%; top: 36px; width: 70px; }
.doodle-c { right: 13%; bottom: 110px; width: 100px; }
.doodle-d { left: 12%; bottom: 80px; width: 58px; }
.doodle-e { right: 27%; top: 100px; width: 48px; }
.doodle-f { left: 3%; top: 250px; width: 130px; }

.surprise { margin-top: 14px; max-width: 32rem; width: 100%; text-align: left; padding: 20px 22px; background: var(--white); border: var(--line); border-radius: 22px; box-shadow: var(--pop); transform: rotate(-2deg); display: flex; gap: 16px; align-items: flex-start; animation: cv-pop 600ms var(--bounce) both; }
.surprise[hidden] { display: none; }
.surprise-dot { flex: none; width: 48px; height: 48px; border-radius: 50%; border: var(--line); background: var(--c, var(--sun)); }
.surprise > div { display: flex; flex-direction: column; gap: 4px; }
.surprise .scribble { font-size: 24px; }
.surprise-title { align-self: flex-start; font: 800 24px/1.2 var(--display); letter-spacing: -0.02em; text-decoration: none; }

/* ---------- Ticker ---------- */
.ticker { background: var(--tomato); border-top: var(--line); border-bottom: var(--line); transform: rotate(-2deg); margin: 0 -40px; padding: 16px 0; overflow: hidden; }
.ticker-track { display: flex; width: max-content; gap: 28px; font: 800 30px var(--display); white-space: nowrap; animation: cv-marquee 32s linear infinite; }

/* ---------- Latest finds ---------- */
.finds { padding-top: 120px; padding-bottom: 100px; }
.finds-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 52px; }
.finds-heading > div { display: flex; flex-direction: column; gap: 2px; }
.finds-heading .scribble { transform: rotate(-3deg); align-self: flex-start; }
.finds-heading h2, .shelves-heading h2 { margin: 0; font-size: clamp(42px, 6vw, 72px); line-height: 1; letter-spacing: -0.04em; }
.finds-heading svg { width: 160px; flex: none; }
.finds-grid, .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 44px 32px; }

/* ---------- Cards ---------- */
.card { --tilt: 0deg; position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--white); border: var(--line); border-radius: 24px; box-shadow: var(--pop); transform: rotate(var(--tilt)); transition: transform 220ms var(--bounce), box-shadow 220ms; }
.card:nth-child(8n+1) { --tilt: -1.5deg; } .card:nth-child(8n+2) { --tilt: 1.2deg; }
.card:nth-child(8n+3) { --tilt: -0.6deg; } .card:nth-child(8n+4) { --tilt: 1.6deg; }
.card:nth-child(8n+5) { --tilt: -1.8deg; } .card:nth-child(8n+6) { --tilt: 0.8deg; }
.card:nth-child(8n+7) { --tilt: -1deg; }   .card:nth-child(8n+8) { --tilt: 1.5deg; }
.card:hover, .card:focus-within { transform: rotate(0deg) translate(-4px, -6px); box-shadow: 12px 12px 0 var(--ink); }
.card:hover .card-arrow { animation: cv-wiggle 600ms ease-in-out; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 12px; border-radius: 999px; background: var(--c-tint, var(--white)); border: 2px solid var(--ink); font-size: 13px; line-height: 16px; font-weight: 800; color: var(--ink); }
.card-arrow { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c, var(--sun)); color: var(--c-ink, var(--ink)); border: 2.5px solid var(--ink); }
.card-arrow svg { width: 18px; height: 18px; }
.card h3 { margin: 0; font-size: 25px; line-height: 1.15; letter-spacing: -0.02em; }
.card h3 a { text-decoration: none; background-image: linear-gradient(var(--sun), var(--sun)); background-size: 0% 40%; background-position: 0 90%; background-repeat: no-repeat; transition: background-size 250ms; }
.card h3 a:hover { color: var(--ink); background-size: 100% 40%; }
.card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 24px; }
.card p { margin: 0; color: var(--ink-soft); flex-grow: 1; }
.card-source { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-soft); padding-top: 12px; border-top: 2.5px dashed #1b153033; overflow-wrap: anywhere; }
.card-source svg { width: 15px; height: 15px; flex: none; }
.thumbnail { width: calc(100% + 44px); margin: -22px -22px 0; height: 155px; object-fit: cover; border-radius: 21px 21px 0 0; border-bottom: var(--line); }

/* Colour sets: formats and shelves */
.format-game, .c-0 { --c: var(--sky); --c-tint: var(--sky-tint); }
.format-toy, .c-1 { --c: var(--sun); --c-tint: var(--sun-tint); }
.format-experiment, .c-2 { --c: var(--mint); --c-tint: var(--mint-tint); }
.format-art_music, .c-3 { --c: var(--pink); --c-tint: var(--pink-tint); }
.format-video, .c-4 { --c: var(--tomato); --c-tint: var(--tomato-tint); }
.format-tool, .c-5 { --c: var(--grape); --c-tint: var(--grape-tint); --c-ink: var(--white); }
.c-6 { --c: var(--ice); --c-tint: var(--ice-tint); }
.format-writeup, .c-7 { --c: var(--tangerine); --c-tint: var(--tangerine-tint); }

/* ---------- Shelves ---------- */
.shelves { position: relative; background: var(--sun); border-top: var(--line); padding: 104px 0 120px; }
.shelves .doodle-g { right: 6%; top: -34px; width: 64px; }
.shelves-heading { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 60px; }
.shelves-heading .scribble { color: var(--ink); transform: rotate(2deg); }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 44px 32px; }
.shelf { display: flex; flex-direction: column; gap: 18px; padding: 26px; background: var(--white); border: var(--line); border-radius: 26px; box-shadow: var(--pop); transform: rotate(var(--tilt, 0deg)); transition: transform 220ms var(--bounce), box-shadow 220ms; }
.shelf:nth-child(4n+1) { --tilt: 1.6deg; } .shelf:nth-child(4n+2) { --tilt: -1.8deg; }
.shelf:nth-child(4n+3) { --tilt: 0.8deg; } .shelf:nth-child(4n+4) { --tilt: -1deg; }
.shelf:hover, .shelf:focus-within { transform: rotate(0deg) translate(-4px, -6px); box-shadow: 12px 12px 0 var(--ink); }
.shelf:hover .shelf-num { animation: cv-wiggle 600ms ease-in-out; }
.shelf-head { display: flex; align-items: center; gap: 16px; }
.shelf-head h3 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
.shelf-num { flex: none; width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c); color: var(--c-ink, var(--ink)); border: var(--line); font: 800 24px var(--display); }
.shelf-desc { margin: 0; color: var(--ink-soft); font-size: 15px; }
.shelf-items { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shelf-items a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--c-tint); border: 2px solid var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; transition: transform 150ms, background 150ms; }
.shelf-items a:hover { background: var(--sun); color: var(--ink); transform: translateY(-2px) rotate(-2deg); }
.shelf-empty { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 16px; border-radius: 18px; border: 2.5px dashed var(--ink); background: var(--c-tint); font-weight: 700; }
.shelf-empty svg { width: 48px; flex: none; }
.see-all { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }

/* ---------- Closing + footer ---------- */
.closing { position: relative; background: var(--violet); color: var(--white); border-top: var(--line); padding: 120px 20px 40px; text-align: center; overflow: hidden; }
.closing .doodle-h { left: 8%; top: 70px; width: 70px; }
.closing .doodle-i { right: 10%; top: 150px; width: 50px; }
.closing .doodle-j { left: 20%; bottom: 60px; width: 44px; }
.closing-inner { position: relative; max-width: 52rem; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.closing .scribble { font-size: 34px; color: var(--sun); transform: rotate(-3deg); }
.closing h2 { margin: 0; font-size: clamp(44px, 7vw, 92px); line-height: 0.98; letter-spacing: -0.045em; text-wrap: balance; }
.closing p { margin: 0; font-size: 21px; font-weight: 600; max-width: 32rem; }
.closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding-top: 12px; }
.closing a:focus-visible, .site-footer a:focus-visible { outline-color: var(--sun); }

.site-footer { background: var(--violet); color: var(--white); border-top: var(--line); }
.home + .site-footer { border-top: 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 22px; padding-bottom: 28px; }
.home + .site-footer .wrap { border-top: 2.5px dashed #ffffff55; }
.footer-mark { font: 800 20px var(--display); letter-spacing: -0.02em; }
.footer-mark span { color: var(--sun); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--white); }
.site-footer nav a:hover { color: var(--sun); }

/* ---------- Inner pages ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 700 28px/1 var(--hand); color: var(--scribble); transform: rotate(-2deg); }
.page-heading { padding: 40px 0 36px; }
.page-heading h1 { margin: 14px 0 18px; font-size: clamp(42px, 7vw, 84px); line-height: 0.98; letter-spacing: -0.045em; }
.page-heading p { color: var(--ink-soft); max-width: 46rem; font-size: 20px; font-weight: 600; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 28px; padding: 0 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--white); font-weight: 800; font-size: 15px; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 40px; }
.filters a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font-weight: 700; font-size: 15px; text-decoration: none; }
.filters a:hover { background: var(--sun); color: var(--ink); }
.filters a.active { background: var(--ink); color: var(--white); }
.category-results { margin-bottom: 56px; }
.empty { font-weight: 700; color: var(--ink-soft); padding: 24px 0; }
.prose { max-width: 46rem; line-height: 1.8; margin: 0 0 80px; font-size: 18px; }
.prose a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose img { max-width: 100%; border: var(--line); border-radius: 18px; }
.prose pre { overflow: auto; background: var(--white); border: var(--line); border-radius: 14px; padding: 20px; }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 2px solid var(--ink); padding: 8px; }
.toy-frame { width: 100%; height: 560px; border: var(--line); border-radius: 24px; box-shadow: var(--pop); background: var(--white); display: block; margin-bottom: 40px; }
.page-notes { font-size: 16px; color: var(--ink-soft); }
.preview-banner { background: var(--sun-tint); border: 2.5px solid var(--ink); padding: 12px 18px; font-weight: 700; border-radius: 14px; margin-bottom: 20px; }
.error-banner { background: var(--tomato-tint); border: 2.5px solid var(--ink); padding: 15px; border-radius: 14px; font-weight: 700; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 24px; font-weight: 800; margin: 30px 0 50px; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Curator desk ---------- */
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-entry { border: var(--line); border-radius: 22px; padding: 24px; margin: 20px 0; background: var(--white); box-shadow: 5px 5px 0 var(--ink); }
.admin-entry h3 { margin: 0; }
.admin-entry .card-source { border-top: 0; padding-top: 0; }
.admin-fields { display: grid; grid-template-columns: 2fr 2fr 1.5fr 1fr; gap: 14px; margin: 18px 0; }
label { font-size: 14px; font-weight: 700; display: block; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; font: 500 15px var(--body); color: var(--ink); padding: 10px 12px; border: 2px solid var(--ink); background: var(--white); border-radius: 12px; }
textarea { resize: vertical; }
.admin-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
button, .admin-actions a { font: 800 14px var(--body); border: 2px solid var(--ink); border-radius: 999px; background: var(--white); padding: 9px 16px; color: var(--ink); cursor: pointer; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
button:hover { background: var(--sun); }
.primary-button { background: var(--grape); color: var(--white); }
.primary-button:hover { background: var(--violet); }
.admin-list-title { margin-top: 55px; }
.link-warning { color: #b8321a; }

/* ---------- Motion ---------- */
@keyframes cv-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(12deg); } }
@keyframes cv-spin { to { transform: rotate(360deg); } }
@keyframes cv-marquee { to { transform: translateX(-50%); } }
@keyframes cv-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 75% { transform: rotate(16deg); } }
@keyframes cv-pop { from { opacity: 0; transform: scale(.85) rotate(-4deg); } to { opacity: 1; } }
.bob { animation: cv-bob 5s ease-in-out infinite; }
.bob-2 { animation: cv-bob 6.5s ease-in-out -2s infinite; }
.bob-3 { animation: cv-bob 4.2s ease-in-out -1s infinite; }
.spin { animation: cv-spin 14s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .admin-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .hero { padding-top: 40px; padding-bottom: 96px; }
  .hero h1 .more-fun { right: -8px; top: -30px; }
  .finds { padding-top: 88px; }
  .shelves { padding-top: 80px; }
  .closing { padding-top: 96px; }
  .admin-fields { grid-template-columns: 1fr; }
  .admin-entry { padding: 16px; }
}
