.site-header {
    --header-bg: #fff; --header-text: #1e293b; --header-muted: #64748b; --header-line: #e2e8f0; --header-hover: #f1f5f9;
    position: sticky; top: 0; z-index: 60; width: 100%; background: var(--header-bg); color: var(--header-text);
    border-bottom: 1px solid var(--header-line); box-shadow: 0 2px 16px #0f172a04;
}
.dark .site-header { --header-bg: #0f172a; --header-text: #f1f5f9; --header-muted: #a7b6ca; --header-line: #263449; --header-hover: #1e293b; }
.site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header a { text-decoration: none; }
.site-header a:focus-visible, .site-header button:focus-visible, .site-header select:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.site-header__inner { max-width: 1600px; min-height: 72px; margin-inline: auto; padding: 12px 28px; display: flex; align-items: center; gap: 24px; }
.site-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--header-text); font-size: 18px; font-weight: 800; letter-spacing: -.6px; white-space: nowrap; flex: 0 0 auto; }
.site-brand img { width: 32px; height: 32px; object-fit: contain; }
.site-brand__accent { color: #b45309; }
.dark .site-brand__accent { color: #fbbf24; }
.site-nav { display: none; min-width: 0; align-items: center; justify-content: center; gap: 3px; flex: 1; }
.site-nav a { min-width: 0; border-radius: 9px; padding: 10px 11px; color: var(--header-muted); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--header-hover); color: var(--header-text); }
.site-header__actions { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; flex: 0 0 auto; }
.site-preferences { display: none; gap: 2px; padding-inline-end: 12px; border-inline-end: 1px solid var(--header-line); }
.site-icon-button { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 0; border-radius: 10px; color: var(--header-muted); background: transparent; cursor: pointer; flex-shrink: 0; }
.site-icon-button:hover, .site-icon-button[aria-expanded="true"] { background: var(--header-hover); color: var(--header-text); }
.site-header svg { width: 20px; height: 20px; flex: 0 0 auto; }
.site-icon-button svg, .site-setting svg, .site-account-link svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-icon-off, [data-sound-toggle][aria-pressed="true"] .sound-icon-off { display: none; }
[data-sound-toggle][aria-pressed="false"] .sound-icon-on { display: none; }
[data-sound-toggle][aria-pressed="false"] .sound-icon-off { display: initial; }
.site-account { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 650; }
.site-upgrade { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border-radius: 10px; border: 1px solid #f59e0b; color: #422006; background: #fbbf24; box-shadow: 0 2px 4px #b4530910; white-space: nowrap; }
.site-upgrade:hover { background: #fcd34d; }
.site-account-link { color: var(--header-text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; white-space: nowrap; }
.site-account-link:hover, .site-admin-link:hover { color: #b45309; }
.site-admin-link { color: var(--header-muted); font-size: 12px; }
.site-account--desktop .site-admin-link { display: none; }
.site-menu[hidden] { display: none; }
.site-menu { position: absolute; inset-inline: 0; top: 100%; background: var(--header-bg); border-top: 1px solid var(--header-line); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 16px 24px #0f172a12; }
.site-menu__inner { max-width: 1000px; margin: auto; padding: 16px 24px 24px; }
.site-menu__links { display: grid; gap: 4px; }
.site-menu__links a { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--header-text); }
.site-menu-arrow { margin-inline-start: auto; color: var(--header-muted); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-menu__links a:hover, .site-menu__links a[aria-current="page"] { background: var(--header-hover); }
.site-menu__account { padding: 18px 0; margin-top: 12px; border-block: 1px solid var(--header-line); }
.site-account--menu { flex-wrap: wrap; }
.site-account--menu .site-account-link { padding-inline: 14px; border: 1px solid var(--header-line); border-radius: 10px; }
.site-menu__settings { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 18px; }
.site-setting { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 10px; font-size: 13px; color: var(--header-muted); background: var(--header-hover); border: 1px solid var(--header-line); border-radius: 9px; cursor: pointer; }
.site-setting[aria-pressed="false"][data-sound-toggle] { opacity: .65; }
.site-language { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; color: var(--header-muted); font-size: 12px; }
.site-language--desktop { display: none; }
.site-language select { max-width: 160px; min-height: 42px; border: 1px solid var(--header-line); border-radius: 9px; color: var(--header-text); background: var(--header-bg); padding: 7px 30px 7px 10px; font-size: 13px; }
@media(min-width: 700px) { .site-preferences { display: flex; } }
@media(min-width: 1440px) {
    .site-nav { display: flex; }
    .site-language--desktop { display: flex; }
    .site-header .site-menu-toggle { display: none; }
    .site-header .site-menu { display: none; }
}
@media(max-width: 699px) {
    .site-header__inner { padding: 10px 16px; min-height: 64px; gap: 12px; }
    .site-header__actions { gap: 8px; }
    .site-brand { font-size: 16px; gap: 7px; }
    .site-brand img { width: 28px; height: 28px; }
    .site-account--desktop .site-account-link { display: none; }
    .site-account--desktop:has(:only-child) .site-account-link { display: inline-flex; width: 40px; }
    .site-account--desktop:has(:only-child) .site-account-link span { display: none; }
    .site-upgrade { padding: 8px 12px; font-size: 12px; min-height: 38px; }
    .site-menu { max-height: calc(100dvh - 64px); }
    .site-menu__inner { padding: 12px 16px 20px; }
    .site-language { width: 100%; margin: 5px 0 0; justify-content: space-between; }
}
@media(max-width: 370px) { .site-brand__expert { display: none; } .site-header__inner { padding-inline: 12px; } }
@media(prefers-reduced-motion: reduce) { .site-header * { scroll-behavior: auto; transition: none; } }
[dir="rtl"] .site-menu-arrow { transform: scaleX(-1); }
.site-checkout-back { color:var(--header-muted); font-size:12px; max-width:120px; line-height:1.3; }
.site-checkout-back:hover { color:var(--header-text); text-decoration:underline; }
@media(max-width:699px) {
    .site-upgrade { max-width:clamp(80px, calc(100vw - 206px), 120px); white-space:normal; line-height:1.25; }
    .site-checkout-back { max-width:clamp(80px, calc(100vw - 206px), 120px); }
    .site-account--desktop { gap:8px; }
}
