/* Room-specific layout: Telegram supplies the app header. */
.kx-theme #room{padding:0!important;background:#f7f0e5!important;min-height:100svh}
.kx-room-pin{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;gap:6px;position:sticky;top:0;z-index:140;padding:8px 10px;background:#fff8ed;border-bottom:1px solid #e8ddcb}
.kx-pin-message{display:flex;gap:8px;align-items:center;border:0;background:#f0e7d9;border-radius:10px;min-height:44px;padding:8px 10px;color:#435372;font:inherit;font-size:12px;min-width:0;text-align:left}.kx-pin-message .uiIcon{width:18px;flex-shrink:0}.kx-pin-message span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kx-room-tool{width:44px;height:44px;display:grid;place-items:center;border:1px solid #e8ddcb;background:#fff;border-radius:10px;color:#13254d}
.kx-room-stage{background:#fff;padding:12px 14px 14px;border-bottom:1px solid #e8ddcb}.kx-stage-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#6c7b91;font-size:11px}.kx-stage-meta>span{overflow-wrap:anywhere;min-width:0}.kx-stage-meta .kx-link{white-space:nowrap;min-height:44px;font-size:12px}.kx-stage-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.kx-stage-title{font-size:19px;font-weight:850}.kx-stage-hint{font-size:12px;color:#6c7b91;line-height:1.65;margin-top:7px;max-width:280px}.kx-countdown{border:2px solid #e84420;border-radius:12px;min-width:46px;height:46px;display:grid;place-items:center;font-size:19px;font-weight:850;font-variant-numeric:tabular-nums}
.kx-room-chat{padding:18px 12px 110px;min-height:35vh}.kx-theme #room .msg{margin:16px 0!important;gap:9px!important}.kx-theme #room .msgAvatar{width:34px!important;height:34px!important;flex-basis:34px!important;border-radius:11px!important;border:1px solid #dfd3c0!important;background:#fff!important}.kx-theme #room .msgBody{max-width:calc(100% - 46px)!important;min-width:0}.kx-theme #room .msgName{color:#67758a!important;font-size:11px!important}.kx-theme #room .bubble{background:#fff!important;border:1px solid #e8ddcb!important;color:#13254d!important;border-radius:12px!important;box-shadow:none!important;font-size:14px!important;line-height:1.6!important;overflow-wrap:anywhere}.kx-theme #room .mine .bubble{background:#e4effd!important;border-color:#cbdcf3!important}.kx-theme #room .bubbleTime{color:#798499!important}.kx-theme #room .packetBubble,.kx-theme #room .gamePacketCard{background:#e84420!important;color:#fff!important;border:0!important;min-width:min(250px,64vw)!important}.kx-theme #room .packetBubble small{color:#fff0d9!important}.kx-theme #room .packetBubble .bubbleTime,.kx-theme #room .gamePacketCard .bubbleTime{color:#ffdfcb!important}.kx-theme #room .gamePacketIcon{background:#fff1d5!important;box-shadow:none!important;color:#c93820}.kx-theme #room .gamePacketTitle,.kx-theme #room .gamePacketMeta,.kx-theme #room .gamePacketFoot,.kx-theme #room .gamePacketCta{color:#fff8ed!important}.kx-theme #room .gamePacketFoot{padding-bottom:24px}.kx-theme #room .imageBubble img,.kx-theme #room .stickerBubble img{max-width:100%;height:auto}
.kx-theme #room .kx-room-composer{position:fixed!important;top:auto!important;left:50%;transform:translateX(-50%);bottom:var(--kx-vv-bottom,0px);z-index:180;width:min(430px,100%);display:flex;align-items:center;gap:8px;padding:10px 10px max(10px,env(safe-area-inset-bottom));border-top:1px solid #e8ddcb;background:#fff8ed}.kx-theme #room .circleTool,.kx-theme #room .sendBtn{min-width:44px;width:44px;height:44px;flex:0 0 44px;border-radius:12px;background:#efe6d7!important;border:0!important;color:#13254d!important}.kx-theme #room .sendBtn.ready{background:#e84420!important;color:white!important}.kx-theme #room #roomInput{min-width:0;flex:1;min-height:44px;border:1px solid #d4c7b4;border-radius:12px;background:#fff;color:#13254d;padding:10px;font:inherit;font-size:16px}
.kx-theme #room .roomAccessoryPanel{bottom:calc(66px + var(--kx-vv-bottom,0px))!important;background:#fff8ed!important;color:#13254d!important;border-top:1px solid #e8ddcb!important;backdrop-filter:none!important}.kx-theme #room .roomToolButton{color:#13254d!important;min-height:70px!important}.kx-theme #room .roomToolButton i{background:#efe6d7!important;color:#e84420!important;box-shadow:none!important;border:0!important;display:grid;place-items:center}.kx-theme #room .roomAccessoryHead,.kx-theme #room .chatDiceNote{color:#6c7b91!important}.kx-theme #room .roomAccessoryBack,.kx-theme #room .stickerUpload{background:#eaf1fb!important;color:#174f9d!important;border:0!important;min-height:44px}.kx-theme #room .chatDiceSend{background:#e84420!important;color:#fff!important;min-height:44px;border:0}.kx-theme #room .chatDiceBox{background:transparent!important}.kx-theme #room .emojiGrid button{min-height:44px}.kx-theme #room .stickerEmpty{color:#6c7b91!important}
.kx-theme .roomConnectionWarn,.kx-theme .roomMuteBar{position:static!important;margin:0!important;padding:12px!important;background:#fff0e7!important;color:#ab3c25!important;font-size:13px!important;line-height:1.5!important}
.kx-theme .dicePanel{background:#f4ecdf;border:1px solid #e8ddcb;box-shadow:none}.kx-theme .diceLabel{color:#6c7b91}.kx-theme .diceRollBtn{background:#e84420;color:white;min-height:44px}.kx-theme .diceTriple{color:#b54321}.kx-theme .packetScoreHero{background:#fff0df;border:1px solid #ecd8b9;box-shadow:none}.kx-theme .packetScoreHero .big{color:#b83b20}.kx-theme .packetStatusPill{background:#fff;color:#435372}.kx-theme .packetScoreRow{background:#fff;border:1px solid #e8ddcb;color:#13254d}.kx-theme .packetScoreRow.me{background:#eaf1fb;border-color:#bacdea}.kx-theme .packetScoreAvatar{background:#efe6d7;color:#13254d}.kx-theme .packetScoreCard{color:#6c7b91}.kx-theme .packetWaiting{color:#6c7b91;border-color:#d6c9b6}.kx-theme .pinnedItem{background:#fff;border:1px solid #e8ddcb;color:#13254d}.kx-theme .pinnedItem b{color:#13254d}.kx-theme .pinnedItem small{color:#6c7b91}
/* Approved chat composition: fixed chrome, one independent message viewport. */
.kx-theme #room.active{position:fixed!important;top:var(--kx-room-top,var(--kx-content-top,0px))!important;left:50%!important;transform:translateX(-50%)!important;width:min(430px,100%)!important;height:calc(var(--kx-viewport-height,100svh) - var(--kx-room-top,var(--kx-content-top,0px)))!important;min-height:0!important;max-height:none!important;padding:0!important;margin:0!important;display:flex!important;flex-direction:column;overflow:hidden!important;z-index:100;background:#fff9ee!important}
.kx-room-fixed{flex:0 0 auto;background:#fffdf7;z-index:2;box-shadow:0 3px 12px #22385908}
.kx-room-header{display:flex;align-items:center;gap:10px;padding:8px 12px;min-height:62px;border-bottom:1px solid #e7edf2;background:#ffffffed}
.kx-room-header>img{width:40px;height:40px;object-fit:contain;border-radius:50%;background:#e6f1fb}
.kx-room-header>div{flex:1;min-width:0}.kx-room-header b{display:block;color:#112f59;font-size:15px;line-height:1.4}.kx-room-header small{display:block;color:#5b7695;font-size:11px;margin-top:3px}
.kx-room-header small:before{content:'';display:inline-block;width:6px;height:6px;background:#71a896;border-radius:50%;margin-right:5px}
.kx-room-header .kx-room-tool{border:0;background:transparent;width:36px;min-width:36px;height:44px}.kx-room-header .uiIcon{width:21px;height:21px}
.kx-room-fixed .kx-room-pin{position:static;display:block;padding:0;background:#e9f3ff;border-bottom:1px solid #d8e8f8}
.kx-room-fixed .kx-pin-message{width:100%;border-radius:0;background:transparent;min-height:40px;padding:8px 12px;color:#224c7d}.kx-pin-message>span{flex:1;min-width:0}.kx-pin-message>.uiIcon:last-child{width:14px}
.kx-room-fixed .kx-room-stage{padding:8px 12px 10px;background:#fff;border-bottom:1px solid #e8e6df}.kx-room-fixed .kx-stage-meta{font-size:10px}.kx-room-fixed .kx-stage-meta .kx-link{min-height:22px;padding:0;font-size:10px}.kx-room-fixed .kx-stage-title{font-size:18px}.kx-room-fixed .kx-stage-hint{font-size:11px;margin-top:3px;max-width:300px}.kx-room-fixed .kx-countdown{min-width:44px;height:44px;font-size:21px;color:#e84420}
.kx-theme #room .kx-room-chat{flex:1 1 0;min-height:0!important;overflow-y:auto;overscroll-behavior-y:contain;overflow-anchor:none;padding:12px 12px 16px!important;background:linear-gradient(#fff9ee70,#fff9ee85),url('kx-ref-landscape.webp') center / cover;-webkit-overflow-scrolling:touch}
.kx-theme #room .msg{margin:12px 0!important}.kx-theme #room .msgAvatar{width:32px!important;height:32px!important;flex-basis:32px!important;border-radius:50%!important}.kx-theme #room .bubble{font-size:13px!important;line-height:1.65!important;padding:10px 12px 23px!important;box-shadow:0 2px 6px #19355605!important}.kx-theme #room .msgName{color:#26466a!important}.kx-theme #room .mine .bubble{background:#dfefff!important}
.kx-theme #room .kx-room-composer{position:static!important;transform:none!important;flex:0 0 auto;left:auto!important;bottom:auto!important;min-height:68px;width:100%;padding:10px 10px max(10px,var(--kx-safe-bottom,0px))!important;background:#fffdf7;gap:7px;z-index:3}
.kx-theme #room .kx-room-add{background:#153d6a!important;color:white!important;border-radius:50%!important}.kx-theme #room #roomLeftToolBtn{width:36px!important;min-width:36px;flex-basis:36px!important;background:transparent!important}
.kx-theme #room #roomInput{border-radius:24px;font-size:14px;min-height:44px;padding:10px 13px}.kx-theme #room .sendBtn{border-radius:50%!important}
.kx-room-new{position:absolute;right:14px;bottom:calc(84px + var(--kx-safe-bottom,0px));z-index:5;background:white;color:#193d68;border:1px solid #dbe4ee;border-radius:24px;box-shadow:0 5px 16px #294e7522;padding:11px 15px;font-size:12px;font-weight:750;min-height:44px}.kx-room-new[hidden]{display:none!important}
.kx-theme #room .roomAccessoryPanel{position:absolute!important;bottom:calc(68px + var(--kx-safe-bottom,0px))!important;max-height:min(42vh,220px)!important;z-index:6}
.kx-room-fixed .roomConnectionWarn,.kx-room-fixed .roomMuteBar{padding:7px 12px!important;font-size:11px!important}
.kx-room-composer .kx-room-add{order:0}.kx-room-composer #roomInput{order:1}.kx-room-composer #roomLeftToolBtn{order:2}.kx-room-composer #sendBtn{order:3}

/* Compact room chrome: share the native controls band without covering its buttons. */
.kx-room-header{position:relative;justify-content:center;min-height:48px;padding:5px 12px;gap:0}
.kx-room-header>img{display:none}.kx-room-header>div{flex:0 1 auto;text-align:center;max-width:100%}
.kx-room-header b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kx-room-header small{font-size:10px;margin-top:1px}
.kx-room-native-controls .kx-room-header{height:var(--kx-room-controls-height,44px);min-height:44px;padding:2px 94px;box-sizing:border-box}
.kx-room-fixed .kx-room-pin{display:flex;align-items:center;padding:0 5px;gap:0}
.kx-room-fixed .kx-pin-message{flex:1;min-width:0;width:auto;min-height:44px;padding:5px 7px;font-size:11px}
.kx-room-pin>.kx-room-tool{flex:0 0 40px;width:40px;height:44px;border:0;background:transparent;border-radius:8px}.kx-room-pin>.kx-room-tool .uiIcon{width:19px;height:19px}
.kx-room-fixed .kx-room-stage{padding:3px 12px 5px}.kx-room-fixed .kx-stage-meta{font-size:9px}.kx-room-fixed .kx-stage-meta .kx-link{min-height:20px;font-size:10px}
.kx-room-fixed .kx-stage-title{font-size:14px;line-height:1.35}.kx-room-fixed .kx-stage-hint{font-size:10px;line-height:1.4;margin-top:2px;max-width:none}
.kx-stage-top>div:first-child{flex:1;min-width:0}.kx-room-fixed .kx-countdown{min-width:30px;width:30px;height:30px;border-radius:9px;font-size:16px;flex-shrink:0}
.kx-theme #room .kx-room-composer{min-height:56px;padding:6px 10px max(6px,var(--kx-room-bottom,env(safe-area-inset-bottom,0px)))!important}
.kx-room-new{bottom:calc(68px + var(--kx-room-bottom,0px))}.kx-theme #room .roomAccessoryPanel{bottom:calc(56px + var(--kx-room-bottom,0px))!important}

/* One red-and-gold envelope identity, compact in chat and expanded on opening. */
.kx-theme #room .gamePacketCard{width:min(270px,68vw)!important;min-width:0!important;border:1px solid #f8c779!important;border-radius:14px!important;background:linear-gradient(135deg,#ed5030,#ca2c22)!important;position:relative;padding:0!important;box-shadow:0 3px 8px #a5332018!important}
.kx-theme #room .gamePacketTop{padding:12px 12px 10px;gap:9px;min-height:78px}.kx-theme #room .gamePacketIcon{width:48px;height:54px;background:transparent!important;box-shadow:none!important;flex-shrink:0}.gamePacketIcon img{width:100%;height:100%;object-fit:contain}
.kx-theme #room .gamePacketTitle{font-size:13px}.kx-theme #room .gamePacketMeta{font-size:10px;line-height:1.6;overflow-wrap:anywhere}.kx-theme #room .gamePacketFoot{padding:7px 12px 22px;font-size:10px;border-color:#f8dcaf55}.kx-theme #room .gamePacketCta{color:#ffdf9d!important}.kx-theme #room .gamePacketCard:before{content:'';position:absolute;top:0;left:0;right:0;height:9px;border-bottom:1px solid #ffd58080;border-radius:0 0 50% 50%;pointer-events:none}
.kx-theme #sheet:has(.kx-envelope-panel){padding:22px 16px 14px!important;background:#fff9ef!important}.kx-theme #sheet:has(.kx-envelope-panel)>.close{z-index:5}.kx-theme #sheet:has(.kx-envelope-panel):before{display:none}
.kx-envelope-panel{position:relative;margin-top:38px;padding:54px 16px 14px;border-radius:22px;background:linear-gradient(145deg,#eb563c,#c42d27);border:1px solid #edbd77;color:#fff7e5;text-align:center;box-shadow:0 10px 28px #bd352520;overflow:visible}
.kx-envelope-panel:before{content:'';position:absolute;inset:0 0 auto;height:78px;border-bottom:2px solid #f6ca83;border-radius:21px 21px 50% 50%;background:linear-gradient(155deg,#ef6448,#d6382a);pointer-events:none}
.kx-envelope-mascot{position:absolute;top:-52px;left:50%;transform:translateX(-50%);width:96px;height:96px;object-fit:contain;z-index:1}.kx-envelope-seal{position:relative;display:grid;place-items:center;margin:0 auto 12px;width:44px;height:44px;border-radius:50%;border:3px double #bc812a;background:linear-gradient(145deg,#fff0bd,#e6ae55);color:#925f21;font-weight:900;box-shadow:0 3px 8px #752c2633}
.kx-envelope-heading{position:relative;font-size:17px;font-weight:850}.kx-envelope-value{font-size:32px;line-height:1.4;font-weight:900;color:#fff5d4}.kx-envelope-caption,.kx-envelope-total{font-size:12px;line-height:1.5;color:#ffebca}.kx-envelope-total{margin-top:5px}.kx-envelope-open{display:block;width:70px;height:70px;margin:18px auto;border-radius:50%;border:4px double #c79643;background:linear-gradient(145deg,#fff2c6,#edbc66);color:#704514;font-size:32px;font-weight:900;box-shadow:0 4px 10px #81292355;cursor:pointer}.kx-envelope-open:disabled{opacity:.6}.kx-envelope-state{margin:16px 0;font-size:12px;line-height:1.6;color:#ffedcf}
.kx-envelope-receipt{margin-top:16px;padding:12px 10px;border-radius:15px;background:#fffaf0;color:#163352;box-shadow:0 3px 12px #7a302017}.kx-envelope-receipt h4{margin:0 0 10px;font-size:14px}.kx-envelope-receipt .packetScoreRow{grid-template-columns:30px minmax(0,1fr) auto;gap:7px;padding:9px 7px;text-align:left;background:#fffdfa;border:1px solid #ead9c1;border-radius:10px;color:#163352}.kx-envelope-receipt .packetScoreAvatar{width:28px;height:28px;border-radius:50%;background:#f5e3bd;color:#8e642d;font-size:12px}.kx-envelope-receipt .packetScoreRow b{font-size:12px}.kx-envelope-receipt .packetScoreAmt{font-size:14px;white-space:nowrap}.kx-envelope-receipt .packetScoreCard{font-size:10px;color:#728092}.kx-envelope-receipt .packetScoreRow.me{background:#f1f6fc;border-color:#bcd1e8}.kx-envelope-summary{font-size:11px;margin-top:10px;line-height:1.7}.kx-envelope-empty{font-size:12px;padding:8px;color:#7a8795}.kx-envelope-dismiss{width:100%;min-height:44px;margin-top:12px;border-radius:12px;border:1px solid #ecc381;background:linear-gradient(125deg,#fff0bf,#efc274);color:#70471d;font-weight:800;font-size:14px}.kx-envelope-round{display:block;margin-top:8px;font-size:9px;color:#ffdfbf}.kx-envelope-panel.opened .kx-envelope-value{color:#fff4c5}

/* Override legacy #room > * positioning: unread is an overlay, never a layout row. */
.kx-theme #room>.kx-room-new{position:absolute!important;left:auto!important;right:12px;bottom:calc(68px + var(--kx-room-bottom,0px));z-index:5;width:max-content!important;max-width:calc(100% - 24px);min-width:0;min-height:40px;flex:0 0 auto;padding:9px 13px;white-space:nowrap;line-height:20px;border-radius:22px}

/* Tools are a compact dock in the room flex layout, not a viewport overlay. */
.kx-theme #room>.roomAccessoryPanel{position:static!important;left:auto!important;bottom:auto!important;transform:none!important;flex:0 0 auto;width:100%!important;margin:0!important;border-radius:0!important;box-shadow:none!important;z-index:3!important;padding:8px 12px!important;max-height:min(32vh,200px)!important;background:#fffaf2!important}
.kx-theme #room .roomToolStripRight{max-width:none;width:100%;margin:0;grid-template-columns:repeat(2,72px)!important;justify-content:start;gap:12px!important}
.kx-theme #room>.kx-room-new{bottom:calc(var(--kx-room-dock-height,56px) + 12px)}

/* Row reversal puts the flex start at the right; flex-end would push own messages left. */
.kx-theme #room .msg.mine{flex-direction:row-reverse;justify-content:flex-start}
.kx-theme #room .msg.mine .msgAvatar{order:0}
.kx-theme #room .msg.mine .msgBody{align-items:flex-end}
.kx-room-balance{padding:18px 16px;margin:16px 0;border:1px solid #d7e4f3;border-radius:16px;background:#f1f7ff;color:#13254d}
.kx-room-balance>small,.kx-room-balance-details small{display:block;font-size:12px;color:#67758a}
.kx-room-balance>strong{display:block;font-size:30px;line-height:1.4;margin:5px 0 18px;overflow-wrap:anywhere}
.kx-room-balance-details{display:grid;grid-template-columns:1fr 1fr;gap:12px}.kx-room-balance-details b{display:block;font-size:16px;margin-top:5px;overflow-wrap:anywhere}
.kx-room-balance p{font-size:12px;color:#67758a;margin:14px 0 0}

/* Compact system seal announcement, anchored to the actual sealed-round message. */
.kx-theme #room .kx-stop-bet-banner{display:block;width:min(290px,100%);height:auto;aspect-ratio:3/1;object-fit:contain;margin:2px 0 8px;border:0;background-color:transparent;background-repeat:no-repeat;background-size:contain;background-position:center}

/* Game envelopes float in the center without the generic bottom-sheet card. */
.kx-theme #sheetMask:has(.kx-envelope-panel){align-items:center!important;padding:16px;background:#101a2a99;backdrop-filter:none}
.kx-theme #sheet:has(.kx-envelope-panel){width:min(350px,100%);margin:auto!important;padding:52px 0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;max-height:calc(var(--kx-viewport-height,100svh) - 32px);overflow-y:auto}
.kx-theme #sheet:has(.kx-envelope-panel)>.close{display:none!important}
.kx-theme #sheet .kx-envelope-panel{margin-top:0}

/* Consecutive messages share one sender heading and avatar gutter. */
.kx-theme #room .msg.continuesGroup{margin-bottom:3px!important}
.kx-theme #room .msg.grouped{margin-top:3px!important}
.kx-theme #room .msg.grouped .msgName{display:none!important}
.kx-theme #room .msg.continuesGroup .msgAvatar{visibility:hidden;height:40px!important}
.kx-theme #room .msg:not(.continuesGroup) .msgAvatar{visibility:visible!important;height:40px!important}
.kx-theme #room .msgAvatar{align-self:flex-start;margin-top:0}
.kx-theme #room .msgName{line-height:16px!important;margin-bottom:5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kx-theme #room .msgAvatar{width:40px!important;height:40px!important;flex-basis:40px!important}
.kx-theme #room .msgBody{max-width:calc(100% - 54px)!important}
.kx-theme #room .msgAvatar img{display:block;width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%!important;border:0!important;border-radius:inherit;box-shadow:none!important}

/* Three dice preview uses a full-width row rather than the legacy single-die grid. */
.kx-theme #room .chatDiceBox{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;gap:6px!important;padding:2px 0!important;text-align:center!important}
.kx-theme #room .gameDicePreview{grid-column:1!important;display:flex;justify-content:center;gap:12px;margin:0 0 2px!important;min-width:0}
.kx-theme #room .gameDicePreview .wxDice{grid-row:auto!important;margin:0!important;width:44px;height:44px;flex:0 0 44px;transform:none!important;border-radius:10px}
.kx-theme #room .gameDicePreview .wxDicePips{width:32px;height:32px}
.kx-theme #room .gameDicePreview .wxDicePips i{width:6px;height:6px}
.kx-theme #room .chatDiceSend{grid-column:1!important;width:100%;min-width:0;height:44px!important}
.kx-theme #room .chatDiceNote{grid-column:1!important;width:100%;margin:0!important;line-height:1.5;overflow-wrap:anywhere}

/* Accessory trays open below the input bar, sharing the room height with chat. */
.kx-theme #room.tools-open .kx-room-composer{padding-bottom:6px!important;border-bottom:1px solid #e8ddcb}
.kx-theme #room.tools-open>.roomAccessoryPanel{border-top:0!important;padding-bottom:max(8px,var(--kx-room-bottom,env(safe-area-inset-bottom,0px)))!important}

.kx-player-message-action{-webkit-touch-callout:none;user-select:none}
.kx-message-menu-mask{position:fixed;inset:0;z-index:10000;background:#0005}
.kx-message-menu{position:absolute;display:flex;width:164px;border:1px solid #dfd3c0;border-radius:13px;overflow:hidden;background:#fffaf2;box-shadow:0 8px 24px #0003}
.kx-message-menu button{flex:1;min-height:56px;border:0;background:transparent;color:#173b65;font-size:14px;font-weight:700;cursor:pointer}
.kx-message-menu button+button{border-left:1px solid #e8ddcb}.kx-message-menu button:disabled{opacity:.4;cursor:default}
.kx-room-reply-bar{display:flex;flex:0 0 auto;align-items:center;gap:10px;padding:7px 12px;background:#fffaf2;border-top:1px solid #e8ddcb;color:#173b65}
.kx-room-reply-bar>div{flex:1;min-width:0;border-left:3px solid #e84420;padding-left:8px}.kx-room-reply-bar b,.kx-room-reply-bar span{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kx-room-reply-bar span{color:#6c7b91;margin-top:3px}
.kx-room-reply-bar button{width:44px;height:36px;border:0;background:transparent;font-size:23px;color:#6c7b91}
.kx-reply-quote{border-left:3px solid #7098c0;background:#e6edf580;padding:5px 8px;margin-bottom:6px;border-radius:4px;color:#435372}
.kx-reply-quote b,.kx-reply-quote span{display:block;font-size:11px;line-height:1.5;overflow-wrap:anywhere}.kx-reply-quote span{max-height:33px;overflow:hidden}

/* Suppress WebView image callouts without blocking player message actions or scroll. */
.kx-room-chat img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}

/* Decorative chat images must not become native WebView long-press targets. */
.kx-room-chat img,.kx-room-chat .kx-stop-bet-banner{pointer-events:none;-webkit-touch-callout:none;user-select:none}

/* Stickers keep their own compact bounds instead of inheriting text bubbles. */
html[data-appearance] .kx-theme #room .msg .msgBody .bubble.stickerBubble{width:fit-content;min-width:0!important;max-width:112px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0 0 18px!important}
html[data-appearance] .kx-theme #room .msg .msgBody .bubble.stickerBubble img{display:block;width:auto!important;height:auto!important;max-width:112px!important;max-height:112px!important;object-fit:contain;border-radius:8px}
html[data-appearance] .kx-theme #room .msg .msgBody .bubble.stickerBubble .bubbleTime{right:0;bottom:0;background:transparent;padding:0}

.kx-mention-alert{flex:none;display:flex;justify-content:space-between;gap:8px;width:100%;border:0;border-top:1px solid #dccba9;background:#fff0cb;color:#805217;padding:10px 14px;font-size:12px;font-weight:700;text-align:left}.kx-mention-alert[hidden]{display:none}.kx-mention-alert span{white-space:nowrap}.kx-mention-highlight{outline:2px solid #e6ae40;outline-offset:3px;border-radius:12px}html[data-appearance=dark] .kx-mention-alert{background:#443825;color:#ffe0a1;border-color:#685439}


/* Compact collection: scroll to browse, first cell adds a personal sticker. */
.kx-sticker-tray{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 10px;padding:8px 0;align-items:start}
html[data-appearance] .kx-theme .kx-sticker-tray .stickerItem{min-width:0;aspect-ratio:1;background:transparent!important;border:0!important;border-radius:4px;padding:3px;cursor:pointer}
html[data-appearance] .kx-theme .kx-sticker-tray .stickerItem img{position:absolute;inset:3px;width:calc(100% - 6px)!important;height:calc(100% - 6px)!important;object-fit:contain;border-radius:2px}
html[data-appearance] .kx-theme .kx-sticker-tray .stickerItem.kx-sticker-add{border:1.5px dashed #8993a6!important;border-radius:8px;color:#8993a6;font-size:38px;font-weight:300;line-height:1}
.kx-theme #room.tools-open>.roomAccessoryPanel:has(.kx-sticker-tray){max-height:min(36vh,300px)!important;overscroll-behavior:contain;scrollbar-width:thin}

.kx-sticker-tray img[data-sticker-src]{visibility:hidden}
