/* ==========================================================================
   Effects: the hand-made touches — postage stamp, masking tape, floating
   smoothies, crossed-out text — and their animations.
   ========================================================================== */

/* Perforated stamp edge: the holes only punch through the padding band */
.stamp-perforated {
  --r: 8px; --g: 6px;
  background: var(--paper);
  filter: drop-shadow(0 12px 28px rgba(73, 59, 55, .12));
  -webkit-mask: linear-gradient(#000, #000) content-box, radial-gradient(var(--r) at var(--r) var(--r), #0000 98%, #000) calc(-1 * var(--r)) calc(-1 * var(--r)) / calc(2 * var(--r) + var(--g)) calc(2 * var(--r) + var(--g));
  mask: linear-gradient(#000, #000) content-box, radial-gradient(var(--r) at var(--r) var(--r), #0000 98%, #000) calc(-1 * var(--r)) calc(-1 * var(--r)) / calc(2 * var(--r) + var(--g)) calc(2 * var(--r) + var(--g));
}

.masking-tape { background: rgba(246, 185, 59, .5); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); transform: rotate(-2deg); }
.masking-tape-right { background: rgba(233, 140, 145, .45); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); transform: rotate(3deg); }

.wavy-line { stroke: rgba(73, 59, 119, .35); stroke-width: 1.5; fill: none; }

/* A hand-drawn line through finished items */
.strikethrough { position: relative; }
.strikethrough::after { content: ''; position: absolute; left: 0; top: 55%; width: 100%; height: 2px; background: var(--guava); transform: rotate(-1deg); border-radius: 2px; }

/* Pinboard (core/pinboard.js): slightly tilted, lifted while dragged */
.pin { transform: rotate(var(--tilt, 0deg)); transition: transform .2s var(--ease-bounce), box-shadow .2s; }
.pin.is-lifted { transform: rotate(0deg) scale(1.04); filter: drop-shadow(0 14px 24px rgba(73, 59, 55, .25)); transition: none; z-index: 1000 !important; }
.pin:hover, .pin:focus-within, .pin.is-touched { z-index: 900 !important; }
body.has-modal .pin, body:has(.modal-backdrop) .pin,
body.has-modal .pin:hover, body:has(.modal-backdrop) .pin:hover,
body.has-modal .pin:focus-within, body:has(.modal-backdrop) .pin:focus-within,
body.has-modal .pin.is-touched, body:has(.modal-backdrop) .pin.is-touched { z-index: auto !important; }
body.has-modal .board-tools, body:has(.modal-backdrop) .board-tools { display: none !important; }

/* Smoothie shelf */
@keyframes float-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(1.5deg); } }
@keyframes bubble-up { 0% { transform: translateY(0) scale(.7); opacity: 0; } 50% { opacity: .9; } 100% { transform: translateY(-14px) scale(1.1); opacity: 0; } }
.float-1 { animation: float-bob 4s ease-in-out infinite; }
.float-2 { animation: float-bob 3.4s ease-in-out .7s infinite; }
.float-3 { animation: float-bob 4.2s ease-in-out 1.4s infinite; }
.float-4 { animation: float-bob 3.8s ease-in-out 2.1s infinite; }
.float-5 { animation: float-bob 4.6s ease-in-out .3s infinite; }
.bubble-1 { animation: bubble-up 2.2s ease-in-out infinite; }
.bubble-2 { animation: bubble-up 2.8s ease-in-out .8s infinite; }
.bubble-3 { animation: bubble-up 2.5s ease-in-out 1.4s infinite; }
.shelf-item { transition: transform .35s var(--ease-bounce), filter .35s var(--ease-bounce); cursor: pointer; }

/* Reaction picker pop-in */
.reaction-picker { animation: pop-in .12s ease-out; }

/* Soft fruit blobs drifting behind everything (partials/blobs.php) */
.login-page { overflow: hidden; }
.page-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.page-blob { position: absolute; border-radius: 9999px; filter: blur(40px); opacity: .5; animation: blob-breathe 16s ease-in-out infinite; will-change: transform; } /* slowly breathing and drifting (just CSS) */
@keyframes blob-breathe { 0%, 100% { transform: translate(0, 0) scale(1); opacity: .45; } 33% { transform: translate(1.2rem, -.8rem) scale(1.1); opacity: .58; } 66% { transform: translate(-.8rem, .6rem) scale(.94); opacity: .5; } }
body.has-picture .page-blobs { display: none; }

/* Handwriting (handwrite() in core/util.js). The real text stays invisible until written
   (shown after 5s anyway, in case); the strokes are drawn in the text's own color. */
.js [data-handwrite]:not(.is-written) { position: relative; -webkit-text-fill-color: transparent; animation: hw-reveal 0s 5s forwards; }
@keyframes hw-reveal { to { -webkit-text-fill-color: currentColor; } }
.handsvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; font: inherit; letter-spacing: inherit; -webkit-text-fill-color: initial; }
.handsvg tspan { fill: currentColor; fill-opacity: 0; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 400; stroke-dashoffset: 400; animation: hw-write .7s ease-in forwards; }
@keyframes hw-write { 75% { stroke-dashoffset: 0; fill-opacity: 0; stroke-opacity: 1; } 100% { stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; } }

/* Smoothie Mixer: the blender whirrs, a sipped cup drains */
@keyframes whirr { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-3deg) translateX(-2px); } 75% { transform: rotate(3deg) translateX(2px); } }
.is-blending { animation: whirr .12s linear infinite; }
.mixer-liquid { transform-box: fill-box; transform-origin: bottom; transition: transform 1.2s ease-in; }
.mixer-liquid.is-sipping { transform: scaleY(.04); }

/* Us: the countdown ring's dots appear one by one, today's dot pulses; the avatars breathe softly */
@keyframes ring-dot-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ring-dot-now { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.6); } }
.ring-dot-in, .ring-dot-now { transform-box: fill-box; transform-origin: center; }
.ring-dot-in { animation: ring-dot-in .35s var(--ease-bounce) both; }
.ring-dot-now { animation: ring-dot-now 2.4s ease-in-out infinite; }
.ring-dot-in.ring-dot-now { animation: ring-dot-in .35s var(--ease-bounce) both, ring-dot-now 2.4s ease-in-out 1.2s infinite; }
@keyframes avatar-breathe { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(-1.5deg); } }
.avatar-breathe { animation: avatar-breathe 5s ease-in-out infinite; }

/* Floating sleep z's (used by Us empty mood bubbles and game waiting avatars) */
@keyframes zzz { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 25% { opacity: .85; } 100% { transform: translate(12px, -18px) scale(1.1); opacity: 0; } }
.zzz { position: absolute; right: -.35rem; top: -.4rem; pointer-events: none; color: var(--blueberry); font-weight: 700; line-height: 1; }
.zzz i { position: absolute; left: 0; top: 0; font-style: normal; font-size: .6rem; opacity: 0; animation: zzz 2.7s ease-out infinite; }
.zzz i:nth-child(2) { font-size: .75rem; animation-delay: .9s; }
.zzz i:nth-child(3) { font-size: .9rem; animation-delay: 1.8s; }

/* Paper on the page (sticky notes, moods): lifts a little and the tape peels when you point at it */
.paper { transition: transform .35s var(--ease-bounce), box-shadow .35s; }
.paper > .masking-tape { transition: transform .35s var(--ease-bounce); }
/* Sticky notes get worn the more they're picked up (notes.js wear()): a crease, then a tear in one edge, then a few more.
   --tear (set per note) moves the first one along its edge; --crease and --crease-at (also per note) turn the crease and move it. */
.paper.wear-1::before, .paper.wear-2::before, .paper.wear-3::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(var(--crease, 118deg), transparent calc(var(--crease-at, 50%) - 4%), rgba(73, 59, 55, .06) calc(var(--crease-at, 50%) - .4%), rgba(255, 255, 255, .3) calc(var(--crease-at, 50%) + .4%), transparent calc(var(--crease-at, 50%) + 4%)); }
.paper.wear-2 { clip-path: polygon(-2rem -2rem, calc(100% + 2rem) -2rem, calc(100% + 2rem) calc(100% + 2rem), -2rem calc(100% + 2rem),
  -2rem calc(var(--tear) + 7px), 0 calc(var(--tear) + 7px), 5px calc(var(--tear) + 2px), 2px var(--tear), 6px calc(var(--tear) - 4px), 0 calc(var(--tear) - 8px), -2rem calc(var(--tear) - 8px)); }
