:root{--green-950:#10281f;--green-900:#173b2f;--green-800:#20513d;--green-700:#28744f;--green-600:#319b67;--green-050:#edf5ef;--ink:#17221b;--muted:#68756d;--line:#e0e8e1;--surface:#fff;--canvas:#f5f7f5;--danger:#bd4141;--amber:#9a6a21;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--canvas)}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;min-height:100%;overflow:hidden;background:var(--canvas)}body{font-size:14px;-webkit-text-size-adjust:100%;overscroll-behavior:none}button,input,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #d49b36;outline-offset:2px}.app-shell{display:flex;flex-direction:column;width:100%;height:100dvh;min-height:280px;max-width:100%;margin:0 auto;background:var(--canvas);overflow:hidden}.statusbar{display:flex;align-items:center;justify-content:space-between;flex:none;height:22px;padding:var(--safe-top) 10px 0;background:var(--green-950);color:#e6f1e9;font-size:10px;font-weight:700}.status-right{display:flex;align-items:center;gap:7px}.signal-mark{font-size:8px;color:#70d69a}.app-header{display:flex;align-items:center;gap:9px;flex:none;min-height:51px;padding:6px 11px;background:var(--green-900);color:white}.brand-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#2a6248;color:white;font-weight:900;font-size:19px}.header-copy{min-width:0;flex:1}.brand-name{font-size:14px;font-weight:900;letter-spacing:.8px}.header-subtitle{margin-top:2px;color:#c5d8ca;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-button{width:34px;height:34px;border:1px solid #ffffff30;border-radius:9px;background:#ffffff10;color:white;font-size:22px}.main-view{position:relative;display:flex;flex:1;min-height:0;overflow:hidden;background:var(--canvas)}.page{width:100%;height:100%;overflow-y:auto;overscroll-behavior:contain;padding:12px 10px 16px}.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.page-title{margin:0;color:var(--ink);font-size:20px;line-height:1.2;font-weight:800}.page-note{margin-top:4px;color:var(--muted);font-size:11px;line-height:1.35}.pill{display:inline-flex;align-items:center;max-width:100%;padding:4px 7px;border-radius:99px;background:#eaf2eb;color:var(--green-800);font-size:9px;font-weight:800;white-space:nowrap}.pill.warn{background:#fff2dc;color:#805718}.search-box{display:flex;align-items:center;gap:7px;height:37px;margin:9px 0 10px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:white;color:var(--muted)}.search-box input{width:100%;height:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}.search-box input:focus{outline:0}.list{display:flex;flex-direction:column;gap:5px}.list-row{display:flex;align-items:center;gap:9px;width:100%;min-height:59px;padding:7px 8px;border:1px solid var(--line);border-radius:10px;background:white;text-align:left;color:var(--ink)}.list-row:focus,.list-row:focus-visible,.nav-item:focus-visible,.settings-row:focus-visible{border-color:var(--green-600);background:#f0f7f1;outline:2px solid #d49b36;outline-offset:1px}.avatar{display:grid;flex:none;place-items:center;width:37px;height:37px;border-radius:50%;background:#dfece2;color:#28543a;font-size:13px;font-weight:800}.avatar.blue{background:#e0ebf7;color:#345b82}.avatar.gold{background:#f4ead2;color:#80652d}.avatar.rose{background:#f4e2e2;color:#8b4c4c}.row-copy{display:flex;flex:1;flex-direction:column;min-width:0;gap:5px}.row-top,.row-bottom{display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}.row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:800}.row-time{flex:none;color:#859087;font-size:9px}.row-bottom{color:var(--muted);font-size:10px}.row-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.unread{display:grid;min-width:17px;height:17px;padding:0 4px;place-items:center;border-radius:99px;background:var(--green-600);color:white;font-size:9px;font-weight:800}.empty-state{padding:25px 14px;border:1px dashed #d5e0d7;border-radius:11px;background:white;color:var(--muted);text-align:center;font-size:12px;line-height:1.5}.smallprint{margin:10px 1px;color:#78847c;font-size:10px;line-height:1.45}.primary-button,.secondary-button,.danger-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:8px 11px;border:0;border-radius:9px;background:var(--green-700);color:white;font-size:12px;font-weight:800}.secondary-button{border:1px solid #ccdbcf;background:white;color:var(--green-800)}.danger-button{background:var(--danger)}.full-button{width:100%;margin-top:8px}.bottom-nav{display:grid;grid-template-columns:repeat(3,1fr);flex:none;min-height:53px;padding:4px 6px calc(4px + var(--safe-bottom));border-top:1px solid var(--line);background:white}.nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;border-radius:9px;background:transparent;color:#77837b;font-size:10px}.nav-item>span:first-child{font-size:18px;line-height:19px}.nav-item.is-active{background:var(--green-050);color:var(--green-800);font-weight:800}.softkeys{display:none;grid-template-columns:1fr 1fr 1fr;align-items:center;flex:none;height:30px;padding:0 7px var(--safe-bottom);background:var(--green-950);color:white}.kaios .softkeys{display:grid}.softkeys button{height:25px;border:0;border-radius:5px;background:transparent;color:#eff8f0;font-size:10px;font-weight:800}.softkeys button:first-child{text-align:left}.softkeys button:last-child{text-align:right}.softkeys #softCenter{background:#ffffff18;text-align:center}.chat-page{display:flex;flex-direction:column;width:100%;height:100%;min-height:0}.chat-context{display:flex;align-items:center;gap:8px;flex:none;min-height:47px;padding:5px 9px;border-bottom:1px solid var(--line);background:white}.back-button,.chat-call{display:grid;place-items:center;flex:none;width:33px;height:33px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--green-800);font-size:19px}.chat-person{flex:1;min-width:0}.chat-person strong{display:block;font-size:12px}.chat-person small{display:block;margin-top:2px;overflow:hidden;color:var(--muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}.chat-scroll{flex:1;min-height:0;overflow-y:auto;padding:10px 9px;background:#f1f5f1}.date-divider{width:max-content;max-width:90%;margin:2px auto 10px;padding:4px 8px;border-radius:99px;background:#e1eae2;color:#65746a;font-size:9px}.message-line{display:flex;margin:6px 0}.message-line.out{justify-content:flex-end}.bubble{max-width:84%;padding:8px 9px 6px;border:1px solid #e2e9e2;border-radius:10px 10px 10px 3px;background:white;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.message-line.out .bubble{border-color:#cee3d2;border-radius:10px 10px 3px 10px;background:#e3f1e6}.message-meta{margin-top:4px;color:#849087;font-size:9px;text-align:right}.composer{display:flex;flex:none;align-items:flex-end;gap:6px;padding:7px 8px calc(7px + var(--safe-bottom));border-top:1px solid var(--line);background:white}.composer textarea{flex:1;width:0;min-width:0;min-height:37px;max-height:100px;padding:9px;border:1px solid #dce6dd;border-radius:9px;background:#fbfdfb;color:var(--ink);font-size:12px;resize:none}.send-button{min-width:54px;height:37px;border:0;border-radius:9px;background:var(--green-700);color:white;font-size:11px;font-weight:800}.profile-card{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:11px;background:white}.profile-card .avatar{width:48px;height:48px;font-size:17px}.profile-name{font-size:15px;font-weight:800}.profile-id{margin-top:3px;color:var(--muted);font-size:11px}.section-label{margin:15px 2px 7px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.6px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:47px;padding:8px 9px;border:1px solid var(--line);border-radius:9px;background:white;text-align:left}.settings-row+.settings-row{margin-top:6px}.settings-row b{display:block;font-size:11px}.settings-row small{display:block;margin-top:3px;color:var(--muted);font-size:9px}.status-ok{color:#24794f!important;font-weight:800}.status-no{color:#a16a1d!important;font-weight:800}.call-page{display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;height:100%;min-height:0;padding:22px 15px 18px;background:linear-gradient(155deg,#183d30,#10291f);color:white}.call-label{color:#cbded0;font-size:10px;font-weight:800;letter-spacing:1px}.call-avatar{display:grid;place-items:center;width:74px;height:74px;border:2px solid #ffffff40;border-radius:50%;background:#36714e;font-size:26px;font-weight:800}.call-name{margin-top:10px;font-size:22px;font-weight:800}.call-status{margin-top:6px;color:#d2e1d6;font-size:12px;text-align:center}.call-note{max-width:280px;margin-top:10px;padding:7px 9px;border:1px solid #ffffff25;border-radius:8px;color:#dbe9df;background:#ffffff0d;font-size:10px;line-height:1.4;text-align:center}.call-controls{display:flex;justify-content:center;gap:17px;width:100%;padding-bottom:8px}.call-control{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:60px;border:0;background:transparent;color:white;font-size:10px}.control-circle{display:grid;place-items:center;width:48px;height:48px;border:1px solid #ffffff30;border-radius:50%;background:#ffffff18;font-size:19px}.call-control.danger .control-circle{border-color:#d35c5c;background:#b83e3e}.call-control.accept .control-circle{border-color:#4aae78;background:#268a54}.diagnostic-intro,.info-card{margin-bottom:9px;padding:10px;border:1px solid #dce7dd;border-radius:10px;background:white;color:var(--muted);font-size:11px;line-height:1.5}.capability{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:8px 9px;border-bottom:1px solid #edf1ed;background:white;font-size:10px}.capability:first-child{border-radius:9px 9px 0 0}.capability:last-child{border-radius:0 0 9px 9px;border-bottom:0}.capability span{text-align:right;color:var(--muted)}.auth-wrap{display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow-y:auto;padding:16px}.auth-card{width:100%;max-width:390px;padding:18px;border:1px solid var(--line);border-radius:16px;background:white;box-shadow:0 8px 28px #173b2f0c}.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:17px}.auth-brand .brand-mark{width:42px;height:42px;font-size:23px}.auth-brand strong{font-size:17px;letter-spacing:1px}.auth-brand small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.auth-title{margin:0 0 6px;font-size:21px}.auth-note{margin:0 0 14px;color:var(--muted);font-size:11px;line-height:1.5}.field{display:block;margin:10px 0}.field span{display:block;margin-bottom:5px;color:#526057;font-size:10px;font-weight:800}.field input{width:100%;height:40px;padding:0 10px;border:1px solid #dce6dd;border-radius:9px;background:#fbfdfb;font-size:13px}.auth-switch{display:flex;gap:6px;margin-bottom:14px}.auth-switch button{flex:1;min-height:34px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--muted);font-size:11px;font-weight:800}.auth-switch button.active{border-color:#bdd4c2;background:var(--green-050);color:var(--green-800)}.modal-backdrop{position:fixed;z-index:30;inset:0;display:grid;place-items:center;padding:16px;background:#0b1d14a8}.modal{width:100%;max-width:360px;max-height:90dvh;overflow-y:auto;padding:16px;border-radius:13px;background:white;box-shadow:0 12px 40px #0004}.modal h2{margin:0 0 7px;font-size:17px}.modal p{margin:0 0 12px;color:var(--muted);font-size:11px;line-height:1.5}.modal input{width:100%;height:40px;padding:0 10px;border:1px solid var(--line);border-radius:8px;font-size:13px}.modal-actions{display:flex;gap:7px;margin-top:11px}.modal-actions button{flex:1;min-height:37px;border:0;border-radius:8px;background:var(--green-700);color:white;font-size:11px;font-weight:800}.modal-actions .cancel{background:#edf1ed;color:var(--ink)}.toast{position:fixed;z-index:50;left:50%;bottom:calc(45px + var(--safe-bottom));width:max-content;max-width:90vw;padding:9px 12px;border-radius:9px;background:#18382a;color:white;font-size:11px;opacity:0;pointer-events:none;transform:translate(-50%,10px);transition:opacity .16s,transform .16s}.toast.show{opacity:1;transform:translate(-50%,0)}#remoteAudio{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.auth-error{margin:8px 0;padding:8px 9px;border-radius:8px;background:#fff0ef;color:#a13131;font-size:10px;line-height:1.4}.nav-spacer{height:4px}@media(min-width:600px){body{display:grid;place-items:center;background:#dce4de}.app-shell{width:min(100%,440px);height:min(900px,calc(100dvh - 28px));border:1px solid #d2ddd4;border-radius:22px;box-shadow:0 18px 60px #153a2720}.statusbar{border-radius:21px 21px 0 0}.softkeys{display:none}.bottom-nav{min-height:65px;padding-bottom:calc(7px + var(--safe-bottom))}.page{padding:17px 15px 20px}.list-row{min-height:66px}.page-title{font-size:22px}.composer{padding-bottom:calc(9px + var(--safe-bottom))}}@media(max-height:390px){.app-header{min-height:42px}.brand-mark{width:28px;height:28px}.bottom-nav{min-height:42px}.page{padding-top:7px}.call-page{padding-top:8px;padding-bottom:8px}.call-avatar{width:54px;height:54px}.call-name{font-size:17px}.call-note{display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* SAMBUNG v0.3.0: compact KaiOS/mobile layout and keyboard-safe chat */
html,body{height:100%;min-height:100%;overflow:hidden}
.app-shell{height:var(--app-height,100vh);height:var(--app-height,100%);min-height:240px;overflow:hidden}
.main-view{flex:1 1 auto;min-height:0;overflow:hidden;display:flex}
.app-header,.statusbar{display:none!important}
.page{height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:contain;padding-bottom:12px}
.chat-page{display:flex;flex:1 1 auto;flex-direction:column;width:100%;height:100%;min-height:0;overflow:hidden}
.chat-context{min-height:38px;height:38px;padding:3px 7px;gap:7px}
.back-button,.chat-call{width:31px;height:31px;border:0;background:#f0f5f1;border-radius:8px}
.chat-person strong{font-size:12px}.chat-person small{font-size:9px}
.chat-scroll{display:block;flex:1 1 0%;min-height:48px;max-height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior:contain;padding:8px 8px 12px}
.composer{position:relative;z-index:2;display:flex;flex:none;align-items:flex-end;gap:6px;width:100%;min-height:52px;padding:6px 7px calc(6px + var(--safe-bottom));border-top:1px solid var(--line);background:#fff}
.composer textarea{display:block;flex:1 1 auto;width:0;min-width:0;height:38px;min-height:38px;max-height:88px;overflow-y:auto;padding:9px 10px;border:1px solid #dce6dd;border-radius:18px;background:#fbfdfb;font-size:13px;line-height:18px;resize:none;outline:none}
.send-button{display:grid;place-items:center;flex:0 0 40px;width:40px;min-width:40px;height:40px;padding:0;border:0;border-radius:50%;background:var(--green-700);color:#fff}
.send-button svg{display:block}.send-button:disabled{opacity:.55}
.chat-scroll:focus{outline:none}.chat-scroll:focus-visible{outline:2px solid #d49b36;outline-offset:-2px}
.message-line{margin:5px 0}.bubble{font-size:13px;padding:8px 10px}.message-meta{font-size:9px}
.page-title-row{position:sticky;top:0;z-index:1;padding:4px 0 7px;background:var(--canvas)}
.compact-back{display:flex;align-items:center;gap:8px;min-height:35px;margin:0 0 9px;padding:0 1px;color:var(--green-800);font-size:13px;font-weight:700}
.compact-back button{display:grid;place-items:center;width:31px;height:31px;border:0;border-radius:8px;background:#eaf2eb;color:var(--green-800)}
.call-page{display:flex;flex:1 1 auto;justify-content:space-around;gap:12px;width:100%;height:100%;min-height:0;overflow-y:auto;padding:18px 12px 12px;background:linear-gradient(155deg,#183d30,#10291f);color:#fff}
.call-identity{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0}
.call-avatar{width:64px;height:64px;font-size:24px}.call-name{font-size:20px;margin-top:8px}.call-status{font-size:12px}.call-duration{min-height:27px;margin-top:7px;color:#fff;font-size:21px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:1px}.call-username{margin-top:4px;color:#bfd2c4;font-size:10px}
.call-controls{gap:28px;padding:6px 0 3px}.call-control{min-width:68px;min-height:78px;justify-content:center;font-size:11px}.control-circle{width:54px;height:54px;font-size:20px}
.call-hint{max-width:280px;color:#d5e6d9;font-size:10px;line-height:1.4;text-align:center;padding:4px 8px}
.call-note{display:none}
.softkeys{position:relative;z-index:5;flex:0 0 30px;height:30px;padding-bottom:0}
.softkeys button{font-size:11px;min-width:42px}
.bottom-nav{flex:0 0 48px;min-height:48px;padding:3px 6px calc(3px + var(--safe-bottom))}
.kaios .bottom-nav{min-height:43px;flex-basis:43px}
.list-row{scroll-margin:6px}
button, .list-row, .settings-row{outline-offset:-2px}
@media(max-height:360px){.call-page{padding:5px 8px;gap:4px}.call-avatar{width:48px;height:48px}.call-name{font-size:16px}.call-duration{font-size:17px;min-height:20px}.call-controls{padding:0}.control-circle{width:42px;height:42px}.call-control{min-height:58px}.chat-context{height:34px;min-height:34px}.composer{min-height:46px;padding:4px 6px}.composer textarea{height:36px;min-height:36px}.send-button{width:36px;min-width:36px;flex-basis:36px;height:36px}}
@media(min-width:600px){.app-shell{height:var(--app-height,100vh);height:min(900px,var(--app-height,100vh));max-width:460px}.chat-context{min-height:43px;height:43px}.composer{padding:8px 10px}.chat-scroll{padding:12px}}

.inbox-actions{display:flex;align-items:center;gap:7px}.toolbar-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--green-800)}.compact-back svg,.toolbar-icon svg,.back-button svg,.chat-call svg{display:block}.search-box>span{display:grid;place-items:center;flex:none}.search-box svg{display:block}.nav-item svg{display:block}.call-hint{padding-bottom:7px}


/* v0.3.1 review: stable small-screen scrolling and permanently visible composer */
html,body,#appShell{height:100%;min-height:100%;}
.app-shell{height:var(--app-height,100%);min-height:240px;display:flex;flex-direction:column;}
.main-view{flex:1 1 0%;height:1px;min-height:0;overflow:hidden;}
.main-view>.page{display:block;flex:1 1 0%;width:100%;height:100%;min-height:0;overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;}
.chat-page{display:flex;flex:1 1 0%;width:100%;height:100%;min-height:0;overflow:hidden;flex-direction:column;}
.chat-scroll{display:block;flex:1 1 0%;height:1px;min-height:42px;max-height:none;overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:contain;}
.composer{display:flex;flex:0 0 auto;position:relative;z-index:3;min-height:52px;width:100%;align-items:flex-end;padding-bottom:calc(6px + var(--safe-bottom));background:#fff;}
.composer textarea{flex:1 1 auto;min-width:0;max-height:72px;overflow-y:auto;scrollbar-width:thin;}
.send-button{flex:0 0 40px;display:grid;place-items:center;align-self:flex-end;}
.chat-context{flex:0 0 38px;}
.kaios .main-view>.page{height:100%;overflow-y:scroll;}
.kaios .chat-scroll{overflow-y:scroll;max-height:none;}
.kaios .composer{position:relative;bottom:auto;}
.kaios .softkeys{flex:0 0 30px;}
@media(max-height:360px){.chat-context{flex-basis:34px;min-height:34px;height:34px;}.composer{min-height:46px;padding-top:4px;padding-bottom:4px;}.composer textarea{height:36px;min-height:36px;max-height:56px;}.send-button{width:36px;height:36px;flex-basis:36px;}}

@media(max-width:360px){.page-title{font-size:17px}.page-note{display:none}.page-title-row{margin-bottom:7px}.chat-context{min-height:36px;height:36px}.chat-person strong{font-size:12px}.chat-person small{display:none}.search-box{margin:6px 0 8px}}


/* SAMBUNG v0.3.2: KaiOS chat viewport, composer and compact navigation hardening */
html,body{height:100%;min-height:100%;overflow:hidden}
.app-shell{height:var(--app-height,100vh);min-height:240px;display:flex;flex-direction:column;overflow:hidden}
.app-header,.statusbar{display:none!important}
.main-view{display:flex;flex:1 1 0%;flex-direction:column;width:100%;height:1px;min-height:0;overflow:hidden}
.main-view>.page{flex:1 1 0%;width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.chat-page{display:flex;flex:1 1 0%;flex-direction:column;width:100%;height:100%;min-height:0;overflow:hidden}
.chat-context{display:flex;flex:0 0 34px;min-height:34px;height:34px;padding:2px 6px;gap:6px;background:#fff}
.back-button,.chat-call{width:30px;height:30px;min-width:30px;min-height:30px;border-radius:7px}
.chat-person strong{font-size:12px;line-height:1.2}.chat-person small{display:none}
.chat-scroll{display:block;flex:1 1 0%;width:100%;height:1px;min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior:contain;padding:7px 8px 10px}
.composer{display:flex;flex:0 0 auto;position:relative;bottom:auto;z-index:8;width:100%;min-height:48px;max-height:92px;align-items:flex-end;gap:6px;margin:0;padding:5px 6px calc(5px + var(--safe-bottom));border-top:1px solid var(--line);background:#fff}
.composer textarea{display:block;flex:1 1 auto;width:0;min-width:0;height:36px;min-height:36px;max-height:72px;overflow-y:auto;padding:8px 10px;border:1px solid #dce6dd;border-radius:17px;background:#fbfdfb;font-size:13px;line-height:18px;resize:none;outline:none}
.send-button{display:grid;place-items:center;flex:0 0 38px;width:38px;min-width:38px;height:38px;min-height:38px;padding:0;border:0;border-radius:50%;background:var(--green-700);color:#fff}
.send-button svg{display:block;width:18px;height:18px}
.chat-context,.composer{box-sizing:border-box}
.chat-scroll:focus{outline:none}
.back-button:focus,.chat-call:focus,.send-button:focus,.call-control:focus{outline:2px solid #d49b36;outline-offset:1px}
.softkeys{position:relative;z-index:20;flex:0 0 30px;height:30px;min-height:30px}
.kaios .main-view{flex:1 1 0%;height:1px;min-height:0;overflow:hidden}
.kaios .chat-page{height:100%;min-height:0}
.kaios .chat-scroll{height:1px;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.kaios .composer{flex:0 0 auto;position:relative;display:flex;min-height:48px;max-height:88px;margin:0;padding:5px 6px 5px;background:#fff}
.kaios .composer textarea{height:36px;min-height:36px;max-height:64px}
.kaios .bottom-nav{flex:0 0 43px;min-height:43px}
.kaios .softkeys{display:grid;flex:0 0 30px;height:30px}
@media(max-height:360px){.chat-context{flex-basis:31px;min-height:31px;height:31px}.chat-scroll{padding-top:5px;padding-bottom:6px}.composer{min-height:44px;max-height:76px;padding:3px 5px}.composer textarea{height:34px;min-height:34px;max-height:54px;padding:7px 9px}.send-button{width:34px;min-width:34px;height:34px;min-height:34px;flex-basis:34px}.softkeys{height:28px;min-height:28px;flex-basis:28px}}
@media(min-width:600px){.chat-context{flex-basis:42px;min-height:42px;height:42px;padding:5px 9px}.chat-person small{display:block}.composer{padding:8px 10px calc(8px + var(--safe-bottom))}}

/* v0.3.2 interaction details */
.page-title-row{position:relative;top:auto}
.kaios .chat-page{position:relative;display:flex;flex-direction:column;min-height:0;height:100%;}
.kaios .chat-context{flex-shrink:0;}
.kaios .chat-scroll{flex:1 1 auto;min-height:1px;height:auto;overflow:auto;}
.kaios .composer{flex-shrink:0;}
.kaios .send-button{touch-action:manipulation;}
.kaios .call-page{min-height:0;height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;}

/* SAMBUNG v0.4.0 — final compact layout / KaiOS viewport hardening */
html,body{width:100%;height:100%;min-height:0;margin:0;overflow:hidden}
.app-shell{display:flex;flex-direction:column;width:100%;height:var(--app-height,100vh);min-height:240px;max-height:100%;overflow:hidden}
.app-header,.statusbar{display:none!important}
.main-view{display:flex;flex:1 1 0%;width:100%;height:1px;min-height:0;overflow:hidden;flex-direction:column}
.main-view>.page{display:block;flex:1 1 0%;width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.chat-page{display:flex;flex:1 1 0%;flex-direction:column;width:100%;height:100%;min-height:0;max-height:100%;overflow:hidden}
.chat-context{display:flex;flex:0 0 34px;height:34px;min-height:34px;max-height:34px;align-items:center;padding:2px 6px;gap:6px;overflow:hidden}
.chat-person{flex:1 1 auto;min-width:0;overflow:hidden}
.chat-person strong{font-size:12px;line-height:1.2}
.chat-person small{display:none}
.chat-scroll{display:block;flex:1 1 0%;width:100%;height:1px;min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:7px 8px 12px}
.composer{display:flex;flex:0 0 auto;position:relative;z-index:12;width:100%;min-height:48px;max-height:94px;align-items:flex-end;gap:6px;margin:0;padding:5px 6px calc(5px + var(--safe-bottom));border-top:1px solid var(--line);background:#fff}
.composer textarea{display:block;flex:1 1 auto;width:0;min-width:0;height:37px;min-height:37px;max-height:72px;overflow-y:auto;padding:8px 10px;border:1px solid #dce6dd;border-radius:18px;background:#fbfdfb;color:var(--ink);font-size:13px;line-height:18px;resize:none}
.send-button{display:grid;flex:0 0 39px;width:39px;min-width:39px;height:39px;min-height:39px;place-items:center;padding:0;border:0;border-radius:50%;background:var(--green-700);color:#fff;touch-action:manipulation}
.send-button svg{display:block;width:19px;height:19px}
.chat-context,.composer{box-sizing:border-box}
.chat-scroll:focus{outline:none}
.compact-back{display:flex;align-items:center;gap:8px;min-height:35px;margin:0 0 8px;padding:0 1px;color:var(--green-800);font-size:13px;font-weight:700}
.compact-back button{display:grid;flex:none;place-items:center;width:32px;height:32px;border:0;border-radius:8px;background:#eaf2eb;color:var(--green-800)}
.call-started-at{margin-top:6px;color:#cbded0;font-size:11px;font-variant-numeric:tabular-nums}
.call-duration{font-variant-numeric:tabular-nums}
.kaios .app-shell{height:var(--app-height,100vh);min-height:240px;max-height:100%;overflow:hidden}
.kaios .main-view{flex:1 1 0%;height:1px;min-height:0;overflow:hidden}
.kaios .chat-page{flex:1 1 0%;height:100%;min-height:0;overflow:hidden}
.kaios .chat-context{flex:0 0 34px}
.kaios .chat-scroll{flex:1 1 0%;height:1px;min-height:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y}
.kaios .composer{display:flex;flex:0 0 auto;position:relative;bottom:auto;min-height:48px;max-height:90px;padding:5px 6px;background:#fff}
.kaios .composer textarea{height:37px;min-height:37px;max-height:64px}
.kaios .send-button{flex:0 0 38px;width:38px;min-width:38px;height:38px;min-height:38px}
.kaios .bottom-nav{flex:0 0 43px;min-height:43px}
.kaios .softkeys{flex:0 0 30px;height:30px;min-height:30px}
@media(max-height:360px){
  .chat-context{flex-basis:31px;height:31px;min-height:31px;max-height:31px}
  .chat-scroll{padding-top:4px;padding-bottom:7px}
  .composer{min-height:44px;max-height:76px;padding:3px 5px}
  .composer textarea{height:34px;min-height:34px;max-height:53px;padding:7px 9px}
  .send-button{flex-basis:34px;width:34px;min-width:34px;height:34px;min-height:34px}
  .softkeys{flex-basis:27px;height:27px;min-height:27px}
}
@media(min-width:600px){
  .chat-context{flex-basis:42px;height:42px;min-height:42px;max-height:42px;padding:5px 9px}
  .chat-person small{display:block}
  .composer{padding:8px 10px calc(8px + var(--safe-bottom))}
}

/* v0.4.0 final KaiOS small viewport layout */
html,body{width:100%;height:100%;min-height:0;overflow:hidden}
.app-shell{display:flex;flex-direction:column;height:var(--app-height,100vh);min-height:240px;max-height:100%;overflow:hidden}
.statusbar,.app-header{display:none!important}
.main-view{display:flex;flex:1 1 0%;height:1px;min-height:0;overflow:hidden;flex-direction:column}
.main-view>.page{display:block;flex:1 1 0%;height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.chat-page{display:flex;flex:1 1 0%;flex-direction:column;width:100%;height:100%;min-height:0;max-height:100%;overflow:hidden}
.chat-context{display:flex;flex:0 0 34px;height:34px;min-height:34px;max-height:34px;align-items:center;padding:2px 6px;gap:6px;overflow:hidden}
.chat-person{flex:1 1 auto;min-width:0;overflow:hidden}.chat-person strong{font-size:12px;line-height:1.2}.chat-person small{display:none}
.chat-scroll{display:block;flex:1 1 0%;width:100%;height:1px;min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:7px 8px 10px}
.composer{display:flex;flex:0 0 auto;position:relative;z-index:15;width:100%;min-height:48px;max-height:92px;align-items:flex-end;gap:6px;margin:0;padding:5px 6px calc(5px + var(--safe-bottom));border-top:1px solid var(--line);background:#fff}
.composer textarea{display:block;flex:1 1 auto;width:0;min-width:0;height:37px;min-height:37px;max-height:72px;overflow-y:auto;padding:8px 10px;border:1px solid #dce6dd;border-radius:18px;background:#fbfdfb;color:var(--ink);font-size:13px;line-height:18px;resize:none}
.send-button{display:grid;flex:0 0 39px;width:39px;min-width:39px;height:39px;min-height:39px;place-items:center;padding:0;border:0;border-radius:50%;background:var(--green-700);color:#fff;touch-action:manipulation}
.send-button svg{display:block;width:19px;height:19px}
.chat-scroll:focus{outline:none}.chat-context,.composer{box-sizing:border-box}
.call-started-at{margin-top:6px;color:#cbded0;font-size:11px;font-variant-numeric:tabular-nums}.call-duration{font-variant-numeric:tabular-nums}
.kaios .app-shell{height:var(--app-height,100vh);min-height:240px;max-height:100%;overflow:hidden}
.kaios .main-view{flex:1 1 0%;height:1px;min-height:0;overflow:hidden}
.kaios .chat-page{flex:1 1 0%;height:100%;min-height:0;overflow:hidden}
.kaios .chat-context{flex:0 0 34px}
.kaios .chat-scroll{flex:1 1 0%;height:1px;min-height:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y}
.kaios .composer{display:flex;flex:0 0 auto;position:relative;bottom:auto;min-height:48px;max-height:88px;padding:5px 6px;background:#fff}
.kaios .composer textarea{height:37px;min-height:37px;max-height:64px}
.kaios .send-button{flex:0 0 38px;width:38px;min-width:38px;height:38px;min-height:38px}
.kaios .bottom-nav{flex:0 0 43px;min-height:43px}.kaios .softkeys{flex:0 0 30px;height:30px;min-height:30px}
@media(max-height:360px){.chat-context{flex-basis:31px;height:31px;min-height:31px;max-height:31px}.chat-scroll{padding-top:4px;padding-bottom:7px}.composer{min-height:44px;max-height:76px;padding:3px 5px}.composer textarea{height:34px;min-height:34px;max-height:53px;padding:7px 9px}.send-button{flex-basis:34px;width:34px;min-width:34px;height:34px;min-height:34px}.softkeys{flex-basis:27px;height:27px;min-height:27px}}
@media(min-width:600px){.chat-context{flex-basis:42px;height:42px;min-height:42px;max-height:42px;padding:5px 9px}.chat-person small{display:block}.composer{padding:8px 10px calc(8px + var(--safe-bottom))}}

/* SAMBUNG v0.4.1 — KaiOS keyboard/viewport and persistent composer hardening */
html,body{min-height:0;height:100%;overflow:hidden}
.app-shell{height:var(--app-height,100vh);min-height:0;max-height:100%;overflow:hidden}
.main-view{flex:1 1 0%;height:1px;min-height:0;overflow:hidden}
.main-view>.page{min-height:0;max-height:100%;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.chat-page{display:flex!important;flex:1 1 0%!important;flex-direction:column!important;width:100%;height:100%;min-height:0;max-height:100%;overflow:hidden}
.chat-context{display:flex;flex:0 0 32px!important;height:32px;min-height:32px;max-height:32px;align-items:center;overflow:hidden}
.chat-scroll{display:block;flex:1 1 0%!important;width:100%;height:1px;min-height:0!important;max-height:none;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding-bottom:12px}
.composer{display:flex!important;flex:0 0 auto!important;position:relative!important;inset:auto!important;z-index:20;width:100%;min-height:46px;max-height:88px;align-items:flex-end;gap:6px;margin:0!important;padding:4px 6px calc(4px + var(--safe-bottom));border-top:1px solid var(--line);background:#fff;visibility:visible;opacity:1}
.composer textarea{display:block;flex:1 1 auto;width:0;min-width:0;height:36px;min-height:36px;max-height:62px;overflow-y:auto;resize:none;line-height:18px}
.composer .send-button{display:grid!important;flex:0 0 38px!important;width:38px;min-width:38px;height:38px;min-height:38px;place-items:center;visibility:visible;opacity:1}
.kaios .app-shell{min-height:0;height:var(--app-height,100vh);max-height:100%;}
.kaios .main-view{min-height:0;height:1px;overflow:hidden}
.kaios .chat-page{min-height:0;height:100%;}
.kaios .chat-scroll{min-height:0!important;height:1px;flex:1 1 0%!important;overflow-y:auto!important;}
.kaios .composer{flex:0 0 auto!important;min-height:44px;max-height:76px;padding:3px 5px;background:#fff}
.kaios .composer textarea{height:34px;min-height:34px;max-height:50px;padding:7px 8px}
.kaios .composer .send-button{width:34px;height:34px;min-height:34px;min-width:34px;flex-basis:34px}
.kaios .chat-context{flex:0 0 31px!important;height:31px;min-height:31px;max-height:31px;padding:1px 5px}
.kaios .chat-context .back-button,.kaios .chat-context .chat-call{width:29px;height:29px;min-width:29px;min-height:29px}
.kaios .bottom-nav{flex:0 0 39px;min-height:39px}
.kaios .softkeys{flex:0 0 27px;height:27px;min-height:27px;padding-bottom:0}
.kaios .softkeys button{height:24px;font-size:10px}
.kaios .chat-scroll:focus{outline:none}
.kaios .chat-scroll,.kaios .composer,.kaios .chat-context{transform:translateZ(0)}
@media(max-height:360px){
  .kaios .bottom-nav{flex-basis:34px;min-height:34px}
  .kaios .softkeys{flex-basis:24px;height:24px;min-height:24px}
  .kaios .softkeys button{height:22px}
  .kaios .chat-context{flex-basis:29px!important;height:29px;min-height:29px;max-height:29px}
  .kaios .composer{min-height:41px;max-height:68px;padding:2px 4px}
  .kaios .composer textarea{height:32px;min-height:32px;max-height:44px;padding:6px 8px}
  .kaios .composer .send-button{width:32px;height:32px;min-width:32px;min-height:32px;flex-basis:32px}
}
@media(min-width:600px){
  .chat-context{flex-basis:40px!important;height:40px;min-height:40px;max-height:40px}
  .composer{min-height:54px;padding:7px 10px calc(7px + var(--safe-bottom))}
}
