/* Customer conversation. Staff tools keep their existing stylesheet. */
body.chat-page{--paper:#faf9f7;--ink:#26232a;--muted:#89838b;--line:#e8e5e2;--pink:#ca145d;background:var(--paper);height:var(--chat-height,100dvh);overflow:hidden;display:flex;flex-direction:column}
.chat-page .top{height:68px;min-height:68px;padding:0 24px;justify-content:center;background:transparent;border-bottom:1px solid #eeebe7}
.chat-page .brand{gap:9px;font-size:12px;font-weight:700;letter-spacing:.015em;line-height:1.04}
.chat-page .brand img{width:36px;height:36px;object-fit:contain}
.chat-app{width:100%;max-width:820px;min-height:0;flex:1;align-self:center;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.chat-heading{padding:24px 22px 12px}
.product-trigger{display:flex;align-items:center;gap:12px;text-align:left;padding:0;border:0;background:none;color:var(--ink);max-width:100%}
.product-trigger h1{font-size:clamp(25px,5.8vw,34px);margin:0;line-height:1.12;letter-spacing:-.035em}
.product-trigger>svg{width:18px;height:18px;flex-shrink:0;stroke:#98909a;fill:none;stroke-width:1.7;transition:transform .2s}
.product-trigger:hover>svg{transform:translateY(2px)}
.product-context{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;margin-top:8px;font-size:12px;color:var(--muted)}
.chat-faces{display:flex;gap:4px;flex-shrink:0}
.chat-faces button{border:0;border-radius:20px;font-size:11px;padding:5px 10px;color:#7e7580;background:transparent}
.chat-faces button[aria-pressed=true]{background:#eeebe7;color:var(--ink)}
.chat-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:8px 22px 20px;scrollbar-width:thin;scrollbar-color:#dcd5da transparent}
.chat-thread{display:flex;flex-direction:column;gap:27px;padding-top:5px;padding-bottom:8px}
.chat-message{font-size:16px;line-height:1.65;max-width:100%;overflow-wrap:anywhere}
.chat-message p{margin:0 0 12px;white-space:pre-wrap}
.chat-message p:last-child{margin-bottom:0}
.message-author{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:.14em;font-weight:700;color:var(--pink);margin-bottom:10px}
.online-dot{height:5px;width:5px;border-radius:50%;background:currentColor;opacity:.6}
.chat-message.assistant{align-self:flex-start;width:100%}
.chat-message.user{align-self:flex-end;background:#efedea;padding:12px 17px;max-width:88%;border-radius:20px 20px 5px 20px;font-size:15px}
.chat-message.user .message-author{color:var(--muted);font-size:9px;margin-bottom:4px}
.welcome-message{padding-top:8px;max-width:540px}
.chat-button{display:inline-flex;align-items:center;justify-content:center;gap:18px;border:0;border-radius:13px;background:var(--pink);color:#fff;padding:12px 18px;min-height:44px;font-size:13px;font-weight:700;text-decoration:none;cursor:pointer;transition:background .18s,transform .18s;white-space:normal;text-align:center}
.chat-button:hover{background:#ae0d4d;transform:translateY(-1px)}
.chat-button.soft{background:#f5e5ec;color:#a90c4c}
.chat-button.soft:hover{background:#f0d5e1}
.chat-button:disabled{opacity:.45;transform:none;cursor:default}
.welcome-message .chat-button{margin-top:9px}
.text-action{background:none;border:0;padding:11px 0;color:#79717c;font-size:12px;text-decoration:none;cursor:pointer}
.text-action:hover{color:var(--pink)}
.thread-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:13px}
.thread-note{font-size:12px!important;color:#817883;line-height:1.5}
.thread-summary{font-size:14px!important;line-height:1.7;padding:12px 0 2px;color:#726874}
.draft-summary{margin:10px 0;padding:0;border:0;font-size:12px;color:#847a87}
.draft-summary p{margin-top:9px;font-size:13px;color:#665b68}
.art-in-chat{margin:14px 0 10px;max-width:470px}
.art-in-chat img{display:block;max-height:420px;max-width:100%;width:auto;height:auto;object-fit:contain;border-radius:10px;border:1px solid #eee8e5;background:#f2ede7}
.art-in-chat figcaption{font-size:11px;color:var(--muted);margin-top:7px}
.attachment-preview{display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:#fff;max-width:360px;margin-bottom:12px}
.attachment-preview img{width:50px;height:50px;object-fit:contain;border-radius:6px}
.attachment-preview strong{display:block;font-size:13px;font-weight:700}
.attachment-preview small{display:block;font-size:11px;color:var(--muted)}
.analysis-details{font-size:12px;color:#776e7a;margin:10px 0}
.analysis-details summary{cursor:pointer;padding:5px 0}
.analysis-details ul{padding-left:18px}
.analysis-details li{margin:7px 0}
.analysis-details p{white-space:pre-wrap}
.approval-mark{display:inline-flex;align-items:center;gap:6px;color:#426354;font-size:12px}
.chat-busy{display:flex;align-items:center;gap:10px;color:#897687;font-size:12px;margin:12px 0 5px}
.typing-dots{display:flex;gap:3px}
.typing-dots i{width:5px;height:5px;background:#b27c94;border-radius:50%;animation:chat-think 1.2s ease-in-out infinite}
.typing-dots i:nth-child(2){animation-delay:.15s}.typing-dots i:nth-child(3){animation-delay:.3s}
.composer-dock{background:var(--paper);padding:9px 14px max(9px,env(safe-area-inset-bottom));position:relative}
.composer-dock:before{content:'';position:absolute;top:-17px;left:0;right:0;height:18px;background:linear-gradient(transparent,var(--paper));pointer-events:none}
.chat-composer{border:1px solid #ded9dc;border-radius:24px;background:#fff;padding:10px 10px 8px;box-shadow:0 3px 15px #3d293105;transition:border-color .2s,box-shadow .2s}
.chat-composer:focus-within{border-color:#cdb5c2;box-shadow:0 2px 12px #7c28550a}
.chat-composer textarea{display:block;resize:none;border:0;outline:0!important;background:transparent;box-shadow:none;font-size:16px;line-height:1.5;padding:7px 9px 6px;width:100%;min-height:39px;max-height:130px;margin:0;border-radius:0;scrollbar-width:thin}
.chat-composer textarea::placeholder{color:#a299a4}
.composer-actions{display:flex;align-items:center;gap:3px}
.chat-icon{width:42px;height:42px;display:inline-grid;place-items:center;background:transparent;border:0;border-radius:50%;color:#857b88;flex-shrink:0;padding:10px;transition:background .18s,color .18s}
.chat-icon svg,.chat-send svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chat-icon:hover{background:#f5f1f4;color:#b01556}
.chat-icon.recording{color:var(--pink);background:#f9e4ee;animation:recording-pulse 1.5s infinite}
.chat-send{height:42px;width:42px;display:grid;place-items:center;border:0;background:var(--pink);color:#fff;border-radius:50%;margin-left:3px;flex-shrink:0;transition:transform .18s,background .18s}
.chat-send:hover{transform:translateY(-1px);background:#b01250}
.chat-send:disabled{opacity:.4;cursor:default;transform:none}
.chat-save{font-size:10px;color:#a59ba8;flex:1;margin-left:3px}
.composer-note{font-size:9px;line-height:1.4;color:#a097a2;text-align:center;margin:8px 4px 0}
.composer-note a{color:inherit;text-underline-offset:2px}
.pending-files{font-size:12px;margin:0 10px 8px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:#776e79}
.pending-files button{background:none;border:0;color:var(--pink);font-size:12px}
.product-dialog{padding:0;border:0;border-radius:24px 24px 0 0;width:min(100%,520px);max-width:100%;max-height:86dvh;margin:auto auto 0;color:var(--ink);background:#fff;box-shadow:0 -20px 60px #28162918;overflow:auto;overscroll-behavior:contain}
.product-dialog::backdrop{background:#2417254d;backdrop-filter:blur(3px)}
.product-dialog[open]{animation:sheet-in .24s ease-out}
.sheet-handle{height:4px;width:32px;background:#e1dbe0;border-radius:10px;margin:10px auto 0}
.sheet-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 23px 14px}
.sheet-eyebrow{font-size:9px;font-weight:700;letter-spacing:.15em;color:#a37c90;display:block;margin-bottom:8px}
.sheet-heading h2{font-size:28px;letter-spacing:-.035em}
.product-list{padding:0 18px}
.product-option{display:flex;align-items:center;gap:13px;width:100%;border:0;border-bottom:1px solid #f0ecef;border-radius:0;padding:12px 7px;background:#fff;color:var(--ink);text-align:left;transition:background .2s}
.product-option>img{height:48px;width:48px;object-fit:contain;flex-shrink:0}
.product-option>span{flex:1}.product-option b{font-size:13px;line-height:1.4;display:block}.product-option small{font-size:11px;color:#948997}
.product-option>i{border:1px solid #d9d0da;width:19px;height:19px;border-radius:50%;flex-shrink:0;position:relative}
.product-option[aria-pressed=true]{background:#fcf4f8;border-radius:12px}
.product-option[aria-pressed=true]>i{border:5px solid var(--pink)}
.sheet-options{padding:18px 25px 3px;display:flex;gap:14px}.sheet-options label{flex:1;font-size:11px;color:#817785}
.sheet-options select{display:block;font-size:13px;width:100%;margin-top:6px;border:1px solid var(--line);border-radius:9px;padding:10px;background:#faf9f7;color:var(--ink)}
.sheet-bottom{padding:18px 25px max(18px,env(safe-area-inset-bottom));background:#fff;position:sticky;bottom:0}
.sheet-bottom .chat-button{width:100%}.sheet-bottom p{font-size:9px;line-height:1.5;color:#a59ba6;margin:10px 0 0;text-align:center}
.chat-page #toast{bottom:155px;font-size:13px;line-height:1.5;padding:12px 17px;border-radius:15px;width:max-content;max-width:min(90vw,480px);box-shadow:0 5px 20px #0002}
.delivery-page{overflow:auto!important;height:auto!important;min-height:100dvh}
.delivery-screen{width:100%;max-width:550px;align-self:center;padding:40px 25px 50px;animation:message-in .3s ease-out}
.delivery-check{height:46px;width:46px;border-radius:50%;background:#e9f0eb;color:#58775e;display:grid;place-items:center;margin-bottom:25px}
.delivery-check svg{height:23px;width:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.delivery-screen h1{font-size:40px;margin:12px 0 20px}
.delivery-screen>p{font-size:14px;color:#877b89;line-height:1.7;max-width:410px}
.delivery-code{margin:30px 0;padding:25px 0;border-block:1px solid var(--line);display:flex;flex-direction:column;align-items:flex-start;gap:9px}
.delivery-code>span{font-size:9px;letter-spacing:.12em;color:#978a99}.delivery-code>strong{font-size:29px;letter-spacing:.08em}.delivery-code .chat-button{margin-top:5px}
.delivery-product{display:flex;gap:13px;align-items:center;text-decoration:none;padding:15px 0;border-bottom:1px solid var(--line)}
.delivery-product>span:first-of-type{flex:1}.delivery-product strong{display:block;font-size:13px}.delivery-product small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.delivery-product img{object-fit:contain}
.delivery-expiry{font-size:11px!important;margin:23px 0 6px}
@media(min-width:700px){.chat-page .top{height:78px;min-height:78px}.chat-heading{padding:32px 30px 15px}.chat-scroll{padding:16px 30px 24px}.composer-dock{padding:12px 24px 17px}.chat-thread{gap:30px}.chat-message{font-size:17px}.product-dialog{margin:auto;border-radius:24px;max-height:85dvh}.sheet-handle{display:none}.sheet-heading{padding-top:25px}.delivery-screen{padding-top:60px}.delivery-screen h1{font-size:48px}}
@media(max-height:540px){.chat-page .top{height:48px;min-height:48px}.chat-page .brand img{width:30px;height:30px}.chat-heading{padding-top:10px;padding-bottom:0}.product-trigger h1{font-size:21px}.composer-note{display:none}.composer-dock{padding-bottom:5px}.chat-composer{padding-top:5px}.product-dialog{max-height:93dvh}}
@keyframes sheet-in{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}
@keyframes message-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes chat-think{0%,70%,100%{opacity:.35;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
@keyframes recording-pulse{50%{box-shadow:0 0 0 4px #ca145d13}}
@media(prefers-reduced-motion:reduce){.chat-page *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Conversation v3: fixed catalogue, explicit attachment send, face plans. */
.product-list{display:flex;overflow-x:auto;gap:12px;padding:8px 22px 18px;scroll-snap-type:x proximity}
.product-option{flex:0 0 154px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:16px;padding:14px;scroll-snap-align:start;position:relative}
.product-option>img{height:88px;width:100%}.product-option>span{width:100%}.product-option b{min-height:40px}.product-option>i{position:absolute;top:12px;right:12px;background:white}.product-option[aria-pressed=true]{border-color:var(--pink);border-radius:16px}
.product-dialog{width:min(100%,620px)}.message-face{display:block;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#827783;margin:0 0 6px}
.plan-message{border-left:2px solid #e4b5ca;padding-left:17px}.plan-message>strong{font-size:13px}.plan-message>p{margin-top:8px}.plan-message ul{padding-left:18px;margin:10px 0}.plan-message li{margin:7px 0}.plan-message small{display:block;font-size:10px;color:#8b7f8c;margin-top:9px}
.pending-files{justify-content:flex-start;border:1px solid var(--line);border-radius:14px;padding:8px 10px;background:white;max-width:420px;margin:0 4px 8px}.pending-files img{width:45px;height:45px;object-fit:contain;border-radius:5px}.pending-files>span{min-width:0;flex:1;overflow-wrap:anywhere}.pending-files small{display:block;font-size:10px;color:#9a8794}.pending-files button{font-size:25px;padding:0 10px;min-height:40px}.pending-pdf{flex:none!important;font-size:10px;font-weight:bold}.pdf-order{display:flex;gap:6px;align-items:flex-start;font-size:11px;margin:0 8px 10px}.pdf-order input{width:16px;flex:none;margin-top:2px}
.generation-status{margin-top:10px;font-size:11px;color:#9d3d67}.generation-status>span{display:flex;gap:6px;align-items:center;margin:4px 0}.mini-spinner{height:10px;width:10px;border:1.5px solid #edd2df;border-top-color:var(--pink);border-radius:50%;animation:spin 1s linear infinite}
.final-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:15px 0}.final-previews figure{margin:0}.final-previews img{width:100%;max-height:240px;object-fit:contain;background:white;border:1px solid var(--line);border-radius:10px}.final-previews figcaption{font-size:10px;color:#897d8b;margin-top:5px}
.final-review{border-top:1px solid var(--line);padding-top:16px}.final-review>p{margin-bottom:10px}.final-review figure{scroll-margin-block:20px}.final-review img{height:240px}.final-review .approval-mark{display:block;margin-top:12px}.review-actions{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:12px}.review-actions .chat-button{padding:11px 12px;min-height:44px;font-size:12px}.review-actions .text-action{min-height:44px;font-size:11px;text-align:left}
@media(max-width:699px){.final-review{padding-top:0;border-top:0}.final-review img{height:200px}}
.shopee-button{background:#ee4d2d;margin:15px 0;width:100%;gap:10px}.shopee-button:hover{background:#d83b20}.shopee-button svg{height:21px;width:21px;fill:none;stroke:currentColor;stroke-width:1.7}.email-modal{border:0;border-radius:18px;padding:24px;width:min(92vw,450px);color:var(--ink)}.email-modal::backdrop{background:#2417254d}.email-modal h2{font-size:27px}.email-modal form{display:grid;gap:15px;margin:20px 0}.email-modal input[type=email]{width:100%;padding:12px;border:1px solid var(--line);border-radius:9px}.email-modal label{font-size:13px}.email-modal p{font-size:12px}

/* One conversation; prominent, truthful generation and preview states. */
.generation-status{background:#f7e8ef;border-left:3px solid var(--pink);border-radius:0 12px 12px 0;color:#782343;padding:13px 15px;margin:8px 0 0}
.generation-row,.generation-in-chat{display:flex;align-items:center;gap:12px}.generation-row+.generation-row{margin-top:12px}
.generation-row strong,.generation-in-chat strong{display:block;font-size:15px;line-height:1.35}.generation-row span{display:block;font-size:11px;margin-top:3px}
.generation-status>p{font-size:11px;line-height:1.5;margin:9px 0 0;color:#845a6d;max-width:500px}
.generation-spinner{display:block;flex:0 0 25px;width:25px;height:25px;border:3px solid #e6bacd;border-top-color:var(--pink);border-radius:50%;animation:juju-generation-spin 1s linear infinite}
.generation-in-chat{background:#f7e8ef;border-radius:12px;padding:16px;color:#782343}.generation-in-chat p{font-size:12px;line-height:1.55;margin:5px 0 0}
.preview-ready{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;border:0;background:transparent;text-align:left;color:#782343;font-size:12px;padding:8px 0;min-height:44px}.generation-status>p+.preview-ready{border-top:1px solid #e6c6d4;margin-top:9px}.preview-ready strong{white-space:nowrap;font-size:12px}
.art-in-chat{scroll-margin-block:18px}
.art-open{display:block;width:100%;padding:0;border:0;border-radius:10px;background:transparent;cursor:zoom-in;line-height:0}.art-open img{display:block}.art-open:focus-visible{outline:2px solid var(--pink);outline-offset:4px}
.delivery-code{align-items:center;text-align:center;border:1px solid #eed7e2;border-radius:20px;background:#fcf2f7;padding:28px 16px;gap:12px}.delivery-code>strong{font-size:clamp(27px,7.7vw,36px);color:#a50e4d;letter-spacing:.09em;line-height:1.3;user-select:all}.delivery-code>span{color:#8d5970;letter-spacing:.15em}.delivery-code .chat-button{gap:9px;min-width:170px}.delivery-code svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.copy-pulse{animation:copy-pulse 2.2s ease-in-out infinite}.delivery-back{display:flex;justify-content:center;align-items:center;width:100%;min-height:44px;text-align:center;margin:-5px 0 15px}.delivery-screen h1{margin-top:0}
@keyframes copy-pulse{0%,100%{box-shadow:0 0 0 0 #ca145d00;transform:scale(1)}50%{box-shadow:0 0 0 7px #ca145d12;transform:scale(1.025)}}
.art-viewer{padding:0;border:0;border-radius:18px;background:#faf9f7;color:var(--ink);width:min(1100px,calc(100vw - 24px));height:calc(100dvh - 32px);max-width:none;max-height:none;overflow:hidden}.art-viewer[open]{display:flex;flex-direction:column}.art-viewer::backdrop{background:#17131ccc;backdrop-filter:blur(3px)}
.art-viewer-toolbar{display:flex;align-items:center;gap:12px;padding:10px 14px;flex-shrink:0;border-bottom:1px solid var(--line)}.art-viewer-toolbar h2{font-family:inherit;font-size:15px;line-height:1.4;letter-spacing:0;margin:0;flex:1}.art-viewer-toolbar .text-action{min-height:44px;font-size:13px}
.art-viewer-canvas{flex:1;min-height:0;overflow:auto;display:flex;align-items:center;justify-content:center;padding:16px;background:#eae7e4;touch-action:pan-x pan-y pinch-zoom}.art-viewer-canvas img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 4px 25px #21152615}.art-viewer-canvas.zoomed{display:block}.art-viewer-canvas.zoomed img{max-width:none;max-height:none;margin:auto}
.art-viewer>p{padding:10px 16px;margin:0;font-size:11px;line-height:1.5;text-align:center;color:#7b707e;flex-shrink:0}.delivery-page:has(.art-viewer[open]){overflow:hidden!important}
@media(max-width:699px){.art-viewer{width:100vw;height:100dvh;border-radius:0;margin:0}.art-viewer-toolbar{padding-top:max(10px,env(safe-area-inset-top))}.art-viewer>p{padding-bottom:max(12px,env(safe-area-inset-bottom))}}
@keyframes juju-generation-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.generation-spinner{animation:none}}
