:root{--ink:#edf4ff;--muted:#99abc2;--page:#091321;--glass:linear-gradient(135deg,#b0c7e523,#344a6330);--line:#cadfff30;--shadow:#0005;--blue:#a4cfff;--panel:#142133}
:root[data-theme=light]{color-scheme:light;color:#102951;background:#edf5fc;--ink:#102951;--muted:#5876a0;--page:#edf5fc;--glass:linear-gradient(125deg,#ffffffb8,#e9f4ff80);--line:#ffffffd9;--shadow:#668ab329;--blue:#1479d9;--panel:#f5faff}
:root[data-theme=dark]{color-scheme:dark}
.has-cabinet{background:var(--page);color:var(--ink)}
.has-cabinet .site-header,.has-cabinet .site-footer,.has-cabinet .intro,.has-cabinet .panel-top{display:none}
.has-cabinet .layout{display:block;max-width:none;margin:0}
.has-cabinet .auth-panel{padding:0;border:0;background:none;border-radius:0;box-shadow:none}
.account-shell{min-height:100svh;position:relative;isolation:isolate;overflow:clip;background:radial-gradient(ellipse at 18% 16%,#6b9ddc38,transparent 48%),radial-gradient(ellipse at 90% 87%,#426ccc2e,transparent 60%),var(--page);color:var(--ink)}
.account-shell:before{content:"";position:absolute;z-index:-1;pointer-events:none;inset:-30%;background:linear-gradient(48deg,transparent 35%,#b5e3ff15 38%,#c2e5ff3d 39%,transparent 42%,transparent 60%,#7ca4e322 63%,transparent 67%);filter:blur(18px);transform:rotate(-9deg)}
.cabinet{min-height:100svh;padding:30px 34px;max-width:1100px;margin:auto;transition:padding .25s}
.cabinet-bar{display:flex;gap:18px;align-items:center;margin:0 0 35px;font-size:21px;font-weight:650}
.round-control{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;border:1px solid var(--line);background:var(--glass);color:var(--ink)}
.account-shell svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.cabinet-content{max-width:620px;margin:auto;padding:30px;border:1px solid var(--line);border-radius:28px;background:var(--glass);box-shadow:0 14px 50px var(--shadow);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.glass-drawer{position:absolute;z-index:4;left:18px;top:18px;bottom:18px;width:380px;padding:27px 17px;border:1px solid var(--line);border-radius:34px;background:linear-gradient(145deg,#afc3e22e,#142133b3);box-shadow:inset 0 1px 3px #ffffff55,12px 12px 55px var(--shadow);backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);transform:translateX(-115%);visibility:hidden;transition:transform .25s,visibility .25s;overflow-y:auto;scrollbar-width:thin}
.menu-open .glass-drawer{transform:translateX(0);visibility:visible}
.glass-tile{width:100%;border:1px solid var(--line);border-radius:26px;color:var(--ink);background:var(--glass);box-shadow:inset 0 1px 2px #e6f4ff26,0 8px 30px #0000000b;text-align:left}
.drawer-profile{display:flex;align-items:center;gap:14px;padding:23px 14px;min-height:139px;margin-bottom:22px}
.drawer-avatar{position:relative;display:grid;place-items:center;flex:0 0 76px;height:76px;border-radius:50%;background:linear-gradient(145deg,#d2e9fa,#749bbf);box-shadow:0 0 0 1px #c9e5ff99,0 3px 16px #a5d4ff44;color:#15395d;font-size:21px}
.drawer-avatar i{position:absolute;bottom:5px;right:1px;border:3px solid #7fbcaf;width:16px;height:16px;border-radius:50%;background:#27dd67}
.drawer-person{min-width:0;flex:1}.drawer-person strong{display:block;font-size:16px;font-weight:600;overflow-wrap:anywhere}.drawer-person small{display:block;font-size:11px;margin-top:7px;color:var(--muted);overflow-wrap:anywhere;line-height:1.4}
.account-badge{display:inline-block;margin-top:9px;border-radius:18px;padding:4px 9px;font-size:11px;background:#7aabed29;color:var(--muted)}
.drawer-item{display:flex;align-items:center;gap:16px;min-height:88px;padding:12px;margin-bottom:14px}
.glass-icon{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;border-radius:50%;background:linear-gradient(140deg,#b8dfff23,#07132415);box-shadow:inset 0 1px 2px #e6f7ff88,0 4px 12px #0002;color:var(--ink)}
.glass-icon svg{width:30px;height:30px}
.item-copy{flex:1;min-width:0}.item-copy strong{display:block;font-size:16px;font-weight:550;line-height:1.25}.item-copy small{display:block;font-size:11px;line-height:1.4;color:var(--muted);margin-top:7px}
.chevron{flex:0 0 16px;color:var(--muted)}.chevron svg{width:16px;height:22px}
.drawer-item:hover,.drawer-item.active{border-color:#78b7ff;background:linear-gradient(120deg,#2365d24d,#4971b62b);box-shadow:inset 0 0 15px #518fff55,0 0 16px #3776ff66}
.drawer-bottom{margin-top:22px;padding-top:14px;border-top:1px solid var(--line)}.logout-item{color:#ff626b;min-height:76px}.logout-item .glass-icon{color:inherit;box-shadow:none;background:none}.logout-item .item-copy strong{font-weight:500}
.menu-shade{position:absolute;z-index:3;inset:0;border:0;background:#06122233;display:none}.menu-open .menu-shade{display:block}
.settings-card{padding:22px 0;border-bottom:1px solid var(--line);margin-bottom:20px}.settings-card h3{margin:0 0 17px;font-size:16px}
.theme-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:15px}.theme-options button{padding:12px 15px;min-height:44px;border:1px solid var(--line);border-radius:14px;background:var(--glass);color:var(--ink)}
.theme-options button[aria-pressed=true]{border-color:var(--blue);background:#6eb8ff30;box-shadow:0 0 0 1px var(--blue)}
.empty-section{text-align:center;padding:45px 0}.empty-section .glass-icon{margin:auto;width:68px;height:68px}.empty-section p{color:var(--muted);line-height:1.6}.cabinet-content h2:focus{outline:none}
[data-theme=light] .glass-drawer{background:linear-gradient(145deg,#ffffffe0,#e4effcc9)}
[data-theme=light] .drawer-item:hover,[data-theme=light] .drawer-item.active{background:linear-gradient(120deg,#e6f4ff,#b9dcff77);border-color:#35a6ff;box-shadow:inset 0 0 8px #fff,0 0 14px #63b0ff66}
[data-theme=light] .glass-icon{background:linear-gradient(145deg,#fff9,#dbeeff88);box-shadow:inset 0 1px 2px #fff,0 4px 15px #779bc51a}
[data-theme=light] .ambient{background:radial-gradient(ellipse at 19% 37%,#badbff70,transparent 60%)}
[data-theme=light] .auth-panel{background:linear-gradient(130deg,#fff,#edf5fc);border-color:#d7e3ef;box-shadow:0 20px 80px #637d9922}
[data-theme=light] .has-cabinet .auth-panel{background:none;box-shadow:none}
[data-theme=light] .panel-copy,[data-theme=light] .field-hint,[data-theme=light] .profile-card span,[data-theme=light] .splash-settings,[data-theme=light] .intro-copy,[data-theme=light] .brand-light{color:#526d89}
[data-theme=light] label,[data-theme=light] .destination,[data-theme=light] .deletion-owner,[data-theme=light] .deletion-details{color:#254768}
[data-theme=light] input{background:#fff;color:#173653;border-color:#b7cbdf}
[data-theme=light] input:-webkit-autofill{-webkit-text-fill-color:#173653;box-shadow:0 0 0 1000px #fff inset}
[data-theme=light] .switcher{background:#dfeaf5}
[data-theme=light] .switcher button{color:#526d89}
[data-theme=light] .switcher button.selected{background:#fff;color:#19466e}
[data-theme=light] .profile-card{background:#ffffff88;border-color:#b7cbdf}
[data-theme=light] .secondary-button{background:#e0edfa;color:#244e78;border-color:#b7cbdf}
[data-theme=light] .text-button,[data-theme=light] .bottom-switch button{color:#2168a6}
[data-theme=light] .form-alert,[data-theme=light] .field-error,[data-theme=light] .deletion-details strong,[data-theme=light] .delete-entry .text-button{color:#a12535}
[data-theme=light] .success-message{background:#e4f5ed;color:#23573f}
@media(min-width:761px){.menu-open .cabinet{padding-left:430px}.menu-open .menu-shade{display:none}.account-shell{min-height:900px}.glass-drawer{position:absolute}}
@media(max-width:760px){
 .glass-drawer{width:calc(100% - 62px);max-width:410px;left:12px;top:12px;bottom:12px;padding:22px 12px;border-radius:28px}
 .account-shell{min-height:100svh}
 .cabinet{padding:25px 20px;min-height:100svh}
 .cabinet-content{padding:22px 18px}
 .menu-open .cabinet{transform:translateX(60%);pointer-events:none}
 .drawer-profile{padding:18px 10px;min-height:122px;gap:10px;border-radius:23px;margin-bottom:19px}
 .drawer-avatar{flex-basis:64px;height:64px;font-size:21px}
 .drawer-person strong{font-size:14px}.drawer-person small{font-size:10px}
 .drawer-item{padding:11px 10px;gap:12px;min-height:80px;border-radius:23px;margin-bottom:12px}
 .item-copy strong{font-size:15px}.item-copy small{font-size:10px}
 .glass-icon{flex-basis:48px;width:48px;height:48px}
 .drawer-bottom{margin-top:20px}.logout-item{min-height:70px}
 .theme-options button{flex:1}
}
@media(max-width:350px){.glass-drawer{width:calc(100% - 40px);padding:18px 10px}.drawer-avatar{flex-basis:48px;height:48px}.glass-icon{flex-basis:40px;width:40px;height:40px}.item-copy strong{font-size:14px}.drawer-item{gap:9px}}
@media(prefers-reduced-motion:reduce){.glass-drawer,.cabinet{transition:none}}
/* Soft reflections continue through the translucent drawer, as in the approved menu. */
.glass-drawer{background:linear-gradient(48deg,transparent 12%,#8ecaff12 23%,transparent 29%,transparent 57%,#b8dcff0c 63%,transparent 72%),linear-gradient(145deg,#253b55d9,#101e2bd9);outline:none}
[data-theme=light] .glass-drawer{background:linear-gradient(48deg,transparent 8%,#fff9 20%,#b5d9ff33 25%,transparent 33%,transparent 52%,#ffffffbb 60%,transparent 68%),linear-gradient(145deg,#ffffffe0,#e4effcc9)}
@media(max-width:760px){.menu-open .cabinet{filter:blur(3px);opacity:.55}[data-theme=light] .menu-shade{background:#c8dff133}}
@media(hover:none){.drawer-item:hover:not(.active){background:var(--glass);border-color:var(--line);box-shadow:inset 0 1px 2px #e6f4ff26,0 8px 30px #0000000b}}
/* 0.2.6: align the mobile drawer's right edge with the user's marked line. */
@media(max-width:760px){
 .glass-drawer{width:calc(62% - 12px);max-width:340px;padding:22px 9px}
 .drawer-profile{padding:16px 8px;gap:8px}
 .drawer-avatar{flex-basis:40px;width:40px;height:40px;font-size:16px}
 .drawer-avatar i{width:12px;height:12px;border-width:2px;bottom:0;right:0}
 .drawer-person strong{font-size:13px;line-height:1.35}
 .account-badge{font-size:10px;padding:4px 7px}
 .drawer-item{padding:11px 8px;gap:7px}
 .glass-icon{flex-basis:36px;width:36px;height:36px}
 .glass-icon svg{width:25px;height:25px}
 .chevron{flex-basis:12px}.chevron svg{width:12px}
 .item-copy strong{font-size:14px}
 .item-copy small{overflow-wrap:anywhere}
 .menu-open .cabinet{transform:translateX(40%)}
}

/* Social profile and messages provide their own compact mobile controls. */
.profile-view .cabinet-content{padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.messages-view .cabinet-content{max-width:1080px;padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.messages-view .cabinet{max-width:1200px}
.drawer-avatar img{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;object-fit:cover}
.drawer-avatar i{z-index:1}
@media(max-width:760px){.profile-view .cabinet{padding:16px 12px 25px}.profile-view .cabinet-bar{margin-bottom:16px}.messages-view .cabinet{padding:16px 12px 20px}.messages-view .cabinet-bar{margin-bottom:16px}}

.notification-bell{margin-left:auto;position:relative;flex:none}
.notification-bell.push-enabled{border-color:#8cceff;box-shadow:0 0 12px #2188ff26}
.notification-count{position:absolute;right:-5px;top:-5px;min-width:20px;height:20px;padding:1px 5px;border:2px solid var(--page);border-radius:20px;background:#9ed8ff;color:#102b44;font-size:10px;line-height:15px;text-align:center}

@media(max-width:760px){.messages-view .cabinet-bar{display:none}.messages-view .cabinet{padding:calc(10px + env(safe-area-inset-top,0px)) 20px max(20px,env(safe-area-inset-bottom,0px))}}

/* Compact profile header: the photo and name sit directly on the drawer. */
.glass-drawer .drawer-profile{--drawer-avatar-size:80px;display:flex;align-items:center;width:100%;min-height:96px;padding:8px 4px;gap:12px;margin:0 0 14px;border:0;border-radius:0;outline:0;box-shadow:none;background:transparent;color:var(--ink);text-align:left;font:inherit}
.glass-drawer .drawer-profile .drawer-avatar{flex:0 0 var(--drawer-avatar-size);width:var(--drawer-avatar-size);height:var(--drawer-avatar-size);border:0;outline:0;box-shadow:none}
.glass-drawer .drawer-profile .drawer-avatar img{border:0;outline:0;box-shadow:none}
.glass-drawer .drawer-profile .drawer-avatar i{width:10px;height:10px;right:3px;bottom:3px;border:0;box-shadow:none}
.glass-drawer .drawer-profile .drawer-person strong{font-size:16px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.glass-drawer .drawer-profile .drawer-person small{margin-top:5px;font-size:11px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.glass-drawer .drawer-profile:focus-visible .drawer-person strong{text-decoration:underline;text-underline-offset:4px}
@media(max-width:760px){.glass-drawer .drawer-profile{--drawer-avatar-size:72px;min-height:88px;margin-bottom:12px;gap:10px}.glass-drawer .drawer-profile .drawer-person strong{font-size:13px}.glass-drawer .drawer-profile .drawer-person small{font-size:11px}}
@media(max-width:350px){.glass-drawer .drawer-profile{--drawer-avatar-size:64px;min-height:80px;padding-left:2px;padding-right:2px;gap:8px}}

/* Remove the outer rim as well as the old inset profile card. */
.glass-drawer{border:0;box-shadow:none;background:linear-gradient(145deg,#253b55ed,#101e2bed)}
[data-theme=light] .glass-drawer{background:linear-gradient(145deg,#fffffff2,#e4effcf2)}
