/*@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');*/

@font-face {
    font-family: 'Futura PT Medium';
    src: 
        url('/assets/fonts/FuturaPT-Medium.woff2') format('woff2'),
        url('/assets/fonts/FuturaPT-Medium.woff') format('woff'),
        url('/assets/fonts/FuturaPT-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: bold;
    font-display: auto;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('/assets/fonts/ProximaNova-Regular.woff2') format('woff2'),
         url('/assets/fonts/ProximaNova-Regular.woff') format('woff'),
         url('/assets/fonts/ProximaNova-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: auto;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('/assets/fonts/ProximaNova-Semibold.woff2') format('woff2'),
         url('/assets/fonts/ProximaNova-Semibold.woff') format('woff'),
         url('/assets/fonts/ProximaNova-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: auto;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('/assets/fonts/ProximaNova-Bold.woff2') format('woff2'),
         url('/assets/fonts/ProximaNova-Bold.woff') format('woff'),
         url('/assets/fonts/ProximaNova-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: auto;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('/assets/fonts/ProximaNova-Extrabld.woff2') format('woff2'),
         url('/assets/fonts/ProximaNova-Extrabld.woff') format('woff'),
         url('/assets/fonts/ProximaNova-Extrabld.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: auto;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('/assets/fonts/ProximaNova-Black.woff2') format('woff2'),
         url('/assets/fonts/ProximaNova-Black.woff') format('woff'),
         url('/assets/fonts/ProximaNova-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: auto;
}

/* Branding Colors */
:root {
    --fws-red: #ff4040;
    --fws-red-galaxy: #D31C3E;
    --fws-green: #43e085;
    --fws-green-light: #44C441;
    --fws-success: #43e085; /* semantic "success" green — no theme remaps it */
    --fws-blue: #404dff;
    --fws-blue-dark: #2b6ad9;
    --fws-new-gray: #1a1a1a;
    --fws-new-gray-dark: #141414;

    --fws-white: #fff;
    --fws-black: #000;

    /* The full wordmark's ink. LUMI serves the logo tinted to this value (see
       sys/parts/navbar.php and assets/js/localSettings.js); the black & white
       family keeps black or white, a colour palette sets it to its accent. */
    --fws-logo: #000000;

    /* UI */
    --fws-accent: #ffdd18;
    --fws-glow: rgba(67, 224, 133, 0.3); /* accent glow — colour themes remap it */
    --fws-border: #333;
    --fws-bg-hover: #2a2a2a;
    --fws-disabled: #555;
    --fws-toggle-off: #ccc;
    --fws-bubble: #404dff; /* for the bubble effect on the homepage hero */
}

/*

--fws-new-gray and 
--fws-new-gray-dark
are de-facto background colors for most sections, replacing the old --fws-gray and --fws-gray-dark which are now only used for accents like borders and text in specific places (e.g. cart summary)
*/

/* ══════════════════════════════════════════════════════════════════
   Theme switch transition (shared engine)
   ══════════════════════════════════════════════════════════════════
   Every theme lives in its own file under assets/css/themes/ and is swapped
   in/out by assets/js/localSettings.js. The JS adds this class on <html>
   around the swap so the recolour cross-fades instead of snapping; it is
   removed again a few ms after the new stylesheet has been applied.

   It lives here rather than in a theme file because it has to exist no
   matter which theme is loaded.
   ══════════════════════════════════════════════════════════════════ */
html.fws-theme-transitioning *,
html.fws-theme-transitioning *::before,
html.fws-theme-transitioning *::after {
    transition:
        background-color 0.4s ease,
        color            0.4s ease,
        border-color     0.4s ease,
        fill             0.4s ease,
        opacity          0.4s ease !important;
}

/* The navbar/hero logos are cross-faded by the same JS, in both directions */
#fws-logo-desktop,
#fws-hero-logo {
    transition: opacity 0.35s ease;
}

/* ══════════════════════════════════════════════════════════════════════
   Font Awesome icons — vertical alignment
   ══════════════════════════════════════════════════════════════════════
   FA glyphs are characters from a webfont, not pictures: in an inline
   context (a plain <button>/<a> with the Tailwind 1.5em line-height) the
   1em icon box is baseline-aligned, so it hangs ~4px above the line's
   optical centre. `middle` centres it. Inside flex/grid parents the icon
   is already a centred item and the glyph is optically centred in its em
   box, so nothing else is needed — do NOT add a translateY nudge here,
   it reads low. (The inline SVGs this replaced had a square viewBox, so
   they centred themselves in both cases; that is why this is only needed
   now.)
   ══════════════════════════════════════════════════════════════════════ */
.fa,
.fa-solid,
.fa-brands,
.fa-classic,
.fas,
.fab {
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════════
   Page shell — sticky footer
   ══════════════════════════════════════════════════════════════════════
   body is a column flex container (declared in the base layer of
   sys/parts/head.php). On a page shorter than the viewport something has to
   absorb the leftover height, or the footer floats up into the middle of the
   screen — which is what happened on /about/branding.

   Two absorbers, because the pages are not all shaped the same:
     - `main`        the pages that have one (about/*, auth/*, game)
     - .fws-footer   the pages that do not (index, shop, cart)

   `flex: 1 0 auto` = grow into the free space, never shrink below the content,
   so a page that is already taller than the viewport lays out exactly as before.

   NOTE: everything the pages emit after the footer (the cog button, the settings
   panel, the devtip widget) is `position: fixed`, so it stays out of flow and
   cannot add height below the footer.
   ══════════════════════════════════════════════════════════════════════ */

main {
    flex: 1 0 auto;
}

.fws-footer {
    margin-top: auto;
}

body {
    font-family: 'Proxima Nova', sans-serif;
    font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════════════
   Untranslated text — hidden until it is translated, once per page
   ══════════════════════════════════════════════════════════════════════
   `l10n-pending` is added by an INLINE script in sys/parts/head.php and removed
   by assets/js/l10n.js after its first `translate()`. It exists because the
   server writes each `data-l10n` element's text as the literal in the page's
   markup — the body is never server-translated, only `<title>` and the meta
   description are — so those nodes are briefly in the wrong language.

   `visibility`, NOT `display`. The nodes keep their box, so revealing them
   cannot reflow the page underneath the reader; `display: none` would collapse
   every one of them and then push the whole layout down when they came back.

   IT IS NOT A SKELETON AND DOES NOT NEED TO BE. The tree the server already had
   in memory is inlined in the page (see head.php), so the translate is
   SYNCHRONOUS and this class is removed in the same tick the nodes are parsed.
   There is no visible skeleton because there is no visible gap — this hides a
   window that should not exist, and is the insurance for the day it does.

   A visitor without JavaScript never gets the class and never sees this rule do
   anything, which is the correct outcome: their untranslated text is all they
   were ever going to get, and it is better than a blank page. */
html.l10n-pending [data-l10n],
html.l10n-pending [data-l10n-aria-label] {
    visibility: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Futura PT Medium', sans-serif;
}

/* Font helpers */
.fws-font-title {
    font-family: 'Futura PT Medium', sans-serif;
    font-weight: 500;
}

.fws-font-desc {
    font-family: 'Proxima Nova', sans-serif;
    font-weight: 400;
}

.diagonal-cut {
    clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 5rem;
    width: auto;
    object-fit: contain;
}

/* Hero section */
.fws-hero {
    background-image: url('../images/hero.png');
    background-size: cover;
    background-position: center;
}

/* Hero used as a page background instead of a section.
   The artwork is black + white and is tinted by --fws-new-gray-dark through
   background-blend-mode: lighten (each palette in assets/css/themes/ sets that
   colour and the blend), which keeps its white shape white and only lifts the
   black areas to the theme colour. Fixed so it stays put while the page
   scrolls, and behind the content. */
.fws-hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--fws-new-gray-dark);
    background-blend-mode: lighten;
}

/* Navbar */
.fws-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* ABOVE `.shop-searchbar` (105), and that is the whole point of the value.
       The bar's menus are painted INSIDE this stacking context, so whatever
       this element loses to, its menus lose to as well — with the bar at 105
       the search bar sat over every dropdown on the shop pages. A theme could
       not fix it from inside (a descendant's z-index is capped by its nearest
       positioned ancestor), so the fix is the number here. See
       .fws-nav-afterglow for what moved out to keep the search bar above the
       bar's glow. */
    z-index: 110;
    font-family: 'Proxima Nova', sans-serif;
    font-weight: 600!important;
}

/* The navbar's afterglow — the 20px invert fade under the bar.
   IT IS ITS OWN ELEMENT AND NOT `.fws-nav::after`. A pseudo-element is painted
   inside the navbar's stacking context, so once the navbar was raised to 110
   the glow would rise with it and paint OVER `.shop-searchbar` (105) — an
   inverted, i.e. light, band across the top of the black search bar. As a
   root-level fixed box at z-index 99 it keeps the rank it had when the search
   bar outranked the bar outright: behind the search bar, above the page.
   `top: 5rem` is the navbar's own `h-20`, which is fixed at every breakpoint. */
.fws-nav-afterglow {
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    height: 20px;
    backdrop-filter: invert(1) grayscale(1);
    -webkit-backdrop-filter: invert(1) grayscale(1);
    /* Grayscale prevent invert from inverting images that are not white/black, like the logo */
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0));
    z-index: 99;
}

/* Dropdown styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: var(--fws-new-gray);
    border: 1px solid var(--fws-border);
    border-radius: 0.5rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
}

.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--fws-white);
    text-decoration: none;
    display: block;
    transition: background 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--fws-bg-hover);
}

/* Modal styles */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--fws-new-gray);
    border: 1px solid var(--fws-border);
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Cart badge */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--fws-red);
    color: var(--fws-white);
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* FWS Button - Angled sides */

/* THE CUT IS A VARIABLE AND NOT A LITERAL inside the clip-path, because a row of
   these has to STEP each button by exactly the same 15px to interlock the slants
   into one continuous run — see `.cart-footer-actions` in cart.css, which reads
   this value rather than repeating the number. A second hardcoded 15px there
   would be a number that has to be changed in two files when the shape changes,
   and would read as correct after only one of them was updated. */
.fws-button {
    --fws-button-cut: 15px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    color: var(--fws-new-gray);
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-decoration: none;
    position: relative;
    clip-path: polygon(var(--fws-button-cut) 0, 100% 0, calc(100% - var(--fws-button-cut)) 100%, 0 100%);
    background: var(--fws-white);
    border: 1px solid var(--fws-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    cursor: pointer;
}

.fws-button:hover {
    background: var(--fws-white);
    border-color: var(--fws-white);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.fws-button:active {
    background: var(--fws-white);
    border-color: var(--fws-white);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.fws-button:disabled {
    background: var(--fws-disabled);
    border-color: var(--fws-disabled);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* Small variant — a compact footprint for inline actions, e.g. "Voir dans la
   boutique" on a profile's game rows.
   THE CUT SHRINKS WITH THE BUTTON. The slant's angle is atan(cut / height), and
   the default box is ~41px tall against a 15px cut (~20°). Keeping that 15px on
   a ~23px-tall button would read visibly steeper than every other button on the
   site, so the cut scales down with it — 8px holds the same ~20°. */
.fws-button-small {
    --fws-button-cut: 8px;

    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

/*
Colored variants 
*/

/* Success variant */

/* BLACK copy, not white. --fws-success is #43e085 and NOTHING remaps it, so
   this button is that same green in every theme — and white on it is about
   1.7:1, which is unreadable. General rule: a button that renders green
   carries black copy. (--fws-black is #111111 in Lumière+, so this still
   tracks the theme.) */
.fws-button-success {
    background: var(--fws-success);
    border-color: var(--fws-success);
    color: var(--fws-black);
}

.fws-button-success:hover {
    background: var(--fws-success);
    border-color: var(--fws-success);
    box-shadow: 0 0 20px rgba(67, 224, 133, 0.3);
}

.fws-button-success:active {
    background: var(--fws-success);
    border-color: var(--fws-success);
    box-shadow: inset 0 0 10px rgba(67, 224, 133, 0.4);
}

.fws-button-success:disabled {
    background: var(--fws-success);
    border-color: var(--fws-success);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* Danger variant */

.fws-button-danger {
    background: var(--fws-red-galaxy);
    border-color: var(--fws-red-galaxy);
    color: var(--fws-white);
}

.fws-button-danger:hover {
    background: var(--fws-red-galaxy);
    border-color: var(--fws-red);
    box-shadow: 0 0 20px rgba(211, 28, 62, 0.3);
}

.fws-button-danger:active {
    background: var(--fws-red-galaxy);
    border-color: var(--fws-red);
    box-shadow: inset 0 0 10px rgba(211, 28, 62, 0.4);
}

.fws-button-danger:disabled {
    background: var(--fws-red-galaxy);
    border-color: var(--fws-red);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* Info variant */

.fws-button-info {
    background: var(--fws-blue-dark);
    border-color: var(--fws-blue-dark);
    color: var(--fws-white);
}

.fws-button-info:hover {
    background: var(--fws-blue-dark);
    border-color: var(--fws-blue);
    box-shadow: 0 0 20px rgba(43, 106, 217, 0.3);
}

.fws-button-info:active {
    background: var(--fws-blue-dark);
    border-color: var(--fws-blue-dark);
    box-shadow: inset 0 0 10px rgba(43, 106, 217, 0.4);
}

.fws-button-info:disabled {
    background: var(--fws-blue-dark);
    border-color: var(--fws-blue);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* Darker variant */
.fws-button-dark {
    background: var(--fws-new-gray-dark);
    border-color: var(--fws-new-gray-dark);
    color: var(--fws-white);
}

.fws-button-dark:hover {
    background: var(--fws-new-gray-dark);
    border-color: var(--fws-new-gray);
    box-shadow: 0 0 20px rgba(26, 26, 26, 0.3);
}

.fws-button-dark:active {
    background: var(--fws-new-gray-dark);
    border-color: var(--fws-new-gray);
    box-shadow: inset 0 0 10px rgba(26, 26, 26, 0.4);
}

.fws-button-dark:disabled {
    background: var(--fws-new-gray-dark);
    border-color: var(--fws-new-gray);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* White variant */
.fws-button-white {
    background: var(--fws-white);
    border-color: var(--fws-white);
    color: var(--fws-new-gray);
}

.fws-button-white:hover {
    background: var(--fws-white);
    border-color: var(--fws-white);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.fws-button-white:active {
    background: var(--fws-white);
    border-color: var(--fws-white);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4);
}

.fws-button-white:disabled {
    background: var(--fws-white);
    border-color: var(--fws-white);
    color: var(--fws-new-gray);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}



/* Game showcase: allow coverflow side-cards to bleed beyond the container edge */
.game-showcase-swiper {
    overflow: visible;
}

/* Game showcase: center card emphasis */
.game-showcase-swiper .swiper-slide {
    transform: scale(0.84);
    opacity: 0.65;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.game-showcase-swiper .swiper-slide-active {
    transform: scale(1);
    opacity: 1;
}

.game-showcase-swiper .swiper-pagination-bullet {
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 9999px;
    background: var(--fws-white);
    opacity: 0.45;
}

.game-showcase-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Footer */
footer {
    font-family: 'Proxima Nova', sans-serif;
    font-weight: 600;
}

/* Social buttons (footer)
   ─────────────────────────────────────────────────────────────────────
   THE FOUR BUTTONS ARE ONE ROW (no longer a 2x2 block), so the row has to
   fit a phone without wrapping and without scrolling sideways: the tile is
   sized from ONE variable on .fws-social-grid (--fws-social-tile), which
   shrinks with the viewport, and every other dimension of the row — the
   tile's height, the icon's box, the gap — is derived from it. */
.fws-social-btn {
    width: var(--fws-social-tile);
    height: calc(var(--fws-social-tile) * .886);   /* the tile's 7:6.2 shape */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fws-white);
    color: var(--fws-black);
    text-decoration: none;
    border-radius: 0;
    /* The zoom grows UP off the tile's own bottom edge. A row has no "corner
       facing away from the block" for its middle tiles the way the 2x2 grid
       did — that is exactly what the old per-tile transform-origins encoded —
       so all four share ONE origin and the whole row zooms predictably. */
    transform-origin: bottom center;
    transition: background 0.15s, color 0.15s, transform 0.2s ease;
}

/* The grid below is ONE skewed block, so everything inside it — the button
   tiles AND the brand marks on them — renders inside that slant. The TILES
   want it (they are the site's angled shapes, same language as .fws-button);
   the LOGOS do not. Skewing a brand mark is forbidden by the guidelines of
   every network in this row, and a HALF-corrected skew is worse than either
   extreme: it reads as italic typesetting.
   So the icon carries the EXACT counter-skew, read from the same variable the
   grid is built from (.nav-about-menu does it this way too) — never a second
   hardcoded number. This used to be `skewX(10deg)` against a -20deg grid, so
   every logo leaned ~10.6deg.
   THE NUDGE RIDES ON THE ICON, not on the tile: it shifts the LOGO inside its
   own button, which is what it is for. `--fws-social-nudge` is a LENGTH such
   as `10px` / `-6px`, declared per button in the :nth-child block below; the
   0px default is why nothing moves today. It has to carry a unit — a bare
   number would invalidate the WHOLE transform and take the counter-skew with
   it, tipping the logo straight back into the italic state this rule exists
   to prevent. (The skew's own translate is still a clean horizontal shift:
   skewX has no rotation component, so x moves sideways on screen.) */
.fws-social-btn svg,
.fws-social-btn i {
    transform: translateX(var(--fws-social-nudge, 0px)) skewX(calc(-1 * var(--fws-social-slope)));
    /* 5/7 of the tile, the icon-to-tile ratio the 7rem square already used */
    width: calc(var(--fws-social-tile) * .714);
    height: calc(var(--fws-social-tile) * .714);
    font-size: calc(var(--fws-social-tile) * .714);
    flex-shrink: 0;
}

/* Font Awesome brand glyphs carry their own advance width (Discord = 1.25em,
   YouTube = 1.125em). A box pinned to the icon's nominal size would let them
   bleed out to the right of the button, so the `i` hugs its glyph and the flex
   centring works. */
.fws-social-btn i {
    width: auto;
}

.fws-social-btn:hover {
    /* nothing to repeat here any more: the nudge lives on the icon, so a plain
       scale is enough and it cannot be dropped on hover. */
    transform: scale(1.12);
    z-index: 1;
}

/* ONE LINE PER BUTTON — its own horizontal nudge, in px: a LENGTH, so `-6px`
   and `10px` both work. Order is the row's: Discord, Twitch, YouTube, X.
   Anything left at 0px sits exactly where the row puts it. */
.fws-social-grid a:nth-child(1) { --fws-social-nudge: -2.5px; }
.fws-social-grid a:nth-child(2) { --fws-social-nudge: 0px; }
.fws-social-grid a:nth-child(3) { --fws-social-nudge: 0px; }
.fws-social-grid a:nth-child(4) { --fws-social-nudge: 0px; }

.fws-social-grid {
    /* ONE source of truth for the slant: the grid leans by it, .fws-social-btn
       svg/i lean by its negation. Change this and both move together. */
    --fws-social-slope: -20deg;

    /* THE ROW'S ONE SIZE, and the reason the four fit on one line: four tiles
       + three gaps + the slant's own bleed (a skewed row is height x tan20deg
       wider than its box) have to fit the section's padding box at every
       width, so the tile tracks the viewport and is capped at 6.5rem. That cap
       is just a legibility knob: anything up to ~8rem still fits at every
       width (the row's box is 4 x tile + 3 x gap, plus ~0.32 x tile of bleed),
       so raise it to scale the whole row up, or drop it to 5.5rem for the
       tighter version. 17vw reaches the cap at ~610px, i.e. tablets and up. */
    --fws-social-tile: clamp(3rem, 17vw, 6.5rem);
    --fws-social-gap: clamp(.4rem, 1.1vw, 1rem);

    display: flex;
    flex-wrap: nowrap;               /* the row is one line, by definition */
    gap: var(--fws-social-gap);
    transform: skewX(var(--fws-social-slope));
}

/* Settings modal */
.fws-settings-modal {
    display: none;
}

.fws-settings-modal.is-open {
    display: block;
}

.fws-settings-panel {
    position: fixed;
    bottom: 4.25rem;
    left: 1.25rem;
    z-index: 300;
    width: 220px;
    background: var(--fws-white);
    color: var(--fws-black);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-family: monospace;
    font-size: 0.85rem;
}

.fws-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: var(--fws-black);
    color: var(--fws-white);
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.fws-settings-header button {
    background: none;
    border: none;
    color: var(--fws-white);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}

.fws-settings-header button:hover {
    color: var(--fws-accent);
}

.fws-settings-body {
    padding: 0.65rem 0.75rem;
}

.fws-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 1rem;
}

.fws-settings-label {
    font-family: monospace;
    user-select: none;
}

/* Toggle switch (square) */
.fws-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 2.2rem;
    height: 1.15rem;
    background: var(--fws-toggle-off);
    border-radius: 0;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.fws-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(1.15rem - 4px);
    height: calc(1.15rem - 4px);
    background: var(--fws-white);
    transition: left 0.15s;
}

.fws-toggle:checked {
    background: var(--fws-black);
}

.fws-toggle:checked::after {
    left: calc(2.2rem - 1.15rem + 2px);
}

/* Bottom-left cog button */
.fws-cog-btn {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 200;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--fws-white);
    color: var(--fws-black);
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: box-shadow 0.2s ease;
}

.fws-cog-btn:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.fws-cog-btn svg,
.fws-cog-btn i {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
}

/* Star rating: fill driven by --rating CSS variable (0%–100%) */
.star-rating {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
    align-self: flex-start;
}

.star-rating::after {
    content: '★★★★★';
    color: rgba(255,255,255,.3);
}

.star-rating::before {
    content: '★★★★★';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--rating, 0%);
    overflow: hidden;
    color: var(--fws-white);
}

/* 8-bit mascot widget wrapper
   ─────────────────────────────
   --widget-bottom / --widget-right : move the whole widget (Blanche + bubble)
   --bubble-offset-x / --bubble-offset-y : nudge ONLY the bubble (+ = right/down)
   ───────────────────────────── */
.pixel-bubble-widget {
    /* ↓ move the whole widget */
    --widget-bottom: 5px;
    --widget-right:  1.5rem;
    /* ↓ nudge only the bubble */
    --bubble-offset-x: -3.5rem;
    --bubble-offset-y: -1.25rem;

    position: fixed;
    bottom: var(--widget-bottom);
    right:  var(--widget-right);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* hidden until JS fills the tip text */
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

.pixel-bubble-char {
    width: 90px;
    height: auto;
    image-rendering: pixelated;
    display: block;
    margin-right: 0.25rem;
    filter:
        drop-shadow(0 0 2px var(--fws-white))
        drop-shadow(0 0 4px var(--fws-white));
}

/* 8-bit cartoon text bubble */
.pixel-bubble {
    position: relative;
    bottom: auto;
    right: auto;
    z-index: auto;
    /* hidden state: offset + nudged down 8px */
    transform: translate(var(--bubble-offset-x), calc(var(--bubble-offset-y) + 8px));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: var(--fws-bubble);
    color: var(--fws-white);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem 1rem;
    min-width: 160px;
    max-width: 220px;
    image-rendering: pixelated;
    border-radius: 6px;
    /* inset highlight/shadow */
    box-shadow:
        inset 4px  4px 0 0 rgba(255,255,255,0.25),
        inset -4px -4px 0 0 rgba(0,0,0,0.35);
    cursor: default;
    user-select: none;
    text-transform: uppercase;
    /* Pixel-art white border that follows the shape incl. tail */
    filter:
        drop-shadow( 1.5px  0px   0 var(--fws-white))
        drop-shadow(-1.5px  0px   0 var(--fws-white))
        drop-shadow( 0px    1.5px 0 var(--fws-white))
        drop-shadow( 0px   -1.5px 0 var(--fws-white));
}

.pixel-bubble.is-visible {
    transform: translate(var(--bubble-offset-x), var(--bubble-offset-y));
    opacity: 1;
    pointer-events: auto;
}

/* Tail: small square rotated 45° peeking below bottom-right */
.pixel-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 20px;
    width: 0;
    height: 0;
    background: none;
    transform: none;
    border-radius: 0;
    /* Right triangle: vertical right edge, hypotenuse going bottom-left */
    border-top: 12px solid var(--fws-bubble);
    border-left: 14px solid transparent;
}

.pixel-bubble::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.08) 3px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
}

/* =============================================
   Swiper navigation buttons (global)
   ============================================= */
.swiper-button-next,
.swiper-button-prev {
    color: var(--fws-black)!important;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--fws-white)!important;
}
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: .85rem;
    font-weight: 900;
}
.swiper-button-next svg { transform: scale(0.75); }
.swiper-button-prev svg { transform: scale(-0.75) !important; }

/* ── The list menus on the bar — one panel, three occupants ──────────
   The account, language and cart menus share the theme dropdown's chrome: the
   same rounded panel, the same soft shadow and the same little caret pointing
   at the trigger, so every menu on the bar opens in one shape instead of four.
   The theme dropdown keeps its own body — swatches and slider, see
   .nav-theme-dropdown below — and the list menus take the chrome from here.

   THE SURFACE IS TOKENISED, not hardcoded, so the two black & white themes
   repaint all of it from one place (themes/dark-plus.css, themes/light-plus.css)
   exactly as they do for the theme dropdown. The colour palettes do not restyle
   the theme dropdown at all, so they get the same light panel here for free. */
.nav-panel {
    --np-bg:        #ffffff;
    --np-text:      #111111;
    --np-text-soft: #666666;
    --np-line:      rgba(0, 0, 0, .12);
    --np-hover:     #f0f0f0;
    --np-avatar:    rgba(0, 0, 0, .08);

    background: var(--np-bg);
    border: 0;
    border-radius: 12px;
    /* Vertical padding only: the rows stay full-bleed so a hover tint reaches
       the panel's sides, and 6px keeps their square corners clear of the 12px
       curve at the top and bottom. */
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    color: var(--np-text);
    font-family: 'Proxima Nova', sans-serif;
    z-index: 150;
}

/* The caret — the same 7px triangle the theme dropdown draws, in the panel's
   own colour so it disappears into the surface in every theme. */
.nav-panel::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 13px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--np-bg);
}

