/* Bloobu site. No external requests: system fonts, inline SVG, the app's own blob pictures, one script. */

:root {
    color-scheme: light dark;
    --blob: #7C8CFF;
    --bg: #FBF8FF;
    --ink: #17131F;
    --muted: #5B5870;
    --card: rgba(255, 255, 255, 0.78);
    --card-solid: #FFFFFF;
    --line: rgba(23, 19, 31, 0.09);
    --screen-top: #ffffff;
    --shadow: 0 40px 80px -36px rgba(40, 30, 100, 0.45);
    --radius: 24px;
    --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Candy colors: one per feature and badge. */
    --pink: #FF7DC8;
    --lilac: #9B8CFF;
    --mint: #4FD6B0;
    --sky: #5FB4FF;
    --sun: #FFC24D;
    --peach: #FF9F7A;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0E0D1A;
        --ink: #F2F1FA;
        --muted: #A8A5C0;
        --card: rgba(255, 255, 255, 0.06);
        --card-solid: #1A1830;
        --line: rgba(255, 255, 255, 0.11);
        --screen-top: #000000;
        --shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.85);
    }
}

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

html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    font-family: var(--font);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(900px 620px at 8% 4%, color-mix(in srgb, var(--blob) 20%, transparent), transparent 70%),
        radial-gradient(700px 520px at 98% 18%, color-mix(in srgb, var(--pink) 12%, transparent), transparent 70%),
        var(--bg);
    transition: background-color 0.4s ease;
}

main { flex: 1; width: 100%; }
.topbar, .hero, .section, .doc, .footer__inner { width: 100%; }

img, svg { max-width: 100%; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--blob) 75%, #000); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; padding: 8px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); }
.skip:focus { left: 12px; }

/* Top bar */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1160px; margin: 0 auto; padding: 18px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.brand img { border-radius: 9px; }
.topbar__nav { display: flex; align-items: center; gap: 20px; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.topbar__nav a { text-decoration: none; }
.topbar__nav a:hover { color: var(--ink); }
@media (max-width: 560px) { .topbar__nav { gap: 16px; } }
/* Very narrow (a small window, a split screen): the icon stands for the name, and nothing spills sideways. */
@media (max-width: 380px) {
    .topbar { padding-inline: 16px; }
    .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .topbar__nav { gap: 14px; font-size: 0.9rem; }
    .swatches { gap: 8px; }
    .swatches__label { flex-basis: 100%; margin: 0; text-align: center; }
    .swatch { width: 30px; height: 30px; }
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 5vw, 64px);
    max-width: 1160px; margin: 0 auto;
    padding: clamp(8px, 3vw, 40px) 24px 24px;
}
.eyebrow { margin: 0 0 8px; font-size: 0.9rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.eyebrow--center { text-align: center; }
h1 {
    margin: 0; font-size: clamp(3.6rem, 11vw, 6.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 0.98;
    color: var(--ink);
    background: linear-gradient(100deg, var(--blob) 0%, var(--pink) 48%, var(--sun) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0.06em;
}
.lede { margin: 18px 0 0; max-width: 24ch; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 650; line-height: 1.3; color: var(--muted); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 52px; padding: 0 24px; border-radius: 18px;
    font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.button:active { transform: scale(0.98); }
.button--primary { background: var(--ink); color: var(--bg); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.6); }
.button--primary:hover { transform: translateY(-1px); }
.button--soon { background: var(--card); border: 1px solid var(--line); color: var(--muted); cursor: default; }
.button--ghost {
    border: 1px solid color-mix(in srgb, var(--blob) 45%, transparent);
    background: color-mix(in srgb, var(--blob) 14%, var(--card-solid));
}
.button--ghost:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -18px color-mix(in srgb, var(--blob) 90%, transparent); }

.swatches { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.swatches__label { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.swatch {
    width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 3px solid transparent;
    background: var(--swatch, var(--blob)); cursor: pointer; box-shadow: 0 0 0 1px var(--line);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.swatch:hover { transform: scale(1.14); }
.swatch[aria-pressed="true"] { border-color: var(--bg); box-shadow: 0 0 0 2px var(--ink); }

/* The phone, with friends in their best looks floating around it. */
.hero__stage { position: relative; padding: 36px clamp(56px, 9vw, 104px); }
.floaty {
    position: absolute; z-index: 2; width: clamp(88px, 12vw, 138px); height: auto;
    filter: drop-shadow(0 18px 18px rgba(40, 30, 100, 0.22));
    animation: bob 5.2s ease-in-out infinite;
}
.floaty--1 { left: 0; top: 8%; --tilt: -7deg; }
.floaty--2 { right: 0; bottom: 8%; --tilt: 6deg; animation-delay: -2.6s; }

@keyframes bob { 0%, 100% { transform: translateY(6px) rotate(var(--tilt, 0deg)); } 50% { transform: translateY(-10px) rotate(calc(var(--tilt, 0deg) * -0.4)); } }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-14px) rotate(-4deg); } 60% { transform: translateY(0) rotate(3deg) scale(1.03, 0.97); } }

@media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .lede { margin-inline: auto; }
    .cta, .swatches { justify-content: center; }
    .hero__stage { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 480px) {
    .hero__stage { padding: 20px 36px; }
    .floaty { width: 76px; }
    .phone { width: min(240px, 62vw); }
}

.phone {
    position: relative;
    width: min(290px, 66vw); aspect-ratio: 9 / 19;
    margin: 0 auto; padding: 10px;
    border-radius: 50px;
    background: linear-gradient(150deg, #34343f, #0a0a0e);
    box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}
.phone__island { position: absolute; z-index: 3; top: 21px; left: 50%; width: 31%; height: 24px; transform: translateX(-50%); border-radius: 99px; background: #000; }
.phone__screen {
    position: relative; height: 100%; overflow: hidden; border-radius: 41px;
    background: linear-gradient(180deg, var(--screen-top) 0%, color-mix(in srgb, var(--blob) 24%, var(--screen-top)) 100%);
    display: flex; flex-direction: column; align-items: center;
}
.phone__status { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 16px 26px 0; font-size: 0.72rem; font-weight: 700; font-family: system-ui, -apple-system, sans-serif; }
.phone__gear { width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 10%, transparent); position: relative; }
.phone__gear::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); }

.bubble {
    position: absolute; z-index: 2; left: 50%; top: var(--bubble-top, 38%); transform: translate(-50%, -100%);
    transition: top 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
    min-height: 50px; width: max-content; max-width: 80%;
    padding: 14px 18px; border-radius: 20px; text-align: center;
    background: color-mix(in srgb, var(--screen-top) 82%, var(--blob) 18%);
    border: 1px solid color-mix(in srgb, var(--blob) 40%, transparent);
    box-shadow: 0 12px 22px -16px rgba(40, 30, 100, 0.6);
    font-weight: 700; font-size: 0.98rem; line-height: 1.25;
    display: flex; align-items: center; justify-content: center;
}
.bubble::after {
    content: ""; position: absolute; left: 50%; bottom: -9px; width: 16px; height: 16px; transform: translateX(-50%) rotate(45deg);
    background: inherit; border-right: 1px solid color-mix(in srgb, var(--blob) 40%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--blob) 40%, transparent);
}
.bubble__text { color: var(--ink); }

