/* Our House: one look everywhere. Cream paper, soft pastels, chunky toy buttons, one rounded face. */

@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/fredoka-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/fredoka-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cream: #FFF6EC;
  --paper: #FFFDF9;
  --sand: #F6E7DA;
  --line: #F0DFD2;
  --ink: #4A3743;
  --ink2: #8C7482;
  --ink3: #B8A2AD;
  --pink: #FF7FA3;
  --pink-d: #E35E86;
  --pink-l: #FFE1EA;
  --peach: #FFB38A;
  --butter: #FFD873;
  --butter-l: #FFF3CC;
  --mint: #7FD1AA;
  --mint-d: #4FB287;
  --mint-l: #DDF5E9;
  --sky: #8CC8F2;
  --sky-d: #5FA8DC;
  --sky-l: #E1F1FD;
  --lilac: #B9A2F0;
  --lilac-l: #EEE7FD;
  --heart: #FF5C8A;
  --red: #F06B6B;
  --r: 22px;
  --shadow: 0 12px 34px rgba(74, 55, 67, .14);
  --shadow-s: 0 4px 14px rgba(74, 55, 67, .1);
  --spring: cubic-bezier(.2, 1.3, .32, 1);
  --ease: cubic-bezier(.3, .7, .2, 1);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  font-weight: 450;
  color: var(--ink);
  background: #FCE9DF;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { user-select: text; -webkit-user-select: text; }
img { -webkit-user-drag: none; user-select: none; }
svg { display: block; }

/* the phone: full screen on a phone, a phone-sized window on a computer */
.backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 20%, #FFE3EC 0, transparent 40%),
    radial-gradient(circle at 80% 80%, #E3F1FF 0, transparent 45%),
    radial-gradient(circle at 85% 15%, #FFF1C9 0, transparent 35%),
    #FCEDE4;
}
.backdrop .side {
  position: absolute; left: calc(50% + 230px); top: 50%; transform: translateY(-50%);
  width: 260px; color: var(--ink2); font-size: 15px; line-height: 1.5;
}
.backdrop .side h1 { font-size: 30px; color: var(--ink); margin: 0 0 8px; font-weight: 600; }
.backdrop .side p { margin: 0 0 12px; }
@media (max-width: 1000px) { .backdrop .side { display: none; } }
.device {
  position: relative; width: 390px; height: min(844px, calc(100vh - 40px)); border-radius: 46px; overflow: hidden;
  background: var(--cream); box-shadow: 0 30px 80px rgba(120, 70, 90, .28), 0 0 0 10px #2E2630, 0 0 0 12px #4A3F4C;
  isolation: isolate;
}
@media (max-width: 520px), (max-height: 640px) {
  .backdrop { background: var(--cream); }
  .device { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 18px;
  font-size: 18px; font-weight: 600; letter-spacing: .1px;
  color: #fff; background: var(--pink); box-shadow: 0 5px 0 var(--pink-d);
  transition: transform .08s, box-shadow .08s, filter .2s; position: relative;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--pink-d); }
.btn[disabled] { filter: grayscale(.6) opacity(.55); pointer-events: none; }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 15px; border-radius: 14px; box-shadow: 0 4px 0 var(--pink-d); }
.btn.small:active { box-shadow: 0 1px 0 var(--pink-d); transform: translateY(3px); }
.btn.white { color: var(--ink); background: #fff; box-shadow: 0 5px 0 var(--line); }
.btn.white:active { box-shadow: 0 1px 0 var(--line); }
.btn.mint { background: var(--mint); box-shadow: 0 5px 0 var(--mint-d); }
.btn.mint:active { box-shadow: 0 1px 0 var(--mint-d); }
.btn.sky { background: var(--sky); box-shadow: 0 5px 0 var(--sky-d); }
.btn.sky:active { box-shadow: 0 1px 0 var(--sky-d); }
.btn.butter { background: var(--butter); color: #6A4A2A; box-shadow: 0 5px 0 #E3B544; }
.btn.butter:active { box-shadow: 0 1px 0 #E3B544; }
.btn.ghost { background: transparent; color: var(--ink2); box-shadow: none; min-height: 44px; font-weight: 500; }
.btn.ghost:active { transform: none; opacity: .6; }
.btn .spr { width: 26px; height: 26px; }
.link { color: var(--ink2); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink3); padding: 8px; }

.round {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(255, 253, 249, .94); box-shadow: 0 4px 0 rgba(74, 55, 67, .1), var(--shadow-s);
  transition: transform .1s; position: relative;
}
.round:active { transform: scale(.92); }
.round .spr { width: 30px; height: 30px; }
.round svg.ic { width: 24px; height: 24px; }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--heart); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--pink-d); animation: pop .4s var(--spring);
}

