/* Shared across every page: navigation stays on one row. */
@media(min-width:761px){
  body .sidebar{padding-top:0}
  body .sidebar>.brand{height:70px;min-height:70px;display:flex;align-items:center}
}
body .app .topbar{height:70px;min-height:70px;display:flex;flex-wrap:nowrap;align-items:center;gap:16px;padding-block:10px}
body .app .topbar-start{flex:1 1 auto;min-width:0;flex-wrap:nowrap}
body .app .topbar .breadcrumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .app .topbar-right{display:flex;flex:0 1 auto;min-width:0;flex-wrap:nowrap;align-items:center;gap:16px}
body .app .header-account-menu{flex:0 1 200px;min-width:80px}
body .app .header-account-menu>summary{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body .app .collection-nav{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:42px;flex-shrink:0;padding:6px;border-radius:6px;font-size:12px;white-space:nowrap}
body .app .collection-nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6}
body .app .topbar-right>time{white-space:nowrap;flex-shrink:0}
@media(max-width:1100px){body .app .topbar-right{gap:10px}body .app .topbar-right>time{display:none}body .app .header-account-menu{max-width:150px}body .app .theme-toggle span{display:none}}
@media(max-width:750px){body .app .topbar{padding-inline:12px;gap:6px}body .app .topbar-start .breadcrumb{display:none}body .app .topbar-start{flex:0 0 auto}body .app .topbar-right{flex:1;justify-content:flex-end;gap:7px}body .app .topbar-right>.all-indicators-button{display:none}body .app .header-account-menu{min-width:42px;max-width:120px}body .app .collection-nav{min-width:35px;padding:3px}body .app .language-switch a{padding:6px}body .app .theme-toggle{padding:6px}}
/* Logo-inspired violet keeps the signed-in identity easy to find. */
:root{--account-accent:#8024d9}
html[data-theme="dark"]{--account-accent:#d687ff}
.header-account-menu>summary strong,.header-account-email{font-weight:750;color:var(--account-accent)}
.header-account-email{font-size:13px;overflow-wrap:anywhere;line-height:1.5}
.header-user-menu{display:grid;gap:12px;padding-block:12px;border-block:1px solid var(--line)}
.header-account-dropdown{max-height:calc(100dvh - 90px);overflow-y:auto}
html[data-theme="dark"] .sidebar .nav-label{color:#fff}
.sidebar>.sidebar-create-story{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0 20px;padding:13px 10px;background:#8024d9;color:#fff;border:1px solid #8024d9;border-radius:10px;font-weight:700;text-decoration:none;line-height:1.4}
.sidebar>.sidebar-create-story:hover{background:#6b1bb9;color:#fff}
.sidebar-create-story svg{width:21px;height:21px;fill:none;stroke:currentColor}
.sidebar-create-story:focus-visible,.collection-nav:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.collection-preview{position:relative;flex-shrink:0;--collection-accent:var(--account-accent)}
.collection-preview[data-collection-preview="favorites"]{--collection-accent:#b52b71}
html[data-theme="dark"] .collection-preview[data-collection-preview="favorites"]{--collection-accent:#ff91c6}
body .app .collection-preview>.collection-nav{position:relative;width:38px;min-width:38px;height:36px;padding:7px;border:1px solid color-mix(in srgb,var(--collection-accent) 35%,var(--line));background:color-mix(in srgb,var(--collection-accent) 9%,var(--panel));color:var(--collection-accent);border-radius:9px;cursor:pointer}
body .app .collection-preview>.collection-nav svg{width:20px;height:20px;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.collection-preview .collection-nav [data-collection-count]{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 3px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:var(--collection-accent);color:var(--panel);font-size:10px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;border:2px solid var(--panel);z-index:1}
.collection-popover{position:absolute;top:calc(100% + 10px);right:0;z-index:1200;width:350px;max-width:calc(100vw - 24px);padding:16px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:14px;box-shadow:0 14px 40px #0003;text-align:left;white-space:normal}
.collection-popover[hidden]{display:none}
.collection-popover-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;color:var(--collection-accent)}
.collection-popover-heading button{border:0;background:transparent;color:var(--muted);font-size:24px;cursor:pointer;width:32px;height:32px}
.collection-popover [data-preview-content]{max-height:min(360px,55dvh);overflow:auto;font-size:13px;line-height:1.5}
.collection-popover ul{list-style:none;padding:0;margin:0;display:grid;gap:0}
.collection-popover li{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:start;gap:9px;padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.collection-preview-kind{padding:2px 4px;border-radius:5px;font-size:10px;text-align:center;background:color-mix(in srgb,var(--blue) 12%,var(--panel));color:var(--blue)}
.collection-preview-kind.event{background:color-mix(in srgb,var(--green) 12%,var(--panel));color:var(--green)}
.collection-popover-open{display:block;margin-top:14px;padding:10px;text-align:center;border-radius:8px;background:color-mix(in srgb,var(--collection-accent) 10%,var(--panel));color:var(--collection-accent);font-size:13px;font-weight:700;text-decoration:none}
@media(max-width:750px){.collection-popover{position:fixed;top:78px;left:12px;right:12px;width:auto}.collection-preview{margin-right:3px}body .app .collection-preview>.collection-nav{width:36px;min-width:36px;height:36px}}
/* Shared control height; text buttons retain the width their labels need. */
body .app .topbar :is(.header-admin-menu>summary,.header-account-menu>summary,.theme-toggle,.collection-preview>.collection-nav){box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:6px;height:36px;min-height:36px;border:1px solid var(--line);border-radius:8px;padding:0 10px;font-size:11px;line-height:1;cursor:pointer}
body .app .topbar .header-account-menu>summary{background:color-mix(in srgb,var(--account-accent) 7%,var(--panel));border-color:color-mix(in srgb,var(--account-accent) 35%,var(--line));color:var(--account-accent);list-style:none}
body .app .header-account-menu>summary::-webkit-details-marker{display:none}
body .app .header-account-menu>summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body .app .topbar .collection-preview>.collection-nav{width:36px;min-width:36px;padding:7px;border-color:color-mix(in srgb,var(--collection-accent) 35%,var(--line))}
body .app .topbar .language-switch{box-sizing:border-box;height:36px;border-radius:8px;overflow:hidden}
body .app .topbar .language-switch a{display:flex;align-items:center;justify-content:center;min-width:30px;padding:0 7px;line-height:1}
.header-account-admin{display:grid;gap:14px}.header-account-admin a[aria-current=page]{color:var(--blue);background:color-mix(in srgb,var(--blue) 9%,var(--panel))}
.topbar .header-admin-group :is(a,.eyebrow){margin-inline:0;padding-inline:0;text-align:left}
body .app .topbar .header-account-menu>summary:hover,body .app .topbar .header-account-menu[open]>summary{border-color:var(--account-accent)}
body .app .topbar summary:focus-visible{outline:2px solid var(--account-accent);outline-offset:2px}
@media(max-width:750px){body .app .topbar-right{gap:6px}body .app .topbar .header-account-menu>summary{padding:0 6px}body .app .topbar .theme-toggle{width:36px;padding:0}body .app .header-account-menu{min-width:42px;max-width:100px}.header-account-dropdown{position:fixed;right:12px;top:76px;max-width:calc(100vw - 24px)}}
