/* ZYRVO v2.4.3 — Appearance Center & Contrast Pass */
:root{
  --zy-muted-strong:#b8afc3;
  --zy-text-soft:#d9d2e3;
  --zy-accent:#8b5cf6;
  --zy-accent-2:#c026d3;
  --zy-accent-3:#6d28d9;
  --zy-accent-rgb:139,92,246;
  --zy-accent-soft:rgba(var(--zy-accent-rgb),.16);
  --zy-accent-border:rgba(var(--zy-accent-rgb),.42);
  --zy-violet:var(--zy-accent);
  --zy-violet-2:var(--zy-accent-2);
  --zy-violet-3:var(--zy-accent-3);
}
html[data-zy-time-theme="day"]{
  --zy-muted-strong:#5f5369;
  --zy-text-soft:#403747;
}

/* Accent packs */
html[data-zy-accent="violet"]{--zy-accent:#7c3aed;--zy-accent-2:#c026d3;--zy-accent-3:#5b21b6;--zy-accent-rgb:124,58,237}
html[data-zy-accent="indigo"]{--zy-accent:#4f46e5;--zy-accent-2:#06b6d4;--zy-accent-3:#3730a3;--zy-accent-rgb:79,70,229}
html[data-zy-accent="rose"]{--zy-accent:#e11d48;--zy-accent-2:#db2777;--zy-accent-3:#9f1239;--zy-accent-rgb:225,29,72}
html[data-zy-accent="amber"]{--zy-accent:#d97706;--zy-accent-2:#f59e0b;--zy-accent-3:#92400e;--zy-accent-rgb:217,119,6}
html[data-zy-accent]{--zy-accent-soft:rgba(var(--zy-accent-rgb),.14);--zy-accent-border:rgba(var(--zy-accent-rgb),.38)}

/* Stronger aliases so old violet-only components follow the selected accent too. */
html{--zy-violet:var(--zy-accent)!important;--zy-violet-2:var(--zy-accent-2)!important;--zy-violet-3:var(--zy-accent-3)!important;accent-color:var(--zy-accent)!important}

/* Day contrast repair. */
html[data-zy-time-theme="day"] :where(h1,h2,h3,h4,h5,h6,.page-title,.section-title,.chat-day-empty strong,.feed-page h1,.main-content h1,.content-area h1){color:var(--zy-text)!important}
html[data-zy-time-theme="day"] :where(p,small,time,.muted,.text-muted,.subtitle,.description,.hint,.meta,.secondary,.chat-day-empty span){color:var(--zy-muted-strong)}
html[data-zy-time-theme="day"] :where(.nav-link,.navbar a,.top-nav a,.site-header a,.main-header a,.app-header a){color:var(--zy-text-soft)!important}
html[data-zy-time-theme="day"] :where(.nav-link:hover,.navbar a:hover,.top-nav a:hover,.site-header a:hover,.main-header a:hover,.app-header a:hover){color:var(--zy-accent)!important}
html[data-zy-time-theme="day"] ::placeholder{color:#796d84!important;opacity:1!important}

/* Explicitly kill the most visible green-era controls where zero-specificity :where() lost before. */
html body .new-post-button,
html body .create-button,
html body .btn-primary,
html body button.primary,
html body a.primary,
html body .chat-send,
html body .zy-action-primary,
html body .zy-v243-legacy-action{
  background:linear-gradient(135deg,var(--zy-accent),var(--zy-accent-2))!important;
  background-image:linear-gradient(135deg,var(--zy-accent),var(--zy-accent-2))!important;
  border-color:transparent!important;
  color:#fff!important;
  box-shadow:0 8px 24px rgba(var(--zy-accent-rgb),.20)!important;
}
html body .zy-v243-legacy-text{color:var(--zy-accent)!important}
html body .zy-v243-legacy-border{border-color:var(--zy-accent-border)!important;outline-color:var(--zy-accent-border)!important}
html body .zy-v243-legacy-surface{background:var(--zy-surface)!important;background-image:none!important;color:var(--zy-text)!important}
html body .zy-v243-legacy-message{background:var(--zy-bubble-own)!important;background-image:none!important;color:var(--zy-text)!important;border-color:var(--zy-accent-border)!important}
html body .zy-v243-legacy-shadow{box-shadow:0 0 0 1px var(--zy-accent-border),0 10px 30px var(--zy-shadow)!important}

/* Runtime accessibility bridge for old hard-coded white/grey text on light surfaces. */
html body .zy-v243-contrast-text{color:var(--zy-text)!important;text-shadow:none!important}
html body .zy-v243-contrast-muted{color:var(--zy-muted-strong)!important;text-shadow:none!important;opacity:1!important}

/* Make core accent surfaces use the currently selected accent. */
html body :where(.zy-folder-tab.active,.zy-topic-strip .active,.zy-msg-sidebar [aria-current="page"],.zy-msg-sidebar .active,.nav-link.active,.active-tab){
  background:linear-gradient(135deg,rgba(var(--zy-accent-rgb),.28),color-mix(in srgb,var(--zy-accent-2) 14%,transparent))!important;
  border-color:var(--zy-accent-border)!important;
}
html body :where(.zy-folder-tab.active,.zy-topic-strip .active,.zy-msg-sidebar .active,.nav-link.active) i{color:var(--zy-accent)!important}
html body :where(.zy24-voice-play,.zy-poll-svg-icon){background-color:var(--zy-accent-soft)!important;color:var(--zy-accent)!important}
html body :where(.zy24-video-ring){background:conic-gradient(var(--zy-accent-2) var(--zy24-progress),color-mix(in srgb,var(--zy-text) 24%,transparent) 0)!important}

/* Appearance trigger inserted next to the user controls. */
.zy-appearance-trigger{width:38px;height:38px;display:inline-grid;place-items:center;border:1px solid var(--zy-border)!important;border-radius:12px;background:var(--zy-surface)!important;color:var(--zy-accent)!important;cursor:pointer;flex:0 0 auto;box-shadow:none!important;padding:0!important}
.zy-appearance-trigger:hover{background:var(--zy-accent-soft)!important;border-color:var(--zy-accent-border)!important;transform:translateY(-1px)}
.zy-appearance-trigger svg{width:19px;height:19px;display:block}

/* Appearance center */
.zy-appearance-overlay[hidden]{display:none!important}
.zy-appearance-overlay{position:fixed;inset:0;z-index:120000;background:rgba(4,3,8,.58);backdrop-filter:blur(10px);display:flex;justify-content:flex-end;animation:zyAppearanceFade .16s ease}
.zy-appearance-panel{width:min(470px,100vw);height:100%;overflow:auto;background:linear-gradient(180deg,var(--zy-panel),var(--zy-bg-2));border-left:1px solid var(--zy-border);box-shadow:-30px 0 80px rgba(0,0,0,.30);padding:24px}
.zy-appearance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:24px}
.zy-appearance-title{display:flex;align-items:center;gap:12px}.zy-appearance-title>span:first-child{width:44px;height:44px;border-radius:14px;background:var(--zy-accent-soft);display:grid;place-items:center;color:var(--zy-accent)}
.zy-appearance-title svg{width:23px;height:23px}.zy-appearance-title h2{margin:0;color:var(--zy-text)!important;font-size:22px}.zy-appearance-title p{margin:4px 0 0;color:var(--zy-muted-strong)!important;font-size:13px}
.zy-appearance-close{width:38px;height:38px;border-radius:12px;border:1px solid var(--zy-border)!important;background:var(--zy-surface)!important;color:var(--zy-text)!important;display:grid;place-items:center;cursor:pointer;font-size:21px}
.zy-appearance-section{padding:18px;border:1px solid var(--zy-border);border-radius:18px;background:color-mix(in srgb,var(--zy-surface) 94%,transparent);margin-bottom:14px}
.zy-appearance-section>header{display:block!important;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;margin:0 0 14px;padding:0!important;height:auto!important;min-height:0!important}
.zy-appearance-section>header strong{display:block;color:var(--zy-text)!important;font-size:14px}.zy-appearance-section>header small{display:block;margin-top:3px;color:var(--zy-muted-strong)!important;font-size:12px}
.zy-theme-mode-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.zy-theme-mode{min-height:94px;padding:11px 8px;border:1px solid var(--zy-border)!important;border-radius:14px;background:var(--zy-panel-2)!important;color:var(--zy-text)!important;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center}.zy-theme-mode svg{width:23px;height:23px}.zy-theme-mode b{font-size:13px}.zy-theme-mode small{font-size:10px;color:var(--zy-muted-strong)!important}.zy-theme-mode.is-active{border-color:var(--zy-accent-border)!important;background:var(--zy-accent-soft)!important;box-shadow:0 0 0 2px rgba(var(--zy-accent-rgb),.10)}.zy-theme-mode.is-active svg{color:var(--zy-accent)}
.zy-theme-status{margin-top:10px;padding:9px 11px;border-radius:11px;background:var(--zy-bg-2);color:var(--zy-muted-strong);font-size:11px;border:1px solid var(--zy-border)}
.zy-accent-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.zy-accent-option{padding:12px;border:1px solid var(--zy-border)!important;border-radius:14px;background:var(--zy-panel-2)!important;color:var(--zy-text)!important;cursor:pointer;display:flex;align-items:center;gap:10px;text-align:left}.zy-accent-option.is-active{border-color:var(--zy-accent-border)!important;box-shadow:0 0 0 2px rgba(var(--zy-accent-rgb),.10)}.zy-accent-swatch{width:34px;height:34px;border-radius:11px;flex:0 0 auto;background:linear-gradient(135deg,var(--sw1),var(--sw2));box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}.zy-accent-option b{font-size:12px}.zy-accent-option small{display:block;margin-top:2px;font-size:10px;color:var(--zy-muted-strong)!important}
.zy-appearance-preview{padding:14px;border-radius:16px;background:var(--zy-bg);border:1px solid var(--zy-border)}.zy-preview-card{padding:14px;border-radius:14px;background:var(--zy-panel);border:1px solid var(--zy-border);box-shadow:0 10px 24px var(--zy-shadow)}.zy-preview-card strong{color:var(--zy-text)!important}.zy-preview-card p{color:var(--zy-muted-strong)!important;margin:5px 0 12px;font-size:12px}.zy-preview-actions{display:flex;gap:8px}.zy-preview-primary,.zy-preview-secondary{padding:8px 12px;border-radius:10px;font-size:11px;font-weight:700}.zy-preview-primary{background:linear-gradient(135deg,var(--zy-accent),var(--zy-accent-2));color:#fff}.zy-preview-secondary{background:var(--zy-surface-2);color:var(--zy-text);border:1px solid var(--zy-border)}
.zy-appearance-foot{color:var(--zy-muted-strong);font-size:11px;line-height:1.5;padding:2px 4px 18px}
@keyframes zyAppearanceFade{from{opacity:0}to{opacity:1}}
@media(max-width:620px){.zy-appearance-panel{padding:18px}.zy-theme-mode-grid{grid-template-columns:1fr}.zy-theme-mode{min-height:66px;flex-direction:row;justify-content:flex-start;text-align:left;padding:10px 14px}.zy-accent-grid{grid-template-columns:1fr}.zy-appearance-trigger{width:36px;height:36px}}
