/* A fixed mobile date strip and navigation; desktop retains its existing layout. */
#mobile-bottom-nav,#mobile-datebar{display:none}
/* Stable renter colours use only identities already returned by the authorized API. */
.tenant-tone-0{--tenant-bg:#c4ddc0;--tenant-ink:#344331;--tenant-edge:#a4b79e}
.tenant-tone-1{--tenant-bg:#c2d9eb;--tenant-ink:#334552;--tenant-edge:#a7b7c4}
.tenant-tone-2{--tenant-bg:#e8c5bb;--tenant-ink:#573d39;--tenant-edge:#c6aba6}
.tenant-tone-3{--tenant-bg:#d5c7e8;--tenant-ink:#493f59;--tenant-edge:#b6abc8}
.tenant-tone-4{--tenant-bg:#e7d59f;--tenant-ink:#51452d;--tenant-edge:#c2b08c}
.tenant-tone-5{--tenant-bg:#b8ddd2;--tenant-ink:#304c46;--tenant-edge:#9ebcb5}
.tenant-tone-6{--tenant-bg:#e5c2d6;--tenant-ink:#553f4e;--tenant-edge:#bea7b6}
.tenant-tone-7{--tenant-bg:#d1dcae;--tenant-ink:#46502f;--tenant-edge:#b1ba94}
.tenant-tone-8{--tenant-bg:#f0cfad;--tenant-ink:#60422c;--tenant-edge:#cba886}
.tenant-tone-9{--tenant-bg:#ddc2de;--tenant-ink:#563c58;--tenant-edge:#bb9dbd}
.tenant-tone-10{--tenant-bg:#edbec3;--tenant-ink:#613740;--tenant-edge:#cfa0a7}
.tenant-tone-11{--tenant-bg:#c9cef0;--tenant-ink:#3c4364;--tenant-edge:#b0b6d6}
#calendar .calcell,#calendar .calcol{border-right-color:transparent}
#calendar .calcell{border-bottom-color:#cec5b53d}
#calendar .calcell.occupied[class*="tenant-tone-"]{background:var(--tenant-bg);color:var(--tenant-ink);border-bottom-color:var(--tenant-bg)}
#calendar .calcell.occupied[class*="tenant-tone-"] span{color:var(--tenant-ink)}
#calendar .calcell.occupied[class*="tenant-tone-"].session-start{border-top:2px solid var(--tenant-edge)}
#calendar .calcell.occupied[class*="tenant-tone-"]:hover{filter:brightness(.97)}
.tenant-colour-picker{margin-top:20px;padding-top:16px;border-top:1px solid #ded0b8}
.tenant-colour-picker h3{font:600 15px/1.4 -apple-system,BlinkMacSystemFont,Arial,sans-serif;margin-bottom:12px}
.tenant-colour-options{display:flex;gap:8px;flex-wrap:wrap}
.tenant-colour-options button{appearance:none;min-width:44px;min-height:44px;border:2px solid transparent;border-radius:12px;padding:8px;background:var(--tenant-bg,#eee7da);color:var(--tenant-bg,#eee7da);font:600 16px/1 Arial,sans-serif}
.tenant-colour-options .tenant-auto{color:#6b5838;font-size:13px}
.tenant-colour-options button[aria-pressed=true]{border-color:#725c36;color:var(--tenant-ink,#4d3c22);box-shadow:0 0 0 2px #faf7ef inset}
#mobile-more-dialog{max-width:540px;width:calc(100% - 24px);padding:20px;border:1px solid #d7c9af;border-radius:18px;background:#faf8f3;color:#393123;box-shadow:0 10px 30px #211d1520}
.mobile-more-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:16px}
.mobile-more-head h2{margin:0}
.mobile-more-grid{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.mobile-more-grid button{font:inherit;min-height:56px;white-space:normal;border:0;border-radius:0;background:transparent;color:#393123;padding:12px;text-align:left}
#mobile-more-dialog .mobile-more-grid button:hover{background:#e9e0cf}
#mobile-more-dialog .close{background:transparent;color:#393123;border:0}
@media(max-width:767px){
 body.mobile-nav-ready{--mobile-nav-height:calc(68px + env(safe-area-inset-bottom));--mobile-date-height:124px}
 body.mobile-nav-ready main{padding-bottom:calc(var(--mobile-nav-height) + 24px)}
 body.mobile-nav-ready #main-nav{display:none!important}
 body.mobile-nav-ready>header{height:56px!important;min-height:56px;max-height:56px;padding:0 12px!important;position:relative;z-index:30}
 body.mobile-nav-ready>header .brandlogo{height:48px;width:76px}
 body.mobile-nav-ready>header .brandcaption{display:none}
 #mobile-bottom-nav:not([hidden]){position:fixed;inset:auto 0 var(--mobile-viewport-bottom,0px);z-index:35;height:var(--mobile-nav-height);padding:6px 6px calc(6px + env(safe-area-inset-bottom));box-sizing:border-box;display:flex;justify-content:space-around;gap:2px;background:#faf7ef;border-top:1px solid #ded0b8;box-shadow:0 -3px 16px #3124130b}
 #mobile-bottom-nav button{appearance:none;flex:1;min-width:0;min-height:50px;border:0;border-radius:12px;background:transparent;color:#817565;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:4px 2px;font:11px/1.2 -apple-system,BlinkMacSystemFont,Arial,sans-serif}
 #mobile-bottom-nav button[aria-pressed=true]{background:#eee2c9;color:#4c391b}
 #mobile-bottom-nav svg{width:23px;height:23px;flex-shrink:0}
 #mobile-bottom-nav button span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.mobile-calendar-active{overflow:hidden}
 body.mobile-calendar-active main{max-width:none;margin:0;padding:0}
 body.mobile-calendar-active .account-top,body.mobile-calendar-active>.demo,body.mobile-calendar-active>footer,body.mobile-calendar-active #logout{display:none!important}
 body.mobile-calendar-active #calendar-panel{height:calc(100vh - 56px - var(--mobile-nav-height) - var(--mobile-date-height));height:calc(100dvh - 56px - var(--mobile-nav-height) - var(--mobile-date-height));min-height:0;display:flex;flex-direction:column;padding:0!important;margin:0!important;border:0;border-radius:0;box-sizing:border-box}
 body.mobile-calendar-active #calendar-panel>h2,body.mobile-calendar-active #calendar-panel>p,body.mobile-calendar-active #calendar-panel>.callegend,body.mobile-calendar-active #block-time-button{display:none!important}
 body.mobile-calendar-active #calendar-branches{flex:none;padding:0 10px}
 body.mobile-calendar-active #calendar-branches .branch-tabs{gap:6px;margin:6px 0}
 body.mobile-calendar-active #calendar-branches button{min-height:36px;padding:5px 8px;font-size:12px}
 body.mobile-calendar-active #calendar-branches small{display:none}
 body.mobile-calendar-active .caltoolbar{flex:none;margin:0;padding:4px 10px 6px;min-height:42px;border-bottom:1px solid #ddcfb4}
 body.mobile-calendar-active .calviews{display:flex;flex-wrap:nowrap;width:100%;gap:6px}
 body.mobile-calendar-active .calviews button{min-height:34px;padding:6px 12px;border-radius:8px}
 body.mobile-calendar-active .calviews select{min-height:34px;min-width:0;flex:1;width:auto;max-width:200px;font-size:14px;padding:4px 8px}
 body.mobile-calendar-active #calendar-panel .calscroll{flex:1;min-height:0;height:auto!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;border-width:0;scroll-padding-top:58px}
 body.mobile-calendar-active #calendar-panel #calendar .calcol,body.mobile-calendar-active #calendar-panel #calendar .calcorner{position:sticky!important;top:0!important;z-index:5;min-height:58px;background:#f1eadc;border-bottom:1px solid #c8b58c}
 body.mobile-calendar-active #calendar-panel #calendar .calcorner{left:0;z-index:6}
 body.mobile-calendar-active .calhour{z-index:3}
 body.mobile-calendar-active .back-to-top{display:none}
 body.mobile-nav-ready:not(.mobile-calendar-active) .back-to-top{bottom:calc(var(--mobile-nav-height) + 16px)}
 #mobile-datebar:not([hidden]){position:fixed;left:0;right:0;bottom:calc(var(--mobile-nav-height) + var(--mobile-viewport-bottom,0px));z-index:34;display:flex;flex-direction:column;gap:8px;height:var(--mobile-date-height);padding:8px;box-sizing:border-box;background:#f7f2e8;border-top:1px solid #d8c7a5}
 #mobile-datebar .calnav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 72px;flex:none;gap:6px;width:100%;margin:0;height:44px}
 #mobile-datebar .calnav button,#mobile-datebar .calnav input{height:44px;min-height:44px;width:100%;min-width:0;margin:0;padding:8px;box-sizing:border-box;font-size:16px;border:1px solid #d2bd92;border-radius:10px;background:#faf7ef;color:#4d3d22}
 #mobile-datebar .calnav button{font-weight:600}
 #mobile-datebar #calendar-today{font-size:13px}
 #mobile-datebar input[type=date]{text-align:center}
 #mobile-week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;flex:none;height:56px;padding:3px;box-sizing:border-box;background:#29271f;border-radius:12px;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none}
 #mobile-week-strip button{appearance:none;min-height:50px;min-width:0;border:0;border-radius:9px;padding:2px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:transparent;color:#f5eddd;font:14px/1.1 -apple-system,BlinkMacSystemFont,Arial,sans-serif;touch-action:pan-y pinch-zoom}
 #mobile-week-strip button strong{font-size:19px;font-weight:500}
 #mobile-week-strip button.mobile-weekend{color:#d6b178}
 #mobile-week-strip button[aria-pressed=true]{background:#cfb579;color:#282116}
 #mobile-week-strip button[aria-current=date]:not([aria-pressed=true]){box-shadow:inset 0 -2px #cfb579}
 #mobile-more-dialog{margin:auto 12px calc(var(--mobile-nav-height) + 12px);max-height:calc(90dvh - var(--mobile-nav-height));overflow:auto}
}
/* Chat lives in the account menu on mobile and desktop. */
#main-nav [data-panel="messages-panel"]{display:none!important}
#profile-menu-button.has-chat-unread{position:relative}
#profile-menu-button.has-chat-unread::after{content:"";position:absolute;right:1px;top:1px;width:9px;height:9px;border-radius:50%;background:#a76e52;border:2px solid #f4f0e7}

/* One label per session; empty cells stay clickable and retain aria-labels. */
#calendar .calcell:not(.occupied) .cellprice,
#calendar .calcell.occupied:not(.session-start) > strong,
#calendar .calcell.occupied .continuation{display:none!important}
#calendar .calstaffnote{display:block;white-space:normal;overflow:hidden;text-overflow:ellipsis;font-size:11px;line-height:1.25;max-height:2.5em;color:inherit;opacity:.9}
#calendar .calstaffnote.empty-note{opacity:.6;font-size:10px}
.staff-session-note{margin-top:20px;padding-top:16px;border-top:1px solid #d9d1c1}.staff-session-note textarea{width:100%;box-sizing:border-box;resize:vertical}.staff-session-note small{display:block;color:#776f60;line-height:1.4}
@media(max-width:767px){
 #mobile-more-dialog{position:fixed;inset:auto 12px calc(var(--mobile-nav-height) + 10px) auto;margin:0!important;width:min(248px,58vw);max-width:calc(100vw - 24px);max-height:55dvh;padding:10px;box-sizing:border-box;border-radius:16px;overflow:auto}
 #mobile-more-dialog::backdrop{background:rgba(25,22,16,.14);backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
 #mobile-more-dialog .mobile-more-head{margin:0 0 4px;gap:8px;padding-left:8px}
 #mobile-more-dialog .mobile-more-head h2{font-size:16px}
 #mobile-more-dialog .mobile-more-head .close{width:44px;height:44px;min-height:44px;padding:4px;margin:0}
 #mobile-more-dialog .mobile-more-grid{display:flex;flex-direction:column;gap:0}
 #mobile-more-dialog .mobile-more-grid button{width:100%;min-height:46px;padding:12px 8px;font-size:13px;line-height:1.3;border:0;border-radius:0;background:transparent;margin:0}
 #mobile-more-dialog .mobile-more-grid button:last-child{border-bottom:0}
}

/* Current Moscow time, anchored to the actual half-hour row geometry. */
#calendar{position:relative}
#calendar .calendar-now{position:absolute;height:1px;background:#c34444;z-index:4;pointer-events:none;border:0}
#calendar .calendar-now span{position:absolute;left:0;top:0;transform:translateY(-50%);padding:2px 4px;border-radius:4px;background:#c34444;color:#fff;font:600 10px/1.2 -apple-system,BlinkMacSystemFont,Arial,sans-serif;white-space:nowrap}


/* Native buttons and contact links in the session card share the studio palette. */
#session-dialog-body button{appearance:none;-webkit-appearance:none;background:#c5aa70;color:#292319;border:1px solid #c5aa70;border-radius:10px;min-height:44px;padding:12px 16px;font:inherit;cursor:pointer}
#session-dialog-body button:hover{background:#bda065}
#session-dialog-body button:disabled{opacity:.55;cursor:wait}
#session-dialog-body a{color:#795e27;text-decoration:underline;text-underline-offset:3px}
#session-dialog-body a[href^="https://t.me/"]{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;box-sizing:border-box;margin:6px 0;border:1px solid #cbb98e;border-radius:10px;background:#f5eedf;color:#69532a;text-decoration:none}
#calendar .calcol .calendar-room-photo{display:block;width:32px;height:32px;min-width:32px;object-fit:cover;border-radius:50%;border:1px solid #cbb98e;margin:0 auto 4px;box-sizing:border-box}
#calendar.branch-day .calcol{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding-top:6px;padding-bottom:6px}
@media(max-width:767px){body.mobile-calendar-active #calendar-panel #calendar.branch-day .calcol,body.mobile-calendar-active #calendar-panel #calendar.branch-day .calcorner{min-height:76px}body.mobile-calendar-active #calendar-panel .calscroll{scroll-padding-top:76px}}



/* Hour boundaries within an existing session, without splitting its coloured block. */
#calendar .calcell.occupied.session-hour-divider:not(.session-start){box-shadow:inset 0 1px 0 rgba(55,45,30,.12)}
#calendar .calcell.blocked.session-hour-divider:not(.session-start){box-shadow:inset 0 1px 0 rgba(255,255,255,.16)}


#mobile-more-title:focus{outline:none}
