#booking{width:min(640px,calc(100% - 24px))}
#account:has(.server-auth-form){width:min(480px,calc(100% - 24px))}
#booking .dialog-inner,#account .dialog-inner{padding:36px clamp(20px,5vw,44px)}
#booking h2,#account h2{font-size:clamp(34px,6vw,48px);margin:0 0 22px}
.booking-steps,.portal-nav{display:flex;gap:5px;padding:5px;border-radius:13px;background:#ede3dd}
.booking-steps button,.portal-nav button,.booking-categories button,.booking-week button{border:0;border-radius:9px;min-height:40px;background:transparent;color:#533e37;padding:7px 10px;font-size:13px}
.booking-steps button,.portal-nav button{flex:1}
.booking-steps button[aria-current],.portal-nav button[aria-pressed=true],.booking-categories button[aria-pressed=true]{background:#fffbf7;color:#372722;box-shadow:0 1px 4px #4837291a}
.booking-steps button:disabled,.booking-week button:disabled{opacity:.48;cursor:default}
.booking-stage{margin:24px 0 20px;outline:none}
.booking-stage h3,.portal-conversation h3{font:27px/1.12 Georgia,serif;margin:0 0 14px}
.booking-stage p,.portal-thread p{color:#624f47;font-size:14px;line-height:1.5}
.booking-categories,.booking-week{display:flex;justify-content:space-between;margin-bottom:12px;gap:6px}
.booking-categories{justify-content:flex-start}
.booking-services{display:grid;max-height:min(34dvh,300px);overflow:auto;gap:6px;padding:3px}
.booking-choice{min-height:46px;border:1px solid #ddcdc1;border-radius:10px;background:#fffaf6;color:#342822;padding:11px 12px;text-align:left;transition:background .2s,border-color .2s}
.booking-choice[aria-pressed=true]{background:#edd8cc;border-color:#8e5c49}
.booking-services .booking-choice{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14px}
.booking-services strong{white-space:nowrap;font-size:13px;font-weight:600}
.booking-dates{display:grid;grid-template-columns:repeat(auto-fit,minmax(95px,1fr));gap:8px}
.booking-dates .booking-choice{text-align:center}
.booking-actions{display:flex;justify-content:flex-end;gap:10px}
.booking-actions .portal-action{flex:1}
.portal-action,.portal-secondary{min-height:46px;border-radius:10px;padding:10px 16px;font-weight:600;font-size:14px;transition:background .2s,transform .2s,box-shadow .2s}
.portal-action{color:#fff;background:#594035;border:1px solid transparent}
.portal-action:not(:disabled):hover{background:#744e3d;box-shadow:0 3px 10px #59403532}
.portal-action:not(:disabled):active,.portal-secondary:active{transform:scale(.98)}
.portal-action:disabled{opacity:.51;cursor:default}
.portal-secondary{background:#fffbf7;border:1px solid #d9c7bd;color:#594035}
.server-auth-form .portal-action{width:100%;margin-top:6px}
.booking-summary{display:grid;grid-template-columns:auto 1fr;gap:12px 18px;background:#eee3dc;border-radius:13px;padding:18px;font-size:14px}
.booking-summary dt{color:#624f47}.booking-summary dd{margin:0;font-weight:600}
.portal-content{display:grid;gap:16px;min-width:0}
.portal-conversation,.portal-settings{border:1px solid #dfd1c8;border-radius:14px;padding:16px;background:#fffbf7}
.portal-conversation>button{min-height:36px;padding:6px 10px;margin-bottom:8px}
.portal-thread{max-height:24dvh;min-height:70px;overflow:auto;padding:2px 5px}
.portal-bubble{max-width:89%;padding:8px 13px;border-radius:12px;background:#ece2db;overflow-wrap:anywhere;margin:8px 0}
.portal-bubble.client{margin-left:auto;background:#ead3c6}.portal-bubble p{margin:3px 0;white-space:pre-wrap}
.portal-bubble strong{font-size:12px}.portal-compose textarea{margin-bottom:10px}
.portal-status:empty{display:none}
#booking [hidden],#account [hidden]{display:none!important}
@media(max-width:420px){.booking-steps button,.portal-nav button{padding-inline:5px}.booking-dates{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Cabinet controls and visit card */

.portal-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.portal-danger{min-height:46px;border:1px solid #b68578;border-radius:10px;padding:10px 16px;color:#793a32;background:#fff4f0;font-size:14px;font-weight:600;transition:background .15s,transform .15s}
.portal-danger:not(:disabled):hover{background:#f5ddd5}
.portal-danger:disabled{opacity:.6}
.portal-content button:focus-visible,.portal-content .avatar-picker:focus-within{outline:2px solid #805748;outline-offset:3px}
.settings-confirm{margin-top:14px;padding:12px 14px;border-radius:12px;background:#f8e9e2}
.settings-confirm p{margin:0 0 10px;font-size:14px;line-height:1.5}
.settings-confirm .portal-controls{margin-top:10px}
@media (prefers-reduced-motion:no-preference){.portal-danger:not(:disabled):active{transform:scale(.96)}}
@media (max-width:520px){.portal-controls>button{flex:1 1 auto}}

/* Consistent action affordances and mobile section navigation. */
.review-tools .review-show-all,.review-card .review-more,.review-card .review-delete{
  display:inline-flex;align-items:center;min-height:44px;padding:9px 14px;border:1px solid #b78e80;border-radius:10px;
  background:#fffbf7;color:#594035;text-decoration:none;font-size:14px;font-weight:600;
}
.review-card .review-delete{color:#793a32;background:#fff4f0}
.review-tools .review-show-all:hover,.review-card button:hover{background:#f0ddd2}
.review-confirmation{color:#594035;line-height:1.45}
.review-confirmation:empty{display:none}
.portal-message-meta{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.portal-message-meta time{color:#624f47;font-size:12px;font-variant-numeric:tabular-nums}
#services,#reviews,#lookbook{scroll-margin-top:115px}
@media(max-width:700px){
  :root{
    --mobile-gutter:clamp(18px,5vw,32px);
    --mobile-header-top:max(8px,env(safe-area-inset-top));
    --mobile-header-height:54px;
  }
  .header{
    display:flex;
    gap:clamp(2px,1vw,10px);
    top:var(--mobile-header-top);
    inset-inline:0;
    margin-inline:auto;
    transform:none;
    width:calc(100% - max(12px,env(safe-area-inset-left)) - max(12px,env(safe-area-inset-right)));
    min-height:var(--mobile-header-height);
    padding:4px clamp(6px,2vw,14px);
    border-radius:17px;
    background:#fbf7f2;
    box-shadow:0 2px 14px #4c2d2410;
  }
  .header > .brand{
    display:grid;
    align-items:center;
    min-height:44px;
    padding-inline:3px;
    margin:0;
    font-size:clamp(23px,6.6vw,32px);
  }
  .header > [data-book]{display:none}
  .header nav{
    display:flex;
    flex:1;
    justify-content:center;
    gap:clamp(0px,2vw - 6px,12px);
    margin:0;
  }
  .header nav a,.header #account-open{
    min-width:44px;
    padding-inline:clamp(4px,1.55vw,12px);
    font-size:clamp(12px,3.25vw,14px);
  }
  .header #account-open{
    font-weight:600;
    background:#eee4dc;
    border-radius:12px;
  }
  .header nav a::after,.header #account-open::after{inset-inline:8px;bottom:7px}
  .hero-copy{
    align-self:stretch;
    padding:calc(var(--mobile-header-top) + var(--mobile-header-height) + 30px) var(--mobile-gutter) 20px;
  }
  .hero-copy .hero-kicker{margin-bottom:7px}
  .hero-copy h1{font-size:clamp(70px,19vw,114px);margin-bottom:15px}
  .hero-cta{min-height:48px;margin:0;padding:12px 20px}
  .gallery{padding:0 var(--mobile-gutter) 22px}
  .frame{
    height:clamp(278px,98vw,490px);
    border-radius:clamp(62px,23vw,134px) 12px 12px clamp(62px,23vw,134px) / 50% 12px 12px 50%;
  }
  .gallery-bar{padding:12px 0 0;gap:8px}
  .gallery-progress{max-width:72px}
  .gallery-previous{min-height:44px;padding-inline:12px}
  .hero .next-work{min-height:48px}
  .hero .next-work span:first-child{padding-inline:12px}
  #services,#reviews,#lookbook,#address{
    scroll-margin-top:calc(var(--mobile-header-top) + var(--mobile-header-height) + 12px);
  }
  .section{padding:58px var(--mobile-gutter)}
  .section h2{font-size:clamp(42px,11vw,64px)}
  .section-head{margin-bottom:22px}
  .service-list button{padding-block:18px;gap:12px}
  .service-list button > span:first-child{min-width:0;overflow-wrap:anywhere}
  .service-list button > span:last-child{font-size:14px}
  .lookbook-grid{margin-top:20px;padding-bottom:0}
  .lookbook-grid .look:nth-child(even){transform:none}
  .lookbook-grid .look{border-radius:8px}
  footer{padding:28px var(--mobile-gutter) max(28px,env(safe-area-inset-bottom));gap:16px}
  footer nav{column-gap:18px;row-gap:0}
  footer nav a,footer nav .plain{display:inline-flex;align-items:center;min-height:44px}
  footer > .button{justify-self:start}
  #account input:not([type=file]),#account textarea,#booking input,.review-dialog textarea{font-size:16px}
}
@media(max-width:350px){
  .header{gap:1px}
  .header > .brand{font-size:22px}
  .header nav a{padding-inline:3px}
  .header #account-open{padding-inline:4px;font-size:11px}
  .gallery-bar{gap:5px}
  .gallery-progress{max-width:24px}
}

.booking-choice:disabled{cursor:default;opacity:.46;transform:none}


#account:has(.portal-content) {
  width: min(696px,calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  overscroll-behavior: contain;
  background: #f8f3ee;
}
#account:has(.portal-content) .dialog-inner { padding: clamp(19px,5vw,36px); }
#account:has(.portal-content) h2 { font-size: clamp(29px,6vw,46px); margin-bottom: 16px; padding-inline-end: 42px; }
.portal-content .client-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  border-bottom: 1px solid #dfcfc5;
  border-radius: 0;
  padding: 0 0 17px;
  background: transparent;
}
.client-profile .profile-avatar { flex: 0 0 52px; width: 52px; height: 52px; font-size: 24px; }
.portal-content .client-profile-name { min-width: 0; margin: 0; line-height: 1.12; font-size: clamp(21px,4vw,26px); }
.portal-nav {
  --tab-index: 0;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  position: relative;
  isolation: isolate;
}
.portal-nav::before {
  content: "";
  position: absolute;
  inset-block: 5px;
  inset-inline-start: 5px;
  width: calc((100% - 20px) / 3);
  border-radius: 9px;
  background: #fffbf7;
  box-shadow: 0 2px 9px #4a31251a;
  transform: translateX(calc(var(--tab-index) * (100% + 5px)));
  transition: transform .32s cubic-bezier(.2,.75,.25,1);
}
.portal-nav button[aria-pressed=true], .portal-nav button {
  position: relative;
  background: transparent;
  box-shadow: none;
  min-width: 0;
  min-height: 44px;
  white-space: nowrap;
}
.portal-nav button[aria-pressed=true] { font-weight: 600; }

.portal-content .client-visit {
  background: transparent;
  margin: 0;
  border: 0;
  padding: 0;
  min-width: 0;
}
.visit-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 15px;
  margin: 0 0 10px;
}
.visit-heading h3 { margin: 0; }
.visit-viewport { overflow: clip; overflow-clip-margin: 4px; touch-action: pan-y pinch-zoom; }
.portal-visit-item {
  box-sizing: border-box;
  min-width: 0;
  background: #fffbf7;
  border: 1px solid #e0cec1;
  border-radius: 16px;
  padding: clamp(14px,3vw,22px);
}
.visit-details { display: grid; gap: 6px; }
.visit-date-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; }
.visit-date, .visit-price { margin: 0; color: #61493e; font-size: 14px; }
.visit-date::first-letter { text-transform: uppercase; }
.visit-badge { display: inline-block; padding: 5px 9px; border-radius: 7px; background: #eee1d8; color: #583e32; font-size: 12px; font-weight: 600; }
.visit-time { margin: 8px 0 0; width: fit-content; font: clamp(31px,7vw,43px)/1 Georgia,serif; font-variant-numeric: tabular-nums; white-space: nowrap; color: #3d2b26; }
.visit-details h4 { margin: 4px 0 0; font: clamp(20px,4.5vw,27px)/1.18 Georgia,serif; overflow-wrap: anywhere; }
.visit-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid #efdfd5; }
.visit-actions > button { flex: 0 1 auto; }
.visit-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 10px; }
.visit-pagination button:first-child { justify-self: start; }
.visit-pagination button:last-child { justify-self: end; }
.visit-pagination button:disabled { opacity: .45; cursor: default; background: transparent; }
.visit-position { color: #654f46; font-size: 13px; font-variant-numeric: tabular-nums; }

.portal-content .portal-settings {
  --settings-line: #e0cfc3;
  --settings-muted: #614a42;
  background: transparent;
  border: 0;
  padding: 8px 0 0;
  min-width: 0;
}
.portal-settings h3 { margin: 0; font: 30px/1.12 Georgia,serif; letter-spacing: -.025em; }
.settings-menu > h3 { margin-bottom: 16px; }
.settings-menu-list { display: grid; border-radius: 13px; background: #fffaf6; }
.settings-menu-row {
  display: grid;
  justify-items: start;
  gap: 4px;
  width: 100%;
  min-height: 66px;
  padding: 13px 17px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #342521;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s, color .16s;
}
.settings-menu-row:first-child { border-radius: 13px 13px 0 0; }
.settings-menu-row + .settings-menu-row { border-top: 1px solid #ecded4; border-radius: 0 0 13px 13px; }
.settings-menu-row strong { font: 600 15px/1.35 Arial,sans-serif; }
.settings-menu-row span, .settings-notice { color: var(--settings-muted); font-size: 13px; line-height: 1.4; }
.settings-notice { margin: 12px 0 0; }
.settings-notice:empty { display: none; }
.settings-menu-row:is(:focus-visible,:active) { background: #efe1d8; }
@media (hover: hover) { .settings-menu-row:hover { background: #f2e6de; } }
.settings-screen-head { display: grid; justify-items: start; gap: 3px; margin-bottom: 17px; }
.settings-back {
  min-height: 44px;
  padding: 0 8px;
  margin-inline-start: -8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #704245;
  font: 600 14px/1.25 Arial,sans-serif;
  cursor: pointer;
}
.settings-back:hover { background: #ede0d7; }
.settings-back:disabled { opacity: .48; cursor: default; }
.settings-form { display: grid; gap: 15px; }
.settings-form .settings-name-row, .settings-photo-row {
  display: grid;
  align-items: start;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
.settings-label { color: var(--settings-muted); font-size: 14px; }
.settings-form .settings-name-row input {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  margin: 0;
  border: 1px solid #d5beb0;
  border-radius: 8px;
  background: #fffaf6;
  transition: border-color .18s, box-shadow .2s;
}
.settings-form .settings-name-row input:focus-visible {
  border-color: #835554;
  box-shadow: 0 0 0 3px #ab767128;
  outline: none;
}
.settings-photo-tools { display: grid; justify-items: start; gap: 10px; min-width: 0; }
.settings-photo, .settings-photo-options, .settings-save { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.settings-photo .avatar-picker {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.settings-photo .avatar-picker:has(input:disabled), .settings-quiet:disabled { opacity: .55; cursor: default; }
.settings-quiet {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: 600 14px/1.25 Arial,sans-serif;
  color: var(--settings-muted);
  cursor: pointer;
  transition: color .16s, background-color .16s;
}
.settings-quiet[aria-expanded=true], .settings-quiet:not(:disabled):hover { background: #ebddd4; }
.settings-delete { color: #843e37; }
.settings-photo-options {
  padding-inline-start: 11px;
  border-inline-start: 2px solid #d5bbac;
}
.settings-avatar { width: 54px; height: 54px; }
.settings-form .portal-status { margin: 0; color: var(--settings-muted); font-size: 13px; }
.settings-save { justify-content: flex-start; }
.settings-save .portal-action { min-width: 105px; background: #5b3639; }
.settings-save .portal-action:enabled:hover { background: #724548; }
.settings-discard { padding: 12px; border-radius: 10px; background: #efe1d8; }
.settings-discard p { margin: 0 0 5px; font-size: 14px; }
.settings-discard button { margin-inline-end: 5px; }
.portal-settings .server-auth-actions { padding: 0; margin: 0; }
.portal-settings .server-auth-actions > p { margin: 10px 0 0; }
.portal-settings .server-auth-actions > p:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .settings-avatar img, .settings-photo-options, .settings-discard { animation: settings-appear .23s cubic-bezier(.2,.75,.25,1) both; }
  @keyframes settings-appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 500px) {
  .portal-settings .server-auth-actions .portal-controls > button { flex: 0 1 auto; }
}
@media(max-width: 520px) {
  .visit-actions > button { flex: 1 1 auto; }
  .portal-nav button { font-size: 12px; }
}
@media(prefers-reduced-motion: reduce) {
  .portal-nav::before { transition: none; }
}

.avatar-editor-slot { min-width: 0; margin-bottom: 10px; }
.avatar-editor-slot:empty { display: none; margin: 0; }
.avatar-editor {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(14px,3vw,22px);
  border-radius: 14px;
  background: #eee1d8;
}
.avatar-editor h4 { margin: 0; font: 24px/1.2 Georgia,serif; }
.avatar-editor p { margin: 0; text-align: center; font-size: 13px; line-height: 1.4; color: #654f46; }
.avatar-editor canvas {
  display: block;
  width: min(100%,206px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fffbf7;
  touch-action: none;
  cursor: grab;
}
.avatar-editor canvas:active { cursor: grabbing; }
.avatar-editor canvas:focus-visible { outline: 2px solid #805748; outline-offset: 4px; }
.avatar-editor label {
  width: min(100%, 250px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
}
.avatar-editor output { min-width: 4ch; text-align: end; font-variant-numeric: tabular-nums; }
#account .avatar-editor input[type=range] {
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #70473d;
}
.avatar-editor-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@media(prefers-reduced-motion: no-preference) {
  .avatar-editor { animation: avatar-editor-enter .26s cubic-bezier(.2,.75,.25,1) both; }
  @keyframes avatar-editor-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

.booking-day-note { display:block; margin-top:3px; font-size:11px; line-height:1.2; }
.booking-dates .booking-choice:disabled { opacity:1; background:#eee5df; color:#6e5b52; }

.portal-telegram {
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:6px 12px;
  padding-top:12px;
  border-top:1px solid #dfcfc5;
}
.portal-telegram p { margin:0; color:#654f46; font-size:13px; }
.portal-telegram a { display:inline-flex; align-items:center; text-decoration:none; }