/* THE ROWS INSIDE THE THREE PANELS, recoloured for a light surface.
   The markup keeps its Tailwind classes (text-white, border-zinc-700, …), which
   is why these rules carry `!important`: the black & white themes repaint those
   very classes with `!important` of their own, and an ID-scoped selector is what
   outranks them — a bare `.nav-panel .text-white` would tie and lose to the
   theme file, which loads after this one. */
:is(#languageDropdown, #userDropdown, #cartDropdown) .text-white { color: var(--np-text) !important; }
:is(#languageDropdown, #userDropdown, #cartDropdown) .text-zinc-400,
:is(#languageDropdown, #userDropdown, #cartDropdown) .text-zinc-600 { color: var(--np-text-soft) !important; }
:is(#languageDropdown, #userDropdown, #cartDropdown) .hover\:text-white:hover,
:is(#languageDropdown, #userDropdown, #cartDropdown) .hover\:text-gray-300:hover { color: var(--np-text) !important; }
:is(#languageDropdown, #userDropdown, #cartDropdown) .hover\:bg-zinc-800:hover { background-color: var(--np-hover) !important; }
:is(#languageDropdown, #userDropdown, #cartDropdown) .border-zinc-700 { border-color: var(--np-line) !important; }
:is(#languageDropdown, #userDropdown, #cartDropdown) .bg-zinc-800 { background-color: var(--np-avatar) !important; }

/* The cart's empty-state CTA is a .fws-button, whose default fill is
   --fws-white — invisible on this panel in the default palette, where the
   button is white and so is the panel. The themes that already invert the
   button (Sombre+, Lumière+, the colour palettes) set it with `!important` and
   still win here, which is what we want. */
.nav-panel .fws-button {
    background: var(--np-text);
    border-color: var(--np-text);
    color: var(--np-bg);
}
.nav-panel .fws-button:hover {
    background: var(--np-text);
    border-color: var(--np-text);
    box-shadow: 0 0 20px rgba(0, 0, 0, .25);
}

/* NAVBAR LIGHT TOGGLE */

/* ── Theme slider dropdown ─────────────────────────────── */
.nav-theme-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: #fff;
    border-radius: 12px;
    padding: 14px 18px 12px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    z-index: 150;
}
.nav-theme-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 13px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #fff;
}
.nav-theme-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-theme-slider-row svg,
.nav-theme-slider-row i { flex-shrink: 0; color: #111; font-size: 18px; }
/* The <input> is the HIT AREA, not the visible line. A 3px-tall range input is
   almost impossible to click, and the thumb overflows its box, so the input
   stays tall and transparent and the hairline is drawn by the TRACK
   pseudo-elements instead — it still reads as a thin line but grabs like a
   slider. `touch-action: none` stops a drag on it from scrolling the page. */
#nav-theme-slider {
    -webkit-appearance: none; appearance: none;
    flex: 1;
    height: 22px;
    margin: 0;
    background: transparent;          /* the track paints the line, not the input */
    outline: none;
    cursor: pointer;
    touch-action: none;
}
#nav-theme-slider:focus-visible {
    outline: 2px solid #111;
    outline-offset: 4px;
}
#nav-theme-slider::-webkit-slider-runnable-track {
    height: 3px;
    background: #111;
    border-radius: 2px;
}
#nav-theme-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%; background: #111;
    cursor: pointer;
    margin-top: -7.5px;               /* centre the 18px thumb on the 3px track */
    transition: transform .15s;
}
#nav-theme-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
#nav-theme-slider::-moz-range-track {
    height: 3px;
    background: #111;
    border-radius: 2px;
}
#nav-theme-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%; background: #111;
    cursor: pointer; border: none;
}
.nav-theme-labels {
    display: flex;
    /* the slider input carries ~10px of transparent hit area below its track,
       so the labels sit closer to keep the same visual gap */
    margin-top: 2px;
    font-size: 10px;
    color: #666;
    font-family: 'Proxima Nova', sans-serif;
    font-weight: 600;
    letter-spacing: .02em;
}
.nav-theme-labels span { flex: 1; }
.nav-theme-labels span:nth-child(2) { text-align: center; }
.nav-theme-labels span:nth-child(3) { text-align: right; }

/* ── About nav: split control ────────────────────────────
   The "À propos" label navigates to /about/; the chevron beside it opens the
   section's menu. Two controls with two different jobs ON PURPOSE — a single
   target that both navigated and opened a menu was ambiguous, and clicking the
   arrow bounced the reader straight to /about/.

   The menu is toggled by JS (toggleAboutDropdown) and NOT by :hover. A menu
   that opens on hover cannot also be click-toggled: the click would close it
   while the pointer is still inside the item, and it would only come back after
   the pointer left and returned. */
.nav-about-btn {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: color .15s;
}

.nav-about-btn i {
    display: block;
    transition: transform .2s;
}

/* the chevron flips to point up while the menu is open */
.nav-about-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* ── About menu panel ────────────────────────────────────
   An INVERTED block — white fill, black copy — like .fws-settings-panel and the
   about page's "Rejoignez-nous" panel, cut into a parallelogram so it wears the
   site's shape instead of being another rounded box.

   POSITIONING is here rather than in utilities because it has to do two things
   at once: clear the fixed navbar entirely (5rem tall, with the control centred
   in it) and hang CENTRED under the label + chevron pair. The 1.75rem is the
   gap from the control's bottom to the navbar's bottom edge, so the panel — and
   therefore its shadow — starts below the black bar instead of on top of it.

   THE SHADOW LIVES ON THIS WRAPPER, NOT ON THE BUTTONS: the shadow has to be
   painted from OUTSIDE the cut shapes, otherwise the filter's own output is
   what gets traced. On the parent, ONE drop-shadow traces every slanted button
   at once — which is also why the buttons carry no shadow of their own.
   (Same trap as the clipped .lg-card in login.css: a `box-shadow` would be cut
   off with the shape.) Hence a drop-shadow FILTER, on this wrapper. */
#aboutDropdown {
    top: calc(100% + 1.75rem);
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .55));
}