/* ---------- small parts ---------- */
.spr { display: inline-block; width: 40px; height: 40px; object-fit: contain; flex: none; pointer-events: none; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--ink2); }
.tiny { font-size: 13px; color: var(--ink2); }
.gap { height: 12px; }
.card {
  background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: 0 3px 0 var(--line), var(--shadow-s);
}
.card.tap { transition: transform .1s; cursor: pointer; }
.card.tap:active { transform: scale(.98); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: #fff;
  font-size: 15px; font-weight: 500; box-shadow: 0 3px 0 var(--line); white-space: nowrap; transition: transform .1s;
}
.chip:active { transform: scale(.95); }
.chip.on { background: var(--ink); color: #fff; box-shadow: 0 3px 0 #2E2229; }
.chip .spr { width: 22px; height: 22px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--pink-l); color: var(--pink-d); }
.pill.mint { background: var(--mint-l); color: #2E8A62; }
.pill.sky { background: var(--sky-l); color: #3A7FB3; }
.pill.butter { background: var(--butter-l); color: #9A6A1A; }
.pill.lilac { background: var(--lilac-l); color: #6E52C2; }
.pill.gray { background: var(--sand); color: var(--ink2); }

.field { width: 100%; border: 0; outline: 0; border-radius: 16px; background: #fff; padding: 14px 16px; font-size: 17px; box-shadow: inset 0 0 0 2px var(--line); transition: box-shadow .15s; }
.field:focus { box-shadow: inset 0 0 0 2px var(--pink); }
textarea.field { resize: none; min-height: 120px; line-height: 1.45; }
.field.big { font-size: 22px; font-weight: 500; text-align: center; padding: 16px; }
label.lab { display: block; font-size: 14px; color: var(--ink2); margin: 0 0 6px 4px; font-weight: 500; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 42px; height: 42px; border-radius: 14px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06), 0 3px 0 rgba(74, 55, 67, .12);
  transition: transform .15s var(--spring); position: relative;
}
.swatch.on { transform: scale(1.12); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.swatch:active { transform: scale(.9); }

.bar { height: 12px; border-radius: 6px; background: var(--sand); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--pink); transform-origin: left; transition: transform .6s var(--ease); }
.bar.mint > i { background: var(--mint); }
.bar.sky > i { background: var(--sky); }
.bar.butter > i { background: var(--butter); }

.seg { display: flex; background: var(--sand); border-radius: 16px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 10px 8px; border-radius: 12px; font-weight: 600; color: var(--ink2); font-size: 15px; transition: background .2s, color .2s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--line); }

.empty { text-align: center; padding: 26px 12px; color: var(--ink2); }
.empty .spr { width: 84px; height: 84px; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 19px; font-weight: 600; margin-bottom: 4px; }

/* ---------- the game stage ---------- */
.stage { position: absolute; inset: 0; overflow: hidden; background: var(--cream); }
.scroller {
  position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x;
}
.scroller::-webkit-scrollbar { display: none; }
.world { position: relative; height: 100%; }
.world > .scaled { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.exterior { display: block; }
.shell { position: absolute; left: 0; top: 0; }

/* things in rooms */
.thing { position: absolute; transform-origin: 50% 100%; touch-action: pan-x; }
.thing.editing { touch-action: none; }
.thing > .art { width: 100%; height: 100%; display: block; transition: transform .25s var(--spring); }
.thing > .art img, .thing > .art svg { width: 100%; height: 100%; display: block; }
.thing.wall { transform-origin: 50% 50%; }
.thing .shadow { position: absolute; left: 12%; right: 12%; bottom: -3.5%; height: 9%; border-radius: 50%; background: rgba(59, 42, 51, .14); }
.thing.tapped > .art { animation: squish .45s var(--spring); }
.thing.feat::after {
  content: ''; position: absolute; left: 50%; top: -40px; width: 34px; height: 34px; margin-left: -17px;
  background: url(/art/f/sparkles.webp) center / contain no-repeat; animation: beckon 2.4s ease-in-out infinite; pointer-events: none;
}
.thing.quiet::after { display: none; }
.thing.flip > .art { transform: scaleX(-1); }
.thing.editing { outline: 3px dashed rgba(255, 127, 163, .9); outline-offset: 6px; border-radius: 10px; }
.thing.editing.sel { outline-style: solid; outline-color: var(--pink); }
.room-light { position: absolute; inset: 0; pointer-events: none; z-index: 2000; }

/* doors */
.door { position: absolute; width: 190px; height: 372px; z-index: 5; }
.door .sign {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  padding: 5px 14px 5px 8px; border-radius: 14px; background: #FFFDF9; box-shadow: 0 4px 0 rgba(74, 55, 67, .12);
  font-size: 21px; font-weight: 600; white-space: nowrap; color: var(--ink);
}
.door .sign .spr { width: 34px; height: 34px; }
.door .frame {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 312px; border-radius: 84px 84px 6px 6px;
  background: #fff; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .04);
}
.door .hole { position: absolute; left: 24px; right: 24px; bottom: 0; height: 300px; border-radius: 72px 72px 4px 4px; background: #3B2E3A; overflow: hidden; perspective: 600px; }
.door .hole .peek { position: absolute; inset: 0; opacity: .9; }
.door .leaf {
  position: absolute; inset: 0; border-radius: 72px 72px 4px 4px; transform-origin: 0 50%;
  transition: transform .55s var(--ease); box-shadow: inset -8px 0 0 rgba(0, 0, 0, .06);
}
.door .leaf::before, .door .leaf::after { content: ''; position: absolute; left: 22px; right: 22px; border-radius: 12px; background: rgba(255, 255, 255, .22); }
.door .leaf::before { top: 60px; height: 92px; border-radius: 50px 50px 12px 12px; }
.door .leaf::after { top: 172px; height: 96px; }
.door .knob { position: absolute; right: 18px; top: 160px; width: 16px; height: 16px; border-radius: 50%; background: #F9D27A; box-shadow: 0 2px 0 #D9A74A; z-index: 1; }
.door.glass .leaf::before { background: rgba(207, 234, 251, .9); top: 30px; height: 160px; }
.door.open .leaf { transform: rotateY(-78deg); }
.door .boards { position: absolute; left: 6px; right: 6px; bottom: 40px; height: 200px; pointer-events: none; z-index: 2; }
.door .boards i { position: absolute; left: -6px; right: -6px; height: 34px; border-radius: 6px; background: #C98A5B; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12); }
.door .boards i:nth-child(1) { top: 30px; transform: rotate(-14deg); }
.door .boards i:nth-child(2) { top: 120px; transform: rotate(10deg); }
.door .tag {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 3; white-space: nowrap;
  padding: 8px 14px; border-radius: 14px; background: #FFFDF9; font-weight: 600; font-size: 20px; box-shadow: 0 4px 0 rgba(74, 55, 67, .15);
  display: flex; align-items: center; gap: 6px;
}
.door .tag .spr { width: 28px; height: 28px; }
.door.ready .tag { background: var(--butter); animation: beckon 1.8s ease-in-out infinite; }
.door.ready .frame { box-shadow: 0 0 0 8px rgba(255, 216, 115, .6); }
.door .mat { position: absolute; left: 30px; right: 30px; bottom: -14px; height: 14px; border-radius: 8px; background: #E58B7B; }

.stairs { position: absolute; z-index: 4; }
.stairs .sign { position: absolute; display: flex; align-items: center; gap: 6px; padding: 5px 14px 5px 8px; border-radius: 14px; background: #FFFDF9; box-shadow: 0 4px 0 rgba(74, 55, 67, .12); font-size: 21px; font-weight: 600; white-space: nowrap; }
.stairs .sign .spr { width: 34px; height: 34px; }

/* the two people in a scene */
.person { position: absolute; z-index: 900; transform: translateX(-50%); transition: left 1.2s var(--ease); pointer-events: auto; }
.person.walking .av { animation: walk .32s ease-in-out infinite; }
.person.cheer .av { animation: cheer .5s ease-in-out 3; }
.person.cheer:nth-child(even) .av { animation-delay: .12s; }
@keyframes cheer { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14%) rotate(-3deg); } 70% { transform: translateY(0) scale(1.04, .96); } }
.person .bubble {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: -6px; white-space: nowrap;
  background: #fff; border-radius: 16px; padding: 6px 12px; font-size: 18px; font-weight: 600; box-shadow: var(--shadow-s);
  display: flex; align-items: center; gap: 6px; animation: pop .4s var(--spring);
}
.person .bubble .spr { width: 30px; height: 30px; }
.person .bubble.where { font-size: 20px; padding: 8px 14px; color: var(--ink2); }
.person .name { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; font-size: 19px; font-weight: 600; color: var(--ink); background: rgba(255, 253, 249, .85); padding: 1px 10px; border-radius: 10px; white-space: nowrap; }
.av-bob { animation: breathe 3.2s ease-in-out infinite; transform-origin: 60px 146px; transform-box: view-box; }
.av-eyes { animation: blink 5.2s infinite; transform-box: fill-box; transform-origin: center; }
.pet-walker { position: absolute; z-index: 880; transition: left 2.4s linear; }
.pet-walker img { display: block; width: 100%; animation: hop .5s ease-in-out infinite; }
.pet-walker.left img { transform: scaleX(1); }
.pet-walker.right img { transform: scaleX(-1); }

/* ---------- the head-up bits ---------- */
.hud-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3000; padding: calc(var(--top) + 12px) 12px 0;
  display: flex; align-items: center; gap: 8px; pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.us {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: rgba(255, 253, 249, .94); box-shadow: 0 4px 0 rgba(74, 55, 67, .1), var(--shadow-s); height: 48px;
}
.us .heads { display: flex; }
.us .heads .head { width: 40px; height: 40px; border-radius: 50%; background: var(--pink-l); overflow: hidden; display: grid; place-items: center; border: 2px solid #fff; }
.us .heads .head + .head { margin-left: -12px; background: var(--sky-l); }
.us .heads .head svg { width: 44px; height: 44px; margin-top: 6px; }
.us .t { font-weight: 600; font-size: 15px; line-height: 1.1; }
.us .t small { display: block; font-weight: 500; font-size: 12px; color: var(--ink2); }
.title-pill {
  margin: 0 auto; padding: 8px 16px; border-radius: 999px; background: rgba(255, 253, 249, .94); font-weight: 600; font-size: 17px;
  box-shadow: 0 4px 0 rgba(74, 55, 67, .1), var(--shadow-s); display: flex; align-items: center; gap: 6px; max-width: 45%;
}
.title-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-pill .spr { width: 26px; height: 26px; }
.stats { display: flex; gap: 6px; margin-left: auto; }
.stat {
  display: flex; align-items: center; gap: 3px; height: 40px; padding: 0 10px 0 6px; border-radius: 14px; background: rgba(255, 253, 249, .94);
  font-weight: 600; font-size: 16px; box-shadow: 0 4px 0 rgba(74, 55, 67, .1), var(--shadow-s);
}
.stat .spr { width: 26px; height: 26px; }
.stat.bump { animation: bump .5s var(--spring); }
.hud-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3000; padding: 0 12px calc(var(--bottom) + 14px);
  display: flex; align-items: flex-end; gap: 10px; pointer-events: none;
}
.hud-bottom > * { pointer-events: auto; }
.today-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 20px; background: #fff;
  box-shadow: 0 5px 0 rgba(74, 55, 67, .12), var(--shadow); text-align: left; transition: transform .1s; height: 64px;
}
.today-btn:active { transform: translateY(3px); }
.today-btn .ring { width: 48px; height: 48px; flex: none; position: relative; display: grid; place-items: center; }
.today-btn .ring svg { position: absolute; inset: 0; }
.today-btn .ring .spr { width: 30px; height: 30px; }
.today-btn b { display: block; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-btn small { display: block; font-size: 13px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- sheets and pages ---------- */
.veil { position: absolute; inset: 0; z-index: 4000; background: rgba(60, 40, 52, .32); animation: fade .25s ease; }
.veil.closing { animation: fadeout .22s ease forwards; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4001; max-height: 90%; display: flex; flex-direction: column;
  background: var(--cream); border-radius: 30px 30px 0 0; box-shadow: 0 -10px 40px rgba(74, 55, 67, .2);
  animation: up .42s var(--spring); padding-bottom: var(--bottom);
}
.sheet.closing { animation: down .24s ease-in forwards; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--ink3); opacity: .5; margin: 10px auto 2px; flex: none; }
.sheet .sheet-body { overflow-y: auto; padding: 8px 18px 22px; overscroll-behavior: contain; }
.sheet h2, .page h2 { margin: 6px 0 4px; font-size: 24px; font-weight: 600; }
.sheet .lead, .page .lead { margin: 0 0 14px; color: var(--ink2); font-size: 16px; line-height: 1.4; }
.page {
  position: absolute; inset: 0; z-index: 4001; display: flex; flex-direction: column; background: var(--cream);
  animation: pageIn .42s var(--spring);
}
.page.closing { animation: pageOut .22s ease-in forwards; }
.page-head {
  flex: none; display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 12px) 14px 12px;
  background: var(--tint, var(--pink-l)); border-radius: 0 0 28px 28px; position: relative;
}
.page-head .ttl { flex: 1; min-width: 0; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.1; }
.page-head p { margin: 2px 0 0; font-size: 14px; color: var(--ink2); }
.page-head .spr { width: 52px; height: 52px; }
.page-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(var(--bottom) + 28px); overscroll-behavior: contain; }
.page-foot { flex: none; padding: 10px 16px calc(var(--bottom) + 14px); background: linear-gradient(transparent, var(--cream) 30%); }
.x { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .8); box-shadow: 0 3px 0 rgba(74, 55, 67, .08); flex: none; }
.x:active { transform: scale(.92); }
.x svg { width: 20px; height: 20px; }
.tabs { display: flex; gap: 6px; padding: 0 16px; margin-top: -2px; overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 10px 14px; border-radius: 14px; font-weight: 600; color: var(--ink2); white-space: nowrap; font-size: 15px; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--line); }

/* ---------- toasts and joy ---------- */
.toasts { position: absolute; left: 0; right: 0; top: calc(var(--top) + 70px); z-index: 6000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 18px; background: #fff; font-weight: 600; font-size: 16px;
  box-shadow: var(--shadow); animation: toastIn .5s var(--spring); max-width: 92%;
}
.toast .spr { width: 34px; height: 34px; }
.toast.out { animation: toastOut .3s ease forwards; }
.toast small { display: block; font-weight: 500; color: var(--ink2); font-size: 13px; }
.float-heart { position: absolute; z-index: 5500; pointer-events: none; width: 34px; height: 34px; animation: floatUp 1.4s ease-out forwards; }
.confetti { position: absolute; inset: 0; z-index: 7000; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
.confetti img { position: absolute; top: -40px; width: 34px; height: 34px; animation: fall linear forwards; }
.celebrate {
  position: absolute; inset: 0; z-index: 6500; display: grid; place-items: center; background: rgba(60, 40, 52, .35); animation: fade .3s ease;
}
.celebrate .box { width: 84%; background: var(--cream); border-radius: 30px; padding: 26px 22px 22px; text-align: center; box-shadow: var(--shadow); animation: popBig .55s var(--spring); }
.celebrate .box .spr { width: 110px; height: 110px; animation: bob 2.4s ease-in-out infinite; }
.celebrate .box h2 { margin: 10px 0 6px; font-size: 26px; font-weight: 600; }
.celebrate .box p { margin: 0 0 18px; color: var(--ink2); font-size: 16px; line-height: 1.4; }
.iris { position: absolute; z-index: 8000; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 250vmax var(--cream); transform: translate(-50%, -50%); }

/* ---------- motion ---------- */
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes pageIn { from { transform: translateY(40px) scale(.96); opacity: 0; } }
@keyframes pageOut { to { transform: translateY(30px) scale(.97); opacity: 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes popBig { from { transform: scale(.6); opacity: 0; } }
@keyframes toastIn { from { transform: translateY(-30px) scale(.8); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-20px); opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.25); } }
@keyframes squish { 30% { transform: scale(1.08, .9); } 60% { transform: scale(.96, 1.06); } }
@keyframes beckon { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-8px); opacity: 1; } }
@keyframes breathe { 50% { transform: translateY(1.2px) scaleY(.988); } }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }
@keyframes walk { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-10px) scale(1.1); } 100% { transform: translateY(-120px) scale(.9); opacity: 0; } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* scenery animation */
.drift { animation: drift 60s linear infinite alternate; }
@keyframes drift { to { transform: translateX(80px); } }
.twinkle { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; } }
.smoke circle { animation: smoke 3.3s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes smoke { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 20% { opacity: .85; } 100% { transform: translate(30px, -120px) scale(1.6); opacity: 0; } }
.firefly { animation: firefly 4s ease-in-out infinite; }
@keyframes firefly { 0%, 100% { transform: translate(0, 0); opacity: .2; } 50% { transform: translate(14px, -20px); opacity: 1; } }
.bulb { animation: twinkle 2.6s ease-in-out infinite; }
.flame { animation: flame .9s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flame { to { transform: scale(1.05, .92) skewX(3deg); } }
.neon { animation: neon 3s ease-in-out infinite; }
@keyframes neon { 50% { opacity: .75; } 52% { opacity: .4; } 54% { opacity: .9; } }
.swinging { animation: swing 3s ease-in-out infinite; transform-box: view-box; transform-origin: 112px 112px; }
@keyframes swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.bloom image { animation: bob 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.flag-up { animation: wiggle 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 0 100%; }
.pop-in { animation: pop .6s var(--spring) both; transform-box: fill-box; transform-origin: 50% 100%; }
.drop-in { animation: dropIn .8s var(--spring) both; }
@keyframes dropIn { from { transform: translateY(-500px); } }
.brick-new { animation: brickIn .45s var(--spring); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes brickIn { from { transform: translateY(-160px) rotate(-10deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
