/* 2026-10-02 phone-only quick fix. Desktop declarations intentionally absent. */
@media (max-width:760px) {
  html,body{width:100%;height:100%;overflow:hidden;-webkit-text-size-adjust:100%}
  #app,#app.fp-open{height:var(--phone-height,100dvh);grid-template-columns:minmax(0,1fr)}
  #app .main{min-width:0;min-height:0;padding-top:calc(52px + env(safe-area-inset-top));overflow:hidden}
  .mobile-quick-top{position:absolute;z-index:12;inset:0 0 auto;box-sizing:border-box;height:calc(52px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 8px 0;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;background:#fff;border-bottom:1px solid #e3e5e8;color:#202632}
  .mobile-quick-top[hidden],.mobile-more[hidden],.mobile-plus[hidden]{display:none}
  .mobile-quick-top .mobile-nav-toggle,.mobile-quick-top .mobile-back,.mobile-quick-top .mobile-new{position:static;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent;font-size:23px;color:#202632}
  .mobile-quick-top .mobile-nav-toggle:after{content:none}
  .mobile-quick-top .mobile-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:17px;font-weight:700}
  .mobile-quick-top .mobile-back[hidden]{display:none}
  .trial-mode{display:none!important}
  body.mobile-blind .trial-mode{display:flex!important;top:calc(52px + env(safe-area-inset-top));left:0;right:0;z-index:7;height:42px;justify-content:center;background:#fff;border-bottom:1px solid #e3e5e8}
  body.mobile-blind #app .main{padding-top:calc(94px + env(safe-area-inset-top))}
  #ccShareBtn{display:none!important}
  #app .side{position:fixed;inset:0 auto 0 0;width:min(84vw,320px);height:var(--phone-height,100dvh);z-index:90;visibility:hidden;transform:translateX(-100%);box-shadow:5px 0 24px #0002}
  #app.mobile-nav-open .side{visibility:visible;transform:none}
  #app.mobile-nav-open .mobile-nav-backdrop{display:block;position:fixed;inset:0;z-index:85;background:#0005}
  .side-top{order:0;min-height:54px}.mobile-nav-close{width:44px;height:44px;min-height:44px}
  .new-chat{order:1;min-height:48px;font-size:16px}
  #app .side>.nav,#app .side>.wxentry{display:none!important}
  .side>.group{order:2;padding:8px 16px 2px;font-size:13px}
  .side>.hint{order:3;font-size:13px}
  .side>.exptree{order:4;min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain}
  .side>.side-foot{order:6;margin-top:0;min-height:74px}
  .mobile-more{display:block;order:5;border-top:1px solid #e3e5e8;flex:none;background:#fff}
  .mobile-more summary{display:flex;align-items:center;min-height:48px;padding:0 18px;font-size:16px;font-weight:650;cursor:pointer}
  .mobile-more-content{max-height:min(44dvh,390px);overflow-y:auto;border-top:1px solid #edf0f2;padding:4px 10px 8px}
  .mobile-more-content button{display:block;width:100%;min-height:48px;padding:8px 10px;text-align:left;font-size:15px;color:#25313d}
  .exptree .chat-item,.exptree .expert{min-height:56px;font-size:15px}
  .exptree .ct{font-size:15px;line-height:1.4}.exptree .cm{font-size:13px}
  .side-tier,.side-foot .me-sub,.side-foot .me-profile{font-size:13px}
  .welcome{min-height:0;padding:18px 16px 10px;justify-content:center;overflow-y:auto}
  .welcome h1{font-size:28px}.welcome .status{display:none}.welcome .privacy{font-size:14px;line-height:1.5;color:#4b5563}
  .chat{min-height:0;flex:1 1 auto;padding:14px 0 20px;overflow-y:auto;overscroll-behavior:contain;scroll-padding-bottom:16px}
  .dock{flex:0 0 auto;padding:6px 8px max(6px,env(safe-area-inset-bottom));background:#fff}
  .composer{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;align-items:end;gap:4px;max-width:none;min-height:56px;padding:5px;border-radius:15px;overflow:visible}
  .composer-bar{display:contents}
  .composer textarea,.composer .capability-editor{grid-column:2;grid-row:1;box-sizing:border-box;width:100%;height:44px;min-height:44px;max-height:calc(5 * 24px + 8px);padding:10px 6px;line-height:24px;font-size:16px;border:0;overflow-y:auto;resize:none}
  .composer textarea[hidden],.composer .capability-editor[hidden]{display:none!important}
  .composer #attachBox,.composer #attachBox2{grid-column:1/-1;grid-row:2;max-height:90px}
  .composer .mobile-plus{grid-column:1;grid-row:1;display:grid;place-items:center;width:44px;height:44px;min-height:44px;border:0;border-radius:10px;background:#f2f3f5;font-size:26px;color:#303944}
  .composer .voice-input-button{grid-column:3;grid-row:1;width:44px;height:44px;min-height:44px;flex:none;margin:0;padding:0;border:0;background:transparent}
  .composer .send{grid-column:4;grid-row:1;width:44px;height:44px;min-height:44px;flex:none;margin:0;border-radius:12px}
  .composer .picker,.composer .swbtn,.composer .composer-note{display:none!important}
  .mobile-mode-chip{grid-column:1/-1;grid-row:3;display:inline-flex;justify-self:start;min-height:28px;align-items:center;padding:2px 8px;border-radius:7px;background:#fff1ec;color:#9f352a;font-size:13px}
  .mobile-mode-chip[hidden]{display:none}
  .mobile-sheet-mask{position:fixed;inset:0;z-index:500;display:flex;align-items:flex-end;background:#15191f66}
  .mobile-sheet-mask[hidden]{display:none}
  .mobile-sheet{box-sizing:border-box;width:100%;max-height:82dvh;overflow-y:auto;overscroll-behavior:contain;padding:12px 16px max(16px,env(safe-area-inset-bottom));border-radius:18px 18px 0 0;background:#fff;box-shadow:0 -10px 30px #15191f22}
  .mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:18px;font-weight:700}
  .mobile-sheet-head button,.mobile-sheet-option{min-height:48px;font-size:16px}
  .mobile-sheet-head button{min-width:44px}
  .mobile-sheet-option{display:flex;align-items:center;width:100%;padding:0 8px;text-align:left;border-top:1px solid #edf0f2}
  .mobile-sheet-option.current:after{content:'✓';margin-left:auto;color:#bf382b;font-weight:700}
  .mobile-expert-option{gap:12px;min-height:66px;padding:9px 6px;color:#252c35}
  .mobile-expert-option.current{background:#fff4f1;border-radius:10px}
  .mobile-expert-icon{display:grid;flex:0 0 36px;place-items:center;width:36px;height:36px;border-radius:11px;color:#fff;font-size:14px;font-weight:700}
  .mobile-expert-copy{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:3px}
  .mobile-expert-copy strong{font-size:16px;line-height:1.3}
  .mobile-expert-copy small{display:-webkit-box;overflow:hidden;color:#69737f;font-size:13px;line-height:1.35;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .feedback-choices.star-choices,.feedback fieldset>.feedback-choices{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:8px;width:100%;max-width:100%;flex-wrap:nowrap}
  .feedback-choices.star-choices span,.feedback fieldset>.feedback-choices span{box-sizing:border-box;display:grid;place-items:center;width:100%;min-width:44px;min-height:44px;padding:0;font-size:16px}
  .feedback-choices:not(.star-choices){flex-wrap:wrap}
  .mask{height:var(--phone-height,100dvh);align-items:flex-end;padding:0}
  #pmask .modal{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:min(90dvh,var(--phone-height,100dvh));max-height:90dvh;min-height:0;border-radius:18px 18px 0 0;overflow:hidden}
  #pmask .modal-hd{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 8px;flex:none;padding:14px 18px 10px;background:#fff}
  #pmask .modal-hd h3{font-size:20px}
  #pmask .modal-hd .steps{font-size:14px;font-weight:650;color:#8a3329}
  #pmask .modal-hd p{grid-column:1/-1;font-size:14px;line-height:1.5}
  #pmask .modal-bd{flex:1 1 auto;min-height:0;overflow-y:auto;padding:14px 18px;overscroll-behavior:contain}
  #pmask .modal-ft{flex:none;padding:8px 16px max(12px,env(safe-area-inset-bottom));background:#fff;box-shadow:0 -5px 16px #0000000d}
  #pmask .modal-ft #pnext{width:100%;min-height:48px;flex:1 1 100%;font-size:17px}
  #pmask .q{margin-bottom:18px}.profile-field-hint{display:block;margin-top:5px;font-size:13px;line-height:1.5;color:#4b5563}
  #pmask .profile-missing{padding:6px;border:2px solid #c43b2c;border-radius:10px;background:#fff7f5}
  #pmask .q input,#pmask .q textarea,#pmask .q select{min-height:44px;font-size:16px}
  .cc-mask{align-items:flex-end;padding:0;z-index:450}
  .cc-box.cc-test-box,.cc-box.ccl-box{box-sizing:border-box;display:flex;flex-direction:column;width:100%;max-width:none;height:min(88dvh,780px);max-height:88dvh;margin:0;padding:0;overflow:hidden;border:0;border-radius:18px 18px 0 0}
  .cc-test-head,.ccl-title{flex:none;padding:18px 18px 12px;background:#fff;border-bottom:1px solid #eee4df}
  .cc-test-title,.ccl-title{font-size:20px;line-height:1.4}
  .cc-test-scroll,.ccl-text{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;padding:16px 18px;font-size:16px;line-height:1.65}
  .cc-test-item{grid-template-columns:34px minmax(0,1fr)}.cc-test-number{width:34px;height:34px;font-size:15px}
  .cc-test-item-text,.cc-test-item-title{font-size:16px}
  .cc-test-footer,.ccl-paper .cc-row{flex:none;width:100%;box-sizing:border-box;padding:12px 16px max(16px,env(safe-area-inset-bottom));margin:0;background:#fff;border-top:1px solid #eee4df}
  .cc-test-footer .cc-btn,.ccl-paper .cc-row .cc-btn{width:100%;min-height:48px;font-size:17px}
  .ccl-paper{display:flex;flex-direction:column;flex:1;min-height:0;padding:0}.ccl-paper.on{transform:none;opacity:1}
  .cc-onboarding{left:8px;right:8px;bottom:calc(74px + env(safe-area-inset-bottom));z-index:360;width:auto;max-height:min(44dvh,350px);padding:14px 16px;overflow:auto}
  .cc-onboarding-close{min-width:44px;min-height:44px;font-size:14px}
  .cc-onboarding-actions button{min-height:48px}
  #app #viewCustomers.cp-preview{box-sizing:border-box;padding-top:calc(52px + env(safe-area-inset-top))!important}
  #viewCustomers .topbar,#viewCustomers .hero-art{display:none!important}
  #viewCustomers .cw-coach-art{display:none}
  #viewCustomers .ca-head{padding:12px 16px}
  #viewCustomers .ca-head>div:first-child{display:none}
  #viewCustomers .ca-tabs{max-width:100%;overflow-x:auto}
  #viewCustomers .ca-tab{min-height:44px;font-size:14px}
  :is(.msg-time,.chat-item .cm,.side-tier,.nav-badge,.cc-onboarding-kicker,.cc-test-eyebrow){font-size:13px}
  :is(.status,.answer-meta,.feedback-hint,.feedback-footer,.sub){font-size:14px;color:#4b5563}
  .mobile-sheet-mask:focus-visible,.mobile-more summary:focus-visible{outline:3px solid #a83329;outline-offset:2px}
  @media (max-width:350px) {
    .msg.agent{padding:0 8px;gap:6px}
    .feedback fieldset>.feedback-choices{gap:4px}
  }
}
