/* Quiet chat surface: phone loses the frame; larger screens retain wood below. */
#game[data-layout] #desktop-chat,#game[data-layout] #chat-preview{border:0;border-image:none;border-radius:5px;background:rgba(6,23,25,.58);box-shadow:none;outline:0;box-sizing:border-box;overflow:hidden;text-shadow:0 1px 2px #000;backdrop-filter:none}
#game[data-layout] #desktop-chat:before,#game[data-layout] #desktop-chat:after,#game[data-layout] #chat-preview:before,#game[data-layout] #chat-preview:after{display:none}
#game[data-layout] #desktop-chat{padding:7px 10px;width:clamp(256px,26vw,360px);height:202px;left:20px;bottom:22px}
#game #desktop-chat .chat-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:0 62px 5px 0;min-height:34px;align-items:stretch}
#game #desktop-chat .chat-tabs button{min-width:0;min-height:29px;padding:3px 0;border:0;border-image:none;border-radius:0;background:transparent;box-shadow:none;color:#bfc9bd;font-size:11px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game #desktop-chat .chat-tabs button[aria-selected=true]{background:rgba(211,188,128,.09);box-shadow:inset 0 -2px #d8bd7f;color:#f1db9e;font-weight:600}
#game #desktop-chat .chat-tabs button:focus-visible,#game #chat-preview button:focus-visible{outline:2px solid #e3c982;outline-offset:-2px}
#game #desktop-chat-minimize,#game #desktop-chat-collapse{position:absolute;top:4px;min-width:30px;width:30px;min-height:32px;height:32px;padding:0;border:0;border-image:none;border-radius:3px;background:transparent;box-shadow:none;color:#dbc99e;font-size:20px;z-index:2}
#game #desktop-chat-minimize{right:33px}#game #desktop-chat-collapse{right:3px}
#game #desktop-chat #chat-log{padding:1px 2px;scrollbar-width:thin;scrollbar-color:#839b8970 transparent}
#game #desktop-chat #chat-log p{font-size:12px;line-height:1.5;border:0;padding:2px 0;background:transparent}
#game #desktop-chat #chat-log strong{color:#d1bd8f;font-weight:500}
#game #desktop-chat #chat-log p[data-kind=warning],#game #desktop-chat #chat-log p[data-kind=error]{color:#efbba8}
#game #desktop-chat #chat-log time{color:#adb8ad}
#game #desktop-chat .chat-party-link{display:none}
#game #desktop-chat .chat-form{padding-top:5px;border-color:#a9b49a26}
#game #desktop-chat #chat-text{border:0;border-image:none;border-radius:3px;background:rgba(5,17,20,.45);font-size:13px;color:#eee6d4}
#game #desktop-chat .chat-compose button{border:0;border-image:none;background:rgba(150,172,139,.12);box-shadow:none;color:#e4d5ad}
#game #desktop-chat .chat-compose button:hover{background:rgba(150,172,139,.22)}
#game #chat-readonly{flex:none;margin:3px 0 0;padding:4px 2px 0;color:#b2b9a9;font-size:10px;text-align:right;border-top:1px solid #a9b49a20}
#game[data-layout] #chat-preview{left:20px;bottom:22px;width:clamp(256px,26vw,360px);height:90px;padding:5px 8px;gap:2px;display:flex}
#game .chat-preview-heading{min-height:26px;gap:5px}
#game #chat-preview button{width:30px;min-width:30px;height:28px;min-height:28px;padding:0;border:0;border-image:none;background:transparent;box-shadow:none;color:#dbc99e;font-size:19px}
#game #chat-preview-mode{margin-left:auto}#game #chat-expand{margin-left:0}
#game[data-chat-mode=line] #chat-preview{height:34px;flex-direction:row;align-items:center;gap:6px;padding:0 5px}
#game[data-chat-mode=line] .chat-preview-heading{display:contents}
#game[data-chat-mode=line] .chat-preview-label{font-size:10px;flex:none;max-width:38px;color:#d8c28f}
#game[data-chat-mode=line] #chat-preview-text{order:1;flex:1;min-width:0;display:block;font-size:12px}
#game[data-chat-mode=line] #chat-preview-text p{display:none}
#game[data-chat-mode=line] #chat-preview-text p:last-child{display:block;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game[data-chat-mode=line] #chat-preview-unread{order:2;flex:none}
#game[data-chat-mode=line] #chat-preview-mode{order:3;flex:none;margin:0}
#game[data-chat-mode=line] #chat-expand{order:4;flex:none}
@media(max-width:999px),(max-height:649px){
 #game[data-layout] #desktop-chat,#game[data-layout] #chat-preview{left:12px;bottom:194px;width:min(330px,calc(100% - 84px))}
 #game[data-layout] #desktop-chat{height:192px;padding:6px 8px}
 #game #desktop-chat .chat-tabs{min-height:34px;padding-right:62px}
 #game #desktop-chat #chat-text{font-size:16px;min-height:38px;height:38px}
 #game #desktop-chat .chat-compose button{min-height:38px;height:38px}
 #game[data-chat-mode=line] #chat-preview{height:44px}
 #game[data-chat-mode=line] #chat-preview button{min-height:40px;height:40px}
 #game.compact-keyboard #desktop-chat{height:160px;bottom:174px}
 #game.compact-keyboard #chat-preview{bottom:174px}
}
/* Desktop and tablet keep the approved wood; only phone chat is frameless. */
#game[data-layout=wide] #desktop-chat,#game[data-layout=tablet] #desktop-chat{border:10px solid transparent;border-image:var(--carved-panel) 115 / 12px stretch;border-radius:0;background-clip:padding-box;height:214px;padding:5px 7px}
#game[data-layout=wide] #chat-preview,#game[data-layout=tablet] #chat-preview{border:6px solid transparent;border-image:var(--carved-panel) 115 / 8px stretch;border-radius:0;background-clip:padding-box;height:104px;padding:3px 6px}
#game[data-layout=wide][data-chat-mode=line] #chat-preview,#game[data-layout=tablet][data-chat-mode=line] #chat-preview{height:44px;border-width:5px;border-image-width:7px;padding:0 4px}
#game[data-layout=tablet][data-chat-mode=line] #chat-preview button{height:32px;min-height:32px}
#game.compact-keyboard[data-layout=tablet] #desktop-chat{height:172px}
/* The quest header stays quiet when folded; expanded text gets contrast. */
#game #quest-tracker{box-sizing:border-box;padding:6px 10px;border:1px solid transparent;border-radius:5px;background:none;box-shadow:none}
#game #quest-tracker[open]{background:rgba(6,23,25,.48);border-color:rgba(220,203,157,.16)}
@media(max-height:599px) and (hover:none) and (pointer:coarse){
 #game[data-layout=tablet] #desktop-chat,#game[data-layout=tablet] #chat-preview{border:0;border-image:none;border-radius:5px}
 #game[data-layout=tablet] #desktop-chat{padding:6px 8px;height:192px}
 #game[data-layout=tablet] #chat-preview{padding:5px 8px;height:90px}
 #game[data-layout=tablet][data-chat-mode=line] #chat-preview{height:44px;padding:0 5px}
 #game[data-layout=tablet][data-chat-mode=line] #chat-preview button{height:40px;min-height:40px}
}
/* All-channel reading and a single chat entry; the former HUD slot is rest. */
#game .hud-tools #rest-button{display:flex;position:relative;left:auto;top:auto;transform:none;grid-column:auto;width:100%;height:100%;min-width:44px;padding:9px}
#game #desktop-chat .chat-tabs{grid-template-columns:repeat(6,minmax(0,1fr));padding-right:72px;gap:1px}
#game #desktop-chat-minimize{right:33px;width:40px;min-width:40px;font-size:11px;font-weight:500;letter-spacing:0}
#game #chat-preview #chat-preview-mode{width:38px;min-width:38px;font-size:11px;font-weight:500;letter-spacing:0;white-space:nowrap;line-height:16px}
#game #chat-preview-unread{display:inline-flex;gap:3px;align-items:center;color:inherit;background:transparent;border-radius:0;white-space:nowrap}
#game #chat-preview .chat-unread-chip{display:inline-flex;align-items:center;gap:3px;min-width:0;width:auto;height:26px;min-height:26px;padding:0 4px;border-radius:3px;font-size:11px;background:#0002}
#game #chat-preview .chat-unread-chip[data-unread-channel=party]{color:#96dfbe}
#game #chat-preview .chat-unread-chip[data-unread-channel=whisper]{color:#edafd7}
#game .chat-unread-chip b{font-size:11px;font-weight:600}
#game #desktop-chat #chat-log p[data-channel],#game #chat-preview-text p[data-channel]{--channel-color:#d8dfcc;color:var(--channel-color)}
#game #desktop-chat #chat-log p[data-channel=party],#game #chat-preview-text p[data-channel=party]{--channel-color:#96dfbe}
#game #desktop-chat #chat-log p[data-channel=world],#game #chat-preview-text p[data-channel=world]{--channel-color:#94cfee}
#game #desktop-chat #chat-log p[data-channel=whisper],#game #chat-preview-text p[data-channel=whisper]{--channel-color:#edafd7}
#game #desktop-chat #chat-log p[data-channel=system],#game #chat-preview-text p[data-channel=system]{--channel-color:#e4c88e}
#game #desktop-chat #chat-log p[data-channel] strong,#game #chat-preview-text p[data-channel] strong{color:inherit;font-weight:500}
#game .chat-channel{color:inherit;font-size:10px;opacity:.9;margin-right:5px}
#game #chat-preview-text .message-text{margin-left:4px}
#game #desktop-chat #chat-log .message-text{margin-left:4px}
#game #desktop-chat #chat-log p[data-kind=warning] .message-text,#game #desktop-chat #chat-log p[data-kind=error] .message-text{text-decoration:underline;text-decoration-color:#e8ac7166;text-underline-offset:3px}
#game[data-chat-mode=line] #chat-preview-text .chat-channel{display:inline}
@media(max-width:999px),(max-height:649px){
 #game #desktop-chat .chat-tabs{padding-right:72px}
 #game #chat-preview .chat-unread-chip{height:32px;min-height:32px}
}

#game #desktop-chat .chat-tabs button[data-chat=region]{--channel-color:#d8dfcc}
#game #desktop-chat .chat-tabs button[data-chat=party]{--channel-color:#96dfbe}
#game #desktop-chat .chat-tabs button[data-chat=world]{--channel-color:#94cfee}
#game #desktop-chat .chat-tabs button[data-chat=whisper]{--channel-color:#edafd7}
#game #desktop-chat .chat-tabs button[data-chat=system]{--channel-color:#e4c88e}
#game #desktop-chat .chat-tabs button[data-chat]{color:var(--channel-color,#e4ddc9)}
#game #desktop-chat .chat-tabs button[data-chat][aria-selected=true]{box-shadow:inset 0 -2px var(--channel-color,#e4ddc9)}