.paper.wear-3 { clip-path: polygon(-2rem -2rem, calc(100% + 2rem) -2rem,
  calc(100% + 2rem) 64%, 100% 64%, calc(100% - 5px) calc(64% + 4px), calc(100% - 2px) calc(64% + 8px), 100% calc(64% + 12px), calc(100% + 2rem) calc(64% + 12px),
  calc(100% + 2rem) calc(100% + 2rem), 34% calc(100% + 2rem), 34% 100%, calc(34% + 4px) calc(100% - 5px), calc(34% + 8px) calc(100% - 2px), calc(34% + 11px) 100%, calc(34% + 11px) calc(100% + 2rem), -2rem calc(100% + 2rem),
  -2rem calc(var(--tear) + 7px), 0 calc(var(--tear) + 7px), 5px calc(var(--tear) + 2px), 2px var(--tear), 6px calc(var(--tear) - 4px), 0 calc(var(--tear) - 8px), -2rem calc(var(--tear) - 8px),
  -2rem 1.6rem, 0 1.6rem, 4px 1.85rem, 0 2.1rem, -2rem 2.1rem); }
@media (hover: hover) {
  .paper:hover { transform: translateY(-4px) rotate(-1.2deg) scale(1.02); box-shadow: 0 14px 24px rgba(73, 59, 55, .14); }
  .paper:hover > .masking-tape { transform: translateX(-50%) rotate(-6deg) translateY(-1px); }
}
.is-tidy [data-handle] { cursor: default; }

/* Games and Bedroom: a card's eye shows just that one, the others fade out (Boards.focusOn) */
[data-grid] > [data-card] { transition: opacity .45s, filter .45s; }
[data-grid].is-focusing > [data-card]:not(.is-focused) { opacity: .1; filter: blur(2px) grayscale(.5); }
[data-card].is-focused .card-controls [title^="Just this one"] { color: var(--passionfruit); }

