@font-face{font-family:Allo;src:url('assets/allo.woff2') format('woff2');font-weight:100 900;font-display:swap}
:root{--ink:#302b20;--paper:#86d7fc;--line:rgba(48,43,32,.26);font-family:Allo,ui-rounded,system-ui,sans-serif;color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}
body{margin:0;min-height:100svh;display:flex;flex-direction:column;padding:0 clamp(20px,3.65vw,68px);isolation:isolate}

button,a{color:inherit;font:inherit;-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:focus-visible,a:focus-visible{outline:3px solid #614bbb;outline-offset:4px}
header,footer{display:flex;align-items:center;justify-content:space-between}
header{min-height:88px}
.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-weight:830;letter-spacing:-1px;font-size:23px}
.about{display:flex;align-items:center;gap:7px;background:none;border:0;min-height:44px;font-size:15px;padding:0 2px;font-weight:570}
.about span{border:1.4px solid;border-radius:50%;font:700 11px/14px Georgia;text-align:center;width:16px;height:16px}
.about:hover{text-decoration:underline;text-underline-offset:3px}
main{flex:1;display:grid;place-items:center;text-align:center;padding:24px 0 60px}
.scene{position:relative;width:160px;margin:0 auto 5px;transform:rotate(-5deg)}
.scene img{width:100%;height:auto;display:block;image-rendering:pixelated}
.dream{position:absolute;left:72%;top:0;font:700 13px/1 monospace;transform:rotate(9deg);animation:doze 3s ease-in-out infinite}
.dream sup{font-size:15px;position:relative;top:-4px;left:2px}.dream b{position:relative;top:-18px;left:4px;font-size:19px}
@keyframes doze{50%{transform:translate(2px,-3px) rotate(13deg)}}
.manual .dream{visibility:hidden}
h1{font-size:clamp(66px,12.1vw,202px);font-weight:860;line-height:.96;letter-spacing:-.042em;margin:0;padding-right:.07em;font-variation-settings:'wght' 860,'ROND' 96,'opsz' 32;transition:font-variation-settings .45s}
.manual h1{font-variation-settings:'wght' 600,'ROND' 5,'opsz' 32}
#tagline{font-size:clamp(17px,1.45vw,24px);font-weight:480;margin:22px 0 32px;letter-spacing:-.035em}
.modes{position:relative;display:inline-flex;padding:4px;border-radius:40px;background:#fff3cb;border:1.5px solid var(--ink);box-shadow:0 3px 0 var(--ink)}
.modes:before{content:'';position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 4px);border-radius:32px;background:var(--ink);transform:translateX(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1)}
.manual .modes:before{transform:translateX(0)}
.modes button{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-width:114px;height:42px;border:0;background:transparent;border-radius:30px;font-size:15px;font-weight:655;transition:color .18s}
.modes button[aria-pressed=true]{color:#fff1c6}
.icon{display:inline-block}.keys{width:16px;height:11px;border:1.5px solid currentColor;border-radius:2px;background:radial-gradient(circle,currentColor 1px,transparent 1.1px) 1px 0/4px 4px}.sparkle{font-size:20px;line-height:1}
footer{border-top:1px solid var(--line);min-height:65px;font-size:13px}
.status,.credit{display:inline-flex;align-items:center;gap:8px}.status i{width:7px;height:7px;background:#47743b;border-radius:50%;box-shadow:0 0 0 3px #4973381c}.manual .status i{background:#ffb36e}.asterisk{font-size:23px}
dialog{max-width:min(380px,90vw);padding:32px;border:2px solid var(--ink);border-radius:17px;color:var(--ink);background:#fff3cb;box-shadow:4px 5px 0 var(--ink)}
dialog::backdrop{background:#302b2060}dialog h2{margin:0;font-size:30px;letter-spacing:-.05em}dialog p{line-height:1.45}dialog a{font-weight:700}
#close{position:absolute;right:5px;top:4px;width:42px;height:42px;border:0;background:none;font-size:26px}
@media(max-width:600px){header{min-height:70px}.brand{font-size:21px}main{padding-bottom:48px}.scene{width:136px}h1{font-size:16vw}footer{font-size:11px;min-height:60px}.modes button{min-width:104px}#tagline{margin:19px 0 27px}}
@media(prefers-reduced-motion:reduce){*,*:before{animation:none!important;transition:none!important}}

/* Each slot reserves its letter's resting width while the ink moves independently. */
.type-stage { position: relative; width: max-content; margin-inline: auto; }
.type-stage h1 { transition: none; }
.type-toy {
  display: inline-flex;
  align-items: baseline;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-variation-settings: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.type-toy:active { cursor: grabbing; }
.slot { position: relative; white-space: pre; }
.measure { visibility: hidden; }
.glyph {
  position: absolute;
  inset: 0 auto auto 0;
  transform-origin: 50% 78%;
  pointer-events: auto;
}
.pull-hint {
  pointer-events: none;
  position: absolute;
  bottom: calc(100% - .4em);
  right: 2%;
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: .02em;
  transform: rotate(8deg);
  opacity: .72;
  transition: opacity .2s;
}
.pull-hint svg { position: absolute; right: 76%; top: 85%; transform: rotate(-16deg); }
.poster.played .pull-hint { opacity: 0; }
.poster.disturbed .dream { visibility: hidden; }

.weather {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper);
}
.sky {
  position: absolute;
  inset: 0;
  background-position: center bottom;
  background-size: cover;
  image-rendering: pixelated;
}
.calm { background-image: url('assets/paradise.webp'); }
.squall {
  background-color: #192139;
  background-image: url('assets/squall.webp');
  opacity: 0;
  transition: opacity .75s ease-in-out;
}
.manual .squall { opacity: 1; }
@media (orientation: portrait) {
  .calm { background-image: url('assets/paradise-portrait.webp'); }
  .squall { background-image: url('assets/squall-portrait.webp'); }
}
/* Let the cloud texture show through beneath the small footer labels. */
.weather::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 90px;
  background: linear-gradient(transparent, rgb(255 242 217 / .82));
}
.flock {
  position: absolute;
  left: -60px;
  top: 23%;
  width: 46px;
  height: 18px;
  color: #577c99;
  animation: cross-sky 38s linear -8s infinite;
}
.flock i {
  position: absolute;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow: -2px -2px, -4px -2px, 2px -2px, 4px -2px;
  animation: wings 1.15s steps(1) infinite;
}
.flock i:nth-child(2) { left: 16px; top: 8px; animation-delay: -.7s; }
.flock i:nth-child(3) { left: 33px; top: 4px; animation-delay: -.35s; }
@keyframes cross-sky {
  45% { transform: translate(52vw, -4vh); }
  to { transform: translate(calc(100vw + 100px), 1vh); }
}
@keyframes wings {
  42% { box-shadow: -2px 0, -4px 0, 2px 0, 4px 0; }
  64% { box-shadow: -2px 1px, -4px 2px, 2px 1px, 4px 2px; }
}
.loose-sheet {
  position: absolute;
  left: -24px;
  bottom: 24%;
  width: 14px;
  height: 10px;
  background: repeating-linear-gradient(#ffdfad 0 2px, #d69f87 2px 3px);
  border: 2px solid #ffdfad;
  box-shadow: 1px 1px #a87679;
  animation: paperwork 9s linear -2s infinite paused;
}
.loose-sheet:nth-child(2) { bottom: 15%; animation-duration: 7s; animation-delay: -5s; }
.loose-sheet:nth-child(3) { bottom: 71%; width: 10px; height: 8px; animation-duration: 11s; animation-delay: -7s; }
.manual .loose-sheet { animation-play-state: running; }
.manual .flock, .manual .flock i { animation-play-state: paused; }
@keyframes paperwork {
  28% { transform: translate(28vw, -6vh) rotate(48deg) scaleY(.45); }
  48% { transform: translate(45vw, 2vh) rotate(175deg); }
  70% { transform: translate(76vw, -5vh) rotate(245deg) scaleY(.5); }
  to { transform: translate(calc(100vw + 48px), -3vh) rotate(385deg); }
}

/* In Manual, little task windows pile up where the Zs were. */
.inbox { display: none; position: absolute; top: 3%; left: 70%; }
.manual .inbox { display: block; }
.inbox i {
  position: absolute;
  width: 18px;
  height: 13px;
  border: 1px solid #463138;
  border-top-width: 3px;
  background: linear-gradient(#a78175, #a78175) 2px 3px / 8px 1px no-repeat, #ffdfb1;
  box-shadow: 1px 1px #463138;
  animation: task-arrives .24s steps(4, end) both;
}
.inbox i:nth-child(2) { left: 5px; top: -6px; animation-delay: .22s; }
.inbox i:nth-child(3) { left: 10px; top: -12px; animation-delay: .48s; }
@keyframes task-arrives {
  from { opacity: 0; transform: translateY(5px) scale(.8); }
  to { opacity: 1; transform: none; }
}

/* Keep the type legible against Manual's dark storm shelf. */
.manual { color: #fff1cf; --line: rgb(255 239 208 / .34); }
.manual .modes { color: var(--ink); }
.manual #tagline, .manual footer { text-shadow: 0 1px 3px #161a2c; }
.manual .weather::after { background: linear-gradient(transparent, rgb(15 19 39 / .88)); }
.manual .scene img { animation: desk-buffet 5s steps(2, end) infinite; }
@keyframes desk-buffet {
  0%, 60%, 71%, 100% { transform: none; }
  63%, 68% { transform: translate(2px, -1px) rotate(2deg); }
  66% { transform: translate(-2px, 1px) rotate(-1deg); }
}
#sky-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 160px;
  image-rendering: pixelated;
}
