/* Shared page palette. The original Tsumi styling remains the default. */
html[data-theme="akatsuki"]{--theme-ink:#050507;--theme-panel:#181417;--theme-accent:#e82f3a;--theme-accent-strong:#be1826;--theme-muted:#b4a3a6;--theme-text:#f5f0f1;--theme-banner:url('./TsumiAkatsukiHeaderHD.webp')}
html[data-theme="frieren"]{--theme-ink:#1f211d;--theme-panel:#363a31;--theme-accent:#e2cf97;--theme-accent-strong:#81b99d;--theme-muted:#c2c0ad;--theme-text:#faf5e1;--theme-banner:url('./TsumiFrierenHeaderHD.webp')}
html[data-theme="lucy"]{--theme-ink:#05070e;--theme-panel:#121b29;--theme-accent:#59dbe8;--theme-accent-strong:#ef69b1;--theme-muted:#aebbd0;--theme-text:#f1f4f9;--theme-banner:url('./TsumiLucyHeaderHD.webp')}
html[data-theme="rize"]{--theme-ink:#08040c;--theme-panel:#24152d;--theme-accent:#cb6fe4;--theme-accent-strong:#9d46c2;--theme-muted:#b9a5c2;--theme-text:#f6edfa;--theme-banner:url('./TsumiRizeHeaderHD.webp')}
html[data-theme="hibana"]{--theme-ink:#111114;--theme-panel:#292227;--theme-accent:#efc9d6;--theme-accent-strong:#d59bb1;--theme-muted:#baaeb1;--theme-text:#f2eade;--theme-banner:url('./TsumiHibanaHeaderHD.webp')}
html[data-theme="levi"]{--theme-ink:#0b1010;--theme-panel:#1c2824;--theme-accent:#becfa4;--theme-accent-strong:#6f9f80;--theme-muted:#aebbb0;--theme-text:#edebda;--theme-banner:url('./TsumiLeviHeader.webp')}
html[data-theme="maomao"]{--theme-ink:#0d1615;--theme-panel:#24342b;--theme-accent:#dabd7f;--theme-accent-strong:#70ac89;--theme-muted:#b5bba6;--theme-text:#f2ead5;--theme-banner:url('./TsumiMaomaoHeader.webp')}

html[data-theme]:not([data-theme="tsumi"]){
  --theme-art-max:2172px;--theme-art-ratio:3 / 1;
  --bg:var(--theme-ink);--ink:var(--theme-ink);--surface:var(--theme-panel);
  --panel:var(--theme-panel);--panel-solid:var(--theme-panel);
  --pink:var(--theme-accent);--rose:var(--theme-accent-strong);
  --accent:var(--theme-accent-strong);--accent-hover:var(--theme-accent);
  --text:var(--theme-text);--muted:var(--theme-muted);
  --ui-surface:var(--theme-panel);--ui-line:color-mix(in srgb,var(--theme-accent) 32%,transparent);
  --button-dark:var(--theme-panel);--button-pink:var(--theme-accent);
  --button-muted-border:color-mix(in srgb,var(--theme-accent) 38%,var(--theme-panel));
  --button-ink:var(--theme-ink);--button-text:var(--theme-text);
  --header-control-text:var(--theme-text);
  --header-control-bg:color-mix(in srgb,var(--theme-ink) 45%,var(--theme-panel));
  --header-control-border:color-mix(in srgb,var(--theme-accent) 32%,transparent);
  --line:color-mix(in srgb,var(--theme-accent) 30%,transparent);
}
html[data-theme]:not([data-theme="tsumi"]) body{position:relative;isolation:isolate;background:var(--theme-ink)!important;color:var(--theme-text)}

/* Let the banner sit behind the first screen of content and fade into the page. */
html[data-theme]:not([data-theme="tsumi"]) .public-header-bar,
html[data-theme]:not([data-theme="tsumi"]) body .workspace>.workspace-header,
html[data-theme]:not([data-theme="tsumi"]) body:not(.auth-page)>header{
  background:color-mix(in srgb,var(--theme-ink) 88%,transparent)!important;
  border-bottom-color:color-mix(in srgb,var(--theme-accent) 48%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body::before{
  content:""!important;position:absolute!important;inset:86px auto auto 50%!important;
  z-index:-1!important;width:min(100%,var(--theme-art-max))!important;height:auto!important;
  aspect-ratio:var(--theme-art-ratio);transform:translateX(-50%);
  pointer-events:none!important;opacity:.7;
  background:var(--theme-banner) center top/contain no-repeat!important;
  -webkit-mask-image:linear-gradient(90deg,transparent,black 9%,black 91%,transparent),linear-gradient(180deg,black 0%,black 36%,transparent);
  mask-image:linear-gradient(90deg,transparent,black 9%,black 91%,transparent),linear-gradient(180deg,black 0%,black 36%,transparent);
  -webkit-mask-composite:source-in;mask-composite:intersect;
}
@media(max-width:850px){html[data-theme]:not([data-theme="tsumi"]) body::before{top:76px!important}}
html[data-theme]:not([data-theme="tsumi"]) .rail{background:var(--theme-ink)!important;border-color:var(--line)!important}
html[data-theme]:not([data-theme="tsumi"]) .rail nav a[aria-current]{
  --button-border:var(--theme-accent)!important;--button-bg:color-mix(in srgb,var(--theme-accent) 18%,var(--theme-panel))!important;
  border-color:var(--theme-accent)!important;background:color-mix(in srgb,var(--theme-accent) 18%,var(--theme-panel))!important;color:var(--theme-text)!important;
}
html[data-theme]:not([data-theme="tsumi"]) :is(body.reseller-workspace .rail .reseller-menu summary,body.admin-workspace .rail nav .admin-reseller-menu[open]>summary){
  border-color:var(--theme-accent)!important;
  background:color-mix(in srgb,var(--theme-accent) 18%,var(--theme-panel))!important;
  color:var(--theme-text)!important;
  box-shadow:0 0 14px color-mix(in srgb,var(--theme-accent) 25%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) :is(.panel,.next-panel,.launcher,.license,.support,.theme-picker,.menu-preview,.how-card,.detail-card,.compact-card,.directory-group,.public-product-status){border-color:var(--line)!important;background-color:var(--theme-panel)!important}
html[data-theme]:not([data-theme="tsumi"]) :is(.access-card,.auth-layout){
  border-color:var(--line)!important;
  background:radial-gradient(circle at 90% 0%,color-mix(in srgb,var(--theme-accent) 12%,transparent),transparent 56%),var(--theme-panel)!important;
}
html[data-theme]:not([data-theme="tsumi"]) :is(.access-note,.quick-item,.auth-card input){
  border-color:color-mix(in srgb,var(--theme-accent) 28%,transparent)!important;
  background-color:color-mix(in srgb,var(--theme-ink) 48%,var(--theme-panel))!important;
}
html[data-theme]:not([data-theme="tsumi"]) .access-note,
html[data-theme]:not([data-theme="tsumi"]) .auth-card a{color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) .auth-page .auth-card button[type="submit"]{
  --button-bg:var(--theme-accent)!important;--button-fg:var(--theme-ink)!important;
  background:var(--theme-accent)!important;border-color:var(--theme-accent)!important;color:var(--theme-ink)!important;
  box-shadow:0 8px 24px color-mix(in srgb,var(--theme-accent) 16%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) .auth-page .auth-card button[type="submit"]:hover{
  background:var(--theme-accent-strong)!important;border-color:var(--theme-accent-strong)!important;
}
html[data-theme]:not([data-theme="tsumi"]) :is(.eyebrow,.pink,.version,.feature-label,.theme-option[aria-pressed="true"],.preview-title span){color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) :is(.button.primary,button.primary,.preview-row.active,.rail nav a[aria-current="page"],.rail nav a.selected){border-color:var(--theme-accent)!important;background:color-mix(in srgb,var(--theme-accent-strong) 42%,var(--theme-panel))!important;color:var(--theme-text)!important}
html[data-theme]:not([data-theme="tsumi"]) :is(.button,.outline,.quiet,.nav-button,.theme-option,.site-theme-option){border-color:color-mix(in srgb,var(--theme-accent) 48%,transparent)!important}
html[data-theme]:not([data-theme="tsumi"]) :is(.button,.outline,.quiet,.nav-button):is(:hover,:focus-visible){border-color:var(--theme-accent)!important;box-shadow:0 0 15px color-mix(in srgb,var(--theme-accent) 22%,transparent)!important}
html[data-theme]:not([data-theme="tsumi"]) :is(.rail .nav-dot,.theme-dot){background:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) #landing-header #landing-nav a:not(.button):is(:hover,:focus-visible){color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) #landing-header #landing-nav a:not(.button){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme="tsumi"]) body.landing-page a.dashboard-entry,
html[data-theme]:not([data-theme="tsumi"]) #license-activation button.primary{
  --button-bg:var(--theme-accent)!important;--button-fg:var(--theme-ink)!important;--button-border:var(--theme-accent)!important;
  --button-hover-bg:var(--theme-accent-strong)!important;--button-hover-border:var(--theme-accent-strong)!important;
  background:var(--theme-accent)!important;border-color:var(--theme-accent)!important;color:var(--theme-ink)!important;
}
html[data-theme]:not([data-theme="tsumi"]) :is(button,input[type="submit"],input[type="button"],a.button,a.nav-button):not(.danger):not(.delete-user-button):not(.success){
  --button-border:color-mix(in srgb,var(--theme-accent) 52%,var(--theme-panel));
  --button-hover-border:var(--theme-accent);
  --button-hover-bg:color-mix(in srgb,var(--theme-accent) 16%,var(--theme-panel));
  --button-glow:0 0 18px color-mix(in srgb,var(--theme-accent) 25%,transparent);
}
html[data-theme]:not([data-theme="tsumi"]) :is(header,#tsumi-header-theme) :is(a,#tsumi-header-control):is([aria-current="page"],[aria-current="location"],.ui-active-section){
  border-color:var(--theme-accent)!important;box-shadow:inset 0 0 0 1px var(--theme-accent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) .workspace-header .breadcrumb span{color:var(--theme-accent)}

.site-theme-picker{margin:0;padding:clamp(20px,2vw,28px);border:1px solid #503342;border-radius:14px;background:rgba(22,14,24,.94)}
.site-theme-picker h2{margin:7px 0 8px;font-size:22px;font-weight:600}
.site-theme-picker p{margin:0;color:var(--muted);line-height:1.6}
.site-theme-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}
.site-theme-option{display:flex;align-items:center;gap:10px;min-height:46px;padding:10px 12px;border:1px solid #694052;border-radius:9px;background:#21151f;color:var(--text);font:700 12px Arial,sans-serif;cursor:pointer;text-align:left;transition:background .18s ease,border-color .18s ease}
.site-theme-option:hover,.site-theme-option:focus-visible{border-color:#bb7898;background:#301d2a}
.site-theme-option[aria-pressed="true"]{border-color:#c781a0;background:#382030;box-shadow:inset 3px 0 0 #f3a1bc}
.site-theme-swatch{width:18px;height:18px;flex:0 0 18px;border:2px solid #ffffff77;border-radius:50%;background:var(--swatch)}
@media(min-width:1500px){.site-theme-options{grid-template-columns:repeat(8,minmax(0,1fr))}}
@media(max-width:700px){.site-theme-options{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Dashboard artwork and controls use the active palette instead of fixed Blossom pink. */
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .tsumi-petals{display:none!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.launcher,.license,#updates,.site-theme-picker){
  border-color:var(--line)!important;
  color:var(--theme-text)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .launcher{
  background:radial-gradient(ellipse at 82% 40%,color-mix(in srgb,var(--theme-accent) 18%,transparent),transparent 60%),
    linear-gradient(115deg,color-mix(in srgb,var(--theme-accent) 7%,var(--theme-panel)),var(--theme-ink))!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.license,#updates,.site-theme-picker){
  background:var(--theme-panel)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.license,.launcher,#updates,.site-theme-picker):hover{
  border-color:color-mix(in srgb,var(--theme-accent) 56%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.launcher-copy p,.download-caption,.license dt,#feed .feed-item p,.site-theme-picker p){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.version,.pill,.art-label,.license-disclosure summary,#license-activation label){color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .version{border-color:var(--line)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .orbit{border-color:color-mix(in srgb,var(--theme-accent) 19%,transparent)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .orbit-one{border-top-color:color-mix(in srgb,var(--theme-accent) 60%,transparent)!important;border-right-color:color-mix(in srgb,var(--theme-accent) 35%,transparent)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .spark{text-shadow:0 0 12px var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .hero-art>img{filter:grayscale(1) brightness(0) invert(1) drop-shadow(0 0 20px var(--theme-accent))!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.wordmark img,.membership-logo[src$="tsumi_logo.png"],.section-top img,.announcement-icon,#download img){filter:grayscale(1) brightness(0) invert(1)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .license dl div{border-bottom-color:var(--line)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.license-disclosure,.feed-pagination){border-color:var(--line)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .license-disclosure .license-activation{
  border-color:var(--line)!important;background:color-mix(in srgb,var(--theme-ink) 42%,var(--theme-panel))!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .license-disclosure .license-activation:focus-within{
  border-color:var(--theme-accent)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 15%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(#license-key,.site-theme-option){
  border-color:var(--line)!important;background:color-mix(in srgb,var(--theme-accent) 9%,var(--theme-panel))!important;color:var(--theme-text)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page #license-key:focus-visible{
  border-color:var(--theme-accent)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 15%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .site-theme-option[aria-pressed="true"]{
  border-color:var(--theme-accent)!important;background:color-mix(in srgb,var(--theme-accent) 18%,var(--theme-panel))!important;
  box-shadow:inset 3px 0 0 var(--theme-accent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(#download,#license-activation button.primary){
  --button-bg:color-mix(in srgb,var(--theme-accent) 32%,var(--theme-panel))!important;
  --button-border:var(--theme-accent)!important;--button-fg:var(--theme-text)!important;
  --button-hover-bg:color-mix(in srgb,var(--theme-accent) 48%,var(--theme-panel))!important;
  --button-hover-border:var(--theme-accent)!important;--button-hover-fg:var(--theme-text)!important;
  --button-glow:0 0 20px color-mix(in srgb,var(--theme-accent) 30%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.license .outline,.feed-pagination button){
  --button-bg:transparent!important;--button-border:var(--line)!important;--button-fg:var(--theme-text)!important;
  --button-hover-bg:color-mix(in srgb,var(--theme-accent) 15%,var(--theme-panel))!important;
  --button-hover-border:var(--theme-accent)!important;--button-hover-fg:var(--theme-text)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.section-highlight,.license-disclosure summary:focus-visible){
  border-color:var(--theme-accent)!important;outline-color:var(--theme-accent)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--theme-accent) 40%,transparent)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .rail nav a img{filter:grayscale(1) brightness(0) invert(1)!important;opacity:.75!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .rail nav a[aria-current] img{opacity:1!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(#motion,.workspace-rail-toggle,.overview-help){
  --button-bg:color-mix(in srgb,var(--theme-ink) 45%,var(--theme-panel))!important;
  --button-border:var(--line)!important;--button-fg:var(--theme-text)!important;
  --button-hover-bg:color-mix(in srgb,var(--theme-accent) 16%,var(--theme-panel))!important;
  --button-hover-border:var(--theme-accent)!important;--button-hover-fg:var(--theme-text)!important;
  border-color:var(--line)!important;background-color:var(--theme-panel)!important;color:var(--theme-text)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .overview-help:hover{border-color:var(--theme-accent)!important;background:color-mix(in srgb,var(--theme-accent) 16%,var(--theme-panel))!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .overview-help:focus-visible{outline-color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page :is(.avatar,.date){border-color:var(--line)!important;background:var(--theme-panel)!important;color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .breadcrumb span{color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .overview-help img{filter:grayscale(1) brightness(0) invert(1)!important}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .rail-bottom button span{color:var(--theme-accent)!important}
html[data-theme]:not([data-theme="tsumi"]) :is(header,#tsumi-header-theme) :is(button,a:not(.brand):not(.public-brand),.motion-switch,#tsumi-header-control):not(.language-toggle):is(:hover,:focus-visible){
  background-color:color-mix(in srgb,var(--theme-accent) 16%,var(--theme-panel))!important;
  border-color:var(--theme-accent)!important;color:var(--theme-text)!important;
}
html[data-theme]:not([data-theme="tsumi"]) body.dashboard-page .avatar{box-shadow:0 0 15px color-mix(in srgb,var(--theme-accent) 30%,transparent)!important}
