/* ==========================================================================
   Fase 24 — Casos de Uso: one bespoke scene per industry. Every animation
   is scoped to `.tab-panel.in` so it replays each time the tab activates.
   Timings fit inside the 7s autoplay of the casos tabs.
   ========================================================================== */

.sc { position: relative; height: 410px; padding: 14px; overflow: hidden; font-family: var(--font-body); color: var(--fg); background: #fff; }
.sc-top { display: flex; align-items: center; justify-content: space-between; height: 30px; margin-bottom: 10px; }
.sc-top > b { font: 700 1rem var(--font-display); letter-spacing: -.02em; }
.sc small { font-size: .68rem; color: var(--muted); }

.sc-toast {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6;
  display: flex; align-items: center; gap: .55rem; padding: .7rem .9rem; border-radius: 12px;
  background: var(--fg); color: #fff; font: 600 .78rem var(--font-body);
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.6); opacity: 0;
}
.sc-toast span { width: 18px; height: 18px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; font-size: .62rem; flex: none; }
.sc-cur { position: absolute; z-index: 8; width: 22px; height: 22px; opacity: 0; pointer-events: none; left: 90%; top: 10%; }
.sc-cur svg { width: 22px; height: 22px; display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,.28)); }
.sc-cur path { fill: var(--fg); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }

