
/* SyncGenie Design System v1.0: shared PC/mobile tokens.
   Platform, cleaner, status and priority palettes remain independent. */
:root {
  --sg-primary: #4BCDD0;
  --sg-primary-hover: #39BFC7;
  --sg-menu-bg: #0B1220;
  --sg-card-bg: var(--sg-theme-surface,#FFFFFF);
  --sg-workspace-bg: var(--sg-theme-surface,#F5F7FA);
  --sg-text: #17243B;
  --sg-sky: #8CCEF2;
  --sg-info-bg: var(--sg-theme-surface,#EAF6FD);
  --sg-accent-text: var(--sg-selection-text);
  --sg-font-ui: Inter, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  --sg-type-small: 12px;
  --sg-type-body: 15px;
  --sg-type-label: 14px;
  --sg-type-section: 18px;
  --sg-type-page: 24px;
  --sg-type-compact-page: 22px;
  --sg-leading-body: 1.6;
  --sg-space-1: 4px;
  --sg-space-2: 8px;
  --sg-space-3: 12px;
  --sg-space-4: 16px;
  --sg-space-5: 20px;
  --sg-space-6: 24px;
  --sg-space-8: 32px;
  --sg-radius-control: 8px;
  --sg-radius-card: 12px;
  --sg-border-ui: var(--sg-control-border);
  --sg-action-primary: var(--sg-primary);
  --sg-control-border: var(--sg-theme-border,#DDE6EC);
  --sg-selection-bg: var(--sg-theme-surface,#E2F6F5);
  --sg-selection-text: #076D74;
  --sg-text-muted: #61758b;
  --sg-clean-done-bg:#E6F5EE; --sg-clean-done-text:#176B43;
  --sg-clean-supplies-bg:var(--sg-theme-surface,#EDF3FA); --sg-clean-supplies-text:#345E8B;
  --sg-clean-issue-bg:#FFF3D6; --sg-clean-issue-text:#946400;
  --sg-clean-urgent-bg:#FFF0EF; --sg-clean-urgent-text:#B42332;
}
/* Shared app header: one row, existing brand assets and control hit areas preserved. */
.top-header { gap:var(--sg-space-3); }
.top-header .header-search { order:0; flex:0 1 360px; min-width:120px; }
.sg-header-slogan {
  order:1; flex:1 1 300px; min-width:220px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; font-family:var(--sg-font-ui);
}
.sg-header-slogan strong {
  color:var(--sg-primary); font-size:16px; font-weight:600;
  line-height:1.25; white-space:nowrap;
}
.top-header .header-actions { order:2; flex-shrink:0; }
@media(min-width:761px) and (max-width:1023px) {
  .sg-header-slogan { display:none; }
}
@media(max-width:760px) {
  .top-header { gap:6px; }
  .top-header .mobile-brand { flex:0 0 auto; }
  .sg-header-slogan {
    flex:1 1 auto; min-width:0; min-height:20px;
    align-items:flex-start; text-align:start;
    border-inline-start:1px solid var(--sg-control-border); padding-inline-start:6px;
  }
  .sg-header-slogan strong { font-size:var(--sg-type-small); line-height:1.2; }
  .top-header .header-actions { margin-inline-start:auto; }
}
@media(max-width:374px) {
  .sg-header-slogan strong { font-size:11px; }
}
@media(max-width:359px) {
  .sg-header-slogan { display:none; }
  .top-header { gap:var(--sg-space-2); }
}
/* Shared toolbar control: one neutral surface for selects and navigation buttons. */
#app .sg-toolbar-control {
  box-sizing:border-box;min-height:var(--sg-control-h);margin:0;padding:var(--sg-space-2) var(--sg-space-3);
  border:1px solid var(--sg-control-border);border-radius:var(--sg-radius-control);
  background:var(--sg-card-bg);color:var(--sg-text);box-shadow:none;
  font:inherit;font-size:14px;font-weight:500;line-height:1.4;cursor:pointer;
}
#app .sg-toolbar-control:hover{background:var(--sg-workspace-bg)}
#app .sg-toolbar-control:focus-visible{outline:2px solid var(--sg-selection-text);outline-offset:2px}
html, body { font-family: var(--sg-font-ui); }
.page-intro h1 { font-size: var(--sg-type-page); line-height: 1.25; letter-spacing: -.025em; font-weight: 700; }
.page-intro p, .page-title span, .calendar-card-header p, .login-heading p {
  font-size: var(--sg-type-body); line-height: var(--sg-leading-body);
}
.page-title h2, .calendar-card-header h2, .property-detail-header h3,
.sg-cleaning-page-heading h2 { font-size: var(--sg-type-section); line-height: 1.4; font-weight: 600; }
.sidebar-item, .sidebar-placeholder { font-size: var(--sg-type-label); line-height: 1.4; }
.standard-card, .summary-card, .property-card, .property-detail-panel,
.sg-cleaning-day-panel, .sg-cleaning-summary-card, .sg-member-card {
  border-radius: var(--sg-radius-card);
}
.standard-card { padding: var(--sg-space-6); }
.page-title { gap: var(--sg-space-4); margin-bottom: var(--sg-space-6); flex-wrap: wrap; }
.property-card-name { font-size: 18px; line-height: 1.4; font-weight: 600; }
.property-card-id, .property-card-meta-item span, .property-card-footer,
.property-detail-item span, .sg-photo-help, .sg-photo-eyebrow { font-size: var(--sg-type-small); line-height: 1.5; }
.property-card-meta-item strong, .property-detail-item strong { font-size: var(--sg-type-body); line-height: var(--sg-leading-body); }
.search-box input, .header-search input { font-size: var(--sg-type-body); }
.login-field > span { font-size: var(--sg-type-label); font-weight: 600; }
.login-field input, .sg-kb-dialog input:not([type=checkbox]), .sg-kb-dialog select,
.sg-kb-dialog textarea, .sg-member-dialog input, .sg-member-dialog select {
  font-family: var(--sg-font-ui); font-size: 16px; line-height: 1.5; border-radius: var(--sg-radius-control);
}
.primary-action, .secondary-action, .sg-photo-save, .sg-photo-choose, .sg-cl-button,
.sg-kb-button, .sg-member-button, .login-submit {
  font-family: var(--sg-font-ui); font-size: var(--sg-type-label); font-weight: 600;
  line-height: 1.4; min-height: var(--sg-control-h); border-radius: var(--sg-radius-control); white-space: normal;
}
.primary-action:disabled, .secondary-action:disabled, .sg-photo-save:disabled,
.sg-cl-button:disabled, .sg-member-button:disabled { opacity: .55; cursor: not-allowed; }
.primary-action:focus-visible, .secondary-action:focus-visible, .sg-photo-save:focus-visible,
.sg-photo-choose:focus-visible, .sg-cl-button:focus-visible, .login-submit:focus-visible,
.search-box:focus-within, .header-search:focus-within {
  outline: 2px solid var(--sg-accent-text); outline-offset: 3px;
}
.sg-genie-title, .sg-genie-result h3 { font-weight: 600; letter-spacing: -.015em; }
.sg-genie-answer, .sg-kb-answer { line-height: var(--sg-leading-body); }
.sg-kb-dialog, .sg-member-dialog { font-family: var(--sg-font-ui); }
@media (max-width: 650px) {
  :root { --sg-type-page: 21px; --sg-type-section: 18px; }
  .standard-card { padding: var(--sg-space-4); }
  .page-title { margin-bottom: var(--sg-space-4); }
  .primary-action, .secondary-action, .sg-photo-save, .sg-photo-choose, .sg-cl-button,
  .sg-kb-button, .sg-member-button { min-height: 44px; }
}

/* Shared typography: text elements and existing controls, not icon-font glyphs. */
body { font-size:var(--sg-type-body); line-height:1.5; font-weight:400; }
button,input,select,textarea { font-family:var(--sg-font-ui); }
h1,h2,h3,h4 { font-weight:600; line-height:1.35; }
#app .page-intro h1, .login-heading h1 { font-size:var(--sg-type-page); font-weight:700; }
#app .page-title h2, #cleaningView .sg-cleaning-page-heading h2 { font-size:var(--sg-type-page); }
#app .calendar-card-header h2, #app .standard-card h3, #app .property-detail-header h3,
.sg-kb-dialog h3, .sg-member-dialog h3, .sg-genie-title { font-size:var(--sg-type-section); }
#app .sidebar-item, #app .sidebar-placeholder, #app .sidebar-settings-button { font-size:14px; font-weight:500; }
#app .sidebar-settings-button { min-height:44px; }
.login-field input, .login-field select, #app input:not([type=checkbox]):not([type=radio]),
#app select, #app textarea, .sg-member-dialog input:not([type=checkbox]):not([type=radio]),
.sg-member-dialog select, .sg-member-dialog textarea, .sg-kb-dialog input:not([type=checkbox]),
.sg-kb-dialog select, .sg-kb-dialog textarea, #manualBookingDialog input:not([type=checkbox]),
#manualBookingDialog select, #manualBookingDialog textarea, #genieInput { font-size:16px; line-height:1.5; }
.login-field > span, .property-detail-label, .sg-member-dialog label, .sg-kb-dialog label,
.mb-form label { font-size:14px; line-height:1.5; font-weight:500; }
#app table { font-size:15px; line-height:1.5; }
#app th { font-size:13px; font-weight:600; }
#app td { overflow-wrap:anywhere; }
#app .property-card-name { font-size:18px; }
#app .property-detail-item strong, #app .property-card-meta-item strong,
.sg-genie-answer, .sg-genie-result p, .sg-kb-answer, .sg-com-body, .sg-com-detail { font-size:15px; line-height:1.65; }
.login-heading p, .login-footer, .login-error, .sg-genie-notice, .sg-genie-subtitle,
.property-card-footer, .property-card-id, .sg-kb-status, .mb-note { font-size:13px; line-height:1.6; }
#manualBookingDialog button, .sg-member-dialog button, .sg-kb-dialog button,
.sg-genie-actions button, .sg-genie-speech button, .sg-genie-quick button,
.sg-mobile-more-menu button { font-size:14px; line-height:1.45; min-height:42px; white-space:normal; }
.sg-genie-quick { flex-wrap:wrap; }
.sg-genie-result-heading { flex-wrap:wrap; }
#manualBookingDialog h2 { font-size:var(--sg-type-page); }
#manualBookingDialog .mb-form legend { font-size:17px; }
#manualBookingDialog .mb-days button { font-size:13px; min-height:36px; }
#manualBookingDialog .mb-weekday { font-size:12px; }
#manualBookingDialog .mb-choice button { font-size:18px; }
.sg-mobile-more-menu { width:min(290px,calc(100vw - 24px)); }
.nav-button { font-size:12px; line-height:1.3; }
.sidebar-item { min-height:44px; height:auto; }
button:focus-visible, a:focus-visible { outline:2px solid var(--sg-accent-text); outline-offset:3px; }
.summary-card-content > span { font-size:13px; line-height:1.45; }
.summary-badge, .sync-status, .properties-label, .today-label { font-size:12px; }
.property-tab { font-size:13px; font-weight:500; line-height:1.4; }
.bottom-nav .nav-button { font-size:12px; }
.sg-community { font-size:15px; }
.sg-community h2, .sg-member-dialog h2, .sg-kb-dialog h2 { font-size:var(--sg-type-page); }
.sg-community h3, .sg-member-dialog h3 { font-size:var(--sg-type-section); }
.sg-kb-note, .sg-community-meta, .sg-member-status { font-size:13px; line-height:1.6; }
.sg-genie-quick button { font-size:14px; }
/* Calendar geometry remains controlled by the existing date/lane calculations. */
#allPlannerView .planner-left { flex:0 0 180px; min-width:180px; }
#allPlannerView .property-label { justify-content:flex-start; gap:10px; padding:10px; text-align:left; font-size:14px; font-weight:600; }
.sg-planner-property-name { min-width:0; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow-wrap:anywhere; line-height:1.4; }
.sg-planner-photo { width:40px; height:40px; flex:0 0 40px; position:relative; overflow:hidden; border-radius:8px; background:var(--sg-surface-soft,var(--sg-theme-surface,#eaf6fd)); }
.sg-planner-photo .sg-photo-placeholder { position:absolute; inset:0; display:grid; place-items:center; }
.sg-planner-photo svg { width:22px; height:22px; }
.sg-planner-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.planner-left-header { font-size:12px; font-weight:600; }
.planner-period-header > div { font-size:12px; font-weight:400; }
.month-day-number { font-size:13px; font-weight:500; }
.month-week-header > div { font-size:12px; line-height:1.4; font-weight:600; }
.month-title { font-size:16px; font-weight:600; }
.filter-label { font-size:13px; }
#app .sidebar-settings { font-size:14px; font-weight:500; min-height:44px; }
.month-reservation-bar { container-type:inline-size; height:28px; margin-top:2px; margin-bottom:2px; font-size:13px; font-weight:600; }
.sg-single-calendar .sg-mobile-adaptive-week .month-reservation-bar { font-size:12px; }
.sg-planner-reservation { container-type:inline-size; }
.sg-reservation-name { display:block; width:100%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:600; line-height:1.4; text-align:left; }
.sg-reservation-name .sg-calendar-platform { display:inline-block; width:14px; min-width:14px; }
/* Keep platform and country visible while only the guest name truncates. */
.sg-planner-reservation .sg-planner-guest { display:flex; align-items:center; }
.sg-planner-guest-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sg-planner-guest > .sg-calendar-platform, .sg-planner-guest > .sg-calendar-country { flex-shrink:0; }
/* Only the name truncates; country and total remain a single compact label. */
.month-reservation-bar .sg-reservation-name { display:flex; align-items:center; }
.month-reservation-bar .sg-calendar-country, .month-reservation-bar .sg-calendar-platform { flex-shrink:0; }
.sg-calendar-guest-total { display:inline-flex; align-items:center; flex-shrink:0; gap:2px; margin-left:4px; font-size:inherit; line-height:1; white-space:nowrap; }
.sg-calendar-guest-total img { width:14px; height:14px; object-fit:contain; }
@container (max-width:70px) {
  .month-reservation-bar .sg-reservation-name, .sg-planner-reservation .sg-planner-guest { display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-rows:12px 12px; align-items:center; }
  .sg-reservation-name > .sg-calendar-platform { grid-column:1; grid-row:1; margin-right:1px; }
  .sg-reservation-name > .sg-planner-guest-text { grid-column:2; grid-row:1; font-size:10px; }
  .sg-reservation-name > .sg-calendar-country { grid-column:3; grid-row:1; margin-left:1px !important; }
  .sg-reservation-name > .sg-calendar-guest-total { grid-column:1 / -1; grid-row:2; justify-self:center; margin-left:0; font-size:10px; }
  .sg-calendar-guest-total img { width:10px; height:10px; }
}
@container (max-width:30px) {
  .sg-reservation-name > .sg-calendar-guest-total { gap:1px; font-size:8px; }
  .sg-calendar-guest-total img { width:8px; height:8px; }
}
/* Reservation detail: compact schedule/guest summary, then access and amounts. */
#reservationModal { align-items:center; padding:20px; }
#reservationModal .modal-sheet { width:min(1060px,100%); max-height:calc(100dvh - 40px); padding:0; display:flex; flex-direction:column; overflow:hidden; border-radius:16px; }
#reservationModal .modal-handle { display:none; }
#reservationModal .modal-header { flex:0 0 auto; padding:22px 24px 18px; background:var(--sg-card,var(--sg-theme-surface,#fff)); }
#reservationModal .modal-guest { font-size:24px; line-height:1.3; font-weight:700; overflow-wrap:anywhere; }
#reservationModal .modal-apartment { font-size:15px; line-height:1.5; }
#reservationModal .modal-close { width:44px; height:44px; flex-basis:44px; font-size:24px; }
#reservationModal .modal-content { overflow-y:auto; overscroll-behavior:contain; min-height:0; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); align-content:start; gap:12px; padding:16px 24px 24px; }
.sg-detail-platform { margin-top:8px; font-size:14px; line-height:1.5; }
.sg-detail-section { min-width:0; border:1px solid var(--sg-border-ui); border-radius:10px; padding:16px; }
.sg-detail-section h3 { font-size:16px; margin:0 0 10px; }
.sg-detail-section dl { margin:0; font-size:14px; }
.sg-detail-row { display:grid; grid-template-columns:minmax(85px,.85fr) minmax(0,1.15fr); gap:12px; padding:8px 0; border-bottom:1px solid var(--sg-theme-border,#edf0f2); }
.sg-detail-row:last-child { border-bottom:0; }
.sg-detail-row dt { font-size:13px; color:var(--sg-text-muted); line-height:1.5; }
.sg-detail-row dd { margin:0; font-size:15px; line-height:1.5; font-weight:500; overflow-wrap:anywhere; white-space:pre-wrap; }
.sg-detail-row.is-major dd { font-size:17px; font-weight:600; }
.sg-detail-note { font-size:12px; color:var(--sg-text-muted); line-height:1.6; margin:10px 0 0; }
.sg-detail-country { display:inline-flex; vertical-align:middle; align-items:center; margin-left:10px; max-width:100%; font-size:13px; font-weight:500; }
.sg-detail-country img { width:30px; height:20px; object-fit:cover; border-radius:2px; }
.sg-detail-schedule, .sg-detail-guests, .sg-detail-operations { grid-column:1 / -1; }
.sg-detail-schedule-grid { display:grid; grid-template-columns:minmax(0,2.25fr) minmax(0,1fr); gap:12px 20px; }
.sg-detail-schedule-grid dt, .sg-detail-metric dt, .sg-detail-operations dt { color:var(--sg-text-muted); font-size:13px; line-height:1.4; }
.sg-detail-schedule-grid dd { margin:0; font-size:15px; line-height:1.5; }
.sg-detail-stay { display:flex; align-items:center; flex-wrap:wrap; gap:6px 14px; }
.sg-detail-stay dd { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; font-size:17px; font-weight:600; }
.sg-detail-dates { display:flex; align-items:center; flex-wrap:wrap; gap:0 4px; }
.sg-detail-dates > span { white-space:nowrap; }
.sg-detail-nights { flex-shrink:0; padding:4px 10px; border-radius:9px; background:var(--sg-theme-surface,#e3f8fa); color:#087f92; font-size:13px; white-space:nowrap; }
.sg-detail-arrival { border-left:1px solid var(--sg-border-ui); padding-left:20px; }
.sg-detail-arrival dd { margin-top:3px; overflow-wrap:anywhere; }
.sg-detail-schedule-grid .sg-detail-notes { grid-column:1 / -1; grid-template-columns:minmax(68px,.22fr) minmax(0,1fr); border:0; border-top:1px solid var(--sg-theme-border,#edf0f2); padding:10px 0 0; }
.sg-detail-guests { display:flex; align-items:center; gap:20px; }
.sg-detail-guests h3 { display:flex; align-items:center; gap:12px; margin:0; }
.sg-detail-guest-count { padding:4px 12px; border-radius:7px; background:var(--sg-theme-surface,#f0f5f8); font-size:17px; }
.sg-detail-guest-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); flex:1; min-width:0; }
.sg-detail-metric { min-width:0; display:flex; flex-direction:column; align-items:center; text-align:center; border-left:1px solid var(--sg-border-ui); padding:0 8px; }
.sg-detail-metric dt { order:2; overflow-wrap:anywhere; }
#reservationModal { --sg-detail-icon-color:#009dbc; }
.sg-detail-metric dd { order:1; display:flex; justify-content:center; align-items:center; gap:8px; margin:0 0 4px; color:var(--sg-detail-icon-color); font-size:20px; font-weight:600; }
.sg-detail-icon { display:inline-block; width:30px; height:38px; flex-shrink:0; fill:currentColor; object-fit:contain; vertical-align:middle; }
.sg-detail-icon-outline { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; color:var(--sg-detail-icon-color); }
.sg-detail-metric:not(.sg-detail-cot) dd > span { color:var(--sg-menu-bg); }
.sg-detail-icon-cot { width:44px; height:38px; }
/* Only the two reservation requirement fields; other guest icons/layout stay intact. */
#reservationModal .sg-detail-requirement { --requirement-fg:#087c80; --requirement-bg:#dcf4f2; }
#reservationModal .sg-detail-requirement[data-requirement="cot"].is-required { --requirement-fg:#b42332; --requirement-bg:var(--sg-theme-surface,#fde8ec); }
#reservationModal .sg-detail-requirement.is-not-required { --requirement-fg:#536173; --requirement-bg:var(--sg-theme-surface,#edf0f3); }
#reservationModal .sg-detail-requirement.is-unspecified { --requirement-fg:#925600; --requirement-bg:#fff1db; }
#reservationModal .sg-detail-requirement dt { display:flex; align-items:center; justify-content:center; gap:6px; min-width:0; color:var(--sg-menu-bg); }
#reservationModal .sg-detail-requirement .sg-detail-icon { width:26px; height:26px; color:var(--requirement-fg); }
#reservationModal .sg-detail-requirement-badge { display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:4px 9px; border-radius:16px; background:var(--requirement-bg); color:var(--requirement-fg); font-size:13px; font-weight:600; line-height:1.45; white-space:normal; overflow-wrap:normal; max-width:100%; box-sizing:border-box; }
#reservationModal .sg-detail-requirement-text { min-width:0; }
#reservationModal .sg-detail-question { display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; flex-shrink:0; border:1.5px solid currentColor; border-radius:50%; font-size:11px; line-height:1; }
#reservationModal .sg-detail-cot { justify-content:center; gap:5px; }
#reservationModal .sg-detail-cot dt { order:0; flex-wrap:wrap; font-size:13px; }
#reservationModal .sg-detail-cot dd { order:1; margin:0; font-size:inherit; }
#reservationModal .sg-detail-requirement.is-not-required dt { gap:0; }

.sg-detail-choice { display:block; margin-top:2px; font-size:12px; color:var(--sg-text-muted); font-weight:400; }
.sg-detail-operations dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.sg-detail-operations dt { display:flex; align-items:center; gap:8px; font-size:16px; font-weight:600; color:inherit; }
.sg-detail-operations dl > div { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; min-width:0; }
.sg-detail-operations dl > div + div { border-left:1px solid var(--sg-border-ui); padding-left:20px; }
.sg-detail-operations dd { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:0; font-size:14px; overflow-wrap:anywhere; min-width:0; }
.sg-detail-icon-parking { width:30px; height:30px; border-radius:3px; }
.sg-detail-operations .sg-detail-cleaning-code { width:auto; min-height:26px; padding:4px 10px; font-size:13px; font-weight:700; white-space:normal; overflow-wrap:anywhere; }
#sgDetailAccess .sg-detail-code-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; }
#sgDetailAccess .sg-detail-code-grid.is-message { display:block; color:var(--sg-text-muted); line-height:1.6; }
#sgDetailAccess .sg-detail-row { display:block; min-width:0; border-bottom:0; padding:4px 12px; }
#sgDetailAccess .sg-detail-row:first-child { padding-left:0; }
#sgDetailAccess .sg-detail-row + .sg-detail-row { border-left:1px solid var(--sg-border-ui); }
#sgDetailAccess .sg-detail-code { margin-top:6px; font-size:16px; font-weight:600; overflow-wrap:anywhere; }
#sgDetailAmounts .sg-detail-row { grid-template-columns:minmax(0,1fr) auto; padding:5px 0; }
#sgDetailAmounts dd { text-align:right; font-variant-numeric:tabular-nums; }
@media(max-width:760px) {
  #allPlannerView .planner-left { flex-basis:112px; min-width:112px; }
  #allPlannerView .property-label { gap:5px; flex-direction:column; align-items:flex-start; justify-content:center; padding:5px 8px; }
  .sg-planner-photo { width:24px; height:24px; flex-basis:24px; }
  .sg-planner-photo svg { width:18px; height:18px; }
  .sg-planner-property-name { font-size:14px; -webkit-line-clamp:1; }
  #reservationModal { padding:8px; }
  #reservationModal .modal-sheet { max-height:calc(100dvh - 16px); width:100%; border-radius:12px; }
  #reservationModal .modal-header { padding:14px 12px; }
  #reservationModal .modal-guest { font-size:21px; }
  #reservationModal .modal-content { grid-template-columns:minmax(0,1fr); gap:10px; padding:12px; padding-bottom:max(12px,env(safe-area-inset-bottom)); }
  .sg-detail-section { padding:12px; }
  .sg-detail-section h3 { font-size:15px; margin-bottom:8px; }
  .sg-detail-country { margin-left:8px; }
  .sg-detail-country img { width:27px; height:18px; }
  .sg-detail-schedule-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
  .sg-detail-stay { display:block; }
  .sg-detail-stay dd { font-size:14px; margin-top:5px; gap:6px 8px; }
  .sg-detail-nights { padding:3px 7px; font-size:12px; }
  .sg-detail-arrival { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:start; gap:10px; border-left:0; border-top:1px solid var(--sg-theme-border,#edf0f2); padding:8px 0 0; }
  .sg-detail-arrival dd { margin:0; font-size:14px; }
  .sg-detail-schedule-grid .sg-detail-notes { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:10px; padding-top:8px; }
  .sg-detail-schedule-grid .sg-detail-notes dd { font-size:14px; }
  .sg-detail-guests { display:block; }
  .sg-detail-guests h3 { gap:8px; margin-bottom:10px; }
  .sg-detail-guest-count { padding:2px 8px; font-size:15px; }
  .sg-detail-metric { padding:0 4px; }
  .sg-detail-metric:first-child { border-left:0; }
  .sg-detail-metric dd { gap:3px; font-size:16px; }
  .sg-detail-metric dt { font-size:11px; }
  .sg-detail-icon { width:23px; height:30px; }
  .sg-detail-icon-cot { width:36px; height:30px; }
  .sg-detail-choice { font-size:11px; }
  .sg-detail-operations dl > div { gap:6px 8px; padding-right:8px; }
  .sg-detail-operations dl > div + div { padding-left:12px; padding-right:0; }
  .sg-detail-operations dd { font-size:13px; gap:6px; }
  .sg-detail-operations dt { font-size:15px; }
  .sg-detail-icon-parking { width:26px; height:26px; }
  #reservationModal .sg-detail-guest-grid { grid-template-columns:repeat(3,minmax(0,1fr)) minmax(106px,1.5fr); }
  #reservationModal .sg-detail-requirement .sg-detail-icon { width:24px; height:24px; }
  #reservationModal .sg-detail-requirement-badge { font-size:12px; padding:4px 6px; }
  #reservationModal .sg-detail-cot dt { font-size:12px; }
  #sgDetailAccess .sg-detail-row { padding:2px 8px; }
  #sgDetailAccess .sg-detail-code { font-size:14px; }
  .sg-genie-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
#genieLaunch .sg-genie-quick button, #genieSpeechControls button, .sg-genie-chat-modes button { font-size:14px; line-height:1.45; min-height:var(--sg-control-h); }
#genieLaunch .sg-genie-quick button { height:auto; white-space:normal; }
#genieSubtitle, #genieStatus, .sg-genie-muted { font-size:13px; line-height:1.6; }
#reservationModal .modal-header { flex-wrap:nowrap; gap:14px; }
#reservationModal .modal-header > div:first-child { flex:1 1 0; }
.sg-detail-actions { display:flex; flex:0 0 auto; align-items:center; gap:10px; }
.sg-detail-actions button { height:auto; min-height:44px; padding:8px 18px; border-radius:10px; font-size:14px; }
@media(max-width:760px) {
  #reservationModal .modal-header { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:12px; }
  #reservationModal .modal-header > div:first-child { grid-column:1; grid-row:1; }
  #reservationModal .modal-close { grid-column:2; grid-row:1; }
  #reservationModal .sg-detail-actions { grid-column:1 / -1; grid-row:2; align-items:stretch; }
  #reservationModal .sg-detail-actions button { flex:1 1 0; min-width:0; }
}
.sg-calendar-country { font-weight:500; }

/* Presentation contract: no calendar lane geometry, data or state changes. */
:root {
  --sg-control-h: 44px;
  --sg-card-padding: 24px;
  --sg-section-gap: 24px;
  --sg-grid-gap: 16px;
  --sg-surface-soft: var(--sg-theme-surface,#f8fafc);
  --sg-shadow-soft: 0 2px 8px #17243b06;
  --sg-shadow-dialog: 0 20px 60px #0b122026;
  --sg-radius-dialog: 16px;
  --sg-radius-badge: 999px;
  --sg-icon-nav: 22px;
  --sg-icon-hero: 52px;
  --sg-success-bg: #e4f4ec; --sg-success-text: #21764d;
  --sg-progress-bg: #eaf6fd; --sg-progress-text: #196b87;
  --sg-warning-bg: #fff3d6; --sg-warning-text: #946400;
  --sg-error-bg: #fff0ef; --sg-error-text: #b42332;
  --sg-neutral-bg: var(--sg-theme-surface,#edf3f8); --sg-neutral-text: #526a80;
}
/* Outer cards share a quiet surface; nested information stays flat. */
#app :is(.standard-card,.property-card,.property-detail-panel,.md-property,.md-metric,.md-operations,.sg-an-card,.cw-tasks,.cw-metric,.sg-cleaning-day-panel,.sg-cleaning-summary-card) {
  border-radius: var(--sg-radius-card); border-color: var(--sg-border-ui); box-shadow: var(--sg-shadow-soft);
}
#app :is(.standard-card,.property-detail-panel,.md-property,.sg-an-card,.cw-tasks) { padding: var(--sg-card-padding); }
#app :is(.md-booking,.md-available,.cw-task,.cw-work,.cw-task-detail,.sg-member-card,.ph-fact,.ph-knowledge-entry) { border-radius: var(--sg-radius-card); }
#app :is(.md-properties,.sg-an-kpis,.sg-an-panels,.cw-task-list) { gap: var(--sg-grid-gap); }
#app :is(.md-summary,.page-title) { margin-bottom: var(--sg-section-gap); }
#app :is(.cw-actions,.sg-member-row,.sg-member-filter,.sg-an-tools) { gap: var(--sg-space-2); }
#app :is(.page-title,.sg-an-head,.md-heading,.sg-member-head) { min-width:0; }
#app :is(.page-title h2,.sg-an-head h2,.sg-menu-heading h1,.sg-menu-heading h2,.sg-cleaning-page-heading h2,.sg-member-head h2) {
  font-size:var(--sg-type-page); font-weight:700; line-height:1.3; overflow-wrap:anywhere;
}
#app :is(.md-heading h2,.cw-head h3,.sg-an-card h3,.property-card-name) { font-size:var(--sg-type-section); font-weight:600; line-height:1.45; }
#app .sg-an-kpi h3 { font-size:var(--sg-type-label); font-weight:500; }
#app :is(.page-title p,.sg-menu-heading-copy>p) { margin-top:var(--sg-space-2); line-height:var(--sg-leading-body); }
/* Controls use minimum height, allowing translated text to wrap naturally. */
#app :is(.primary-action,.secondary-action,.cw-button,.sg-cl-button,.sg-kb-button,.sg-member-button,.sg-photo-save,.sg-photo-choose,.sg-an-tools button,.sg-an-tab,.ph-tab),
:is(.sg-member-dialog,.sg-kb-dialog) button:not(.sg-member-close) {
  min-height:var(--sg-control-h); height:auto; border-radius:var(--sg-radius-control);
  padding:10px 14px; font-family:var(--sg-font-ui); font-size:var(--sg-type-label); font-weight:600;
  line-height:1.45; white-space:normal; overflow-wrap:anywhere; max-width:100%; box-sizing:border-box;
  transition:background-color .15s,border-color .15s;
}
#app .cw-button.primary { background:var(--sg-primary); border-color:var(--sg-primary); color:var(--sg-menu-bg); }
#app .cw-button.primary:hover:not(:disabled) { background:var(--sg-primary-hover); border-color:var(--sg-primary-hover); }
#app :is(.secondary-action,.cw-button:not(.primary),.sg-an-tools button):hover:not(:disabled) { border-color:var(--sg-accent-text); background:var(--sg-info-bg); }
#app :is(.cw-button,.sg-an-tab,.sg-member-button,.primary-action,.secondary-action):disabled { opacity:.55; cursor:not-allowed; }
#app [aria-busy=true] { opacity:.55; cursor:wait; }
#app :is(button,input,select,textarea):focus-visible,
:is(.sg-member-dialog,.sg-kb-dialog) :is(button,input,select,textarea):focus-visible {
  outline:2px solid var(--sg-accent-text); outline-offset:3px;
}
#app :is(.sg-member-filter,.sg-member-form,.cw-form,.cw-filters,.sg-an-tools) :is(input:not([type=checkbox]):not([type=radio]),select,textarea),
:is(.sg-member-dialog,.sg-kb-dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  min-height:var(--sg-control-h); border-radius:var(--sg-radius-control); border-color:var(--sg-border-ui); box-sizing:border-box; max-width:100%;
}
#app :is(.cw-form,.sg-member-form) label { gap:var(--sg-space-2); }
.sg-member-dialog,.sg-kb-dialog { border-radius:var(--sg-radius-dialog); padding:var(--sg-card-padding); border-color:var(--sg-border-ui); box-shadow:var(--sg-shadow-dialog); }
/* Semantic badges. Cleaner/platform colours and completion priority checks are separate. */
#app :is(.cw-status,.md-status,.md-cleaning-state,.property-status-badge) {
  border-radius:var(--sg-radius-badge); padding:4px 9px; font-size:var(--sg-type-small); font-weight:600; line-height:1.5; max-width:100%; white-space:normal; overflow-wrap:anywhere; box-sizing:border-box;
}
#app :is(.cw-status,.md-cleaning-state.scheduled,.property-status-badge.inactive) { background:var(--sg-neutral-bg); color:var(--sg-neutral-text); }
#app :is(.cw-status.completed,.md-cleaning-state.completed,.md-status:not(.departure),.property-status-badge:not(.inactive)) { background:var(--sg-success-bg); color:var(--sg-success-text); }
#app :is(.cw-status.in_progress,.md-cleaning-state.in_progress) { background:var(--sg-progress-bg); color:var(--sg-progress-text); }
#app :is(.cw-status.issue,.cw-status.medium) { background:var(--sg-warning-bg); color:var(--sg-warning-text); }
#app :is(.cw-status.urgent,.cw-status.high) { background:var(--sg-error-bg); color:var(--sg-error-text); }
/* Cleaning completion and follow-up are independent semantic surfaces. */
:is(#app,#cleaningDetailModal) .cw-status.completed,:is(#app,#cleaningDetailModal) .cw-followup[data-tone=done],#app .md-cleaning-state.completed,#cleaningCalendar .cw-calendar-check {background:var(--sg-clean-done-bg);color:var(--sg-clean-done-text)}
:is(#app,#cleaningDetailModal) .cw-followup {display:inline-flex;align-items:center;gap:4px;border-radius:var(--sg-radius-badge);padding:4px 8px;font-size:12px;line-height:1.5;white-space:normal}
:is(#app,#cleaningDetailModal) .cw-followup[data-tone=supplies]{background:var(--sg-clean-supplies-bg);color:var(--sg-clean-supplies-text)}
:is(#app,#cleaningDetailModal) .cw-followup[data-tone=issue]{background:var(--sg-clean-issue-bg);color:var(--sg-clean-issue-text)}
:is(#app,#cleaningDetailModal) .cw-followup[data-tone=urgent]{background:var(--sg-clean-urgent-bg);color:var(--sg-clean-urgent-text)}
:is(#app,#cleaningDetailModal) .cw-followup svg{width:14px;height:14px;flex:none}
#app .cw-task[data-cw-tone=supplies]{border-left-color:var(--sg-clean-supplies-text)}
#app .cw-task[data-cw-tone=issue]{border-left-color:var(--sg-clean-issue-text)}
#app .cw-task[data-cw-tone=urgent]{border-left-color:var(--sg-clean-urgent-text)}
#app .sg-ui-preview-notice {
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; padding:10px 12px; margin:12px 0 16px;
  background:var(--sg-info-bg); color:var(--sg-text-muted); border:1px solid var(--sg-border-ui); border-radius:var(--sg-radius-control); font-size:var(--sg-type-small); line-height:1.6;
}
#app :is(.sg-an-tabs,.ph-tabs) { scrollbar-width:thin; scroll-padding-inline:4px; }
#app :is(.sg-an-tab,.ph-tab) { flex-shrink:0; }
#app .sg-an-tab[aria-selected=true] { background:var(--sg-selection-bg); border-color:var(--sg-control-border); color:var(--sg-selection-text); }
#app .sg-an-tools>span { flex:1 1 180px; min-width:0; overflow-wrap:anywhere; }
#app .sg-an-tools button { flex:0 1 auto; min-width:110px; }
#app .sg-an-insight { background:var(--sg-surface-soft); }
#app .sg-member-panel { margin-top:var(--sg-section-gap); }
#app .sg-member-state { display:inline-flex; max-width:100%; padding:4px 9px; border-radius:var(--sg-radius-badge); background:var(--sg-neutral-bg); color:var(--sg-neutral-text); font-size:var(--sg-type-small); line-height:1.5; }
#app .sg-member-state.sg-state-active { background:var(--sg-success-bg); color:var(--sg-success-text); }
#app :is(.sg-state-pending,.sg-state-suspended) { background:var(--sg-warning-bg); color:var(--sg-warning-text); }
#app :is(.sg-state-blocked,.sg-state-rejected) { background:var(--sg-error-bg); color:var(--sg-error-text); }

@media(max-width:760px) {
  :root { --sg-card-padding:16px; --sg-section-gap:16px; --sg-grid-gap:12px; --sg-icon-hero:40px; --sg-type-page:21px; --sg-type-compact-page:20px; }
  #app .md-metric { padding:var(--sg-space-3); }
  #app .md-cleaning-state { flex-shrink:1; }
}
@media(prefers-reduced-motion:reduce) {
  #app :is(.cw-button,.sg-an-tab,.sg-member-button,.primary-action,.secondary-action) { transition:none; }
}


/* Desktop navigation mirrors the mobile colour/weight selection without changing hit areas. */
@media(min-width:761px){
 #app .sidebar{--sg-nav-muted:#b8c7ce}
 #app .sidebar :is(.sidebar-item,.sidebar-placeholder,.sidebar-settings){
  background:transparent;color:var(--sg-nav-muted);font-weight:500;box-shadow:none;opacity:1;gap:var(--sg-space-3);
  transition:background-color .15s;
 }
 #app .sidebar :is(.sidebar-item,.sidebar-placeholder,.sidebar-settings).active{
  background:transparent;color:var(--sg-primary);font-weight:600;box-shadow:none;
 }
 #app .sidebar :is(.sidebar-item,.sidebar-settings):hover{
  background:rgb(255 255 255 / 6%);box-shadow:none;
 }
 #app .sidebar :is(.sidebar-item,.sidebar-settings):focus-visible{
  background:transparent;outline:2px solid var(--sg-primary);outline-offset:-3px;
 }
 #app .sidebar :is(.sidebar-item,.sidebar-placeholder) .sidebar-icon{color:inherit}
 #app .sidebar :is(.sidebar-icon,.sidebar-settings>span:first-child){
  display:inline-flex;align-items:center;justify-content:center;
  width:var(--sg-icon-nav);flex:0 0 var(--sg-icon-nav);line-height:1;
 }
 #app .sidebar :is(.sidebar-item,.sidebar-placeholder,.sidebar-settings) svg{
  width:var(--sg-icon-nav);height:var(--sg-icon-nav);flex-shrink:0;
 }
}

/* Keep transport separate from the compact guest label, including narrow mobile bars. */
#app #calendarView .month-reservation-bar.sg-has-transport { position:relative; padding-right:25px; }
#calendarView .sg-calendar-transport { position:absolute; right:5px; top:50%; transform:translateY(-50%); width:17px; height:17px; display:flex; pointer-events:none; }
#calendarView .sg-calendar-transport svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
