/* FE/v4/styles.css */

:root {
  --v4-bg: #120f1a;
  --v4-bg-soft: #1c1728;
  --v4-bg-card: rgba(255, 255, 255, 0.08);
  --v4-bg-card-strong: rgba(255, 255, 255, 0.13);
  --v4-border: rgba(255, 255, 255, 0.14);
  --v4-border-strong: rgba(255, 255, 255, 0.24);
  --v4-text: #f7f1ff;
  --v4-text-muted: rgba(247, 241, 255, 0.72);
  --v4-text-subtle: rgba(247, 241, 255, 0.52);
  --v4-accent: #d9a8ff;
  --v4-accent-strong: #f0d1ff;
  --v4-danger: #ff8f9f;
  --v4-danger-bg: rgba(255, 95, 120, 0.16);
  --v4-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --v4-radius-lg: 24px;
  --v4-radius-md: 18px;
  --v4-radius-sm: 12px;
  --v4-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.v4-screen {
  min-height: 100dvh;
  width: 100%;
  margin: 0 auto;
  color: var(--v4-text);
  background:
    radial-gradient(circle at 18% 8%, rgba(217, 168, 255, 0.20), transparent 34%),
    radial-gradient(circle at 82% 2%, rgba(137, 111, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #191225 0%, var(--v4-bg) 48%, #0d0b12 100%);
}

.v4-screen button {
  border: 0;
}

/* =========================
   Lobby
========================= */

.v4-lobby-screen {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px calc(22px + var(--v4-safe-bottom));
}

.v4-lobby-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius-lg);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--v4-shadow);
}

.v4-lobby-hero__eyebrow,
.v4-room-header__eyebrow,
.v4-settings-header__eyebrow {
  margin: 0 0 6px;
  color: var(--v4-accent);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v4-lobby-hero__title {
  margin: 0;
  font-size: clamp(2.1rem, 12vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.v4-lobby-hero__description {
  margin: 10px 0 0;
  color: var(--v4-text-muted);
  line-height: 1.7;
}

.v4-lobby-hero__portrait {
  display: flex;
  justify-content: center;
}

.v4-lobby-hero__portrait-inner {
  display: grid;
  place-items: center;
  width: min(62vw, 230px);
  aspect-ratio: 1 / 1.22;
  border: 1px solid var(--v4-border);
  border-radius: 999px 999px 34px 34px;
  color: rgba(255, 255, 255, 0.42);
  background:
    radial-gradient(circle at 50% 24%, rgba(240, 209, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.v4-lobby-status,
.v4-settings-card {
  padding: 20px;
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius-lg);
  background: var(--v4-bg-card);
}

.v4-lobby-status__label,
.v4-current-consultation__label,
.v4-consultation-history__label {
  margin: 0 0 8px;
  color: var(--v4-accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.v4-lobby-status__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.35;
}

.v4-lobby-status__description {
  margin: 10px 0 18px;
  color: var(--v4-text-muted);
  line-height: 1.7;
}

.v4-lobby-status__primary-button,
.v4-lobby-actions__button,
.v4-settings-actions__button,
.v4-empty-state__primary-button,
.v4-empty-state__secondary-button,
.v4-consultation-history__new-button,
.v4-current-consultation__history-button,
.v4-message-input__send-button,
.v4-dialog__cancel-button,
.v4-dialog__danger-button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--v4-text);
  background: var(--v4-bg-card-strong);
}

.v4-lobby-status__primary-button,
.v4-lobby-actions__button.is-primary,
.v4-settings-actions__button.is-primary,
.v4-empty-state__primary-button,
.v4-consultation-history__new-button,
.v4-message-input__send-button {
  color: #1d1129;
  background: linear-gradient(180deg, var(--v4-accent-strong), var(--v4-accent));
  font-weight: 700;
}

.v4-lobby-actions,
.v4-settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* =========================
   Room header
========================= */

 .v4-room-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.v4-room-header,
.v4-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--v4-border);
  background: rgba(18, 15, 26, 0.82);
  backdrop-filter: blur(18px);
}

.v4-room-header__main,
.v4-settings-header {
  min-width: 0;
}

.v4-room-header__main,
.v4-settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v4-room-header__back-button,
.v4-settings-header__back-button,
.v4-room-header__settings-button,
.v4-room-error__close {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  color: var(--v4-text);
  background: var(--v4-bg-card);
}

.v4-room-header__settings-button {
  padding: 0 14px;
  font-size: 0.88rem;
}

.v4-room-header__text,
.v4-settings-header__text {
  min-width: 0;
}

.v4-room-header__title,
.v4-settings-header__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.v4-room-header__description,
.v4-settings-header__description {
  margin: 4px 0 0;
  color: var(--v4-text-muted);
  font-size: 0.88rem;
}

/* =========================
   Room shell
========================= */

.v4-room-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  padding: 12px 14px calc(14px + var(--v4-safe-bottom));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.v4-room-shell__segment {
  flex: 0 0 auto;
}

.v4-room-shell__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 12px;
  overflow: hidden;
}

.v4-room-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--v4-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.v4-room-segment__button {
  min-height: 40px;
  border-radius: 999px;
  color: var(--v4-text-muted);
  background: transparent;
  font-weight: 700;
}

.v4-room-segment__button.is-active {
  color: #1d1129;
  background: var(--v4-accent-strong);
}

.v4-room-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 143, 159, 0.34);
  border-radius: var(--v4-radius-sm);
  color: #ffd8df;
  background: var(--v4-danger-bg);
}

.v4-room-error__text {
  min-width: 0;
  line-height: 1.5;
}

/* =========================
   Current consultation
========================= */

.v4-current-consultation,
.v4-consultation-history {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  flex-direction: column;
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius-lg);
  background: rgba(255, 255, 255, 0.065);
  overflow: hidden;
}

.v4-current-consultation__header,
.v4-consultation-history__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--v4-border);
}

.v4-current-consultation__title-block,
.v4-consultation-history__title-block {
  min-width: 0;
}

.v4-current-consultation__title,
.v4-consultation-history__title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

.v4-current-consultation__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  color: var(--v4-text-subtle);
  font-size: 0.78rem;
}

.v4-current-consultation__history-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.v4-current-consultation__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.v6-current-consultation__input {
  flex: 0 0 auto;
  border-top: 1px solid var(--v4-border);
}

/* =========================
   Message list
========================= */

.v4-message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.v4-message-list--empty {
  justify-content: center;
}

.v4-message-list__empty-card {
  padding: 18px;
  border: 1px dashed var(--v4-border-strong);
  border-radius: var(--v4-radius-md);
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}

.v4-message-list__empty-title {
  margin: 0;
  font-weight: 700;
}

.v4-message-list__empty-description {
  margin: 8px 0 0;
  color: var(--v4-text-muted);
  line-height: 1.6;
}

.v4-message {
  display: flex;
  flex-direction: column;
  max-width: 95%;
}

.v4-message.is-user {
  align-self: flex-end;
  align-items: flex-end;
}

.v4-message.is-assistant,
.v4-message.is-unknown {
  align-self: flex-start;
  align-items: flex-start;
}

.v4-message__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--v4-text-subtle);
  font-size: 0.74rem;
}

.v4-message__bubble {
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.7;
  word-break: break-word;
  white-space: normal;
}

.v4-message.is-user .v4-message__bubble {
  border-bottom-right-radius: 6px;
  color: #1d1129;
  background: var(--v4-accent-strong);
}

.v4-message.is-assistant .v4-message__bubble {
  border-bottom-left-radius: 6px;
  background: rgba(255, 255, 255, 0.11);
}

.v4-message.is-pending .v4-message__bubble {
  color: var(--v4-text-muted);
}

/* =========================
   Message input
========================= */

.v4-message-input {
  padding: 10px;
  background: rgba(18, 15, 26, 0.72);
}

.v4-message-input__button-area {
  display: flex;
  flex-direction: column;
  margin-left: 6px;
}

.v4-message-input__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--v4-text-subtle);
  font-size: 0.76rem;
}

.v4-message-input__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* .v4-message-input__main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
} */
.v4-message-input__main {
  display: flex;
}

.v4-message-input__send-button {
  min-width: 72px;
  min-height: 46px;
}

/* =========================
   History
========================= */

.v4-consultation-history__description {
  margin: 8px 0 0;
  color: var(--v4-text-muted);
  line-height: 1.6;
}

.v4-consultation-history__new-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.v4-consultation-history__summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--v4-border);
  color: var(--v4-text-subtle);
  font-size: 0.78rem;
}

.v4-consultation-history__list {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
}

.v4-consultation-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius-md);
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.v4-consultation-card.is-active {
  border-color: rgba(240, 209, 255, 0.64);
  background: rgba(217, 168, 255, 0.13);
}

.v4-consultation-card__main {
  min-width: 0;
  padding: 14px;
  text-align: left;
  color: var(--v4-text);
  background: transparent;
}

.v4-consultation-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.v4-consultation-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.v4-consultation-card__badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1d1129;
  background: var(--v4-accent-strong);
  font-size: 0.7rem;
  font-weight: 700;
}

.v4-consultation-card__summary {
  margin: 8px 0 0;
  color: var(--v4-text-muted);
  line-height: 1.55;
  font-size: 0.88rem;
}

.v4-consultation-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: var(--v4-text-subtle);
  font-size: 0.74rem;
}

.v4-consultation-card__actions {
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--v4-border);
}

.v4-consultation-card__delete-button {
  min-width: 58px;
  padding: 0 10px;
  color: var(--v4-danger);
  background: rgba(255, 255, 255, 0.045);
}

/* =========================
   Empty state
========================= */

.v4-empty-state {
  display: grid;
  place-items: center;
  gap: 14px;
  width: 100%;
  min-height: 280px;
  padding: 28px 20px;
  text-align: center;
}

.v4-empty-state__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--v4-border);
  border-radius: 50%;
  color: var(--v4-accent);
  background: rgba(255, 255, 255, 0.06);
}

.v4-empty-state__title {
  margin: 0;
  font-size: 1.2rem;
}

.v4-empty-state__description {
  max-width: 30em;
  margin: 10px auto 0;
  color: var(--v4-text-muted);
  line-height: 1.7;
}

.v4-empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* =========================
   Dialog
========================= */

.v4-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.v4-dialog {
  width: min(100%, 420px);
  padding: 20px;
  border: 1px solid var(--v4-border-strong);
  border-radius: var(--v4-radius-lg);
  color: var(--v4-text);
  background: #1c1728;
  box-shadow: var(--v4-shadow);
}

.v4-dialog__title {
  margin: 0;
  font-size: 1.18rem;
}

.v4-dialog__description {
  margin: 12px 0 0;
  color: var(--v4-text-muted);
  line-height: 1.7;
}

.v4-dialog__target {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius-sm);
  background: rgba(255, 255, 255, 0.06);
}

.v4-dialog__target-label {
  color: var(--v4-text-subtle);
  font-size: 0.72rem;
}

.v4-dialog__target-title {
  font-weight: 700;
}

.v4-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.v4-dialog__danger-button {
  color: #321018;
  background: linear-gradient(180deg, #ffc1cb, var(--v4-danger));
  font-weight: 700;
}

/* =========================
   Settings
========================= */

.v4-settings-card {
  margin: 0 14px;
}

.v4-settings-card__title {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.v4-settings-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.v4-settings-list__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--v4-border);
}

.v4-settings-list__item:last-child {
  border-bottom: 0;
}

.v4-settings-list dt {
  color: var(--v4-text-muted);
}

.v4-settings-list dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.v4-settings-notes {
  margin: 0;
  padding-left: 1.2em;
  color: var(--v4-text-muted);
  line-height: 1.8;
}

.v4-settings-actions {
  padding: 0 14px;
}

/* =========================
   Desktop containment
========================= */

@media (min-width: 768px) {
  body {
    background: #08070c;
  }

  .v4-screen {
    max-width: 760px;
    min-height: 100dvh;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.42);
  }

  .v4-lobby-screen {
    padding-inline: 24px;
  }

  .v4-lobby-hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  .v4-room-shell {
    padding-inline: 18px;
  }

  .v4-message {
    max-width: 95%;
  }
}

@media (max-width: 420px) {
  .v4-current-consultation__header,
  .v4-consultation-history__header {
    flex-direction: column;
  }

  .v4-current-consultation__history-button,
  .v4-consultation-history__new-button {
    width: 100%;
  }

  .v4-consultation-card {
    grid-template-columns: 1fr;
  }

  .v4-consultation-card__actions {
    border-left: 0;
    border-top: 1px solid var(--v4-border);
  }

  .v4-consultation-card__delete-button {
    width: 100%;
    min-height: 38px;
  }
}


/* =========================
   v4 Lobby Restore from v2
   - Background
   - Lilith stage
   - Header / Main / Footer
   - Tap reaction / mini talk
========================= */

.v4-home-screen {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(214, 180, 122, 0.16), transparent 34%),
    linear-gradient(180deg, #1a1230 0%, #221538 42%, #1a132d 100%);
}

.v4-home-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("./assets/Hermes-Home-BG-001.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.95;
}

.v4-home-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(18, 12, 28, 0.22) 0%,
      rgba(18, 12, 28, 0.10) 28%,
      rgba(18, 12, 28, 0.42) 100%
    );
}

.v4-home-header {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 18px;
  pointer-events: none;
}

.v4-home-brand {
  color: #f3ddb0;
  font-family: "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.v4-home-subtitle {
  color: rgba(246, 230, 198, 0.92);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.v4-home-stage {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 18px 0;
}

.v4-home-character-wrap {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 430px;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.v4-home-character-button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.v4-home-character {
  display: block;
  width: min(88vw, 360px);
  max-height: 80vh;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.32));
  user-select: none;
  -webkit-user-drag: none;
}

.v4-home-bubble-wrap {
  position: absolute;
  left: 40%;
  top: 50%;
  z-index: 8;
  width: min(56vw, 250px);
  transform: translateX(-128px);
}

.v4-home-bubble {
  border: 1px solid rgba(132, 108, 168, 0.18);
  border-radius: 18px;
  padding: 14px 14px 12px;
  color: #1e1530;
  background: rgba(255, 250, 255, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.v4-home-bubble-text {
  font-size: 16px;
  line-height: 1.55;
  white-space: normal;
}

.v4-home-bubble-link {
  appearance: none;
  border: 0;
  margin-top: 10px;
  padding: 0;
  color: #6749a0;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.v4-home-bottom-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(16px + var(--v4-safe-bottom));
  z-index: 10;
  padding: 14px 14px 16px;
  border: 1px solid rgba(255, 235, 205, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.16),
      rgba(255, 248, 255, 0.08)
    );
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.v4-home-nameplate {
  margin-bottom: 10px;
  color: rgba(248, 232, 200, 0.96);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-align: center;
}

.v4-home-status {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 235, 205, 0.10);
  border-radius: 16px;
  background: rgba(19, 13, 31, 0.24);
}

.v4-home-status__label {
  color: rgba(246, 230, 198, 0.70);
  font-size: 12px;
}

.v4-home-status__title {
  overflow: hidden;
  color: rgba(255, 247, 234, 0.96);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-home-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.v4-home-primary-button,
.v4-home-secondary-button {
  appearance: none;
  min-height: 46px;
  border-radius: 999px;
  cursor: pointer;
}

.v4-home-primary-button {
  border: 1px solid rgba(241, 220, 181, 0.32);
  padding: 0 20px;
  color: #fff7ea;
  background:
    linear-gradient(
      180deg,
      rgba(93, 55, 143, 0.92),
      rgba(64, 35, 102, 0.94)
    );
  box-shadow: 0 8px 20px rgba(50, 26, 81, 0.35);
  font-size: 16px;
  font-weight: 700;
}

.v4-home-secondary-button {
  border: 1px solid rgba(255, 235, 205, 0.18);
  padding: 0 16px;
  color: #fff7ea;
  background: rgba(19, 13, 31, 0.38);
}

.v4-home-mini-talk {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.v4-home-mini-talk-input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(255, 235, 205, 0.18);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  color: #f7f0ff;
  background: rgba(19, 13, 31, 0.42);
}

.v4-home-mini-talk-input::placeholder {
  color: rgba(247, 240, 255, 0.50);
}

.v4-home-mini-talk-input:focus {
  border-color: rgba(243, 221, 176, 0.42);
  box-shadow: 0 0 0 3px rgba(243, 221, 176, 0.10);
}

.v4-home-mini-talk-button {
  appearance: none;
  min-height: 42px;
  border: 1px solid rgba(241, 220, 181, 0.20);
  border-radius: 999px;
  padding: 0 16px;
  color: #fff7ea;
  background: rgba(76, 46, 118, 0.9);
  cursor: pointer;
}

@media (max-width: 420px) {
  .v4-home-header {
    padding-top: 16px;
  }

  .v4-home-brand {
    font-size: 32px;
  }

  .v4-home-character {
    width: min(92vw, 350px);
  }

  .v4-home-bubble-wrap {
    left: 42%;
    top: 48%;
    width: min(62vw, 238px);
    transform: translateX(-122px);
  }

  .v4-home-bottom-panel {
    left: 12px;
    right: 12px;
    bottom: calc(12px + var(--v4-safe-bottom));
    padding: 13px 13px 15px;
  }

  .v4-home-actions {
    grid-template-columns: 1fr 74px;
  }

  .v4-home-secondary-button {
    padding-inline: 12px;
  }

  .v4-home-mini-talk {
    gap: 8px;
  }

  .v4-home-mini-talk-button {
    padding-inline: 12px;
  }
}



/* =========================
   v4 Place Header Restore from v2
   - 3 column header
   - Gold centered title
   - Stable left / center / right layout
========================= */

.v4-place-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(100px, 180px) minmax(0, 1fr) minmax(100px, 180px);
  align-items: center;
  gap: 10px;
  padding: 12px 16px 11px;
  border-bottom: 1px solid rgba(255, 235, 205, 0.12);
  background:
    linear-gradient(
      180deg,
      rgba(24, 17, 35, 0.94),
      rgba(15, 11, 22, 0.86)
    );
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.v4-place-header__side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.v4-place-header__side--left {
  justify-content: flex-start;
}

.v4-place-header__side--right {
  justify-content: flex-end;
}

.v4-place-header__center {
  min-width: 0;
  text-align: center;
}

.v4-place-header__eyebrow {
  margin: 0 0 3px;
  color: rgba(246, 230, 198, 0.74);
  font-family: "Times New Roman", serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.v4-place-header__title {
  margin: 0;
  overflow: hidden;
  color: #f3ddb0;
  font-family: "Times New Roman", serif;
  font-size: 1.72rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(243, 221, 176, 0.14);
}

.v4-place-header__description {
  margin: 5px 0 0;
  overflow: hidden;
  color: rgba(246, 230, 198, 0.74);
  font-size: 0.78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-place-header__button,
.v4-room-header__back-button,
.v4-room-header__settings-button,
.v4-settings-header__back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 235, 205, 0.18);
  border-radius: 999px;
  color: #fff7ea;
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.11),
      rgba(255, 248, 255, 0.055)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.14);
  font-size: 0.88rem;
  white-space: nowrap;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.v4-place-header__button:hover,
.v4-room-header__back-button:hover,
.v4-room-header__settings-button:hover,
.v4-settings-header__back-button:hover {
  border-color: rgba(243, 221, 176, 0.36);
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.16),
      rgba(255, 248, 255, 0.075)
    );
}

.v4-place-header__button:active,
.v4-room-header__back-button:active,
.v4-room-header__settings-button:active,
.v4-settings-header__back-button:active {
  transform: scale(0.97);
}

.v4-place-header__spacer {
  display: block;
  width: 76px;
  height: 40px;
}

/* Override older room/settings header rules */

.v4-room-header__main,
.v4-settings-header {
  min-width: 0;
}

.v4-room-header__text,
.v4-settings-header__text,
.v4-room-header__eyebrow,
.v4-room-header__title,
.v4-room-header__description,
.v4-settings-header__eyebrow,
.v4-settings-header__title,
.v4-settings-header__description {
  all: unset;
}

/* Small screen tuning */

@media (max-width: 420px) {
  .v4-place-header {
    grid-template-columns: minmax(76px, 92px) minmax(0, 1fr) minmax(76px, 92px);
    gap: 7px;
    padding: 10px 11px 10px;
  }

  .v4-place-header__button,
  .v4-room-header__back-button,
  .v4-room-header__settings-button,
  .v4-settings-header__back-button {
    min-width: 72px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .v4-place-header__spacer {
    width: 72px;
    height: 38px;
  }

  .v4-place-header__eyebrow {
    font-size: 0.68rem;
  }

  .v4-place-header__title {
    font-size: 1.44rem;
  }

  .v4-place-header__description {
    margin-top: 4px;
    font-size: 0.70rem;
  }
}



/* =========================
   v4 Phase 4 Folder UI
   - Folder list
   - Folder consultation list
   - Unclassified group
   - Folder delete dialog notice
========================= */

/* =========================
   Folder list view
========================= */

.v4-folder-list-view {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  flex-direction: column;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.083), rgba(255, 255, 255, 0.048));
  box-shadow: var(--v4-shadow-room);
  overflow: hidden;
}

.v4-folder-list-view__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 15px 13px;
  border-bottom: 1px solid var(--v4-border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.v4-folder-list-view__title-block {
  min-width: 0;
}

.v4-folder-list-view__label {
  margin: 0 0 8px;
  color: rgba(239, 208, 255, 0.84);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.10em;
}

.v4-folder-list-view__title {
  margin: 0;
  color: var(--v4-text);
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.v4-folder-list-view__description {
  margin: 8px 0 0;
  color: var(--v4-text-subtle);
  line-height: 1.6;
  font-size: 0.88rem;
}

.v4-folder-list-view__new-consultation-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 235, 205, 0.20);
  border-radius: 999px;
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  box-shadow:
    0 8px 20px rgba(215, 166, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  font-weight: 700;
  white-space: nowrap;
}

.v4-folder-list-view__create {
  flex: 0 0 auto;
  padding: 12px 14px;
  border-bottom: 1px solid var(--v4-border-soft);
  background: rgba(255, 255, 255, 0.025);
}

.v4-folder-list-view__list {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(215, 166, 255, 0.04), transparent 30%);
}

/* =========================
   Folder create form
========================= */

.v4-folder-create {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.v4-folder-create__input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  outline: none;
  color: var(--v4-text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.v4-folder-create__input::placeholder {
  color: var(--v4-text-subtle);
}

.v4-folder-create__input:focus {
  border-color: rgba(240, 209, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(217, 168, 255, 0.14);
}

.v4-folder-create__button {
  min-width: 68px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 235, 205, 0.20);
  border-radius: 999px;
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  font-weight: 700;
  white-space: nowrap;
}

/* =========================
   Folder item
========================= */

.v4-folder-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--v4-radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.047));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.v4-folder-item:active {
  transform: scale(0.992);
}

.v4-folder-item.is-virtual {
  border-color: rgba(243, 221, 176, 0.20);
  background:
    linear-gradient(180deg, rgba(243, 221, 176, 0.105), rgba(255, 255, 255, 0.045));
}

.v4-folder-item.is-active {
  border-color: rgba(239, 208, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(215, 166, 255, 0.18), rgba(255, 255, 255, 0.065));
}

.v4-folder-item__main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-width: 0;
  width: 100%;
  padding: 14px;
  text-align: left;
  color: var(--v4-text);
  background: transparent;
}

.v4-folder-item__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(239, 208, 255, 0.22);
  border-radius: 13px;
  color: var(--v4-accent-strong);
  background:
    radial-gradient(circle, rgba(215, 166, 255, 0.16), rgba(255, 255, 255, 0.055));
  font-size: 1.05rem;
}

.v4-folder-item.is-virtual .v4-folder-item__icon {
  border-color: rgba(243, 221, 176, 0.28);
  color: #f3ddb0;
  background:
    radial-gradient(circle, rgba(243, 221, 176, 0.18), rgba(255, 255, 255, 0.055));
}

.v4-folder-item__body {
  min-width: 0;
}

.v4-folder-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.v4-folder-item__title {
  margin: 0;
  overflow: hidden;
  color: var(--v4-text);
  font-size: 1rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-folder-item__active-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.v4-folder-item__meta {
  margin: 8px 0 0;
  color: var(--v4-text-subtle);
  font-size: 0.78rem;
}

.v4-folder-item__actions {
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--v4-border-soft);
}

.v4-folder-item__delete-button {
  min-width: 58px;
  padding: 0 10px;
  color: #ffc2cc;
  background: rgba(255, 143, 159, 0.055);
  transition:
    color 140ms ease,
    background 140ms ease;
}

.v4-folder-item__delete-button:hover {
  color: #ffe1e6;
  background: rgba(255, 143, 159, 0.12);
}

.v4-folder-list-view__empty-folder-note {
  padding: 16px;
  border: 1px dashed var(--v4-border-strong);
  border-radius: var(--v4-radius-md);
  color: var(--v4-text-muted);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.v4-folder-list-view__empty-folder-note p {
  margin: 0;
  line-height: 1.65;
}

.v4-folder-list-view__empty-folder-note p + p {
  margin-top: 6px;
}

/* =========================
   Folder consultation list
========================= */

.v4-folder-consultation-list {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  flex-direction: column;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.083), rgba(255, 255, 255, 0.048));
  box-shadow: var(--v4-shadow-room);
  overflow: hidden;
}

.v4-folder-consultation-list__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  padding: 13px 14px;
  border-bottom: 1px solid var(--v4-border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.v4-folder-consultation-list__back-button,
.v4-folder-consultation-list__new-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 235, 205, 0.16);
  border-radius: 999px;
  color: #fff7ea;
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.11),
      rgba(255, 248, 255, 0.055)
    );
  font-size: 0.82rem;
  white-space: nowrap;
}

.v4-folder-consultation-list__new-button {
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  font-weight: 700;
}

.v4-folder-consultation-list__title-block {
  min-width: 0;
  text-align: center;
}

.v4-folder-consultation-list__label {
  margin: 0 0 4px;
  color: rgba(239, 208, 255, 0.78);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
}

.v4-folder-consultation-list__title {
  margin: 0;
  overflow: hidden;
  color: var(--v4-text);
  font-size: 1.05rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-folder-consultation-list__description {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--v4-text-subtle);
  font-size: 0.76rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-folder-consultation-list__summary {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--v4-border-soft);
  color: var(--v4-text-subtle);
  font-size: 0.78rem;
}

.v4-folder-consultation-list__body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(215, 166, 255, 0.04), transparent 30%);
}

/* =========================
   Folder consultation empty
========================= */

.v4-folder-consultation-list__empty {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 280px;
  padding: 28px 18px;
  text-align: center;
}

.v4-folder-consultation-list__empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(239, 208, 255, 0.28);
  border-radius: 50%;
  color: var(--v4-accent-strong);
  background:
    radial-gradient(circle, rgba(215, 166, 255, 0.20), rgba(255, 255, 255, 0.06));
}

.v4-folder-consultation-list__empty-title {
  margin: 0;
  color: var(--v4-text);
  font-size: 1.08rem;
  line-height: 1.45;
}

.v4-folder-consultation-list__empty-description {
  max-width: 28em;
  margin: 0;
  color: var(--v4-text-muted);
  line-height: 1.7;
}

.v4-folder-consultation-list__empty-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 235, 205, 0.20);
  border-radius: 999px;
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  font-weight: 700;
}

/* =========================
   Folder delete dialog notice
========================= */

.v4-dialog__notice {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(243, 221, 176, 0.18);
  border-radius: var(--v4-radius-sm);
  color: rgba(255, 247, 234, 0.88);
  background: rgba(243, 221, 176, 0.075);
}

.v4-dialog__notice p {
  margin: 0;
  line-height: 1.65;
  font-size: 0.86rem;
}

.v4-dialog__target-note {
  color: var(--v4-text-subtle);
  font-size: 0.82rem;
}

/* =========================
   Phase 4 small-screen tuning
========================= */

@media (max-width: 420px) {
  .v4-folder-list-view__header {
    flex-direction: column;
    align-items: stretch;
  }

  .v4-folder-list-view__new-consultation-button {
    min-height: 28px;
    padding: 6px;
    width: 100%;
  }

  .v4-folder-create {
    grid-template-columns: 1fr 64px;
  }

  .v4-folder-create__button {
    min-width: 64px;
    padding-inline: 10px;
  }

  .v4-folder-item {
    grid-template-columns: 1fr;
  }

  .v4-folder-item__actions {
    border-left: 0;
    border-top: 1px solid var(--v4-border-soft);
  }

  .v4-folder-item__delete-button {
    width: 100%;
    min-height: 38px;
  }

  .v4-folder-item__header {
    gap: 6px;
  }

  .v4-folder-item__active-badge {
    align-self: flex-start;
  }

  .v4-folder-consultation-list__header {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .v4-folder-consultation-list__title-block {
    text-align: left;
  }

  .v4-folder-consultation-list__back-button,
  .v4-folder-consultation-list__new-button {
    width: 100%;
  }

  .v4-folder-consultation-list__description {
    white-space: normal;
  }
}


/* =========================
   v4 Phase 4 Folder Rename
========================= */

.v4-folder-item__actions {
  display: grid;
  grid-template-columns: auto;
  min-width: 70px;
}

.v4-folder-item__rename-button,
.v4-folder-item__delete-button {
  min-width: 70px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.v4-folder-item__rename-button {
  color: rgba(255, 247, 234, 0.92);
  background: rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid var(--v4-border-soft);
  transition:
    color 140ms ease,
    background 140ms ease;
}

.v4-folder-item__rename-button:hover {
  color: #fff7ea;
  background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 420px) {
  .v4-folder-item__actions {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .v4-folder-item__rename-button,
  .v4-folder-item__delete-button {
    width: 100%;
    min-height: 40px;
  }

  .v4-folder-item__rename-button {
    border-bottom: 0;
    border-right: 1px solid var(--v4-border-soft);
  }
}


/* =========================
   v4 Phase 4 Consultation Rename
========================= */

.v4-consultation-card__actions {
  display: grid;
  grid-template-columns: auto;
  min-width: 70px;
}

.v4-consultation-card__rename-button,
.v4-consultation-card__delete-button {
  min-width: 70px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.v4-consultation-card__rename-button {
  color: rgba(255, 247, 234, 0.92);
  background: rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid var(--v4-border-soft);
  transition:
    color 140ms ease,
    background 140ms ease;
}

.v4-consultation-card__rename-button:hover {
  color: #fff7ea;
  background: rgba(255, 255, 255, 0.10);
}

.v4-current-consultation__actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
}

.v4-current-consultation__rename-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--v4-border-soft);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.92);
  background: rgba(255, 255, 255, 0.075);
  font-size: 0.82rem;
  white-space: nowrap;
}

