
:root{--g:#087565;--gd:#075a4e;--mint:#d9f0ed;--ink:#173f3a;--muted:#71827f;--line:#dce8e6}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Tahoma,Arial,sans-serif;color:var(--ink)}button,input,textarea,select{font:inherit}.hidden{display:none!important}
body{background:linear-gradient(180deg,#bde7e7,#eef7f8 55%,#e7f1f4);min-height:100vh}.patient-app{max-width:760px;margin:auto;min-height:100vh;padding:24px 18px 110px}.welcome{padding-top:11vh;text-align:center;display:grid;justify-items:center}
.demo-logo{width:110px;height:110px;border-radius:50%;background:#fff;border:4px solid #d8e9e5;display:grid;place-items:center;align-content:center;box-shadow:0 14px 35px #276b651c;color:var(--g)}.demo-logo span{font-size:50px;font-weight:900;line-height:1}.demo-logo small{font-size:9px;margin-top:5px}.demo-logo.small{width:52px;height:52px;border-width:2px}.demo-logo.small span{font-size:24px}.demo-logo.small small{display:none}
.welcome h1{font-size:48px;color:var(--gd);margin:25px 0 4px}.hospital{font-size:20px;color:#58706d}.welcome h2{font-size:27px;color:#647572;margin:12px 0 32px}
.ask{width:100%;display:flex;align-items:center;gap:10px;background:#ffffffd9;border:1px solid #fff;border-radius:25px;padding:10px 13px;box-shadow:0 9px 28px #275e5912}.ask textarea{flex:1;min-width:0;border:0;outline:0;resize:none;background:transparent;text-align:right;padding:12px 3px;font-size:18px;max-height:110px;line-height:1.5}.circle{border:0;width:54px;height:54px;border-radius:18px;color:#fff;flex:none;font-size:22px}.mic{background:var(--g);box-shadow:0 7px 16px #0875653d}.send{background:#aac9c5}.search{font-size:29px;color:var(--g)}
.quick{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:25px}.quick button,#reset{border:0;border-radius:999px;background:#ffffffd9;color:var(--gd);padding:11px 17px;font-weight:700;box-shadow:0 4px 13px #00000008}.privacy{font-size:12px;color:#859390;margin-top:24px}
.chat{padding-top:10px}.chat header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:22px}.mini{display:flex;align-items:center;gap:10px}.mini>div:last-child{display:grid;text-align:right}.mini small{color:var(--muted);margin-top:4px}
.messages{display:grid;gap:14px;padding-bottom:105px}.msg{max-width:90%;border-radius:22px;padding:15px 17px;line-height:1.8;box-shadow:0 7px 22px #164a450d;white-space:pre-wrap}.msg.user{justify-self:left;background:var(--g);color:#fff;border-bottom-left-radius:7px}.msg.ai{justify-self:right;background:#fffffff0;border-bottom-right-radius:7px}.speak{border:0;background:#eaf6f4;color:var(--gd);border-radius:999px;padding:7px 11px;margin-top:10px;font-weight:700}.typing{opacity:.65}.fixed{position:fixed;bottom:12px;width:min(calc(100% - 36px),724px)}.admin-fab{position:fixed;left:16px;bottom:16px;width:48px;height:48px;border-radius:50%;background:#fff;display:grid;place-items:center;text-decoration:none;box-shadow:0 8px 20px #0002}
.admin-body{background:#f3f7f7}.login-view{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(430px,100%);background:#fff;border-radius:24px;padding:30px;display:grid;gap:13px;box-shadow:0 16px 45px #164a451a;text-align:center}.login-card .demo-logo{margin:auto}.login-card h1{margin:5px 0 0}.login-card p{margin:0;color:var(--muted)}.login-card input,.settings input,.settings textarea,.modal-box input,.modal-box textarea,.modal-box select{width:100%;padding:12px 13px;border:1px solid var(--line);border-radius:11px;outline:0}.primary{border:0;background:var(--g);color:#fff;border-radius:11px;padding:12px;font-weight:800}
.admin-shell{display:grid;grid-template-columns:245px 1fr;min-height:100vh}.admin-shell aside{background:#073f37;color:#fff;padding:22px 17px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:10px;margin-bottom:27px}.brand>div:last-child{display:grid}.brand small{opacity:.65;margin-top:3px}.admin-shell nav{display:grid;gap:6px}.nav{border:0;background:transparent;color:#d7ebe8;text-align:right;padding:11px 12px;border-radius:9px}.nav.active,.nav:hover{background:#ffffff1c}.admin-shell aside>a{margin-top:auto;color:#fff;text-decoration:none;padding:11px}.logout{border:0;background:transparent;color:#ffc8c8;text-align:right;padding:11px}.admin-main{padding:26px;min-width:0}.admin-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.admin-head h1{margin:0 0 4px}.admin-head p{margin:0;color:var(--muted)}.online{background:#fff;border-radius:999px;padding:8px 12px;font-size:12px;color:#28784d}.panel{display:none}.panel.active{display:block}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.card{background:#fff;border-radius:18px;padding:19px;box-shadow:0 6px 20px #164a450b}.stat b{font-size:30px;display:block}.stat span{color:var(--muted)}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.section-head h2{margin:0}.data{overflow:auto}.tbl{width:100%;border-collapse:collapse}.tbl th,.tbl td{padding:11px 9px;border-bottom:1px solid #edf2f1;text-align:right}.tbl th{font-size:12px;color:#718582}.act{border:0;border-radius:8px;padding:6px 9px;margin-left:4px}.edit{background:#eaf6f4;color:var(--gd)}.del{background:#fff0f0;color:#a44}.status{font-size:11px;padding:5px 8px;border-radius:999px;background:#eaf7ef;color:#27764c}.status.off{background:#f6eeee;color:#9b5555}.settings{display:grid;grid-template-columns:1fr 1fr;gap:13px}.settings label,.modal-box label{display:grid;gap:6px;font-weight:700}.wide{grid-column:1/-1}.settings textarea,.modal-box textarea{min-height:100px}.modal{position:fixed;inset:0;background:#062d286b;display:grid;place-items:center;padding:18px;z-index:20}.modal-box{width:min(720px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;padding:25px;position:relative}.modal-box>button{position:absolute;left:15px;top:14px;border:0;border-radius:50%;width:36px;height:36px}.modal-box form{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:720px){.patient-app{padding:18px 14px 105px}.welcome{padding-top:8vh}.welcome h1{font-size:39px}.welcome h2{font-size:23px}.ask{padding:8px 9px;border-radius:21px}.circle{width:47px;height:47px;border-radius:15px}.ask textarea{font-size:16px}.fixed{width:calc(100% - 28px)}.admin-shell{display:block}.admin-shell aside{position:static;height:auto}.admin-shell nav{grid-template-columns:1fr 1fr}.admin-shell aside>a{margin-top:16px}.admin-main{padding:15px}.stats{grid-template-columns:1fr 1fr}.settings,.modal-box form{grid-template-columns:1fr}.wide{grid-column:auto}.admin-head{align-items:flex-start;gap:10px}}

/* Real hospital logo */
.hospital-logo{width:112px;height:112px;border-radius:50%;background:#fff;display:grid;place-items:center;margin:0 auto 16px;overflow:hidden;box-shadow:0 8px 24px #08756522;border:3px solid #ffffffcc}
.hospital-logo img{width:100%;height:100%;object-fit:contain;background:#fff}
.hospital-logo.small{width:56px;height:56px;margin:0;flex:0 0 56px}

/* AI patient UI final logo sizing */
.welcome .hospital-logo{width:84px;height:84px;margin:0 auto 10px;border-radius:22px;border:2px solid rgba(255,255,255,.9);box-shadow:0 8px 22px #0875651f}
.welcome .hospital-logo img{width:100%;height:100%;object-fit:contain}
.chat .hospital-logo.small{width:46px;height:46px;flex:0 0 46px;border-radius:14px}
@media(max-width:720px){.welcome{padding-top:5vh}.welcome .hospital-logo{width:76px;height:76px}.welcome h1{margin-top:12px}.chat .hospital-logo.small{width:42px;height:42px;flex-basis:42px}}

.send-wide{border:0;min-width:92px;height:54px;padding:0 18px;border-radius:18px;background:var(--g)!important;color:#fff;font-size:17px;font-weight:900;box-shadow:0 8px 18px #0875653d;cursor:pointer}.send-wide:active{transform:scale(.97)}

/* Patient chat UX v2 */
.send-wide{min-width:112px;height:58px;border-radius:18px;font-size:18px;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.reply-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.reply-action{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:11px 17px;border-radius:14px;text-decoration:none;font-weight:900;border:1px solid #cfe6e2;background:#f5fbfa;color:var(--gd);box-shadow:0 4px 12px #164a4510}
.reply-action.primary{background:var(--g);color:#fff;border-color:var(--g);box-shadow:0 7px 17px #08756530}
.reply-action.secondary{background:#fff;color:var(--gd)}
.msg-text{white-space:pre-wrap}
@media(max-width:720px){.send-wide{min-width:102px;height:52px;font-size:17px;padding:0 14px}.reply-actions{display:grid;grid-template-columns:1fr}.reply-action{width:100%}.quick button{font-size:14px}}

/* Mobile-first patient assistant v3 */
.home-btn{position:absolute;top:18px;left:18px;z-index:4;text-decoration:none;color:var(--gd);background:#ffffffdf;border:1px solid #fff;border-radius:999px;padding:11px 16px;font-weight:800;box-shadow:0 5px 16px #164a4510}.welcome{position:relative}.header-actions{display:flex;align-items:center;gap:8px}.home-btn.compact{position:static;padding:9px 12px;font-size:13px}.chat header{position:sticky;top:0;z-index:5;padding:8px 0;background:linear-gradient(180deg,#c4e9e8 70%,transparent)}
.typing{display:flex!important;align-items:center;gap:10px;white-space:normal!important}.typing-label{font-size:14px;color:#56726e}.typing-dots{display:flex;gap:4px;direction:ltr}.typing-dots i{width:7px;height:7px;border-radius:50%;background:var(--g);animation:zdot 1s infinite ease-in-out}.typing-dots i:nth-child(2){animation-delay:.15s}.typing-dots i:nth-child(3){animation-delay:.3s}@keyframes zdot{0%,60%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-5px);opacity:1}}
.send-wide:disabled,.circle:disabled{opacity:.45;cursor:not-allowed}.ask.ended textarea{color:#899;opacity:.7}.fixed{z-index:10;bottom:max(12px,env(safe-area-inset-bottom));transition:bottom .12s ease}.chat{min-height:var(--app-height,100dvh)}
@media(max-width:720px){body{min-height:var(--app-height,100dvh)}.patient-app{min-height:var(--app-height,100dvh);padding:10px 12px 92px}.welcome{padding-top:72px}.home-btn{top:8px;left:4px}.welcome h1{font-size:34px}.welcome h2{font-size:21px;margin-bottom:20px}.chat{padding-top:0}.chat header{margin-bottom:10px}.mini small{font-size:11px}.header-actions{gap:5px}.header-actions #reset{padding:8px 10px;font-size:12px}.home-btn.compact{padding:8px 10px;font-size:12px}.messages{padding-bottom:118px;gap:10px}.msg{max-width:94%;padding:13px 14px;line-height:1.65}.fixed{bottom:max(8px,env(safe-area-inset-bottom));width:calc(100% - 24px);left:12px;right:12px;margin:auto;padding:7px 8px;gap:7px;border-radius:20px;align-items:flex-end}.fixed textarea{font-size:16px!important;line-height:1.45!important;min-height:48px;max-height:112px;padding:11px 4px!important}.fixed .send-wide{min-width:94px;height:50px;font-size:16px;padding:0 11px}.fixed .circle{width:48px;height:50px;border-radius:15px}.fixed .search{display:none}.reply-action{min-height:48px}.speak{font-size:13px}}
@media(max-width:390px){.fixed .send-wide{min-width:82px;font-size:15px}.fixed .circle{width:44px}.fixed{gap:5px}.mini .hospital-logo.small{display:none}}
/* Patient assistant v5: fixed app shell, no covered messages */
@media(max-width:720px){
  html,body{height:100%;overflow:hidden}.patient-app{position:fixed;top:var(--vvtop,0);left:0;right:0;height:var(--vvh,100dvh);min-height:0;padding:0;overflow:hidden}.chat{height:100%;min-height:0;display:flex;flex-direction:column;padding:0}.chat.hidden{display:none!important}
  .chat-head{position:relative!important;top:auto!important;flex:0 0 auto;height:82px;margin:0!important;padding:10px 12px!important;background:#c4e9e8!important;display:grid!important;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;box-shadow:0 4px 18px #164a4510}
  .mini{justify-self:center}.mini>div:last-child{font-size:13px}.mini small{font-size:10px}.chat .hospital-logo.small{width:38px;height:38px;flex-basis:38px}.head-home,.head-new{border:0;background:#ffffffdd;color:var(--gd);border-radius:999px;padding:10px 12px;font-weight:800;text-decoration:none;font-family:inherit;white-space:nowrap;font-size:12px}.head-home{display:flex;gap:4px;align-items:center}.head-home:first-letter{font-size:19px}
  .messages{display:flex;flex-direction:column;flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:14px 12px 14px!important;gap:12px;scroll-padding-bottom:16px}.msg{flex:0 0 auto;max-width:92%}.msg.ai{align-self:flex-end}.msg.user{align-self:flex-start}
  .ask.fixed{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;transform:none!important;flex:0 0 auto;width:calc(100% - 20px)!important;margin:0 10px calc(8px + env(safe-area-inset-bottom))!important;z-index:20;background:#fff;padding:7px!important}.fixed textarea{min-width:0!important;flex:1!important}.fixed .send-wide{min-width:88px!important}.fixed .circle{width:44px!important;flex-basis:44px!important}
  .reply-actions{margin-top:10px}.reply-action{border:0;font-family:inherit;font-size:15px;cursor:pointer}.welcome{height:100%;overflow-y:auto;padding:30px 12px 110px!important}
}
@media(max-width:390px){.head-home span{display:none}.head-home{width:42px;height:42px;justify-content:center;padding:0}.head-new{padding:9px 10px}.mini>div:last-child b{font-size:12px}.mini small{display:none}}
.booking-review{border:1px solid #d7ebe7}.emergency-warning{margin-top:14px;padding:12px 13px;border-radius:13px;background:#fff5f5;border:1px solid #f1caca;font-weight:800;line-height:1.7}.emergency-check{display:flex;align-items:flex-start;gap:9px;margin-top:12px;font-weight:800;cursor:pointer}.emergency-check input{width:20px;height:20px;margin-top:3px;accent-color:var(--g)}.reply-action:disabled{opacity:.45;cursor:not-allowed}
/* V15 structured assistant results */
.result-view{margin-top:12px}.result-title{font-weight:800;margin-bottom:9px}.result-grid{display:grid;grid-template-columns:1fr;gap:8px}.result-card{width:100%;text-align:right;border:1px solid rgba(0,100,82,.12);background:#f8fffd;border-radius:14px;padding:11px 13px;color:inherit;display:flex;flex-direction:column;gap:3px;font:inherit}.result-card b{font-size:15px}.result-card span,.result-card small{opacity:.76;line-height:1.5}.result-card:active{transform:scale(.99)}.show-more{width:100%;margin-top:9px;border:0;border-radius:12px;padding:10px;font-weight:800;cursor:pointer}.result-more.hidden{display:none!important}
.admin-search{display:flex;gap:8px;margin-bottom:16px}.admin-search input{flex:1;min-width:0;padding:13px 15px;border:1px solid #d9e5e2;border-radius:14px;font:inherit}.admin-search button{border:0;border-radius:12px;padding:0 16px;cursor:pointer}.search-results{display:grid;gap:8px;margin-top:12px}.search-hit{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 13px;border:1px solid #e4ecea;border-radius:12px}.search-hit span{opacity:.7;font-size:13px}
@media(min-width:700px){.result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* FINAL PHONE LAYOUT — compact and proportional */
@media(max-width:720px){
 html{font-size:14px!important;-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
 body{font-size:14px!important;overflow-x:hidden!important}
 .patient-app{width:100%!important;max-width:100%!important;padding:8px 9px 84px!important}
 .welcome{padding:20px 10px 90px!important;height:auto!important;min-height:100dvh!important}
 .welcome .hospital-logo{width:62px!important;height:62px!important}
 .welcome h1{font-size:24px!important;line-height:1.3!important;margin:9px 0 2px!important}
 .hospital{font-size:13px!important}.welcome h2{font-size:16px!important;line-height:1.4!important;margin:8px 0 12px!important}
 .ask{gap:5px!important;padding:5px!important;border-radius:15px!important}
 .ask textarea,.fixed textarea{font-size:14px!important;min-height:42px!important;max-height:88px!important;padding:9px 3px!important}
 .circle,.fixed .circle{width:40px!important;height:42px!important;flex:0 0 40px!important;border-radius:11px!important;font-size:17px!important}
 .send-wide,.fixed .send-wide{min-width:64px!important;height:42px!important;padding:0 8px!important;border-radius:11px!important;font-size:12px!important}
 .quick{gap:6px!important;margin-top:11px!important}.quick button{font-size:11px!important;padding:7px 9px!important;box-shadow:none!important}
 .chat-head{height:58px!important;min-height:58px!important;padding:6px 8px!important}
 .chat .hospital-logo.small{width:30px!important;height:30px!important;flex-basis:30px!important}
 .mini>div:last-child b{font-size:11px!important}.mini small{font-size:9px!important}
 .head-home,.head-new{font-size:10px!important;padding:6px 7px!important;min-height:32px!important}
 .messages{padding:8px 8px 10px!important;gap:7px!important}
 .msg{max-width:94%!important;padding:9px 10px!important;border-radius:14px!important;font-size:12.5px!important;line-height:1.6!important}
 .msg-text{font-size:12.5px!important;line-height:1.6!important}
 .speak{font-size:10px!important;padding:4px 7px!important;margin-top:5px!important}
 .fixed{width:calc(100% - 10px)!important;left:5px!important;right:5px!important;bottom:max(5px,env(safe-area-inset-bottom))!important;padding:5px!important;gap:5px!important;border-radius:14px!important}
 .reply-actions{display:grid!important;grid-template-columns:1fr!important;gap:5px!important}
 .reply-action{min-height:38px!important;width:100%!important;font-size:11.5px!important;padding:7px 9px!important}
 .result-view{margin-top:6px!important}.result-title{font-size:11.5px!important;margin-bottom:5px!important}
 .result-card{padding:7px 8px!important;border-radius:10px!important;gap:2px!important}.result-card b{font-size:11.5px!important}.result-card span,.result-card small{font-size:9.5px!important;line-height:1.4!important}
 .show-more{font-size:10.5px!important;padding:7px!important;margin-top:6px!important}
 .booking-review{font-size:12px!important}.emergency-warning{font-size:10.5px!important;line-height:1.5!important;padding:8px!important}
 .emergency-check{display:none!important}
}
@media(max-width:380px){
 .welcome h1{font-size:22px!important}.mini small{display:none!important}
 .head-home span{display:none!important}.head-home{width:32px!important;padding:0!important;justify-content:center!important}
}

/* Zahra AI final mobile/RTL identity */
:root{--g:#0b83cc;--gd:#075da3;--mint:#fff1a8;--ink:#123b61;--muted:#667784;--line:#cfe3f2}
body{background:linear-gradient(180deg,#d9f3ff 0%,#eef9ff 58%,#fff8d8 100%)}
.msg.ai,.result-view,.result-card{direction:rtl;text-align:right}
.msg.ai{font-size:17px;line-height:1.9}
.result-view{width:100%;margin-left:0;margin-right:0}
.result-title{font-size:18px;font-weight:800;text-align:right}
.result-grid{direction:rtl}
.result-card{font-size:16px;line-height:1.65}
.result-card b{font-size:17px}.result-card span,.result-card small{font-size:14px}
.quick button{font-size:16px}.send,.mic{background:#0b83cc}.welcome h1{color:#075da3}
@media(max-width:720px){.patient-app{width:100%;max-width:100%;padding-left:14px;padding-right:14px}.welcome{padding-top:5vh}.welcome h1{font-size:32px}.welcome h2{font-size:22px}.ask{width:100%;max-width:100%;overflow:hidden}.ask textarea{font-size:17px;min-width:0}.quick{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:10px}.quick button{width:100%;min-height:54px;padding:10px 8px}.msg{font-size:17px;max-width:96%}.result-card{font-size:16px}.fixed{left:14px;right:14px;width:auto;max-width:none;bottom:max(10px,env(safe-area-inset-bottom))}.chat{min-height:calc(var(--vvh,100vh) - 30px)}}

/* universal mobile composer base fix — keep all controls inside viewport */
@media (max-width:720px){
 html,body{width:100%;max-width:100%;overflow-x:hidden!important}
 .patient-app{left:0!important;right:0!important;width:100%!important;max-width:100%!important;padding-left:12px!important;padding-right:12px!important}
 .welcome{width:100%!important;max-width:100%!important;padding-left:0!important;padding-right:0!important}
 .welcome h1{width:100%;font-size:30px!important;line-height:1.45!important;overflow-wrap:anywhere}
 .hospital{width:100%;font-size:16px!important;line-height:1.8!important;padding:0 5px}
 .ask{direction:rtl!important;display:grid!important;grid-template-columns:minmax(0,1fr) 46px 70px!important;align-items:center!important;width:100%!important;max-width:100%!important;gap:6px!important;padding:6px!important;overflow:visible!important}
 .ask textarea{grid-column:1!important;grid-row:1!important;width:100%!important;min-width:0!important;max-width:100%!important;direction:rtl!important;text-align:right!important;font-size:16px!important;line-height:1.5!important;color:#123b61!important;opacity:1!important;pointer-events:auto!important;touch-action:manipulation!important;z-index:2}
 .ask .mic{grid-column:2!important;grid-row:1!important;width:46px!important;min-width:46px!important;height:46px!important;pointer-events:auto!important;z-index:3}
 .ask .send-wide{grid-column:3!important;grid-row:1!important;width:70px!important;min-width:70px!important;max-width:70px!important;height:46px!important;padding:0 5px!important;font-size:0!important;pointer-events:auto!important;z-index:3}
 .ask .send-wide::after{content:'➤';font-size:21px!important;color:#fff}
 .ask .search{display:none!important}
 .quick{position:relative;z-index:1}
 .quick button{pointer-events:auto!important;touch-action:manipulation!important}
 .ask.fixed{display:grid!important;grid-template-columns:minmax(0,1fr) 46px 70px!important;left:auto!important;right:auto!important;width:calc(100% - 20px)!important;max-width:calc(100% - 20px)!important;margin:0 10px calc(8px + env(safe-area-inset-bottom))!important;padding:6px!important}
}

/* V26 universal responsive composer: phones, tablets and desktop */
html,body{max-width:100%;overflow-x:hidden}
.patient-app{width:100%}
.ask textarea{min-width:0;direction:rtl;text-align:right}
@media (min-width:721px){
 .patient-app{max-width:920px;padding-left:24px;padding-right:24px}
 .welcome{width:min(820px,100%);margin-inline:auto}
 .ask{width:100%;max-width:820px;margin-inline:auto}
 .quick{max-width:820px;margin-left:auto;margin-right:auto}
 .fixed{left:50%;right:auto;transform:translateX(-50%);width:min(calc(100% - 48px),872px);margin:0}
 .messages{width:100%}
}
@media (min-width:721px) and (max-width:1024px){
 .patient-app{max-width:900px;padding-left:20px;padding-right:20px}
 .welcome h1{font-size:clamp(34px,5vw,46px)}
 .fixed{width:calc(100% - 40px);max-width:860px}
}
@media (max-width:720px){
 .ask,.ask.fixed{display:flex!important;direction:rtl!important;align-items:flex-end!important;gap:6px!important}
 .ask textarea,.ask.fixed textarea{order:3!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important}
 .ask .mic,.ask.fixed .mic{order:2!important;flex:0 0 46px!important;width:46px!important;min-width:46px!important}
 .ask .send-wide,.ask.fixed .send-wide{order:1!important;flex:0 0 70px!important;width:70px!important;min-width:70px!important;max-width:70px!important}
 .ask.fixed{left:10px!important;right:10px!important;width:auto!important;max-width:none!important;margin:0 0 calc(8px + env(safe-area-inset-bottom))!important}
}
@media (max-width:420px){
 .patient-app{padding-left:10px!important;padding-right:10px!important}
 .welcome h1{font-size:clamp(25px,8vw,30px)!important}
 .hospital{font-size:15px!important}
 .ask,.ask.fixed{gap:5px!important}
 .ask .mic,.ask.fixed .mic{flex-basis:42px!important;width:42px!important;min-width:42px!important}
 .ask .send-wide,.ask.fixed .send-wide{flex-basis:58px!important;width:58px!important;min-width:58px!important;max-width:58px!important}
 .ask.fixed{left:8px!important;right:8px!important}
}


/* V27 final readability override — deliberately last */
.msg,.msg-text{font-size:18px!important;line-height:1.85!important}
.result-title{font-size:19px!important;line-height:1.6!important}
.result-card{font-size:17px!important;line-height:1.7!important;padding:12px 14px!important}
.result-card b{font-size:18px!important}.result-card span,.result-card small{font-size:16px!important;line-height:1.65!important}
.show-more,.reply-action{font-size:16px!important}.speak{font-size:14px!important}.quick button{font-size:16px!important}
@media(max-width:720px){.msg,.msg-text{font-size:17px!important;line-height:1.8!important}.result-title{font-size:18px!important}.result-card{font-size:16.5px!important}.result-card b{font-size:17.5px!important}.result-card span,.result-card small{font-size:15.5px!important}.quick button{font-size:16px!important}}
.catalog-help{padding:14px 16px;margin:0 0 14px;border:1px solid #cbe3e6;background:#f4fbfb;border-radius:14px;line-height:1.8;color:#174f61}.tbl td:first-child{font-weight:700}
