/* ── Poorti theming ────────────────────────────────────────────────────────
   The app is built dark-first with many baked-in colours, so a token swap alone
   leaves light-on-light text. Instead, LIGHT mode inverts the whole dark UI (giving a
   consistent, readable light theme for free) and then RE-inverts real media (photos,
   logos, charts) so they look natural. theme.js toggles <html data-theme> and persists
   the choice to localStorage('mw_theme'). Dark is the default and untouched. */

html[data-theme="light"]{ background:#fff; }
html[data-theme="light"] body{
  filter: invert(0.93) hue-rotate(180deg);          /* dark surfaces → soft light; hue-rotate keeps brand colours roughly true */
  background:#0b0d0c;                                /* inverts to an off-white page */
}
/* re-invert anything that is a real picture or already light, so it isn't double-flipped */
html[data-theme="light"] img,
html[data-theme="light"] video,
html[data-theme="light"] svg image,
html[data-theme="light"] .poimg,
html[data-theme="light"] .pthumb,
html[data-theme="light"] .thumb,
html[data-theme="light"] .ccover img,
html[data-theme="light"] .cvtile img,
html[data-theme="light"] .leaflet-marker-icon,
html[data-theme="light"] #mwThemeToggle{
  filter: invert(1) hue-rotate(180deg);
}
/* map: keep store-type pins and selected / brand-coloured highlights in their TRUE
   colours — the whole-page invert would otherwise flip them (white active tab → black
   block, brand fills → wrong hues). Counter-invert just these. */
html[data-theme="light"] .dr-tab.active,
html[data-theme="light"] .tbtn.on-ebo,
html[data-theme="light"] .tbtn.on-afo,
html[data-theme="light"] .tbtn.on-orig,
html[data-theme="light"] .tbtn.on-jbpl{
  filter: invert(1) hue-rotate(180deg);
}

/* floating theme switcher (any page, no layout change) */
#mwThemeToggle{position:fixed;right:14px;bottom:14px;z-index:99999;width:38px;height:38px;border-radius:50%;
  background:#151513;border:1px solid #2B2A26;color:#EDEAE2;cursor:pointer;font-size:16px;
  display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(0,0,0,.4);transition:transform .15s}
#mwThemeToggle:hover{transform:translateY(-2px)}
@media print{#mwThemeToggle{display:none}}

/* Poorti brand in light mode: the mark and the yellow tag keep their true colours (counter-inverted, like a photo);
   the wordmark is light ink, so it rides the page invert and comes out dark ink on paper — as on poorti.store */
html[data-theme="light"] img[src*="poorti-wordmark"]{filter:none!important}
html[data-theme="light"] img[src*="poorti-mark"],
html[data-theme="light"] .btn.primary,
html[data-theme="light"] .inav .askbtn{filter:invert(1) hue-rotate(180deg)!important}