.v4-current-consultation__rename-button:hover {
  color: #fff7ea;
  background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 420px) {
  .v4-consultation-card__actions {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .v4-consultation-card__rename-button,
  .v4-consultation-card__delete-button {
    width: 100%;
    min-height: 40px;
  }

  .v4-consultation-card__rename-button {
    border-bottom: 0;
    border-right: 1px solid var(--v4-border-soft);
  }

  .v4-current-consultation__actions {
    flex-direction: row;
  }

  .v4-current-consultation__rename-button,
  .v4-current-consultation__history-button {
    flex: 1;
    width: auto;
  }
}


/* =========================
   v4 Phase 4 Folder Header Rename
========================= */

.v4-folder-consultation-list__actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
}

.v4-folder-consultation-list__rename-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 235, 205, 0.16);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.92);
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.11),
      rgba(255, 248, 255, 0.055)
    );
  font-size: 0.82rem;
  white-space: nowrap;
}

.v4-folder-consultation-list__rename-button:hover {
  color: #fff7ea;
  background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 420px) {
  .v4-folder-consultation-list__actions {
    width: 100%;
    flex-direction: row;
  }

  .v4-folder-consultation-list__rename-button,
  .v4-folder-consultation-list__new-button {
    flex: 1;
    width: auto;
  }
}


/* =========================
   v4 Phase 4 Consultation Move
========================= */

.v4-consultation-card__move {
  display: grid;
  gap: 4px;
  min-width: 112px;
  padding: 8px 8px;
  border-bottom: 1px solid var(--v4-border-soft);
  background: rgba(255, 255, 255, 0.035);
}

.v4-consultation-card__move-label {
  color: var(--v4-text-subtle);
  font-size: 0.68rem;
  line-height: 1;
}

.v4-consultation-card__move-select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--v4-text);
  background: rgba(18, 15, 26, 0.86);
  font-size: 0.76rem;
  outline: none;
}

.v4-consultation-card__move-select:focus {
  border-color: rgba(240, 209, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(217, 168, 255, 0.14);
}

@media (max-width: 420px) {
  .v4-consultation-card__move {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 9px 10px;
  }

  .v4-consultation-card__move-select {
    min-height: 34px;
  }
}


/* =========================
   v4 Phase 5 Common UI
   - Action menu
   - Dialog shell helpers
   - Add card
   - Status badge
   - Target preview
   - Warning block
========================= */

/* Action menu */

.v4-action-menu-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v4-action-menu-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 235, 205, 0.16);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.92);
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.11),
      rgba(255, 248, 255, 0.055)
    );
  font-size: 1.2rem;
  line-height: 1;
}

.v4-action-menu-button:hover,
.v4-action-menu-button.is-open {
  color: #fff7ea;
  border-color: rgba(243, 221, 176, 0.36);
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.16),
      rgba(255, 248, 255, 0.075)
    );
}

.v4-action-menu {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 50;
  display: grid;
  min-width: 164px;
  padding: 6px;
  border: 1px solid rgba(255, 235, 205, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(33, 23, 46, 0.98), rgba(23, 17, 32, 0.98));
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.v4-action-menu--right {
  right: 0;
}

.v4-action-menu--left {
  left: 0;
}

.v4-action-menu__item {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 11px;
  color: rgba(255, 247, 234, 0.92);
  background: transparent;
  font-size: 0.86rem;
  text-align: left;
}

.v4-action-menu__item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.v4-action-menu__item.is-danger {
  color: #ffc2cc;
}

.v4-action-menu__item.is-danger:hover {
  color: #ffe1e6;
  background: rgba(255, 143, 159, 0.12);
}

.v4-action-menu__item:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

/* Dialog shell */

.v4-dialog-shell {
  max-height: min(680px, calc(100dvh - 32px));
  overflow: hidden;
}

.v4-dialog__close-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--v4-border-soft);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.86);
  background: rgba(255, 255, 255, 0.065);
}

.v4-dialog__body {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  overflow-y: auto;
}

.v4-dialog__confirm-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 235, 205, 0.20);
  border-radius: 999px;
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  font-weight: 700;
}

/* Target preview */

.v4-target-preview-card {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-sm);
  background: rgba(255, 255, 255, 0.055);
}

.v4-target-preview-card__label {
  color: var(--v4-text-subtle);
  font-size: 0.74rem;
}

.v4-target-preview-card__title {
  overflow: hidden;
  color: var(--v4-text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-target-preview-card__meta,
.v4-target-preview-card__note {
  color: var(--v4-text-muted);
  font-size: 0.82rem;
}

/* Warning block */

.v4-warning-block {
  padding: 11px 12px;
  border-radius: var(--v4-radius-sm);
  line-height: 1.65;
}

.v4-warning-block--warning {
  border: 1px solid rgba(243, 221, 176, 0.18);
  color: rgba(255, 247, 234, 0.90);
  background: rgba(243, 221, 176, 0.075);
}

.v4-warning-block--danger {
  border: 1px solid rgba(255, 143, 159, 0.22);
  color: #ffe1e6;
  background: rgba(255, 143, 159, 0.085);
}

.v4-warning-block__title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.v4-warning-block__message {
  margin: 0;
  font-size: 0.86rem;
}

/* Add card */

.v4-add-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  align-items: center;
  padding: 14px;
  border: 1px dashed rgba(243, 221, 176, 0.28);
  border-radius: var(--v4-radius-md);
  color: rgba(255, 247, 234, 0.92);
  background:
    linear-gradient(180deg, rgba(243, 221, 176, 0.075), rgba(255, 255, 255, 0.035));
  text-align: left;
}

.v4-add-card:hover {
  border-color: rgba(243, 221, 176, 0.46);
  background:
    linear-gradient(180deg, rgba(243, 221, 176, 0.12), rgba(255, 255, 255, 0.05));
}

.v4-add-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(243, 221, 176, 0.28);
  border-radius: 50%;
  color: #f3ddb0;
  background: rgba(243, 221, 176, 0.10);
  font-size: 1.25rem;
}

.v4-add-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v4-add-card__title {
  color: var(--v4-text);
  font-weight: 700;
}

.v4-add-card__description {
  color: var(--v4-text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* Status badge */

.v4-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.v4-status-badge--default {
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
}

.v4-status-badge--subtle {
  color: rgba(255, 247, 234, 0.84);
  background: rgba(255, 255, 255, 0.085);
}

.v4-status-badge--warning {
  color: #2f210b;
  background: #f3ddb0;
}

.v4-status-badge--danger {
  color: #3a1018;
  background: #ffc2cc;
}

@media (max-width: 420px) {
  .v4-action-menu {
    min-width: 156px;
  }

  .v4-dialog-shell {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .v4-add-card {
    min-height: 68px;
  }
}

/* =========================
   v4 Phase 5 Consultation Card Action Menu
========================= */

.v4-consultation-card {
  position: relative;
}

.v4-consultation-card__main {
  padding-right: 54px;
}

.v4-consultation-card__actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  min-width: 0;
}

.v4-consultation-card__actions .v4-action-menu-container {
  display: inline-flex;
}

/* Phase 4 move select / old side buttons cleanup */

.v4-consultation-card__move {
  display: none;
}

.v4-consultation-card__rename-button,
.v4-consultation-card__delete-button {
  display: none;
}

/* =========================
   v4 Phase 5 Move Dialog
========================= */

.v4-move-dialog__options {
  display: grid;
  gap: 8px;
}

.v4-move-dialog__option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: 100%;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-sm);
  color: var(--v4-text);
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.v4-move-dialog__option:hover {
  border-color: rgba(243, 221, 176, 0.28);
  background: rgba(255, 255, 255, 0.085);
}

.v4-move-dialog__option.is-selected {
  border-color: rgba(239, 208, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(215, 166, 255, 0.18), rgba(255, 255, 255, 0.065));
}

.v4-move-dialog__option-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v4-move-dialog__option-name {
  overflow: hidden;
  color: var(--v4-text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-move-dialog__option-description {
  color: var(--v4-text-subtle);
  font-size: 0.82rem;
}

.v4-move-dialog__option-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #21132e;
  background:
    linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  font-size: 0.85rem;
  font-weight: 700;
}

.v4-dialog__inline-error {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 143, 159, 0.22);
  border-radius: var(--v4-radius-sm);
  color: #ffe1e6;
  background: rgba(255, 143, 159, 0.085);
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 420px) {
  .v4-consultation-card__main {
    padding-right: 50px;
  }

  .v4-consultation-card__actions {
    top: 9px;
    right: 9px;
  }

  .v4-move-dialog__option {
    padding: 11px;
  }
}


/* =========================
   v4 Phase 5 Action Menu Clipping Fix
========================= */

.v4-consultation-card {
  overflow: visible;
}

.v4-consultation-card__actions {
  z-index: 30;
}

.v4-consultation-card__actions .v4-action-menu {
  z-index: 80;
}

/* =========================
   v4 Phase 5 Action Menu Opaque / Layer Fix
========================= */

.v4-consultation-card {
  position: relative;
  z-index: 1;
}

.v4-consultation-card.is-menu-open {
  z-index: 60;
}

.v4-consultation-card.is-menu-open .v4-action-menu-container {
  z-index: 90;
}

.v4-consultation-card.is-menu-open .v4-action-menu {
  z-index: 100;
}

/* Make action menu visually opaque and prevent lower controls from showing through */

.v4-action-menu {
  background: #171120;
  border-color: rgba(243, 221, 176, 0.26);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: none;
  pointer-events: auto;
}

.v4-action-menu__item {
  background: #171120;
}

.v4-action-menu__item:hover {
  background: #261b35;
}

.v4-action-menu__item.is-danger:hover {
  background: #39202a;
}

/* =========================
   v4 Phase 5 Current Consultation Action Menu
========================= */

.v4-current-consultation__header {
  position: relative;
}

.v4-current-consultation__actions {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 40;
}

.v4-current-consultation__actions .v4-action-menu-container {
  z-index: 90;
}

.v4-current-consultation__actions .v4-action-menu {
  z-index: 100;
}

/* Hide old Phase 4 buttons if any remain in DOM */

.v4-current-consultation__rename-button,
.v4-current-consultation__history-button {
  display: none;
}

@media (max-width: 420px) {
  .v4-current-consultation__header {
    gap: 10px;
  }

  .v4-current-consultation__actions {
    align-self: flex-start;
  }
}

/* =========================
   v4 Phase 5 Folder Action Menu
========================= */

.v4-folder-item {
  position: relative;
  overflow: visible;
  z-index: 1;
}

.v4-folder-item.is-menu-open {
  z-index: 60;
}

.v4-folder-item__main {
  padding-right: 54px;
}

.v4-folder-item__actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 30;
  display: flex;
  min-width: 0;
  border-left: 0;
}

.v4-folder-item__actions .v4-action-menu-container {
  z-index: 90;
}

.v4-folder-item__actions .v4-action-menu {
  z-index: 100;
}

/* Hide old Phase 4 folder side buttons if any remain */

.v4-folder-item__rename-button,
.v4-folder-item__delete-button {
  display: none;
}

/* Folder header action menu */

.v4-folder-consultation-list__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 42px;
}

.v4-folder-consultation-list__actions .v4-action-menu-container {
  z-index: 90;
}

.v4-folder-consultation-list__actions .v4-action-menu {
  z-index: 100;
}

/* Hide old Phase 4 header buttons if any remain */

.v4-folder-consultation-list__rename-button,
.v4-folder-consultation-list__new-button {
  display: none;
}

@media (max-width: 420px) {
  .v4-folder-item__main {
    padding-right: 50px;
  }

  .v4-folder-item__actions {
    top: 9px;
    right: 9px;
  }

  .v4-folder-consultation-list__actions {
    justify-content: flex-start;
  }
}

/* =========================
   v4 Phase 5 Create Dialog / AddCard Migration
========================= */

/* Hide old folder create form if any remains */

.v4-folder-list-view__create,
.v4-folder-create {
  display: none;
}

/* Create dialog */

.v4-create-dialog__field {
  display: grid;
  gap: 7px;
}

.v4-create-dialog__label {
  color: var(--v4-text-subtle);
  font-size: 0.82rem;
  font-weight: 700;
}

.v4-create-dialog__input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  outline: none;
  color: var(--v4-text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.v4-create-dialog__input::placeholder {
  color: var(--v4-text-subtle);
}

.v4-create-dialog__input:focus {
  border-color: rgba(240, 209, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(217, 168, 255, 0.14);
}

.v4-create-dialog__helper {
  margin: 0;
  color: var(--v4-text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* AddCard spacing in folder / consultation lists */

.v4-folder-list-view__list > .v4-add-card,
.v4-folder-consultation-list__body > .v4-add-card {
  flex: 0 0 auto;
}

.v4-folder-consultation-list__body > .v4-add-card {
  margin-top: 2px;
}

/* Old empty button no longer used */

.v4-folder-consultation-list__empty-button {
  display: none;
}

/* =========================
   v4 Phase 5 Rename Dialog
========================= */

.v4-rename-dialog__field {
  display: grid;
  gap: 7px;
}

.v4-rename-dialog__label {
  color: var(--v4-text-subtle);
  font-size: 0.82rem;
  font-weight: 700;
}

.v4-rename-dialog__input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  outline: none;
  color: var(--v4-text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.v4-rename-dialog__input::placeholder {
  color: var(--v4-text-subtle);
}

.v4-rename-dialog__input:focus {
  border-color: rgba(240, 209, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(217, 168, 255, 0.14);
}

/* =========================
   v4 Phase 5 Delete Dialog
========================= */

.v4-delete-dialog .v4-target-preview-card {
  border-color: rgba(255, 143, 159, 0.18);
  background: rgba(255, 143, 159, 0.055);
}

.v4-delete-dialog .v4-dialog__body {
  gap: 13px;
}

.v4-delete-dialog .v4-dialog__danger-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 143, 159, 0.32);
  border-radius: 999px;
  color: #3a1018;
  background: #ffc2cc;
  font-weight: 700;
}

.v4-delete-dialog .v4-dialog__danger-button:hover {
  background: #ffe1e6;
}

.v4-delete-dialog .v4-dialog__danger-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

/* =========================
   v4 Phase 5 Settings Screen Tuning
========================= */

 .v4-settings-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.v4-settings-header {
  flex: 0 0 auto;
  padding: 16px;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.083), rgba(255, 255, 255, 0.048));
  box-shadow: var(--v4-shadow-room);
}

.v4-settings-header__label,
.v4-settings-section__label {
  margin: 0 0 8px;
  color: rgba(239, 208, 255, 0.84);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v4-settings-header__title,
.v4-settings-section__title {
  margin: 0;
  color: var(--v4-text);
  line-height: 1.35;
}

.v4-settings-header__title {
  font-size: 1.35rem;
}

.v4-settings-section__title {
  font-size: 1.05rem;
}

.v4-settings-header__description,
.v4-settings-section__description {
  margin: 8px 0 0;
  color: var(--v4-text-subtle);
  font-size: 0.88rem;
  line-height: 1.65;
}

.v4-settings-section-block {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 6px;
}

.v4-settings-section {
  flex: 0 0 auto;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.038));
  box-shadow: var(--v4-shadow-room);
}

.v4-settings-section--developer {
  flex: 1 1 auto;
  min-height: 0;
}

.v4-settings-placeholder {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--v4-border-strong);
  border-radius: var(--v4-radius-sm);
  color: var(--v4-text-muted);
  background: rgba(255, 255, 255, 0.035);
  line-height: 1.65;
}

.v4-settings-placeholder p {
  margin: 0;
}

.v4-settings-dev-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

/* .v4-settings-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-sm);
  background: rgba(255, 255, 255, 0.045);
} */
 .v4-settings-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 11px;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.v4-settings-item__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.v4-settings-item__label {
  color: var(--v4-text);
  font-size: 0.86rem;
  font-weight: 700;
}

.v4-settings-item__description {
  color: var(--v4-text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.v4-settings-item__value {
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.88);
  background: rgba(255, 255, 255, 0.075);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-settings-footer {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 0 0;
}

.v4-settings-screen__nav-button {
  min-height: 44px;
  border: 1px solid rgba(255, 235, 205, 0.16);
  border-radius: 999px;
  color: #fff7ea;
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.11),
      rgba(255, 248, 255, 0.055)
    );
  font-weight: 700;
}

.v4-settings-screen__nav-button:hover {
  border-color: rgba(243, 221, 176, 0.34);
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 255, 0.16),
      rgba(255, 248, 255, 0.075)
    );
}

@media (max-width: 420px) {
  .v4-settings-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .v4-settings-item__value {
    width: fit-content;
  }
}

/* =========================
   v4 Phase 5 Settings Header Layout Fix
========================= */

.v4-settings-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  min-height: 116px;
  padding: 18px 20px;
  border: 1px solid var(--v4-border-soft);
  border-radius: var(--v4-radius-lg);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.083),
      rgba(255, 255, 255, 0.048)
    );
  box-shadow: var(--v4-shadow-room);
}

.v4-settings-hero__side {
  min-width: 0;
  min-height: 44px;
}

.v4-settings-hero__center {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.v4-settings-hero__eyebrow {
  margin: 0;
  color: rgba(239, 208, 255, 0.84);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v4-settings-hero__title {
  margin: 0;
  color: var(--v4-text);
  font-size: 1.8rem;
  line-height: 1.25;
}

.v4-settings-hero__description {
  max-width: 56ch;
  margin: 0;
  color: var(--v4-text-subtle);
  font-size: 0.92rem;
  line-height: 1.65;
}

@media (max-width: 420px) {
  .v4-settings-hero {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: auto;
    padding: 16px 14px;
  }

  .v4-settings-hero__title {
    font-size: 1.45rem;
  }

  .v4-settings-hero__description {
    font-size: 0.86rem;
  }
}

/* =========================
   v4 Phase 5 Dialog Close Button Removal
========================= */

.v4-dialog__header {
  justify-content: center;
  text-align: center;
}

.v4-dialog__title {
  width: 100%;
  text-align: center;
}

.v4-dialog__close-button {
  display: none;
}


/* =========================
   v4 Phase 5 Duplicate Label Cleanup
========================= */

.v4-current-consultation__folder-name {
  margin: 0 0 8px;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 9px;
  border: 1px solid rgba(243, 221, 176, 0.20);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.88);
  background: rgba(243, 221, 176, 0.075);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Safety: if old duplicate labels remain in DOM, hide them */

.v4-folder-list-view__label,
.v4-folder-consultation-list__label {
  display: none;
}


/* =========================
   v4 Phase 6 Network Access Toggle
========================= */

.v4-message-input-bar__network-toggle {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255, 235, 205, 0.16);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.78);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.v4-message-input-bar__network-toggle:hover {
  border-color: rgba(243, 221, 176, 0.32);
  color: rgba(255, 247, 234, 0.92);
  background: rgba(255, 255, 255, 0.08);
}

.v4-message-input-bar__network-toggle.is-active {
  border-color: rgba(176, 225, 255, 0.44);
  color: #e9f7ff;
  background: rgba(94, 181, 255, 0.16);
}

.v4-message-input-bar__network-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.v4-message-input-bar__network-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 247, 234, 0.34);
}

.v4-message-input-bar__network-toggle.is-active
  .v4-message-input-bar__network-dot {
  background: #8ed7ff;
  box-shadow: 0 0 10px rgba(142, 215, 255, 0.62);
}

@media (max-width: 420px) {
  .v4-message-input-bar__network-toggle {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.72rem;
  }
}


/* =========================
   v4 Small Screen UI Adjustment
   Lobby simple bottom panel
========================= */

.v4-home-bottom-panel--simple {
  display: flex;
  gap: 20px;
  margin: 0 auto;
  padding: 10px 14px 14px;
}

.v4-home-bottom-panel--simple .v4-home-primary-button {
  width: min(100%, 360px);
  min-height: 42px;
  justify-self: center;
  padding: 0 18px;
  font-size: 0.96rem;
}

.v4-home-bottom-panel--simple .v4-home-secondary-button,
.v4-home-bottom-panel--simple .v4-home-status,
.v4-home-bottom-panel--simple .v4-home-mini-talk {
  display: none;
}
/* v4 Theme 1-A: assistant response mode label */
.v4-message__response-mode {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 247, 234, 0.16);
  border-radius: 999px;
  color: var(--v4-text-subtle);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.68rem;
  line-height: 1.3;
  white-space: nowrap;
}

.v4-message__response-mode.is-network {
  border-color: rgba(184, 231, 255, 0.28);
  background: rgba(116, 196, 255, 0.10);
}

.v4-message__response-mode.is-network-failed {
  border-color: rgba(255, 214, 153, 0.28);
  background: rgba(255, 194, 102, 0.10);
}

/* =========================
   v4 Theme 1-B: Markdown message body
========================= */
.v4-message-markdown {
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: normal;
}

.v4-message-markdown > *:first-child {
  margin-top: 0;
}

.v4-message-markdown > *:last-child {
  margin-bottom: 0;
}

.v4-message-markdown p {
  margin: 0.55em 0;
}

.v4-message-markdown h1,
.v4-message-markdown h2,
.v4-message-markdown h3,
.v4-message-markdown h4 {
  margin: 0.95em 0 0.42em;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.v4-message-markdown h1 {
  font-size: 1.18rem;
}

.v4-message-markdown h2 {
  font-size: 1.08rem;
}

.v4-message-markdown h3,
.v4-message-markdown h4 {
  font-size: 1rem;
}

.v4-message-markdown ul,
.v4-message-markdown ol {
  margin: 0.55em 0;
  padding-left: 1.35em;
}

.v4-message-markdown li {
  margin: 0.25em 0;
  padding-left: 0.1em;
}

.v4-message-markdown strong {
  font-weight: 700;
}

.v4-message-markdown code {
  padding: 0.1em 0.34em;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.22);
}

.v4-message-markdown__pre {
  max-width: 100%;
  margin: 0.7em 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  overflow-x: auto;
  color: rgba(255, 247, 234, 0.94);
  background: rgba(0, 0, 0, 0.28);
  -webkit-overflow-scrolling: touch;
}

.v4-message-markdown__pre code,
.v4-message-markdown code.v4-message-markdown__code-block {
  display: block;
  min-width: max-content;
  padding: 0;
  border: 0;
  border-radius: 0;
  line-height: 1.62;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  background: transparent;
}

