:root { color-scheme:light; }
.brand .brand-logo-dark { display:none; }
.appearance-choice { position:relative; display:inline-flex; align-items:center; gap:10px; min-height:44px; color:var(--green); }
.appearance-choice select { min-height:46px; max-width:100%; border:1px solid var(--line); border-radius:8px; padding:9px 30px 9px 12px; background:var(--paper); color:var(--ink); font:inherit; cursor:pointer; }
.appearance-choice.is-compact { width:44px; height:44px; flex:none; justify-content:center; border-radius:9px; }
.appearance-choice.is-compact:hover { background:var(--light); }
.appearance-choice.is-compact select { position:absolute; inset:0; width:100%; height:100%; opacity:0; padding:0; }
.appearance-choice:focus-within { outline:2px solid var(--focus); outline-offset:2px; }
.appearance-choice .appearance-label { font-weight:650; }
.appearance-choice.is-compact .appearance-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.appearance-settings { display:grid; align-content:start; gap:14px; }
.appearance-settings h2,.appearance-settings p { margin:0; }
.appearance-settings .appearance-choice { flex-wrap:wrap; }
@media (max-width:560px) { .public-nav-links { gap:8px; } .topbar { gap:8px; } .topbar .search { min-width:0; } }
@media print { .appearance-choice { display:none!important; } }
/* Krąg website appearance. Same semantic colours as the iPhone app.
   Light and print retain the original palette; photographs and maps are never inverted. */
