        /* Hamburger drawn as 3 real CSS bars instead of the "☰" glyph. A font glyph's ink doesn't
           reliably center in its own line box across fonts/OSes -- that's why this kept needing
           per-button re-fixes (nav-hamburger had flex-centering already; nav-collapse-toggle
           didn't have ANY; neither ever solved the underlying glyph-metric issue). A real middle
           bar (this element itself) plus two pseudo-element bars above/below is pixel-exact
           regardless of font -- same fix category as the CSS-drawn +/- bars below (.qty-btn/
           .skill-adj-btn), solving the "keeps drifting off-center" class of bug at the root
           instead of per-component. */
        .hamburger-bars, .hamburger-bars::before, .hamburger-bars::after {
            content: "";
            display: block;
            width: 16px;
            height: 2px;
            background: currentColor;
            border-radius: 1px;
        }
        /* flex-shrink:0 as a defensive backstop -- the actual bug that made this render lopsided
           (middle bar 12px, top/bottom pseudo-bars still 16px) was the global button{padding:10px}
           rule shrinking the flex container's content box, so the real <span> (a flex child, thus
           shrinkable) got squeezed while its position:absolute ::before/::after (immune to flex
           sizing) stayed full width -- fixed at the source below by giving both hamburger buttons
           their own padding:0, same as .qty-btn already does. This stays too so the icon can't
           silently go lopsided again the next time padding changes on either button. */
        .hamburger-bars { position: relative; flex-shrink: 0; }
        .hamburger-bars::before, .hamburger-bars::after { position: absolute; left: 0; }
        .hamburger-bars::before { top: -5px; }
        .hamburger-bars::after { top: 5px; }

        /* ---- site-wide navigation: the ROOCDB-style left rail. Pinned/visible on desktop,
           off-canvas drawer (hamburger + backdrop) on mobile -- same responsive pattern the
           inventory sidebar used before, just promoted to be the app's actual page navigation. */
        .nav-hamburger {
            display: none;
            position: fixed;
            top: 16px;
            left: 16px;
            z-index: 40;
            width: 46px;
            height: 46px;
            padding: 0;
            border: none;
            border-radius: 14px;
            background: white;
            box-shadow: 0 4px 14px rgba(74,144,226,0.3);
            cursor: pointer;
            color: #3d78c2;
            align-items: center;
            justify-content: center;
        }
        .nav-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(20,40,70,0.35);
            z-index: 30;
        }

        /* Reserves the nav's real desktop width on #navMount (the empty placeholder each page's
           own markup wraps around the fetched partials/nav.html, see loadNav() in core/nav.js)
           so there's no layout shift once the real .site-nav (same 232px basis) gets injected
           inside it -- just a brief empty sidebar for a frame or two, not a jump. No visual
           effect on mobile, where body stops being a flex container entirely (see the
           max-width:1000px block below) and .site-nav becomes position:fixed regardless. */
        #navMount {
            flex: 0 0 232px;
        }

        .site-nav {
            flex: 0 0 232px;
            background: var(--skin-panel-bg);
            backdrop-filter: blur(var(--skin-panel-blur)) saturate(150%);
            -webkit-backdrop-filter: blur(var(--skin-panel-blur)) saturate(150%);
            border-right: 1px solid var(--skin-panel-border);
            box-shadow: 2px 0 20px var(--skin-panel-shadow);
            padding: 20px 14px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            position: sticky;
            top: 0;
            height: 100vh;
            overflow-y: auto;
            overflow-x: hidden;
            transition: flex-basis 0.18s ease, background 0.2s ease, border-color 0.2s ease;
        }

        .nav-brand-row { display: flex; align-items: center; gap: 6px; padding: 2px 0 10px; }
        .nav-collapse-toggle {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            padding: 0;
            border: none;
            border-radius: 9px;
            background: color-mix(in srgb, var(--skin-active-2) 14%, transparent);
            color: var(--skin-active-2);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .nav-collapse-toggle:hover { background: color-mix(in srgb, var(--skin-active-2) 24%, transparent); }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 800;
            font-size: 0.98em;
            color: var(--skin-text);
            text-decoration: none;
            padding: 0 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

        /* Every nav-link/nav-brand/nav-donate icon+label pair shares this shape so the collapse
           state (below) only has to hide .nav-label everywhere at once, instead of every button
           needing its own collapsed-state rule. */
        .nav-link {
            display: flex;
            align-items: center;
            gap: 10px;
            text-align: left;
            padding: 11px 14px;
            border: none;
            border-radius: 14px;
            background: none;
            color: var(--skin-link);
            text-decoration: none;
            font-weight: 700;
            font-size: 0.9em;
            cursor: pointer;
            white-space: nowrap;
            overflow: hidden;
        }
        .nav-link:hover { background: color-mix(in srgb, var(--skin-active-2) 14%, transparent); }
        .nav-link.active {
            background: linear-gradient(135deg, var(--skin-active-1), var(--skin-active-2));
            color: var(--skin-active-text);
            box-shadow: 0 4px 10px color-mix(in srgb, var(--skin-active-2) 35%, transparent);
        }
        .nav-icon { flex-shrink: 0; font-size: 1.05em; line-height: 1; }
        .nav-label { overflow: hidden; text-overflow: ellipsis; }

        .nav-section-label {
            font-size: 0.65em;
            font-weight: 800;
            color: var(--skin-muted);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 14px 10px 4px;
            white-space: nowrap;
            overflow: hidden;
        }
        .nav-section-label:first-of-type { padding-top: 4px; }

        .nav-donate {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            padding: 11px 14px;
            border-radius: 14px;
            color: var(--skin-donate);
            font-weight: 700;
            font-size: 0.9em;
            white-space: nowrap;
            overflow: hidden;
        }
        .nav-donate:hover { background: color-mix(in srgb, var(--skin-donate) 12%, transparent); }

        /* Reserved for a future ad script -- deliberately empty and undecorated (no placeholder
           box/border) so it takes up no visible space and can't be mistaken for a broken element
           until there's real content to put here. See CLAUDE.md "Navigation Restructure" for
           sizing notes once a real ad network/unit is chosen. */
        .nav-ad-slot:empty { display: none; }

        .nav-settings {
            margin-top: auto;
            padding-top: 14px;
            border-top: 1px solid var(--skin-panel-border);
        }
        .nav-settings-label {
            font-size: 0.65em;
            font-weight: 800;
            color: var(--skin-muted);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0 10px 8px;
            white-space: nowrap;
            overflow: hidden;
        }

        .lang-switcher { display: flex; gap: 6px; padding: 0 10px; }
        .lang-btn {
            display: flex;
            align-items: center;
            background: rgba(74,144,226,0.1);
            border: 2px solid transparent;
            border-radius: 8px;
            padding: 4px 8px;
            cursor: pointer;
            line-height: 1;
            transition: opacity 0.2s, transform 0.2s;
        }
        .lang-btn svg { display: block; border-radius: 2px; }
        .lang-btn:hover { background: rgba(74,144,226,0.22); }
        .lang-btn.active { border-color: var(--skin-accent-text); background: color-mix(in srgb, var(--skin-accent-text) 30%, transparent); }

        /* Skin switcher: one small round swatch per SKIN_THEMES entry, previewing that skin's own
           panel-bg/border/active-gradient so the button looks like a tiny sample of itself. */
        .skin-switcher { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; padding: 0; }
        .skin-swatch {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid transparent;
            cursor: pointer;
            padding: 0;
            flex: none;
        }
        .skin-swatch.active { border-color: var(--skin-active-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--skin-active-2) 30%, transparent); }

        /* One row per settings item (language, appearance) inside the shared "Configurações"
           block, centered horizontally -- a leading icon per row was tried first but read as
           disconnected from the rest of the nav ("os icones de lingua e de cores talvez ficou
           meio desconexo"); dropped in favor of just centering the flags/swatches as a group. */
        .nav-settings-row { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 6px 8px; }
        .nav-settings-row .lang-switcher { padding: 0; }
        .site-nav.collapsed .nav-settings-row { display: none; }

        /* Small round icon-only button sitting right alongside the skin swatches, same size as a
           swatch itself -- "uma bolinha extra do lado com o icone de paleta" -- the ONLY entry
           point into the Skin Tuner now (no text needed: "não precisaria de texto no botao de
           tweak color, só clicar nesse botão com icone"). Used to be a wide full-text button below
           the swatches, plus a separate "+" button for creating brand-new skins -- creation was
           removed entirely per explicit request ("tire a opção de criar novas skins"), so this
           single icon now does the one job that's left: open the tuner for the CURRENT skin. */
        .nav-skin-tuner-icon-btn {
            flex: none;
            width: 24px;
            height: 24px;
            padding: 0;
            border-radius: 50%;
            border: 1px solid var(--skin-content-border);
            background: transparent;
            color: var(--skin-muted);
            font-size: 18px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .nav-skin-tuner-icon-btn:hover { background: color-mix(in srgb, var(--skin-accent-text) 15%, transparent); color: var(--skin-accent-text); border-color: var(--skin-accent-text); }
        /* No separate collapsed-nav hide rule needed -- the button now lives INSIDE
           #skinSwitcher (see renderSkinSwitcher()), so .site-nav.collapsed .skin-switcher's own
           display:none already takes it out along with every swatch. */

        /* Desktop-only collapse-to-icon-rail, matching ROOCDB's own sidebar (confirmed live:
           their .app.collapsed .side shrinks to 66px and hides every .label span, icons stay).
           Toggled by .nav-collapse-toggle, independent of the mobile off-canvas drawer below --
           that one still fully hides/shows the whole sidebar, this one only hides text. */
        .site-nav.collapsed { flex: 0 0 68px; width: 68px; padding: 20px 8px; }
        .site-nav.collapsed .nav-label,
        .site-nav.collapsed .nav-section-label,
        .site-nav.collapsed .nav-settings-label,
        .site-nav.collapsed .lang-switcher,
        .site-nav.collapsed .skin-switcher { display: none; }
        .site-nav.collapsed .nav-link,
        .site-nav.collapsed .nav-donate { justify-content: center; padding: 11px 4px; }
        .site-nav.collapsed .nav-brand-row { flex-direction: column; gap: 10px; }

        .page-content { flex: 1; min-width: 0; padding: 20px; }
        .page { display: none; }
        .page.active { display: block; }

        @media (max-width: 1000px) {
            body { display: block; }
            .nav-hamburger { display: flex; }
            .site-nav {
                position: fixed;
                top: 0;
                left: 0;
                width: 260px;
                z-index: 35;
                transform: translateX(-100%);
                transition: transform 0.22s ease;
            }
            .site-nav.open { transform: translateX(0); }
            .nav-backdrop.open { display: block; }
            .page-content { padding: 20px 14px; }
        }