/* ── The menu: a STAIRCASE of buttons ────────────────────
   Each item is its OWN shape. There is no shared panel and no skewed
   background: every link is cut with `.fws-button`'s own path (MIRRORED — the
   top edge leads on the LEFT) and carries its own white fill, so the menu is
   built out of the site's button instead of a near-miss of it.

   A per-shape cut is also what makes the slope safe HERE, where the old
   single-panel version kept failing: each button is ONE fixed 2.5rem box — the
   same ~41px-tall box `.fws-button` cuts 15px out of — so the angle is the
   DA's by construction and cannot flatten, because nothing about the shape
   depends on how many links there are. (A 15px offset spread over a panel that
   GROWS is a shallower cut each time; a 15px offset on a fixed box is not.)

   The staircase comes from each item's own index: navbar.php writes
   `--about-menu-i`, so a button is moved over one step further than the one
   above it and the count drives the whole run — no nth-child rules.
   THE STEP EQUALS THE CUT, which is the whole trick: one button's BOTTOM-LEFT
   corner lands exactly on the next button's TOP-LEFT corner, so the run's left
   edge is ONE straight line at the shape's own angle instead of a staircase of
   disconnected edges. Move the step off the cut and the slope breaks into steps.
   The rows are all the SAME WIDTH too (the widest label's), so each button's
   BOTTOM-RIGHT corner lands on the next one's TOP-RIGHT corner as well: both
   edges are then continuous and the whole run reads as ONE parallelogram
   subdivided by the black rules, not as a pile of separate lozenges. */
