:root{
    --bg:#0c0c0d;--panel:#151517;--panel2:#1d1d20;--line:rgba(255,255,255,.09);
    --text:#f7f7f7;--muted:#97979f;--orange:#ff8a1f;--orange2:#ffba58;
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden}
body{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
button,textarea,a{font:inherit}
.app{height:100dvh;display:flex;flex-direction:column;background:radial-gradient(circle at 50% -20%,rgba(255,138,31,.15),transparent 35%),var(--bg)}
.chat-header{height:68px;flex:0 0 68px;padding:0 14px;display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--line);background:rgba(19,19,21,.96);backdrop-filter:blur(18px)}
.brand-mark{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--orange2),var(--orange));color:#231307;font-weight:950;box-shadow:0 12px 32px rgba(255,122,0,.25)}
.header-copy{min-width:0;flex:1;display:flex;flex-direction:column}.header-copy strong{font-size:13px}.header-copy span{margin-top:4px;color:var(--muted);font-size:10px}.header-copy i{display:inline-block;width:6px;height:6px;margin-right:4px;border-radius:50%;background:#4fd18b}
.header-button{width:36px;height:36px;border:1px solid var(--line);border-radius:11px;background:transparent;color:#aaa;font-size:20px;cursor:pointer}
.messages{flex:1;min-height:0;overflow-y:auto;padding:18px 14px 150px;scroll-behavior:smooth}
.welcome{max-width:560px;margin:8vh auto 0;text-align:center}.welcome-icon{width:56px;height:56px;margin:auto;display:grid;place-items:center;border-radius:18px;background:rgba(255,138,31,.12);color:var(--orange2);font-size:24px}.welcome h1{margin:18px 0 8px;font-size:24px}.welcome p{margin:0 auto;color:var(--muted);font-size:13px;line-height:1.6;max-width:430px}
.quick-grid{margin-top:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.quick-grid button{min-height:48px;padding:9px 11px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.035);color:#ddd;cursor:pointer}.quick-grid button:hover{border-color:rgba(255,138,31,.4);background:rgba(255,138,31,.08)}
.message-row{max-width:680px;margin:0 auto 14px;display:flex}.message-row.user{justify-content:flex-end}.bubble{max-width:86%;padding:11px 13px;border-radius:16px;font-size:13px;line-height:1.58;white-space:pre-wrap;overflow-wrap:anywhere}.user .bubble{border-radius:16px 16px 5px 16px;background:linear-gradient(135deg,rgba(255,153,46,.24),rgba(255,122,0,.14));border:1px solid rgba(255,138,31,.18)}.assistant .bubble{background:var(--panel2);border:1px solid var(--line);border-radius:16px 16px 16px 5px}
.typing{display:flex;gap:4px;align-items:center}.typing i{width:6px;height:6px;border-radius:50%;background:#888;animation:dot 1.2s infinite}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}@keyframes dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.composer-shell{position:absolute;left:0;right:0;bottom:0;padding:26px 10px max(10px,env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent,var(--bg) 24%,var(--bg) 100%)}
.actions{display:flex;gap:6px;margin:0 3px 7px;overflow:auto}.actions a{white-space:nowrap;padding:6px 9px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:#bbb;text-decoration:none;font-size:9px}
.composer{display:flex;align-items:flex-end;gap:8px;padding:7px;border:1px solid rgba(255,255,255,.14);border-radius:17px;background:#202023;box-shadow:0 20px 50px rgba(0,0,0,.45)}.composer:focus-within{border-color:rgba(255,138,31,.55)}textarea{flex:1;min-height:39px;max-height:120px;padding:9px 7px;border:0;resize:none;outline:0;background:transparent;color:#fff;font-size:13px;line-height:1.45}textarea::placeholder{color:#707078}.composer button{width:40px;height:40px;flex:0 0 40px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--orange2),var(--orange));color:#241307;font-weight:900;cursor:pointer}.composer button:disabled{opacity:.45;cursor:not-allowed}
.privacy{text-align:center;margin-top:7px;color:#5e5e66;font-size:8px}
@media(max-width:480px){.messages{padding-left:10px;padding-right:10px}.quick-grid{grid-template-columns:1fr}.welcome{margin-top:5vh}.bubble{max-width:92%}}


/* Shuya Customer AI V2: centered desktop conversation column */
@media (min-width: 760px) {
    .messages {
        padding-left: max(24px, calc((100vw - 820px) / 2));
        padding-right: max(24px, calc((100vw - 820px) / 2));
    }

    .message-row {
        width: 100%;
        max-width: 780px;
        margin-left: auto;
        margin-right: auto;
    }

    .welcome {
        width: min(100%, 680px);
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }

    .composer-shell {
        padding-left: 24px;
        padding-right: 24px;
    }

    .composer-shell > .actions,
    .composer-shell > .composer,
    .composer-shell > .privacy {
        width: min(100%, 780px);
        margin-left: auto;
        margin-right: auto;
    }

    .composer-shell > .actions {
        margin-bottom: 7px;
    }

    .composer-shell > .privacy {
        margin-top: 7px;
    }
}

@media (min-width: 1200px) {
    .bubble {
        max-width: 78%;
    }
}
