:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#19233b;background:#f3f5fb}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}a{color:#4353c8}small{color:#778298}.primary{background:#5265ec;color:white;border:0;padding:16px 22px;border-radius:14px;font-weight:700}.text-button{border:0;background:none;color:#5265ec;padding:12px}.brand-icon{background:#5265ec;color:white;border-radius:15px;padding:13px;font-size:24px}.customer-shell{max-width:720px;height:100dvh;min-height:450px;margin:auto;background:white;display:flex;flex-direction:column;box-shadow:0 0 70px #1b286b12}.top{display:flex;align-items:center;gap:14px;padding:20px 25px;border-bottom:1px solid #e9ebf4}.top strong,.top small{display:block}.top strong{font-size:17px}.live-dot{width:10px;height:10px;border-radius:100%;background:#36c899;margin-left:auto}.chat-scroll{padding:26px;overflow:auto;flex:1;display:flex;flex-direction:column;gap:13px;background:linear-gradient(160deg,#f9faff,#fff)}.welcome{padding:20px;background:#eef1ff;border-radius:18px;max-width:90%;line-height:1.5}.welcome p{margin-bottom:0}.bubble{border-radius:17px;padding:13px 17px;max-width:80%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.bubble.mine{align-self:flex-end;background:#5364df;color:white;border-bottom-right-radius:4px}.bubble.theirs{align-self:flex-start;background:#e8ecf6;border-bottom-left-radius:4px}.composer{display:flex;align-items:center;gap:10px;padding:15px 20px;border-top:1px solid #e9ebf4;background:white}.composer textarea{width:100%;border:1px solid #e0e5f1;border-radius:16px;padding:14px;resize:none;outline:none}.composer textarea:focus{border-color:#5265ec}.composer button{border:0;background:#5265ec;color:white;border-radius:14px;width:52px;height:52px;flex-shrink:0}.composer button:disabled{opacity:.45}.footnote{font-size:12px;text-align:center;color:#8891a4;padding-bottom:12px}.consent-backdrop{position:fixed;inset:0;z-index:10;background:#16203cd9;display:flex;align-items:center;justify-content:center;padding:18px}.consent-backdrop[hidden]{display:none}.consent-card{background:white;width:min(100%,530px);padding:32px;border-radius:24px;box-shadow:0 25px 80px #111c4266;max-height:95dvh;overflow:auto}.consent-card h1{font-size:27px;margin:15px 0}.consent-card p{line-height:1.6}.privacy-icon{font-size:35px}.privacy-box{background:#f2f4fc;border-radius:15px;padding:16px}.privacy-box p{margin-bottom:0;font-size:13px}.subtle{font-size:12px;color:#667184}.consent-card .primary,.consent-card .text-button{width:100%;margin-top:10px}.error{color:#cb3b56}.app-shell{height:100dvh;display:grid;grid-template-columns:230px 310px minmax(300px,1fr)}.sidebar{background:#151e36;color:#e5ebff;padding:25px 18px;display:flex;flex-direction:column}.sidebar .logo{font-size:23px;font-weight:800;letter-spacing:-.6px;margin-bottom:42px}.side-label{color:#8a97b8;font-size:11px;font-weight:700;letter-spacing:2px}.store-link{display:block;padding:12px;color:#cbd3e9;text-decoration:none;border-radius:12px}.store-link.active{background:#5265ec;color:white}.sidebar-bottom{margin-top:auto;display:grid;gap:14px}.sidebar-bottom a{color:#cbd3e9;text-decoration:none}.sidebar-bottom .text-button{color:#ccd7ff;padding-left:0}.threads{background:#fff;border-right:1px solid #e4e8f1;overflow:auto}.panel-head{padding:26px 22px;min-height:96px;border-bottom:1px solid #e4e8f1;display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head h1,.panel-head h2{font-size:19px;margin:0}.thread{display:flex;width:100%;border:0;background:white;text-align:left;padding:17px 12px;align-items:center;gap:12px;border-bottom:1px solid #f0f1f6}.thread.selected,.thread:hover{background:#eef1ff}.thread span:nth-child(2){flex:1}.thread strong,.thread small{display:block}.thread strong{font-size:14px}.thread small,.thread-time{font-size:11px;color:#8e96a7}.avatar{background:#f0f3fa;padding:11px;border-radius:50%}.team-chat{display:flex;flex-direction:column;min-height:0}.team-chat .chat-scroll{min-height:0}.actions{display:flex;gap:7px}.actions button{border:1px solid #e2e6f1;border-radius:9px;background:#fff;padding:9px;font-size:12px}.status,.empty{padding:14px;color:#8290ab}.center-empty{margin:auto;color:#8190a8}.login{max-width:390px;margin:10vh auto;padding:34px;background:white;border-radius:20px;text-align:center}.login .brand-icon{display:inline-block}.login-form{display:grid;text-align:left;gap:16px;margin-top:28px}.login-form label{display:grid;gap:7px}.login-form input{border:1px solid #dae0ef;border-radius:12px;padding:13px}.print-sheet{text-align:center;background:white;min-height:100vh;padding:25px}.print-content{max-width:650px;margin:20px auto;padding:30px;border:8px solid #1d2944;border-radius:18px}.print-brand{font-size:25px;font-weight:800}.eyebrow{letter-spacing:4px;color:#5364df;font-weight:800;margin-top:35px}.print-content h1{font-size:clamp(45px,8vw,75px);line-height:1.1;margin:20px 0}.print-content h1 span{color:#5265ec}.print-copy{font-size:22px}.print-content img{width:55%;max-width:340px;min-width:220px}.scan-label{font-weight:900;letter-spacing:2px}.url{font-size:12px;overflow-wrap:anywhere}.print-footer{font-size:12px;margin-top:20px}.print-toolbar{display:flex;gap:15px;justify-content:center;align-items:center;margin:20px;flex-wrap:wrap}@media(max-width:850px){.app-shell{grid-template-columns:170px 1fr;grid-template-rows:42% 58%}.sidebar{grid-row:1/3}.threads{grid-column:2}.team-chat{grid-column:2}.panel-head{min-height:65px;padding:12px}.sidebar .logo{font-size:18px}}@media(max-width:520px){.app-shell{grid-template-columns:1fr;grid-template-rows:48% 52%}.sidebar{display:none}.threads{grid-column:1}.team-chat{grid-column:1}.thread{padding:10px}.consent-card{padding:22px}}@media print{@page{size:A4 portrait;margin:9mm}.print-toolbar{display:none}.print-sheet{padding:0}.print-content{margin:0 auto;border-width:5px;max-width:100%;min-height:275mm;display:flex;flex-direction:column;align-items:center;justify-content:center}.print-content img{width:95mm;max-width:none}}

