:root[data-hw-theme=light]{--hw-page:#faf9fe;--hw-card:#fff;--hw-raised:#f3eff9;--hw-ink:#211b35;--hw-muted:#6e627c;--hw-border:#e5deee;--hw-accent:#7631df;--hw-shell-background:var(--hw-page);--hw-shell-line:var(--hw-border);color-scheme:light}
:root[data-hw-theme=dark]{--hw-page:#14141b;--hw-card:#202029;--hw-raised:#2b2837;--hw-ink:#f2eef8;--hw-muted:#b9b1c7;--hw-border:#3b354a;--hw-accent:#c29aff;--hw-shell-background:var(--hw-page);--hw-shell-line:var(--hw-border);--ink:var(--hw-ink);--muted:var(--hw-muted);color-scheme:dark}
html[data-hw-theme],html[data-hw-theme] body{background:var(--hw-page)!important;color:var(--hw-ink)}
.hw-theme-toggle{display:inline-grid!important;place-items:center;width:40px;height:40px;min-width:40px;min-height:40px;padding:9px!important;border:1px solid var(--hw-border)!important;border-radius:50%!important;background:var(--hw-card)!important;color:var(--hw-ink)!important;cursor:pointer;flex:none;box-sizing:border-box}
.hw-theme-toggle svg{width:20px;height:20px;pointer-events:none}
.hw-theme-toggle:focus-visible{outline:3px solid var(--hw-accent);outline-offset:3px}
html[data-hw-theme] .hw-shell-header,html[data-hw-theme] .hw-shared-nav{background:var(--hw-card)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme] .hw-shared-link{color:var(--hw-ink)!important}
html[data-hw-theme] .hw-shared-link.selected{background:var(--hw-raised)!important;color:var(--hw-accent)!important}
html[data-hw-theme] .hw-shell-header .hw-shell-search,html[data-hw-theme] .hw-shell-header .hw-shell-icon{background:var(--hw-raised)!important;color:var(--hw-ink)!important}
html[data-hw-theme=light] #sheet.camera-studio .hw-shell-brand>img{display:block!important}
html[data-hw-theme=light] #sheet.camera-studio .hw-shell-brand-dark{display:none!important}
html[data-hw-theme=dark] .hw-shell-header .hw-shell-brand>img{display:none!important}
html[data-hw-theme=dark] .hw-shell-header .hw-shell-brand-dark{display:block!important;width:168px;height:56px}
html[data-hw-theme=dark] :is(.workspace,.app,.feed,.post,dialog,.dialog-header,.dialog-body,.hw-shell-page,.hw-loading-layout,#hw-startup,.hw-startup-side){background-color:var(--hw-page)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(.ps-identity,.ps-main,.ps-map-card,.ps-received-card,.ps-settings-designed,.ps-settings-group,.ps-setting-wide,.ps-settings-row,.ps-editor,.ms-sidebar,.ms-thread,.ms-peer,.ms-form,.ms-filter,.hw-wallet-available,.hw-wallet-received,.hw-wallet-add,.hw-wallet-row,.hw-tip-history,.hw-post-menu,.hw-tip-dialog,.hw-tip-card,.hw-loading-card,.card,.metric,.payment-card,.summary,.registration,.phone-row,.welcome-header,.welcome-footer,.sidebar){background:var(--hw-card)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(.author,.post-actions,.media,.post-image,.post-video,.place-label,.hw-map-title,.hw-map-explore,.hw-map-profile,.hw-map-center,.leaflet-control-zoom a,.leaflet-popup-content-wrapper,.leaflet-popup-tip){background-color:var(--hw-card)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select,.form-control,.phone-country-code){background-color:var(--hw-raised)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(input,textarea)::placeholder{color:var(--hw-muted)!important;opacity:1}
html[data-hw-theme=dark] :is(select option,.country-option,.country-menu){background:var(--hw-card)!important;color:var(--hw-ink)!important}
html[data-hw-theme=dark] .phone-row .phone-country select{color:transparent!important;background:transparent!important}
html[data-hw-theme=dark] .phone-country::after{border-color:var(--hw-muted)}
html[data-hw-theme=dark] :is(h1,h2,h3,h4,.ps-name,.ps-name span,.author-name,.media-caption,.hw-wallet-available strong,.hw-wallet-received strong,.hw-wallet-available small,.ps-settings-row,.ms-peer strong,.ps-editor label,.hw-tip-title){color:var(--hw-ink)!important}
html[data-hw-theme=dark] :is(.muted,.auth-note,.privacy-note,.ps-handle,.ps-bio,.ps-empty-description,.author-age,.ps-editor .world-identity,.capture-details,small,time,.hw-wallet-row-label small,.hw-wallet-withdraw small,.studio-note){color:var(--hw-muted)!important}
html[data-hw-theme=dark] :is(.ps-icon,.ps-edit-pencil,.ps-button:not(.primary),.outline,.text-action,.pill-button:not(.primary),.login-button,.ps-photo-label,.auth-link,.ms-filter button){background-color:var(--hw-raised)!important;color:var(--hw-accent)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(.ps-setting-icon,.badge,.private,.hw-wallet-row-icon,.hw-post-menu-items>button:hover,.ps-settings-row:hover){background:var(--hw-raised)!important;color:var(--hw-accent)!important}
html[data-hw-theme=dark] :is(.hw-post-danger,.danger,.auth-error,.inline-error){color:#ff9cb7!important}
html[data-hw-theme=dark] :is(.is-positive,#fresh){color:#79d6b0!important}
html[data-hw-theme=dark] :is(th,td,table,.toolbar,.section-head,.ps-tabs,.hw-wallet-filters,.hw-wallet-row){border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(th,.table-wrap,.empty,.chart,.financial,.setting-row){background-color:var(--hw-card)!important;color:var(--hw-ink)!important}
html[data-hw-theme=dark] tbody tr:nth-child(even){background:var(--hw-raised)!important}
html[data-hw-theme=dark] .sidebar{background:var(--hw-card)!important}
html[data-hw-theme=dark] .sidebar nav button:not(.active){color:var(--hw-ink)!important}
html[data-hw-theme=dark] :is(.welcome-copy h1,.welcome-copy p,.registration-intro,.auth-fields label){color:var(--hw-ink)!important}
html[data-hw-theme=dark] .welcome-main{background:var(--hw-page)!important}
html[data-hw-theme=dark] .welcome-header img,html[data-hw-theme=dark] .welcome-footer img,html[data-hw-theme=dark] .sidebar .brand img{filter:drop-shadow(0 0 1px #fff);background:#faf9fe;border-radius:8px}
html[data-hw-theme=dark] :is(.hw-loading-line,.hw-loading-block){background:var(--hw-raised)!important}
html[data-hw-theme] :is(button,input,select,textarea){font-family:inherit}
html[data-hw-theme] button{font-weight:500}
/* The camera image keeps its natural colors in either theme. Desktop chrome follows the site. */
@media(min-width:901px){
 html[data-hw-theme] #sheet.camera-studio,html[data-hw-theme] #sheet.camera-studio #cameraStudio .studio-layout{background:var(--hw-page)!important;color:var(--hw-ink)!important}
 html[data-hw-theme] #sheet.camera-studio .studio-panel{background:var(--hw-card)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important;color-scheme:inherit}
 html[data-hw-theme] #sheet.camera-studio .studio-panel :is(select,textarea){background:var(--hw-raised)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
 html[data-hw-theme=light] #sheet.camera-studio :is(#closeCamera,#cameraSettings){color:var(--hw-ink)!important;background:var(--hw-raised)!important}
 html[data-hw-theme=light] #sheet.camera-studio #cameraSettings svg{background:transparent}
 html[data-hw-theme=light] #sheet.camera-studio .studio-shutter{border-color:#59466e}
 html[data-hw-theme=light] #sheet.camera-studio #cameraModes button{color:#59466e}
 html[data-hw-theme=light] #sheet.camera-studio .studio-panel .studio-note{color:var(--hw-muted)}
 html[data-hw-theme=light] #sheet.camera-studio .studio-progress{border-color:var(--hw-border);background:var(--hw-raised)}
 html[data-hw-theme=light] #sheet.camera-studio .studio-progress li{color:#6e627c}
 html[data-hw-theme=light] #sheet.camera-studio .studio-progress li[data-state=active]{color:#211b35}
}
@media(max-width:900px){.hw-theme-toggle{width:36px;height:36px;min-width:36px;min-height:36px;padding:8px!important}html[data-hw-theme=dark] .hw-shell-header .hw-shell-brand-dark{width:150px}.hw-shell-tools{gap:8px}.welcome-header .header-tools{gap:6px;flex-wrap:wrap}}
/* Secondary controls and panels retain contrast in the night palette. */
html[data-hw-theme=dark]{--line:var(--hw-border);--purple:var(--hw-accent);--lavender:#3a2b54}
html[data-hw-theme=dark] :is(.ps-settings-designed>section,.ps-settings-identity,.ps-world-empty,.ps-map,.ps-wallet-entry,.map-expand,.ms-header,.ms-compose,.ms-new,.hw-tip-close,#closeSheet,#backSheet){background:var(--hw-card)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(.ps-filters button,.ms-sidebar button,.post-actions button:not(.hw-tip-trigger),.post-actions button:not(.hw-tip-trigger) .icon,.dialog-header button,.hw-wallet-page .hw-tip-close){color:var(--hw-muted)!important}
html[data-hw-theme=dark] :is(.ps-filters button[aria-pressed=true],.ps-received-card strong,.ps-received-card svg,.ps-wallet-entry,.post-actions .liked,.post-actions .liked .icon){color:var(--hw-accent)!important}
html[data-hw-theme=dark] .ps-filters{border-color:var(--hw-border)!important}
html[data-hw-theme=dark] .hw-wallet-row>strong:not(.is-positive){color:#ff9cb7!important}
html[data-hw-theme=dark] .ps-map-caption{color:var(--hw-muted)!important}
/* Do not recolor photo/video pixels or avatars with the map treatment. */
html[data-hw-theme=dark] :is(.record-card,.financial>div,.user-balances>div,.sidebar footer,.sidebar footer button,.dialog-head,#detail,.saved-card){background:var(--hw-card)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(.payout-tabs button,.dialog-head button,#secret,.detail-message){background:var(--hw-raised)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(#error,.badge.bad){background:#422537!important;color:#ffb8ca!important;border-color:#714055!important}
html[data-hw-theme=dark] :is(.amount,.amount-box){background:var(--hw-raised)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] a:not(.primary):not(.brand){color:var(--hw-accent)}
html[data-hw-theme=dark] #welcomeStatus{color:#ff9cb7}
.hw-theme-brand{display:none;width:200px;height:66px;flex:none}
html[data-hw-theme=dark] .hw-theme-logo-original{display:none!important}
html[data-hw-theme=dark] .hw-theme-brand{display:block}
.welcome-footer .hw-theme-brand{width:110px;height:37px}
.sidebar .hw-theme-brand{width:184px;height:48px;max-width:100%}
@media(max-width:600px){.welcome-header .hw-theme-brand{width:160px;height:54px}}
html[data-hw-theme=dark]{--purple:#8444eb}
html[data-hw-theme=dark] .sidebar nav button.active{background:var(--hw-raised)!important;color:var(--hw-accent)!important}
html[data-hw-theme=dark] .dialog-header button{background:var(--hw-raised)!important;color:var(--hw-ink)!important}

/* Appearance uses the same settings row, with native accessible disclosure. */
.hw-appearance-menu{border-bottom:1px solid var(--hw-border)}
.hw-appearance-menu>summary.ps-settings-row{display:flex;cursor:pointer;list-style:none;width:100%;box-sizing:border-box}
.hw-appearance-menu>summary::-webkit-details-marker{display:none}
.hw-appearance-menu>summary>b{transition:transform .15s}
.hw-appearance-menu[open]>summary>b{transform:rotate(90deg)}
.hw-appearance-options{border:0;padding:0 0 12px 50px;margin:0;min-width:0;display:grid;gap:4px}
.hw-appearance-options label{display:flex;align-items:center;gap:10px;padding:10px 8px;min-height:44px;box-sizing:border-box;border-radius:10px;cursor:pointer;color:var(--hw-ink);font-size:14px;font-weight:400}
.hw-appearance-options label:has(input:checked){background:var(--hw-card-raised,var(--hw-card));color:var(--hw-accent)}
.hw-appearance-options input{appearance:auto;width:17px;height:17px;min-height:0;margin:0;flex:none;accent-color:var(--hw-accent)}
.hw-appearance-legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.hw-appearance-menu>summary:focus-visible,.hw-appearance-options input:focus-visible{outline:2px solid var(--hw-accent);outline-offset:2px}

/* One continuous surface for the country prefix and telephone number. */
html[data-hw-theme=dark] .registration .phone-row{background:var(--hw-raised)!important}
html[data-hw-theme=dark] .phone-row :is(#phoneNumber,.phone-country-code){background:transparent!important;box-shadow:none!important}

/* Text links and the unboxed mobile form remain on the page surface. */
html[data-hw-theme=dark] .registration .auth-link{background:transparent!important}
@media(max-width:700px){
 html[data-hw-theme=dark] .registration{background:transparent!important}
 html[data-hw-theme] .welcome-header .hw-theme-brand{width:148px;height:49px}
}
@media(max-width:360px){html[data-hw-theme] .welcome-header .hw-theme-brand{width:135px;height:45px}}

/* Night basemap: vector colors are managed in basemap.js. Only raster fallback
   tiles are filtered; avatars, photos, labels in controls and gestures are not. */
html[data-hw-theme=dark] .leaflet-container{background:#202029!important}
html[data-hw-theme=dark] .hw-basemap-fallback{filter:invert(1) hue-rotate(180deg) brightness(.7) saturate(.5)!important}
html[data-hw-theme=dark] .hw-tip-amount{background:#332641!important;color:#d0b0ff!important}
html[data-hw-theme=dark] :is(.map-expand,.pd-map-wrap>button,.leaflet-control-zoom a){background:var(--hw-card)!important;color:var(--hw-ink)!important;border-color:var(--hw-border)!important}
html[data-hw-theme=dark] :is(.map-expand,.pd-map-wrap>button,.leaflet-control-zoom a):hover{background:var(--hw-raised)!important}
html[data-hw-theme=dark] .hw-tip-trigger:focus-visible{outline-color:#d0b0ff}

/* Account deletion has its own compact layout, independent of profile forms. */
#sheet:has(.hw-delete-account){width:min(560px,calc(100vw - 28px))!important;height:auto!important;max-height:calc(100dvh - 28px)!important;overflow:auto;border:1px solid var(--hw-border);border-radius:20px}
#sheet:has(.hw-delete-account) .dialog-header{position:sticky;top:0;z-index:2;background:var(--hw-page)!important;min-height:64px;box-sizing:border-box}
#sheet:has(.hw-delete-account) .dialog-header h2{font-size:18px;line-height:1.35}
#sheet:has(.hw-delete-account) .dialog-body{padding:22px!important;height:auto!important;min-height:0!important;display:block!important}
.hw-delete-account{display:flex;flex-direction:column;gap:16px;background:transparent!important;color:var(--hw-ink);font-size:14px;line-height:1.6;min-width:0}
.hw-delete-account>p{margin:0!important;padding:0!important;min-height:0;overflow-wrap:anywhere}
.hw-delete-account>p:nth-child(2){color:var(--hw-muted);font-size:13px}
.hw-delete-account #deleteAccountStatus:not(:empty){background:var(--hw-raised);border:1px solid var(--hw-border);border-radius:12px;padding:14px!important}
.hw-delete-account :is(#deleteAccountStatus,#deleteAccountError):empty{display:none}
#deleteAccountActions{display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;margin:2px 0 0}
#deleteAccountActions:empty{display:none}
#deleteAccountActions .ps-button{display:inline-flex;align-items:center;justify-content:center;flex:1 1 170px;width:auto!important;min-width:0;min-height:44px;margin:0!important;padding:12px 16px;border:1px solid var(--hw-border);border-radius:12px;box-sizing:border-box;background:var(--hw-raised);color:var(--hw-accent);font:inherit;font-size:14px;line-height:1.4;text-align:center;text-decoration:none;white-space:normal;cursor:pointer}
#deleteAccountActions .ps-button.primary{background:#7835d9!important;color:#fff!important;border-color:#7835d9!important}
#deleteAccountActions .ps-button:focus-visible{outline:2px solid var(--hw-accent);outline-offset:3px}
#deleteAccountActions .ps-button:disabled{opacity:.6;cursor:wait}
.hw-delete-account #deleteAccountError{color:#b32e50}
html[data-hw-theme=dark] .hw-delete-account #deleteAccountError{color:#ff9cb7}
@media(max-width:600px){#sheet:has(.hw-delete-account) .dialog-body{padding:18px!important}#deleteAccountActions .ps-button{flex-basis:100%}}

/* Empty feed: transparent illustration, no visible technical/empty-state text. */
#feed .hw-empty-feed{box-sizing:border-box;display:grid;place-items:center;width:100%;height:100%;min-height:220px;padding:24px;background:transparent}
#feed .hw-empty-feed img{display:block;width:clamp(200px,30vw,340px);max-width:100%;height:auto;object-fit:contain;filter:none}
/* Keep real padding inside the deletion panel in either theme. */
#sheet .hw-delete-account{box-sizing:border-box;padding:22px;border:1px solid var(--hw-border);border-radius:16px;background:var(--hw-card)!important}
@media(max-width:600px){#sheet .hw-delete-account{padding:18px}#feed .hw-empty-feed img{width:min(260px,75vw)}}

/* First publication: outer publication frame and inset image frame. */
#feed:has(> .hw-empty-feed){border:1px solid var(--hw-border,#e5deee);border-radius:16px;box-sizing:border-box}
#feed .hw-empty-feed{padding:22px;min-height:320px}
#feed .hw-empty-image-frame{box-sizing:border-box;display:grid;place-items:center;align-self:stretch;width:100%;min-width:0;min-height:0;padding:24px 16px;border:1px solid var(--hw-border,#e5deee);border-radius:14px;background:transparent}
#feed .hw-empty-content{display:flex;flex-direction:column;align-items:center;width:100%;gap:24px}
#feed .hw-first-publication{margin:0;padding:0;max-width:100%;font-family:inherit;font-size:clamp(13px,1.1vw,16px);font-weight:600;line-height:1.4;text-align:center;color:var(--hw-ink,#211b35);overflow-wrap:break-word}
#feed .hw-first-publication span{color:#9d70fa}
@media(max-width:600px){#feed .hw-empty-feed{padding:12px}#feed .hw-empty-image-frame{padding:20px 12px;border-radius:12px}#feed .hw-empty-content{gap:20px}}

/* Native button: pointer, keyboard and touch use the existing Publish entry. */
#feed button.hw-empty-image-frame{appearance:none;font:inherit;color:inherit;text-align:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform 120ms ease,background-color 120ms ease,box-shadow 120ms ease}
@media(hover:hover){#feed button.hw-empty-image-frame:hover{background:transparent}}
#feed button.hw-empty-image-frame:active{transform:scale(.985);background:var(--hw-raised);box-shadow:inset 0 2px 5px #00000018}
#feed button.hw-empty-image-frame:focus-visible{outline:2px solid var(--hw-accent);outline-offset:3px}
@media(prefers-reduced-motion:reduce){#feed button.hw-empty-image-frame{transition:none}#feed button.hw-empty-image-frame:active{transform:none}}

/* Plain links in all themes and interaction states; keyboard outlines retained. */
html body a:any-link,html body a:any-link:hover,html body a:any-link:focus-visible,html body a:any-link:active,html body button,html body [role="link"]{text-decoration:none!important}

/* Night appearance: interactive navigation, feed frame and profile placeholder. */
html[data-hw-theme=dark] .hw-shared-nav .hw-shared-link:is(:hover,:focus-visible){background:var(--hw-raised)!important;color:var(--hw-accent)!important}
html[data-hw-theme=dark] #app:not(.is-map)>.feed-wrap,
html[data-hw-theme=dark] #app #feed:has(>.hw-empty-feed),
html[data-hw-theme=dark] #app #feed .hw-empty-image-frame{border-color:var(--hw-border)!important}
html[data-hw-theme=dark] .hw-loading-identity{background:var(--hw-card);border-color:var(--hw-border);color:var(--hw-ink)}
html[data-hw-theme=dark] .hw-loading-identity i{background:var(--hw-raised)}