/* Tapped again and again: nothing on the phone gets selected. */
.phone, .scene { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.phone__blob { width: 100%; margin-top: auto; margin-bottom: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.phone__blob:focus-visible { outline: 3px solid color-mix(in srgb, var(--blob) 70%, var(--ink)); outline-offset: -6px; border-radius: 28px; }
/* Blob's level and XP bar under it, as on the app's Home: a round badge with the level, a thin bar in Blob's color. */
.level { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 22px; }
.level__badge { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 99px; font-size: 0.86rem; font-weight: 800; color: #fff; background: var(--blob); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blob) 22%, transparent); font-variant-numeric: tabular-nums; }
.level__bar { width: 92px; height: 7px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--blob) 18%, transparent); }
.level__fill { display: block; height: 100%; width: calc(var(--fill, 0) * 100%); border-radius: inherit; background: var(--blob); transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.level__gain { position: absolute; left: 50%; bottom: 100%; font-size: 0.78rem; font-weight: 800; color: var(--blob); opacity: 0; pointer-events: none; transform: translate(-50%, 0); }
.level__gain.is-shown { animation: level-gain 1.1s ease-out; }
@keyframes level-gain { 0% { opacity: 0; transform: translate(-50%, 6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -22px); } }
@media (prefers-reduced-motion: reduce) { .level__fill { transition: none; } }

/* Blob drawing (the hero's phone) */
.blob-svg { display: block; width: 100%; height: auto; overflow: visible; }
.blob-stop--a { stop-color: var(--blob); stop-opacity: 0.98; }
.blob-stop--b { stop-color: var(--blob); stop-opacity: 0.66; }
.blob-stop--rainbow-1 { stop-color: #FFA27F; }
.blob-stop--rainbow-2 { stop-color: #6FB8FF; }
.blob-body { filter: drop-shadow(0 24px 30px color-mix(in srgb, var(--blob) 38%, transparent)); }
.blob-rim { stroke: rgba(255, 255, 255, 0.6); stroke-width: 9; stroke-linejoin: round; }
.blob-shadow { fill: rgba(23, 19, 31, 0.14); }
@media (prefers-color-scheme: dark) { .blob-shadow { fill: rgba(0, 0, 0, 0.4); } }

.face { opacity: 0; transition: opacity 0.35s ease; }
.face.is-active { opacity: 1; }
.face .ink, .face .ink-fill, .face .ink * { fill: #17131F; fill-opacity: 0.9; }
.face .ink-fill { fill: #17131F; }
.face .shine { fill: #fff; fill-opacity: 0.88; }
.face .mouth { fill: none; stroke: #17131F; stroke-opacity: 0.9; stroke-width: 25; stroke-linecap: round; }
.face .mouth--thin { stroke-width: 17; }
.face .mouth--eye { stroke-width: 20; }
.face .blush { fill: #FF8DB3; fill-opacity: 0.6; }
.face .tongue { fill: #FF8DB3; }
.face .zzz text { font: 800 64px var(--font); fill: var(--ink); opacity: 0.7; }
.face.is-active .zzz__a { animation: zzz 2.4s ease-in-out infinite; }
.face.is-active .zzz__b { animation: zzz 2.4s ease-in-out 0.5s infinite; }

@keyframes zzz { 0%, 100% { transform: translateY(0); opacity: 0.2; } 50% { transform: translateY(-18px); opacity: 0.85; } }
@keyframes float { 0%, 100% { transform: translateY(8px) scale(0.985); } 50% { transform: translateY(-8px) scale(1.015); } }
.blob-float { animation: float 4.4s ease-in-out infinite; }

.blanket__cloth { stroke: rgba(255, 255, 255, 0.6); stroke-width: 6; }
.blanket:not(.blanket--aurora) .blanket__cloth { fill: #3B3F8F; }
.blanket__star { fill: #FFD84D; }
.blanket--aurora .blanket__star { fill: #fff; }

/* The hero's blob grows from its middle, as in the app (blob.js sets --grow), and what it puts on pops in. */
.blob-grow { transform-box: view-box; transform-origin: 508px 525px; transform: scale(var(--grow, 0.45)); transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.slot .item.is-new { transform-box: fill-box; transform-origin: center; animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.blob-svg.is-squished { transform-origin: 50% 92%; animation: squish 0.35s ease; }
@keyframes pop-in { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
@keyframes squish { 0%, 100% { transform: scale(1, 1); } 40% { transform: scale(1.06, 0.93); } 70% { transform: scale(0.97, 1.04); } }
@media (prefers-reduced-motion: reduce) {
    .blob-grow, .bubble { transition: none; }
    .slot .item.is-new, .blob-svg.is-squished { animation: none; }
}

/* Sections */
.section { max-width: 1160px; margin: 0 auto; padding: 64px 24px; }
.section__title { margin: 0 0 24px; text-align: center; font-size: clamp(1.8rem, 4.4vw, 2.7rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; }
.section__title--left { text-align: left; }
.section__lede { max-width: 52ch; margin: -8px auto 16px; text-align: center; font-size: 1.1rem; color: var(--muted); }

/* What Bloobu does: the app's welcome-tour scenes, each on a soft card in its color. On a phone they slide sideways
   like the tour, the next one peeking in. */
.features { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
    padding: 10px 10px 16px; border-radius: 24px; text-align: center;
    background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 20%, var(--card-solid)), color-mix(in srgb, var(--tint) 6%, var(--card-solid)));
    border: 1px solid color-mix(in srgb, var(--tint) 32%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 22px 34px -26px color-mix(in srgb, var(--tint) 90%, transparent); }
.feature__title { margin: 12px 0 4px; font-size: 1.02rem; font-weight: 800; line-height: 1.2; }
.feature__text { margin: 0 6px; color: var(--muted); font-size: 0.9rem; line-height: 1.42; }
.feature--sky { --tint: var(--sky); }
.feature--peach { --tint: var(--peach); }
.feature--pink { --tint: var(--pink); }
.feature--mint { --tint: var(--mint); }
.feature--lilac { --tint: var(--lilac); }
.feature--sun { --tint: var(--sun); }
@media (max-width: 880px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .features {
        display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
        margin: 0 -24px; padding: 4px 24px 14px; scroll-padding: 0 24px; scrollbar-width: none;
    }
    .features::-webkit-scrollbar { display: none; }
    .feature { flex: 0 0 80%; scroll-snap-align: center; }
    .feature:hover { transform: none; }
}

/* Welcome tour scenes (site/partials/tour-scene.blade.php): the app's WelcomeTour and its movements, slower and calmer on
   a page that is read rather than swiped (the owner, 15 November 2026). The art is
   one SVG of 360 × 280 units, so transforms below are in those units; words sit on top, sized to the card (cqw). */
.scene {
    position: relative; aspect-ratio: 9 / 7; overflow: hidden; border-radius: 18px; container-type: inline-size;
    background: linear-gradient(180deg, color-mix(in srgb, var(--blob) 18%, var(--card-solid)), color-mix(in srgb, var(--blob) 6%, var(--card-solid)));
}
.scene__art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: hidden; }
.scene__emoji { text-anchor: middle; dominant-baseline: central; transform-box: fill-box; transform-origin: center; }
.scene__say, .scene__pill, .scene__label {
    position: absolute; white-space: nowrap; font-weight: 700; color: var(--ink);
    background: var(--card-solid); box-shadow: 0 2px 6px rgba(23, 19, 31, 0.1);
}
.scene__say { top: 9%; left: 50%; padding: 2.6cqw 4.4cqw; border-radius: 5cqw; font-size: 4.6cqw; opacity: 0; transform: translateX(-50%) scale(0.8); animation: scene-say 24s infinite; }
.scene__say:nth-of-type(2) { animation-delay: 6s; }
.scene__say:nth-of-type(3) { animation-delay: 12s; }
.scene__say:nth-of-type(4) { animation-delay: 18s; }
@keyframes scene-say {
    0% { opacity: 0; transform: translateX(-50%) scale(0.8); }
    4% { opacity: 1; transform: translateX(-50%) scale(1.05); }
    8%, 22% { opacity: 1; transform: translateX(-50%) scale(1); }
    25%, 100% { opacity: 0; transform: translateX(-50%) scale(0.92); }
}
/* Its face goes with each line: happy hello, curious question, excited it remembers, shy about its diary. */
.scene--talk .face { opacity: 0; animation: scene-face 24s infinite; transition: none; }
.scene--talk .face[data-mood="curious"] { animation-delay: 6s; }
.scene--talk .face[data-mood="excited"] { animation-delay: 12s; }
.scene--talk .face[data-mood="shy"] { animation-delay: 18s; }
.scene--talk .face[data-mood="sleepy"] { display: none; }
@keyframes scene-face { 0%, 24% { opacity: 1; } 25%, 100% { opacity: 0; } }
.scene__pill { padding: 1.2cqw 3.6cqw; border-radius: 99px; font-size: 3.4cqw; }
.scene__label { top: 3.4%; left: 3.4%; padding: 1.3cqw 2.8cqw; border-radius: 99px; font-size: 3.2cqw; }
.scene__label--night { top: 53.4%; color: #fff; background: rgba(255, 255, 255, 0.14); box-shadow: none; }

/* Blob breathes and bobs gently, as on the phone. */
.scene__bob { transform-box: fill-box; transform-origin: 50% 100%; animation: scene-bob 5.5s ease-in-out infinite; }
.scene__bob--late { animation-delay: -2.4s; }
.scene__friend { --blob: #FF8DB3; }
@keyframes scene-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3px) scale(1.015, 0.99); } }
/* Asleep in the dark: the blob, its blanket and hat dimmed, its white "z Z" not. */
.scene__dim svg > g > :not(.face) { filter: brightness(0.72) saturate(0.9); }

/* Feed: the apple comes in from the left in an arc and is eaten; soap bubbles rise and sway; the ball bounces, spinning. */
.scene__apple { animation: scene-eat 6s ease-in-out infinite; }
@keyframes scene-eat {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    35% { transform: translate(50px, -50px) scale(1); }
    70% { transform: translate(100px, -30px) scale(1); opacity: 1; }
    85% { transform: translate(100px, -30px) scale(0.55); opacity: 1; }
    100% { transform: translate(100px, -30px) scale(0.2); opacity: 0; }
}
.scene__soap { animation: scene-rise 6.5s linear infinite; }
.scene__soap--2 { animation-duration: 8.5s; animation-delay: -3s; }
.scene__soap--3 { animation-duration: 5.5s; animation-delay: -1.8s; }
.scene__sway--2 { animation-delay: -3s; }
.scene__sway--3 { animation-delay: -1.8s; }
@keyframes scene-rise { 0% { transform: translateY(0); opacity: 0; } 30%, 60% { opacity: 1; } 100% { transform: translateY(-140px); opacity: 0; } }
.scene__sway { animation: scene-sway 5.5s ease-in-out infinite alternate; }
@keyframes scene-sway { from { transform: translateX(-9px); } to { transform: translateX(9px); } }
.scene__bounce { animation: scene-bounce 1.9s infinite; }
@keyframes scene-bounce {
    0%, 100% { transform: translateY(0); animation-timing-function: ease-out; }
    50% { transform: translateY(-72px); animation-timing-function: ease-in; }
}
.scene__spin { animation: scene-spin 4s linear infinite; }
@keyframes scene-spin { to { transform: rotate(360deg); } }

/* The nightly adventure: treasures jumping out of the sack, the leaf on the hat swaying. */
.scene__floaty { animation: scene-floaty 4.5s ease-out infinite; }
.scene__leaf { transform: rotate(24deg); animation: scene-leaf 3.2s ease-in-out infinite; }
@keyframes scene-leaf { 0%, 100% { transform: rotate(24deg); } 50% { transform: rotate(10deg); } }
.scene__floaty--2 { animation-delay: 1.5s; }
.scene__floaty--3 { animation-delay: 3s; }
.scene__floaty--kiss { animation-delay: 0.5s; }
@keyframes scene-floaty { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-100px); opacity: 0; } }

/* Night: stars twinkle under a crescent moon. */
.scene__star { fill: #fff; animation: scene-twinkle 4s ease-in-out infinite; }
.scene__star--1 { animation-delay: -1s; }
.scene__star--2 { animation-delay: -2.2s; animation-duration: 5s; }
.scene__star--3 { animation-delay: -3s; animation-duration: 3.4s; }
.scene__star--still { animation: none; opacity: 0.75; }
@keyframes scene-twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.95; } }
.scene__moon { fill: #FFE7A3; filter: drop-shadow(0 0 6px rgba(255, 231, 163, 0.6)); }

/* Friends: catch from one head to the other in an arc, back and forth, and a hello. */
.scene__catch { animation: scene-catch 3s ease-in-out infinite alternate; }
@keyframes scene-catch { from { transform: translate(140px, 46px); } to { transform: translate(222px, 32px); } }
.scene__arc { animation: scene-arc 3s infinite; }
@keyframes scene-arc {
    0%, 100% { transform: translateY(0); animation-timing-function: ease-out; }
    50% { transform: translateY(-26px); animation-timing-function: ease-in; }
}
.scene__hi { top: 12%; left: 82%; transform: translateX(-50%); }

/* On your Home Screen: two widgets, a thought over the hungry one. */
.scene__widget { filter: drop-shadow(0 4px 8px rgba(30, 20, 70, 0.22)); }
.scene__thought { top: 30%; left: 30%; transform: translateX(-50%); padding: 1cqw 2.4cqw; font-size: 2.7cqw; border-radius: 3cqw; }
.scene__badge { fill: #fff; font: 800 9px var(--font); text-anchor: middle; dominant-baseline: central; }
.scene__app-name { fill: #fff; font: 700 11px var(--font); text-anchor: middle; }

/* Asleep: the "z Z" in white, on the night sky. */
.scene .face .zzz text { fill: #fff; font-size: 96px; }
.scene .face.is-active .zzz__a, .scene .face.is-active .zzz__b { animation-name: scene-zzz; } /* At their own pace: only the rest is slower. */
@keyframes scene-zzz { 0%, 100% { transform: translateY(0); opacity: 0.65; } 50% { transform: translateY(-18px); opacity: 1; } }

/* The friend's blanket. */
.blanket.blanket--cozy .blanket__cloth { fill: #E9A0BE; }

/* Reduce Motion: one still moment of each scene (the first line). */
@media (prefers-reduced-motion: reduce) {
    .scene__say:first-of-type, .scene--talk .face[data-mood="happy"] { opacity: 1; }
    .scene__say:first-of-type { transform: translateX(-50%); }
    .scene__catch { transform: translate(181px, 26px); }
}

/* The wardrobe: counts, filters and every look */
.stats strong { color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 22px; }
.filters[hidden] { display: none; }
.filter {
    min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
    font: inherit; font-weight: 800; color: var(--ink);
    background: var(--card); border: 1px solid var(--line);
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.filter:hover { transform: translateY(-1px); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter--plus[aria-pressed="true"] { background: linear-gradient(90deg, var(--pink), var(--lilac)); color: #fff; border-color: transparent; }
.filter--ultra[aria-pressed="true"] { background: linear-gradient(90deg, #1E1B4B, #5B3FD1); color: #FFD84D; border-color: transparent; }

/* Six or three in a row (36 looks fill every row), and a filtered few stay in the middle. */
.looks { --per-row: 6; --gap: 14px; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.looks > .look { flex: 0 0 calc((100% - (var(--per-row) - 1) * var(--gap)) / var(--per-row)); min-width: 0; }
@media (max-width: 1040px) { .looks { --per-row: 3; } }
@media (max-width: 600px) {
    .looks { --per-row: 3; --gap: 8px; }
    /* `.looks >` and `.looks`: these come before the cards' own rules, and must still win on a phone. */
    .looks > .look { padding: 30px 4px 12px; border-radius: 22px; }
    .looks .look__name { font-size: 0.78rem; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
    .look .badge { top: 8px; left: 50%; transform: translateX(-50%); padding: 3px 8px; font-size: 0.6rem; white-space: nowrap; }
}
.look {
    position: relative; padding: 18px 14px 18px; border-radius: 30px; text-align: center;
    background: linear-gradient(170deg, color-mix(in srgb, var(--tint) 34%, var(--card-solid)), color-mix(in srgb, var(--tint) 8%, var(--card-solid)));
    border: 1px solid color-mix(in srgb, var(--tint) 38%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.look[hidden] { display: none; }
.look:focus { outline: none; }
/* Until "See all": three rows of six on a wide screen, five rows of three on a smaller one. */
.looks.is-limited > .look:nth-child(n+19) { display: none; }
@media (max-width: 1040px) { .looks.is-limited > .look:nth-child(n+16) { display: none; } }
.looks__more { display: flex; justify-content: center; margin-top: 22px; }
.looks__more[hidden] { display: none; }
.look:hover { transform: translateY(-4px); box-shadow: 0 26px 36px -28px color-mix(in srgb, var(--tint) 95%, transparent); }
.look:hover .look__img, .look.is-hopping .look__img { animation: hop 0.7s ease; }
.look__img { display: block; width: 84%; height: auto; margin: 4px auto 0; filter: drop-shadow(0 14px 14px color-mix(in srgb, var(--tint) 40%, transparent)); }
.look__name { margin: 8px 0 0; font-size: 1.05rem; font-weight: 800; }

.badge {
    position: absolute; z-index: 1; top: 12px; left: 12px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.badge--free { background: color-mix(in srgb, var(--mint) 26%, var(--card-solid)); color: color-mix(in srgb, var(--mint) 45%, var(--ink)); }
.badge--plus { background: linear-gradient(90deg, var(--pink), var(--lilac)); color: #fff; }
.badge--ultra { background: linear-gradient(90deg, #1E1B4B, #5B3FD1); color: #FFD84D; box-shadow: 0 0 14px -2px rgba(123, 92, 255, 0.7); }
.badge--ultra::before { content: "✦ "; }

/* The wardrobe's two tabs, Looks and Every piece: one quiet segmented switch. */
.tabs-wrap { display: flex; justify-content: center; margin: 0 0 18px; }
.tabs-wrap[hidden] { display: none; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, var(--card-solid)); border: 1px solid var(--line); }
.tab {
    min-height: 40px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
    font: inherit; font-weight: 800; color: var(--muted); background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--card-solid); box-shadow: 0 2px 10px rgba(23, 19, 31, 0.12); }
.tab:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; }
.tab-panel[hidden] { display: none; }
.tab-panel + .tab-panel { margin-top: 48px; }
.tab-panel__title { margin: 0 0 6px; text-align: center; font-size: 1.4rem; }
.tab-panel__lede { max-width: 52ch; margin: 0 auto 18px; text-align: center; color: var(--muted); }
.lookbook.is-tabbed .tab-panel + .tab-panel { margin-top: 0; }
.lookbook.is-tabbed .tab-panel__title { display: none; }

/* Everything in the wardrobe: small cards, each piece worn by Blob (a blanket folded, a plush on its own). */
.pieces-group { margin-top: 26px; }
.pieces-group[hidden] { display: none; }
.pieces__title { margin: 0 0 12px; text-align: center; font-size: 1.2rem; }
.wardrobe.is-kinds .pieces__title { display: none; }
.wardrobe.is-kinds .pieces-group { margin-top: 0; }
.pieces { --per-row: 8; --gap: 10px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1040px) { .pieces { --per-row: 5; } }
@media (max-width: 640px) { .pieces { --per-row: 3; --gap: 8px; } }
.piece {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border-radius: 20px; text-align: center;
    background: color-mix(in srgb, var(--mint) 10%, var(--card-solid)); border: 1px solid color-mix(in srgb, var(--mint) 24%, transparent);
}
.piece--plus { background: color-mix(in srgb, var(--pink) 12%, var(--card-solid)); border-color: color-mix(in srgb, var(--pink) 30%, transparent); }
.piece--ultra { background: linear-gradient(170deg, color-mix(in srgb, #5B3FD1 22%, var(--card-solid)), color-mix(in srgb, #1E1B4B 10%, var(--card-solid))); border-color: color-mix(in srgb, #7B5CFF 40%, transparent); }
.piece__img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.piece__name { font-size: 0.85rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.piece__how { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; color: color-mix(in srgb, var(--mint) 45%, var(--ink)); }
.piece--plus .piece__how { color: color-mix(in srgb, var(--pink) 60%, var(--ink)); }
.piece--ultra .piece__how { color: color-mix(in srgb, #7B5CFF 75%, var(--ink)); }
.piece--ultra .piece__how::before { content: "✦ "; }

/* Look colors: each one's own, as the app draws it. */
.look-tint--fairy { --tint: #FFA8D8; }
.look-tint--pirate { --tint: #FF9F6B; }
.look-tint--reindeer { --tint: #C98F63; }
.look-tint--berry { --tint: #7ED9C3; }
.look-tint--cozy { --tint: #7C8CFF; }
.look-tint--royal { --tint: #9B8CFF; }
.look-tint--bunny { --tint: #FFC4DD; }
.look-tint--aurora { --tint: #4AA8FF; }
.look-tint--forest { --tint: #A6DB6E; }
.look-tint--witch { --tint: #9B7BFF; }
.look-tint--sailor { --tint: #7CC0FF; }
.look-tint--comet { --tint: #7B5CFF; }
.look-tint--chef { --tint: #FFD36E; }
.look-tint--cowboy { --tint: #FFB45C; }
.look-tint--santa { --tint: #FF7B7B; }
.look-tint--sleepy { --tint: #8FD3FF; }
.look-tint--hero { --tint: #FF6B9A; }
.look-tint--splash { --tint: #5FD0FF; }
.look-tint--party { --tint: #FFB86B; }
.look-tint--gentle { --tint: #8C9BB5; }
.look-tint--kitty { --tint: #B89CFF; }
.look-tint--unicorn { --tint: #E8B8FF; }
.look-tint--genius { --tint: #8FE3B0; }
.look-tint--garden { --tint: #9ADB8A; }
.look-tint--puddle { --tint: #FFE07A; }
.look-tint--angel { --tint: #A9C8FF; }
.look-tint--viking { --tint: #F0A35E; }
.look-tint--rascal { --tint: #FF8A6B; }
.look-tint--gamer { --tint: #6FA8FF; }
.look-tint--moon { --tint: #5566C8; }
.look-tint--beach { --tint: #5FD0C0; }
.look-tint--rainbow { --tint: #FFB3D9; }
.look-tint--bee { --tint: #FFC94D; }
.look-tint--king { --tint: #E0A84A; }
.look-tint--sweet { --tint: #FF9EC4; }
.look-tint--friends { --tint: #7BA7FF; }
.look-tint--autumn { --tint: #F2A65A; }
.look-tint--snowqueen { --tint: #A8D8FF; }
.look-tint--pond { --tint: #8FE0B0; }
.look-tint--firstsnow { --tint: #8FB8FF; }
.look-tint--circus { --tint: #FFC75F; }
.look-tint--deepsea { --tint: #2E6FB8; }
.look-tint--spooky { --tint: #8C7BFF; }
.look-tint--sweettreat { --tint: #FFB8D9; }
.look-tint--sunny { --tint: #7FD6FF; }
.look-tint--blossom { --tint: #FFC1DA; }
.look-tint--rainy { --tint: #8EC5FF; }
.look-tint--countdown { --tint: #6F7BFF; }
.look-tint--folk { --tint: #FF7B8A; }
.look-tint--disco { --tint: #7A5CFF; }
.look-tint--bemine { --tint: #FF8FB1; }
.look-tint--birdwatch { --tint: #C3E88D; }
.look-tint--daisydays { --tint: #B6E58A; }
.look-tint--phoenix { --tint: #FF8A5B; }
.look-tint--naptime { --tint: #B9A8FF; }
.look-tint--spa { --tint: #A8E6CF; }
.look-tint--artist { --tint: #FFB3A1; }
.look-tint--clouds { --tint: #A9D8FF; }
.look-tint--hiker { --tint: #7CCB8F; }
.look-tint--timetravel { --tint: #F0B27A; }
.look-tint--goodnight { --tint: #9AA8FF; }
.look-tint--builder { --tint: #FFB86B; }
.look-tint--gameday { --tint: #7FD6A8; }
.look-tint--firefighter { --tint: #FF8A7A; }
.look-tint--sundaybest { --tint: #FFC4DD; }
.look-tint--pool { --tint: #6FD0FF; }
.look-tint--safari { --tint: #E8C27A; }
.look-tint--detective { --tint: #A8B5C8; }
.look-tint--brunch { --tint: #FFE07A; }
.look-tint--bathtime { --tint: #8FD8FF; }
.look-tint--daydream { --tint: #FFB8D9; }
.look-tint--undersea { --tint: #5FB8E8; }
.look-tint--windy { --tint: #A6DB6E; }
.look-tint--greenthumb { --tint: #9ADB8A; }
.look-tint--undercover { --tint: #F2B66B; }
.look-tint--teatime { --tint: #7FD1C0; }
.look-tint--lionnap { --tint: #F2B65A; }
.look-tint--punk { --tint: #B197FC; }
.look-tint--skydreamer { --tint: #8FD0FF; }
.look-tint--lava { --tint: #FF7A5A; }
.look-tint--fairground { --tint: #FFB3D9; }
.look-tint--storm { --tint: #6F7FB5; }
.look-tint--wizard { --tint: #C9A6FF; }
.look-tint--masquerade { --tint: #9B6BFF; }

/* Plus, with a switch to Ultra (no script: a checkbox and its label): a small strip that opens to a card, its words
   beside three looks. */
.plus { position: relative; }
.plus__more { max-width: 860px; margin: 0 auto; }
.plus__summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
    padding: 14px 20px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 800;
}
.plus__summary::-webkit-details-marker { display: none; }
.plus__summary::after { content: "▾"; color: var(--muted); transition: transform 0.2s ease; }
.plus__more[open] .plus__summary { margin-bottom: 14px; }
.plus__more[open] .plus__summary::after { transform: rotate(180deg); }
.plus__summary-price { margin-left: auto; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.plus__summary-name, .plus__summary-price { white-space: nowrap; }
@media (max-width: 600px) { .plus__summary { padding: 12px 18px; font-size: 0.95rem; } .plus__summary-price { font-size: 0.82rem; } }
.plus__panel {
    position: relative; max-width: 860px; margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center;
    padding: clamp(22px, 4vw, 34px); border-radius: 30px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--blob) 16%, transparent), color-mix(in srgb, var(--pink) 12%, transparent)),
        var(--card);
    border: 1px solid var(--line);
}
.plus .section__title { margin-bottom: 14px; font-size: clamp(1.45rem, 3vw, 1.9rem); }
.ticks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; font-size: 0.95rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--blob), var(--pink)); }
.ticks li::after { content: ""; position: absolute; left: 5.5px; top: 7px; width: 7px; height: 3.5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.plus__price { margin: 0 0 6px; font-size: 0.95rem; color: var(--muted); }
.plus__amount { font-size: 1.6rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.fineprint { margin: 0; font-size: 0.8rem; color: var(--muted); max-width: 46ch; }

.plus__show { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; max-width: 340px; margin-inline: auto; }
.plus__look {
    margin: 0; padding: 10px 6px; border-radius: 22px; text-align: center;
    background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 34%, transparent), color-mix(in srgb, var(--tint) 8%, transparent));
}
.plus__look img { display: block; width: 100%; height: auto; }
.plus__look:nth-child(2) { transform: translateY(-10px); }
.plus__look:hover img { animation: hop 0.7s ease; }
.plus__look figcaption { margin-top: 4px; font-size: 0.8rem; font-weight: 800; }

.plan-switch { position: absolute; opacity: 0; pointer-events: none; }
.plan-switch__button { position: absolute; top: 18px; right: 18px; z-index: 1; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, #b07cff 45%, transparent); background: color-mix(in srgb, #b07cff 14%, var(--card)); color: var(--ink); font-size: .8rem; font-weight: 800; cursor: pointer; }
.plan-switch:focus-visible + .plus__panel .plan-switch__button { outline: 2px solid var(--blob); outline-offset: 2px; }
.plan-switch__to-plus, .plan--ultra { display: none; }
.plan-switch:checked + .plus__panel .plan--plus, .plan-switch:checked + .plus__panel .plan-switch__to-ultra { display: none; }
.plan-switch:checked + .plus__panel .plan--ultra { display: block; }
.plan-switch:checked + .plus__panel .plan-switch__to-plus { display: inline; }
.plan-switch:checked + .plus__panel { background: linear-gradient(150deg, color-mix(in srgb, #7B5CFF 20%, var(--card)), color-mix(in srgb, #1E1B4B 9%, var(--card))); }
.plus__legal { grid-column: 1 / -1; margin: 2px 0 0; }
.plan-show--ultra { display: none; }
.plan-switch:checked + .plus__panel .plan-show--plus { display: none; }
.plan-switch:checked + .plus__panel .plan-show--ultra { display: grid; }

@media (max-width: 880px) { .plus__panel { grid-template-columns: 1fr; padding-top: 58px; } .section__title--left { text-align: center; } .plus__copy { text-align: center; } .ticks { justify-items: start; text-align: left; max-width: 360px; margin-inline: auto; } .fineprint { margin-inline: auto; } }

.note { text-align: center; padding-bottom: 72px; }
.note__text { max-width: 60ch; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }

/* Footer */
.footer { padding: 24px; font-size: 0.88rem; color: var(--muted); }
.footer__inner { max-width: 1160px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; }
.footer__sep { opacity: 0.5; }

/* Legal / support pages */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 24px 72px; }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin-bottom: 8px; }
.doc__meta { color: var(--muted); margin: 0 0 32px; }
.doc h2 { margin: 36px 0 8px; font-size: 1.3rem; }
.doc p, .doc li { color: color-mix(in srgb, var(--ink) 86%, transparent); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 6px 0; }
.doc code { padding: 1px 6px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); font-size: 0.92em; }
.doc .callout { padding: 16px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
