/* The messenger uses the platform's type, lavender and rounded controls. */
.chat-composer-row{display:grid!important;grid-template-columns:44px 44px minmax(0,1fr) 44px 44px;gap:4px!important;align-items:center!important;padding:5px 6px!important}
.chat-composer-row[hidden],.chat-record-studio [hidden],#sticker-studio [hidden],.sticker-manager [hidden]{display:none!important}
.chat-composer-row>.icon-button{width:44px!important;min-width:44px!important;height:44px!important;margin:0!important;padding:10px!important}
.chat-composer-row textarea{width:100%;min-width:0;padding:10px 6px!important;grid-column:3}
.chat-composer-row>.icon-button svg{width:23px;height:23px;stroke-width:1.8}
.chat-media-categories [data-sticker-pack]{width:48px;height:48px;min-width:48px;padding:4px;border-radius:14px}
.chat-media-categories [data-sticker-pack] img{width:40px;height:40px;object-fit:contain}
.chat-pack-heading button{width:40px;height:40px;border:1px solid #d8cfe5;border-radius:12px;background:#f8f6fc;padding:8px}
.chat-action-list a{display:flex;align-items:center;gap:10px;padding:10px 14px;color:inherit;text-decoration:none;border-radius:10px}
.delete-message-options{display:grid;gap:12px}.delete-message-options>button{display:grid;grid-template-columns:24px 1fr;text-align:left;gap:4px 10px;padding:16px;border:1px solid #d8cfe5;border-radius:16px}.delete-message-options small{grid-column:2;color:#736a80;font-size:13px}
.chat-circle-player{width:min(256px,100%);display:grid;gap:6px;justify-items:center;background:none!important}
.chat-circle-stage{position:relative;width:100%;aspect-ratio:1;isolation:isolate}
.chat-circle-stage>video{position:absolute;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px);border-radius:50%;object-fit:cover;background:#27232d;border:0}
.circle-ring{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke-width:2.4;overflow:visible;touch-action:none;z-index:2;pointer-events:none}
.circle-ring circle{stroke-width:1.8px}
.circle-ring-track{stroke:#cfc2e0;opacity:.55}.circle-ring-progress{stroke:#8255b4;stroke-linecap:round;transform:rotate(-90deg);transform-origin:50% 50%}
.circle-ring[data-circle-ring] circle{pointer-events:stroke;cursor:grab}.circle-ring[data-circle-ring]:focus-visible{outline:2px solid #8255b4;outline-offset:3px;border-radius:50%}
.chat-circle-player .chat-circle-play,.chat-circle-player.playing .chat-circle-play{position:absolute!important;inset:0!important;margin:auto!important;transform:none!important;width:52px!important;height:52px!important;display:grid;place-items:center;padding:14px;border:1px solid #ffffffa6;border-radius:50%;background:#fff9;backdrop-filter:blur(14px);color:#393044;z-index:3;opacity:1!important}
.chat-circle-play svg{width:24px;height:24px}.circle-time{font-size:12px;color:#746981;font-variant-numeric:tabular-nums}
.chat-file.is-circle{background:none;border:0;padding:0}.chat-record-studio{display:grid;justify-items:center;gap:12px;animation:record-arrive .24s ease-out}
.record-control-bar{display:flex;align-items:center;gap:12px;padding:7px 8px;background:#fff;border-radius:18px;width:100%;min-height:58px;box-sizing:border-box}
.record-timer{display:flex;align-items:center;gap:9px;padding:10px 12px;border:1px solid #e5ddef;border-radius:13px;background:#f8f5fc;color:#564264;font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.record-timer i{height:7px;width:7px;border-radius:50%;background:#c65d70;animation:record-pulse 1.2s ease-in-out infinite}
.record-actions{margin-left:auto;display:flex;gap:8px}.record-actions button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;border-radius:13px;padding:8px 13px;font-size:14px}
.record-actions button svg{width:18px;height:18px}.record-cancel{color:#ab4257;background:#fff2f4;border:1px solid #e8b5bf}.record-done{color:#34795a;background:#edf8f1;border:1px solid #a7cfb7}
.record-circle-live{width:180px}.chat-record-studio>.chat-circle-player{width:210px}.chat-record-studio .chat-record-error:empty{display:none}.record-review{flex:1;min-width:0}
.record-review .chat-voice-player{display:flex;align-items:center;gap:10px;width:100%;padding:5px 9px;border:1px solid #dfd5ed;background:linear-gradient(115deg,#ffffffb8,#eee5f19c);backdrop-filter:blur(12px);border-radius:15px;box-sizing:border-box}
.record-review .chat-voice-player input{min-width:30px;flex:1}.record-review .chat-voice-player small{white-space:nowrap;font-size:12px}.record-review audio{display:none}
.composer-return{animation:record-arrive .24s ease-out}@keyframes record-arrive{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}@keyframes record-pulse{50%{opacity:.35}}
#sticker-studio{width:min(640px,100%);margin:auto;--studio-line:#dcd3e8}
.sticker-step-heading{display:flex;align-items:baseline;gap:14px;margin:0 0 18px}.sticker-step-heading>span{font-size:12px;letter-spacing:.08em;color:#887399;white-space:nowrap}.sticker-step-heading h3{font-size:20px;font-weight:500;margin:0}
.sticker-slide-window{overflow:hidden;transition:height .3s ease;min-width:0}.sticker-slide-track{display:flex;align-items:flex-start;transition:transform .35s cubic-bezier(.22,.75,.25,1);width:100%}.sticker-step{flex:0 0 100%;width:100%;min-width:0;box-sizing:border-box;display:grid;gap:16px;padding:2px}
.sticker-upload{width:100%;min-height:205px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;border:1px dashed #b9a4d0;border-radius:22px;background:#f7f3fc;color:#59436c}.sticker-upload>svg{width:40px;height:40px;stroke-width:1.4}.sticker-upload strong{font-size:18px;font-weight:500}.sticker-upload span{font-size:13px;color:#8a789b}
.sticker-crop{position:relative;width:min(100%,430px);max-height:340px;margin:auto;overflow:hidden;border-radius:16px;background:#ede8f2;user-select:none}.sticker-crop>img{display:block;width:100%;height:100%;object-fit:fill}.sticker-crop-frame{position:absolute;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 999px #23172c66;touch-action:none;cursor:move}.sticker-crop-frame:focus-visible{outline:2px solid #8455af;outline-offset:3px}.crop-cross{position:absolute;inset:0;background:linear-gradient(90deg,transparent 33%,#fff5 33%,#fff5 33.5%,transparent 33.5%,transparent 66%,#fff5 66%,#fff5 66.5%,transparent 66.5%),linear-gradient(transparent 33%,#fff5 33%,#fff5 33.5%,transparent 33.5%,transparent 66%,#fff5 66%,#fff5 66.5%,transparent 66.5%);pointer-events:none}
.crop-handle{position:absolute;width:26px;height:26px;padding:0;border:0;background:transparent;min-height:0;touch-action:none}.crop-handle::after{content:'';position:absolute;inset:8px;border-radius:3px;background:#fff;border:1px solid #8255b4}.crop-handle.nw{left:-13px;top:-13px;cursor:nwse-resize}.crop-handle.ne{right:-13px;top:-13px;cursor:nesw-resize}.crop-handle.sw{left:-13px;bottom:-13px;cursor:nesw-resize}.crop-handle.se{right:-13px;bottom:-13px;cursor:nwse-resize}
.crop-tools{display:flex;align-items:center;justify-content:space-between;gap:10px}.crop-tools small{font-size:12px;color:#84718d}.crop-tools button{font-size:12px;padding:6px 10px;min-height:32px}
.sticker-live-preview{min-height:230px;display:grid;place-items:center;background-color:#f6f2fa;background-image:linear-gradient(45deg,#ebe4f1 25%,transparent 25%),linear-gradient(-45deg,#ebe4f1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ebe4f1 75%),linear-gradient(-45deg,transparent 75%,#ebe4f1 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0;border-radius:20px}.sticker-live-preview img{width:220px;height:220px;object-fit:contain}.sticker-live-preview span{background:#fffd;padding:8px 12px;border-radius:12px;font-size:13px}
.sticker-presets{display:flex;gap:8px;border:0;padding:0;margin:0}.sticker-presets legend{font-size:14px;margin-bottom:9px}.sticker-presets label{flex:1;position:relative;margin:0}.sticker-presets input{position:absolute;opacity:0;width:1px;height:1px}.sticker-presets span{display:block;text-align:center;border:1px solid var(--studio-line);border-radius:12px;padding:11px 5px;font-size:14px;background:#fff}.sticker-presets input:checked+span{background:#e9ddf7;border-color:#aa8dca}.sticker-presets input:focus-visible+span{outline:2px solid #8255b4;outline-offset:2px}
.sticker-pack-carousel{display:flex;overflow-x:auto;gap:12px;padding:4px 3px 12px;scroll-snap-type:x proximity}.sticker-pack-carousel>button{position:relative;flex:0 0 116px;min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:1px solid var(--studio-line);border-radius:18px;background:#fbf9fd;padding:10px;scroll-snap-align:start}.sticker-pack-carousel img{width:80px;height:80px;object-fit:contain}.sticker-pack-carousel>button>svg{width:48px;height:80px;stroke-width:1.5}.sticker-pack-carousel strong{font-size:13px;font-weight:500;overflow-wrap:anywhere}.sticker-pack-carousel>button.selected{background:#f0e7fa;border-color:#9c7abd}.pack-selected{display:none;position:absolute;right:6px;top:6px;border-radius:50%;background:#78509e;color:#fff;width:20px;height:20px;padding:3px}.pack-selected svg{width:14px;height:14px}.selected .pack-selected{display:block}
.sticker-studio-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid var(--studio-line)}.sticker-studio-footer>button{display:flex;align-items:center;gap:7px;font-size:14px;min-height:44px;padding:10px 14px}.sticker-studio-footer>button svg{width:18px;height:18px}.sticker-step-dots{display:flex;gap:2px;margin:auto}.sticker-step-dots button{position:relative;width:24px;height:36px;padding:0;background:none;border:0}.sticker-step-dots button::after{content:'';position:absolute;inset:14px 8px;border-radius:50%;background:#d9cfe5}.sticker-step-dots button.active::after{background:#8056a4}.sticker-studio-error:empty{display:none}
.sticker-manager{display:grid;gap:16px}.pack-rename{display:flex;gap:8px;align-items:end}.pack-rename label{flex:1}.pack-rename button{margin-bottom:0}.sticker-manager-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sticker-manager-grid article{display:grid;gap:8px;background:#f8f5fc;border-radius:16px;padding:10px}.sticker-manager-grid img{width:100%;height:130px;object-fit:contain}.sticker-manager-grid input{width:100%;font-size:13px;padding:8px;min-width:0}.sticker-manager-grid form>div{display:flex;gap:6px;justify-content:end}.sticker-manager-grid .sticker-remove-confirm{display:grid;justify-content:stretch;font-size:12px}.sticker-manager-grid .sticker-remove-confirm button{font-size:12px;padding:5px}.sticker-manager-actions{display:flex;flex-wrap:wrap;gap:10px}.sticker-manager-actions button{display:flex;gap:7px;align-items:center}.pack-remove-confirm{width:100%;border:1px solid #e5bdc7;border-radius:14px;padding:14px}.pack-remove-confirm>button{display:inline-flex;margin-right:8px}
@media(max-width:600px){.chat-composer-row{grid-template-columns:40px 40px minmax(0,1fr) 40px 40px;gap:2px!important;padding:4px!important}.chat-composer-row>.icon-button{width:40px!important;min-width:40px!important;height:44px!important;padding:9px!important}.record-control-bar{flex-wrap:wrap;gap:8px}.record-timer{font-size:12px;flex:1;justify-content:center}.record-actions{gap:6px}.record-actions button{padding:8px 10px;font-size:12px}.record-review{flex-basis:100%}.is-review .record-actions{width:100%;justify-content:flex-end}.sticker-step-heading h3{font-size:17px}.sticker-step-heading{gap:8px}.sticker-upload{min-height:170px}.sticker-manager-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sticker-studio-footer{gap:2px}.sticker-studio-footer>button{padding:9px;font-size:12px}.sticker-step-dots{gap:0}.sticker-step-dots button{width:18px}.sticker-step-dots button::after{inset:14px 5px}.sticker-pack-carousel>button{flex-basis:105px}.chat-circle-player{width:min(230px,100%)}}
@media(prefers-reduced-motion:reduce){.chat-record-studio,.composer-return,.record-timer i{animation:none}.sticker-slide-track,.sticker-slide-window{transition:none}}

.sticker-step-dots button{min-height:36px!important}.sticker-step-dots button::after{inset:auto;top:15px;left:9px;width:6px;height:6px}.sticker-live-preview img{opacity:1!important}
@media(max-width:600px){.sticker-step-dots button::after{left:6px}}

.chat-file.is-circle{width:248px;max-width:100%}.chat-circle-stage .circle-ring-hit{stroke:transparent;stroke-width:10px}.chat-circle-stage .circle-ring-progress,.chat-circle-stage .circle-ring-track{pointer-events:none}.record-circle-live .circle-ring-progress{transition:stroke-dashoffset .12s linear}

.crop-handle{width:44px;height:44px}.crop-handle::after{inset:16px}.crop-handle.nw{left:-22px;top:-22px}.crop-handle.ne{right:-22px;top:-22px}.crop-handle.sw{left:-22px;bottom:-22px}.crop-handle.se{right:-22px;bottom:-22px}.sticker-upload span,.crop-tools small,.sticker-step-heading>span{color:#746282}
/* Compact media actions remain outside preserved player nodes, so queue updates stay live. */
.chat-audio-row{display:flex;align-items:center;gap:8px;min-width:0}.chat-audio-row>.chat-voice-player{flex:1;min-width:0;gap:8px}.chat-audio-row .chat-voice-player small{white-space:nowrap;font-size:12px}.chat-audio-row .chat-voice-player input{min-width:36px;flex:1}
.compact-transcript{display:flex;flex:none;margin:0!important;padding:0!important}.compact-transcript .chat-transcript-toggle{position:relative;display:grid;place-items:center;width:40px;min-width:40px;height:40px;min-height:40px;padding:10px;border:1px solid #d8cbe7;background:#f9f6fcaa;border-radius:12px;color:#624878}.chat-transcript-toggle svg{width:19px;height:19px}.chat-transcript-toggle:hover{background:#e9dff4;border-color:#ad93c5}.chat-transcript-toggle:focus-visible{outline:2px solid #8255b4;outline-offset:2px}.compact-transcript.is-busy button{opacity:.8;cursor:progress}.compact-transcript.is-busy i{position:absolute;right:3px;top:3px;width:7px;height:7px;background:#8255b4;border-radius:50%;animation:record-pulse 1.2s ease-in-out infinite}.compact-transcript.has-error button{border-color:#d694a4;color:#a54c63}
.chat-circle-layout{position:relative;width:100%}.chat-circle-layout>.compact-transcript{position:absolute;bottom:0;right:0}.chat-circle-layout .circle-time{display:grid;place-items:center;min-height:40px;padding-inline:40px;box-sizing:border-box}.chat-transcript-result{white-space:pre-wrap;line-height:1.65;overflow-wrap:anywhere}
.chat-record-studio .record-control-bar{width:max-content;max-width:100%;justify-content:center;flex-wrap:wrap;justify-self:center}.chat-record-studio .record-actions{margin-left:0}.chat-record-studio .record-review{flex:0 1 auto;width:300px;max-width:100%}.chat-record-studio .record-review .chat-voice-player{width:100%}
.chat-room .chat-room-pin{display:grid;place-items:center;flex:0 0 18px;width:18px;color:#8a719f}.chat-room-pin svg{width:14px;height:14px}.chat-saved-avatar{color:#71508b;background:#ece2f8}.chat-saved-avatar svg{width:23px;height:23px;stroke-width:1.7}.chat-pin-toggle,.chat-pin-popup{display:flex;align-items:center;gap:8px}.chat-pin-popup{padding:12px 16px}.chat-pin-toggle svg{width:18px;height:18px}.saved-chat-info{display:flex;gap:16px;align-items:flex-start}.saved-chat-info p{margin:0;line-height:1.6}
@media(max-width:600px){.chat-record-studio .record-review{flex-basis:auto;width:260px}.chat-record-studio.is-review .record-actions{width:auto}.chat-audio-row{gap:5px}.chat-audio-row>.chat-voice-player{gap:5px}.chat-audio-row .chat-voice-player small{font-size:11px}.chat-audio-row .chat-voice-player input{min-width:24px}.compact-transcript .chat-transcript-toggle{width:36px;min-width:36px;height:40px;padding:8px}.chat-circle-layout .circle-time{padding-inline:36px}}
@media(prefers-reduced-motion:reduce){.compact-transcript.is-busy i{animation:none}}

/* Row actions are sibling buttons, preserving independent keyboard targets. */
.chat-list-item{position:relative;border-radius:12px}.chat-list-item>.chat-room{padding-right:48px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-y}
.chat-list-more{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:36px;min-width:36px;height:40px;min-height:40px;padding:8px;display:grid;place-items:center;border:1px solid transparent;background:transparent;color:#79638c;border-radius:11px;opacity:0;transition:opacity .12s ease,background .12s ease}
.chat-list-more svg{width:20px;height:20px;stroke-width:2.5;stroke-linecap:round}.chat-list-item:hover .chat-list-more,.chat-list-item:focus-within .chat-list-more,.chat-list-more[aria-expanded=true]{opacity:1}.chat-list-more:hover,.chat-list-more[aria-expanded=true]{background:#fff9;border-color:#d6c9e4;color:#4f3762}.chat-list-more:focus-visible{outline:2px solid #8255b4;outline-offset:1px;opacity:1}
.chat-list-menu{width:256px;max-width:calc(100vw - 48px);padding:4px;display:grid;gap:2px}.chat-list-menu-title{display:block;margin:4px 9px 7px;font-size:13px;line-height:1.5;font-weight:500;color:#776385;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-list-menu-hint{margin:0 9px 8px;font-size:12px;color:#776385}.chat-list-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:11px 12px;border:0;border-radius:10px;background:transparent;text-align:left;font-size:14px;color:#40304c}.chat-list-menu button:hover,.chat-list-menu button:focus-visible{background:#eee5f7}.chat-list-menu button:focus-visible{outline:2px solid #ac8dca;outline-offset:-2px}.chat-list-menu button svg{width:18px;height:18px;flex:none;stroke-width:1.8}.chat-list-menu-error{font-size:12px;line-height:1.5;color:#a14258;margin:5px 10px}.chat-list-menu-error[hidden]{display:none}
@media(hover:none),(pointer:coarse){.chat-list-more{opacity:1;width:40px;height:44px;padding:10px}}
@media(prefers-reduced-motion:reduce){.chat-list-more{transition:none}}

.chat-room-silenced{display:grid;place-items:center;flex:0 0 14px;color:#8a719f}.chat-room-silenced svg{width:14px;height:14px}

.sticker-source-strip,.sticker-result-strip{display:flex;gap:10px;overflow-x:auto;padding:5px 2px 9px;scroll-snap-type:x proximity}.sticker-batch-thumb{position:relative;flex:0 0 76px;scroll-snap-align:start}.sticker-batch-thumb>button:first-child{display:grid;justify-items:center;gap:4px;width:76px;min-height:88px;border:1px solid #ded3e9;border-radius:13px;background:#faf7fd;padding:6px;color:#70567f}.sticker-batch-thumb>button.selected{border-color:#9f7abf;background:#eadff5}.sticker-batch-thumb img{width:62px;height:62px;object-fit:contain;border-radius:7px}.sticker-batch-thumb span{font-size:11px}.sticker-remove-image{position:absolute;right:-4px;top:-5px;width:28px;height:28px;min-height:28px;padding:6px;border:1px solid #ddcde5;border-radius:50%;background:#fff;color:#795b87}.sticker-remove-image svg{width:14px;height:14px}.sticker-batch-progress{font-size:12px;color:#776385;min-height:18px;margin:0}.sticker-process-retry{justify-self:center;font-size:13px}.record-recovery{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.record-recovery[hidden]{display:none}.record-recovery button{display:flex;align-items:center;gap:7px;font-size:13px;min-height:40px}.record-recovery svg{width:18px;height:18px}

.sticker-batch-thumb span{display:flex;align-items:center;gap:4px}.sticker-batch-thumb span svg{width:12px;height:12px}
