/* The hidden light/dark switch (owner's design, 2026-10-07): a tap on a
   .mode-switch word flips the main background on every page
   (mode-switch.js, which lists the words). One copy for all of them,
   linked in the page's <head> so the gold never arrives late.

   No pointer and a quick double tap doesn't select the word. Its own click
   feel (owner, 2026-10-08: "too dry"): pressed it shrinks and darkens, let
   go it pops with a short gold glow (tap.js's square ripple doesn't suit a
   word). In dark mode the word is the site's gold at 60% (owner's choice).
   inline-block: scale doesn't work on inline text */
.mode-switch {
    display: inline-block;
    -webkit-user-select: none;
    user-select: none;
    transition: color 0.4s ease, scale 0.12s ease, filter 0.12s ease;
}

/* A title that starts at the left, next to BACK (a page's title, a
   business's name): it grows from there, so its own box never cuts the
   pop's first letters */
.marquee-line .mode-switch,
.business-name .mode-switch {
    transform-origin: left center;
}

.mode-switch.pressing {
    scale: 0.92;
    filter: brightness(0.8);
}

.mode-switch.pop {
    animation: modePop 0.45s ease;
}

/* The pop's glow is gold; a title in a colour of its own sets
   --switch-glow (PRIVACY's red, privacy.html) */
@keyframes modePop {
    0% { scale: 0.92; }
    50% { scale: 1.08; text-shadow: 0 0 18px var(--switch-glow, rgba(255,215,0,0.6)), 0 2px 10px rgba(0,0,0,0.6); }
    100% { scale: 1; }
}

@media (prefers-color-scheme: dark) {
    .mode-switch {
        color: rgba(255,215,0,0.6);
    }
}

html[data-mode="light"] .mode-switch {
    color: #fff;
}

html[data-mode="dark"] .mode-switch {
    color: rgba(255,215,0,0.6);
}
