:root{--red:#c9151b;--red2:#e1262d;--dark:#0f172a;--bg:#eef1f5;--line:#e5e7eb;--txt:#111827;--mut:#64748b}*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:radial-gradient(circle at top left,rgba(201,21,27,.12),transparent 30%),linear-gradient(180deg,#f8fafc,#eef1f5);color:var(--txt)}.app{max-width:780px;height:100dvh;margin:0 auto;background:#f3f4f6;display:flex;flex-direction:column;box-shadow:0 0 45px rgba(15,23,42,.16)}.head{background:linear-gradient(135deg,#0f172a,#1f2937);color:#fff;padding:16px;display:flex;gap:13px;align-items:center;position:relative}.head:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--red),#f59e0b,var(--red))}.logo{width:56px;height:56px;border-radius:18px;background:linear-gradient(135deg,var(--red),#8f1115);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:20px;box-shadow:0 8px 22px rgba(201,21,27,.35);flex:0 0 auto}.title{font-size:20px;font-weight:900}.sub{font-size:13px;color:#d1d5db;margin-top:4px}.dot{display:inline-block;width:8px;height:8px;background:#22c55e;border-radius:50%;box-shadow:0 0 0 4px rgba(34,197,94,.14);margin-right:7px}.prog{height:6px;background:#e5e7eb}.prog span{display:block;height:100%;width:6%;background:linear-gradient(90deg,var(--red),#f97316);transition:.25s}.chat{flex:1;overflow-y:auto;padding:18px 13px 128px;scroll-behavior:smooth}.row{display:flex;margin:12px 0;animation:pop .18s ease}@keyframes pop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.row.user{justify-content:flex-end}.av{width:34px;height:34px;border-radius:50%;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:900;margin-right:8px;flex:0 0 auto}.bubble{max-width:86%;padding:14px 15px;border-radius:20px;line-height:1.48;font-size:15px}.bot .bubble{background:rgba(255,255,255,.97);border:1px solid rgba(229,231,235,.95);border-bottom-left-radius:7px;box-shadow:0 10px 26px rgba(15,23,42,.08)}.user .bubble{background:linear-gradient(135deg,var(--red2),var(--red));color:#fff;border-bottom-right-radius:7px;box-shadow:0 10px 24px rgba(201,21,27,.24)}.bt{font-weight:900;margin-bottom:8px}.quick{display:flex;flex-wrap:wrap;gap:9px;margin-top:13px}.quick button{border:1px solid #d9dde5;background:#fff;color:#111827;border-radius:999px;padding:11px 14px;font-size:14px;cursor:pointer;box-shadow:0 3px 10px rgba(15,23,42,.04)}.quick button:active{transform:scale(.98)}.quick button:hover{border-color:var(--red);color:var(--red)}.model-carousel{display:flex;gap:12px;overflow-x:auto;padding:5px 2px 10px;margin-top:13px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}.model-carousel::-webkit-scrollbar{height:6px}.model-carousel::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}.model-choice-card{flex:0 0 min(82vw,300px);scroll-snap-align:start;background:#fff;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden;box-shadow:0 10px 24px rgba(15,23,42,.08)}.model-choice-img{width:100%;aspect-ratio:16/9;background:#eef2f7;display:block;object-fit:cover}.model-choice-body{padding:12px}.model-choice-title{font-weight:900;color:#111827;font-size:15px;margin-bottom:6px}.model-choice-desc{font-size:13px;color:#64748b;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px}.model-choice-actions{display:flex;gap:8px;margin-top:11px}.model-choice-actions button{flex:1;border:0;border-radius:999px;padding:10px 9px;font-weight:900;font-size:13px;cursor:pointer}.model-select-btn{background:linear-gradient(135deg,var(--red2),var(--red));color:#fff}.model-inspect-btn{background:#f1f5f9;color:#0f172a;border:1px solid #dbe3ee!important}.model-fallback-title{font-size:13px;color:#64748b;font-weight:800;margin:12px 0 2px}.product-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.68);backdrop-filter:blur(7px);z-index:18000;display:none;align-items:center;justify-content:center;padding:16px}.product-backdrop.show{display:flex}.product-modal{width:min(1050px,96vw);height:min(760px,90dvh);background:#fff;border-radius:22px;overflow:hidden;box-shadow:0 30px 90px rgba(0,0,0,.38);display:flex;flex-direction:column}.product-top{height:56px;background:linear-gradient(135deg,#0f172a,#1f2937);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;font-weight:900}.product-close{width:38px;height:38px;border:0;border-radius:999px;background:rgba(255,255,255,.13);color:#fff;font-size:24px;line-height:38px;cursor:pointer}.product-frame{flex:1;border:0;width:100%;background:#fff}.product-fallback{padding:18px;background:#fff;border-top:1px solid #e5e7eb;text-align:center}.product-fallback a{display:inline-block;background:linear-gradient(135deg,var(--red2),var(--red));color:#fff;text-decoration:none;border-radius:999px;padding:11px 16px;font-weight:900}@media(max-width:560px){.model-choice-card{flex-basis:78vw}.product-backdrop{padding:0;align-items:flex-end}.product-modal{width:100vw;height:92dvh;border-radius:22px 22px 0 0}}.note{display:block;color:var(--mut);font-size:12px;margin-top:8px}.card{margin-top:11px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px}.card h4{margin:0 0 9px;font-size:15px}.kv{display:grid;grid-template-columns:120px 1fr;gap:5px 8px;font-size:14px;margin:5px 0}.kv b{color:#374151}.preview{margin-top:12px;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}.preview-head{padding:10px 12px;background:#f9fafb;border-bottom:1px solid var(--line);font-size:13px;color:#374151;font-weight:800;display:flex;align-items:center;justify-content:space-between;gap:10px}.preview svg{width:100%;height:auto;display:block}.preview-actions{padding:10px 12px;background:#fff;border-top:1px solid var(--line);display:flex;justify-content:flex-end}.preview-big-btn{border:0;background:linear-gradient(135deg,var(--red2),var(--red));color:#fff;border-radius:999px;padding:9px 14px;font-size:13px;font-weight:900;cursor:pointer;box-shadow:0 8px 18px rgba(201,21,27,.18)}.preview-big-btn:active{transform:scale(.98)}.svg-full-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.76);backdrop-filter:blur(8px);z-index:20000;display:flex;align-items:center;justify-content:center;padding:16px}.svg-full-modal{width:min(1500px,96vw);height:min(820px,92dvh);background:#fff;border-radius:22px;box-shadow:0 30px 90px rgba(0,0,0,.38);overflow:hidden;display:flex;flex-direction:column}.svg-full-top{height:56px;background:linear-gradient(135deg,#0f172a,#1f2937);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;font-weight:900}.svg-full-close{width:38px;height:38px;border:0;border-radius:999px;background:rgba(255,255,255,.13);color:#fff;font-size:24px;line-height:38px;cursor:pointer}.svg-full-body{flex:1;overflow:auto;background:#f4f7fb;padding:12px;display:flex;align-items:center;justify-content:center}.svg-full-body svg{display:block;max-width:100%;max-height:100%;width:auto;height:auto;margin:auto;flex:0 0 auto}@media(max-width:700px){.svg-full-backdrop{padding:0;align-items:flex-end}.svg-full-modal{width:100vw;height:92dvh;border-radius:22px 22px 0 0}.svg-full-body{align-items:center;justify-content:center}.svg-full-body svg{max-width:100%;max-height:100%;width:auto;height:auto}}.chat-input-bar{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:100%;max-width:780px;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-top:1px solid #d7dce5;padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:flex;gap:9px}.chat-input-bar input{flex:1;border:1px solid #cfd5df;border-radius:999px;padding:14px 16px;font-size:15px;outline:none}.chat-input-bar input:focus{border-color:var(--red);box-shadow:0 0 0 4px rgba(201,21,27,.08)}.chat-input-bar button{border:0;background:linear-gradient(135deg,var(--red2),var(--red));color:#fff;border-radius:999px;padding:14px 18px;font-size:15px;font-weight:900;min-width:92px}.typing{display:inline-flex;gap:4px}.typing i{width:6px;height:6px;border-radius:50%;background:#9ca3af;display:block;animation:t 1s infinite}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}@keyframes t{0%,80%,100%{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}@media(max-width:560px){.head{padding:15px 13px}.logo{width:52px;height:52px}.title{font-size:18px}.bubble{max-width:88%;font-size:14.5px}.bot .bubble{max-width:93%}.quick button{font-size:13.5px;padding:10px 12px}.kv{grid-template-columns:105px 1fr}}

.bubble{position:relative}
.qline{display:flex;align-items:center;gap:9px;padding-right:34px;min-height:24px}
.help-btn{position:absolute;right:10px;top:10px;width:27px;height:27px;border:0;border-radius:999px;background:linear-gradient(135deg,#0f172a,#1f2937);color:#fff;font-weight:900;font-size:15px;line-height:27px;text-align:center;cursor:pointer;box-shadow:0 7px 18px rgba(15,23,42,.18);z-index:2}
.help-btn:hover{background:linear-gradient(135deg,var(--red2),var(--red));transform:translateY(-1px)}
.help-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(7px);z-index:9999;display:none;align-items:center;justify-content:center;padding:18px}
.help-backdrop.show{display:flex;animation:fadeIn .16s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.help-modal{width:min(760px,100%);max-height:88dvh;background:#fff;border-radius:26px;overflow:hidden;box-shadow:0 30px 90px rgba(15,23,42,.38);border:1px solid rgba(255,255,255,.35);animation:modalPop .18s ease}
@keyframes modalPop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.help-top{background:linear-gradient(135deg,#0f172a,#1f2937);color:#fff;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative}
.help-top:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--red),#f59e0b,var(--red))}
.help-title{font-size:20px;font-weight:900;line-height:1.25}
.help-close{width:38px;height:38px;border:0;border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font-size:24px;cursor:pointer;line-height:38px}
.help-close:hover{background:rgba(255,255,255,.22)}
.help-body{padding:20px;overflow:auto;max-height:calc(88dvh - 78px);font-size:15px;line-height:1.65;color:#111827;background:linear-gradient(180deg,#fff,#f8fafc)}
.help-body h1,.help-body h2,.help-body h3{margin:18px 0 10px;color:#0f172a;line-height:1.22}.help-body h1{font-size:25px}.help-body h2{font-size:21px}.help-body h3{font-size:18px}
.help-body p{margin:0 0 12px}.help-body a{color:var(--red);font-weight:800;text-decoration:none}.help-body a:hover{text-decoration:underline}
.help-body img{max-width:100%;height:auto;border-radius:18px;border:1px solid #e5e7eb;box-shadow:0 12px 30px rgba(15,23,42,.12);margin:10px 0;display:block}
.help-body table{width:100%;border-collapse:collapse;margin:12px 0;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 8px 22px rgba(15,23,42,.06)}
.help-body th,.help-body td{border:1px solid #e5e7eb;padding:10px;text-align:left}.help-body th{background:#f1f5f9;color:#0f172a}
.help-empty{padding:16px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc;color:#64748b}
@media(max-width:560px){.help-backdrop{padding:0;align-items:flex-end}.help-modal{width:100%;max-height:94dvh;border-radius:24px 24px 0 0}.help-body{max-height:calc(94dvh - 78px);padding:16px}.help-title{font-size:18px}.help-btn{right:8px;top:8px;width:25px;height:25px;line-height:25px;font-size:14px}}


.bottom-actions{position:fixed;left:50%;transform:translateX(-50%);bottom:72px;width:100%;max-width:780px;display:flex;justify-content:center;gap:10px;z-index:25;pointer-events:none}.bottom-btn{border:1px solid #d9dde5;background:rgba(255,255,255,.96);color:#64748b;border-radius:999px;padding:8px 14px;font-size:13px;font-weight:800;cursor:pointer;box-shadow:0 3px 10px rgba(15,23,42,.06);pointer-events:auto}.bottom-btn:hover{border-color:#c9151b;color:#c9151b}.bottom-btn:disabled{opacity:.38;cursor:not-allowed}@media(max-width:560px){.bottom-actions{bottom:78px}.bottom-btn{padding:7px 12px;font-size:12px}}


.palette-btn{position:absolute;right:10px;top:10px;width:32px;height:32px;border:0;border-radius:999px;background:linear-gradient(135deg,#ffffff,#f8fafc);color:#111827;font-size:17px;cursor:pointer;box-shadow:0 8px 22px rgba(15,23,42,.16);border:1px solid #e5e7eb;z-index:3}.palette-btn:hover{border-color:var(--red);transform:translateY(-1px)}

.color-select-card{margin-top:14px;border:1px solid #e2e8f0;background:linear-gradient(135deg,#ffffff,#f8fafc);border-radius:20px;padding:14px;display:flex;align-items:center;gap:13px;cursor:pointer;box-shadow:0 10px 24px rgba(15,23,42,.08);transition:.15s;text-align:left;width:100%;min-height:92px}
.color-select-card:hover{border-color:var(--red);transform:translateY(-1px);box-shadow:0 16px 34px rgba(201,21,27,.12)}
.color-select-icon{width:50px;height:50px;border-radius:17px;background:radial-gradient(circle at 30% 30%,#fff7ed,#f97316);display:flex;align-items:center;justify-content:center;font-size:25px;box-shadow:0 8px 18px rgba(249,115,22,.18);flex:0 0 auto}
.color-select-content{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:5px}
.color-select-title{display:block;font-weight:900;color:#111827;font-size:16px;line-height:1.22;letter-spacing:-.01em}
.color-select-sub{display:block;font-size:12.5px;color:#64748b;line-height:1.45;max-width:310px}
.color-select-arrow{margin-left:auto;width:36px;height:36px;border-radius:999px;background:#fff;border:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;color:var(--red);font-weight:900;font-size:20px;flex:0 0 auto}
@media(max-width:560px){.color-select-card{padding:13px;gap:11px;min-height:90px}.color-select-icon{width:46px;height:46px;border-radius:15px;font-size:23px}.color-select-title{font-size:15px}.color-select-sub{font-size:12px;line-height:1.42}.color-select-arrow{width:34px;height:34px}}
.color-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(7px);z-index:10000;display:none;align-items:center;justify-content:center;padding:18px}.color-backdrop.show{display:flex;animation:fadeIn .16s ease}.color-modal{width:min(760px,100%);max-height:88dvh;background:#fff;border-radius:26px;overflow:hidden;box-shadow:0 30px 90px rgba(15,23,42,.38);border:1px solid rgba(255,255,255,.35);animation:modalPop .18s ease}.color-top{background:linear-gradient(135deg,#0f172a,#1f2937);color:#fff;padding:17px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative}.color-top:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--red),#f59e0b,var(--red))}.color-title{font-size:20px;font-weight:900;line-height:1.25}.color-close{width:38px;height:38px;border:0;border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font-size:24px;cursor:pointer;line-height:38px}.color-close:hover{background:rgba(255,255,255,.22)}.color-body{padding:18px;overflow:auto;max-height:calc(88dvh - 76px);background:linear-gradient(180deg,#fff,#f8fafc)}.color-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.color-card{border:1px solid #dbe3ee;background:#fff;border-radius:12px;padding:8px;cursor:pointer;text-align:center;box-shadow:0 4px 12px rgba(15,23,42,.05);transition:.15s;min-height:140px}.color-card:hover{border-color:var(--red);transform:translateY(-2px);box-shadow:0 8px 20px rgba(15,23,42,.12)}.color-sample{height:100px;border-radius:8px;border:1px solid #d7dce5;background:#f1f5f9;overflow:hidden;margin-bottom:6px;display:flex;align-items:center;justify-content:center}.color-sample img{width:100%;height:100%;object-fit:cover;display:block}.color-name{font-weight:700;font-size:12px;color:#111827;line-height:1.2}.color-code{display:none}.color-empty{padding:18px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc;color:#64748b}.color-dot-mini{width:24px;height:24px;border-radius:8px;border:1px solid rgba(15,23,42,.18);display:inline-block;background:#e5e7eb}.color-toolbar{position:sticky;top:0;z-index:2;background:linear-gradient(180deg,#fff,#f8fafc);padding:0 0 12px;margin-bottom:10px}.color-search{width:100%;height:38px;border:1px solid #cfd5df;border-radius:999px;padding:0 13px;font-size:13px;outline:none;background:#fff}.color-search:focus{border-color:var(--red);box-shadow:0 0 0 4px rgba(201,21,27,.08)}.color-page-info{font-size:12px;color:#64748b;margin-top:8px;text-align:center}.color-pager{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:12px}.color-pager button{border:1px solid #d9dde5;background:#fff;color:#111827;border-radius:999px;padding:9px 13px;font-size:13px;font-weight:800;cursor:pointer}.color-pager button:disabled{opacity:.45;cursor:not-allowed}.color-pager button:not(:disabled):hover{border-color:var(--red);color:var(--red)}
@media(max-width:640px){.color-backdrop{padding:0;align-items:flex-end}.color-modal{width:100vw;max-width:100vw;max-height:94dvh;border-radius:24px 24px 0 0}.color-body{max-height:calc(94dvh - 76px);padding:6px}.color-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.color-title{font-size:18px}.palette-btn{right:8px;top:8px;width:30px;height:30px;font-size:16px}}
