/* Dark theme: active when theme.js sets <html data-theme="dark"> (chosen, or system setting).
   Neutral black and grey surfaces; lime stays the accent, coloured tags keep their meaning. */
html[data-theme=dark]{color-scheme:dark;--ink:#ededed;--muted:#9e9e9e;--line:#303030;--paper:#000;--white:#1c1c1c;--green:#7cc597;--orange:#e39a5c}
html[data-theme=dark] :focus-visible{outline-color:var(--lime)}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{border-color:#3a3a3a;background:#121212}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#6e6e6e}
html[data-theme=dark] input[type=checkbox],html[data-theme=dark] .import-field input[type=checkbox]{accent-color:var(--lime)}
html[data-theme=dark] input[type=file]::file-selector-button{background:#262626}
/* Areas that are dark green in the light theme */
html[data-theme=dark] .sidebar{background:#0a0a0a;color:#ededed;border-right:1px solid var(--line)}
html[data-theme=dark] .brand-sub,html[data-theme=dark] .user-button small{color:#8a8a8a}
html[data-theme=dark] .nav button{color:#b5b5b5}
html[data-theme=dark] .nav button:hover{background:#1a1a1a}
html[data-theme=dark] .nav button.active{background:var(--lime);color:#111}
html[data-theme=dark] .nav .count{background:#262626}
html[data-theme=dark] .nav button.active .count{background:#111}
html[data-theme=dark] .sidebar-note{color:#7a7a7a}
html[data-theme=dark] .user-button{border-top-color:#262626}
html[data-theme=dark] .hero,html[data-theme=dark] .auth-art{background:#1a1a1a;color:#ededed}
html[data-theme=dark] .hero p,html[data-theme=dark] .auth-copy p{color:#b3b3b3}
html[data-theme=dark] .hero .eyebrow{color:var(--lime)}
html[data-theme=dark] .auth-stamp{color:#8a8a8a}
/* The login eyebrow sets its colour inline. */
html[data-theme=dark] .auth-copy .eyebrow{color:#9e9e9e!important}
html[data-theme=dark] .hero-art::before,html[data-theme=dark] .hero-art::after{border-color:#777;box-shadow:0 0 0 18px #1a1a1a,0 0 0 19px #555,0 0 0 38px #1a1a1a,0 0 0 39px #444,0 0 0 58px #1a1a1a,0 0 0 59px #383838}
html[data-theme=dark] .hero-art::after{background:var(--lime);box-shadow:none;border:none}
html[data-theme=dark] .hero-date{background:#262626e8;border-color:#404040}
html[data-theme=dark] .hero.has-photo .hero-date{background:#000c}
html[data-theme=dark] .hero.has-photo p{color:#e0e0e0}
html[data-theme=dark] .hero-shade{background:linear-gradient(90deg,rgba(0,0,0,.92),rgba(0,0,0,.62) 45%,rgba(0,0,0,.2))}
html[data-theme=dark] .gallery-image,html[data-theme=dark] .full-image{background:#0a0a0a}
html[data-theme=dark] #toast{background:#262626;box-shadow:0 5px 25px #000a}
/* Light surfaces */
html[data-theme=dark] .avatar{background:#262626;color:#e0e0e0}
html[data-theme=dark] .btn{background:#ededed;color:#111}
html[data-theme=dark] .btn.lime{background:var(--lime);color:#111}
html[data-theme=dark] .btn.light{background:#2c2c2c;color:var(--ink)}
html[data-theme=dark] .btn.outline{background:var(--white);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .btn.danger{background:#a53131;color:#fff;border-color:#a53131}
html[data-theme=dark] .btn.danger:hover{background:#812424;border-color:#812424}
html[data-theme=dark] .btn.outline.danger{background:transparent;color:#ff8f80;border-color:#7a3a33}
html[data-theme=dark] .iconbtn{background:#262626}
html[data-theme=dark] .stat,html[data-theme=dark] .panel,html[data-theme=dark] .event-card,html[data-theme=dark] .day{background:var(--white)}
html[data-theme=dark] .stat-icon{background:#2a2a2a}
html[data-theme=dark] .filters{background:#1c1c1c}
html[data-theme=dark] .filters button.active{background:#363636;box-shadow:none}
html[data-theme=dark] .event-card:hover{border-color:#555}
html[data-theme=dark] .tag.green{background:#1f3324;color:#9fd69a}
html[data-theme=dark] .tag.orange{background:#3a2a17;color:#f0b071}
html[data-theme=dark] .tag.gray{background:#2e2e2e;color:#adadad}
html[data-theme=dark] .tag.purple{background:#2b2640;color:#c3b3ea}
html[data-theme=dark] .event-end>.ico,html[data-theme=dark] .footnote{color:#7a7a7a}
html[data-theme=dark] .empty{border-color:#333}
html[data-theme=dark] .note{background:#262626;color:#c7c7c7}
html[data-theme=dark] .note.warn{background:#35281a;color:#efc08a}
html[data-theme=dark] .row{border-bottom-color:#2c2c2c}
html[data-theme=dark] .notice-count{color:#111}
html[data-theme=dark] .weekday{background:#242424}
html[data-theme=dark] .day.dim{background:#141414;color:#5c5c5c}
html[data-theme=dark] .day.today .day-num{background:var(--lime);color:#111}
html[data-theme=dark] .cal-event{background:#2e2e2e;color:var(--ink)}
html[data-theme=dark] .cal-event.c1{background:#2b2640}
html[data-theme=dark] .cal-event.c2{background:#363636}
html[data-theme=dark] .form-error{background:#3a1d18;color:#ff9c8a}
html[data-theme=dark] dialog{background:var(--white);box-shadow:0 30px 100px #000c}
html[data-theme=dark] dialog::backdrop{background:#000c}
html[data-theme=dark] .summary-bar,html[data-theme=dark] .upload-preview{background:#262626}
html[data-theme=dark] .bottom-nav{background:#0a0a0af2}
html[data-theme=dark] .bottom-nav button{color:#8a8a8a}
html[data-theme=dark] .bottom-nav button.active{color:var(--lime)}
html[data-theme=dark] .bottom-nav button.active:before{background:var(--lime)}
html[data-theme=dark] .mobile-brand i{background:var(--lime)}
html[data-theme=dark] .suggestion{background:#222}
html[data-theme=dark] .suggestion:hover{border-color:#4a4a4a}
html[data-theme=dark] .link-import{background:#222;border-color:var(--line)}
html[data-theme=dark] .link-import[open]>summary{border-bottom-color:var(--line)}
html[data-theme=dark] .import-body p,html[data-theme=dark] .import-field small,html[data-theme=dark] .feedback-note{color:var(--muted)}
html[data-theme=dark] .import-candidate{background:var(--white);border-color:var(--line)}
html[data-theme=dark] .feedback-fab{background:#1c1c1c;color:#e0e0e0;box-shadow:0 3px 16px #000a}
html[data-theme=dark] .feedback-fab:hover{background:#2a2a2a}
html[data-theme=dark] #feedback-result:not(:empty){background:#1f3324}
html[data-theme=dark] .modal-feedback{background:#262626;color:#cfcfcf}
html[data-theme=dark] .user-button .news-dot{box-shadow:0 0 0 2px #0a0a0a}
html[data-theme=dark] .bottom-nav .news-dot{background:var(--lime)}
html[data-theme=dark] .event-card.tinted{background:linear-gradient(90deg,color-mix(in srgb,var(--tile) 22%,var(--white)),color-mix(in srgb,var(--tile) 7%,var(--white)) 70%);border-color:color-mix(in srgb,var(--tile) 32%,var(--line))}
html[data-theme=dark] .comment{border-bottom-color:#2c2c2c}
html[data-theme=dark] .comment.new{background:linear-gradient(90deg,#26301c,transparent)}
html[data-theme=dark] .event-meta .comment-new{color:#f0b071}
html[data-theme=dark] .attendee-group{border-bottom-color:#2c2c2c}
html[data-theme=dark] .fact-hint{background:#1f3324;color:#9fd69a}
/* Appearance switch in the profile. */
.theme-switch{display:flex;max-width:none}
.theme-switch button{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px}
html[data-theme=dark] .inbox-item.new::after{background:#f0b071}
@media(max-width:900px){html[data-theme=dark] .hero.compact .hero-shade{background:linear-gradient(180deg,rgba(0,0,0,.92) 28%,rgba(0,0,0,.3))}}
html[data-theme=dark] .sheet-item.danger{color:#f08a6b}
