
    .cw{max-width:680px;margin:0 auto;padding:2rem 1rem 4rem}
    .screen{display:none}.screen.active{display:block}
    .card{background:white;border-radius:16px;border:1px solid #e5e7eb;box-shadow:0 2px 12px rgba(0,0,0,.06);padding:2rem}
    @media(max-width:480px){.card{padding:1.25rem}}
    .tabs{display:flex;border-bottom:2px solid #e5e7eb;margin-bottom:1.5rem}
    .tab{flex:1;padding:.75rem;background:none;border:none;font-size:.9rem;font-weight:600;color:#6b7280;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:color .2s,border-color .2s}
    .tab.on{color:#2563eb;border-bottom-color:#2563eb}
    .field{margin-bottom:1.25rem}
    .field label{display:block;font-size:.875rem;font-weight:600;color:#374151;margin-bottom:.4rem}
    .fi{width:100%;border:2px solid #e5e7eb;border-radius:10px;padding:.75rem 1rem;font-size:16px;color:#111827;outline:none;transition:border-color .2s,box-shadow .2s;box-sizing:border-box;-webkit-appearance:none;appearance:none}
    .fi:focus{border-color:#2563eb;box-shadow:0 0 0 3px #bfdbfe}
    .ferr{color:#dc2626;font-size:.78rem;margin-top:.3rem;display:none}
    .ferr.on{display:block}
    .fhint{color:#6b7280;font-size:.78rem;margin-top:.3rem}
    .igrid{display:grid;grid-template-columns:1fr 1fr;gap:.625rem;margin-top:.5rem}
    .ipill{border:2px solid #e5e7eb;border-radius:10px;padding:.625rem .75rem;cursor:pointer;transition:all .18s;display:flex;align-items:center;gap:.5rem;font-size:.875rem;font-weight:500;color:#374151;user-select:none;background:white}
    .ipill:hover{border-color:#93c5fd;background:#eff6ff}
    .ipill.on{border-color:#2563eb;background:#eff6ff;color:#1e40af}
    .cbrow{display:flex;align-items:flex-start;gap:.625rem;padding:.875rem;background:#f9fafb;border:1.5px solid #e5e7eb;border-radius:10px;cursor:pointer;margin-bottom:.75rem}
    .cbrow input{width:18px;height:18px;accent-color:#2563eb;margin-top:1px;flex-shrink:0}
    .cbrow span{font-size:.875rem;color:#374151;line-height:1.4}
    .btn{width:100%;padding:.875rem;border:none;border-radius:10px;font-size:1rem;font-weight:600;cursor:pointer;transition:background .2s,transform .1s;display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:48px;-webkit-tap-highlight-color:transparent}
    .bb{background:#2563eb;color:white}.bb:hover{background:#1d4ed8}.bb:active{transform:scale(.98)}.bb:disabled{background:#93c5fd;cursor:not-allowed}
    .bsm{width:auto;padding:.4rem .875rem;font-size:.8rem;border-radius:8px;min-height:36px}
    .disc{background:#fffbeb;border:1.5px solid #fcd34d;border-radius:10px;padding:1rem;margin-bottom:1.25rem;font-size:.7rem;color:#78350f;line-height:1.4}
    .sbadge{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .875rem;border-radius:99px;font-size:.8rem;font-weight:600}
    .sw{background:#fef3c7;color:#92400e}.sc{background:#16a34a;color:white;box-shadow:0 0 0 3px #bbf7d0}.so{background:#fee2e2;color:#991b1b}
    .dpulse{width:8px;height:8px;border-radius:50%;background:currentColor;animation:pulse 1.4s infinite}
    @keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
    .obar{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;margin-bottom:1rem;font-size:.85rem}
    .chdr{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;background:white;border:1px solid #e5e7eb;border-radius:12px 12px 0 0;border-bottom:none}
    .cmsgs{background:#f9fafb;border:1px solid #e5e7eb;border-top:none;border-bottom:none;min-height:200px;height: 300px;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.625rem;scroll-behavior:smooth}
    @media(max-width:480px){.cmsgs{height:260px}}
    .msg{display:flex;flex-direction:column;max-width:80%}
    .msg.me{align-self:flex-end;align-items:flex-end}
    .msg.them{align-self:flex-start;align-items:flex-start}
    .msg.sys{align-self:center;align-items:center;max-width:100%}
    .mb{padding:.625rem .875rem;border-radius:14px;font-size:.925rem;line-height:1.5;word-break:break-word}
    .msg.me .mb{background:#2563eb;color:white;border-radius:14px 14px 4px 14px}
    .msg.them .mb{background:white;color:#111827;border:1px solid #e5e7eb;border-radius:14px 14px 14px 4px}
    .msg.sys .mb{background:#f3f4f6;color:#6b7280;font-size:.8rem;border-radius:8px;text-align:center;padding:.4rem .875rem}
    .msg.sys.warn .mb{background:#fef3c7;color:#92400e}
    .msg.sys.danger .mb{background:#fee2e2;color:#991b1b}
    .msg.sys.success .mb{background:#dcfce7;color:#15803d;font-weight:600}



    .skip-bnr{background:#f0f9ff;border:1px solid #bae6fd;border-radius:10px;padding:.875rem 1rem;margin-bottom:.75rem;display:none;align-items:center;justify-content:space-between;gap:.5rem}
    .skip-bnr.show{display:flex}
    .skip-bnr span{font-size:.875rem;color:#0369a1}

    .hint-box{background:#fffbeb;border:1px solid #fcd34d;border-radius:10px;padding:.75rem 1rem;margin-bottom:.75rem;font-size:.82rem;color:#92400e;display:none;align-items:center;justify-content:space-between;gap:.5rem}
    .hint-box.show{display:flex}

    .typing-indicator{display:none;align-self:flex-start;align-items:center;gap:.375rem;padding:.5rem .875rem;background:white;border:1px solid #e5e7eb;border-radius:14px 14px 14px 4px;margin-top:.25rem}
    .typing-indicator.show{display:flex}
    .typing-indicator span{font-size:.78rem;color:#9ca3af}
    .tdot{width:6px;height:6px;border-radius:50%;background:#9ca3af;animation:td 1.2s infinite}
    .tdot:nth-child(2){animation-delay:.2s}
    .tdot:nth-child(3){animation-delay:.4s}
    @keyframes td{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-6px)}}

    .mmeta{font-size:.7rem;color:#9ca3af;margin-top:.2rem;padding:0 .25rem}
    .cinp{display:flex;gap:.5rem;padding:.875rem;background:white;border:1px solid #e5e7eb;border-top:2px solid #e5e7eb;border-radius:0 0 12px 12px}
    #msgInput{flex:1;border:2px solid #e5e7eb;border-radius:10px;padding:.625rem .875rem;font-size:16px;outline:none;resize:none;min-height:44px;max-height:120px;font-family:inherit;transition:border-color .2s}
    #msgInput:focus{border-color:#2563eb}
    #sendBtn{background:#2563eb;color:white;border:none;border-radius:10px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
    #sendBtn:hover{background:#1d4ed8}#sendBtn:disabled{background:#93c5fd;cursor:not-allowed}
    .cc{font-size:.72rem;color:#9ca3af;text-align:right;padding:.25rem 1rem;background:white;border:1px solid #e5e7eb;border-top:none;border-bottom:none}
    .cc.warn{color:#d97706}.cc.over{color:#dc2626}
    .cact{display:flex;gap:.625rem;margin-top:.875rem;flex-wrap:wrap}
    .tokbox{background:#eff6ff;border:2px dashed #93c5fd;border-radius:12px;padding:1rem 1.25rem;text-align:center;margin-bottom:1.25rem}
    .tokval{font-size:2rem;font-weight:800;color:#1e40af;letter-spacing:.25em;font-family:monospace}
    .itag{display:inline-flex;align-items:center;gap:.25rem;background:#eff6ff;color:#1e40af;border-radius:99px;padding:.2rem .625rem;font-size:.75rem;font-weight:500}
    .spin{width:18px;height:18px;border:2px solid rgba(255,255,255,.4);border-top-color:white;border-radius:50%;animation:sp .7s linear infinite}
    @keyframes sp{to{transform:rotate(360deg)}}
    .bnr{border-radius:10px;padding:.75rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:1rem;display:none}
    .bnr-red{background:#fee2e2;border:1px solid #fca5a5}
    .bnr-red span{color:#991b1b;font-size:.875rem}
    .bnr-amber{background:#fef3c7;border:1px solid #fcd34d}
    .bnr-amber span{color:#92400e;font-size:.875rem}
    .bnr-blue{background:#eff6ff;border:1px solid #bfdbfe}
    .bnr-blue span{color:#1e40af;font-size:.82rem}
    .reconnect-bar{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:.875rem 1rem;display:none;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}
    .reconnect-bar span{font-size:.875rem;color:#15803d;font-weight:500}
    .hint-bar{background:#fffbeb;border:1px solid #fcd34d;border-radius:10px;padding:.75rem 1rem;font-size:.82rem;color:#92400e;margin-bottom:1rem;display:none;align-items:center;gap:.5rem}
    .ubadge{background:#dc2626;color:white;border-radius:99px;padding:.1rem .5rem;font-size:.7rem;font-weight:700;margin-left:.375rem;display:none}
