/* Dopies library: a crayon sketchbook. Ink outlines, sticker cards and the dopies' own colours. */
:root {
  --ink: #1d1b16; --ink-soft: #3d392f; --muted: #6d675a; --paper: #fbf6e9; --paper-2: #f3ead3; --card: #fffdf7; --line: #e5dbc2;
  --orange: #f93606; --lime: #e8f96b; --green: #96db7d; --forest: #027f50; --blue: #387ddc; --indigo: #515193; --plum: #431068; --cream: #ffe1ab;
  --sans: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Bradley Hand', 'Comic Sans MS', cursive;
  --wob: 22px 18px 24px 16px / 16px 24px 18px 22px;
  --wob-big: 34px 26px 38px 24px / 26px 38px 24px 34px;
  color-scheme: light;
}
/* --c is the colour of whatever dopi or collection an element belongs to. */
:root, [style*="--c"] {
  --c-ink: color-mix(in srgb, var(--c, #ffe1ab) 62%, #000);
  --c-soft: color-mix(in srgb, var(--c, #ffe1ab) 14%, #fffdf7);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); font: 16px/1.5 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 1px 1px, #1d1b1612 1px, transparent 1.4px);
  background-size: 220px 220px, 26px 26px; }
main { flex: 1; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 10px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.shell { max-width: 1320px; margin: 0 auto; padding: 0 40px; width: 100%; }
.muted { color: var(--muted); }
.hand { font-family: var(--hand); font-weight: 700; }

/* Header -------------------------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 8px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'%3E%3Cpath d='M0 4 C 15 1, 25 7, 40 4 S 65 1, 80 4 S 105 7, 120 4' fill='none' stroke='%231d1b16' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x; }
.top-row { display: flex; align-items: center; gap: 26px; height: 74px; }
.wordmark { display: flex; align-items: baseline; gap: 6px; text-decoration: none; }
.letters { display: flex; font-weight: 900; font-size: 34px; letter-spacing: -1px; line-height: 1; }
.letters b { color: var(--c); -webkit-text-stroke: 1.6px var(--ink); paint-order: stroke fill; display: inline-block; transform: rotate(-5deg); }
.letters b:nth-child(2n) { transform: rotate(4deg) translateY(2px); }
.letters b:nth-child(3n) { transform: rotate(-2deg) translateY(-1px); }
.wordmark:hover .letters b { animation: jiggle .5s ease-in-out; }
.letters b:nth-child(2) { animation-delay: .04s !important; } .letters b:nth-child(3) { animation-delay: .08s !important; }
.letters b:nth-child(4) { animation-delay: .12s !important; } .letters b:nth-child(5) { animation-delay: .16s !important; }
.letters b:nth-child(6) { animation-delay: .2s !important; }
.wordmark em { font: 700 26px/1 var(--hand); color: var(--ink-soft); transform: rotate(-4deg) translateY(-2px); font-style: normal; }
.nav { display: flex; gap: 4px; }
.nav a { position: relative; text-decoration: none; color: var(--ink-soft); padding: 8px 14px; font-weight: 600; font-size: 15px; }
.nav a::before { content: ''; position: absolute; inset: -2px -4px; background: var(--orange); opacity: 0; transform: scale(.85) rotate(-3deg);
  transition: opacity .15s, transform .2s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 50' preserveAspectRatio='none'%3E%3Cpath d='M14 30 C 10 12, 60 5, 102 13 C 120 18, 116 40, 70 44 C 30 47, 5 40, 9 25 C 12 15, 42 7, 76 9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 50' preserveAspectRatio='none'%3E%3Cpath d='M14 30 C 10 12, 60 5, 102 13 C 120 18, 116 40, 70 44 C 30 47, 5 40, 9 25 C 12 15, 42 7, 76 9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.nav a:hover::before { opacity: .35; transform: scale(1) rotate(-2deg); }
.nav a.on { color: var(--ink); }
.nav a.on::before { opacity: 1; transform: scale(1) rotate(-2deg); }
.me { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }

/* Buttons and links ------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--ink); background: var(--lime);
  color: var(--ink); border-radius: 14px 12px 15px 11px; padding: 9px 16px; font-size: 14px; font-weight: 700; text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .1s, box-shadow .1s; }
.btn small { font-weight: 500; opacity: .7; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: var(--card); }
.btn.dark { background: var(--ink); color: var(--lime); }
.btn.small { padding: 6px 12px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--orange); font-size: 14px; }
.link:hover { text-decoration-color: var(--ink); }
.link.light { color: var(--paper); }

/* Squiggly underline, coloured through a mask. */
.squiggle { position: relative; display: inline-block; z-index: 0; }
.squiggle::after { content: ''; position: absolute; left: -2%; right: -2%; bottom: -.08em; height: .28em; z-index: -1; background: var(--sq, var(--orange));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C 22 3, 38 14, 58 8 S 92 2, 112 9 S 152 15, 172 7 S 194 6, 197 9' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C 22 3, 38 14, 58 8 S 92 2, 112 9 S 152 15, 172 7 S 194 6, 197 9' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.doodle { position: absolute; pointer-events: none; filter: url(#crayon); }
.doodle svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Home ------------------------------------------------------------------------------------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 30px; padding: 54px 0 0; }
.hero:has(.dip) { grid-template-columns: minmax(0, 1fr) 330px; align-items: center; gap: 40px; }
.hero .toggle { margin-top: 28px; }
.page-head .hero .toggle { margin-top: 0; }
.hero .hello { font-size: 28px; color: var(--forest); margin: 0 0 4px; transform: rotate(-2deg); display: inline-block; }
h1 { font-size: clamp(44px, 6.6vw, 92px); line-height: .98; letter-spacing: -.045em; margin: 0; font-weight: 900; }
.lede { max-width: 580px; margin: 18px 0 0; font-size: 18px; color: var(--ink-soft); }
.lede strong { background: var(--lime); padding: 0 5px; border-radius: 6px 4px 7px 3px; }
.hero .d1 { width: 46px; height: 46px; right: 410px; top: 46px; color: var(--orange); transform: rotate(12deg); }
.hero .d2 { width: 34px; height: 34px; right: 384px; bottom: 30px; color: var(--blue); }

/* Lucky dip: a random pose, taped in at an angle */
.dip { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: 26px 22px 28px 20px; box-shadow: 6px 7px 0 var(--ink);
  padding: 16px 14px 14px; transform: rotate(2deg); }
.dip.shuffle { animation: shuffle .45s ease-in-out; }
.dip-label { margin: 0 0 10px; font: 700 25px/1 var(--hand); color: var(--c-ink); text-align: center; }
.dip .art { height: 240px; }
.dip .art img { transition: transform .25s; }
.dip .art:hover img { transform: scale(1.06) rotate(-3deg); }
.dip-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; line-height: 1.25; }
.dip-foot strong { font-weight: 800; }
.dip-foot .btn { flex-shrink: 0; }
.hero .d3 { width: 60px; height: 30px; left: -34px; top: 128px; color: var(--green); }

.toggle { display: inline-flex; background: var(--card); border: 2px solid var(--ink); border-radius: 18px 14px 19px 13px; padding: 5px; gap: 4px;
  flex-shrink: 0; box-shadow: 3px 4px 0 var(--ink); }
.toggle button { border: 0; background: transparent; border-radius: 12px; padding: 6px 14px 6px 8px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; line-height: 1.15; text-align: left; transition: background .15s; }
.toggle button img { width: 44px; height: 38px; object-fit: contain; transition: transform .2s; }
.toggle button small { display: block; font: 700 17px/1 var(--hand); color: var(--muted); }
.toggle button:hover img { transform: rotate(-8deg) scale(1.08); }
.toggle button.on { background: var(--lime); box-shadow: inset 0 0 0 2px var(--ink); }
.toggle button.on small { color: var(--ink-soft); }

/* The stage: every dopi on the home page, standing on their own colour. */
.stage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 40px 0 0; }
.actor { position: relative; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); padding-top: 40px; outline-offset: -4px; }
.actor .sprite { position: relative; z-index: 1; width: 100%; aspect-ratio: 7 / 6; transform-origin: 50% 93%;
  animation: breathe 3.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.5s); }
.actor .sprite img { width: 100%; height: 100%; object-fit: contain; }
.actor .spot { width: 66%; height: 20px; margin-top: calc(-5.7% - 11px); border-radius: 50%; background: color-mix(in srgb, var(--c) 40%, transparent);
  filter: url(#crayon); transition: transform .25s, background .25s; }
.actor strong { margin-top: 12px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.actor em { font: 700 22px/1 var(--hand); color: var(--c-ink); font-style: normal; }
.actor small { margin-top: 4px; font-size: 12px; color: var(--muted); }
.bubble { position: absolute; z-index: 3; top: 0; left: 50%; background: #fff; border: 2px solid var(--ink); border-radius: 18px 16px 18px 14px;
  padding: 3px 12px 5px; font: 700 21px/1.1 var(--hand); white-space: nowrap; transform: translate(-50%, 8px) scale(.6); opacity: 0;
  transition: opacity .15s, transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: #fff;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateX(-50%) rotate(45deg) skew(8deg, 8deg); }
.actor.hi .bubble { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(-3deg); }
.actor.hi .sprite { animation: hop .55s cubic-bezier(.3, .7, .4, 1); }
.actor.hi .spot { transform: scaleX(1.12); background: color-mix(in srgb, var(--c) 70%, transparent); }

/* Search */
.finder { position: relative; margin: 112px 0 0; }
.search { position: relative; display: flex; gap: 12px; }
.search input { flex: 1; min-width: 0; height: 60px; border: 2px solid var(--ink); border-radius: 20px 16px 22px 15px / 16px 22px 15px 20px;
  background: #fff; padding: 0 22px; font-size: 18px; box-shadow: 4px 5px 0 var(--ink); }
.search input::placeholder { color: #9a9282; }
.search input:focus { outline: none; box-shadow: 4px 5px 0 var(--ink), 0 0 0 4px color-mix(in srgb, var(--blue) 35%, transparent); }
.search .btn { height: 60px; padding: 0 24px; font-size: 16px; border-radius: 18px 14px 20px 13px; box-shadow: 4px 5px 0 var(--ink); }
.seeker { position: absolute; right: 150px; bottom: calc(100% - 15px); width: 156px; pointer-events: none; z-index: 1; transform-origin: 50% 93%; animation: breathe 3s ease-in-out infinite; }
.seeker img { width: 100%; }
.tries { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; }
.tries > span { font: 700 22px/1 var(--hand); color: var(--muted); margin-right: 4px; }
.try { border: 2px solid var(--ink); background: var(--t, var(--card)); border-radius: 999px; padding: 4px 13px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: transform .15s; }
.try:nth-child(3n) { transform: rotate(-2deg); } .try:nth-child(3n+1) { transform: rotate(1.5deg); }
.try:hover { transform: rotate(0) translateY(-2px) scale(1.05); }

/* Section labels on the home page */
.label { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font-size: clamp(28px, 3vw, 38px); font-weight: 900; letter-spacing: -.03em; margin: 72px 0 28px; }
.label .hand { font-size: 26px; color: var(--muted); letter-spacing: 0; transform: rotate(-2deg); font-weight: 700; }

/* Collections: taped-in stickers */
.collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 30px; padding: 6px 0 20px; }
.collection { --tilt: -1.2deg; position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--card); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 5px 6px 0 var(--ink);
  transform: rotate(var(--tilt)); transition: transform .2s, box-shadow .2s; }
.collection:nth-child(3n+2) { --tilt: .9deg; } .collection:nth-child(3n) { --tilt: -.5deg; }
.collection:hover { transform: rotate(0) translateY(-5px); box-shadow: 8px 10px 0 var(--ink); }
.tape { position: absolute; z-index: 2; top: -14px; left: 50%; width: 96px; height: 28px; background: color-mix(in srgb, var(--cream) 80%, transparent);
  transform: translateX(-50%) rotate(-4deg); box-shadow: 0 1px 2px #0000001f;
  clip-path: polygon(0 8%, 6% 0, 12% 10%, 20% 2%, 30% 9%, 42% 0, 55% 8%, 66% 1%, 78% 9%, 90% 0, 100% 7%, 97% 50%, 100% 92%, 92% 100%, 80% 91%, 68% 100%, 54% 92%, 40% 100%, 28% 91%, 15% 100%, 4% 92%, 2% 50%); }
.collection:nth-child(2n) .tape, .post:nth-child(2n) .tape { transform: translateX(-50%) rotate(3deg); left: 40%; }
.cover { position: relative; height: 210px; overflow: hidden; border-radius: 22px 22px 0 0; background: color-mix(in srgb, var(--c) 30%, var(--card));
  border-bottom: 2px solid var(--ink); }
.cover > img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cover.contain > img { object-fit: contain; padding: 14px; }
.collection:hover .cover > img { transform: scale(1.05); }
.cover.collage { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 18px 16px; gap: 6px; }
.cover.collage img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform .25s; }
.cover.collage img:nth-child(odd) { transform: rotate(-8deg) translateY(10px); } .cover.collage img:nth-child(even) { transform: rotate(7deg) translateY(-8px); }
.collection:hover .cover.collage img { transform: rotate(0) scale(1.1); }
.cover.slack-art { background: var(--plum); display: flex; align-items: center; justify-content: center; }
.cover.slack-art .hash { font: 900 120px/1 var(--sans); color: var(--lime); transform: rotate(-8deg); }
.polaroids { position: absolute; inset: 0; }
.polaroids img { position: absolute; top: 26px; width: 40%; aspect-ratio: 1; object-fit: cover; background: #fff; padding: 6px 6px 18px;
  box-shadow: 0 4px 10px #0000004d; transition: transform .25s; }
.polaroids img:nth-child(1) { left: 6%; transform: rotate(-9deg); }
.polaroids img:nth-child(2) { left: 30%; top: 16px; transform: rotate(4deg); z-index: 1; }
.polaroids img:nth-child(3) { left: 54%; transform: rotate(-3deg) translateY(8px); }
.collection:hover .polaroids img:nth-child(1) { transform: rotate(-13deg) translateX(-6px); }
.collection:hover .polaroids img:nth-child(3) { transform: rotate(2deg) translate(6px, 4px); }
.collection-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.collection-body strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.collection-body p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.collection-body small { margin-top: 6px; font: 700 20px/1 var(--hand); color: var(--muted); }

/* Art boxes --------------------------------------------------------------------------------- */
.art { height: 200px; display: flex; align-items: center; justify-content: center; padding: 10px; border-radius: 16px; overflow: hidden;
  background-color: var(--c-soft); background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--c, #ffe1ab) 32%, transparent) 1.1px, transparent 1.5px);
  background-size: 14px 14px; }
.art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.art.wide { height: 180px; border-radius: 0; padding: 0; }
.art.wide img { width: 100%; height: 100%; object-fit: cover; }
.art.empty { background: var(--paper-2); }
.checker { background-color: #fbfbf7;
  background-image: linear-gradient(45deg, #ecece4 25%, transparent 25%), linear-gradient(-45deg, #ecece4 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, #ecece4 75%), linear-gradient(-45deg, transparent 75%, #ecece4 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }

/* Page heads -------------------------------------------------------------------------------- */
.page-head { padding-top: 30px; }
.page-head .hero { padding-top: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; font: 700 22px/1 var(--hand); text-decoration: none; color: var(--ink-soft); transition: transform .15s; }
.back:hover { color: var(--ink); transform: translateX(-3px); }
.panel { position: relative; margin-top: 30px; border: 2px solid var(--ink); border-radius: var(--wob-big); box-shadow: 6px 7px 0 var(--ink);
  background: color-mix(in srgb, var(--c) 18%, var(--paper)); overflow: hidden; }
.panel-text { position: relative; z-index: 2; padding: 34px 40px 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.panel h1 { font-size: clamp(42px, 5.4vw, 76px); }
.panel-text p { margin: 4px 0 0; max-width: 640px; color: var(--ink-soft); font-size: 17px; }
.panel .toggle { margin-top: 18px; }
.page-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); align-items: stretch; }
.page-panel .panel-art { position: relative; border-left: 2px solid var(--ink); min-height: 260px; }
.page-panel .panel-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-panel .panel-art.contain img { object-fit: contain; padding: 20px; }

/* Dopi page hero */
.dopi-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; }
.panel-text p.role { font: 700 32px/1 var(--hand); color: var(--c-ink); transform: rotate(-3deg); margin: 6px 0 -2px; }
.panel-text p.personality { font: 700 25px/1.2 var(--hand); color: var(--ink); max-width: 520px; margin-top: 14px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.stats span { background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.stats b { font-weight: 900; }
.dopi-hero-art { position: relative; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 70px 20px 30px; }
.puppet { position: relative; z-index: 1; border: 0; background: none; padding: 0; width: min(100%, 420px); aspect-ratio: 7 / 6; transform-origin: 50% 93%;
  animation: breathe 3.6s ease-in-out infinite; border-radius: 30px; }
.puppet img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.puppet.boing { animation: boing .6s cubic-bezier(.3, .7, .4, 1); }
.dopi-hero-art .spot { width: min(70%, 300px); height: 30px; margin-top: calc(-4% - 16px); border-radius: 50%; background: color-mix(in srgb, var(--c) 55%, transparent); filter: url(#crayon); }
.dopi-hero-art .bubble { top: 22px; left: 32%; opacity: 1; transform: rotate(-4deg); font-size: 24px; max-width: 260px; white-space: normal; text-align: center; }
.dopi-hero-art .bubble::after { left: 62%; }
.poke-me { position: absolute; right: 18px; top: 46%; font: 700 24px/1 var(--hand); color: var(--ink-soft); transform: rotate(8deg); display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
.poke-me svg { width: 58px; height: 44px; margin-right: 26px; }
.dopi-hero .d1 { width: 40px; height: 40px; left: 52%; top: 24px; color: var(--c-ink); }
.dopi-hero .d2 { width: 30px; height: 30px; right: 7%; top: 18%; color: var(--c-ink); transform: rotate(20deg); }
.dopi-hero .d3 { width: 70px; height: 34px; left: 47%; bottom: 40px; color: var(--c-ink); }

/* The gang: jump between dopies */
.gang { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin: 30px 0 0; }
.gang > span { font: 700 22px/1 var(--hand); color: var(--muted); margin-right: 4px; align-self: center; }
.head { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.head i { position: relative; display: block; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--ink); overflow: hidden;
  background: color-mix(in srgb, var(--c) 30%, var(--card)); transition: transform .2s; }
.head i img { position: absolute; left: 4%; bottom: -2px; width: 92%; }
.head:hover i { transform: translateY(-4px) rotate(-6deg); }
.head.on i { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--c); }
.head.on { color: var(--ink); }

/* Section jump chips */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.jump button { border: 2px solid var(--ink); background: var(--card); border-radius: 999px; padding: 4px 12px 4px 5px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: transform .15s, background .15s; }
.jump button img { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; background: var(--c-soft); }
.jump button span { color: var(--muted); font-weight: 500; }
.jump button:hover { background: color-mix(in srgb, var(--c) 30%, var(--card)); transform: translateY(-2px) rotate(-1deg); }

/* Sections and grids ------------------------------------------------------------------------ */
.section { padding: 46px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: 12px; font-size: 28px; margin: 0; letter-spacing: -.03em; font-weight: 800; }
.section-head h2 .squiggle { --sq: var(--c); }
.sec-icon { width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--ink); background: var(--c-soft); flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; transform: rotate(-6deg); }
.sec-icon img { width: 120%; height: 120%; object-fit: contain; }
.count { font: 700 22px/1 var(--hand); color: var(--muted); letter-spacing: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 20px 18px; }
.card { --tilt: -1.2deg; position: relative; background: var(--card); border: 2px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: var(--wob); transition: transform .18s, box-shadow .18s, border-color .18s; }
.card:nth-child(2n) { --tilt: 1deg; } .card:nth-child(3n) { --tilt: -.6deg; }
.card:hover, .card:focus-within { border-color: var(--ink); transform: translate(-2px, -3px) rotate(var(--tilt)); box-shadow: 5px 6px 0 var(--c-ink); z-index: 1; }
.card-link { display: block; position: relative; padding: 8px 8px 0; text-decoration: none; }
.card .art { height: 172px; }
.card img { transition: transform .2s; }
.card-link:hover img { transform: scale(1.04); }
.card-body { padding: 9px 12px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.card h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; flex: 1 1 100%; }
.frames-badge { position: absolute; right: 14px; bottom: 8px; font-size: 11px; font-weight: 700; background: #fff; border: 1.5px solid var(--ink);
  border-radius: 20px; padding: 1px 8px; }
.frames-badge::before { content: '▶ '; font-size: 9px; }
.card.playing .frames-badge { background: var(--lime); }
.badge { font-size: 11px; border-radius: 8px; padding: 2px 8px; font-weight: 700; border: 1.5px solid currentColor; }
.badge.redo { background: #e9eefc; color: #2d4a9a; }
.badge.review { background: #fff0cc; color: #8f5b04; }
.pick { position: absolute; top: 14px; left: 14px; z-index: 2; }
.pick input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; cursor: pointer; }
.pick span { display: block; width: 26px; height: 26px; border-radius: 8px 6px 9px 6px; border: 2px solid var(--ink); background: #fffffff0; transition: transform .15s, opacity .15s; }
.pick input:checked + span { background: var(--lime); transform: rotate(-6deg) scale(1.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l3.5 3.5 8.5-9' stroke='%231d1b16' stroke-width='2.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pick input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.card:not(:hover):not(:focus-within) .pick input:not(:checked) + span { opacity: 0; }
@media (hover: none) { .card .pick input:not(:checked) + span { opacity: .8 !important; } }
.empty-note { padding: 50px 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.empty-note img { width: 230px; }
.empty-note p { margin: 0; font: 700 28px/1.1 var(--hand); color: var(--ink-soft); }
.empty-note small { font-size: 15px; color: var(--muted); }

/* Stories: comic strips */
.story { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 16px; overflow-x: auto; padding: 4px 8px 16px 2px; }
.story-frame { position: relative; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 12px 10px 14px 9px;
  overflow: hidden; transition: transform .18s, box-shadow .18s; }
.story-frame:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: 4px 5px 0 var(--ink); }
.story-frame .art.wide { height: 156px; border-bottom: 2px solid var(--ink); }
.story-frame .num { position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center; font: 700 22px/1 var(--hand); transform: rotate(-8deg); }
.story-frame .text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 10px 12px 12px; font-size: 13px; }

/* From Slack: a wall of polaroids */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px 28px; padding: 44px 0 60px; }
.post { --tilt: -1.4deg; position: relative; background: #fff; padding: 12px 12px 14px; border-radius: 4px; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 #0000000d, 0 12px 26px -10px #0000004d; transform: rotate(var(--tilt)); transition: transform .2s; }
.post:nth-child(2n) { --tilt: 1.1deg; } .post:nth-child(3n) { --tilt: -.5deg; } .post:nth-child(5n) { --tilt: 1.8deg; }
.post:hover { transform: rotate(0) translateY(-4px); }
.post .tape { top: -15px; }
.post .art { height: 280px; border-radius: 2px; }
.post-body { padding: 12px 4px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.brief { margin: 0; font-size: 14px; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.meta .when { font: 700 19px/1 var(--hand); color: var(--ink-soft); margin-left: auto; }
.chip { background: color-mix(in srgb, var(--c, #ffe1ab) 28%, #fff); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 20px; padding: 0 9px; font-weight: 700; font-size: 12px; }
.actions { margin: auto 0 0; display: flex; gap: 14px; align-items: center; }

/* Viewer ------------------------------------------------------------------------------------ */
dialog { border: 2px solid var(--ink); padding: 0; border-radius: 28px; width: min(1180px, calc(100% - 32px)); max-height: calc(100vh - 32px);
  background: var(--paper); color: var(--ink); box-shadow: 8px 10px 0 var(--ink); overflow: hidden; }
dialog[open] { animation: pop .28s cubic-bezier(.3, 1.4, .5, 1); }
dialog::backdrop { background: #1d1b16b3; backdrop-filter: blur(4px); }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 350px; min-height: min(78vh, 760px); }
.viewer-art { display: flex; align-items: center; justify-content: center; padding: 24px; min-height: 360px; transition: background-color .2s; }
.viewer-art img { max-width: 100%; max-height: 74vh; object-fit: contain; }
.viewer-side { padding: 24px 26px; border-left: 2px solid var(--ink); display: flex; flex-direction: column; gap: 14px; position: relative; overflow-y: auto;
  max-height: calc(100vh - 36px); background: var(--card); }
.viewer-side .eyebrow { font: 700 21px/1.1 var(--hand); color: var(--forest); padding-right: 44px; margin: 0; }
.viewer-side h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; line-height: 1.15; padding-right: 36px; font-weight: 800; }
.viewer-side p { margin: 0; }
.close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--lime);
  font-size: 24px; line-height: 1; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: transform .2s; padding: 0 0 2px; }
.close:hover { transform: rotate(90deg); }
.frames { display: flex; flex-wrap: wrap; gap: 6px; }
.frames button { border: 2px solid var(--ink); background: #fff; border-radius: 10px; padding: 3px 11px; font-size: 13px; font-weight: 700; }
.frames button.on { background: var(--ink); color: var(--lime); }
.bg-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-picker button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); padding: 0; transition: transform .15s; }
.bg-picker button:hover { transform: scale(1.12); }
.bg-picker button.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.downloads { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.downloads .btn { justify-content: space-between; }
.hint { font-size: 13px; color: var(--muted); }

/* Selection tray, toast, confetti ----------------------------------------------------------- */
.tray { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--paper); border-radius: 22px 18px 24px 17px;
  padding: 10px 16px 10px 12px; display: flex; gap: 14px; align-items: center; box-shadow: 5px 6px 0 var(--orange); z-index: 20; animation: rise .3s cubic-bezier(.3, 1.4, .5, 1); }
.tray-thumbs { display: flex; }
.tray-thumbs img { width: 40px; height: 40px; object-fit: contain; background: var(--paper); border: 2px solid var(--paper); border-radius: 10px; margin-left: -12px; }
.tray-thumbs img:first-child { margin-left: 0; }
.tray-thumbs img:nth-child(odd) { transform: rotate(-6deg); } .tray-thumbs img:nth-child(even) { transform: rotate(5deg); }
.tray-count { font: 700 24px/1 var(--hand); white-space: nowrap; }
.tray .btn { border-color: var(--paper); box-shadow: 3px 3px 0 var(--paper); }
.toast { position: fixed; top: 96px; left: 50%; transform: translateX(-50%) rotate(-1.5deg); background: var(--lime); color: var(--ink); padding: 10px 18px;
  border: 2px solid var(--ink); border-radius: 16px 13px 17px 12px; box-shadow: 4px 4px 0 var(--ink); font-weight: 700; font-size: 14px; z-index: 30;
  animation: rise .3s cubic-bezier(.3, 1.4, .5, 1); }
.toast img { position: absolute; width: 54px; left: 14px; bottom: calc(100% - 3px); }
.confetti { position: fixed; z-index: 40; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; border: 1.5px solid var(--ink); }

/* Peekers: dopies holding on to an edge ---------------------------------------------------- */
.peekers { display: flex; justify-content: center; align-items: flex-end; gap: clamp(3px, 2vw, 30px); }
.peekers img { width: clamp(40px, 7.4vw, 104px); min-width: 0; flex-shrink: 1; transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.peekers img:hover { transform: rotate(-6deg) scale(1.06); }
.foot { position: relative; margin-top: 150px; background: var(--ink); color: var(--paper); }
.foot .peekers { position: absolute; left: 0; right: 0; bottom: calc(100% - 3px); }
.foot-row { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 26px 40px 30px; font-size: 14px; }
.foot-row p { margin: 0; color: #d9d2bf; }
.foot-row strong { color: var(--lime); }
#foot-count { font: 700 22px/1 var(--hand); color: var(--paper); }

/* Loading and sign-in ------------------------------------------------------------------------ */
.loading { padding: 120px 0 40px; display: flex; flex-direction: column; align-items: center; }
.loading .peekers img { width: clamp(46px, 6vw, 80px); animation: peek 1.6s ease-in-out infinite; }
.loading .peekers img:nth-child(2) { animation-delay: .12s; } .loading .peekers img:nth-child(3) { animation-delay: .24s; }
.loading .peekers img:nth-child(4) { animation-delay: .36s; } .loading .peekers img:nth-child(5) { animation-delay: .48s; }
.loading .peekers img:nth-child(6) { animation-delay: .6s; } .loading .peekers img:nth-child(7) { animation-delay: .72s; }
.loading p { margin: 0; padding-top: 16px; border-top: 3px solid var(--ink); width: min(620px, 90%); text-align: center; font: 700 30px/1 var(--hand); }
.dots i { font-style: normal; animation: dot 1.2s infinite; display: inline-block; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
.gate { max-width: 560px; margin: 50px auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gate h1 { font-size: clamp(38px, 5vw, 56px); }
.gate > p { margin: 0; font-size: 17px; color: var(--ink-soft); }
.gate-mount { position: relative; margin-top: 100px; display: inline-block; min-width: min(400px, 100%); }
.gate-mount .peekers { position: absolute; left: 0; right: 0; bottom: calc(100% - 4px); gap: 2px; }
.gate-mount .peekers img { width: 14%; }
.gate .btn { margin-top: 10px; }

/* Motion -------------------------------------------------------------------------------------- */
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985); } }
@keyframes hop { 0% { transform: translateY(0) scale(1.06, .92); } 35% { transform: translateY(-18px) scale(.96, 1.05); } 70% { transform: translateY(0) scale(1.05, .94); } 100% { transform: translateY(0) scale(1); } }
@keyframes boing { 0% { transform: scale(1.12, .86); } 30% { transform: translateY(-16px) scale(.94, 1.08); } 60% { transform: translateY(0) scale(1.05, .95); } 80% { transform: scale(.98, 1.02); } 100% { transform: scale(1); } }
@keyframes jiggle { 0%, 100% { translate: 0 0; } 40% { translate: 0 -6px; } 70% { translate: 0 1px; } }
@keyframes pop { from { transform: scale(.92) rotate(-1deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { translate: 0 20px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes peek { 0%, 100% { transform: translateY(16%); } 45%, 60% { transform: translateY(0); } }
@keyframes shuffle { 0% { transform: rotate(2deg); } 30% { transform: rotate(-5deg) scale(.95); } 65% { transform: rotate(5deg) scale(1.03); } 100% { transform: rotate(2deg); } }
@keyframes dot { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsive ---------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer { grid-template-columns: 1fr; }
  .viewer-side { border-left: 0; border-top: 2px solid var(--ink); max-height: none; }
  .viewer-art img { max-height: 52vh; }
  dialog { overflow-y: auto; }
  .actor .bubble { font-size: 18px; }
  .seeker { right: 140px; width: 130px; }
  .hero:has(.dip) { grid-template-columns: minmax(0, 1fr) 280px; }
  .dip .art { height: 190px; }
  .hero .doodle { display: none; }
}
@media (max-width: 760px) {
  .shell { padding: 0 16px; }
  .top-row { gap: 10px; height: 62px; }
  .letters { font-size: 27px; }
  .wordmark em, .me span, .nav a[data-nav="home"] { display: none; }
  .nav a { padding: 6px 9px; font-size: 14px; }
  .hero, .hero:has(.dip) { grid-template-columns: 1fr; padding-top: 30px; gap: 26px; }
  .dip { width: min(100%, 320px); justify-self: center; }
  .hero .doodle { display: none; }
  .lede { font-size: 16px; }
  .toggle button { padding: 5px 10px 5px 6px; font-size: 13px; }
  .toggle button img { width: 34px; height: 30px; }
  .stage { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; margin-top: 24px; }
  .actor { padding-top: 6px; }
  .actor .bubble { display: none; }
  .actor strong { font-size: 17px; margin-top: 8px; }
  .actor em { font-size: 18px; }
  .finder { margin-top: 70px; }
  .search .btn { display: none; }
  .search input { height: 54px; font-size: 16px; }
  .seeker { right: 10px; width: 110px; }
  .label { margin: 54px 0 22px; }
  .collections { grid-template-columns: 1fr; gap: 30px; }
  .panel-text { padding: 26px 22px 28px; }
  .page-panel, .dopi-hero { grid-template-columns: 1fr; }
  .page-panel .panel-art { border-left: 0; border-top: 2px solid var(--ink); min-height: 200px; }
  .dopi-hero-art { order: -1; padding: 60px 16px 0; }
  .puppet { width: min(80%, 280px); }
  .dopi-hero-art .bubble { left: 10%; font-size: 20px; }
  .poke-me { right: 6px; top: 40%; font-size: 20px; }
  .poke-me svg { width: 40px; margin-right: 14px; }
  .dopi-hero .doodle { display: none; }
  .head i { width: 48px; height: 48px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .art, .card .art { height: 140px; }
  .section-head h2 { font-size: 23px; }
  .sec-icon { width: 40px; height: 40px; }
  .wall { grid-template-columns: 1fr; }
  .tray { left: 12px; right: 12px; transform: none; justify-content: space-between; gap: 8px; }
  .tray-thumbs { display: none; }
  dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); border-radius: 22px; }
  .foot { margin-top: 110px; }
  .foot .peekers img { width: 12vw; }
  .foot-row { padding: 20px 16px 24px; }
}
