/* ============================================
   BÜRO-LIVE — Cartoon Office Scene
   ============================================ */

body.preview {
  background: #F6F7FB;
  overflow: hidden;
  height: 100vh;
}

.prev-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: 100vh;
}
.prev-main { display: flex; flex-direction: column; min-width: 0; }

/* ===== TOP CONTROL BAR (under topbar) ===== */
.live-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--finora-border);
  flex-wrap: wrap;
}
.live-title { display: flex; align-items: center; gap: 12px; }
.live-title h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  letter-spacing: .04em;
}
.live-pill::before {
  content: ""; width: 7px; height: 7px;
  background: #DC2626; border-radius: 50%;
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(220,38,38,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}
.live-tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 3px;
}
.live-tab {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--finora-text-soft);
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.live-tab.active {
  background: #fff;
  color: var(--finora-blue);
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.speed {
  display: flex; gap: 4px;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 3px;
}
.speed button {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--finora-text-soft);
  border-radius: 7px;
}
.speed button.active { background:#0F172A; color:#fff; }
.live-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ===== STAGE ===== */
.stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #BFE6FF 0%, #DCEEFF 28%, #F1F6FB 50%);
}

/* horizontal slide layer */
.scene-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.scene {
  position: relative;
  width: 3200px;
  height: 1400px;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

/* ===== SLIDE CONTROLS ===== */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--finora-border);
  display: grid; place-items: center;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(15,23,42,.14);
  cursor: pointer;
  color: var(--finora-text);
  transition: background .12s, transform .12s, box-shadow .12s;
}
.slide-btn:hover { background: var(--finora-blue); color: #fff; }
.slide-btn:active { transform: translateY(-50%) scale(.95); }
.slide-btn svg { width: 22px; height: 22px; }
.slide-btn.l { left: 16px; }
.slide-btn.r { right: 16px; }
.slide-btn[disabled] {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

/* slide dots */
.slide-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 18;
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid var(--finora-border);
}
.slide-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #CBD5E1;
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.slide-dot.active { background: var(--finora-blue); transform: scale(1.3); }

/* ===== SCENE LAYERS ===== */
.sun {
  position: absolute;
  top: 30px; left: 8%;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, #FDE68A 0%, #FBBF24 70%, transparent 100%);
  box-shadow: 0 0 60px rgba(251,191,36,.40);
  animation: sun-bob 6s ease-in-out infinite;
}
@keyframes sun-bob { 50% { transform: translateY(-6px); } }

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 100px;
  opacity: .85;
  filter: drop-shadow(0 4px 12px rgba(15,23,42,.08));
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud.c1 { top: 50px; left: 5%; width: 90px; height: 26px; animation: drift 60s linear infinite; }
.cloud.c1::before { width: 40px; height: 40px; top: -18px; left: 14px; }
.cloud.c1::after  { width: 30px; height: 30px; top: -12px; left: 48px; }
.cloud.c2 { top: 90px; left: 25%; width: 70px; height: 22px; animation: drift 80s linear infinite; }
.cloud.c2::before { width: 32px; height: 32px; top: -14px; left: 10px; }
.cloud.c2::after  { width: 24px; height: 24px; top: -10px; left: 36px; }
.cloud.c3 { top: 40px; left: 50%; width: 60px; height: 20px; animation: drift 70s linear infinite reverse; }
.cloud.c3::before { width: 26px; height: 26px; top: -12px; left: 10px; }
.cloud.c3::after  { width: 22px; height: 22px; top: -10px; left: 30px; }
.cloud.c4 { top: 70px; left: 72%; width: 80px; height: 24px; animation: drift 90s linear infinite reverse; }
.cloud.c4::before { width: 36px; height: 36px; top: -16px; left: 12px; }
.cloud.c4::after  { width: 28px; height: 28px; top: -12px; left: 42px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(80px); } }

.window-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 220px;
  pointer-events: none;
}
.window-strip::before {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(180deg, #B58863, #8B5E3C);
  box-shadow: 0 4px 0 #6B4226, 0 10px 24px rgba(0,0,0,.10);
}

.floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 58%;
  background:
    linear-gradient(180deg, #FAE5C9 0%, #F0D2A6 60%, #E0BC85 100%);
}
.floor::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(180deg,
      rgba(120,80,40,.10) 0 1px,
      transparent 1px 64px),
    repeating-linear-gradient(90deg,
      rgba(120,80,40,.06) 0 1px,
      transparent 1px 92px);
  opacity: .55;
}

