/* Shared palette for the homepage, archives and identification app. */
:root:not([data-theme="light"]) {
    color-scheme: dark;
    --forest: #E0ECE1;
    --action: #8DCA94;
    --action-hover: #AADDB0;
    --on-action: #102716;
    --page: #111914;
    --section: #1D2B21;
    --card: #18231C;
    --ink: #DFE7E0;
    --muted: #ABB9AE;
    --line: #374B3D;
    --warning: #F0C49C;
    --warning-bg: #34291E;
    --shadow: 0 8px 28px rgb(0 0 0 / 20%);
}
.theme-toggle {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);
    color: var(--forest);
    cursor: pointer;
}
.theme-toggle:hover { background: var(--section); border-color: var(--action); }
.theme-icon-moon, [data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }
:root:not([data-theme="light"]) .site-brand svg path[stroke="#183B2B"] { stroke: var(--forest); }
:root:not([data-theme="light"]) .site-brand svg path[fill="#347B40"] { fill: #589C64; }
:root:not([data-theme="light"]) :is(.btn-clear, #upload-error, .grid-item .del-btn, .post-footer .unpublish-btn, .modal-unpublish-btn, .app-identify #privacy-error) { color: #FFB4AB; }
:root:not([data-theme="light"]) :is(.grid-item .del-btn:hover, .mid-app .ai-feedback-btn.selected#ai-feedback-down) { background: #432A29; color: #FFB4AB; }
:root:not([data-theme="light"]) :is(.safety-note, .bottom-warning) { border-color: #665039; }
:root:not([data-theme="light"]) .social-proof__rating svg,
:root:not([data-theme="light"]) .app-rating svg { color: #E5B96B; }
:root:not([data-theme="light"]) .post-footer .like-btn.liked { color: #FFA9B7; }
/* Preserve comfortable touch targets on narrow phones. */
@media (max-width: 380px) {
    .header-inner { padding-inline: 12px; gap: 4px; }
    .site-brand { font-size: 18px; gap: 4px; }
    .site-brand > svg { width: 24px; height: 24px; }
    .header-actions { gap: 0; }
    .lang-switch__current { min-width: 40px; }
    .theme-toggle { width: 40px; border-color: transparent; }
}
