.demo { background: #e4e8fb; padding-block: 96px; }
.demo-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.demo-head p { color: var(--muted); max-width: 46ch; }
.coach { display: flex; align-items: center; gap: 16px; background: var(--night); color: #fff; border-radius: 20px 20px 0 20px; padding: 14px 22px; margin-top: 32px; min-height: 72px; }
.coach .quarter { fill: var(--mint); flex: none; }
.coach-text { flex: 1; font-weight: 700; line-height: 1.4; }
.coach-go { display: none; }
.d-tabs { display: none; }
.d-stage { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: stretch; }
.d-a, .d-b { min-width: 0; outline-offset: 4px; }
.d-a { background: #090b1e; border-radius: 42px; padding: 10px; min-height: 660px; display: grid; }
.d-a .d-body { background: #fff; border-radius: 33px; overflow: hidden; display: flex; flex-direction: column; padding: 0 18px 18px; font-size: 18px; line-height: 1.45; }
.d-b { background: #fff; border-radius: 28px 28px 0 28px; overflow: hidden; display: flex; flex-direction: column; min-height: 660px; }
.d-b .d-title { background: var(--night); color: #fff; padding: 16px 26px; font-weight: 700; }
.d-b .d-body { padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.d-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.d-foot p { color: var(--muted); font-size: 17px; }
.d-foot .actions { align-items: center; }
.demo[data-done=true] .d-foot .btn { animation: nudge 1s ease-out 1; }
@keyframes nudge { 30% { transform: scale(1.06); } }

.db { min-height: 50px; padding: 6px 22px; border: 2px solid var(--cob); background: var(--cob); color: #fff; border-radius: 14px 14px 0 14px; font-weight: 700; font-size: 18px; line-height: 1.3; transition: background-color .18s ease-out; }
.db:hover { background: var(--cob-dark); }
.db.line { background: #fff; color: var(--cob); }
.db.line:hover { background: #eef0ff; }
.db.full { width: 100%; margin-top: auto; }
.db:disabled, .qty button:disabled { background: #e6e9f2; border-color: #e6e9f2; color: #5c6484; cursor: not-allowed; }
.dp-head { margin: 0 -18px 14px; padding: 22px 20px 14px; background: var(--cob); color: #fff; line-height: 1.35; }
.dp-head b { display: block; font-size: 23px; font-weight: 900; }
.dp-head.wa { background: #075e54; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #eceef5; border-radius: 14px; padding: 4px; margin-bottom: 8px; }
.seg button { border: 0; background: none; min-height: 44px; border-radius: 11px; font-weight: 700; }
.seg [aria-pressed=true] { background: #fff; color: var(--cob); box-shadow: 0 1px 4px rgb(6 8 40 / .16); }
.di { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e8eaf2; }
.d-a .di.two { grid-template-columns: 1fr auto; }
.di .pic { width: 50px; height: 50px; border-radius: 14px; background: #e4e8ff; display: grid; place-items: center; }
.di .pic svg { width: 32px; height: 32px; }
.di b { display: block; }
.di small, .rows small { color: #555b74; font-size: 16px; }
.qty { display: inline-flex; align-items: center; gap: 2px; direction: ltr; }
.qty button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: #e4e8ff; color: var(--cob); font-size: 24px; font-weight: 700; line-height: 1; }
.qty output { min-width: 34px; text-align: center; font-weight: 700; padding-inline: 4px; direction: rtl; }
.sum { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 2px; margin-top: auto; }
.sum + .db.full { margin-top: 0; }
.sum b { font-size: 24px; font-weight: 900; }
.track { display: grid; gap: 4px; padding-block: 6px; }
.track li { position: relative; padding-block: 11px; padding-inline-start: 44px; color: #5c6484; }
.track li::before { content: ''; position: absolute; inset-inline-start: 4px; top: 13px; width: 24px; height: 24px; border-radius: 50% 50% 0 50%; background: #dfe3ef; }
.track li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 14px; top: 40px; height: 22px; width: 4px; background: #dfe3ef; }
.track .past::before { background: var(--cob); }
.track .now { color: var(--ink); font-weight: 900; font-size: 21px; }
.track .now::before { background: #1fb87a; }
.rate { margin-top: auto; text-align: center; }
.rate > div { display: flex; justify-content: center; direction: ltr; }
.star { width: 50px; height: 50px; border: 0; background: none; padding: 8px; }
.star svg { fill: #cfd5e6; }
.star.on svg { fill: #e39b00; }

.ord { border: 2px solid var(--mist); border-radius: 22px 22px 0 22px; padding: 18px 20px; display: grid; gap: 12px; }
.ord.fresh { border-color: #1fb87a; background: #effcf5; }
.ord header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ord em, .rows em, .tag { font-style: normal; font-weight: 700; font-size: 17px; background: #e4e8ff; color: #1a2aa8; padding: 1px 12px; border-radius: 9px 9px 0 9px; white-space: nowrap; }
.ord.fresh em { background: #c9f6e0; color: #064d30; }
.ord li, .prices li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ord li.t { border-top: 2px dashed var(--mist); margin-top: 8px; padding-top: 8px; }
.ord .db { justify-self: start; }
.two-b { display: flex; flex-wrap: wrap; gap: 10px; }
.d-b h3 { margin: 8px 0 0; font-size: 19px; color: var(--muted); }
.prices li { border-bottom: 1px solid #e8eaf2; padding-block: 5px; }
.prices output { min-width: 66px; }
.empty { color: #555b74; text-align: center; padding: 26px 12px; border: 2px dashed var(--mist); border-radius: 20px; }
.d-a .empty { border: 0; margin: auto; }
.note { background: #fff6dd; color: #5c4300; border-radius: 14px 14px 0 14px; padding: 10px 16px; line-height: 1.45; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpis div { background: #f1f3f8; border-radius: 16px; padding: 10px 12px; font-size: 17px; line-height: 1.35; }
.kpis b { display: block; font-size: 30px; font-weight: 900; line-height: 1.15; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; line-height: 1.35; }
.rows li + li { margin-top: 4px; }
.rows .cur { background: #f1f3f8; }
.rows b, .rows small { display: block; }
em.y { background: #c9f6e0 !important; color: #064d30 !important; } em.h { background: #ffe3b8 !important; color: #6a3d00 !important; } em.x { background: #ffd9d5 !important; color: #8a1a12 !important; }
.ask { background: #fff6dd; border-radius: 18px 18px 0 18px; padding: 14px 18px; display: grid; gap: 10px; justify-items: start; }
.demo[data-demo=confirm] .d-a .d-body { background: #efe7dd; }
.thread { flex: 1; overflow-y: auto; max-height: 400px; padding-bottom: 10px; }
.thread .msg + .msg { margin-top: 8px; }
.dots { display: flex; gap: 5px; padding-block: 16px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #8c8f99; }
.replies { display: grid; gap: 8px; margin-top: auto; }
.replies .db { width: 100%; background: #fff; border-color: #fff; color: #00607f; }
.replies .db:hover { background: #e8f6fb; }
.replies .db.line { background: transparent; border: 2px dashed #9a8f80; color: #4a4238; }
.replies .db:disabled { color: #75695a; }
.card { border: 1px solid #e1e5f0; border-radius: 20px; padding: 14px 16px; margin-bottom: 12px; }
.card .di:last-child { border: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 4px; }
.row.sm { font-size: 17px; color: #454c6a; }
.row.t { border-top: 2px dashed var(--mist); margin-top: 6px; padding-top: 8px; }
.row.big { font-size: 22px; margin-top: auto; border-top: 1px solid var(--mist); padding-top: 14px; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #8b92ad; margin-inline-end: 8px; vertical-align: -2px; }
.stock { width: 100%; border-collapse: collapse; }
.stock th, .stock td { text-align: start; padding: 7px 4px; border-bottom: 1px solid #e8eaf2; }
.stock th { color: var(--muted); font-weight: 700; font-size: 17px; }
.demo :focus-visible { outline-color: var(--cob); }
.coach :focus-visible { outline-color: var(--mint); }

@media (prefers-reduced-motion: no-preference) {
  .pop { animation: pop .25s ease-out; }
  @keyframes pop { from { transform: translateY(10px); } }
  .dots i { animation: blink 1s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
  @keyframes blink { 50% { opacity: .25; } }
}
@media (max-width: 980px) {
  .demo { padding-block: 64px; }
  .coach { margin-top: 20px; padding: 12px 16px; position: sticky; top: 8px; z-index: 3; box-shadow: 0 8px 24px rgb(6 8 40 / .25); }
  .coach-go:not([hidden]) { display: inline-grid; place-items: center; flex: none; min-height: 44px; padding: 4px 14px; border: 0; border-radius: 12px 12px 0 12px; background: var(--mint); color: var(--night); font-weight: 700; font-size: 17px; line-height: 1.25; max-width: 42%; }
  .d-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
  .d-tabs button { position: relative; min-height: 50px; border: 0; border-radius: 16px 16px 0 16px; background: #fff; font-weight: 700; }
  .d-tabs [aria-pressed=true] { background: var(--cob); color: #fff; }
  .d-tabs .ping::after { content: ''; position: absolute; top: 8px; inset-inline-end: 12px; width: 12px; height: 12px; border-radius: 50%; background: #1fb87a; }
  .d-stage { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
  .demo[data-side="0"] .d-b, .demo[data-side="1"] .d-a { display: none; }
  .d-a { width: min(400px, 100%); margin-inline: auto; min-height: 600px; }
  .d-b { min-height: 600px; }
  .d-b .d-body { padding: 18px; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .two-b .db, .ord .db { width: 100%; }
  .d-foot .actions { width: 100%; }
  .d-foot .db, .d-foot .btn { width: 100%; }
  .ord header { flex-wrap: wrap; }
  .di { grid-template-columns: 42px 1fr auto; gap: 8px; }
  .di .pic { width: 42px; height: 42px; }
  .qty output { min-width: 26px; padding-inline: 2px; }
  .row.big { font-size: 20px; }
}
