@font-face { font-family: 'Lexend'; src: url('assets/Lexend-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lexend'; src: url('assets/Lexend-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --black: #050505;
  --white: #f4f1ec;
  --pink: #e80ade;
  --blue: #0c9ce5;
  --orange: #ff8511;
  --muted: rgba(244, 241, 236, .58);
  --line: rgba(244, 241, 236, .12);
  --chrome: #151515;
  --chrome-2: #1f1f1f;
  --gutter: 32px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: 'Lexend', system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  /* the deck's halftone, very quiet */
  background-image: radial-gradient(rgba(244, 241, 236, .07) 1.1px, transparent 1.4px);
  background-size: 9px 9px;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
b { font-weight: 600; }
.kicker b, .brief-k b, .clue-k b { color: var(--pink); }

/* header */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 13px; letter-spacing: .12em; }
.hud { display: flex; gap: 26px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.hud b { color: var(--white); font-size: 18px; letter-spacing: -.02em; margin-right: 6px; }
.hud-round b { margin-right: 0; }

/* layout */
.stage {
  position: fixed; inset: 72px var(--gutter) 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px;
}

/* the browser */
.browser {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--chrome);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.browser.shake { animation: shake .32s; }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }

.tabbar {
  position: relative;
  display: flex; align-items: flex-end;
  height: 46px; padding: 8px 10px 0;
  background: #0d0d0d;
  touch-action: none; user-select: none;
  cursor: pointer;
}
.tab {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 8px;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px; white-space: nowrap; overflow: hidden;
  transition: background .2s, color .2s;
}
.tab::after { /* separator */
  content: ''; position: absolute; right: 0; top: 11px; bottom: 11px; width: 1px; background: var(--line);
}
.tab { transform-origin: 50% 100%; will-change: transform; }
.tab.hot { z-index: 2; background: var(--chrome-2); color: var(--white); box-shadow: inset 0 -3px 0 var(--pink); }
.tab.tiny.hot { background: var(--pink); box-shadow: none; }

/* the peek bubble: big icon + full title of the tab you're on, gliding from tab to tab */
.browser { position: relative; }
.peek {
  position: absolute; left: 0; top: 52px; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  max-width: min(420px, 80%);
  padding: 10px 16px 10px 12px;
  border-radius: 12px;
  background: var(--white); color: var(--black);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  pointer-events: none;
  opacity: 0; translate: 0 -6px;
  transition: opacity .15s, translate .15s;
  will-change: transform;
}
.peek.on { opacity: 1; translate: 0 0; }
.peek::before { /* caret pointing at the tab */
  content: ''; position: absolute; top: -6px; left: calc(var(--caret, 50%) - 6px);
  width: 12px; height: 12px; background: var(--white); transform: rotate(45deg); border-radius: 2px;
}
.peek-ico .ico { width: 22px; height: 22px; display: block; }
.peek-t { overflow: hidden; text-overflow: ellipsis; }
.tab.active { background: var(--chrome); color: var(--white); }
.tab.active::after, .tab.hot::after { display: none; }
.tab .ico { flex: none; width: 16px; height: 16px; display: block; }
.tab .ttl { overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .15s; }
.tab.wide .ttl { opacity: 1; }
.tab.tiny { padding: 0; justify-content: center; }
.tab.tiny .ico { width: 10px; height: 10px; }
.tab.pop { animation: pop .5s; }
@keyframes pop { 0% { background: var(--pink); } 100% { background: transparent; } }
.tab.found { background: var(--pink) !important; color: #fff; }
.tab.beacon { animation: beacon .9s ease-in-out 4; }
@keyframes beacon { 50% { background: var(--pink); color: #fff; box-shadow: 0 0 24px rgba(232, 10, 222, .8); } }
.clue-look { grid-column: 2; display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.clue-look .ico { width: 18px; height: 18px; display: block; }
.tab.miss { background: rgba(255, 133, 17, .25); }

.addr {
  display: flex; align-items: center; gap: 14px;
  height: 42px; padding: 0 16px;
  background: var(--chrome);
  border-bottom: 1px solid var(--line);
}
.dots { display: flex; gap: 6px; }
.dots b { width: 9px; height: 9px; border-radius: 50%; background: #333; }
.url {
  flex: 1; min-width: 0;
  padding: 6px 14px; border-radius: 999px; background: #0b0b0b;
  font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* memory meter: fills as tabs pile up; at 100% the laptop gives up */
.mem { display: flex; align-items: center; gap: 10px; flex: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.mem i { position: relative; width: 120px; height: 6px; border-radius: 6px; background: #2a2a2a; overflow: hidden; }
.mem i::after { content: ''; position: absolute; inset: 0; width: var(--mem, 28%); background: var(--blue); border-radius: 6px; transition: width .3s, background .3s; }
.mem.warn { color: var(--orange); }
.mem.warn i::after { background: var(--orange); }
.mem.crit { color: #ff3b3b; animation: blinkred .5s steps(1) infinite; }
.mem.crit i::after { background: #ff3b3b; }
@keyframes blinkred { 50% { opacity: .45; } }

/* heat: the browser glows hotter as stress rises */
.heat {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 60, 30, .55), rgba(255, 133, 17, .15) 45%, transparent 70%),
              radial-gradient(ellipse at 50% 120%, rgba(232, 10, 222, .35), transparent 60%);
  opacity: calc(max(0, var(--stress, 0) - .45) * 1.6);
  mix-blend-mode: screen;
}
.s2 .heat { animation: throb .6s ease-in-out infinite alternate; }
@keyframes throb { to { filter: brightness(1.4); } }
.s1 .tabbar { background: #170b0b; }
.s2 .browser { border-color: rgba(255, 59, 59, .6); }
.browser.crashed { filter: grayscale(1) brightness(.5); transition: filter .6s; }
.tab.flung { pointer-events: none; }
.tab.nope { animation: nope .35s; }
@keyframes nope { 25% { margin-left: -6px; } 75% { margin-left: 6px; } }

/* obstacle pop-ups sit on top of the tab bar */
.modal {
  position: absolute; z-index: 8; top: 6px; left: 50%; translate: -50% 0;
  width: min(420px, 92%);
  padding: 16px 18px 14px;
  border-radius: 14px; background: var(--white); color: var(--black);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  animation: popin .35s cubic-bezier(.2, 1.4, .4, 1);
}
.modal[hidden] { display: none; }
.m-k { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; opacity: .55; }
.m-t { margin-top: 4px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.m-b { margin-top: 4px; font-size: 13px; opacity: .7; }
.m-btns { display: flex; gap: 8px; margin-top: 12px; }
.m-btns button { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, .2); font-size: 13px; font-weight: 600; color: var(--black); }
.m-btns button:first-child { background: var(--pink); border-color: var(--pink); color: #fff; }
.m-btns button:hover { transform: translateY(-1px); }

/* the call: a little video-call window, then your screen gets shared */
.call {
  position: fixed; z-index: 25; right: var(--gutter); bottom: 28px;
  width: 300px; padding: 12px;
  border-radius: 14px; background: #101010; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: popin .4s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes popin { from { transform: scale(1.25); opacity: 0; } }
.call[hidden] { display: none; }
.call-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.call-tiles i { display: grid; place-items: end start; aspect-ratio: 16 / 10; padding: 6px 8px; border-radius: 8px; font-style: normal; font-size: 11px; font-weight: 600; background: radial-gradient(rgba(244, 241, 236, .18) 1px, transparent 1.4px) 0 0 / 6px 6px, #222; }
.call-tiles .ceo { outline: 2px solid var(--pink); }
.call-rec { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #ff3b3b; }
.call-rec b { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; animation: blinkred 1s steps(1) infinite; }
.call-t { margin-top: 6px; font-size: 15px; line-height: 1.35; }
.call-t b { font-size: 34px; color: var(--pink); font-variant-numeric: tabular-nums; }
.call.win .call-t b { font-size: 18px; }
.call.lose { border-color: #ff3b3b; }
.call.lose .call-t b { font-size: 18px; color: #ff3b3b; }

/* fail screen */
.seen { list-style: none; display: grid; gap: 6px; margin-top: 22px; max-width: 520px; }
.seen li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(244, 241, 236, .06); font-size: 14px; }
.seen .ico { width: 16px; height: 16px; }
.reacts { display: flex; gap: 10px; margin-top: 14px; font-size: 30px; }
.reacts span { animation: arrive .5s both; }
.reacts span:nth-child(2) { animation-delay: .2s; } .reacts span:nth-child(3) { animation-delay: .4s; } .reacts span:nth-child(4) { animation-delay: .6s; }

.peek-h { display: none; margin-left: 6px; padding-left: 10px; border-left: 1px solid rgba(0, 0, 0, .15); font-size: 11px; font-weight: 600; color: var(--pink); }
.peek.can-flick .peek-h { display: inline; }

.page { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.doc { position: absolute; inset: 0; padding: 172px 48px 40px; overflow: auto; animation: pagein .25s ease-out; }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } }
.doc-k { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.doc h2 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 600; letter-spacing: -.04em; line-height: .98; overflow-wrap: anywhere; max-width: 16em; }
.pg { margin-top: 26px; max-width: 760px; }
.pg-lead { font-size: 18px; line-height: 1.45; max-width: 32em; }
.pg-note { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.pg-meta { font-size: 12px; color: var(--muted); }
.pg-big { font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
.pg-big b { color: var(--pink); font-variant-numeric: tabular-nums; }

/* stickers: found / decoy */
.sticker {
  position: absolute; right: 40px; top: 172px; z-index: 1;
  display: grid; gap: 6px; max-width: 300px;
  padding: 18px 20px; border-radius: 12px;
  transform: rotate(3deg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  animation: stamp .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes stamp { from { transform: rotate(-8deg) scale(1.6); opacity: 0; } }
.sticker small { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
.sticker b { font-size: 22px; line-height: 1.15; letter-spacing: -.02em; }
.sticker span { font-size: 12px; opacity: .8; }
.found-s { background: var(--pink); color: #fff; }
.decoy-s { background: var(--orange); color: #111; transform: rotate(-4deg); }

/* mail */
.pg-mail dl { display: grid; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; font-size: 13px; }
.pg-mail dl div { display: flex; gap: 12px; }
.pg-mail dt { width: 64px; color: var(--muted); }
.pg-mail blockquote { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.7; }
.pg-inbox ul { list-style: none; margin-top: 18px; border-top: 1px solid var(--line); }
.pg-inbox li { display: grid; grid-template-columns: 180px 1fr auto; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pg-inbox li.unread { color: var(--white); }
.pg-inbox li.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--pink); }
.pg-inbox em { font-style: normal; font-variant-numeric: tabular-nums; }

/* chat */
.pg-chat { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.bub { align-self: flex-start; max-width: 80%; padding: 9px 14px; border-radius: 14px 14px 14px 4px; background: #262626; font-size: 14px; }
.bub small { display: block; font-size: 10px; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; }
.bub.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgba(12, 156, 229, .25); }
.bub.last { background: var(--pink); }
.bub.last small { color: rgba(255, 255, 255, .8); }
.typing { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .4; } }

/* doc */
.sheet-paper { display: grid; grid-template-columns: 1fr 220px; gap: 22px; margin-top: 14px; padding: 28px; border-radius: 10px; background: #f4f1ec; color: #111; }
.lines { display: grid; gap: 10px; align-content: start; }
.lines i { display: block; height: 9px; border-radius: 4px; background: #d6d2cb; }
.lines .gap { height: 12px; }
.comment { align-self: start; padding: 12px 14px; border-radius: 8px; background: #fff; border-left: 3px solid var(--pink); font-size: 13px; line-height: 1.4; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.comment small { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--pink); margin-bottom: 4px; }

/* sheet */
.pg-sheet table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.pg-sheet th, .pg-sheet td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.pg-sheet th { background: rgba(255, 133, 17, .14); color: var(--orange); font-weight: 600; }
.pg-sheet td:not(:first-child) { text-align: right; }
.pg-sheet .sum td { font-weight: 600; background: rgba(244, 241, 236, .05); }
.pg-sheet .sum td:last-child { color: var(--pink); }

/* calendar */
.pg-cal ol { list-style: none; display: grid; gap: 4px; margin-top: 18px; max-width: 420px; }
.pg-cal li { display: flex; gap: 12px; align-items: flex-start; min-height: var(--h); padding: 8px 12px; border-radius: 6px; background: rgba(12, 156, 229, .2); border-left: 3px solid var(--blue); font-size: 13px; }
.pg-cal li:nth-child(3n) { background: rgba(232, 10, 222, .18); border-color: var(--pink); }
.pg-cal em { font-style: normal; color: var(--muted); width: 40px; flex: none; font-variant-numeric: tabular-nums; }
.rsvp { display: flex; gap: 8px; margin-top: 16px; }
.rsvp span { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rsvp .on { background: var(--white); color: var(--black); }

/* video */
.screen-v {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; max-width: 620px; border-radius: 10px;
  background: radial-gradient(rgba(244, 241, 236, .2) 1.2px, transparent 1.6px) 0 0 / 8px 8px, linear-gradient(135deg, #1b1b1b, #0a0a0a);
}
.play { width: 0; height: 0; border-left: 34px solid var(--white); border-top: 21px solid transparent; border-bottom: 21px solid transparent; margin-left: 8px; opacity: .9; }
.frames { position: absolute; left: 16px; bottom: 12px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.frames b { color: var(--white); font-variant-numeric: tabular-nums; }
.scrub { max-width: 620px; height: 4px; margin-top: 10px; border-radius: 4px; background: #2a2a2a; }
.scrub i { display: block; height: 100%; border-radius: 4px; background: var(--pink); }

/* search */
.pg-search .q { display: inline-block; padding: 10px 18px; margin-bottom: 16px; border-radius: 999px; background: #0b0b0b; border: 1px solid var(--line); font-size: 14px; }
.pg-search ul { list-style: none; display: grid; gap: 16px; margin-top: 22px; }
.pg-search li small { display: block; font-size: 11px; color: var(--muted); }
.pg-search li b { display: block; color: var(--blue); font-weight: 400; font-size: 16px; margin: 2px 0; }
.pg-search li span { font-size: 13px; color: var(--muted); }

/* moodboard */
.pg-mood .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 8px; }
.tile { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 46px; background: #2a2a2a; }
.tile.pink { background: var(--pink); }
.tile.blue { background: var(--blue); }
.tile.orange { background: var(--orange); }
.tile.dots { background: radial-gradient(#f4f1ec 2px, transparent 2.5px) 0 0 / 10px 10px, #111; }
.tile.dots-pink { background: radial-gradient(var(--pink) 3px, transparent 3.5px) 0 0 / 12px 12px, #111; }
.tile.blue-dots { background: radial-gradient(#111 2.5px, transparent 3px) 0 0 / 9px 9px, var(--blue); }
.tile.dog { background: #f4f1ec; }

/* sticky note */
.pg-sticky p { display: inline-block; max-width: 340px; padding: 28px 26px; background: #ffd84d; color: #222; font-size: 22px; line-height: 1.3; transform: rotate(var(--r)); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.pg-sticky small { display: block; margin-top: 14px; font-size: 12px; opacity: .6; }

/* folder */
.pg-folder ul { list-style: none; border-top: 1px solid var(--line); max-width: 520px; }
.pg-folder li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pg-folder li i { width: 18px; height: 14px; border-radius: 2px; background: #8a8782; }
.pg-folder li em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }

/* lock, music, eye, triangle, deep vibe */
.pg-lock, .pg-eye, .pg-tri, .pg-dv { display: grid; justify-items: start; gap: 20px; }
.padlock { position: relative; width: 70px; height: 54px; margin-top: 40px; border-radius: 10px; background: #8a8782; }
.padlock::before { content: ''; position: absolute; left: 14px; right: 14px; top: -36px; height: 46px; border: 9px solid #8a8782; border-bottom: 0; border-radius: 30px 30px 0 0; }
.pg-music { display: grid; grid-template-columns: 140px 1fr; gap: 22px; align-items: center; max-width: 560px; }
.pg-music .pg-note { grid-column: 1 / -1; }
.cover { aspect-ratio: 1; border-radius: 10px; background: radial-gradient(#111 3px, transparent 3.5px) 0 0 / 10px 10px, var(--pink); }
.track { font-size: 22px; font-weight: 600; }
.artist { color: var(--muted); font-size: 13px; margin-top: 4px; }
.eq { display: flex; align-items: flex-end; gap: 4px; height: 36px; margin-top: 14px; }
.eq i { width: 6px; height: 100%; background: var(--pink); border-radius: 2px; transform-origin: bottom; animation: eq .8s ease-in-out infinite alternate; }
.eq i:nth-child(2n) { animation-duration: .6s; } .eq i:nth-child(3n) { animation-duration: 1.1s; } .eq i:nth-child(4n) { animation-delay: .2s; }
@keyframes eq { from { transform: scaleY(.15); } to { transform: scaleY(1); } }
.big-eye { position: relative; display: grid; place-items: center; width: 220px; height: 120px; background: var(--white); clip-path: ellipse(50% 46% at 50% 50%); animation: blink 3.2s infinite; }
.big-eye b { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, #050505 0 32%, var(--pink) 34%); }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
.outline-tri { width: 160px; height: 140px; background: #8a8782; clip-path: polygon(50% 0, 100% 100%, 0 100%, 50% 0, 50% 12%, 9% 94%, 91% 94%, 50% 12%); }
.pg-dv img { width: 100%; height: auto; display: block; }

/* ---------- live pages ---------- */
.later { display: none !important; }
.arrive { animation: arrive .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes arrive { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.pg-chat .bub, .pg-search li, .pg-search .pg-lead { animation: arrive .4s cubic-bezier(.2, .9, .3, 1.2); }
.pg button { font: inherit; color: inherit; cursor: pointer; }

.pg-actions { display: flex; gap: 8px; margin-top: 18px; }
.pg-actions button, .pp { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.pg-actions button:hover, .pp:hover { background: rgba(244, 241, 236, .08); }
.pg-actions .hot { background: var(--pink); border-color: var(--pink); color: #fff; }
.pg-mail .new { color: var(--pink); font-weight: 600; }

.sheet-paper { position: relative; }
.lines .growing { animation: grow 1s ease-out; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.ghost {
  position: absolute; left: 30%; top: 40%;
  padding: 2px 7px 2px 9px; border-radius: 0 6px 6px 6px;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap;
  transition: left .9s cubic-bezier(.5, 0, .2, 1), top .9s cubic-bezier(.5, 0, .2, 1);
}
.ghost::before { content: ''; position: absolute; left: -2px; top: -2px; width: 2px; height: 20px; background: var(--blue); }

.pg-sheet td { transition: background .2s, color .2s; }
.pg-sheet td.err { background: rgba(255, 133, 17, .25); color: var(--orange); font-weight: 600; }

.pg-cal li { animation: none; }
.pg-cal li.arrive { animation: arrive .45s cubic-bezier(.2, .9, .3, 1.2); }
.pg-cal li.focus { background: rgba(244, 241, 236, .08); border-color: var(--white); transition: opacity .4s; }
.pg-cal li.focus.eaten { text-decoration: line-through; opacity: .4; }
.rsvp button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rsvp button.on { background: var(--white); color: var(--black); }

.screen-v { width: 100%; border: 0; }
.screen-v.buffering .play { display: none; }
.buffer { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.buffer::before { content: ''; display: block; width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid rgba(244, 241, 236, .2); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--pink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.pg-mood .grid { cursor: pointer; }
.tile { transition: transform .4s cubic-bezier(.2, .9, .3, 1.3); }
.tile:hover { transform: scale(1.05) rotate(-2deg); }
.tile.dog { animation: wag 1.2s ease-in-out infinite; }
@keyframes wag { 50% { transform: rotate(6deg); } }

.pg-sticky { position: relative; min-height: 260px; }
.stick { display: inline-block; max-width: 340px; padding: 28px 26px; border: 0; text-align: left; background: #ffd84d; color: #222; font-size: 22px; line-height: 1.3; transform: rotate(var(--r)); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.stick small { display: block; margin-top: 14px; font-size: 12px; opacity: .6; }
.stick.extra { position: absolute; left: var(--x); top: var(--y); background: #ff9ff6; font-size: 20px; animation: slap .35s cubic-bezier(.2, 1.4, .4, 1); }
.stick.extra:nth-child(3n) { background: #8fd3ff; }
.stick.extra:nth-child(4n) { background: #ffc08a; }
@keyframes slap { from { transform: rotate(var(--r)) scale(1.4); opacity: 0; } }

.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pg-folder li { padding: 0; }
.pg-folder li button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; text-align: left; font-size: 14px; }
.pg-folder li button:hover { background: rgba(244, 241, 236, .05); }
.pg-folder li button i { width: 18px; height: 14px; border-radius: 2px; background: #8a8782; }
.pg-folder li button em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }

.runaway { padding: 12px 22px; border-radius: 999px; background: var(--white); color: var(--black) !important; font-weight: 600; transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); }

.eq.paused i { animation-play-state: paused; }
.pp { margin-top: 12px; }

.big-eye b { transition: transform .12s ease-out; }

.outline-tri { border: 0; transition: transform .8s cubic-bezier(.3, 1.4, .4, 1); }
.outline-tri.spin { transform: rotate(120deg); }

.dv-tri { position: relative; width: min(340px, 70%); margin: 30px 0 10px 60px; }
.dv-tri .c { position: absolute; padding: 6px 12px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 13px; font-weight: 600; animation: arrive .5s both; }
.dv-tri .c1 { left: -50px; top: 40%; animation-delay: .3s; }
.dv-tri .c2 { right: -30px; top: 6%; animation-delay: .5s; }
.dv-tri .c3 { right: 10%; bottom: -14px; animation-delay: .7s; }

/* the right tab: a burst of halftone dots behind the sticker */
.burst { position: absolute; right: 190px; top: 240px; width: 0; height: 0; z-index: 0; pointer-events: none; }
.burst i { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: var(--pink); opacity: 0; animation: burst .9s cubic-bezier(.1, .7, .3, 1) forwards; }
.burst i:nth-child(3n) { background: var(--white); }
.burst i:nth-child(4n) { background: var(--blue); }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(.3); } }

.clue {
  position: absolute; z-index: 2; left: 24px; top: 20px; right: 24px;
  display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: baseline;
  padding: 16px 20px;
  background: rgba(5, 5, 5, .86);
  border: 1px solid var(--line); border-left: 3px solid var(--pink);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
.clue-k { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); grid-row: span 2; }
.clue-t { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.clue-h { font-size: 13px; color: var(--muted); margin-top: 4px; }
.clue-h:empty { display: none; }
.meter { grid-column: 2; display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.meter[hidden] { display: none; }
.meter i { order: 2; flex: 1; max-width: 220px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--pink)); clip-path: inset(0 calc(100% - var(--heat, 0%)) 0 0 round 6px); outline: 1px solid var(--line); }
.meter span:last-child { order: 3; }

/* brief */
.brief {
  display: flex; flex-direction: column;
  padding: 22px 22px 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(5, 5, 5, .7);
  overflow: auto;
}
.brief-k { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.brief ol { list-style: none; display: grid; gap: 12px; }
.brief li { padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--line); }
.brief li small { display: block; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.brief li span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; color: rgba(244, 241, 236, .28); }
.brief li.got { border: 1px solid rgba(232, 10, 222, .5); background: rgba(232, 10, 222, .07); animation: land .5s cubic-bezier(.2, .9, .3, 1.3); }
.brief li.got span { color: var(--white); }
.brief li.idea.got { background: var(--pink); border-color: var(--pink); }
.brief li.idea.got small { color: rgba(255, 255, 255, .8); }
@keyframes land { from { transform: translateX(30px) scale(.94); opacity: 0; } }

/* screens */
.screen {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding: 90px var(--gutter) 40px;
  background: rgba(5, 5, 5, .9);
  backdrop-filter: blur(10px);
  overflow: auto;
}
.screen[hidden] { display: none; }
.screen-in { width: min(980px, 100%); }
.kicker { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
h1 { font-size: clamp(40px, 6.4vw, 96px); font-weight: 600; letter-spacing: -.045em; line-height: .92; }
.lede { margin-top: 22px; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.5; color: var(--muted); max-width: 30em; }
.small { margin-top: 18px; font-size: 12px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px; padding: 15px 26px;
  background: var(--pink); color: #fff;
  border-radius: 999px; font-weight: 600; font-size: 16px;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), background .3s;
}
.btn:hover { transform: translateY(-2px); background: #ff2bf0; }
.btn-ghost { background: transparent; border: 1px solid rgba(244, 241, 236, .3); color: var(--white); }
.btn-ghost:hover { background: rgba(244, 241, 236, .08); }
.btn:focus-visible, .tabbar:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.end-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.persona { margin-top: 30px; }
.persona-k { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.persona-t { margin-top: 6px; font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -.03em; color: var(--pink); }
.persona-b { margin-top: 6px; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 26px; }
.stats dt { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats dd { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 0 12px; }
.outro { margin-top: 26px; font-size: 14px; color: var(--muted); }
.outro a { color: var(--white); }
.brief-final { background: transparent; }

.toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 40;
  transform: translate(-50%, 20px);
  padding: 10px 18px; border-radius: 999px;
  background: var(--white); color: var(--black);
  font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  :root { --gutter: 16px; }
  .stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; inset: 64px var(--gutter) 12px; gap: 12px; }
  .brief { padding: 12px; }
  .brief-k { display: none; }
  .brief ol { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .brief li { padding: 8px 6px; }
  .brief li span { display: none; }
  .brief li small { font-size: 8px; letter-spacing: .1em; text-align: center; }
  .brief-final ol { grid-template-columns: 1fr; }
  .brief-final li span { display: block; }
  .brief-final li small { text-align: left; font-size: 10px; }
  .end-grid { grid-template-columns: 1fr; gap: 28px; }
  .doc { padding: 190px 20px 20px; }
  .sticker { position: relative; right: auto; top: auto; margin: 18px 0 0; max-width: none; }
  .sheet-paper { grid-template-columns: 1fr; padding: 18px; }
  .pg-inbox li { grid-template-columns: 1fr auto; }
  .pg-inbox li span { display: none; }
  .pg-music { grid-template-columns: 90px 1fr; }
  .clue { left: 12px; right: 12px; top: 12px; grid-template-columns: 1fr; padding: 12px 14px; }
  .clue-k { grid-row: auto; margin-bottom: 4px; }
  .meter, .clue-look { grid-column: 1; }
  .mem i { width: 54px; }
  .call { width: 220px; right: 12px; bottom: 90px; }
  .dots { display: none; }
  .hud { gap: 16px; }
}

/* phones: the brief strip becomes six numbered pips */
@media (max-width: 560px) {
  .brief:not(.brief-final) ol { counter-reset: piece; }
  .brief:not(.brief-final) li { counter-increment: piece; padding: 8px 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); }
  .brief:not(.brief-final) li::before { content: '0' counter(piece); }
  .brief:not(.brief-final) li.got { color: #fff; background: var(--pink); }
  .brief:not(.brief-final) li small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
h1.bal { text-wrap: balance; max-width: 12em; }

/* sound on/off */
.snd { margin-left: auto; margin-right: 26px; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--white); }
.snd:hover { background: rgba(244, 241, 236, .08); }
.snd i { width: 14px; height: 12px; background: currentColor; clip-path: polygon(0 30%, 30% 30%, 65% 0, 65% 100%, 30% 70%, 0 70%); position: relative; }
.snd.off { color: var(--muted); }
.snd.off span { text-decoration: line-through; text-decoration-color: var(--pink); }

/* the bubble's close button: the only part of the bubble you can click */
.peek-x {
  margin-left: 4px; padding: 5px 10px; border-radius: 999px;
  background: var(--black); color: var(--white) !important;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  pointer-events: none;
}
.peek.on .peek-x { pointer-events: auto; }
.peek-x:hover { background: var(--pink); }
.peek::after { /* an invisible bridge from the tab down to the bubble, so the mouse can travel */
  content: ''; position: absolute; left: 0; right: 0; top: -7px; height: 7px;
}
.peek.on::after { pointer-events: auto; }

/* notifications, bottom right, like a chat app */
.notes { position: fixed; z-index: 45; right: var(--gutter); bottom: 28px; display: flex; flex-direction: column; gap: 8px; width: 320px; pointer-events: none; }
body:has(.call:not([hidden])) .notes { bottom: 300px; }
.note {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(24, 24, 24, .96); border: 1px solid var(--line); border-left: 3px solid var(--blue);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  animation: notein .35s cubic-bezier(.2, .9, .3, 1.15);
}
.note.warn { border-left-color: var(--orange); }
.note.good { border-left-color: var(--pink); }
.note.out { animation: noteout .35s ease-in forwards; }
@keyframes notein { from { transform: translateX(120%); opacity: 0; } }
@keyframes noteout { to { transform: translateX(120%); opacity: 0; } }
.note-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #2a2a2a; }
.note-ico .ico { width: 16px; height: 16px; }
.note p { font-size: 13px; line-height: 1.35; }
.note b { display: block; font-size: 12px; margin-bottom: 2px; }
.note em { font-style: normal; font-size: 10px; color: var(--muted); }
@media (max-width: 980px) {
  .notes { left: 12px; right: 12px; width: auto; bottom: 110px; }
  .snd span { display: none; }
  .snd { margin-right: 12px; padding: 7px 10px; }
}
