.appearance-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border:0;padding:0;margin:0;min-inline-size:0}
.appearance-options label{position:relative;margin:0;cursor:pointer;min-width:0}
.appearance-options input{position:absolute;opacity:0;width:1px;height:1px}
.appearance-options span{display:block;text-align:center;border:1px solid var(--line);border-radius:12px;padding:14px 8px;font-size:16px;color:var(--ink);background:var(--bg)}
.appearance-options input:checked+span{background:#b5ed58;color:#254734;border-color:#254734;font-weight:700}
.appearance-options input:focus-visible+span{outline:3px solid #6a963c;outline-offset:3px}
.appearance-panel .footer-note{margin:14px 0 0}
/* Subtle backing only for copy placed directly over the selected scenery. */
:root{--scenery-copy-backing:rgba(247,249,246,.94);--scenery-copy-ink:#254734}
html[data-theme="dark"]{--scenery-copy-backing:rgba(13,32,30,.94);--scenery-copy-ink:#edf5ee}
body[data-profile-scenery]:not([data-profile-scenery="none"]) :is(.care-page,.walk-page,.bucket-page,.giving-directory)>:is(h1,h2,.eyebrow,p:not(.notice)),
body[data-profile-scenery]:not([data-profile-scenery="none"]) .bucket-heading{
 background:var(--scenery-copy-backing);color:var(--scenery-copy-ink);border-radius:12px;
 padding:10px 14px;max-width:100%;width:fit-content;
 -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
}
@media print{body[data-profile-scenery] :is(.care-page,.walk-page,.bucket-page,.giving-directory)>:is(h1,h2,.eyebrow,p:not(.notice)),body[data-profile-scenery] .bucket-heading{background:none;backdrop-filter:none;color:#254734}}
html[data-theme="dark"]{--ink:#edf5ee;--teal:#b5ed58;--mint:#b5ed58;--bg:#0f0f0f;--line:#444444;--muted:#bdbdbd;--surface:#1b1b1b;--surface-raised:#292929;color-scheme:dark}
html[data-theme="dark"] body{background-color:var(--bg);color:var(--ink)}
html[data-theme="dark"] :is(.panel,.sidebar,.spot-card,.detail,.care-card,.resource-card,.cause-card,.bucket-card,.preferred-group,.saved-profile-card,.public-pin-card,.pin-page,.pin-card,.desktop-pin-panel,.conversation-sidebar,.conversation-pane,.messages-heading,.gov-card,.gov-tree,.gov-content,.beta-card,.onboarding-card){background-color:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(dialog,#modal,header,#primary-ribbon,.pack-dock,.map-key,.map-zoom,.leaflet-popup-content-wrapper,.leaflet-popup-tip){background-color:var(--surface)!important;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] dialog::backdrop{background:#0009}
html[data-theme="dark"] :is(button,input,select,textarea,.search,.pack-dock #b-search,.dock-row button,.dock-row select){background-color:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html[data-theme="dark"] :is(button.primary,a.primary,button.active,.start-walk-button,.start-walk-compact,.dog-mode-tabs button[aria-pressed="true"]){background:#b5ed58;color:#254734;border-color:#b5ed58}
html[data-theme="dark"] :is(.text,.conversation-open,.preferred-item>[data-preferred-map],.preferred-actions button,.preferred-heading button){background:transparent;color:var(--ink)}
html[data-theme="dark"] :is(.badge,.notice,.mode,.category-icon,.conversation-heading,.thread-search,.chat-bubble,.pet-party-choice,.friend-row-menu>div,.conversation-friend-menu>div,.walk-summary-close,.close,.pin-lifecycle,.walk-discovery-list li){background-color:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.muted,.footer-note,.conversation-date,.conversation-preview,.friend-row-copy small,.friend-search-result small,.friend-search-form small,.inbox-friends-label,.conversation-welcome){color:var(--muted)}
html[data-theme="dark"] :is(.conversation-welcome h2,.conversation-welcome>svg,.saved-profile-card,.familiar-pin-card small){color:var(--ink)}
html[data-theme="dark"] .messages-page :is(.conversation-heading,#chat-form,.thread-search,.chat-compose textarea){background-color:var(--surface);color:var(--ink)}
html[data-theme="dark"] .messages-page .conversation-row[aria-current="true"],html[data-theme="dark"] .chat-bubble.mine{background:#333333;color:var(--ink);box-shadow:inset 3px 0 #b5ed58}
html[data-theme="dark"] body #primary-ribbon .nav-icons>a{color:var(--ink)}
html[data-theme="dark"] body #primary-ribbon .nav-icons>a[aria-current="page"]{background:#b5ed58;color:#254734}
html[data-theme="dark"] :is(.profile>.cover,.public-cover,#active-walk-indicator){background-color:var(--surface)!important;color:var(--ink)}
html[data-theme="dark"] .profile>.cover :is(.profile-pin-stats,.profile-treat-panel,.profile-walk-stats){background-color:#ffffff0d;color:#f7f9f6}
html[data-theme="dark"] .preferred-heading{background:#292929;color:#edf5ee}
html[data-theme="dark"] :is(.pet-party-choice:has(input:checked),#walk-party-form .pet-party-choice:has(input:checked)){background:#b5ed58;color:#254734}
html[data-theme="dark"] :is(.treat-drop-button,.quick-walk-treat,#active-walk-indicator [data-walk-treat]){background:#f8e7b6!important;color:#254734!important;border-color:#d9bd72!important}
html[data-theme="dark"] body.map-expanded #active-walk-indicator .quick-walk-actions button{color:#254734}
html[data-theme="dark"] body.map-expanded .pack-dock .dock-heading #drop-pin{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="light"] .petsmap-logo img{content:url('petsmap-logo-light.svg?v=woodland-563')}
html[data-theme="dark"] .petsmap-logo img{content:url('petsmap-logo-dark.svg?v=woodland-563')}
html[data-theme="dark"] .profile-scenery-option input:checked+.profile-scenery-circle{outline-color:#b5ed58}
html[data-theme="dark"] :is(a,button,input,textarea,select,summary):focus-visible{outline:2px solid #b5ed58;outline-offset:3px}
html[data-theme="dark"] .leaflet-container{background:#181818}
html[data-theme="dark"] .leaflet-control-attribution{background:#1b1b1be8;color:#edf5ee}
html[data-theme="dark"] .leaflet-control-attribution a{color:#b5ed58}
html[data-theme="dark"] .map-note{background:#1b1b1be8;color:#edf5ee}
html[data-theme="dark"] :is(.legacy-community-card,.legacy-community .preview-charity,.legacy-community .preview-community-news,.profile:not(.profile-preview) #preferred-places>.preferred-group,.public-pet-stats,.profile-pin-stats,.mobile-results,.menu-links a,.menu-links button,.quick-care,.pin-placement,.b-top,.b-bottom,.desktop-pin-header,.desktop-pin-content .pin-page .compact-pin-detail,.desktop-legend-tools,.cluster-preview,.pin-load-status,.message-pin-card,.pin-endorsements,.endorsement-bubble,.gov-shell main){background-color:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.pill,.thumb-zoom,.thumb-zoom #hide-map-ribbon,.thumb-zoom #show-map-ribbon,.radius-label,.demo-note,.live-map-banner,.map-data-label,.city-result,.reported-message,.section-help .info-popover,.section-help .info-popover:before,.message-info p,.inbox-notice.unread){background-color:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] body.map-expanded .pack-dock .dock-heading #add-private-pin.dock-square{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.map-summary,.cover,#toast,.cluster,.overflow-badge,.b-donate,.dock-walk,.nav-badge){background:#254734;color:#f7f9f6}
html[data-theme="dark"] :is(.count,.donate-nav,.dock-donate,.welcome-motto,.message-bubble,.giving-choice,.discovery-symbol,.welcome-signed-in,.symbolic-gifts label:has(input:checked)){background:#b5ed58;color:#254734}
html[data-theme="dark"] :is(.single-pin-full,.walk-share-toolbar #share-walk,.preview-shortcuts a.primary,.preview-shortcut-editor .shortcut-save,.section-help[open] summary){background:#b5ed58;color:#254734}
html[data-theme="dark"] body #primary-ribbon .nav-icons>a:hover{background:#b5ed58;color:#254734}
html[data-theme="dark"] .profile .profile-about-panel .immunization-open{background:#292929;color:#f7f9f6;border-color:#666666}
html[data-theme="dark"] :is(.spot-card:hover,.familiar-card:hover,.public-pin-link:hover){background:#333333;color:#f7f9f6}
html[data-theme="dark"] .profile>.cover :is(.profile-pin-stats dd,.profile-treat-stats dd,.profile-walk-stats dd){color:#e5f5ce}
html[data-theme="dark"] .gov-tree a[aria-current="page"]{background:#b5ed58;color:#254734}
html[data-theme="dark"] .gov-shell :is(a,.gov-brand){color:#edf5ee}
html[data-theme="dark"] .gov-shell :is(.lead,.eyebrow,.meta,small){color:#bdbdbd}
html[data-theme="dark"] .gov-children a:hover{background:#333333}
html[data-theme="dark"] :is(.desktop-pin-header button,.desktop-pin-resize,.desktop-legend-tools button,.preferred-selector button,.profile:not(.profile-preview) .preferred-actions button){color:var(--ink)}
html[data-theme="dark"] :is(.pin-icon-actions button:hover,.pin-icon-actions button:active,.single-pin-preview .single-pin-reactions button[aria-pressed="true"],.pin-presence-button.checked-in,.single-pin-preview .pin-presence-button.has-friends,.endorsement-choices input:checked+span){background:#b5ed58;color:#254734}
html[data-theme="dark"] .pin-icon-actions button:active svg{stroke:#254734}
/* Giving's inset card follows the theme independently of its outer panel. */
html[data-theme="dark"] .charity-feature{background:var(--surface-raised);color:var(--ink)}
html[data-theme="dark"] .charity-feature :is(.eyebrow,h3,p,.community-links a){color:var(--ink)}
html[data-theme="dark"] .charity-feature .footer-note{color:var(--muted)}
@media print{html[data-theme="dark"]{--ink:#254734;--teal:#254734;--bg:white;--muted:#526662;--surface:white;--surface-raised:#f7f9f6;--line:#d7e1db;color-scheme:light}}
/* Public preferred names share the card surface, without nested button pills. */
html[data-theme="dark"] .public-pet-card #preferred-places .preferred-item{padding:12px 10px;background:transparent}
html[data-theme="dark"] .public-pet-card #preferred-places .preferred-item>[data-preferred-map]{background:transparent;border:0;border-radius:0;box-shadow:none;color:var(--ink);padding:0;min-height:44px;font-size:14px;line-height:1.5;text-align:left;white-space:normal}
html[data-theme="dark"] .public-pet-card #preferred-places .preferred-item>[data-preferred-map] strong{font-weight:550;overflow-wrap:anywhere}
html[data-theme="dark"] .public-pet-card #preferred-places .preferred-item>[data-preferred-map]:hover{color:var(--mint);text-decoration:underline;text-underline-offset:3px}

/* DogMode uses the same solid, rounded surface as other working screens. */
.care-page.dog-mode{width:calc(100% - 48px);max-width:1080px;padding:28px;background:white;color:var(--ink);border:1px solid var(--line);border-radius:20px;box-shadow:0 12px 32px #25473418;overflow-wrap:anywhere}
html[data-theme="dark"] .care-page.dog-mode{background:var(--surface);color:var(--ink);border-color:var(--line)}
body[data-profile-scenery] .care-page.dog-mode>:is(h1,h2,.eyebrow,p:not(.notice)){background:none;padding:0;border-radius:0;width:auto;backdrop-filter:none;-webkit-backdrop-filter:none}
@media(max-width:760px){.care-page.dog-mode{width:calc(100% - 24px);margin:16px auto;padding:20px}.dog-mode-search input{min-width:0;width:100%}}
@media print{.care-page.dog-mode{background:white!important;color:#254734;border-color:#d7e1db;box-shadow:none}}

/* Dark pages keep their introduction and sections on one continuous surface. */
html[data-theme="dark"] :is(.care-page,.walk-page,.bucket-page,.giving-directory):not(.messages-page){width:calc(100% - 48px);max-width:1080px;margin:35px auto;padding:28px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:24px;box-shadow:0 12px 32px #0003;box-sizing:border-box;overflow-wrap:anywhere}
html[data-theme="dark"] body[data-profile-scenery] :is(.care-page,.walk-page,.bucket-page,.giving-directory)>:is(h1,h2,.eyebrow,p:not(.notice)),
html[data-theme="dark"] body[data-profile-scenery] .bucket-heading{background:none;padding:0;border-radius:0;width:auto;max-width:100%;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-theme="dark"] :is(.care-page,.walk-page,.bucket-page,.giving-directory)>a:first-child{display:inline-block;margin-bottom:24px}
@media(max-width:760px){html[data-theme="dark"] :is(.care-page,.walk-page,.bucket-page,.giving-directory):not(.messages-page){width:calc(100% - 24px);margin:16px auto;padding:20px;border-radius:20px}}
@media print{html[data-theme="dark"] :is(.care-page,.walk-page,.bucket-page,.giving-directory):not(.messages-page){background:white!important;color:#254734;box-shadow:none;border-color:#d7e1db}}

/* Saved place names and their controls share the category surface. */
.profile #preferred-places .preferred-item>[data-preferred-map],
.profile #preferred-places .preferred-actions button,
.profile #preferred-places .preferred-selector button{background:transparent!important;border:0!important;border-radius:0;box-shadow:none;color:inherit}
.profile #preferred-places .preferred-item{display:flex;align-items:center;gap:4px;min-width:0}
.profile #preferred-places .preferred-item>[data-preferred-map]{flex:1;min-width:0;white-space:normal;text-align:left;line-height:1.4}
.profile #preferred-places .preferred-actions{flex:0 0 44px;margin:0}
.profile #preferred-places .preferred-actions button,.profile #preferred-places .preferred-selector button{width:44px;min-height:44px;padding:10px}
.profile #preferred-places .preferred-item>[data-preferred-map]:hover{text-decoration:underline;text-underline-offset:3px}
.profile #preferred-places .preferred-actions button:hover,.profile #preferred-places .preferred-selector button:hover{color:var(--teal)}

/* Location control matches the dark map dock, including its active state. */
html[data-theme="dark"] body .pack-dock .dock-heading #locate-phone,
html[data-theme="dark"] body .pack-dock .dock-heading #locate-phone.location-on{background:var(--surface-raised);color:var(--ink);border-color:var(--line);box-shadow:none}
html[data-theme="dark"] body .pack-dock .dock-heading #locate-phone.location-on{color:var(--mint)}

/* Light-mode introduction text sits directly over the scenery. */
/* Cluster counts must not inherit pale text over light-only cards. */
html[data-theme="dark"] .cluster-preview .cluster-summary-counts>div{background:var(--surface-raised);color:var(--ink);border:1px solid var(--line)}
html[data-theme="dark"] .cluster-preview .cluster-summary-counts svg{color:var(--mint);stroke:currentColor}
html[data-theme="dark"] .cluster-preview .cluster-summary-counts small{color:var(--muted)}
html[data-theme="dark"] .cluster-preview .cluster-priority-label>span,
html[data-theme="dark"] .cluster-preview .cluster-priority-pins button:hover,
html[data-theme="dark"] .cluster-preview .cluster-priority-pins button:focus-visible{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .cluster-preview .cluster-founder-first{color:#654713}
html:not([data-theme="dark"]) body[data-profile-scenery]:not([data-profile-scenery="none"]) :is(.care-page,.walk-page,.bucket-page,.giving-directory)>:is(h1,h2,.eyebrow,p:not(.notice)),
html:not([data-theme="dark"]) body[data-profile-scenery] .bucket-heading{background:transparent;padding:0;border-radius:0;width:auto;backdrop-filter:none;-webkit-backdrop-filter:none}

/* Quickview copy and utility controls share the card surface. Keep the
   explicit selected states and primary actions distinct from plain controls. */
html[data-theme="dark"] body #cluster-preview.single-pin-preview :is(.map-pin-preview-grip,[data-cluster-close],.single-pin-description,.single-pin-categories .badge,.single-pin-reactions button){background:transparent;color:var(--ink);box-shadow:none}
html[data-theme="dark"] body #cluster-preview.single-pin-preview .map-pin-preview-grip{color:var(--muted)}
html[data-theme="dark"] body #cluster-preview.single-pin-preview .single-pin-reactions :is(button[aria-pressed="true"],button.checked-in,button.has-friends){background:var(--mint);color:#254734}
/* Empty photo previews need readable text on the dark form surface. */
html[data-theme="dark"] .photo-picker .photo-preview{background:var(--surface-raised);color:var(--ink)}

/* Fixed dark surfaces, with plain text rather than individual text backings. */
html[data-theme="dark"] body .profile>.cover :is(.profile-pin-stats,.profile-treat-panel,.profile-walk-stats){background:var(--surface-raised)!important;color:var(--ink)}
html[data-theme="dark"] body .profile>.cover :is(.profile-pin-stats dd,.profile-treat-stats dd,.profile-walk-stats dd){color:var(--ink)}
html[data-theme="dark"] body :is(.community-total-body .community-matrix>div,.chat-bubble.mine){background:var(--surface-raised);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] body .community-total-body .community-matrix dt{color:var(--muted)}
html[data-theme="dark"] body .community-total-body .community-matrix dd{color:var(--ink)}
html[data-theme="dark"] body #profile-community-total-window .community-refresh{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] body .profile .profile-about-panel .immunization-open{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
/* Outrank the shared dark form-control rule, including its dock search ID. */
html[data-theme="dark"] body .profile .classic-pet-name #classic-pet-selector,html[data-theme="dark"] body .preview-pet-name{background:transparent;color:var(--ink);box-shadow:none}
html[data-theme="dark"] body #active-walk-indicator{background:var(--surface)!important;color:var(--ink)}

/* Darken only the basemap. Marker, route, GPS and UI panes retain their colors. */
html[data-theme="dark"] #live-map{background:#151515}
html[data-theme="dark"] :is(#live-map,#pin-create-preview-map) .leaflet-tile-pane{filter:invert(1) grayscale(.85) brightness(.85) contrast(.9)}

/* Dark topo uses black and charcoal terrain with lighter map detail. */
html[data-theme="dark"] :is(#live-map,#pin-create-preview-map).petsmap-topo .leaflet-tile-pane{filter:invert(1) grayscale(1) brightness(.82) contrast(.9)}
