:root{
  --crs-bg:#fcf8f5;
  --crs-surface:#fffdfb;
  --crs-panel:#fffaf6;
  --crs-line:#eadbcf;
  --crs-line-strong:#d9c4b3;
  --crs-text:#2f241f;
  --crs-muted:#786760;
  --crs-accent:#7f001f;
  --crs-accent-2:#b80d34;
  --crs-gold:#cfb27d;
  --crs-shadow:0 24px 60px rgba(49,25,18,.14);
}

.crs-ai-shell,
.crs-ai-shell *{box-sizing:border-box}

.crs-ai-shell{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
  color:var(--crs-text);
}

.crs-ai-shell a{text-decoration:none}

.crs-ai-floating{
  position:fixed;
  right:0;
  top:50%;
  transform:translateY(-50%);
  z-index:999999;
}

.crs-ai-inline{position:relative}

.crs-ai-orb{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  min-height:154px;
  padding:10px 5px 12px;
  border:0;
  border-radius:18px 0 0 18px;
  background:linear-gradient(180deg,#87001f 0%,#a4002a 38%,#6f0019 100%);
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  box-shadow:0 18px 34px rgba(96,0,23,.28);
  cursor:pointer;
  transition:transform .24s ease, box-shadow .24s ease, opacity .2s ease;
  pointer-events:auto;
}

.crs-ai-orb:hover{box-shadow:0 24px 44px rgba(96,0,23,.36)}
.crs-ai-shell.is-open .crs-ai-orb{opacity:.06; pointer-events:none}

.crs-ai-orb img{
  width:18px;
  height:18px;
  object-fit:contain;
  flex:0 0 auto;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.16));
}

.crs-ai-orb span,
.crs-ai-orb em{
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  letter-spacing:.08em;
}

.crs-ai-orb span{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;
  font-size:14px;
  font-weight:700;
  line-height:1;
}

.crs-ai-orb em{
  font-style:normal;
  font-size:7px;
  font-weight:600;
  opacity:.82;
}

