/* ---------- Fonts ---------- */
@font-face { font-family: "Mobily Text"; src: url("fonts/Mobily_Text_v7-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mobily Text"; src: url("fonts/Mobily_Text_v7-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Mobily Headline"; src: url("fonts/Mobily_Headline_v7-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "SF Arabic Demo"; src: local("SF Arabic"), url("fonts/SF-Arabic.ttf") format("truetype"); font-weight: 1 1000; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-400-ar.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-400-lat.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-500-ar.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-500-lat.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-700-ar.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-700-lat.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --ink: #000050;
  --ink-62: rgba(0, 0, 80, 0.62);
  --ink-50: rgba(0, 0, 80, 0.5);
  --ink-15: rgba(0, 0, 80, 0.15);
  --action: #1061ff;
  --action-tint: rgba(16, 97, 255, 0.08);
  --action-line: rgba(16, 97, 255, 0.35);
  --action-line-soft: rgba(16, 97, 255, 0.28);
  --green-ink: #0f663d;
  --red-ink: #b8262b;
  --blue-ink: #0845cc;

  --font-text: "Mobily Text", "SF Arabic Demo", "Geeza Pro", system-ui, sans-serif;
  --font-head: "Mobily Headline", "Mobily Text", "SF Arabic Demo", system-ui, sans-serif;
  --font-sf: "SF Arabic Demo", "SF Arabic", "Geeza Pro", system-ui, sans-serif;
  --font-taj: "Tajawal", "SF Arabic Demo", system-ui, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --card-w: min(345px, calc(100vw - 32px));
  --z: 1;  /* desktop scale of the cards on this screen (set by app.js) */
  --zc: 1; /* desktop scale of controls, welcome, progress and wave (set by app.js) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #fff; }
body {
  color: var(--ink);
  font-family: var(--font-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
img { display: block; }

/* ---------- App shell: full screen, mobile first ---------- */
.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}
.bg-mobily {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(198.8deg, #fff 13.04%, #fff 32.17%, #f2feff 43.48%, #e6fcfe 56.52%, #cdfafe 69.57%, #abf7fd 82.61%, #7ff1fc 100%);
}

/* Wave: Figma places an 885-tall wave box per screen; content is bottom-anchored, so the wave is too. */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(885px * var(--zc));
  bottom: calc(var(--safe-bottom) + var(--wave-bottom, 21px) * var(--zc));
  /* On short screens keep the wave's centre line below the header (centre sits 465px above the box bottom). */
  bottom: calc(var(--safe-bottom) + min(var(--wave-bottom, 21px) * var(--zc), 100dvh - 465px * var(--zc) - 150px - var(--safe-top) - var(--safe-bottom)));
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transition: bottom 600ms cubic-bezier(.2, .7, .2, 1);
}
.wave .aurora {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2.31%;
  right: -2.31%;
  opacity: 0;
  transform-origin: 50% 47.46%; /* wave centre line: y = 420 of 885 */
  will-change: transform, opacity;
}
.wave .aurora img { width: 100%; height: 100%; }
.wave .wave-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }

/* Header: logos + per-screen slot (welcome text / tour progress) */
.top {
  position: absolute;
  top: var(--safe-top);
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
}
.col { position: relative; max-width: 390px; margin: 0 auto; }
.cobrand {
  position: absolute;
  top: 45px;
  left: 20px;
  right: 20px;
  height: 34px;
  pointer-events: auto;
  cursor: default;
}
.cobrand .mobily { position: absolute; left: 0; top: 0; width: 88.533px; height: 34px; }
.cobrand .at { position: absolute; right: 0; top: 3px; width: 110px; height: 28px; }

/* Desktop: logos move out to the screen edges at a larger size */
.app.desktop .col { max-width: none; }
.app.desktop .cobrand { top: 32px; left: 48px; right: 48px; height: 54.4px; }
.app.desktop .cobrand .mobily { width: 141.65px; height: 54.4px; }
.app.desktop .cobrand .at { top: 4.8px; width: 176px; height: 44.8px; }
.slot > * { pointer-events: auto; }

/* Stage: between the header and the controls; bottom-aligned, scrolls on short screens */
.stage {
  position: absolute;
  /* starts below the header (logos / tour progress / welcome) so scrolled content never runs under it */
  top: calc(var(--safe-top) + var(--stage-abs, 79px));
  bottom: calc(var(--safe-bottom) + 120px * var(--zc));
  left: 0;
  right: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  z-index: 1;
}
.stage::-webkit-scrollbar { display: none; }
.stage.scrolls { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px); mask-image: linear-gradient(to bottom, transparent 0, #000 24px); }
.stage-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 0 0 44px;
  zoom: var(--z);
}
.stage.enter .stage-inner > * { animation: rise 420ms cubic-bezier(.2, .7, .2, 1) both; }
.stage.enter .stage-inner > *:nth-child(2) { animation-delay: 80ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Controls ---------- */
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) / var(--zc));
  height: 120px;
  zoom: var(--zc);
  z-index: 3;
}
.precall-row, .call-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.precall-row { padding-bottom: 16px; }
.call-row { gap: 20px; padding-bottom: 24px; }
.app[data-mode="precall"] .call-row,
.app[data-mode="call"] .precall-row { display: none; }

