/* A pale, opaque drawer; decorative lace is independent of saved wallpaper. */
:root { --sidebar-width:min(340px,82vw); }
.app-menu-toggle { position:fixed;z-index:64;top:calc(env(safe-area-inset-top) + 12px);left:16px;display:grid;place-items:center;width:40px;height:40px;padding:8px;border:0;border-radius:50%;background:var(--page-card);color:var(--page-text);box-shadow:0 3px 14px #39263106;cursor:pointer; }
.app-menu-toggle .i { width:22px;height:22px;stroke-width:1.45; }
body:has(#app[hidden]) :is(.app-menu-toggle,.app-menu-scrim,.app-sidebar) { display:none; }
.app-menu-scrim { position:fixed;z-index:180;inset:0;border:0;background:rgba(83,65,76,.13);padding:0;cursor:pointer; }
.app-menu-scrim[hidden] { display:none; }
.app-sidebar { position:fixed;z-index:181;inset:0 auto 0 0;width:var(--sidebar-width);height:100dvh;max-height:100%;isolation:isolate;display:flex;flex-direction:column;overflow:hidden;border-radius:0 34px 26px 0;background:var(--page-bg);color:var(--page-text);box-shadow:12px 0 42px #49333d18;transform:translateX(-105%);visibility:hidden;transition:transform .32s cubic-bezier(.2,.8,.2,1),visibility .32s; }
html[data-sidebar-open="true"] .app-sidebar { transform:translateX(0);visibility:visible; }
.app-sidebar::before { content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background-image:radial-gradient(ellipse 3px 8px at 50% 50%,#ffffff70 0 50%,transparent 60%),radial-gradient(ellipse 8px 3px at 50% 50%,#ffffff70 0 50%,transparent 60%);background-size:54px 54px;opacity:.75; }
.sidebar-scroll { flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:calc(env(safe-area-inset-top) + 30px) 22px 16px; }
.sidebar-scroll::-webkit-scrollbar { display:none; }
.sidebar-close { position:absolute;z-index:3;top:calc(env(safe-area-inset-top) + 9px);right:12px;width:36px;height:36px;display:grid;place-items:center;background:transparent;border:0;border-radius:50%;color:var(--page-subtext);font:24px Georgia,serif;cursor:pointer; }
.sidebar-hero { text-align:center;margin:8px -8px 27px; }
.sidebar-duo { position:relative;width:184px;height:184px;margin:0 auto 18px;filter:drop-shadow(0 6px 8px #735c6910); }
.sidebar-heart { position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none; }
.sidebar-portraits { position:absolute;left:35px;right:35px;top:51px;height:78px;display:flex;align-items:center;justify-content:center;gap:0; }
.sidebar-portrait { position:relative;display:grid;place-items:center;width:64px;height:64px;flex:none;overflow:hidden;border:2px solid #fff;border-radius:50%;background:var(--page-accent-soft);color:var(--page-subtext);font:21px Georgia,"Songti SC",serif;padding:0;cursor:pointer; }
.sidebar-portrait + .sidebar-portrait { margin-left:-9px; }
.sidebar-portrait img { width:100%;height:100%;object-fit:cover; }
.sidebar-title { margin:0;font-family:Georgia,"Songti SC",serif;font-size:30px;line-height:1.3;font-weight:400;letter-spacing:.015em; }
.sidebar-title::before,.sidebar-title::after { content:"✧";font-size:12px;vertical-align:middle;color:var(--page-subtext);opacity:.5;margin:0 12px; }
.sidebar-subtitle { margin:13px 0 0;font:11px/1.8 ui-monospace,Consolas,monospace;letter-spacing:.045em;color:var(--page-subtext);opacity:.8; }
.sidebar-menu { display:flex;flex-direction:column;gap:1px; }
.sidebar-row { display:flex;align-items:center;gap:13px;min-height:54px;width:100%;padding:10px 2px;border:0;border-radius:0;background:transparent;color:var(--page-text);text-align:left;cursor:pointer;list-style:none;font:20px/1.3 Georgia,"Songti SC","Noto Serif SC",serif; }
.sidebar-row::-webkit-details-marker { display:none; }
.sidebar-row > .i { width:19px;height:19px;flex:none;stroke-width:1.45;color:var(--page-subtext);opacity:.8; }
.sidebar-row-label { flex:0 1 auto;min-width:0; }
.sidebar-row-dots { flex:1;min-width:12px;height:1px;background:radial-gradient(circle,currentColor .8px,transparent 1px) 0 center/7px 2px repeat-x;opacity:.25; }
.sidebar-chevron { flex:none;color:var(--page-subtext);font:22px/1 Georgia,serif;opacity:.6;transition:transform .2s; }
.sidebar-group[open] > summary .sidebar-chevron { transform:rotate(90deg); }
.sidebar-group:nth-child(2n+1)::after { content:"✧ · · · · · · · · · · · · · · · · ·";display:block;margin:6px 0 10px;color:var(--page-subtext);font-size:10px;letter-spacing:2px;opacity:.28;white-space:nowrap;overflow:hidden; }
.sidebar-submenu { padding:2px 0 12px 30px; }
.sidebar-row-child { min-height:44px;font-size:14px;gap:7px; }
.sidebar-row-child > .i { width:13px;height:13px;opacity:.4; }
.sidebar-row-child .sidebar-row-dots { display:none; }
.sidebar-row-child .sidebar-chevron { margin-left:auto;font-size:16px; }
.sidebar-row:hover,.sidebar-row:active { color:var(--page-accent); }
.app-sidebar :is(button,summary):focus-visible,.app-menu-toggle:focus-visible { outline:2px solid var(--page-accent);outline-offset:3px;border-radius:9px; }
.sidebar-lace-edge { position:relative;z-index:2;flex:none;width:100%;height:calc(58px + env(safe-area-inset-bottom));overflow:hidden;pointer-events:none;background:var(--page-bg); }
.sidebar-lace-edge::after { content:"";position:absolute;inset:0;background-image:none;background-size:calc(100% + 20px) auto;background-position:center calc(100% + 9px);background-repeat:no-repeat; }
.sidebar-settings-landing { min-height:55vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px;text-align:center; }
.sidebar-landing-mark { color:var(--page-accent);font:50px Georgia,serif;margin:0 0 20px; }
.sidebar-settings-landing h2 { font-size:28px;font-weight:400;margin:0 0 18px; }
.sidebar-settings-landing > p:not(.sidebar-landing-mark) { font-size:14px;line-height:1.8;color:var(--page-subtext); }
.sidebar-preferences-button { margin-top:18px;padding:11px 22px;min-height:44px;border:1px solid var(--page-line);border-radius:24px;background:var(--page-card);color:var(--page-text);font:inherit;cursor:pointer; }
/* Keep ordinary detail-page Back at the left and the menu at the right. */
html[data-app-view="settings"]:has(#settings-body.settings-child) .app-menu-toggle,
html[data-app-view="settings"]:has(#settings-nav:not(.settings-root-nav):not(:disabled)) .app-menu-toggle { left:auto;right:16px; }
html[data-app-view="settings"] #settings .sheet-head { padding-left:64px;padding-right:64px; }
html[data-app-view="chat"] #open-conversations { visibility:visible; }
html[data-app-view="chat"] .app-menu-toggle { left:auto;right:16px; }
html[data-app-view="chat-list"] .conversation-panel-tools { padding-left:54px; }
#view-home .nyari-home-heading { padding-top:40px; }
.space-page > .space-header { padding-top:36px; }
#view-him .space-header { text-align:center; }
#view-him .space-header > button,#view-him .space-eyebrow { display:none; }
#view-him .space-empty { margin-top:45px;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:transparent !important;border:0;box-shadow:none; }
#view-him .space-empty::before { content:"♡";font:56px Georgia,serif;color:var(--page-accent);margin-bottom:20px; }
@media(max-width:360px) { .sidebar-scroll { padding-left:18px;padding-right:18px; }.sidebar-title { font-size:26px; }.sidebar-row { font-size:18px; }.sidebar-duo { width:170px;height:170px; }.sidebar-portraits { top:45px;left:29px;right:29px; } }
@media(prefers-reduced-motion:reduce) { .app-sidebar,.sidebar-chevron { transition:none; } }

html[data-sidebar-open="true"] .sidebar-lace-edge::after { background-image:url("/static/assets/sidebar-lace.png"); }
:is(#view-notes,#view-letters,#view-memories) .hub-subhead { padding-top:46px; }
html[data-app-view="chat-list"] .chat-list-actions { display:none !important; }
