/* Round 2 (W3): demo intro, Team panel, chat filters, chat realism bits. Tokens from style.css. */
.avatar.sm { width: 34px; height: 34px; font-size: 12.5px; }

/* ── top bar additions ── */
.demo-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: #ffd66b; color: #4a3500; white-space: nowrap; flex: none; }
.help-btn { width: 32px; height: 32px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); font-weight: 700; flex: none; }
.needs-pill { height: 30px; padding: 0 10px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.seg.light { background: var(--muted); border-color: var(--border); }
.seg.light button { color: var(--brand-dark); }
.seg.light button.on { color: #fff; }

/* ── chat filter tabs (wabby chats-view FILTER_OPTIONS pills) ── */
.filters { display: flex; gap: 8px; padding: 10px 16px 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.filters button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 12.5px; white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.filters button.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.filters button .n { color: var(--muted-fg); font-weight: 300; }
.filters button.need .n { color: #fff; background: var(--bad); border-radius: 999px; padding: 0 6px; font-weight: 700; font-size: 11px; }
.row-chat.need { box-shadow: inset 4px 0 0 #e0a100; background: #fffaf0; }
.row-chat.need.bad { box-shadow: inset 4px 0 0 var(--bad); background: #fff7f6; }
.row-chat.need.sel { background: var(--muted); }
.need-dot { background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }

/* ── thread realism ── */
.src-line { font-size: 11.5px; color: var(--brand); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.with { font-size: 11px; color: var(--muted-fg); margin-top: 3px; }
.handoff { align-self: center; margin: 6px auto; padding: 6px 12px; border-radius: 999px; background: #fff3d4; color: var(--warn); font-size: 12.5px; font-weight: 600; border: 1px solid #f1e3b4; }
.photo-img.shot-live { aspect-ratio: 9 / 16; object-fit: cover; max-height: 300px; }

/* ── Team panel ── */
.tm { padding: 4px 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.tm-h { font-weight: 700; font-size: 16px; letter-spacing: -.01em; margin-top: 4px; }
.tm-note { margin: 0; color: var(--muted-fg); font-size: 12.5px; }
.tm-back { align-self: flex-start; font-size: 12.5px; }
.tm-sub { margin-top: 10px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); }
.tm-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.tm-card.working { border-color: #bfe6dc; }
.tm-card.blocked { border-color: #f5c9c5; background: #fffafa; }
.tm-card.waiting { border-color: #f1e3b4; }
.tm-main { flex: 1; min-width: 0; }
.tm-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tm-role { font-size: 11.5px; color: var(--muted-fg); }
.tm-txt { font-size: 13px; margin-top: 2px; line-height: 1.35; }
.tm-t { font-size: 11px; color: var(--muted-fg); font-variant-numeric: tabular-nums; flex: none; }
.tm-n { text-align: right; flex: none; }
.tm-n b { font-size: 18px; display: block; line-height: 1; }
.tm-n small { font-size: 10.5px; color: var(--muted-fg); }
.tm-st { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--muted); color: var(--muted-fg); margin-left: auto; }
.tm-st.working { background: var(--brand-light); color: var(--brand-dark); animation: tmPulse 1.4s ease-in-out infinite; }
.tm-st.done { background: var(--good-bg); color: var(--good); }
.tm-st.waiting { background: var(--warn-bg); color: var(--warn); }
.tm-st.blocked { background: var(--bad-bg); color: var(--bad); }
@keyframes tmPulse { 50% { opacity: .55; } }
.tm-checks { display: grid; gap: 6px; }
.tm-chk { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--muted); font-size: 12.5px; }
.tm-chk .ic { width: 15px; height: 15px; color: var(--brand-dark); }
.tm-chk span { font-weight: 600; flex: none; }
.tm-chk em { font-style: normal; color: var(--muted-fg); min-width: 0; }
.tm-chk.blocked { background: var(--bad-bg); }
.tm-chk.blocked em { color: var(--bad); }
.tm-chk.done em { color: var(--good); }
.tm-hint { font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: #eef6ff; color: #1d3f73; line-height: 1.4; }
.tm-hand { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); }
.tm-flow { list-style: none; margin: 2px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: grid; gap: 8px; }
.tm-flow li { position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; font-size: 12.5px; }
.tm-flow li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #fff; }
.tm-flow li.blocked::before { background: var(--bad); }
.tm-flow li.waiting::before { background: #e0a100; }
.tm-who { font-weight: 700; }
.tm-what { grid-column: 1 / -1; color: var(--muted-fg); }
.tm-flow .tm-t { grid-row: 1; grid-column: 2; }
.tm-adv { align-self: flex-start; margin-top: 8px; font-size: 12px; color: var(--muted-fg); }
.tm-chk.own { background: var(--warn-bg); }

/* ── intro overlay ── */
body.intro-on .topbar, body.intro-on .app, body.intro-on .narr, body.intro-on .foot { filter: blur(3px); }
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(15, 59, 53, .45); }
.in-sheet { position: relative; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 20px; padding: 28px 28px 20px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.in-sheet h2 { margin: 4px 0 12px; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.in-sheet p { line-height: 1.55; margin: 10px 0; }
.in-kick { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.in-skip { position: absolute; top: 14px; right: 16px; font-size: 12.5px; color: var(--muted-fg); }
.in-foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.in-dots { flex: 1; display: flex; gap: 6px; }
.in-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.in-dots i.on { background: var(--brand); width: 22px; border-radius: 4px; }
.btn-ghost.dark { color: var(--brand-dark); background: var(--muted); border-color: var(--border); }
.in-art { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 6px 0 4px; }
.in-phone { width: 128px; height: 220px; border-radius: 20px; background: #111; padding: 6px; flex: none; }
.in-live { position: relative; height: 100%; border-radius: 15px; overflow: hidden; background: linear-gradient(180deg, #f6d9c4, #e9b79a); }
.in-saree { position: absolute; left: 30%; top: 22%; width: 40%; height: 66%; border-radius: 40% 40% 8px 8px; background: linear-gradient(135deg, #b3122c 0 55%, #e3a21a 55% 62%, #b3122c 62%); }
.in-badge { position: absolute; top: 8px; left: 8px; font-size: 9px; font-weight: 800; color: #fff; background: #e0245e; padding: 2px 5px; border-radius: 4px; z-index: 1; }
.in-view { position: absolute; top: 8px; right: 8px; font-size: 9px; color: #fff; background: rgba(0,0,0,.4); padding: 2px 5px; border-radius: 4px; }
.in-wa { position: absolute; left: 6px; right: 6px; bottom: 8px; font-size: 9px; font-weight: 700; color: #fff; background: #25d366; padding: 5px; border-radius: 6px; text-align: center; }
.in-arrow { font-size: 22px; color: var(--muted-fg); }
.in-bubs { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; max-width: 240px; }
.in-bubs span { font-size: 12px; background: #fff; border: 1px solid var(--border); padding: 5px 9px; border-radius: 12px 12px 12px 2px; box-shadow: var(--shadow-pill); opacity: 0; animation: bubIn .4s ease-out forwards; }
@keyframes bubIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.in-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
@media (max-width: 560px) { .in-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); } .in-card small { display: none; } }
.in-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 14px; }
.in-card span { font-size: 12px; color: var(--brand); font-weight: 600; }
.in-card small { font-size: 11px; color: var(--muted-fg); line-height: 1.3; }
.in-rules { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.in-rules li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.in-mkt { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; font-weight: 600; }
.in-small { font-size: 12.5px; color: var(--muted-fg); }
@media (max-width: 560px) {
  .in-sheet { padding: 22px 18px 16px; }
  .in-sheet h2 { font-size: 20px; }
  .in-phone { width: 96px; height: 170px; }
  .in-bubs span:nth-child(n+6) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .in-bubs span { animation: none; opacity: 1; } .tm-st.working { animation: none; } }
.story { font-size: 14.5px; line-height: 1.5; padding: 12px 14px; border-radius: 12px; background: var(--brand-light); color: var(--brand-dark); margin-bottom: 10px; }
.live-shot { position: relative; border-radius: 14px; overflow: hidden; background: #111; }
.live-shot .photo-img { display: block; width: 100%; height: auto; opacity: .92; }
.ls-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; color: #fff; background: #e0245e; padding: 2px 6px; border-radius: 4px; }
.ls-src { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
@media (max-width: 560px) { .hide-sm { display: none; } .help-btn { width: 30px; height: 30px; } .needs-pill { height: 28px; padding: 0 8px; font-size: 12px; } }
/* I1: W1's live screenshots are whole phone frames (400×760): show them uncropped, phone-sized. */
.live-shot .photo-img.shot-live { width: 180px; max-width: 100%; height: auto; aspect-ratio: 400 / 760; max-height: none; object-fit: contain; opacity: 1; }
.live-shot:has(.shot-live) { background: transparent; width: max-content; max-width: 100%; }

/* FX-B: first "Needs you" row — calm pulse until opened */
.row-chat.pulse { animation: needPulse 2.4s ease-in-out infinite; }
@keyframes needPulse { 0%, 100% { box-shadow: inset 3px 0 0 var(--bad); } 50% { box-shadow: inset 3px 0 0 var(--bad), 0 0 0 3px rgba(220, 60, 60, .18); } }
@media (prefers-reduced-motion: reduce) { .row-chat.pulse { animation: none; box-shadow: inset 3px 0 0 var(--bad); } }
/* filters wrap instead of clipping "Orders 8" at the edge */
.filters { flex-wrap: wrap; overflow-x: visible; }
/* guest free-text box + colour/size choices */
.g-form { display: flex; gap: 6px; margin: 6px 0 4px; }
.g-form input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; font: inherit; font-size: 13.5px; background: var(--card, #fff); color: inherit; }
.pick-opts { display: inline-flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted-fg); }
.pick-opts select { margin-left: 4px; height: 30px; border-radius: 8px; border: 1px solid var(--border); font: inherit; font-size: 12.5px; background: var(--card, #fff); color: inherit; }
/* owner bar: Mark as handled */
.ob-done { height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; white-space: nowrap; flex: none; background: var(--card, #fff); color: var(--brand-dark); }
/* intro step 3: what to watch */
.in-watch { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.45; }
/* toast at the top so it never covers the guest composer */
.toast { top: 76px; bottom: auto; }
/* bigger tap targets on phones */
@media (max-width: 900px) { .seg button { min-height: 36px; } .help-btn { width: 36px; height: 36px; } }

/* ── Team panel v2: network entry, who's-on-it chips, event cascade ── */
.tm-net { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; background: var(--brand-dark); color: #fff; text-align: left; }
.tm-net:hover { background: #134a43; }
.tm-net b { display: block; font-size: 13.5px; }
.tm-net small { display: block; font-size: 11.5px; opacity: .75; }
.tm-net > span:nth-child(2) { flex: 1; min-width: 0; }
.tm-net-ic { color: #5fe0c8; font-size: 18px; animation: tmPulse 1.6s ease-in-out infinite; }
.tm-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.tm-chip { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; min-width: 0; }
.tm-chip > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.15; }
.tm-chip b { display: block; font-size: 12.5px; }
.tm-chip small { display: block; font-size: 10.5px; color: var(--muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-chip .avatar, .cx .avatar { width: 24px; height: 24px; font-size: 11px; flex: none; }
.tm-chip.blocked { border-color: #f5c9c5; } .tm-chip.waiting { border-color: #f1e3b4; } .tm-chip.working { border-color: #bfe6dc; }

.cx { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.cx.latest { border-color: #bfe6dc; box-shadow: 0 0 0 3px var(--brand-10); }
.cx-trig { display: flex; gap: 10px; padding: 10px 12px; background: #fafaf8; border-bottom: 1px solid var(--border); }
.cx-ic { font-size: 18px; line-height: 1.2; flex: none; }
.cx-tm { flex: 1; min-width: 0; }
.cx-top { display: flex; align-items: center; gap: 6px; }
.cx-top b { font-size: 13px; }
.cx-top .tm-t { margin-left: auto; }
.cx-new { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--brand-light); color: var(--brand-dark); }
.cx-q { font-size: 12.5px; color: #333; margin-top: 2px; overflow-wrap: anywhere; }
.cx-sum { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 11.5px; color: var(--muted-fg); border-bottom: 1px dashed var(--border); }
.cx-avs { display: flex; }
.cx-avs .avatar { width: 20px; height: 20px; font-size: 9.5px; margin-right: -5px; box-shadow: 0 0 0 2px #fff; }
.cx-avs + span { margin-left: 6px; }
.cx-steps { list-style: none; margin: 0; padding: 8px 12px 10px; display: grid; gap: 7px; position: relative; }
.cx-steps::before { content: ""; position: absolute; left: 23px; top: 14px; bottom: 16px; width: 2px; background: var(--border); }
.cx-s { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: start; font-size: 12.5px; line-height: 1.35; }
.cx-b { min-width: 0; overflow-wrap: anywhere; }
.cx-d { color: var(--muted-fg); }
.cx-arr { color: var(--brand); font-weight: 700; }
.cx-par { white-space: nowrap; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--brand-dark); background: var(--brand-light); padding: 0 6px; border-radius: 999px; }
.cx-say { margin-top: 3px; padding: 5px 8px; border-radius: 8px; background: var(--muted); color: #333; font-size: 12px; }
.cx-say.out { background: var(--self, var(--brand-light)); }
.cx-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; position: relative; z-index: 1; }
.cx-av.chk { background: var(--muted); color: var(--brand-dark); } .cx-av.chk .ic { width: 13px; height: 13px; }
.cx-av.cust { background: #e9e5ff; color: #4b3fb5; }
.cx-s .avatar { position: relative; z-index: 1; box-shadow: 0 0 0 2px #fff; }
.cx-s.block .cx-d { color: var(--bad); } .cx-s.block .cx-av.chk { background: var(--bad-bg); color: var(--bad); }
.cx-s.ok .cx-d { color: var(--good); }
.cx-s.wake b::after { content: " ⚡"; font-weight: 400; }
.cx-wait { padding: 8px 12px; font-size: 12px; color: var(--muted-fg); }
@media (prefers-reduced-motion: reduce) { .tm-net-ic { animation: none; } }
