*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%;height:100%;overflow:hidden}body{margin:0;font:15px/1.45 Arial,sans-serif;color:#193348;background:#fff}body.conversation-scene{height:var(--resting-height,100svh);width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:none}button{font:inherit;cursor:pointer;border:0;border-radius:8px;font-weight:600}button:disabled{opacity:.5;cursor:wait}button:focus-visible,textarea:focus-visible{outline:2px solid #009fc5;outline-offset:2px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.brandbar{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;height:70px;padding:10px 4%;border-bottom:1px solid #e5eaee;background:#fff}.brandbar:before{content:'';position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,#00a9dc 0 33.33%,#df258c 33.33% 66.66%,#f7ce27 66.66%)}.brandbar img{width:165px;height:47px;object-fit:contain;max-width:35%}#nationwide{font-size:10px;letter-spacing:1px;text-align:center;font-weight:700;color:#365c6c}.secondary{background:#edf5f8;color:#365969;border:1px solid #e4edf1;padding:8px 10px;font-size:11px}.conversation-main{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;flex:1;min-height:0;min-width:0;width:100%;overflow:hidden}.scene-top{text-align:center;padding:12px 12px 13px;background:#fff}.live-label{font-size:9px;letter-spacing:2px;color:#657988;font-weight:bold}.scene-top h1{font-size:28px;letter-spacing:-.6px;line-height:1.1;margin:5px 0}.scene-top p{font-size:12px;color:#70818d;margin:0}.product-menu{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin:10px auto 0;max-width:900px}.product-menu button{background:#eef8fc;color:#1d576b;border:1px solid #d2e9f2;border-radius:24px;padding:7px 13px;font-size:11px}.product-menu button:nth-child(3n+2){background:#fceff7;color:#85365f;border-color:#efdbe7}.product-menu button:nth-child(3n){background:#fff8dc;color:#685719;border-color:#ede3bb}.product-menu button.selected{background:#204557;color:white;border-color:#204557}.designer-stage{background:#eaf0f5 url('/print-studio-v4.png') center 12%/cover no-repeat;min-width:0;min-height:0}.conversation-dock{background:#fff;border-top:1px solid #dce7ec;padding:10px max(4%,calc((100% - 900px)/2));min-width:0;min-height:0}.speech{display:none}.has-product .speech{display:flex;gap:7px;margin-bottom:6px;align-items:center}.speech p{font-size:12px;margin:0;color:#3c5667}.speech-dot{width:6px;height:6px;flex:none;border-radius:50%;background:#00a9dc}.wave{display:none}.chat-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}.chat-toolbar>span{font-size:11px;color:#577383;font-weight:bold}.chat-toolbar button{padding:6px 8px;font-size:10px;flex:none}#generation-state{color:#008568;font-size:11px}.conversation-history{height:155px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:8px;padding:10px;background:#f1f6f7;border:1px solid #e0e9eb;border-radius:10px;margin-bottom:8px;scrollbar-width:thin}.chat-message{max-width:88%;flex:none;min-width:0;padding:10px 13px;border-radius:10px;box-shadow:0 1px 2px #19334818;overflow-wrap:anywhere}.chat-message.customer{align-self:flex-end;background:#e0eeeb;border-bottom-right-radius:2px}.chat-message.designer-message{align-self:flex-start;background:#fff;border-bottom-left-radius:2px}.chat-message p{font-size:16px;line-height:1.5;margin:4px 0;color:#263e4b}.chat-message small{font-size:11px;line-height:1.4;color:#6d8088}.delivery-note,.product-tag{display:block}.delivery-note{margin-top:6px}.product-tag{font-size:12px;color:#176478}.reference-preview{display:flex;align-items:center;gap:10px;max-width:100%;background:#f7fafb;color:#274c60;padding:7px;margin:7px 0;font-size:12px;text-align:left;overflow-wrap:anywhere}.reference-preview img{width:85px;height:64px;object-fit:contain}.chat-expanded .conversation-history{height:clamp(220px,42dvh,460px)}#creative{position:relative;min-width:0;flex:none}.whatsapp-composer{display:flex;align-items:center;gap:6px;background:#f1f3f5;padding:5px;min-width:0;width:100%}.message-pill{display:flex;align-items:center;flex:1;min-width:0;gap:3px;background:#fff;border-radius:26px;padding:3px 5px;box-shadow:0 1px 2px #19334812}.composer-icon{display:flex;align-items:center;justify-content:center;flex:none;width:34px;height:40px;padding:6px;background:transparent;color:#819096;touch-action:manipulation}.whatsapp-composer svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.whatsapp-composer textarea{display:block;flex:1;width:0;min-width:30px;height:40px;min-height:40px;max-height:90px;resize:none;border:0;background:transparent;font:16px/24px Arial,sans-serif;color:#233c49;margin:0;padding:8px 2px}.whatsapp-composer textarea::placeholder{color:#7b868c}#microphone,#create{position:relative;z-index:1;width:46px;height:46px;display:flex;align-items:center;justify-content:center;flex:none;border-radius:50%;padding:11px;color:white;background:#008f76;touch-action:manipulation}#create svg{fill:currentColor;stroke-width:1}#microphone.listening{background:#bd3038;box-shadow:0 0 0 3px #bd303825}#references{display:none!important;pointer-events:none!important}#talk-label,.composer-tools{display:none}#emoji-picker{background:#f1f3f5;padding:5px;border-radius:8px}#emoji-picker button{background:transparent;font-size:23px;padding:7px}#thumbs{display:flex;gap:6px}#thumbs:empty{display:none}#thumbs img{width:50px;height:40px;object-fit:contain;margin-top:5px}#preview-note{display:block;text-align:center;color:#7b8e99;font-size:8px;margin-top:5px}#status{display:none}#status.show{display:block;background:#eaf6fa;color:#2b5368;font-size:12px;padding:7px;border-radius:6px;margin:5px 0;max-height:65px;overflow:auto}#brief-review{font-size:12px;background:#eef7fa;padding:8px}#design-example{border:1px solid #d5e3e9;border-radius:14px;padding:20px;width:min(850px,94vw);max-height:90dvh;color:#234254}#design-example::backdrop{background:#102b4877}.full-reference{display:block;max-width:100%;max-height:75dvh;object-fit:contain;margin:12px auto}.chat-expanded .designer-stage{min-height:0}
@media(max-width:650px){.brandbar{height:54px;padding:5px 10px;gap:7px}.brandbar img{width:120px;height:39px}#nationwide{font-size:6.5px;letter-spacing:.5px;max-width:112px}.brandbar .secondary{font-size:10px;padding:8px}.scene-top{padding:7px 8px 9px}.live-label{font-size:8px;letter-spacing:1.5px}.scene-top h1{font-size:24px;margin:3px 0}.scene-top p{font-size:10px}.product-menu{gap:5px;margin-top:7px;max-width:440px}.product-menu button{font-size:9px;padding:6px 9px}.designer-stage{background-position:center 16%}.conversation-dock{padding:7px 8px max(7px,env(safe-area-inset-bottom));overflow:hidden}.conversation-history{height:120px;padding:8px}.chat-message{max-width:95%;padding:9px 11px}.chat-message p{font-size:16px}.chat-toolbar>span{font-size:10px;flex:1}.chat-toolbar button{font-size:10px}.composer-icon{width:29px;padding:5px}.whatsapp-composer{padding:4px 0;gap:5px}.message-pill{gap:0;padding:2px 4px}#microphone,#create{width:44px;height:44px;padding:10px}.chat-expanded .conversation-history{height:38dvh}.has-product .speech{display:none}#preview-note{font-size:7px}}
@media(max-width:360px){.brandbar img{width:108px}#nationwide{font-size:6px;max-width:92px}.scene-top h1{font-size:22px}.product-menu button{padding:5px 7px}.chat-toolbar>span,.chat-toolbar button{font-size:9px}.conversation-history{height:105px}}

/* Keyboard-safe fallback: native scrolling keeps the caret and Send visible. */
@media(max-width:650px){
 html.writing-message{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}
 .writing-message body.conversation-scene{height:auto;min-height:100svh;overflow:visible;display:block}
 .writing-message .conversation-main{display:flex;flex-direction:column;height:auto;overflow:visible}
 .writing-message .designer-stage{flex:none;height:clamp(140px,26svh,240px)}
 .writing-message .conversation-dock{flex:none;overflow:visible;padding-bottom:max(12px,env(safe-area-inset-bottom))}
 .writing-message .conversation-history{height:clamp(100px,23svh,180px);flex:none}
 .writing-message .whatsapp-composer{position:relative;flex:none}
 .writing-message textarea{font-size:16px!important;transform:none}
 .writing-message #preview-note{margin-bottom:12px}
}
/* On phones, the conversation owns the available space. */
@media(max-width:650px){
 .conversation-main{grid-template-rows:auto minmax(110px,24svh) minmax(0,1fr)}
 .designer-stage{background-position:center 22%}
 .conversation-dock{display:flex;flex-direction:column;min-height:0}
 .conversation-history{height:auto;flex:1;min-height:65px}
 .chat-toolbar,#creative,#preview-note,#status,.speech{flex:none}
 .chat-expanded .conversation-main{grid-template-rows:auto 85px minmax(0,1fr)}
 .chat-expanded .conversation-history{height:auto}
 .writing-message .designer-stage{height:110px}
 .writing-message .conversation-dock{display:block}
 .writing-message .conversation-history{height:clamp(140px,30svh,240px)}
}
/* Balance: clear designer portrait, visible workshop, generous conversation. */
@media(max-width:650px){
 .conversation-main{grid-template-rows:auto clamp(175px,30svh,290px) minmax(0,1fr)}
 .designer-stage{background-size:auto 125%;background-position:center 10%}
 .chat-expanded .conversation-main{grid-template-rows:auto 110px minmax(0,1fr)}
 .chat-expanded .designer-stage{background-size:cover;background-position:center 16%}
 .writing-message .designer-stage{height:140px;background-size:cover;background-position:center 12%}
}