.start-call {
  position: relative;
  width: 260px;
  height: 64px;
  border-radius: 32px;
  background: var(--action);
  box-shadow: 0 10px 24px rgba(16, 97, 255, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 32px 8px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 26px;
  transition: transform 120ms, filter 150ms;
}
.start-call:active { transform: scale(.97); filter: brightness(.95); }

.zone { width: 92px; height: 96px; display: flex; align-items: center; justify-content: center; }

.end-call {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: #e5484d;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
  filter: drop-shadow(0 8px 10px rgba(229, 72, 77, 0.3));
  display: grid;
  place-items: center;
  transition: transform 120ms, filter 150ms;
}
.end-call:active { transform: scale(.94); filter: drop-shadow(0 8px 10px rgba(229, 72, 77, 0.3)) brightness(.92); }
.phone-down { position: relative; width: 28px; height: 28px; overflow: hidden; display: grid; place-items: center; }
.phone-down img { transform: rotate(135deg); flex: none; }

.ctrl {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(16, 97, 255, 0.12);
  transition: background 160ms, box-shadow 160ms, transform 120ms;
}
.ctrl:active { transform: scale(.96); }
.ctrl.mic { width: 96px; height: 96px; border-radius: 48px; flex: none; }
.ctrl.transcript { width: 64px; height: 64px; border-radius: 32px; }
.icon52 { position: relative; width: 52px; height: 52px; overflow: hidden; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22)); }
.icon52 img { position: absolute; left: 8px; top: 8px; }
.ctrl .off { display: none; }

/* Mic · Muted: navy fill, white mic + slash */
.ctrl.mic[aria-pressed="true"] {
  background: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 8px 22px rgba(0, 0, 79, 0.28);
}
.ctrl.mic[aria-pressed="true"] .icon52 { filter: none; }
.ctrl.mic[aria-pressed="true"] .on { display: none; }
.ctrl.mic[aria-pressed="true"] .off { display: block; }

/* Transcript · Off (hidden) shows the slash icon; On is the plain glass button */
.ctrl.transcript[aria-pressed="false"] .on { display: none; }
.ctrl.transcript[aria-pressed="false"] .off { display: block; }

/* ---------- Welcome (01) ---------- */
.welcome {
  position: absolute;
  top: var(--welcome-top, 123px);
  left: 50%;
  width: 320px;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%) scale(var(--zc));
  transform-origin: 50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.welcome h1 { font-family: var(--font-head); font-weight: 700; font-size: 26px; line-height: 36px; white-space: nowrap; }
