/* Rumi’s workspace — faithful recreation of the agents product surface.
   Always a light product UI (the real app), regardless of page theme.
   Blue is official pigment #0064D4. No faces, no real photos. */

.ws {
  --ws-canvas: #E6EAF3;
  --ws-panel: #F6F7FB;
  --ws-card: #FFFFFF;
  --ws-ink: #0B0C0F;
  --ws-mute: #5C6370;
  --ws-faint: #8B919C;
  --ws-line: rgba(15, 18, 28, 0.09);
  --ws-line-strong: rgba(15, 18, 28, 0.16);
  --ws-blue: #0064D4;
  --ws-blue-2: #0057B8;
  --ws-blue-soft: #E8F1FB;
  --ws-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.45);
  --ws-w: 1320px;
  --ws-h: 780px;
  position: relative;
  width: 100%;
  container-type: inline-size;
  aspect-ratio: 1320 / 780;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--ws-shadow);
  color: var(--ws-ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
html[data-theme="light"] .ws { --ws-shadow: 0 28px 70px -28px rgba(0, 0, 0, 0.28); }

.ws-stage {
  position: absolute;
  inset: 0 auto auto 0;
  width: var(--ws-w);
  height: var(--ws-h);
  transform-origin: 0 0;
  transform: scale(calc(100cqw / 1320px));
  background:
    radial-gradient(1200px 520px at 70% -10%, rgba(0, 100, 212, 0.10), transparent 60%),
    linear-gradient(180deg, #EEF1F7 0%, var(--ws-canvas) 40%, #DCE3EE 100%);
  color: var(--ws-ink);
  display: grid;
  grid-template-columns: 58px 252px minmax(320px, 1fr) minmax(420px, 1.25fr);
  gap: 10px;
  padding: 12px;
  box-sizing: border-box;
}

/* Left icon rail */
.ws-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: 0 10px 28px -18px rgba(15, 18, 28, 0.35);
}
.ws-rail .app {
  width: 34px; height: 34px; border-radius: 10px; display: block; margin-bottom: 8px;
}
.ws-rail button, .ws-rail .ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  color: #3E4551;
  background: none; border: 0; padding: 0;
}
.ws-rail button[aria-current="page"], .ws-rail .ico.on {
  background: var(--ws-blue-soft); color: var(--ws-blue);
}
.ws-rail svg { width: 18px; height: 18px; display: block; }
.ws-rail .spacer { flex: 1; }
.ws-rail .you {
  width: 28px; height: 28px; border-radius: 50%;
  background: #111214; color: #fff;
  font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}