.wall {
  position: absolute;
  top: 220px; left: 0; right: 0;
  height: calc(42% - 220px + 100px);
  background: linear-gradient(180deg, #F2EAD8 0%, #EADBC0 100%);
  border-bottom: 6px solid #C9A97A;
}

/* poster on wall */
.poster {
  position: absolute;
  top: 240px;
  width: 80px;
  height: 100px;
  border-radius: 6px;
  border: 4px solid #6B4226;
  background: linear-gradient(180deg, #EEF2FF, #DEE6FF);
  box-shadow: 0 4px 10px rgba(0,0,0,.10);
  display: grid; place-items: center;
}
.poster .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3D63F5, #5B7CFF);
  display: grid; place-items: center;
  color: white;
  box-shadow: 0 4px 8px rgba(61,99,245,.40);
}
.poster .ic svg { width: 18px; height: 18px; }

/* ===== WORKSTATION ===== */
.workstation {
  position: absolute;
  width: 220px;
  text-align: center;
  z-index: 4;
}

.desk {
  width: 200px; height: 70px;
  background: linear-gradient(180deg, #6B4226 0%, #5A3620 100%);
  border-radius: 8px 8px 12px 12px;
  margin: 0 auto;
  position: relative;
  box-shadow:
    0 12px 0 -2px #432314,
    0 26px 30px -10px rgba(0,0,0,.30);
}
.desk::before {
  content: "";
  position: absolute;
  top: 3px; left: 6px; right: 6px;
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  border-radius: 6px;
}

.monitor {
  width: 78px; height: 50px;
  background: #1B1B2A;
  border: 3px solid #2A2A3F;
  border-radius: 6px;
  position: absolute;
  top: -42px;
  left: 50%;
  transform: translateX(-50%);
  display: grid; place-items: center;
}
.monitor::after {
  content: "";
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 6px;
  background: #2A2A3F;
  border-radius: 0 0 6px 6px;
}
.monitor .screen {
  width: 64px; height: 38px;
  border-radius: 3px;
  background: linear-gradient(135deg, #3D63F5, #5B7CFF);
  display: grid; place-items: center;
  color: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}
.monitor.cyan  .screen { background: linear-gradient(135deg, #06B6D4, #0EA5E9); }
.monitor.green .screen { background: linear-gradient(135deg, #10B981, #22C55E); }
.monitor.purple .screen{ background: linear-gradient(135deg, #8B5CF6, #A855F7); }
.monitor.amber .screen { background: linear-gradient(135deg, #F59E0B, #FBBF24); color:#7C2D12; }
.monitor.pink  .screen { background: linear-gradient(135deg, #EC4899, #F472B6); }

/* desk plate (role) */
.desk-plate {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1.5px solid var(--finora-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--finora-text);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15,23,42,.10);
}
.desk-plate .role-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

/* name tag (editable) above character */
.name-tag {
  position: absolute;
  bottom: 115px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #EEF2FF, #FFFFFF);
  border: 1.5px solid var(--finora-blue);
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--finora-blue);
  white-space: nowrap;
  cursor: text;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(61,99,245,.15);
  transition: background .12s, transform .12s;
}
.name-tag:hover { background: var(--finora-blue); color: #fff; }
.name-tag.editing {
  background: #fff;
  outline: 2px solid var(--finora-blue);
  outline-offset: 1px;
}
.name-tag .edit-ico {
  display: inline-block;
  margin-left: 5px;
  opacity: .5;
  vertical-align: middle;
}
.name-tag .edit-ico svg { width: 9px; height: 9px; }

/* plant decoration */
.plant {
  position: absolute;
  bottom: 12px; right: 8px;
  width: 16px; height: 22px;
}
.plant .pot {
  position: absolute; bottom: 0; left: 0;
  width: 16px; height: 10px;
  background: #C2410C;
  border-radius: 2px 2px 4px 4px;
}
.plant .leaf {
  position: absolute; bottom: 8px; left: 50%;
  width: 8px; height: 14px;
  background: #22C55E;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform-origin: bottom center;
}
.plant .leaf.a { transform: translateX(-50%) rotate(-25deg); }
.plant .leaf.b { transform: translateX(-50%) rotate(0deg);   background:#16A34A; }
.plant .leaf.c { transform: translateX(-50%) rotate(25deg); }

/* ===== CHARACTER ===== */
.character {
  position: absolute;
  width: 70px;
  height: 100px;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

/* combined idle: bob + slight sway */
.character .body {
  position: absolute; inset: 0;
  animation: idle-bob 3.4s ease-in-out infinite, idle-sway 5s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes idle-bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes idle-sway { 0%,100% { rotate: -1deg; } 50% { rotate: 1deg; } }

/* shadow */
.character::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  width: 50px; height: 8px;
  background: radial-gradient(ellipse, rgba(0,0,0,.25), transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

/* head */
.character .head {
  position: absolute;
  width: 42px; height: 44px;
  border-radius: 48% 48% 46% 46% / 50% 50% 54% 54%;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  background: #FCD7AA;
  z-index: 3;
  box-shadow:
    inset -3px -3px 0 rgba(0,0,0,.06);
}
.character .head.skin-b { background: #D4A26B; }
.character .head.skin-c { background: #8B5A3B; }
.character .head.skin-d { background: #F2C9A1; }
.character .head.skin-e { background: #E5B996; }

/* ears */
.character .ear {
  position: absolute;
  width: 8px; height: 10px;
  border-radius: 50%;
  background: inherit;
  top: 18px;
  z-index: 2;
}
.character .ear.l { left: -3px; }
.character .ear.r { right: -3px; }

/* eye whites + pupils */
.character .eye {
  position: absolute;
  top: 18px;
  width: 8px; height: 9px;
  background: #fff;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.10);
}
.character .eye.l { left: 9px; }
.character .eye.r { right: 9px; }
.character .eye::before {
  content: "";
  position: absolute;
  width: 4px; height: 5px;
  background: #1F2937;
  border-radius: 50%;
  top: 2px; left: 2px;
  animation: blink 5s ease-in-out infinite;
}
.character .eye.r::before { left: 2px; }
@keyframes blink {
  0%, 92%, 96%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(.1); }
}

/* eyebrows */
.character .brow {
  position: absolute;
  width: 7px; height: 2px;
  background: #1F2937;
  border-radius: 4px;
  top: 13px;
}
.character .brow.l { left: 9px; transform: rotate(-4deg); }
.character .brow.r { right: 9px; transform: rotate(4deg); }

/* smile */
.character .smile {
  position: absolute;
  width: 12px; height: 6px;
  border-bottom: 2px solid #7C2D12;
  border-radius: 0 0 12px 12px;
  left: 50%; top: 28px;
  transform: translateX(-50%);
}

/* cheeks */
.character .cheek {
  position: absolute;
  width: 6px; height: 4px;
  border-radius: 50%;
  background: rgba(244,114,182,.55);
  top: 26px;
}
.character .cheek.l { left: 4px; }
.character .cheek.r { right: 4px; }

/* hair */
.character .hair {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  z-index: 4;
  border-radius: 50% 50% 30% 30% / 80% 80% 10% 10%;
  width: 44px; height: 26px;
}
.character .hair.brown   { background: #6B3E1F; }
.character .hair.black   { background: #1F1B16; }
.character .hair.blond   { background: #E8C77B; }
.character .hair.red     { background: #B45309; }
.character .hair.gray    { background: #94A3B8; }
.character .hair.purple  { background: #8B5CF6; }
.character .hair.pink    { background: #EC4899; }

.character .hair.short {
  width: 40px; height: 14px;
  border-radius: 50% 50% 20% 20% / 100% 100% 0 0;
  top: 2px;
}
.character .hair.bun {
  width: 38px; height: 22px;
}
.character .hair.bun::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: inherit;
  top: -10px; left: 50%;
  transform: translateX(-50%);
}
.character .hair.long {
  width: 46px; height: 38px;
  border-radius: 50% 50% 20% 20% / 70% 70% 30% 30%;
  z-index: 1;
}
.character .hair.spiky::after {
  content: "";
  position: absolute;
  width: 100%; height: 8px;
  top: -4px; left: 0;
  background:
    radial-gradient(ellipse 8px 8px at 10% 50%, inherit 60%, transparent 60%),
    radial-gradient(ellipse 8px 8px at 30% 50%, inherit 60%, transparent 60%),
    radial-gradient(ellipse 8px 8px at 50% 50%, inherit 60%, transparent 60%),
    radial-gradient(ellipse 8px 8px at 70% 50%, inherit 60%, transparent 60%),
    radial-gradient(ellipse 8px 8px at 90% 50%, inherit 60%, transparent 60%);
}

/* torso */
.character .torso {
  position: absolute;
  width: 40px; height: 36px;
  left: 50%;
  top: 44px;
  transform: translateX(-50%);
  background: var(--shirt, #3D63F5);
  border-radius: 16px 16px 6px 6px;
  z-index: 2;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.10);
}
.character .torso::before {
  content: "";
  position: absolute;
  width: 16px; height: 8px;
  background: var(--shirt-dark, #2B4CD8);
  top: 0; left: 50%;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
}
.character .torso::after {
  content: "";
  position: absolute;
  width: 5px; height: 14px;
  background: var(--accent, #FFD23F);
  top: 5px; left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* arms */
.character .arm {
  position: absolute;
  width: 9px; height: 26px;
  background: var(--shirt, #3D63F5);
  border-radius: 6px;
  top: 46px;
  z-index: 2;
  box-shadow: inset -2px 0 0 rgba(0,0,0,.10);
}
.character .arm.l { left: 12px; transform-origin: top center; animation: arm-l 3.8s ease-in-out infinite; }
.character .arm.r { right: 12px; transform-origin: top center; animation: arm-r 3.8s ease-in-out infinite; }
.character .arm::after {
  content: "";
  position: absolute;
  bottom: -5px; left: 50%;
  transform: translateX(-50%);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--skin-c, #FCD7AA);
}
@keyframes arm-l {
  0%, 100% { transform: rotate(0); }
  40% { transform: rotate(-12deg); }
  70% { transform: rotate(6deg); }
}
@keyframes arm-r {
  0%, 100% { transform: rotate(0); }
  40% { transform: rotate(12deg); }
  70% { transform: rotate(-6deg); }
}

/* legs */
.character .leg {
  position: absolute;
  width: 11px; height: 22px;
  background: #1F2937;
  border-radius: 4px;
  bottom: 0;
  z-index: 1;
}
.character .leg.l { left: 20px; }
.character .leg.r { right: 20px; }
.character .leg::after {
  /* shoe */
  content: "";
  position: absolute;
  bottom: -2px; left: -1px;
  width: 13px; height: 4px;
  background: #0F172A;
  border-radius: 0 0 4px 4px;
}

/* glasses */
.character .glasses {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 10px;
  z-index: 4;
}
.character .glasses::before,
.character .glasses::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1.6px solid #1F2937;
  border-radius: 50%;
  top: 0;
  background: rgba(255,255,255,.15);
}
.character .glasses::before { left: 0; }
.character .glasses::after  { right: 0; }

/* headset */
.character .headset {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 12px;
  border-top: 3px solid #1F2937;
  border-radius: 36px 36px 0 0;
  z-index: 5;
}
.character .headset::before {
  content: "";
  position: absolute;
  bottom: -4px; left: -3px;
  width: 8px; height: 8px;
  background: #1F2937;
  border-radius: 50%;
}
.character .headset::after {
  content: "";
  position: absolute;
  top: 8px; left: -1px;
  width: 12px; height: 3px;
  background: #1F2937;
  border-radius: 3px;
  transform: rotate(35deg);
  transform-origin: left center;
}

/* hat */
.character .hat {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 14px;
  background: #1E40AF;
  border-radius: 6px 6px 50% 50% / 6px 6px 100% 100%;
  z-index: 5;
}
.character .hat::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 14px;
  background: inherit;
  border-radius: 12px 12px 4px 4px;
}

/* ===== SPEECH BUBBLE ===== */
.bubble {
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 150px;
  max-width: 210px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid var(--finora-border);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(15,23,42,.10);
  font-size: 12px;
  line-height: 1.4;
  color: var(--finora-text);
  z-index: 5;
  animation: bubble-pop .4s ease-out;
}
@keyframes bubble-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.9); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 8px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 2px 0 rgba(229,232,240,1));
}
.bubble .who {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--finora-text-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.bubble .who .role-dot { width: 6px; height: 6px; border-radius: 50%; }
.bubble strong { color: var(--finora-blue); }

/* ===== ENVELOPES ===== */
.envelope {
  position: absolute;
  width: 26px; height: 18px;
  background: linear-gradient(180deg, #fff, #F1F5F9);
  border: 1.5px solid #94A3B8;
  border-radius: 3px;
  z-index: 6;
  box-shadow: 0 4px 8px rgba(15,23,42,.20);
}
.envelope::before {
  content: "";
  position: absolute; inset: 0;
  border-top: 1.5px solid #94A3B8;
  clip-path: polygon(0 0, 50% 60%, 100% 0);
}
.envelope::after {
  content: "✉";
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: #3D63F5;
  font-size: 10px;
  font-weight: 700;
}
.envelope.fly-1 { top: 290px; left: 420px; animation: fly1 6s ease-in-out infinite; }
.envelope.fly-2 { top: 290px; left: 800px; animation: fly2 5s ease-in-out infinite; animation-delay: 1.5s; }
.envelope.fly-3 { top: 290px; left: 1180px; animation: fly3 5.5s ease-in-out infinite; animation-delay: 3s; }
.envelope.fly-4 { top: 290px; left: 1560px; animation: fly2 5s ease-in-out infinite; animation-delay: 2.4s; }
.envelope.fly-5 { top: 290px; left: 1940px; animation: fly1 6s ease-in-out infinite; animation-delay: .8s; }
@keyframes fly1 {
  0% { transform: translate(0,0) rotate(0); opacity: 0; }
  10%{ opacity: 1; }
  50% { transform: translate(120px, -30px) rotate(8deg); }
  90% { opacity: 1; }
  100% { transform: translate(240px, 0) rotate(0); opacity: 0; }
}
@keyframes fly2 {
  0% { transform: translate(0,0) rotate(0); opacity: 0; }
  10%{ opacity: 1; }
  50% { transform: translate(140px, -28px) rotate(-6deg); }
  100% { transform: translate(280px, 0) rotate(0); opacity: 0; }
}
@keyframes fly3 {
  0% { transform: translate(0,0); opacity: 0; }
  10%{ opacity: 1; }
  50% { transform: translate(160px, -32px) rotate(10deg); }
  100% { transform: translate(320px, 0); opacity: 0; }
}

/* ===== WALKING NPCs ===== */
.npc {
  position: absolute;
  bottom: 32px;
  width: 56px; height: 86px;
  z-index: 2;
  animation: walk-across 28s linear infinite;
}
.npc.b { bottom: 14px; animation-duration: 36s; animation-delay: -10s; }
.npc.c { bottom: 50px; animation-duration: 42s; animation-delay: -22s; }
@keyframes walk-across {
  0%   { left: -80px; }
  100% { left: 2900px; }
}
.npc .body { animation: idle-bob 1.2s ease-in-out infinite; }
.npc .head { width: 32px; height: 34px; top: 4px; }
.npc .eye  { top: 14px; width: 6px; height: 7px; }
.npc .eye.l { left: 7px; }
.npc .eye.r { right: 7px; }
.npc .eye::before { width: 3px; height: 4px; top: 2px; left: 1.5px; }
.npc .brow { top: 11px; width: 5px; }
.npc .brow.l { left: 7px; }
.npc .brow.r { right: 7px; }
.npc .smile { width: 8px; height: 5px; top: 22px; }
.npc .cheek { width: 4px; height: 3px; top: 21px; }
.npc .cheek.l { left: 3px; }
.npc .cheek.r { right: 3px; }
.npc .hair { width: 34px; height: 18px; }
.npc .hair.bun { width: 32px; }
.npc .hair.short { width: 30px; height: 12px; }
.npc .torso { width: 30px; height: 26px; top: 34px; border-radius: 12px 12px 4px 4px; }
.npc .torso::before { width: 12px; height: 6px; }
.npc .torso::after  { width: 4px; height: 10px; top: 4px; }
.npc .arm { width: 6px; height: 20px; top: 36px; }
.npc .arm.l { left: 9px; animation: walk-arm-l 0.55s ease-in-out infinite; }
.npc .arm.r { right: 9px; animation: walk-arm-r 0.55s ease-in-out infinite; }
.npc .arm::after { width: 6px; height: 6px; bottom: -3px; }
@keyframes walk-arm-l { 50% { transform: rotate(-24deg); } }
@keyframes walk-arm-r { 50% { transform: rotate(24deg);  } }
.npc .leg { width: 8px; height: 18px; }
.npc .leg.l { left: 16px; animation: walk-leg-l 0.55s ease-in-out infinite; transform-origin: top center; }
.npc .leg.r { right: 16px; animation: walk-leg-r 0.55s ease-in-out infinite; transform-origin: top center; }
@keyframes walk-leg-l { 50% { transform: rotate(15deg); } }
@keyframes walk-leg-r { 50% { transform: rotate(-15deg); } }
.npc .leg::after { width: 10px; height: 4px; }

/* ===== MAILBOX SCULPTURE (start zone) ===== */
.mailbox-sculpt {
  position: absolute;
  bottom: 36px;
  left: 60px;
  width: 100px;
  z-index: 3;
}
.mailbox-sculpt .post {
  width: 8px; height: 60px;
  background: linear-gradient(180deg, #475569, #1E293B);
  margin: 0 auto;
}
.mailbox-sculpt .box {
  width: 84px;
  height: 60px;
  background: linear-gradient(180deg, #3D63F5, #2B4CD8);
  border-radius: 10px 10px 14px 14px;
  position: relative;
  margin: 0 auto -4px;
  box-shadow: 0 12px 22px rgba(61,99,245,.25);
}
.mailbox-sculpt .box::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 4px;
  background: #0F172A;
  border-radius: 4px;
}
.mailbox-sculpt .box::after {
  content: "FINORA";
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: .12em;
}
.mailbox-sculpt .flag {
  position: absolute;
  right: -10px; top: 18px;
  width: 14px; height: 12px;
  background: #DC2626;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 2px 4px rgba(220,38,38,.40);
  animation: flag-wave 2s ease-in-out infinite;
  transform-origin: left center;
}
@keyframes flag-wave { 50% { transform: rotate(-10deg); } }
.mailbox-sculpt .label {
  text-align: center;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--finora-text);
}

.letter-blip {
  position: absolute;
  width: 18px; height: 12px;
  background: #fff;
  border: 1px solid var(--finora-border);
  border-radius: 2px;
  animation: letter-pop 2.6s ease-in-out infinite;
}
.letter-blip.a { top: -12px; left: 30%; animation-delay: 0s; }
.letter-blip.b { top: -10px; left: 50%; animation-delay: .6s; }
.letter-blip.c { top: -12px; left: 70%; animation-delay: 1.2s; }
@keyframes letter-pop {
  0%, 100% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translateY(-14px); opacity: 1; }
  80% { opacity: 0; }
}

/* big plant */
.big-plant {
  position: absolute;
  bottom: 36px;
  width: 70px;
  z-index: 2;
}
.big-plant .pot {
  width: 50px; height: 36px;
  background: linear-gradient(180deg, #C2410C, #9A3412);
  border-radius: 6px 6px 14px 14px;
  margin: 0 auto;
}
.big-plant .leaves {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 80px;
}
.big-plant .leaf {
  position: absolute;
  width: 16px; height: 40px;
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  bottom: 0; left: 50%;
  transform-origin: bottom center;
  animation: leaf-sway 4s ease-in-out infinite;
}
.big-plant .leaf:nth-child(1) { transform: translateX(-50%) rotate(-30deg); background: #15803D; animation-delay: -.5s; }
.big-plant .leaf:nth-child(2) { transform: translateX(-50%) rotate(-10deg); background: #16A34A; height: 50px; animation-delay: -1.2s; }
.big-plant .leaf:nth-child(3) { transform: translateX(-50%) rotate(15deg); background: #22C55E; height: 44px; animation-delay: -.8s; }
.big-plant .leaf:nth-child(4) { transform: translateX(-50%) rotate(35deg); background: #15803D; animation-delay: -1.6s; }
@keyframes leaf-sway {
  0%, 100% { transform: var(--t, translateX(-50%)) rotate(var(--r, 0deg)); }
}

/* coffee */
.coffee {
  position: absolute;
  bottom: 12px; left: 10px;
  width: 14px; height: 14px;
}
.coffee .cup {
  position: absolute; inset: 0;
  background: #fff;
  border: 1.5px solid #CBD5E1;
  border-radius: 2px 2px 6px 6px;
}
.coffee .cup::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px; right: 2px; height: 6px;
  background: #6B4226;
  border-radius: 1px;
}
.coffee .steam {
  position: absolute;
  top: -8px; left: 50%;
  width: 2px; height: 8px;
  background: rgba(15,23,42,.30);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: steam 2s ease-in-out infinite;
}
@keyframes steam {
  0% { transform: translateX(-50%) translateY(0); opacity: .4; }
  100% { transform: translateX(-50%) translateY(-8px); opacity: 0; }
}

/* ===== FLOATING ACTION BUTTONS (top right) ===== */
.fab-leave {
  position: absolute;
  top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--finora-border);
  font-weight: 600;
  color: var(--finora-text);
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
  z-index: 30;
  cursor: pointer;
  transition: background .12s, transform .08s;
}
.fab-leave:hover { background: #FEE2E2; color: #DC2626; border-color: #FECACA; }
.fab-leave:active { transform: scale(.97); }
.fab-leave svg { width: 16px; height: 16px; }

.fab-mgr {
  position: absolute;
  bottom: 80px; right: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(139,92,246,.40);
  z-index: 30;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  animation: mgr-float 3s ease-in-out infinite;
}
.fab-mgr:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(139,92,246,.50); }
.fab-mgr svg { width: 18px; height: 18px; }
.fab-mgr .ping {
  position: absolute;
  top: 6px; right: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34,197,94,.30);
  animation: ping 1.5s ease-out infinite;
}
@keyframes mgr-float { 50% { transform: translateY(-3px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 100% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.40);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15,23,42,.28);
  z-index: 101;
  width: min(560px, 92vw);
  max-height: 86vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal.wide { width: min(720px, 94vw); }

.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--finora-border-soft);
}
.modal-head .ico {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  display: grid; place-items: center;
  color: #fff;
}
.modal-head .ico svg { width: 18px; height: 18px; }
.modal-head .title { font-weight: 700; font-size: 15px; }
.modal-head .sub { font-size: 12px; color: var(--finora-text-soft); margin-top: 1px; }
.modal-close {
  margin-left: auto;
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--finora-text-soft);
}
.modal-close:hover { background: var(--finora-border-soft); color: var(--finora-text); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }

/* ===== COPILOT INSIDE MODAL ===== */
.cp-msg {
  display: flex; gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.cp-msg.bot .ico {
  width: 28px; height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex: 0 0 28px;
}
.cp-msg.bot .bubble-msg {
  background: #F8FAFC;
  border: 1px solid var(--finora-border-soft);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 12px;
  color: var(--finora-text);
}
.cp-msg.user { flex-direction: row-reverse; }
.cp-msg.user .ico {
  width: 28px; height: 28px;
  border-radius: 9px;
  background: #0F172A;
  color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex: 0 0 28px;
}
.cp-msg.user .bubble-msg {
  background: var(--finora-blue);
  color: #fff;
  border-radius: 14px 4px 14px 14px;
  padding: 10px 12px;
}
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.cp-chip {
  padding: 6px 10px;
  background: #EEF2FF;
  color: var(--finora-blue);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s;
}
.cp-chip:hover { background: #DEE6FF; }
.cp-input {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--finora-border-soft);
  background: #FAFBFD;
}
.cp-input input {
  flex: 1;
  border: 1px solid var(--finora-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}
.cp-input input:focus { border-color: var(--finora-blue); }
.cp-send {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  color: #fff;
  display: grid; place-items: center;
}
.cp-send svg { width: 15px; height: 15px; }

/* zone label sticker */
.zone-marker {
  position: absolute;
  top: 240px;
  width: 88px;
  background: linear-gradient(135deg, #3D63F5, #5B7CFF);
  color: #fff;
  text-align: center;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 6px 14px rgba(61,99,245,.30);
  z-index: 2;
}
.zone-marker.cyan   { background: linear-gradient(135deg, #06B6D4, #0EA5E9); box-shadow: 0 6px 14px rgba(14,165,233,.30); }
.zone-marker.green  { background: linear-gradient(135deg, #10B981, #22C55E); box-shadow: 0 6px 14px rgba(16,185,129,.30); }
.zone-marker.amber  { background: linear-gradient(135deg, #F59E0B, #FBBF24); color: #7C2D12; box-shadow: 0 6px 14px rgba(245,158,11,.30); }
.zone-marker.purple { background: linear-gradient(135deg, #8B5CF6, #A855F7); box-shadow: 0 6px 14px rgba(139,92,246,.30); }
.zone-marker.pink   { background: linear-gradient(135deg, #EC4899, #F472B6); box-shadow: 0 6px 14px rgba(236,72,153,.30); }
.zone-marker.gold   { background: linear-gradient(135deg, #FBBF24, #F59E0B); color: #7C2D12; box-shadow: 0 6px 14px rgba(251,191,36,.40); }

/* name editor inline input */
.name-input {
  background: #fff;
  border: 1.5px solid var(--finora-blue);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--finora-blue);
  outline: none;
  width: 110px;
  text-align: center;
}

/* ============================================
   3D-ish ROOM — outer windows, side walls
   ============================================ */

/* widen the scene to allow vertical extension too */
.scene { width: 3200px; height: 1280px; }

/* OUTSIDE / SKY beyond the windows */
.outside-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #9ED4FF 0%, #C7E5FF 38%, #E8F2FB 60%, #B8D8E8 60%, #8FB8C9 100%);
}

/* Distant city skyline behind windows */
.skyline {
  position: absolute;
  top: 96px;
  left: 0; right: 0;
  height: 80px;
  background:
    /* skyscrapers */
    linear-gradient(90deg,
      transparent 0 4%,
      #6B7E9E 4% 5%,
      transparent 5% 7%,
      #5C7090 7% 9%,
      transparent 9% 12%,
      #7B8DAA 12% 14%,
      transparent 14% 17%,
      #4F6685 17% 19%,
      transparent 19% 22%,
      #6B7E9E 22% 25%,
      transparent 25% 28%,
      #5C7090 28% 30%,
      transparent 30% 33%,
      #7B8DAA 33% 35%,
      transparent 35% 38%,
      #4F6685 38% 41%,
      transparent 41% 45%,
      #6B7E9E 45% 47%,
      transparent 47% 50%,
      #5C7090 50% 52%,
      transparent 52% 56%,
      #7B8DAA 56% 58%,
      transparent 58% 62%,
      #4F6685 62% 64%,
      transparent 64% 67%,
      #6B7E9E 67% 70%,
      transparent 70% 74%,
      #5C7090 74% 76%,
      transparent 76% 80%,
      #7B8DAA 80% 83%,
      transparent 83% 86%,
      #4F6685 86% 88%,
      transparent 88% 92%,
      #6B7E9E 92% 95%,
      transparent 95% 100%);
  background-repeat: repeat-x;
  opacity: .8;
}
.skyline::before {
  /* horizon glow */
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 14px;
  background: linear-gradient(180deg, transparent, rgba(254,243,199,.30));
}

/* WALL behind characters — solid back wall */
.back-wall {
  position: absolute;
  top: 220px; left: 0; right: 0;
  height: 540px;
  background: linear-gradient(180deg, #F2EAD8 0%, #EADBC0 100%);
  border-bottom: 4px solid #C9A97A;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.04);
  z-index: 0;
}

/* WINDOW row across the back wall */
.windows-row {
  position: absolute;
  top: 30px; left: 0; right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 0;
}
.window-pane {
  position: absolute;
  top: 0;
  width: 240px;
  height: 200px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.05) 100%);
  border: 6px solid #6B4226;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.30),
    0 10px 24px rgba(0,0,0,.18);
}
.window-pane::before {
  /* vertical mullion */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 4px;
  margin-left: -2px;
  background: #6B4226;
}
.window-pane::after {
  /* horizontal mullion */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 4px;
  margin-top: -2px;
  background: #6B4226;
}
/* light reflection */
.window-pane > .reflect {
  position: absolute;
  top: 8%; left: 8%;
  width: 28%; height: 28%;
  background: linear-gradient(135deg, rgba(255,255,255,.55), transparent 60%);
  border-radius: 50% 30% 50% 30%;
  filter: blur(1px);
  pointer-events: none;
}
/* window sill */
.window-pane > .sill {
  position: absolute;
  left: -10px; right: -10px;
  bottom: -16px;
  height: 10px;
  background: linear-gradient(180deg, #8B5E3C, #6B4226);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,.20);
}

/* SIDE WALLS — perspective-ish */
.wall-left, .wall-right {
  position: absolute;
  top: 220px;
  height: 540px;
  width: 50px;
  z-index: 1;
  pointer-events: none;
}
.wall-left {
  left: 0;
  background: linear-gradient(90deg, #D5BFA0 0%, #EADBC0 100%);
  clip-path: polygon(0 0, 100% 30px, 100% calc(100% - 30px), 0 100%);
  box-shadow: inset -1px 0 0 rgba(0,0,0,.06);
}
.wall-right {
  right: 0;
  background: linear-gradient(270deg, #D5BFA0 0%, #EADBC0 100%);
  clip-path: polygon(0 30px, 100% 0, 100% 100%, 0 calc(100% - 30px));
  box-shadow: inset 1px 0 0 rgba(0,0,0,.06);
}

/* enhance floor with perspective lines */
.floor::after {
  /* far edge shadow */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.18), transparent);
}

/* divider stripe between desk row 1 and row 2 */
.row-divider {
  position: absolute;
  left: 60px; right: 60px;
  height: 1px;
  background: repeating-linear-gradient(90deg,
    rgba(120,80,40,.35) 0 8px, transparent 8px 16px);
}

/* slim arrow markers between row 1 → row 2 (vertical handoff) */
.down-arrow {
  position: absolute;
  width: 36px; height: 90px;
  z-index: 3;
}
.down-arrow .line {
  position: absolute;
  left: 50%; top: 0; bottom: 16px;
  width: 3px;
  margin-left: -1.5px;
  background: repeating-linear-gradient(180deg,
    var(--finora-blue) 0 6px, transparent 6px 12px);
}
.down-arrow .tip {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 8px solid transparent;
  border-top-color: var(--finora-blue);
  filter: drop-shadow(0 1px 0 rgba(61,99,245,.20));
}

/* potted floor plant — bigger version with multiple branches */
.tree-plant {
  position: absolute;
  width: 80px;
  height: 130px;
  z-index: 2;
}
.tree-plant .pot {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 40px;
  background: linear-gradient(180deg, #C2410C, #8B2E0A);
  border-radius: 8px 8px 16px 16px;
  box-shadow: 0 6px 12px rgba(0,0,0,.20);
}
.tree-plant .trunk {
  position: absolute;
  left: 50%; bottom: 36px;
  transform: translateX(-50%);
  width: 4px; height: 26px;
  background: #6B3E1F;
}
.tree-plant .canopy {
  position: absolute;
  left: 50%; bottom: 56px;
  transform: translateX(-50%);
  width: 80px; height: 80px;
}
.tree-plant .canopy .blob {
  position: absolute;
  width: 36px; height: 32px;
  border-radius: 50% 60% 50% 60% / 60% 50% 60% 50%;
  animation: blob-sway 5s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.tree-plant .canopy .blob:nth-child(1) { left: 0; top: 22px; background: #15803D; }
.tree-plant .canopy .blob:nth-child(2) { right: 0; top: 18px; background: #16A34A; animation-delay: -1.4s; }
.tree-plant .canopy .blob:nth-child(3) { left: 50%; top: 0; transform: translateX(-50%); background: #22C55E; animation-delay: -2.6s; }
@keyframes blob-sway {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(3deg); }
}

/* row marker labels on left side */
.row-label {
  position: absolute;
  left: 16px;
  width: 90px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--finora-border);
  border-left: 4px solid var(--finora-blue);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--finora-text);
  box-shadow: 0 4px 10px rgba(15,23,42,.10);
  z-index: 5;
}
.row-label.r2 { border-left-color: #EC4899; }

/* ===== MANAGER CHARACTER (in modal) ===== */
.mgr-stage {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 24px 0;
  background: linear-gradient(180deg, #EEF2FF 0%, #F8FAFC 100%);
  border-bottom: 1px solid var(--finora-border-soft);
  position: relative;
  overflow: hidden;
  min-height: 200px;
}
.mgr-stage::before {
  /* office floor / shadow */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(15,23,42,.04));
}

.mgr-char {
  position: relative;
  width: 110px;
  height: 180px;
  flex: 0 0 110px;
  animation: mgr-idle 4s ease-in-out infinite;
}
.mgr-char::after {
  /* floor shadow */
  content: "";
  position: absolute;
  left: 50%; bottom: -4px;
  transform: translateX(-50%);
  width: 80px; height: 12px;
  background: radial-gradient(ellipse, rgba(0,0,0,.25), transparent 70%);
  border-radius: 50%;
}
@keyframes mgr-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* head */
.mgr-char .head {
  position: absolute;
  width: 56px; height: 62px;
  border-radius: 48% 48% 46% 46% / 50% 50% 56% 56%;
  background: #F2C9A1;
  left: 50%; top: 8px;
  transform: translateX(-50%);
  z-index: 4;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.08);
}
.mgr-char .ear {
  position: absolute;
  width: 10px; height: 14px;
  background: #F2C9A1;
  border-radius: 50%;
  top: 28px;
  z-index: 3;
}
.mgr-char .ear.l { left: 20px; }
.mgr-char .ear.r { right: 20px; }
/* hair — combed back, side part */
.mgr-char .hair {
  position: absolute;
  left: 50%; top: 4px;
  transform: translateX(-50%);
  width: 56px; height: 22px;
  background: #3F2A1E;
  border-radius: 50% 50% 20% 20% / 90% 90% 30% 30%;
  z-index: 5;
}
.mgr-char .hair::after {
  /* side part highlight */
  content: "";
  position: absolute;
  top: 4px; left: 24px;
  width: 4px; height: 14px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  transform: rotate(-12deg);
}

/* glasses — squared rims */
.mgr-char .glasses {
  position: absolute;
  top: 32px; left: 50%;
  transform: translateX(-50%);
  width: 54px; height: 17px;
  z-index: 7;
}
.mgr-char .glasses .rim {
  position: absolute;
  top: 0;
  width: 20px; height: 17px;
  border: 2px solid #1F2937;
  border-radius: 5px;
  background: rgba(255,255,255,.30);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.40);
}
.mgr-char .glasses .rim.l { left: 0; }
.mgr-char .glasses .rim.r { right: 0; }
.mgr-char .glasses .bridge {
  position: absolute;
  top: 7px; left: 20px; right: 20px;
  height: 2px;
  background: #1F2937;
}
/* lens shine */
.mgr-char .glasses .rim::before {
  content: "";
  position: absolute;
  top: 1px; left: 1px;
  width: 6px; height: 4px;
  background: rgba(255,255,255,.70);
  border-radius: 50%;
  transform: rotate(-20deg);
}

/* eyes (behind glasses) */
.mgr-char .eye {
  position: absolute;
  top: 38px;
  width: 5px; height: 5px;
  background: #1F2937;
  border-radius: 50%;
  z-index: 6;
  animation: blink 4.6s ease-in-out infinite;
}
.mgr-char .eye.l { left: 38px; }
.mgr-char .eye.r { right: 38px; }

/* eyebrows */
.mgr-char .brow {
  position: absolute;
  top: 27px;
  width: 14px; height: 3px;
  background: #2A1810;
  border-radius: 3px;
  z-index: 8;
}
.mgr-char .brow.l { left: 32px; transform: rotate(-6deg); }
.mgr-char .brow.r { right: 32px; transform: rotate(6deg); }

/* cheeks */
.mgr-char .cheek {
  position: absolute;
  top: 46px;
  width: 8px; height: 4px;
  background: rgba(244,114,182,.40);
  border-radius: 50%;
  z-index: 5;
}
.mgr-char .cheek.l { left: 25px; }
.mgr-char .cheek.r { right: 25px; }

/* mouth — animated when speaking */
.mgr-char .mouth {
  position: absolute;
  left: 50%; top: 50px;
  transform: translateX(-50%);
  width: 12px; height: 4px;
  background: #7C2D12;
  border-radius: 0 0 12px 12px;
  z-index: 5;
  transition: height .12s, width .12s;
}
.mgr-char.speaking .mouth {
  animation: mouth-talk .26s ease-in-out infinite;
}
@keyframes mouth-talk {
  0%   { width: 8px;  height: 4px;  border-radius: 0 0 8px 8px; }
  35%  { width: 12px; height: 10px; border-radius: 50% 50% 40% 40%; background: #7C2D12; }
  70%  { width: 14px; height: 6px;  border-radius: 50% 50% 30% 30%; }
  100% { width: 8px;  height: 4px;  border-radius: 0 0 8px 8px; }
}

/* tiny chin shading */
.mgr-char .chin {
  position: absolute;
  left: 50%; top: 56px;
  transform: translateX(-50%);
  width: 24px; height: 6px;
  background: rgba(0,0,0,.05);
  border-radius: 50%;
  z-index: 4;
}

/* neck */
.mgr-char .neck {
  position: absolute;
  left: 50%; top: 64px;
  transform: translateX(-50%);
  width: 18px; height: 12px;
  background: #E5B98A;
  z-index: 2;
  box-shadow: inset -3px 0 0 rgba(0,0,0,.10);
}

/* white shirt */
.mgr-char .shirt {
  position: absolute;
  left: 50%; top: 70px;
  transform: translateX(-50%);
  width: 64px; height: 70px;
  background: #fff;
  border-radius: 14px 14px 6px 6px;
  z-index: 1;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.04);
}
.mgr-char .shirt::before {
  /* shirt v-collar */
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid #fff;
}

/* suit jacket */
.mgr-char .jacket {
  position: absolute;
  left: 50%; top: 78px;
  transform: translateX(-50%);
  width: 78px; height: 70px;
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  border-radius: 18px 18px 8px 8px;
  z-index: 3;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.20);
}
.mgr-char .jacket::before {
  /* lapel-left */
  content: "";
  position: absolute;
  top: 0; left: 12px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 24px 0 0 14px;
  border-color: transparent transparent transparent #0F172A;
  filter: drop-shadow(1px 0 0 rgba(255,255,255,.06));
}
.mgr-char .jacket::after {
  /* lapel-right */
  content: "";
  position: absolute;
  top: 0; right: 12px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 24px 14px 0 0;
  border-color: transparent #0F172A transparent transparent;
}

/* shirt notch under collar between lapels */
.mgr-char .shirt-v {
  position: absolute;
  top: 78px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 14px;
  background: #fff;
  z-index: 4;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* tie */
.mgr-char .tie {
  position: absolute;
  top: 80px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 36px;
  background: linear-gradient(180deg, #DC2626 0%, #991B1B 100%);
  z-index: 5;
  clip-path: polygon(20% 0, 80% 0, 100% 12%, 50% 100%, 0 12%);
  box-shadow: 0 2px 4px rgba(0,0,0,.20);
}
.mgr-char .tie::after {
  /* knot */
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 8px;
  background: #B91C1C;
  clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}

/* arms folded look — two small forearms in front of jacket */
.mgr-char .arm {
  position: absolute;
  top: 110px;
  width: 26px; height: 30px;
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  border-radius: 6px;
  z-index: 4;
}
.mgr-char .arm.l { left: 8px; transform: rotate(8deg); border-radius: 12px 6px 6px 12px; }
.mgr-char .arm.r { right: 8px; transform: rotate(-8deg); border-radius: 6px 12px 12px 6px; }
.mgr-char .arm::after {
  /* hand peeking */
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  background: #F2C9A1;
  border-radius: 50%;
  bottom: -2px;
}
.mgr-char .arm.l::after { right: 0; }
.mgr-char .arm.r::after { left: 0; }

/* pocket square */
.mgr-char .pocket {
  position: absolute;
  top: 102px; left: 14px;
  width: 12px; height: 6px;
  background: #DBEAFE;
  border-radius: 1px;
  z-index: 5;
  transform: rotate(-4deg);
}

/* speech indicator dots above */
.mgr-char .think {
  position: absolute;
  top: -4px; right: -10px;
  width: 36px; height: 18px;
  background: #fff;
  border: 1.5px solid var(--finora-blue);
  border-radius: 12px;
  z-index: 10;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  opacity: 0;
  transition: opacity .2s;
}
.mgr-char.speaking .think { opacity: 1; }
.mgr-char .think .d {
  width: 4px; height: 4px;
  background: var(--finora-blue);
  border-radius: 50%;
  animation: dot-bounce 1s ease-in-out infinite;
}
.mgr-char .think .d:nth-child(2) { animation-delay: .15s; }
.mgr-char .think .d:nth-child(3) { animation-delay: .30s; }
@keyframes dot-bounce {
  0%, 100% { transform: translateY(0); opacity: .4; }
  50% { transform: translateY(-3px); opacity: 1; }
}

/* manager intro panel — replaces the previous flat avatar */
.mgr-intro {
  flex: 1;
  padding-bottom: 18px;
}
.mgr-intro .name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.01em;
  color: var(--finora-text);
}
.mgr-intro .title {
  font-size: 12px;
  color: var(--finora-text-soft);
  margin-top: 2px;
}
.mgr-intro .status {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  background: #DCFCE7;
  color: #16A34A;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.mgr-intro .status::before {
  content: ""; width: 6px; height: 6px;
  background: #16A34A; border-radius: 50%;
  box-shadow: 0 0 6px #16A34A;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .5; } }
.mgr-intro .close-btn {
  margin-left: 8px;
}

/* expand modal a bit to fit the manager character */
.modal.with-character { width: min(640px, 94vw); }
.modal.with-character .modal-head { display: none; }
