.site-auth[hidden], .site-auth [hidden] { display: none !important; }
.site-auth { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; font-size: 14px; line-height: 1.4; }
.site-auth button { appearance: none; border: 0; border-radius: 0; background: none; font: inherit; cursor: pointer; letter-spacing: normal; text-transform: none; }
.site-auth button:focus-visible { outline: none; text-decoration: underline; }
.site-auth button:disabled { cursor: wait; }
.site-auth .site-auth-trigger { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 8px; color: #fed45e; }
.site-auth-trigger:hover, .site-auth-trigger:focus-visible, .site-auth-copy:focus-visible, .site-auth-refresh:focus-visible { background: #fed45e12; }
.site-auth-icon { display: block; width: 24px; height: 24px; fill: currentColor; }
.site-auth-check { position: absolute; right: 0; bottom: 1px; width: 15px; height: 15px; border: 2px solid #111116; border-radius: 50%; background: #55cc83; fill: none; stroke: #111116; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.site-auth-spinner { width: 21px; height: 21px; box-sizing: border-box; border: 2px solid #fed45e40; border-top-color: #fed45e; border-radius: 50%; animation: site-auth-spin .8s linear infinite; }
.site-auth-panel, .site-auth-feedback { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; box-sizing: border-box; width: max-content; max-width: min(280px, calc(100vw - 32px)); padding: 16px; border: 1px solid #333333; background: var(--surface, #222222); color: var(--text, #f8f4ff); box-shadow: 0 8px 28px #0006; text-align: left; }
.site-auth-panel > * { flex-shrink: 0; }
.site-auth-panel:has(.site-auth-billing:not([hidden])) { width: 340px; max-width: min(340px, calc(100vw - 32px)); }
.site-auth-billing { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; padding-top: 12px; border-top: 1px solid #333; }
.site-auth-balance-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; }
.site-auth-billing-details { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid #3a3a3a; background: var(--background, #1c1c1c); }
.site-auth-billing-details > summary::-webkit-details-marker { display: none; }
.site-auth-billing-details > summary::after { content: ''; flex: 0 0 auto; width: 7px; height: 7px; margin-right: 3px; border-right: 2px solid #fed45e; border-bottom: 2px solid #fed45e; transform: translateY(-2px) rotate(45deg); }
.site-auth-billing-details > summary:hover { background: #fed45e0a; color: #fed45e; }
.site-auth-billing-details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.site-auth-billing-details > summary:focus-visible { outline: none; background: #fed45e0a; color: #fed45e; }
.site-auth-billing-list { display: flex; flex-direction: column; gap: 0; box-sizing: border-box; max-height: 220px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #8d7a3d #191919; list-style: none; padding: 0 12px; margin: 0; }
.site-auth-billing-list::-webkit-scrollbar { width: 6px; }
.site-auth-billing-list::-webkit-scrollbar-track { background: #191919; }
.site-auth-billing-list::-webkit-scrollbar-thumb { background: #8d7a3d; border-radius: 3px; }
.site-auth-billing-list::-webkit-scrollbar-thumb:hover { background: #fed45e; }
.site-auth-billing-list > li { flex-shrink: 0; }
.site-auth-billing-list:focus-visible { outline: none; background: #fed45e0a; }
.site-auth-billing-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; overflow-wrap: anywhere; }
.site-auth-billing-item + .site-auth-billing-item { border-top: 1px solid #333; }
.site-auth-gift { color: #fff; font-size: 12px; }
.site-auth-refresh[aria-disabled="true"] { opacity: .5; cursor: wait; }
.site-auth-refresh .site-auth-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-auth-refresh[aria-busy="true"] .site-auth-icon { animation: site-auth-spin .8s linear infinite; }
.site-auth-name { max-width: 100%; overflow-wrap: anywhere; }
.site-auth-keys { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; min-width: 0; }
.site-auth-subscription { display: flex; flex-direction: column; align-items: stretch; gap: 12px; box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; border: 1px solid #333333; background: var(--background, #1c1c1c); }
.site-auth-subscription a { line-height: 1.45; text-decoration: underline; text-underline-offset: 3px; }
.site-auth-key-row { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.site-auth .site-auth-copy, .site-auth .site-auth-refresh { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 6px; width: 36px; height: 36px; color: #fed45e; }
.site-auth-copy .site-auth-icon, .site-auth-refresh .site-auth-icon { width: 20px; height: 20px; }
.site-auth-copy .site-auth-copy-check { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-auth-verify[aria-busy="true"] .site-auth-verify-label { visibility: hidden; }
.site-auth-verify[aria-disabled="true"] { opacity: .5; cursor: wait; }
.site-auth-logout:disabled { opacity: .5; }
.site-auth-feedback { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 260px; }
.lab-site-navigation .site-auth-panel, .lab-site-navigation .site-auth-feedback { left: 0; right: auto; }
.site-header nav { flex-wrap: wrap; justify-content: center; }
@keyframes site-auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .site-auth-spinner, .site-auth-refresh[aria-busy="true"] .site-auth-icon { animation-duration: 2.4s; } }
@media (max-width: 600px) { .site-header nav { width: 100%; justify-content: flex-end; gap: 12px 24px; } .site-auth-panel { max-width: min(240px, calc(100vw - 32px)); } }
@media (max-width: 600px) { .site-auth-panel:has(.site-auth-billing:not([hidden])) { max-width: min(240px, calc(100vw - 32px)); } }
.site-auth-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 160px; max-height: calc(100dvh - 120px); overflow-y: auto; color: #fff; }
.site-auth-balance { color: #fff; font-size: 16px; }
.site-auth-amount { color: #fed45e; }
.site-auth-billing-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; box-sizing: border-box; padding: 12px; list-style: none; cursor: pointer; color: #fff; font-weight: 500; }
.site-auth-billing-details[open] > summary { border-bottom: 1px solid #333; }
.site-auth-billing-list > .site-auth-message { padding: 12px 0; }
.site-auth-key { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 13px/1.4 ui-monospace, monospace; white-space: nowrap; color: #fff; }
.site-auth .site-auth-logout, .site-auth .site-auth-retry, .site-auth .site-auth-verify, .site-auth .site-auth-reauth { padding: 4px 0; color: #fff; text-align: left; }
.site-auth .site-auth-logout { position: relative; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 12px; padding: 10px 20px; border: 1px solid #c83b3b; border-radius: 8px; background: #c83b3b; font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
.site-auth-logout::before { content: ''; position: absolute; top: -13px; left: -1px; right: -1px; border-top: 1px solid #333; }
.site-auth .site-auth-logout:hover:not(:disabled) { background: #a82f2f; border-color: #fed45e; color: #fed45e; text-decoration: none; }
.site-auth-keys a { color: #fff; font: inherit; letter-spacing: normal; text-transform: none; }
.site-auth .site-auth-verify { position: relative; min-height: 36px; padding: 8px 12px; border: 1px solid #626066; border-radius: 8px; background: transparent; text-align: center; white-space: nowrap; }
.site-auth-verify .site-auth-spinner { position: absolute; top: 50%; left: 50%; margin: -10.5px 0 0 -10.5px; }
.site-auth .site-auth-verify:hover { border-color: #fed45e; color: #fed45e; text-decoration: none; }
.site-auth-keys a:hover, .site-auth-retry:hover, .site-auth-reauth:hover { color: #fed45e; }
.site-auth-message { color: #fff; font-size: 12px; overflow-wrap: anywhere; }