.nav-about-menu {
    /* COLOURS — an INVERTED block (white fill, black copy) like
       .fws-settings-panel, the footer and the join panel, so it is built from
       its own tokens rather than var(--fws-white)/var(--fws-black) directly:
       a theme repaints the whole dropdown by overriding these, and nothing
       inside needs a rule of its own.
       The rule under each label defaults to the COPY colour (the mock's black
       hairline on the white panel). A theme that darkens the surface swaps it
       for --fws-border instead — in every palette that token is the SAME hue as
       the surface, just lighter, which is what the divider is meant to be. */
    --about-menu-bg:   var(--fws-white);
    --about-menu-text: var(--fws-black);
    --about-menu-rule: var(--about-menu-text);

    --about-menu-item-h: 2.5rem;     /* each button's height — .fws-button's own */
    --about-menu-cut: 15px;          /* .fws-button's cut, over that same height */
    --about-menu-pad: 2rem;          /* .fws-button's horizontal padding */
    /* the step IS the cut — see the corner alignment above */
    --about-menu-step: var(--about-menu-cut);
    --about-menu-slide: 1rem;       /* how far hover pushes a button over */
    --about-menu-links: 1;           /* set by navbar.php from its link array */

    /* A row is pushed right by `index x step` and never made wider, so the run
       reaches `(links - 1) x step` past the box: reserving exactly that on the
       right makes the BOX the whole run's bounding box, which is what keeps
       `translateX(-50%)` on the wrapper centring the shape. */
    padding-right: calc((var(--about-menu-links) - 1) * var(--about-menu-step));

    display: flex;
    flex-direction: column;          /* a stack of shapes, one per link */
    /* NO align-items here on purpose: the default STRETCH gives every row the
       same width — the widest label's — which is what lines the right-hand
       corners up as well as the left. */
    color: var(--about-menu-text);
}

