
*{box-sizing:border-box}body{margin:0;background:#efe6dc;color:#513b2b;font-family:"Segoe UI","Myanmar Text",sans-serif}button,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}.app{max-width:864px;margin:auto;height:100svh;background:#fffaf5;display:flex;flex-direction:column}header{display:flex;align-items:center;gap:14px;padding:18px 22px;border-bottom:1px solid #eadccc;background:#fffcf8}header a{font-size:27px;padding:6px}h1{font:400 25px Georgia,serif;margin:0 0 5px}.subtitle{font-size:11px;color:#9a846b;letter-spacing:.06em}.new{margin-left:auto;border:1px solid #dbc4a3;background:none;border-radius:22px;padding:9px 13px;color:#8a622e;font-size:13px}.conversation{flex:1;overflow:auto;padding:28px 24px;scroll-behavior:smooth}.welcome{text-align:center;margin:25px auto 32px;max-width:470px}.mark{display:grid;place-items:center;border:1px solid #dab77b;width:70px;height:70px;margin:0 auto 22px;border-radius:50%;color:#ba8b43;font:italic 34px Georgia,serif}.welcome h2{font:400 32px Georgia,serif;letter-spacing:-.025em;margin:0 0 15px}.welcome p{font-size:14px;color:#96816c;line-height:1.9}.suggestions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:22px}.suggestions button{border:1px solid #e7d6bf;color:#8c683c;background:#fffcf8;padding:10px 14px;border-radius:22px;font-size:12px}.row{display:flex;margin:18px 0;gap:10px;align-items:flex-end}.avatar{display:grid;place-items:center;flex-shrink:0;width:28px;height:28px;border-radius:50%;background:#f3e5cc;color:#9a722f;font:italic 16px Georgia,serif}.bubble{max-width:83%;padding:14px 17px;border-radius:19px 19px 19px 4px;background:#f3eadd;font-size:14px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.row.user{justify-content:flex-end}.user .bubble{background:#b88b47;color:white;border-radius:19px 19px 4px 19px}.composer{padding:12px 22px 10px;border-top:1px solid #ede1d2;background:#fffaf5}form{display:flex;align-items:flex-end;gap:10px;padding:9px 10px 9px 16px;border:1px solid #dfccb2;border-radius:25px;background:#fffdfb}textarea{resize:none;max-height:130px;min-height:42px;width:100%;border:0;outline:0;background:none;color:#513b2b;font-size:14px;line-height:1.6;padding:9px 0}textarea::placeholder{color:#ab9985}.send{flex-shrink:0;width:42px;height:42px;border:0;border-radius:50%;background:#b58a46;color:white;font-size:23px}.send:disabled{opacity:.45;cursor:default}.disclaimer{text-align:center;color:#9b8873;font-size:11px;margin:9px 0;line-height:1.6}.nav{display:flex;justify-content:space-around;padding:13px 10px max(15px,env(safe-area-inset-bottom));border-top:1px solid #eee0d0;font-size:13px}.nav a{padding:8px 14px;border-radius:20px}.nav .active{color:#956821;background:#f9e8c8}button:focus-visible,a:focus-visible,form:focus-within{outline:2px solid #bd945b;outline-offset:3px}@media(max-width:480px){header{padding:13px 14px}.conversation{padding:18px 16px}.welcome{margin-top:20px}.welcome h2{font-size:28px}.composer{padding:10px 14px 0}.new{font-size:11px}.bubble{font-size:13px}}
.malchi-logo{display:block;width:190px;max-width:55vw;height:auto;margin:0 auto 20px;mix-blend-mode:multiply}.header-logo{width:55px;height:55px;object-fit:contain;mix-blend-mode:multiply}.avatar{width:36px;height:36px;background:#fffaf5;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}

/* chat header: new chat button */
.new-chat{margin-left:auto;border:1px solid #e3cfa8;background:#fffaf0;color:#8a5a12;border-radius:999px;padding:7px 12px;font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.new-chat:active{transform:scale(.97)}

/* chat history drawer */
.icon-chip{width:36px;height:36px;border-radius:12px;border:1px solid #e3cfa8;background:#fffaf0;color:#8a5a12;font-size:16px;cursor:pointer;margin-left:auto;flex:none}
.new-chat{margin-left:6px}
.chat-drawer{position:fixed;top:0;left:0;bottom:0;width:300px;max-width:86vw;background:#fffaf3;border-right:1px solid #ead8ba;box-shadow:20px 0 50px #3a22082e;z-index:60;transform:translateX(-102%);transition:transform .22s ease;display:flex;flex-direction:column;padding:14px}
.chat-drawer.open{transform:none}
.drawer-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.drawer-head strong{font-family:Georgia,"Times New Roman",serif;font-size:17px;color:#4d3511}
.drawer-close{width:30px;height:30px;border-radius:50%;border:0;background:#f5ead6;color:#7a5a22;font-size:16px;line-height:1;cursor:pointer}
.drawer-new{border:0;border-radius:999px;background:linear-gradient(135deg,#e9b244,#b57a0b);color:#fff;font:inherit;font-size:12.5px;font-weight:600;padding:9px 14px;cursor:pointer}
.chat-list{overflow:auto;display:flex;flex-direction:column;gap:3px;margin-top:12px;padding-bottom:16px}
.chat-item{display:flex;align-items:center;gap:4px;border-radius:12px;padding:1px}
.chat-item.active{background:#fbe6bd}
.chat-item .open{flex:1;min-width:0;text-align:left;border:0;background:none;padding:9px 10px;border-radius:10px;font:inherit;font-size:12.5px;color:#4d3511;cursor:pointer;display:block}
.chat-item .title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-item .when{display:block;font-size:10px;color:#a08a68;margin-top:2px}
.chat-item .del{border:0;background:none;color:#b06a52;font-size:13px;cursor:pointer;padding:7px 9px;border-radius:8px}
.chat-item .del:hover{background:#fbe7e3}
.chat-empty{font-size:12px;color:#a08a68;padding:10px 4px}
.drawer-backdrop{position:fixed;inset:0;background:#1f140a55;z-index:55;opacity:0;pointer-events:none;transition:opacity .2s}
.drawer-backdrop.show{opacity:1;pointer-events:auto}