.availability-badge{font-size:12px;font-weight:700;border-radius:100px;padding:8px 11px;margin-left:auto;white-space:nowrap}
.availability-badge.online{background:#e3f8ed;color:#137b4b}
.availability-badge.offline{background:#fff0ee;color:#a53636}
.offline-notice{margin:12px 20px 0;padding:13px 16px;background:#fff0ee;color:#923636;border-radius:12px;font-size:14px}
.offline-notice[hidden]{display:none}
.quick-replies{display:flex;gap:8px;overflow-x:auto;padding:10px 20px 0;flex-shrink:0}
.quick-reply{white-space:nowrap;background:#f0f2ff;color:#4353b9;border:1px solid #dce2ff;border-radius:100px;padding:10px 14px;font-size:13px}
.quick-reply:disabled{opacity:.45;cursor:not-allowed}

.shop-control{display:flex;flex-direction:column;gap:8px;margin:16px 10px 22px;padding:14px;border-radius:14px;background:rgba(127,127,127,.09)}
.shop-control strong{font-size:13px}.shop-control small{font-size:11px;line-height:1.4}
.shop-toggle{width:100%;padding:12px;border-radius:10px;border:0;cursor:pointer;font-weight:700;text-align:center}
.shop-toggle.online{background:#d8f7e6;color:#14643f}.shop-toggle.offline{background:#ffe2df;color:#9c302e}
.shop-toggle:disabled{opacity:.6;cursor:wait}

.mobile-menu{display:none}
@media(max-width:520px){
.app-shell{grid-template-rows:48px minmax(0,45%) minmax(0,55%);height:100dvh}
.mobile-menu{display:block;grid-column:1;grid-row:1;background:#151e36;color:#fff;border:0;text-align:left;padding:10px 18px;font-weight:700}
.sidebar{display:none;position:absolute;top:48px;left:0;right:0;bottom:0;z-index:6;overflow:auto}
.sidebar.mobile-open{display:flex}
.threads{grid-column:1;grid-row:2}
.team-chat{grid-column:1;grid-row:3}
}

/* Native, keyboard-accessible disclosure in the consent dialog. */
.privacy-box summary{cursor:pointer;font-weight:700;list-style-position:inside;outline-offset:4px}
.privacy-box summary:focus-visible{outline:2px solid #5265ec;border-radius:4px}
.privacy-box[open] summary{margin-bottom:10px}
.privacy-box p{margin-top:0}

/* Store welcome and customer service catalog */
.welcome-eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;color:#5265ec;margin-bottom:0!important}
.welcome-services{margin:18px 0;padding:16px;border-radius:16px;background:#f6f7ff}
.welcome-services h2{font-size:15px;margin:0 0 12px}
.service-list{display:grid;gap:9px}
.service-item{display:grid;gap:3px;padding:10px 12px;border-radius:10px;background:white}
.service-item strong{font-size:13px}.service-item small{font-size:12px;color:#65718b;line-height:1.4}
/* Scrollable customer message templates */
.quick-replies{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scroll-snap-type:x proximity}
.quick-reply{flex:0 0 auto;scroll-snap-align:start}
/* Conversation merge controls */
.merge-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid #e4e8f1;font-size:12px}
.merge-toolbar label{display:flex;align-items:center;gap:5px}
.merge-toolbar button{padding:8px;border:1px solid #dce2ff;border-radius:9px;background:#eef1ff;color:#3348a9}
.merge-toolbar button:disabled{opacity:.45}
.merge-indicator{display:none;font-size:18px;color:#5265ec}
.merging .merge-indicator{display:block}
.thread.merge-selected{background:#e7edff}

/* Flexible A4 poster typography, keeping the QR code legible. */
.print-content{box-sizing:border-box;overflow:hidden}
.print-content h1.poster-fit{font-size:clamp(23px,5vw,66px);overflow-wrap:anywhere;line-height:1.1;margin:16px 0}
.print-content .print-copy.poster-fit{font-size:clamp(12px,2vw,23px);line-height:1.35;white-space:normal;overflow-wrap:anywhere;margin:12px 0}
.print-content .scan-label{font-size:clamp(13px,2vw,21px);overflow-wrap:anywhere}
@media print{
 .print-content{height:275mm;min-height:0;max-height:275mm;justify-content:space-between;gap:5mm}
 .print-content img{width:auto;height:auto;max-height:85mm;max-width:95mm;min-width:0;object-fit:contain}
 .print-content .eyebrow{margin:0}
 .print-content .print-footer{margin-top:0}
}

/* Team conversation tagging and sorting */
.thread-filters{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px 12px;border-bottom:1px solid #e4e8f1}
.thread-filters input,.thread-filters select{width:100%;min-width:0;padding:8px;border:1px solid #dce2ed;border-radius:9px;background:#fff;font-size:12px}
.thread-filters input{grid-column:1/-1}
.thread-tags,.room-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
.room-tags{padding:4px 14px;margin:0;min-height:0}
.room-tags:empty{display:none}
.tag-chip{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:3px 8px;border-radius:100px;border:1px solid var(--tag-color);color:var(--tag-color);background:color-mix(in srgb,var(--tag-color) 9%,white);font-size:11px;font-weight:700;white-space:nowrap}
.tags-dialog{border:0;border-radius:16px;box-shadow:0 15px 65px #14214255;padding:22px;max-width:min(440px,92vw);width:100%}
.tags-dialog::backdrop{background:#151e3677}
.tags-dialog form{display:grid;gap:10px;max-height:60vh;overflow:auto}
.tags-dialog form label{display:flex;align-items:center;gap:10px;cursor:pointer}
.tag-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.tag-dialog-actions button{border:1px solid #dce2ed;border-radius:9px;padding:10px 15px;background:#fff}
.tag-dialog-actions button[type=submit]{background:#5265ec;color:#fff}

/* QR scan analytics */
.analytics-shell{max-width:1050px;margin:0 auto;padding:28px 22px 60px}
.analytics-header h1{margin:14px 0 4px;font-size:28px}.analytics-header p{color:#667184}
.analytics-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:20px 0}
.analytics-filters label{display:grid;gap:5px;font-size:13px;color:#4b5870}
.analytics-filters input,.analytics-filters select{padding:11px;border:1px solid #dce2ed;border-radius:9px;background:white}
.analytics-summary{display:flex;align-items:center;gap:15px;background:white;border:1px solid #e4e8f1;border-radius:15px;padding:18px;margin-bottom:18px}
.analytics-summary strong{font-size:36px;color:#4053cb}
.analytics-chart{background:white;border:1px solid #e4e8f1;border-radius:15px;padding:18px;max-height:390px;overflow:auto}
.analytics-bar-row{display:grid;grid-template-columns:155px minmax(0,1fr) 45px;gap:12px;align-items:center;margin:8px 0;font-size:12px}
.analytics-bar{background:#5265ec;border-radius:4px;height:15px;min-width:2px}
.analytics-table-wrap{overflow:auto;margin:18px 0;background:white;border-radius:15px;border:1px solid #e4e8f1}
.analytics-table{width:100%;border-collapse:collapse;text-align:left}
.analytics-table th,.analytics-table td{padding:11px 17px;border-bottom:1px solid #edf0f7}
@media(max-width:520px){.analytics-bar-row{grid-template-columns:105px minmax(0,1fr) 30px;gap:6px}}

/* Automatic device theme. No persisted preference or JavaScript required. */
:root{color-scheme:light}
@media (prefers-color-scheme:dark){
 :root{color-scheme:dark;color:#e7ebf6;background:#101522}
 body{background:#101522}
 a{color:#a7b6ff}small{color:#a0aec5}
 .customer-shell,.threads,.login,.consent-card,.welcome-services .service-item,.analytics-summary,.analytics-chart,.analytics-table-wrap{background:#192234;color:#e7ebf6}
 .top,.composer,.panel-head,.threads,.merge-toolbar,.thread,.analytics-table th,.analytics-table td{border-color:#344157}
 .chat-scroll{background:linear-gradient(160deg,#131d2d,#182337)}
 .welcome,.privacy-box,.welcome-services,.avatar{background:#27344c;color:#e7ebf6}
 .bubble.theirs{background:#2c3a53;color:#eef2ff}
 .bubble.mine{background:#5265ce;color:#fff}
 .composer,.thread,.actions button,.thread-filters input,.thread-filters select,.analytics-filters input,.analytics-filters select,.login-form input,.composer textarea,.tags-dialog,.tag-dialog-actions button{background:#192234;color:#e7ebf6;border-color:#3b4960}
 .thread.selected,.thread:hover,.thread.merge-selected{background:#2a3955}
 .thread-time,.thread small,.center-empty,.status,.empty,.subtle,.footnote,.service-item small,.analytics-header p{color:#a9b6cc}
 .consent-backdrop{background:#060b18df}
 .privacy-box p,.welcome-services h2{color:#e7ebf6}
 .quick-reply,.merge-toolbar button{background:#283758;color:#b6c5ff;border-color:#475b87}
 .quick-reply:disabled,.merge-toolbar button:disabled{opacity:.5}
 .offline-notice{background:#4c292e;color:#ffd2d4}
 .availability-badge.online,.shop-toggle.online{background:#173e35;color:#a2f2c8}
 .availability-badge.offline,.shop-toggle.offline{background:#512c31;color:#ffd1ce}
 .thread-filters{border-color:#344157}
 .thread-filters input::placeholder,.composer textarea::placeholder,.login-form input::placeholder{color:#a4afc3}
 .tag-chip{background:color-mix(in srgb,var(--tag-color) 20%,#192234);color:color-mix(in srgb,var(--tag-color) 55%,white);border-color:var(--tag-color)}
 .tags-dialog{box-shadow:0 15px 65px #0009}
 .tags-dialog::backdrop{background:#050a16ba}
 .tag-dialog-actions button[type=submit]{background:#5265ec;color:#fff}
 .analytics-summary,.analytics-chart,.analytics-table-wrap{border-color:#344157}
 .analytics-summary strong{color:#acb9ff}
 .analytics-bar{background:#8597ff}
 .sidebar,.mobile-menu{background:#0d1425}
 .sidebar .shop-control{background:#202b41}
 .error{color:#ff8a9e}
 /* Screen-only poster preview follows the user's device; paper stays white. */
 .print-sheet{background:#101522;color:#e7ebf6}
 .print-content{background:#fff;color:#19233b}
 .print-content .eyebrow{color:#5364df}
}
@media print{
 :root{color-scheme:light!important;color:#19233b!important;background:#fff!important}
 body,.print-sheet,.print-content{background:#fff!important;color:#19233b!important}
 .print-content{border-color:#1d2944!important}
 .print-content .eyebrow{color:#5364df!important}
}

.analytics-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:0 0 22px}
.analytics-kpis>div{display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid #e4e8f1;border-radius:14px;padding:16px}
.analytics-kpis strong{font-size:29px;color:#5265ec}
.analytics-kpis span{font-size:12px;color:#667184}
.analytics-shell h2{font-size:18px;margin:26px 0 12px}
@media(prefers-color-scheme:dark){.analytics-kpis>div{background:#192234;border-color:#344157}.analytics-kpis strong{color:#a7b6ff}.analytics-kpis span{color:#a9b6cc}}

/* Store logo: PNG alpha transparency preserved on all themes and on paper */
.brand-icon .store-logo{display:block;width:100%;height:100%;max-width:48px;max-height:48px;object-fit:contain}
.consent-logo{display:block;max-width:min(240px,75%);width:auto;height:auto;max-height:110px;object-fit:contain;margin:0 auto 16px}
.print-brand{display:flex;align-items:center;justify-content:center;gap:12px}
.print-logo{display:block;max-height:78px;max-width:210px;width:auto;height:auto;object-fit:contain}
@media print{.print-logo{max-height:78px;max-width:210px;print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* QR poster redesign: balanced A4 layout, no oversized dark frame. */
.poster-page{background:#eef1f7;min-height:100vh;padding:28px 18px 36px;text-align:center}
.poster-page .poster-card{--poster-ink:#15213a;--poster-accent:#4263e6;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:0;width:min(100%,620px);max-width:620px;min-height:790px;margin:0 auto;padding:35px 48px 24px;background:#fff;color:var(--poster-ink);border:0;border-radius:14px;box-shadow:0 15px 50px #15213a1c;overflow:hidden}
.poster-page .poster-card::before{content:"";position:absolute;inset:0 0 auto;height:7px;background:var(--poster-accent)}
.poster-header{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px}
.poster-page .poster-logo{width:auto;height:auto;max-width:245px;max-height:110px;min-width:0;object-fit:contain}
.poster-monogram{font-size:42px;color:var(--poster-accent)}
.poster-store-name{font-size:17px;font-weight:800;letter-spacing:-.3px}
.poster-message{width:100%;margin:18px 0 8px}
.poster-page .poster-kicker{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;font-size:11px;font-weight:800;letter-spacing:2.1px;color:var(--poster-accent)}
.poster-kicker-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#27aa77}
.poster-page .poster-message h1{max-width:500px;margin:0 auto 12px;font-size:clamp(36px,6vw,54px);line-height:1.06;letter-spacing:-2.1px;font-weight:850;overflow-wrap:break-word}
.poster-page .poster-description{max-width:450px;margin:0 auto;font-size:clamp(16px,2.5vw,20px);line-height:1.45;letter-spacing:-.25px}
.poster-qr-section{width:100%;display:flex;flex-direction:column;align-items:center;margin:15px 0 18px}
.poster-qr-frame{display:grid;place-items:center;width:276px;height:276px;max-width:100%;background:#fff;border:1px solid #e2e8f5;border-radius:22px;padding:16px;box-shadow:0 8px 28px #172a5520}
.poster-page .poster-qr{display:block;width:100%;height:100%;max-width:none;min-width:0;object-fit:contain}
.poster-page .poster-cta{margin:18px 0 3px;font-size:23px;line-height:1.25;font-weight:850;letter-spacing:-.6px}
.poster-cta span{color:var(--poster-accent)}
.poster-page .poster-hint{margin:0;color:#66738a;font-size:13px}
.poster-footer{display:flex;flex-direction:column;align-items:center;gap:5px;width:100%;padding-top:14px;border-top:1px solid #e9edf4;color:#657188;font-size:11px}
.poster-url{font-size:10px;overflow-wrap:anywhere}
@media(max-width:540px){.poster-page{padding:12px 8px 24px}.poster-page .poster-card{padding:28px 22px 20px;min-height:720px}.poster-page .poster-message h1{font-size:clamp(34px,10vw,48px)}.poster-qr-frame{width:245px;height:245px}.poster-page .poster-cta{font-size:21px}}
@media(prefers-color-scheme:dark){.poster-page{background:#101522}.poster-page .poster-card{background:#fff;color:#15213a}.poster-page .poster-description,.poster-page .poster-store-name{color:#15213a}.poster-page .poster-hint,.poster-page .poster-footer{color:#66738a}}
@media print{
 @page{size:A4 portrait;margin:0}
 html,body,.poster-page{background:#fff!important;color:#15213a!important;margin:0!important;padding:0!important;width:210mm!important;height:297mm!important;min-height:0!important}
 .poster-page .poster-card{width:210mm!important;max-width:none!important;height:297mm!important;min-height:0!important;max-height:none!important;padding:13mm 17mm 11mm!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;gap:0!important;justify-content:space-between!important;break-inside:avoid!important}
 .poster-page .poster-card::before{height:2mm!important}
 .poster-page .poster-logo{max-width:72mm!important;max-height:33mm!important}
 .poster-page .poster-message{margin:4mm 0 2mm!important}
 .poster-page .poster-message h1{font-size:43pt!important;max-width:165mm!important;margin:0 auto 3mm!important;line-height:1.08!important}
 .poster-page .poster-description{font-size:17pt!important;max-width:160mm!important;line-height:1.35!important}
 .poster-page .poster-kicker{font-size:10pt!important;margin-bottom:4mm!important}
 .poster-qr-section{margin:3mm 0!important}
 .poster-qr-frame{width:88mm!important;height:88mm!important;padding:5mm!important;border:1px solid #dce4f2!important;box-shadow:none!important}
 .poster-page .poster-qr{width:100%!important;height:100%!important;max-width:none!important;min-width:0!important}
 .poster-page .poster-cta{font-size:21pt!important;margin:5mm 0 1mm!important}
 .poster-page .poster-hint{font-size:11pt!important}
 .poster-footer{padding-top:4mm!important;font-size:10pt!important}
 .poster-url{font-size:8pt!important}
 .print-toolbar{display:none!important}
}

/* Customer messenger redesign */
.messenger-shell{--chat-bg:#f6f8fc;--chat-surface:#fff;--chat-ink:#1c2940;--chat-muted:#738198;--chat-border:#e6ebf4;--chat-intro:#fff;--chat-accent:#5265ec;max-width:760px;height:100dvh;min-height:0;background:var(--chat-surface);color:var(--chat-ink);overflow:hidden;box-shadow:0 10px 55px #16213a12}
.messenger-top{flex:0 0 auto;min-height:84px;padding:16px 22px;background:var(--chat-surface);border-color:var(--chat-border);gap:13px}
.messenger-avatar{width:52px;height:52px;flex:0 0 52px;display:grid;place-items:center;padding:5px;border-radius:15px;background:var(--chat-bg);border:1px solid var(--chat-border);color:var(--chat-accent);font-size:25px}
.messenger-avatar .store-logo{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.messenger-identity{min-width:0;flex:1}.messenger-identity strong{font-size:17px;letter-spacing:-.35px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messenger-identity small{font-size:12px;color:var(--chat-muted);margin-top:3px}
.messenger-top .availability-badge{flex-shrink:0;font-size:11px;white-space:nowrap}
.messenger-messages{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px;padding:24px clamp(16px,4vw,32px);background:var(--chat-bg);scrollbar-color:#c5cfe1 transparent}
.messenger-intro{align-self:center;margin:auto 0;max-width:430px;text-align:center;padding:25px 24px 35px}
.messenger-intro[hidden]{display:none}
.intro-logo{width:82px;height:82px;margin:0 auto 20px;padding:12px;display:grid;place-items:center;border:1px solid var(--chat-border);background:var(--chat-intro);border-radius:25px;box-shadow:0 10px 35px #16213a0c;font-size:32px;color:var(--chat-accent)}
.intro-logo img{width:100%;height:100%;object-fit:contain}
.intro-eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:var(--chat-accent);margin:0 0 12px}
.messenger-intro h1{font-size:clamp(29px,5vw,38px);line-height:1.15;letter-spacing:-1px;margin:0 0 10px}
.intro-message{font-size:17px;font-weight:600;line-height:1.5;margin:0 0 8px}
.intro-note{font-size:13px;line-height:1.55;color:var(--chat-muted);margin:0}
.messenger-messages .bubble{max-width:min(83%,480px);padding:12px 16px;border-radius:19px;font-size:14px;line-height:1.55;box-shadow:0 2px 8px #15213a0a}
.messenger-messages .bubble.mine{border-bottom-right-radius:6px;background:var(--chat-accent);color:white}
.messenger-messages .bubble.theirs{border-bottom-left-radius:6px;background:var(--chat-intro);color:var(--chat-ink);border:1px solid var(--chat-border)}
.messenger-bottom{flex:0 0 auto;background:var(--chat-surface);border-top:1px solid var(--chat-border);padding:12px clamp(12px,3vw,22px) max(8px,env(safe-area-inset-bottom))}
.messenger-bottom .quick-replies{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;gap:8px;padding:0 0 12px;margin:0;scroll-snap-type:x proximity}
.messenger-bottom .quick-replies::-webkit-scrollbar{display:none}
.messenger-bottom .quick-reply{flex:0 0 auto;scroll-snap-align:start;padding:9px 13px;border-radius:999px;border:1px solid var(--chat-border);background:var(--chat-bg);color:var(--chat-ink);font-size:12px;font-weight:600;transition:background .15s,border-color .15s}
.messenger-bottom .quick-reply:hover{border-color:var(--chat-accent);background:var(--chat-intro)}
.messenger-composer{display:flex;align-items:flex-end;gap:10px;padding:6px 7px 6px 15px;border:1px solid var(--chat-border);border-radius:21px;background:var(--chat-bg)}
.messenger-composer:focus-within{border-color:var(--chat-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--chat-accent) 13%,transparent)}
.messenger-composer textarea{flex:1;min-width:0;max-height:136px;min-height:38px;height:38px;line-height:22px;padding:8px 0;border:0;box-shadow:none;resize:none;background:transparent;color:var(--chat-ink);outline:none;font-size:14px;overflow-y:auto}
.messenger-composer textarea:focus{border:0}
.messenger-composer textarea::placeholder{color:var(--chat-muted)}
.messenger-composer button{display:grid;place-items:center;width:40px;height:40px;border-radius:14px;background:var(--chat-accent);color:#fff}
.messenger-status{font-size:10px;padding:9px 0 0;color:var(--chat-muted);text-align:center}
.messenger-shell .offline-notice{margin:0;padding:11px 20px;font-size:13px}
@media(max-width:520px){.messenger-top{min-height:74px;padding:12px 14px}.messenger-avatar{width:46px;height:46px;flex-basis:46px;border-radius:13px}.messenger-identity strong{font-size:15px}.messenger-identity small{font-size:11px}.messenger-top .availability-badge{font-size:10px;padding:6px 8px}.messenger-messages{padding:18px 15px}.messenger-intro{padding:18px 8px}.intro-logo{width:72px;height:72px}.messenger-bottom{padding:10px 12px max(8px,env(safe-area-inset-bottom))}.messenger-messages .bubble{max-width:88%}}
@media(prefers-color-scheme:dark){
 .messenger-shell{--chat-bg:#121a2a;--chat-surface:#1b2537;--chat-ink:#eef2fa;--chat-muted:#a1aec4;--chat-border:#354258;--chat-intro:#28364b;--chat-accent:#6176f6;background:var(--chat-surface);color:var(--chat-ink)}
 .messenger-top,.messenger-bottom{background:var(--chat-surface);border-color:var(--chat-border)}
 .messenger-avatar,.intro-logo{background:var(--chat-intro);border-color:var(--chat-border)}
 .messenger-messages{background:var(--chat-bg)}
 .messenger-messages .bubble.theirs{background:var(--chat-intro);color:var(--chat-ink);border-color:var(--chat-border)}
 .messenger-bottom .quick-reply{background:var(--chat-intro);color:var(--chat-ink);border-color:var(--chat-border)}
 .messenger-composer{background:var(--chat-bg);border-color:var(--chat-border)}
 .messenger-composer textarea{background:transparent;color:var(--chat-ink)}
 .messenger-composer textarea::placeholder{color:var(--chat-muted)}
 .messenger-status,.intro-note,.messenger-identity small{color:var(--chat-muted)}
}
@media(prefers-reduced-motion:reduce){.messenger-bottom .quick-reply{transition:none}}

/* QR poster v3: compact editorial composition and stronger scan hierarchy */
.poster-page .poster-card{justify-content:flex-start;gap:0;padding:42px 42px 28px}
.poster-page .poster-card::before{height:5px;background:linear-gradient(90deg,#174d3c 0%,#2f7558 48%,#b69a58 100%)}
.poster-page .poster-logo{max-width:265px;max-height:122px}
.poster-page .poster-header{gap:3px}
.poster-page .poster-message{margin:33px 0 25px}
.poster-page .poster-kicker{margin-bottom:12px;letter-spacing:1.8px;font-size:11px}
.poster-page .poster-message h1{font-size:clamp(36px,5.7vw,52px);line-height:1.12;letter-spacing:-1.7px;max-width:520px;margin-bottom:13px}
.poster-page .poster-description{font-size:18px;line-height:1.43;max-width:465px}
.poster-page .poster-qr-section{margin:0 0 20px}
.poster-page .poster-qr-frame{width:288px;height:288px;border:1px solid #e1e6ef;border-radius:17px;padding:19px;box-shadow:none}
.poster-page .poster-cta{font-size:23px;margin:15px 0 4px;letter-spacing:-.5px}
.poster-page .poster-hint{font-size:12px}
.poster-page .poster-footer{margin-top:auto;padding-top:15px;gap:5px}
.poster-page .poster-url{font-size:10px}
@media(max-width:540px){.poster-page .poster-card{padding:30px 22px 22px}.poster-page .poster-message{margin:27px 0 22px}.poster-page .poster-message h1{font-size:clamp(33px,8.7vw,46px)}.poster-page .poster-description{font-size:16px}.poster-page .poster-qr-frame{width:min(288px,80vw);height:auto;aspect-ratio:1}.poster-page .poster-cta{font-size:20px}}
@media print{
 .poster-page .poster-card{padding:15mm 17mm 12mm!important;justify-content:flex-start!important;overflow:hidden!important}
 .poster-page .poster-card::before{height:1.5mm!important}
 .poster-page .poster-header{flex:0 0 auto!important}
 .poster-page .poster-logo{max-width:76mm!important;max-height:36mm!important}
 .poster-page .poster-message{margin:13mm 0 10mm!important;flex:0 0 auto!important}
 .poster-page .poster-kicker{margin-bottom:4mm!important;font-size:10pt!important}
 .poster-page .poster-message h1{font-size:39pt!important;line-height:1.1!important;letter-spacing:-1pt!important;margin-bottom:4mm!important;max-width:170mm!important}
 .poster-page .poster-description{font-size:15pt!important;line-height:1.4!important;max-width:162mm!important}
 .poster-page .poster-qr-section{margin:0 auto 6mm!important;flex:0 0 auto!important}
 .poster-page .poster-qr-frame{width:85mm!important;height:85mm!important;padding:5mm!important;border-radius:5mm!important}
 .poster-page .poster-cta{font-size:20pt!important;margin:5mm 0 1mm!important}
 .poster-page .poster-hint{font-size:10pt!important}
 .poster-page .poster-footer{margin-top:auto!important;flex:0 0 auto!important;padding-top:4mm!important}
 .poster-page .poster-url{font-size:8pt!important}
}

/* QR poster v4: fill the A4 sheet and improve distance readability */
.poster-page .poster-card{justify-content:space-between;min-height:860px;padding:32px 35px 25px}
.poster-page .poster-logo{max-width:350px;max-height:160px}
.poster-page .poster-message{margin:15px 0}
.poster-page .poster-kicker{font-size:14px;font-weight:900;letter-spacing:2.2px;margin-bottom:13px}
.poster-page .poster-message h1{font-size:clamp(42px,7vw,62px);font-weight:900;line-height:1.07;letter-spacing:-2px;max-width:560px}
.poster-page .poster-description{font-size:21px;font-weight:650;line-height:1.4;max-width:510px}
.poster-page .poster-qr-frame{width:340px;height:340px;padding:17px;border:2px solid #dfe5ee}
.poster-page .poster-cta{font-size:29px;font-weight:900;letter-spacing:-.8px;margin:18px 0 5px}
.poster-page .poster-hint{font-size:15px;font-weight:600}
.poster-page .poster-footer{margin-top:8px;padding-top:12px;font-size:12px;font-weight:600}
.poster-page .poster-url{font-size:11px}
@media(max-width:540px){.poster-page .poster-card{min-height:780px;padding:28px 17px 22px}.poster-page .poster-logo{max-width:78vw;max-height:145px}.poster-page .poster-message h1{font-size:clamp(36px,9vw,52px)}.poster-page .poster-description{font-size:17px}.poster-page .poster-qr-frame{width:min(330px,84vw);height:auto;aspect-ratio:1}.poster-page .poster-cta{font-size:clamp(21px,5.4vw,28px)}}
@media print{
 .poster-page .poster-card{justify-content:space-between!important;padding:10mm 12mm 9mm!important}
 .poster-page .poster-header{min-height:40mm!important;justify-content:center!important}
 .poster-page .poster-logo{max-width:110mm!important;max-height:42mm!important}
 .poster-page .poster-message{margin:2mm 0!important}
 .poster-page .poster-kicker{font-size:13pt!important;font-weight:900!important;letter-spacing:1.7pt!important;margin-bottom:4mm!important}
 .poster-page .poster-message h1{font-size:49pt!important;font-weight:900!important;line-height:1.08!important;letter-spacing:-1.6pt!important;max-width:186mm!important;margin-bottom:4mm!important}
 .poster-page .poster-description{font-size:19pt!important;font-weight:650!important;line-height:1.34!important;max-width:180mm!important}
 .poster-page .poster-qr-section{margin:0!important}
 .poster-page .poster-qr-frame{width:104mm!important;height:104mm!important;padding:5mm!important;border:1.5pt solid #dfe5ee!important}
 .poster-page .poster-cta{font-size:25pt!important;font-weight:900!important;margin:4mm 0 1mm!important}
 .poster-page .poster-hint{font-size:12pt!important;font-weight:600!important}
 .poster-page .poster-footer{margin-top:0!important;padding-top:3mm!important;font-size:10pt!important}
 .poster-page .poster-url{font-size:9pt!important}
}

/* Team workspace v2 — responsive, spacious, accessible */
.team-workspace{--team-surface:#fff;--team-canvas:#f5f7fc;--team-ink:#1b2840;--team-muted:#718098;--team-line:#e5eaf3;--team-hover:#edf2ff;--team-accent:#5366ec;grid-template-columns:242px minmax(330px,390px) minmax(0,1fr);background:var(--team-canvas);color:var(--team-ink);min-width:0}
.team-workspace .sidebar{padding:26px 16px 18px;background:#101a2f;min-width:0}
.team-workspace .sidebar .logo{display:flex;align-items:center;gap:11px;font-size:21px;margin:0 8px 40px;line-height:1.1}
.team-workspace .logo-mark{display:grid;place-items:center;width:37px;height:37px;background:#5366ec;border-radius:12px;font-size:22px}
.team-workspace .logo small{display:block;margin-top:6px;font-size:10px;font-weight:500;letter-spacing:1px;color:#9aaac7}
.team-workspace .side-label{margin:16px 12px 10px;font-size:10px;letter-spacing:1.5px}
.team-workspace .shop-control{margin:0 0 30px;padding:16px;background:#202c45;border:1px solid #2a3855;border-radius:15px}
.team-workspace .shop-control strong{font-size:13px}
.team-workspace .shop-toggle{padding:12px;font-size:12px;border-radius:10px}
.team-workspace .store-link{font-weight:650;font-size:13px;padding:13px 14px;margin-bottom:5px}
.team-workspace .sidebar-bottom{gap:4px}
.team-workspace .sidebar-bottom a,.team-workspace .sidebar-bottom .text-button{display:block;width:100%;text-align:left;padding:12px 14px;border-radius:10px;font-size:13px;color:#c9d5ee}
.team-workspace .sidebar-bottom a:hover,.team-workspace .sidebar-bottom .text-button:hover{background:#263550}
.team-workspace .threads{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--team-surface);border-right:1px solid var(--team-line)}
.team-workspace .panel-head{min-height:91px;padding:20px 22px;border-color:var(--team-line)}
.team-workspace .panel-head h1{font-size:23px;letter-spacing:-.7px}
.team-workspace .panel-head h2{font-size:19px;letter-spacing:-.4px}
.team-workspace .section-eyebrow{margin:0 0 5px;color:var(--team-accent);font-size:10px;font-weight:800;letter-spacing:1.4px}
.team-workspace .count-pill{border-radius:20px;background:var(--team-hover);color:var(--team-accent);padding:6px 10px;font-size:11px;font-weight:700;white-space:nowrap}
.team-workspace .thread-filters{padding:16px;gap:9px;border-color:var(--team-line)}
.team-workspace .thread-filters input,.team-workspace .thread-filters select{font-size:13px;padding:11px 12px;border:1px solid var(--team-line);border-radius:11px;background:var(--team-canvas);color:var(--team-ink)}
.team-workspace .thread-filters .search-field{grid-column:1/-1;display:flex;align-items:center;gap:8px;padding-left:12px;border:1px solid var(--team-line);border-radius:11px;background:var(--team-canvas);color:var(--team-muted)}
.team-workspace .search-field span{font-size:23px;line-height:1}
.team-workspace .search-field input{grid-column:auto;flex:1;min-width:0;border:0;background:transparent;padding-left:0;outline:0}
.team-workspace .search-field:focus-within{outline:2px solid var(--team-accent);outline-offset:1px}
.team-workspace #thread-sort{grid-column:1/-1}
.team-workspace .merge-toolbar{padding:11px 16px;font-size:12px;border-color:var(--team-line);color:var(--team-muted)}
.team-workspace .merge-toolbar button{font-size:11px;padding:9px 11px}
.team-workspace #thread-list{flex:1;overflow-y:auto;min-height:0}
.team-workspace .thread{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;padding:17px 16px;border-bottom:1px solid var(--team-line);background:var(--team-surface);color:var(--team-ink);min-height:90px}
.team-workspace .thread:hover,.team-workspace .thread.selected{background:var(--team-hover)}
.team-workspace .thread.selected::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:0 3px 3px 0;background:var(--team-accent)}
.team-workspace .thread .avatar{grid-column:1;grid-row:1;display:grid;place-items:center;width:44px;height:44px;padding:0;background:var(--team-hover);border-radius:15px;font-size:17px}
.team-workspace .thread .thread-info{grid-column:2;min-width:0;display:block}
.team-workspace .thread strong{font-size:14px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-workspace .thread small{margin-top:5px;font-size:11px;line-height:1.4;color:var(--team-muted)}
.team-workspace .thread-time{grid-column:3;align-self:start;padding-top:2px;font-size:10px;color:var(--team-muted);white-space:nowrap}
.team-workspace .thread .merge-indicator{position:absolute;left:7px;top:8px;z-index:1}
.team-workspace .thread-tags{margin-top:8px;gap:4px}
.team-workspace .tag-chip{font-size:10px}
.team-workspace .team-chat{min-width:0;background:var(--team-canvas)}
.team-workspace .room-heading{background:var(--team-surface);align-items:center;gap:16px;flex-wrap:wrap}
.team-workspace .room-identity{display:flex;align-items:center;gap:12px;min-width:0}
.team-workspace .room-avatar{width:44px;height:44px;display:grid;place-items:center;border-radius:15px;background:var(--team-hover);font-size:20px}
.team-workspace .room-identity small{display:block;margin-top:4px;color:var(--team-muted);font-size:12px}
.team-workspace .actions{flex-wrap:wrap;justify-content:flex-end;gap:7px}
.team-workspace .actions button{border:1px solid var(--team-line);border-radius:9px;padding:9px 11px;background:var(--team-surface);color:var(--team-ink);font-size:12px;font-weight:600}
.team-workspace .actions button:hover:not(:disabled){background:var(--team-hover)}
.team-workspace .actions button:disabled{opacity:.45;cursor:not-allowed}
.team-workspace #close-room:not(:disabled){color:#2c8a68}
.team-workspace #block-room:not(:disabled){color:#c25b66}
.team-workspace .room-tags{background:var(--team-surface);padding:0 22px 10px;margin:0}
.team-workspace .team-messages{background:var(--team-canvas);padding:25px clamp(20px,4vw,50px);gap:12px}
.team-workspace .team-messages .bubble{font-size:14px;line-height:1.55;padding:13px 17px;max-width:min(75%,650px);box-shadow:0 2px 10px #101b2c0a}
.team-workspace .team-messages .bubble.theirs{background:var(--team-surface);border:1px solid var(--team-line);color:var(--team-ink)}
.team-workspace .center-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;text-align:center;max-width:350px;padding:24px;color:var(--team-muted)}
.team-workspace .center-empty strong{font-size:19px;line-height:1.3;color:var(--team-ink)}
.team-workspace .center-empty p{font-size:13px;line-height:1.55;margin:0}
.team-workspace .empty-illustration{display:grid;place-items:center;width:76px;height:76px;border-radius:24px;background:var(--team-hover);color:var(--team-accent);font-size:34px;margin-bottom:9px}
.team-workspace .reply-dock{padding:15px 22px 10px;background:var(--team-surface);border-top:1px solid var(--team-line)}
.team-workspace .reply-dock .composer{border:1px solid var(--team-line);border-radius:16px;background:var(--team-canvas);padding:7px 8px 7px 15px;gap:9px}
.team-workspace .reply-dock textarea{background:transparent;color:var(--team-ink);border:0;padding:10px 4px;min-height:42px;max-height:130px;resize:none;font-size:14px}
.team-workspace .reply-dock textarea:focus{border:0;outline:0}
.team-workspace .reply-dock .composer:focus-within{outline:2px solid var(--team-accent);outline-offset:1px}
.team-workspace .reply-dock .composer button{width:43px;height:43px}
.team-workspace .reply-dock .status{display:block;padding:8px 2px 0;font-size:11px;min-height:24px;color:var(--team-muted)}
.team-workspace button:focus-visible,.team-workspace a:focus-visible,.team-workspace select:focus-visible{outline:2px solid var(--team-accent);outline-offset:2px}
@media(max-width:1150px){.team-workspace{grid-template-columns:195px minmax(290px,340px) minmax(0,1fr)}.team-workspace .sidebar{padding:22px 12px}.team-workspace .room-heading{align-items:flex-start}.team-workspace .actions{justify-content:flex-start}}
@media(max-width:850px){.team-workspace{grid-template-columns:175px minmax(0,1fr);grid-template-rows:minmax(0,44%) minmax(0,56%)}.team-workspace .sidebar{grid-row:1/3}.team-workspace .threads{grid-column:2;grid-row:1}.team-workspace .team-chat{grid-column:2;grid-row:2}.team-workspace .panel-head{min-height:70px;padding:12px 16px}.team-workspace .thread-filters{padding:10px 14px}.team-workspace .team-messages{padding:15px}.team-workspace .reply-dock{padding:10px 14px}}
@media(max-width:520px){.team-workspace{grid-template-columns:1fr;grid-template-rows:48px minmax(0,43%) minmax(0,57%)}.team-workspace .mobile-menu{display:block;grid-row:1;grid-column:1;background:#101a2f}.team-workspace .sidebar{grid-row:auto;display:none;top:48px;left:0;right:0;bottom:0;position:absolute;z-index:8;overflow-y:auto}.team-workspace .sidebar.mobile-open{display:flex}.team-workspace .threads{grid-column:1;grid-row:2}.team-workspace .team-chat{grid-column:1;grid-row:3}.team-workspace .thread{min-height:78px;padding:12px}.team-workspace .room-heading{gap:10px}.team-workspace .room-avatar{display:none}.team-workspace .actions button{font-size:11px;padding:7px 9px}.team-workspace .team-messages .bubble{max-width:88%}.team-workspace .center-empty{padding:12px}.team-workspace .empty-illustration{width:50px;height:50px;font-size:25px}}
@media(prefers-color-scheme:dark){.team-workspace{--team-surface:#1b2639;--team-canvas:#131c2d;--team-ink:#eef2fb;--team-muted:#a5b3c9;--team-line:#35445c;--team-hover:#293958;--team-accent:#a0b0ff;color:var(--team-ink)}.team-workspace .sidebar{background:#0c1424}.team-workspace .thread,.team-workspace .thread-filters input,.team-workspace .thread-filters select,.team-workspace .actions button,.team-workspace .reply-dock .composer{color:var(--team-ink)}.team-workspace .thread.selected,.team-workspace .thread:hover{background:var(--team-hover)}.team-workspace .team-messages .bubble.theirs{background:var(--team-surface);color:var(--team-ink)}.team-workspace .team-messages .bubble.mine{background:#5366dc;color:#fff}.team-workspace .reply-dock textarea::placeholder{color:var(--team-muted)}}

/* Keep conversation avatars perfectly circular regardless of grid/flex sizing. */
.team-workspace .thread .avatar{width:44px!important;height:44px!important;min-width:44px;min-height:44px;max-width:44px;max-height:44px;flex:0 0 44px;aspect-ratio:1/1;border-radius:50%!important;display:grid;place-items:center;padding:0;line-height:1;overflow:hidden;box-sizing:border-box}
.team-workspace .thread .avatar svg,.team-workspace .thread .avatar img{width:21px;height:21px;object-fit:contain}

/* Clear conversation lifecycle indicators in the inbox list */
.team-workspace .thread .conversation-state{display:inline-flex;align-items:center;gap:5px;width:max-content;margin-top:7px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;line-height:1.25;letter-spacing:.1px}
.team-workspace .thread .conversation-state::before{content:"";width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:currentColor}
.team-workspace .thread .conversation-state-new{color:#2d5fcd;background:#e8efff}
.team-workspace .thread .conversation-state-open{color:#137d5b;background:#dff7ed}
.team-workspace .thread .conversation-state-closed{color:#596477;background:#e9edf2}
.team-workspace .thread .conversation-state-blocked{color:#b6374c;background:#ffeaee}
.team-workspace .thread.thread-state-new:not(.selected){border-left:3px solid #6688f7}
.team-workspace .thread.thread-state-blocked:not(.selected){border-left:3px solid #e26a7d}
.team-workspace .thread .thread-info{display:flex;flex-direction:column;align-items:flex-start}
.team-workspace .thread .thread-info strong{max-width:100%}
@media(prefers-color-scheme:dark){
 .team-workspace .thread .conversation-state-new{color:#b4c8ff;background:#273c66}
 .team-workspace .thread .conversation-state-open{color:#9ae6c5;background:#174c3f}
 .team-workspace .thread .conversation-state-closed{color:#b4bfd0;background:#354154}
 .team-workspace .thread .conversation-state-blocked{color:#ffb1bc;background:#5c2c3c}
}

/* Mobile team inbox: one task per screen, not two stacked panels */
.mobile-back-to-inbox{display:none}
@media(max-width:520px){
 html,body{max-width:100%;overflow-x:hidden}
 .team-workspace{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:52px minmax(0,1fr)!important;height:100dvh!important;min-height:0!important;overflow:hidden!important}
 .team-workspace .mobile-menu{display:block!important;grid-column:1!important;grid-row:1!important;width:100%;min-height:52px;padding:0 16px;text-align:left;font-size:15px;font-weight:700}
 .team-workspace .sidebar{position:fixed!important;top:52px;bottom:0;left:0;right:0;z-index:30;overflow-y:auto}
 .team-workspace .threads,.team-workspace .team-chat{grid-column:1!important;grid-row:2!important;min-width:0;min-height:0;height:100%!important;overflow:hidden}
 .team-workspace.mobile-inbox-view .threads{display:flex!important}
 .team-workspace.mobile-inbox-view .team-chat{display:none!important}
 .team-workspace.mobile-chat-view .threads{display:none!important}
 .team-workspace.mobile-chat-view .team-chat{display:flex!important;flex-direction:column}
 .team-workspace.mobile-chat-view .mobile-menu{display:none!important}
 .team-workspace.mobile-chat-view{grid-template-rows:minmax(0,1fr)!important}
 .team-workspace.mobile-chat-view .team-chat{grid-row:1!important}
 .team-workspace .thread-heading{flex:0 0 auto}
 .team-workspace .thread-filters{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .team-workspace .thread-filters .search-field,.team-workspace #thread-sort{grid-column:1/-1}
 .team-workspace .merge-toolbar{flex:0 0 auto}
 .team-workspace #thread-list{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
 .team-workspace .room-heading{flex:0 0 auto;display:flex;align-items:center;padding:11px 13px;min-height:0;gap:8px}
 .team-workspace .mobile-back-to-inbox{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;border:0;background:transparent;color:var(--team-accent);font-weight:750;font-size:14px;padding:9px 5px;min-height:44px}
 .team-workspace .room-identity{flex:1;min-width:0}
 .team-workspace .room-identity h2{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
 .team-workspace .room-identity small{font-size:11px}
 .team-workspace .room-heading .section-eyebrow{display:none}
 .team-workspace .room-heading .actions{width:100%;display:flex;flex-wrap:nowrap;overflow-x:auto;gap:7px;padding:3px 0 2px;scrollbar-width:none}
 .team-workspace .room-heading .actions::-webkit-scrollbar{display:none}
 .team-workspace .room-heading .actions button{white-space:nowrap;flex:0 0 auto;min-height:36px}
 .team-workspace .room-tags{flex:0 0 auto;padding:5px 12px}
 .team-workspace .team-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:14px 12px}
 .team-workspace .reply-dock{flex:0 0 auto;padding:9px 12px max(9px,env(safe-area-inset-bottom));border-top:1px solid var(--team-line)}
 .team-workspace .reply-dock .composer{padding:5px 6px 5px 11px}
 .team-workspace .reply-dock textarea{min-height:38px}
 .team-workspace .reply-dock .status{padding-top:4px;min-height:18px}
}

/* Compact inbox rows: timestamp and status aligned to the right */
.team-workspace .thread{grid-template-columns:44px minmax(0,1fr) max-content;min-height:72px;gap:10px;padding:12px 14px}
.team-workspace .thread .thread-info{grid-column:2;grid-row:1;min-width:0;align-items:flex-start}
.team-workspace .thread .thread-trailing{grid-column:3;grid-row:1;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:8px;min-width:0;align-self:stretch}
.team-workspace .thread .thread-trailing .thread-time{grid-column:auto;align-self:auto;padding:0;white-space:nowrap;font-size:10px}
.team-workspace .thread .thread-trailing .conversation-state{margin:0;white-space:nowrap;max-width:100%;font-size:10px}
.team-workspace .thread .thread-info .thread-tags{margin-top:5px}
@media(max-width:520px){
 .team-workspace .thread{grid-template-columns:44px minmax(0,1fr) max-content;min-height:70px;padding:10px 12px;gap:10px}
 .team-workspace .thread .thread-trailing{gap:6px}
}

/* Inbox row consistency: equal height with or without tags */
.team-workspace .thread{
  height:94px;min-height:94px;max-height:94px;
  grid-template-columns:44px minmax(0,1fr) 108px;
  align-items:center;gap:10px;padding:11px 14px;
}
.team-workspace .thread .thread-info{
  min-width:0;max-width:100%;height:100%;min-height:0;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;
}
.team-workspace .thread .thread-info strong,
.team-workspace .thread .thread-info small{margin:0;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-workspace .thread .thread-info strong{font-size:13px}
.team-workspace .thread .thread-info small{font-size:11px}
.team-workspace .thread .thread-info .thread-tags{
  display:flex;flex-wrap:nowrap;gap:4px;margin:2px 0 0;
  max-width:100%;min-width:0;overflow:hidden;height:20px;align-items:center;
}
.team-workspace .thread .thread-info .thread-tags:empty{visibility:hidden}
.team-workspace .thread .thread-info .thread-tags .tag-chip{flex:0 0 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-workspace .thread .thread-trailing{
  width:108px;height:100%;min-width:0;max-width:108px;
  align-items:flex-end;justify-content:center;gap:7px;
}
.team-workspace .thread .thread-trailing .thread-time{font-size:10px;line-height:14px}
.team-workspace .thread .thread-trailing .conversation-state{
  box-sizing:border-box;display:inline-flex;flex:0 0 auto;
  align-items:center;justify-content:center;min-height:25px;height:25px;
  padding:0 9px;font-size:10px;line-height:1;border-radius:999px;
}
.team-workspace .thread .thread-trailing .conversation-state::before{flex-shrink:0}
@media(max-width:520px){
  .team-workspace .thread{height:86px;min-height:86px;max-height:86px;grid-template-columns:44px minmax(0,1fr) 104px;padding:9px 12px}
  .team-workspace .thread .thread-trailing{width:104px;max-width:104px}
}

/* QR poster v5 — deliberately fills the entire A4 page.
   Explicit grid tracks prevent justify-content:space-between from creating
   arbitrary blank bands and keep the QR code's quiet zone intact. */
.poster-page .poster-card{
 display:grid;grid-template-rows:155px minmax(190px,1fr) 390px 55px;
 align-items:center;justify-items:center;align-content:stretch;
 gap:0;min-height:900px;padding:22px 25px 18px;
}
.poster-page .poster-header{align-self:center;width:100%;min-height:0}
.poster-page .poster-logo{
 display:block;width:min(90%,490px)!important;max-width:490px!important;
 height:155px!important;max-height:155px!important;object-fit:contain;
}
.poster-page .poster-message{margin:0!important;align-self:center}
.poster-page .poster-kicker{font-size:15px;font-weight:900;margin-bottom:13px}
.poster-page .poster-message h1{
 font-size:clamp(45px,6.7vw,70px);font-weight:950;line-height:1.04;
 letter-spacing:-2.3px;margin:0 auto 14px;max-width:580px;
}
.poster-page .poster-description{font-size:23px;font-weight:750;line-height:1.3;max-width:540px}
.poster-page .poster-qr-section{margin:0!important;align-self:center}
.poster-page .poster-qr-frame{width:345px;height:345px;padding:14px;border:2px solid #dfe5ee;border-radius:18px}
.poster-page .poster-cta{font-size:30px;font-weight:950;margin:12px 0 2px}
.poster-page .poster-hint{font-size:15px;font-weight:650}
.poster-page .poster-footer{align-self:end;margin:0!important;padding:8px 0 0;font-size:12px}
@media(max-width:540px){
 .poster-page .poster-card{grid-template-rows:130px minmax(180px,1fr) 345px 55px;min-height:780px;padding:18px 14px}
 .poster-page .poster-logo{width:min(95%,390px)!important;height:130px!important;max-height:130px!important}
 .poster-page .poster-message h1{font-size:clamp(37px,9vw,54px)}
 .poster-page .poster-description{font-size:18px}
 .poster-page .poster-qr-frame{width:min(310px,80vw);height:auto;aspect-ratio:1}
 .poster-page .poster-cta{font-size:23px}
}
@media print{
 @page{size:A4 portrait;margin:0}
 .poster-page .poster-card{
  display:grid!important;grid-template-rows:54mm 71mm 139mm 17mm!important;
  align-items:center!important;justify-items:center!important;
  align-content:stretch!important;justify-content:stretch!important;
  box-sizing:border-box!important;width:210mm!important;height:297mm!important;
  min-height:297mm!important;max-height:297mm!important;
  padding:8mm 10mm!important;gap:0!important;overflow:hidden!important;
 }
 .poster-page .poster-header{align-self:center!important;width:100%!important;min-height:0!important}
 .poster-page .poster-logo{
  width:154mm!important;max-width:154mm!important;
  height:52mm!important;max-height:52mm!important;
  object-fit:contain!important;margin:0 auto!important;
 }
 .poster-page .poster-message{margin:0!important;align-self:center!important}
 .poster-page .poster-kicker{font-size:15pt!important;font-weight:900!important;margin:0 0 4mm!important}
 .poster-page .poster-message h1{
  font-size:51pt!important;line-height:1.05!important;font-weight:950!important;
  letter-spacing:-1.5pt!important;margin:0 auto 4mm!important;max-width:188mm!important;
 }
 .poster-page .poster-description{
  font-size:20pt!important;font-weight:750!important;line-height:1.3!important;
  max-width:185mm!important;margin:0 auto!important;
 }
 .poster-page .poster-qr-section{align-self:center!important;margin:0!important}
 .poster-page .poster-qr-frame{
  box-sizing:border-box!important;width:111mm!important;height:111mm!important;
  padding:4mm!important;border:1.5pt solid #dfe5ee!important;border-radius:4mm!important;
 }
 .poster-page .poster-cta{font-size:26pt!important;font-weight:950!important;margin:4mm 0 1mm!important}
 .poster-page .poster-hint{font-size:12pt!important}
 .poster-page .poster-footer{align-self:end!important;margin:0!important;padding:2mm 0 0!important;font-size:10pt!important}
 .poster-page .poster-url{font-size:9pt!important}
}

/* QR poster v6 — attention-first retail signage, not a plain document */
.poster-page .poster-card{background:#fff;color:#17243b}
.poster-page .poster-message-spotlight{
 box-sizing:border-box;width:calc(100% + 50px);max-width:none;
 background:#142c26;color:#fff;padding:20px 20px 23px;
 border-top:6px solid #c7a35b;border-bottom:6px solid #c7a35b;
 text-align:center;
}
.poster-page .poster-message-spotlight .poster-kicker{color:#e9ce8a;letter-spacing:2.4px}
.poster-page .poster-message-spotlight h1{color:#fff;text-shadow:none;max-width:620px}
.poster-page .poster-message-spotlight .poster-description{color:#fff;font-weight:700}
.poster-page .poster-cta-banner{
 display:flex;align-items:center;justify-content:center;gap:12px;
 width:max-content;max-width:100%;box-sizing:border-box;margin:13px auto 6px;
 padding:13px 22px;border-radius:12px;background:#eac56e;color:#13271e;
 box-shadow:0 5px 0 #b18c42;font-weight:950;line-height:1.12;
}
.poster-page .poster-cta-banner span{font-size:1.1em}
.poster-page .poster-qr-frame{border:3px solid #193f31;box-shadow:0 8px 0 #d8e3d8}
@media(max-width:540px){
 .poster-page .poster-message-spotlight{width:calc(100% + 28px);padding:14px 12px;border-width:4px}
 .poster-page .poster-cta-banner{padding:10px 14px;font-size:20px}
}
@media print{
 .poster-page .poster-card{background:#fff!important;color:#17243b!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
 .poster-page .poster-message-spotlight{
  width:210mm!important;max-width:210mm!important;
  box-sizing:border-box!important;margin:0 -10mm!important;
  padding:4mm 9mm 5mm!important;
  background:#142c26!important;color:#fff!important;
  border-top:1.5mm solid #c7a35b!important;
  border-bottom:1.5mm solid #c7a35b!important;
  -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;
 }
 .poster-page .poster-message-spotlight .poster-kicker{color:#e9ce8a!important;font-size:12pt!important;margin-bottom:2mm!important}
 .poster-page .poster-message-spotlight h1{color:#fff!important;font-size:45pt!important;margin-bottom:3mm!important}
 .poster-page .poster-message-spotlight .poster-description{color:#fff!important;font-size:17pt!important;line-height:1.22!important}
 .poster-page .poster-qr-frame{border:2pt solid #193f31!important;box-shadow:none!important}
 .poster-page .poster-cta-banner{
  display:flex!important;align-items:center!important;justify-content:center!important;
  max-width:185mm!important;margin:4mm auto 1mm!important;padding:3mm 6mm!important;
  border-radius:3mm!important;background:#eac56e!important;color:#13271e!important;
  box-shadow:none!important;font-size:23pt!important;line-height:1.1!important;
  -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;
 }
}

/* QR poster v7: prioritize actual visible brand and the promise text. */
.poster-page .poster-card{grid-template-rows:215px minmax(250px,1fr) 370px 48px;overflow:hidden}
.poster-page .poster-header{overflow:visible;display:flex;align-items:center;justify-content:center}
.poster-page .poster-logo{
 width:min(100%,580px)!important;max-width:580px!important;
 height:205px!important;max-height:205px!important;
 object-fit:contain!important;transform:scale(1.16);transform-origin:center;
}
.poster-page .poster-message-spotlight{padding:22px 20px 25px}
.poster-page .poster-message-spotlight .poster-description{
 font-size:clamp(25px,3.7vw,31px);font-weight:850;line-height:1.22;
 max-width:565px;margin:0 auto;
}
@media(max-width:540px){
 .poster-page .poster-card{grid-template-rows:175px minmax(230px,1fr) 335px 48px}
 .poster-page .poster-logo{width:100%!important;height:170px!important;max-height:170px!important;transform:scale(1.13)}
 .poster-page .poster-message-spotlight .poster-description{font-size:clamp(21px,5vw,27px);line-height:1.25}
}
@media print{
 .poster-page .poster-card{
  grid-template-rows:64mm 82mm 115mm 16mm!important;
  padding:10mm 10mm!important;
 }
 .poster-page .poster-header{height:64mm!important;min-height:0!important;overflow:visible!important}
 .poster-page .poster-logo{
  width:185mm!important;max-width:185mm!important;
  height:63mm!important;max-height:63mm!important;
  object-fit:contain!important;transform:scale(1.13)!important;
  transform-origin:center!important;
 }
 .poster-page .poster-message-spotlight{padding:4mm 9mm 5mm!important}
 .poster-page .poster-message-spotlight .poster-kicker{font-size:12pt!important;margin-bottom:2mm!important}
 .poster-page .poster-message-spotlight h1{font-size:43pt!important;line-height:1.04!important;margin-bottom:3mm!important}
 .poster-page .poster-message-spotlight .poster-description{
  font-size:23pt!important;font-weight:850!important;line-height:1.2!important;
  max-width:185mm!important;margin:0 auto!important;
 }
 .poster-page .poster-qr-frame{width:88mm!important;height:88mm!important;padding:4mm!important}
 .poster-page .poster-cta-banner{font-size:22pt!important;margin:3mm auto 1mm!important}
 .poster-page .poster-hint{font-size:11pt!important}
}
