/* CM77 public theme v1.1.8 — warm brown/gold matched to CM77 reference. Loaded after each page's own CSS.
   Only pages opting in with data-cm77-theme="public" receive this theme.
   Map tiles, marker colors, media and embedded third-party pages retain their colors. */
html[data-cm77-theme="public"] {
  color-scheme: dark;
  --cm77-theme-bg: #8a623a;
  --cm77-theme-surface: #704b2c;
  --cm77-theme-raised: #805735;
  --cm77-theme-input: #6b431f;
  --cm77-theme-text: #fff8ed;
  --cm77-theme-muted: #fff176;
  --cm77-theme-gold: #fff0cc;
  --cm77-theme-gold-hover: #fff3dd;
  --cm77-theme-line: #c5975d;
  --cm77-theme-on-gold: #3b240f;
  --cm77-theme-red: #ffebe6;
  --cm77-theme-green: #d4f5c8;
  --cm77-theme-blue: #e0f2ff;
  --cm77-theme-shadow: 0 10px 26px #0003;
}
/* Legacy variable names are overridden on body, below existing :root palettes. */
html[data-cm77-theme="public"] body {
  --bg: var(--cm77-theme-bg); --paper: var(--cm77-theme-bg);
  --cream: var(--cm77-theme-bg); --cream-dark: var(--cm77-theme-raised);
  --panel: var(--cm77-theme-surface); --panel2: var(--cm77-theme-raised);
  --card: var(--cm77-theme-surface); --text: var(--cm77-theme-text);
  --ink: var(--cm77-theme-text); --ink-soft: var(--cm77-theme-muted);
  --muted: var(--cm77-theme-muted); --line: var(--cm77-theme-line);
  --border: var(--cm77-theme-line); --brown: var(--cm77-theme-gold);
  --brown-2: var(--cm77-theme-gold); --brown-dark: var(--cm77-theme-surface);
  --gold: var(--cm77-theme-gold); --gold2: var(--cm77-theme-gold-hover);
  --gold-dark: var(--cm77-theme-gold-hover); --accent: var(--cm77-theme-gold);
  --dark: var(--cm77-theme-input); --shadow: var(--cm77-theme-shadow);
  --cm77-bg: var(--cm77-theme-bg); --cm77-card: var(--cm77-theme-surface);
  --cm77-surface: var(--cm77-theme-surface); --cm77-surface-soft: var(--cm77-theme-raised);
  --cm77-text: var(--cm77-theme-text); --cm77-ink: var(--cm77-theme-text);
  --cm77-muted: var(--cm77-theme-muted); --cm77-border: var(--cm77-theme-line);
  --cm77-gold: var(--cm77-theme-gold); --cm77-gold-dark: var(--cm77-theme-gold-hover);
  --cm77-brown: var(--cm77-theme-gold); --cm77-dark: var(--cm77-theme-input);
  --cm77-shadow: var(--cm77-theme-shadow);
  --rr-brown: var(--cm77-theme-gold); --rr-gold: var(--cm77-theme-gold);
  --rr-cream: var(--cm77-theme-bg); --rr-line: var(--cm77-theme-line);
  background: var(--cm77-theme-bg); color: var(--cm77-theme-text);
  font-family: Tahoma, system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.7;
}
html[data-cm77-theme="public"] body a { color: var(--cm77-theme-gold); text-underline-offset: .18em; }
html[data-cm77-theme="public"] body a:hover { color: var(--cm77-theme-gold-hover); }
html[data-cm77-theme="public"] body :is(h1,h2,h3,h4,h5,h6) { color: var(--cm77-theme-text); line-height: 1.55; }
html[data-cm77-theme="public"] body h1 { color: var(--cm77-theme-gold); }
html[data-cm77-theme="public"] body :is(.gold,.date,.eyebrow,.price,.event-source-links a,.card .go) { color: var(--cm77-theme-gold); }
html[data-cm77-theme="public"] body :is(.muted,.empty,.event-meta,.event-source-note,.venue-note,.venue-card small,.brand small,.camp-brand small,.feed-summary span,.feed-card p,.news-card p,.news-footer,.news-card time,.photo-head span,.place-results small,.choice-group legend small,.camp-choices legend small,.observations dt,.observation-list dt,.rr-help,.rr-head p,.rr-mini small,.rr-table td small,.jobs-help,.jobs-meta,.jobs-card small,.jobs-footer,.subtitle,.place,.card .area,.card p,.intro p,.section-head p,.results .hint,.cm77-page-share-status) { color: var(--cm77-theme-muted); }
/* Page chrome and surfaces. No universal background reset: maps and overlays remain intact. */
html[data-cm77-theme="public"] body :is(.incident-header,.camp-header,.topbar,.radio-topbar,.traffic-header,.water-header,.cm77-header,.entity-topbar,.top,.cm77-thailand-header,.jobs-top,.ai-travel-header,.atlas-header,.explore-header,.cm77-assistant-header,.sos-header) {
  background: var(--cm77-theme-input); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body :is(.hero,.camp-hero,.radio-hero,.hero-card,.entity-hero,.ai-travel-hero,.atlas-hero,.explore-hero) {
  background-color: var(--cm77-theme-surface); border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body :is(.news-hero,.camp-hero,.radio-hero,.hero-card,.ai-travel-hero,.atlas-hero,.explore-hero) {
  background-image: linear-gradient(120deg,var(--cm77-theme-surface),var(--cm77-theme-raised));
}
html[data-cm77-theme="public"] body .hero:not(:has(.hero-content)):not(:has(.hero-slide)) {
  background-image: linear-gradient(120deg,var(--cm77-theme-surface),var(--cm77-theme-raised));
}
html[data-cm77-theme="public"] body .hero:has(.hero-content)::after {
  background: linear-gradient(transparent,var(--cm77-theme-bg));
}
html[data-cm77-theme="public"] body :is(.card,.panel,.feed-card,.news-card,.news-map-section,.detail-card,.camp-card,.camp-step,.venue-section,.venue-card,.rr-card,.rr-mini,.rr-strip,.jobs-panel,.jobs-card,.jobs-contact,.jobs-filter,.jobs-section-links,.search-panel,.results,.empty,.intro-card,.filter-bar,.workspace,.station-card,.station-detail,.radio-content,.radio-summary article,.summary-card,.station-panel,.detail-panel,.camera-item,.sidebar,.live-item,.coordinate-panel,.legend,.map-note,.error-panel,.smart-summary,.smart-toolbar,.smart-sidebar,.smart-item,.map-panel,.map-help,.map-watermark,.cm77-layer-group,.layer-registry,.cm77-smart-search-box,.cm77-smart-search-item,.cm77-smart-search-hint,.weather-layer-rail,.weather-point-panel,.weather-metric,.weather-hour-card,.cctv-section,.cctv-card,.modal-card,.modal-credit,.modal-meta span,.entity-card,.weather-section,.weather-item,.weather-aqi,.radio-section,.radio-card,.nearby-section,.nearby-card,.youtube-section,.youtube-card,.youtube-empty,.context-recommendation,.cm77-smart-radio,.cm77-smart-radio-facts>div,.cm77-smart-radio-meta,.cm77-press-strip,.cm77-national-news,.cm77-page-share,.cm77-location-graph,.cm77-graph-summary>div,.cm77-graph-location,.cm77-graph-place,.cm77-geo-ai,.cm77-geo-ai-answer,.cm77-geo-ai-item,.cm77-province-hub,.cm77-province-hub-card,.cm77-smart-province-panel,.cm77-province-dashboard,.cm77-province-dashboard-v3,.cm77-province-dashboard-v3-stat,.cm77-province-dashboard-v3-category,.cm77-calendar-context,.cm77-calendar-card,.cm77-calendar-section,.cm77-event,.cm77-fact,.sos-tools,.sos-report-section,.sos-card,.sos-national-card,.sos-nearby-section,.cm77-guide-header,.cm77-guide-form-card,.cm77-guide-result,.cm77-guide-answer,.cm77-guide-stop,.cm77-planner-header,.cm77-planner-form-card,.cm77-planner-result,.cm77-planner-answer,.cm77-planner-stop,.cm77-day-route,.cm77-planner-stat,.cm77-planner-note,.cm77-chat,.cm77-bubble,.cm77-card,.ai-travel-chat,.ai-travel-results,.ai-chat-messages,.ai-bubble,.ai-place-card,.atlas-sidebar,.atlas-list-panel,.atlas-map-panel,.atlas-item,.atlas-search,.explore-sidebar,.explore-list-panel,.explore-map-panel,.explore-item,.explore-search,.journey-card,.map-section,.map-explorer,.today-panel,.province-card,.experience-card,.planner-banner,.cm77-led .led-filter,.cm77-led .led-row) {
  background: var(--cm77-theme-surface); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body :is(.venue-card:hover,.camp-card:hover,.rr-mini:hover,.cm77-press-item:hover,.camera-item:hover,.station-card:hover,.smart-item:hover,.cm77-smart-search-item:hover,.cm77-smart-search-item.is-active,.cm77-layer-group-head:hover,.layer-row:hover,.atlas-item:hover,.explore-item:hover) {
  background-color: var(--cm77-theme-raised); border-color: var(--cm77-theme-gold);
}
html[data-cm77-theme="public"] body :is(.header,.ai-panel,.list-panel,.item,.child,.weather-unavailable,.buddhist-date-display,.hero-ai-input-wrap,.hero-ai-input,.hero-search,.search-suggestions,.cm77-search-results,.cm77-search-box,.cm77-calendar-context__datebox,.event-item,.event-card) {
  background: var(--cm77-theme-surface); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body :is(.meta,.small,.count,.filter-summary,.ai-message,.weather-label,.weather-updated,.weather-condition,.radio-meta,.nearby-meta,.entity-brand small,.youtube-description,.radio-card small,.ai-place-meta,.atlas-item-meta,.explore-item-meta,.station-location,.station-frequency,.cm77-smart-radio-label,.cm77-smart-radio-updated) { color: var(--cm77-theme-muted); }
html[data-cm77-theme="public"] body :is(.name,.ai-title,.list-header,.weather-temperature,.weather-value,.entity-brand,.radio-card strong,.nearby-card strong,.atlas-item-title,.explore-item-title) { color: var(--cm77-theme-text); }
html[data-cm77-theme="public"] body :is(.slide-text a,.hero-controls button) { background: var(--cm77-theme-raised); color: var(--cm77-theme-text); }
html[data-cm77-theme="public"] body :is(.notice,.badge,.event-source,.chip,.jobs-tag,.jobs-count,.step,.auto-summary,.selected-area,.observation-chips span,.observation-list>div,.detail-full-report,.rr-notice,.rr-badge,.rr-original,.rr-table th,.cm77-geo-ai-examples button,.cm77-smart-radio-frequency,.layer-icon,.item-icon,.sos-badge,.cm77-badge,.entity-badges span,.cm77-graph-status,.ai-quick-prompts button,.ai-place-reasons,.atlas-current-type,.atlas-summary,.explore-summary,.weather-card,.hero-ai-prompts button,.ai-capability-strip a) {
  background: var(--cm77-theme-raised); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line);
}
/* Forms: only text-like fields receive full-size controls. Radio/checkbox sizes stay native. */
html[data-cm77-theme="public"] body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=submit]):not([type=button]):not([type=image]),select,textarea) {
  background: var(--cm77-theme-input); color: var(--cm77-theme-text);
  border-color: var(--cm77-theme-line); font: inherit; min-height: 44px;
}
html[data-cm77-theme="public"] body :is(input,textarea)::placeholder { color: #f0d6b5; opacity: 1; }
html[data-cm77-theme="public"] body :is(input[type=checkbox],input[type=radio],input[type=range]) { accent-color: var(--cm77-theme-gold); }
html[data-cm77-theme="public"] body :is(input[type=checkbox],input[type=radio]) { width: auto; min-width: 18px; height: 18px; min-height: 18px; flex-shrink: 0; }
html[data-cm77-theme="public"] body :is(input:disabled,select:disabled,textarea:disabled) { background: var(--cm77-theme-raised); color: var(--cm77-theme-muted); opacity: .8; }
html[data-cm77-theme="public"] body :is(label,.filters label,.form-grid label,.choice-group legend,.camp-choices legend) { color: var(--cm77-theme-text); }
html[data-cm77-theme="public"] body :is(button,.button,.btn,.jobs-btn,.rr-btn,.file-button,.event-pages a,.event-source-links a,.chip) {
  background: var(--cm77-theme-raised); color: var(--cm77-theme-text);
  border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body :is(.primary,a.primary,.primary-button,.button-primary,.jobs-btn:not(.jobs-light),.rr-primary,.rr-gold,.listen-button,.radio-listen,.external-link,.property-submit-cta,.cm77-press-more,.cm77-national-more,.ai-chat-form button[type=submit],#aiSubmit,.cm77-guide-form button[type=submit],.cm77-planner-form button[type=submit],.cm77-send,.cm77-geo-ai-submit,.cm77-search-submit,.sos-submit-button,.cm77-new-report-button,.hero-search button,.hero-ai-submit) {
  background: #f3c77d; color: var(--cm77-theme-on-gold);
  border-color: var(--cm77-theme-gold); font-weight: 700;
}
html[data-cm77-theme="public"] body :is(.primary:hover,.primary-button:hover,.button-primary:hover,.external-link:hover,.listen-button:hover) {
  background: var(--cm77-theme-gold-hover); color: var(--cm77-theme-on-gold);
}
html[data-cm77-theme="public"] body :is(.tab,.layer-tab,.layer-toggle,.province-filter button,.atlas-view-switch button,.explore-view-switch button,.choice-button>span,.choice span,.jobs-choice label,.rr-tabs a) {
  background: var(--cm77-theme-raised); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body :is(.tab.active,.layer-tab.active,.layer-toggle.active,.province-filter button.is-active,.atlas-view-switch button.active,.explore-view-switch button.active,.atlas-category-switch nav a.active,.atlas-province-list a.active,.explore-type-menu a.active,.explore-province-menu button.active,.cm77-smart-province-quick .active,.rr-tabs a.active,.choice input:checked+span,.choice-button input:checked+span) {
  background: #f3c77d; color: var(--cm77-theme-on-gold) !important; border-color: var(--cm77-theme-gold);
}
html[data-cm77-theme="public"] body :is(a,button,input,select,textarea,summary):focus-visible {
  outline: 3px solid var(--cm77-theme-gold-hover); outline-offset: 3px;
}
html[data-cm77-theme="public"] body :is(.dialog-top,.cm77-yt-dialog-head) { background: var(--cm77-theme-surface); border-color: var(--cm77-theme-line); }
html[data-cm77-theme="public"] body :is(dialog,.cctv-dialog,.gallery-lightbox) { background-color: var(--cm77-theme-surface); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line); }
html[data-cm77-theme="public"] body dialog::backdrop { background: #171511cc; }
html[data-cm77-theme="public"] body :is(.map-caption,.news-footer,.footer,.jobs-footer,.cm77-thailand-footer) { background: var(--cm77-theme-surface); color: var(--cm77-theme-muted); border-color: var(--cm77-theme-line); }
html[data-cm77-theme="public"] body :is(th,td,hr,.observations>div,.report-step) { border-color: var(--cm77-theme-line); }
/* Status colors keep their meanings, with paired dark surfaces. */
html[data-cm77-theme="public"] body :is(.error,.rr-error,.sos-report-message.error,.cm77-env-error) { background: #512e2a; color: var(--cm77-theme-red); border-color: #ae6c63; }
html[data-cm77-theme="public"] body :is(.success,.rr-success,.verified,.jobs-success,.sos-report-message.success) { background: #284232; color: var(--cm77-theme-green); border-color: #648b6c; }
html[data-cm77-theme="public"] body :is(.required,.required-text,.tr-dead) { color: var(--cm77-theme-red); }
html[data-cm77-theme="public"] body .required-text { background: #512e2a; }
html[data-cm77-theme="public"] body .unverified { background: var(--cm77-theme-raised); color: var(--cm77-theme-gold-hover); }
html[data-cm77-theme="public"] body :is(.report-step>h3>span:first-child,.primary-photo) { background: #f3c77d; color: var(--cm77-theme-on-gold); }
html[data-cm77-theme="public"] body :is(.cm77-road-risk-key,.cm77-road-risk-legend small) { color: var(--cm77-theme-muted); }
/* Share buttons are rendered by fragments after head; specificity keeps this theme in effect. */
html[data-cm77-theme="public"] body .cm77-page-share .cm77-page-share-label { color: var(--cm77-theme-text); }
html[data-cm77-theme="public"] body .cm77-page-share .cm77-page-share-actions :is(a,button) { background: #f3c77d; color: var(--cm77-theme-on-gold); }
html[data-cm77-theme="public"] body .cm77-page-share .cm77-page-share-actions .cm77-page-share-facebook { background: #245cad; color: #fff; }
html[data-cm77-theme="public"] body .cm77-page-share .cm77-page-share-actions .cm77-page-share-line { background: #087b30; color: #fff; }
/* Public submission shortcuts previously used inline colors. */
html[data-cm77-theme="public"] body nav[aria-label="ลงข่าวด้วยตนเอง"] a { background: var(--cm77-theme-gold) !important; color: var(--cm77-theme-on-gold) !important; }
/* ThaiRSC fragment is refreshed over AJAX, so every rule is scoped to its stable ID. */
html[data-cm77-theme="public"] body #cm77ThaiRscBlock { background: var(--cm77-theme-surface); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line); font-size: 14px; }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock :is(.tr-card,.tr-chart) { background: var(--cm77-theme-input); border-color: var(--cm77-theme-line); }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock .tr-card-year { background: var(--cm77-theme-raised); }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock :is(.tr-note,.tr-credit) { color: var(--cm77-theme-muted); font-size: 12px; }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock :is(.tr-warning,a,.tr-injured) { color: var(--cm77-theme-gold-hover); }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock .tr-dead { color: var(--cm77-theme-red); }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock .tr-legend span:first-child { color: #ffaaa0; }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock .tr-legend span:last-child { color: #8edce3; }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock :is(th,td) { border-color: var(--cm77-theme-line); }
/* Chart SVG comes from a separate renderer: keep its self-contained light canvas readable. */
html[data-cm77-theme="public"] body #cm77ThaiRscBlock .tr-chart svg { background: #fffdf8; border-radius: 6px; color-scheme: light; }
html[data-cm77-theme="public"] body #cm77ThaiRscBlock .tr-radio { width: 18px; min-height: 18px; height: 18px; }
/* Native checkboxes/radios hidden by accessible choice controls must stay hidden. */
html[data-cm77-theme="public"] body :is(.choice input,.choice-button>input) { width: 1px; min-width: 1px; height: 1px; min-height: 1px; }
/* Leaflet controls and popups use a light canvas independently of page colors. */
html[data-cm77-theme="public"] body .leaflet-container { color: #29231b; color-scheme: light; }
html[data-cm77-theme="public"] body :is(.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-control-layers) { background: #fffdf8; color: #29231b; }
html[data-cm77-theme="public"] body .leaflet-popup-content { color: #29231b; }
html[data-cm77-theme="public"] body .leaflet-popup-content :is(h1,h2,h3,h4,p,small,strong,span,label) { color: inherit; }
html[data-cm77-theme="public"] body .leaflet-popup-content a { color: #70441f; }
html[data-cm77-theme="public"] body :is(.leaflet-bar a,.leaflet-bar a:hover,.leaflet-control-zoom a) { background: #fffdf8; color: #29231b; }
html[data-cm77-theme="public"] body .leaflet-control-layers label { color: #29231b; }
html[data-cm77-theme="public"] body .leaflet-container .cm77-road-risk-control :is(label,.cm77-road-risk-key,small) { color: #482d17; }
html[data-cm77-theme="public"] body .leaflet-control-attribution { background: #fffdf8e6; color: #493423; }
html[data-cm77-theme="public"] body .leaflet-control-attribution a { color: #70441f; }
/* Readability adjustments retain the compact incident list and its responsive grid. */
html[data-cm77-theme="public"] body .incident-news-page .news-card h3 { font-size: 15px; line-height: 1.65; }
html[data-cm77-theme="public"] body .incident-news-page .news-card p { font-size: 13px; }
html[data-cm77-theme="public"] body .incident-news-page .news-card :is(.card-actions a,.card-actions button) { font-size: 13px; }
html[data-cm77-theme="public"] body :is(.card h2,.article,.description,.venue-card strong) { overflow-wrap: anywhere; }
html[data-cm77-theme="public"] body :is(.event-meta,.event-source-note) { font-size: 14px; }
/* Secondary public layouts and controls from the current map.cm77.com views. */
html[data-cm77-theme="public"] body :is(.box,.admin-report,#nearbySection,.nearby-group,.nearby-item,.fact,.search-box,.playable-toggle,.explorer-header,.atlas-gate-provinces a,.atlas-province-gate,.frequency) {
  background: var(--cm77-theme-surface); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body :is(.cm77-assistant-header p,.cm77-guide-header p,.cm77-planner-header p,.sos-heading p,.sos-report-section p,.sos-nearby-section p,.sos-nearby-card small,.item span,.hint,.description,.cctv-note,.cctv-heading p,.weather-point-meta,.cm77-refresh-status,.explorer-title p,.ai-travel-results>header span) { color: var(--cm77-theme-muted); }
html[data-cm77-theme="public"] body :is(.cm77-map-logo-text strong,.fact strong,.sos-nearby-card strong,.weather-panel-kicker,.sos-section-kicker) { color: var(--cm77-theme-text); }
html[data-cm77-theme="public"] body :is(.cm77-map-logo-text span,.cm77-map-logo-text small) { color: var(--cm77-theme-muted); }
html[data-cm77-theme="public"] body :is(.cm77-map-link,.cm77-guide-links a,.cm77-planner-links a,.sos-map-link,.atlas-radio-mini-detail,.modal-actions a,.detail-actions a,.cm77-nav .nav-highlight) {
  background: #f3c77d; color: var(--cm77-theme-on-gold); border-color: var(--cm77-theme-gold);
}
html[data-cm77-theme="public"] body :is(#aiVoice,#refreshCamera,.ai-travel-results>header>strong) { background: var(--cm77-theme-raised); color: var(--cm77-theme-text); }
html[data-cm77-theme="public"] body .topin>a { color: var(--cm77-theme-gold) !important; }
html[data-cm77-theme="public"] body .contact .btn.line { background: #087b30; color: #fff; }
html[data-cm77-theme="public"] body .youtube-play { background: #29231b; color: #fff; }
html[data-cm77-theme="public"] body :is(.location-grid label>span:not(#selectedPlace),.pin-head>strong>span) { color: var(--cm77-theme-red); }
html[data-cm77-theme="public"] body .summary-card.normal strong { color: var(--cm77-theme-green); }
html[data-cm77-theme="public"] body :is(.summary-card.watch strong,.summary-card.warning strong) { color: var(--cm77-theme-gold-hover); }
html[data-cm77-theme="public"] body .summary-card.critical strong { color: var(--cm77-theme-red); }
html[data-cm77-theme="public"] body>footer { color: var(--cm77-theme-muted); }
html[data-cm77-theme="public"] body :is(#nearbySection>summary small,.sidebar-head .cm77-refresh-status[data-state]) { color: var(--cm77-theme-muted); }
html[data-cm77-theme="public"] body :is(.brand strong,.journey-card strong,.experience-card strong,.ai-capability-strip strong) { color: var(--cm77-theme-text); }
html[data-cm77-theme="public"] body :is(.journey-card small,.experience-card small,.ai-capability-strip small,.experience-copy p,.map-floating span,.live-item small,.explorer-heading p,.live-heading span,.footer small,.footer p) { color: var(--cm77-theme-muted); }
html[data-cm77-theme="public"] body :is(.live-icon,.mobile-drawer,.mobile-bottom-nav,.mobile-bottom-nav a,.mobile-bottom-nav button,.mobile-quick-layer) { background: var(--cm77-theme-surface); color: var(--cm77-theme-text); border-color: var(--cm77-theme-line); }
html[data-cm77-theme="public"] body :is(.primary-link,.planner-banner>a,.mobile-quick-layer.active) { background: #f3c77d; color: var(--cm77-theme-on-gold); }
html[data-cm77-theme="public"] body .today-heading span { color: var(--cm77-theme-gold); }
/* Category colors still appear on markers; labels remain legible for every category. */
html[data-cm77-theme="public"] body .news-category { color: var(--cm77-theme-text) !important; }
/* Warm reference palette needs brighter labels on the lighter brown canvas. */
html[data-cm77-theme="public"] body :is(.section-kicker,.province-number,.hero-content .eyebrow,.cm77-connected-nav .cm77-related-link,.topbar>strong,.atlas-kicker,.explore-kicker) { color: var(--cm77-theme-gold); }
html[data-cm77-theme="public"] body .planner-banner p { color: var(--cm77-theme-muted); }
html[data-cm77-theme="public"] body :is(.weather-card span,.ai-travel-brand small,.atlas-radio-mini-info small,.radio-player small,.radio-player .player-copy span,.brand span,.hero-card p,.hero-update span,.summary-card span,.summary-card small,.situation-notice p,.panel-head span,.station-location,.station-time,.station-level span,.detail-head p,.detail-empty,.detail-empty span,.reading-grid span,.reading-grid small,.meta-row span,.chart-head span,.source-note span,.hero-copy,.coordinate-help,.timeline-heading .label,.updated-at span,.secondary-controls,.info-grid p,.weather-layer-external small) { color: var(--cm77-theme-muted); }
@media (max-width:600px) {
  html[data-cm77-theme="public"] body .incident-news-page .news-card h3 { font-size: 15px; }
  html[data-cm77-theme="public"] body :is(button,.button,.primary,.jobs-btn,.rr-btn,.event-pages a) { min-height: 44px; }
  html[data-cm77-theme="public"] body :is(.wrap,main,.panel,.card,.camp-step,.venue-section,.news-card-body) { min-width: 0; }
  html[data-cm77-theme="public"] body :is(.incident-header,.camp-header,.brand,.camp-brand,.jobs-top,.rr-head) { flex-wrap: wrap; }
  html[data-cm77-theme="public"] body :is(.gallery,.venue-grid) { grid-template-columns: minmax(0,1fr); }
}
@media print {
  html[data-cm77-theme="public"] { color-scheme: light; }
  html[data-cm77-theme="public"] body {
    --cm77-theme-bg: #fff; --cm77-theme-surface: #fff; --cm77-theme-raised: #f2f2f2;
    --cm77-theme-input: #fff; --cm77-theme-text: #222; --cm77-theme-muted: #444;
    --cm77-theme-gold: #70441f; --cm77-theme-gold-hover: #70441f; --cm77-theme-line: #aaa;
    --cm77-theme-red: #a12622; --cm77-theme-green: #28643d; --cm77-theme-on-gold: #fff;
  }
}

/* CM77_SECONDARY_YELLOW_V112 */
html[data-cm77-theme="public"] {
  --cm77-theme-muted: #fff176;
}
html[data-cm77-theme="public"] body :is(.cm77-national-heading p,.cm77-national-heading>span,.cm77-national-status,.cm77-national-item p,.cm77-national-item p span,.cm77-national-item time,.cm77-national-play,.cm77-press-heading>span,.cm77-press-topic,.cm77-press-item small,.cm77-yt-summary,.cm77-yt-dialog small,.cm77-thailand-brand small,.cm77-thailand-footer) {
  color: var(--cm77-theme-muted);
  opacity: 1;
}
html[data-cm77-theme="public"] body :is(.cm77-national-heading p,.cm77-national-heading>span,.cm77-national-status,.cm77-national-item p,.cm77-national-item time,.cm77-press-item small,.cm77-yt-summary) {
  font-size: 13px;
  line-height: 1.6;
}


/* CM77_MOBILE_TOP_BROWN_GOLD_V113 */
html[data-cm77-theme="public"] { background-color: #8a623a; }
html[data-cm77-theme="public"] body .cm77-news-share {
  background: #704b2c;
  color: #fff176;
  border-color: #c5975d;
}
html[data-cm77-theme="public"] body .cm77-news-share>span { color: #fff176; }
html[data-cm77-theme="public"] body .cm77-news-share>a,
html[data-cm77-theme="public"] body .cm77-news-share>button {
  background: #f3c77d;
  color: #3b240f;
  border-color: #f3c77d;
  font-weight: 700;
}
html[data-cm77-theme="public"] body .cm77-news-share>a[data-share-facebook] {
  background: #245cad;
  border-color: #245cad;
  color: #fff;
}
html[data-cm77-theme="public"] body .cm77-news-share>a[data-share-line] {
  background: #087b30;
  border-color: #087b30;
  color: #fff;
}
html[data-cm77-theme="public"] body :is(.cm77-thailand-brand span,.cm77-thailand-header nav a) {
  color: var(--cm77-theme-gold);
}


/* CM77_PROPERTY_YELLOW_V114 */
html[data-cm77-theme="public"] body .cm77-led :is(.led-summary,.led-area,.led-location,.led-reference,.led-checked,.led-note,.led-eyebrow,.led-filter label,.led-price,.led-price strong,.led-bid,.led-bid strong,.led-pages) {
  color: #fff176;
  opacity: 1;
}
html[data-cm77-theme="public"] body .cm77-led :is(.led-info p,.led-checked,.led-summary,.led-note) {
  font-size: 14px;
  line-height: 1.65;
}
html[data-cm77-theme="public"] body .cm77-led .led-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3c77d;
  color: #3b240f;
  border-color: #f3c77d;
  min-height: 44px;
}
html[data-cm77-theme="public"] body .cm77-led .led-source:hover {
  background: #fff0cc;
  color: #3b240f;
}
html[data-cm77-theme="public"] body .cm77-led :is(.led-pages a,.led-no-photo) {
  background: var(--cm77-theme-surface);
  color: #fff176;
  border-color: #c5975d;
}


/* CM77_LINK_HOVER_READABILITY_V116
   Use a paired dark surface and yellow text in interactive states, including
   headings/metadata that have their own legacy hover colors. Preserve map
   controls, disabled actions, and Facebook/LINE brand buttons. */
@media screen {
  html[data-cm77-theme="public"] body :is(a,button):is(:hover,:focus-visible):not(:disabled):not([aria-disabled="true"]):not(:where(.leaflet-container *,.cm77-page-share-facebook,.cm77-page-share-line,[data-share-facebook],[data-share-line],.contact .btn.line)) {
    background-color: #211b14 !important;
    color: #fff176 !important;
  }
  html[data-cm77-theme="public"] body :is(a,button):is(:hover,:focus-visible):not(:disabled):not([aria-disabled="true"]):not(:where(.leaflet-container *,.cm77-page-share-facebook,.cm77-page-share-line,[data-share-facebook],[data-share-line],.contact .btn.line)) :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,time) {
    color: #fff176 !important;
  }
  html[data-cm77-theme="public"] body a:is(:hover,:focus-visible) :is(h2,h3,.name,.atlas-item-title,.explore-item-title) {
    text-decoration: underline;
    text-underline-offset: .18em;
  }
}
/* CM77_WATER_READABILITY_V117: cards below are rendered after API responses. */
html[data-cm77-theme="public"] body .water-page :is(.cctv-card p,.cctv-card .cctv-distance,.cctv-code,.cctv-image-time,.cctv-statusline span,.cctv-empty,.state-box,.station-location,.station-time,.station-level span,.detail-code,.detail-head p,.reading-grid span,.reading-grid small,.meta-row span,.chart-head span,.source-note,.source-note span) {
  color: var(--cm77-theme-muted);
  opacity: 1;
  font-size: 14px;
  line-height: 1.7;
}
html[data-cm77-theme="public"] body .water-page :is(.station-name,.station-level strong,.cctv-card h3,.reading-grid strong,.meta-row) {
  color: var(--cm77-theme-text);
}
html[data-cm77-theme="public"] body .water-page :is(.cctv-card,.station-item,.reading-grid>div,.meta-row,.chart-card) {
  background: var(--cm77-theme-surface);
  border-color: var(--cm77-theme-line);
}
html[data-cm77-theme="public"] body .water-page .station-code {
  background: #f3c77d;
  color: #3b240f;
  font-size: 13px;
}
html[data-cm77-theme="public"] body .water-page .severity-pill {
  background: #453c33; color: #fff8ed; font-size: 13px;
}
html[data-cm77-theme="public"] body .water-page .severity-pill.info {
  background: #284232; color: #d4f5c8;
}
html[data-cm77-theme="public"] body .water-page .severity-pill.watch {
  background: #594216; color: #fff176;
}
html[data-cm77-theme="public"] body .water-page .severity-pill.warning {
  background: #603819; color: #ffe1b8;
}
html[data-cm77-theme="public"] body .water-page .severity-pill.critical {
  background: #512e2a; color: #ffebe6;
}
html[data-cm77-theme="public"] body .water-page .cctv-badge {
  font-size: 13px;
}
html[data-cm77-theme="public"] body .water-page .cctv-image-area {
  background: var(--cm77-theme-input);
}
html[data-cm77-theme="public"] body .water-page .cctv-enlarge {
  background: transparent;
}
html[data-cm77-theme="public"] body .water-page .cctv-image-message {
  background: var(--cm77-theme-input);
  color: var(--cm77-theme-muted);
  font-size: 14px;
}
html[data-cm77-theme="public"] body .cctv-dialog :is(p,small,.cctv-live-status) {
  color: var(--cm77-theme-muted);
  font-size: 14px;
  line-height: 1.7;
}
html[data-cm77-theme="public"] body .cctv-dialog .cctv-live-status {
  background: var(--cm77-theme-input);
}
/* Chart.js draws its own text and colored lines; retain an independent light
   chart canvas so the existing axis labels and series stay readable. */
html[data-cm77-theme="public"] body .water-page .chart-wrap {
  background: #fffdf8;
  color-scheme: light;
  border-radius: 8px;
}
html[data-cm77-theme="public"] body .water-page .chart-loading {
  background: #fffdf8;
  color: #493423;
}
html[data-cm77-theme="public"] body .water-page .station-item:is(:hover,:focus-visible) .station-code {
  background: #211b14;
}
/* CM77_ENTITY_NEARBY_READABILITY_V118: populated place and radio labels use
   dedicated div classes, rather than the generic strong/small selectors. */
html[data-cm77-theme="public"] body :is(.nearby-card .nearby-title,.radio-card .radio-name) {
  color: var(--cm77-theme-text);
  opacity: 1;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
html[data-cm77-theme="public"] body :is(.nearby-card .nearby-type,.nearby-card .nearby-distance,.radio-card .radio-meta,.radio-card .radio-missing) {
  color: var(--cm77-theme-muted);
  opacity: 1;
  font-size: 14px;
  line-height: 1.65;
}
/* Pair the entity weather/environment panels with explicit opaque surfaces. */
html[data-cm77-theme="public"] body :is(.weather-forecast-day,.environment-risk-section,.environment-summary-card,.hotspot-item,.environment-empty) {
  background: var(--cm77-theme-surface);
  border-color: var(--cm77-theme-line);
  color: var(--cm77-theme-text);
}
html[data-cm77-theme="public"] body :is(.weather-forecast-heading,.weather-forecast-day-name,.weather-forecast-temp,.weather-forecast-temp strong,.environment-summary-card strong,.hotspot-body strong) {
  color: var(--cm77-theme-text);
}
html[data-cm77-theme="public"] body :is(.weather-forecast-date,.weather-forecast-condition,.weather-forecast-temp small,.weather-forecast-rain,.environment-risk-subtitle,.environment-summary-card span,.environment-summary-card small,.hotspot-body small,.hotspot-map,.environment-empty) {
  color: var(--cm77-theme-muted);
  font-size: 14px;
  line-height: 1.65;
}
