/* Shared semantic light palette. Legacy dark values are retained as the dark branch of light-dark(). */
:root{--theme-background:#f2f4f9;--theme-surface:#ffffff;--theme-elevated:#fff;--theme-hover:#e6edf8;--theme-input:#f5f7fb;--theme-text:#14243c;--theme-secondary:#384e69;--theme-muted:#526782;--theme-border:#c5d0e0;--theme-accent:#4633c8;--theme-accent-soft:#e6e4fa;--theme-success:#126343;--theme-success-soft:#e0f2e9;--theme-warning:#80520b;--theme-warning-soft:#fff0d3;--theme-danger:#a12842;--theme-danger-soft:#fce7ec;--theme-info:#175695;--theme-info-soft:#e2eefc;--theme-overlay:#14243c66;--theme-shadow:#19365c1c;color-scheme:dark}
:root[data-theme=light]{color-scheme:light} :root[data-theme=dark]{color-scheme:dark}
html{background:light-dark(var(--theme-background),#07182a)}
:root[data-theme=light] :is(input,select,textarea,.modal-box,#f-dialog,#mimi-chat){color-scheme:light}
:root[data-theme=light] #mimi-chat{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
:root[data-theme=light] #mimi-chat :is(input,textarea){background:var(--theme-input);color:var(--theme-text);border-color:var(--theme-border)}
.acceptance-bed-summary{display:flex;gap:16px;flex-wrap:wrap;padding:16px;border:1px solid var(--ll-border);border-radius:12px;margin-bottom:20px;background:var(--ll-elevated)}
.acceptance-bed-list .room{padding:16px;margin:12px 0}.acceptance-bed-list .bed{min-width:92px;min-height:54px;border:1px solid var(--ll-border);background:var(--ll-input);color:var(--ll-text);border-radius:12px;cursor:pointer}.acceptance-bed-list .bed.selected{border-color:var(--ll-focus);box-shadow:0 0 0 2px var(--ll-focus);background:light-dark(var(--theme-accent-soft),#27346c)}.acceptance-bed-list .bed:disabled{opacity:.55;cursor:not-allowed}.acceptance-bed-list .bed:focus-visible{outline:3px solid var(--ll-focus);outline-offset:3px}.acceptance-bed-list .bed small{display:block;font-size:11px}.acceptance-bed-footer{position:sticky;bottom:-20px;background:var(--ll-surface);padding:16px 0;margin-top:16px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}.acceptance-bed-footer .btn{margin-left:auto}

.acceptance-bed-list .beds{display:flex;flex-wrap:wrap;gap:12px}.modal-box .acceptance-bed-list .beds>button.bed{min-width:110px!important;min-height:64px!important;width:auto!important;height:auto!important;padding:10px!important;flex:0 0 auto}.modal-box .acceptance-bed-list .beds>button.bed small{white-space:normal;max-width:150px}
:root[data-theme=light] :is(.btn.blue,.btn.primary,.shell-primary){color:#fff!important}

:root[data-theme=light] #mimi-chat :is(.mimi-chat-head,.mimi-assistant,.mimi-suggestions button,.mimi-chat-head button){background:var(--theme-elevated);color:var(--theme-text);border-color:var(--theme-border)}
:root[data-theme=light] #mimi-chat .mimi-user{background:var(--theme-accent-soft);color:var(--theme-text);border-color:var(--theme-border)}
:root[data-theme=light] #mimi-chat small{color:var(--theme-muted)}
:root[data-theme=light] button.mimi-summon{background:var(--theme-accent-soft);color:var(--theme-accent);border-color:var(--theme-border)}

/* Photographic brand panels retain on-image contrast in either theme. */
:root{--theme-on-image:#f3f8ff;--theme-on-image-secondary:#bdcede}
:root[data-theme=light] :is(.shell-story,.authx-left){color:var(--theme-on-image)}
:root[data-theme=light] :is(.shell-story,.authx-left) :is(h1,h2,strong,b){color:var(--theme-on-image)}
:root[data-theme=light] :is(.shell-story,.authx-left) :is(p,small,.shell-eyebrow){color:var(--theme-on-image-secondary)}
:root[data-theme=light] .shell-form{background:var(--theme-surface)}
:root[data-theme=light] .shell-submit{background:linear-gradient(100deg,#3c64dc,#7048dc);color:#fff}
:root[data-theme=light] #mimi-chat .mimi-mode{background:var(--theme-input);color:var(--theme-text);border-color:var(--theme-border)}
body[data-shell-qa=false] :is(.mimi-feed-demo,.mimi-sound){display:none!important}

/* Navigation has its own semantic surface; dark presentation is unchanged. */
:root{--theme-sidebar:#e8edf6;--theme-table:#f7f9fc;--theme-nav-active:#e6e4fa}
:root[data-theme=light] :is(body,.app,.app>main){background:var(--theme-background)!important}
:root[data-theme=light] .app aside{background:var(--theme-sidebar)!important}
:root[data-theme=light] #nav button:is(.on,:hover,:focus-visible){background:var(--theme-nav-active)!important;color:var(--theme-accent)!important;box-shadow:none!important;transform:none}
:root[data-theme=light] th{background:var(--theme-table);color:var(--theme-secondary)}
:root[data-theme=light] tbody tr:hover{background:var(--theme-table)}
.theme-switch{display:flex;gap:4px;padding:4px;margin:0 0 14px;border:1px solid var(--ll-border);background:var(--ll-input);border-radius:12px;max-width:100%;position:relative}
.theme-switch button{flex:1;min-width:0;min-height:36px;border:0;border-radius:8px;background:transparent;color:var(--ll-muted);font:inherit;font-size:12px;cursor:pointer;padding:6px}
.theme-switch button[aria-pressed=true]{background:light-dark(var(--theme-nav-active),#27346c);color:light-dark(var(--theme-accent),#eff4fc);font-weight:700}
.theme-switch button:focus-visible{outline:2px solid var(--ll-focus);outline-offset:2px}.theme-switch button:disabled{cursor:wait;opacity:.65}
.theme-switch [role=status]:not(:empty){position:absolute;top:100%;left:0;background:var(--ll-surface);color:var(--ll-danger);padding:8px;z-index:5;border:1px solid var(--ll-border)}
.mobile-actions>.theme-switch{margin:0;padding:2px}.mobile-actions>.theme-switch button{min-width:36px;min-height:40px}.mobile-actions>.theme-switch .theme-label{display:none}
.post-offer-header{padding-bottom:18px;border-bottom:1px solid var(--ll-border);margin-bottom:20px}.post-offer-header h2{margin-bottom:8px}
.post-offer-grid,.post-booking-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:20px;align-items:start}
.post-offer-item{padding:20px;margin:16px 0;border:1px solid var(--ll-border);border-radius:16px;background:var(--ll-elevated)}
.post-offer-item .m49-offer{display:flex;flex-direction:column;align-items:flex-start;gap:12px;border:0;padding:0;background:transparent;min-width:0}
.post-offer :is(.wf-price,section),.post-booking-grid>div{min-width:0}.post-offer .wf-resources{margin:16px 0}
.post-period{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.post-period time{white-space:nowrap}
.post-offer .action-row{flex-wrap:wrap;gap:10px}.post-offer .action-row>.btn{white-space:normal}
.post-booking .post-booking-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}
@media(max-width:760px){.post-offer-grid,.post-booking-grid{grid-template-columns:1fr}.post-offer-item{padding:14px}.post-offer-header{padding-top:12px}.post-booking-actions .btn{flex:1}}

/* Light V2: one semantic surface/ink/chart system. Dark branches are untouched.
   Compatibility !important rules below only compete with legacy important declarations. */
:root[data-theme=light]{
 --theme-background:#f2f4f9;--theme-surface:#fff;--theme-elevated:#f5f7fc;
 --theme-sidebar:#e8edf6;--theme-input:#f5f7fc;--theme-hover:#edf0fa;
 --theme-text:#17213f;--theme-secondary:#4e5d79;--theme-muted:#64718d;
 --theme-border:#d6ddee;--theme-accent:#6040ce;--theme-accent-soft:#ede7ff;
 --theme-nav-active:#e5dcfc;--theme-info:#255cad;--theme-info-soft:#e5efff;
 --theme-success:#166b4c;--theme-success-soft:#e0f3eb;
 --theme-warning:#865407;--theme-warning-soft:#fff1d8;
 --theme-danger:#ad3049;--theme-danger-soft:#fce7ec;
 --theme-table:#f5f7fc;--theme-overlay:#17213f45;--theme-shadow:#17213f0d;
 --theme-card-shadow:0 2px 4px #17213f03,0 8px 22px #17213f06;
 --theme-float-shadow:0 18px 60px #17213f24;
 --theme-chart-blue:#4275d9;--theme-chart-purple:#7958d9;
 --theme-chart-green:#239772;--theme-chart-track:#e8edf6;
 --ll-shadow:var(--theme-float-shadow);
}
:root[data-theme=light] :is(.v2-panel,.v2-kpi,.ll2-panel,.ll2-card,.ll2-kpi,.card,.client-card,.f-card,.f-panel,.launch-kpis>div,.tf-tasks){background:var(--theme-surface);border-color:var(--theme-border);box-shadow:var(--theme-card-shadow)}
:root[data-theme=light] :is(.ll2-mini,.ll2-facts>div,.planner-booking-info>div,.v2-property,.v2-datebox,.post-offer-item,.wf-price,.night-body article,.task,.tf-item,.pekar-message,.launch-tabs){background:var(--theme-elevated);border-color:var(--theme-border)}
:root[data-theme=light] :is(.empty-compact,.ll2-empty,.planner-empty,.f-empty){background:var(--theme-elevated)!important;color:var(--theme-muted);border-color:var(--theme-border);box-shadow:none}
:root[data-theme=light] .v2-hero{background:linear-gradient(110deg,#fff,#f5f3fc);box-shadow:var(--theme-card-shadow)}
:root[data-theme=light] .v2-hero:before{background:none}
:root[data-theme=light] .v2-kpi:after{display:none}
:root[data-theme=light] :is(.v2-weather,.v2-property-ph){background:var(--theme-elevated)}
/* Existing brand glyphs remain intact; all icon containers share a consistent treatment. */
:root[data-theme=light] :is(.v2-kpi-icon,.ll2-kpi>span,.v2-action>span){background:var(--theme-info-soft);color:var(--theme-info);box-shadow:none;border-radius:10px;display:grid;place-items:center;min-width:32px;min-height:32px}
:root[data-theme=light] .v2-action>span{width:36px;height:36px;margin:0 auto 8px}
:root[data-theme=light] .v2-kpi:nth-child(2) .v2-kpi-icon{background:var(--theme-accent-soft);color:var(--theme-accent)}
:root[data-theme=light] .v2-kpi:nth-child(3) .v2-kpi-icon,
:root[data-theme=light] .v2-kpi:nth-child(4) .v2-kpi-icon{background:var(--theme-success-soft);color:var(--theme-success)}
:root[data-theme=light] .v2-kpi:nth-child(5) .v2-kpi-icon{background:var(--theme-accent-soft);color:var(--theme-accent)}
:root[data-theme=light] .v2-avatar{background:var(--theme-accent-soft);color:var(--theme-accent)}
/* Chart fills are data colours, never pale surface colours. No data/geometry is altered. */
:root[data-theme=light] .v2-ring{background:conic-gradient(var(--theme-chart-blue) 0 var(--load),var(--theme-chart-track) var(--load) 100%)}
:root[data-theme=light] .v2-ring:after{background:var(--theme-surface)}
:root[data-theme=light] .v2-bar{background:linear-gradient(180deg,var(--theme-chart-purple),var(--theme-chart-blue))}
:root[data-theme=light] :is(.v2-progress,.ll2-heat){background:var(--theme-chart-track)}
:root[data-theme=light] .v2-progress i{background:var(--theme-chart-green)}
:root[data-theme=light] .ll2-heat i{background:linear-gradient(90deg,var(--theme-chart-blue),var(--theme-chart-green))}
:root[data-theme=light] .launch-legend .active:before{background:var(--theme-chart-purple)}
:root[data-theme=light] .launch-legend .confirmed:before{background:var(--theme-chart-blue)}
:root[data-theme=light] .launch-legend .available:before{background:var(--theme-chart-green)}
:root[data-theme=light] .launch-legend .conflict:before{background:var(--theme-danger)}
:root[data-theme=light] .launch-legend .soon:before{background:var(--theme-warning)}
:root[data-theme=light] .booking-segment{border-left:3px solid var(--theme-chart-blue);color:var(--theme-info)}
:root[data-theme=light] .booking-segment.live{border-left-color:var(--theme-chart-purple);color:var(--theme-accent)}
:root[data-theme=light] .booking-segment.soon{border-left-color:var(--theme-warning);color:var(--theme-warning)}
:root[data-theme=light] .booking-segment.problem{border-left-color:var(--theme-danger);color:var(--theme-danger)}
/* Raise only legacy micro-labels, not the application scale. */
:root[data-theme=light] :is(.v2-kpi-label,.v2-kpi-sub,.v2-link,.v2-list-row .muted,.v2-property small,.v2-action small,.v2-ring-center small,.ll2-kpi small,.ll2-kpi em,.ll2-facts small,.ll2-row small,.ll2-mini small){font-size:11px!important;line-height:1.5;color:var(--theme-secondary)}
:root[data-theme=light] :is(.v2-list-row strong,.v2-stat,.v2-property b,.v2-book-table td,.ll2-table td,.v2-status){font-size:12px;line-height:1.5}
:root[data-theme=light] :is(.v2-panel-head h3,.ll2-panel h3){font-size:15px!important;line-height:1.4}
:root[data-theme=light] :is(.v2-kpi-value,.v2-chart-total,.launch-kpis b){font-variant-numeric:tabular-nums;letter-spacing:-.025em}
:root[data-theme=light] :is(.v2-book-table th,.ll2-table th){font-size:11px;color:var(--theme-secondary);padding:9px 8px}
:root[data-theme=light] :is(.v2-bar small,.v2-datebox small){font-size:10px;color:var(--theme-muted)}
:root[data-theme=light] :is(.btn.blue,.btn.primary,.shell-primary,.shell-submit,.modal-box .action-row>.btn.green,button.launch-new-request,button[onclick^="m49RequestForm("],button[onclick^="requestForm("],button[onclick^="requestFromThread("],button[data-landlord-action="request"],button[data-landlord-action="clientRequest"]){background:var(--theme-accent)!important;color:#fff!important;border-color:var(--theme-accent)!important;box-shadow:0 3px 8px #6040ce16}
:root[data-theme=light] :is(.btn.gray,.v2-action,.workspace-language,.mobile-icon){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border);box-shadow:none}
:root[data-theme=light] :is(.btn,.v2-action,.pekar-thread,.launch-tabs button,.night-tabs button){transition:background-color .14s,border-color .14s,box-shadow .14s}
:root[data-theme=light] :is(.btn,.v2-action):hover:not(:disabled){filter:none;box-shadow:0 3px 10px #17213f12}
:root[data-theme=light] :is(.btn.gray,.v2-action,.pekar-thread):hover:not(:disabled){background:var(--theme-hover);border-color:#b9c3dd}
:root[data-theme=light] :is(.launch-tabs button[aria-pressed=true],.night-tabs button[aria-selected=true],.tf-tabs button[aria-selected=true],.pekar-thread.active,.pekar-filters button[aria-pressed=true]){background:var(--theme-accent-soft);color:var(--theme-accent);border-color:#c4b5ee;box-shadow:none}
:root[data-theme=light] :is(input,select,textarea){accent-color:var(--theme-accent)}
:root[data-theme=light] :is(.modal-box,#f-dialog,.shell-form,.night-panel) :is(input,select,textarea){background:var(--theme-input);color:var(--theme-text);border-color:#bdc8df}
:root[data-theme=light] :is(input,textarea)::placeholder{color:var(--theme-muted);opacity:1}
:root[data-theme=light] :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--theme-accent);outline-offset:3px}
:root[data-theme=light] :is(input,select,textarea):focus{box-shadow:0 0 0 3px #6040ce12}
:root[data-theme=light] :is(button,input,select,textarea):disabled{cursor:not-allowed}
:root[data-theme=light] :is(.modal-box,#f-dialog,#premiumDialog){box-shadow:var(--theme-float-shadow)}
:root[data-theme=light] :is(.modal-box,#f-dialog,.night-body,.pekar-messages,.launch-calendar-scroll){scrollbar-color:#b7c2d9 var(--theme-elevated);scrollbar-width:thin}
:root[data-theme=light] :is(.f-aside,.mobile-bottom-nav){background:var(--theme-sidebar)}
:root[data-theme=light] :is(.f-top,.mobile-topbar){background:var(--theme-surface);border-color:var(--theme-border)}
:root[data-theme=light] #mimi-chat{box-shadow:var(--theme-float-shadow)}
/* Character artwork, scale, rig, animation, position and existing character shadow are frozen. */
@media(prefers-reduced-motion:reduce){:root[data-theme=light] :is(.btn,.v2-action,.pekar-thread,.launch-tabs button,.night-tabs button){transition:none}}

:root[data-theme=light] .tf-head svg{color:var(--theme-accent)}
:root[data-theme=light] .tf-item[data-priority=urgent]{border-left-color:var(--theme-danger)}
:root[data-theme=light] .tf-error{color:var(--theme-danger)}
:root[data-theme=light] .v2-bars[data-empty=true] .v2-bar{background:var(--theme-chart-track);box-shadow:none}
/* Auth uses the same light surfaces and CTA hierarchy; handlers/layout remain unchanged. */
:root[data-theme=light] .authx-card{background:var(--theme-surface);box-shadow:var(--theme-float-shadow)}
:root[data-theme=light] .authx-input{background:var(--theme-input);border-color:#bdc8df}
:root[data-theme=light] .authx-input:focus-within{border-color:var(--theme-accent);box-shadow:0 0 0 3px #6040ce12}
:root[data-theme=light] .authx-primary{background:var(--theme-accent);color:#fff;box-shadow:0 3px 8px #6040ce16}
:root[data-theme=light] .authx-primary:hover:not(:disabled){background:#5335bd}
:root[data-theme=light] .authx-create{background:var(--theme-elevated);color:var(--theme-text)}
:root[data-theme=light] .authx-main h1 em{background:none;color:var(--theme-accent)}
:root[data-theme=light] .authx-features i{background:var(--theme-info-soft);color:var(--theme-info)}
:root[data-theme=light] .authx-primary:before{display:none}
