.osk-chat,.support-body{font-family:system-ui,-apple-system,"PingFang SC",sans-serif;color:#202829;font-size:14px;line-height:1.5}
.osk-chat *,.support-body *{box-sizing:border-box}
.osk-chat{position:fixed;inset:auto 122px 24px auto;width:400px;max-width:calc(100vw - 32px);height:min(660px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);margin:0;padding:0;border:0;border-radius:8px;box-shadow:0 16px 60px #0003;background:#fff;overflow:hidden}
.osk-chat[open]{display:flex;flex-direction:column}
.osk-chat::backdrop{background:#0002}
.osk-chat header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #e4e8e8;flex-shrink:0}
.osk-chat header strong{font-size:18px;font-weight:600}
.osk-chat header p{font-size:12px;color:#536063;margin:5px 0 0}
.chat-close{min-width:44px;min-height:44px;border:0;background:transparent;font-size:28px;color:#475456;cursor:pointer}
.chat-history{overflow:auto;overscroll-behavior:contain;min-height:80px;flex:1;padding:20px;color:#596366;overflow-wrap:anywhere}
.chat-message{margin:0 32px 20px 0;max-width:95%}
.chat-message.mine{margin-left:32px;margin-right:0}
.chat-message small{font-size:12px;color:#5f686a;display:block;margin-bottom:5px}
.chat-message p{white-space:pre-wrap;overflow-wrap:anywhere;background:#f1f3f3;color:#202829;margin:0;padding:12px 14px;border-radius:4px;line-height:1.6}
.chat-message.mine p{background:#e7eff3}
.chat-hint{font-size:12px;color:#5f686a;padding:0 22px;margin:0 0 12px}
.osk-chat form{padding:0 22px}
.osk-chat label,.support-body label{display:block;margin-bottom:6px;font-weight:550}
.osk-chat textarea,.support-body textarea,.support-body input{display:block;width:100%;border:1px solid #9eaeb3;border-radius:4px;padding:10px;font:inherit;resize:vertical;max-height:140px;background:#fff;color:#202829}
.osk-chat textarea::placeholder{color:#627074}
.chat-send-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:10px;min-height:64px}
.chat-send,.support-body button[type=submit]{border:0;border-radius:4px;background:#202f33;color:#fff;padding:10px 20px;min-height:44px;font:inherit;cursor:pointer;flex-shrink:0}
.chat-send:disabled,.support-body button:disabled{background:#566268;cursor:wait}
.chat-status{font-size:12px;color:#47575d}
.osk-chat .chat-inquiry{font-size:12px;color:#205f80;margin:0 22px 18px;text-decoration:underline;text-underline-offset:3px}
.osk-chat :focus-visible,.support-body :focus-visible{outline:2px solid #075da4;outline-offset:3px}
.support-body{background:#f8f9f9;margin:0;min-width:320px}
.support-body [hidden]{display:none!important}
.support-top{height:72px;display:flex;justify-content:space-between;align-items:center;padding:0 28px;background:#fff;border-bottom:1px solid #e5e8e8;gap:20px}
.support-brand{font-size:24px;color:#1c292d;text-decoration:none;font-weight:700;white-space:nowrap}
.support-brand span{font-size:14px;font-weight:500;margin-left:16px}
#staff-state{font-size:13px;color:#536063}
.support-body #logout,.support-body #back-list{background:#fff;border:1px solid #bcc6c9;border-radius:4px;padding:8px 12px;min-height:40px;color:#303d41;font:inherit;cursor:pointer}
.support-main{max-width:1400px;margin:auto;padding:24px}
#staff-login{max-width:400px;margin:10vh auto}
.support-body h1{font-size:24px;margin:0 0 12px;font-weight:600}
#staff-login>p{color:#586367;margin:0 0 28px}
#login-form button{margin-top:16px}
#login-status{color:#9c3027}
#staff-inbox{display:grid;grid-template-columns:320px minmax(0,1fr);height:calc(100dvh - 120px);min-height:400px;background:#fff;border:1px solid #e2e7e8;border-radius:6px;overflow:hidden}
.staff-list{padding:24px 16px;overflow:auto;border-right:1px solid #e2e7e8}
.staff-list h1,.staff-list>p{margin-left:8px}
.staff-list>p{font-size:13px;color:#5d686c}
.conversation{display:block;width:100%;border:0;border-radius:4px;background:white;color:#253237;text-align:left;padding:14px 12px;cursor:pointer;font:inherit;margin-top:4px}
.conversation.selected{background:#eaf0f2}
.conversation:hover{outline:1px solid #c7d1d4;outline-offset:-1px}
.conversation strong{display:block;font-size:14px;font-weight:550}
.conversation span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#59666a;margin-top:6px}
.conversation small{display:block;color:#59666a;font-size:12px;margin-top:6px;font-variant-numeric:tabular-nums}
.staff-detail{display:flex;flex-direction:column;min-width:0;min-height:0}
.staff-detail header{padding:18px 24px;border-bottom:1px solid #e2e7e8;min-height:64px}
.staff-detail h2{font-size:16px;margin:0;font-weight:550}
.staff-detail .chat-history{padding:24px;max-width:850px;width:100%;margin-inline:auto}
#reply-form{padding:16px 24px 8px;border-top:1px solid #e2e7e8}
#reply-status{font-size:13px;color:#536063}
#back-list{display:none}
@media(max-width:700px){
 .osk-chat{inset:auto 12px 12px;width:calc(100vw - 24px);max-width:none;height:min(660px,calc(100dvh - 24px));max-height:calc(100dvh - 24px)}
 .support-top{padding:0 16px;height:auto;min-height:64px;flex-wrap:wrap;gap:8px;padding-block:12px}
 .support-main{padding:12px}
 #staff-inbox{display:block;height:calc(100dvh - 120px)}
 .staff-list{height:100%;border:0}.staff-detail{display:none;height:100%}
 #staff-inbox.detail-open .staff-list{display:none}#staff-inbox.detail-open .staff-detail{display:flex}
 #back-list{display:inline-block!important;margin-right:12px}.staff-detail header{display:flex;align-items:center;padding:12px}
 .staff-detail .chat-history{padding:16px}#reply-form{padding:12px}
}
/* The visitor can read and browse while the chat window stays open. */
.osk-chat{inset:auto 24px 88px auto;height:min(620px,calc(100dvh - 112px));max-height:calc(100dvh - 112px)}
@media(max-width:700px){.osk-chat{inset:auto 12px 80px;width:calc(100vw - 24px);height:min(620px,calc(100dvh - 96px));max-height:calc(100dvh - 96px)}}
.osk-chat{z-index:100}
.osk-chat textarea{font-size:16px}
@media(max-width:700px) and (max-height:600px){
 .osk-chat{inset:auto 8px 8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
 .osk-chat header{padding:12px 16px}
 .osk-chat .chat-history{padding:12px;min-height:40px}
 .osk-chat .chat-hint{margin-bottom:8px;padding-inline:16px}
 .osk-chat form{padding-inline:16px}
 .osk-chat textarea{height:70px}
 .osk-chat .chat-inquiry{margin-bottom:12px}
}
@media(max-width:700px) and (max-height:500px){.osk-chat .chat-hint,.osk-chat .chat-inquiry{display:none}}