/* THE BUTTON: `.fws-button`'s cut, fill and padding, worn by the link itself.
   The bottom border is painted in the element's own box and THEN sliced by the
   cut, so its two ends land in the slanted edges and it reads as a rule under
   the label — the mock's black line — with no extra element.
   NO width here: the stretched row width (the widest label's) is what every
   button uses, so the run's two ends agree with the corners above and below.
   `--about-menu-i` is the link's 0-based index (written by navbar.php), and the
   move-over is a TRANSFORM — a margin would eat into the stretched width and
   leave the rows different sizes, which is exactly what breaks the alignment. */
.nav-about-menu a {
    display: flex;
    align-items: center;
    height: var(--about-menu-item-h);
    padding: 0 var(--about-menu-pad);
    transform: translateX(calc(var(--about-menu-i, 0) * var(--about-menu-step)));
    background: var(--about-menu-bg);
    color: inherit;
    font-family: 'Proxima Nova', sans-serif;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;             /* labels must stay on one line */
    border-bottom: 1px solid var(--about-menu-rule);
    clip-path: polygon(0 0, calc(100% - var(--about-menu-cut)) 0, 100% 100%, var(--about-menu-cut) 100%);
    transition: transform .2s cubic-bezier(.4, 0, .2, 1), color .15s;
}