.crs-ai-panel{
  width:min(430px,calc(100vw - 90px));
  height:min(78vh,780px);
  background:linear-gradient(180deg,#fffdfb 0%,#fff7f2 100%);
  border:1px solid rgba(217,196,179,.78);
  border-radius:28px;
  overflow:hidden;
  box-shadow:var(--crs-shadow);
  display:flex;
  flex-direction:column;
}

.crs-ai-floating .crs-ai-panel{
  position:absolute;
  right:50px;
  top:50%;
  transform:translateY(-50%) translateX(18px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:all .25s ease;
}

.crs-ai-floating.is-open .crs-ai-panel{
  transform:translateY(-50%) translateX(0);
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.crs-ai-inline .crs-ai-panel,
.crs-ai-account-shell .crs-ai-panel,
.crs-ai-bigchat .crs-ai-panel{
  position:relative;
  inset:auto;
  transform:none;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  width:100%;
}

.crs-ai-head{
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 18px 16px;
  background:linear-gradient(180deg,#fff7ef 0%,#fdf2e8 100%);
  border-bottom:1px solid var(--crs-line);
}

.crs-ai-mark{
  width:48px;
  height:48px;
  border-radius:50%;
  border:1px solid rgba(207,178,125,.52);
  background:#fffdfa;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:inset 0 0 0 4px rgba(255,247,239,.85);
  flex:0 0 auto;
}

.crs-ai-mark img{width:26px;height:26px;object-fit:contain}

.crs-ai-head strong{
  display:block;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;
  font-size:28px;
  line-height:.95;
  letter-spacing:.01em;
  color:#291c18;
}

.crs-ai-head small{
  display:block;
  margin-top:5px;
  color:var(--crs-muted);
  font-size:13px;
  font-weight:500;
  letter-spacing:.01em;
}

.crs-ai-close{
  margin-left:auto;
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid rgba(127,0,31,.18);
  background:#fff;
  color:#7f001f;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 20px rgba(49,25,18,.08);
}

.crs-ai-quick{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
  overflow-x:auto;
  padding:14px 16px;
  background:#fffdfb;
  border-bottom:1px solid var(--crs-line);
  scrollbar-width:none;
}
.crs-ai-quick::-webkit-scrollbar{display:none}

.crs-ai-quick button{
  flex:0 0 auto;
  min-height:40px;
  border-radius:999px;
  border:1px solid var(--crs-line-strong);
  background:#fffaf7;
  color:#5f3028;
  font-size:14px;
  font-weight:600;
  padding:0 18px;
  cursor:pointer;
  transition:all .2s ease;
}
.crs-ai-quick button:hover{border-color:#c8a67a;color:#6b001a;background:#fff}

.crs-ai-log{
  flex:1 1 auto;
  overflow:auto;
  padding:18px 16px 20px;
  background:linear-gradient(180deg,#fffefd 0%,#fffaf6 100%);
}

.crs-ai-msg{
  max-width:90%;
  margin-bottom:12px;
  animation:crsFade .18s ease;
}

.crs-ai-msg p{
  margin:0;
  padding:16px 18px;
  border-radius:22px;
  font-size:15px;
  line-height:1.56;
}

.crs-ai-msg.ai p{
  background:#fff;
  border:1px solid var(--crs-line);
  color:var(--crs-text);
  border-top-left-radius:10px;
  box-shadow:0 10px 28px rgba(49,25,18,.05);
}

.crs-ai-msg.user{margin-left:auto}
.crs-ai-msg.user p{
  background:linear-gradient(135deg,var(--crs-accent) 0%,var(--crs-accent-2) 100%);
  color:#fff;
  border-top-right-radius:10px;
  box-shadow:0 10px 28px rgba(127,0,31,.16);
}

.crs-ai-typing p{display:flex;gap:6px;align-items:center}
.crs-ai-typing span{display:inline-block;width:8px;height:8px;border-radius:50%;background:#c3ac9f;animation:crsBlink 1s infinite ease-in-out}
.crs-ai-typing span:nth-child(2){animation-delay:.15s}
.crs-ai-typing span:nth-child(3){animation-delay:.3s}

.crs-ai-card-title{
  margin:10px 0 10px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;
  font-size:22px;
  font-weight:700;
  color:#301f1a;
}

.crs-ai-products{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:8px;
}
.crs-ai-products.one{grid-template-columns:1fr}

.crs-ai-product{
  display:block;
  background:#fff;
  border:1px solid var(--crs-line);
  border-radius:22px;
  overflow:hidden;
  color:inherit;
  box-shadow:0 12px 28px rgba(49,25,18,.06);
}
.crs-ai-product-img{position:relative;aspect-ratio:1/1;background:#faf4ef;overflow:hidden}
.crs-ai-product-img img{width:100%;height:100%;object-fit:cover;display:block}
.crs-ai-product-img span{
  position:absolute;left:12px;bottom:12px;
  padding:6px 10px;border-radius:999px;
  background:rgba(255,255,255,.94);color:#251915;
  font-size:11px;font-weight:700;letter-spacing:.08em;
}
.crs-ai-product-body{padding:13px 14px 10px}
.crs-ai-product-body strong{display:block;font-size:14px;line-height:1.45;font-weight:600;color:#2d211d}
.crs-ai-product-body small{display:block;margin-top:6px;color:var(--crs-muted);font-size:12px}
.crs-ai-product-body b{display:block;margin-top:8px;font-size:17px;color:#85001f}
.crs-ai-gallery-strip{display:flex;gap:6px;padding:0 14px 10px}
.crs-ai-gallery-strip img{width:42px;height:42px;border-radius:12px;object-fit:cover;border:1px solid #efe4dc}
.crs-ai-product em{display:block;padding:0 14px 14px;color:#85001f;font-style:normal;font-size:12px;font-weight:700}

.crs-ai-orders{display:grid;gap:8px;margin-top:6px}
.crs-ai-order{
  display:block;padding:15px 16px;background:#fff;border:1px solid var(--crs-line);
  border-radius:20px;color:inherit;box-shadow:0 10px 22px rgba(49,25,18,.05)
}
.crs-ai-order > div,
.crs-ai-order footer{display:flex;align-items:center;justify-content:space-between;gap:10px}
.crs-ai-order strong{font-size:15px}
.crs-ai-order span{font-size:12px;font-weight:700;color:#85001f;background:#fff1f3;padding:6px 10px;border-radius:999px}
.crs-ai-order p{margin:10px 0;color:var(--crs-muted);font-size:13px;line-height:1.45}
.crs-ai-order footer small{color:var(--crs-muted)}
.crs-ai-order footer b{font-size:15px;color:#301f1a}

.crs-ai-ticket-mini{
  margin-top:10px;padding:14px 16px;border-radius:18px;border:1px solid var(--crs-line);
  background:linear-gradient(180deg,#fffdfb 0%,#fff4ee 100%);
}
.crs-ai-ticket-mini strong{display:block;font-size:15px}
.crs-ai-ticket-mini span{display:block;margin-top:4px;font-size:12px;color:var(--crs-muted)}
.crs-ai-ticket-mini a{display:inline-block;margin-top:10px;color:#85001f;font-weight:700}

.crs-ai-form{
  display:flex;
  align-items:flex-end;
  gap:8px;
  padding:14px 16px;
  background:#fffdfa;
  border-top:1px solid var(--crs-line);
}

.crs-ai-attach{
  width:44px;height:44px;border-radius:50%;border:1px solid var(--crs-line-strong);
  background:#fff;display:flex;align-items:center;justify-content:center;
  color:#9a0024;font-size:22px;cursor:pointer;flex:0 0 auto;
}
.crs-ai-attach input{display:none}

.crs-ai-input-wrap{
  flex:1 1 auto;
  min-width:0;
  padding:6px 14px 5px;
  background:#fff;
  border:1px solid var(--crs-line-strong);
  border-radius:22px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.crs-ai-input-wrap textarea{
  width:100%;
  min-height:32px;
  max-height:120px;
  resize:none;
  border:0;
  outline:0;
  background:transparent;
  padding:7px 0 4px;
  font:500 15px/1.45 "Manrope",system-ui,sans-serif;
  color:var(--crs-text);
}
.crs-ai-input-wrap textarea::placeholder{color:#9c8b83}
.crs-ai-input-wrap small{display:block;min-height:16px;color:#9c8b83;font-size:11px}

.crs-ai-form button[type=submit]{
  flex:0 0 auto;
  height:48px;
  padding:0 22px;
  border:0;
  border-radius:18px;
  background:linear-gradient(135deg,var(--crs-accent) 0%,#cf002f 100%);
  color:#fff;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 14px 28px rgba(127,0,31,.18);
}

.crs-ai-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px 16px 13px;
  border-top:1px solid var(--crs-line);
  background:#fffaf7;
}
.crs-ai-foot span{color:#8e7d74;font-size:12px}
.crs-ai-foot a{color:#8a001f;font-size:13px;font-weight:700}

/* account / tickets */
.crs-ai-page{font-family:"Manrope",system-ui,sans-serif;color:var(--crs-text)}
.crs-ai-full{display:grid;grid-template-columns:320px minmax(0,1fr);gap:20px;align-items:start}
.crs-ai-side,
.crs-ai-bigchat .crs-ai-panel,
.crs-ticket-card,
.crs-ticket-hero{border:1px solid var(--crs-line);border-radius:24px;background:#fff;box-shadow:0 12px 26px rgba(49,25,18,.05)}
.crs-ai-side{padding:18px}
.crs-ai-side-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}
.crs-ai-side-top strong{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;font-size:30px}
.crs-ai-side-top button,
.crs-ticket-note-form button,
.crs-ticket-print{
  border:0;background:linear-gradient(135deg,var(--crs-accent) 0%,#cf002f 100%);color:#fff;border-radius:16px;padding:11px 14px;font-weight:700;cursor:pointer
}
.crs-ai-conv-row{display:flex;gap:8px;margin-bottom:8px}
.crs-ai-conv{flex:1;text-align:left;padding:12px 14px;border-radius:18px;border:1px solid var(--crs-line);background:#fff8f4;cursor:pointer}
.crs-ai-conv.is-active{background:linear-gradient(135deg,var(--crs-accent) 0%,#be0030 100%);color:#fff;border-color:transparent}
.crs-ai-conv span{display:block;font-weight:700}
.crs-ai-conv small{display:block;margin-top:3px;color:inherit;opacity:.76}
.crs-ai-del{width:38px;border:1px solid var(--crs-line);background:#fff5ef;color:#8a001f;border-radius:14px;cursor:pointer;font-size:20px}
.crs-ai-ticket-link{display:inline-block;margin-top:10px;color:#8a001f;font-weight:700}
.crs-ai-bigchat .crs-ai-panel{height:min(80vh,820px)}
.crs-ticket-hero{padding:24px;margin-bottom:18px;background:linear-gradient(180deg,#fffdfb 0%,#fff4eb 100%)}
.crs-ticket-hero h2{margin:0;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;font-size:38px;line-height:1}
.crs-ticket-hero p{margin:8px 0 0;color:var(--crs-muted)}
.crs-ticket-grid{display:grid;gap:14px}
.crs-ticket-card{padding:18px}
.crs-ticket-headline{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.crs-ticket-headline strong{font-size:16px}
.crs-ticket-headline small{display:block;margin-top:4px;color:var(--crs-muted)}
.st{display:inline-flex;align-items:center;border-radius:999px;padding:7px 12px;background:#fff1f3;color:#8a001f;font-size:12px;font-weight:700}
.crs-ticket-images{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.crs-ticket-images img{width:92px;height:92px;object-fit:cover;border-radius:16px;border:1px solid #eee7e0}
.crs-ticket-images.mini img{width:56px;height:56px}
.crs-ticket-note,.crs-ticket-thread-item{background:#fff8f4;border:1px solid #efe2d6;border-radius:16px;padding:12px;margin-top:10px}
.crs-ticket-thread b{display:block;margin-top:12px}
.crs-ticket-thread-item span{font-size:12px;color:var(--crs-muted)}
.crs-ticket-thread-item p{margin:8px 0 0}
.crs-ticket-note-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}
.crs-ticket-note-form textarea{flex:1;min-width:220px;border:1px solid var(--crs-line);border-radius:16px;padding:12px;outline:0}
.crs-ticket-file{border:1px solid var(--crs-line);border-radius:999px;padding:10px 12px;color:#8a001f;font-weight:700;cursor:pointer}
.crs-ticket-file input{display:none}
.crs-ticket-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}
.crs-ai-empty{padding:22px;border:1px dashed var(--crs-line-strong);border-radius:18px;color:var(--crs-muted);background:#fff}

body.crs-ai-mobile-open{overflow:hidden;touch-action:none}

@keyframes crsFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes crsBlink{0%,80%,100%{opacity:.35;transform:scale(.82)}40%{opacity:1;transform:scale(1)}}

@media (max-width: 980px){
  .crs-ai-full{grid-template-columns:1fr}
  .crs-ai-bigchat .crs-ai-panel{height:75vh}
}

@media (max-width: 768px){
  .crs-ai-floating{top:50%;bottom:auto;transform:translateY(-50%);right:0}
  .crs-ai-orb{top:50%;bottom:auto;transform:translateY(-50%);width:38px;min-height:138px;border-radius:16px 0 0 16px;padding:9px 4px 10px}
  .crs-ai-orb span{font-size:13px}
  .crs-ai-orb em{font-size:7px}

  .crs-ai-floating .crs-ai-panel{
    position:fixed;
    inset:0;
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
    border-radius:0;
    right:0;
    top:0;
    transform:translateY(0) translateX(100%);
    border:0;
    box-shadow:none;
    z-index:2;
  }
  .crs-ai-floating.is-open .crs-ai-panel{transform:translateX(0)}
  .crs-ai-head{padding:18px 16px calc(16px + env(safe-area-inset-top))}
  .crs-ai-head strong{font-size:32px}
  .crs-ai-head small{font-size:12.5px;max-width:220px}
  .crs-ai-log{padding:16px 14px 20px}
  .crs-ai-msg{max-width:96%}
  .crs-ai-products{grid-template-columns:1fr}
  .crs-ai-form{padding:12px 14px calc(12px + env(safe-area-inset-bottom))}
  .crs-ai-form button[type=submit]{height:46px;padding:0 18px}
  .crs-ai-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .crs-ai-inline .crs-ai-panel{height:calc(100dvh - 150px)}
  .crs-ticket-actions,.crs-ticket-headline{flex-direction:column;align-items:flex-start}
}

@media (max-width: 480px){
  .crs-ai-quick{padding:12px 12px 10px;gap:8px}
  .crs-ai-quick button{min-height:37px;padding:0 14px;font-size:13px}
  .crs-ai-mark{width:42px;height:42px}
  .crs-ai-mark img{width:22px;height:22px}
  .crs-ai-head strong{font-size:29px}
  .crs-ai-close{width:40px;height:40px;font-size:26px}
  .crs-ai-input-wrap{padding:4px 12px 3px}
  .crs-ai-input-wrap textarea{font-size:14px}
  .crs-ai-foot span{font-size:11px}
}


/* v2.3 premium refinements */
.crs-ai-shell{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Inter","Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.crs-ai-floating{z-index:1000001}
.crs-ai-orb,
.crs-ai-panel,
.crs-ai-close,
.crs-ai-form button,
.crs-ai-quick button{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.crs-ai-orb{
  width:36px;
  min-height:142px;
  padding:9px 4px 10px;
  border-radius:16px 0 0 16px;
  background:linear-gradient(180deg,#8d0022 0%,#a4002a 45%,#7a001d 100%);
  box-shadow:0 16px 34px rgba(96,0,23,.24);
  z-index:2;
}
.crs-ai-orb span{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter","Segoe UI",sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
}
.crs-ai-orb em{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Inter","Segoe UI",sans-serif;
  font-size:6px;
  font-weight:700;
  letter-spacing:.16em;
  opacity:.72;
}
.crs-ai-orb img{width:16px;height:16px}

.crs-ai-panel{
  width:min(420px,calc(100vw - 84px));
  background:linear-gradient(180deg,#fffdfa 0%,#fffaf6 100%);
  border:1px solid rgba(225,214,204,.92);
  border-radius:26px;
  box-shadow:0 24px 70px rgba(22,18,16,.12);
  z-index:1;
}

.crs-ai-head{
  gap:12px;
  padding:16px 18px 14px;
  background:linear-gradient(180deg,#fffaf6 0%,#fff7f2 100%);
}
.crs-ai-mark{
  width:42px;
  height:42px;
  border:1px solid rgba(215,196,175,.7);
  box-shadow:inset 0 0 0 3px rgba(255,248,242,.94);
}
.crs-ai-mark img{width:22px;height:22px}
.crs-ai-head strong{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter","Segoe UI",sans-serif;
  font-size:19px;
  font-weight:700;
  line-height:1.05;
  letter-spacing:-.03em;
  color:#251c18;
}
.crs-ai-head small{
  margin-top:4px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Inter","Segoe UI",sans-serif;
  font-size:11px;
  line-height:1.35;
  font-weight:600;
  letter-spacing:.02em;
  color:#8a7a72;
}
.crs-ai-close{
  width:40px;
  height:40px;
  font-size:24px;
  color:#86102f;
  box-shadow:0 6px 16px rgba(44,27,20,.06);
}

.crs-ai-quick{
  gap:8px;
  padding:12px 14px;
  background:#fffdfa;
}
.crs-ai-quick button{
  min-height:36px;
  padding:0 14px;
  border:1px solid #e8d8cb;
  background:#fff;
  color:#6b4b43;
  font-size:12px;
  font-weight:700;
  letter-spacing:-.01em;
  box-shadow:0 4px 10px rgba(49,25,18,.03);
}
.crs-ai-quick button:hover{border-color:#cfb27d; color:#6f0019; background:#fff9f5}

.crs-ai-log{
  padding:16px 14px 18px;
  background:linear-gradient(180deg,#fffcfa 0%,#fffaf6 100%);
}
.crs-ai-msg{max-width:92%; margin-bottom:10px}
.crs-ai-msg p{
  padding:13px 15px;
  border-radius:18px;
  font-size:14px;
  line-height:1.58;
  letter-spacing:-.01em;
}
.crs-ai-msg.ai p{
  background:linear-gradient(180deg,#fffefe 0%,#fff9f5 100%);
  border:1px solid #eadfd6;
  color:#3b2c26;
  border-top-left-radius:8px;
  box-shadow:0 10px 24px rgba(49,25,18,.04);
}
.crs-ai-msg.user p{
  background:linear-gradient(180deg,#980027 0%,#84001f 100%);
  color:#fff;
  border-top-right-radius:8px;
  box-shadow:0 12px 26px rgba(127,0,31,.14);
}
.crs-ai-card-title{
  margin:12px 0 10px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter","Segoe UI",sans-serif;
  font-size:15px;
  font-weight:700;
  letter-spacing:-.02em;
  color:#2b201c;
}

.crs-ai-form{
  gap:8px;
  padding:12px 14px;
  background:#fffdfa;
}
.crs-ai-attach{
  width:40px;
  height:40px;
  font-size:21px;
  border-color:#e8d8cb;
}
.crs-ai-input-wrap{
  padding:5px 13px 4px;
  border-radius:18px;
  border:1px solid #e3d7cd;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92);
}
.crs-ai-input-wrap textarea{
  min-height:30px;
  font:500 14px/1.45 -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter","Segoe UI",sans-serif;
  letter-spacing:-.01em;
}
.crs-ai-form button[type=submit]{
  height:42px;
  padding:0 18px;
  border-radius:15px;
  font-size:14px;
  font-weight:700;
  box-shadow:0 12px 24px rgba(127,0,31,.14);
}
.crs-ai-foot{padding:9px 14px 12px}
.crs-ai-foot span{font-size:11px}
.crs-ai-foot a{font-size:12px}

@media (max-width: 768px){
  .crs-ai-floating{top:50%; bottom:auto; right:0; transform:translateY(-50%)}
  .crs-ai-orb{
    position:absolute;
    top:50%; bottom:auto; right:0;
    transform:translateY(-50%);
    width:34px;
    min-height:132px;
    padding:8px 4px 9px;
    border-radius:15px 0 0 15px;
  }
  .crs-ai-orb span{font-size:11px}
  .crs-ai-orb em{font-size:6px}
  .crs-ai-floating .crs-ai-panel{
    inset:0;
    width:100vw;
    height:100dvh;
    border-radius:0;
    right:0;
    top:0;
    transform:translateX(100%);
    z-index:3;
  }
  .crs-ai-floating.is-open .crs-ai-panel{transform:translateX(0)}
  .crs-ai-head{padding:16px 14px calc(12px + env(safe-area-inset-top))}
  .crs-ai-head strong{font-size:21px}
  .crs-ai-head small{font-size:10.5px; max-width:210px}
  .crs-ai-quick{padding:10px 12px}
  .crs-ai-quick button{min-height:34px; padding:0 12px; font-size:11.5px}
  .crs-ai-log{padding:14px 12px 18px}
  .crs-ai-form{padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  .crs-ai-form button[type=submit]{height:40px; padding:0 16px}
}


/* v2.4 final product-card + mobile launcher fixes */
.crs-ai-products,
.crs-ai-products.one{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
}

.crs-ai-product{
  display:grid !important;
  grid-template-columns:96px minmax(0,1fr) !important;
  gap:12px !important;
  align-items:center !important;
  padding:10px !important;
  border-radius:20px !important;
  background:rgba(255,255,255,.96) !important;
  border:1px solid #eadfd6 !important;
  box-shadow:0 10px 24px rgba(45,28,20,.045) !important;
}

.crs-ai-product-img{
  aspect-ratio:1/1 !important;
  border-radius:16px !important;
  background:#fbf6f2 !important;
}

.crs-ai-product-img span{
  display:none !important;
}

.crs-ai-product-body{
  padding:0 !important;
  min-width:0 !important;
}

.crs-ai-product-body strong{
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
  font-size:13px !important;
  line-height:1.35 !important;
  font-weight:700 !important;
  letter-spacing:-.02em !important;
  color:#241b17 !important;
}

.crs-ai-product-body small{
  margin-top:5px !important;
  font-size:11px !important;
  color:#8b7b73 !important;
}

.crs-ai-product-body b{
  margin-top:7px !important;
  font-size:15px !important;
  line-height:1.15 !important;
  color:#8e0023 !important;
  white-space:nowrap !important;
}

.crs-ai-gallery-strip{
  display:none !important;
}

.crs-ai-product em{
  grid-column:2 !important;
  padding:0 !important;
  margin-top:-8px !important;
  color:#8e0023 !important;
  font-size:11px !important;
  font-weight:800 !important;
}

.crs-ai-card-title{
  margin:4px 0 8px !important;
  padding:0 2px !important;
  font-size:13px !important;
  color:#6d5148 !important;
}

.crs-ai-msg:has(.crs-ai-products) p{
  margin-bottom:8px !important;
}

.crs-ai-log{
  overscroll-behavior:contain !important;
}

.crs-ai-floating,
.crs-ai-orb{
  pointer-events:auto !important;
}

.crs-ai-orb{
  z-index:1000003 !important;
  opacity:1 !important;
}

.crs-ai-shell.is-open .crs-ai-orb{
  opacity:0 !important;
  visibility:hidden !important;
}

@media (max-width:768px){
  .crs-ai-floating{
    position:fixed !important;
    right:0 !important;
    top:50% !important;
    bottom:auto !important;
    transform:translateY(-50%) !important;
    z-index:1000002 !important;
  }
  .crs-ai-orb{
    position:relative !important;
    right:0 !important;
    top:auto !important;
    bottom:auto !important;
    transform:none !important;
    width:34px !important;
    min-height:130px !important;
  }
  .crs-ai-product{
    grid-template-columns:86px minmax(0,1fr) !important;
    padding:9px !important;
    gap:10px !important;
  }
  .crs-ai-product-body strong{font-size:12.5px !important}
  .crs-ai-product-body b{font-size:14px !important}
}


/* v2.5 mobile open hard-fix */
.crs-ai-floating{
  pointer-events:none !important;
}

.crs-ai-floating .crs-ai-orb,
.crs-ai-floating .crs-ai-panel{
  pointer-events:auto !important;
}

.crs-ai-orb{
  isolation:isolate !important;
}

.crs-ai-orb::before{
  content:"";
  position:absolute;
  inset:-18px 0 -18px -26px;
  border-radius:24px 0 0 24px;
  background:transparent;
  z-index:-1;
}

.crs-ai-floating.is-open{
  inset:0 !important;
  width:100vw !important;
  height:100dvh !important;
  right:0 !important;
  top:0 !important;
  bottom:auto !important;
  transform:none !important;
  pointer-events:none !important;
}

.crs-ai-floating.is-open .crs-ai-panel{
  display:flex !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
}

@media (max-width:768px){
  .crs-ai-floating{
    width:58px !important;
    height:176px !important;
    right:0 !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    pointer-events:none !important;
  }

  .crs-ai-floating .crs-ai-orb{
    pointer-events:auto !important;
    position:absolute !important;
    right:0 !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    width:38px !important;
    min-height:138px !important;
    cursor:pointer !important;
    user-select:none !important;
    -webkit-user-select:none !important;
  }

  .crs-ai-orb::before{
    inset:-22px 0 -22px -34px !important;
  }

  .crs-ai-floating .crs-ai-panel{
    position:fixed !important;
    inset:0 !important;
    width:100vw !important;
    height:100dvh !important;
    max-width:none !important;
    max-height:none !important;
    opacity:0 !important;
    visibility:hidden !important;
    transform:translateX(100%) !important;
    transition:transform .22s ease, opacity .16s ease !important;
    pointer-events:none !important;
    border-radius:0 !important;
    z-index:1000005 !important;
  }

  .crs-ai-floating.is-open .crs-ai-panel{
    opacity:1 !important;
    visibility:visible !important;
    transform:translateX(0) !important;
    pointer-events:auto !important;
  }

  .crs-ai-floating.is-open .crs-ai-orb{
    display:none !important;
  }
}


/* v2.6 final input alignment + iOS no-zoom refinement */
.crs-ai-form{
  align-items:center !important;
  gap:9px !important;
  padding:10px 14px !important;
}

.crs-ai-attach,
.crs-ai-form button[type=submit]{
  height:40px !important;
  min-height:40px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
}

.crs-ai-attach{
  width:40px !important;
  padding:0 !important;
  line-height:1 !important;
  font-size:20px !important;
  border-radius:50% !important;
}

.crs-ai-input-wrap{
  height:40px !important;
  min-height:40px !important;
  display:flex !important;
  align-items:center !important;
  flex:1 1 auto !important;
  min-width:0 !important;
  padding:0 14px !important;
  border-radius:16px !important;
}

.crs-ai-input-wrap textarea{
  height:38px !important;
  min-height:38px !important;
  max-height:38px !important;
  overflow:hidden !important;
  padding:0 !important;
  line-height:38px !important;
  font-size:16px !important; /* iOS Safari input zoom prevention */
  font-weight:500 !important;
}

.crs-ai-input-wrap small{
  display:none !important;
}

.crs-ai-form button[type=submit]{
  height:40px !important;
  min-height:40px !important;
  padding:0 17px !important;
  border-radius:15px !important;
  font-size:14px !important;
  line-height:1 !important;
}

.crs-ai-quick{
  padding:10px 14px !important;
  gap:7px !important;
}

.crs-ai-quick button{
  min-height:34px !important;
  height:34px !important;
  padding:0 13px !important;
  font-size:11.5px !important;
  border-radius:999px !important;
  white-space:nowrap !important;
  letter-spacing:-.015em !important;
}

@media (max-width:768px){
  .crs-ai-form{
    padding:9px 11px calc(9px + env(safe-area-inset-bottom)) !important;
    gap:8px !important;
  }
  .crs-ai-attach{
    width:38px !important;
    height:38px !important;
    min-height:38px !important;
    font-size:19px !important;
  }
  .crs-ai-input-wrap{
    height:38px !important;
    min-height:38px !important;
    border-radius:15px !important;
    padding:0 13px !important;
  }
  .crs-ai-input-wrap textarea{
    height:36px !important;
    min-height:36px !important;
    max-height:36px !important;
    line-height:36px !important;
    font-size:16px !important;
  }
  .crs-ai-form button[type=submit]{
    height:38px !important;
    min-height:38px !important;
    padding:0 14px !important;
    font-size:13px !important;
    border-radius:14px !important;
  }
  .crs-ai-quick{
    padding:9px 11px !important;
  }
  .crs-ai-quick button{
    min-height:32px !important;
    height:32px !important;
    font-size:11px !important;
    padding:0 11px !important;
  }
}


/* v2.6.1 message bubble width refinement */
.crs-ai-log{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
}

.crs-ai-msg{
  display:block !important;
  width:fit-content !important;
  max-width:82% !important;
  margin-bottom:10px !important;
}

.crs-ai-msg p{
  display:inline-block !important;
  width:auto !important;
  max-width:100% !important;
}

.crs-ai-msg.ai{
  align-self:flex-start !important;
}

.crs-ai-msg.user{
  align-self:flex-end !important;
  margin-left:0 !important;
}

.crs-ai-msg.ai p{
  padding-right:14px !important;
}

.crs-ai-msg.user p{
  padding-right:15px !important;
  padding-left:15px !important;
}

.crs-ai-typing{
  width:auto !important;
  max-width:none !important;
}

.crs-ai-typing p{
  min-width:54px !important;
  max-width:54px !important;
  padding:12px 14px !important;
  display:inline-flex !important;
  justify-content:center !important;
  align-items:center !important;
  gap:6px !important;
}

@media (max-width:768px){
  .crs-ai-msg{
    max-width:86% !important;
  }
  .crs-ai-typing p{
    min-width:50px !important;
    max-width:50px !important;
    padding:11px 12px !important;
  }
}


/* v2.7 intelligence polish */
.crs-ai-msg p{
  word-break:normal !important;
  overflow-wrap:anywhere !important;
}

.crs-ai-msg.ai p{
  white-space:normal !important;
}

.crs-ai-msg.ai p br + br{
  display:block;
  content:"";
  margin-top:6px;
}

.crs-ai-ticket-mini{
  border-radius:18px !important;
  background:linear-gradient(180deg,#fffefa 0%,#fff5ee 100%) !important;
}

.crs-ai-card-title::before{
  content:"💎 ";
}


/* v2.8 ChatGPT-like multiline composer */
.crs-ai-form{
  align-items:flex-end !important;
  gap:8px !important;
}

.crs-ai-attach,
.crs-ai-form button[type=submit]{
  margin-bottom:1px !important;
}

.crs-ai-input-wrap{
  height:auto !important;
  min-height:40px !important;
  max-height:112px !important;
  align-items:flex-start !important;
  padding:0 13px !important;
  overflow:hidden !important;
}

.crs-ai-input-wrap textarea{
  display:block !important;
  height:38px !important;
  min-height:38px !important;
  max-height:104px !important;
  line-height:20px !important;
  padding:9px 0 !important;
  overflow-y:auto !important;
  resize:none !important;
  font-size:16px !important;
  scrollbar-width:thin !important;
}

.crs-ai-input-wrap textarea::-webkit-scrollbar{
  width:4px;
}

.crs-ai-input-wrap textarea::-webkit-scrollbar-thumb{
  background:rgba(120,90,80,.24);
  border-radius:99px;
}

@media (max-width:768px){
  .crs-ai-input-wrap{
    min-height:38px !important;
    max-height:104px !important;
    padding:0 12px !important;
  }
  .crs-ai-input-wrap textarea{
    height:36px !important;
    min-height:36px !important;
    max-height:96px !important;
    line-height:20px !important;
    padding:8px 0 !important;
    font-size:16px !important;
  }
}


/* v2.9 close hardfix + slimmer mobile launcher */
.crs-ai-close{
  position:relative !important;
  z-index:1000008 !important;
  pointer-events:auto !important;
  cursor:pointer !important;
}

.crs-ai-floating.is-open .crs-ai-panel,
.crs-ai-panel,
.crs-ai-head{
  pointer-events:auto !important;
}

@media (max-width:768px){
  .crs-ai-floating{
    width:48px !important;
    height:156px !important;
  }

  .crs-ai-floating .crs-ai-orb{
    width:30px !important;
    min-height:122px !important;
    padding:7px 3px 8px !important;
    border-radius:13px 0 0 13px !important;
  }

  .crs-ai-orb::before{
    inset:-16px 0 -16px -22px !important;
  }

  .crs-ai-orb img{
    width:14px !important;
    height:14px !important;
  }

  .crs-ai-orb span{
    font-size:10px !important;
    letter-spacing:.01em !important;
  }

  .crs-ai-orb em{
    font-size:5.5px !important;
    letter-spacing:.13em !important;
  }
}

@media (max-width:420px){
  .crs-ai-floating{
    width:44px !important;
    height:146px !important;
  }

  .crs-ai-floating .crs-ai-orb{
    width:28px !important;
    min-height:116px !important;
  }
}


/* v3.0 performance mode: avoid external fonts, keep system rendering fast */
.crs-ai-shell,
.crs-ai-shell *{
  text-rendering:optimizeLegibility;
}
.crs-ai-panel{
  contain:layout paint style;
}
