  









  













  :root {
    


     
    --bg: light-dark(#f9f7f1, #1a1a2e);
    --card: light-dark(#fffdf7, #16213e);
    --user-bg: light-dark(#fdf3e6, #1a3a5c);
    --agent-bg: light-dark(#e7f0e4, #0d3b2e);

     
    --text: light-dark(#242420, #eee);             
    --muted: light-dark(#6b6862, #8892b0);         
    --faint: light-dark(#85817a, #9aa0a6);         

     
    --line: light-dark(#e6e0d2, #0f3460);
    --tint: light-dark(#eaf1e8, #0f3460);

     
    








    --brand-tile: light-dark(#007722, #007722);    
    --brand-ink: light-dark(#fffdf7, #fffdf7);     
    --brand-book: light-dark(#007722, #17b95a);    
    --brand-ask: light-dark(#c24a30, #e76648);     
    




    --alipay: light-dark(#1677FF, #1677FF);
    --green: light-dark(#0a7d5f, #00d2a0);         
    --on-green: light-dark(#fffdf7, #111);         
    --red: light-dark(#c73a2b, #e94560);           
    --on-red: light-dark(#fffdf7, #fff);           
    --warn: light-dark(#9a6a12, #f0a848);          
    





    --notice-bg: light-dark(#f8ecbf, #342c14);
    --star: light-dark(#8a6500, #b8860b);          

    


    --glass: light-dark(#fffdf7, rgba(255, 255, 255, 0.75));
    --glass-edge: light-dark(#e6e0d2, rgba(255, 255, 255, 0.9));
    



    --glass-ink: light-dark(#242420, #333);

     
    --scrim: light-dark(rgba(36, 36, 32, 0.35), rgba(0, 0, 0, 0.55));
    



    --scrim-chat: light-dark(rgba(36, 36, 32, 0.175), rgba(0, 0, 0, 0.55));
    




    --mask-flash: light-dark(#fff, #fff);

     
    --press: light-dark(rgba(36, 36, 32, 0.08), rgba(0, 0, 0, 0.06));
    --press-active: light-dark(rgba(36, 36, 32, 0.16), rgba(0, 0, 0, 0.12));

     
    --shadow-float: light-dark(rgba(36, 36, 32, 0.10), rgba(0, 0, 0, 0.12));
    --shadow-card: light-dark(rgba(36, 36, 32, 0.12), rgba(0, 0, 0, 0.3));
    --shadow-hover: light-dark(rgba(36, 36, 32, 0.20), rgba(0, 0, 0, 0.45));
    --shadow-drawer: light-dark(rgba(36, 36, 32, 0.22), rgba(0, 0, 0, 0.5));

    







     
    --tint-green: light-dark(rgba(10, 125, 95, 0.14), rgba(0, 210, 160, 0.12));

    

    --col: 520px;
    --pad: 24px;

    










    --canvas-w: 1360px;

    






    --agent-enter: agent-enter 0.2s ease;

    




    --bg-out: light-dark(#ece8dc, #12122a);
  }
  

  html { color-scheme: light dark; }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
                 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
    background: var(--bg); color: var(--text);
    display: flex; justify-content: center; min-height: 100vh;
  }

   
  .login-overlay {
    position: fixed; inset: 0; background: var(--bg);
    display: flex;
    




    overflow-y: auto;
    z-index: 100;
  }
  .login-overlay.hidden { display: none; }
  

  .login-overlay > .login-form,
  .login-overlay > .login-guide,
  .login-overlay > .login-loading { margin: auto; }
  .login-form {
    background: var(--card); padding: 32px 28px; border-radius: 16px;
    width: 100%; max-width: 360px; text-align: center;
  }
  


  .login-form .brand { gap: 10px; margin-bottom: 20px; justify-content: center; }
  .login-form .brand-tile { width: 40px; height: 40px; border-radius: 11px; }
  .login-form .brand-tile svg { width: 24px; height: 24px; }
  .login-form .brand-name { font-size: 1.4rem; }
  .login-form input {
    display: block; width: 100%; padding: 12px 14px; margin-bottom: 12px;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--bg); color: var(--text); font-size: 1rem;
    outline: none; transition: border-color .2s;
  }
  .login-form input:focus { border-color: var(--green); }
  .login-form button {
    width: 100%; padding: 12px; border: none; border-radius: 10px;
    background: var(--green); color: var(--on-green); font-size: 1rem;
    font-weight: 600; cursor: pointer; transition: opacity .2s;
  }
  .login-form button:disabled { opacity: .5; cursor: not-allowed; }

  





  .pw-wrap { position: relative; }  
  .pw-wrap input { padding-right: 52px; }
  .login-form .pw-reveal {
    position: absolute; top: 0; right: 6px;
     
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    margin: 0; padding: 0; border: none; border-radius: 10px;
    background: transparent; color: var(--muted);
    cursor: pointer; transition: color .2s;
  }
  .login-form .pw-reveal:hover { color: var(--text); }
  .login-form .pw-reveal:focus-visible {
    outline: 2px solid var(--green); outline-offset: -2px;
  }
  .pw-reveal .pw-ic { width: 22px; height: 22px; display: block; }

  





  .pw-reveal[aria-pressed="true"] .pw-ic-eye { display: none; }
  .pw-reveal[aria-pressed="false"] .pw-ic-eye-off { display: none; }
  .login-error { color: var(--red); font-size: .85rem; margin-top: 8px; display: none; }

  







  .login-alipay { margin: 16px 0 0; text-align: center; }
  .login-alipay .alipay-link {
    color: var(--brand-ask); font-size: .95rem; font-weight: 600;
    text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 1px;
  }
  .login-alipay .alipay-link:hover { border-bottom-color: currentColor; }
  







  .login-alipay .alipay-ic {
    width: 1.15em; height: 1.15em; vertical-align: -.22em; margin-right: .3em;
    color: var(--alipay);
  }
  









  .alipay-handoff { text-align: left; }
  .alipay-handoff .brand { justify-content: center; }
  .alipay-handoff .login-loading-text { text-align: center; }
  

  .alipay-lead {
    margin: 14px 0 0; text-align: center; color: var(--text); font-size: .95rem; line-height: 1.5;
  }
   
  .alipay-hint {
    margin: 8px 0 12px; color: var(--muted); font-size: .8rem; line-height: 1.5;
  }
  

  .alipay-message { margin: 12px 0 0; color: var(--red); font-size: .85rem; line-height: 1.5; }
  




  .alipay-pane {
    margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  }
  .alipay-pane > summary {
    cursor: pointer; color: var(--brand-ask); font-size: .95rem; font-weight: 600;
  }
  .alipay-pane[open] > summary { margin-bottom: 12px; }
  

  

  .alipay-tech {
    margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left;
  }
  .alipay-tech > summary { cursor: pointer; color: var(--muted); font-size: .8rem; }
  .alipay-tech[open] > summary { margin-bottom: 10px; }
   
  .alipay-tech table { font-size: .78rem; max-width: 100%; display: block; overflow-x: auto; }
  .alipay-tech h2 { font-size: .85rem; margin: 14px 0 6px; }

  

  .login-alipay-hint {
    margin: 10px 0 0; font-size: .8rem; line-height: 1.5; color: var(--muted);
  }

  











  .login-notice {
    display: none;
    align-items: flex-start; gap: 9px; text-align: left;
    margin: 0 0 18px; padding: 10px 12px 10px 11px;
    border-left: 3px solid var(--warn);
    border-radius: 8px;
    background: var(--notice-bg);
    color: var(--text);
    font-size: .8rem; line-height: 1.5;
  }
  


  .notice-ic { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; color: var(--warn); }
  .notice-text { margin: 0; }
  .login-notice [data-notice] { display: none; }
  #loginOverlay[data-device="ios"] .login-notice,
  #loginOverlay[data-device="mobile"] .login-notice { display: flex; }
  #loginOverlay[data-device="ios"] [data-notice="ios"],
  #loginOverlay[data-device="mobile"] [data-notice="mobile"] { display: block; }

  







  .login-guide {
    display: none;
    


    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    padding: 26px 22px;
    

    width: 100%; max-width: 360px; text-align: left;
  }
  

  .login-overlay[data-entry="install"] .login-guide { display: block; }
  .login-overlay[data-entry="browser"] .login-guide { display: block; }
   
  .login-overlay:not([data-entry="login"]) .login-form { display: none; }

  









  .login-loading {
    display: none;
    background: var(--card); padding: 32px 28px; border-radius: 16px;
    width: 100%; max-width: 360px; text-align: center;
  }
  html.booting .login-overlay[data-entry="login"] .login-form { display: none; }
  html.booting .login-overlay[data-entry="login"] .login-loading { display: block; }
  .login-loading-text { margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
  

  .login-spinner {
    width: 28px; height: 28px; margin: 4px auto 0; border-radius: 50%;
    border: 3px solid var(--line); border-top-color: var(--brand-ask);
    animation: login-spin .8s linear infinite;
  }
  @keyframes login-spin { to { transform: rotate(1turn); } }
   
  .login-overlay[data-entry="install"] [data-for="browser"] { display: none; }
  .login-overlay[data-entry="browser"] [data-for="install"] { display: none; }

  .guide-title { font-size: 1.12rem; font-weight: 800; margin-bottom: 8px; }
  


  .login-guide .brand { margin-bottom: 14px; }
  .guide-lead {
    font-size: .9rem; line-height: 1.55; color: var(--muted); margin-bottom: 16px;
  }
  

  .guide-steps { padding-left: 1.5em; margin-bottom: 12px; }
  .guide-steps li { font-size: .92rem; line-height: 1.6; margin-bottom: 7px; }
  .guide-steps b { font-weight: 700; }

  

  .guide-url { margin-top: 4px; }
  .guide-url-text {
    display: block; background: var(--bg); border: 1px solid var(--line);
    border-radius: 10px; padding: 10px 12px;
    font-size: .78rem; line-height: 1.45; color: var(--muted);
    word-break: break-all; user-select: all;
  }
  

  .guide-copy { display: block; width: 100%; margin-top: 10px; }
  .guide-hint { font-size: .78rem; line-height: 1.4; color: var(--muted); margin-top: 8px; }
  .guide-note {
    margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
    font-size: .8rem; line-height: 1.55; color: var(--muted);
  }

  

  .login-build {
    position: absolute; left: 0; right: 0; bottom: 18px;
    text-align: center; font-size: .72rem; letter-spacing: .4px;
    color: var(--muted); opacity: .5; cursor: pointer; user-select: none;
  }
   
  .login-build.pending { color: var(--warn); opacity: 1; }

   
  .container {
    width: 100%; max-width: var(--col); padding: var(--pad);
    display: flex; flex-direction: column;
    

    height: 100vh; height: 100dvh;
  }
  .header {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 16px; flex-shrink: 0;
  }
  


  .book-band { display: none; }
  




  .brand { display: flex; align-items: center; gap: 8px; }
  .header h1 { margin: 0 0 0 6px; }
  .brand-tile {
    width: 30px; height: 30px; border-radius: 8px; flex: none;
    background: var(--brand-tile); color: var(--brand-ink);
    display: grid; place-items: center;
  }
  .brand-tile svg { width: 18px; height: 18px; display: block; }
  






  .brand-tile.brand-tile-inline {
    display: inline-grid; width: 1.5em; height: 1.5em; border-radius: .3em;
    vertical-align: -.32em; margin: 0 .22em;
  }
  .brand-tile.brand-tile-inline svg { width: .95em; height: .95em; }

  



  .ic-inline { width: 1.15em; height: 1.15em; vertical-align: -.22em; }
  .brand-name { font-size: 1.06rem; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
  .brand-book { color: var(--brand-book); }
  .brand-ask { color: var(--brand-ask); }
  .header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
  .dot.connected { background: var(--green); }

  .btn {
    padding: 8px 18px;
    border: none; border-radius: 10px; font-size: .85rem; font-weight: 600;
    cursor: pointer; transition: opacity .2s; flex-shrink: 0;
  }
  .btn:disabled { opacity: .4; cursor: not-allowed; }
   
  .btn:focus-visible, .send-btn:focus-visible, .talk-btn:focus-visible,
  .segmented button:focus-visible, .input-mode-btn:focus-visible,
  .suggestion-btn:focus-visible {
    outline: 2px solid var(--green); outline-offset: 2px;
  }
  .btn-start { background: var(--green); color: var(--on-green); }
  .btn-stop  { background: var(--red);  color: var(--on-red); }

   
  .chat-card {
    background: var(--card); border-radius: 12px; overflow: hidden;
    flex: 1; display: flex; flex-direction: column; min-height: 0;
    margin-bottom: 12px;
  }
  .chat-header {
    padding: 10px 16px; font-weight: 600;
    border-bottom: 1px solid var(--line);
    color: var(--muted); font-size: .8rem;
    text-transform: uppercase; letter-spacing: .5px;
    



  }
  











  .chat-body {
    position: relative;
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .chat-messages {
    flex: 1; overflow-y: auto; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 8px;
    


  }
  








  .chat-mask {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px;
    background: var(--scrim-chat);
    




    border-radius: 12px;
    color: var(--muted);
    pointer-events: auto;
    touch-action: none;
    overscroll-behavior: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    cursor: default;
  }
  .chat-mask.hidden { display: none; }
   
  .chat-mask-icon { width: 56px; height: 56px; }
  .chat-mask-icon.hidden { display: none; }
  















  @keyframes chat-mask-dash { to { stroke-dashoffset: -22; } }
  .chat-mask-icon.is-connecting {
    stroke-dasharray: 6 5;
    animation: chat-mask-dash .8s linear infinite;
  }
  















  @keyframes chat-mask-flash {
    0%, 100% { color: var(--muted); }
    30% { color: var(--mask-flash); }
  }
  .chat-mask-icon.is-flash {
    animation: chat-mask-flash .35s ease-out 1;
  }
  



  .status-zone { z-index: 2; }
  .msg {
    padding: 10px 14px; border-radius: 14px; font-size: .9rem;
    line-height: 1.5; word-break: break-word;
     
    max-width: min(90%, 68ch);
  }
  .msg.user {
    background: var(--user-bg); align-self: flex-end;
    border-bottom-right-radius: 4px;
  }
  .msg.agent {
    background: var(--agent-bg); align-self: flex-start;
    border-bottom-left-radius: 4px;
  }
  .msg.status {
    



    align-self: center; background: none; color: var(--muted);
    font-size: .8rem; text-align: center; padding: 4px;
  }
  .msg.system {
    align-self: center; color: var(--muted); font-size: .8rem;
    background: none; text-align: center; padding: 8px;
  }

  



  .chat-day {
    align-self: center; color: var(--muted); font-size: .72rem;
    letter-spacing: .4px; padding: 2px 8px 0;
    opacity: .8;
  }

   
  .suggestion-block {
     
    display: none;
    


    order: 99;
    

    margin-top: auto;
    flex-direction: column;
    gap: 8px;
    




    width: fit-content;
    align-items: stretch;
     
    max-width: min(90%, 68ch);
     
    margin-inline: auto;
  }

   
  .svg-sprite { display: none; }

  











  



  body:has(.dot.connected)
  .chat-messages:not(:has(.msg.user, .msg.agent)) .suggestion-block {
    display: flex;
  }

  









  



  body:has(.dot.connected)
  .chat-messages:has(.msg.user, .msg.agent) .suggestion-block {
    display: flex;
  }

  


  body:has(.dot.connected)
  .chat-messages:has(.msg.user, .msg.agent)
  .suggestion-block .suggestion-btn:not(.suggestion-slot) {
    display: none;
  }

  











  body:not(.turn-collectable) .suggestion-collect {
    display: none;
  }
  









  body:not(.reading-aloud) .suggestion-collect-para {
    display: none;
  }

  

















  body.reading-aloud .suggestion-slot[data-hide~="reading"],
  body.agent-speaking .suggestion-slot[data-hide~="speaking"],
  body:has(.talk-btn.active) .suggestion-slot[data-hide~="recording"] {
    display: none;
  }

  .suggestion-btn {
    

    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    border: none; background: none; border-radius: 10px;
    color: var(--text);
    font-size: .9rem; cursor: pointer;
    transition: color .2s;
  }
   
  .suggestion-ic { width: 18px; height: 18px; flex-shrink: 0; }
  .suggestion-btn:hover { color: var(--green); }

   
  .footer {
    flex-shrink: 0;
    border-top: 1px solid var(--line);
  }

   
  .segmented {
    display: inline-flex; background: var(--card); border-radius: 8px;
    padding: 2px; margin-left: 0;
  }
  .segmented button {
    border: none; background: none; padding: 4px 12px;
    border-radius: 6px; font-size: .78rem; color: var(--muted);
    cursor: pointer; transition: .15s;
  }
  .segmented button.active {
    background: var(--tint); color: var(--text); box-shadow: none;
  }
  .segmented button:disabled {
    cursor: default; opacity: .6;
  }

  .talk-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 20px;
    border: 2px solid var(--green); border-radius: 16px;
    background: transparent; color: var(--green);
    font-size: 1.2rem; font-weight: 700; letter-spacing: 1px;
    cursor: pointer; user-select: none;
    transition: background .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
  }
  .talk-btn:active, .talk-btn.active {
    background: var(--green); color: var(--on-green); transform: scale(.98);
  }
  .talk-btn.hidden { display: none; }
  .talk-btn:disabled {
    opacity: .4; cursor: not-allowed; border-color: var(--muted); color: var(--muted);
  }
  .talk-btn:disabled:active, .talk-btn:disabled.active {
    background: transparent; color: var(--muted); transform: none;
  }
  



  .talk-btn.busy {
    opacity: 1;
    border-color: var(--warn); color: var(--warn);
    background: transparent;
  }

  










  :root {
     
    --htt-pad: 8px 12px;       
    --htt-gap: 10px;           
    --pane-gap: 8px;           
    --mode-btn-size: 44px;     
    --mode-btn-fs: 1.3rem;
    --input-pad: 12px 14px;
    --input-fs: 1rem;          
    --input-radius: 12px;      
    --send-pad: 12px 18px;
    --send-fs: 1rem;
  }
  .htt-input {
    display: flex; align-items: center; gap: var(--htt-gap);
    padding: var(--htt-pad);
  }
  .htt-input.hidden { display: none; }
  






  .htt-input[aria-disabled="true"] { opacity: .55; }
  .htt-input[aria-disabled="true"] .talk-btn,
  .htt-input[aria-disabled="true"] .send-btn,
  .htt-input[aria-disabled="true"] .input-mode-btn,
  .htt-input[aria-disabled="true"] .text-input { cursor: not-allowed; }
  





  .htt-input[aria-disabled="true"] .talk-btn:active,
  .htt-input[aria-disabled="true"] .talk-btn.active,
  .htt-input[aria-disabled="true"] .talk-btn:hover {
    background: transparent; color: var(--green); transform: none;
  }
  .input-mode-btn {
    flex-shrink: 0; width: var(--mode-btn-size); height: var(--mode-btn-size);
    border: 1px solid var(--line); border-radius: var(--input-radius);
    background: var(--card); color: var(--text);
    font-size: var(--mode-btn-fs); line-height: 1; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .htt-input-main { flex: 1; min-width: 0; }
  #voicePane.hidden, .text-pane.hidden { display: none; }
  .text-pane { display: flex; align-items: center; gap: var(--pane-gap); }
  .text-input {
    flex: 1; min-width: 0;
    padding: var(--input-pad);
    border: 1px solid var(--line); border-radius: var(--input-radius);
    background: var(--bg); color: var(--text); font-size: var(--input-fs);
  }
  .text-input:focus { border-color: var(--green); outline: none; }
  .send-btn {
    flex-shrink: 0; padding: var(--send-pad);
    border: none; border-radius: var(--input-radius);
    background: var(--green); color: var(--on-green);
    font-size: var(--send-fs); font-weight: 700; cursor: pointer;
  }
  .send-btn:disabled { opacity: .4; cursor: not-allowed; }
