/* FE/v3/styles.css */

:root {
  --v3-bg: #120f1a;
  --v3-bg-soft: #1c1728;
  --v3-bg-card: rgba(255, 255, 255, 0.08);
  --v3-bg-card-strong: rgba(255, 255, 255, 0.13);
  --v3-border: rgba(255, 255, 255, 0.14);
  --v3-border-strong: rgba(255, 255, 255, 0.24);
  --v3-text: #f7f1ff;
  --v3-text-muted: rgba(247, 241, 255, 0.72);
  --v3-text-subtle: rgba(247, 241, 255, 0.52);
  --v3-accent: #d9a8ff;
  --v3-accent-strong: #f0d1ff;
  --v3-danger: #ff8f9f;
  --v3-danger-bg: rgba(255, 95, 120, 0.16);
  --v3-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --v3-radius-lg: 24px;
  --v3-radius-md: 18px;
  --v3-radius-sm: 12px;
  --v3-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;
}

.v3-screen {
  min-height: 100dvh;
  width: 100%;
  margin: 0 auto;
  color: var(--v3-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(--v3-bg) 48%, #0d0b12 100%);
}

.v3-screen button {
  border: 0;
}

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

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

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

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

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

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

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

.v3-lobby-hero__portrait-inner {
  display: grid;
  place-items: center;
  width: min(62vw, 230px);
  aspect-ratio: 1 / 1.22;
  border: 1px solid var(--v3-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));
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.v3-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(--v3-radius-sm);
  color: #ffd8df;
  background: var(--v3-danger-bg);
}

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

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

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

.v3-current-consultation__header,
.v3-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(--v3-border);
}

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

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

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

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

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

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

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

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

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

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

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

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

.v3-message {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

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

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

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

.v3-message__bubble {
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.7;
  word-break: break-word;
  white-space: normal;
}

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

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

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

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

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

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

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

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

.v3-message-input__textarea {
  width: 100%;
  min-height: 46px;
  max-height: 120px;
  padding: 12px 13px;
  border: 1px solid var(--v3-border);
  border-radius: 18px;
  outline: none;
  resize: vertical;
  color: var(--v3-text);
  background: rgba(255, 255, 255, 0.09);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.v3-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);
}

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

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

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

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

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

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

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

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

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

.v3-settings-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: calc(18px + var(--v3-safe-bottom));
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  .v3-message {
    max-width: 74%;
  }
}

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

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

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

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

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


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

.v3-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%);
}

.v3-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;
}

.v3-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%
    );
}

.v3-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;
}

.v3-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);
}

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

.v3-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;
}

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

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

.v3-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;
}

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

.v3-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);
}

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

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

.v3-home-bottom-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(16px + var(--v3-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);
}

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

.v3-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);
}

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

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

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

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

.v3-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;
}

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

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

.v3-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);
}

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

.v3-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);
}

.v3-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) {
  .v3-home-header {
    padding-top: 16px;
  }

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

  .v3-home-character {
    width: min(92vw, 350px);
    max-height: 76vh;
  }

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

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

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

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

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

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



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

.v3-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);
}

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

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

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

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

.v3-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;
}

.v3-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);
}

.v3-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;
}

.v3-place-header__button,
.v3-room-header__back-button,
.v3-room-header__settings-button,
.v3-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;
}

.v3-place-header__button:hover,
.v3-room-header__back-button:hover,
.v3-room-header__settings-button:hover,
.v3-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)
    );
}

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

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

/* Override older room/settings header rules */

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

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

/* Small screen tuning */

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

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

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

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

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

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



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

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

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

.v3-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(--v3-border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

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

.v3-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;
}

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

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

.v3-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(--v3-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;
}

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

.v3-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
========================= */

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

.v3-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(--v3-text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

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

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

.v3-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(--v3-accent-strong) 100%);
  font-weight: 700;
  white-space: nowrap;
}

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

.v3-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(--v3-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;
}

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

.v3-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));
}

.v3-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));
}

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

