.ds-page {margin:0;}
.ds-page.ds-theme-light {background:#310b28;}
.ds-page:not(.browse-layout) :is(#columns,#main-wrapper) {box-sizing:border-box;width:min(1130px,calc(100% - 28px));margin-inline:auto;}
.ds-page.ds-theme-dark :is(#main,#main-bottom) {background-size:100% auto;}
#ds-site-header {
    --ds-surface:#fff;--ds-soft:#f7f3f6;--ds-ink:#291f2a;--ds-muted:#605463;
    --ds-edge:#ddd5de;--ds-accent:#892251;--ds-tint:#f7e7ef;--ds-focus:#13669a;
    box-sizing:border-box;width:min(1130px,calc(100% - 28px));margin:10px auto;
    color:var(--ds-ink);background:var(--ds-surface);border:1px solid var(--ds-edge);
    border-radius:11px;font:14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;text-align:start;
}
#ds-site-header.ds-dark {
    --ds-surface:#202329;--ds-soft:#292d34;--ds-ink:#f2edf2;--ds-muted:#c2bbc7;
    --ds-edge:#49434f;--ds-accent:#ffb0ce;--ds-tint:#442a38;--ds-focus:#99d7ff;
}
#ds-site-header *,#ds-site-header *::before,#ds-site-header *::after {box-sizing:border-box;}
#ds-site-header :is(a:link,a:visited) {color:inherit;text-decoration:none;}
#ds-site-header :is(a,button):focus-visible {outline:2px solid var(--ds-focus);outline-offset:2px;}
#ds-site-header a:hover,#ds-site-header button:hover {text-decoration:underline;}
#ds-site-header .ds-brand {
    display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;
    padding:7px 14px;border-radius:10px 10px 0 0;background:#342335;color:#fff;
}
#ds-site-header .ds-logo {display:inline-flex;align-items:center;max-width:100%;}
#ds-site-header .ds-logo img {display:block;width:145px;max-width:100%;height:auto;border:0;}
#ds-site-header .ds-promo {display:flex;align-items:center;flex-wrap:wrap;gap:2px 10px;min-width:0;}
#ds-site-header .ds-promo a {display:inline-flex;align-items:center;min-height:32px;padding:0 4px;font-size:12px;color:#f9eef6;}
#ds-site-header .ds-promo a:first-child {font-weight:650;}
#ds-site-header .ds-nav {
    display:flex;align-items:stretch;flex-wrap:wrap;gap:3px;padding:5px 8px;
    border-bottom:1px solid var(--ds-edge);background:var(--ds-soft);
}
#ds-site-header .ds-nav a {
    display:flex;flex:1 0 auto;align-items:center;justify-content:center;
    min-height:35px;max-width:100%;padding:5px 9px;border:1px solid transparent;
    border-radius:5px;font-size:14px;font-weight:620;line-height:1.25;text-align:center;
}
#ds-site-header .ds-nav a:hover,#ds-site-header .ds-nav a[aria-current="page"] {
    color:var(--ds-accent);background:var(--ds-tint);text-decoration:none;
}
#ds-site-header .ds-nav a[aria-current="page"] {border-color:var(--ds-accent);}
#ds-site-header .ds-account {padding:6px 12px;}
#ds-site-header .ds-identity {display:flex;align-items:center;flex-wrap:wrap;gap:5px 16px;min-width:0;}
#ds-site-header .ds-welcome {display:flex;align-items:center;flex-wrap:wrap;gap:3px 5px;min-width:0;max-width:100%;font-size:14px;}
#ds-site-header .ds-welcome span {color:var(--ds-muted);}
#ds-site-header .ds-welcome a {font-weight:700;overflow-wrap:anywhere;min-width:0;max-width:100%;}
#ds-site-header .ds-stats {display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 14px;margin:0;min-width:0;}
#ds-site-header .ds-stats div {display:flex;flex-wrap:wrap;gap:4px;align-items:baseline;max-width:100%;}
#ds-site-header :is(.ds-stats dt,.ds-stats dd,.ds-clock) {margin:0;font-size:12px;}
#ds-site-header :is(.ds-stats dt,.ds-clock) {color:var(--ds-muted);}
#ds-site-header .ds-stats dd {font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
#ds-site-header .ds-identity .ds-clock {margin-inline-start:auto;font-variant-numeric:tabular-nums;}
#ds-site-header .ds-tools {display:flex;align-items:center;flex-wrap:wrap;gap:2px 5px;margin-top:4px;}
#ds-site-header .ds-tools :is(a,button) {
    display:inline-flex;align-items:center;gap:4px;max-width:100%;min-height:28px;padding:3px 5px;
    border:0;background:transparent;color:var(--ds-muted);font:580 12px/1.35 system-ui,sans-serif;cursor:pointer;
}
#ds-site-header .ds-tools :is(a,button):hover {color:var(--ds-accent);background:var(--ds-soft);border-radius:4px;}
#ds-site-header .ds-tools b {padding:0 4px;border-radius:3px;background:var(--ds-soft);color:var(--ds-ink);font-variant-numeric:tabular-nums;}
#ds-site-header .ds-unread {color:var(--ds-accent);font-weight:700;}
#ds-site-header .br-support {
    display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:2px 14px;
    margin:0;max-width:none;padding:5px 10px;border-top:1px solid var(--ds-edge);
    border-radius:0 0 10px 10px;background:var(--ds-soft);color:var(--ds-muted);font:12px/1.5 system-ui,sans-serif;
}
#ds-site-header .br-support a {color:var(--ds-accent);font-weight:650;text-decoration:underline;}
#ds-site-header .br-support meter {vertical-align:middle;width:60px;}
/* Keep wide legacy page content in its own scrolling area on small screens. */
@media(max-width:1050px) {
    #ds-site-header {width:calc(100% - 12px);margin:6px auto;}
    .ds-page:not(.browse-layout) :is(#columns,#main-wrapper) {width:calc(100% - 12px);}
    .ds-page :is(#columns,#wrapper,#main-wrapper,#main,#main-inner,#footer,#page-bottom) {box-sizing:border-box;max-width:100%;min-width:0;}
    .ds-page :is(#columns,#main-inner,#footer,#page-bottom) {overflow-x:auto;}
}
@media(max-width:650px) {
    #ds-site-header .ds-brand {padding:5px 8px;gap:2px 6px;}
    #ds-site-header .ds-logo img {width:118px;}
    #ds-site-header .ds-promo {gap:0 3px;}
    #ds-site-header .ds-promo a {padding-inline:2px;font-size:11px;}
    #ds-site-header .ds-nav {gap:2px;padding:4px;}
    #ds-site-header .ds-nav a {min-height:34px;padding:4px 7px;font-size:13px;}
    #ds-site-header .ds-account {padding:6px 8px;}
    #ds-site-header .ds-identity {gap:3px 10px;}
    #ds-site-header .ds-identity .ds-clock {margin-inline-start:0;}
    #ds-site-header .ds-tools {column-gap:2px;}
}
