html { color-scheme:dark; }
html[data-theme="dark"] body { background:var(--bg,#0b0d0d) !important; }
html[data-theme="light"] { color-scheme:light; --bg:#eeece8; --panel:#e4e1db; --panel-2:#d8d4cc; --panel2:#d8d4cc; --ink:#252422; --text:#252422; --muted:#696761; --line:rgba(37,36,34,.22); --gold:#80682f; --accent:#80682f; --accent-2:#526d65; --shadow:none; }
html[data-theme="light"] body { background:#eeece8 !important; color:#252422 !important; }
html[data-theme="light"] .alchemysterium-site-bar { background:#eeece8; }
html[data-theme="light"] .auth-card,
html[data-theme="light"] aside,
html[data-theme="light"] .control-group,
html[data-theme="light"] .modaltext,
html[data-theme="light"] .modal-copy,
html[data-theme="light"] .quote-card { background:#e4e1db !important; color:#252422 !important; box-shadow:none !important; }
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select { background:#f8f7f4 !important; color:#252422 !important; border-color:rgba(37,36,34,.3) !important; }
html[data-theme="light"] button:not(.theme-toggle):not(.account-avatar),
html[data-theme="light"] .button { box-shadow:none !important; }
html[data-theme="light"] .experience-card { background:#e4e1db !important; border-color:rgba(37,36,34,.24) !important; }
html[data-theme="light"] .mark { background:#dedad2 !important; }
html[data-theme="light"] header,
html[data-theme="light"] .draw-panel { background-color:#eeece8 !important; }
html[data-theme="light"] .account-popover { background:#f4f2ee; border-color:rgba(37,36,34,.22); box-shadow:0 18px 48px rgba(45,42,37,.16); }
html[data-theme="light"] .menu-link,
html[data-theme="light"] .menu-button,
html[data-theme="light"] .theme-toggle { color:#252422; }

.site-account { position:absolute; z-index:2; top:50%; right:max(18px,env(safe-area-inset-right)); transform:translateY(-50%); display:flex; align-items:center; gap:7px; font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif; }
.site-account .account-link { display:inline-flex; min-height:36px; padding:8px 12px; align-items:center; border:1px solid transparent; border-radius:8px; color:#aaa89e; font-size:.78rem; font-weight:650; text-decoration:none; }
.site-account .account-link-primary { color:inherit; border-color:#59615b; }
.account-menu { position:relative; }
.account-menu summary { list-style:none; cursor:pointer; }
.account-menu summary::-webkit-details-marker { display:none; }
.account-avatar { display:grid; place-items:center; width:40px; height:40px; padding:0; overflow:hidden; border:1px solid #59615b; border-radius:50%; color:#c8aa6a; background:#111513; font:600 .78rem/1 Cinzel,Georgia,serif; cursor:pointer; }
.account-avatar img { width:100%; height:100%; object-fit:cover; }
.account-popover { position:absolute; top:calc(100% + 9px); right:0; width:210px; padding:7px; border:1px solid #343b37; border-radius:8px; color:#eee9dd; background:#121615; box-shadow:0 18px 48px rgba(0,0,0,.42); }
.account-identity { padding:9px 10px 10px; border-bottom:1px solid rgba(128,128,128,.25); }
.account-identity strong,.account-identity small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-identity strong { font:650 .84rem/1.2 Inter,ui-sans-serif,system-ui,-apple-system,sans-serif; }
.account-identity small { margin-top:4px; color:#888b86; font-size:.7rem; }
.menu-link,.menu-button,.theme-toggle { display:flex; width:100%; min-height:40px; padding:9px 10px; gap:10px; align-items:center; border:0; border-radius:8px; color:#eee9dd; background:transparent; font:600 .82rem/1 Inter,ui-sans-serif,system-ui,-apple-system,sans-serif; text-align:left; text-decoration:none; cursor:pointer; }
.menu-link:hover,.menu-button:hover,.theme-toggle:hover { background:rgba(128,128,128,.12); }
.account-popover form { margin:0; }
.theme-icon { display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; border:1px solid #59615b; border-radius:50%; color:#f3f1e9; background:#111a2a; }
.theme-icon svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:680px) { .site-account { right:max(8px,env(safe-area-inset-right)); } .site-account .account-link:not(.account-link-primary) { display:none; } .account-popover { position:fixed; top:58px; right:8px; } }
