/*
 * The dark theme of the site: it applies when <html> has data-theme="dark" (the switch in the top bar, js/theme.js; the light one is
 * the default). It is loaded after every other style and only changes colours: the surfaces, the text, the links, the forms and
 * the parts that have a light tint of their own (the yellow boxes, the blue bars). The navy of the logo is a colour of the text
 * in the light theme (headings, links), so here it is a light blue, and the places that use it as a background get their own.
 */

html[data-theme="dark"] {
    color-scheme: dark;

    --brand: #9cc2f5;
    --brand-dark: #c9defa;
    --brand-fill: #2f5fa8;
    --brand-fill-dark: #3b72c4;
    --yellow-light: #3a3115;
    --dark-page: #0f141b;
    --dark-surface: #19212b;
    --dark-surface-2: #212b38;
    --dark-surface-3: #2a3646;
    --dark-border: #324052;
    --dark-text: #e3e8ee;
    --dark-muted: #9aa7b6;
    --dark-link: #7db6ff;
    --dark-amber: #3a3115;
    --dark-amber-border: #6b5a1a;
    --dark-amber-text: #f2e3ad;

    --chart-mark: #7db6ff;
    --chart-ink: #c4ccd6;
    --chart-muted: #8f9cab;
    --chart-grid: #2b3644;
}

/* ---- the page, the text, the links ---- */
html[data-theme="dark"] body {
    background: var(--dark-page) !important;
    color: var(--dark-text);
}

