/* ============================================================
   POPPYJAM — loud, cosmic, early-internet-but-modern
   ============================================================ */

:root{
  --navy-0:#0a0a24;
  --navy-1:#12123f;
  --navy-2:#1c1c5c;
  --pink:#ff6ec7;
  --pink-soft:#ff8fd9;
  --blue:#5b8cff;
  --cyan:#7fe8e0;
  --lilac:#b794f6;
  --coral:#ff7a8a;
  --white:#ffffff;
  --holo:linear-gradient(100deg,#ff6ec7,#b794f6,#5b8cff,#7fe8e0,#ff6ec7);
  --font-display:'Fredoka',system-ui,sans-serif;
  --font-body:'Space Grotesk',system-ui,sans-serif;
  --font-pixel:'Silkscreen',monospace;
}

*{box-sizing:border-box;margin:0;padding:0}

html{scroll-behavior:smooth}

body{
  font-family:var(--font-body);
  color:var(--white);
  background:radial-gradient(120% 120% at 50% -10%, #2a1f6b 0%, var(--navy-1) 40%, var(--navy-0) 100%);
  min-height:100vh;
  overflow-x:hidden;
  cursor:default;
}

/* sparkly star cursor on interactive things */
a,button,.cta{cursor:pointer}

/* ---------- cosmic background ---------- */
#stars{position:fixed;inset:0;z-index:-3;width:100%;height:100%}

/* soft cosmic glows — pure radial-gradient layers (no blur filter, no per-frame
   animation) so even big screens stay smooth; vw sizing keeps them overlapping */
.glow{position:fixed;z-index:-2;border-radius:50%;pointer-events:none}
.glow-pink{width:max(560px,72vw);height:max(560px,72vw);top:-200px;left:-200px;
  background:radial-gradient(circle, rgba(255,110,199,.40) 0%, rgba(255,110,199,0) 70%)}
.glow-blue{width:max(600px,76vw);height:max(600px,76vw);bottom:-240px;right:-220px;
  background:radial-gradient(circle, rgba(91,140,255,.40) 0%, rgba(91,140,255,0) 70%)}

/* ---------- DRAGGABLE BOARD (home only) ---------- */
/* full-viewport playground that sits over the starfield. the page (projects /
   agents / about / footer) is parked — hidden until you flip "see the stuff". */
.home-board main,
.home-board .footer{display:none}
.home-board.show-page main,
.home-board.show-page .footer{display:block}
.home-board.show-page #board,
.home-board.show-page #board-reset,
.home-board.show-page #board-share{display:none}

/* board mode is a full-screen surface — the page itself must not scroll
   (only the ticker would move, which reads as broken). flipping to
   "see the stuff" hands normal scrolling back. */
.home-board{height:100vh;overflow:hidden}
.home-board.show-page{height:auto;overflow:visible;overflow-x:hidden}

.board{position:fixed;inset:0;z-index:1;overflow:hidden;touch-action:none}

/* the centerpiece — same glow + bob as the old hero logo, never grabs a drag */
.board__logo{
  position:absolute;z-index:5;width:min(230px,32vw);line-height:0; /* default = half the old size; resize handle still scales it */
  cursor:grab;touch-action:none;user-select:none;
}
.board__logo.dragging{cursor:grabbing}
/* drag-to-resize handle on the centerpiece logo (reuses .board-item__resize, shows on hover) */
.board__logo .board-item__resize{right:4px;bottom:4px;opacity:0}
.board__logo:hover .board-item__resize{opacity:1}
.board__logo img{
  width:100%;height:auto;display:block;
  filter:drop-shadow(0 0 40px rgba(255,110,199,.45)) drop-shadow(0 0 90px rgba(91,140,255,.35));
  animation:bob 5s ease-in-out infinite;
}

/* a draggable vaporwave tile */
.tile{
  position:absolute;z-index:1;
  border-radius:22px;overflow:hidden;
  border:2px solid rgba(255,255,255,.12);
  background:rgba(20,20,60,.55);
  box-shadow:0 14px 40px rgba(0,0,0,.45);
  cursor:grab;touch-action:none;
  transition:box-shadow .2s, transform .15s cubic-bezier(.2,.8,.3,1.2);
}
.tile:hover{box-shadow:0 18px 50px rgba(91,140,255,.45)}
.tile.dragging{cursor:grabbing;transform:scale(1.05);box-shadow:0 26px 70px rgba(0,0,0,.6)}
.tile video,.tile img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
/* linked tile: a little "open ↗" caption that fades in on hover */
.tile__go{
  position:absolute;left:0;right:0;bottom:0;z-index:3;pointer-events:none;
  font-family:var(--font-pixel);font-size:.58rem;letter-spacing:.5px;
  color:var(--white);text-align:center;padding:9px 6px 8px;
  background:linear-gradient(to top, rgba(8,8,24,.9), rgba(8,8,24,0));
  opacity:0;transition:opacity .2s;
}
.tile--link:hover .tile__go,.tile--link.dragging .tile__go{opacity:1}
/* holographic border on hover — same mask trick as .card / .agent */
.tile::before{
  content:"";position:absolute;inset:0;border-radius:22px;padding:2px;
  background:var(--holo);background-size:300% 300%;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  opacity:0;transition:opacity .2s;pointer-events:none;z-index:2;
}
.tile:hover::before,.tile.dragging::before{opacity:1;animation:huemove 6s linear infinite}

/* corner controls */
.board-toolbar{
  position:fixed;right:18px;bottom:18px;z-index:60;
  display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;
}
.board-pill{
  font-family:var(--font-pixel);font-size:.6rem;letter-spacing:1px;
  color:var(--cyan);cursor:pointer;
  padding:10px 16px;border-radius:999px;
  border:2px solid rgba(127,232,224,.4);
  background:rgba(14,14,42,.86); /* was rgba(10,10,36,.55)+blur — blur re-rasterizes over the moving starfield every frame */
  transition:transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.board-pill:hover{
  transform:translateY(-2px);color:var(--white);
  background:rgba(127,232,224,.14);box-shadow:0 10px 30px rgba(127,232,224,.25);
}

/* ---------- bottom tool dock ---------- */
.dock{
  position:fixed;left:50%;bottom:16px;transform:translateX(-50%);
  z-index:70;display:flex;gap:10px;align-items:center;
  padding:7px 12px;border-radius:16px;
  background:rgba(20,20,26,.95); /* dropped backdrop blur — it re-blurred the starfield every frame */
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 12px 40px rgba(0,0,0,.55);
}
.home-board.show-page .dock{display:none}
.dock__tool{
  width:40px;height:40px;border-radius:11px;cursor:pointer;padding:0;
  display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.35);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.dock__tool:hover{transform:translateY(-2px)}
.dock__tool[aria-pressed="true"]{
  border-color:var(--cyan);
  box-shadow:0 0 0 2px rgba(127,232,224,.45), 0 0 18px rgba(127,232,224,.45);
}
.dock__tool svg, .dock__vapor{pointer-events:none}
.dock__vapor{
  width:24px;height:24px;border-radius:6px;
  background:var(--holo);background-size:200% 200%;
  animation:huemove 5s linear infinite;
  box-shadow:inset 0 0 8px rgba(255,255,255,.45);
}
/* armed: crosshair everywhere on the board */
body.draw-mode, body.draw-mode #board, body.draw-mode .tile,
body.draw-mode .board__logo{cursor:crosshair !important}
/* the rubber-band selection rectangle */
.draw-rect{
  position:fixed;z-index:65;pointer-events:none;border-radius:8px;
  border:2px dashed var(--cyan);background:rgba(127,232,224,.12);
}
.dock__cat{width:26px;height:26px;border-radius:7px;object-fit:cover;display:block}
.dock__glyph{font-family:var(--font-pixel);font-size:.9rem;color:#fff;line-height:1}

/* ---------- pen: freehand holographic white ink ---------- */
.board-ink{
  /* a BIG, viewBox-centered canvas (viewBox set in board-kit.js) so strokes at any
     world coord paint without clipping. An outer <svg> sized 0×0 with overflow:visible
     paints in WebKit but Blink/Chrome clips it to the 0×0 viewport (strokes disappear
     in Chrome) — so we give it a real, large box centered on the world origin instead. */
  position:absolute;left:-100000px;top:-100000px;width:200000px;height:200000px;
  pointer-events:none;overflow:visible;
  /* foreground, always: tiles' inline z-index climbs forever (++topZ on every create/
     select/drag — no ceiling), so a small fixed z-index here would eventually get
     buried under an old, heavily-clicked board. 900 is comfortably past any topZ a
     real board reaches; .ink-spark (901) and .board-artboard (850, agentboard.css)
     live in this same "always-on-top" band, so pen ink + capture boxes both stay
     above every ordinary tile. */
  z-index:900;
}
/* Each stroke is a FILLED variable-width ribbon now (board-kit inkOutline), not a
   stroked line — so the nib can taper with speed. Its fill (white by default, or a
   picked color) AND its glow both come from board-kit: the glow is a native SVG
   <filter> (#pj-ink-glow / #pj-ink-glow-c) set as an attribute per path, because a
   CSS `filter` on an SVG path renders NOTHING in WebKit (the pet's WKWebView) — that
   was the "no rainbow glow in the pet" bug. So this rule must NOT set `filter`; it'd
   override the working SVG one. The holo hue-cycle is SMIL inside the filter. */
.board-ink .ink-stroke{ stroke:none; }
/* a selected stroke wears a crisp cyan dashed outline hugging its shape (the board
   floats its color wheel above it too). non-scaling-stroke keeps the dashes fine at
   any zoom. */
.board-ink .ink-stroke.is-sel{
  stroke:var(--cyan,#7fe8e0);stroke-width:1.6;stroke-dasharray:5 4;
  vector-effect:non-scaling-stroke;
}
/* little embers flung off the tip while drawing (ephemeral — never saved) */
.ink-spark{
  position:absolute;z-index:901;pointer-events:none; /* one above .board-ink — embers ride over the strokes they're flung from */
  width:var(--len,8px);height:2px;border-radius:2px;
  margin-left:calc(var(--len,8px) / -2);margin-top:-1px; /* center on the tip */
  background:linear-gradient(90deg,transparent,currentColor 45%,#fff);
  box-shadow:0 0 6px currentColor,0 0 2px #fff;
  transform-origin:50% 50%;
  animation:inkspark var(--dur,.6s) ease-out forwards;
}
/* rotate(angle) then translateX(distance) → the ember shoots along its own
   angle with the streak pointing the way; scaleX stretches it as it goes */
@keyframes inkspark{
  0%{opacity:1;transform:rotate(var(--ang,0)) translateX(2px) scaleX(.35)}
  100%{opacity:0;transform:rotate(var(--ang,0)) translateX(var(--dist,20px)) scaleX(1)}
}
/* reduced motion: board-kit omits the SMIL hue-cycle from the ink filter, so the glow
   just sits still — nothing to disable here anymore. */

/* ---------- board items: link tiles + note boxes ---------- */
.board-item{position:absolute;z-index:1;touch-action:none;user-select:none}

/* hyperlink tile — favicon + name + domain (the desktop board's link look);
   added/edited through the pj-modal (board.js openLinkModal), never typed inline */
.board-link{
  display:flex;align-items:center;
  padding:12px 14px;border-radius:16px;cursor:grab; /* no overflow:hidden — the ✕/✎/resize nubs overhang the corners */
  background:rgba(22,22,58,.92); /* dropped backdrop blur (per-frame re-blur over the starfield) */
  border:2px solid rgba(255,255,255,.12);box-shadow:0 14px 40px rgba(0,0,0,.45);
}
.board-link:hover{box-shadow:0 18px 50px rgba(91,140,255,.42)}
.board-link.dragging{cursor:grabbing}
.board-link::before{
  content:"";position:absolute;inset:0;border-radius:16px;padding:2px;pointer-events:none;
  background:var(--holo);background-size:300% 300%;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transition:opacity .2s;
}
.board-link:hover::before{opacity:1;animation:huemove 6s linear infinite}
.board-link__body{display:flex;align-items:center;gap:10px;width:100%;min-width:0}
.board-link__icon{
  flex:none;width:28px;height:28px;border-radius:8px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.06);color:rgba(255,255,255,.7);
}
.board-link__icon img{width:100%;height:100%;object-fit:cover;display:block}
.board-link__main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px}
.board-link__title{
  font-family:var(--font-display);font-weight:600;font-size:.95rem;color:#fff;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.board-link__url{
  font-family:var(--font-pixel);font-size:.52rem;letter-spacing:.5px;color:var(--cyan);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.board-link__url:empty{display:none}
.board-link__copy{
  flex:none;width:24px;height:24px;border:none;border-radius:7px;padding:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;font:600 13px/1 system-ui,sans-serif;
  background:rgba(255,255,255,.08);color:rgba(255,255,255,.75);opacity:0;
  transition:opacity .15s,background .15s,color .15s;
}
.board-link:hover .board-link__copy,.board-link__copy:focus-visible{opacity:1}
.board-link__copy:hover{background:rgba(127,232,224,.2);color:#fff}
.board-link__go{flex:none;margin-left:8px;font-family:var(--font-pixel);font-size:.52rem;color:var(--cyan);opacity:0;transition:opacity .15s;white-space:nowrap}
.board-link:hover .board-link__go{opacity:1}
.board-link__edit{
  position:absolute;top:-8px;right:18px;z-index:5;width:22px;height:22px;border-radius:50%;
  border:none;cursor:pointer;color:#1a1140;font:700 11px/1 system-ui,sans-serif;opacity:0;
  background:var(--cyan);box-shadow:0 2px 8px rgba(0,0,0,.5);transition:opacity .15s;
  display:flex;align-items:center;justify-content:center;padding:0;
}
.board-link:hover .board-link__edit{opacity:1}

/* note — drawn as a box (like the vaporwave rect), typed into inline */
.board-note{
  padding:12px 14px;border-radius:14px;cursor:grab; /* no overflow:hidden — it was cutting the ✕ off (text clips itself) */
  background:rgba(14,12,28,.94); /* dropped backdrop blur (per-frame re-blur over the starfield) */
  border:1px solid rgba(255,255,255,.1);box-shadow:0 16px 44px rgba(0,0,0,.6);
}
.board-note.dragging{cursor:grabbing}
.board-note.editing{
  cursor:text;border-color:color-mix(in srgb,var(--cyan) 45%,transparent);
  box-shadow:0 16px 44px rgba(0,0,0,.6),0 0 0 1px color-mix(in srgb,var(--cyan) 40%,transparent);
}
.board-note__text{
  width:100%;height:100%;overflow:auto;outline:none;
  font-family:var(--font-body);font-size:1rem;line-height:1.5;color:#fff;
  white-space:pre-wrap;word-break:break-word;
}
.board-note__text:empty::before{content:"type…";color:rgba(255,255,255,.3)}

/* shared remove button on links/notes/agents */
.board-item__del{
  position:absolute;top:-8px;right:-8px;z-index:5;width:22px;height:22px;border-radius:50%;
  border:none;cursor:pointer;color:#fff;font:700 12px/1 system-ui,sans-serif;opacity:0;
  background:rgba(255,91,122,.95);box-shadow:0 2px 8px rgba(0,0,0,.5);transition:opacity .15s;
  display:flex;align-items:center;justify-content:center;padding:0;
}
.board-link:hover .board-item__del,.board-note:hover .board-item__del,
.board-todo:hover .board-item__del,.board-text:hover .board-item__del{opacity:1}
/* the agent board's flavor of this button carries an inline Material Symbols svg
   (agentboard.js's icon() helper, sized via its px argument) instead of the plain-board
   ✕ text glyph above — this just keeps it from ever stretching past the button. */
.board-item__del svg{display:block;max-width:100%;max-height:100%}

/* quiet copy chip beside the ✕ on notes + canvas texts — same hover-reveal idiom
   (links carry their own inline .board-link__copy instead) */
.board-item__copy{
  position:absolute;top:-8px;right:18px;z-index:5;width:22px;height:22px;border-radius:50%;
  border:none;cursor:pointer;padding:0;opacity:0;font:600 12px/1 system-ui,sans-serif;
  display:flex;align-items:center;justify-content:center;
  background:rgba(20,20,60,.95);color:rgba(255,255,255,.85);
  box-shadow:0 2px 8px rgba(0,0,0,.5);transition:opacity .15s,background .15s,color .15s;
}
.board-item__copy:hover{background:rgba(127,232,224,.35);color:#fff}
.board-note:hover .board-item__copy,.board-text:hover .board-item__copy,
.board-item.selected .board-item__copy{opacity:1} /* selected = the touch fallback, like the ✕ */

/* drag-to-resize handle (link / todo / text tiles) */
.board-item__resize{
  position:absolute;right:-7px;bottom:-7px;z-index:5;width:16px;height:16px;border-radius:50%;
  cursor:nwse-resize;opacity:0;transition:opacity .15s;
  background:var(--cyan);border:2px solid rgba(10,10,36,.6);box-shadow:0 2px 8px rgba(0,0,0,.5);
}
.board-link:hover .board-item__resize,.board-todo:hover .board-item__resize,
.board-text:hover .board-item__resize,.board-text.selected .board-item__resize{opacity:1}

/* ---------- agent picker (pick who you place) ---------- */
.agent-picker{
  position:fixed;left:50%;bottom:74px;transform:translateX(-50%);z-index:80;
  display:none;flex-direction:column;align-items:center;gap:8px;padding:11px 14px 9px;border-radius:18px;
  background:rgba(20,20,26,.96); /* dropped backdrop blur */
  border:1px solid rgba(255,255,255,.1);box-shadow:0 16px 50px rgba(0,0,0,.6);
}
.agent-picker.show{display:flex;animation:pickin .18s ease}
@keyframes pickin{from{opacity:0;transform:translateX(-50%) translateY(8px)}to{opacity:1;transform:translateX(-50%)}}
.agent-picker__row{display:flex;align-items:center;gap:10px}
.agent-picker__empty{font-family:var(--font-pixel);font-size:.55rem;letter-spacing:.5px;color:rgba(255,255,255,.5);padding:14px 8px}
.agent-picker__all{font-family:var(--font-pixel);font-size:.5rem;letter-spacing:1px;text-transform:uppercase;color:var(--cyan);text-decoration:none;opacity:.85}
.agent-picker__all:hover{color:var(--pink-soft);opacity:1}
.agent-picker__face{
  position:relative;width:62px;aspect-ratio:3/4;border-radius:12px;overflow:hidden;cursor:pointer;padding:0;
  border:2px solid rgba(255,255,255,.12);background:#000;
  transition:transform .15s,border-color .15s,box-shadow .15s;
}
.agent-picker__face:hover{transform:translateY(-3px)}
.agent-picker__face.on{border-color:var(--ac);box-shadow:0 0 0 1px var(--ac),0 8px 20px color-mix(in srgb,var(--ac) 50%,transparent)}
.agent-picker__face video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.agent-picker__face span{
  position:absolute;left:0;right:0;bottom:0;padding:10px 2px 4px;text-align:center;
  font-family:var(--font-pixel);font-size:.42rem;color:#fff;
  background:linear-gradient(to top,rgba(8,8,24,.92),transparent);
}

/* ---------- inline poppyjam modal (links / notes) ---------- */
.pj-modal-backdrop{
  position:fixed;inset:0;z-index:300;background:rgba(6,6,20,.5);
  opacity:0;transition:opacity .15s;
}
.pj-modal-backdrop.show{opacity:1}
.pj-modal{
  position:fixed;z-index:301;width:min(300px,92vw);padding:18px 18px 15px;border-radius:18px;
  background:radial-gradient(140% 100% at 50% 0%, rgba(24,20,42,.98), rgba(12,10,24,.99));
  box-shadow:0 30px 80px rgba(0,0,0,.6);
  opacity:0;transform:scale(.96);transition:opacity .16s,transform .16s cubic-bezier(.2,.8,.3,1.2);
}
.pj-modal.show{opacity:1;transform:scale(1)}
.pj-modal::before{
  content:"";position:absolute;inset:0;border-radius:18px;padding:2px;pointer-events:none;
  background:var(--holo);background-size:300% 300%;animation:huemove 6s linear infinite;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
}
.pj-modal__title{
  display:flex;align-items:center;gap:9px;margin-bottom:15px;
  font-family:var(--font-display);font-weight:700;font-size:1.08rem;color:#fff;
}
.pj-modal__dot{
  width:11px;height:11px;border-radius:50%;flex:none;
  background:var(--holo);background-size:200% 200%;animation:huemove 5s linear infinite;box-shadow:0 0 8px var(--pink);
}
.pj-field{display:flex;flex-direction:column;gap:6px;margin-bottom:13px}
.pj-field>span{font-family:var(--font-pixel);font-size:.5rem;letter-spacing:1px;text-transform:uppercase;color:rgba(255,255,255,.55)}
.pj-field input,.pj-field textarea{
  width:100%;font-family:var(--font-body);font-size:.96rem;color:#fff;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:11px;
  padding:10px 12px;outline:none;transition:border-color .15s,box-shadow .15s;
}
.pj-field input::placeholder,.pj-field textarea::placeholder{color:rgba(255,255,255,.32)}
.pj-field input:focus,.pj-field textarea:focus{border-color:var(--pink);box-shadow:0 0 0 2px rgba(255,110,199,.22)}
.pj-field textarea{resize:vertical;min-height:68px;line-height:1.45}
.pj-modal__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}
.pj-btn{font-family:var(--font-display);font-weight:600;font-size:.9rem;border:none;cursor:pointer;border-radius:999px;padding:9px 17px;transition:transform .14s,box-shadow .15s,color .15s}
.pj-btn--ghost{background:transparent;color:rgba(255,255,255,.55)}
.pj-btn--ghost:hover{color:#fff}
.pj-btn--go{color:#1a1140;background:var(--holo);background-size:300% 300%;animation:huemove 6s linear infinite;box-shadow:0 6px 20px rgba(255,110,199,.35)}
.pj-btn--go:hover{transform:translateY(-1px);box-shadow:0 9px 26px rgba(255,110,199,.5)}

/* selected stamp: cyan ring + its ✕ delete button (shows on hover or while selected) */
.board-item.selected{outline:2px solid var(--cyan);outline-offset:3px}
.stamp .board-item__del{top:6px;right:6px}
.stamp:hover .board-item__del,.board-item.selected .board-item__del{opacity:1}

/* ---------- cat agent: hunger bar + feed heart + remove ---------- */
.agent{cursor:grab}
.agent.hungry{animation:hungrypulse 1.6s ease-in-out infinite}
@keyframes hungrypulse{50%{box-shadow:0 0 0 2px rgba(255,91,122,.6), 0 0 22px rgba(255,91,122,.5)}}
/* vertical bar on the right edge, matching the desktop pet window */
.agent__hunger{
  position:absolute;right:8px;top:14%;bottom:14%;z-index:4;width:6px;
  background:rgba(0,0,0,.55);border-radius:999px;overflow:hidden;pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
  opacity:0;transition:opacity .15s;
}
/* hover-only — but always visible when she's actually starving */
.agent:hover .agent__hunger,.agent.hungry .agent__hunger{opacity:1}
.agent__hunger span{position:absolute;left:0;right:0;bottom:0;height:100%;background:#5bffa0;
  transition:height .4s ease, background .4s ease}

/* ---------- agent right-click menu ---------- */
.agent-menu{
  position:fixed;z-index:200;min-width:150px;padding:6px;
  display:flex;flex-direction:column;gap:2px;
  background:rgba(14,14,42,.96);border:1px solid rgba(255,255,255,.14);
  border-radius:14px;box-shadow:0 12px 34px rgba(0,0,0,.5);
}
.agent-menu__item{
  border:none;background:none;color:#fff;cursor:pointer;text-align:left;
  font:600 13px/1 var(--font-display,system-ui);letter-spacing:.02em;
  padding:9px 12px;border-radius:9px;transition:background .12s;
}
.agent-menu__item:hover{background:rgba(255,110,199,.18)}
.agent__del{
  position:absolute;top:6px;right:6px;z-index:5;width:22px;height:22px;border-radius:50%;
  border:none;cursor:pointer;color:#fff;font:700 12px/1 system-ui,sans-serif;opacity:0;
  background:rgba(255,91,122,.92);box-shadow:0 2px 8px rgba(0,0,0,.5);transition:opacity .15s;
}
.agent:hover .agent__del{opacity:1}
.agent__heart{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-size:54px;opacity:0;pointer-events:none;z-index:6;
}
.agent__heart.pop{animation:heartpop .9s ease-out}
@keyframes heartpop{
  0%{opacity:0;transform:scale(.4)}
  25%{opacity:1;transform:scale(1.1)}
  100%{opacity:0;transform:scale(1.5) translateY(-22px)}
}
/* drag a snack over her → she leans in: accent ring-glow on the tile, spring on
   the video (never the tile itself — its transform belongs to the resize scale) */
.agent video{transition:transform .3s cubic-bezier(.34,1.56,.64,1)}
.agent.feeding{
  border-color:var(--accent,#ff6ec7);
  box-shadow:0 0 0 2px var(--accent,#ff6ec7), 0 0 30px var(--accent,#ff6ec7);
}
.agent.feeding video{transform:scale(1.07)}

/* ---------- top tab nav (board / agents / clipstage) ---------- */
/* pinned under the ticker by default — but draggable on the board (drag.js),
   so first-timers get the tidy stack and tinkerers can fling it anywhere */
.pj-tabs{
  position:fixed; top:44px; left:50%; transform:translateX(-50%); z-index:80;
  display:flex; gap:4px; padding:5px; border-radius:999px;
  background:rgba(14,14,42,.9); border:1px solid rgba(255,255,255,.12);
  box-shadow:0 10px 34px rgba(0,0,0,.5);
  cursor:grab; user-select:none; touch-action:none;
}
.pj-tabs.dragging{ cursor:grabbing; }
.pj-tab{
  font-family:var(--font-display); font-weight:700; font-size:.82rem; letter-spacing:.6px; text-transform:uppercase;
  color:rgba(255,255,255,.62); text-decoration:none; padding:8px 16px; border-radius:999px;
  white-space:nowrap; /* "SUPER CLIPPY" has a space — without this the fixed-pos
    fit-content cap (see the phone block below) word-wraps it inside its pill */
  transition:color .15s ease, background .15s ease;
}
.pj-tab:hover{ color:#fff; }
.pj-tab.is-active{ color:#1a1140; background:var(--holo); background-size:300% 300%; } /* static holo (no idle churn) */
/* holo rainbow ring on the tab row — same mask trick as .card / .tile */
.pj-tabs::before{
  content:"";position:absolute;inset:0;border-radius:999px;padding:2px;
  background:var(--holo);background-size:300% 300%;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  pointer-events:none;
}
/* animate the ring only on hover — no idle gradient churn, same rule as the cards */
.pj-tabs:hover::before{animation:huemove 6s linear infinite}
/* the tab that leaves the site — ↗ marks the way out */
.pj-tab__ext{margin-left:6px;font-family:var(--font-pixel);font-size:.7rem;opacity:.7}
.pj-tab--out:hover .pj-tab__ext{opacity:1}
/* five tabs need to fit a phone — wrap into a rounded two-row pill.
   width is EXPLICIT, not max-width: a fixed box with left:50% shrink-to-fits
   against (viewport − left) = 50vw, so once wrap lowers min-content the auto
   width collapses to a skinny off-balance tower and max-width never engages.
   252px holds the measured ABUNCHOF.TOOLS + SUPER CLIPPY row (232px) with
   air, and packs the five tabs as balanced 3 + 2. */
@media (max-width:600px){
  .pj-tabs{gap:2px;padding:4px;flex-wrap:wrap;justify-content:center;
    border-radius:22px;width:252px}
  .pj-tabs::before{border-radius:22px}
  .pj-tab{padding:7px 9px;font-size:.68rem;letter-spacing:.4px}
  .pj-tab__ext{margin-left:4px;font-size:.6rem}
}

/* ---------- the board on phones ----------
   the board stays the landing view — it's all pointer events, so touch just
   works. what phones need is room: the corner pills stack ABOVE the dock
   instead of colliding with it, and the dock tightens to fit 360px. */
@media (max-width:600px){
  .dock{
    bottom:calc(10px + env(safe-area-inset-bottom));
    gap:6px;padding:6px 8px;
  }
  /* the dock gained an 8th tool (rich text) — shrink tools so 8 + gaps +
     padding still clear a 360px viewport (8×40+7×6+16+2 ≈ 402px overflowed;
     8×34+7×6+16+2 ≈ 332px fits with room to spare) */
  .dock__tool{width:34px;height:34px;border-radius:9px}
  .board-toolbar{
    right:12px;
    bottom:calc(76px + env(safe-area-inset-bottom)); /* clear of the dock */
    flex-direction:column;align-items:flex-end;gap:8px;
  }
  /* content view: the dock is gone, so "back to the board" returns to the corner */
  .home-board.show-page .board-toolbar{bottom:calc(12px + env(safe-area-inset-bottom))}
}
/* iOS: 100vh hides behind the url bar — dvh tracks the real viewport */
@supports (height:100dvh){
  .home-board{height:100dvh}
  .home-board.show-page{height:auto}
}

/* ---------- account corner (top-right): log in / create account ---------- */
/* board-pill family pinned opposite the corner pills, level with the tabs'
   rail. account chrome is site nav, not a board toy — like the tabs, it
   stays put in show-page mode. auth.js swaps the pair for "hi, you ✦". */
.auth-corner{
  position:fixed;top:47px;right:18px;z-index:80;
  display:flex;gap:10px;align-items:center;
}
/* the primary of the pair gets the pink ring (log in keeps the family cyan) */
.board-pill--pink{color:var(--pink-soft);border-color:rgba(255,110,199,.5)}
.board-pill--pink:hover{background:rgba(255,110,199,.14);box-shadow:0 10px 30px rgba(255,110,199,.3)}
/* signed in: "hi, you ✦" is a status, not a button — no pointer, no lift */
.auth-hi{
  cursor:default;color:var(--pink-soft);border-color:rgba(255,110,199,.35);
  max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.auth-hi:hover{transform:none;background:rgba(14,14,42,.86);box-shadow:none;color:var(--pink-soft)}
/* keyboard focus on the pills: the cyan ring the dock tools use */
.board-pill:focus-visible,.pj-btn:focus-visible,.auth-modal__swaplink:focus-visible{
  outline:2px solid var(--cyan);outline-offset:2px;
}
/* under ~1140px the centered 5-tab rail (589px wide) reaches the corner —
   drop below it. clear needs vw > 589 + 2×(corner 234 + inset 18) ≈ 1093. */
@media (max-width:1140px){
  .auth-corner{top:96px;right:12px}
}
/* phones: the tabs wrap to two rows (44px + 66px tall) — drop further */
@media (max-width:600px){
  .auth-corner{top:118px;gap:8px}
  .auth-hi{max-width:140px}
}

/* ---------- account modal (auth.js) ---------- */
/* the links/notes pj-modal glass, centered + a touch wider for the form */
.auth-modal{
  left:50%;top:50%;width:min(340px,calc(100vw - 28px));
  transform:translate(-50%,-50%) scale(.96);
}
.auth-modal.show{transform:translate(-50%,-50%) scale(1)}
.auth-modal__msg{min-height:18px;margin:-3px 0 5px;font-size:.82rem;line-height:1.4;color:var(--pink-soft)}
.auth-modal__msg.is-info{color:#9ad4ff}   /* "check your email ✉" is news, not an error */
.auth-modal__swap{margin-top:13px;text-align:center;font-size:.82rem;color:rgba(255,255,255,.55)}
.auth-modal__swaplink{
  border:none;background:none;padding:2px;cursor:pointer;
  font:inherit;font-weight:600;color:var(--cyan);
  text-decoration:underline;text-underline-offset:3px;
}
.auth-modal__swaplink:hover{color:var(--pink-soft)}

/* ---------- top ticker (modern marquee — rides the very top, tabs pin under it) ---------- */
.ticker{
  position:sticky;top:0;z-index:50;
  background:rgba(10,10,36,.9); /* dropped blur — this bar sits over the 30fps starfield and re-blurred it every frame */
  border-bottom:2px solid rgba(255,255,255,.12);
  overflow:hidden;white-space:nowrap;
  font-family:var(--font-pixel);font-size:.72rem;letter-spacing:1px;
}
.ticker__track{display:inline-block;padding:9px 0;animation:scroll 47s linear infinite} /* ~60% of the old 28s speed — readable, not rushing */
.ticker__track span{margin:0 1.4rem;color:var(--cyan)}
.ticker__track b{color:var(--pink-soft)}
@keyframes scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* ---------- glass search pills (board only) ---------- */
/* slim pills so poppyjam works as a browser homepage. the board stays the
   star — the default pill sits right under the logo, and each one is a board
   toy: drag it anywhere (drag.js), ✕ removes it, the dock adds more (max 5). */
.searchbar{
  position:fixed;left:50%;transform:translateX(-50%);z-index:75;
  top:calc(50% + min(115px, 16vw) + 24px); /* just under the logo: 50vh + half its min(230px,32vw) square + a 24px gap */
  display:flex;align-items:center;gap:4px;
  width:min(440px,calc(100vw - 32px));height:44px;
  padding:0 12px 0 4px;border-radius:999px;
  background:rgba(14,14,42,.88); /* no backdrop blur — same starfield perf rule as .board-pill */
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 12px 40px rgba(0,0,0,.45);
  transition:border-color .15s ease, box-shadow .15s ease;
  cursor:grab;touch-action:none; /* the whole pill drags — only the input keeps its text cursor */
}
.searchbar.dragging{cursor:grabbing}
/* focus ring lives on the pill — cyan border + soft glow, same accent as the dock */
.searchbar:focus-within{
  border-color:rgba(127,232,224,.7);
  box-shadow:0 12px 40px rgba(0,0,0,.45),0 0 22px rgba(127,232,224,.28);
}
.home-board.show-page .searchbar{display:none}
/* the shared board-item ✕, same reveal as links/notes (or when tabbed to) */
.searchbar:hover .board-item__del,
.searchbar .board-item__del:focus-visible{opacity:1}

/* engine glyph — pixel letter, click for the engine menu */
.searchbar__engine{
  flex:0 0 auto;width:40px;height:36px;border-radius:999px;cursor:pointer;
  font-family:var(--font-pixel);font-size:.8rem;line-height:1;color:var(--cyan);
  border:none;background:rgba(127,232,224,.1);
  transition:background .15s ease, color .15s ease;
}
.searchbar__engine:hover{background:rgba(127,232,224,.2);color:var(--white)}
.searchbar__engine:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(127,232,224,.8)}

.searchbar__input{
  flex:1;min-width:0;height:100%;border:none;background:none;outline:none;
  font-family:var(--font-body);font-size:.95rem;color:var(--white);
  cursor:text; /* the one part of the pill that isn't a drag handle */
}
.searchbar__input::placeholder{color:rgba(255,255,255,.55)}
.searchbar__input::-webkit-search-cancel-button{-webkit-appearance:none} /* keep the pill clean */

/* "/" key hint — hidden once you're in (and on touch, where there's no keyboard) */
.searchbar__hint{
  flex:0 0 auto;width:20px;height:20px;border-radius:5px;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-pixel);font-size:.6rem;color:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.25);
  transition:opacity .15s ease;
}
.searchbar:focus-within .searchbar__hint{opacity:0}
@media (hover:none){.searchbar__hint{display:none}}

/* tiny engine menu — drops under the glyph, built from the ENGINES array */
.searchbar__menu{
  position:absolute;top:calc(100% + 8px);left:4px;
  display:flex;flex-direction:column;gap:2px;padding:6px;border-radius:18px;
  background:rgba(14,14,42,.96);border:1px solid rgba(255,255,255,.16);
  box-shadow:0 16px 44px rgba(0,0,0,.6);
}
.searchbar__menu--up{top:auto;bottom:calc(100% + 8px)} /* pill dragged low → menu flips up */
.searchbar__menu[hidden]{display:none}
.searchbar__opt{
  display:flex;align-items:center;gap:10px;cursor:pointer;
  min-height:40px;padding:0 18px 0 8px;border-radius:999px;border:none;background:none;
  font-family:var(--font-pixel);font-size:.6rem;letter-spacing:1px;
  color:rgba(255,255,255,.78);text-transform:lowercase;text-align:left;
  transition:background .15s ease, color .15s ease;
}
.searchbar__opt b{width:24px;text-align:center;color:var(--cyan);font-weight:400;font-size:.7rem}
.searchbar__opt:hover{background:rgba(255,255,255,.08);color:var(--white)}
.searchbar__opt:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(127,232,224,.8)}
.searchbar__opt[aria-checked="true"]{background:rgba(127,232,224,.12);color:var(--cyan)}

/* amazon associates disclosure — a quiet little line pinned under the pill,
   rides along when it's dragged. searchbar.js shows it only on amazon pills
   (and only while AMAZON_TAG is set — no tag, no affiliate link, no line). */
.searchbar__note{
  position:absolute;top:calc(100% + 6px);left:0;right:0;margin:0;text-align:center;
  font-family:var(--font-pixel);font-size:.6rem;letter-spacing:.5px;
  color:rgba(255,255,255,.6);pointer-events:none;user-select:none;
}
.searchbar__note[hidden]{display:none}

/* first-visit tip — a little tag under the engine glyph ("click to switch sites"),
   removed by searchbar.js the moment any glyph gets clicked, never shown again */
.searchbar__tip{
  position:absolute;top:calc(100% + 12px);left:8px;white-space:nowrap;
  padding:6px 10px;border-radius:9px;
  font-family:var(--font-pixel);font-size:.6rem;letter-spacing:.5px;color:var(--white);
  background:rgba(14,14,42,.96);border:1px solid rgba(127,232,224,.5);
  box-shadow:0 6px 22px rgba(0,0,0,.4);
  pointer-events:none;user-select:none;z-index:3;
  animation:pj-tip-bob 2.4s ease-in-out infinite;
}
.searchbar__tip::before{ /* caret pointing up at the glyph */
  content:"";position:absolute;top:-5px;left:16px;width:8px;height:8px;
  background:rgba(14,14,42,.96);
  border-left:1px solid rgba(127,232,224,.5);border-top:1px solid rgba(127,232,224,.5);
  transform:rotate(45deg);
}
@keyframes pj-tip-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(3px)}}

/* step-two tip — floats above the dock once the search tip is dismissed; any press
   on the dock retires it for good (searchbar.js owns the little two-step tour) */
.dock__tip{
  position:absolute;bottom:calc(100% + 12px);left:50%;
  width:max-content;max-width:88vw;text-align:center;
  padding:6px 10px;border-radius:9px;
  font-family:var(--font-pixel);font-size:.6rem;letter-spacing:.5px;color:var(--white);
  background:rgba(14,14,42,.96);border:1px solid rgba(127,232,224,.5);
  box-shadow:0 6px 22px rgba(0,0,0,.4);
  pointer-events:none;user-select:none;
  transform:translateX(-50%);
  animation:pj-tip-bob-c 2.4s ease-in-out infinite;
}
.dock__tip::after{ /* caret pointing down at the dock */
  content:"";position:absolute;bottom:-5px;left:50%;width:8px;height:8px;
  background:rgba(14,14,42,.96);
  border-right:1px solid rgba(127,232,224,.5);border-bottom:1px solid rgba(127,232,224,.5);
  transform:translateX(-50%) rotate(45deg);
}
@keyframes pj-tip-bob-c{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,-3px)}}
@media (prefers-reduced-motion:reduce){.searchbar__tip,.dock__tip{animation:none}}

main{max-width:1080px;margin:0 auto;padding:0 22px}

/* ---------- HERO ---------- */
.hero{text-align:center;padding:70px 0 60px}
.hero__badge{
  display:inline-block;font-family:var(--font-pixel);font-size:.65rem;
  letter-spacing:1.5px;color:var(--cyan);
  border:2px solid rgba(127,232,224,.4);border-radius:999px;
  padding:6px 14px;margin-bottom:26px;background:rgba(127,232,224,.06);
}
.blink{animation:blink 1.1s steps(1) infinite;color:#5bffa0}
@keyframes blink{50%{opacity:0}}

.hero__logo{
  width:min(560px,86vw);height:auto;
  filter:drop-shadow(0 0 40px rgba(255,110,199,.45)) drop-shadow(0 0 90px rgba(91,140,255,.35));
  animation:bob 5s ease-in-out infinite;
}
@keyframes bob{50%{transform:translateY(-14px)}}

.hero__tag{
  font-family:var(--font-display);font-weight:600;
  font-size:clamp(1.4rem,4.5vw,2.4rem);line-height:1.2;
  margin:14px auto 6px;max-width:620px;
}
.rainbow{
  background:var(--holo);background-size:300% 300%;
  -webkit-background-clip:text;background-clip:text;color:transparent;
  animation:huemove 6s linear infinite;
}
@keyframes huemove{to{background-position:300% 0}}

.hero__sub{font-size:1rem;color:rgba(255,255,255,.6);letter-spacing:.3px}

.cta{
  display:inline-block;margin-top:34px;
  font-family:var(--font-display);font-weight:700;font-size:1.05rem;
  color:#1a1140;text-decoration:none;
  padding:14px 30px;border-radius:999px;
  background:var(--holo);background-size:300% 300%;
  box-shadow:0 8px 30px rgba(255,110,199,.4);
  animation:huemove 6s linear infinite;
  transition:transform .15s ease, box-shadow .15s ease;
}
.cta:hover{transform:translateY(-3px) scale(1.04);box-shadow:0 12px 40px rgba(255,110,199,.6)}

/* ---------- SECTION ---------- */
.section{padding:40px 0 20px}
.section__title{
  text-align:center;font-family:var(--font-display);font-weight:700;
  font-size:clamp(2rem,7vw,3.4rem);letter-spacing:.5px;
  text-shadow:0 0 30px rgba(183,148,246,.5);
}
.star{color:var(--cyan);display:inline-block;animation:spin 8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.section__note{text-align:center;color:rgba(255,255,255,.55);margin:8px 0 38px;font-size:1rem}

/* ---------- PROJECT GRID ---------- */
.grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));
  gap:26px;
}
.card{
  position:relative;display:flex;flex-direction:column;
  text-decoration:none;color:var(--white);
  background:rgba(20,20,60,.8); /* was .55 + backdrop blur — blur re-rasterized over the moving starfield */
  border:2px solid rgba(255,255,255,.1);
  border-radius:22px;overflow:hidden;
  transition:transform .2s cubic-bezier(.2,.8,.3,1.2), border-color .2s, box-shadow .2s;
}
.card:hover{
  transform:translateY(-8px) scale(1.02);
  border-color:transparent;
  box-shadow:0 0 0 2px transparent,0 18px 50px rgba(91,140,255,.35);
}
/* holographic border on hover */
.card::before{
  content:"";position:absolute;inset:0;border-radius:22px;padding:2px;
  background:var(--holo);background-size:300% 300%;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  opacity:0;transition:opacity .2s;
}
/* only animate the holo border while actually hovered — no idle gradient churn */
.card:hover::before{opacity:1;animation:huemove 6s linear infinite}

.card__art{
  height:150px;background-size:cover;background-position:center;
  position:relative;display:flex;align-items:flex-end;
}
.card__emoji{
  position:absolute;top:12px;right:14px;font-size:2.1rem;
  filter:drop-shadow(0 2px 8px rgba(0,0,0,.5));
}
.card__status{
  margin:12px;font-family:var(--font-pixel);font-size:.58rem;letter-spacing:1px;
  padding:5px 10px;border-radius:999px;background:rgba(10,10,36,.7);
}
.status-live{color:#5bffa0;border:1px solid rgba(91,255,160,.5)}
.status-lab{color:var(--coral);border:1px solid rgba(255,122,138,.5)}

.card__body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:8px;flex:1}
.card__name{font-family:var(--font-display);font-weight:700;font-size:1.45rem}
.card__desc{color:rgba(255,255,255,.68);font-size:.95rem;line-height:1.45;flex:1}
.card__tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.tag{
  font-family:var(--font-pixel);font-size:.55rem;letter-spacing:.5px;
  color:var(--lilac);border:1px solid rgba(183,148,246,.4);
  border-radius:6px;padding:4px 7px;
}
.card__go{
  margin-top:10px;font-family:var(--font-display);font-weight:600;
  color:var(--cyan);font-size:.95rem;
}
.card:hover .card__go{color:var(--pink-soft)}

/* ---------- AGENTS GRID — living faces (display-only portraits) ---------- */
.agents-grid{
  display:grid;
  /* auto-fit → the faces stretch to fill: 3-up on desktop (smaller tiles),
     wrapping down to 2-up / 1-up as the screen narrows */
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:26px;
}

.agent{
  position:relative;
  aspect-ratio:3 / 4;            /* fixed portrait tile; video covers it */
  border-radius:22px;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.1);
  background:rgba(20,20,60,.55);
  transition:transform .2s cubic-bezier(.2,.8,.3,1.2), border-color .2s, box-shadow .2s;
}
.agent:hover{
  transform:translateY(-8px) scale(1.02);
  border-color:transparent;
  /* accent glow instead of the card's fixed blue */
  box-shadow:0 18px 50px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* holographic border on hover — same treatment as .card::before */
.agent::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:22px;
  padding:2px;
  background:var(--holo);
  background-size:300% 300%;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
          mask-composite:exclude;
  opacity:0;
  transition:opacity .2s;
  z-index:2;
  pointer-events:none;
}
.agent:hover::before{opacity:1;animation:huemove 6s linear infinite}

.agent__vid{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* caption pinned to bottom over a scrim */
.agent__cap{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:18px 18px 16px;
  background:linear-gradient(to top, rgba(8,8,24,.92) 0%, rgba(8,8,24,.55) 45%, transparent 100%);
  pointer-events:none;
}
.agent__name{
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.45rem;
  line-height:1.1;
  color:var(--accent);
}
.agent__role{
  font-family:var(--font-pixel);
  font-size:.55rem;
  letter-spacing:.5px;
  text-transform:lowercase;
  color:rgba(255,255,255,.72);
}

/* hover-capable devices: caption hidden, reveals on hover */
@media (hover:hover){
  .agent__cap{
    opacity:0;
    transform:translateY(10px);
    transition:opacity .25s ease, transform .25s cubic-bezier(.2,.8,.3,1.2);
  }
  .agent:hover .agent__cap,
  .agent:focus-within .agent__cap{
    opacity:1;
    transform:translateY(0);
  }
}
/* touch devices: no hover intent, so names are always visible */
@media (hover:none){
  .agent__cap{opacity:1;transform:none;}
}
/* reduced motion: kill lift, keep caption reachable */
@media(prefers-reduced-motion:reduce){
  .agent:hover{transform:none;}
  .agent__cap{opacity:1;transform:none;transition:none;}
}

/* "see them all" — ghost pill under the agents grid */
.agents-more{display:flex;justify-content:center;margin-top:34px}
.agents-btn{
  font-family:var(--font-display);font-weight:600;font-size:.98rem;
  color:var(--cyan);text-decoration:none;letter-spacing:.3px;
  padding:12px 26px;border-radius:999px;
  border:2px solid rgba(127,232,224,.4);
  background:rgba(127,232,224,.06);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.agents-btn:hover{
  transform:translateY(-2px);
  background:rgba(127,232,224,.12);
  color:var(--white);
  box-shadow:0 10px 30px rgba(127,232,224,.25);
}

/* ---------- ABOUT ---------- */
.about{padding:70px 0 40px}
.about__card{
  max-width:680px;margin:0 auto;text-align:center;
  background:rgba(20,20,60,.82);border:2px solid rgba(255,255,255,.1); /* dropped backdrop blur */
  border-radius:26px;padding:42px 34px;
}
.about__title{
  font-family:var(--font-display);font-weight:700;
  font-size:2.2rem;margin-bottom:18px;
  background:var(--holo);background-size:300% 300%;
  -webkit-background-clip:text;background-clip:text;color:transparent;
  animation:huemove 6s linear infinite;
}
.about__card p{color:rgba(255,255,255,.78);line-height:1.7;font-size:1.05rem;margin-bottom:14px}
.about__sig{color:var(--cyan)!important;font-weight:500}

/* ---------- AGENTS PAGE (agents.html) ---------- */
.agents-page main{max-width:1200px}
.topbar{padding:20px 0 0}
.backlink{
  font-family:var(--font-pixel);font-size:.7rem;letter-spacing:1px;
  color:var(--cyan);text-decoration:none;
}
.backlink:hover{color:var(--pink-soft)}
/* top-of-page intro — headline + a live fake demo (terminal drives the face) */
.intro{padding:18px 0 34px}
.intro__head{text-align:center;max-width:680px;margin:0 auto}
.intro__title{font-family:var(--font-display);font-weight:700;line-height:1.12;font-size:clamp(1.9rem,4.6vw,3rem)}
.intro__lead{margin:14px auto 0;color:rgba(255,255,255,.76);line-height:1.6;font-size:1.06rem;max-width:56ch}

/* demo — shrunk to an illustration (was full content width; it ate the page) */
.demo{
  display:grid;grid-template-columns:auto 1fr;gap:24px;align-items:center;
  max-width:720px;margin:28px auto 0;
}
.demo__face{
  position:relative;width:168px;aspect-ratio:3/4;
  border-radius:18px;overflow:hidden;background:#000;cursor:pointer;
  border:2px solid color-mix(in srgb, var(--accent,#8b8fef) 35%, transparent);
  box-shadow:0 14px 38px color-mix(in srgb, var(--accent,#8b8fef) 34%, transparent),0 6px 16px rgba(0,0,0,.5);
  transition:transform .2s cubic-bezier(.2,.8,.3,1.2);
}
.demo__face:hover{transform:translateY(-4px) scale(1.02)}
.demo__vid{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .35s ease}
.demo__vid.is-active{opacity:1}

.demo__term{--t-acc:#8b8fef;border-radius:14px;overflow:hidden;border:1px solid rgba(255,255,255,.12);background:#0e0b18;font-family:var(--font-pixel)}
.demo__screen{padding:13px 14px 12px;min-height:168px;font-size:.62rem;line-height:1.65}
.demo__lines{display:flex;flex-direction:column;gap:5px}
.demo__line,.demo__input{color:#d8d8ef;white-space:pre-wrap;word-break:break-word}
.demo__input{margin-top:8px}
.demo__line .p,.demo__input .p{color:#8b8fef}
.demo__line .dim{color:rgba(255,255,255,.45)}
.demo__line .ok{color:#5bffa0}
.demo__line .bar{color:#8b8fef;letter-spacing:1px}
.demo__cursor{color:#8b8fef;margin-left:1px;animation:blink 1.1s steps(1) infinite}

/* caption — same idiom as the shop's .shopdemo__cap, so the two demos read as kin */
.demo__cap{
  grid-column:1/-1;margin-top:2px;text-align:center;
  font-family:var(--font-pixel);font-size:.55rem;letter-spacing:1px;
  text-transform:lowercase;color:rgba(255,255,255,.55);
}
.demo__cap b{color:var(--cyan);font-weight:400}

.intro__points{
  list-style:none;display:flex;flex-wrap:wrap;justify-content:center;gap:10px 22px;
  margin:30px auto 0;max-width:760px;padding:0;
}
.intro__points li{position:relative;padding-left:18px;color:rgba(255,255,255,.7);font-size:.95rem}
.intro__points li::before{content:"✦";position:absolute;left:0;color:var(--cyan)}

/* ---------- HOW IT WORKS — the "what's an agent" strip ---------- */
.how{padding:30px 0 6px}
.how__title{
  text-align:center;font-family:var(--font-display);font-weight:700;
  font-size:1.7rem;color:var(--lilac);letter-spacing:.5px;
  text-transform:lowercase;margin-bottom:22px;
}
.how__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:1020px;margin:0 auto}
.how__step{
  border-radius:22px;padding:22px 22px 24px;
  border:2px solid rgba(255,255,255,.1);background:rgba(20,20,60,.7); /* no backdrop blur — site rule */
}
.how__num{font-family:var(--font-pixel);font-size:.6rem;letter-spacing:1px;text-transform:lowercase;color:var(--cyan)}
.how__desc{margin-top:10px;color:rgba(255,255,255,.72);line-height:1.6;font-size:.95rem}
.how__desc b{color:var(--pink-soft);font-weight:600}
.how__cta{text-align:center;margin-top:6px} /* .cta brings its own margin */

/* strip collapses before the steps get cramped */
@media(max-width:880px){
  .how__grid{grid-template-columns:1fr;max-width:520px}
  .how{padding:22px 0 4px}
}

@media(max-width:760px){
  .demo{grid-template-columns:1fr;gap:18px;max-width:none}
  .demo__face{justify-self:center;width:150px}
  .demo__screen{min-height:168px}
  .intro__points{flex-direction:column;align-items:center;gap:10px}
}
/* featured row — bigger tiles than the home strip */
.agents-grid--big{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:30px}
.cat{margin-top:46px}
.cat__title{
  text-align:center;font-family:var(--font-display);font-weight:700;
  font-size:1.7rem;color:var(--lilac);letter-spacing:.5px;
  text-transform:lowercase;margin-bottom:24px;
}
.cat-soon{
  max-width:680px;margin:8px auto 0;text-align:center;
  font-family:var(--font-body);color:rgba(255,255,255,.62);
  line-height:1.7;font-size:1.02rem;
  border:2px dashed rgba(183,148,246,.3);border-radius:22px;
  padding:40px 26px;background:rgba(20,20,60,.7); /* dropped backdrop blur */
}

/* ---------- AGENT DETAIL DRAWER ---------- */
.agent{cursor:pointer}
.drawer-backdrop{
  position:fixed;inset:0;z-index:200;
  background:rgba(6,6,20,.72); /* plain scrim — no backdrop-filter (re-blurs every frame) */
  opacity:0;pointer-events:none;transition:opacity .25s ease;
}
.drawer-backdrop.show{opacity:1;pointer-events:auto}
/* position:fixed (not just overflow:hidden, which iOS Safari ignores for touch) — the
   drawer JS records scrollY, sets body top:-scrollY, and restores it on close */
body.drawer-open{position:fixed;width:100%;overflow:hidden}

.drawer{
  position:fixed;top:0;right:0;z-index:201;
  width:min(420px,92vw);height:100%;
  background:radial-gradient(160% 70% at 50% 0%, rgba(24,20,42,.97), rgba(12,10,24,.99));
  border-left:2px solid color-mix(in srgb, var(--accent,#8b8fef) 50%, transparent);
  box-shadow:-30px 0 80px rgba(0,0,0,.5);
  transform:translateX(100%);transition:transform .28s cubic-bezier(.2,.8,.3,1.2);
}
.drawer.show{transform:translateX(0)}
.drawer__close{
  position:absolute;top:14px;right:14px;z-index:3;
  width:34px;height:34px;border-radius:999px;line-height:1;
  border:1px solid rgba(255,255,255,.2);background:rgba(10,10,30,.55);
  color:#fff;font-size:.95rem;cursor:pointer;
  transition:background .15s ease, transform .2s ease;
}
.drawer__close:hover{background:rgba(255,255,255,.16);transform:rotate(90deg)}
.drawer__scroll{height:100%;overflow-y:auto;padding:0 26px 44px}

/* the agent's "window" — centered + rounded + glowing, like the real floating face */
.drawer__window{
  position:relative;
  width:min(260px,74%);
  margin:12px auto 26px;
  aspect-ratio:3/4;overflow:hidden;
  border-radius:24px;background:#000;
  border:2px solid color-mix(in srgb, var(--accent,#8b8fef) 35%, transparent);
  box-shadow:0 20px 55px color-mix(in srgb, var(--accent,#8b8fef) 38%, transparent),
             0 8px 22px rgba(0,0,0,.5);
}
.drawer__vid{width:100%;height:100%;object-fit:cover;display:block}

.drawer__name{font-family:var(--font-display);font-weight:700;font-size:2rem;color:var(--accent,#fff);line-height:1.1}
.drawer__role{font-family:var(--font-pixel);font-size:.6rem;letter-spacing:.5px;text-transform:lowercase;color:rgba(255,255,255,.6);margin-top:6px}

/* default terminal colors peek */
.term{
  margin-top:20px;border-radius:12px;overflow:hidden;
  border:1px solid rgba(255,255,255,.12);background:var(--t-bg);
  font-family:var(--font-pixel);
}
.term__bar{display:flex;gap:6px;padding:8px 11px;background:rgba(255,255,255,.05)}
.term__bar i{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.22)}
.term__bar i:first-child{background:var(--t-acc)}
.term__body{padding:13px 13px 15px}
.term__line{font-size:.62rem;letter-spacing:.5px;line-height:1.4}
.term__prompt{color:var(--t-acc)}
.term__cmd{color:var(--t-fg)}
.term__cursor{color:var(--t-acc);margin-left:2px;animation:blink 1.1s steps(1) infinite}
.term__swatches{display:flex;gap:7px;margin-top:13px}
.term__swatches span{width:26px;height:26px;border-radius:6px;border:1px solid rgba(255,255,255,.14)}

.drawer__stat{margin-top:24px;font-family:var(--font-body);color:rgba(255,255,255,.7);font-size:1rem}
.drawer__statnum{font-family:var(--font-display);font-weight:700;font-size:1.5rem;color:var(--accent);margin-right:5px}
.drawer__moods{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}
.mood{
  font-family:var(--font-pixel);font-size:.5rem;letter-spacing:.5px;text-transform:uppercase;
  color:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.18);
  border-radius:6px;padding:4px 7px;
}
.drawer__blurb{margin-top:24px;color:rgba(255,255,255,.78);line-height:1.65;font-size:1rem}
.drawer__skills-label{margin-top:24px;font-family:var(--font-pixel);font-size:.55rem;letter-spacing:1px;text-transform:uppercase;color:rgba(255,255,255,.45)}
.drawer__skills{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}

/* free/price flag — rides the role line; shop .flag colors, shop 4px radius */
.drawer__flag{
  display:inline-block;margin-left:8px;vertical-align:1px;
  font-family:var(--font-pixel);font-size:.5rem;letter-spacing:1px;text-transform:uppercase;
  padding:4px 8px;border-radius:4px;color:#0a0a24;background:#5bffa0;
}
.drawer__flag--price{background:rgba(255,255,255,.1);color:rgba(255,255,255,.85);border:1px solid rgba(255,255,255,.25)}

/* what's included — heading reuses .drawer__skills-label; ✦ markers like .intro__points */
.drawer__incl{list-style:none;margin:11px 0 0;padding:0;display:flex;flex-direction:column;gap:9px}
.drawer__incl li{position:relative;padding-left:18px;color:rgba(255,255,255,.72);font-size:.92rem;line-height:1.5}
.drawer__incl li::before{content:"✦";position:absolute;left:0;top:0;color:var(--accent,#8b8fef)}
.drawer__incl b{color:#fff;font-weight:600}

/* get bar — sticky at the drawer's foot so the money moment never scrolls away.
   buttons are LINKS to /agent.html?agent=<slug> — accounts + downloads live on the shop */
.drawer__get{
  position:sticky;bottom:0;z-index:2;
  margin:28px -26px -44px;padding:16px 26px calc(20px + env(safe-area-inset-bottom));
  display:flex;flex-direction:column;align-items:center;gap:8px;
  background:linear-gradient(to top, rgba(12,10,24,.98) 72%, transparent);
}
.drawer__get-main{
  width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;
  font-family:var(--font-display);font-weight:700;font-size:.95rem;text-decoration:none;
  color:var(--navy-0);border-radius:999px;padding:12px 22px;
  background:var(--holo);background-size:300% 300%;
  box-shadow:0 6px 18px rgba(255,110,199,.32);
  transition:transform .12s cubic-bezier(.2,.8,.3,1.2), box-shadow .12s;
}
.drawer__get-main:active{transform:translateY(0) scale(.97)}
.drawer__get-main--free{background:linear-gradient(90deg,#5bffa0,var(--cyan));color:#04331f;box-shadow:0 6px 18px rgba(91,255,160,.28)}
.drawer__get-main--locked{background:rgba(255,255,255,.08);color:rgba(255,255,255,.6);box-shadow:none;cursor:default}
.drawer__get-zip{
  min-height:36px;display:flex;align-items:center;gap:6px;padding:8px 18px;
  font-family:var(--font-display);font-weight:600;font-size:.78rem;text-decoration:none;
  color:rgba(255,255,255,.68);background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.16);border-radius:999px;
  transition:color .15s, border-color .15s;
}
.drawer__get-zip:hover{color:#fff;border-color:rgba(255,255,255,.34)}
.drawer__get-note{margin-top:2px;text-align:center;font-family:var(--font-body);font-size:.8rem;line-height:1.5;color:rgba(255,255,255,.5)}

/* holo animates on hover ONLY (site perf rule); gated like the shop so touch can't fake it */
@media(hover:hover) and (pointer:fine){
  .drawer__get-main:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 8px 24px rgba(255,110,199,.5);animation:huemove 6s linear infinite}
  .drawer__get-main--free:hover{animation:none;box-shadow:0 8px 24px rgba(91,255,160,.45)}
  .drawer__get-main--locked:hover{transform:none;animation:none;box-shadow:none}
}

/* visible focus for keyboard folks — cyan on near-black */
.demo__face:focus-visible,
.drawer__get-main:focus-visible,
.drawer__get-zip:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}

/* reduced motion — the global animation kill already covers huemove/blink;
   this just quiets the transforms these new pieces add */
@media(prefers-reduced-motion:reduce){
  .demo__face,.demo__face:hover{transition:none;transform:none}
  .drawer__get-main,.drawer__get-main:hover{transition:none;transform:none}
}

/* ---------- pack download (drawer, owned agents — shop.js openDrawer()) ----------
   sits right under the ✓ Owned chip: one primary "Download pack" (full — the holo
   treatment .drawer__action/.buy already use for the money-moment) + one quieter
   "just the brains" secondary (light — a plain outline pill, same family as .chip). */
.pj-pack{margin-top:14px;display:flex;flex-direction:column;align-items:center;gap:8px}
.pj-pack__btn{
  width:100%;font-family:var(--font-display);font-weight:700;cursor:pointer;
  border:none;border-radius:999px;min-height:44px;padding:12px 22px;
  display:flex;align-items:center;justify-content:center;gap:6px;
  transition:transform .12s cubic-bezier(.2,.8,.3,1.2), box-shadow .12s;
}
.pj-pack__btn:hover{transform:translateY(-2px) scale(1.02)}
.pj-pack__btn:active{transform:translateY(0) scale(.97)}
.pj-pack__btn--full{
  font-size:.95rem;color:var(--navy-0);
  background:var(--holo);background-size:300% 300%;
  box-shadow:0 6px 18px rgba(255,110,199,.32);
}
.pj-pack__btn--light{
  font-size:.78rem;min-height:36px;padding:8px 18px;font-weight:600;
  color:rgba(255,255,255,.68);background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.16);box-shadow:none;
}
.pj-pack__btn--light:hover{color:#fff;border-color:rgba(255,255,255,.34)}
.pj-packsize{opacity:.75;font-weight:400;font-size:.88em;white-space:nowrap}
.pj-pack__copy{
  margin-top:2px;text-align:center;font-family:var(--font-body);
  font-size:.8rem;line-height:1.5;color:rgba(255,255,255,.5);
}

/* ---------- FOOTER ---------- */
.footer{text-align:center;padding:60px 22px 50px;margin-top:30px}
.footer__badges{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:24px}
.webbadge{
  font-family:var(--font-pixel);font-size:.6rem;letter-spacing:.5px;
  color:rgba(255,255,255,.7);
  border:2px outset rgba(183,148,246,.4);
  background:rgba(28,28,92,.5);padding:7px 11px;border-radius:4px;
}
a.webbadge{text-decoration:none}
a.webbadge:hover{color:#fff;border-style:inset}   /* pressed-button, like the old web */
.about__mail{color:var(--cyan);text-decoration:none}
.about__mail:hover{color:var(--pink-soft)}
.counter{
  font-family:var(--font-pixel);font-size:.7rem;color:var(--cyan);
  margin-bottom:14px;letter-spacing:1px;
}
.counter span{color:var(--pink-soft)}
.footer__copy{font-family:var(--font-pixel);font-size:.62rem;color:rgba(255,255,255,.35);letter-spacing:1px}

/* ---------- responsive ---------- */
@media(max-width:560px){
  .hero{padding:48px 0 40px}
  .ticker__track{animation-duration:33s} /* same 60%-speed rule as desktop */
  .grid{grid-template-columns:1fr}
  .agents-grid{grid-template-columns:1fr}
  .card{transform:none!important}
}

@media(prefers-reduced-motion:reduce){
  *{animation:none!important}
  html{scroll-behavior:auto}
}

/* ============================================================
   BOARD v2 — sticky tints, to-do blocks, image tiles, holo pen
   ink, rich-text pill, font menu / color popover, toast.
   New homepage-board features. Selectors below are a fixed
   HTML/JS contract emitted verbatim by board.js — every one
   is styled here, nothing above this line was touched.
   ============================================================ */

/* ---------- sticky note color tints ---------- */
/* low-alpha color washes straight over whatever sits behind the note. the
   board reads deep navy almost everywhere — even inside the corner glows
   (.glow-pink/.glow-blue) the wash still composites dark enough that white
   body text holds ≥4.5:1. cream gets the lowest alpha since it's the
   lightest wash and therefore the biggest contrast risk. */
.board-note.tint-pink{background:rgba(255,110,199,.16)}
.board-note.tint-blue{background:rgba(91,140,255,.18)}
.board-note.tint-lilac{background:rgba(183,148,246,.17)}
.board-note.tint-cyan{background:rgba(127,232,224,.14)}
.board-note.tint-cream{background:rgba(255,238,214,.12)}

/* dot row floats at the note's top-LEFT (top-right is the ✕) — same
   hover-reveal idiom as .board-item__del */
.board-note__tints{
  position:absolute;top:-8px;left:8px;z-index:5;
  display:flex;gap:4px;opacity:0;transition:opacity .15s;
}
.board-note:hover .board-note__tints,
.board-note:focus-within .board-note__tints{opacity:1}
@media (hover:none){.board-note__tints{opacity:1}}

.board-note__tint{
  flex:none;width:14px;height:14px;border-radius:50%;padding:0;border:none;cursor:pointer;
  box-shadow:0 1px 4px rgba(0,0,0,.5);transition:box-shadow .15s,transform .15s;
}
.board-note__tint:hover{transform:scale(1.15)}
.board-note__tint.is-on{box-shadow:0 0 0 2px rgba(255,255,255,.85),0 1px 4px rgba(0,0,0,.5)}
/* the dots wear their tint at full strength so they read as pickable colors */
.board-note__tint--pink{background:var(--pink)}
.board-note__tint--blue{background:var(--blue)}
.board-note__tint--lilac{background:var(--lilac)}
.board-note__tint--cyan{background:var(--cyan)}
.board-note__tint--cream{background:#ffeed6}
.board-note__tint--none{
  background-color:rgba(20,20,46,.9);
  background-image:linear-gradient(45deg,transparent 45%,rgba(255,255,255,.65) 48%,rgba(255,255,255,.65) 52%,transparent 55%);
}
/* the custom chip — a conic rainbow says "pick anything" (opens the shared PJColorPicker) */
.board-note__tint--custom{
  background:conic-gradient(from 0deg,#ff6ec7,#ffd166,#7fe8e0,#5b8cff,#b794f6,#ff6ec7);
}
/* a light custom pick flips the note ink dark so it stays readable (todo flavor below) */
.board-note--lightbg .board-note__text{color:#141225}
.board-note--lightbg .board-note__text:empty::before{color:rgba(20,18,40,.45)}

/* ---------- to-do block ---------- */
.board-todo{
  padding:11px 12px;border-radius:14px;
  height:auto; /* grow to fit the rows — the card bg must always wrap them, never get out-run (buildTileEl skips the fixed inline height for todos) */
  background:rgba(14,12,28,.94); /* same glass as .board-note — no backdrop blur */
  border:1px solid rgba(255,255,255,.1);box-shadow:0 16px 44px rgba(0,0,0,.6);
}
/* todo lists reuse the note's tint + custom-color machinery (buildTodo wires the same
   tint row + PJColorPicker chip). The presets override the base glass; a custom pick
   sets an inline bg via applyNoteColor. Same translucent washes as the note tints. */
.board-todo.tint-pink{background:rgba(255,110,199,.16)}
.board-todo.tint-blue{background:rgba(91,140,255,.18)}
.board-todo.tint-lilac{background:rgba(183,148,246,.17)}
.board-todo.tint-cyan{background:rgba(127,232,224,.14)}
.board-todo.tint-cream{background:rgba(255,238,214,.12)}
.board-todo:hover .board-note__tints,
.board-todo:focus-within .board-note__tints{opacity:1}
/* a light custom color flips the row ink dark so it stays readable (mirrors .board-note--lightbg) */
.board-todo.board-note--lightbg .todo__text{color:#141225}
.board-todo.board-note--lightbg .todo__text:empty::before{color:rgba(20,18,40,.45)}
.board-todo.board-note--lightbg .todo__row.is-done .todo__text{color:rgba(20,18,40,.5)}
.todo__row{display:flex;align-items:flex-start;gap:8px}
.todo__row + .todo__row{margin-top:4px}

.todo__check{
  flex:none;width:15px;height:15px;margin-top:3px;border-radius:50%;padding:0;
  border:none;cursor:pointer;position:relative;
  background:rgba(10,10,30,.6);box-shadow:inset 0 0 0 1px rgba(255,255,255,.3);
  transition:background .15s,box-shadow .15s;
}
.todo__row.is-done .todo__check{background:var(--pink);box-shadow:none}
.todo__row.is-done .todo__check::after{ /* filled ✓, drawn from borders — no native checkbox chrome */
  content:"";position:absolute;left:50%;top:45%;width:5px;height:8px;
  border-right:2px solid #fff;border-bottom:2px solid #fff;
  transform:translate(-50%,-55%) rotate(45deg);
}
.todo__text{
  flex:1;font-family:var(--font-body);font-size:.95rem;line-height:1.4;
  color:#fff;outline:none;word-break:break-word;caret-color:var(--pink);
}
.todo__text:empty::before{content:"to do…";color:rgba(255,255,255,.3)}
.todo__row.is-done .todo__text{color:rgba(255,255,255,.45);text-decoration:line-through}

.todo__add{
  display:block;margin-top:8px;border:none;background:none;cursor:pointer;padding:2px 0;
  font-family:var(--font-pixel);font-size:.5rem;letter-spacing:1px;text-transform:uppercase;
  color:rgba(255,255,255,.5);transition:color .15s;
}
.todo__add:hover{color:var(--cyan)}

/* ---------- canvas text — the desktop board's chrome-less text tool ---------- */
/* NO card chrome (no bg, border, or holo ring) — just display text on the board.
   width:max-content hugs the content until a drawn width / the resize handle sets
   rec.w; the format pill (boardtext.js) targets .board-text__text for free. */
.board-text{width:max-content;max-width:640px;padding:4px 8px;border-radius:10px;cursor:grab}
.board-text.dragging{cursor:grabbing}
.board-text.editing{cursor:text}
.board-text__text{
  min-width:24px;min-height:1.3em;outline:none;
  font-family:var(--font-display);font-weight:600;font-size:1.7rem;line-height:1.3;color:#fff;
  white-space:pre-wrap;word-break:break-word;
  text-shadow:0 2px 14px rgba(0,0,0,.55); /* stays readable over the glows + starfield */
}
.board-text__text:empty::before{content:"type…";color:rgba(255,255,255,.35)}

/* ---------- image tile ---------- */
.board-img{
  border-radius:12px; /* NO overflow:hidden — it was masking the ✕ / resize nub that overhang the corners (same fix as .board-note). the img rounds itself instead */
  border:2px solid rgba(255,255,255,.12);
  background:rgba(20,20,60,.55); /* same glass family as .tile */
  box-shadow:0 14px 40px rgba(0,0,0,.45);
}
.board-img img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;border-radius:10px} /* inner radius (12 outer − 2 border) so corners still clip without hiding the nubs */
/* reveal the ✕ + resize nub on hover (they were only showing on select before, and even then the old overflow clipped them) */
.board-img:hover .board-item__del,.board-img:hover .board-item__resize,
.board-img.selected .board-item__resize{opacity:1}
/* a synced image whose bytes live on another device (board-cloud strips data: srcs) */
.board-img--ghost{display:flex;align-items:center;justify-content:center;min-height:64px;padding:10px}
.board-img--ghost .board-img__ghost{font-size:12px;color:rgba(255,255,255,.45);text-align:center;pointer-events:none}

/* ---------- shared pop-in for floating chrome (pill / font menu / color popover) ---------- */
/* lives on the element itself (not a .show transition) so toggling the
   `hidden` attribute off replays it every time the chrome reappears */
@keyframes pj-pop{
  from{opacity:0;transform:translateY(4px) scale(.97)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

/* ---------- rich-text pill ---------- */
/* [hidden] must beat our explicit display values (searchbar__menu idiom) */
/* NB: .pj-colorpop[hidden] lives in colorpicker.css (the shared PJColorPicker component) */
.text-pill[hidden],.pj-fontmenu[hidden]{display:none}
.text-pill{
  position:fixed; /* coords + z-index:90 set inline by board.js */
  display:flex;align-items:center;gap:2px;
  height:36px;padding:4px 8px;border-radius:999px;
  background:rgba(14,14,42,.96);border:1px solid rgba(255,255,255,.16);
  box-shadow:0 12px 34px rgba(0,0,0,.55);
  animation:pj-pop .13s ease-out;
}
/* holo ring — visible + frozen at rest (same idiom as .board-link.editing::before,
   which shows the ring while typing but frozen, no per-frame repaint), only
   starts spinning its gradient on hover — never an idle animation */
.text-pill::before{
  content:"";position:absolute;inset:0;border-radius:999px;padding:2px;pointer-events:none;
  background:var(--holo);background-size:300% 300%;opacity:1;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
}
.text-pill:hover::before{animation:huemove 6s linear infinite}

.text-pill__btn,.text-pill__size{
  flex:none;width:26px;height:26px;padding:0;border:none;border-radius:8px;background:transparent;cursor:pointer;
  color:rgba(255,255,255,.78);transition:color .15s,background .15s;
}
.text-pill__btn:hover,.text-pill__size:hover{color:#fff;background:rgba(255,255,255,.08)}
.text-pill__btn{font-family:var(--font-display);font-weight:700;font-size:13px}
.text-pill__size{font-family:var(--font-body);font-size:15px}
.text-pill__sizeval{
  flex:none;width:30px;height:26px;padding:0;margin:0;border:none;border-radius:8px;
  background:transparent;color:rgba(255,255,255,.9);text-align:center;
  font-family:var(--font-body);font-size:12px;line-height:26px;-moz-appearance:textfield;
  transition:color .15s,background .15s,box-shadow .15s;
}
.text-pill__sizeval::-webkit-inner-spin-button,.text-pill__sizeval::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.text-pill__sizeval:hover{background:rgba(255,255,255,.06)}
.text-pill__sizeval:focus{
  outline:none;color:#fff;background:rgba(255,255,255,.10);
  box-shadow:inset 0 0 0 1px rgba(255,110,199,.55);
}
.text-pill__btn.is-on{
  color:var(--pink);background:rgba(255,110,199,.12);
  text-shadow:0 0 8px rgba(255,110,199,.6);
}
.text-pill__btn[data-cmd="italic"]{font-style:italic}
.text-pill__btn[data-cmd="underline"]{text-decoration:underline}
.text-pill__btn[data-cmd="strikeThrough"]{text-decoration:line-through}

.text-pill__sep{flex:none;width:1px;height:16px;background:rgba(255,255,255,.14)}

.text-pill__font{
  flex:none;max-width:92px;height:26px;padding:0 8px;border:none;border-radius:8px;background:transparent;cursor:pointer;
  font-family:var(--font-display);font-weight:600;font-size:11px;line-height:26px;
  color:rgba(255,255,255,.78);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  transition:color .15s,background .15s;
}
.text-pill__font:hover{color:#fff;background:rgba(255,255,255,.08)}
.text-pill__font::after{content:"▾";margin-left:4px;font-size:9px}

.text-pill__color{
  flex:none;width:16px;height:16px;border:none;border-radius:50%;background:transparent;cursor:pointer;padding:0; /* JS sets the swatch fill */
  box-shadow:0 0 0 1px rgba(255,255,255,.35);transition:box-shadow .15s,transform .15s;
}
.text-pill__color:hover{
  transform:scale(1.1);
  box-shadow:0 0 0 2px rgba(255,110,199,.6),0 0 10px rgba(127,232,224,.5);
}

/* ---------- font menu (glass popover family — see .pj-modal) ----------
   Carries the whole Google catalogue, so it's search + category chips over a
   scrolling list. Previews load lazily as rows scroll in — see boardtext.js. */
.pj-fontmenu{
  position:fixed; /* JS positions + sets z-index:91 */
  width:238px;padding:6px;border-radius:14px;
  background:rgba(14,14,42,.96);border:1px solid rgba(255,255,255,.16);
  box-shadow:0 16px 44px rgba(0,0,0,.6);
  animation:pj-pop .13s ease-out;
}
.pj-fontmenu__head{padding:2px 2px 7px;margin-bottom:5px;border-bottom:1px solid rgba(255,255,255,.1)}
.pj-fontmenu__search{
  width:100%;box-sizing:border-box;padding:6px 9px;border-radius:8px;
  border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.3);
  color:#fff;font:13px/1.2 inherit;outline:none;transition:border-color .15s;
}
.pj-fontmenu__search::placeholder{color:rgba(255,255,255,.38)}
.pj-fontmenu__search:focus{border-color:var(--pink)}
.pj-fontmenu__search::-webkit-search-cancel-button{filter:invert(1);opacity:.45;cursor:pointer}
.pj-fontmenu__chips{display:flex;gap:4px;margin-top:6px}
.pj-fontmenu__chip{
  flex:1;border:none;cursor:pointer;padding:4px 0;border-radius:6px;
  background:rgba(255,255,255,.06);color:rgba(255,255,255,.6);
  font-size:11px;transition:background .15s,color .15s;
}
.pj-fontmenu__chip:hover{background:rgba(255,255,255,.13)}
.pj-fontmenu__chip.is-on{background:var(--pink);color:#12122a}
.pj-fontmenu__list{max-height:286px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.pj-fontmenu__list::-webkit-scrollbar{width:8px}
.pj-fontmenu__list::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16);border-radius:4px}
.pj-fontmenu__list::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.26)}
.pj-fontmenu__item{
  display:block;width:100%;text-align:left;border:none;background:none;cursor:pointer;
  position:relative;font-size:13px;color:rgba(255,255,255,.85); /* font-family comes inline from JS, per font */
  padding:7px 10px;border-radius:8px;transition:background .15s;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.pj-fontmenu__item[hidden]{display:none}
.pj-fontmenu__item:hover{background:rgba(255,255,255,.08)}
.pj-fontmenu__item.is-pinned + .pj-fontmenu__item:not(.is-pinned){
  margin-top:5px;border-top:1px solid rgba(255,255,255,.1);padding-top:11px;
}
.pj-fontmenu__item.is-current{padding-left:22px}
.pj-fontmenu__item.is-current::before{
  content:"";position:absolute;left:9px;top:50%;transform:translateY(-50%);
  width:6px;height:6px;border-radius:50%;background:var(--pink);
}
.pj-fontmenu__empty{padding:15px 10px;text-align:center;font-size:12px;color:rgba(255,255,255,.45)}

/* ---------- color popover ----------
   Moved to colorpicker.css — the shared PJColorPicker component (wheel +
   s/l sliders + hex + eyedropper + palette) now ships its own stylesheet. */

/* ---------- toast ---------- */
.pj-toast{
  position:fixed;left:50%;bottom:96px;z-index:95; /* above the dock */
  transform:translateX(-50%) translateY(6px);
  padding:10px 16px;border-radius:999px;
  background:rgba(14,14,42,.96);border:1px solid rgba(255,255,255,.15);
  box-shadow:0 12px 34px rgba(0,0,0,.5);
  font-family:var(--font-pixel);font-size:.55rem;letter-spacing:.5px;color:rgba(255,255,255,.9);
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;
}
.pj-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ---------- undo pill (single-slot; drops in from the TOP) ---------- */
.pj-undo{
  position:fixed;top:16px;left:50%;z-index:310; /* clears the .pj-modal stack (300/301) so it never hides */
  transform:translateX(-50%) translateY(-14px); /* parked above the edge → slides down on .show */
  display:flex;align-items:center;gap:10px;
  padding:7px 7px 7px 16px;border-radius:999px;
  background:rgba(14,14,42,.96);border:1px solid rgba(255,255,255,.15);
  box-shadow:0 12px 34px rgba(0,0,0,.5);
  font-family:var(--font-pixel);font-size:.55rem;letter-spacing:.5px;color:rgba(255,255,255,.9);
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;
}
.pj-undo.show{opacity:1;transform:translateX(-50%) translateY(0);pointer-events:auto}
.pj-undo__btn{
  font-family:var(--font-pixel);font-size:.55rem;letter-spacing:.5px;color:#fff;
  padding:5px 12px;border-radius:999px;cursor:pointer;
  background:rgba(255,110,199,.18);border:1px solid var(--pink);
  transition:background .18s,border-color .18s,box-shadow .18s;
}
.pj-undo__btn:hover,.pj-undo__btn:focus{
  background:var(--pink);border-color:var(--cyan);
  box-shadow:0 0 12px rgba(255,110,199,.6);outline:none;
}