/* The run ENDS on its last button: a rule under it would draw a line along the
   bottom edge of a shape that is already an edge. The border sits inside the
   box (border-box), so dropping it moves nothing — the corners above stay
aligned. */
.nav-about-menu a:last-child {
    border-bottom: 0;
}

/* hover slides the button further over, onto the right — the slide ADDS to the
   row's own offset rather than replacing it, or the row would jump back left.
   The label dims through the SPAN and `opacity`, NOT through a colour: a
   hardcoded rgba() here would be black-on-black the moment a theme repaints the
   surface underneath it. */
.nav-about-menu a:hover,
.nav-about-menu a:focus-visible {
    transform: translateX(calc(var(--about-menu-i, 0) * var(--about-menu-step) + var(--about-menu-slide)));
}

.nav-about-menu a:hover > span,
.nav-about-menu a:focus-visible > span {
    opacity: .55;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── The bell ────────────────────────────────────────────
   IT IS HERE AND NOT IN assets/css/notifications.css, and that placement is
   the point: the bell is rendered by sys/parts/navbar.php, so it is in the
   DOCUMENT of every page of the site, while notifications.css is linked only
   by /user/@<you>/notifications. Rules filed next to the inbox would leave
   every other page drawing an unstyled `<i>` and a badge positioned against
   nothing — which is exactly the "markup that exists and nothing styles it"
   gap this repo keeps hitting, just with the stylesheet on the wrong side of
   it.

   The page's OWN styles — the rows, the unread edge, the empty state — stay in
   notifications.css, because that page is the only thing that draws them. The
   split is by WHERE IT RENDERS, not by which feature it belongs to. */
.nav-bell {
    /* A DARKER HOVER THAN THE NAV ICONS BESIDE IT. Those sit on the black
       navbar; this one is inside a `bg-zinc-900` panel over it, and the
       navbar's own hover colour is nearly invisible on that background — the
       button appears to do nothing on press. */
    text-decoration: none;
}

.nav-bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px;
    pointer-events: none;
}

