/* Native editor colours remain intact; these tokens cover portal additions. */
html[data-portal-theme] { background:#fff; color-scheme:light; }
html[data-portal-theme=dark] { background:#21232a; color-scheme:dark; }
.portal-theme-toggle { display:inline-flex; align-items:center; justify-content:center; gap:7px;
  min-height:36px; padding:7px 11px; border:1px solid #b9cfc4; border-radius:20px;
  background:#f1f6f4; color:#274e3d; font-family:inherit; font-size:13px; font-weight:500;
  line-height:1.2; cursor:pointer; white-space:nowrap; }
.portal-theme-toggle svg { flex:none; }
.portal-theme-toggle:hover { background:#e3eee7; border-color:#668b75; }
.portal-theme-toggle:focus-visible { outline:3px solid #73a987; outline-offset:3px; }
.portal-login-theme { position:fixed; top:max(20px,env(safe-area-inset-top)); right:24px; z-index:10; }
.portal-bar-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
html[data-portal-theme=dark] .portal-theme-toggle { background:#28382f; color:#dcebe1; border-color:#668370; }
html[data-portal-theme=dark] .portal-theme-toggle:hover { background:#354b3d; border-color:#9bc6ab; }
html[data-portal-theme=dark] :is(.cn-role,.cn-quote) { background:#283c31; color:#c6e4d1; border-color:#527861; }
html[data-portal-theme=dark] :is(.cn-button,.cn-compose,.cn-dialog) { border-color:#52715f; }
html[data-portal-theme=dark] .cn-button:hover { background:#304c3a; color:#edf7ef; }
html[data-portal-theme=dark] .cn-primary { background:#2f6249; color:#fff; }
html[data-portal-theme=dark] .cn-link { color:#9dd6b3; }
html[data-portal-theme=dark] .cn-error { color:#ffaaa2; }
html[data-portal-theme=dark] .cn-backdrop { background:#090f12aa; }
html[data-portal-page=guests] { background:var(--wash); }
html[data-portal-page=guests][data-portal-theme=dark] { --green:#9dd6b3; --ink:#e4e8f5; --muted:#b0b9cd;
  --line:#4a5263; --paper:#292e39; --wash:#21232a; --error:#ffaaa2; }
html[data-portal-page=guests][data-portal-theme=dark] :is(button,input) { background:var(--paper); }
html[data-portal-page=guests][data-portal-theme=dark] button.primary { background:#2f6249; border-color:#729d82; color:#fff; }
@media(max-width:600px) {
  .cn-bar { flex-wrap:wrap; gap:8px; }
  .portal-bar-actions { flex-wrap:wrap; gap:6px; }
  .portal-theme-toggle { min-height:40px; }
  .portal-login-theme { right:16px; }
}