.v3-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(--v3-accent-strong);
  background:
    radial-gradient(circle, rgba(215, 166, 255, 0.16), rgba(255, 255, 255, 0.055));
  font-size: 1.05rem;
}

.v3-folder-item.is-virtual .v3-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));
}

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

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

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

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

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

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

.v3-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;
}

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

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

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

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

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

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

.v3-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(--v3-border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.v3-folder-consultation-list__back-button,
.v3-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;
}

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

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

.v3-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;
}

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

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

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

.v3-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
========================= */

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

.v3-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(--v3-accent-strong);
  background:
    radial-gradient(circle, rgba(215, 166, 255, 0.20), rgba(255, 255, 255, 0.06));
}

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

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

.v3-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(--v3-accent-strong) 100%);
  font-weight: 700;
}

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

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

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

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

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

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

  .v3-folder-list-view__new-consultation-button {
    width: 100%;
  }

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

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

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

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

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

  .v3-folder-item__header {
    flex-direction: column;
    gap: 6px;
  }

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

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

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

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

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


/* =========================
   v3 Phase 4 Folder Rename
========================= */

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

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

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

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

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

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

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


/* =========================
   v3 Phase 4 Consultation Rename
========================= */

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

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

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

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

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

.v3-current-consultation__rename-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--v3-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;
}

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

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

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

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

  .v3-current-consultation__actions {
    width: 100%;
    flex-direction: row;
  }

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


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

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

.v3-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;
}

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

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

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


/* =========================
   v3 Phase 4 Consultation Move
========================= */

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

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

.v3-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(--v3-text);
  background: rgba(18, 15, 26, 0.86);
  font-size: 0.76rem;
  outline: none;
}

.v3-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) {
  .v3-consultation-card__move {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 9px 10px;
  }

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


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

/* Action menu */

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

.v3-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;
}

.v3-action-menu-button:hover,
.v3-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)
    );
}

.v3-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);
}

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

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

.v3-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;
}

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

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

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

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

/* Dialog shell */

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

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

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

.v3-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(--v3-accent-strong) 100%);
  font-weight: 700;
}

/* Target preview */

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

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

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

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

/* Warning block */

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

.v3-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);
}

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

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

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

/* Add card */

.v3-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(--v3-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;
}

.v3-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));
}

.v3-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;
}

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

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

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

/* Status badge */

.v3-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* =========================
   v3 Phase 5 Move Dialog
========================= */

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

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

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

.v3-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));
}

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

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

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

.v3-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(--v3-accent-strong) 100%);
  font-size: 0.85rem;
  font-weight: 700;
}

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

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

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

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


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

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

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

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

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

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

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

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

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

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

.v3-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Folder header action menu */

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

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

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

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

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

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

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

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

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

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

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

/* Create dialog */

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

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

.v3-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(--v3-text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

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

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

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

/* AddCard spacing in folder / consultation lists */

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

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

/* Old empty button no longer used */

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

/* =========================
   v3 Phase 5 Rename Dialog
========================= */

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

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

.v3-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(--v3-text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

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

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

/* =========================
   v3 Phase 5 Delete Dialog
========================= */

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

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

.v3-delete-dialog .v3-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;
}

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

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

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

.v3-settings-screen {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  color: var(--v3-text);
}

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

.v3-settings-header__label,
.v3-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.v3-settings-item__value {
  max-width: 12em;
  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;
}

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

.v3-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;
}

.v3-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) {
  .v3-settings-screen {
    padding: 14px;
  }

  .v3-settings-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .v3-settings-item__value {
    max-width: 100%;
    width: fit-content;
  }
}

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

.v3-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(--v3-border-soft);
  border-radius: var(--v3-radius-lg);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.083),
      rgba(255, 255, 255, 0.048)
    );
  box-shadow: var(--v3-shadow-room);
}

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

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

.v3-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;
}

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

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

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

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

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

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

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

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

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


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

.v3-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 */

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


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

.v3-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;
}

.v3-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);
}

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

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

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

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

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