/* Shared columns */
.ws-roster, .ws-chat, .ws-comp {
  background: var(--ws-panel);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px -20px rgba(15, 18, 28, 0.4);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* Roster */
.ws-roster {
  display: flex;
  flex-direction: column;
  padding: 10px 8px 12px;
  background: #F3F5FB;
  overflow-y: auto;
}
.ws-people, .ws-sides, .ws-groups { display: flex; flex-direction: column; gap: 2px; }
.ws-person, .ws-side, .ws-group {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  text-align: left;
  width: 100%;
}
.ws-group { grid-template-columns: auto 1fr; }
.ws-person:hover, .ws-side:hover, .ws-group:hover { background: rgba(255, 255, 255, 0.8); }
.ws-person[aria-selected="true"] { background: #fff; box-shadow: 0 1px 0 var(--ws-line); }
.ws-person .nm, .ws-side .nm, .ws-group .nm {
  display: block;
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ws-ink);
}
.ws-person .rl, .ws-side .rl, .ws-group .rl {
  display: block;
  font-size: 12px; color: var(--ws-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-label {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 8px 6px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ws-faint);
}
.ws-label .add {
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ws-mute); font-size: 16px; line-height: 1;
}

/* Avatars */
.av {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 650; letter-spacing: 0.02em;
  flex-shrink: 0; user-select: none;
  overflow: hidden;
}
img.av, .av-photo {
  object-fit: cover;
  object-position: center 18%;
  background: #E6E9EF;
  padding: 0;
}
.av-sm { width: 28px; height: 28px; font-size: 10px; }
.av-b { background: var(--ws-blue); color: #fff; }
.av-k { background: #111214; color: #fff; }
.av-s { background: #3E4756; color: #fff; }
.av-m { background: #D7DEE8; color: #1A1D24; }
.av-d { background: #0057B8; color: #fff; }
.av-stack { display: flex; }
.av-stack .av { margin-left: -8px; box-shadow: 0 0 0 2px #F3F5FB; }
.av-stack .av:first-child { margin-left: 0; }

/* Chat */
.ws-chat { display: flex; flex-direction: column; background: #F7F8FC; }
.ws-chat-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px 10px;
}
.ws-who { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; min-width: 0; }
.ws-who .role { font-size: 14px; font-weight: 650; }
.ws-who .mode { font-size: 12px; color: var(--ws-mute); }
.ws-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ws-tools .tool {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--ws-line-strong);
  background: #fff; color: var(--ws-ink);
  font-size: 12.5px; font-weight: 550;
}
.ws-tools .tool.live {
  background: var(--ws-blue); color: #fff; border-color: var(--ws-blue);
}
.ws-tools .tool .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #E11D2A;
  box-shadow: 0 0 0 2px rgba(225, 29, 42, 0.2);
}
.ws-tools .tool svg { width: 13px; height: 13px; }

.ws-thread {
  flex: 1; overflow: hidden;
  padding: 8px 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
  justify-content: flex-end;
}
.bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14.5px; line-height: 1.45;
  opacity: 0; transform: translateY(8px);
}
.ws[data-step="1"] .bubble.you,
.ws[data-step="2"] .bubble.you,
.ws[data-step="3"] .bubble.you,
.ws[data-step="4"] .bubble.you,
.ws[data-step="5"] .bubble.you { opacity: 1; transform: none; }
.ws[data-step="2"] .bubble.agent.a1,
.ws[data-step="3"] .bubble.agent.a1,
.ws[data-step="4"] .bubble.agent.a1,
.ws[data-step="5"] .bubble.agent.a1 { opacity: 1; transform: none; }
.ws[data-step="4"] .bubble.agent.a2,
.ws[data-step="5"] .bubble.agent.a2 { opacity: 1; transform: none; }
.bubble.you {
  align-self: flex-end;
  background: var(--ws-blue); color: #fff;
  border-bottom-right-radius: 6px;
}
.bubble.agent {
  align-self: flex-start;
  background: #fff; color: var(--ws-ink);
  border: 1px solid var(--ws-line);
  border-bottom-left-radius: 6px;
}
.agent-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 92%; }
.agent-row .meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ws-mute); padding-left: 2px;
}
.agent-row .meta b { font-weight: 650; color: var(--ws-ink); }
.typing {
  display: none; align-self: flex-start;
  background: #fff; border: 1px solid var(--ws-line);
  border-radius: 16px; padding: 10px 14px; gap: 4px;
}
.ws[data-step="1"] .typing { display: inline-flex; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: #9AA1AC;
  animation: ws-dot 1s var(--ease, ease) infinite;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ws-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.ws-compose { padding: 4px 12px 8px; }
.ws-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--ws-line-strong);
  border-radius: 999px; padding: 6px 6px 6px 8px;
  min-height: 46px;
}
.ws-box .plus, .ws-box .mic, .ws-box .send {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: #3E4551; flex-shrink: 0;
}
.ws-box .send { background: #EEF0F4; color: #8B919C; }
.ws[data-step="0"] .ws-box .send.is-ready,
.ws.typing-in .ws-box .send { background: var(--ws-blue); color: #fff; }
.ws-box .ph {
  flex: 1; font-size: 14px; color: var(--ws-faint);
  min-width: 0; white-space: nowrap; overflow: hidden;
}
.ws-box .ph .typed { color: var(--ws-ink); }
.ws-box .effort {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 10px; border-radius: 999px;
  background: #F1F3F7; color: #3E4551;
  font-size: 12px; font-weight: 550; white-space: nowrap;
}
.ws-hint {
  margin: 6px 12px 8px;
  font-size: 11.5px; color: var(--ws-mute); text-align: center;
}

/* Computer */
.ws-comp { display: flex; flex-direction: column; background: #F3F5FA; }
.ws-comp-top { padding: 12px 14px 8px; display: grid; gap: 4px; }
.ws-comp-top h3 {
  margin: 0; font-family: var(--sans);
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
}
.ws-comp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ws-status { font-size: 12.5px; color: var(--ws-ink); line-height: 1.4; max-width: 34em; }
.ws-status .live {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ws-blue); margin-right: 6px; vertical-align: middle;
}
.ws-status .sub { display: block; color: var(--ws-mute); font-size: 11.5px; margin-top: 2px; }
.ws-comp-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ws-comp-actions .act {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: #fff; color: var(--ws-ink); border: 1px solid var(--ws-line-strong);
}
.ws-comp-actions .act.primary { background: var(--ws-blue); color: #fff; border-color: var(--ws-blue); }
.ws-comp-actions .act svg { width: 13px; height: 13px; }

.ws-browser {
  flex: 1; margin: 6px 10px 0; min-height: 0;
  background: #fff; border: 1px solid var(--ws-line);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 28px -18px rgba(15, 18, 28, 0.35);
}
.b-chrome { background: #E9EBEF; border-bottom: 1px solid #DDDFE4; }
.b-tabs { display: flex; align-items: end; gap: 2px; padding: 6px 8px 0; }
.b-tab {
  display: flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; max-width: 220px;
  background: #F7F8FA; border-radius: 8px 8px 0 0;
  font-size: 11px; color: #3E4551;
  white-space: nowrap; overflow: hidden;
}
.b-tab.on { background: #fff; color: var(--ws-ink); }
.b-url {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 8px; background: #fff;
}
.b-url .navs { display: flex; gap: 2px; color: #6A7180; }
.b-url .navs span { width: 22px; height: 22px; display: grid; place-items: center; }
.b-url .field {
  flex: 1; height: 26px; border-radius: 8px;
  background: #F1F3F6; color: #3E4551;
  font-size: 11.5px; display: flex; align-items: center; padding: 0 10px;
  letter-spacing: 0;
  font-variant-ligatures: none;
}
.b-page { flex: 1; display: grid; grid-template-columns: 176px 1fr; min-height: 0; background: #fff; }
.shop-nav {
  background: #1A1C1F; color: #E8EAED;
  padding: 10px 8px; font-size: 11.5px;
  display: flex; flex-direction: column; gap: 1px;
}
.shop-nav .brandish {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 12px; font-weight: 650; letter-spacing: -0.02em; font-size: 12.5px;
}
.shop-nav .mark-dot {
  width: 16px; height: 16px; border-radius: 4px; background: #3D9B6E;
}
.shop-nav a, .shop-nav .item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; color: #C5C9D0;
}
.shop-nav .item.on { background: #2A2D32; color: #fff; }
.shop-nav .item.sub { padding-left: 20px; }
.shop-nav .item.sub.on { background: #2A2D32; }

.shop-main { padding: 10px 14px 12px; overflow: auto; min-width: 0; }
.shop-main .crumb { font-size: 11px; color: var(--ws-mute); margin-bottom: 4px; }
.shop-main h4 {
  margin: 0 0 12px; font-size: 16px; font-weight: 700;
  letter-spacing: -0.02em; display: flex; align-items: center; justify-content: space-between;
}
.shop-main h4 .btns { display: flex; gap: 6px; }
.shop-main h4 .btnlet {
  height: 26px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--ws-line-strong); background: #fff;
  font-size: 11.5px; font-weight: 550; color: var(--ws-ink);
  display: inline-flex; align-items: center;
}

.themes { display: grid; gap: 8px; }
.theme-card {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 8px 10px; align-items: center;
  padding: 8px; border: 1px solid var(--ws-line); border-radius: 12px; background: #fff;
}
.theme-card img {
  width: 76px; height: 50px; object-fit: cover; border-radius: 7px; background: #EEEAE4;
}
.theme-card .info b { display: block; font-size: 12.5px; font-weight: 650; }
.theme-card .info small { color: var(--ws-mute); font-size: 11px; }
.theme-card .ops { display: flex; gap: 6px; }
.theme-card .ops span {
  height: 26px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--ws-line-strong); font-size: 11.5px; font-weight: 550;
  display: grid; place-items: center; color: var(--ws-ink); background: #FAFBFC;
}
.theme-card.draft {
  opacity: 0; transform: translateY(8px);
  outline: 1px solid transparent;
}
.ws[data-step="3"] .theme-card.draft,
.ws[data-step="4"] .theme-card.draft,
.ws[data-step="5"] .theme-card.draft {
  opacity: 1; transform: none;
  outline-color: var(--ws-blue);
  box-shadow: 0 0 0 3px rgba(0, 100, 212, 0.12);
}
.hold-banner {
  margin: 0 0 10px;
  display: none; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  background: var(--ws-blue-soft); color: #0B0C0F;
  font-size: 12.5px;
}
.ws[data-step="4"] .hold-banner,
.ws[data-step="5"] .hold-banner { display: flex; }
.hold-banner svg { width: 16px; height: 16px; color: var(--ws-blue); flex-shrink: 0; }
.hold-banner b { font-weight: 650; }

/* Pointer that travels during work */
.ws-pointer {
  position: absolute; width: 14px; height: 14px; pointer-events: none;
  opacity: 0; z-index: 5;
}
.ws[data-step="3"] .ws-pointer { opacity: 1; animation: ws-move 3.2s var(--ease, ease) 1; }
@keyframes ws-move {
  0% { left: 62%; top: 42%; opacity: 0; }
  10% { opacity: 1; }
  45% { left: 78%; top: 48%; }
  80% { left: 70%; top: 58%; }
  100% { left: 70%; top: 58%; opacity: 0; }
}

.ws-foot {
  padding: 8px 14px 10px;
  font-size: 11.5px; color: var(--ws-mute); text-align: center;
}

/* Motion */
.bubble, .theme-card.draft, .hold-banner {
  transition: opacity 0.45s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
              transform 0.45s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

@media (prefers-reduced-motion: reduce) {
  .bubble, .theme-card.draft, .typing, .hold-banner, .ws-pointer { animation: none !important; transition: none !important; }
  .bubble, .theme-card.draft { opacity: 1 !important; transform: none !important; }
  .typing { display: none !important; }
  .hold-banner { display: flex !important; }
  .ws-pointer { display: none !important; }
}

/* Readable stacked layout on small screens — do not crop a scaled desktop. */
@media (max-width: 799px) {
  .ws {
    aspect-ratio: auto;
    height: auto;
    overflow: visible;
    border-radius: 18px;
  }
  .ws-stage {
    position: relative;
    width: 100%;
    height: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  .ws-rail { display: none; }
  .ws-roster {
    overflow: visible;
    padding: 8px;
  }
  .ws-people {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .ws-person {
    grid-template-columns: 28px 1fr;
    min-width: 168px;
    flex: 0 0 auto;
    background: #fff;
  }
  .ws-sides, .ws-groups, .ws-roster > .ws-label { display: none; }
  .ws-chat { min-height: 340px; }
  .ws-thread { justify-content: flex-end; }
  .ws-tools .tool:not(.live) { display: none; }
  .ws-chat-top { padding: 10px 12px; }
  .ws-comp { min-height: 420px; }
  .b-page { grid-template-columns: 1fr; }
  .shop-nav { display: none; }
  .theme-card { grid-template-columns: 64px 1fr; }
  .theme-card .ops { grid-column: 1 / -1; justify-content: flex-end; }
  .ws-comp-row { flex-wrap: wrap; }
  .ws-pointer { display: none; }
}