.v4-message-markdown a {
  color: rgba(207, 228, 255, 0.98);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.v4-message-markdown blockquote {
  margin: 0.7em 0;
  padding: 0.1em 0 0.1em 0.85em;
  border-left: 3px solid rgba(255, 247, 234, 0.24);
  color: var(--v4-text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.v4-message-markdown blockquote p {
  margin: 0.42em 0;
}

.v4-message-markdown__hr {
  margin: 0.85em 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 420px) {
  .v4-message__meta {
    flex-wrap: wrap;
  }

  .v4-message-markdown {
    line-height: 1.68;
  }

  .v4-message-markdown h1 {
    font-size: 1.08rem;
  }

  .v4-message-markdown h2 {
    font-size: 1.02rem;
  }

  .v4-message-markdown h3,
  .v4-message-markdown h4 {
    font-size: 0.96rem;
  }

  .v4-message-markdown ul,
  .v4-message-markdown ol {
    padding-left: 1.15em;
  }

  .v4-message-markdown__pre {
    padding: 10px;
  }
}

/* =========================
   v4 Theme 2 POC-1 Voice Input
========================= */

.v4-message-input-bar__voice-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255, 235, 205, 0.16);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.78);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.v4-message-input-bar__voice-button:hover {
  border-color: rgba(243, 221, 176, 0.32);
  color: rgba(255, 247, 234, 0.92);
  background: rgba(255, 255, 255, 0.08);
}

.v4-message-input-bar__voice-button.is-active {
  border-color: rgba(255, 205, 147, 0.46);
  color: #fff1da;
  background: rgba(255, 172, 88, 0.16);
}

.v4-message-input-bar__voice-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.v4-message-input-bar__voice-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.v4-message-input__voice-status {
  margin: 8px 0 0;
  color: var(--v4-text-subtle);
  font-size: 0.74rem;
  line-height: 1.5;
}

.v4-message-input__voice-status.is-listening,
.v4-message-input__voice-status.is-transcribing {
  color: rgba(255, 241, 218, 0.86);
}

.v4-message-input__voice-status.is-completed {
  color: rgba(191, 237, 216, 0.92);
}

.v4-message-input__voice-status.is-failed,
.v4-message-input__voice-status.is-unsupported,
.v4-message-input__voice-status.is-permission_denied {
  color: rgba(255, 194, 194, 0.92);
}

/* =========================
   v4 Theme 2 POC-1.5 Continuous Voice Input
========================= */

.v4-message-input__voice-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v4-message-input__voice-preview {
  margin: 8px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 235, 205, 0.12);
  border-radius: 12px;
  color: rgba(255, 247, 234, 0.82);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
  line-height: 1.55;
  max-height: 128px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.v4-message-input__voice-preview-label {
  margin: 0 0 4px;
  color: rgba(255, 247, 234, 0.58);
  font-size: 0.7rem;
  font-weight: 700;
}

.v4-message-input__voice-preview-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.v4-message-input__voice-preview-text.is-interim {
  margin-top: 4px;
  color: rgba(255, 247, 234, 0.52);
}

/* =========================
   v4 Theme 2 Formal Voice Input UI
   案E': 二層グループ型 + 安全オーバーレイプレビュー型
========================= */

.v4-message-input {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(18, 15, 26, 0.72);
}

.v6-message-input__send-group {
  position: relative;
  display: grid;
  gap: 8px;
  /* padding: 9px; */
}

.v6-message-input__compose-group {
  overflow: visible;
  gap: 6px;
  display: flex;
  flex-direction: column;
}

.v4-message-input__group {
  display: flex;
  gap: 6px;
}

.v4-message-input__group-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(239, 208, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.v4-message-input__group-number {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #21132e;
  background: linear-gradient(180deg, #f7e4ff 0%, var(--v4-accent-strong) 100%);
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(217, 168, 255, 0.18);
}

.v4-message-input__voice-add-button {
  display: inline-flex;
  width: 100%;
  max-width: 140px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(243, 221, 176, 0.22);
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 248, 255, 0.12), rgba(255, 248, 255, 0.055));
  font-weight: 700;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.v4-message-input__voice-add-button:hover:not(:disabled) {
  border-color: rgba(243, 221, 176, 0.40);
  background:
    linear-gradient(180deg, rgba(255, 248, 255, 0.17), rgba(255, 248, 255, 0.085));
}

.v4-message-input__voice-add-button:active:not(:disabled) {
  transform: scale(0.99);
}

.v4-message-input__voice-add-icon {
  color: var(--v4-accent-strong);
  font-size: 1.08rem;
  line-height: 1;
}

.v4-message-input__voice-add-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v6-message-input__textarea {
  width: 100%;
  min-height: 48px;
  max-height: 132px;
  padding: 12px 13px;
  border: 1px solid var(--v4-border);
  border-radius: 16px;
  outline: none;
  overflow-y: auto;
  resize: none;
  color: var(--v4-text);
  background: rgba(255, 255, 255, 0.09);
  line-height: 1.55;
}

.v6-message-input__textarea::placeholder {
  color: var(--v4-text-subtle);
}

.v6-message-input__textarea:focus {
  border-color: rgba(240, 209, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(217, 168, 255, 0.14);
}

.v4-message-input__send-helper {
  margin: -2px 0 0;
  color: var(--v4-text-subtle);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.v4-message-input__send-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(94px, 1fr);
  gap: 8px;
  align-items: stretch;
}

.v4-message-input__send-actions .v4-message-input-bar__network-toggle,
.v4-message-input__send-actions .v4-message-input__send-button {
  width: 100%;
  min-height: 42px;
}

.v6-message-input__send-group.is-disabled {
  opacity: 0.56;
}

.v6-message-input__send-group.is-disabled .v4-message-input__send-helper {
  color: rgba(255, 247, 234, 0.52);
}

.v4-message-input__voice-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: rgba(239, 208, 255, 0.88);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

.v4-message-input__voice-status.is-completed::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #21132e;
  background: var(--v4-accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.v4-message-input__voice-status.is-failed,
.v4-message-input__voice-status.is-permission_denied,
.v4-message-input__voice-status.is-unsupported {
  color: #ffd8df;
}

.v4-voice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: auto;
}

.v4-voice-overlay {
  position: absolute;
  left: 9px;
  right: 9px;
  top: -20px;
  z-index: 901;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(239, 208, 255, 0.36);
  border-radius: 18px;
  padding: 10px;
  color: var(--v4-text);
  background: #21172f;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.v4-voice-overlay__header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.v4-voice-overlay__listening-mark {
  flex: 0 0 auto;
  color: var(--v4-accent-strong);
  font-size: 0.75rem;
  letter-spacing: -0.08em;
  opacity: 0.92;
}

.v4-voice-overlay__status {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(255, 247, 234, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.v4-voice-overlay__stop-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(243, 221, 176, 0.28);
  border-radius: 999px;
  color: #fff7ea;
  background:
    linear-gradient(180deg, rgba(115, 79, 158, 0.96), rgba(74, 47, 112, 0.98));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  font-weight: 800;
}

.v4-voice-overlay__body {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.065);
}

.v4-voice-overlay__label {
  margin: 0;
  color: rgba(239, 208, 255, 0.92);
  font-size: 0.74rem;
  font-weight: 800;
}

.v4-voice-overlay__preview {
  max-height: 112px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.v4-voice-overlay__preview-text,
.v4-voice-overlay__preview-empty {
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 247, 234, 0.92);
  font-size: 0.88rem;
  line-height: 1.6;
}

.v4-voice-overlay__preview-text.is-interim {
  color: rgba(255, 247, 234, 0.58);
}

.v4-voice-overlay__preview-empty {
  color: var(--v4-text-subtle);
}

.v4-voice-overlay__note {
  margin: 2px 0 0;
  color: rgba(255, 247, 234, 0.58);
  font-size: 0.70rem;
  line-height: 1.45;
}

/* Hide legacy POC voice preview/actions if stale DOM or old CSS remains. */
.v4-message-input__voice-actions,
.v4-message-input__voice-preview {
  display: none;
}


/* v6 request POC1: consultation summary action */
.v6-current-consultation__request-action {
  padding: 0 16px 12px;
}

.v6-request-summary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(12, 10, 18, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.v6-request-summary-action__body {
  min-width: 0;
}

.v6-request-summary-action__eyebrow {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
}

.v6-request-summary-action__description {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
}

.v6-request-summary-action__error {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #ffd1d1;
}

.v6-request-summary-action__button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.v6-request-summary-action__button:disabled {
  cursor: default;
  opacity: 0.7;
}

.v6-request-summary-action--done {
  border-color: rgba(166, 255, 214, 0.28);
}

.v6-request-summary-action--failed {
  border-color: rgba(255, 160, 160, 0.34);
}

@media (max-width: 720px) {
  .v6-request-summary-action {
    align-items: stretch;
    flex-direction: column;
  }

  .v6-request-summary-action__button {
    width: 100%;
  }
}

/* v6 POC1: request reports and request detail */
.v6-lobby-reports {
  width: min(100%, 420px);
  margin: 0 auto 14px;
}

.v6-lobby-reports__more {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  text-align: center;
}

.v6-lobby-report-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(18, 20, 38, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  color: #fff;
  text-align: left;
}

.v6-lobby-report-card__eyebrow {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.v6-lobby-report-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.v6-lobby-report-card__meta {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 0.82rem;
}

.v6-lobby-report-card__meta-row {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 8px;
}

.v6-lobby-report-card__meta dt {
  color: rgba(255, 255, 255, 0.64);
}

.v6-lobby-report-card__meta dd {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  overflow-wrap: anywhere;
}

.v6-lobby-report-card__button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1b1b2f;
  font-weight: 700;
  cursor: pointer;
}

.v6-lobby-report-card__button:hover {
  background: #fff;
}

.v6-request-detail-screen {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, #16172b 0%, #24243d 50%, #10101f 100%);
  color: #fff;
}

.v6-request-detail {
  width: min(100%, 880px);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.v6-request-detail__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.v6-request-detail__main {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: grid;
  gap: 16px;
  padding-right: 2px;
}

.v6-request-detail__eyebrow {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.v6-request-detail__header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.25;
}

.v6-request-detail__status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.v6-request-detail__error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 92, 92, 0.16);
  color: #ffdada;
}

.v6-request-detail-meta,
.v6-request-detail-section {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.v6-request-detail-meta {
  display: grid;
  gap: 8px;
}

.v6-request-detail-meta__row {
  display: grid;
  grid-template-columns: 6em minmax(0, 1fr);
  gap: 10px;
}

.v6-request-detail-meta dt {
  color: rgba(255, 255, 255, 0.62);
}

.v6-request-detail-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.v6-request-detail-section h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.v6-request-detail-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.v6-request-step-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.v6-request-step-list__item {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.v6-request-step-list__order {
  display: inline-grid;
  place-items: center;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.v6-request-step-list__title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.v6-request-step-list__status {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.8rem;
  white-space: nowrap;
}

.v6-request-artifact-preview__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.v6-request-artifact-preview__title {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
}

.v6-request-artifact-preview__body {
  max-height: min(58dvh, 620px);
  overflow-y: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #202036;
}

.v6-request-detail__actions {
  display: grid;
  gap: 10px;
  padding-bottom: env(safe-area-inset-bottom);
}

.v6-request-detail__button,
.v6-request-detail__back {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #191a2e;
  font-weight: 700;
  cursor: pointer;
}

.v6-request-detail__button--secondary,
.v6-request-detail__back {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

@media (max-width: 640px) {
  .v6-request-detail__header {
    display: grid;
  }

  .v6-request-detail-meta__row,
  .v6-lobby-report-card__meta-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .v6-request-step-list__item {
    grid-template-columns: 2.2em minmax(0, 1fr);
  }

  .v6-request-step-list__status {
    grid-column: 2;
  }

  .v6-request-artifact-preview__body {
    max-height: 56dvh;
  }
}

/* v6.1 request lifecycle / translated status UI */
.v6-screen-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.v6-request-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.25rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.v6-lobby-request-status-card,
.v6-request-list-panel,
.v6-request-card,
.v6-request-detail {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(16, 16, 24, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.v6-lobby-request-status-card {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.v6-lobby-request-status-card h2,
.v6-request-card__title,
.v6-request-list-header h1,
.v6-request-detail__header h1 {
  margin: 0;
}

.v6-lobby-request-status-card p,
.v6-request-card__description,
.v6-request-detail__description,
.v6-request-list-header p {
  margin: 0.35rem 0 0;
  line-height: 1.7;
}

.v6-lobby-request-status-card__meta {
  font-size: 0.78rem;
  opacity: 0.72;
}

.v6-lobby-request-status-card__actions,
.v6-request-card__actions,
.v6-request-list-actions,
.v6-request-detail__actions,
.v6-request-detail-secondary-actions,
.v6-request-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.v6-lobby-request-status-link {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.v6-lobby-request-status-card__button,
.v6-lobby-request-status-link__button,
.v6-request-card__button,
.v6-request-list-actions__button,
.v6-request-list-empty__button,
.v6-request-detail__button,
.v6-request-detail__back {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.v6-lobby-request-status-card__button--secondary,
.v6-request-detail__button--secondary {
  opacity: 0.9;
}

.v6-request-list-screen,
.v6-request-detail-screen {
  min-height: 100%;
  overflow: hidden;
}

.v6-request-list-panel,
.v6-request-detail {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.v6-request-list {
  display: grid;
  gap: 1rem;
}

.v6-request-card {
  padding: 1rem;
}

.v6-request-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.v6-request-card__type {
  font-size: 0.78rem;
  opacity: 0.72;
}

.v6-request-card__meta,
.v6-request-detail-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0;
}

.v6-request-card__meta div,
.v6-request-detail-meta__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.v6-request-card__meta dt,
.v6-request-detail-meta dt {
  opacity: 0.72;
}

.v6-request-card__meta dd,
.v6-request-detail-meta dd {
  margin: 0;
  text-align: right;
}

.v6-request-list-empty,
.v6-request-list-status,
.v6-request-list-error,
.v6-request-detail-empty,
.v6-request-detail__error {
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
}

.v6-request-detail__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.v6-request-detail-section,
.v6-request-next-actions {
  min-width: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
}

.v6-request-step-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.v6-request-step-list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.07);
}

.v6-request-step-list__symbol {
  font-weight: 800;
}

.v6-request-attention-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 223, 128, 0.18);
  border: 1px solid rgba(255, 223, 128, 0.36);
}

.v6-request-attention-badge--seen {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  opacity: 0.82;
}

.v6-request-deleted-consultation-note,
.v6-request-card-note {
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.9;
}

.v6-request-action-button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.v6-request-summary-action--multi {
  align-items: stretch;
}

.v6-request-card__type {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

/* v6.3 request delete / clickable card minimal styles */
.v6-request-card {
  cursor: pointer;
}

.v6-request-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.v6-request-card button {
  cursor: pointer;
}

.v6-request-delete-button {
  border: 1px solid rgba(255, 120, 120, 0.45);
  background: rgba(255, 80, 80, 0.08);
}

.v6-request-delete-button:hover {
  background: rgba(255, 80, 80, 0.16);
}

.v6-request-attention-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
}

.v6-request-attention-badge--seen {
  opacity: 0.78;
}

.v6-request-detail-danger-zone {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 120, 120, 0.24);
  background: rgba(255, 80, 80, 0.06);
}

.v6-request-detail-danger-zone h2 {
  margin-top: 0;
}

/* v6.3 Phase 2: request list operation menu */
.v6-request-card__badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.v6-request-card-menu {
  margin-left: auto;
  flex: 0 0 auto;
  z-index: 3;
}

.v6-request-card-menu__button {
  min-width: 2.35rem;
  min-height: 2.35rem;
}

.v6-request-card-menu__items {
  min-width: 11rem;
}

.v6-request-card.is-menu-open {
  z-index: 4;
}

.v6-request-card .v4-action-menu__item {
  text-align: left;
}

/* v6.3 Phase 3: request UI refinement */
.v6-request-summary-action {
  padding: 0;
  gap: 0.75rem;
}

.v6-request-summary-action__eyebrow {
  font-size: 0.70rem;
}

.v6-request-summary-action__description {
  font-size: 0.78rem;
  line-height: 1.5;
}

.v6-request-action-button-list {
  gap: 0.45rem;
}

.v6-request-summary-action__button {
  min-height: 36px;
  padding: 0 0.78rem;
  font-size: 0.78rem;
}

.v6-request-summary-action__button--ready {
  border-color: rgba(255, 236, 180, 0.34);
  background: rgba(255, 220, 140, 0.12);
}

.v6-request-summary-action__button--done {
  border-color: rgba(166, 255, 214, 0.26);
  background: rgba(166, 255, 214, 0.10);
}

.v6-request-summary-action__button--running {
  border-color: rgba(160, 204, 255, 0.28);
  background: rgba(160, 204, 255, 0.10);
}

.v6-request-detail__header {
  align-items: center;
  padding: 0.95rem 1rem;
}

.v6-request-detail__header .v6-request-status-badge {
  flex: 0 0 auto;
}

.v6-request-detail__description {
  font-size: 0.92rem;
  opacity: 0.88;
}

.v6-request-detail-meta {
  padding: 0.85rem 0.95rem;
  font-size: 0.86rem;
}

.v6-request-next-actions {
  padding: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.v6-request-next-actions h2,
.v6-request-detail-danger-zone h2 {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
}

.v6-request-next-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.v6-request-next-actions__buttons .v6-request-detail__button:first-child:not(.v6-request-detail__button--secondary) {
  background: rgba(255, 255, 255, 0.94);
  color: #191a2e;
}

.v6-request-detail-danger-zone {
  margin-top: 0;
  padding: 0.82rem 0.95rem;
  border-color: rgba(255, 160, 160, 0.18);
  background: rgba(255, 80, 80, 0.035);
}

.v6-request-detail-danger-zone p {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.v6-request-detail__button--danger-subtle {
  min-height: 38px;
  border: 1px solid rgba(255, 130, 130, 0.28);
  background: rgba(255, 90, 90, 0.075);
  color: rgba(255, 235, 235, 0.92);
}

.v6-request-detail__button--danger-subtle:hover {
  background: rgba(255, 90, 90, 0.13);
}

.v6-request-step-list__item {
  padding: 0.55rem 0.68rem;
}

.v6-request-step-list__order,
.v6-request-step-list__symbol {
  opacity: 0.86;
}

.v6-request-step-list__status {
  font-size: 0.76rem;
}


/* v6.3 UX adjustment: request detail header/footer action placement */
.v6-request-detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.82rem 0.92rem;
  backdrop-filter: blur(14px);
}

.v6-request-detail-header__left,
.v6-request-detail-header__center,
.v6-request-detail-header__right {
  min-width: 0;
}

.v6-request-detail-header__center {
  text-align: center;
}

.v6-request-detail-header__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.v6-request-detail__nav-button {
  min-height: 2.35rem;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0 0.78rem;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v6-request-detail-menu {
  position: relative;
  flex: 0 0 auto;
  z-index: 12;
}

.v6-request-detail-menu__button {
  min-width: 2.35rem;
  min-height: 2.35rem;
}

.v6-request-detail-footer {
  position: sticky;
  bottom: 0;
  z-index: 8;
  margin-top: 0.25rem;
  padding: 0.75rem 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(
    180deg,
    rgba(16, 16, 24, 0),
    rgba(16, 16, 24, 0.86) 32%,
    rgba(16, 16, 24, 0.96)
  );
}

.v6-request-detail-footer .v6-request-next-actions__buttons {
  margin-top: 0;
}

.v6-request-detail-footer .v6-request-detail__button {
  width: 100%;
}



/* v6.3-1 request lifecycle / translated status UI */
.v6-request-list-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(16, 16, 24, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.v6-request-list-header h1 {
  margin: 0;
}

.v6-request-list-header p {
  margin: 0.35rem 0 0;
  line-height: 1.7;
}

.v6-request-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.v6-request-list-actions__button,
.v6-request-list-empty__button {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.v6-request-list-screen {
  height: 100dvh;
  min-height: 100dvh;
  padding-bottom: 1rem;
  overflow: hidden;
}

.v6-request-list-panel {
  width: min(100%, 880px);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.v6-request-list-main {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
}

/* .v6-request-list-header--three-column {
  display: grid;
  grid-template-columns: minmax(4.75rem, 1fr) minmax(0, 1.45fr) minmax(4.75rem, 1fr);
  gap: 0.75rem;
  align-items: center;
} */
 .v6-request-list-header--three-column {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.v6-request-list-header__center {
  min-width: 0;
  text-align: center;
}

.v6-request-list-header__center .v6-screen-kicker,
.v6-request-list-header__center h1,
.v6-request-list-header__center p {
  margin-left: auto;
  margin-right: auto;
}

.v6-request-list-header__center p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v6-request-list-header__side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.v6-request-list-header__side--left {
  justify-content: flex-start;
}

.v6-request-list-header__side--right {
  justify-content: flex-end;
}

.v6-request-list-header__nav {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.56rem 0.82rem;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.v6-request-list-header__subpart {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}


.v6-request-filter-tabs {
  width: 100%;
  display: flex;
  gap: 0.5rem;
}

.v6-request-filter-tab {
  flex: 1;
  border-radius: 999px;
  padding: 0.45rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.v6-request-filter-tab.is-active {
  background: rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

.v6-request-list {
  display: grid;
  gap: 1rem;
}

.v6-request-card {
  padding: 1rem;
}

.v6-request-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.v6-request-card__type {
  font-size: 0.78rem;
  opacity: 0.72;
}

.v6-request-card__meta {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0;
}

.v6-request-card__meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.v6-request-card__meta dt {
  opacity: 0.72;
}

.v6-request-card__meta dd {
  margin: 0;
  text-align: right;
}

.v6-request-list-empty,
.v6-request-list-status,
.v6-request-list-error {
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
}

/* v6.3 UX adjustment: collapsible request action panel in consultation footer */
.v6-current-consultation__request-action {
  padding: 0 16px 10px;
}

.v6-request-summary-action {
  display: block;
  padding: 0;
  overflow: hidden;
}

.v6-request-summary-action__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 42px;
  padding: 0.68rem 0.82rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.v6-request-summary-action__summary::-webkit-details-marker {
  display: none;
}

.v6-request-summary-action__summary::after {
  content: "開く";
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.22rem 0.58rem;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
}

.v6-request-summary-action[open] .v6-request-summary-action__summary::after {
  content: "閉じる";
}

.v6-request-summary-action__summary-text {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.v6-request-summary-action__summary-hint {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v6-request-summary-action__panel {
  display: grid;
  padding: 0 0.82rem 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.v6-request-summary-action__body {
  padding-top: 0.65rem;
}

.v6-request-action-button-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.v6-request-summary-action__button {
  width: 100%;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}


/* =========================
   v6 Voice Input Modal
   HTML構造に依存しない中央表示
========================= */

.v6-voice-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: auto;
}

.v6-voice-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(6px);
}

.v6-voice-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 600px);
  max-height: min(72dvh, 520px);
  overflow: hidden;
  border: 1px solid rgba(239, 208, 255, 0.36);
  border-radius: 20px;
  padding: 12px;
  color: var(--v4-text);
  background: #21172f;
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.v6-voice-dialog__header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.v6-voice-dialog__listening-mark {
  flex: 0 0 auto;
  color: var(--v4-accent-strong);
  font-size: 0.75rem;
  letter-spacing: -0.08em;
  opacity: 0.92;
}

.v6-voice-dialog__status {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(255, 247, 234, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.v6-voice-dialog__stop-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(243, 221, 176, 0.28);
  border-radius: 999px;
  color: #fff7ea;
  background:
    linear-gradient(180deg, rgba(115, 79, 158, 0.96), rgba(74, 47, 112, 0.98));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  font-weight: 800;
}

.v6-voice-dialog__body {
  display: grid;
  gap: 7px;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.065);
}

.v6-voice-dialog__label {
  margin: 0;
  color: rgba(239, 208, 255, 0.92);
  font-size: 0.76rem;
  font-weight: 800;
}

.v6-voice-dialog__preview {
  min-height: 72px;
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.v6-voice-dialog__preview-text,
.v6-voice-dialog__preview-empty {
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 247, 234, 0.92);
  font-size: 0.9rem;
  line-height: 1.65;
}

.v6-voice-dialog__preview-text.is-interim {
  color: rgba(255, 247, 234, 0.58);
}

.v6-voice-dialog__preview-empty {
  color: var(--v4-text-subtle);
}

.v6-voice-dialog__note {
  margin: 0;
  color: rgba(255, 247, 234, 0.58);
  font-size: 0.72rem;
  line-height: 1.45;
}
/* v6.1 Artifact reuse */
.v6-source-artifacts-summary__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v6-source-artifacts-summary__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(92, 76, 58, 0.16);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.72);
}

.v6-source-artifacts-summary__item small {
  color: rgba(72, 57, 43, 0.66);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

/* v6.2 Artifact revision */
.v6-target-artifacts-summary__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v6-target-artifacts-summary__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(92, 76, 58, 0.16);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.72);
}

.v6-target-artifacts-summary__item small {
  color: rgba(72, 57, 43, 0.66);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.v6-updated-version-preview__body {
  margin-top: 12px;
}

.v6-revision-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 17, 34, 0.48);
  backdrop-filter: blur(6px);
}

.v6-revision-dialog {
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
  max-height: min(82dvh, 680px);
  overflow-y: auto;
  border: 1px solid rgba(92, 76, 58, 0.20);
  border-radius: 22px;
  padding: 18px;
  color: var(--v4-text);
  background: #1c1728;
  box-shadow: 0 28px 80px rgba(30, 20, 42, 0.34);
}

.v6-revision-dialog__header {
  display: grid;
  gap: 6px;
}

.v6-revision-dialog__header h2,
.v6-revision-dialog__header p {
  margin: 0;
}

.v6-revision-dialog__header p,
.v6-revision-dialog__target {
  color: var(--v4-text-subtle);
  font-size: 0.88rem;
  line-height: 1.65;
}

.v6-revision-dialog__target {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(92, 76, 58, 0.08);
}

.v6-revision-dialog__textarea {
  min-height: 140px;
  resize: vertical;
  width: 100%;
  border: 1px solid rgba(92, 76, 58, 0.22);
  border-radius: 16px;
  padding: 12px;
  color: var(--v4-text);
  background: rgba(55, 55, 55, 0.9);
  font: inherit;
  line-height: 1.65;
}

.v6-revision-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* v6.3 revision review */
.v6-revision-review,
.v6-version-history {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.v6-revision-review__pane {
  min-width: 0;
  max-width: 100%;
  margin-top: 1rem;
}

.v6-revision-review__pane h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.v6-revision-review__body {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.v6-revision-review__body pre,
.v6-revision-review__body table {
  max-width: 100%;
  overflow-x: auto;
}

.v6-revision-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.v6-version-history__list {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.v6-version-history__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.v6-version-history__badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* v6.4 Artifact Markdown download */
.v6-request-artifact-preview__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 10px;
  flex-wrap: wrap;
}

.v6-artifact-download-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.v6-artifact-download-button:hover,
.v6-artifact-download-button:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
  outline: none;
}

.v6-artifact-download-button:active {
  transform: translateY(1px);
}

/* v7.0 Artifact list/detail screens */
.v7-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  color: #f8f1ff;
  background: radial-gradient(circle at top, rgba(107, 74, 145, 0.22), transparent 34%), #120f1a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.v7-artifact-detail-screen {
  grid-template-rows: auto 1fr auto;
}

.v7-screen-header {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(88px, 1fr) minmax(0, 2fr) minmax(88px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 15, 26, 0.9);
  backdrop-filter: blur(10px);
}

.v7-screen-header__button {
  justify-self: start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  color: #f8f1ff;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  cursor: pointer;
}

.v7-screen-header__title {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v7-screen-main {
  overflow: auto;
  padding: 16px;
}

.v7-artifact-list-main {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}

.v7-artifact-list {
  display: grid;
  gap: 12px;
}

.v7-artifact-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.v7-artifact-card:hover,
.v7-artifact-card:focus-visible {
  border-color: rgba(215, 185, 255, 0.42);
  outline: none;
  background: rgba(255, 255, 255, 0.105);
}

.v7-artifact-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.v7-artifact-card__badges,
.v7-artifact-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.v7-artifact-card__type,
.v7-artifact-card__status,
.v7-artifact-card__pending {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.11);
}

.v7-artifact-card__pending,
.v7-artifact-card__status--warning {
  background: rgba(255, 209, 102, 0.2);
}

.v7-artifact-card__meta {
  color: rgba(248, 241, 255, 0.68);
  font-size: 0.82rem;
}

.v7-artifact-state {
  margin: 48px auto;
  max-width: 560px;
  padding: 22px;
  border-radius: 18px;
  text-align: center;
  color: rgba(248, 241, 255, 0.78);
  background: rgba(255, 255, 255, 0.07);
}

.v7-artifact-state--error {
  color: #ffe4e9;
  background: rgba(180, 40, 72, 0.22);
}

.v7-artifact-detail-main {
  padding: 14px;
}

.v7-artifact-detail {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.v7-artifact-meta,
.v7-related-requests {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 12px;
  color: rgba(248, 241, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
}

.v7-artifact-meta__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.v7-artifact-meta dt {
  font-size: 0.72rem;
  color: rgba(248, 241, 255, 0.55);
}

.v7-artifact-meta dd {
  margin: 2px 0 0;
  font-size: 0.88rem;
}

.v7-artifact-meta__pending {
  margin: 10px 0 0;
  color: #ffe3a3;
  font-size: 0.88rem;
}

.v7-artifact-content {
  min-height: 48vh;
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
  color: #1f1a28;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.v7-artifact-markdown {
  color: #1f1a28;
}

.v7-artifact-markdown a {
  color: #6b3fc7;
}

.v7-related-requests h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.v7-related-requests__hint {
  margin: 0 0 10px;
  color: rgba(248, 241, 255, 0.56);
  font-size: 0.82rem;
}

.v7-related-requests__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v7-related-request-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #f8f1ff;
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.v7-related-request-card:hover,
.v7-related-request-card:focus-visible {
  border-color: rgba(255, 227, 163, 0.42);
  background: rgba(255, 255, 255, 0.105);
  transform: translateY(-1px);
  outline: none;
}

.v7-related-request-card--attention {
  border-color: rgba(255, 227, 163, 0.48);
  background: rgba(255, 227, 163, 0.09);
}

.v7-related-request-card__body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.v7-related-request-card__title {
  overflow: hidden;
  color: #f8f1ff;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v7-related-request-card__labels {
  overflow: hidden;
  color: rgba(248, 241, 255, 0.74);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v7-related-request-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: rgba(248, 241, 255, 0.58);
  font-size: 0.76rem;
}

.v7-related-request-card__arrow {
  color: rgba(255, 227, 163, 0.78);
  font-size: 1rem;
}

.v7-screen-footer {
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 15, 26, 0.92);
}

.v7-primary-action-button {
  width: min(100%, 520px);
  min-height: 44px;
  display: block;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  color: #1f1830;
  background: #f2d7ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 640px) {
  .v7-screen-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 50px;
    padding: 8px 10px;
  }

  .v7-screen-header__button {
    padding: 7px 10px;
    font-size: 0.84rem;
  }

  .v7-screen-header__title {
    font-size: 0.92rem;
  }

  .v7-screen-main {
    padding: 10px;
  }

  .v7-artifact-card {
    padding: 13px;
  }

  .v7-artifact-meta__grid {
    grid-template-columns: 1fr;
  }

  .v7-artifact-content {
    min-height: 52vh;
    padding: 14px;
    border-radius: 15px;
  }

  .v7-related-request-card {
    align-items: flex-start;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .v7-related-request-card__title,
  .v7-related-request-card__labels {
    white-space: normal;
  }
}

/* v7.0.1 Artifact logical delete UI */
.v7-artifact-card {
  position: relative;
}

.v7-artifact-card__actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
}

.v7-artifact-card__actions .v4-action-menu-container,
.v7-artifact-detail-menu.v4-action-menu-container {
  position: relative;
}

.v7-artifact-card__actions .v4-action-menu,
.v7-artifact-detail-menu .v4-action-menu {
  min-width: 11rem;
}

.v7-artifact-detail--deleted .v7-artifact-state--deleted {
  text-align: left;
}

.v7-artifact-state__meta {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* v7.1 Artifact detail action area / history summary */
.v7-artifact-history-summary,
.v7-artifact-action-area {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.v7-artifact-history-summary h2,
.v7-artifact-action-area h2 {
  margin: 0 0 8px;
  color: rgba(248, 241, 255, 0.92);
  font-size: 0.95rem;
}

.v7-artifact-history-summary__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.v7-artifact-history-summary__grid div {
  min-width: 0;
}

.v7-artifact-history-summary dt {
  color: rgba(248, 241, 255, 0.58);
  font-size: 0.72rem;
}

.v7-artifact-history-summary dd {
  margin: 3px 0 0;
  color: rgba(248, 241, 255, 0.88);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.v7-artifact-history-summary__pending {
  margin: 10px 0 0;
  color: rgba(255, 227, 163, 0.92);
  font-size: 0.84rem;
  line-height: 1.55;
}

.v7-artifact-action-area {
  background: rgba(242, 215, 255, 0.055);
}

.v7-artifact-action-area__header p {
  margin: 0 0 12px;
  color: rgba(248, 241, 255, 0.62);
  font-size: 0.84rem;
  line-height: 1.55;
}

.v7-artifact-action-area__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v7-artifact-action-area__button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(242, 215, 255, 0.24);
  border-radius: 999px;
  color: rgba(248, 241, 255, 0.94);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.v7-artifact-action-area__button:hover,
.v7-artifact-action-area__button:focus-visible {
  border-color: rgba(242, 215, 255, 0.58);
  background: rgba(242, 215, 255, 0.13);
  transform: translateY(-1px);
  outline: none;
}

@media (max-width: 640px) {
  .v7-artifact-history-summary,
  .v7-artifact-action-area {
    margin: 10px 0;
    padding: 12px;
    border-radius: 14px;
  }

  .v7-artifact-history-summary__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v7-artifact-action-area__actions {
    flex-direction: column;
  }

  .v7-artifact-action-area__button {
    width: 100%;
    min-height: 36px;
    padding: 8px 11px;
    text-align: left;
  }
}

/* v7.2 Artifact import dialog */
.v7-screen-header__button--right {
  justify-self: end;
}

.v7-artifact-upload-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 4, 10, 0.66);
  backdrop-filter: blur(8px);
}

.v7-artifact-upload-dialog {
  width: min(100%, 520px);
  max-height: min(86vh, 680px);
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  color: #f8f1ff;
  background: rgba(24, 19, 34, 0.98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.v7-artifact-upload-dialog__header h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.v7-artifact-upload-dialog__header p,
.v7-artifact-upload-field__hint {
  margin: 0;
  color: rgba(248, 241, 255, 0.65);
  font-size: 0.84rem;
  line-height: 1.55;
}

.v7-artifact-upload-field {
  display: grid;
  gap: 7px;
}

.v7-artifact-upload-field label,
.v7-artifact-upload-field__label {
  color: rgba(248, 241, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 650;
}


.v7-artifact-upload-file-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.v7-artifact-upload-native-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.v7-artifact-upload-file-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: #1f1830;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.v7-artifact-upload-file-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
}

.v7-artifact-upload-file-status {
  min-width: 0;
  overflow: hidden;
  color: rgba(248, 241, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v7-artifact-upload-file-status--empty {
  color: rgba(248, 241, 255, 0.58);
  font-weight: 500;
}

.v7-artifact-upload-field input[type="text"],
.v7-artifact-upload-field input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px 11px;
  color: #f8f1ff;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

.v7-artifact-upload-field input[type="file"] {
  padding: 9px;
}

.v7-artifact-upload-field .v7-artifact-upload-native-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.v7-artifact-upload-error {
  padding: 10px 12px;
  border-radius: 12px;
  color: #ffe4e9;
  background: rgba(180, 40, 72, 0.24);
  font-size: 0.86rem;
  line-height: 1.55;
}

.v7-artifact-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.v7-artifact-upload-submit,
.v7-artifact-upload-cancel {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 15px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.v7-artifact-upload-submit {
  color: #1f1830;
  background: #f2d7ff;
  font-weight: 700;
}

.v7-artifact-upload-cancel {
  color: #f8f1ff;
  background: rgba(255, 255, 255, 0.07);
}

.v7-artifact-upload-submit:disabled,
.v7-artifact-upload-cancel:disabled,
.v7-artifact-upload-field input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

@media (max-width: 640px) {
  .v7-artifact-upload-dialog-backdrop {
    align-items: start;
    padding: 12px;
  }

  .v7-artifact-upload-dialog {
    max-height: calc(100vh - 24px);
    padding: 14px;
    border-radius: 16px;
  }

  .v7-artifact-upload-file-control {
    align-items: stretch;
    flex-direction: column;
  }

  .v7-artifact-upload-file-button {
    width: 100%;
  }

  .v7-artifact-upload-file-status {
    white-space: normal;
  }

  .v7-artifact-upload-actions {
    flex-direction: column;
  }

  .v7-artifact-upload-submit,
  .v7-artifact-upload-cancel {
    width: 100%;
    text-align: center;
  }
}

/* ---- v8 Workspace minimal UI ---- */
.v8-workspace-screen {
  background: linear-gradient(180deg, rgba(28, 20, 42, 0.96), rgba(15, 12, 24, 0.98));
  color: #f7f1ff;
}

.v8-workspace-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
}

.v8-workspace-hero,
.v8-panel,
.v8-workspace-create,
.v8-empty,
.v8-error {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.v8-workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 14px;
  padding: 18px;
}

.v8-workspace-hero--compact {
  display: block;
}

.v8-kicker {
  margin: 0 0 4px;
  color: #d7b7ff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.v8-workspace-hero h1,
.v8-workspace-create h2,
.v8-panel h2,
.v8-empty h2 {
  margin: 0 0 8px;
}

.v8-lilith-guide {
  border-radius: 16px;
  padding: 14px;
  background: rgba(214, 178, 255, 0.12);
}

.v8-workspace-create,
.v8-panel,
.v8-empty,
.v8-error {
  padding: 14px;
}

.v8-workspace-create {
  display: grid;
  gap: 10px;
}

.v8-workspace-create label,
.v8-task-form,
.v8-link-form {
  display: grid;
  gap: 6px;
}

.v8-workspace-create input,
.v8-workspace-create textarea,
.v8-task-form input,
.v8-link-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  color: #f7f1ff;
  background: rgba(0, 0, 0, 0.22);
}

.v8-primary,
.v8-task-form button,
.v8-link-form button,
.v8-task-item button,
.v8-link-remove {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #241832;
  background: #e6ccff;
  cursor: pointer;
}

.v8-workspace-list {
  display: grid;
  gap: 12px;
}

.v8-workspace-card__button,
.v8-mini-item > button:first-child {
  width: 100%;
  text-align: left;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.v8-workspace-card {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.06);
}

.v8-workspace-card__header,
.v8-mini-item,
.v8-task-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.v8-workspace-card__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.v8-workspace-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255,255,255,0.12);
  color: #eedfff;
  font-size: 0.78rem;
}

.v8-workspace-card__meta,
.v8-muted,
.v8-mini-item span {
  color: rgba(247,241,255,0.7);
  font-size: 0.86rem;
}

.v8-workspace-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v8-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.v8-task-list,
.v8-mini-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.v8-task-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.v8-link-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 10px;
}

.v8-error {
  color: #ffd6d6;
  border-color: rgba(255, 120, 120, 0.35);
  background: rgba(120, 20, 20, 0.25);
}



/* ---- v9 Phase 1 Workspace Home formalization ---- */
.v8-workspace-home-hero {
  align-items: stretch;
}

.v8-workspace-purpose-box {
  margin: 12px 0;
  border-left: 3px solid rgba(230, 204, 255, 0.85);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.v8-workspace-purpose-box span {
  display: block;
  margin-bottom: 4px;
  color: rgba(247, 241, 255, 0.72);
  font-size: 0.78rem;
}

.v8-workspace-purpose-box p,
.v8-workspace-description,
.v8-guide-next,
.v8-lilith-guide p,
.v8-section-note,
.v8-empty-note {
  margin: 0;
  line-height: 1.65;
}

.v8-workspace-description {
  color: rgba(247, 241, 255, 0.82);
}

.v8-workspace-meta-row,
.v8-section-heading,
.v8-workspace-summary-list,
.v8-action-grid,
.v8-related-stack,
.v8-link-tools__grid {
  display: grid;
  gap: 12px;
}

.v8-workspace-meta-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin-top: 12px;
}

.v8-workspace-guide-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.v8-guide-next {
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff6d8;
  background: rgba(255, 220, 150, 0.12);
}

.v8-workspace-summary-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
}

.v8-workspace-summary-list > div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.055);
}

.v8-workspace-summary-list dt {
  color: rgba(247, 241, 255, 0.66);
  font-size: 0.76rem;
}

.v8-workspace-summary-list dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.v8-section-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 12px;
}

.v8-section-heading h2 {
  margin-bottom: 4px;
}

.v8-section-note {
  max-width: 30rem;
  color: rgba(247, 241, 255, 0.66);
  font-size: 0.84rem;
}

.v8-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v8-action-card {
  display: grid;
  gap: 6px;
  min-height: 74px;
  box-sizing: border-box;
  border: 1px solid rgba(230, 204, 255, 0.28);
  border-radius: 16px;
  padding: 13px 14px;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  background: rgba(230, 204, 255, 0.105);
}

.v8-action-card strong {
  color: #fff9ff;
}

.v8-action-card span,
.v8-mini-meta,
.v8-related-preview {
  color: rgba(247, 241, 255, 0.68);
  font-size: 0.84rem;
  line-height: 1.5;
}

.v8-action-card--disabled {
  cursor: not-allowed;
  opacity: 0.74;
  background: rgba(255, 255, 255, 0.055);
}

.v8-related-stack {
  grid-template-columns: 1fr;
}

.v8-related-section {
  scroll-margin-top: 12px;
}

.v8-related-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.v8-related-card--artifact {
  border-color: rgba(230, 204, 255, 0.24);
  background: rgba(230, 204, 255, 0.07);
}

.v8-related-card > button:first-child {
  display: grid;
  gap: 4px;
}

.v8-related-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v8-empty-note {
  border-radius: 12px;
  padding: 10px 12px;
  color: rgba(247, 241, 255, 0.66);
  background: rgba(255, 255, 255, 0.045);
}

.v8-link-tools {
  opacity: 0.92;
}

.v8-link-tools summary {
  cursor: pointer;
  color: #eedfff;
  font-weight: 700;
}

.v8-link-tools__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

@media (max-width: 900px) {
  .v8-workspace-summary-list,
  .v8-action-grid,
  .v8-link-tools__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .v8-workspace-meta-row,
  .v8-section-heading {
    grid-template-columns: 1fr;
  }

  .v8-action-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .v8-workspace-main {
    padding: 12px;
  }

  .v8-workspace-hero,
  .v8-grid,
  .v8-task-form,
  .v8-link-form {
    grid-template-columns: 1fr;
  }

  .v8-workspace-card__header,
  .v8-mini-item,
  .v8-task-item {
    align-items: stretch;
    flex-direction: column;
  }
}

/* v9 Phase 2: Workspace Consultation */
.v9-action-card--primary {
  border-color: rgba(141, 91, 255, 0.36);
}

.v9-workspace-consultation-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v9-workspace-consultation-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: rgba(25, 25, 25, 0.4);
  border: 1px solid rgba(94, 66, 150, 0.12);
  box-shadow: 0 12px 32px rgba(38, 28, 72, 0.08);
}

.v9-workspace-consultation-header__main h1 {
  margin: 2px 0 6px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.v9-workspace-consultation-header__main p {
  margin: 0;
  line-height: 1.6;
}

.v9-workspace-consultation-kicker {
  margin: 0;
  color: rgba(113, 83, 180, 0.86);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v9-workspace-consultation-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.v9-workspace-consultation-context > div {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(94, 66, 150, 0.1);
}

.v9-workspace-consultation-context span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.v9-workspace-consultation-context strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v9-workspace-consultation-shell {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(94, 66, 150, 0.12);
  box-shadow: 0 14px 36px rgba(38, 28, 72, 0.08);
}

.v9-workspace-consultation-body {
  min-height: 280px;
  overflow: hidden;
  padding: 14px;
}

.v9-workspace-consultation-body .v4-message-list {
  height: 100%;
  max-height: none;
}

.v9-workspace-consultation-input {
  border-top: 1px solid rgba(94, 66, 150, 0.12);
  padding: 12px;
}

.v9-workspace-consultation-error {
  display: grid;
  gap: 12px;
}

@media (max-width: 720px) {
  .v9-workspace-consultation-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .v9-workspace-consultation-context {
    grid-template-columns: 1fr;
  }
}

/* v9 Phase 3: Workspace Consultation -> Request creation panel */
.v9-workspace-request-entry {
  padding: 0.75rem 0.85rem 0;
}

.v9-workspace-request-entry__button {
  width: 100%;
  border: 1px solid rgba(194, 134, 92, 0.35);
  border-radius: 14px;
  background: rgba(255, 247, 239, 0.92);
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.v9-workspace-request-entry__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.v9-workspace-request-panel {
  margin: 0.75rem 0.85rem 0;
  padding: 0.85rem;
  border: 1px solid rgba(194, 134, 92, 0.35);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(82, 50, 32, 0.08);
}

.v9-workspace-request-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.v9-workspace-request-panel__kicker {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.68;
}

.v9-workspace-request-panel__header h2 {
  margin: 0;
  font-size: 1rem;
}

.v9-workspace-request-panel__close {
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.75;
}

.v9-workspace-request-panel__form {
  display: grid;
  gap: 0.7rem;
}

.v9-workspace-request-panel__form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.v9-workspace-request-panel__form select,
.v9-workspace-request-panel__form textarea {
  width: 100%;
  border: 1px solid rgba(82, 50, 32, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.v9-workspace-request-panel__form textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.v9-workspace-request-panel__error {
  margin: 0;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: rgba(180, 56, 56, 0.1);
  color: #8a2d2d;
  font-size: 0.84rem;
}

.v9-workspace-request-panel__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.v9-workspace-request-panel__actions button {
  border: 1px solid rgba(82, 50, 32, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.55rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.v9-workspace-request-panel__actions button[type="submit"] {
  background: rgba(92, 65, 45, 0.94);
  color: #fff;
}

.v9-workspace-request-panel__actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* v10 Phase 2: Workspace lobby / Lilith case desk */

@media (min-width: 1024px) {
  .v4-screen.v10-workspace-lobby {
    width: calc(100vw - 48px);
    max-width: 1120px;
  }
}
@media (min-width: 1280px) {
  .v4-screen.v10-workspace-lobby {
    width: calc(100vw - 64px);
    max-width: 1280px;
  }
}
@media (min-width: 1440px) {
  .v4-screen.v10-workspace-lobby {
    width: calc(100vw - 80px);
    max-width: 1480px;
  }
}
@media (min-width: 1600px) {
  .v4-screen.v10-workspace-lobby {
    width: calc(100vw - 96px);
    max-width: 1680px;
  }
}

/* .v10-workspace-lobby {
  background:
    radial-gradient(circle at 18% 18%, rgba(145, 109, 177, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(255, 250, 244, 0.98), rgba(248, 244, 238, 0.96));
} */

.v10-workspace-lobby__topbar {
  border-bottom: 1px solid rgba(91, 63, 43, 0.12);
}

.v10-workspace-lobby__main {
  display: grid;
  gap: 18px;
  padding-bottom: 28px;
}

.v10-workspace-lobby__header {
  display: grid;
  gap: 8px;
  padding: 18px 20px 4px;
  background: rgba(255, 255, 255, 0.74);
}

.v10-workspace-lobby__header h1 {
  margin: 0;
  color: #2f2530;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  letter-spacing: 0.03em;
}

.v10-workspace-lobby__purpose {
  max-width: 840px;
  margin: 0;
  color: rgba(49, 39, 45, 0.78);
  font-size: 0.98rem;
  line-height: 1.7;
}

.v10-workspace-lobby__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(49, 39, 45, 0.68);
  font-size: 0.82rem;
}

.v10-workspace-lobby__meta span {
  border: 1px solid rgba(91, 63, 43, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  padding: 0.26rem 0.58rem;
}

.v10-kicker {
  margin: 0;
  color: #8e6a4b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v10-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.v10-section-heading h2,
.v10-section-heading p {
  margin: 0;
}

.v10-section-heading > p {
  color: rgba(49, 39, 45, 0.62);
  font-size: 0.86rem;
}

.v10-case-desk {
  display: grid;
  grid-template-columns: minmax(280px, 36%) 1fr;
  gap: 18px;
  align-items: stretch;
}

.v10-case-desk__lilith-panel,
.v10-case-desk__briefing,
.v10-quick-access,
.v10-legacy-workspace-sections {
  border: 1px solid rgba(91, 63, 43, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 42px rgba(52, 32, 25, 0.08);
}

.v10-case-desk__lilith-panel {
  display: grid;
  grid-template-rows: minmax(250px, 1fr) auto auto;
  overflow: hidden;
  min-height: 640px;
  background:
    linear-gradient(180deg, rgba(35, 24, 34, 0.76), rgba(42, 29, 38, 0.9)),
    radial-gradient(circle at 50% 8%, rgba(255, 236, 210, 0.22), transparent 42%);
}

.v10-case-desk__lilith-visual {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
}

.v10-lilith-portrait {
  width: min(100%, 600px);
  min-height: 280px;
  max-height: 460px;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.v10-lilith-comment-card {
  margin: 0 16px 14px;
  border: 1px solid rgba(255, 238, 214, 0.36);
  border-radius: 20px;
  background: rgba(255, 250, 244, 0.94);
  padding: 16px 18px;
  color: #2f2530;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.v10-lilith-comment-card h2 {
  margin: 4px 0 8px;
  font-size: 1.08rem;
}

.v10-lilith-comment-card p:last-child {
  margin: 0;
  line-height: 1.72;
}

.v10-case-desk__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0 16px 16px;
}

.v10-main-action {
  min-height: 62px;
  border: 1px solid rgba(255, 238, 214, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff8ef;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.v10-main-action strong,
.v10-main-action span {
  display: block;
}

.v10-main-action strong {
  font-size: 0.98rem;
}

.v10-main-action span {
  margin-top: 4px;
  opacity: 0.72;
  font-size: 0.8rem;
}

.v10-main-action--primary {
  background: linear-gradient(135deg, rgba(117, 73, 151, 0.96), rgba(83, 57, 118, 0.96));
  box-shadow: 0 14px 24px rgba(80, 51, 112, 0.28);
}

.v10-main-action--refresh {
  background: rgba(42, 91, 83, 0.58);
}

.v10-main-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.v10-case-desk__briefing {
  padding: 18px;
}

.v10-summary-notice {
  margin-bottom: 14px;
  border-radius: 16px;
  padding: 11px 13px;
  background: rgba(255, 245, 231, 0.9);
  color: #694b31;
  font-size: 0.9rem;
}

.v10-summary-notice--loading {
  background: rgba(234, 229, 255, 0.9);
  color: #4a3f73;
}

.v10-summary-notice--error {
  background: rgba(255, 232, 232, 0.94);
  color: #8b2f35;
}

.v10-briefing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.v10-briefing-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 280px;
  border: 1px solid rgba(91, 63, 43, 0.12);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.86);
  padding: 16px;
}

.v10-briefing-card h3,
.v10-briefing-card p {
  margin: 0;
}

.v10-briefing-card h3 {
  color: #463144;
  font-size: 1.05rem;
}

.v10-briefing-card p {
  color: rgba(49, 39, 45, 0.72);
  line-height: 1.62;
  font-size: 0.9rem;
}

.v10-progress-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.v10-progress-flow__step {
  border: 1px solid rgba(91, 63, 43, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.26rem 0.5rem;
  color: rgba(49, 39, 45, 0.66);
  font-size: 0.74rem;
}

.v10-progress-flow__step--current {
  border-color: rgba(117, 73, 151, 0.38);
  background: rgba(117, 73, 151, 0.13);
  color: #5d3c7b;
  font-weight: 800;
}

.v10-next-actions {
  display: grid;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.v10-next-action-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  border: 1px solid rgba(117, 73, 151, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px;
}

.v10-next-action-card__index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(117, 73, 151, 0.14);
  color: #5d3c7b;
  font-size: 0.78rem;
  font-weight: 800;
}

.v10-next-action-card strong {
  display: block;
  color: #352536;
  font-size: 0.9rem;
}

.v10-next-action-card p {
  margin-top: 4px;
  font-size: 0.8rem;
}

.v10-empty-note {
  color: rgba(49, 39, 45, 0.58);
  font-size: 0.86rem;
  line-height: 1.6;
}

.v10-quick-access {
  padding: 18px;
  color: rgba(49, 39, 45, 0.62);
}

.v10-quick-access__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.v10-quick-access-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(91, 63, 43, 0.11);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.78);
  padding: 14px;
}

.v10-quick-access-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v10-quick-access-card__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(117, 73, 151, 0.11);
  color: #5d3c7b;
}

.v10-quick-access-card h3,
.v10-quick-access-card p {
  margin: 0;
}

.v10-quick-access-card h3 {
  font-size: 0.95rem;
}

.v10-quick-access-card p,
.v10-quick-access-card li span {
  color: rgba(49, 39, 45, 0.58);
  font-size: 0.78rem;
}

.v10-quick-access-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v10-quick-access-card li {
  display: grid;
  gap: 2px;
  font-size: 0.83rem;
}

.v10-quick-access-card button {
  justify-self: stretch;
  border: 1px solid rgba(91, 63, 43, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

.v10-legacy-workspace-sections {
  padding: 14px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: none;
}

.v10-legacy-details > summary {
  cursor: pointer;
  font-weight: 800;
  color: rgba(49, 39, 45, 0.78);
}

.v10-legacy-details > .v8-muted {
  margin: 10px 0 14px;
}

/* v11 Conversation POC Console */
.v11-poc-screen {
  min-height: 100vh;
  padding: 28px;
  color: #f7f1ff;
  background: #120f1a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.v11-poc-header,
.v11-poc-card,
.v11-poc-response-card,
.v11-poc-debug-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.v11-poc-header,
.v11-poc-card {
  margin: 0 auto 18px;
  max-width: 1180px;
  padding: 22px;
}

.v11-poc-kicker {
  margin: 0 0 6px;
  color: #c9a8ff;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v11-poc-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.v11-poc-header p {
  margin: 0;
  max-width: 840px;
  color: rgba(247, 241, 255, 0.78);
  line-height: 1.75;
}

.v11-poc-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(247, 241, 255, 0.86);
  font-weight: 700;
}

.v11-poc-field select,
.v11-poc-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  color: #f7f1ff;
  background: rgba(0, 0, 0, 0.26);
  font: inherit;
}

.v11-poc-field textarea {
  resize: vertical;
  line-height: 1.7;
}

.v11-poc-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 241, 255, 0.78);
}

.v11-poc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.v11-poc-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #170f24;
  background: #e8d7ff;
  font-weight: 800;
  cursor: pointer;
}

.v11-poc-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.v11-poc-status,
.v11-poc-error {
  margin: 14px 0 0;
  line-height: 1.6;
}

.v11-poc-error {
  color: #ffb4c2;
}

.v11-poc-comparison-panel,
.v11-poc-debug-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 18px;
}

.v11-poc-debug-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v11-poc-response-card,
.v11-poc-debug-card {
  min-width: 0;
  padding: 18px;
}

.v11-poc-response-card h3,
.v11-poc-debug-card h3 {
  margin: 0 0 10px;
  color: #e5d3ff;
  font-size: 1rem;
}

.v11-poc-response-card pre,
.v11-poc-debug-card pre {
  min-height: 100px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border-radius: 12px;
  padding: 12px;
  color: rgba(247, 241, 255, 0.9);
  background: rgba(0, 0, 0, 0.28);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .v11-poc-comparison-panel,
  .v11-poc-debug-panel {
    grid-template-columns: 1fr;
  }
}

/* v12 Consultation relationship UI */
.v12-consultation-relationships {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
}

.v12-consultation-relationships__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.v12-relationship-kicker {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.v12-consultation-relationships h3,
.v12-consultation-relationships h4 {
  margin: 0;
}

.v12-workspace-affiliation {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  font-size: 0.86rem;
  white-space: nowrap;
}

.v12-workspace-affiliation__label {
  opacity: 0.72;
}

.v12-link-button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.v12-relationship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.v12-relationship-column {
  display: grid;
  gap: 8px;
}

.v12-related-list,
.v12-relationship-warnings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.v12-related-card__button {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: inherit;
  background: rgba(0,0,0,0.12);
  text-align: left;
  cursor: pointer;
}

.v12-related-card__button:hover {
  background: rgba(255,255,255,0.075);
}

.v12-related-card__title {
  font-weight: 700;
}

.v12-related-card__meta,
.v12-relationship-empty,
.v12-relationship-error {
  margin: 0;
  font-size: 0.86rem;
  opacity: 0.74;
}

.v12-relationship-error {
  color: #ffd3d3;
}

.v12-relationship-warnings {
  margin-bottom: 12px;
  color: #ffe7b0;
  font-size: 0.86rem;
}

@media (min-width: 800px) {
  .v12-relationship-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v12 Request origin UI */
.v12-origin-card {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
}

.v12-origin-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.v12-origin-card h2 {
  margin: 0;
}

.v12-origin-card__body {
  display: grid;
  gap: 12px;
}

.v12-origin-row,
.v12-origin-artifacts {
  display: grid;
  gap: 6px;
}

.v12-origin-row__label {
  font-size: 0.82rem;
  opacity: 0.72;
}

.v12-origin-artifacts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.v12-origin-artifacts__list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
}

.v12-origin-artifacts__list small {
  opacity: 0.68;
  white-space: nowrap;
}

.v12-relationship-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.v12-relationship-action {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: inherit;
  background: rgba(255,255,255,0.09);
  cursor: pointer;
}

.v12-relationship-action--secondary {
  background: rgba(0,0,0,0.12);
}

.v12-relationship-action:hover {
  background: rgba(255,255,255,0.14);
}

@media (max-width: 720px) {
  .v12-origin-card__header {
    display: grid;
  }

  .v12-origin-artifacts__list li {
    display: grid;
  }
}

/* =========================
   v13 Phase 1: Wide App Shell / Layout Foundation
========================= */

html,
body,
#app {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body {
  width: 100%;
  color: var(--v4-text);
  background: var(--v4-bg);
}

#app {
  width: 100%;
}

.v13-app-shell {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) clamp(286px, 24vw, 360px);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--v4-text);
  background:
    radial-gradient(circle at 14% 8%, rgba(217, 168, 255, 0.16), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(137, 111, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #191225 0%, var(--v4-bg) 48%, #0d0b12 100%);
}

.v13-column {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
}

.v13-y-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.v13-wrap-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v13-app-shell__left {
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 10, 18, 0.78);
  backdrop-filter: blur(18px);
}

.v13-app-shell__center {
  height: 100%;
  padding: 14px;
}

.v13-app-shell__right {
  height: 100%;
  padding: 14px 14px 14px 0;
}

.v13-center-main {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.v13-center-main > .v4-screen,
.v13-center-main > .v7-screen,
.v13-center-main > .v11-poc-screen {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  background: transparent;
}

.v13-center-main > .v4-room-screen,
.v13-center-main > .v8-workspace-screen,
.v13-center-main > .v9-workspace-consultation-screen,
.v13-center-main > .v6-request-list-screen,
.v13-center-main > .v6-request-detail-screen,
.v13-center-main > .v7-artifact-list-screen,
.v13-center-main > .v7-artifact-detail-screen,
.v13-center-main > .v11-poc-screen {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.v13-center-main .v6-request-list-main,
.v13-center-main .v7-screen-main,
.v13-center-main .v8-workspace-main,
.v13-center-main .v10-workspace-lobby__main,
.v13-center-main .v11-poc-screen,
.v13-center-main .v4-settings-main,
.v13-center-main .v4-room-shell__body {
  min-width: 0;
  overflow-x: hidden;
}

.v13-center-main pre,
.v13-center-main code,
.v13-code-block,
.v13-message pre {
  max-width: 100%;
}

.v13-center-main pre,
.v13-code-block,
.v13-message pre {
  overflow-x: auto;
}

.v13-main-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 18px 12px;
  overflow: hidden;
}

.v13-main-nav__brand {
  display: grid;
  gap: 2px;
  padding: 10px 10px 18px;
}

.v13-main-nav__brand-kicker,
.v13-main-nav__item-eyebrow {
  color: var(--v4-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.v13-main-nav__brand-title {
  color: var(--v4-text);
  font-size: 1.42rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.v13-main-nav__items {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.v13-main-nav__item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 10px;
  color: var(--v4-text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.v13-main-nav__item:hover,
.v13-main-nav__item:focus-visible {
  color: var(--v4-text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.v13-main-nav__item--active {
  color: var(--v4-text);
  border-color: rgba(217, 168, 255, 0.34);
  background: rgba(217, 168, 255, 0.14);
  box-shadow: inset 3px 0 0 rgba(217, 168, 255, 0.74);
}

.v13-main-nav__item-label {
  min-width: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-lilith-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: rgba(15, 12, 22, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.v13-lilith-panel__fixed {
  flex: 0 0 auto;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}


.v13-lilith-panel__lilith-block {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(340px, 42vh, 460px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: rgba(13, 10, 20, 0.92);
}

.v13-lilith-panel__lilith-block::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 8, 16, 0.02) 28%,
    rgba(10, 8, 16, 0.18) 52%,
    rgba(10, 8, 16, 0.78) 100%
  );
  pointer-events: none;
}

.v13-lilith-panel__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.v13-lilith-panel__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 43% center;
}

.v13-lilith-panel__message {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid rgba(217, 168, 255, 0.28);
  border-radius: 18px;
  background: rgba(18, 14, 28, 0.78);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.v13-lilith-panel__message p {
  margin: 0;
  color: var(--v4-text);
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.v13-lilith-panel__cards {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1 1 auto;
  padding: 12px;
}

.v13-panel-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.065);
}

.v13-panel-card--compact {
  padding: 12px;
}

.v13-panel-card__title {
  margin: 0 0 8px;
  color: var(--v4-text);
  font-size: 0.94rem;
  line-height: 1.35;
}

.v13-panel-card__body {
  margin: 0;
  color: var(--v4-text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.v13-panel-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.v13-app-shell a,
.v13-app-shell button,
.v13-app-shell input,
.v13-app-shell textarea,
.v13-app-shell select {
  max-width: 100%;
}

.v13-app-shell img,
.v13-app-shell video,
.v13-app-shell canvas,
.v13-app-shell svg {
  max-width: 100%;
}

@media (max-width: 980px) {
  .v13-app-shell {
    grid-template-columns: 148px minmax(0, 1fr) 252px;
  }

  .v13-app-shell__center {
    padding: 10px;
  }

  .v13-app-shell__right {
    padding: 10px 10px 10px 0;
  }

  .v13-main-nav__item-eyebrow {
    display: none;
  }
}

/* =========================
   v13 Phase 2: General Consultation UI
========================= */

.v13-lobby-home,
.v13-consultation-home,
.v13-consultation-chat {
  min-width: 0;
  width: 100%;
  color: var(--v4-text);
  background: transparent;
}

.v13-lobby-home {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 100%;
  padding: 22px;
}

.v13-lobby-hero,
.v13-consultation-home__hero {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(217, 168, 255, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 168, 255, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.065);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.v13-lobby-hero__eyebrow,
.v13-consultation-home__eyebrow,
.v13-section-heading__eyebrow {
  margin: 0 0 8px;
  color: var(--v4-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.v13-lobby-hero__title,
.v13-consultation-home__title {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.v13-lobby-hero__description,
.v13-consultation-home__description {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--v4-text-muted);
  line-height: 1.8;
}

.v13-lobby-hero__actions,
.v13-consultation-home__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.v13-primary-button,
.v13-lobby-primary-button,
.v13-secondary-button,
.v13-small-button,
.v13-inline-action,
.v13-lobby-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--v4-text);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.2;
}

.v13-primary-button,
.v13-lobby-primary-button {
  color: #1d1129;
  border-color: transparent;
  background: linear-gradient(180deg, var(--v4-accent-strong), var(--v4-accent));
}

.v13-secondary-button:hover,
.v13-small-button:hover,
.v13-inline-action:hover,
.v13-lobby-secondary-link:hover {
  background: rgba(255, 255, 255, 0.13);
}

.v13-lobby-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v13-lobby-action-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  color: var(--v4-text);
  text-align: left;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.v13-lobby-action-card:hover,
.v13-lobby-action-card:focus-visible {
  border-color: rgba(217, 168, 255, 0.34);
  background: rgba(217, 168, 255, 0.10);
  outline: none;
}

.v13-lobby-action-card.is-primary {
  border-color: rgba(217, 168, 255, 0.34);
  background: rgba(217, 168, 255, 0.12);
}

.v13-lobby-action-card__eyebrow,
.v13-lobby-status-card__label,
.v13-mini-stat__label {
  color: var(--v4-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v13-lobby-action-card__title {
  min-width: 0;
  font-size: 1.2rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.v13-lobby-action-card__description,
.v13-lobby-action-card__action {
  color: var(--v4-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.v13-lobby-action-card__action {
  color: var(--v4-accent-strong);
  font-weight: 800;
}

.v13-lobby-status-grid,
.v13-consultation-home__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.v13-lobby-status-card,
.v13-mini-stat,
.v13-empty-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.v13-lobby-status-card__value,
.v13-mini-stat__value {
  display: block;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-consultation-home {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 100%;
  padding: 22px;
}

.v13-consultation-home__hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.v13-consultation-home__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1.08fr);
  gap: 14px;
  align-items: start;
}

.v13-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 10px;
}

.v13-section-heading__title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.v13-section-heading__count {
  flex: 0 0 auto;
  color: var(--v4-text-muted);
  font-size: 0.85rem;
}

.v13-recent-consultations,
.v13-folder-sections {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.v13-recent-consultations__list,
.v13-folder-sections__grid,
.v13-folder-card__preview {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.v13-folder-sections__grid {
  grid-template-columns: minmax(0, 1fr);
}

.v13-folder-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.v13-folder-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 10px;
}

.v13-folder-card__open {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--v4-text);
  text-align: left;
  background: transparent;
}

.v13-folder-card__title-block {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.v13-folder-card__title,
.v13-folder-card__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-folder-card__meta,
.v13-folder-card__empty,
.v13-chat-side-card__note {
  color: var(--v4-text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.v13-folder-card__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.v13-consultation-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.v13-chat-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(18, 15, 26, 0.50);
}

.v13-chat-header__main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v13-chat-header__back {
  justify-self: start;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--v4-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.v13-chat-header__folder {
  margin: 4px 0 0;
  color: var(--v4-accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.v13-chat-header__title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 1.32rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-chat-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--v4-text-muted);
  font-size: 0.82rem;
}

.v13-chat-header__actions {
  flex: 0 0 auto;
}

.v13-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.v13-chat-messages {
  height: 100%;
  padding: 16px 18px;
}

.v13-chat-input {
  flex: 0 0 auto;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(18, 15, 26, 0.58);
}

.v13-consultation-chat .v4-message-list {
  min-height: 100%;
}

.v13-chat-side-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.v13-chat-side-card--notice {
  border-color: rgba(217, 168, 255, 0.22);
  background: rgba(217, 168, 255, 0.08);
}

.v13-chat-side-card h3,
.v13-chat-side-card .v12-consultation-relationships h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
  line-height: 1.35;
}

.v13-chat-side-card h4 {
  margin: 10px 0 6px;
  font-size: 0.86rem;
}

.v13-chat-side-card p {
  margin: 0;
  color: var(--v4-text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.v13-chat-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.v13-chat-side-card .v6-request-summary-action,
.v13-chat-side-card .v12-consultation-relationships {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.v13-chat-side-card .v6-request-summary-action__panel,
.v13-chat-side-card .v12-relationship-grid,
.v13-chat-side-card .v12-related-list {
  min-width: 0;
}

.v13-chat-side-card .v12-relationship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.v13-chat-side-card .v12-consultation-relationships__header {
  display: grid;
  gap: 8px;
}

.v13-chat-side-card .v12-related-card__button,
.v13-chat-side-card .v6-request-summary-action__button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.v13-chat-side-card .v12-related-card__title,
.v13-chat-side-card .v12-related-card__meta {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .v13-lobby-actions,
  .v13-consultation-home__grid,
  .v13-lobby-status-grid,
  .v13-consultation-home__summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .v13-consultation-home__hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

.v13-room-screen {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.v13-room-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.v13-room-shell > .v4-room-error {
  flex: 0 0 auto;
  margin: 12px 14px 0;
}

.v13-room-shell > .v13-consultation-home,
.v13-room-shell > .v13-consultation-chat {
  flex: 1 1 auto;
  min-height: 0;
}

/* =========================
   v13 Phase 2 Hotfix: Lobby / room home navigation layout
========================= */

.v13-lobby-home--center-lilith {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.v13-lobby-hero--center-lilith {
  display: grid;
  grid-template-columns: minmax(260px, 0.94fr) minmax(320px, 1.06fr);
  align-items: center;
  min-height: 0;
  overflow: hidden;
}

.v13-lobby-hero__visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(217, 168, 255, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 4%, rgba(217, 168, 255, 0.20), transparent 42%),
    rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.v13-lobby-hero__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(100%, 640px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.34));
}

.v13-lobby-hero__message-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.v13-lobby-hero__current {
  margin: 16px 0 0;
  color: var(--v4-text-muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.v13-lobby-hero__current strong {
  color: var(--v4-text);
}

.v13-lobby-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 2px 2px 0;
}

.v13-room-shell > .v13-consultation-home {
  height: 100%;
  overflow: hidden;
}

.v13-consultation-home {
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.v13-consultation-home__grid {
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.v13-recent-consultations,
.v13-folder-sections {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.v13-recent-consultations__list,
.v13-folder-sections__grid {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.v13-folder-card,
.v13-folder-card__preview,
.v13-recent-consultations__list .v4-consultation-card {
  overflow-x: hidden;
}

@media (max-width: 1180px) {
  .v13-lobby-home--center-lilith {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .v13-lobby-hero--center-lilith {
    grid-template-columns: minmax(0, 1fr);
  }

  .v13-lobby-hero__visual {
    min-height: 320px;
  }
}

/* =========================
   v13 Phase 2 Hotfix 2: Consultation home list scroll correction
========================= */

.v13-consultation-home__grid {
  min-height: 0;
  overflow: hidden;
}

.v13-recent-consultations,
.v13-folder-sections {
  min-height: 0;
  overflow: hidden;
}

.v13-recent-consultations__list,
.v13-folder-sections__grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.v13-recent-consultations__list .v4-consultation-card,
.v13-folder-card,
.v13-folder-card__preview,
.v13-folder-card__preview .v4-consultation-card {
  flex: 0 0 auto;
  overflow: visible;
}

.v13-folder-card__preview {
  min-height: 0;
}

.v13-recent-consultations__list .v4-consultation-card__main,
.v13-folder-card__preview .v4-consultation-card__main {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
 * v13 Phase 3 Workspace horizontal UI
 * ----------------------------------------------------------------------- */

.v13-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(131, 91, 62, 0.72);
  font-weight: 700;
}

.v13-muted,
.v13-empty-note {
  color: var(--v13-color-text-muted, #8f8299);
}

.v13-workspace-home,
.v13-workspace-lobby,
.v13-workspace-consultation {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v13-workspace-lobby__header,
.v13-workspace-consultation__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(153, 115, 83, 0.18);
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.78);
  box-shadow: 0 14px 38px rgba(94, 62, 38, 0.08);
}

.v13-workspace-lobby__header h1,
.v13-workspace-consultation__header h1 {
  margin: 0;
  color: rgba(56, 38, 29, 0.95);
}

.v13-workspace-lobby__header p,
.v13-workspace-consultation__header p {
  margin: 4px 0 0;
}

.v13-workspace-primary,
.v13-workspace-secondary,
.v13-workspace-data-card button,
.v13-workspace-desk__links button,
.v13-workspace-side-card button {
  border: 1px solid rgba(121, 83, 58, 0.2);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.v13-workspace-primary,
.v13-workspace-data-card button:hover,
.v13-workspace-desk__links button:hover,
.v13-workspace-side-card button:hover {
  background: linear-gradient(135deg, rgba(151, 104, 72, 0.95), rgba(93, 64, 52, 0.95));
  color: #fff8ef;
}

.v13-workspace-home__summary {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.v13-workspace-home__summary article,
.v13-workspace-home__panel,
.v13-workspace-create,
.v13-workspace-card,
.v13-workspace-data-card,
.v13-workspace-desk__primary,
.v13-workspace-desk__links button,
.v13-workspace-side-card {
  border: 1px solid rgba(143, 105, 75, 0.16);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 10px 26px rgba(82, 53, 35, 0.07);
}

.v13-workspace-home__summary article {
  padding: 12px 14px;
}

.v13-workspace-home__summary strong {
  display: block;
  font-size: 1.2rem;
}

.v13-workspace-home__summary span {
  color: rgba(91, 71, 58, 0.68);
  font-size: 0.82rem;
}

.v13-workspace-home__grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(360px, 0.58fr);
  gap: 14px;
  overflow: hidden;
}

.v13-workspace-home__left,
.v13-workspace-home__right {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v13-workspace-home__right {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.v13-workspace-create {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v13-workspace-create label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.86rem;
  color: rgba(91, 71, 58, 0.78);
}

.v13-workspace-create input,
.v13-workspace-create textarea {
  border: 1px solid rgba(121, 83, 58, 0.16);
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
  resize: vertical;
}

.v13-workspace-home__panel {
  padding: 16px;
  min-height: 0;
}

.v13-workspace-mini-list,
.v13-workspace-list {
  display: grid;
  gap: 10px;
}

.v13-workspace-mini-card,
.v13-workspace-card__button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.v13-workspace-mini-card {
  border: 1px solid rgba(121, 83, 58, 0.14);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.v13-workspace-mini-card strong,
.v13-workspace-mini-card span {
  display: block;
}

.v13-workspace-mini-card span,
.v13-workspace-card__purpose,
.v13-workspace-card__description {
  color: rgba(91, 71, 58, 0.72);
}

.v13-workspace-home__listHeader,
.v13-workspace-card__header,
.v13-workspace-data-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.v13-workspace-card {
  overflow: visible;
}

.v13-workspace-card__button {
  padding: 16px;
}

.v13-workspace-card h3 {
  margin: 0;
}

.v13-workspace-card__meta,
.v13-workspace-lobby__meta,
.v13-workspace-side-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.v13-workspace-card__meta span,
.v13-workspace-lobby__meta span,
.v13-workspace-status,
.v13-workspace-side-metrics span {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(121, 83, 58, 0.08);
  color: rgba(73, 51, 39, 0.74);
  font-size: 0.76rem;
}

.v13-workspace-lobby__titleBlock,
.v13-workspace-consultation__titleBlock {
  flex: 1 1 auto;
  min-width: 0;
}

.v13-workspace-lobby__tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.v13-workspace-lobby__tab {
  border: 1px solid rgba(121, 83, 58, 0.14);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  cursor: pointer;
}

.v13-workspace-lobby__tab strong,
.v13-workspace-lobby__tab span {
  display: block;
}

.v13-workspace-lobby__tab span {
  color: rgba(91, 71, 58, 0.68);
  font-size: 0.8rem;
}

.v13-workspace-lobby__tab.is-active {
  background: rgba(120, 82, 58, 0.95);
  color: #fff7ed;
}

.v13-workspace-lobby__tab.is-active span {
  color: rgba(255, 247, 237, 0.82);
}

.v13-workspace-lobby__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.v13-workspace-briefing,
.v13-workspace-dashboard,
.v13-workspace-desk {
  display: grid;
  gap: 14px;
}

.v13-workspace-briefing__main {
  display: grid;
  grid-template-columns: minmax(180px, 0.36fr) minmax(320px, 0.64fr);
  gap: 16px;
  min-height: 320px;
  border: 1px solid rgba(143, 105, 75, 0.16);
  border-radius: 24px;
  background: rgba(255, 251, 244, 0.86);
  overflow: hidden;
}

.v13-workspace-briefing__visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgba(252, 238, 219, 0.2), rgba(156, 106, 79, 0.16));
}

.v13-workspace-briefing__visual img {
  max-height: 300px;
  max-width: 100%;
  object-fit: contain;
}

.v13-workspace-briefing__message {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.v13-workspace-briefing__message h2,
.v13-workspace-desk__primary h2,
.v13-workspace-data-card h2 {
  margin: 0;
}

.v13-workspace-briefing__actions,
.v13-workspace-desk__actions,
.v13-workspace-desk__links,
.v13-workspace-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v13-workspace-briefing__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.v13-workspace-dashboard {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v13-workspace-data-card,
.v13-workspace-desk__primary {
  padding: 16px;
  overflow: visible;
}

.v13-workspace-data-card--overview {
  grid-column: 1 / -1;
}

.v13-workspace-preview-list,
.v13-workspace-side-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.v13-workspace-preview-list li,
.v13-workspace-side-list li {
  border-radius: 14px;
  padding: 10px;
  background: rgba(121, 83, 58, 0.07);
}

.v13-workspace-preview-list strong,
.v13-workspace-preview-list span {
  display: block;
}

.v13-workspace-preview-list span {
  color: rgba(91, 71, 58, 0.68);
  font-size: 0.8rem;
}

.v13-workspace-desk__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v13-workspace-desk__links button {
  border-radius: 20px;
  text-align: left;
  padding: 16px;
}

.v13-workspace-desk__links strong,
.v13-workspace-desk__links span {
  display: block;
}

.v13-workspace-legacy {
  margin-top: 16px;
}

.v13-workspace-consultation__shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(143, 105, 75, 0.16);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.86);
}

.v13-workspace-consultation__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
}

.v13-workspace-consultation__input {
  flex: 0 0 auto;
  border-top: 1px solid rgba(143, 105, 75, 0.14);
  padding: 12px 14px;
  background: rgba(255, 250, 244, 0.92);
}

.v13-workspace-side-card {
  padding: 14px;
  overflow: visible;
}

.v13-workspace-side-card h3 {
  margin: 0 0 8px;
}

.v13-workspace-side-card p {
  margin: 0 0 10px;
}

.v13-workspace-side-actions {
  flex-direction: column;
}

.v13-workspace-side-actions button,
.v13-workspace-side-card button {
  width: 100%;
  text-align: left;
}

.v13-workspace-relationship-card .v12-consultation-related-data {
  margin-top: 10px;
}

.v13-workspace-relationship-card .v12-relationship-card,
.v13-workspace-relationship-card .v12-relationship-section {
  overflow: visible;
}

.v13-workspace-side-error {
  color: #9b3d2c;
}

@media (max-width: 1180px) {
  .v13-workspace-home__grid,
  .v13-workspace-briefing__main,
  .v13-workspace-dashboard {
    grid-template-columns: 1fr;
  }

  .v13-workspace-briefing__cards,
  .v13-workspace-desk__links {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
 * v13 Phase 4: Artifact / Request wide UI
 * ----------------------------------------------------------------------- */

.v13-artifact-list-screen,
.v13-artifact-detail-screen,
.v13-request-list-screen,
.v13-request-detail-screen {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v13-artifact-list-main,
.v13-request-list-main {
  width: 100%;
  max-width: none;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.v13-artifact-list,
.v13-request-list {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
}

.v13-request-list {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.v13-artifact-list__hero,
.v13-request-list__hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.075);
  min-width: 0;
}

.v13-artifact-list__hero h2,
.v13-request-list__hero h2,
.v13-artifact-detail__header h2 {
  margin: 0;
  color: #fff9ff;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.v13-artifact-list__hero p,
.v13-request-list__hero p,
.v13-artifact-detail__header p {
  margin: 8px 0 0;
  color: rgba(248, 241, 255, 0.76);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.v13-artifact-list__summary,
.v13-request-list__summary {
  flex: 0 0 auto;
  min-width: 112px;
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.095);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.v13-artifact-list__summary strong,
.v13-request-list__summary strong {
  display: block;
  color: #fff;
  font-size: 1.6rem;
}

.v13-artifact-list__summary span,
.v13-request-list__summary span {
  color: rgba(248, 241, 255, 0.68);
  font-size: 0.82rem;
}

.v13-request-list__toolbar {
  min-width: 0;
  overflow-x: hidden;
}

.v13-artifact-list__body,
.v13-request-list__body {
  min-width: 0;
  min-height: 0;
  padding-right: 4px;
}

.v13-artifact-grid,
.v13-request-grid {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.v13-artifact-card,
.v13-request-card {
  min-width: 0;
  overflow: visible;
}

.v13-artifact-card__main,
.v13-request-card__header,
.v13-request-card__title,
.v13-request-card__description,
.v13-artifact-card__title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.v13-artifact-card__kicker,
.v13-kicker {
  margin: 0 0 4px;
  color: rgba(104, 65, 138, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v13-artifact-card__meta,
.v13-request-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v13-artifact-card__meta dt,
.v13-request-card__meta dt {
  color: rgba(248, 241, 255, 0.58);
  font-size: 0.74rem;
}

.v13-artifact-card__meta dd,
.v13-request-card__meta dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.v13-artifact-detail-main {
  max-width: none;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.v13-request-detail {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.075);
}

.v13-artifact-detail__header {
  flex: 0 0 auto;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.v13-artifact-detail__meta,
.v13-artifact-detail__history,
.v13-artifact-detail__actions {
  flex: 0 0 auto;
  padding: 14px 20px 0;
}

.v13-artifact-preview {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px 20px;
}

.v13-artifact-preview pre,
.v13-artifact-preview code,
.v13-request-detail pre,
.v13-request-detail code {
  max-width: 100%;
}

.v13-artifact-preview pre,
.v13-request-detail pre {
  overflow-x: auto;
}

.v13-request-detail-screen {
  display: block;
  padding: 18px;
}

.v13-request-detail {
  padding: 0;
}

.v13-request-detail__header {
  flex: 0 0 auto;
}

.v13-request-detail__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px;
}

.v13-request-status {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(143, 105, 75, 0.18);
  background: rgba(255, 250, 244, 0.68);
}

.v13-request-status__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.v13-artifact-side-card,
.v13-request-side-card {
  padding: 14px;
  overflow: visible;
}

.v13-artifact-side-card h3,
.v13-request-side-card h3 {
  margin: 0 0 8px;
}

.v13-artifact-side-card p,
.v13-request-side-card p {
  margin: 0 0 10px;
}

.v13-artifact-side-card .v12-origin-card,
.v13-request-side-card .v12-origin-card,
.v13-artifact-side-card .v7-related-requests {
  margin: 10px 0 0;
  overflow: visible;
}

.v13-artifact-side-card .v12-origin-card,
.v13-request-side-card .v12-origin-card {
  padding: 12px;
}

.v13-side-mini-meta {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.v13-side-mini-meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.v13-side-mini-meta dt {
  color: rgba(91, 71, 58, 0.62);
  font-size: 0.78rem;
}

.v13-side-mini-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.v13-side-actions,
.v13-side-link-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.v13-side-link-list {
  list-style: none;
  padding: 0;
}

.v13-side-actions button,
.v13-side-link-list button,
.v13-artifact-side-card button,
.v13-request-side-card button {
  width: 100%;
  text-align: left;
}

.v13-muted {
  color: var(--v13-color-text-muted);
  font-size: 0.86rem;
}

@media (max-width: 1180px) {
  .v13-artifact-list__hero,
  .v13-request-list__hero {
    flex-direction: column;
  }

  .v13-artifact-list__summary,
  .v13-request-list__summary {
    width: 100%;
  }
}

/* =========================
   v13 Phase 4 Hotfix: Artifact / Request right panel width guard
   Scope: prevent v12/v7 relationship components from exceeding the v13 Lilith panel width.
========================= */
.v13-lilith-panel__cards,
.v13-lilith-panel__cards > *,
.v13-artifact-side-card,
.v13-request-side-card {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.v13-artifact-side-card,
.v13-request-side-card {
  width: 100%;
}

.v13-artifact-side-card *,
.v13-request-side-card * {
  min-width: 0;
}

.v13-artifact-side-card .v12-origin-card,
.v13-request-side-card .v12-origin-card,
.v13-artifact-side-card .v7-related-requests,
.v13-request-side-card .v7-related-requests {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.v13-artifact-side-card .v12-origin-card__header,
.v13-request-side-card .v12-origin-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.v13-artifact-side-card .v12-workspace-affiliation,
.v13-request-side-card .v12-workspace-affiliation {
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.v13-artifact-side-card .v12-origin-artifacts__list li,
.v13-request-side-card .v12-origin-artifacts__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.v13-artifact-side-card .v12-origin-artifacts__list small,
.v13-request-side-card .v12-origin-artifacts__list small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.v13-artifact-side-card .v12-relationship-actions,
.v13-request-side-card .v12-relationship-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.v13-artifact-side-card .v12-link-button,
.v13-request-side-card .v12-link-button,
.v13-artifact-side-card .v12-relationship-action,
.v13-request-side-card .v12-relationship-action,
.v13-artifact-side-card .v7-related-request-card,
.v13-request-side-card .v7-related-request-card {
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.v13-artifact-side-card .v7-related-request-card,
.v13-request-side-card .v7-related-request-card {
  grid-template-columns: minmax(0, 1fr);
}

.v13-artifact-side-card .v7-related-request-card__title,
.v13-artifact-side-card .v7-related-request-card__labels,
.v13-request-side-card .v7-related-request-card__title,
.v13-request-side-card .v7-related-request-card__labels {
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.v13-artifact-side-card .v7-related-request-card__arrow,
.v13-request-side-card .v7-related-request-card__arrow {
  display: none;
}

/* =========================
   v13 Phase 4 Hotfix: Artifact / Request right panel card-list scroll
   Scope: keep vertical scrolling on the Lilith panel card list, not inside each support card.
========================= */
.v13-lilith-panel__cards.v13-y-scroll,
.v13-lilith-panel__cards {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.v13-lilith-panel__cards > *,
.v13-artifact-side-card,
.v13-request-side-card,
.v13-artifact-side-card .v12-origin-card,
.v13-request-side-card .v12-origin-card,
.v13-artifact-side-card .v7-related-requests,
.v13-request-side-card .v7-related-requests,
.v13-artifact-side-card .v12-origin-card__body,
.v13-request-side-card .v12-origin-card__body,
.v13-artifact-side-card .v12-origin-artifacts,
.v13-request-side-card .v12-origin-artifacts,
.v13-artifact-side-card .v12-origin-artifacts__list,
.v13-request-side-card .v12-origin-artifacts__list,
.v13-artifact-side-card .v7-related-requests__list,
.v13-request-side-card .v7-related-requests__list {
  max-height: none;
  overflow: visible;
}

.v13-artifact-side-card,
.v13-request-side-card {
  flex: 0 0 auto;
}

.v13-artifact-side-card .v12-origin-card,
.v13-request-side-card .v12-origin-card,
.v13-artifact-side-card .v7-related-requests,
.v13-request-side-card .v7-related-requests {
  overflow-x: visible;
  overflow-y: visible;
}

/* =========================
   v13.8 Settings — wide UI reconstruction
   Scope: FE/v13 settings content and settings-specific controls only.
========================= */
.v13-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 10px;
  overflow-x: hidden;
}

.v13-settings-content-header {
  flex: 0 0 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.v13-settings-content-header__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.v13-settings-content-header__label,
.v13-settings-section__label {
  margin: 0;
  color: var(--v4-accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.v13-settings-content-header__title {
  margin: 0;
  color: var(--v4-text);
  font-size: 1.25rem;
  line-height: 1.25;
}

.v13-settings-content-header__description,
.v13-settings-section__description {
  margin: 0;
  color: var(--v4-text-subtle);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.v13-settings__body {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  align-content: start;
}

.v13-settings-section {
  display: grid;
  gap: 10px;
  box-sizing: border-box;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  overflow: visible;
}

.v13-settings-section--developer,
.v13-settings-section--state {
  background: rgba(19, 15, 28, 0.62);
}

.v13-settings-section__header {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v13-settings-section__title {
  margin: 0;
  color: var(--v4-text);
  font-size: 1rem;
  line-height: 1.35;
}

.v13-settings-empty-state {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.v13-settings-empty-state p {
  margin: 0;
  color: var(--v4-text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.v13-settings-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.v13-settings-control-row__body,
.v13-settings-control-row__action {
  min-width: 0;
}

.v13-settings-control-row__body {
  display: grid;
  gap: 3px;
}

.v13-settings-control-row__title {
  margin: 0;
  color: var(--v4-text);
  font-size: 0.88rem;
  line-height: 1.35;
}

.v13-settings-control-row__description,
.v13-settings-control-row__current {
  margin: 0;
  color: var(--v4-text-muted);
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.v13-settings-control-row__action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.v13-settings-control-row__current strong {
  color: var(--v4-text);
}

.v13-settings-toggle-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--v4-text);
  background: rgba(255, 255, 255, 0.065);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.v13-settings-toggle-button:hover,
.v13-settings-toggle-button:focus-visible,
.v13-settings-toggle-button.is-active {
  border-color: rgba(217, 168, 255, 0.42);
  background: rgba(217, 168, 255, 0.15);
  outline: none;
}

.v13-settings-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.v13-settings-state-item {
  display: grid;
  grid-template-columns: minmax(100px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.v13-settings-state-item__label,
.v13-settings-state-item__value {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v13-settings-state-item__label {
  color: var(--v4-text-subtle);
  font-size: 0.72rem;
  line-height: 1.45;
}

.v13-settings-state-item__value {
  color: var(--v4-text);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.v13-settings-state-item__value.is-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
}

@media (max-width: 1100px) {
  .v13-settings-state-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .v13-settings {
    padding: 8px;
  }

  .v13-settings-control-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .v13-settings-control-row__action {
    justify-content: space-between;
  }
}

/* =========================
   v13 Phase 6 Hotfix: Workspace consultation chain right panel width guard
   Scope: keep the Workspace consultation Consultation Chain card within the v13 Lilith panel width.
========================= */
.v13-workspace-side-panel,
.v13-workspace-side-card,
.v13-workspace-relationship-card,
.v13-workspace-relationship-card .v12-consultation-relationships,
.v13-workspace-relationship-card .v12-consultation-relationships__header,
.v13-workspace-relationship-card .v12-relationship-grid,
.v13-workspace-relationship-card .v12-relationship-column,
.v13-workspace-relationship-card .v12-related-list,
.v13-workspace-relationship-card .v12-related-card,
.v13-workspace-relationship-card .v12-related-card__button {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.v13-workspace-side-card,
.v13-workspace-relationship-card,
.v13-workspace-relationship-card .v12-consultation-relationships,
.v13-workspace-relationship-card .v12-related-card__button {
  width: 100%;
}

.v13-workspace-side-card,
.v13-workspace-relationship-card,
.v13-workspace-relationship-card .v12-consultation-relationships {
  overflow-x: hidden;
}

.v13-workspace-side-card * {
  min-width: 0;
}

.v13-workspace-relationship-card .v12-consultation-relationships {
  margin: 10px 0 0;
}

.v13-workspace-relationship-card .v12-consultation-relationships__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.v13-workspace-relationship-card .v12-relationship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.v13-workspace-relationship-card .v12-workspace-affiliation {
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.v13-workspace-relationship-card .v12-link-button,
.v13-workspace-relationship-card .v12-related-card__button,
.v13-workspace-relationship-card .v12-related-card__title,
.v13-workspace-relationship-card .v12-related-card__meta,
.v13-workspace-relationship-card .v12-relationship-empty,
.v13-workspace-relationship-card .v12-relationship-error,
.v13-workspace-relationship-card .v12-relationship-warnings,
.v13-workspace-side-card button,
.v13-workspace-side-card a,
.v13-workspace-side-card p,
.v13-workspace-side-card li,
.v13-workspace-side-card h3,
.v13-workspace-side-card h4,
.v13-workspace-side-metrics span,
.v13-workspace-side-list li {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.v13-workspace-relationship-card .v12-related-card__button,
.v13-workspace-side-card button {
  min-width: 0;
}

.v13-workspace-side-metrics {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.v13-lilith-panel__cards > .v13-workspace-side-card {
  flex: 0 0 auto;
}

/* =========================
   v13 Phase 6 Hotfix: Workspace consultation chain right panel card-list scroll
   Scope: keep vertical scrolling on the Lilith panel card list, not inside Workspace relationship support cards.
========================= */
.v13-lilith-panel__cards.v13-y-scroll,
.v13-lilith-panel__cards {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.v13-lilith-panel__cards > .v13-workspace-side-card,
.v13-workspace-side-card,
.v13-workspace-relationship-card,
.v13-workspace-relationship-card .v12-consultation-relationships,
.v13-workspace-relationship-card .v12-consultation-relationships__header,
.v13-workspace-relationship-card .v12-relationship-grid,
.v13-workspace-relationship-card .v12-relationship-column,
.v13-workspace-relationship-card .v12-related-list,
.v13-workspace-relationship-card .v12-related-card,
.v13-workspace-relationship-card .v12-related-card__button,
.v13-workspace-relationship-card .v12-relationship-empty,
.v13-workspace-relationship-card .v12-relationship-error,
.v13-workspace-relationship-card .v12-relationship-warnings {
  max-height: none;
  overflow: visible;
}

.v13-lilith-panel__cards > .v13-workspace-side-card,
.v13-workspace-side-card,
.v13-workspace-relationship-card {
  flex: 0 0 auto;
}

/* =========================
   v13.1: Common UI foundation / Header Model / Scroll classes
   Scope: common header, v13 token adoption, screen layout classes, and scroll debug mode.
========================= */
body {
  color: var(--v13-color-text-main, var(--v4-text));
  background: var(--v13-color-bg-page, var(--v4-bg));
}

.v13-app-shell {
  grid-template-columns: var(--v13-nav-width, 176px) minmax(0, 1fr);
  color: var(--v13-color-text-main, var(--v4-text));
  background:
    radial-gradient(circle at 14% 8%, rgba(199, 125, 255, 0.16), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(143, 92, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #191225 0%, var(--v13-color-bg-page, var(--v4-bg)) 48%, #0d0b12 100%);
}

.v13-app-shell__workspace {
  display: grid;
  grid-template-rows: var(--v13-header-height, 74px) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v13-app-shell__header {
  min-width: 0;
  min-height: 0;
  padding: 12px 14px 0;
  overflow: hidden;
}

.v13-app-shell__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--v13-right-panel-width, clamp(286px, 24vw, 360px));
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v13-app-shell__center {
  height: 100%;
  min-height: 0;
  padding: 14px;
}

.v13-app-shell__right {
  height: 100%;
  min-height: 0;
  padding: 14px 14px 14px 0;
}

.v13-center-main {
  border-color: var(--v13-color-border-soft, rgba(255, 255, 255, 0.10));
  border-radius: var(--v13-radius-2xl, 26px);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--v13-shadow-panel, 0 20px 60px rgba(0, 0, 0, 0.24));
}

.v13-main-scroll,
.v13-side-scroll,
.v13-card-list-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.v13-screen-home,
.v13-screen-chat,
.v13-screen-workspace-lobby,
.v13-screen-list,
.v13-screen-detail,
.v13-screen-settings {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
}

.v13-common-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 10px 14px;
  border: 1px solid var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  border-radius: var(--v13-radius-xl, 24px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.04)),
    rgba(15, 12, 22, 0.68);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.v13-common-header__leading,
.v13-common-header__controls,
.v13-common-header__actions,
.v13-common-header__action-group,
.v13-common-header__menu-actions,
.v13-common-header__back,
.v13-common-header__breadcrumbs,
.v13-common-header__segmented {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.v13-common-header__leading {
  justify-content: flex-start;
}

.v13-common-header__title-block {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.v13-common-header__eyebrow {
  margin: 0;
  color: var(--v13-color-accent-gold, var(--v4-accent));
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
}

.v13-common-header__title {
  min-width: 0;
  margin: 0;
  color: var(--v13-color-text-main, var(--v4-text));
  font-size: clamp(1.05rem, 1.5vw, 1.42rem);
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-common-header__subtitle {
  min-width: 0;
  margin: 0;
  color: var(--v13-color-text-sub, var(--v4-text-muted));
  font-size: 0.78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-common-header__button,
.v13-common-header__breadcrumb,
.v13-common-header__segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  border-radius: var(--v13-radius-pill, 999px);
  color: var(--v13-color-text-main, var(--v4-text));
  background: rgba(255, 255, 255, 0.065);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.v13-common-header__button:hover,
.v13-common-header__button:focus-visible,
.v13-common-header__breadcrumb:hover,
.v13-common-header__breadcrumb:focus-visible,
.v13-common-header__segment:hover,
.v13-common-header__segment:focus-visible {
  border-color: rgba(199, 125, 255, 0.42);
  background: rgba(199, 125, 255, 0.14);
  outline: none;
}

.v13-common-header__button--primary {
  border-color: rgba(199, 125, 255, 0.50);
  background: linear-gradient(135deg, rgba(199, 125, 255, 0.28), rgba(143, 92, 255, 0.20));
  box-shadow: 0 8px 22px rgba(143, 92, 255, 0.16);
}

.v13-common-header__button--ghost,
.v13-common-header__breadcrumb {
  background: transparent;
}

.v13-common-header__button-icon {
  flex: 0 0 auto;
  opacity: 0.9;
}

.v13-common-header__control-label {
  flex: 0 0 auto;
  color: var(--v13-color-text-muted, var(--v4-text-muted));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.v13-common-header__segmented {
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  border-radius: var(--v13-radius-pill, 999px);
  background: rgba(0, 0, 0, 0.16);
}

.v13-common-header__segment {
  min-height: 30px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
  color: var(--v13-color-text-sub, var(--v4-text-muted));
}

.v13-common-header__segment.is-active {
  color: var(--v13-color-text-main, var(--v4-text));
  border-color: rgba(199, 125, 255, 0.35);
  background: rgba(199, 125, 255, 0.18);
}

.v13-common-header__breadcrumb-separator {
  color: var(--v13-color-text-muted, var(--v4-text-muted));
  font-size: 0.78rem;
}

.v13-lilith-panel {
  border-color: var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  border-radius: var(--v13-radius-2xl, 26px);
  background: rgba(15, 12, 22, 0.72);
  box-shadow: var(--v13-shadow-panel, 0 20px 60px rgba(0, 0, 0, 0.22));
}

.v13-lilith-panel__cards.v13-card-list-scroll,
.v13-lilith-panel__cards {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.v13-artifact-list--list .v13-artifact-grid,
.v13-request-list--list .v13-request-grid {
  grid-template-columns: minmax(0, 1fr);
}

.v13-artifact-list--card .v13-artifact-grid,
.v13-request-list--card .v13-request-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.v13-artifact-list--list .v13-artifact-card,
.v13-request-list--list .v13-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
}

.v13-artifact-list--card .v13-artifact-card,
.v13-request-list--card .v13-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.v13-artifact-list--list .v13-artifact-card__actions {
  justify-self: end;
}

.v13-dev-scroll-visible .v13-scroll-debug-active {
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  outline: 2px solid rgba(199, 125, 255, 0.72);
  outline-offset: -2px;
  box-shadow:
    inset 0 0 0 1px rgba(215, 181, 109, 0.22),
    0 0 0 1px rgba(199, 125, 255, 0.10);
}

.v13-dev-scroll-visible .v13-main-scroll.v13-scroll-debug-active {
  background-image:
    linear-gradient(rgba(199, 125, 255, 0.035), rgba(199, 125, 255, 0.035));
}

.v13-dev-scroll-visible .v13-card-list-scroll.v13-scroll-debug-active {
  background-image:
    linear-gradient(rgba(119, 217, 139, 0.045), rgba(119, 217, 139, 0.045));
}

.v13-dev-scroll-visible .v13-scroll-debug-target:not(.v13-scroll-debug-active) {
  outline: none;
}

@media (max-width: 1180px) {
  .v13-common-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-rows: auto;
  }

  .v13-common-header__leading,
  .v13-common-header__title-block {
    grid-column: 1 / 2;
  }

  .v13-common-header__controls,
  .v13-common-header__actions {
    grid-column: 2 / 3;
  }

  .v13-common-header__subtitle {
    display: none;
  }
}

@media (max-width: 980px) {
  .v13-app-shell {
    grid-template-columns: var(--v13-nav-width-compact, 148px) minmax(0, 1fr);
  }

  .v13-app-shell__body {
    grid-template-columns: minmax(0, 1fr) var(--v13-right-panel-width-compact, 252px);
  }

  .v13-common-header__actions,
  .v13-common-header__leading {
    display: none;
  }
}

/* =========================
   v13.1 follow-up: Common header 3-column layout / Request card layout repair
   Scope: keep v13.1 common header lightweight and prevent request cards from inheriting
   the experimental list-mode multi-column layout that squeezed metadata vertically.
========================= */
.v13-common-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.v13-common-header__leading,
.v13-common-header__title-block,
.v13-common-header__trailing {
  min-width: 0;
  max-width: 100%;
}

.v13-common-header__leading,
.v13-common-header__trailing {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.v13-common-header__leading {
  justify-content: flex-start;
}

.v13-common-header__title-block {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.v13-common-header__trailing {
  justify-content: flex-end;
}

.v13-common-header__controls,
.v13-common-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.v13-common-header__title {
  text-align: center;
}

.v13-common-header__eyebrow,
.v13-common-header__subtitle {
  display: none;
}

.v13-request-list--list .v13-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.v13-request-list--list .v13-request-card__header,
.v13-request-list--list .v13-request-card__title,
.v13-request-list--list .v13-request-card__description,
.v13-request-list--list .v13-request-card__meta {
  min-width: 0;
  max-width: 100%;
}

.v13-request-list--list .v13-request-card__meta dd {
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 1180px) {
  .v13-common-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .v13-common-header__leading,
  .v13-common-header__title-block,
  .v13-common-header__trailing {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .v13-common-header__leading,
  .v13-common-header__trailing {
    display: flex;
  }
}

/* v13.1 follow-up: AppShell header / left nav final base style */
.v13-app-shell__header {
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  height: var(--v13-header-height, 74px);
  overflow: hidden;
  border-bottom: 1px solid rgba(199, 125, 255, 0.18);
  background: rgba(15, 12, 22, 0.78);
}

.v13-common-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
}

.v13-common-header__leading,
.v13-common-header__trailing {
  flex: 0 0 clamp(220px, 22vw, 320px);
  min-width: 0;
  max-width: clamp(220px, 22vw, 320px);
}

.v13-common-header__leading {
  justify-content: flex-start;
}

.v13-common-header__trailing {
  justify-content: flex-end;
}

.v13-common-header__title-block {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
  text-align: center;
}

.v13-common-header__eyebrow,
.v13-common-header__subtitle {
  display: block;
}

.v13-common-header__title {
  max-width: 100%;
  text-align: center;
}

.v13-main-nav__item {
  border-radius: 0;
  border-left: 4px solid transparent;
}

.v13-main-nav__item:hover,
.v13-main-nav__item:focus-visible {
  border-radius: 0;
}

.v13-main-nav__item--active {
  border-radius: 0;
  border-left-color: rgba(217, 168, 255, 0.88);
  box-shadow: none;
}

@media (max-width: 1000px) {
  .v13-common-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-rows: auto;
    align-items: center;
    padding: 6px 12px;
  }

  .v13-common-header__leading,
  .v13-common-header__title-block,
  .v13-common-header__trailing {
    flex: initial;
    max-width: 100%;
  }
}

/* =========================
   v13.2 follow-up: Lobby Hermes Stage actor-centered visual
   Scope: lobby entrance experience only. Background / Lilith / UI are independent layers.
========================= */
.v13-app-shell--no-right .v13-app-shell__body {
  grid-template-columns: minmax(0, 1fr);
}

.v13-app-shell--no-right .v13-app-shell__right {
  display: none;
}

.v13-app-shell--lobby-stage .v13-app-shell__center {
  padding: 0;
}

.v13-app-shell--lobby-stage .v13-center-main {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.v13-app-shell--lobby-stage .v13-center-main.v13-main-scroll {
  overflow: hidden;
}

.v13-lobby-home--stage,
.v13-screen--lobby,
.v13-stage,
.v13-stage--lobby,
.v13-lobby-stage,
.v13-lobby-stage__scene,
.v13-lobby-stage__actors,
.v13-lobby-stage__guidance,
.v13-guidance-card {
  min-width: 0;
  overflow-x: hidden;
}

.v13-lobby-home--stage {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  color: var(--v13-color-text-main, var(--v4-text));
  background: transparent;
}

.v13-stage--lobby,
.v13-lobby-stage {
  --v13-lobby-bg-position: center center;
  --v13-lobby-bg-size: cover;
  --v13-lobby-actors-shift-x: 0px;
  --v13-lobby-actors-padding-inline: clamp(28px, 5vw, 104px);
  --v13-lobby-lilith-height: min(82vh, calc(100% - 18px), 860px);
  --v13-lobby-lilith-nudge-x: 0px;
  /* --v13-lobby-guidance-width: clamp(360px, 31vw, 500px); */
  --v13-lobby-guidance-width: clamp(360px, 40vw, 600px);
  --v13-lobby-guidance-lift: clamp(110px, 16vh, 220px);
  --v13-lobby-guidance-nudge-x: 0px;
  --v13-lobby-guidance-gap: 16px;

  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 18%, rgba(199, 125, 255, 0.20), transparent 30%),
    radial-gradient(circle at 80% 24%, rgba(215, 181, 109, 0.13), transparent 32%),
    linear-gradient(135deg, rgba(19, 13, 28, 0.98), rgba(9, 7, 14, 0.98));
}

.v13-lobby-stage__scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.v13-lobby-stage__scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/v13/assets/lobby/hermes-v13-lobby-background.webp");
  background-repeat: no-repeat;
  background-position: var(--v13-lobby-bg-position);
  background-size: var(--v13-lobby-bg-size);
}

.v13-lobby-stage__scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(12, 9, 18, 0.08) 0%, rgba(12, 9, 18, 0.08) 44%, rgba(12, 9, 18, 0.34) 100%),
    linear-gradient(180deg, rgba(10, 8, 15, 0.10) 0%, rgba(10, 8, 15, 0.00) 42%, rgba(10, 8, 15, 0.22) 100%);
}

.v13-lobby-stage__actors {
  position: absolute;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-inline: var(--v13-lobby-actors-padding-inline);
  overflow: hidden;
  pointer-events: none;
  transform: translateX(var(--v13-lobby-actors-shift-x));
}

.v13-lobby-stage__lilith-button,
.v13-lobby-stage__guidance {
  pointer-events: auto;
}

.v13-lobby-stage__lilith-button {
  flex: 0 0 auto;
  align-self: flex-end;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: auto;
  height: var(--v13-lobby-lilith-height);
  max-width: min(48vw, 680px);
  max-height: calc(100% - 12px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(var(--v13-lobby-lilith-nudge-x));
}

.v13-lobby-stage__lilith-button:focus-visible,
.v13-guidance-card[role="button"]:focus-visible {
  outline: 2px solid rgba(217, 168, 255, 0.78);
  outline-offset: 4px;
}

.v13-lobby-stage__lilith-image {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  filter: drop-shadow(0 26px 42px rgba(0, 0, 0, 0.45));
}

.v13-lobby-stage__guidance {
  flex: 0 0 auto;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--v13-lobby-guidance-gap);
  width: var(--v13-lobby-guidance-width);
  max-width: min(40vw, 520px);
  margin-bottom: var(--v13-lobby-guidance-lift);
  transform: translateX(var(--v13-lobby-guidance-nudge-x));
}

.v13-guidance-card {
  box-sizing: border-box;
  width: 100%;
  min-height: clamp(150px, 18vh, 220px);
  max-height: min(36vh, 340px);
  padding: clamp(20px, 2.4vw, 32px);
  color: var(--v13-color-text-main, var(--v4-text));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--v13-radius-2xl, 26px);
  background: rgba(18, 13, 28, 0.76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.v13-guidance-card[role="button"] {
  cursor: pointer;
}

.v13-guidance-card__eyebrow {
  margin: 0 0 10px;
  color: var(--v13-color-accent-main, var(--v4-accent));
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v13-guidance-card__title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.38rem, 2.25vw, 2.42rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.v13-guidance-card__body {
  display: -webkit-box;
  margin: 14px 0 0;
  color: var(--v13-color-text-muted, var(--v4-text-muted));
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  font-size: clamp(0.98rem, 1.08vw, 1.12rem);
  line-height: 1.82;
}

.v13-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.v13-action-group--lobby {
  justify-content: flex-start;
}

.v13-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-width: 0;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    linear-gradient(180deg, rgba(67, 43, 88, 0.96), rgba(35, 22, 49, 0.98));

  color: var(--v13-color-text-main, #f8f1ff);

  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;

  cursor: pointer;
  user-select: none;
  transform: translateY(0);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    filter 0.2s ease;
}
.v13-button:hover {
  transform: translateY(-2px);
  border: 2px solid rgba(222, 177, 255, 0.6);
  
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    linear-gradient(180deg, rgba(83, 52, 108, 0.98), rgba(42, 26, 60, 1));

  filter: brightness(1.05);
}
.v13-button:active {
  transform: translateY(2px);
  filter: brightness(0.98);
}
.v13-button:focus-visible {
  outline: 3px solid rgba(226, 174, 255, 0.88);
  outline-offset: 4px;
}
.v13-button:disabled,
.v13-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  filter: grayscale(0.15);
}

.v13-button--primary {
  min-height: 52px;
  padding-inline: 28px;

  border-color: rgba(255, 255, 255, 0.70);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    linear-gradient(180deg, rgba(245, 205, 255, 1), rgba(205, 137, 235, 0.98));

  color: #25122f;
}

.v13-button--primary:hover {
  border-color: rgba(255, 255, 255, 0.88);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.10)),
    linear-gradient(180deg, rgba(255, 226, 255, 1), rgba(220, 156, 246, 1));
}

.v13-lobby-stage__primary {
  width: min(100%, 280px);
}

.v13-lobby-stage .v13-guidance-card--lobby {
  padding: 24px;
  border-radius: var(--v13-radius-xl, 24px);
}
.v13-lobby-stage .v13-guidance-card--lobby .v13-guidance-card__eyebrow {
  font-size: 16px;
}
.v13-lobby-stage .v13-guidance-card--lobby .v13-guidance-card__title {
  font-size: 24px;
  word-break: keep-all;
}
.v13-lobby-stage .v13-guidance-card--lobby .v13-guidance-card__body {
  font-size: 16px;
}

@media (max-width: 1180px) {
  .v13-stage--lobby,
  .v13-lobby-stage {
    --v13-lobby-actors-padding-inline: clamp(20px, 3vw, 58px);
    --v13-lobby-lilith-height: min(78vh, calc(100% - 18px), 800px);
    --v13-lobby-guidance-width: clamp(330px, 36vw, 460px);
    --v13-lobby-guidance-lift: clamp(96px, 14vh, 180px);
  }

  .v13-lobby-stage__guidance {
    max-width: min(42vw, 480px);
  }
}

@media (max-width: 860px) {
  .v13-app-shell--lobby-stage .v13-center-main.v13-main-scroll {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .v13-stage--lobby,
  .v13-lobby-stage {
    --v13-lobby-lilith-height: min(56vh, 500px);
    --v13-lobby-guidance-width: min(100%, 460px);
    --v13-lobby-guidance-lift: 0px;
    min-height: 780px;
  }

  .v13-lobby-stage__scene::before {
    background-position: center center;
  }

  .v13-lobby-stage__actors {
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 24px 18px;
    transform: none;
  }

  .v13-lobby-stage__lilith-button {
    max-width: min(76vw, 420px);
    transform: none;
  }

  .v13-lobby-stage__guidance {
    width: var(--v13-lobby-guidance-width);
    max-width: 100%;
    margin-bottom: 0;
    transform: none;
  }

  .v13-lobby-stage__primary {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   v13.3 Workspace UI: Workspace home / briefing / scoped Workspace lists
   -------------------------------------------------------------------------- */

.v13-workspace-lobby--briefing-only {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v13-workspace-lobby--briefing-only .v13-workspace-lobby__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(18px, 2vw, 28px);
}

.v13-workspace-briefing {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.v13-workspace-briefing__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1.28fr);
  align-items: end;
  gap: clamp(20px, 3vw, 44px);
  min-height: clamp(420px, 54vh, 620px);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  background-image:
    linear-gradient(135deg, rgba(24, 18, 38, 0.72), rgba(67, 48, 82, 0.52)),
    url("/v13/assets/workspace/hermes-v13-workspace-briefing-background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.v13-workspace-briefing__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 24%, rgba(255,255,255,0.20), transparent 32%),
    linear-gradient(90deg, rgba(17,12,26,0.36), rgba(17,12,26,0.06) 44%, rgba(17,12,26,0.30));
  pointer-events: none;
}

.v13-workspace-briefing__visual,
.v13-workspace-briefing__message-card {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.v13-workspace-briefing__visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  overflow: hidden;
}

.v13-workspace-briefing__lilith-image {
  display: block;
  width: auto;
  max-width: min(100%, 420px);
  max-height: clamp(360px, 50vh, 580px);
  object-fit: contain;
}

.v13-workspace-briefing__message-card {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 38px);
  max-width: 680px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(20, 14, 31, 0.82);
  backdrop-filter: blur(10px);
}

.v13-workspace-briefing__message-card h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.v13-workspace-briefing__purpose,
.v13-workspace-briefing__lilith-message p {
  margin: 0;
  color: rgba(255, 250, 255, 0.88);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.v13-workspace-briefing__lilith-message {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.v13-workspace-briefing__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.v13-workspace-briefing__meta span,
.v13-workspace-filtered-list__summary,
.v13-workspace-side-metrics span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 250, 255, 0.78);
  font-size: 12px;
}

.v13-workspace-briefing-notice {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 250, 255, 0.84);
  line-height: 1.6;
}

.v13-workspace-briefing-notice--error {
  background: rgba(148, 42, 76, 0.26);
}

.v13-workspace-briefing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.v13-workspace-briefing__summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.v13-workspace-briefing-card,
.v13-workspace-side-card,
.v13-workspace-filtered-list__hero,
.v13-workspace-filtered-list__state,
.v13-workspace-filtered-list__empty {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.v13-workspace-briefing-card {
  padding: 18px;
}

.v13-workspace-briefing-card h2,
.v13-workspace-side-card h3,
.v13-workspace-filtered-list__hero h1,
.v13-workspace-filtered-list__state h1,
.v13-workspace-filtered-list__empty h2 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.v13-workspace-briefing-card p,
.v13-workspace-side-card p,
.v13-workspace-filtered-list__hero p,
.v13-workspace-filtered-list__state p,
.v13-workspace-filtered-list__empty p {
  overflow-wrap: anywhere;
}

.v13-workspace-briefing-flow,
.v13-workspace-next-actions,
.v13-case-dock__preview-list,
.v13-case-dock__next-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.v13-workspace-briefing-flow__step,
.v13-workspace-next-action-card,
.v13-case-dock__next-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.v13-workspace-next-action-card__index,
.v13-case-dock__next-list li > span {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(214, 167, 255, 0.22);
}

.v13-case-dock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.v13-workspace-side-card {
  padding: 14px;
}

.v13-workspace-side-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.v13-case-dock__preview-item {
  min-width: 0;
}

.v13-case-dock__preview-item button,
.v13-workspace-filtered-item__button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.v13-case-dock__preview-item button:hover,
.v13-workspace-filtered-item__button:hover {
  border-color: rgba(220, 184, 255, 0.38);
  background: rgba(255, 255, 255, 0.10);
}

.v13-case-dock__preview-item strong,
.v13-workspace-filtered-item strong {
  overflow-wrap: anywhere;
}

.v13-case-dock__preview-item span,
.v13-workspace-filtered-item span {
  color: rgba(255, 250, 255, 0.66);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.v13-case-dock__all-link {
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.v13-workspace-filtered-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: clamp(18px, 2vw, 28px);
}

.v13-workspace-filtered-list__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.v13-workspace-filtered-list__summary {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  border-radius: 16px;
  padding: 10px 12px;
}

.v13-workspace-filtered-list__summary strong {
  font-size: 20px;
}

.v13-workspace-filtered-list__body {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.v13-workspace-filtered-list__items {
  min-width: 0;
}

.v13-workspace-filtered-list__items--consultations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.v13-workspace-filtered-list__empty,
.v13-workspace-filtered-list__state {
  padding: 22px;
}

.v13-workspace-filtered-item {
  min-width: 0;
}

@media (max-width: 1180px) {
  .v13-workspace-briefing__stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .v13-workspace-briefing__visual {
    max-height: 260px;
  }

  .v13-workspace-briefing__summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .v13-workspace-filtered-list__hero {
    align-items: stretch;
    flex-direction: column;
  }

  .v13-workspace-filtered-list__summary {
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
 * v13.3 Workspace Home visual alignment
 * - Use the full AppShell center width.
 * - Align Workspace home cards/forms with the v13 dark glass UI language.
 * ----------------------------------------------------------------------- */

.v13-screen-workspace-home,
.v13-workspace-home {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: var(--v13-space-lg, 16px);
  overflow: hidden;
  color: var(--v13-color-text-main, #f5edf8);
  background:
    radial-gradient(circle at 18% 8%, rgba(199, 125, 255, 0.12), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(143, 92, 255, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(20, 16, 32, 0.62), rgba(9, 13, 24, 0.24));
}

.v13-workspace-home .v13-kicker {
  color: var(--v13-color-accent-primary, #c77dff);
}

.v13-workspace-home .v13-muted,
.v13-workspace-home .v13-empty-note {
  color: var(--v13-color-text-muted, #8f8299);
}

.v13-workspace-home__hero {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 1.8vw, 24px);
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  border-radius: var(--v13-radius-xl, 24px);
  background:
    linear-gradient(180deg, rgba(32, 23, 48, 0.92), rgba(17, 20, 34, 0.88));
  box-shadow: var(--v13-shadow-card, 0 14px 36px rgba(0, 0, 0, 0.18));
}

.v13-workspace-home__hero h1 {
  color: var(--v13-color-text-main, #f5edf8);
}

.v13-workspace-home__hero p {
  color: var(--v13-color-text-sub, #c5b7cf);
}

.v13-workspace-home__summary {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--v13-space-md, 12px);
}

.v13-workspace-home__summary article,
.v13-workspace-home__panel,
.v13-workspace-create,
.v13-workspace-home .v13-workspace-card {
  border: 1px solid var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  background:
    linear-gradient(180deg, rgba(27, 39, 64, 0.86), rgba(15, 21, 36, 0.90));
  box-shadow: var(--v13-shadow-card, 0 14px 36px rgba(0, 0, 0, 0.18));
  color: var(--v13-color-text-main, #f5edf8);
}

.v13-workspace-home__summary article {
  padding: 14px 16px;
  min-width: 0;
}

.v13-workspace-home__summary strong {
  color: var(--v13-color-text-main, #f5edf8);
}

.v13-workspace-home__summary span {
  color: var(--v13-color-text-sub, #c5b7cf);
}

.v13-workspace-home__grid {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: var(--v13-space-lg, 16px);
}

.v13-workspace-home__left,
.v13-workspace-home__right {
  min-width: 0;
  min-height: 0;
}

.v13-workspace-home__left {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.v13-workspace-home__right {
  padding-right: 6px;
}

.v13-workspace-create,
.v13-workspace-home__panel {
  padding: clamp(16px, 1.8vw, 22px);
  border-radius: var(--v13-radius-lg, 18px);
}

.v13-workspace-create__header h2,
.v13-workspace-home__panel h2,
.v13-workspace-home__listHeader h2,
.v13-workspace-home .v13-workspace-card h3 {
  color: var(--v13-color-text-main, #f5edf8);
}

.v13-workspace-create__header p,
.v13-workspace-home .v13-workspace-card__purpose,
.v13-workspace-home .v13-workspace-card__description,
.v13-workspace-home .v13-workspace-mini-card span {
  color: var(--v13-color-text-sub, #c5b7cf);
}

.v13-workspace-create label {
  color: var(--v13-color-text-sub, #c5b7cf);
}

.v13-workspace-create input,
.v13-workspace-create textarea {
  border: 1px solid var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.075);
  color: var(--v13-color-text-main, #f5edf8);
  outline: none;
}

.v13-workspace-create input::placeholder,
.v13-workspace-create textarea::placeholder {
  color: var(--v13-color-text-muted, #8f8299);
}

.v13-workspace-create input:focus,
.v13-workspace-create textarea:focus {
  border-color: rgba(199, 125, 255, 0.46);
  background: rgba(255, 255, 255, 0.105);
}

.v13-workspace-home .v13-workspace-primary {
  width: 100%;
  color: #1d1129;
}

.v13-workspace-home .v13-workspace-secondary {
  flex: 0 0 auto;
}

.v13-workspace-mini-list {
  grid-template-columns: 1fr;
}

.v13-workspace-home .v13-workspace-list {
  grid-template-columns: 1fr;
  gap: var(--v13-space-md, 12px);
}

.v13-workspace-home .v13-workspace-mini-card,
.v13-workspace-home .v13-workspace-card__button {
  border-radius: var(--v13-radius-lg, 18px);
}

.v13-workspace-home .v13-workspace-mini-card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.075);
  color: var(--v13-color-text-main, #f5edf8);
}

.v13-workspace-home .v13-workspace-mini-card:hover,
.v13-workspace-home .v13-workspace-card__button:hover,
.v13-workspace-home .v13-workspace-card__button:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  outline: none;
}

.v13-workspace-home .v13-workspace-card {
  overflow: hidden;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.v13-workspace-home .v13-workspace-card:hover,
.v13-workspace-home .v13-workspace-card:focus-within {
  border-color: rgba(199, 125, 255, 0.30);
  background:
    linear-gradient(180deg, rgba(34, 47, 76, 0.92), rgba(17, 23, 40, 0.94));
}

.v13-workspace-home .v13-workspace-card__button {
  padding: clamp(16px, 1.7vw, 22px);
}

.v13-workspace-home .v13-workspace-card__meta span,
.v13-workspace-home .v13-workspace-status {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.075);
  color: var(--v13-color-text-sub, #c5b7cf);
}

.v13-workspace-home .v13-workspace-status {
  color: var(--v13-color-accent-gold, #d7b56d);
}

.v13-workspace-home__listHeader {
  color: var(--v13-color-text-main, #f5edf8);
}

.v13-workspace-home__listHeader > span {
  color: var(--v13-color-text-sub, #c5b7cf);
}

.v13-workspace-empty {
  border: 1px dashed var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  border-radius: var(--v13-radius-lg, 18px);
  padding: 18px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--v13-color-text-sub, #c5b7cf);
}

.v13-workspace-empty h2 {
  color: var(--v13-color-text-main, #f5edf8);
}

@media (max-width: 1180px) {
  .v13-workspace-home__grid {
    grid-template-columns: 1fr;
  }

  .v13-workspace-home .v13-workspace-list {
    grid-template-columns: 1fr;
  }

  .v13-workspace-home .v13-workspace-card--list .v13-workspace-card__button {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .v13-workspace-home .v13-workspace-card__side {
    align-items: flex-start;
  }

  .v13-workspace-home .v13-workspace-card__side .v13-workspace-card__meta {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .v13-workspace-home {
    padding: var(--v13-space-md, 12px);
  }

  .v13-workspace-home__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v13-workspace-home__hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .v13-workspace-home__heroActions {
    justify-content: stretch;
  }
}

/* v13.3 Workspace home list layout */
.v13-workspace-home .v13-workspace-card--list .v13-workspace-card__button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  align-items: center;
  gap: var(--v13-space-lg, 16px);
  min-width: 0;
}

.v13-workspace-home .v13-workspace-card__main,
.v13-workspace-home .v13-workspace-card__titleBlock,
.v13-workspace-home .v13-workspace-card__side {
  min-width: 0;
}

.v13-workspace-home .v13-workspace-card__purpose,
.v13-workspace-home .v13-workspace-card__description {
  margin: 8px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-workspace-home .v13-workspace-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.v13-workspace-home .v13-workspace-card__side .v13-workspace-card__meta {
  justify-content: flex-end;
  margin-top: 0;
}

/* --------------------------------------------------------------------------
 * v13.3 Workspace home create dialog refinement
 * ----------------------------------------------------------------------- */

.v13-workspace-home__heroMain {
  min-width: 0;
}

.v13-workspace-home__heroActions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.v13-workspace-home__createButton {
  width: auto;
  min-width: 180px;
  max-width: 260px;
  min-height: 42px;
  padding-inline: 20px;
  white-space: nowrap;
}

.v13-workspace-home__grid {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
}

.v13-workspace-home__left {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.v13-workspace-create-dialog {
  width: min(560px, calc(100vw - 48px));
  max-height: min(780px, calc(100vh - 72px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--v13-color-border-soft, rgba(255, 255, 255, 0.14));
  border-radius: var(--v13-radius-xl, 24px);
  background: transparent;
  color: var(--v13-color-text-main, #f5edf8);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.v13-workspace-create-dialog:not(:popover-open) {
  display: none;
}

.v13-workspace-create-dialog::backdrop {
  background: rgba(6, 4, 12, 0.64);
  backdrop-filter: blur(8px);
}

.v13-workspace-create-dialog .v13-workspace-create {
  width: 100%;
  max-height: inherit;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(34, 26, 50, 0.98), rgba(13, 17, 30, 0.98));
  box-shadow: none;
}

.v13-workspace-create__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.v13-workspace-create__header {
  min-width: 0;
}

.v13-workspace-create__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--v13-color-text-main, #f5edf8);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.v13-workspace-create__close:hover,
.v13-workspace-create__close:focus-visible {
  background: rgba(255, 255, 255, 0.13);
  outline: none;
}

.v13-workspace-create__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.v13-workspace-create__actions .v13-button {
  min-width: 132px;
}

.v13-workspace-create__actions .v13-workspace-primary {
  width: auto;
  min-width: 190px;
}

@media (max-width: 820px) {
  .v13-workspace-home__createButton {
    width: 100%;
  }

  .v13-workspace-create-dialog {
    width: min(100vw - 24px, 560px);
    max-height: calc(100vh - 32px);
  }

  .v13-workspace-create__actions {
    flex-direction: column-reverse;
  }

  .v13-workspace-create__actions .v13-button,
  .v13-workspace-create__actions .v13-workspace-primary {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
 * v13.3 Workspace Home compact list layout refinement
 * - Keep only the card list area scrollable; list header stays fixed.
 * - Remove decorative labels from the Workspace Home center area.
 * - Reduce nested padding/box chrome for iPad Air width.
 * ----------------------------------------------------------------------- */
.v13-app-shell__center:has(.v13-screen-workspace-home) {
  padding: 6px;
}

.v13-center-main:has(.v13-screen-workspace-home) {
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.018);
  box-shadow: none;
}

.v13-screen-workspace-home,
.v13-workspace-home {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px;
  overflow: hidden;
}

.v13-workspace-home__hero {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
}

.v13-workspace-home__hero h1 {
  margin: 0;
  font-size: clamp(1.18rem, 1.45vw, 1.45rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.v13-workspace-home__hero p {
  margin: 8px 0 0;
  font-size: clamp(0.86rem, 1vw, 0.98rem);
  line-height: 1.55;
}

.v13-workspace-home__heroActions {
  align-self: center;
}

.v13-workspace-home__createButton {
  min-width: 164px;
  max-width: 220px;
  min-height: 38px;
  padding: 9px 18px;
  font-size: 0.9rem;
}

.v13-workspace-home__listSection {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v13-workspace-home__listHeader {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 4px 2px 8px;
  color: var(--v13-color-text-main, #f5edf8);
}

.v13-workspace-home__listHeader h2 {
  margin: 0;
  font-size: clamp(1.12rem, 1.35vw, 1.38rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.v13-workspace-home__listHeader > span {
  flex: 0 0 auto;
  color: var(--v13-color-text-sub, #c5b7cf);
  font-size: 0.95rem;
  line-height: 1.2;
}

.v13-workspace-home__listScroll {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.v13-workspace-home .v13-workspace-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
  padding-bottom: 8px;
}

.v13-workspace-home .v13-workspace-card--list .v13-workspace-card__button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-width: 0;
}

.v13-workspace-home .v13-workspace-card h3 {
  margin: 0;
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.22;
}

.v13-workspace-home .v13-workspace-card__purpose,
.v13-workspace-home .v13-workspace-card__description {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.v13-workspace-home .v13-workspace-card__side {
  gap: 8px;
}

.v13-workspace-home .v13-workspace-card__side .v13-workspace-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.v13-workspace-home .v13-workspace-card__meta span,
.v13-workspace-home .v13-workspace-status {
  font-size: 0.78rem;
  line-height: 1.2;
}

.v13-workspace-home__grid,
.v13-workspace-home__left,
.v13-workspace-home__right,
.v13-workspace-home__panel,
.v13-workspace-mini-list,
.v13-workspace-mini-card {
  /* Legacy Workspace Home two-column / recent-card selectors retained only for old DOM safety. */
}

@media (max-width: 1180px) {
  .v13-app-shell__center:has(.v13-screen-workspace-home) {
    padding: 4px;
  }

  .v13-screen-workspace-home,
  .v13-workspace-home {
    padding: 6px;
    gap: 8px;
  }

  .v13-workspace-home__hero {
    padding: 12px 14px;
  }

  .v13-workspace-home .v13-workspace-card--list .v13-workspace-card__button {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .v13-workspace-home .v13-workspace-card__side {
    align-items: flex-start;
  }

  .v13-workspace-home .v13-workspace-card__side .v13-workspace-card__meta {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .v13-workspace-home__hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .v13-workspace-home__createButton {
    width: 100%;
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
 * v13.3 Workspace Briefing basic wide-layout fix
 * - Use the AppShell center width instead of a legacy narrow/vertical card.
 * - Keep the briefing visual and message side-by-side on iPad Air class widths.
 * - Preserve the existing Case Dock / right panel structure.
 * ----------------------------------------------------------------------- */

.v13-screen-workspace-lobby.v13-workspace-lobby--briefing-only,
.v13-workspace-lobby--briefing-only {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.v13-screen-workspace-lobby.v13-workspace-lobby--briefing-only .v13-workspace-lobby__body,
.v13-workspace-lobby--briefing-only .v13-workspace-lobby__body {
  gap: 12px;
  height: 100%;
  /* padding: clamp(8px, 1vw, 14px); */
  padding: 0;
}

.v13-workspace-briefing {
  width: 100%;
  min-width: 0;
  gap: 12px;
}

.v13-workspace-briefing__stage {
  width: 100%;
  grid-template-columns: minmax(168px, 0.56fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(14px, 2vw, 28px);
  min-height: clamp(360px, 46vh, 500px);
  padding: clamp(16px, 2vw, 28px);
  border-radius: 24px;
}

.v13-workspace-briefing__visual {
  align-self: stretch;
  min-height: clamp(300px, 42vh, 460px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    radial-gradient(circle at 50% 14%, rgba(230, 190, 255, 0.14), transparent 44%);
}

.v13-workspace-briefing__lilith-image {
  max-width: min(100%, 360px);
  max-height: clamp(280px, 42vh, 470px);
}

.v13-workspace-briefing__message-card {
  align-self: stretch;
  justify-content: center;
  max-width: none;
  padding: clamp(20px, 2.5vw, 34px);
}

.v13-workspace-briefing__message-card h1 {
  font-size: clamp(28px, 3.4vw, 48px);
}

.v13-workspace-briefing__purpose,
.v13-workspace-briefing__lilith-message p {
  line-height: 1.65;
}

.v13-workspace-briefing__lilith-message {
  padding: 14px 16px;
}

.v13-workspace-briefing__actions {
  margin-top: 2px;
}

.v13-workspace-briefing__summary-grid {
  gap: 10px;
}

.v13-workspace-briefing-card {
  padding: 14px;
}

@media (max-width: 1180px) {
  .v13-workspace-briefing__stage {
    grid-template-columns: minmax(150px, 0.48fr) minmax(0, 1fr);
    gap: 14px;
    min-height: clamp(340px, 44vh, 460px);
    padding: 14px;
  }

  .v13-workspace-briefing__visual {
    max-height: none;
    min-height: clamp(300px, 40vh, 440px);
  }

  .v13-workspace-briefing__lilith-image {
    max-width: min(100%, 260px);
    max-height: clamp(270px, 40vh, 430px);
  }

  .v13-workspace-briefing__message-card {
    padding: 18px;
    gap: 10px;
  }

  .v13-workspace-briefing__summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .v13-workspace-briefing__stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .v13-workspace-briefing__visual {
    min-height: 220px;
  }

  .v13-workspace-briefing__lilith-image {
    max-height: 260px;
  }
}

/* --------------------------------------------------------------------------
 * v13.3 Workspace Briefing two-zone split
 * - Left/center AppShell area: Lilith briefing, message, and direct actions.
 * - Right AppShell area: scrollable Workspace report / related data.
 * ----------------------------------------------------------------------- */

.v13-app-shell--workspace-briefing .v13-app-shell__body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.v13-app-shell--workspace-briefing .v13-app-shell__center,
.v13-app-shell--workspace-briefing .v13-app-shell__right {
  padding: 10px;
}

.v13-app-shell--workspace-briefing .v13-center-main,
.v13-app-shell--workspace-briefing .v13-lilith-panel {
  border: 1px solid var(--v13-color-border-soft, rgba(255,255,255,0.12));
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(199, 125, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(27, 20, 40, 0.92), rgba(12, 13, 22, 0.96));
  box-shadow: var(--v13-shadow-panel, 0 20px 60px rgba(0,0,0,0.28));
}

.v13-app-shell--workspace-briefing .v13-center-main.v13-main-scroll {
  overflow: hidden;
}

.v13-app-shell--workspace-briefing .v13-lilith-panel {
  padding: 0;
}

.v13-app-shell--workspace-briefing .v13-lilith-panel__cards {
  height: 100%;
  padding: 12px;
}

.v13-app-shell--workspace-briefing .v13-workspace-lobby__body {
  height: 100%;
  padding: 12px;
  overflow: hidden;
}

.v13-workspace-briefing--split {
  height: 100%;
  min-height: 0;
}

.v13-workspace-briefing--split .v13-workspace-briefing__stage {
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(210px, 0.9fr) minmax(260px, 1.1fr);
  align-items: stretch;
  padding: clamp(16px, 2vw, 26px);
  gap: clamp(16px, 2vw, 28px);
}

.v13-workspace-briefing--split .v13-workspace-briefing__visual {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-image {
  max-width: min(100%, 380px);
  max-height: min(86vh, 680px);
}

.v13-workspace-briefing--split .v13-workspace-briefing__message-card {
  min-height: 0;
  justify-content: center;
  gap: 14px;
  padding: clamp(18px, 2.2vw, 30px);
}

.v13-workspace-briefing__message-label {
  margin: 0 0 10px;
  color: var(--v13-color-accent-soft, #d8a8ff);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-message {
  margin: 0;
  padding: clamp(16px, 1.8vw, 24px);
  border: 1px solid rgba(218, 178, 255, 0.22);
  border-radius: 22px;
  background: rgba(18, 14, 28, 0.70);
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-message h1 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.28;
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-message p:last-child {
  margin-bottom: 0;
}

.v13-workspace-briefing__refresh-area {
  display: flex;
  justify-content: flex-start;
  margin-top: 2px;
}

.v13-workspace-briefing__refresh-area .v13-button {
  min-width: 170px;
  width: auto;
}

.v13-button--subtle {
  background: rgba(255,255,255,0.08);
  border-color: rgba(218,178,255,0.24);
  color: var(--v13-color-text-main, #f8f5ff);
}

.v13-workspace-briefing--split .v13-workspace-briefing__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: clamp(8px, 2vh, 22px);
}

.v13-workspace-briefing__consult-home-button {
  justify-content: center;
  min-height: 58px;
}

.v13-workspace-briefing__consult-home-button span,
.v13-workspace-briefing__refresh-area .v13-button span {
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0.78;
}

.v13-workspace-report {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.v13-workspace-report .v13-workspace-side-card {
  flex: 0 0 auto;
  padding: 14px 16px;
}

.v13-workspace-report .v13-workspace-side-card h3 {
  color: var(--v13-color-accent-soft, #d8a8ff);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
}

.v13-workspace-report-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 12px 0 0;
}

.v13-workspace-report-fields div {
  min-width: 0;
}

.v13-workspace-report-fields dt {
  color: var(--v13-color-text-muted, rgba(255,255,255,0.62));
  font-size: 0.72rem;
}

.v13-workspace-report-fields dd {
  margin: 2px 0 0;
  color: var(--v13-color-text-main, #f8f5ff);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.v13-workspace-report__related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v13-workspace-report .v13-case-dock__all-link {
  width: 100%;
}

@media (max-width: 1180px) {
  .v13-app-shell--workspace-briefing .v13-app-shell__body {
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__stage {
    grid-template-columns: minmax(150px, 0.72fr) minmax(220px, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__message-card {
    padding: 14px;
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__lilith-image {
    max-width: min(100%, 260px);
  }

  .v13-workspace-report__related-grid,
  .v13-workspace-report-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .v13-app-shell--workspace-briefing .v13-app-shell__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .v13-app-shell--workspace-briefing .v13-app-shell__right {
    display: none;
  }
}

/* --------------------------------------------------------------------------
 * v13.3 Workspace Briefing stage overlay refinement
 * - The left briefing area is a visual stage: background, Lilith, message,
 *   and actions are layered independently.
 * - Workspace report overview metadata is compacted so the report's main
 *   narrative cards keep visual priority.
 * ----------------------------------------------------------------------- */

.v13-workspace-briefing--split .v13-workspace-briefing__stage {
  --v13-workspace-briefing-stage-pad: clamp(12px, 1.5vw, 18px);
  --v13-workspace-briefing-message-bottom: clamp(12px, 1.4vw, 18px);
  --v13-workspace-briefing-message-width: min(100% - 32px, 680px);
  --v13-workspace-briefing-visual-bottom: clamp(210px, 28vh, 250px);

  position: relative;
  display: block;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 12%, rgba(208, 157, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(23, 17, 34, 0.96), rgba(9, 11, 20, 0.98));
}

.v13-workspace-briefing--split .v13-workspace-briefing__stage::before {
  z-index: 1;
  display: none;
}

.v13-workspace-briefing__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v13-workspace-briefing__backdrop-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.v13-workspace-briefing--split .v13-workspace-briefing__visual {
  position: absolute;
  inset: var(--v13-workspace-briefing-stage-pad) var(--v13-workspace-briefing-stage-pad) var(--v13-workspace-briefing-visual-bottom);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  pointer-events: none;
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-image {
  display: block;
  width: auto;
  max-width: min(96%, 520px);
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.38));
}

.v13-workspace-briefing--split .v13-workspace-briefing__message-card {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: var(--v13-workspace-briefing-message-bottom);
  z-index: 3;
  width: var(--v13-workspace-briefing-message-width);
  max-width: calc(100% - 32px);
  max-height: min(46%, 260px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 1.4vw, 18px);
  overflow: hidden;
  border: 1px solid rgba(218, 178, 255, 0.24);
  border-radius: 22px;
  background: rgba(18, 14, 28, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.30);
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-message {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.v13-workspace-briefing__message-label {
  margin: 0 0 5px;
  font-size: 0.66rem;
  line-height: 1.2;
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-message h1 {
  margin: 0 0 8px;
  font-size: clamp(17px, 1.45vw, 23px);
  line-height: 1.28;
}

.v13-workspace-briefing--split .v13-workspace-briefing-notice {
  padding: 7px 9px;
  border-radius: 12px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.v13-workspace-briefing__refresh-area {
  margin-top: 0;
}

.v13-workspace-briefing__refresh-area .v13-button {
  min-width: 0;
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.82rem;
}

.v13-workspace-briefing__refresh-area .v13-button span {
  display: none;
}

.v13-workspace-briefing--split .v13-workspace-briefing__actions {
  margin-top: 2px;
}

.v13-workspace-briefing__consult-home-button {
  min-height: 44px;
  padding: 9px 14px;
}

.v13-workspace-briefing__consult-home-button strong {
  font-size: 0.94rem;
}

.v13-workspace-briefing__consult-home-button span {
  margin-top: 2px;
  font-size: 0.68rem;
}

.v13-workspace-report-card--overview .v13-workspace-report-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.v13-workspace-report-card--overview .v13-workspace-report-fields div {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.v13-workspace-report-card--overview .v13-workspace-report-fields dt,
.v13-workspace-report-card--overview .v13-workspace-report-fields dd {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.25;
}

.v13-workspace-report-card--overview .v13-workspace-report-fields dt {
  color: rgba(255, 250, 255, 0.52);
  font-weight: 600;
}

.v13-workspace-report-card--overview .v13-workspace-report-fields dd {
  color: rgba(255, 250, 255, 0.78);
  font-weight: 700;
}

.v13-workspace-report-card--overview > p {
  margin-bottom: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .v13-workspace-briefing--split .v13-workspace-briefing__stage {
    --v13-workspace-briefing-stage-pad: 10px;
    --v13-workspace-briefing-message-bottom: 10px;
    --v13-workspace-briefing-visual-bottom: 206px;
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__lilith-image {
    max-width: min(100%, 440px);
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__message-card {
    max-width: calc(100% - 20px);
    max-height: min(50%, 400px);
    padding: 12px;
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__lilith-message h1 {
    font-size: clamp(16px, 1.55vw, 20px);
  }
}

@media (max-width: 920px) {
  .v13-workspace-briefing--split .v13-workspace-briefing__stage {
    min-height: 560px;
  }
}

/* -----------------------------------------------------------------------
 * v13.3 Workspace Briefing final micro-adjustments
 * - Workspace briefing header has no right-side screen actions.
 * - The left stage now uses one prepared composite background image.
 * - The message label uses the same accent treatment as other v13 labels.
 * - Lilith briefing text is not line-clamped; generated text is shown in full.
 * ----------------------------------------------------------------------- */

.v13-common-header--workspace-lobby .v13-common-header__trailing {
  visibility: hidden;
  pointer-events: none;
}

.v13-workspace-briefing--split .v13-workspace-briefing__stage {
  --v13-workspace-briefing-message-bottom: clamp(28px, 3vw, 44px);
  --v13-workspace-briefing-message-width: min(100% - 32px, 700px);
}

.v13-workspace-briefing--split .v13-workspace-briefing__stage::before {
  display: none;
}

.v13-workspace-briefing__backdrop-image {
  object-position: center 44%;
}

.v13-workspace-briefing--split .v13-workspace-briefing__message-card {
  max-height: min(54%, 330px);
  overflow: visible;
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-message {
  min-height: 0;
}

.v13-workspace-briefing--split .v13-workspace-briefing__message-label {
  margin: 0 0 8px;
  color: var(--v13-color-accent-main, var(--v4-accent));
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.v13-workspace-briefing--split .v13-workspace-briefing__lilith-message p:not(.v13-workspace-briefing__message-label) {
  display: block;
  margin: 0;
  overflow: visible;
  color: rgba(255, 250, 255, 0.88);
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.v13-workspace-briefing__consult-home-button strong {
  font-size: 0.98rem;
}

.v13-workspace-briefing__consult-home-button span {
  display: none;
}

@media (max-width: 1180px) {
  .v13-workspace-briefing--split .v13-workspace-briefing__stage {
    --v13-workspace-briefing-message-bottom: 22px;
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__message-card {
    max-height: min(58%, 336px);
  }

  .v13-workspace-briefing--split .v13-workspace-briefing__message-label {
    margin-bottom: 7px;
    font-size: 0.68rem;
  }
}

/* v13.4 Consultation list screens */
.v13-consultation-home--list {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  gap: 8px;
  padding: 8px;
}

.v13-consultation-home__content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 169, 255, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(92, 67, 124, 0.36), rgba(30, 27, 43, 0.74));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.v13-consultation-home--list .v13-consultation-home__title {
  font-size: clamp(1.22rem, 1.55vw, 1.36rem);
  line-height: 1.18;
}

.v13-consultation-home__description {
  max-width: 48rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.v13-consultation-home__list-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(214, 169, 255, 0.12);
  border-radius: 18px;
  background: rgba(12, 12, 20, 0.34);
  overflow: hidden;
}

.v13-consultation-home__list-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 4px;
  color: rgba(244, 238, 255, 0.72);
  font-size: 13px;
}

.v13-consultation-home__list-summary strong {
  color: rgba(250, 246, 255, 0.96);
  font-size: 18px;
}

.v13-consultation-tree {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  gap: 6px;
}

.v13-consultation-tree__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0 2px;
}

.v13-consultation-tree__scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1 1 auto;
  padding-right: 4px;
}

.v13-consultation-tree__folder {
  border: 1px solid rgba(214, 169, 255, 0.13);
  border-radius: 18px;
  background: rgba(29, 27, 39, 0.72);
  overflow: visible;
}

.v13-consultation-tree__folder-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
}

.v13-consultation-tree__folder-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: rgba(248, 243, 255, 0.94);
  text-align: left;
  cursor: pointer;
}

.v13-consultation-tree__folder-toggle:hover,
.v13-consultation-tree__folder-toggle:focus-visible,
.v13-consultation-tree__item-main:hover,
.v13-consultation-tree__item-main:focus-visible {
  outline: none;
  color: #ffffff;
}

.v13-consultation-tree__folder-toggle:focus-visible,
.v13-consultation-tree__item-main:focus-visible,
.v13-consultation-tree__folder-create:focus-visible {
  box-shadow: 0 0 0 2px rgba(220, 176, 255, 0.62);
}

.v13-consultation-tree__folder-icon {
  color: rgba(214, 169, 255, 0.9);
  flex: 0 0 auto;
}

.v13-consultation-tree__folder-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.v13-consultation-tree__folder-count {
  flex: 0 0 auto;
  color: rgba(244, 238, 255, 0.58);
  font-size: 12px;
}

.v13-consultation-tree__folder-actions,
.v13-consultation-tree__item-actions {
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.v13-consultation-tree__folder-row:hover .v13-consultation-tree__folder-actions,
.v13-consultation-tree__folder-row:focus-within .v13-consultation-tree__folder-actions,
.v13-consultation-tree__folder.is-menu-open .v13-consultation-tree__folder-actions,
.v13-consultation-tree__item:hover .v13-consultation-tree__item-actions,
.v13-consultation-tree__item:focus-within .v13-consultation-tree__item-actions,
.v13-consultation-tree__item.is-menu-open .v13-consultation-tree__item-actions {
  opacity: 1;
  pointer-events: auto;
}

.v13-consultation-tree__folder-create {
  border: 1px solid rgba(214, 169, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 243, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.v13-consultation-tree__folder-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px 28px;
}

.v13-consultation-tree__item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.v13-consultation-tree__item.is-active {
  border-color: rgba(222, 177, 255, 0.42);
  background: rgba(132, 90, 174, 0.20);
}

.v13-consultation-tree__item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: rgba(248, 243, 255, 0.92);
  text-align: left;
  cursor: pointer;
}

.v13-consultation-tree__item-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.34;
}

.v13-consultation-tree__item-summary,
.v13-consultation-tree__item-meta {
  color: rgba(244, 238, 255, 0.66);
  font-size: 12px;
  line-height: 1.45;
}

.v13-consultation-tree__item-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v13-consultation-tree__item-actions {
  position: relative;
  align-self: start;
  padding: 8px 8px 0 0;
}

.v13-consultation-tree__empty-row {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 238, 255, 0.64);
}

.v13-workspace-filtered-list__actions,
.v13-workspace-filtered-list__empty-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.v13-workspace-filtered-list__hero--consultations {
  align-items: flex-start;
}

@media (max-width: 1180px) {
  .v13-consultation-home__content-header,
  .v13-workspace-filtered-list__hero {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 14px;
  }

  .v13-consultation-home__hero-actions,
  .v13-workspace-filtered-list__actions {
    justify-content: flex-start;
  }

  .v13-consultation-tree__folder-items {
    padding-left: 16px;
  }
}

/* --------------------------------------------------------------------------
 * v13.4 Workspace consultation list layout polish
 * - Align Workspace consultation home with the completed general consultation
 *   list layout: wide content, compact header, one primary list area.
 * - Keep artifacts / requests Workspace lists on the existing generic layout.
 * ----------------------------------------------------------------------- */

.v13-workspace-filtered-list--consultations-home {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 8px;
  gap: 8px;
  overflow: hidden;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(141, 84, 189, 0.22), rgba(255, 255, 255, 0.045));
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__hero-copy {
  min-width: 0;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__hero h1 {
  margin: 0;
  color: rgba(255, 250, 255, 0.96);
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__hero p {
  margin: 8px 0 0;
  color: rgba(244, 238, 255, 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(8, 8, 16, 0.30);
  overflow-x: hidden;
  overflow-y: auto;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 0 2px 2px;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__list-header h2 {
  margin: 0;
  color: rgba(255, 250, 255, 0.96);
  font-size: 20px;
  line-height: 1.25;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__list-header span {
  flex: 0 0 auto;
  color: rgba(244, 238, 255, 0.64);
  font-size: 14px;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__items--consultations {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item {
  min-width: 0;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item__button {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item__button:hover,
.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item__button:focus-visible {
  border-color: rgba(220, 184, 255, 0.50);
  background: rgba(214, 167, 255, 0.13);
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item__main h3 {
  margin: 0;
  color: rgba(255, 250, 255, 0.94);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item__main p {
  margin: 0;
  color: rgba(244, 238, 255, 0.72);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-item__main span {
  color: rgba(244, 238, 255, 0.58);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__hero {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 14px;
  }

  .v13-workspace-filtered-list--consultations-home .v13-workspace-filtered-list__actions {
    justify-content: flex-start;
  }
}

/* =========================
   v13.5 Consultation chat wide-layout polish
   Scope: general consultation chat / Workspace consultation chat only.
========================= */
.v13-chat-screen,
.v13-workspace-consultation.v13-chat-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--v13-color-text-main, var(--v4-text));
  background: transparent;
}

.v13-app-shell--chat-screen .v13-center-main {
  overflow: hidden;
}

.v13-app-shell--chat-screen .v13-lilith-panel--chat {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.v13-app-shell--chat-screen .v13-lilith-panel--chat .v13-lilith-panel__fixed,
.v13-app-shell--chat-screen .v13-lilith-panel--chat .v13-lilith-panel__cards {
  flex: 0 0 auto;
}

.v13-app-shell--chat-screen .v13-lilith-panel--chat .v13-lilith-panel__cards {
  overflow: visible;
  padding-top: 10px;
}

.v13-app-shell--chat-screen .v13-lilith-panel--chat .v13-lilith-panel__lilith-block {
  height: clamp(300px, 36vh, 390px);
}

.v13-chat-header {
  min-height: 0;
}

.v13-chat-header--workspace {
  border-bottom-color: var(--v13-color-border-soft, rgba(255, 255, 255, 0.12));
  background: rgba(18, 15, 26, 0.64);
}

.v13-chat-header__actions .v4-action-menu-button {
  opacity: 1;
  pointer-events: auto;
}

.v13-workspace-consultation__body {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.v13-workspace-consultation__messages {
  background: transparent;
}

.v13-workspace-consultation__input {
  background: rgba(18, 15, 26, 0.58);
  padding: 0;
}

.v13-chat-side-card,
.v13-workspace-side-card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.v13-chat-side-card--context,
.v13-workspace-side-card--context {
  border-color: rgba(217, 168, 255, 0.18);
  background: rgba(217, 168, 255, 0.075);
}

.v13-chat-side-meta,
.v13-workspace-report-fields {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.v13-chat-side-meta div,
.v13-workspace-report-fields div {
  display: grid;
  grid-template-columns: minmax(72px, 0.38fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.v13-chat-side-meta dt,
.v13-workspace-report-fields dt {
  color: var(--v13-color-text-muted, var(--v4-text-muted));
  font-size: 0.75rem;
  font-weight: 800;
}

.v13-chat-side-meta dd,
.v13-workspace-report-fields dd {
  min-width: 0;
  margin: 0;
  color: var(--v13-color-text-main, var(--v4-text));
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.v13-workspace-side-primary {
  width: 100%;
  margin-top: 12px;
}

.v13-workspace-side-card .v13-case-dock__all-link,
.v13-chat-side-card .v13-inline-action,
.v13-workspace-side-card .v13-inline-action {
  width: 100%;
}

.v13-workspace-side-card .v13-case-dock__preview-list,
.v13-chat-side-card .v12-related-list,
.v13-workspace-side-card .v12-related-list {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 1180px) {
  .v13-app-shell--chat-screen {
    grid-template-columns: 156px minmax(0, 1fr);
  }

  .v13-app-shell--chat-screen .v13-app-shell__body {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  }

  .v13-app-shell--chat-screen .v13-app-shell__center {
    padding: 10px;
  }

  .v13-app-shell--chat-screen .v13-app-shell__right {
    padding: 10px 10px 10px 0;
  }

  .v13-app-shell--chat-screen .v13-lilith-panel__fixed {
    padding: 12px;
  }

  .v13-app-shell--chat-screen .v13-lilith-panel__visual {
    min-height: 86px;
  }

  .v13-chat-header {
    padding: 12px 14px;
  }

  .v13-chat-header__title {
    font-size: 1.08rem;
  }

  .v13-chat-messages {
    padding: 12px 14px;
  }

  .v13-chat-input {
    padding: 0;
  }
}

/* =========================
   v13.5 Chat Input Compact Controls
   FE-only: keep existing message/voice/network handlers, adjust layout only.
========================= */

.v4-message-input {
  gap: 8px;
  padding: 8px;
}

.v6-message-input__compose-group {
  gap: 4px;
}

.v6-message-input__send-group {
  gap: 4px;
}

.v4-message-input__send-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.v4-message-input__send-actions .v4-message-input__voice-add-button,
.v4-message-input__send-actions .v4-message-input-bar__network-toggle,
.v4-message-input__send-actions .v4-message-input__send-button {
  width: auto;
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 14px;
  line-height: 1;
}

.v4-message-input__send-actions .v4-message-input__voice-add-button,
.v4-message-input__send-actions .v4-message-input-bar__network-toggle {
  flex: 0 1 auto;
}

.v4-message-input__send-actions .v4-message-input__send-button {
  flex: 0 0 auto;
  min-width: 72px;
  margin-left: auto;
}

.v4-message-input__send-actions .v4-message-input__voice-add-icon {
  font-size: 0.86rem;
}

.v4-message-input__send-actions .v4-message-input-bar__network-dot {
  width: 7px;
  height: 7px;
}

.v4-message-input__voice-status {
  justify-content: space-between;
  padding: 4px 6px 4px 8px;
  border: 1px solid rgba(255, 216, 223, 0.18);
  border-radius: 10px;
  background: rgba(255, 216, 223, 0.07);
  text-align: left;
}

.v4-message-input__voice-status-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.v4-message-input__voice-status-close {
  flex: 0 0 auto;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 247, 234, 0.74);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.v4-message-input__voice-status-close:hover,
.v4-message-input__voice-status-close:focus-visible {
  color: rgba(255, 247, 234, 0.96);
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 760px) {
  .v4-message-input__send-actions {
    flex-wrap: wrap;
  }

  .v4-message-input__send-actions .v4-message-input__send-button {
    margin-left: 0;
  }
}

/* =========================
   v13.5 Chat Right Area Lightweight Polish
   Scope: general consultation chat / Workspace consultation chat right panel only.
========================= */
.v13-app-shell--chat-screen .v13-lilith-panel--chat {
  font-size: 13px;
}

.v13-app-shell--chat-screen .v13-lilith-panel--chat .v13-lilith-panel__cards {
  gap: 8px;
}

.v13-app-shell--chat-screen .v13-chat-side-card,
.v13-app-shell--chat-screen .v13-workspace-side-card {
  padding: 11px 12px;
  border-radius: 16px;
}

.v13-app-shell--chat-screen .v13-chat-side-card h3,
.v13-app-shell--chat-screen .v13-workspace-side-card h3,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-consultation-relationships h3,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-consultation-relationships h3 {
  margin: 0 0 7px;
  font-size: 14px;
  line-height: 1.35;
}

.v13-app-shell--chat-screen .v13-chat-side-card h4,
.v13-app-shell--chat-screen .v13-workspace-side-card h4,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-consultation-relationships h4,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-consultation-relationships h4 {
  margin: 8px 0 5px;
  color: rgba(255, 247, 234, 0.9);
  font-size: 13px;
  line-height: 1.35;
}

.v13-app-shell--chat-screen .v13-chat-side-card p,
.v13-app-shell--chat-screen .v13-workspace-side-card p,
.v13-app-shell--chat-screen .v13-chat-side-card li,
.v13-app-shell--chat-screen .v13-workspace-side-card li,
.v13-app-shell--chat-screen .v13-chat-side-card dd,
.v13-app-shell--chat-screen .v13-workspace-side-card dd,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-relationship-empty,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-relationship-empty,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-relationship-error,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-relationship-error,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-related-card__title,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-related-card__title,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-related-card__meta,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-related-card__meta,
.v13-app-shell--chat-screen .v13-chat-side-card .v13-case-dock__preview-item strong,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-case-dock__preview-item strong,
.v13-app-shell--chat-screen .v13-chat-side-card .v13-case-dock__preview-item span,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-case-dock__preview-item span {
  font-size: 12px;
  line-height: 1.55;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v13-kicker,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-kicker,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-relationship-kicker,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-relationship-kicker,
.v13-app-shell--chat-screen .v13-chat-side-card dt,
.v13-app-shell--chat-screen .v13-workspace-side-card dt {
  font-size: 11px;
}

.v13-app-shell--chat-screen .v13-chat-side-actions {
  gap: 6px;
  margin-bottom: 6px;
}

.v13-app-shell--chat-screen .v13-chat-side-card button,
.v13-app-shell--chat-screen .v13-workspace-side-card button,
.v13-app-shell--chat-screen .v13-chat-side-card .v13-inline-action,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-inline-action,
.v13-app-shell--chat-screen .v13-chat-side-card .v13-case-dock__all-link,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-case-dock__all-link,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-related-card__button,
.v13-app-shell--chat-screen .v13-workspace-side-card .v12-related-card__button,
.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action__button,
.v13-app-shell--chat-screen .v13-workspace-side-card .v9-workspace-request-entry__button {
  min-height: 28px;
  height: auto;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.25;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action__summary {
  min-height: 32px;
  padding: 6px 8px;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action__summary-text,
.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action__summary::after {
  font-size: 12px;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action__panel {
  padding: 0 8px 8px;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-action-button-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action__button {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  white-space: normal;
}

.v13-workspace-request-panel__form select,
.v13-workspace-request-panel__form textarea {
  width: 100%;
  border: 1px solid rgba(82, 50, 32, 0.18);
  border-radius: 12px;
  color: rgba(255, 247, 234, 0.9);
  background: rgba(255, 255, 255, 0.075);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.v13-workspace-request-panel__error {
  margin: 0;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: rgba(180, 56, 56, 0.1);
  color: var(--v13-color-danger);
  font-size: 0.84rem;
}

.v13-app-shell--chat-screen .v12-consultation-relationships--compact {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.v13-app-shell--chat-screen .v12-consultation-relationships--compact .v12-consultation-relationships__affiliation {
  margin: 0 0 2px;
}

.v13-app-shell--chat-screen .v12-consultation-relationships--compact .v12-relationship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.v13-app-shell--chat-screen .v12-consultation-relationships--compact .v12-relationship-column {
  display: grid;
  gap: 5px;
}

.v13-app-shell--chat-screen .v12-consultation-relationships--compact .v12-related-list,
.v13-app-shell--chat-screen .v13-case-dock__preview-list,
.v13-app-shell--chat-screen .v13-case-dock__next-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.v13-app-shell--chat-screen .v12-consultation-relationships--compact .v12-related-card,
.v13-app-shell--chat-screen .v13-case-dock__preview-item {
  margin: 0;
}

.v13-app-shell--chat-screen .v12-consultation-relationships--compact .v12-related-card__button,
.v13-app-shell--chat-screen .v13-case-dock__preview-item button {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 12px;
}

.v13-app-shell--chat-screen .v13-workspace-side-primary {
  margin-top: 8px;
}

.v13-app-shell--chat-screen .v13-workspace-side-metrics {
  gap: 5px;
  margin-top: 8px;
}

.v13-app-shell--chat-screen .v13-workspace-side-metrics span,
.v13-app-shell--chat-screen .v12-workspace-affiliation,
.v13-app-shell--chat-screen .v13-case-dock__preview-item span {
  font-size: 11px;
}

/* =========================
   v13.5 Right panel final polish: always-visible request menu and chat-side color unification
   Scope: general consultation chat / Workspace consultation chat right panel only.
========================= */
.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action--inline-list {
  display: block;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action--inline-list .v6-request-summary-action__panel {
  display: grid;
  gap: 6px;
  padding: 0;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action--inline-list .v6-request-summary-action__error {
  margin: 0;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action--inline-list .v6-request-action-button-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action--inline-list .v6-request-summary-action__button {
  justify-content: flex-start;
  width: 100%;
  min-height: 28px;
  color: rgba(255, 247, 234, 0.9);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.13);
  text-align: left;
}

.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action--inline-list .v6-request-summary-action__button:hover:not(:disabled),
.v13-app-shell--chat-screen .v13-chat-side-card .v6-request-summary-action--inline-list .v6-request-summary-action__button:focus-visible:not(:disabled) {
  background: rgba(199, 125, 255, 0.16);
  border-color: rgba(199, 125, 255, 0.32);
}

.v13-app-shell--chat-screen .v13-workspace-relationship-card .v12-workspace-affiliation,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-workspace-affiliation {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  max-width: 100%;
  padding: 5px 9px;
  color: rgba(255, 247, 234, 0.88);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  overflow: hidden;
}

.v13-app-shell--chat-screen .v13-workspace-relationship-card .v12-workspace-affiliation__label,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-workspace-affiliation__label {
  flex: 0 0 auto;
  color: rgba(255, 247, 234, 0.62);
}

.v13-app-shell--chat-screen .v13-workspace-relationship-card .v12-workspace-affiliation .v12-link-button,
.v13-app-shell--chat-screen .v13-chat-side-card .v12-workspace-affiliation .v12-link-button {
  min-width: 0;
  max-width: 100%;
  color: rgba(255, 247, 234, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-app-shell--chat-screen .v13-workspace-relationship-card .v12-related-card__button,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-case-dock__preview-item button,
.v13-app-shell--chat-screen .v13-workspace-side-card .v9-workspace-request-entry__button {
  color: rgba(255, 247, 234, 0.9);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.v13-app-shell--chat-screen .v13-workspace-relationship-card .v12-related-card__button:hover,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-case-dock__preview-item button:hover,
.v13-app-shell--chat-screen .v13-workspace-side-card .v9-workspace-request-entry__button:hover {
  background: rgba(199, 125, 255, 0.15);
  border-color: rgba(199, 125, 255, 0.3);
}

.v13-app-shell--chat-screen .v13-workspace-relationship-card .v12-related-card__meta,
.v13-app-shell--chat-screen .v13-workspace-side-card .v13-case-dock__preview-item span,
.v13-app-shell--chat-screen .v13-workspace-side-card .v9-workspace-request-entry__meta {
  color: rgba(255, 247, 234, 0.62);
}

/* ========================================================================== 
 * v13.6 Artifact UI: compact lists, content-first detail, dark preview
 * ======================================================================= */

.v13-artifact-list-main,
.v13-artifact-detail-main {
  padding: 12px;
}

.v13-artifact-list {
  gap: 8px;
}

.v13-artifact-list__content-header,
.v13-workspace-filtered-list__content-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.v13-artifact-list__content-header h2,
.v13-workspace-filtered-list__content-header h1 {
  margin: 0;
  color: var(--v13-color-text-primary, #fff9ff);
  font-size: 1rem;
  line-height: 1.35;
}

.v13-artifact-list__content-header p,
.v13-workspace-filtered-list__content-header p {
  margin: 2px 0 0;
  color: var(--v13-color-text-muted, rgba(248, 241, 255, 0.62));
  font-size: 0.76rem;
  line-height: 1.4;
}

.v13-artifact-list__count,
.v13-workspace-filtered-list__content-header > span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  color: rgba(248, 241, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  font-weight: 700;
}

.v13-artifact-list__body {
  padding-right: 2px;
}

.v13-artifact-grid {
  gap: 8px;
}

.v13-artifact-grid--list .v13-artifact-card {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.34fr) 34px;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: none;
}

.v13-artifact-grid--list .v13-artifact-card__kicker {
  margin-bottom: 2px;
  font-size: 0.64rem;
}

.v13-artifact-grid--list .v13-artifact-card__title {
  font-size: 0.94rem;
  line-height: 1.3;
}

.v13-artifact-grid--list .v13-artifact-card__badges {
  gap: 5px;
  margin-top: 4px;
}

.v13-artifact-grid--list .v7-artifact-card__type,
.v13-artifact-grid--list .v7-artifact-card__status,
.v13-artifact-grid--list .v7-artifact-card__pending {
  min-height: 20px;
  padding: 2px 7px;
  font-size: 0.69rem;
}

.v13-artifact-grid--list .v13-artifact-card__meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  font-size: 0.74rem;
}

.v13-artifact-grid--list .v13-artifact-card__meta dt {
  font-size: 0.65rem;
}

.v13-artifact-card__actions {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.v13-artifact-card:hover .v13-artifact-card__actions,
.v13-artifact-card:focus-within .v13-artifact-card__actions,
.v13-artifact-card__actions:has(.v4-action-menu),
.v13-artifact-card__actions:has(.v4-action-menu-container--open) {
  opacity: 1;
  pointer-events: auto;
}

.v13-artifact-grid--list .v13-artifact-card__actions {
  position: static;
  top: auto;
  right: auto;
  align-self: center;
  justify-self: end;
  transform: none;
}

.v13-artifact-card__actions .v4-action-menu-trigger {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}

.v13-artifact-content-header {
  min-height: 44px;
  padding: 6px 10px;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
}

.v13-artifact-preview {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  color: var(--v13-color-text-primary, #f8f1ff);
  background: rgba(17, 14, 25, 0.74);
}

.v13-artifact-preview .v7-artifact-markdown,
.v13-artifact-preview .v4-message-markdown {
  color: var(--v13-color-text-primary, #f8f1ff);
  line-height: 1.72;
}

.v13-artifact-preview .v4-message-markdown h1,
.v13-artifact-preview .v4-message-markdown h2,
.v13-artifact-preview .v4-message-markdown h3,
.v13-artifact-preview .v4-message-markdown h4 {
  color: #fff9ff;
}

.v13-artifact-preview .v4-message-markdown a {
  color: #d8b6ff;
}

.v13-artifact-preview .v4-message-markdown blockquote {
  border-left-color: rgba(194, 139, 255, 0.72);
  background: rgba(194, 139, 255, 0.08);
}

.v13-artifact-preview .v4-message-markdown :not(pre) > code {
  color: #f2d7ff;
  background: rgba(0, 0, 0, 0.28);
}

.v13-artifact-preview .v4-message-markdown pre {
  color: #f8f1ff;
  background: rgba(7, 6, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.v13-artifact-preview img {
  display: block;
  max-width: 100%;
  height: auto;
}

.v13-artifact-side-card {
  padding: 10px 11px;
  border-radius: 13px;
  font-size: 0.82rem;
}

.v13-artifact-side-card h3 {
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.v13-artifact-side-card p {
  margin-bottom: 7px;
  line-height: 1.5;
}

.v13-artifact-side-card--actions .v7-artifact-action-area,
.v13-artifact-side-history .v7-artifact-history-summary {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.v13-artifact-side-card--actions .v7-artifact-action-area__header,
.v13-artifact-side-history .v7-artifact-history-summary > h2 {
  display: none;
}

.v13-artifact-side-card--actions .v7-artifact-action-area__actions {
  display: grid;
  gap: 6px;
}

.v13-artifact-side-card--actions .v7-artifact-action-area__button {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  text-align: left;
  font-size: 0.78rem;
}

.v13-artifact-side-history {
  margin-top: 8px;
}

.v13-artifact-side-history .v7-artifact-history-summary__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
}

.v13-artifact-side-history .v7-artifact-history-summary dt {
  font-size: 0.65rem;
}

.v13-artifact-side-history .v7-artifact-history-summary dd {
  font-size: 0.74rem;
}

.v13-artifact-side-error {
  color: #ffd8e2;
  background: rgba(180, 40, 72, 0.14);
  border-radius: 10px;
  padding: 8px;
}

.v13-workspace-filtered-list--artifacts,
.v13-workspace-filtered-list--requests {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
}

.v13-workspace-filtered-list--artifacts .v13-workspace-filtered-list__body,
.v13-workspace-filtered-list--requests .v13-workspace-filtered-list__body {
  flex: 1 1 auto;
  padding: 0;
}

.v13-workspace-filtered-list--requests .v13-workspace-filtered-list__items--requests {
  min-height: 100%;
  align-content: start;
}

/* Generic one-line datetime utility. Applied selectively by each screen. */
.v13-list-meta__datetime {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  letter-spacing: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

/* Workspace artifact rows: let metadata size itself from its contents. */
.v13-workspace-filtered-list--artifacts .v13-artifact-grid--list .v13-artifact-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.v13-workspace-filtered-list--artifacts .v13-artifact-grid--list .v13-artifact-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

/* Keep enough scroll-content height for a menu opened from a short list. */
.v13-workspace-filtered-list--artifacts .v13-workspace-filtered-list__items--artifacts {
  min-height: 100%;
  align-content: start;
}

@media (max-width: 1180px) {
  .v13-artifact-grid--list .v13-artifact-card {
    grid-template-columns: minmax(0, 1fr) 128px 34px;
  }

  .v13-workspace-filtered-list--artifacts .v13-artifact-grid--list .v13-artifact-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .v13-artifact-grid--list .v13-artifact-card__meta > div:last-child {
    display: none;
  }

  .v13-artifact-grid--list .v13-artifact-card__meta {
    grid-template-columns: 1fr;
  }
}

.v13-artifact-danger-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.v13-artifact-danger-button {
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 126, 157, 0.28);
  border-radius: 10px;
  color: #ffd8e2;
  background: rgba(180, 40, 72, 0.10);
  font: inherit;
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
}

.v13-artifact-danger-button:hover,
.v13-artifact-danger-button:focus-visible {
  border-color: rgba(255, 126, 157, 0.58);
  background: rgba(180, 40, 72, 0.20);
  outline: none;
}

/* ========================================================================== 
 * v13.6 Artifact list refinement: content toolbar and duplicate label cleanup
 * ======================================================================= */

.v13-artifact-list__content-header {
  min-height: 48px;
  padding: 4px 2px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0;
  background: transparent;
}

.v13-artifact-list__heading,
.v13-artifact-list__toolbar,
.v13-artifact-list__view-controls,
.v13-artifact-list__segmented {
  display: flex;
  align-items: center;
}

.v13-artifact-list__heading {
  min-width: 0;
  gap: 8px;
}

.v13-artifact-list__toolbar {
  flex: 0 0 auto;
  gap: 8px;
}

.v13-artifact-list__count {
  padding: 2px 7px;
  font-size: 0.7rem;
}

.v13-artifact-list__upload-button,
.v13-artifact-list__segment {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 247, 234, 0.88);
  background: rgba(255, 255, 255, 0.055);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.v13-artifact-list__upload-button {
  padding: 0 10px;
  border-radius: 8px;
}

.v13-artifact-list__upload-button:hover,
.v13-artifact-list__upload-button:focus-visible,
.v13-artifact-list__segment:hover,
.v13-artifact-list__segment:focus-visible {
  border-color: rgba(199, 125, 255, 0.34);
  background: rgba(199, 125, 255, 0.12);
  outline: none;
}

.v13-artifact-list__view-controls {
  gap: 6px;
}

.v13-artifact-list__view-label {
  color: var(--v13-color-text-muted, rgba(248, 241, 255, 0.62));
  font-size: 0.68rem;
  font-weight: 700;
}

.v13-artifact-list__segmented {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.v13-artifact-list__segment {
  min-width: 48px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.v13-artifact-list__segment + .v13-artifact-list__segment {
  border-left: 1px solid rgba(255, 255, 255, 0.10);
}

.v13-artifact-list__segment.is-active {
  color: #fff9ff;
  background: rgba(199, 125, 255, 0.22);
}

.v13-artifact-card__main {
  align-self: center;
}

@media (max-width: 900px) {
  .v13-artifact-list__content-header {
    align-items: flex-start;
  }

  .v13-artifact-list__toolbar {
    gap: 6px;
  }

  .v13-artifact-list__view-label {
    display: none;
  }
}

@media (max-width: 720px) {
  .v13-artifact-list__content-header {
    flex-wrap: wrap;
  }

  .v13-artifact-list__toolbar {
    width: 100%;
    justify-content: space-between;
  }
}

/* ========================================================================== 
 * v13.6 Workspace artifact list refinement
 * ======================================================================= */

.v13-workspace-filtered-list--artifacts .v13-workspace-filtered-list__content-header,
.v13-workspace-filtered-list--requests .v13-workspace-filtered-list__content-header {
  min-height: 48px;
  padding: 4px 2px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0;
  background: transparent;
}

.v13-workspace-filtered-list--artifacts .v13-workspace-filtered-list__content-header > div,
.v13-workspace-filtered-list--requests .v13-workspace-filtered-list__content-header > div {
  min-width: 0;
}

.v13-workspace-filtered-list--artifacts .v13-workspace-filtered-list__content-header h1,
.v13-workspace-filtered-list--requests .v13-workspace-filtered-list__content-header h1 {
  font-size: 1rem;
}

.v13-workspace-filtered-list--artifacts .v13-workspace-filtered-list__content-header > span,
.v13-workspace-filtered-list--requests .v13-workspace-filtered-list__content-header > span {
  padding: 2px 7px;
  font-size: 0.7rem;
}


/* =========================================================
   v13.7 Request List — wide-layout source of truth
   ========================================================= */

.v13-request-list-screen {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v13-request-list-view {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  overflow: hidden;
  color: var(--v13-text, #f3edf8);
}

.v13-request-list-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 209, 255, 0.16);
  border-radius: 12px;
  background: rgba(18, 14, 26, 0.78);
}

.v13-request-list-header__text {
  min-width: 0;
}

.v13-request-list-header__title {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.25;
  color: #fff;
}

.v13-request-list-header__description {
  margin: 3px 0 0;
  color: rgba(243, 237, 248, 0.7);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.v13-request-list-header__count {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(186, 132, 229, 0.16);
  color: rgba(255, 245, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.v13-request-list-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
}

.v13-request-filter {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v13-request-filter__button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(232, 209, 255, 0.16);
  border-radius: 999px;
  background: rgba(17, 13, 24, 0.7);
  color: rgba(243, 237, 248, 0.72);
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.v13-request-filter__button:hover,
.v13-request-filter__button:focus-visible {
  border-color: rgba(220, 177, 255, 0.48);
  color: #fff;
  outline: none;
}

.v13-request-filter__button.is-active {
  border-color: rgba(220, 177, 255, 0.58);
  background: rgba(183, 119, 230, 0.25);
  color: #fff;
}

.v13-request-list-body {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.v13-request-list-items {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.v13-request-list-items--card {
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 10px;
}

.v13-request-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(232, 209, 255, 0.14);
  border-radius: 11px;
  background: rgba(18, 14, 26, 0.7);
  color: rgba(243, 237, 248, 0.92);
  cursor: pointer;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v13-request-row--no-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.v13-request-row:hover,
.v13-request-row:focus-visible,
.v13-request-row:focus-within,
.v13-request-row.is-menu-open {
  border-color: rgba(220, 177, 255, 0.42);
  background: rgba(27, 20, 38, 0.84);
  outline: none;
}

.v13-request-row:focus-visible {
  box-shadow: 0 0 0 2px rgba(209, 155, 250, 0.28);
}

.v13-request-row__main {
  min-width: 0;
}

.v13-request-row__heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.v13-request-row__title {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.v13-request-status,
.v13-request-type,
.v13-request-row__artifact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1.15;
  white-space: nowrap;
}

.v13-request-status {
  border: 1px solid rgba(232, 209, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 248, 255, 0.9);
}

.v13-request-status--working {
  border-color: rgba(112, 184, 255, 0.38);
  background: rgba(67, 135, 205, 0.18);
}

.v13-request-status--success,
.v13-request-status--reported {
  border-color: rgba(113, 214, 168, 0.35);
  background: rgba(64, 154, 111, 0.16);
}

.v13-request-status--attention {
  border-color: rgba(239, 196, 104, 0.42);
  background: rgba(190, 139, 39, 0.17);
}

.v13-request-status--danger,
.v13-request-status--error {
  border-color: rgba(246, 124, 142, 0.4);
  background: rgba(179, 64, 84, 0.18);
}

.v13-request-row__support {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.v13-request-type {
  border: 1px solid rgba(209, 155, 250, 0.24);
  background: rgba(173, 112, 217, 0.12);
  color: rgba(235, 211, 252, 0.9);
}

.v13-request-row__description {
  min-width: 0;
  color: rgba(243, 237, 248, 0.65);
  font-size: 0.73rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-request-row__origin,
.v13-request-row__notice {
  margin: 4px 0 0;
  font-size: 0.69rem;
  line-height: 1.4;
}

.v13-request-row__origin {
  display: flex;
  gap: 6px;
  color: rgba(243, 237, 248, 0.5);
}

.v13-request-row__origin strong {
  min-width: 0;
  color: rgba(243, 237, 248, 0.7);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-request-row__notice {
  color: rgba(241, 188, 116, 0.82);
}

.v13-request-row__meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.v13-request-row__datetime {
  color: rgba(243, 237, 248, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.69rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.v13-request-row__artifact {
  border: 1px solid rgba(113, 214, 168, 0.24);
  background: rgba(64, 154, 111, 0.12);
  color: rgba(190, 240, 213, 0.88);
}

.v13-request-row__actions {
  position: relative;
  width: 32px;
  min-width: 32px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v13-request-menu {
  position: relative;
  z-index: 5;
}

.v13-request-menu__button {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(243, 237, 248, 0.68);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.v13-request-row:hover .v13-request-menu__button,
.v13-request-row:focus .v13-request-menu__button,
.v13-request-row:focus-within .v13-request-menu__button,
.v13-request-row.is-menu-open .v13-request-menu__button,
.v13-request-menu.is-open .v13-request-menu__button {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.v13-request-menu__button:hover,
.v13-request-menu__button:focus-visible,
.v13-request-menu__button.is-open {
  border-color: rgba(220, 177, 255, 0.32);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  outline: none;
}

.v13-request-menu__items {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  padding: 5px;
  border: 1px solid rgba(232, 209, 255, 0.2);
  border-radius: 10px;
  background: rgba(15, 11, 22, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.v13-request-menu__item {
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(243, 237, 248, 0.86);
  font: inherit;
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.v13-request-menu__item:hover,
.v13-request-menu__item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.v13-request-menu__item--danger {
  color: rgba(255, 155, 170, 0.94);
}

.v13-request-list-state {
  min-height: 160px;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 20px;
  border: 1px dashed rgba(232, 209, 255, 0.18);
  border-radius: 12px;
  background: rgba(18, 14, 26, 0.45);
  text-align: center;
}

.v13-request-list-state__title,
.v13-request-list-state__description {
  margin: 0;
}

.v13-request-list-state__title {
  color: rgba(255, 248, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
}

.v13-request-list-state__description {
  color: rgba(243, 237, 248, 0.58);
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.v13-request-list-state--error {
  border-color: rgba(246, 124, 142, 0.28);
}

.v13-request-list-items--card .v13-request-row {
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: start;
  padding: 12px;
}

.v13-request-list-items--card .v13-request-row__meta {
  grid-column: 1 / -1;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(232, 209, 255, 0.1);
}

.v13-request-list-items--card .v13-request-row__actions {
  grid-column: 2;
  grid-row: 1;
}

.v13-request-list-items--card .v13-request-row__description,
.v13-request-list-items--card .v13-request-row__origin strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.v13-request-status--done {
  border-color: rgba(113, 214, 168, 0.35);
  background: rgba(64, 154, 111, 0.16);
}

.v13-request-status--ready {
  border-color: rgba(239, 196, 104, 0.42);
  background: rgba(190, 139, 39, 0.17);
}

.v13-request-status--failed {
  border-color: rgba(246, 124, 142, 0.4);
  background: rgba(179, 64, 84, 0.18);
}

/* =========================================================
   v13.7 Request List — content header and semantic row groups
   ========================================================= */

.v13-request-list-header {
  padding: 8px 10px;
  border-color: rgba(232, 209, 255, 0.1);
  background: rgba(10, 8, 15, 0.5);
  box-shadow: none;
}

.v13-request-list-header__actions,
.v13-request-list-view-controls,
.v13-request-list-view-controls__segments {
  display: flex;
  align-items: center;
}

.v13-request-list-header__actions {
  min-width: 0;
  justify-content: flex-end;
  gap: 10px;
}

.v13-request-list-view-controls {
  gap: 7px;
}

.v13-request-list-view-controls__label {
  color: rgba(243, 237, 248, 0.56);
  font-size: 0.7rem;
  white-space: nowrap;
}

.v13-request-list-view-controls__segments {
  padding: 2px;
  border: 1px solid rgba(232, 209, 255, 0.15);
  border-radius: 9px;
  background: rgba(15, 11, 22, 0.72);
}

.v13-request-list-view-controls__button {
  min-height: 26px;
  padding: 3px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(243, 237, 248, 0.62);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.v13-request-list-view-controls__button:hover,
.v13-request-list-view-controls__button:focus-visible {
  color: #fff;
  outline: none;
}

.v13-request-list-view-controls__button.is-active {
  background: rgba(183, 119, 230, 0.24);
  color: #fff;
}

.v13-request-filter__button {
  width: 88px;
  min-width: 88px;
  padding-inline: 8px;
}

.v13-request-attention {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 7px;
  border: 1px solid rgba(239, 196, 104, 0.48);
  border-radius: 999px;
  background: rgba(190, 139, 39, 0.2);
  color: rgba(255, 224, 157, 0.96);
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.v13-request-row__status-line,
.v13-request-row__origin-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.v13-request-row__status-line {
  margin-bottom: 5px;
}

.v13-request-row__origin-line {
  margin-top: 4px;
  color: rgba(243, 237, 248, 0.55);
  font-size: 0.69rem;
  line-height: 1.35;
}

.v13-request-row__status-description {
  min-width: 0;
  overflow: hidden;
  color: rgba(243, 237, 248, 0.62);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-request-row__type-text {
  flex: 0 0 auto;
  color: rgba(225, 201, 244, 0.78);
  font-weight: 600;
  white-space: nowrap;
}

.v13-request-row__origin-separator {
  flex: 0 0 auto;
  color: rgba(243, 237, 248, 0.3);
}

.v13-request-row__origin {
  min-width: 0;
  display: inline;
  margin: 0;
  overflow: hidden;
  color: rgba(243, 237, 248, 0.52);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-request-row__origin strong {
  color: rgba(243, 237, 248, 0.72);
  font-weight: 500;
}

.v13-request-list-items--card .v13-request-row__status-description,
.v13-request-list-items--card .v13-request-row__origin {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}


/* =========================================================
   v13.7 Request Detail — wide central area
   ========================================================= */

.v13-request-detail-screen {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.v13-request-detail {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(232, 209, 255, 0.12);
  border-radius: 14px;
  background: rgba(14, 10, 21, 0.72);
  box-shadow: none;
}

.v13-request-detail-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(232, 209, 255, 0.1);
  background: rgba(8, 6, 13, 0.48);
}

.v13-request-detail-header__main {
  min-width: 0;
}

.v13-request-detail-header__status-line {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.v13-request-detail-header__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v13-request-detail-header__type {
  margin: 4px 0 0;
  color: rgba(243, 237, 248, 0.58);
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.v13-request-detail-header__actions {
  position: relative;
  min-width: 32px;
  display: flex;
  justify-content: flex-end;
}

.v13-request-detail-body {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
}

.v13-request-detail-overview,
.v13-request-detail-section,
.v13-request-detail-next-actions {
  min-width: 0;
  border: 1px solid rgba(232, 209, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.v13-request-detail-overview {
  padding: 12px;
}

.v13-request-detail-overview__description,
.v13-request-detail-copy,
.v13-request-detail-note {
  margin: 0;
  color: rgba(243, 237, 248, 0.74);
  font-size: 0.78rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.v13-request-detail-error {
  margin: 8px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(246, 124, 142, 0.28);
  border-radius: 9px;
  background: rgba(179, 64, 84, 0.12);
  color: rgba(255, 190, 200, 0.95);
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.v13-request-detail-summary {
  margin-top: 10px;
}

.v13-request-detail-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v13-request-detail-meta__item {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.v13-request-detail-meta dt {
  color: rgba(243, 237, 248, 0.5);
  font-size: 0.65rem;
}

.v13-request-detail-meta dd {
  margin: 3px 0 0;
  color: rgba(255, 248, 255, 0.88);
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.v13-request-detail-content {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.v13-request-detail-section {
  padding: 12px;
  overflow: hidden;
}

.v13-request-detail-section h2,
.v13-request-detail-section h3 {
  margin: 0;
  color: rgba(255, 248, 255, 0.94);
  overflow-wrap: anywhere;
}

.v13-request-detail-section h2 {
  font-size: 0.88rem;
}

.v13-request-detail-section h3 {
  font-size: 0.78rem;
}

.v13-request-detail-empty {
  margin: 8px 0 0;
  color: rgba(243, 237, 248, 0.54);
  font-size: 0.74rem;
  line-height: 1.5;
}

.v13-request-related-artifacts,
.v13-request-version-history__list,
.v13-request-step-list {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.v13-request-related-artifacts__item,
.v13-request-version-history__item,
.v13-request-step-list__item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(243, 237, 248, 0.78);
  font-size: 0.72rem;
}

.v13-request-related-artifacts__item span,
.v13-request-step-list__title {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.v13-request-related-artifacts__item small,
.v13-request-step-list__status,
.v13-request-version-history__item strong {
  flex: 0 0 auto;
  color: rgba(243, 237, 248, 0.52);
  font-size: 0.65rem;
}

.v13-request-result-header {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 9px;
}

.v13-request-result-meta {
  color: rgba(243, 237, 248, 0.5);
  font-size: 0.67rem;
  overflow-wrap: anywhere;
}

.v13-request-markdown {
  min-width: 0;
  max-width: 100%;
  padding: 10px;
  border-radius: 9px;
  background: rgba(7, 5, 11, 0.42);
  color: rgba(247, 241, 251, 0.86);
  font-size: 0.76rem;
  line-height: 1.7;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v13-request-markdown > :first-child {
  margin-top: 0;
}

.v13-request-markdown > :last-child {
  margin-bottom: 0;
}

.v13-request-markdown pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

.v13-request-markdown table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.v13-request-markdown th,
.v13-request-markdown td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v13-request-revision-pane {
  min-width: 0;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(232, 209, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.v13-request-detail-action-list {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.v13-request-detail-button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(220, 177, 255, 0.28);
  border-radius: 8px;
  background: rgba(148, 87, 191, 0.18);
  color: rgba(255, 248, 255, 0.92);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.25;
  cursor: pointer;
}

.v13-request-detail-button:hover,
.v13-request-detail-button:focus-visible {
  border-color: rgba(220, 177, 255, 0.5);
  background: rgba(148, 87, 191, 0.28);
  outline: none;
}

.v13-request-detail-button--secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(232, 209, 255, 0.14);
}

.v13-request-detail-footer {
  min-width: 0;
  margin-top: 10px;
}

.v13-request-detail-next-actions {
  padding: 10px;
}

.v13-request-detail-state {
  width: 100%;
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  border: 1px dashed rgba(232, 209, 255, 0.18);
  border-radius: 14px;
  background: rgba(14, 10, 21, 0.58);
  text-align: center;
}

.v13-request-detail-state h1,
.v13-request-detail-state p {
  margin: 0;
}

.v13-request-detail-state h1 {
  color: rgba(255, 248, 255, 0.94);
  font-size: 1rem;
}

.v13-request-detail-state p {
  color: rgba(243, 237, 248, 0.6);
  font-size: 0.76rem;
  line-height: 1.5;
}

.v13-request-detail-state--error {
  border-color: rgba(246, 124, 142, 0.26);
}


/* =========================================================
   v13.7 Request Detail — right panel refinement
   ========================================================= */

.v13-request-side-card {
  padding: 10px 11px;
  border-radius: 13px;
  font-size: 0.82rem;
}

.v13-request-side-card h3 {
  margin: 0 0 6px;
  font-size: 0.88rem;
}

.v13-request-side-card p {
  margin: 0 0 7px;
  line-height: 1.5;
}

.v13-request-side-card.v13-origin-card .v12-workspace-affiliation {
  margin: 0 0 9px;
}

.v13-request-side-card.v13-origin-card .v12-origin-card__body {
  display: grid;
  gap: 9px;
}

.v13-request-side-card.v13-origin-card .v12-origin-row,
.v13-request-side-card.v13-origin-card .v12-origin-artifacts {
  min-width: 0;
}

.v13-request-side-card.v13-origin-card .v12-origin-artifacts__list {
  margin-top: 5px;
}

.v13-request-side-card.v13-origin-card .v12-origin-artifacts__list li {
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.v13-request-side-card.v13-origin-card .v12-link-button {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.v13-request-side-card.v13-origin-card .v12-link-button:hover,
.v13-request-side-card.v13-origin-card .v12-link-button:focus-visible {
  background: transparent;
  color: rgba(255, 240, 255, 0.98);
}

.v13-request-side-error {
  color: #ffd8e2;
  background: rgba(180, 40, 72, 0.14);
  border-radius: 10px;
  padding: 8px;
}


/* =========================================================
   v13.7 Request Detail — final layout adjustments
   ========================================================= */

.v13-request-detail-screen {
  padding: 0;
}

.v13-request-side-actions-card {
  margin: 0;
}

.v13-request-side-actions {
  display: grid;
  gap: 7px;
}

.v13-request-side-action {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(232, 209, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 248, 255, 0.9);
  font: inherit;
  font-size: 0.74rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.v13-request-side-action:hover,
.v13-request-side-action:focus-visible {
  border-color: rgba(220, 177, 255, 0.45);
  background: rgba(148, 87, 191, 0.2);
  outline: none;
}

.v13-request-side-card.v13-origin-card .v12-origin-row {
  display: grid;
  gap: 4px;
}

.v13-request-side-card.v13-origin-card .v12-origin-row__label {
  display: block;
}

.v13-request-side-card.v13-origin-card .v12-origin-row > .v12-link-button {
  justify-self: start;
}

/* =========================================================
   v13.9 Workspace right panel typography alignment
   Scope: Workspace home / briefing / consultation list only.
   Keep chat-screen typography on the existing v13.5 rules.
   ========================================================= */
.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card {
  font-size: 0.82rem;
}

.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card h3 {
  font-size: 0.88rem;
  line-height: 1.35;
}

.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card h4 {
  font-size: 0.82rem;
  line-height: 1.4;
}

.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card p,
.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card li,
.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card dd {
  line-height: 1.5;
}

.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card dt,
.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card .v13-kicker,
.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card .v13-muted {
  font-size: 0.72rem;
  line-height: 1.45;
}

.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card button,
.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card .v13-inline-action,
.v13-app-shell:not(.v13-app-shell--chat-screen)
.v13-lilith-panel
.v13-workspace-side-card .v13-case-dock__all-link {
  font-size: 0.78rem;
  line-height: 1.3;
}
