.kh-pwa-shell {
    --kh-app-dock:calc(72px + env(safe-area-inset-bottom,0px));
    --kh-side-inset:clamp(10px,3.5vw,24px);
}
.kh-pwa-shell .design-content {
    min-inline-size:0;
    padding-inline:calc(var(--kh-side-inset) + env(safe-area-inset-right,0px)) calc(var(--kh-side-inset) + env(safe-area-inset-left,0px));
}
.kh-pwa-shell :is(.kh-app,.kh-detail,.kh-panel,.kh-field,.kh-inbox-desk,.kh-chat-pane,.kh-thread-list){min-inline-size:0}
.kh-pwa-shell :is(.kh-app,.kh-detail) :is(h1,h2,h3,p,dd,.kh-vehicle-tag,.request-details){overflow-wrap:anywhere}
.kh-pwa-shell :is(.kh-app,.kh-detail) :is(a.kh-btn,button.kh-btn,.kh-file){min-block-size:44px}
.kh-pwa-shell :is(.kh-app,.kh-detail) :is(input:not([type=checkbox]):not([type=hidden]),select,textarea){font-size:16px;max-inline-size:100%;scroll-margin-block:18px}
.kh-pwa-shell :is(.kh-app,.kh-detail) :is(input,select,textarea,button,summary):focus-visible{outline:2px solid #14765e;outline-offset:2px}
.kh-pwa-shell .kh-pwa-search .kh-field{margin-bottom:0}
.kh-pwa-shell .kh-pwa-search input{width:100%;min-width:0;text-overflow:ellipsis}
.kh-pwa-shell .kh-chat-pane .kh-bubble img{max-inline-size:min(100%,240px);height:auto;object-fit:contain}
.kh-pwa-shell .kh-event-link{min-inline-size:44px;min-block-size:44px;box-sizing:border-box}
.kh-pwa-shell :is(.kh-specs,.kh-account-grid,.kh-form-layout,.kh-car-filters .kh-fields,#kh-request-form .kh-fields){min-inline-size:0}
.kh-pwa-shell .kh-chat-head{gap:8px;flex-wrap:wrap}
.kh-pwa-shell .kh-compose textarea{min-inline-size:0;max-inline-size:100%;flex:1 1 150px;min-block-size:44px}
.kh-pwa-shell .kh-file{display:inline-flex;align-items:center}
.kh-pwa-shell .kh-pwa-menu nav{max-block-size:min(58vh,420px);max-block-size:min(58dvh,420px)}
.kh-pwa-shell .kh-pwa-toolbar{gap:8px}
.kh-pwa-shell .kh-category-nav .kh-category-link{min-width:0}
.kh-pwa-shell .kh-pwa-dock a{font-size:clamp(10px,3.2vw,13px);overflow-wrap:anywhere}
.kh-pwa-shell.kh-keyboard-open .kh-pwa-dock{display:none}
.kh-pwa-shell.kh-keyboard-open body{padding-block-end:env(safe-area-inset-bottom,0px)}
.kh-pwa-shell.kh-keyboard-open .kh-event-toast{bottom:calc(10px + env(safe-area-inset-bottom,0px))}
.kh-pwa-shell .kh-event-toast{max-inline-size:min(420px,calc(100vw - 24px));flex-wrap:wrap}

@media (min-width:740px) {
    .kh-pwa-shell .design-requests{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px) {
    .kh-pwa-shell .kh-section-title{flex-wrap:wrap;gap:8px;margin:13px 0 15px}
    .kh-pwa-shell .kh-panel{padding:clamp(10px,3.5vw,16px)}
    .kh-pwa-shell .kh-chat-pane{padding:10px}
    .kh-pwa-shell .kh-compose{gap:6px;flex-wrap:wrap}
    .kh-pwa-shell .kh-compose textarea{flex-basis:100%}
    .kh-pwa-shell .kh-compose :is(.kh-btn,.kh-file){min-block-size:44px}
    .kh-pwa-shell .kh-inbox-desk .kh-messages{max-block-size:56vh;max-block-size:56dvh}
    .kh-pwa-shell :is(.kh-account-grid,.kh-form-layout,.kh-specs){grid-template-columns:minmax(0,1fr)}
}
@media (max-width:350px) {
    .kh-pwa-shell :is(.kh-car-filters .kh-fields,#kh-request-form .kh-fields){grid-template-columns:minmax(0,1fr)}
    .kh-pwa-shell .kh-pwa-brand{font-size:17px;gap:5px}
    .kh-pwa-shell .kh-pwa-brand img{width:32px;height:32px}
}
@media (orientation:landscape) and (max-height:480px) {
    .kh-pwa-shell {--kh-app-dock:calc(56px + env(safe-area-inset-bottom,0px))}
    .kh-pwa-shell .kh-pwa-dock a{min-block-size:44px;flex-direction:row}
    .kh-pwa-shell .kh-pwa-tab-icon{width:27px;height:26px}
    .kh-carousel--app .kh-slide{min-block-size:250px}
}
@media(prefers-reduced-motion:reduce) {
    .kh-pwa-shell{scroll-behavior:auto}
}

/* Mobile conversation is a viewport-sized workspace; only messages scroll. */
@media(max-width:760px){
 .kh-pwa-shell:has(.kh-pwa-thread){--kh-app-dock:0px}
 .kh-pwa-shell:has(.kh-pwa-thread) .kh-pwa-dock{display:none}
 .kh-pwa-shell:has(.kh-pwa-thread) body{padding-block-end:0}
 .kh-pwa-shell:has(.kh-pwa-thread) .design-content{padding-bottom:0}
 .kh-pwa-shell:has(.kh-pwa-thread) .kh-app{height:calc(var(--kh-visual-height,100dvh) - env(safe-area-inset-top,0px) - 10px);display:flex;flex-direction:column;min-height:260px}
 .kh-pwa-shell:has(.kh-pwa-thread) .kh-test{display:none}
 .kh-pwa-shell .kh-pwa-thread{display:flex;flex:1;min-height:0;border-radius:18px 18px 0 0}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-pane{flex:1;min-height:0;gap:0;padding:8px}
 .kh-pwa-shell .kh-pwa-thread .kh-pwa-back{display:none}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-head{flex:0 0 auto;font-size:12px}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-head>div:first-child{display:none}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-head-actions{width:100%;justify-content:space-between;gap:4px}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-head-actions .kh-btn{font-size:11px;padding:6px 9px;min-height:44px}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-safety{flex:0 0 auto;font-size:11px;margin:4px 0}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-safety summary{padding:6px 10px;min-height:36px}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-history{display:flex;flex-direction:column;flex:1;min-height:80px;overflow:hidden}
 .kh-pwa-shell .kh-pwa-thread #kh-messages{flex:1;min-height:0;max-height:none;overscroll-behavior-y:contain;padding:12px 9px}
 .kh-pwa-shell .kh-pwa-thread .kh-chat-offline{flex:none;font-size:10px;margin:3px 0}
 .kh-pwa-shell .kh-pwa-thread .kh-report{margin-top:0;flex:none;font-size:11px}
 .kh-pwa-shell .kh-pwa-thread .kh-report summary{min-height:32px}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-form{position:sticky;bottom:0;z-index:5;display:flex;align-items:flex-end;flex-wrap:nowrap;gap:6px;flex:none;margin:0;padding:8px 0 calc(5px + env(safe-area-inset-bottom,0px));background:#fff}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-form textarea{order:1;flex:1 1 0;min-width:0;min-height:48px;height:48px;max-height:104px;resize:none;overflow-y:auto;margin:0;border-radius:17px;padding:11px 12px;line-height:24px;font-size:16px}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-form .kh-compose-attachment{order:0;flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;border:1px solid #d5e2d7;background:#f3f7f1;border-radius:50%;overflow:hidden}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-form .kh-compose-send{order:2;flex:0 0 48px;width:48px;height:48px;padding:0;border-radius:50%;background:#006b58}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-form .kh-compose-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .kh-pwa-shell .kh-pwa-thread #kh-file-name{max-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-error:empty{display:none}
}
.kh-compose-attachment:focus-within{outline:2px solid #006b58;outline-offset:3px}
@media(max-width:760px){
 .kh-pwa-shell .kh-app:has(>.kh-context-bar) .kh-back-link,
 .kh-pwa-shell .kh-app:has(>.kh-context-bar) .kh-screen-heading .kh-screen-symbol{display:none}
 .kh-pwa-shell .kh-app:has(>.kh-context-bar) .kh-screen-heading{gap:8px;margin:4px 0 16px}
 .kh-pwa-shell .kh-app:has(>.kh-context-bar) .kh-screen-heading h1{font-size:20px}
 .kh-pwa-shell .kh-checkout-shell .kh-pay-continue{min-height:52px;box-shadow:0 5px 14px #006b5824}
}
@media(max-width:739px){
 .kh-user-finance{overflow:visible!important;margin-block:16px}
 .kh-user-finance table{display:block;width:100%;min-width:0!important}
 .kh-user-finance thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .kh-user-finance tbody{display:grid;gap:14px}
 .kh-user-finance tr{display:grid;min-width:0;padding:8px 16px;border:1px solid #e6ece9;border-radius:18px;background:#fff;box-shadow:0 4px 20px rgba(17,42,36,.045)}
 .kh-user-finance td{display:block;min-width:0;padding:12px 0;border-bottom:1px solid #edf1ee;overflow-wrap:anywhere}
 .kh-user-finance td:last-child{border-bottom:0}
 .kh-user-finance td[data-label]::before{content:attr(data-label);display:block;margin-bottom:5px;font-size:11px;color:#52695e;font-weight:600}
 .kh-user-finance td .kh-btn{min-height:44px}
 .kh-user-finance td form{display:inline-block;margin:0 4px}
}
@media(max-width:760px){
 .kh-inbox-desk.kh-pwa-inbox .kh-thread-list{display:block;width:100%;max-height:none;border:0;padding:8px}
 .kh-inbox-desk .kh-thread-list>a.kh-thread-row{min-width:0;width:100%;box-sizing:border-box}
 .kh-thread-copy strong{font-size:13px}.kh-thread-meta{font-size:9px}
 .kh-inbox-tabs::-webkit-scrollbar{display:none}
}

@media(max-width:760px){
 [dir=rtl] .kh-compose-send svg,.kh-compose-send[dir=rtl] svg{transform:scaleX(-1)}
 .kh-pwa-shell .kh-pwa-thread #kh-chat-form{border-top:1px solid #e6ece9;padding-inline:8px}
}