html[data-theme="dark"] a { color: var(--dark-link); }
html[data-theme="dark"] a:hover { color: #a9d0ff; }
html[data-theme="dark"] a:visited { color: #a7b7ff; }
html[data-theme="dark"] a:active,
html[data-theme="dark"] a:focus { color: #a9d0ff; }
html[data-theme="dark"] a.btn { color: #fff; }

html[data-theme="dark"] #content {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    box-shadow: none;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .h1,
html[data-theme="dark"] .h2,
html[data-theme="dark"] .h3,
html[data-theme="dark"] .h4,
html[data-theme="dark"] .h5 {
    color: var(--dark-text);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text.text-muted,
html[data-theme="dark"] small.text-muted { color: var(--dark-muted) !important; }
html[data-theme="dark"] .text-dark { color: var(--dark-text) !important; }
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light { background-color: var(--dark-surface-2) !important; }
html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom { border-color: var(--dark-border) !important; }
html[data-theme="dark"] hr { border-color: var(--dark-border); }
html[data-theme="dark"] code { color: #f0a8c0; }
html[data-theme="dark"] kbd { background: var(--dark-surface-3); color: var(--dark-text); }

/* ---- the header and the footer ---- */
html[data-theme="dark"] #banner .logo a { color: var(--brand); }
html[data-theme="dark"] #banner .logo a:hover { color: var(--brand-dark); }
html[data-theme="dark"] a.icon-action,
html[data-theme="dark"] button.icon-action { color: #b6c2d1; }
html[data-theme="dark"] a.icon-action:hover,
html[data-theme="dark"] button.icon-action:hover,
html[data-theme="dark"] a.icon-action:focus,
html[data-theme="dark"] button.icon-action:focus { background-color: var(--dark-surface-3); color: #4fd6b8; }
html[data-theme="dark"] .icon-badge { box-shadow: 0 0 0 2px var(--dark-page); }
html[data-theme="dark"] .icon-badge-ruby { background: #3d8bff; }

/* the switch of the theme: the moon in the light theme (to go dark), the sun in the dark one */
html[data-theme="dark"] .theme-icon--dark { display: none; }
html[data-theme="dark"] #logged-as .bi-moon-stars-fill { color: #8da2ff; }
html[data-theme="dark"] #logged-as .bi-sun-fill { color: #ffc933; }
html[data-theme="dark"] #logged-as .bi-share-fill { color: #3fcf92; }
html[data-theme="dark"] #logged-as .bi-gear-fill { color: #b896f5; }
html[data-theme="dark"] #logged-as .bi-box-arrow-right { color: #ff8a5b; }
html[data-theme="dark"] #logged-as .bi-speedometer2 { color: #3cc8e4; }
html:not([data-theme="dark"]) .theme-icon--light { display: none; }

/* ---- Bootstrap parts ---- */
html[data-theme="dark"] .card,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .popover {
    background-color: var(--dark-surface-2);
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer { background-color: var(--dark-surface-3); border-color: var(--dark-border); }
html[data-theme="dark"] .dropdown-item { color: var(--dark-text); }
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus { background: var(--dark-surface-3); color: #fff; }
html[data-theme="dark"] .close { color: var(--dark-text); text-shadow: none; }
html[data-theme="dark"] .table { color: var(--dark-text); }
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table thead th { border-color: var(--dark-border); }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: var(--dark-surface-2); }
/* Bootstrap darkens the text of a hovered row (#212529), which is dark on dark here */
html[data-theme="dark"] .table-hover tbody tr:hover { color: var(--dark-text); background-color: var(--dark-surface-3); }

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select.form-control {
    background-color: var(--dark-surface-2);
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] select.form-control:focus {
    background-color: var(--dark-surface-3);
    border-color: #4a78b8;
    color: #fff;
}
html[data-theme="dark"] .form-control::placeholder { color: #7f8c9b; }
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] { background-color: var(--dark-surface); color: var(--dark-muted); }
html[data-theme="dark"] select.form-control:hover { background-color: var(--dark-surface-3); }
html[data-theme="dark"] label { color: var(--dark-text); }
html[data-theme="dark"] .form-control-file { color: var(--dark-text); }

html[data-theme="dark"] .alert-info { background: #17303f; border-color: #25506a; color: #bfe3f5; }
html[data-theme="dark"] .alert-warning { background: #3a3115; border-color: #6b5a1a; color: #f2e3ad; }
html[data-theme="dark"] .alert-success { background: #153324; border-color: #25603f; color: #bfe8cf; }
html[data-theme="dark"] .alert-danger { background: #3d1c22; border-color: #7a2f3a; color: #f5c2c9; }
html[data-theme="dark"] .alert-secondary { background: var(--dark-surface-3); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .alert-info a:not(.btn) { color: #8fd0f0; }
html[data-theme="dark"] .alert-warning a:not(.btn) { color: #f0cf70; }
html[data-theme="dark"] .alert-success a:not(.btn) { color: #86d9a6; }
html[data-theme="dark"] .alert-danger a:not(.btn) { color: #f59aa6; }

html[data-theme="dark"] .badge-light { background: var(--dark-surface-3); color: var(--dark-text); }
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-secondary { background: var(--dark-surface-3); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .btn-secondary { background-color: #4b5a6d; border-color: #4b5a6d; color: #fff; }
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-secondary:focus { background-color: #5a6b80; border-color: #5a6b80; color: #fff; }
html[data-theme="dark"] .btn.btn-primary { background-color: var(--brand-fill); border-color: var(--brand-fill); }
html[data-theme="dark"] .btn.btn-primary:hover,
html[data-theme="dark"] .btn.btn-primary:focus,
html[data-theme="dark"] .btn.btn-primary:active { background-color: var(--brand-fill-dark); border-color: var(--brand-fill-dark); }
html[data-theme="dark"] .btn.btn-outline-primary { color: var(--dark-link); border-color: #4a78b8; }
html[data-theme="dark"] .btn.btn-outline-primary:hover,
html[data-theme="dark"] .btn.btn-outline-primary:active { background-color: var(--brand-fill); color: #fff; }
/* "Předáno" takes the colour of the brand, which is a light blue here (the colour of the text): white on it does not read, so the fill of the brand */
html[data-theme="dark"] .btn.btn-given { --action: var(--brand-fill); }
html[data-theme="dark"] .btn.btn-quiet { background-color: var(--dark-surface-3); border-color: var(--dark-border); color: var(--brand); }
html[data-theme="dark"] .btn.btn-quiet:hover,
html[data-theme="dark"] .btn.btn-quiet:focus { background-color: #34445a; border-color: var(--brand); color: var(--brand); }
html[data-theme="dark"] .btn.btn-release { background-color: var(--dark-surface-3); border-color: #4b5a6d; color: var(--dark-text); }
html[data-theme="dark"] .btn.btn-release:hover,
html[data-theme="dark"] .btn.btn-release:focus { background-color: #34445a; color: #fff; }
html[data-theme="dark"] .btn-google { background: var(--dark-surface-3); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .btn-google:hover,
html[data-theme="dark"] .btn-google:focus { background: #34445a; color: #fff; }
html[data-theme="dark"] .btn-email { background: transparent; border-color: var(--dark-border); color: var(--brand); }
html[data-theme="dark"] .btn-email:hover,
html[data-theme="dark"] .login-email[open] > .btn-email { background: var(--dark-surface-3); }

html[data-theme="dark"] .nav-pills .nav-link,
html[data-theme="dark"] .tip-tabs .nav-link { color: var(--brand); }
html[data-theme="dark"] .nav-pills .nav-link.active,
html[data-theme="dark"] .tip-tabs .nav-link.active { background: var(--brand-fill); color: #fff; }
html[data-theme="dark"] .page-link { background: var(--dark-surface-2); border-color: var(--dark-border); color: var(--dark-link); }

/* ---- the list of the wishes and its filter ---- */
html[data-theme="dark"] .wish-list { background: var(--dark-surface-2); border-color: var(--dark-border); }
/* the line between two rows is the line of the frame, not the pale one of the light theme */
html[data-theme="dark"] .wish-row { border-top-color: var(--dark-border); }
html[data-theme="dark"] .wish-row:hover { background-color: var(--dark-surface-3); }
html[data-theme="dark"] .wish-row-desc,
html[data-theme="dark"] .wish-row-state { color: var(--dark-muted); }
html[data-theme="dark"] .wish-row-private:hover { background-color: #3d1c22; color: #f5c2c9; }
html[data-theme="dark"] .wish-row-trashed:hover { background-color: var(--dark-surface-3); color: var(--dark-muted); }
html[data-theme="dark"] .wish-card .card-title a,
html[data-theme="dark"] .wish-card .card-title { color: var(--dark-link); }
html[data-theme="dark"] .wish-card-trashed { opacity: .8; }

/* the marks of the wishes of others (free, mine, taken): lighter frames and stripes, the badges keep their fills */
html[data-theme="dark"] .wish-card-free { border-color: #3fb27a; }
html[data-theme="dark"] .wish-card-mine { border-color: #5aa0f2; }
html[data-theme="dark"] .wish-card-taken { border-color: #ee6a5b; }
html[data-theme="dark"] .wish-row-free { border-left-color: #3fb27a; }
html[data-theme="dark"] .wish-row-mine { border-left-color: #5aa0f2; }
html[data-theme="dark"] .wish-row-taken { border-left-color: #ee6a5b; }
html[data-theme="dark"] .wish-claim-free { background-color: #1e7a4c; }
html[data-theme="dark"] .wish-claim-mine { background-color: #2f5fa8; }
html[data-theme="dark"] .wish-claim-taken { background-color: #a8362a; }
html[data-theme="dark"] .wish-repeat { color: #cfe2f7; background-color: #24364d; border-color: #3d5878; }
html[data-theme="dark"] .repeat-note { border-left-color: #3d5878; }
html[data-theme="dark"] .internal-note { background-color: var(--dark-surface-3); border-color: #4b5a6d; }
html[data-theme="dark"] .wish-image-thumb { background: #fff; }
html[data-theme="dark"] .detail-actions,
html[data-theme="dark"] .journey-area { border-top-color: var(--dark-border); }
html[data-theme="dark"] .journey { --journey-line: #4b5a6d; }
html[data-theme="dark"] .journey-body { border-color: var(--dark-border); }
html[data-theme="dark"] .journey-current .journey-body { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
html[data-theme="dark"] .journey-upcoming .journey-number { background: var(--dark-surface-3); color: var(--dark-muted); }
html[data-theme="dark"] .journey-done .journey-number,
html[data-theme="dark"] .journey-current .journey-number,
html[data-theme="dark"] .journey-here { border-color: var(--brand-fill); background: var(--brand-fill); }
html[data-theme="dark"] .journey-done::before { background: var(--brand-fill); }
html[data-theme="dark"] .journey-title { color: var(--dark-text); }
html[data-theme="dark"] .journey-upcoming .journey-title,
html[data-theme="dark"] .journey-desc { color: var(--dark-muted); }
html[data-theme="dark"] .journey-current .journey-title { color: var(--brand); }

html[data-theme="dark"] #search-form { background-color: #1b2636; border-color: var(--dark-border); }
html[data-theme="dark"] .filter-person label { color: var(--dark-text); }
html[data-theme="dark"] .filter-person select.form-control {
    border-color: var(--brand);
    background-color: var(--dark-surface-3);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .filter-person select.form-control:hover,
html[data-theme="dark"] .filter-person select.form-control:focus {
    border-color: var(--brand-dark);
    background-color: var(--dark-surface-3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}
html[data-theme="dark"] .filter-group,
html[data-theme="dark"] .filter-menu > summary,
html[data-theme="dark"] .filter-menu-list { background: var(--dark-surface-2); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .filter-menu-list a { color: var(--dark-text); }
html[data-theme="dark"] .filter-menu-list a:hover,
html[data-theme="dark"] .filter-menu-list a.is-active { background: var(--dark-surface-3); color: #fff; }
html[data-theme="dark"] .filter-bar a.icon-action.is-active,
html[data-theme="dark"] .filter-menu > summary.is-active { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }

/* ---- the parts with a yellow or blue tint of their own ---- */
html[data-theme="dark"] .welcome-box,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .share-requests,
html[data-theme="dark"] .tip-cta,
html[data-theme="dark"] .tip-strip,
html[data-theme="dark"] .tips-teaser,
html[data-theme="dark"] .dash-alert { background: var(--dark-amber); border-color: var(--dark-amber-border); color: var(--dark-amber-text); }
html[data-theme="dark"] .tips-teaser:hover,
html[data-theme="dark"] .tips-teaser:focus,
html[data-theme="dark"] .dash-alert:hover { background: #4a3f1a; color: #fff3c4; }
html[data-theme="dark"] .tips-teaser-hint,
html[data-theme="dark"] .dash-alert-text span { color: #cdbd84; }
html[data-theme="dark"] .tips-teaser-icon { color: #f0b429; }
html[data-theme="dark"] .dash-alert { color: var(--dark-amber-text); }
html[data-theme="dark"] #add-wish-form,
html[data-theme="dark"] #share-wishlist-form,
html[data-theme="dark"] #profile-form { background-color: var(--dark-amber); border-color: var(--dark-amber-border); color: var(--dark-amber-text); }
html[data-theme="dark"] .tip-consent { background: #3d2a12; border-color: #8a5a1f; color: #f5dcb5; }
html[data-theme="dark"] .tip-consent a:not(.btn) { color: #f0b46a; }
html[data-theme="dark"] .tip-consent-decline { background: rgba(255, 255, 255, .08); border-color: #8a5a1f; color: #f5dcb5; }
html[data-theme="dark"] .tip-consent-decline:hover,
html[data-theme="dark"] .tip-consent-decline:focus { background: rgba(255, 255, 255, .16); color: #fff; }
html[data-theme="dark"] .profile-tips-note { background: #1b2636; color: #bcc9da; }
html[data-theme="dark"] .auth-google-hint { background: #1f2d44; }
html[data-theme="dark"] .login-slider { background: linear-gradient(135deg, #1f2d44 0%, var(--dark-amber) 100%); }
html[data-theme="dark"] .login-slide-text { color: #c4ccd6; }
html[data-theme="dark"] .login-slider-dot { background: rgba(255, 255, 255, .25); }
html[data-theme="dark"] .login-slider-dot.is-active,
html[data-theme="dark"] .login-slider-progress span { background: var(--brand); }
html[data-theme="dark"] .login-slider-progress { background: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .login-card { border-color: var(--dark-border); }
html[data-theme="dark"] .login-or,
html[data-theme="dark"] .login-legal,
html[data-theme="dark"] .login-google-note,
html[data-theme="dark"] .auth-field-help,
html[data-theme="dark"] .auth-note,
html[data-theme="dark"] .share-note,
html[data-theme="dark"] .share-people-email,
html[data-theme="dark"] .error-hint,
html[data-theme="dark"] .changelog-date { color: var(--dark-muted); }

/* ---- the sharing, the changelog, the priority choice ---- */
html[data-theme="dark"] .share-way { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] .share-way-for { color: var(--dark-muted); }
html[data-theme="dark"] .share-tag { background: var(--dark-surface-3); color: #c4ccd6; }
html[data-theme="dark"] .share-tag-mutual { background: #153324; color: #86d9a6; }
html[data-theme="dark"] .changelog { border-color: var(--dark-border); }
html[data-theme="dark"] .changelog thead th { background: var(--brand-fill); }
html[data-theme="dark"] .changelog tbody:nth-of-type(odd) { background: var(--dark-surface-2); }
html[data-theme="dark"] .changelog tbody:nth-of-type(even) { background: var(--dark-surface); }
html[data-theme="dark"] .priority-option-body { background-color: var(--dark-surface-2); }

/* ---- the tips ---- */
html[data-theme="dark"] .tip-card,
html[data-theme="dark"] .tip-top,
html[data-theme="dark"] .tip-mini,
html[data-theme="dark"] .tip-admin-row,
html[data-theme="dark"] .tip-buy { background: var(--dark-surface-2); border-color: var(--dark-border); box-shadow: none; }
html[data-theme="dark"] .tip-buy-price strong { color: #6fd08a; }
html[data-theme="dark"] .tip-buy-price-note,
html[data-theme="dark"] .tip-buy-rating,
html[data-theme="dark"] .tip-buy-rating span { color: var(--dark-muted); }
html[data-theme="dark"] .tip-chart { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] .tip-buy .tip-share-toggle { border-color: #3d5d80; background: #1f3550; color: #cfe2f7; }
html[data-theme="dark"] .tip-buy .tip-share-toggle:hover,
html[data-theme="dark"] .tip-buy .tip-share-toggle:focus { border-color: #5b84ad; background: #29476a; color: #fff; }
html[data-theme="dark"] .tip-sticky-bar .tip-heart-compact { background: var(--dark-surface-3); }
html[data-theme="dark"] .tip-sticky-bar .tip-heart-compact:hover,
html[data-theme="dark"] .tip-sticky-bar .tip-heart-compact.is-on { background: var(--heart); }
html[data-theme="dark"] .tip-share-menu { background: var(--dark-surface-3); border-color: var(--dark-border); }
html[data-theme="dark"] .tip-share-item { color: var(--dark-text); }
html[data-theme="dark"] .tip-share-item:hover,
html[data-theme="dark"] .tip-share-item:focus-visible { background: var(--dark-surface-2); color: var(--dark-text); }
html[data-theme="dark"] .tip-detail-media { box-shadow: none; }
html[data-theme="dark"] .tip-text-end { border-top-color: var(--dark-border); }
html[data-theme="dark"] .tip-sticky-bar { background: var(--dark-surface-2); border-top-color: var(--dark-border); box-shadow: 0 -4px 14px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .tip-detail-media { background: var(--dark-surface-2); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .tip-mini:hover,
html[data-theme="dark"] .tip-admin-row:hover { border-color: var(--brand); color: var(--dark-text); }
html[data-theme="dark"] .tip-admin-row a.tip-admin-link,
html[data-theme="dark"] .tip-admin-row a.tip-admin-link:hover { color: var(--dark-text); }
html[data-theme="dark"] .tip-card-text,
html[data-theme="dark"] .tip-top-text,
html[data-theme="dark"] .tip-count,
html[data-theme="dark"] .tip-admin-excerpt,
html[data-theme="dark"] .tip-select-all { color: #b4bfcc; }
html[data-theme="dark"] .tip-mini-meta,
html[data-theme="dark"] .tip-person > summary,
html[data-theme="dark"] .tip-person-hint,
html[data-theme="dark"] .tip-strip-note { color: var(--dark-muted); }
html[data-theme="dark"] .tip-filter { background: #1b2636; }
html[data-theme="dark"] .tip-chips li { background: var(--dark-surface-3); color: #c4ccd6; }
html[data-theme="dark"] .tip-chips .tip-chip-category { background: #4a3f1a; color: #f2e3ad; }
html[data-theme="dark"] .tip-chips .tip-chip-category a { color: #f2e3ad; }
html[data-theme="dark"] .tip-chips .tip-chip-edit { background: transparent; }
html[data-theme="dark"] .tip-chips .tip-chip-edit a { color: #c4ccd6; }
html[data-theme="dark"] .tip-admin-thumb { background: var(--dark-surface-3); color: #7f8c9b; }
html[data-theme="dark"] .tip-image-empty { background: var(--dark-surface-3); color: #6b7a8c; }
html[data-theme="dark"] .tip-image,
html[data-theme="dark"] .catalog-thumb img { background: #fff; }
html[data-theme="dark"] .catalog-thumb img { border-color: var(--dark-border); }
html[data-theme="dark"] .tip-mini-label { background: var(--yellow); color: #3a2f00; }

/* ---- the dashboard ---- */
html[data-theme="dark"] .dash-grid > div,
html[data-theme="dark"] .dash-system { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] .dash-chart-title { color: var(--dark-text); }
html[data-theme="dark"] .dash-tile-value { color: var(--brand); }

/* ---- the feedback ---- */
html[data-theme="dark"] a.feedback-fab { background: var(--brand-fill); color: #fff; }
html[data-theme="dark"] a.feedback-fab:hover,
html[data-theme="dark"] a.feedback-fab:focus { background: var(--brand-fill-dark); }
html[data-theme="dark"] .feedback-panel,
html[data-theme="dark"] .feedback-new-form,
html[data-theme="dark"] .feedback-item { background: var(--dark-surface-2); box-shadow: none; color: var(--dark-text); }
html[data-theme="dark"] .feedback-panel { border: 1px solid var(--dark-border); box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .feedback-reply { background: var(--dark-surface-3); }
html[data-theme="dark"] .feedback-reply-admin { background: #1f2d44; }
html[data-theme="dark"] .feedback-shot-preview { border-color: var(--dark-border); }
html[data-theme="dark"] .feedback-edit > summary,
html[data-theme="dark"] .feedback-answer > summary,
html[data-theme="dark"] details.feedback-shot > summary,
html[data-theme="dark"] .feedback-shot-help summary { color: var(--dark-link); }
html[data-theme="dark"] .feedback-item-summary .feedback-item-no,
html[data-theme="dark"] .feedback-item-caret { color: var(--dark-muted); }
html[data-theme="dark"] .wish-id,
html[data-theme="dark"] .tip-person-hint { color: var(--dark-muted); }

/* the button that adds a wish does not shine: it has the dark amber of the form that it opens (and of the groups in that form, which would
   otherwise take the blue-grey of the light theme) */
html[data-theme="dark"] #add-wish-form .form-section { background-color: var(--dark-amber); border-color: var(--dark-amber-border); color: var(--dark-amber-text); }
html[data-theme="dark"] .btn.btn-add-wish { background-color: var(--dark-amber); border-color: var(--dark-amber-border); color: var(--dark-amber-text); }
html[data-theme="dark"] .btn.btn-add-wish:hover,
html[data-theme="dark"] .btn.btn-add-wish:focus { background-color: #4a3f1a; border-color: #8a7424; color: #fff3c4; }

/* the tiles of the dashboard, the list of the people and the queue of the tips */
html[data-theme="dark"] .dash-tile { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] .dash-tile-hero { border-left-color: var(--brand); }
html[data-theme="dark"] .dash-tip-queue li + li { border-top-color: var(--dark-border); }
html[data-theme="dark"] .dash-people td,
html[data-theme="dark"] .dash-people th { border-color: var(--dark-border); }

/* the note about the profile under the tips, the arrow of the selects (a light triangle) */
html[data-theme="dark"] .profile-hint,
html[data-theme="dark"] .profile-tips-note { background: #1b2636; color: #bcc9da; }
html[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M2 4.5h12L8 12z' fill='%239cc2f5'/%3E%3C/svg%3E");
}

/* the pop-up "Zadej si přání" */
html[data-theme="dark"] .reminder-dialog { background: var(--dark-surface-2); border-color: var(--dark-border); color: var(--dark-text); }

/* the log of the events */
html[data-theme="dark"] .event-list { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] .event-item { border-top-color: var(--dark-border); }
html[data-theme="dark"] .event-time,
html[data-theme="dark"] .event-spoiler > summary,
html[data-theme="dark"] .event-data summary { color: var(--dark-muted); }
html[data-theme="dark"] .event-data pre { background: var(--dark-surface); color: var(--dark-text); }

/* the seasonal skins of the header: the snow is white, the marks a bit lighter */
html[data-theme="dark"][data-skin] { --skin-flake: rgba(255, 255, 255, .8); }
html[data-theme="dark"][data-skin="advent"] { --skin-accent: #66bb6a; }
html[data-theme="dark"][data-skin="halloween"] { --skin-accent: #ff9a3c; }
html[data-theme="dark"][data-skin="velikonoce"] { --skin-accent: #ce93d8; }
html[data-theme="dark"][data-skin="den-matek"] { --skin-accent: #f48fb1; }
html[data-theme="dark"][data-skin="den-otcu"] { --skin-accent: #64b5f6; }
html[data-theme="dark"][data-skin="valentyn"] { --skin-accent: #ff6b8f; }
html[data-theme="dark"] .skin-preview { background: var(--dark-surface-3); color: var(--dark-text); }

/* the news: the bubble is a dark surface */
html[data-theme="dark"] .news-bubble { background: var(--dark-surface-2); color: var(--dark-text); box-shadow: 0 6px 22px rgba(0, 0, 0, .7); }

html[data-theme="dark"] .profile-old-account,
html[data-theme="dark"] .profile-managers { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] .group-box { background: var(--dark-surface-2); border-color: var(--dark-border); border-left-color: var(--group-color); }
html[data-theme="dark"] .group-rest { background: var(--dark-surface); --group-color: var(--dark-surface-3); --group-text: var(--dark-text); }
html[data-theme="dark"] .group-rest-title { color: var(--dark-text); }
html[data-theme="dark"] .group-handle,
html[data-theme="dark"] .group-people.is-empty::before { color: var(--dark-muted); }
html[data-theme="dark"] .group-color { background: var(--dark-surface-3); border-color: var(--dark-border); }
html[data-theme="dark"] .profile-managed-people-list li { border-bottom-color: var(--dark-border); }

html[data-theme="dark"] .tip-status-not-recommended,
html[data-theme="dark"] .tip-status-notrecommended { background: #4a3417; color: #f5c07a; }
html[data-theme="dark"] .tip-admin-note { color: #f5c07a; }

html[data-theme="dark"] .landing-links a { border-color: rgba(255, 255, 255, .25); }

/* the showcase of a visitor (Component/tip_showcase.latte) */
html[data-theme="dark"] .showcase-title,
html[data-theme="dark"] .showcase-cta-title,
html[data-theme="dark"] .showcase-heading a { color: var(--dark-text); }
html[data-theme="dark"] .showcase-lead,
html[data-theme="dark"] .showcase-tagline,
html[data-theme="dark"] .showcase-cta-note { color: var(--dark-muted); }
html[data-theme="dark"] .showcase-chip,
html[data-theme="dark"] .showcase-steps li { background: var(--dark-surface-2); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .showcase-chip:hover { background: var(--dark-surface-3); color: var(--dark-text); }
html[data-theme="dark"] .landing-more summary,
html[data-theme="dark"] .landing-more-list a { background: var(--dark-surface-3); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .landing-more summary:hover,
html[data-theme="dark"] .landing-more-list a:hover { background: var(--dark-surface-2); color: var(--dark-text); }
html[data-theme="dark"] .landing-more-count { background: var(--dark-surface); color: var(--dark-text); }
html[data-theme="dark"] .showcase-section { background: var(--dark-surface); border-color: var(--dark-border); }
html[data-theme="dark"] .showcase-cta { background: var(--dark-amber); border-color: var(--dark-amber-border); }
html[data-theme="dark"] .showcase-head .showcase-more { background: var(--dark-surface-3); border-color: var(--dark-border); color: var(--dark-text); }

/* ---- the TOP tips and the end of a category ---- */
html[data-theme="dark"] .tip-top-label { color: #f0a45c; }
html[data-theme="dark"] .tip-end { background: var(--dark-surface-2); border-color: var(--dark-border); color: var(--dark-text); }

/* ---- the notices: hints and confirmation dialogs (css/notice.css) ---- */
html[data-theme="dark"] .notice-help    { --notice-color: #7db6ff; --notice-tint: #1b2a3f; }
html[data-theme="dark"] .notice-info    { --notice-color: #5cc4d6; --notice-tint: #17303a; }
html[data-theme="dark"] .notice-success { --notice-color: #6fcf86; --notice-tint: #1a3123; }
html[data-theme="dark"] .notice-warning { --notice-color: #f0b35a; --notice-tint: #3a3115; }
html[data-theme="dark"] .notice-error   { --notice-color: #f28b8b; --notice-tint: #3d1c22; }
html[data-theme="dark"] .notice-popover,
html[data-theme="dark"] .journey-toast,
html[data-theme="dark"] .notice-dialog { --notice-text: var(--dark-text); }
html[data-theme="dark"] .notice-dialog { background: var(--dark-surface-2); }
html[data-theme="dark"] .notice-dialog .btn-outline-secondary { background: var(--dark-surface-3); border-color: var(--dark-border); color: var(--dark-text); }
html[data-theme="dark"] .notice-dialog .btn-notice { color: #14181f; }
html[data-theme="dark"] .toast-flash { --notice-text: var(--dark-text); }
html[data-theme="dark"] .is-floating .toast-flash { box-shadow: 0 8px 24px rgba(0, 0, 0, .55); }

html[data-theme="dark"] .info-popup { background: var(--dark-surface-2); color: var(--dark-text); }
html[data-theme="dark"] .info-popup-close { background: var(--dark-surface-3); color: var(--dark-text); }
html[data-theme="dark"] .info-popup-facts dt { color: var(--dark-muted); }

html[data-theme="dark"] .tip-person-toggle { background: var(--dark-surface-3); color: var(--dark-text); }

html[data-theme="dark"] .dash-tile-change.is-up { color: #5fd081; }
html[data-theme="dark"] .dash-tile-change.is-down { color: #f28b8b; }
html[data-theme="dark"] .dash-detail-list li { border-bottom-color: var(--dark-border); }
html[data-theme="dark"] .dash-new-wishes li { border-bottom-color: var(--dark-border); }


html[data-theme="dark"] .picker-or { color: var(--dark-muted); }

html[data-theme="dark"] .picker-more { background-color: #2a4468; border-color: #3d5f8f; color: #e4ecf7; }
html[data-theme="dark"] .picker-more:hover,
html[data-theme="dark"] .picker-more:focus { background-color: #34527c; border-color: #4d72a8; color: #fff; }
html[data-theme="dark"] .picker-offer { color: var(--dark-text); }

/* ---- Doporuč Přeju si, the tree of the recommendations ---- */
html[data-theme="dark"] .referral-hero { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] .referral-balance { background: var(--brand-fill); }
html[data-theme="dark"] .referral-quiet { color: var(--dark-muted); }
html[data-theme="dark"] .referral-history li { border-color: var(--dark-border); }
html[data-theme="dark"] .referral-history-amount { color: #86d9a6; }
html[data-theme="dark"] .referral-history-amount.is-minus { color: #f19b92; }
html[data-theme="dark"] .referral-tree ul { border-color: var(--dark-border); }
html[data-theme="dark"] .referral-tree-credits { background: #153324; color: #86d9a6; }

/* Rubíny for a piece of feedback */
html[data-theme="dark"] .feedback-reward-form { border-top-color: var(--dark-border); }

/* the ways of earning Rubíny and the note about fair play */
html[data-theme="dark"] .earn-list li { border-bottom-color: var(--dark-border); }
html[data-theme="dark"] .earn-list li > .bi { color: var(--dark-link); }
html[data-theme="dark"] .earn-what small { color: var(--dark-muted); }
html[data-theme="dark"] .earn-amount { color: #6aa5ff; }
html[data-theme="dark"] .earn-done { color: #3fcf92; }
html[data-theme="dark"] .fair-play { background: var(--dark-surface); border-color: var(--dark-border); }
html[data-theme="dark"] .fair-play .bi-heart-fill { color: #ff7aa8; }

/* the values of the rewards in the dashboard */
html[data-theme="dark"] .reward-settings-row { border-bottom-color: var(--dark-border); }

/* the pop-up of a hidden ruby (js/hidden-ruby.js) */
html[data-theme="dark"] .ruby-found {
    border-color: #ff6b8f;
    background: var(--dark-surface-2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .6);
    color: var(--dark-text);
}

html[data-theme="dark"] .ruby-found::after {
    border-color: #ff6b8f;
}

html[data-theme="dark"] .ruby-found-progress {
    color: var(--dark-muted);
}

/* the page Poklady */
html[data-theme="dark"] .treasures-stage {
    border-color: var(--dark-border);
    background: var(--dark-surface-2);
    color: #d8e0ea;
}

html[data-theme="dark"] .treasures-progress { color: var(--dark-muted); }
html[data-theme="dark"] .treasures-rules .bi { color: #ff6b8f; }
