:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #e7e9ee;
  --ink: #16181d;
  --muted: #6b7280;
  --orange: #ff6a13;
  --orange-soft: #fff1e8;
  --green: #12a150;
  --green-dark: #0d8a43;
  --green-soft: #e8f7ee;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; overflow: hidden; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong { display: block; font-size: 17px; font-weight: 800; }
.brand span { font-size: 13px; color: var(--muted); }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--orange); display: grid; place-items: center; font-size: 22px; box-shadow: 0 6px 16px rgba(255, 106, 19, .35); }
.top-right { display: flex; align-items: center; gap: 12px; }
.ai-pill { font-size: 12px; font-weight: 600; color: var(--green-dark); background: var(--green-soft); padding: 6px 10px; border-radius: 999px; display: flex; align-items: center; gap: 6px; }
.ai-pill i, .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.cart-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 12px; font-weight: 600; transition: transform .2s, box-shadow .2s; }
.cart-btn b { background: var(--orange); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; padding: 0 6px; }
.cart-btn em { font-style: normal; color: var(--green-dark); font-weight: 700; }
.cart-btn.bump { animation: bump .5s; box-shadow: 0 0 0 6px rgba(18, 161, 80, .2); }
@keyframes bump { 30% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* Split */
.split { flex: 1; display: grid; grid-template-columns: minmax(340px, 42%) 1fr; min-height: 0; }
.chat-panel { display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); min-height: 0; }
.chat-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.chat-head h2 { margin: 0; font-size: 18px; }
.chat-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* Demo cases dropdown */
.cases { border: 1px solid #ffd5bd; background: var(--orange-soft); border-radius: 12px; }
.cases summary { padding: 10px 14px; font-weight: 700; color: #b84200; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.cases summary::after { content: '▾'; }
.cases[open] summary::after { content: '▴'; }
.cases-body { padding: 0 10px 10px; max-height: 42vh; overflow: auto; }
.cases-hint { font-size: 12px; color: #8a4a1d; margin: 0 4px 8px; }
#caseList { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.case { background: #fff; border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.case-title { font-weight: 700; font-size: 14px; }
.case-quote { font-size: 12px; color: var(--muted); grid-column: 1 / -1; }
.case-links { display: flex; gap: 10px; font-size: 12px; grid-column: 1 / -1; }
.case-links a { color: #b84200; font-weight: 600; text-decoration: none; }
.case-links a:hover { text-decoration: underline; }
.load-case { background: var(--orange); color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 12px; }

/* Messages */
.messages { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; animation: rise .25s ease-out; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #f2f3f6; border-bottom-left-radius: 4px; }
.msg.bot .who { font-size: 11px; font-weight: 700; color: var(--orange); display: block; margin-bottom: 2px; }
.msg img.thumb { display: block; max-width: 220px; border-radius: 10px; margin-bottom: 6px; }
.msg audio { display: block; width: 230px; height: 34px; margin-bottom: 6px; }
.msg .transcript { font-size: 12px; opacity: .75; display: block; margin-bottom: 4px; }
.msg.error { background: #fdecec; color: #9b1c1c; }
.fallback-tag { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; background: #fff4d6; color: #8a6100; padding: 2px 8px; border-radius: 999px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.action-chip { font-size: 11.5px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; color: #374151; animation: rise .3s ease-out both; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick button { border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; }
.quick .yes { background: var(--green); color: #fff; }
.quick .no { background: #fff; border: 1px solid var(--line); }
.typing { align-self: flex-start; background: #f2f3f6; border-radius: 16px; padding: 10px 14px; font-size: 13px; color: var(--muted); }
.typing b { display: inline-block; animation: blink 1s infinite; }
.typing b:nth-child(2) { animation-delay: .2s; } .typing b:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.chips { display: flex; gap: 8px; padding: 0 20px 10px; overflow-x: auto; }
.chips button { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; }
.chips button:hover { border-color: var(--orange); color: #b84200; }

.attach-preview { margin: 0 20px 8px; display: flex; align-items: center; gap: 10px; background: #f2f3f6; padding: 6px 10px; border-radius: 10px; font-size: 13px; }
.attach-preview img { height: 44px; border-radius: 6px; }
.attach-preview button { margin-left: auto; border: 0; background: none; }
.composer { display: flex; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); align-items: center; }
.composer input[type=text] { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15px; outline: none; }
.composer input[type=text]:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 19, .15); }
.icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 18px; cursor: pointer; }
.icon-btn.rec { background: #fdecec; border-color: #f5a3a3; animation: pulse 1s infinite; }
.send-btn { background: var(--orange); color: #fff; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; }
.send-btn:disabled { opacity: .5; }

/* Counter panel */
.counter-panel { overflow-y: auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.counter-head { display: flex; align-items: center; justify-content: space-between; }
.counter-head h2 { margin: 0; font-size: 20px; }
.live { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.empty { background: #fff; border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; margin-top: 20px; }
.empty-icon { font-size: 54px; }
.empty h3 { font-size: 22px; margin: 10px 0 18px; }
.steps { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 10px; max-width: 460px; text-align: left; }
.steps li { display: flex; gap: 12px; align-items: center; background: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.steps b { background: var(--orange); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }

.thinking { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.thinking span { font-weight: 600; color: var(--orange); }
.scan { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 106, 19, .08), transparent); animation: scan 1.2s infinite; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeletons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.skeletons div { height: 120px; border-radius: 12px; background: #f1f2f5; }

.diagnosis { display: grid; grid-template-columns: 1fr auto 1.3fr; gap: 16px; align-items: center; background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-left: 5px solid var(--orange); animation: pop .4s ease-out; }
.diagnosis small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.diagnosis p { margin: 4px 0 10px; font-size: 15px; }
.diagnosis p:last-child { margin-bottom: 0; }
#diagSaid { font-style: italic; color: #4b5563; }
#diagDetected { font-weight: 700; font-size: 17px; }
.solution { color: var(--green-dark); font-weight: 700; }
.diag-arrow { font-size: 28px; color: var(--orange); font-weight: 800; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }

.calc { display: flex; flex-wrap: wrap; gap: 10px; animation: pop .4s ease-out; }
.calc .metric { background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); min-width: 120px; }
.calc .metric small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.calc .metric strong { font-size: 24px; }
.calc .metric.hl { background: var(--orange); color: #fff; }
.calc .metric.hl small { color: #ffe1cf; }

.kit { display: flex; flex-direction: column; gap: 18px; }
.kit-section h3 { margin: 0 0 10px; font-size: 15px; }
.kit-section h3 small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; animation: cardIn .45s cubic-bezier(.2, .9, .3, 1.3) both; transition: transform .35s, opacity .35s, box-shadow .2s; position: relative; }
.card:hover { box-shadow: 0 12px 28px rgba(16, 24, 40, .12); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.92); } to { opacity: 1; transform: none; } }
.card .ph { height: 130px; display: grid; place-items: center; font-size: 56px; background: linear-gradient(135deg, #fff6ef, #ffe7d6); }
.card.tool .ph { background: linear-gradient(135deg, #eef4ff, #dfe9ff); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.card .why { font-size: 12.5px; color: var(--muted); }
.card .row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.card .qty { font-size: 12px; font-weight: 700; background: var(--bg); border-radius: 999px; padding: 3px 9px; }
.card .price { font-weight: 800; font-size: 16px; }
.card .own { margin-top: 8px; border: 1px dashed #c7cbd4; background: none; border-radius: 8px; padding: 5px; font-size: 12px; color: var(--muted); }
.card .own:hover { border-color: var(--orange); color: #b84200; }
.card.leaving { opacity: 0; transform: scale(.8) rotate(-3deg); }
.card .stamp { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .8); font-weight: 800; color: var(--green-dark); font-size: 18px; }
.card.new-badge::after { content: 'NUEVO'; position: absolute; top: 10px; left: 10px; background: var(--green); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; }
.empty-hint { color: var(--muted); font-size: 13px; }

.kit-footer { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: var(--radius); padding: 14px 18px; box-shadow: 0 -4px 24px rgba(16, 24, 40, .08); border: 1px solid var(--line); }
.kit-footer small { display: block; color: var(--muted); font-size: 12px; }
.kit-footer strong { font-size: 24px; }
.buy-btn { background: var(--green); color: #fff; border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 800; font-size: 15px; box-shadow: 0 6px 16px rgba(18, 161, 80, .3); }
.buy-btn:hover { background: var(--green-dark); }
.buy-btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.buy-btn.wide { width: 100%; }
.buy-btn.done { background: #e5e7eb; color: #374151; box-shadow: none; }

/* Fly to cart */
.flyer { position: fixed; z-index: 60; width: 70px; height: 70px; border-radius: 16px; display: grid; place-items: center; font-size: 36px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); pointer-events: none; transition: transform .8s cubic-bezier(.5, -0.3, .6, 1), opacity .8s; overflow: hidden; }
.flyer img { width: 100%; height: 100%; object-fit: cover; }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%); background: #fff; z-index: 50; box-shadow: -10px 0 40px rgba(0, 0, 0, .12); transform: translateX(105%); transition: transform .35s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; }
.x { border: 0; background: #f2f3f6; width: 34px; height: 34px; border-radius: 50%; }
.cart-list { list-style: none; margin: 0; padding: 12px 20px; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.cart-list li { display: flex; gap: 12px; align-items: center; animation: rise .3s both; }
.cart-list .ic { width: 46px; height: 46px; border-radius: 10px; background: var(--orange-soft); display: grid; place-items: center; font-size: 24px; flex: none; overflow: hidden; }
.cart-list .ic img { width: 100%; height: 100%; object-fit: cover; }
.cart-list .nm { flex: 1; font-size: 13.5px; font-weight: 600; }
.cart-list .nm small { display: block; color: var(--muted); font-weight: 500; }
.cart-list .pr { font-weight: 700; }
.cart-list .rm { border: 0; background: none; color: var(--muted); }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.drawer-foot small { color: var(--muted); }
.total-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.total-row strong { font-size: 24px; color: var(--green-dark); }
.shade { position: fixed; inset: 0; background: rgba(15, 18, 25, .25); z-index: 40; }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(15, 18, 25, .45); z-index: 70; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.offer { position: relative; background: #fff; border-radius: 22px; max-width: 720px; width: 100%; padding: 30px 30px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); animation: pop .4s ease-out; max-height: 94vh; overflow: auto; }
.offer .x { position: absolute; top: 16px; right: 16px; }
.ribbon { display: inline-block; background: var(--orange); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .08em; padding: 6px 12px; border-radius: 8px; }
.offer h1 { font-size: 30px; line-height: 1.15; margin: 14px 0 8px; }
.offer h1 span { color: var(--orange); }
.lead { color: #4b5563; font-size: 15.5px; line-height: 1.5; margin: 0 0 18px; }
.offer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.offer-card { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; transition: border-color .2s, transform .2s; }
.offer-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.offer-card .em { font-size: 30px; }
.offer-card b { display: block; font-size: 14.5px; }
.offer-card small { color: var(--muted); font-size: 12.5px; }
.offer-card .try { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--green-dark); }
.offer-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: #4b5563; }
.success { background: #fff; border-radius: 22px; max-width: 440px; width: 100%; padding: 30px; text-align: center; animation: pop .4s; display: flex; flex-direction: column; gap: 10px; }
.success .check { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; font-size: 40px; display: grid; place-items: center; margin: 0 auto; box-shadow: 0 10px 30px rgba(18, 161, 80, .4); }
.success h2 { margin: 6px 0 0; }
.success p { margin: 0; color: #4b5563; }
.order-list { list-style: none; padding: 0; margin: 6px 0; text-align: left; font-size: 13px; max-height: 180px; overflow: auto; }
.order-list li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.success small { color: var(--muted); }

@media (max-width: 860px) {
  body { overflow: auto; height: auto; }
  .split { grid-template-columns: 1fr; }
  .chat-panel { height: 80vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .counter-panel { padding: 16px; }
  .brand span, .cart-btn span, .ai-pill { display: none; }
  .diagnosis { grid-template-columns: 1fr; }
  .diag-arrow { transform: rotate(90deg); justify-self: center; }
  .offer-grid { grid-template-columns: 1fr; }
  .offer-foot { flex-direction: column; align-items: stretch; }
  .topbar, .chat-head, .messages, .composer, .chips { padding-left: 16px; padding-right: 16px; }
}

/* Ferrelisto brand */
.logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--line); object-fit: cover; box-shadow: 0 4px 12px rgba(255, 106, 19, .18); display: block; }
.empty-icon { width: 110px; height: 110px; border-radius: 28px; box-shadow: var(--shadow); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.botrow { display: flex; gap: 8px; align-items: flex-end; align-self: flex-start; max-width: 92%; }
.botrow .msg { max-width: 100%; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--line); object-fit: cover; flex: none; }
.avatar.sm { width: 22px; height: 22px; vertical-align: middle; margin-right: 4px; }
.typing { display: flex; align-items: center; gap: 4px; }
.think-logo { width: 38px; height: 38px; border-radius: 50%; vertical-align: middle; margin-right: 8px; animation: bob 1.2s ease-in-out infinite; border: 1px solid var(--line); }
.offer-brand { display: flex; align-items: center; gap: 14px; }
.offer-brand img { width: 64px; height: 64px; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.offer-brand strong { display: block; font-size: 22px; font-weight: 800; margin-bottom: 4px; }

/* ===== Polish v2: chat ===== */
.chat-head { gap: 12px; }
.agent-id { display: flex; align-items: center; gap: 12px; }
.agent-avatar { position: relative; flex: none; }
.agent-avatar img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--orange), 0 6px 16px rgba(255, 106, 19, .25); background: #fff; display: block; }
.agent-avatar i { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid #fff; }
.chat-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.badge-ai { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, #ff8a3d, #ff5a00); padding: 3px 7px; border-radius: 6px; }
.messages { background: linear-gradient(180deg, #fafbfc, #f5f6f8); }
.msg.bot { background: #fff; border: 1px solid #eceef2; box-shadow: 0 2px 8px rgba(16, 24, 40, .05); }
.msg.user { background: linear-gradient(135deg, #ff7a26, #ff5a00); box-shadow: 0 6px 16px rgba(255, 106, 19, .25); }
.msg.user .transcript { opacity: .9; }
.botrow .avatar { width: 32px; height: 32px; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.action-chip { background: var(--orange-soft); border-color: #ffd5bd; color: #a83c00; }
.quick button { transition: transform .15s, box-shadow .15s; }
.quick .yes { background: linear-gradient(135deg, #17b85c, #0e9447); box-shadow: 0 6px 14px rgba(18, 161, 80, .3); padding: 9px 16px; }
.quick .yes:hover, .quick .no:hover { transform: translateY(-2px); }
.chips { padding-top: 10px; background: #f5f6f8; }
.chips button { background: #fff; border-color: #e3e6eb; font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); transition: transform .15s, border-color .15s; }
.chips button:hover { transform: translateY(-1px); }
.composer { background: #fff; gap: 10px; }
.composer-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; border: 1.5px solid #e3e6eb; border-radius: 999px; padding: 4px 6px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.composer-box:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 106, 19, .12); }
.composer-box input[type=text] { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 15px; padding: 10px 6px; background: transparent; }
.composer-box input[type=text]:focus { box-shadow: none; }
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #6b7280; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--orange-soft); color: var(--orange); }
.icon-btn svg, .send-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.mic.rec { background: #fee2e2; color: #dc2626; border: 0; }
.send-btn { width: 50px; height: 50px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ff7a26, #ff5a00); box-shadow: 0 8px 18px rgba(255, 106, 19, .35); transition: transform .15s; flex: none; }
.send-btn svg { fill: #fff; stroke: #fff; margin-left: -2px; }
.send-btn:hover { transform: scale(1.06); }
.cases summary { align-items: center; }
.case { border: 1px solid #ffe2d1; transition: box-shadow .2s; }
.case:hover { box-shadow: 0 6px 16px rgba(255, 106, 19, .12); }
.load-case { box-shadow: 0 4px 10px rgba(255, 106, 19, .3); }

/* ===== Polish v2: 3D product cards ===== */
.kit-section h3 { display: flex; align-items: center; gap: 8px; }
.sec-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sec-dot.need { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.sec-dot.opt { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.card { border: 1px solid #eef0f3; transition: transform .25s, box-shadow .25s, opacity .35s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(16, 24, 40, .14); }
.card .ph { position: relative; height: 150px; perspective: 600px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #fff1e6 55%, #ffdcc2 100%); }
.card.tool .ph { background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #eef3ff 55%, #d6e2ff 100%); }
.card .ph::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .7) 0%, transparent 40%); pointer-events: none; }
.card .obj { position: relative; z-index: 1; font-size: 70px; line-height: 1; transform: rotateX(12deg) rotateY(-16deg); transform-style: preserve-3d;
  filter: drop-shadow(0 14px 10px rgba(0, 0, 0, .22)) drop-shadow(0 2px 1px rgba(0, 0, 0, .12)) saturate(1.15);
  transition: transform .45s cubic-bezier(.2, .9, .3, 1.2); animation: float 4s ease-in-out infinite; }
.card .obj img { width: 100%; height: 100%; object-fit: cover; }
.card .floor { position: absolute; bottom: 20px; left: 50%; width: 80px; height: 14px; margin-left: -40px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, .22), transparent 70%); animation: shadow 4s ease-in-out infinite; }
.card:hover .obj { transform: rotateX(0) rotateY(10deg) scale(1.12) translateY(-6px); }
@keyframes float { 50% { translate: 0 -6px; } }
@keyframes shadow { 50% { transform: scale(.85); opacity: .7; } }
.tbadge { position: absolute; top: 10px; right: 10px; z-index: 2; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: #6b7280; border: 1px solid rgba(0, 0, 0, .06); backdrop-filter: blur(4px); }
.card.tool .tbadge { color: #3056d3; }
.card .name { font-size: 14.5px; }
.card .price { color: var(--ink); }
.card .own { transition: all .15s; }
.kit-footer .buy-btn { padding: 14px 22px; }
.offer-card .try { display: block; }
#startBtn { white-space: nowrap; }

/* Real product photos and case thumbnails */
.card .obj.has-img { position: absolute; inset: 0; transform: none; animation: none; filter: none; }
.card .obj.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover .obj.has-img { transform: scale(1.07); }
.card .ph:has(.has-img) { background: #f4f3f1; }
.case { grid-template-columns: auto 1fr auto; }
.case-thumb { grid-row: span 3; width: 74px; height: 74px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.case-quote, .case-links { grid-column: 2 / -1; }
.flyer img, .cart-list .ic img { width: 100%; height: 100%; object-fit: cover; }
.audio-thumb { display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, #fff1e8, #ffe0cc); }
.case-links a.res { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: var(--orange-soft); border: 1px solid #ffd5bd; }
.case-links a.res.photo { background: #eef3ff; border-color: #d6e2ff; color: #3056d3; }

/* Mic invite: soft glow + small bouncing arrow (does not cover other elements) */
.icon-btn.mic { position: relative; color: var(--orange); background: var(--orange-soft); overflow: visible; }
.icon-btn.mic::before { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; animation: micGlow 1.8s ease-out infinite; }
.icon-btn.mic::after { content: '▼'; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--orange); pointer-events: none; animation: micArrow 1.2s ease-in-out infinite; }
.icon-btn.mic.rec::before, .icon-btn.mic.rec::after { animation: none; content: none; }
@keyframes micGlow { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 19, .55); } 70% { box-shadow: 0 0 0 11px rgba(255, 106, 19, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 106, 19, 0); } }
@keyframes micArrow { 50% { transform: translate(-50%, 3px); } }

/* Welcome pop-up with demo video */
.offer { max-width: 1060px; padding: 28px; }
.offer-top { display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px; align-items: center; }
.offer h1 { font-size: 28px; }
.offer .lead { margin-bottom: 12px; font-size: 15px; }
.multimodal-tip { margin: 0; font-size: 13.5px; line-height: 1.45; background: var(--orange-soft); border: 1px solid #ffd5bd; color: #7a3a10; padding: 10px 12px; border-radius: 12px; }
.offer-media { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(16, 24, 40, .22); border: 1px solid var(--line); background: #f4f5f7; }
.offer-media video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.media-tag { position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(22, 24, 29, .75); padding: 5px 10px; border-radius: 999px; }
.offer-grid { grid-template-columns: repeat(4, 1fr); margin-top: 20px; gap: 10px; }
.offer-card { padding: 12px; gap: 8px; }
.offer-card .em { font-size: 24px; }
.offer-card b { font-size: 13.5px; }
.offer-foot { margin-top: 14px; padding-top: 12px; }
@media (max-width: 860px) { .offer-top { grid-template-columns: 1fr; } .offer-grid { grid-template-columns: 1fr 1fr; } }
.offer .x { z-index: 5; }
.modal { grid-template-columns: minmax(0, 1060px); justify-content: center; }
.offer, .offer-top > *, .offer-card { min-width: 0; }
@media (max-width: 860px) {
  .offer { padding: 18px; }
  .offer h1 { font-size: 22px; padding-right: 36px; }
  .offer-media { order: -1; }
  .offer-grid { grid-template-columns: 1fr; }
}
.chat-panel, .counter-panel { min-width: 0; }
@media (max-width: 860px) {
  html, body { overflow-x: hidden; width: 100%; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .modal { place-items: start center; overflow-y: auto; }
  .offer { max-height: none; }
}

/* Pop-up: video dominates, label outside the video */
.offer { max-width: 1240px; }
.offer-top { grid-template-columns: minmax(0, .72fr) minmax(0, 1.5fr); gap: 24px; align-items: start; }
.offer h1 { font-size: 25px; }
.offer .lead { font-size: 14.5px; }
.offer-media { display: flex; flex-direction: column; }
.media-tag { position: static; order: -1; border-radius: 0; background: #16181d; padding: 8px 14px; font-size: 13px; }
.offer-media video { aspect-ratio: 16 / 10; }

/* Demo cases toggle invite: soft glow while closed */
.cases:not([open]) { animation: casesGlow 2s ease-in-out infinite; }
@keyframes casesGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 106, 19, 0); } 50% { box-shadow: 0 0 0 5px rgba(255, 106, 19, .22), 0 0 18px rgba(255, 106, 19, .35); } }
@media (max-width: 860px) { .offer-top { grid-template-columns: 1fr; } }