.welcome p { font-size: 15px; line-height: 23px; color: rgba(0, 0, 80, 0.72); }
.starters { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.starter {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(16, 97, 255, 0.14);
  padding: 9px 20px 15px;
  font-size: 15px;
  line-height: 22px;
  white-space: nowrap;
  transition: transform 120ms, background 150ms;
}
.starter:active { transform: scale(.97); background: rgba(255, 255, 255, 0.75); }
.privacy { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: rgba(0, 0, 80, 0.7); white-space: nowrap; }

/* ---------- Tour progress ---------- */
.tour-progress {
  position: absolute;
  top: var(--progress-top, 91px);
  left: 50%;
  transform: translateX(-50%) scale(var(--zc));
  transform-origin: 50% 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 10px 12px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
}
.tour-progress .steps { display: flex; gap: 4px; }
.tour-progress .steps i { display: block; width: 14px; height: 4px; border-radius: 2px; background: rgba(16, 97, 255, 0.18); transition: width 300ms, background 300ms; }
.tour-progress .steps i.done { background: var(--action); }
.tour-progress .steps i.now { width: 22px; background: var(--action); }
.tour-progress .label { font-size: 12px; line-height: 16px; color: rgba(0, 0, 80, 0.8); }
.tour-progress .count { font-family: var(--font-head); font-weight: 700; font-size: 12px; line-height: 16px; color: var(--action); }

/* ---------- Event cards ---------- */
.bubble, .card {
  width: var(--card-w);
  flex: none;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px rgba(16, 97, 255, 0.14);
  overflow: hidden;
  text-align: right;
}
.bubble { border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 21px; }
.card { border-radius: 24px; padding: 16px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.card.tight { gap: 8px; }
.card.center { align-items: center; text-align: center; }

.t-head { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 22px; }
.t-title { font-family: var(--font-sf); font-weight: 711; font-size: 18px; line-height: 32px; }
.t-body { font-size: 14px; line-height: 21px; }
.t-label { font-weight: 700; font-size: 14px; line-height: 20px; }
.t-cap { font-family: var(--font-sf); font-size: 12px; line-height: 16px; color: var(--ink-62); }
.t-cap-50 { font-family: var(--font-sf); font-size: 12px; line-height: 16px; color: var(--ink-50); }
.t-cap-m { font-size: 12px; line-height: 16px; color: var(--ink-62); }

.divider { height: 1px; background: var(--ink-15); width: 100%; }

.person { display: flex; align-items: center; gap: 12px; height: 72px; direction: rtl; }
.person.exercise { height: 89px; }
.person .info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.avatar { width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, 0.08); object-fit: cover; flex-shrink: 0; }

.chips { display: flex; gap: 8px; direction: rtl; }
.chip {
  background: #fff;
  border: 1px solid var(--action-line-soft);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 80, 0.08);
  padding: 10px 16px;
  font-size: 14px;
  line-height: 21px;
  white-space: nowrap;
  transition: background 150ms, border-color 150ms, box-shadow 150ms, transform 120ms;
}
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--action-tint); border-color: var(--action-line); box-shadow: none; }
.chip.sm {
  padding: 6px 12px;
  font-family: var(--font-sf);
  font-size: 12px;
  line-height: 16px;
  font-weight: 711;
  background: var(--action-tint);
  border-color: var(--action-line);
  box-shadow: none;
  cursor: default;
}

.btn {
  height: 48px;
  width: 100%;
  border-radius: 14px;
  background: var(--action);
  color: #fff;
  font-family: var(--font-sf);
  font-weight: 622;
  font-size: 16px;
  line-height: 24px;
  transition: filter 150ms, transform 120ms;
}
.btn:active { transform: scale(.985); filter: brightness(.95); }

