/* Site palette. The public artist artwork can define its own preview colors. */
:root {
  color-scheme: dark;
  --app-bg: #121013;
  --app-ink: #f8f2f5;
  --app-muted: #c9bcc4;
  --app-surface: #1e181c;
  --app-fill: #2d2329;
  --app-hover: #352730;
  --app-line: #50404a;
  --app-control-line: #87737e;
  --app-action: #ad243f;
  --app-action-ink: #fff;
  --app-accent: #ff9bab;
  --app-tint: #3a2029;
  --app-danger: #ffabb9;
  --app-danger-bg: #522937;
  --app-gold: #f4c768;
  --app-gold-bg: #3e301d;
  --app-shadow: 0 18px 50px #0008;
}

:root[data-theme="light"] {
  color-scheme: light;
  --app-bg: #f8f6f7;
  --app-ink: #231820;
  --app-muted: #574751;
  --app-surface: #fff;
  --app-fill: #f3edf1;
  --app-hover: #eee1e8;
  --app-line: #dacbd4;
  --app-control-line: #877380;
  --app-action: #a31835;
  --app-action-ink: #fff;
  --app-accent: #941431;
  --app-tint: #fcebf0;
  --app-danger: #981a35;
  --app-danger-bg: #fbe5eb;
  --app-gold: #74500d;
  --app-gold-bg: #fff2db;
  --app-shadow: 0 18px 50px #4221301c;
}

[data-theme-switch] {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 3px;
  border: 1px solid var(--app-line);
  border-radius: 99px;
  background: var(--app-surface);
}

[data-theme-switch]:empty { display: none; }

[data-theme-switch] > [data-select-theme] {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--app-muted);
  border-radius: 99px;
  padding: 7px 11px;
  font: 650 12px/1.25 system-ui, sans-serif;
  cursor: pointer;
}

[data-theme-switch] > [data-select-theme][aria-pressed="true"] {
  background: var(--app-action);
  color: var(--app-action-ink);
}

[data-theme-switch] > [data-select-theme]:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.appearance-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-shell > header { gap: 12px; }
.auth-shell > header .logo img { max-width: min(36vw, 190px); }

@media (max-width: 520px) {
  .auth-shell > header { padding-inline: 18px; }
  .appearance-tools { gap: 8px; }
  .appearance-tools .auth-example { display: none; }
  .account-menu > #bellToggle { margin-right: 0 !important; }
}

html[data-theme="light"] :is(.app-shell, .plans-page) img[src$="4sho-logo.png"] {
  filter: brightness(0) saturate(100%);
}

:where(.app-shell, .plans-page, .bio-editor-page .editor) :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 3px;
}

:is(.app-shell, .bio-editor-page .editor) :is(input, textarea)::placeholder {
  color: var(--app-muted);
  opacity: 1;
}

.app-shell :is(input:not([type="color"]), textarea, select) { border-color: var(--app-control-line); }
.app-shell :is(.menu-list a, .menu-popup a, .menu-popup button):hover { background: var(--app-hover); }
.app-shell :is(.menu-list, .menu-popup, .dialog, #bellPopup) { box-shadow: var(--app-shadow); }

.auth-shell .auth-footer-links { color: var(--app-muted); }
.auth-shell .recovery-link { color: var(--app-accent) !important; }
.auth-shell .panel label { color: var(--app-muted); }

.smartlink-page img[src$="4sho-logo.png"] { background: transparent; }
.smartlink-page.custom-smartlink-background { color: #fff; }
.smartlink-page.custom-smartlink-background :is(p, footer, footer a) { color: #f7edf1; }
.smartlink-page.custom-smartlink-background img[src$="4sho-logo.png"] { filter: none !important; }

.bio-editor-page .editorhead { flex-wrap: wrap; gap: 10px; }
.bio-editor-page .editor {
  color: var(--app-ink);
  background: var(--app-surface);
  border-color: var(--app-line);
  box-shadow: var(--app-shadow);
  scrollbar-color: var(--app-control-line) transparent;
}
.bio-editor-page .editor :is(.editorhead, .editoractions) {
  background: var(--app-surface);
  border-color: var(--app-line);
}
.bio-editor-page .editor :is(input, textarea, select, .close, .itemEditor, .addItem, .itemButtons button, .editoractions button, .removeImage, .uploadImage, .uploadBtn) {
  color: var(--app-ink);
  background: var(--app-fill);
  border-color: var(--app-control-line);
}
.bio-editor-page .editor :is(.field span, .editor-intro, .hint, .editor-tip, small, label, p) {
  color: var(--app-muted);
}
.bio-editor-page .editor :is(.editor-tip, .premium-audio, .premium-tag, .premium-lock, #gifPremiumNotice) {
  color: var(--app-ink);
  background: var(--app-fill);
  border-color: var(--app-line);
}
.bio-editor-page .editor :is(.premium-audio.locked, #gifPremiumNotice.locked, #vipExpiredWarning) {
  color: var(--app-gold) !important;
  background: var(--app-gold-bg) !important;
  border-color: var(--app-gold) !important;
}
.bio-editor-page .editor :is(.editoractions .primary, .editor-save) {
  color: var(--app-action-ink);
  background: var(--app-action);
}
.bio-editor-page .editor :is(.danger, .itemButtons button.danger) { color: var(--app-danger); }
.bio-editor-page .editor :is(h3, .editorhead, .editoractions) { border-color: var(--app-line); }

.bio-editor-page .shell :is(.social, .mobileSocials a, .bio, .sectiontitle, .smallname, .foot, .brandlink) {
  color: var(--fg);
}
.bio-editor-page .shell :is(.linkcard, .linkcard:hover) {
  color: var(--cardfg);
  background: var(--card);
}
.bio-editor-page .shell .cardsub { color: var(--cardfg); opacity: 1; }
.bio-editor-page .shell .thumb:not(:has(img)) { color: #fff; }
.bio-editor-page.light-bio :is(.brandlink img, .social-icon-image) { filter: brightness(0); }

@media (max-width: 350px) {
  .account-menu > [data-theme-switch] > button { padding-inline: 7px; }
  .account-menu { gap: 6px; }
}

.bio-editor-page .editor [data-theme-switch] > [data-select-theme][aria-pressed="true"] {
  background: var(--app-action);
  color: var(--app-action-ink);
}
.bio-editor-page .editor .uploadImage { color: var(--app-ink); }
.bio-editor-page .editor .premium-audio :is(.premium-tag, .premium-lock) { color: var(--app-gold); }
.bio-editor-page .editor .premium-head { color: var(--app-ink); }
.bio-editor-page.light-bio .shell .avatar-fallback { color: #fff; }
.bio-editor-page .shell .verified-badge:not(.label-gold):not([hidden]) { color: #e35370 !important; }
.bio-editor-page.light-bio .shell .verified-badge:not(.label-gold):not([hidden]) { color: #a31835 !important; }
