/* UI surfaces only: SVG seat fills, data colour scales and map geometry stay unchanged. */
:root{--ui-bg:#fff;--ui-panel:#f6f7fa;--ui-raised:#fff;--ui-text:#182231;--ui-muted:#536174;--ui-line:#c5ccd7;--ui-accent:#a91e50;--ui-teal:#086f67;--ui-pink-panel:#fff0f5;--ui-focus:#075fa0}
:root[data-theme=dark]{--ui-bg:#050507;--ui-panel:#111318;--ui-raised:#1a1d24;--ui-text:#f4f6fc;--ui-muted:#bac6d9;--ui-line:#536176;--ui-accent:#ff99bb;--ui-teal:#8ce7db;--ui-pink-panel:#2d1d2b;--ui-focus:#87e9de}
html[data-theme]{background:var(--ui-bg);color:var(--ui-text);--bg:var(--ui-bg);--panel:var(--ui-panel);--line:var(--ui-line);--muted:var(--ui-muted);--text:var(--ui-text)}
html[data-theme] body{background:var(--ui-bg);color:var(--ui-text)}
.theme-open{order:5;flex:none;min-width:44px;min-height:44px;padding:8px 10px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-panel);color:var(--ui-text);font:inherit;font-size:12px;font-weight:700;cursor:pointer;margin-left:8px}
.theme-open{width:auto;margin-top:0}.theme-dialog .theme-close{min-height:44px;margin-top:0}
.theme-dialog{width:min(360px,calc(100vw - 32px));padding:20px;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-raised);color:var(--ui-text);box-shadow:0 20px 70px #0006}.theme-dialog::backdrop{background:#0008}.theme-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.theme-heading h2{margin:0;font-size:20px}.theme-close{width:44px;height:44px;font-size:24px;border:1px solid var(--ui-line);border-radius:50%;background:var(--ui-panel);color:var(--ui-text)}.theme-dialog fieldset{margin:20px 0 0;padding:0;border:0}.theme-dialog legend{font-size:13px;margin-bottom:8px}.theme-dialog label{display:flex;align-items:center;gap:10px;min-height:56px;border:1px solid var(--ui-line);border-radius:8px;padding:12px;margin:8px 0;cursor:pointer}.theme-dialog input{accent-color:var(--ui-accent);width:20px;height:20px}.theme-dialog small{font-size:12px;color:var(--ui-muted);margin-left:auto}.theme-notice{font-size:12px;line-height:1.8;color:var(--ui-muted)}.theme-dialog :focus-visible,.theme-open:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
html[data-theme] :is(.site-header,.renewal .site-header,.rn-hall .page-nav){background:var(--ui-bg);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.card,.renewal .hall-card,.renewal .info-card,.renewal .empty-state,.favorites-dialog,.favorites-panel-header,.local-tools,.store-favorites-panel,.map-card,.map-toolbar,.map-footer,.compact-help,.hall-search-popup,.filter-sheet,.seat-peek,.modal-content){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.muted,.hall-meta,.hall-status-note,.favorites-help,.favorites-list span,.hall-filter-note,.guide-note,.site-verification-note,.renewal .hero p,.renewal .stat span,.renewal .hall-card .hall-meta,.renewal .hall-card .tag,.rn-info summary,.footer,.footer small){color:var(--ui-muted)}
html[data-theme] :is(.favorites-open,.favorites-close,.favorites-retry,.renewal .btn.secondary,.renewal .btn.ghost,.icon-btn,.account-entry,.page-nav button,.local-tools button){background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.favorites-list a:hover,.quick-links a:hover){background:var(--ui-raised)}
html[data-theme] :is(.favorites-search-link,.card-link,.renewal .card-link,#published>.container>p>.card-link,.guide-entry){color:var(--ui-accent)}
html[data-theme] :is(input:not([type=radio]):not([type=checkbox]),textarea,select,.renewal input,.renewal .input,#shortlistPanel .input){background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--ui-muted);opacity:1}
html[data-theme] :is(.renewal .hero h1 span,.renewal .eyebrow,.rn-hall .map-toolbar strong,.renewal .feature-row span,.renewal .hall-card .feature-row span){color:var(--ui-text)}
html[data-theme] :is(.renewal .search-shell,.rn-hall #searchCard,#shortlistPanel,#shortlistPanel .pick-machine-group,#shortlistPanel .pick-card,.bulk-preview){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(#shortlistPanel .pick-machine-source,#shortlistPanel .pick-machine-notice,#shortlistPanel .pick-row-number>span,#shortlistPanel .pick-group-count,#shortlistPanel .pick-row-order>span){color:var(--ui-muted)}
html[data-theme] .favorites-list .favorite-freshness{font-size:12px;font-weight:700;color:var(--ui-muted)}html[data-theme] .favorites-list .favorite-freshness[data-kind=complete]{color:var(--ui-teal)}html[data-theme] .favorites-list .favorite-freshness[data-kind=partial]{color:var(--ui-accent)}
html[data-theme=light] :is(.lead,.intro,.table-note,.choose p,.save-note p,.plan-prices p,th small,.card-body p,.card-body dt,.row-copy small,.logout-note,.entry #introStatus,.benefits small,.scope,.entry-note){color:var(--ui-muted)}
html[data-theme=light] :is(h1 span,.paid-price strong,.difference th,.difference td:last-child,.paid-entry h3 span,.benefits>div>span){color:var(--ui-accent)}
html[data-theme=light] :is(.eyebrow,.save-note a,.row-icon,.comparison td){color:var(--ui-teal)}
html[data-theme=light] :is(.plan-prices>div,.choose,.entry,.membership-card,.quick-links a,.unavailable,thead){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] :is(.plan-prices .paid-price,.difference){background:var(--ui-pink-panel);border-color:var(--ui-line)}
html[data-theme=light] :is(.plan-prices,table,th,td,.paid-entry,.membership-card,.card-body dl div,.quick-links,.quick-links li+li,.benefits>div,footer){border-color:var(--ui-line)}
html[data-theme=light] :is(.close,.account-close,.back,.home-link,footer a,.arrow,.entry .text-button){color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] :is(.paid-entry button,.badge){color:#525466;background:#e9eaf0;border-color:#a9afbc}
html[data-theme=light] .plan-prices em{color:#8c1645;border-color:#a85374;background:#fff7fa}
html[data-theme=light] .card-link{background:#e4f4f0;color:#075c55;border-color:#9abfb7}
html[data-theme=light] .difference td:nth-child(2){color:var(--ui-muted)}
html[data-theme=light] .scope strong{color:var(--ui-text)}
html[data-theme] .brand-image-viewport{border-radius:7px}
html[data-theme] .phone .phone-label{color:#e0e7f4}
html[data-theme] .brand-image-viewport{background:transparent}
html[data-theme=light] .brand-image-viewport>.brand-image-logo{filter:invert(1) hue-rotate(180deg);mix-blend-mode:multiply}
html[data-theme=dark] .brand-image-viewport>.brand-image-logo{mix-blend-mode:screen}
html[data-theme] :is(.map-viewport,.rn-hall .map-viewport,.floor-map-viewport){background:#fff}
html[data-theme=light] :is(.data-summary,.diff-legend span,.recommend-info,.compact-help summary,.compact-help-body p,.compact-help-note,.rn-info>summary,.rn-info>summary span){color:var(--ui-muted)}
html[data-theme=light] :is(.compact-help-body a,.compact-help-toggle){color:var(--ui-accent)}
html[data-theme=light] :is(.btn.secondary,.btn.ghost){background:var(--ui-raised)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html[data-theme=light] :is(.daily-diff-section,.daily-diff-card,.mihara-history,.machine-list>a,.machine-list>button,.machine-item,.status-note){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] .map-hint{background:#26394d;color:#fff}
html[data-theme=light] .rn-week{background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] :is(.rn-week p,.rn-week li,.rn-week .rn-week-note){color:var(--ui-muted)}
html[data-theme=light] :is(.history-access-tag,.history-status,.history-error,.machine-list b){color:var(--ui-muted)}
html[data-theme=light] :is(.recent-history-open,.recent-history-open span){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
@media(max-width:620px){html[data-theme] .site-header.favorites-site-header .header-inner.favorites-header{grid-template-columns:minmax(0,1fr) 56px 44px 44px!important}html[data-theme] .favorites-header .theme-open{grid-column:4!important;grid-row:1!important;margin:0;justify-self:stretch}html[data-theme] .favorites-header .recent-history-open{min-width:0;padding-inline:4px}}
@media(max-width:620px){.theme-open{margin-left:4px;padding-inline:7px;font-size:11px}.favorites-header .theme-open{margin-left:0}.favorites-header .brand-image-logo{max-width:112px}body>header .theme-open{margin-left:8px}body>header .close,body>header .account-close{margin-left:auto}}
@media print{.theme-open,.theme-dialog{display:none!important}}
html[data-theme] .seat-dialog{background:var(--ui-bg);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] .seat-dialog .detail-card{background:var(--ui-bg);color:var(--ui-text)}
html[data-theme] .seat-dialog .stat-box{background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] .seat-dialog .stat-box span{color:var(--ui-muted)}
html[data-theme] .seat-dialog .detail-actions{background:var(--ui-bg)}
/* Keep search and saved-list text readable in the selected theme. */
html[data-theme=dark] .rn-hall #searchCard .tab{color:var(--ui-muted)}
html[data-theme=dark] .rn-hall #searchCard .tab.active,html[data-theme=dark] .rn-hall #searchCard .btn.ghost{color:var(--ui-text)}
html[data-theme=light] .saved-page a{color:var(--ui-teal)}
html[data-theme=light] .saved-page .local-warning{color:#70500d}

/* Current directory controls and plan card, added after the original theme. */
html[data-theme] .hall-directory-filters label,html[data-theme] .hall-page-status{color:var(--ui-text)}
html[data-theme] .rn-filters button{background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] .rn-filters button[aria-pressed=true]{background:var(--ui-accent);color:var(--ui-bg);border-color:var(--ui-accent)}
html[data-theme] .hall-search-popup li span,html[data-theme] .renewal .hall-search-popup .hall-search-status,html[data-theme] .ad-label{color:var(--ui-muted)}
html[data-theme] .hall-search-popup li:hover,html[data-theme] .hall-search-popup li[aria-selected=true]{background:var(--ui-raised)}
html[data-theme] .hall-search-all{color:var(--ui-accent)}
html[data-theme] .premium-link{background:#a7194c;color:#fff}
html[data-theme] .premium-link:focus-visible{outline-color:var(--ui-focus)}
/* Fallback header for pages that did not previously have the approved mark. */
.theme-brand-header{display:flex;align-items:center;gap:12px;padding:12px 16px}
.theme-brand-link{display:block;flex:0 1 160px;width:160px;max-width:100%;line-height:1}
.theme-brand-viewport{display:block;position:relative;width:100%;aspect-ratio:1433/463;overflow:hidden}
.theme-brand-logo{position:absolute!important;display:block;width:107.1877180739707%!important;max-width:none!important;height:auto!important;left:-4.6057222609909285%;top:-61.55507559395248%;margin:0!important;object-fit:contain}
html[data-theme=light] .theme-brand-logo{filter:invert(1) hue-rotate(180deg);mix-blend-mode:multiply}
html[data-theme=dark] .theme-brand-logo{mix-blend-mode:screen}
html[data-theme] :is(body>header,main>header){background:var(--ui-bg);color:var(--ui-text);border-color:var(--ui-line)}
@media(max-width:360px){.theme-brand-link{width:120px;flex-basis:120px}}

/* Member and owner chrome; no auth, data or billing rules. */
html[data-theme] .account-card{background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.intro,.note,.eyebrow,footer,.member-free-note){color:var(--ui-muted)}
html[data-theme] :is(header,footer){border-color:var(--ui-line)}
html[data-theme=light]{--surface:var(--ui-panel);--muted:var(--ui-muted);--accent:var(--ui-teal)}
html[data-theme=light] :is(.overview>div,.filters,.store-card,.card-footer,.connection){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] :is(.reason,.quiet,.owner-label,.section-heading p,.method,.connection p){color:var(--ui-muted)}
html[data-theme=light] :is(.notice){background:#e5f4ed;color:#225d47;border-color:#91b8a5}
html[data-theme=light] .owner-theme :is(button:not(.theme-close):not(.theme-open),input,select,textarea){background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] nav button[aria-pressed=true]{color:var(--ui-teal)}
html[data-theme] #marker-review-map{background:#fff}

html[data-theme=light] .owner-theme .count.updated strong{color:#08694b}
html[data-theme=light] .owner-theme .count.awaiting_source strong{color:#795400}
html[data-theme=light] .owner-theme .count.fetch_failed strong{color:#a42236}
html[data-theme=light] .owner-theme .count.partial strong{color:#814319}
html[data-theme=light] .owner-theme .count.unknown strong{color:#514593}

/* The member template has more specific dark-surface rules in auth-widget.css. */
html[data-theme=light] .member-entry .member-header{background:var(--ui-bg);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] .member-entry .member-home{color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] .member-entry #memberCard{background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] .member-entry :is(.member-identity,.member-settings){border-color:var(--ui-line)}
html[data-theme=light] .member-entry .member-settings{background:var(--ui-raised);color:var(--ui-text)}
html[data-theme=light] .member-entry :is(.member-identity h2,.member-identity h2 span){color:var(--ui-teal)}
html[data-theme=light] .member-entry :is(#profile,.member-destinations>p,.member-settings h2,#withdrawal p,#withdrawal summary,#legacyWithdrawal,#returnToSite){color:var(--ui-muted)}
html[data-theme=light] .member-entry :is(#logout,#withdraw){color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=light] .member-entry .member-secondary{background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