.steps-list { display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; align-items: center; gap: 12px; direction: rtl; }
.step p { flex: 1; font-size: 14px; line-height: 21px; }
.badge {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 999px;
  background: var(--action-tint); border: 1px solid var(--action-line);
  display: grid; place-items: center;
  color: var(--action); font-family: var(--font-sf); font-weight: 711; font-size: 12px; line-height: 16px;
  transition: background 200ms, color 200ms, transform 200ms;
}
.step.active .badge { background: var(--action); color: #fff; transform: scale(1.1); }
.step.active p { font-weight: 700; }

.check-circle, .icon-circle {
  border-radius: 999px; background: var(--action-tint); border: 1px solid var(--action-line);
  display: grid; place-items: center; flex-shrink: 0;
}
.check-circle { width: 48px; height: 48px; animation: pop 500ms cubic-bezier(.3, 1.6, .5, 1) both 150ms; }
.icon-circle { width: 44px; height: 44px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.details { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; white-space: nowrap; direction: rtl; }
.row .v { font-size: 14px; line-height: 21px; }
.reminder {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px; background: var(--action-tint); border: 1px solid var(--action-line);
  direction: rtl;
}
.item {
  display: flex; align-items: center; gap: 12px; height: 74px; padding: 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.56); border: 1px solid var(--action-line-soft); box-shadow: 0 1px 3px rgba(0, 0, 80, 0.08);
  direction: rtl;
}
.item .info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.item[aria-pressed="true"] { background: var(--action-tint); border-color: var(--action-line); }   /* picked by voice */
.thumb { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.spread { display: flex; align-items: center; justify-content: space-between; direction: rtl; }

.moods { display: flex; justify-content: space-between; align-items: flex-start; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 14px; transition: transform 160ms; }
.mood .face { position: relative; width: 48px; height: 48px; transition: transform 200ms; }
.mood .face img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mood .face.great img { inset: -11.25% -17.5% -23.75% -17.5%; width: auto; height: auto; }
.mood[data-key="good"] .face { filter: drop-shadow(0 3px 4.2px rgba(153, 204, 102, .35)); }
.mood[data-key="okay"] .face { filter: drop-shadow(0 3px 4.2px rgba(229, 191, 89, .35)); }
.mood[data-key="low"] .face { filter: drop-shadow(0 3px 4.2px rgba(255, 178, 102, .35)); }
.mood[data-key="bad"] .face { filter: drop-shadow(0 3px 4.2px rgba(255, 140, 115, .35)); }
.mood[aria-pressed="true"] .face { transform: scale(1.14); }
.mood[aria-pressed="true"] .t-cap { color: var(--ink); font-weight: 700; }
.mood-summary { display: flex; align-items: center; gap: 8px; direction: rtl; }
.mood-summary .face-sm { width: 34px; height: 34px; filter: drop-shadow(0 2.1px 3px rgba(229, 191, 89, .35)); }

.turn { display: flex; flex-direction: column; gap: 2px; }
.turn .who { font-family: var(--font-sf); font-size: 12px; line-height: 16px; }
.turn .who.salam { color: var(--action); }
.turn .who.you { color: var(--ink-50); }
.turn .said { font-size: 14px; line-height: 21px; }
.dots { display: flex; justify-content: flex-end; gap: 4px; direction: ltr; }
.dots img { width: 5px; height: 5px; animation: blink 1.2s ease-in-out infinite; }
.dots img:nth-child(2) { animation-delay: .2s; }
.dots img:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Business tour ---------- */
.tbubble, .tcard {
  width: var(--card-w);
  flex: none;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 16px rgba(16, 97, 255, 0.14);
  text-align: right;
}
.tbubble { border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 21px; }
.tbubble.p9 { padding: 9px 16px 15px; }
.tcard { border-radius: 24px; padding: 18px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.tcard.p16 { padding: 16px; }

[dir="ltr"] { direction: ltr; }
.r { display: flex; align-items: center; }
.r.end { justify-content: flex-end; }
.r.between { justify-content: space-between; }
.r.g6 { gap: 6px; } .r.g8 { gap: 8px; } .r.g10 { gap: 10px; } .r.g12 { gap: 12px; } .r.g14 { gap: 14px; } .r.g4 { gap: 4px; }
.r.start { align-items: flex-start; }
.r.base { align-items: baseline; }
.f1 { flex: 1 1 0; min-width: 1px; }
.titles { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; text-align: right; }
.nowrap { white-space: nowrap; }
.rtl { direction: rtl; }

.h15 { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 22px; }
.h16 { font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 24px; }
.h17 { font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 26px; }
.h13 { font-family: var(--font-head); font-weight: 700; font-size: 13px; line-height: 20px; }
.h12 { font-family: var(--font-head); font-weight: 700; font-size: 12px; line-height: 16px; }
.h11 { font-family: var(--font-head); font-weight: 700; font-size: 11px; line-height: 14px; }
.sub12 { font-size: 12px; line-height: 16px; color: rgba(0, 0, 80, 0.6); }
.tx13 { font-size: 13px; line-height: 20px; }
.tx12 { font-size: 12px; line-height: 16px; }
.tx11 { font-size: 11px; line-height: 14px; }

.ticon { width: 44px; height: 44px; border-radius: 999px; background: var(--action-tint); display: grid; place-items: center; flex: none; }
.tdivider { height: 1px; background: rgba(0, 0, 80, 0.12); }
.tspacer { height: 2px; width: 10px; }

.tchip {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff;
  border: 1px solid rgba(16, 97, 255, 0.22);
  border-radius: 999px;
  padding: 6px 14px 12px;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
  transition: background 150ms, transform 120ms;
}
.tchip.fill { flex: 1 1 0; min-width: 1px; padding-left: 6px; padding-right: 6px; }
.tchip[aria-pressed="true"] { background: var(--action-tint); border: 1.5px solid rgba(16, 97, 255, 0.4); }
.tchip .tick { display: none; width: 14px; height: 14px; }
.tchip.multi[aria-pressed="true"] .tick { display: block; }
.tchip:active { transform: scale(.97); }

.tbtn {
  height: 48px; width: 100%; border-radius: 14px; background: var(--action); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding-bottom: 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 22px; white-space: nowrap;
  transition: filter 150ms, transform 120ms, opacity 150ms;
}
.tbtn:active { transform: scale(.985); filter: brightness(.95); }
.tbtn[aria-disabled="true"] { opacity: .45; }

.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; white-space: nowrap; flex: none; }
.tag.s12 { padding: 1px 10px 7px; font-size: 12px; line-height: 16px; }
.tag.s11 { padding: 2px 10px 6px; font-size: 11px; line-height: 14px; }
.tag.s11n { padding: 2px 9px 6px; font-size: 11px; line-height: 14px; }
.tag.s11t { padding: 1px 8px 5px; font-size: 11px; line-height: 14px; }
.tag.blue { background: var(--action-tint); color: var(--blue-ink); }
.tag.blue2 { background: rgba(16, 97, 255, 0.1); color: var(--blue-ink); }
.tag.blue3 { background: rgba(16, 97, 255, 0.12); color: var(--blue-ink); }
.tag.red { background: rgba(229, 84, 84, 0.1); color: var(--red-ink); }
.tag.green { background: rgba(33, 140, 92, 0.12); color: var(--green-ink); }
.tag.green2 { background: rgba(92, 189, 140, 0.16); color: var(--green-ink); }
.tag.bold { font-family: var(--font-head); font-weight: 700; }

.pill { background: #fff; border: 1px solid rgba(16, 97, 255, 0.28); border-radius: 999px; padding: 3px 10px 9px; font-size: 12px; line-height: 16px; white-space: nowrap; flex: none; }
.pill.fmt { border-color: rgba(16, 97, 255, 0.18); padding: 3px 12px 9px; color: rgba(0, 0, 80, 0.85); }
.pill.fact { background: rgba(255, 255, 255, 0.9); border-color: rgba(16, 97, 255, 0.14); padding: 3px 9px 7px; font-size: 11px; line-height: 14px; color: rgba(0, 0, 80, 0.85); }
.pill.kpi { background: rgba(92, 189, 140, 0.14); border: 0; padding: 2px 10px 8px; color: var(--green-ink); }

/* T03 */
.map-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.challenge { background: #fff2f2; border: 1px solid rgba(217, 77, 77, 0.55); border-radius: 12px; padding: 5px 12px 11px; font-family: var(--font-head); font-weight: 700; font-size: 13px; line-height: 18px; white-space: nowrap; }
.insight { background: rgba(16, 97, 255, 0.06); border-radius: 14px; padding: 10px 12px; gap: 10px; align-items: flex-start; }
.insight p { font-size: 12px; line-height: 18px; color: rgba(0, 0, 80, 0.8); text-align: right; direction: rtl; }

/* T04 services */
.tabs { display: flex; gap: 10px; }
.tab {
  flex: 1 1 0; min-width: 1px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 2px 12px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(16, 97, 255, 0.12);
  font-size: 11px; line-height: 14px; color: rgba(0, 0, 80, 0.7); white-space: nowrap;
  transition: background 200ms, box-shadow 200ms, color 200ms;
}
.tab img { width: 20px; height: 20px; }
.tab .w { display: none; }
.tab[aria-selected="true"] { background: var(--action); border-color: transparent; box-shadow: 0 6px 7px rgba(16, 97, 255, 0.28); color: #fff; font-family: var(--font-head); font-weight: 700; }
.tab[aria-selected="true"] .b { display: none; }
.tab[aria-selected="true"] .w { display: block; }
.featured {
  background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(16, 97, 255, 0.12); border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 79, 0.05);
  padding: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.featured .desc { font-size: 13px; line-height: 20px; color: rgba(0, 0, 80, 0.72); text-align: right; width: 100%; direction: rtl; }
.featured .title { width: 100%; text-align: right; }
.features { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.feature { display: flex; gap: 8px; align-items: center; justify-content: flex-end; width: 100%; }
.feature p { font-size: 13px; line-height: 20px; white-space: nowrap; direction: rtl; }
.feature img { width: 18px; height: 18px; flex: none; }
.chat-user { background: var(--action); color: #fff; border-radius: 14px 14px 14px 4px; padding: 5px 12px 11px; font-size: 12px; line-height: 18px; white-space: nowrap; direction: rtl; }
.chat-salam { background: #fff; border: 1px solid rgba(16, 97, 255, 0.15); border-radius: 14px 14px 4px 14px; padding: 8px 12px; font-size: 12px; line-height: 18px; width: 226px; text-align: right; direction: rtl; }
.dash-img { position: relative; width: 100%; height: 148px; border: 1px solid rgba(0, 0, 80, 0.1); border-radius: 12px; box-shadow: 0 6px 14px rgba(0, 0, 80, 0.1); overflow: hidden; }
.dash-img img { position: absolute; height: 395.15%; left: -23.08%; top: -11.65%; width: 123.08%; max-width: none; }
.logo-slot { background: #fff; border: 1.2px dashed rgba(16, 97, 255, 0.35); border-radius: 10px; padding: 3px 12px 9px; font-family: var(--font-head); font-weight: 700; font-size: 12px; line-height: 16px; color: rgba(0, 0, 80, 0.8); white-space: nowrap; }

/* T05 dashboard */
.tile { flex: 1 1 0; min-width: 1px; background: rgba(92, 189, 140, 0.14); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.delta { display: flex; align-items: center; gap: 3px; background: rgba(92, 189, 140, 0.18); border-radius: 6px; padding: 0 6px 4px; }
.bigval { font-family: var(--font-head); font-weight: 700; font-size: 26px; line-height: 32px; }
.of10 { font-size: 12px; line-height: 16px; color: rgba(0, 0, 80, 0.58); }
.metric { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.metric .lab { display: flex; justify-content: space-between; align-items: center; font-size: 11px; line-height: 14px; white-space: nowrap; }
.bar { position: relative; height: 6px; border-radius: 3px; background: rgba(0, 0, 80, 0.06); overflow: hidden; }
.bar i { position: absolute; right: 0; top: 0; height: 6px; border-radius: 3px; animation: grow 900ms cubic-bezier(.2, .7, .2, 1) both 250ms; transform-origin: right; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
.enps { background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(16, 97, 255, 0.14); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.enps-bar { display: flex; gap: 4px; }
.enps-bar i { height: 8px; border-radius: 4px; min-width: 1px; }

/* T06 privacy */
.example { flex: 1 1 0; min-width: 1px; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.example.hidden-res { background: rgba(0, 0, 80, 0.05); border: 1px solid rgba(0, 0, 80, 0.12); }
.example.shown-res { background: rgba(92, 189, 140, 0.12); border: 1px solid rgba(92, 189, 140, 0.35); }
.people { display: flex; gap: 1px; justify-content: flex-end; width: 100%; }
.people img { width: 18px; height: 18px; }
.seelist { flex: 1 1 0; min-width: 1px; background: rgba(255, 255, 255, 0.85); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.seelist p.li { font-size: 11px; line-height: 16px; color: rgba(0, 0, 80, 0.8); width: 100%; text-align: right; direction: rtl; }

/* T07 interventions */
.intervention {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 10px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(16, 97, 255, 0.22);
  transition: background 200ms, border-color 200ms;
  width: 100%; text-align: right;
}
.intervention .name { font-family: var(--font-head); font-weight: 700; font-size: 13px; line-height: 19px; text-align: right; direction: rtl; transition: color 200ms; }
.intervention[aria-pressed="false"] { background: rgba(255, 255, 255, 0.6); border-color: rgba(16, 97, 255, 0.1); }
.intervention[aria-pressed="false"] .name { color: rgba(0, 0, 80, 0.6); }
.intervention .tg { width: 36px; height: 22px; flex: none; position: relative; }
.intervention .tg img { position: absolute; inset: 0; transition: opacity 180ms; }
.intervention[aria-pressed="true"] .tg .off-i,
.intervention[aria-pressed="false"] .tg .on-i { opacity: 0; }

/* T08 choose path */
.option {
  width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding: 16px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(16, 97, 255, 0.16);
  text-align: right;
  transition: background 200ms, border-color 200ms;
}
.option[aria-checked="true"] { background: rgba(16, 97, 255, 0.07); border: 2px solid rgba(16, 97, 255, 0.6); }
.option .radio { width: 22px; height: 22px; flex: none; position: relative; }
.option .radio img { position: absolute; inset: 0; }
.option[aria-checked="true"] .radio .off-i, .option[aria-checked="false"] .radio .on-i { display: none; }
.opt-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--action-tint); }
.opt-icon.solid { background: var(--action); }
.option .d { font-size: 12px; line-height: 18px; color: rgba(0, 0, 80, 0.65); }
.tag .live { position: relative; width: 6px; height: 6px; flex: none; }
.tag .live img { position: absolute; inset: -83.33%; width: auto; height: auto; }

/* T09 timeline */
.timeline { display: flex; flex-direction: column; }
.tl-step { display: flex; gap: 12px; align-items: flex-start; }
.tl-step .text { flex: 1 1 0; min-width: 1px; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; padding-bottom: 14px; text-align: right; }
.tl-step:last-child .text { padding-bottom: 0; }
.tl-step .t { font-family: var(--font-head); font-weight: 700; font-size: 13px; line-height: 18px; width: 100%; }
.tl-step .t.now { color: var(--action); }
.tl-step .s { font-size: 12px; line-height: 17px; color: rgba(0, 0, 80, 0.7); width: 100%; }
.rail { display: flex; flex-direction: column; align-items: center; align-self: stretch; flex: none; }
.rail img { width: 14px; height: 14px; }
.rail i { flex: 1 1 0; min-height: 1px; width: 2px; background: rgba(16, 97, 255, 0.22); }

/* T10 ticket */
.ticket {
  width: var(--card-w); flex: none; border-radius: 24px;
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.92); border: 1px solid #fff;
  box-shadow: 0 16px 18px rgba(16, 97, 255, 0.18);
  display: flex; flex-direction: column; text-align: right;
}
.ticket .tt { background: linear-gradient(to bottom, rgba(16, 97, 255, 0.1), rgba(255, 255, 255, 0)); border-radius: 24px 24px 0 0; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.fact-col { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; white-space: nowrap; }
.fact-col .k { font-size: 11px; line-height: 14px; color: rgba(0, 0, 80, 0.57); }
.fact-col .v { font-family: var(--font-head); font-weight: 700; font-size: 13px; line-height: 18px; }
.perf { position: relative; height: 20px; padding: 0 18px; display: flex; align-items: center; }
.perf .dash { flex: 1 1 0; min-width: 1px; height: 0; position: relative; }
.perf .dash img { position: absolute; left: 0; right: 0; top: -1.5px; width: 100%; height: 1.5px; }
.perf .notch { position: absolute; top: 0; width: 20px; height: 20px; }
.perf .notch.l { left: -10px; }
.perf .notch.r { right: -12px; }
.ticket .tb { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.qr { width: 96px; height: 96px; background: #fff; border: 1px solid rgba(16, 97, 255, 0.2); border-radius: 12px; display: grid; place-items: center; flex: none; }
.or-line { flex: 1 1 0; height: 1px; background: rgba(0, 0, 80, 0.18); }
.booth { background: rgba(92, 189, 140, 0.12); border: 1px solid rgba(92, 189, 140, 0.35); border-radius: 14px; padding: 10px 12px; gap: 10px; }
.booth .pin { width: 36px; height: 36px; border-radius: 999px; background: #5cbd8c; display: grid; place-items: center; flex: none; }

/* ---------- Table card chip ---------- */
.tcchip {
  width: var(--card-w); flex: none;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px; border-radius: 18px;
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(15, 97, 255, 0.1);
  font-family: var(--font-taj);
}
.took-it {
  height: 34px; padding: 0 14px; border-radius: 999px; flex: none;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  background: #fff; border: 1px solid #dae0e7;
  font-family: var(--font-taj); font-weight: 500; font-size: 13px; line-height: 1.3; color: #111827; white-space: nowrap;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.took-it .ck { display: none; position: relative; width: 14px; height: 14px; overflow: hidden; }
.took-it .ck span { position: absolute; inset: 31.25% 20.83% 29.17% 20.83%; }
.took-it .ck img { position: absolute; inset: -23.46% -15.92%; width: auto; height: auto; }
.tcchip.confirmed .took-it { background: #e7f4ec; border-color: #2fa46f; color: #1b7a4e; font-weight: 700; }
.tcchip.confirmed .took-it .ck { display: block; }
.tcchip .txt { flex: 1 1 0; min-width: 1px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; line-height: 1.3; text-align: right; direction: rtl; }
.tcchip .ttl { font-weight: 700; font-size: 16px; color: #111827; }
.tcchip .dsc { font-weight: 400; font-size: 13px; color: #4a5565; }
.cname { display: flex; gap: 5px; align-items: center; justify-content: flex-end; direction: ltr; }
.cname b { font-weight: 700; font-size: 14px; color: #111827; white-space: nowrap; direction: rtl; }
.cname i { width: 10px; height: 14px; border-radius: 2.5px; }
.illus { position: relative; width: 52px; height: 56px; flex: none; }
.illus.duo { width: 64px; }
.illus .slotc { position: absolute; display: flex; align-items: center; justify-content: center; }
.illus .card-svg { position: relative; flex: none; }
.illus .card-svg img { position: absolute; max-width: none; }

/* ---------- Toast + presenter sheet ---------- */
.toast {
  position: absolute; left: 50%; top: calc(var(--safe-top) + 97px); z-index: 5;
  transform: translate(-50%, -10px); background: var(--ink); color: #fff;
  font-size: 13px; line-height: 20px; padding: 8px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sheet { position: absolute; inset: 0; z-index: 10; background: rgba(0, 0, 40, 0.35); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-panel {
  width: 100%; max-width: 480px; max-height: 80%; overflow: auto;
  background: #fff; border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + var(--safe-bottom));
  font-family: system-ui, -apple-system, sans-serif; color: #0b1630;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-head button { width: 32px; height: 32px; border-radius: 16px; background: #f1f4f9; }
.sheet h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #8b96ad; margin: 12px 0 6px; }
.sheet .item-btn { display: flex; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; font-size: 14px; }
.sheet .item-btn span { color: #9aa6bf; width: 34px; font-variant-numeric: tabular-nums; }
.sheet .item-btn[aria-current="true"] { background: rgba(16, 97, 255, 0.08); color: var(--action); }
.sheet-hint { font-size: 12px; color: #8b96ad; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══════════ Salam live call (additions on top of the Figma design; cards.js / app.js) ═══════════ */

/* Welcome (01): the starters are examples of what to say, not buttons */
.starter.hint { cursor: default; pointer-events: none; }

/* Mic, push-to-talk (SALAM_VAD=0): held = talking, blue with the white mic */
.ctrl.mic .talk { display: none; }
.ctrl.mic.talking { background: var(--action); border-color: transparent; box-shadow: 0 0 0 8px rgba(16, 97, 255, .14), 0 8px 22px rgba(16, 97, 255, .35); }
.ctrl.mic.talking .icon52 img { display: none; }
.ctrl.mic.talking .icon52 img.talk { display: block; }
/* voice tone (emotion2vec) while he talks */
body[data-tone="angry"]   .ctrl.mic.talking { box-shadow: 0 0 30px rgba(255, 90, 60, .55); }
body[data-tone="sad"]     .ctrl.mic.talking { box-shadow: 0 0 30px rgba(110, 120, 255, .55); }
body[data-tone="fearful"] .ctrl.mic.talking { box-shadow: 0 0 30px rgba(170, 110, 255, .55); }
body[data-tone="happy"]   .ctrl.mic.talking { box-shadow: 0 0 30px rgba(255, 190, 60, .6); }
.app[data-ready="0"] .ctrl.mic { opacity: .55; }
.end-call.confirm { filter: brightness(.85); }

/* Cards: morphed in place (no scrolling inside, except the article) */
.chips { flex-wrap: wrap; }
.chip:disabled { opacity: .38; text-decoration: line-through; cursor: default; box-shadow: none; }
.btn:disabled, .tbtn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.card.reader { max-height: min(470px, 62dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
button.item { width: 100%; text-align: right; transition: border-color 150ms, transform 120ms; }
button.item:active { transform: scale(.985); }
.reader .body { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 23px; }
.reader .body h4 { font-family: var(--font-head); font-size: 15px; line-height: 22px; margin-top: 4px; }
.reader .body ul { padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
.reader .body a { color: var(--action); text-decoration: none; }
.reader .body .src, .reader .body .src ~ * { font-size: 12px; line-height: 18px; color: var(--ink-50); }
.faces { display: flex; gap: 4px; justify-content: space-between; direction: rtl; }
.face-pick { width: 27px; height: 27px; border-radius: 999px; opacity: .55; transition: opacity .2s, box-shadow .2s, transform .2s; }
.face-pick img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.face-pick[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--action); transform: scale(1.06); }

/* Live transcript (the transcript button): the last turns, newest at the bottom */
.transcript-card { gap: 10px; }
.transcript-card .said { white-space: pre-line; }

/* Errors may wrap */
.toast { max-width: calc(100vw - 32px); white-space: normal; text-align: center; }
