:root{--tg-bg: #ffffff;--tg-text: #111111;--tg-hint: #8a8a8a;--tg-link: #2481cc;--tg-button: #2481cc;--tg-button-text: #ffffff;--tg-secondary: #f1f1f1;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--tg-text);background:var(--tg-bg)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;height:100%;background:var(--tg-secondary)}#root{max-width:480px;margin:0 auto;min-height:100%;height:100%;background:var(--tg-bg)}button,input{font:inherit}.app-shell{height:100%;display:flex;flex-direction:column;background:var(--tg-bg)}.screen{display:flex;flex-direction:column;height:100%;min-height:0}.header{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--tg-bg);border-bottom:1px solid color-mix(in srgb,var(--tg-hint) 25%,transparent);flex-shrink:0}.header h1{margin:0;font-size:18px;font-weight:650}.search{margin:8px 16px 12px;padding:10px 12px;border:0;border-radius:12px;background:var(--tg-secondary);color:var(--tg-text);outline:none}.list{overflow:auto;flex:1}.row{display:flex;gap:12px;width:100%;padding:12px 16px;border:0;background:transparent;color:inherit;text-decoration:none;text-align:left;cursor:pointer}.row:active{background:var(--tg-secondary)}.avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;flex-shrink:0}.row-main{min-width:0;flex:1}.row-top{display:flex;justify-content:space-between;gap:8px}.name{font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.time{color:var(--tg-hint);font-size:12px;flex-shrink:0}.row-bottom{display:flex;justify-content:space-between;gap:8px;margin-top:4px}.preview{color:var(--tg-hint);font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--tg-button);color:var(--tg-button-text);font-size:12px;display:grid;place-items:center}.muted,.empty,.error,.center{padding:24px 16px;color:var(--tg-hint);text-align:center}.error{color:#d04848}.chat-log{flex:1;overflow:auto;padding:12px 12px 16px;background:var(--tg-secondary);display:flex;flex-direction:column;gap:8px}.chat-log:before{content:"";flex:1 0 auto}.bubble-row{display:flex}.bubble-row.in{justify-content:flex-start}.bubble-row.out{justify-content:flex-end}.bubble{max-width:80%;padding:8px 10px;border-radius:14px;background:var(--tg-bg);box-shadow:0 1px 1px #0000000f}.bubble-row.out .bubble{background:color-mix(in srgb,var(--tg-button) 18%,var(--tg-bg))}.bubble-text{white-space:pre-wrap;word-break:break-word;font-size:15px;line-height:1.35}.attachment{margin-top:6px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--tg-hint) 12%,transparent);font-size:13px}.bubble-meta{margin-top:4px;font-size:11px;color:var(--tg-hint);text-align:right}.composer-wrap{background:var(--tg-bg);border-top:1px solid color-mix(in srgb,var(--tg-hint) 25%,transparent)}.composer-error{padding:8px 12px 0;color:#d04848;font-size:13px}.file-chip{margin:8px 12px 0;padding:8px 10px;border-radius:12px;background:var(--tg-secondary);display:flex;justify-content:space-between;gap:8px;font-size:13px}.chip-remove{border:0;background:transparent;color:var(--tg-text);cursor:pointer;font-size:18px;line-height:1}.progress{margin:8px 12px 0;height:4px;border-radius:4px;background:var(--tg-secondary);overflow:hidden}.progress span{display:block;height:100%;background:var(--tg-button)}.composer{display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--tg-bg)}.attach{width:42px;flex-shrink:0}.composer input{flex:1;border:0;border-radius:18px;padding:10px 14px;background:var(--tg-secondary);color:var(--tg-text)}.composer button,.primary{border:0;border-radius:18px;padding:10px 16px;background:var(--tg-button);color:var(--tg-button-text);font-weight:650}.composer button:disabled,.composer input:disabled,.primary:disabled{opacity:.45}.login{padding:32px 20px;display:flex;flex-direction:column;gap:12px}.login h1{margin:0;font-size:22px}.login .muted{padding:0;text-align:left}.login input{padding:12px;border-radius:12px;border:0;background:var(--tg-secondary);color:var(--tg-text)}