@media screen and (forced-colors: none) {
  :root[data-theme=dark] {
    color-scheme: dark;
    --bg:#17251e!important; --paper:#22372c!important; --ink:#f1f4ef!important;
    --muted:#b3c4b7!important; --green:#8bc7a3!important; --forest:#8bc7a3!important;
    --green-dark:#b4ddc2!important; --focus:#8bc7a3!important; --light:#304b3b!important;
    --sage:#304b3b!important; --line:#526a59!important; --chrome:#1d3026!important;
    --cream:#17251e!important; --sand:#3d392b!important; --orange:#e0b083!important;
    --danger:#ffb4a6!important; --error-ink:#ffb4a6!important;
    --native-on-action:#14291f; --native-error:#482c28;
    color:var(--ink)!important; background:var(--bg)!important;
    scrollbar-color:var(--muted) var(--bg);
  }
  :root[data-theme=dark] body { color:var(--ink)!important; background:var(--bg)!important; }
  :root[data-theme=dark] :is(.sidebar,.sidebar-bottom,.topbar,.mobile-nav,.public-nav,.form-panel,.panel,.meeting-card,.agenda,.post,.photo-note,.empty,.account-popover,dialog:not(.photo-viewer),.recipient-control,.password-control,.event-date-control,.event-date-range-trigger,.rich-editor-frame,.companion-menu,.krag-guide) {
    background:var(--paper)!important; color:var(--ink)!important; border-color:var(--line)!important;
  }
  :root[data-theme=dark] :is(.btn,.search-field,.field input,.field textarea,.field select,.guest-proof-tools input,.rich-link-fields input,.guide-search-row,.calendar-editor-head select) {
    background:var(--paper)!important; color:var(--ink)!important; border-color:var(--line)!important;
  }
  :root[data-theme=dark] :is(input,textarea,.ProseMirror) { caret-color:var(--green)!important; }
  :root[data-theme=dark] :is(input,textarea)::placeholder { color:var(--muted)!important; opacity:1; }
  :root[data-theme=dark] :is(input[type=checkbox],input[type=radio],input[type=range]) { accent-color:var(--green)!important; }
  :root[data-theme=dark] :is(.field small,.check-field,.nav a,.side-label,.side-note p,.panel p,.guide-ribbon-copy p,.guide-ribbon-count,.guide-ribbon-pending,.guide-welcome p,.krag-guide p,.guide-topic small,.guide-search-result small,.krag-guide .guide-caption,.krag-guide .guide-context-note,.krag-guide .guide-status,.guide-companion .companion-tip,.guide-companion .companion-status,.rich-editor-footer,.rich-panel-help,.request-context,.request-decision>p,.circle-request-row p,.circle-request-state p) { color:var(--muted)!important; }
  :root[data-theme=dark] :is(.btn.subtle,.text-link,.password-toggle,.guide-topic,.guide-text-button,.guide-search-result,.guide-search-clear,.guide-close,.rich-tool,.rich-retry,.rich-panel-close,.rich-copy a,.ProseMirror a,.guide-faq summary,.guide-steps summary,.guide-search label) { color:var(--green)!important; }
  :root[data-theme=dark] :is(.btn.subtle,.password-toggle,.guide-close,.guide-search-clear,.guide-topic,.guide-text-button,.guide-search-result,.rich-tool,.rich-panel-close) { background:transparent!important; }
  :root[data-theme=dark] :is(.recipient-chip,.recipient-person,.side-note,.detail-header,.comment,.status,.new-badge,.communication-notice,.communication-status.neutral,.communication-status.success,.request-outcome-panel.neutral,.request-outcome-panel.success,.event-date-panel,.rich-toolbar,.rich-inline-panel,.rich-copy blockquote,.ProseMirror blockquote,.guide-header,.guide-welcome,.guide-ribbon,.guide-ribbon-host,.dialog-guide-help,.event-audience-options>label:has(input:checked)) {
    background:var(--light)!important; color:var(--ink)!important; border-color:var(--line)!important;
  }
  :root[data-theme=dark] :is(.event-date-grid button,.recipient-chip>button,.recipient-control>input,.krag-guide .guide-search input,.ProseMirror) { color:var(--ink)!important; background:transparent!important; }
  :root[data-theme=dark] :is(.rich-tool[aria-pressed=true],.rich-tool:hover:not(:disabled),.guide-steps [aria-current=step],.guide-topic:hover,.guide-text-button:hover,.guide-search-result:hover,.event-date-grid button:hover,.rsvp-options .selected) { background:var(--light)!important; color:var(--ink)!important; }
  :root[data-theme=dark] .event-date-grid button.is-in-range { background:var(--light)!important; color:var(--ink)!important; }
  :root[data-theme=dark] :is(.btn.primary,.nav a.active,.event-date-grid button[aria-pressed=true],.event-date-grid button.is-range-start,.event-date-grid button.is-range-end,.calendar .today) {
    color:var(--native-on-action)!important; background:var(--green)!important; border-color:var(--green)!important;
  }
  :root[data-theme=dark] .btn.primary:hover { background:var(--green-dark)!important; }
  :root[data-theme=dark] :is(.form-error,.event-field-error,.notice.error,.communication-status.danger,.request-outcome-panel.danger) { background:var(--native-error)!important; color:var(--danger)!important; }
  :root[data-theme=dark] :is(.recipient-feedback.recipient-error,.date-editor-error,.rich-link-error,.rich-editor-footer [data-rich-status][data-error=true],.btn.danger,.event-field-error) { color:var(--danger)!important; }
  :root[data-theme=dark] :is(input,textarea,select)[aria-invalid=true],
  :root[data-theme=dark] .recipient-control:has(input[aria-invalid=true]) { border-color:var(--danger)!important; --focus:var(--danger)!important; }
  :root[data-theme=dark] :is(.notice,.demo-banner,.legal-draft) { background:var(--sand)!important; color:var(--ink)!important; }
  :root[data-theme=dark] .notice.error { background:var(--native-error)!important; color:var(--danger)!important; }
  :root[data-theme=dark] .media-crop { background:var(--bg)!important; border-color:var(--line)!important; }
  :root[data-theme=dark] :is(.rich-editor-footer,.rich-toolbar,.guide-footer,.guide-faq,.guide-steps,.guide-topic,.guide-search-result,.media-slot-state,.safety-case-result) { border-color:var(--line)!important; }
  :root[data-theme=dark] .ProseMirror[data-empty=true]::before { color:var(--muted)!important; }
  :root[data-theme=dark] .guide-companion[data-menu-open=true]::before { background:var(--paper)!important; }
  :root[data-theme=dark] .guide-target-hint { --guide-target-color:var(--green); }
  :root[data-theme=dark] .guide-target-hint[data-kind=error] { --guide-target-color:var(--danger); }
  :root[data-theme=dark] .guide-target-label { color:var(--native-on-action)!important; }
  :root[data-theme=dark] :is(.notification-filters,.notification-status-filters) a { color:var(--green)!important; border-color:var(--line)!important; }
  :root[data-theme=dark] :is(.notification-filters,.notification-status-filters) a[aria-current=page] { color:var(--ink)!important; background:var(--light)!important; }
  :root[data-theme=dark] :is(.notification-badge,.chirps-mobile-count) { color:var(--native-on-action)!important; background:var(--green)!important; border-color:var(--paper)!important; }
  /* Fixed-colour secondary surfaces from the existing web stylesheets. */
  :root[data-theme=dark] :is(.cover-symbol,.date-tile,.agenda-date,.data-table th,.request-message,.rich-editor-footer,.rich-symbol-filters input,.rich-symbol-filters select,.reaction-filters input,.reaction-filters select) { background:var(--paper)!important; color:var(--ink)!important; border-color:var(--line)!important; }
  :root[data-theme=dark] :is(.nav .count,.mini-cover,.avatar,.private-tag,.circle-identity-note,.request-message.is-mine,.photo-preview-hint,.post-reactions .is-mine,.reaction-count:hover,.reaction-choice:hover,.chat-photo-button,.chat-photo-preview,.chat-photo-message,.rich-emoji-grid button:hover,.rich-readonly .ProseMirror,.companion-control:hover,.companion-tools summary:hover,.companion-close:hover,.ribbon-icon:hover,.ribbon-icon[aria-pressed=true]) { background:var(--light)!important; color:var(--ink)!important; }
  :root[data-theme=dark] .circle-identity-fields :is(input[readonly],textarea[readonly],select:disabled) { background:var(--light)!important; color:var(--muted)!important; -webkit-text-fill-color:var(--muted)!important; }
  :root[data-theme=dark] .rich-editor-footer { color:var(--muted)!important; }
  :root[data-theme=dark] :is(.rich-editor-footer [data-rich-status][data-error=true],.chirps-status.is-error,.pogaduchy-status.is-error,.event-chat-status.is-error,.event-chat-compose-actions .is-over-limit) { color:var(--danger)!important; }
  :root[data-theme=dark] .brand .brand-logo-light { display:none; }
  :root[data-theme=dark] .brand .brand-logo-dark { display:block; }
  :root[data-theme=dark] .brand-symbol path { stroke:var(--green)!important; }
  :root[data-theme=dark] .brand-orbit circle:last-child { fill:var(--green)!important; }
  /* Browser conversations remain reachable from the owned site as well as native UI. */
  :root[data-theme=dark] :is(.chirps-layout,.chirps-inbox-head,.chirp-conversation-head,.chirps-safety[open],.chirp-compose,.chirp-new-arrivals,.chirp-report,.chirp-extras,.pogaduchy-compose,.event-chat-compose,.event-chat-action-form,.event-chat-unavailable) { background:var(--paper)!important; color:var(--ink)!important; }
  :root[data-theme=dark] :is(.chirps-conversation,.pogaduchy-log,.event-chat-log,.chirp-day time,.event-chat-day time) { background:var(--bg)!important; color:var(--ink)!important; }
  :root[data-theme=dark] :is(.chirps-layout,.pogaduchy-layout,.event-chat-layout) :is(textarea,input,select) { background:var(--paper)!important; color:var(--ink)!important; border-color:var(--line)!important; }
  :root[data-theme=dark] :is(.chirp-thread,.chirp-message,.chirp-message.chirp-mine,.chirp-compose-preview p,.chirp-draft-context p,.pogaduchy-preview p,.event-chat-preview p) { color:var(--ink)!important; }
  :root[data-theme=dark] :is(.chirp-bubble,.pogaduchy-bubble,.event-chat-bubble,.chirp-initial,.chirp-thread.active,.chirp-thread:hover,.chirp-report blockquote,.event-chat-readonly,.event-chat-action-form blockquote,.event-chat-arrivals) { background:var(--light)!important; color:var(--ink)!important; }
  :root[data-theme=dark] :is(.chirp-mine .chirp-bubble,.pogaduchy-message.is-mine .pogaduchy-bubble,.event-chat-message.is-mine .event-chat-bubble) { background:var(--light)!important; color:var(--ink)!important; }
  :root[data-theme=dark] :is(.chirp-preview,.chirp-conversation-head p,.chirp-message-meta,.chirp-mine .chirp-message-meta,.chirp-compose-actions p,.chirp-format-tools>span,.chirp-compose-preview>span,.chirps-empty-copy,.chirps-welcome p,.chirp-extras p,.chirp-day,.chirp-receipt,.chirp-receipt.is-read,.chirp-thread-row .chirp-thread-meta,.chirp-thread-row .chirp-thread-state,.pogaduchy-head p,.pogaduchy-meta,.pogaduchy-message.is-mine .pogaduchy-meta,.event-chat-head p,.event-chat-meta,.event-chat-message.is-mine .event-chat-meta,.event-chat-day,.event-chat-compose-actions p,.event-chat-empty,.event-chat-own-read) { color:var(--muted)!important; }
  :root[data-theme=dark] :is(.chirp-contact,.chirps-safety summary,.chirp-format-button,.chirp-message-options>summary,.chirp-mine .chirp-message-options>summary,.chirp-sender,.chirp-shared-links a,.chirp-mine .chirp-shared-links a,.chirps-context-nav a,.chirps-mailbox-toolbar a,.chirps-pane-tabs a,.pogaduchy-sender,.pogaduchy-icon,.event-chat-sender,.event-chat-icon,.event-chat-status) { color:var(--green)!important; }
  :root[data-theme=dark] :is(.chirps-context-nav,.chirps-mailbox-toolbar,.chirps-pane-tabs) a[aria-current] { background:var(--light)!important; color:var(--ink)!important; }
  :root[data-theme=dark] :is(.chirp-message-options .btn,.chirp-mine .chirp-message-options .btn) { background:var(--paper)!important; color:var(--green)!important; }
  :root[data-theme=dark] :is(.chirps-checking,.pogaduchy-checking,.event-chat-checking)::after { background:var(--paper)!important; color:var(--muted)!important; }
  :root[data-theme=dark] :is(.pogaduchy-message.is-deleted,.event-chat-message.is-deleted) :is(.pogaduchy-body,.event-chat-body) { color:var(--muted)!important; }
  :root[data-theme=dark] ::selection { background:var(--green)!important; color:var(--native-on-action)!important; }
  /* Preserve the authored light palette inside map tiles, controls, QR/poster and
     offscreen poster export DOM. Image pixels/canvas/SVG geometry are never touched. */
  :root[data-theme=dark] :is(.world-map-canvas,.invitation-poster,#invite-poster-print-root) {
    color-scheme:light; --bg:#f7f7f2!important; --paper:#fff!important; --ink:#20352b!important;
    --muted:#637168!important; --green:#215842!important; --green-dark:#173e30!important;
    --light:#e9efe7!important; --line:#e3e7df!important; --focus:#215842!important;
  }
  :root[data-theme=dark] :is(.toast,.skip-link) { color:var(--native-on-action)!important; }
  :root[data-theme=dark] :is(.chirps-status:not(.is-error),.pogaduchy-status:not(.is-error),.chirp-draft-context strong) { color:var(--green)!important; }
  :root[data-theme=dark] :is(.chirp-draft-context p>span,.pogaduchy-preview>span,.event-chat-preview>span) { color:var(--muted)!important; }
  :root[data-theme=dark] :is(button,a,summary,input,textarea,select,[tabindex]):focus-visible { outline-color:var(--focus)!important; }
  :root[data-theme=dark] .event-field-invalid[aria-invalid=true] { outline-color:var(--danger)!important; --focus:var(--danger)!important; }

  :root[data-theme=dark] .calendar .day-label { color:var(--muted)!important; }

}