@keyframes scUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes scIn { from { opacity: 0; transform: scale(.94); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes scPop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.12); } 100% { opacity: 1; transform: none; } }
@keyframes scFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scOut { to { opacity: 0; transform: scale(.9); } }
@keyframes scPress { 50% { transform: scale(.93); } }
@keyframes scDraw { to { stroke-dashoffset: 0; } }
@keyframes scToast { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

.tab-panel.in .sc-toast { animation: scToast .5s var(--td, 4s) cubic-bezier(.2,.9,.3,1.3) both; }

/* ---------- 1 · retail: product → cart drawer → checkout ---------- */
.sc-shop { --td: 4.4s; }
.sh-cart { position: relative; width: 22px; height: 22px; }
.sh-cart svg { width: 22px; height: 22px; }
.sh-badge { position: absolute; top: -6px; right: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 .6rem/16px var(--font-display); text-align: center; font-style: normal; opacity: 0; }
.sh-prod { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; height: calc(100% - 40px); }
.sh-img { border-radius: 16px; background-size: cover; background-position: center; }
.sh-info { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; min-width: 0; }
.sh-tag { align-self: flex-start; font: 600 .6rem var(--font-mono); letter-spacing: .1em; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 99px; }
.sh-info b { font: 700 1.15rem/1.15 var(--font-display); letter-spacing: -.02em; }
.sh-price { font: 600 1rem var(--font-display); color: var(--accent); }
.sh-stars { color: #f5a524; font-size: .8rem; letter-spacing: 2px; }
.sh-dots { display: flex; gap: 6px; }
.sh-dots i { width: 16px; height: 16px; border-radius: 50%; background: #e8e2d6; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--line); }
.sh-dots i:nth-child(2) { background: #c9a227; } .sh-dots i:nth-child(3) { background: #9aa4b2; }
.sh-btn { position: relative; margin-top: auto; height: 44px; border-radius: 12px; background: var(--fg); color: #fff; font: 600 .82rem var(--font-display); }
.sh-btn span { position: absolute; inset: 0; display: grid; place-items: center; }
.sh-btn .b { opacity: 0; background: var(--ok); border-radius: 12px; }
.sh-drawer {
  position: absolute; top: 54px; right: 14px; bottom: 14px; width: 60%; z-index: 4;
  background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: -20px 0 50px -20px rgba(10,14,23,.35);
  padding: 14px; display: flex; flex-direction: column; gap: 10px; transform: translateX(115%);
}
.sh-dh { font: 700 .95rem var(--font-display); }
.sh-line { display: flex; align-items: center; gap: 8px; font-size: .74rem; }
.sh-thumb { width: 38px; height: 38px; border-radius: 9px; background-size: cover; background-position: center; flex: none; }
.sh-ln { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-sub { display: flex; justify-content: space-between; font-size: .76rem; padding-top: 8px; border-top: 1px dashed var(--line); }
.sh-steps { position: relative; margin-top: auto; display: flex; justify-content: space-between; font-size: .64rem; color: var(--muted); padding-top: 4px; }
.sh-steps span { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sh-steps i { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font: 700 .62rem var(--font-display); font-style: normal; color: var(--muted); }
.sh-fill { position: absolute; left: 11px; right: 11px; top: 15px; height: 2px; background: var(--line); }
.sh-fill::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.tab-panel.in .sh-img { animation: scIn .8s cubic-bezier(.2,.8,.2,1) both; }
.tab-panel.in .sh-info > * { animation: scUp .5s cubic-bezier(.2,.8,.2,1) both; }
.tab-panel.in .sh-info > :nth-child(2) { animation-delay: .1s; } .tab-panel.in .sh-info > :nth-child(3) { animation-delay: .18s; }
.tab-panel.in .sh-info > :nth-child(4) { animation-delay: .26s; } .tab-panel.in .sh-info > :nth-child(5) { animation-delay: .34s; }
.tab-panel.in .sh-info > :nth-child(6) { animation: scUp .5s .42s both, scPress .3s 1.95s ease; }
.tab-panel.in .sh-btn .b { animation: scFade .25s 2.05s both; }
.tab-panel.in .sh-badge { animation: scPop .45s 2.15s both; }
.tab-panel.in .sh-drawer { animation: shDrawer .7s 2.5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes shDrawer { to { transform: none; } }
.tab-panel.in .sh-fill::after { animation: shFill 1.1s 3.15s ease-in-out both; }
@keyframes shFill { to { transform: scaleX(1); } }
.tab-panel.in .sh-steps span i { animation: shStep .3s calc(3.1s + var(--k) * .5s) both; }
@keyframes shStep { to { background: var(--accent); border-color: var(--accent); color: #fff; } }
.tab-panel.in .sc-shop .sc-cur { animation: shCur 2.7s .5s cubic-bezier(.45,0,.2,1) both; }
@keyframes shCur {
  0% { opacity: 0; left: 88%; top: 18%; } 10% { opacity: 1; }
  52% { left: 74%; top: 86%; transform: none; } 56% { transform: scale(.78); } 62% { transform: none; }
  85% { opacity: 1; left: 76%; top: 88%; } 100% { opacity: 0; left: 78%; top: 90%; }
}

/* ---------- 2 · barber: calendar → slot → barber → reminder ---------- */
.sc-book { --td: 99s; }
.bk-today { font-size: .72rem; color: var(--muted); }
.bk-days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.bk-days span { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 11px; font-size: .62rem; color: var(--muted); border: 1px solid var(--line-soft); }
.bk-days b { font: 700 .95rem var(--font-display); color: var(--fg); }
.bk-days .on { background: var(--fg); border-color: var(--fg); color: rgba(255,255,255,.7); }
.bk-days .on b { color: #fff; }
.bk-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.bk-slots span { height: 36px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; font: 600 .78rem var(--font-display); }
.bk-slots .busy { color: var(--muted-2); background: var(--bg-alt); text-decoration: line-through; border-color: transparent; }
.bk-barbers { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; align-items: center; justify-items: center; margin-top: 14px; }
.bk-barbers small { justify-self: start; }
.bk-barbers span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem var(--font-display); background: var(--bg-alt); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.bk-btn { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 600 .84rem var(--font-display); }
.bk-push {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 6;
  display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 16px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -16px rgba(10,14,23,.45); transform: translateY(-150%);
}
.bk-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.bk-ic svg { width: 18px; height: 18px; }
.bk-push b { display: block; font: 600 .74rem var(--font-display); }
.bk-push i { font-style: normal; font-size: .72rem; color: var(--muted); }

.tab-panel.in .bk-days span { animation: scUp .4s calc(var(--k) * .05s) both; }
.tab-panel.in .bk-slots span { animation: scPop .4s calc(.35s + var(--k) * .06s) both; }
.tab-panel.in .bk-slots .pick { animation: scPop .4s calc(.35s + var(--k) * .06s) both, bkPick .3s 1.75s both; }
@keyframes bkPick { to { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.04); box-shadow: 0 10px 20px -10px rgba(0,87,255,.8); } }
.tab-panel.in .bk-barbers > * { animation: scUp .4s .9s both; }
.tab-panel.in .bk-barbers .pick { animation: scUp .4s .9s both, bkBarber .3s 2.5s both; }
@keyframes bkBarber { to { box-shadow: 0 0 0 3px var(--accent); background: var(--accent-soft); color: var(--accent); } }
.tab-panel.in .bk-btn { animation: scUp .4s 1s both, scPress .3s 3.25s ease; }
.tab-panel.in .bk-push { animation: bkPush .6s 3.7s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes bkPush { to { transform: none; } }
.tab-panel.in .sc-book .sc-cur { animation: bkCur 3.4s .7s cubic-bezier(.45,0,.2,1) both; }
@keyframes bkCur {
  0% { opacity: 0; left: 90%; top: 14%; } 8% { opacity: 1; }
  28% { left: 79%; top: 43%; transform: none; } 31% { transform: scale(.78); } 35% { transform: none; left: 79%; top: 43%; }
  52% { left: 65%; top: 66%; transform: none; } 55% { transform: scale(.78); } 59% { transform: none; left: 65%; top: 66%; }
  75% { left: 50%; top: 89%; transform: none; } 78% { transform: scale(.78); } 82% { transform: none; opacity: 1; }
  100% { opacity: 0; left: 52%; top: 92%; }
}

/* ---------- 3 · legal: upload → encrypt → signature → stamp ---------- */
.dc-lock { color: var(--accent); width: 20px; height: 20px; } .dc-lock svg { width: 20px; height: 20px; }
.dc-drop { position: relative; height: 120px; border: 2px dashed var(--line); border-radius: 16px; background: var(--bg-alt); }
.dc-hint { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; color: var(--muted-2); }
.dc-file {
  position: absolute; left: 14px; right: 14px; top: 50%; margin-top: -28px; height: 56px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); opacity: 0;
}
.dc-pdf { width: 34px; height: 40px; border-radius: 6px; background: var(--fg); color: #fff; font: 700 .58rem var(--font-mono); display: grid; place-items: center; flex: none; }
.dc-fn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dc-fn b { font: 600 .78rem var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-bar { display: block; height: 5px; border-radius: 3px; background: var(--bg-alt); overflow: hidden; }
.dc-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.dc-enc { display: inline-flex; align-items: center; gap: 6px; margin: 12px 0; padding: 5px 10px; border-radius: 99px; background: rgba(10,138,74,.1); color: var(--ok); font: 600 .7rem var(--font-body); opacity: 0; }
.dc-enc svg { width: 15px; height: 15px; }
.dc-sign { position: relative; height: 150px; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.dc-sign svg { position: absolute; left: 14px; right: 14px; top: 34px; width: calc(100% - 28px); height: 80px; }
.dc-sign::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 30px; border-bottom: 1.5px solid var(--line); }
.dc-sig { fill: none; stroke: var(--fg); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; }
.dc-stamp { position: absolute; right: 16px; bottom: 14px; padding: 5px 12px; border: 2px solid var(--accent); border-radius: 8px; color: var(--accent); font: 700 .74rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; transform: rotate(-9deg); opacity: 0; background: #fff; }

.tab-panel.in .dc-file { animation: dcFile .9s .35s cubic-bezier(.3,1.3,.5,1) both; }
@keyframes dcFile { from { opacity: 0; transform: translate(30%, -150px) rotate(-8deg); } to { opacity: 1; transform: none; } }
.tab-panel.in .dc-hint { animation: scOut .3s 1.1s both; }
.tab-panel.in .dc-bar i { animation: shFill 1s 1.3s ease-in-out both; }
.tab-panel.in .dc-enc { animation: scPop .45s 2.2s both; }
.tab-panel.in .dc-sig { animation: scDraw 1.3s 2.5s ease-in-out both; }
.tab-panel.in .dc-stamp { animation: dcStamp .45s 4s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes dcStamp { from { opacity: 0; transform: rotate(-9deg) scale(2.2); } to { opacity: 1; transform: rotate(-9deg) scale(1); } }
.tab-panel.in .sc-docs .sc-cur { animation: dcCur 4.2s .2s linear both; }
@keyframes dcCur {
  0% { opacity: 0; left: 78%; top: 2%; } 6% { opacity: 1; }
  26% { left: 52%; top: 26%; } 36% { left: 52%; top: 26%; }
  52% { left: 6%; top: 66%; } 58% { left: 22%; top: 60%; } 64% { left: 36%; top: 72%; }
  70% { left: 52%; top: 62%; } 76% { left: 68%; top: 70%; } 82% { left: 90%; top: 60%; opacity: 1; }
  100% { opacity: 0; left: 92%; top: 62%; }
}

/* ---------- 4 · clinic: live vitals + agenda ---------- */
.sc-health { --td: 3.3s; }
.hl-pt { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg-alt); }
.hl-av { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 .8rem var(--font-display); flex: none; }
.hl-pt b { display: block; font: 700 .9rem var(--font-display); }
.hl-pt i { font-style: normal; font-size: .7rem; color: var(--muted); }
.hl-live { margin-left: auto; font: 600 .6rem var(--font-mono); letter-spacing: .1em; color: var(--ok); display: flex; align-items: center; gap: 5px; font-style: normal; }
.hl-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: hlBlink 1.2s ease-in-out infinite; }
@keyframes hlBlink { 50% { opacity: .25; } }
.hl-vitals { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.hl-vitals > div { border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hl-vitals b { font: 700 1.15rem var(--font-display); letter-spacing: -.02em; }
.hl-vitals b i { font-style: normal; font-size: .62rem; color: var(--muted); font-weight: 500; }
.hl-ecg svg { width: 100%; height: 34px; margin-top: 2px; }
.hl-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 260 140; animation: hlEcg 1.8s linear infinite; }
@keyframes hlEcg { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.hl-h { display: block; margin: 12px 0 6px; font-weight: 600; }
.hl-list { display: flex; flex-direction: column; gap: 6px; }
.hl-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line-soft); }
.hl-row i { width: 8px; height: 30px; border-radius: 4px; background: var(--accent-soft); flex: none; }
.hl-row b { display: block; font: 600 .78rem var(--font-body); }
.hl-row em { font-style: normal; font-size: .68rem; color: var(--muted); }
.tab-panel.in .hl-pt { animation: scUp .5s both; }
.tab-panel.in .hl-vitals > div { animation: scPop .5s .25s both; }
.tab-panel.in .hl-vitals > div:nth-child(2) { animation-delay: .35s; } .tab-panel.in .hl-vitals > div:nth-child(3) { animation-delay: .45s; }
.tab-panel.in .hl-row { animation: scUp .45s calc(.8s + var(--k) * .12s) both; }
.tab-panel.in .hl-row:nth-child(2) { animation: scUp .45s .92s both, hlPick .3s 2.6s both; }
@keyframes hlPick { to { border-color: var(--accent); background: var(--accent-soft); } }
.tab-panel.in .hl-row:nth-child(2) i { animation: hlBar .3s 2.6s both; }
@keyframes hlBar { to { background: var(--accent); } }
.tab-panel.in .sc-health .sc-cur { animation: hlCur 2.4s 1.1s cubic-bezier(.45,0,.2,1) both; }
@keyframes hlCur { 0% { opacity: 0; left: 88%; top: 30%; } 12% { opacity: 1; } 55% { left: 46%; top: 72%; transform: none; } 61% { transform: scale(.78); } 68% { transform: none; } 88% { opacity: 1; } 100% { opacity: 0; left: 50%; top: 76%; } }

/* ---------- 5 · finance: KPI counter, bars, trend line, reconciliation ---------- */
.sc-fin { --td: 4.2s; }
.fn-chip { font: 500 .66rem var(--font-mono); padding: 4px 9px; border-radius: 99px; background: var(--bg-alt); color: var(--muted); }
.fn-kpi { display: flex; align-items: baseline; justify-content: space-between; }
.fn-num { font: 700 2.2rem/1 var(--font-display); letter-spacing: -.04em; color: var(--ok); }
@property --fnc { syntax: '<integer>'; inherits: false; initial-value: 0; }
.fn-count { --fnc: 24; counter-reset: fnc var(--fnc); }
.fn-count::after { content: counter(fnc); }
.fn-chart { position: relative; height: 140px; margin: 10px 0 12px; }
.fn-bars { position: absolute; inset: 0 0 18px; display: flex; align-items: flex-end; gap: 8px; }
.fn-bars span { position: relative; flex: 1; height: var(--h); }
.fn-bars i { position: absolute; inset: 0; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #7aa5ff, var(--accent)); transform-origin: 50% 100%; }
.fn-bars span:not(:last-child) i { background: #dfe6f3; }
.fn-bars small { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: .6rem; }
.fn-chart svg { position: absolute; inset: 0 0 18px; width: 100%; height: calc(100% - 18px); }
.fn-line { fill: none; stroke: var(--fg); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; }
.fn-inv { display: flex; flex-direction: column; gap: 6px; }
.fn-inv div { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-soft); font-size: .76rem; }
.fn-inv em { font-style: normal; font: 600 .66rem var(--font-body); color: var(--ok); background: rgba(10,138,74,.1); padding: 3px 8px; border-radius: 99px; opacity: 0; }
.sc-fin .sc-cur { display: none; }
.tab-panel.in .fn-count { animation: fnCount 1.4s .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fnCount { from { --fnc: 0; } to { --fnc: 24; } }
.tab-panel.in .fn-bars i { animation: fnBar .7s calc(.4s + var(--k) * .09s) cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes fnBar { from { transform: scaleY(0); } to { transform: none; } }
.tab-panel.in .fn-line { animation: scDraw 1.2s 1.3s ease-in-out both; }
.tab-panel.in .fn-inv div { animation: scUp .4s calc(1.6s + var(--k) * .1s) both; }
.tab-panel.in .fn-inv em { animation: scPop .4s calc(2.5s + var(--k) * .35s) both; }

/* ---------- 6 · education: course player + progress ring + certificate ---------- */
.ln-video { position: relative; height: 180px; border-radius: 16px; background-size: cover; background-position: center; overflow: hidden; }
.ln-video::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,23,.15), rgba(10,14,23,.7)); }
.ln-play { position: absolute; left: 50%; top: 45%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(255,255,255,.25); }
.ln-play svg { width: 22px; height: 22px; fill: var(--accent); margin-left: 3px; }
.ln-title { position: absolute; left: 14px; bottom: 18px; color: #fff; font: 600 .82rem var(--font-display); }
.ln-bar { position: absolute; left: 14px; right: 14px; bottom: 9px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.ln-bar i { display: block; height: 100%; width: 100%; background: #fff; transform: scaleX(.12); transform-origin: 0 50%; }
.ln-bottom { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 12px; }
.ln-mods { display: flex; flex-direction: column; gap: 7px; }
.ln-mods div { display: flex; align-items: center; gap: 8px; font-size: .74rem; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 11px; min-width: 0; }
.ln-mods span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-mods i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.ln-mods i.done { background: var(--ok); border-color: var(--ok); }
.ln-ring { position: relative; display: grid; place-items: center; align-content: center; border: 1px solid var(--line-soft); border-radius: 14px; }
.ln-ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ln-ring circle { fill: none; stroke: var(--bg-alt); stroke-width: 8; }
.ln-ring .ln-arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 72; }
.ln-ring b { position: absolute; top: 50%; left: 0; right: 0; margin-top: -24px; text-align: center; font: 700 1.05rem var(--font-display); }
.ln-ring small { margin-top: 2px; }
@property --lnc { syntax: '<integer>'; inherits: false; initial-value: 64; }
.ln-count { --lnc: 64; counter-reset: lnc var(--lnc); } .ln-count::after { content: counter(lnc); }
.ln-cert {
  position: absolute; left: 50%; top: 50%; width: 220px; margin: -60px 0 0 -110px; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 14px;
  background: #fff; border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(10,14,23,.5); text-align: center; opacity: 0;
}
.ln-cert span { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #ffd66b, #f5a524); display: grid; place-items: center; font-size: 1.5rem; }
.ln-cert b { font: 700 .92rem var(--font-display); }
.ln-cert i { position: absolute; left: 50%; top: 40%; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: 0; }
.ln-cert i:nth-of-type(2n) { background: #f5a524; } .ln-cert i:nth-of-type(3n) { background: var(--ok); }
.sc-learn .sc-cur { left: 60%; top: 40%; }
.tab-panel.in .ln-video { animation: scIn .7s both; }
.tab-panel.in .ln-play { animation: lnPulse 1.2s ease-in-out infinite, scOut .3s 1.35s both; }
@keyframes lnPulse { 50% { box-shadow: 0 0 0 18px rgba(255,255,255,.1); } }
.tab-panel.in .ln-bar i { animation: lnBar 2s 1.4s ease-in-out both; }
@keyframes lnBar { to { transform: scaleX(1); } }
.tab-panel.in .ln-mods div { animation: scUp .4s calc(.3s + var(--k) * .1s) both; }
.tab-panel.in .ln-mods i.doing { animation: lnDone .3s 3.3s both; }
@keyframes lnDone { to { background: var(--ok); border-color: var(--ok); } }
.tab-panel.in .ln-ring { animation: scUp .4s .5s both; }
.tab-panel.in .ln-arc { animation: lnArc 2s 1.4s ease-in-out both; }
@keyframes lnArc { to { stroke-dashoffset: 0; } }
.tab-panel.in .ln-count { animation: lnCount 2s 1.4s ease-in-out both; }
@keyframes lnCount { from { --lnc: 64; } to { --lnc: 100; } }
.tab-panel.in .ln-cert { animation: scPop .55s 3.7s both; }
.tab-panel.in .ln-cert i { animation: lnConf 1s 3.85s ease-out both; }
.tab-panel.in .ln-cert i:nth-of-type(1) { --x: -90px; --y: -70px; } .tab-panel.in .ln-cert i:nth-of-type(2) { --x: 90px; --y: -60px; }
.tab-panel.in .ln-cert i:nth-of-type(3) { --x: -110px; --y: 10px; } .tab-panel.in .ln-cert i:nth-of-type(4) { --x: 110px; --y: 20px; }
.tab-panel.in .ln-cert i:nth-of-type(5) { --x: -40px; --y: -95px; } .tab-panel.in .ln-cert i:nth-of-type(6) { --x: 50px; --y: -90px; }
@keyframes lnConf { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(220deg); } }
.tab-panel.in .sc-learn .sc-cur { animation: lnCur 1.6s .1s cubic-bezier(.45,0,.2,1) both; }
@keyframes lnCur { 0% { opacity: 0; left: 85%; top: 8%; } 15% { opacity: 1; } 65% { left: 50%; top: 24%; transform: none; } 72% { transform: scale(.78); } 80% { transform: none; opacity: 1; } 100% { opacity: 0; left: 54%; top: 30%; } }

/* ---------- 7 · real estate: pins → property card → visit ---------- */
.sc-map { --td: 3.7s; padding: 0; }
.mp-map { position: absolute; inset: 0; }
.mp-map svg { width: 100%; height: 100%; display: block; }
.mp-pin {
  position: absolute; z-index: 2; padding: 5px 9px; border-radius: 99px; background: #fff; color: var(--fg);
  font: 700 .72rem var(--font-display); box-shadow: 0 8px 18px -8px rgba(10,14,23,.45); white-space: nowrap; opacity: 0;
}
.mp-pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #fff; }
.mp-pin:nth-of-type(1) { left: 12%; top: 18%; } .mp-pin:nth-of-type(2) { left: 52%; top: 14%; }
.mp-pin:nth-of-type(3) { left: 22%; top: 50%; } .mp-pin:nth-of-type(4) { left: 68%; top: 42%; }
.mp-card {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 4;
  display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 12px; padding: 10px;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(10,14,23,.5); transform: translateY(140%);
}
.mp-ph { width: 74px; height: 64px; border-radius: 11px; background-size: cover; background-position: center; }
.mp-info { display: flex; flex-direction: column; min-width: 0; }
.mp-info b { font: 700 .86rem var(--font-display); }
.mp-info i { font-style: normal; font-size: .68rem; color: var(--muted); }
.mp-info em { font-style: normal; font: 700 .9rem var(--font-display); color: var(--accent); }
.mp-btn { padding: 9px 12px; border-radius: 10px; background: var(--fg); color: #fff; font: 600 .7rem var(--font-display); white-space: nowrap; }
.sc-map .sc-toast { top: 16px; bottom: auto; left: 16px; right: 16px; }
.tab-panel.in .mp-map svg { animation: scIn 1s both; }
.tab-panel.in .mp-pin { animation: mpDrop .6s calc(.4s + var(--k) * .15s) cubic-bezier(.3,1.6,.5,1) both; }
@keyframes mpDrop { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }
.tab-panel.in .mp-pin.pick { animation: mpDrop .6s .55s cubic-bezier(.3,1.6,.5,1) both, mpPick .3s 1.85s both; }
@keyframes mpPick { to { background: var(--accent); color: #fff; transform: scale(1.15); } }
.tab-panel.in .mp-pin.pick::after { animation: mpPickA .3s 1.85s both; }
@keyframes mpPickA { to { border-top-color: var(--accent); } }
.tab-panel.in .mp-card { animation: shDrawer .6s 2.2s cubic-bezier(.2,.9,.3,1.15) both; }
.tab-panel.in .mp-btn { animation: scPress .3s 3.3s ease; }
.tab-panel.in .sc-map .sc-cur { animation: mpCur 2.9s .9s cubic-bezier(.45,0,.2,1) both; }
@keyframes mpCur {
  0% { opacity: 0; left: 88%; top: 70%; } 10% { opacity: 1; }
  32% { left: 58%; top: 18%; transform: none; } 36% { transform: scale(.78); } 41% { transform: none; left: 58%; top: 18%; }
  78% { left: 84%; top: 86%; transform: none; } 82% { transform: scale(.78); } 87% { transform: none; opacity: 1; }
  100% { opacity: 0; left: 86%; top: 88%; }
}

/* ---------- 8 · restaurant: order stepper + live courier + ETA ---------- */
.fd-eta { font-size: .72rem; color: var(--muted); }
.fd-eta b { color: var(--accent); font: 700 .9rem var(--font-display); }
@property --fdc { syntax: '<integer>'; inherits: false; initial-value: 12; }
.fd-count { --fdc: 8; counter-reset: fdc var(--fdc); } .fd-count::after { content: counter(fdc); }
.fd-steps { position: relative; display: flex; justify-content: space-between; padding: 4px 0 8px; font-size: .66rem; color: var(--muted); }
.fd-steps span { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 33%; }
.fd-steps i { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: .7rem; color: #fff; }
.fd-steps em { position: absolute; left: 16%; right: 16%; top: 17px; height: 2px; background: var(--line); }
.fd-steps em::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.fd-map { margin-top: 6px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-soft); }
.fd-map svg { display: block; width: 100%; height: auto; }
.fd-route { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 8 8; animation: fdDash 1s linear infinite; }
@keyframes fdDash { to { stroke-dashoffset: -16; } }
.fd-order { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--bg-alt); }
.fd-av { width: 36px; height: 36px; border-radius: 50%; background: var(--fg); color: #fff; display: grid; place-items: center; font: 700 .8rem var(--font-display); flex: none; }
.fd-order b { display: block; font: 600 .76rem var(--font-body); }
.fd-order i { font-style: normal; font-size: .68rem; color: var(--muted); }
.sc-food .sc-toast { display: none; }
.tab-panel.in .fd-steps span:nth-child(-n+2) i { animation: fdOk .3s calc(.4s + var(--k) * .5s) both; }
@keyframes fdOk { to { background: var(--ok); border-color: var(--ok); } }
.tab-panel.in .fd-steps span:nth-child(3) i { animation: fdNow 1.2s 1.5s ease-in-out infinite both; }
@keyframes fdNow { 0%, 100% { border-color: var(--accent); box-shadow: 0 0 0 0 rgba(0,87,255,.45); } 50% { border-color: var(--accent); box-shadow: 0 0 0 8px rgba(0,87,255,0); } }
.tab-panel.in .fd-steps em::after { animation: shFill 1.2s .4s ease-in-out both; }
.tab-panel.in .fd-map { animation: scIn .8s .3s both; }
.tab-panel.in .fd-order { animation: scUp .5s 1.2s both; }
.tab-panel.in .fd-count { animation: fdCount 5s 1s steps(4, end) both; }
@keyframes fdCount { from { --fdc: 12; } to { --fdc: 8; } }

/* mobile */
@media (max-width: 760px) {
  .sc { height: 400px; padding: 12px; }
  .sh-prod { grid-template-columns: 1fr 1.1fr; gap: 10px; }
  .sh-info b { font-size: 1rem; }
  .sh-drawer { width: 78%; }
  .hl-vitals { grid-template-columns: 1.4fr 1fr; } .hl-vitals > div:nth-child(3) { display: none; }
}

/* reduced motion: show the finished state of every scene */
@media (prefers-reduced-motion: reduce) {
  .sc *, .sc *::before, .sc *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .sc-cur { display: none; }
}

/* clinic: keep the 3 agenda rows inside the frame */
.sc-health .hl-pt { padding: 8px 10px; }
.sc-health .hl-vitals > div { padding: 8px 10px; }
.sc-health .hl-h { margin: 10px 0 5px; }
.sc-health .hl-row { padding: 7px 10px; }
.sc-health .hl-row i { height: 26px; }
.sc-health .sc-toast { bottom: auto; top: 14px; }
.sc-shop .sc-toast { bottom: auto; top: 54px; left: 30%; }