/* `hidden` IS THE ZERO STATE, and it beats the flex above it because an
   attribute selector is the strongest thing in this block. The cart badge two
   controls to the left has the same rule and the same reason: the badge is
   `display: flex` so it can hold a number, and the zero case is the server's
   `hidden` attribute rather than a class the server would have to also decide
   to set. */
.nav-bell-badge[hidden] {
    display: none;
}

/* ── The dropdown holds two groups ───────────────────────
   1. the COLOUR MODE swatches (one chip per file in assets/css/themes/),
   2. the original monochrome switch — the Sombre+ / Défaut / Lumière+ slider.
   The switch is only revealed while the black & white theme is the active
   one (the two groups are exclusive), which is toggled from
   syncThemeControls() in assets/js/localSettings.js. */
.nav-theme-group + .nav-theme-group {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, .12);
}
.nav-theme-group-label {
    display: block;
    font-family: 'Proxima Nova', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #888;
}

/* 4 columns → two rows of four, like the mockup */
.nav-theme-swatches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
    margin-top: 10px;
}

/* Diagonal split chip: lighter tone top-left, darker bottom-right */
.fws-swatch {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sw-light) 0 50%, var(--sw-dark) 50% 100%);
    cursor: pointer;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}

.fws-swatch:hover {
    transform: scale(1.06);
}

