/* shared cute-decoration primitives. opt-in per page.
   load order: _tokens → _shell → _decor → page.css */

:root {
    --sticker-bob: 3.5s;
    --hard-shadow: 3px 3px 0 var(--border-color);
}

/* kawaii default cursor: inline SVG heart (no asset file). fifi is unaffected
   because it never loads this stylesheet. Pointer affordance is re-asserted
   below so interactive elements still show the hand over the heart. */
html {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 21C12 21 4 16 4 10C4 7 6 5 8.5 5C10 5 11 6 12 7.5C13 6 14 5 15.5 5C18 5 20 7 20 10C20 16 12 21 12 21Z' fill='%23f777aa' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 12 18, auto;
}
a, button, .pill-link, [role="button"],
input[type="submit"], input[type="button"],
input[type="checkbox"], input[type="radio"],
label[for], summary {
    cursor: pointer;
}

/* partial rounding: soften interactive elements only (8px), keep layout
   blocks (.deco-box, cards) sharp per the chosen direction. Low-specificity
   element selector so page CSS can still override per-control. */
button,
input,
textarea,
select {
    border-radius: 8px;
}

.deco-box {
    position: relative;
    background: var(--content-bg);
    border: 2px solid var(--border-color);
    padding: 10px;
    margin-bottom: 14px;
    box-shadow: var(--hard-shadow);
}

.deco-title {
    font-family: var(--font-head);
    text-align: center;
    letter-spacing: 0.04em;
    color: #fff;
    background-image: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border: 2px solid var(--border-color);
    border-radius: 999px;
    padding: 3px 12px;
    margin: -22px auto 10px;
    width: max-content;
    max-width: 90%;
    font-size: 0.95em;
    box-shadow: var(--hard-shadow);
}

.pill-link {
    display: block;
    text-align: center;
    text-decoration: none;
    color: var(--text) !important;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: bold;
    box-shadow: 2px 2px 0 var(--border-color);
    transition: transform 0.1s ease;
}
.pill-link:hover {
    background: var(--accent-hover);
    color: #fff !important;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--border-color);
}
.pill-link:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--border-color);
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
    container-type: inline-size;
    border-top: 2px dashed var(--border-color);
    border-bottom: 2px dashed var(--border-color);
    background: var(--content-bg);
    padding: 4px 0;
}
.marquee__track {
    display: inline-block;
    padding-left: 100%;
    animation: deco-marquee 18s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes deco-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.divider {
    border: none;
    text-align: center;
    margin: 14px 0;
    font-size: 1.1em;
    color: var(--accent);
    overflow: visible;
}
.divider::before { content: "♡ (´｡• ω •｡`) ♡"; letter-spacing: 0.12em; }

.sticker {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 5;
    font-size: 1.6em;
    line-height: 1;
    animation: bob var(--sticker-bob) ease-in-out infinite;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}
.sticker img { display: block; width: 40px; height: auto; }
@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-6px) rotate(3deg); }
}

.odometer {
    display: inline-flex;
    gap: 3px;
    background: #000;
    border: 2px inset var(--border-color);
    padding: 4px;
}
.odometer__digit {
    min-width: 1.1em;
    text-align: center;
    background: #1a0a2e;
    color: #f777aa;
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 1.1em;
    border: 1px solid #333;
}

/* themed scrollbar scoped to .layout: -webkit for Chromium, standard
   props for Firefox. OS scrollbar untouched elsewhere. */
.layout::-webkit-scrollbar,
.layout *::-webkit-scrollbar { width: 10px; height: 10px; }
.layout::-webkit-scrollbar-track,
.layout *::-webkit-scrollbar-track {
    background: var(--bg);
    border: 1px solid var(--border-color);
}
.layout::-webkit-scrollbar-thumb,
.layout *::-webkit-scrollbar-thumb {
    background: var(--accent);
    border: 2px solid var(--border-color);
    border-radius: 999px;
}
.layout, .layout * {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg);
}

/* floating-sparkle layer: injected by fp-decor.js (FP.initSparkles, auto-run).
   Glyphs rise from below the viewport and fade; pointer-events:none so they
   never block clicks. opacity is fully keyframe-driven (the JS does not set it
   inline) so the fade curve stays consistent across particles. */
.fp-sparkle-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998; /* under the cursor trail (99999), over page content */
    overflow: hidden;
}
.fp-sparkle-layer span {
    position: absolute;
    bottom: -24px;
    color: #f777aa;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    animation-name: fp-sparkle-rise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform, opacity;
}
@keyframes fp-sparkle-rise {
    0%   { transform: translateY(0) scale(0.8); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-105vh) scale(1.1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sticker,
    .marquee__track,
    .pill-link {
        animation: none !important;
        transition: none !important;
    }
    /* sparkles are motion; kill the layer entirely under reduced-motion even
       if it was somehow injected. */
    .fp-sparkle-layer { display: none !important; }
}

@media (max-width: 800px) {
    .sticker { display: none; }
}
