/* pip the intern.
   Every rule here comes from the six videos (see notes/video-base.md):
   a cream wall, an ink desk line, a brown desk, heavy lowercase captions,
   thick ink outlines, flat color, hard shadows, things that pop in. */

@font-face {
  font-family: "Archivo Black";
  src: url("../assets/fonts/archivo-black.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
/* Handwriting. Apple devices use Marker Felt, the font in the videos. Others load this. */
@font-face {
  font-family: "Shantell Sans";
  src: url("../assets/fonts/shantell-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1E1A16;
  --wall: #F3E6D3;
  --wall-2: #E9DCC6;
  --wall-3: #D8CBB8;
  --desk: #C8946A;
  --paper: #FFFDF6;
  --sticky: #FFE45C;
  --pip-cap: #FFE27A;
  --barb-cap: #B7F5C0;
  --barb-dark: #3E7F4A;
  --screen: #DDE3EC;
  --call: #1B1D24;
  --red: #FF5A4E;
  --poster: #7D8BA6;
  --grey: #676C79;
  --btn: #E1E4EA;
  --blue: #3558E0;
  --orange: #F47B20;

  --font: "Archivo Black", "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hand: "Marker Felt", "Shantell Sans", "Comic Sans MS", "Chalkboard SE", cursive;

  --nav-h: 48px;
  --side: 16px;
  --line: 5px;        /* ink border on cards */
  --desk-line: 6px;   /* the line the characters stand on */
  --cap: clamp(27px, 8.4vw, 60px);
  --gap: clamp(20px, 5vw, 36px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  background: var(--desk);
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 16px/1.25 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
html.is-locked, html.is-locked body { overflow: hidden; }

h1, h2, h3, p, ul { margin: 0; font-weight: 400; }
ul { padding: 0; list-style: none; }
b { font-weight: 400; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { -webkit-tap-highlight-color: transparent; }
canvas, video { display: block; }

:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.call :focus-visible, .dock :focus-visible, .player :focus-visible { outline-color: var(--pip-cap); }

.defs { position: absolute; }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: fixed; left: 12px; top: -90px; z-index: 100; background: var(--ink); color: var(--pip-cap); padding: 12px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - (var(--side) * 2), 1080px); margin-inline: auto; position: relative; }

/* ---------- Drawings ---------- */
.art { display: block; width: 100%; height: auto; overflow: visible; }
[data-pip], [data-barb], [data-printer], [data-laptop], [data-clock], [data-cup] { display: block; }
.m-talk { display: none; }
.is-open .m-rest { display: none; }
.is-open .m-talk { display: inline; }
.pip { animation: bob 1.260s ease-in-out infinite; }
.pip-eyes.can-blink { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 2.670s steps(1) infinite; }
.pip-sweat { animation: sweat 1s steps(8) infinite; }
.barb-lid { transform-box: fill-box; transform-origin: 50% 0; animation: barb-blink 3.670s steps(1) infinite; }
.prn-text.is-jam { animation: flash 0.530s steps(1) infinite; }
.lap-bat { animation: flash 0.660s steps(1) infinite; }

/* ---------- Icons, buttons ---------- */
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.600; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-btn { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px; background: transparent; display: grid; place-items: center; cursor: pointer; color: inherit; }
.icon-btn:active { transform: scale(0.9); }
[aria-pressed="true"] > .ic-off, [aria-pressed="false"] > .ic-on { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border: 0; border-radius: 14px;
  background: var(--btn); color: var(--ink); font-size: 17px; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
}
.btn:active, .btn.is-down { transform: scale(0.9); }
.btn-ink { background: var(--ink); color: var(--pip-cap); }
.btn-red { background: var(--red); color: #fff; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.toy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- Captions (Caption.tsx) ---------- */
.cap {
  max-width: 13.500em; margin-inline: auto;
  font-size: var(--cap); line-height: 1.08; letter-spacing: -0.01em; text-align: center; text-wrap: balance;
  color: #fff;
  -webkit-text-stroke: 0.16em #141210;
  paint-order: stroke fill;
}
.cap.is-mid { font-size: calc(var(--cap) * 0.88); }
.cap.is-long { font-size: calc(var(--cap) * 0.78); }
.cap.is-small { font-size: calc(var(--cap) * 0.7); }
.cap-pip { color: var(--pip-cap); }
.cap-barb { color: var(--barb-cap); }
.cap-text { display: block; }
.cap.is-pop { animation: pop 0.340s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.cap + .cap { margin-top: 0.5em; }
@supports not (paint-order: stroke) {
  .cap { -webkit-text-stroke: 0; text-shadow: 0.06em 0 #141210, -0.06em 0 #141210, 0 0.06em #141210, 0 -0.06em #141210, 0.045em 0.045em #141210, -0.045em 0.045em #141210, 0.045em -0.045em #141210, -0.045em -0.045em #141210; }
}
.chip {
  display: table; margin: 0 auto 0.34em; padding: 0.16em 0.56em 0.2em; border-radius: 0.36em;
  background: var(--ink); color: var(--pip-cap);
  font-size: max(13px, 0.4em); line-height: 1.15; letter-spacing: 0; -webkit-text-stroke: 0; text-shadow: none;
}
.chip-barb { background: var(--barb-dark); color: var(--barb-cap); }
.hint { margin-top: 12px; text-align: center; font-size: 13px; color: rgba(30, 26, 22, 0.78); }

/* ---------- Posters (Office.tsx) ---------- */
.poster {
  display: inline-block; padding: 0.5em 0.62em 0.56em;
  background: #fff; border: var(--line) solid var(--ink); border-radius: 5px;
  color: var(--poster); font-size: clamp(27px, 8vw, 54px); line-height: 1; letter-spacing: -0.02em;
  transform: rotate(-3deg); transform-origin: 0 50%;
}

/* ---------- Windows and toasts (Props.tsx) ---------- */
.window { position: relative; padding: 18px; background: #fff; border: var(--line) solid var(--ink); border-radius: 22px; }
.win-meta { font-size: 13px; color: var(--grey); }
.win-title { margin-top: 3px; font-size: 20px; line-height: 1.1; }

.toast {
  position: fixed; left: 50%; top: calc(var(--nav-h) + 10px); z-index: 90;
  width: min(100% - 24px, 430px); padding: 11px 16px 13px;
  background: #fff; border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  transform: translate(-50%, -170%); pointer-events: none;
  transition: transform 0.2s ease-in;
}
.toast.is-on { transform: translate(-50%, 0); transition: transform 0.340s cubic-bezier(0.3, 1.5, 0.5, 1); }
.toast-from { display: block; font-size: 12.500px; color: var(--grey); }
.toast-subject { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tile-label {
  position: absolute; left: 9px; bottom: 9px; z-index: 2; max-width: calc(100% - 18px);
  padding: 4px 10px 5px; border-radius: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 13px; line-height: 1.1;
}

.pill {
  display: inline-flex; align-items: baseline; gap: 8px; min-height: 46px; padding: 12px 16px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.1); color: inherit; text-decoration: none; font-size: 15px; line-height: 1.3;
}
.pill span { opacity: 0.6; font-size: 13px; }
.pill:active { transform: scale(0.94); }
.follow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 10px;
  padding-inline: max(12px, env(safe-area-inset-left)) max(4px, env(safe-area-inset-right));
  background: rgba(243, 230, 211, 0.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav-logo { display: flex; align-items: center; gap: 7px; min-height: 44px; margin-right: auto; color: inherit; text-decoration: none; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.nav-face { width: 28px; flex: none; }
.nav-face .pip { animation: none; }
.nav-links { display: none; gap: 26px; font-size: 14px; }
.nav-links a { color: inherit; text-decoration: none; padding: 12px 0; opacity: 0.66; }
.nav-links a:hover, .nav-links a.is-here { opacity: 1; }
.day-chip { padding: 5px 10px 6px; border-radius: 9px; background: var(--ink); color: var(--pip-cap); font-size: 13px; line-height: 1.1; white-space: nowrap; }

/* ---------- Scenes ---------- */
.scene { position: relative; }
.office .wall { position: relative; z-index: 1; background: var(--wall); padding-top: 36px; }
.wall-2 .wall { background: var(--wall-2); }
.wall-3 .wall { background: var(--wall-3); }
.office .desk {
  position: relative; background: var(--desk); border-top: var(--desk-line) solid var(--ink);
  padding: 30px 0 46px;
}
.call { background: var(--call); color: #fff; padding: 40px 0 46px; }
.screen { background: var(--screen); padding: 40px 0 46px; }
.call .cap, .screen .cap { margin-top: 30px; }

/* Characters stand on the desk line, shoes a little below it, as in the videos. */
.standers { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; position: relative; z-index: 1; pointer-events: none; transform: translateY(8px); }
.standers-right { justify-content: flex-end; }
.stander { width: clamp(104px, 30vw, 190px); flex: none; }
.stander-barb { width: clamp(86px, 24vw, 150px); margin-bottom: 4px; }

/* ---------- Scene 1: hero ---------- */
.hero .wall { padding-top: calc(var(--nav-h) + 14px); }
.stage { --tv-w: min(57vw, 232px); height: calc((var(--tv-w) - 22px) * 16 / 9 + 26px); min-height: 330px; }
.hero-poster { position: absolute; left: 0; top: 8px; font-size: clamp(20px, 5.700vw, 50px); }
.hero-pip {
  position: absolute; left: -6px; bottom: -9px; z-index: 3; width: min(44vw, 182px);
  padding: 0; border: 0; background: none; cursor: pointer;
  animation: pop 0.380s cubic-bezier(0.3, 1.5, 0.5, 1) 0.15s both; transform-origin: 50% 100%;
}
.hero-pip.is-tap { animation: tap 0.300s cubic-bezier(0.3, 1.6, 0.5, 1); }
.tv {
  position: absolute; right: 0; bottom: 0; z-index: 2; width: var(--tv-w); padding: 6px;
  background: #2E3440; border: var(--line) solid var(--ink); border-bottom-width: 0; border-radius: 20px 20px 0 0;
  cursor: pointer; overflow: hidden;
}
.tv video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px 10px 0 0; background: #14131A; }
.tv .tile-label { left: 14px; bottom: 12px; }
.tv-play {
  position: absolute; right: 14px; bottom: 12px; width: 30px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: #fff;
}
.tv-play .ic { width: 17px; height: 17px; }
.hero-barb { display: none; }
.hero .desk { padding-top: 22px; min-height: 200px; }

/* ---------- Scene 2: episodes ---------- */
.reel, .meme-row {
  display: flex; gap: 12px; margin-top: 30px; padding: 4px 22px 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.reel::-webkit-scrollbar, .meme-row::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.reel li { flex: 0 0 min(60vw, 240px); scroll-snap-align: center; }
.tile {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; overflow: hidden;
  background: #0B0B0E; border: var(--line) solid var(--ink); border-radius: 20px; cursor: pointer;
}
.tile:active { transform: scale(0.97); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Scene 3: memes ---------- */
.meme-row { padding-inline: var(--side); padding-bottom: 28px; }
.meme { flex: 0 0 min(72vw, 300px); scroll-snap-align: center; }
.meme canvas { width: 100%; aspect-ratio: 4 / 5; border: var(--line) solid var(--ink); border-radius: 20px; background: var(--wall); }
.meme-actions { display: flex; gap: 8px; margin-top: 10px; }
.meme-actions .btn { flex: 1; min-height: 46px; padding-inline: 8px; font-size: 15px; }

/* ---------- Scene 4: about pip ---------- */
.about-grid { display: grid; gap: 4px; justify-items: center; }
.about-win { width: 100%; max-width: 480px; padding-bottom: 20px; }
.about-win .win-title { font-size: clamp(26px, 7.400vw, 36px); padding-bottom: 14px; border-bottom: 3px solid var(--btn); }
.fields { display: grid; justify-items: start; gap: 9px; margin: 16px 0 18px; }
.fields li { padding: 7px 13px 8px; border: 4px solid var(--ink); border-radius: 12px; font-size: clamp(16px, 4.600vw, 20px); line-height: 1.15; background: #fff; }
.fields li.is-pop { animation: pop 0.300s cubic-bezier(0.3, 1.5, 0.5, 1); }
.f-blue { background: #B9D7F5 !important; }
.f-green { background: #9FDDB8 !important; }
.f-yellow { background: #FFCB3F !important; }
.fields b { color: #D7352B; }
.about-win .btn { width: 100%; }
.about-pip { width: clamp(110px, 32vw, 170px); margin-top: -22px; position: relative; z-index: 2; }
.star {
  position: fixed; z-index: 80; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none;
  animation: star 0.700s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

/* ---------- Scene 5: break room ---------- */
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.game-grid li { min-width: 0; }
.game-tile {
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; padding: 12px 12px 14px;
  background: #fff; border: var(--line) solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  text-align: left; cursor: pointer;
}
.game-tile:active { transform: translateY(6px); box-shadow: 0 0 0 rgba(0, 0, 0, 0.18); }
.tile-art { display: block; height: 96px; margin-bottom: 10px; padding: 8px; border-radius: 12px; background: var(--wall); overflow: hidden; }
.tile-art > .art, .tile-art > span > .art { height: 100%; width: auto; margin-inline: auto; }
.tile-art .pip { animation: none; }
.tile-duo { display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.tile-duo > span { height: 100%; }
.tile-solo { padding-top: 10px; padding-bottom: 0; }
.tile-solo > .art { height: 150%; }
.tile-name { display: block; font-size: 19px; line-height: 1.05; letter-spacing: -0.02em; }
.tile-sub { display: block; margin-top: 5px; font-size: 12.500px; line-height: 1.25; color: var(--grey); }
.tile-best { display: inline-block; align-self: flex-start; margin-top: 9px; padding: 3px 8px 4px; border-radius: 7px; background: var(--ink); color: var(--pip-cap); font-size: 12px; line-height: 1.2; }
.tile-best:empty { display: none; }

/* ---------- Scene 6: pip's desk ---------- */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 30px 0 34px; }
.toy {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px;
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: 20px;
}
.toy h3 { font-size: 17px; line-height: 1.1; }
.toy-note { font-size: 13px; line-height: 1.25; color: var(--grey); min-height: 2.500em; }
.toy-reply, .toy-ooo, .toy-voices, .toy-note-pad { grid-column: 1 / -1; }
.toy .btn { min-height: 46px; padding-inline: 14px; font-size: 15px; }
.toy > .toy-row, .toy > .btn { margin-top: auto; }

.clock-face { width: min(100%, 190px); margin-inline: auto; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.clock-label { text-align: center; font-size: clamp(22px, 6.400vw, 30px); line-height: 1; font-variant-numeric: tabular-nums; }
.toy-clock .toy-note, .toy-coffee .toy-note { text-align: center; }

.pour { position: relative; width: min(100%, 150px); margin-inline: auto; padding-top: 20px; }
.pour-stream { position: absolute; left: 50%; top: 0; width: 10px; margin-left: -5px; height: 0; border-radius: 5px; background: #6B3E1F; z-index: 1; }
.btn-hold { width: 100%; white-space: normal; text-align: center; line-height: 1.1; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

.toy-reply { position: relative; overflow: hidden; }
.mail { border-width: 4px; border-radius: 16px; padding: 14px; overflow: hidden; }
.mail-body { margin: 10px 0 12px; padding: 10px 0; border-block: 3px solid var(--btn); font-size: 28px; line-height: 1; }
.stamp {
  position: absolute; left: 50%; top: 50%; padding: 6px 14px 8px; white-space: nowrap;
  border: 5px solid #FF3B30; border-radius: 10px; background: rgba(255, 255, 255, 0.88); color: #FF3B30; font-size: clamp(22px, 6.400vw, 30px); line-height: 1;
  transform: translate(-50%, -50%) rotate(-10deg) scale(2); opacity: 0; pointer-events: none;
}
.stamp.is-on { animation: stamp 0.300s cubic-bezier(0.3, 1.4, 0.5, 1) forwards; }
.inbox { font-size: 20px; color: #FF3B30; text-align: center; font-variant-numeric: tabular-nums; }
.inbox.is-zero { color: var(--grey); }
.storm { display: grid; gap: 6px; }
.storm:empty { display: none; }
.storm li { padding: 8px 12px 9px; background: #fff; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); animation: drop 0.260s cubic-bezier(0.3, 1.5, 0.5, 1); }
.storm li:nth-child(3n) { transform: rotate(1deg); }
.storm li:nth-child(3n + 1) { transform: rotate(-1deg); }
.storm small { display: block; font-size: 11.500px; color: var(--grey); }
.storm span { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ooo { border-width: 4px; border-radius: 16px; padding: 14px; }
.ooo-body { margin-top: 10px; padding-top: 10px; border-top: 3px solid var(--btn); min-height: 8.200em; font-size: clamp(17px, 4.800vw, 21px); line-height: 1.18; white-space: pre-wrap; }
.ooo-body::after { content: "|"; animation: flash 0.530s steps(1) infinite; }

.voices { display: flex; flex-wrap: wrap; gap: 8px; }
.voice {
  min-height: 44px; padding: 8px 12px 9px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ink); color: var(--pip-cap); font-size: 14.500px; line-height: 1.1; text-align: left;
}
.voice.is-barb { background: var(--barb-dark); color: var(--barb-cap); }
.voice.is-narrator { background: #141210; color: #fff; }
.voice:active, .voice.is-on { transform: scale(0.92); }

.note-pad {
  position: relative; width: min(88%, 340px); aspect-ratio: 480 / 380; margin: 10px auto 14px;
  background: var(--sticky); box-shadow: 5px 9px 0 rgba(0, 0, 0, 0.25); transform: rotate(-4deg);
}
.note-pad canvas { width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.note-hint { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font: 400 34px/1 var(--hand); color: rgba(42, 42, 42, 0.36); }
.pens { display: flex; gap: 8px; margin-right: auto; }
.pen { width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer; background: var(--c); border: 5px solid var(--paper); }
.pen.is-on { box-shadow: 0 0 0 4px var(--ink); }

/* ---------- Scene 7: badge ---------- */
.badge-stage { position: relative; height: clamp(300px, 86vw, 420px); margin-top: 4px; }
.badge-rig {
  --card-w: min(66vw, 300px);
  position: absolute; top: 14px; left: 50%; width: var(--card-w); margin-left: calc(var(--card-w) / -2);
  transform-origin: 50% 8px; will-change: transform; touch-action: pan-y; cursor: grab; z-index: 2;
}
.strap { display: block; width: 44%; height: clamp(84px, 24vw, 120px); margin: 0 auto -8px; overflow: visible; }
.strap path { fill: none; stroke: var(--blue); stroke-width: 7; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pin { position: absolute; left: 50%; top: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--red); border: 4px solid var(--ink); }
.badge-card { position: relative; overflow: hidden; background: #fff; border: var(--line) solid var(--ink); border-radius: 18px; }
.badge-card canvas { width: 100%; height: auto; -webkit-user-select: none; user-select: none; }
.badge-pip { position: absolute; left: -4px; bottom: -7px; z-index: 1; width: clamp(92px, 27vw, 170px); }
.badge-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 440px; margin: 0 auto 22px; }
.badge-form input, .sheet-body input {
  width: 100%; min-width: 0; height: 52px; padding: 0 16px; border: var(--line) solid var(--ink); border-radius: 14px;
  background: #fff; font-size: 18px; text-transform: lowercase;
}
.badge-form input::placeholder, .sheet-body input::placeholder { color: #B0AAA0; }

/* ---------- Scene 8: supply closet ---------- */
.sticky-note {
  position: relative; z-index: 2; display: block; width: max-content; max-width: 78%; margin: 22px 0 0 auto; padding: 14px 16px 12px;
  background: var(--sticky); box-shadow: 5px 9px 0 rgba(0, 0, 0, 0.25); transform: rotate(4deg);
  font: 400 21px/1.1 var(--hand); color: #2A2A2A;
}
.sticky-note span { display: block; margin-top: 8px; text-align: right; }
.shelf { display: grid; gap: 12px; margin-top: 22px; }
.product {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 14px 16px 16px;
  background: #fff; border: var(--line) solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  color: inherit; text-decoration: none;
}
.product:active { transform: translateY(6px); box-shadow: 0 0 0 rgba(0, 0, 0, 0.18); }
.prod-text b { display: block; margin-top: 2px; font-size: 20px; line-height: 1.1; letter-spacing: -0.02em; }
.prod-desc { display: block; margin-top: 6px; font: 500 14.500px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; color: #55504A; }
.price { display: grid; place-items: center; min-width: 62px; min-height: 46px; padding: 0 12px; border-radius: 12px; background: var(--btn); font-size: 18px; }

/* ---------- Footer ---------- */
.foot { background: var(--desk); padding: 6px 0 calc(104px + env(safe-area-inset-bottom)); text-align: center; }
.foot .pill { background: rgba(30, 26, 22, 0.12); }
.foot .follow { margin-top: 0; }
.fine { margin-top: 26px; font-size: 14px; line-height: 1.4; color: rgba(30, 26, 22, 0.78); text-wrap: balance; }

/* ---------- Dock (phones) ---------- */
.dock {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
  width: min(100% - 20px, 430px); height: 60px; padding: 0 4px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  transform: translateX(-50%);
  border-radius: 20px; background: var(--ink); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.22);
}
.dock a { display: grid; align-content: center; justify-items: center; gap: 3px; color: rgba(255, 253, 246, 0.62); text-decoration: none; font-size: 10.500px; letter-spacing: 0; border-radius: 14px; }
.dock a .ic { width: 22px; height: 22px; stroke-width: 2.200; }
.dock a.is-here { color: var(--pip-cap); }
.dock a:active { transform: scale(0.9); }

/* ---------- Player ---------- */
dialog { color: var(--ink); }
.player {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #000; overflow: hidden;
}
.player::backdrop, dialog.game::backdrop { background: rgba(20, 18, 16, 0.82); }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .icon-btn { position: absolute; z-index: 3; background: rgba(0, 0, 0, 0.6); color: #fff; }
.player-close { right: 10px; top: max(10px, env(safe-area-inset-top)); }
.player-prev { left: 8px; top: 50%; margin-top: -22px; }
.player-next { right: 8px; top: 50%; margin-top: -22px; }
.player .tile-label { left: 12px; top: max(18px, calc(env(safe-area-inset-top) + 8px)); bottom: auto; font-size: 14px; }

/* ---------- Games ---------- */
dialog.game {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--wall); overflow: hidden; overscroll-behavior: contain; flex-direction: column;
}
dialog.game[open] { display: flex; }
.game-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: max(6px, env(safe-area-inset-top)) 6px 4px 18px; }
.game-bar h2 { font-size: 19px; line-height: 1.1; }
.game-root { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); }
#memeEdCanvas { width: min(100%, 38dvh); height: auto; margin-inline: auto; border: var(--line) solid var(--ink); border-radius: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 5px; margin: 0 -5px; scrollbar-width: none; }
.chips button { flex: none; border: 0; cursor: pointer; }
.chips .who { min-height: 44px; padding: 0 14px; border-radius: 12px; background: #141210; color: #fff; font-size: 15px; }
.chips .who[data-who="pip"] { background: var(--ink); color: var(--pip-cap); }
.chips .who[data-who="barb"] { background: var(--barb-dark); color: var(--barb-cap); }
.faces button { width: 58px; height: 58px; padding: 0; border-radius: 14px; background: var(--wall-2); overflow: hidden; }
.faces .pip { animation: none; }
.chips button.is-on { box-shadow: 0 0 0 4px var(--blue); }
.sheet-body .btn { flex: 1; }

.g-loading { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; text-align: center; color: var(--grey); }
.g-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.g-hud { position: absolute; inset: 0 0 auto 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 4px 18px; pointer-events: none; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.g-lives { display: flex; gap: 5px; }
.g-lives i { width: 17px; height: 22px; border: 3px solid var(--ink); border-radius: 2px; background: var(--paper); }
.g-lives i.is-off { opacity: 0.2; }

/* A game scene: wall on top, desk below, like every shot in the show. */
.g-scene { position: absolute; inset: 0; display: flex; flex-direction: column; }
.g-wall { position: relative; flex: 1; min-height: 0; background: var(--wall); overflow: hidden; }
.g-desk { flex: none; position: relative; min-height: 34%; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--desk); border-top: var(--desk-line) solid var(--ink); display: grid; align-content: start; justify-items: center; gap: 12px; }
.g-desk .cap { --cap: clamp(24px, 7.400vw, 34px); }
.g-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.g-big { font-size: clamp(60px, 20vw, 92px); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: #fff; -webkit-text-stroke: 0.14em #141210; paint-order: stroke fill; }
.g-meta { font-size: 13px; color: rgba(30, 26, 22, 0.7); text-align: center; }
.g-poster { position: absolute; left: 14px; top: 12px; font-size: clamp(22px, 6.400vw, 30px); z-index: 1; }
.g-stand { position: absolute; bottom: -7px; }
.g-emoji { font-size: 24px; letter-spacing: 2px; }

/* 1% */
.op-wall[data-s="dead"] { background: #BFB3A3; }
.op-wall[data-s="go"] { background: #FFD2CC; }
.op-tap { position: absolute; inset: 0; z-index: 4; border: 0; background: transparent; cursor: pointer; }
.op-laptop { position: absolute; right: 4%; bottom: 8px; width: 58%; }
.op-pip { left: 0; width: 42%; }

/* barb or pip? */
.bz-top { position: absolute; inset: 8px 14px auto 14px; z-index: 2; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.bz-dots { letter-spacing: 1px; }
.bz-deck { position: absolute; inset: 44px 18px 18px; }
.bz-card {
  position: absolute; inset: 0; padding: 22px; display: grid; place-content: center; text-align: center;
  background: #fff; border: var(--line) solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  font-size: clamp(26px, 7.800vw, 36px); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance;
  touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; will-change: transform;
}
.bz-card.is-back { transform: translateY(10px) scale(0.95); }
.bz-card.is-far { transform: translateY(20px) scale(0.9); }
.bz-card.is-fly { transition: transform 0.260s ease-in; pointer-events: none; }
.bz-card.is-snap { transition: transform 0.260s cubic-bezier(0.3, 1.5, 0.5, 1); }
.bz-stamp { position: absolute; top: 16px; padding: 4px 10px 5px; border-radius: 9px; font-size: 16px; opacity: 0; }
.bz-stamp.is-barb { right: 14px; background: var(--barb-dark); color: var(--barb-cap); transform: rotate(6deg); }
.bz-stamp.is-pip { left: 14px; background: var(--ink); color: var(--pip-cap); transform: rotate(-6deg); }
.bz-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.bz-btn { min-height: 76px; padding: 6px; border: 0; border-radius: 16px; cursor: pointer; font-size: 17px; line-height: 1.1; }
.bz-btn:active { transform: scale(0.92); }
.bz-btn small { display: block; margin-top: 3px; font-size: 11.500px; opacity: 0.8; }
.bz-pip { background: var(--ink); color: var(--pip-cap); }
.bz-barb { background: var(--barb-dark); color: var(--barb-cap); }
.bz-fb { min-height: 20px; font-size: 14px; text-align: center; color: rgba(30, 26, 22, 0.78); }

/* get hired */
.hd { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.hd-wall { position: relative; background: var(--wall); padding: 6px 16px 0; text-align: center; overflow: hidden; }
.hd-num { font-size: clamp(52px, 16vw, 70px); line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hd-rate { margin-top: 4px; font-size: 13px; color: var(--grey); }
.hd-meter { position: relative; height: 30px; margin: 12px auto 0; max-width: 420px; background: #fff; border: 4px solid var(--ink); border-radius: 12px; overflow: hidden; }
.hd-meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: #9BE37A; }
.hd-meter span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; }
.hd-pip { position: relative; display: block; width: min(46vw, 180px); margin: 10px auto -7px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-user-select: none; user-select: none; z-index: 1; }
.hd-pip.is-down { transform: scale(0.94); }
.hd-float { position: absolute; z-index: 3; font-size: 22px; color: var(--blue); pointer-events: none; animation: floatup 0.600s ease-out forwards; }
.hd-desk { position: relative; background: var(--desk); border-top: var(--desk-line) solid var(--ink); padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); min-height: 50%; }
.hd-desk .cap { --cap: clamp(22px, 6.600vw, 30px); min-height: 2.300em; margin-bottom: 14px; }
.hd-shop { display: grid; gap: 8px; max-width: 480px; margin-inline: auto; }
.hd-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 10px 10px 11px 14px; background: #fff; border: 4px solid var(--ink); border-radius: 14px; text-align: left; cursor: pointer; }
.hd-item:disabled { opacity: 0.5; cursor: default; }
.hd-item:not(:disabled):active { transform: scale(0.96); }
.hd-item b { display: block; font-size: 15.500px; line-height: 1.15; }
.hd-item small { display: block; margin-top: 2px; font-size: 12px; color: var(--grey); }
.hd-cost { padding: 6px 10px 7px; border-radius: 9px; background: var(--btn); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Motion: everything pops, nothing drifts ---------- */
@keyframes pop { 0% { transform: scale(0.75); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes tap { 0% { transform: scale(1); } 40% { transform: scale(0.9, 0.86); } 100% { transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(-0.600%); } 50% { transform: translateY(0.600%); } }
@keyframes blink { 0%, 95% { transform: scaleY(1); } 95.100%, 100% { transform: scaleY(0.08); } }
@keyframes barb-blink { 0%, 94.500% { transform: scaleY(1); } 94.600%, 100% { transform: scaleY(2.170); } }
@keyframes sweat { from { transform: translateY(0); } to { transform: translateY(60px); } }
@keyframes flash { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.2; } }
@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-10deg) scale(2); opacity: 0; } to { transform: translate(-50%, -50%) rotate(-10deg) scale(1); opacity: 1; } }
@keyframes drop { from { transform: translateY(-40px); opacity: 0; } to { opacity: 1; } }
@keyframes floatup { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-56px); opacity: 0; } }
@keyframes star {
  0% { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.200) rotate(200deg); opacity: 0; }
}

/* ---------- Wider screens ---------- */
@media (min-width: 700px) {
  :root { --side: 32px; --line: 6px; --desk-line: 8px; }
  dialog.game { width: min(430px, 100vw); height: min(820px, 100dvh - 40px); margin: auto; border: var(--line) solid var(--ink); border-radius: 30px; }
  .game-bar { padding-top: 10px; }
  .player { width: min(430px, 100vw); height: min(764px, 100dvh - 40px); margin: auto; border: var(--line) solid var(--ink); border-radius: 30px; }
  .hd-pip { width: 180px; }
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .tile-art { height: 130px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .bento { gap: 16px; }
  .toy { padding: 18px; }
  .meme { flex-basis: 280px; }
  .reel li { flex-basis: 220px; }
  .foot { padding-bottom: 56px; }
}

@media (min-width: 900px) {
  .dock { display: none; }
  .nav { padding-inline: max(32px, (100vw - 1080px) / 2); gap: 18px; }
  .nav-links { display: flex; margin-right: 8px; }
  .hint { font-size: 14px; }

  .office .wall { padding-top: 64px; }
  .office .desk { padding: 40px 0 60px; }
  .call, .screen { padding: 76px 0 64px; }

  .hero .wall { padding-top: calc(var(--nav-h) + 26px); }
  .stage { --tv-w: clamp(230px, 31svh, 300px); width: min(100% - 64px, 860px); }
  .hero-poster { left: 0; top: 14px; font-size: 54px; }
  .hero-pip { left: 15%; width: clamp(210px, 30svh, 290px); bottom: -12px; }
  .tv { right: 22%; }
  .hero-barb { display: block; position: absolute; right: 0; bottom: 0; width: clamp(130px, 19svh, 180px); z-index: 1; }

  .reel { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; width: min(100% - 64px, 1080px); margin-inline: auto; padding: 4px 0 10px; overflow: visible; }
  .reel li { flex: none; }
  .tile .tile-label { font-size: 12.500px; }
  .tile:hover { transform: translateY(-4px); }

  .meme-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; width: min(100% - 64px, 1080px); margin-inline: auto; padding: 4px 0 40px; overflow: visible; }

  .about-grid { grid-template-columns: auto auto; justify-content: center; align-items: end; gap: 28px; }
  .about-pip { width: 210px; margin: 0 0 -8px; }

  .game-tile:hover { transform: translateY(-4px); }
  .game-tile:active { transform: translateY(6px); }
  .tile-name { font-size: 23px; }
  .tile-sub { font-size: 14px; }
  .standers { margin-top: -40px; }

  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); margin-bottom: 48px; }
  .toy-clock { grid-column: span 3; }
  .toy-coffee { grid-column: span 3; }
  .toy-reply { grid-column: span 6; grid-row: span 2; }
  .toy-ooo { grid-column: span 6; }
  .toy-voices { grid-column: span 6; }
  .toy-note-pad { grid-column: span 6; }
  .toy h3 { font-size: 19px; }

  .badge-stage { height: 470px; }
  .badge-rig { --card-w: 330px; }
  .badge-pip { left: 12%; width: 190px; }

  .product:hover { transform: translateY(-3px); }
  .product:active { transform: translateY(6px); }
  .sticky-note { position: absolute; right: 0; top: -6px; margin: 0; }
  .shelf { margin-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