/* The dropdown panel is white (or #e0e0e0 in Lumière+, #1a1a1a in Sombre+), so
   the selected ring is stated per theme — see themes/dark-plus.css /
   themes/light-plus.css. This is the default (white panel) treatment. */
.fws-swatch.is-active {
    border-color: #111;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .45);
}

.fws-swatch:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

/* Chip colours — keep in sync with the palettes in assets/css/themes/*.css */
.fws-swatch[data-theme="mono"]    { --sw-light: #e8e8e8; --sw-dark: #111111; }
.fws-swatch[data-theme="navy"]    { --sw-light: #4a6cb5; --sw-dark: #2c3f77; }
.fws-swatch[data-theme="violet"]  { --sw-light: #8b4ad6; --sw-dark: #5b21a8; }
.fws-swatch[data-theme="berry"]   { --sw-light: #c04a7d; --sw-dark: #8e2350; }
.fws-swatch[data-theme="brown"]   { --sw-light: #a8683f; --sw-dark: #7a4326; }
.fws-swatch[data-theme="olive"]   { --sw-light: #b09a2a; --sw-dark: #7a6a12; }
.fws-swatch[data-theme="forest"]  { --sw-light: #4e8a52; --sw-dark: #2f5d33; }
.fws-swatch[data-theme="emerald"] { --sw-light: #35a184; --sw-dark: #1f6b58; }

/* =============================================
   Phone field — a country picker beside a phone input
   (built by assets/js/phone.js; see API/src/core/Phone.js for the rule).

   SHARED, SO IT LIVES HERE. The same widget appears on /auth/register, which
   loads login.css, and on the settings pages, which load user.css — and neither
   of those files should have to know about it. The input inside keeps its own
   class and its own skin; this only says how the two sit together.

   A FLEX ROW, NOT A GRID: the picker is a fixed width and the number takes what
   is left, and min-width:0 is what stops a long number from pushing the picker
   off the card. */
.fws-phone {
    display: flex;
    gap: .5rem;
    align-items: stretch;
    min-width: 0;
    width: 100%;
}

/* The closed state reads "+33 France", so the dial code leads and the country
   name is what gets cut off when the box is tight.

   THE COLOURS ARE INHERITED RATHER THAN NAMED, because this selector sits on
   two pages with two different palettes and no shared token between them — a
   transparent box outlined in the text colour is right on both, and it stays
   right when either palette changes. */
.fws-phone > .fws-phone-country {
    flex: 0 0 auto;
    width: 8.5rem;
    padding: .5rem .6rem;
    font: inherit;
    font-size: .9rem;
    color: inherit;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 0;
    opacity: .9;
}

.fws-phone > input {
    flex: 1 1 auto;
    min-width: 0;
}

/* "That cannot be a number", said the same way the settings form already says
   it — see .up-input[aria-invalid] in user.css. The register page's skin
   (.lg-field) has no such rule, so it gets one from here. */
.fws-phone > input[aria-invalid="true"] {
    border-color: var(--fws-red);
}