/* Spotlight (data-spotlight, see ui.js): the page dims, the pointed-at widget stays lit */
body::before { content: ''; position: fixed; inset: 0; z-index: 44; background: rgba(28, 16, 26, .6); opacity: 0; pointer-events: none; transition: opacity .35s; }
body.is-spotlit::before { opacity: 1; }
.is-spot-host { position: relative; z-index: 45; }
.is-spot-host .card { background: #fff; }

/* Memories: the two of us arrive at the bottom, the line grows up from us, the memories pop up oldest first */
@keyframes line-grow { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pop-up { 0% { opacity: 0; transform: translateY(14px) scale(.9); } 70% { opacity: 1; transform: translateY(-3px) scale(1.02); } 100% { opacity: 1; transform: none; } }
@keyframes arrive { 0% { opacity: 0; transform: translateY(16px) scale(.6); } 70% { opacity: 1; transform: translateY(-4px) scale(1.08); } 100% { transform: none; } }
.timeline.is-drawing::before { animation: line-grow 1.3s ease-out .35s both; } /* revealed from the bottom up */
.timeline-start.is-arriving .us-0 { animation: arrive .55s var(--ease-bounce) both, avatar-breathe 5s ease-in-out .6s infinite; }
.timeline-start.is-arriving .us-1 { animation: arrive .55s var(--ease-bounce) .12s both, avatar-breathe 5s ease-in-out 3s infinite; }
.pop-in { animation: pop-up .5s var(--ease-bounce) both; animation-delay: calc(.45s + var(--i, 0) * .1s); }

/* Letters: the white envelope opens, the letter comes out in front of it, then the letter itself shows */
.envelope-intro { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: var(--milk); border-radius: inherit; pointer-events: none; animation: env-fade .35s ease-in 1.3s forwards; }
.env { position: relative; width: 13rem; height: 8.5rem; perspective: 700px; filter: drop-shadow(0 6px 12px rgba(73, 59, 55, .16)); }
.env-body, .em-body { position: absolute; inset: 0; background: #EFE9DE; border-radius: 10px; border: 1px solid rgba(73, 59, 55, .16); }
.env-letter { position: absolute; left: 8%; right: 8%; top: 8%; height: 80%; z-index: 1; background: #fff; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); animation: env-letter .75s ease-in-out .5s forwards; }
.env-front, .em-front { position: absolute; inset: 0; z-index: 2; border-radius: 10px; overflow: hidden; /* the side flaps and the bottom one, meeting in the middle */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 208 136' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L104 76 L0 136Z' fill='%23FBF8F2' stroke='%23E9E2D5'/%3E%3Cpath d='M208 0 L104 76 L208 136Z' fill='%23FBF8F2' stroke='%23E9E2D5'/%3E%3Cpath d='M0 136 L104 68 L208 136Z' fill='%23FDFBF7' stroke='%23E6DED0'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.env-flap, .em-flap { position: absolute; left: 0; right: 0; top: 0; height: 47%; z-index: 3; background: linear-gradient(#F7F3EC, #F1EBE0); border-radius: 10px 10px 0 0; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; }
.env-flap { animation: env-flap .4s ease-in-out .1s forwards; }
@keyframes env-flap { to { transform: rotateX(180deg); z-index: 0; } } /* folds back behind the letter */
@keyframes env-letter { 50% { transform: translateY(-62%); z-index: 1; } 51% { z-index: 4; } 100% { transform: translateY(-14%) scale(1.08); z-index: 4; } }
@keyframes env-fade { to { opacity: 0; visibility: hidden; } }
.letter-content { animation: fade-in .4s ease-out 1.35s both; }
.poem-content { animation: unfold .5s var(--ease-bounce) both; transform-origin: top; }
@keyframes unfold { from { opacity: 0; transform: perspective(600px) rotateX(-70deg); } }

/* Letters page: big envelopes and note papers that bob a little. Pointing at a closed one opens it just a bit; a read one stays open. */
.env-mini { position: relative; aspect-ratio: 13 / 8.5; perspective: 600px; cursor: pointer; filter: drop-shadow(0 6px 10px rgba(73, 59, 55, .14)); }
.em-front { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 9%; } /* closed: the letter stays hidden inside */
.em-letter { position: absolute; left: 8%; right: 8%; top: 8%; height: 80%; z-index: 1; background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); transition: transform .35s var(--ease-bounce); overflow: hidden; }
.em-letter-title { padding: .65rem .45rem 0; font-family: var(--font-serif, 'Lora', serif); font-weight: 700; font-size: .68rem; line-height: 1.25; color: #5e5652; text-shadow: 0 0 0.5px rgba(73, 59, 55, .32), 0.3px 0.3px 0.8px rgba(73, 59, 55, .15); letter-spacing: .01em; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-break: break-word; }
.em-flap { transition: transform .35s ease-in-out; }
.em-stamp { position: absolute; z-index: 4; display: flex; align-items: center; justify-content: center; background: #FFFDF5; border: 2px dashed #E98C91; border-radius: 3px; } /* where and how big: per letter (letters.js) */
.em-seal { position: absolute; left: 50%; top: 42%; z-index: 4; width: 1.9rem; height: 1.9rem; margin: -.95rem 0 0 -.95rem; border-radius: 9999px; background: radial-gradient(circle at 35% 35%, #E2475A, #B3243A); color: #FFD6DB; font-size: .85rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: opacity .2s, transform .3s var(--ease-bounce); }
.env-mini:hover .em-flap, .env-mini.is-open .em-flap { transform: rotateX(165deg); z-index: 0; }
.env-mini:hover .em-letter { transform: translateY(-38%); }
.env-mini.is-open .em-letter { transform: translateY(-38%); }
.env-mini.is-open:hover .em-letter { transform: translateY(-48%); }
.env-mini:hover .em-seal { opacity: 0; transform: scale(.4); }
.em-zone-top { position: absolute; left: 0; right: 0; top: 0; height: 50%; z-index: 10; cursor: pointer; }
.env-mini .em-zone-top { top: -48%; height: 98%; }
.em-zone-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; z-index: 10; cursor: grab; }
.em-zone-bottom:active { cursor: grabbing; }
.poem-paper { position: relative; aspect-ratio: 13 / 9.5; margin: 0 .6rem; cursor: pointer; padding: .6rem 1rem 0 2.2rem; border-radius: 3px;
  background: linear-gradient(90deg, transparent 1.7rem, rgba(233, 140, 145, .55) 1.7rem, rgba(233, 140, 145, .55) calc(1.7rem + 1px), transparent calc(1.7rem + 1px)),
    repeating-linear-gradient(#FFFEFB 0 1.35rem, rgba(91, 94, 166, .2) 1.35rem calc(1.35rem + 1px)) 0 2.6rem / 100% calc(100% - 2.6rem) no-repeat, #FFFEFB;
  border: 1px solid rgba(73, 59, 55, .15); box-shadow: 0 6px 12px rgba(73, 59, 55, .14), 0 1px 2px rgba(73, 59, 55, .1); transition: transform .3s var(--ease-bounce); }
.poem-paper:hover { transform: translateY(-4px) rotate(-1.5deg); }
.poem-paper.is-new::after { content: '♥'; position: absolute; right: -.5rem; top: -.5rem; width: 1.6rem; height: 1.6rem; border-radius: 9999px; background: radial-gradient(circle at 35% 35%, #E2475A, #B3243A); color: #FFD6DB; font-size: .75rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }

/* Stationery note papers for letters & poems (reading modal, live editor, poem sheets & envelope peeks) */
.letter-sheet { padding: 1.15rem 1.35rem; border-radius: .9rem; border: 1px solid rgba(73, 59, 55, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 4px 14px -8px rgba(73, 59, 55, .22); }
.paper-swatch { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: .38rem; padding: 0 .25rem; }
.paper-live { transition: background .25s, color .25s, border-color .25s; }
.paper-live.paper-lined, .letter-sheet.paper-lined { padding-left: 2.35rem; }
.paper-cream { background: #FFFDF7; border-color: rgba(180, 148, 98, .25); }
.paper-lined {
  background:
    linear-gradient(90deg, transparent 1.7rem, rgba(233, 140, 145, .48) 1.7rem, rgba(233, 140, 145, .48) calc(1.7rem + 1px), transparent calc(1.7rem + 1px)),
    repeating-linear-gradient(transparent 0 1.65rem, rgba(91, 94, 166, .16) 1.65rem calc(1.65rem + 1px)) 0 1.2rem,
    #FFFEFB;
}
.paper-swatch.paper-lined { background: repeating-linear-gradient(#FFFEFB 0 5px, rgba(91, 94, 166, .25) 5px 6px); }
.paper-parchment {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 249, 232, .55) 45%, rgba(196, 158, 102, .28) 100%),
    repeating-linear-gradient(0deg, rgba(139, 98, 48, .03) 0 2px, transparent 2px 5px),
    #F5E8CE;
  border-color: rgba(158, 118, 66, .35);
}
.paper-blush {
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 140, 145, .22), transparent 48%),
    radial-gradient(circle at 0% 100%, rgba(246, 185, 59, .14), transparent 45%),
    #FFF4F6;
  border-color: rgba(233, 140, 145, .38);
}
.paper-botanical {
  background:
    radial-gradient(circle, rgba(118, 148, 92, .16) 1px, transparent 1.2px) 0 0 / 16px 16px,
    #F3F7EC;
  border-color: rgba(130, 158, 104, .35);
}
.paper-grid {
  background:
    linear-gradient(90deg, rgba(91, 94, 166, .11) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(0deg, rgba(91, 94, 166, .11) 1px, transparent 1px) 0 0 / 18px 18px,
    #FBFDFE;
  border-color: rgba(91, 94, 166, .22);
}
.paper-midnight {
  background:
    radial-gradient(circle, rgba(246, 196, 67, .7) 0 1px, transparent 1.5px) 12px 14px / 64px 58px,
    radial-gradient(circle, rgba(255, 255, 255, .5) 0 .8px, transparent 1.3px) 40px 36px / 74px 66px,
    linear-gradient(160deg, #1E2542, #13182E);
  border-color: rgba(246, 196, 67, .35);
  color: #FFF8EC;
}
.paper-swatch.paper-midnight { color: #F6E9CE; }
.em-letter.paper-midnight .em-letter-title { color: #F6E9CE; text-shadow: none; }
.poem-paper.paper-cream, .poem-paper.paper-parchment, .poem-paper.paper-blush, .poem-paper.paper-botanical, .poem-paper.paper-grid, .poem-paper.paper-midnight { padding-left: 1rem; }
.modal:has(.envelope-intro) { position: relative; overflow: hidden; }

/* Photo moments: a polaroid (square photo, wide white bottom with the caption) */
.polaroid { position: relative; background: #FFFEFB; padding: .6rem .6rem 0; border-radius: 2px; border: 1px solid rgba(73, 59, 55, .15); cursor: pointer;
  box-shadow: 0 8px 16px rgba(73, 59, 55, .16), 0 1px 3px rgba(73, 59, 55, .12); transition: transform .3s var(--ease-bounce); }
.polaroid:hover { transform: translateY(-4px) rotate(1deg); }
.polaroid-photo { aspect-ratio: 1; overflow: hidden; background: #2b2523; }
.polaroid-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid-caption { min-height: 3rem; padding: .4rem .2rem .6rem; text-align: center; font-size: 1.3rem; line-height: 1.1; color: var(--ink, #493B37); overflow-wrap: anywhere; }
.polaroid.is-big { width: min(26rem, 80vw); padding: 1rem 1rem 0; cursor: default; }
.polaroid.is-big:hover { transform: none; }
.polaroid.is-big .polaroid-caption { font-size: 1.9rem; min-height: 4.5rem; padding-top: .7rem; }

/* Postcards: the stamp front, small on the board; opened, it turns over to the message (both faces share one grid cell) */
.pc-mini { position: relative; cursor: pointer; transition: transform .3s var(--ease-bounce); }
.pc-mini:hover { transform: translateY(-4px) rotate(-1.5deg); }
.pc-mini.is-new::after { content: '♥'; position: absolute; right: -.4rem; top: -.4rem; z-index: 30; width: 2rem; height: 2rem; border-radius: 9999px; background: radial-gradient(circle at 35% 35%, #E2475A, #B3243A); color: #FFD6DB; font-size: .95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.pc-flip { perspective: 1200px; cursor: pointer; zoom: 1.3; }
.pc-inner { display: grid; transition: transform .8s var(--ease-bounce); transform-style: preserve-3d; }
.pc-inner > * { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pc-back { transform: rotateY(180deg); height: 0; min-height: calc(100% - 1rem); /* never taller than the front */ background: repeating-linear-gradient(#FFFEFB 0 1.2rem, rgba(91, 94, 166, .14) 1.2rem calc(1.2rem + 1px)) #FFFEFB; margin: .5rem 0; }
.pc-flip.is-flipped .pc-inner { transform: rotateY(180deg); }
@media (max-width: 480px) { .pc-flip { zoom: 1.1; } }

/* Lists: a ticked item pops, and its line is drawn through by hand */
@keyframes tick-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes strike-draw { from { transform: rotate(-1deg) scaleX(0); } to { transform: rotate(-1deg) scaleX(1); } }
.is-just-done .tick { animation: tick-pop .4s var(--ease-bounce); }
.is-just-done .strikethrough::after { transform-origin: left; animation: strike-draw .45s ease-out .1s both; }

/* Photos develop like a polaroid: pale and blurry first, then the colors come */
.develop { filter: sepia(.8) brightness(1.5) contrast(.6) blur(3px); opacity: .6; transition: filter 1.4s ease-out, opacity .8s ease-out, transform .5s; }
.develop.is-developed { filter: none; opacity: 1; }

/* A number that just counted up gives a little pop */
@keyframes count-pop { 50% { transform: scale(1.25); } }
.count-pop { display: inline-block; animation: count-pop .35s var(--ease-bounce); }

/* Menu: an icon wiggles when its dot appears */
@keyframes wiggle { 0%, 100% { transform: rotate(0deg); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
.wiggle svg { animation: wiggle .7s ease-in-out 2; transform-origin: 50% 20%; }

/* Us: moods as thought bubbles above the avatars — little cloud dots trail down to the person, the emoji bobs */
.mood-bubble { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 13rem; max-width: 100%;
  padding: 1rem 1.25rem 1.4rem; background: #fff; border: 1.5px solid rgba(73, 59, 55, .2); border-radius: 2rem; box-shadow: 0 10px 24px -12px rgba(73, 59, 55, .45); transition: transform .35s var(--ease-bounce); } @media (max-width: 639px) { .mood-bubble { width: 100%; max-width: 10.5rem; padding: .8rem .75rem 1.15rem; } }
.mood-bubble.is-empty { width: 6.5rem; padding: 1.1rem .8rem .9rem; }
/* The dream dots: three little clouds getting smaller toward the avatar; when a mood is new they
   appear one by one from the avatar up, and then the bubble opens ("dreaming about …") */
.mood-wrap { position: relative; z-index: 3; display: inline-flex; max-width: 100%; } /* its dream dots reach down over the avatar */
.dream-dots { position: absolute; top: 100%; left: 50%; width: 0; height: 0; }
.dream-dots i { position: absolute; background: #fff; border: 1.5px solid rgba(73, 59, 55, .2); border-radius: 9999px; box-shadow: 0 3px 8px -4px rgba(73, 59, 55, .35); }
.dream-dots i:nth-child(1) { width: 1.05rem; height: 1.05rem; top: .3rem; left: -.5rem; }
.dream-dots i:nth-child(2) { width: .7rem; height: .7rem; top: 1.45rem; left: -.05rem; }
.dream-dots i:nth-child(3) { width: .42rem; height: .42rem; top: 2.3rem; left: .35rem; }
.mood-wrap:not(.is-right) .dream-dots { transform: scaleX(-1); }
@media (min-width: 640px) { /* toward the avatar, on the inner side */
  .mood-wrap:not(.is-right) .dream-dots { left: auto; right: 2.6rem; }
  .mood-wrap.is-right .dream-dots { left: 2.6rem; }
}
@keyframes dot-grow { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dream-dots.is-dreaming i { animation: dot-grow .3s var(--ease-bounce) both; }
.dream-dots.is-dreaming i:nth-child(3) { animation-delay: var(--d, 0s); }
.dream-dots.is-dreaming i:nth-child(2) { animation-delay: calc(var(--d, 0s) + .2s); }
.dream-dots.is-dreaming i:nth-child(1) { animation-delay: calc(var(--d, 0s) + .4s); }
.mood-zzz { position: relative; display: inline-block; width: 1.6rem; height: 1.4rem; }
.mood-zzz .zzz { right: auto; left: .3rem; top: 1rem; }
.mood-zzz .zzz i { font-size: .8rem; }
.mood-zzz .zzz i:nth-child(2) { font-size: 1rem; }
.mood-zzz .zzz i:nth-child(3) { font-size: 1.25rem; }
@media (hover: hover) { .mood-bubble:hover { transform: translateY(-3px) scale(1.03); } }
@keyframes mood-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-5px) rotate(6deg); } }
.mood-emoji { font-size: 2.6rem; line-height: 1; display: inline-block; animation: mood-bob 3.2s ease-in-out infinite; }
@keyframes bubble-pop { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: none; } }
.bubble-pop { animation: bubble-pop .5s var(--ease-bounce) calc(var(--d, 0s) + .6s) backwards; } /* after its dream dots */

/* Menu: the icon hops and tilts when you point at it */
@keyframes nav-hop { 0%, 100% { transform: translateY(0) rotate(0deg); } 35% { transform: translateY(-3px) rotate(-10deg); } 70% { transform: translateY(0) rotate(6deg); } }
.nav-link:hover svg { animation: nav-hop .5s ease-in-out; }


/* Wild smoothies: one hides on a page, bobbing and glowing; caught, it flies up. Its menu item wiggles a little cup. */
#page { position: relative; }
.wild-drop { position: absolute; z-index: 30; transform: translate(-50%, -50%); filter: drop-shadow(0 0 10px rgba(255, 255, 255, .9)) drop-shadow(0 4px 8px rgba(73, 59, 55, .25)); animation: wild-bob 2.4s ease-in-out infinite; cursor: pointer; }
.wild-drop.is-golden { filter: drop-shadow(0 0 12px rgba(246, 196, 67, .95)) drop-shadow(0 4px 8px rgba(73, 59, 55, .25)); }
.wild-drop:hover { animation-duration: .6s; }
.wild-drop.is-caught { animation: wild-caught .7s ease-in forwards; pointer-events: none; }
@keyframes wild-bob { 0%, 100% { transform: translate(-50%, -50%) rotate(-6deg); } 50% { transform: translate(-50%, -62%) rotate(6deg); } }
@keyframes wild-caught { 30% { transform: translate(-50%, -60%) scale(1.3); } 100% { transform: translate(-50%, -260%) scale(.4); opacity: 0; } }
.has-drop { position: relative; }
.has-drop::after { content: '🥤'; position: absolute; top: -2px; right: -6px; font-size: .7rem; animation: wild-bob 1.6s ease-in-out infinite; }
.has-drop.is-skewer::after { content: '🍢'; }

/* Smoothie Mixer: the pantry and the glasses show when you point at the blender / the glass (or tap it,
   on phones); tapped once blended, the blender tips over and empties into the glass. Served ones stand on
   one long wooden shelf (round arrows scroll it), the name shows when you point at one. */
.mixer-spot { position: relative; display: flex; justify-content: center; }
.mixer-panel { position: absolute; z-index: 20; top: 0; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.mixer-panel > * { background: #fff; border-radius: 1rem; box-shadow: var(--shadow-pop); padding: .6rem; }
.mixer-panel-left { right: 100%; padding-right: .75rem; transform: translateX(6px); } /* (the padding: no gap to lose the pointer in) */
.mixer-panel-right { left: 100%; padding-left: .75rem; transform: translateX(-6px); }
@media (hover: hover) { .mixer-spot:hover .mixer-panel { opacity: 1; pointer-events: auto; transform: none; } }
.mixer-spot.is-open .mixer-panel { opacity: 1; pointer-events: auto; transform: none; }
@media (max-width: 639px) { /* phones: below it instead of beside it */
  .mixer-panel-left, .mixer-panel-right { top: 100%; left: 50%; right: auto; padding: .5rem 0 0; transform: translateX(-50%); }
  .mixer-spot.is-open .mixer-panel { transform: translateX(-50%); }
}
.is-pouring { animation: mixer-tilt 1.5s ease-in-out; transform-origin: 85% 60%; }
.is-pouring [data-blend] { transform-box: fill-box; transform-origin: bottom; animation: mixer-drain 1s ease-in .3s forwards; }
@keyframes mixer-tilt { 20%, 75% { transform: rotate(28deg) translateX(6px); } }
@keyframes mixer-drain { to { transform: scaleY(0); } }
.mixer-pour .mixer-liquid { animation: mixer-fill 1.1s ease-out .35s both; }
.mixer-pour.is-second .mixer-liquid { animation: none; } /* a second blend: only the top half fills (from behind the first) */
.mixer-pour.is-second .mixer-layer-top { transform-box: fill-box; animation: mixer-fill 1.1s ease-out .35s both; }
@keyframes mixer-fill { from { transform: translateY(100%); } }
.mixer-shelf { display: flex; align-items: flex-end; gap: .5rem; padding: 3rem 2.5rem 4px 1.4rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.shelf-wrap { position: relative; }
.shelf-wrap::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; pointer-events: none; /* the shelf board (like the figures' floor), fading out at both ends */
  background: linear-gradient(90deg, transparent, rgba(73, 59, 55, .14) 12%, rgba(73, 59, 55, .14) 88%, transparent); }
.mixer-shelf::-webkit-scrollbar { display: none; }
.mixer-shelf.is-at-start { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
.mixer-shelf.is-at-end:not(.is-at-start) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 100%); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 100%); }
.mixer-shelf.is-at-start.is-at-end { -webkit-mask-image: none; mask-image: none; overflow: visible; }
.shelf-title { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: .2rem; white-space: nowrap; font-size: 10px; font-weight: 600; color: rgba(73, 59, 55, .75); background: #fff; border-radius: 9999px; padding: .05rem .45rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .1); opacity: 0; pointer-events: none; transition: opacity .2s; }
.shelf-item:hover .shelf-title { display: block; opacity: 1; animation: fade-in .2s; } /* (not there otherwise: a long name would make the shelf scroll) */
.shelf-arrow { position: absolute; z-index: 2; bottom: .9rem; width: 1.75rem; height: 1.75rem; border-radius: 9999px; background: #fff; box-shadow: var(--shadow-pop); display: flex; align-items: center; justify-content: center; color: rgba(73, 59, 55, .7); }
.shelf-arrow:hover { color: var(--passionfruit); }
.shelf-arrow[hidden] { display: none; }

.mixer-shelf .shelf-item { transform: rotate(var(--tilt, 0deg)); transform-origin: bottom center; }
.shelf-item:hover { transform: translateY(-5px) scale(1.07) rotate(-2deg) !important; filter: drop-shadow(0 12px 18px rgba(108, 38, 92, .22)); }
.ice-bob { animation: ice-bob 2.6s ease-in-out infinite; }
@keyframes ice-bob { 50% { transform: translateY(-2.5px); } }
.shelf-decor { flex-shrink: 0; line-height: 1; margin: 0 -.6rem; position: relative; z-index: 0; opacity: .9; filter: saturate(.85); }
.shelf-decor.is-front { z-index: 2; opacity: 1; }
.mixer-shelf .shelf-item { z-index: 1; }
.shelf-arrow.mixer-add, .shelf-arrow.mixer-close { position: relative; bottom: auto; z-index: 3; flex-shrink: 0; margin: 0 0 .9rem; } /* the + left of the shelf, at the height of its arrows */
/* The shelf scrolls, so it clips whatever sticks out of it: more room on the left for the first one's glow
   and lift (pulled back under the +, so nothing moves), and the first one's name opens to the right. */
.mixer-shelf { padding-left: 2.6rem; margin-left: -1.2rem; }
.mixer-shelf:not(.is-at-end) .shelf-item:first-child .shelf-title { left: 0; transform: none; }
.shelf-item.is-waiting { animation: shelf-glow 1.8s ease-in-out infinite; }
.shelf-remove { position: absolute; z-index: 3; top: -.35rem; right: -.35rem; width: 1.15rem; height: 1.15rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  background: #fff; color: rgba(73, 59, 55, .6); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .2s; }
.shelf-item:hover .shelf-remove { opacity: 1; }
.shelf-remove:hover { color: var(--guava); }
@media (hover: none) { .shelf-remove { opacity: .7; } }
@keyframes shelf-glow { 50% { filter: drop-shadow(0 0 7px rgba(246, 185, 59, .95)); } }

/* The smoothie bar: fixed at the bottom of every page (above the tab bar on phones), sliding up and down;
   the round buttons at the right (rewards, shelf) stay. */
.smoothie-bar { --bar-bottom: calc(3.7rem + var(--safe-bottom)); position: fixed; left: 0; right: 0; bottom: var(--bar-bottom); z-index: 35; display: flex; justify-content: flex-start; pointer-events: none; }
@media (min-width: 640px) { .smoothie-bar { --bar-bottom: 0px; justify-content: center; } }
.smoothie-bar-body { pointer-events: auto; position: relative; width: calc(100% - 3.5rem); padding: 0 .5rem .4rem; transition: transform .55s var(--ease-bounce), visibility 0s;
  background: radial-gradient(ellipse 62% 125% at 50% 92%, rgba(255, 252, 246, .96) 0%, rgba(255, 252, 246, .8) 42%, rgba(255, 252, 246, 0) 74%); } /* most solid in the middle, see-through to the sides and the top */
@media (min-width: 640px) { .smoothie-bar-body { width: min(62rem, calc(100% - 7rem)); padding: 0 1rem .4rem; } }
body:not(.has-smoothie-bar) .smoothie-bar-body { transform: translateY(calc(100% + var(--bar-bottom) + 1rem)); visibility: hidden; transition: transform .4s ease-in, visibility 0s .4s; }
.smoothie-bar-tabs { pointer-events: auto; position: absolute; right: .6rem; bottom: .75rem; display: flex; flex-direction: column; gap: .4rem; }
@media (min-width: 640px) { .smoothie-bar-tabs { flex-direction: row; right: 1rem; } }
.smoothie-bar-tab { position: relative; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border-radius: 9999px; background: #fff; box-shadow: var(--shadow-pop); font-size: 1.15rem; transition: transform .2s var(--ease-bounce), filter .3s, opacity .3s; }
.smoothie-bar-tab:hover { transform: scale(1.1); }
body.has-smoothie-bar [data-bar-tab] { filter: grayscale(1); opacity: .55; } /* the shelf is out */
body.has-smoothie-bar [data-bar-tab]:hover { filter: none; opacity: 1; }
body.has-smoothie-bar #page { padding-bottom: 14rem; }
@media (min-width: 640px) { body.has-smoothie-bar #page { padding-bottom: 10rem; } }
body.has-smoothie-bar .toast { bottom: calc(12rem + var(--safe-bottom)); } /* (above the bar) */
@media (min-width: 640px) { body.has-smoothie-bar .toast { bottom: 8rem; } }
.shelf-item.is-new { animation: shelf-land .7s var(--ease-bounce) both; }
@keyframes shelf-land { from { transform: translateY(-60px) scale(.6); opacity: 0; } }
.shelf-splash { position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; border-radius: 9999px; pointer-events: none; animation: shelf-splash .7s ease-out .5s both;
  box-shadow: -14px -6px 0 1px #E98C91, 14px -8px 0 1px #F6B93B, -8px -16px 0 0 #8FB45A, 9px -18px 0 0 #E98C91, 0 -22px 0 1px #F6B93B; }
@keyframes shelf-splash { from { opacity: 1; transform: scale(.2); } to { opacity: 0; transform: scale(1.6) translateY(-6px); } }

/* Safe Space: the vault button bottom left (across from the rewards and the shelf button) */
.vault-corner { position: fixed; z-index: 35; left: .6rem; bottom: calc(3.7rem + var(--safe-bottom) + .75rem); width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center; background: #fff; color: #5A5560; box-shadow: var(--shadow-pop); transition: transform .2s var(--ease-bounce), color .2s; }
.vault-corner:hover { transform: scale(1.1) rotate(-8deg); color: var(--greentea, #8FB45A); }
@media (min-width: 640px) { .vault-corner { left: 1rem; bottom: .75rem; } }
@media (max-width: 639px) { /* phones: the shelf moves over to make room for it */
  .smoothie-bar { justify-content: center; }
  .smoothie-bar-body { width: 100%; } .vault-corner, .smoothie-bar-tabs { display: none !important; } body:not(.has-smoothie-bar) .smoothie-bar { display: none; }
}

/* Safe Space: each entry a little vault door — hinges, a wheel, a brass name plate; bars across until tapped
   (they wipe off and the wheel turns), then tapped again to open. Flat colors, drawn simply. */
.vault { --door: #574A5C; --rim: #6B5D70; --metal: #E8DED3; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem;
  width: 100%; aspect-ratio: 1; padding: 1rem 1rem .9rem 1.4rem; border-radius: 1.1rem; overflow: hidden; text-align: center; cursor: pointer;
  background: var(--door); box-shadow: inset 0 0 0 5px var(--rim), inset 0 0 0 6px rgba(0, 0, 0, .18), 0 6px 14px -6px rgba(73, 59, 55, .45);
  transition: transform .25s var(--ease-bounce), box-shadow .4s; }
.vault:hover { transform: translateY(-3px); }
.vault-hinges { position: absolute; left: .55rem; top: 22%; bottom: 22%; width: .4rem; pointer-events: none;
  background: linear-gradient(var(--metal) 0 1.1rem, transparent 1.1rem calc(100% - 1.1rem), var(--metal) calc(100% - 1.1rem)); border-radius: 9999px; opacity: .8; }
.vault-wheel { width: 2.7rem; height: 2.7rem; color: var(--metal); transition: transform .9s var(--ease-bounce); }
.vault-plate { max-width: 100%; padding: .2rem .55rem; border-radius: .3rem; background: #E6C77E; color: #4A3A1E; font-family: 'Lora', serif; font-weight: 700; font-size: .78rem; line-height: 1.2;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.vault-meta { font-size: 10px; font-weight: 700; color: rgba(232, 222, 211, .7); }
/* The bars: four round rods and a crossbar, drawn flat; they wipe off to the side */
.vault-bars { position: absolute; inset: 0; pointer-events: none; clip-path: inset(0 0 0 0); transition: clip-path .65s cubic-bezier(.7, 0, .3, 1);
  background:
    linear-gradient(transparent calc(50% - 4px), #CFC4BA calc(50% - 4px) calc(50% + 2px), #A99D93 calc(50% + 2px) calc(50% + 4px), transparent calc(50% + 4px)),
    repeating-linear-gradient(90deg, transparent 0 calc(20% - 6px), #DDD3C9 calc(20% - 6px) calc(20% - 2px), #ADA197 calc(20% - 2px) 20%); }
.vault.is-open { box-shadow: inset 0 0 0 5px var(--greentea, #91A875), inset 0 0 0 6px rgba(0, 0, 0, .18), 0 8px 18px -6px rgba(145, 168, 117, .6); }
.vault.is-open .vault-bars { clip-path: inset(0 0 0 100%); }
.vault.is-open .vault-wheel { transform: rotate(240deg); }
.vault.is-locked { --door: #4A3F4E; }
.vault-padlock { position: absolute; right: 12%; top: calc(50% - 3px); /* hanging on the crossbar */ width: 1.9rem; height: 1.9rem; border-radius: .45rem;
  display: flex; align-items: center; justify-content: center; background: #E6C77E; color: #4A3A1E; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); pointer-events: none; }
.vault.is-locked .vault-wheel { opacity: .35; }
.vault.is-rattling { animation: vault-rattle .45s ease-in-out; }
@keyframes vault-rattle { 20% { transform: translateX(-4px) rotate(-1deg); } 40% { transform: translateX(4px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* Art: the picture in a thin dark frame with a white mat */
.art-frame { display: flex; align-items: center; justify-content: center; min-height: 12rem; max-height: 22rem; padding: .85rem; background: #FFFEFB;
  border: 5px solid #3B302C; border-radius: 4px; box-shadow: 0 8px 16px -8px rgba(73, 59, 55, .45), inset 0 0 0 1px rgba(73, 59, 55, .12); }
.art-frame img { max-width: 100%; max-height: calc(22rem - 2.7rem); object-fit: contain; opacity: 0; transition: opacity .8s; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.art-frame img.is-shown { opacity: 1; }
.art-frame.is-empty { border-style: dashed; border-color: rgba(73, 59, 55, .25); }

/* Poll: each answer a bar that fills with its share of the votes */
.poll-option { display: flex; align-items: center; gap: .25rem; }
.poll-bar { position: relative; flex: 1; min-width: 0; overflow: hidden; text-align: left; font-size: .85rem; color: var(--ink, #493B37);
  padding: .45rem .7rem; border-radius: .75rem; border: 1.5px solid rgba(73, 59, 55, .12); background: #fff; transition: border-color .2s; }
.poll-bar:not(:disabled):hover { border-color: rgba(108, 38, 92, .35); }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: rgba(246, 185, 59, .28); transition: width .6s var(--ease-bounce); }
.poll-option.is-mine .poll-bar { border-color: var(--passionfruit); }
.poll-option.is-won .poll-bar { border-color: var(--greentea, #91A875); }
.poll-option.is-won .poll-fill { background: rgba(145, 168, 117, .3); }
.poll-option.is-closed:not(.is-won) .poll-bar { opacity: .6; }

/* The Art page: a gallery wall — frames to pick (art-*), a little museum label under each piece */
.gallery-wall { border-radius: 1.25rem; padding: 1rem; background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)), repeating-linear-gradient(90deg, rgba(73, 59, 55, .035) 0 2px, transparent 2px 46px); box-shadow: inset 0 0 0 1px rgba(73, 59, 55, .06); }
.gallery-wall:empty { display: none; }
.gallery-piece { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.gallery-piece [class^="art-"] { cursor: zoom-in; transition: transform .3s var(--ease-bounce); }
.gallery-piece [class^="art-"]:hover { transform: translateY(-3px) scale(1.01); }
.gallery-piece img, [class^="art-"].is-big img { display: block; width: 100%; height: auto; }
[class^="art-"].is-big { width: min(30rem, 78vw); flex-shrink: 0; }
.gallery-label { cursor: grab; touch-action: none; background: #FFFEFB; border-radius: 3px; padding: .3rem .6rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); text-align: center; max-width: 100%; }
.gallery-label b { display: block; font-family: 'Lora', serif; font-style: italic; font-size: .78rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-label span { display: block; font-size: 10px; color: rgba(73, 59, 55, .5); }
.museum-label { width: 13rem; background: #FFFEFB; border-left: 3px solid rgba(73, 59, 55, .2); padding: .75rem .9rem; font-size: .8rem; line-height: 1.45; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
/* The frames */
.art-gilded { padding: 14px; background: linear-gradient(135deg, #F6DE95, #C59A3A 30%, #F3D27E 50%, #A97E25 75%, #E9C76C); box-shadow: inset 0 0 0 2px rgba(120, 85, 20, .4), 0 12px 24px -10px rgba(73, 59, 55, .55); }
.art-gilded img { box-shadow: 0 0 0 6px #FFFBF0, 0 0 0 7px rgba(150, 110, 30, .5); }
.art-baroque { padding: 18px; border-radius: 6px; background: radial-gradient(circle at 8px 8px, #8A6215 0 3px, transparent 4px) 0 0 / 18px 18px, linear-gradient(135deg, #F1D27A, #B6852B 40%, #F6DC8E 60%, #9C7022); box-shadow: inset 0 0 0 3px #7A5512, inset 0 0 0 6px #E9C76C, 0 14px 28px -10px rgba(73, 59, 55, .6); }
.art-wood { padding: 12px; background: repeating-linear-gradient(90deg, #8A5A34 0 3px, #9C6A40 3px 7px, #82522E 7px 9px); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .2), 0 10px 20px -10px rgba(73, 59, 55, .55); }
.art-black { padding: 9px; background: #1E1A1A; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .6); }
.art-white { padding: 22px; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 16px 30px -14px rgba(73, 59, 55, .45); }
.art-white img { box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.art-none { position: relative; padding: 0; box-shadow: 0 6px 14px -6px rgba(73, 59, 55, .45); }
.art-none::before { content: ''; position: absolute; z-index: 1; top: -.55rem; left: 50%; width: 3.5rem; height: 1.1rem; margin-left: -1.75rem; transform: rotate(-3deg); background: rgba(246, 185, 59, .55); }
/* A frame to pick, small */
.frame-swatch { display: block; width: 3rem; height: 2.4rem; padding: 5px !important; }
.frame-swatch > span { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #B9D3E8, #F2C6B9); }
.frame-swatch.art-white { padding: 7px !important; }
.frame-swatch.art-none::before { width: 1.4rem; height: .45rem; top: -.2rem; margin-left: -.7rem; }

/* Where's Waldo on a gallery piece: a badge on the frame; the picture big, a mark where it's hidden, taps, the reveal ring */
.waldo-badge { position: absolute; z-index: 2; right: -.6rem; top: -.6rem; width: 2rem; height: 2rem; border-radius: 9999px; background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); animation: waldo-wiggle 2.4s ease-in-out infinite; }
@keyframes waldo-wiggle { 0%, 80%, 100% { transform: rotate(0deg); } 85% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }
.waldo-pick { width: 2.3rem; height: 2.3rem; border-radius: .6rem; font-size: 1.3rem; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(73, 59, 55, .1); }
.waldo-pick.is-on { box-shadow: inset 0 0 0 2px var(--passionfruit); background: rgba(246, 185, 59, .2); }
.waldo-pic { position: relative; container-type: inline-size; border-radius: .6rem; overflow: hidden; cursor: crosshair; user-select: none; }
.waldo-pic img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.waldo-mark { position: absolute; transform: translate(-50%, -50%); line-height: 1; pointer-events: none; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px rgba(246, 185, 59, .9)); }
.waldo-tap { position: absolute; width: 1.6rem; height: 1.6rem; margin: -.8rem 0 0 -.8rem; border-radius: 9999px; border: 2.5px solid #E2475A; pointer-events: none; animation: waldo-miss .9s ease-out forwards; }
.waldo-tap::before, .waldo-tap::after { content: ''; position: absolute; left: 50%; top: 20%; bottom: 20%; width: 2.5px; margin-left: -1.25px; background: #E2475A; transform: rotate(45deg); }
.waldo-tap::after { transform: rotate(-45deg); }
@keyframes waldo-miss { 0% { transform: scale(.4); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }
.waldo-tap.is-found { width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-color: var(--greentea, #91A875); border-width: 4px; animation: waldo-found .6s var(--ease-bounce) forwards; }
.waldo-tap.is-found::before, .waldo-tap.is-found::after { display: none; }
@keyframes waldo-found { from { transform: scale(2.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.waldo-ring { position: absolute; width: var(--r); height: var(--r); transform: translate(-50%, -50%); border-radius: 9999px; border: 4px solid var(--greentea, #91A875);
  box-shadow: 0 0 0 2000px rgba(30, 20, 25, .45); animation: waldo-found .7s var(--ease-bounce) both; pointer-events: none; }

/* Trips (Travel): the bar of trips above the map, the tools on it, the rows below */
.trip-chip { display: inline-flex; align-items: center; gap: .4rem; height: 2.1rem; padding: 0 .85rem; border-radius: 9999px; font-size: .78rem; font-weight: 700; color: rgba(73, 59, 55, .7);
  background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1.5px rgba(73, 59, 55, .2); transition: all .15s; }
.trip-chip:hover { box-shadow: inset 0 0 0 1.5px rgba(108, 38, 92, .35); }
.trip-chip.is-on { background: var(--passionfruit); color: #fff; box-shadow: none; }
.trip-chip.is-new { color: var(--passionfruit); box-shadow: inset 0 0 0 1.5px rgba(108, 38, 92, .3); border: 0; background: transparent; }
.trip-past { position: absolute; z-index: 30; left: 0; top: calc(100% + .35rem); min-width: 13rem; padding: .35rem; border-radius: .9rem; background: #fff; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; }
.trip-past button { text-align: left; padding: .45rem .6rem; border-radius: .6rem; font-size: .82rem; font-weight: 700; color: var(--ink); }
.trip-past button:hover { background: rgba(246, 185, 59, .15); }
.trip-past small { display: block; font-size: 10px; font-weight: 600; color: rgba(73, 59, 55, .45); }
.trip-tools { position: absolute; z-index: 6; left: .6rem; top: .6rem; display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; max-width: calc(100% - 4rem); padding: .3rem; border-radius: .9rem; background: rgba(255, 255, 255, .96); border: 1px solid rgba(73, 59, 55, .18); box-shadow: 0 4px 14px -4px rgba(73, 59, 55, .35); }
.trip-tool { width: 2.1rem; height: 2.1rem; border-radius: .65rem; display: flex; align-items: center; justify-content: center; color: rgba(73, 59, 55, .7); transition: all .15s; }
.trip-tool:hover { background: rgba(246, 185, 59, .18); }
.trip-tool.is-on { background: var(--passionfruit); color: #fff; }
.trip-pen { display: flex; align-items: center; gap: .3rem; padding: 0 .35rem 0 .5rem; margin-left: .15rem; border-left: 1px solid rgba(73, 59, 55, .12); }
.trip-row { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; padding: .35rem .45rem; border-radius: .6rem; font-size: .85rem; }
button.trip-row:hover, li > .trip-row:hover { background: rgba(246, 185, 59, .12); }
.trip-row.is-done > span { text-decoration: line-through; color: rgba(73, 59, 55, .4); }
.trip-item { padding: .4rem .55rem; }
.trip-item.is-done { opacity: .6; }
.trip-add { flex: 1; margin-top: .15rem; padding: .3rem .5rem !important; font-size: .8rem; background: transparent; border-color: transparent; }
.trip-add:focus, .trip-add:hover { background: #fff; border-color: rgba(73, 59, 55, .15); }
.trip-tag { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; height: 2.1rem; padding: 0 .6rem 0 .25rem; border-radius: .7rem; font-size: .8rem; font-weight: 600;
  background: rgba(73, 59, 55, .05); transition: background .15s; }
.trip-tag:hover { background: rgba(246, 185, 59, .18); }
.trip-note { transition: box-shadow .15s; }
.trip-note:hover { box-shadow: 0 4px 14px -6px rgba(73, 59, 55, .35); }

/* Travel: under the map — Live (Follow / Free) and the grip to make the map taller */
.map-foot { display: flex; align-items: center; gap: .5rem; min-height: 2.2rem; padding: .35rem .2rem 0; }
.map-live { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.map-live-btn { display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0; height: 1.8rem; padding: 0 .65rem; border-radius: 9999px; font-size: .74rem; font-weight: 700;
  color: rgba(73, 59, 55, .75); background: rgba(73, 59, 55, .08); border: 1px solid rgba(73, 59, 55, .15); }
.map-live-btn.is-on { background: var(--passionfruit); color: #fff; }
.live-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: #ff6b6b; box-shadow: 0 0 0 0 rgba(255, 107, 107, .7); animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 .45rem rgba(255, 107, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); } }
.map-grip { flex: 1; align-self: stretch; min-width: 3rem; display: flex; align-items: center; justify-content: center; cursor: ns-resize; touch-action: none; }
.map-grip span { width: 2.6rem; height: .3rem; border-radius: 9999px; background: rgba(73, 59, 55, .28); transition: background .15s; }
.map-grip:hover span { background: rgba(73, 59, 55, .35); }

/* Travel: a hint at the map's edge — this many things that way */
.map-hint { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; display: inline-flex; align-items: center; gap: .2rem; height: 1.7rem; padding: 0 .5rem;
  border-radius: 9999px; font-size: .72rem; font-weight: 800; color: #fff; background: rgba(108, 38, 92, .82); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.map-hint:hover { background: var(--passionfruit); }

/* Travel: Google's place search above the map; a place found, in its little window on the map */
.place-search { padding: .1rem .1rem .5rem; }
.map-styles { display: flex; flex-shrink: 0; padding: .2rem; border-radius: .7rem; background: rgba(73, 59, 55, .08); border: 1px solid rgba(73, 59, 55, .14); }
.map-styles button { padding: .3rem .6rem; border-radius: .5rem; font-size: .72rem; font-weight: 700; color: rgba(73, 59, 55, .6); }
.map-styles button.is-on { background: #fff; color: var(--passionfruit); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (max-width: 480px) { .map-styles button { padding: .3rem .4rem; font-size: .66rem; } }
.place-search gmp-place-autocomplete { width: 100%; color-scheme: light; }
.found-place { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; max-width: 15rem; font-family: 'Quicksand', sans-serif; }
.found-place b { font-size: .9rem; color: var(--ink); }
.found-place small { font-size: 11px; color: rgba(73, 59, 55, .55); }
.found-place .btn { margin-top: .35rem; }

/* Trips: words on the map in a little see-through box; the pen's Free / Straight switch */
.map-label { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; cursor: pointer; padding: .05rem .55rem .15rem;
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.35rem; line-height: 1.15; border-radius: .6rem;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(4px); box-shadow: 0 2px 8px -2px rgba(73, 59, 55, .35); transition: transform .15s; }
.map-label:hover { transform: translate(-50%, -50%) scale(1.06); }
.trip-mode { display: inline-flex; align-items: center; gap: .25rem; height: 1.8rem; padding: 0 .5rem; border-radius: .55rem; font-size: .72rem; font-weight: 700; color: rgba(73, 59, 55, .6); }
.trip-mode.is-on { background: rgba(246, 185, 59, .3); color: var(--ink); }

/* A clothesline (ui.js clothesline()): a sagging rope, things hung on it with wooden pins; they swing when pointed at */
.clothesline { position: relative; padding-top: .35rem; }
.clothesline:has(.fantasy-slip:hover), .clothesline:has(.fantasy-slip:focus-visible) { z-index: 30; }
.clothesline + .clothesline { margin-top: .75rem; }
.clothesline-rope { position: absolute; left: 0; right: 0; top: .35rem; width: 100%; height: 1.2rem; overflow: visible; }
.clothesline-items { position: relative; display: flex; justify-content: space-around; align-items: flex-start; padding: 0 .75rem; }
.clothesline-item { position: relative; z-index: var(--z, 1); display: flex; flex-direction: column; align-items: center; flex: 0 1 2.6rem; min-width: 1.15rem; margin-top: var(--sag, 0); transform: rotate(var(--swing, 0deg)) translateX(var(--shift, 0px)); transform-origin: 50% 0; transition: transform .4s var(--ease-bounce); }

.clothesline-item:hover, .clothesline-item:focus-within { animation: clothes-swing 1.4s ease-in-out; z-index: 50; }



@keyframes clothes-swing { 25% { transform: rotate(calc(var(--swing) + 7deg)) translateX(var(--shift, 0px)); } 55% { transform: rotate(calc(var(--swing) - 5deg)) translateX(var(--shift, 0px)); } 80% { transform: rotate(calc(var(--swing) + 2deg)) translateX(var(--shift, 0px)); } }
.clothespin { width: .55rem; height: 1.2rem; position: relative; z-index: 2; margin-bottom: -.55rem; filter: drop-shadow(0 1px 1px rgba(73, 59, 55, .25)); }

/* The Gift (gift.js, in "Us"): pointed at, it rattles a little (feeling what's inside); checked, it wiggles;
   found — the bow comes undone, the ribbon slips off, the lid lifts, a few sparkles */
.gift-box { border-radius: 1rem; }
.gift-box svg { transform-origin: 50% 92%; }
.gift-box:hover svg { animation: gift-feel 1.1s ease-in-out infinite; }
@keyframes gift-feel { 0%, 100% { transform: rotate(0deg); } 20% { transform: rotate(-2.5deg) translateY(-1px); } 40% { transform: rotate(2deg); } 60% { transform: rotate(-1.5deg) translateY(-1px); } 80% { transform: rotate(1deg); } }
.gift-box.is-wiggling svg { animation: gift-wiggle .7s ease-in-out; }
@keyframes gift-wiggle { 15% { transform: rotate(-10deg) scale(1.05); } 35% { transform: rotate(9deg); } 55% { transform: rotate(-6deg); } 75% { transform: rotate(4deg); } }
.gift-box.is-hinting svg { animation: gift-hint .65s ease-in-out; }
@keyframes gift-hint { 0%, 100% { transform: rotate(0deg); } 22% { transform: rotate(-3.5deg) translateY(-1.5px); } 48% { transform: rotate(3deg) translateY(-.5px); } 72% { transform: rotate(-1.5deg); } }
.gift-box.is-unwrapping svg { animation: none; }
.gift-lid, .gift-loop, .gift-tail, .gift-ribbon-v, .gift-ribbon-h, .gift-sparkles path { transform-box: fill-box; }
.gift-loop.is-left { transform-origin: 100% 100%; } .gift-loop.is-right { transform-origin: 0 100%; }
.gift-tail { transform-origin: 50% 0; }
.gift-sparkles path { opacity: 0; transform-origin: center; }
.gift-box.is-unwrapping .gift-loop.is-left { animation: gift-untie-l .55s ease-in forwards; }
.gift-box.is-unwrapping .gift-loop.is-right { animation: gift-untie-r .55s ease-in forwards; }
.gift-box.is-unwrapping .gift-tail { animation: gift-fade .35s ease-in forwards; }
.gift-box.is-unwrapping .gift-bow circle { animation: gift-fade .3s .3s ease-in forwards; }
.gift-box.is-unwrapping .gift-ribbon-v { transform-origin: 50% 0; animation: gift-slip-v .5s .35s ease-in forwards; }
.gift-box.is-unwrapping .gift-ribbon-h { transform-origin: 0 50%; animation: gift-slip-h .5s .45s ease-in forwards; }
.gift-box.is-unwrapping .gift-lid { transform-origin: 15% 100%; animation: gift-lid .55s .75s var(--ease-bounce) forwards; }
.gift-box.is-unwrapping .gift-sparkles path { animation: gift-spark .6s 1s ease-out forwards; }
.gift-box.is-unwrapping .gift-sparkles path:nth-child(2) { animation-delay: 1.1s; } .gift-box.is-unwrapping .gift-sparkles path:nth-child(3) { animation-delay: 1.2s; }
@keyframes gift-untie-l { to { transform: rotate(-70deg) scale(.4) translate(-8px, 4px); opacity: 0; } }
@keyframes gift-untie-r { to { transform: rotate(70deg) scale(.4) translate(8px, 4px); opacity: 0; } }
@keyframes gift-fade { to { opacity: 0; } }
@keyframes gift-slip-v { to { transform: scaleY(0); opacity: 0; } }
@keyframes gift-slip-h { to { transform: scaleX(0); opacity: 0; } }
@keyframes gift-lid { to { transform: translate(-6px, -16px) rotate(-18deg); } }
@keyframes gift-spark { 0% { opacity: 0; transform: scale(.3); } 50% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0; transform: scale(.8) translateY(-6px); } }

/* Up next (Home): on the first look, the entries come in one after the other */
.upnext-in { animation: upnext-in .5s var(--ease-bounce) backwards; }
@keyframes upnext-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* Trips: with the eraser, its cursor everywhere on the map (Google would show a hand over lines and pins) */
.is-erasing [data-map], .is-erasing [data-map] * { cursor: var(--erase-cursor) !important; }

/* A popup that dims the site more: darker, and grey (the tease) */
.modal-backdrop.is-dim { background: rgba(25, 18, 22, .78); backdrop-filter: blur(3px) grayscale(1); }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Time-capsule badge on letters, poems & postcards */
.is-rattling { animation: vault-rattle .45s ease-in-out; }
.letter-lock-badge {
  position: absolute; bottom: .35rem; left: 50%; transform: translateX(-50%); z-index: 6;
  display: inline-flex; align-items: center; gap: .2rem; white-space: nowrap;
  padding: .15rem .5rem; border-radius: 9999px; font-size: .62rem; font-weight: 800; letter-spacing: .02em;
  background: var(--passionfruit, #6C265C); color: #fff; border: 1.5px solid #fff;
  box-shadow: 0 2px 6px rgba(73, 59, 55, .28); pointer-events: none;
}
.letter-lock-badge.is-small { font-size: .55rem; padding: .1rem .35rem; bottom: .2rem; }

/* Voice note mini cassette tape on the Memories / Home board */
.cassette-tape {
  position: relative; width: 100%; border-radius: .75rem; padding: .5rem .55rem .45rem;
  background: linear-gradient(165deg, var(--tape-color, #F6B93B), color-mix(in srgb, var(--tape-color, #F6B93B) 78%, #2b1d1a));
  border: 2px solid rgba(73, 59, 55, .22);
  box-shadow: 0 8px 18px -6px rgba(73, 59, 55, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
  user-select: none;
}
.cassette-tape.is-big { width: 17.5rem; padding: .75rem .8rem .65rem; border-radius: .95rem; }
.cassette-label {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  background: #FFFDF5; border-radius: .4rem; padding: .22rem .45rem;
  border: 1px solid rgba(73, 59, 55, .15);
  box-shadow: inset 0 -2px 0 rgba(233, 140, 145, .35);
}
.cassette-title { font-size: 1.05rem; line-height: 1.15; color: var(--ink, #493B37); flex: 1; min-width: 0; }
.cassette-tape.is-big .cassette-title { font-size: 1.3rem; }
.cassette-dur { font-size: .65rem; font-weight: 800; font-variant-numeric: tabular-nums; color: rgba(73, 59, 55, .55); flex-shrink: 0; }
.cassette-window {
  margin-top: .4rem; padding: .32rem .55rem; border-radius: .45rem;
  background: #2D2320; border: 1.5px solid rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: space-between; gap: .45rem;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .55);
}
.cassette-reel {
  width: 1.35rem; height: 1.35rem; border-radius: 9999px; flex-shrink: 0;
  background: radial-gradient(circle, #2D2320 0 28%, #FFFDF5 29% 56%, #2D2320 57%);
  border: 2px dashed rgba(255, 255, 255, .75); display: flex; align-items: center; justify-content: center;
}
.cassette-tape.is-big .cassette-reel { width: 1.7rem; height: 1.7rem; }
.cassette-tape.is-playing .cassette-reel { animation: cassette-spin 1.8s linear infinite; }
@keyframes cassette-spin { to { transform: rotate(360deg); } }
.cassette-meter { flex: 1; height: .32rem; border-radius: 9999px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.cassette-bar { display: block; height: 100%; width: 0%; background: var(--mango, #F6B93B); border-radius: 9999px; transition: width .2s linear; }
.cassette-bottom {
  margin-top: .38rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem;
  padding: 0 .15rem;
}
.cassette-play {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .55rem; border-radius: 9999px; font-size: .68rem; font-weight: 800;
  background: rgba(255, 253, 245, .92); color: var(--ink, #493B37);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .18); transition: transform .15s, background-color .15s;
}
.cassette-play:hover { transform: scale(1.04); background: #fff; }
.cassette-tape.is-playing .cassette-play { background: var(--passionfruit, #6C265C); color: #fff; }
