:root {
  --brand-green: #07c160;
  --brand-green-deep: #159a4e;
  --brand-green-soft: #e9f8ef;
  --voice-blue: #2563eb;
  --voice-blue-deep: #1d4ed8;
  --ink: #202522;
  --ink-soft: #5f6863;
  --muted: #8b948f;
  --line: #dfe4e1;
  --line-strong: #cfd6d2;
  --canvas: #edf1ef;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --amber: #b97a16;
  --amber-soft: #fff6dc;
  --amber-line: #ecd28b;
  --danger: #c33f36;
  --danger-soft: #fff0ee;
  --shadow-sm: 0 1px 2px rgba(24, 39, 31, 0.06);
  --shadow-md: 0 14px 40px rgba(26, 46, 35, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-body: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 1px 1px, rgba(78, 98, 86, 0.09) 1px, transparent 0);
  background-size: auto, 22px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.brand-bar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 9px clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-owl {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  animation: owl-breathe 4.2s ease-in-out infinite;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  color: var(--brand-green-deep);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-tagline {
  color: var(--muted);
  font-size: 12px;
}

.select-layout {
  display: grid;
  width: min(1040px, calc(100% - 36px));
  min-height: calc(100vh - 68px - 108px);
  margin: 0 auto;
  padding: 54px 0 34px;
  place-items: start center;
}

.selection-panel {
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.panel-intro {
  padding: 34px 38px 26px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-green-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

.panel-intro h1,
.chat-header h1 {
  margin-bottom: 8px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
}

.panel-intro p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.contact-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 38px 12px;
}

.search-field {
  display: flex;
  width: min(420px, 100%);
  height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-field:focus-within {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.11);
}

.search-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 5px;
  height: 1.5px;
  background: var(--muted);
  content: "";
  transform: rotate(45deg);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.selected-count {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.inline-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 5px 38px 12px;
  padding: 10px 12px;
  border: 1px solid #eadfbd;
  border-radius: var(--radius-sm);
  color: #785f28;
  background: #fffbed;
  font-size: 12px;
}

.manual-contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 38px 14px;
  padding: 13px 14px;
  border: 1px solid #cfe2d6;
  border-radius: var(--radius-sm);
  background: #f5fbf7;
}

.manual-contact-panel strong {
  display: block;
  margin-bottom: 2px;
}

.manual-contact-panel p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.manual-contact-control {
  display: flex;
  min-width: min(420px, 50%);
  align-items: center;
  gap: 8px;
}

.manual-contact-control input,
.path-control input {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #ffffff;
}

.manual-contact-control input:focus,
.path-control input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.notice-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d69d2f;
}

.contact-grid {
  display: grid;
  max-height: 340px;
  min-height: 190px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding: 8px 38px 30px;
}

.contact-option {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.contact-option:hover {
  border-color: #b8cec0;
  background: #fbfdfc;
  transform: translateY(-1px);
}

.contact-option:has(input:checked) {
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
}

.contact-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-avatar,
.message-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, #41c97c, #169c55);
  font-weight: 700;
}

.contact-avatar {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.contact-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-check {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  background: #ffffff;
  font-size: 12px;
  transition: all 150ms ease;
}

.contact-option input:checked + .selection-check {
  border-color: var(--brand-green);
  color: #ffffff;
  background: var(--brand-green);
}

.loading-block,
.empty-contact {
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
}

.empty-contact strong {
  color: var(--ink-soft);
}

.empty-contact p {
  max-width: 480px;
  margin-bottom: 0;
}

.owl-dots {
  display: inline-flex;
  gap: 5px;
}

.owl-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  animation: dot-bounce 1s ease-in-out infinite;
}

.owl-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.owl-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.selection-footer {
  position: sticky;
  z-index: 40;
  bottom: 0;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px clamp(18px, 3vw, 34px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 26px rgba(29, 43, 35, 0.06);
  backdrop-filter: blur(14px);
}

.privacy-note {
  display: flex;
  max-width: 760px;
  align-items: center;
  gap: 13px;
}

.privacy-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #b8d6c2;
  border-radius: 50%;
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
  font-size: 12px;
  font-weight: 700;
}

.privacy-note strong {
  display: block;
  margin-bottom: 2px;
}

.privacy-note p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  color: #ffffff;
  background: var(--brand-green);
}

.button-primary:hover:not(:disabled) {
  background: #06ad56;
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface);
}

.button-secondary:hover:not(:disabled) {
  border-color: #a9bcb0;
  color: var(--ink);
  background: #f8faf9;
}

.button-danger {
  border-color: #efc7c3;
  color: var(--danger);
  background: var(--danger-soft);
}

.button-danger:hover:not(:disabled) {
  border-color: #dfaaa4;
  background: #ffe8e5;
}

.button-large {
  min-width: 132px;
  min-height: 44px;
  padding: 0 28px;
  font-weight: 700;
}

.button.is-busy {
  cursor: wait;
  opacity: 0.72;
}

.dashboard-shell {
  display: grid;
  height: 100vh;
  min-height: 620px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.dashboard-topbar {
  justify-content: flex-start;
  gap: 10px;
}

.dashboard-topbar .toolbar-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 12px clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.contact-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.contact-control label {
  color: var(--ink-soft);
  font-size: 13px;
}

.contact-select {
  width: min(290px, 46vw);
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #ffffff;
}

.contact-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.current-contact {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  overflow: hidden;
}

.current-contact strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-icon-button {
  width: 36px;
  height: 36px;
  border-color: var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface);
}

.toolbar-icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar-icon-button:hover {
  border-color: #a9bcb0;
  color: var(--brand-green-deep);
  background: #f8faf9;
}

.toolbar-icon-button.is-active {
  border-color: #9fd1b2;
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
}

.toolbar-icon-button:active {
  transform: translateY(0);
}

.dashboard-main {
  min-height: 0;
  padding: 0;
}

.chat-frame {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: #f4f6f5;
  box-shadow: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.chat-header h1 {
  margin-bottom: 0;
  font-size: 18px;
}

.chat-header .eyebrow {
  margin-bottom: 2px;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.message-list {
  min-height: 0;
  overflow-y: auto;
  padding: 26px clamp(16px, 4vw, 44px) 42px;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-overflow-scrolling: touch;
}

.empty-state {
  display: flex;
  height: 100%;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 16px;
}

.empty-state p {
  max-width: 380px;
  margin: 7px 0 0;
  font-size: 13px;
}

.empty-owl {
  display: block;
  width: 74px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  animation: message-in 220ms ease both;
  touch-action: pan-y;
  -webkit-touch-callout: none;
}

.message-row.is-me {
  justify-content: flex-end;
}

.message-row.is-other {
  cursor: pointer;
}

.message-row.is-other:focus-visible {
  outline: 2px solid rgba(7, 193, 96, 0.35);
  outline-offset: 4px;
  border-radius: 8px;
}

.message-row.is-other .message-bubble {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.message-row.is-other:hover .message-bubble {
  border-color: #b9d7c4;
  transform: translateY(-1px);
}

.message-row.is-pressing .message-bubble {
  border-color: #b9d7c4;
  transform: translateY(-1px);
}

.message-row.is-selected .message-bubble {
  border-color: #d4aa48;
  box-shadow: 0 0 0 3px rgba(212, 170, 72, 0.14);
}

.insight-panel {
  display: grid;
  width: min(100%, 700px);
  gap: 5px;
  padding: 7px 8px;
  border: 1px solid #d8e4dc;
  border-radius: 9px;
  background: #f7faf8;
  margin-top: -2px;
}

.message-row.is-other .insight-panel {
  border-top-left-radius: 4px;
}

.insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #486653;
  font-size: 11px;
  font-weight: 700;
}

.insight-head span {
  color: var(--muted);
  font-weight: 400;
}

.insight-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.2fr 1.2fr;
  gap: 2px;
  margin-block-start: 0px;
  margin-block-end: 0px;
}

.insight-state {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.insight-item {
  min-width: 0;
  padding: 0px 6px;
  border-radius: 6px;
  background: #ffffff;
}

.insight-item dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
}

.insight-item dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.insight-panel.is-loading .insight-item dd {
  color: #9ba7a0;
}

.insight-panel.is-loading .insight-state {
  color: #74837a;
}

.refinement-row {
  display: flex;
  justify-content: flex-end;
  margin: -11px 0 18px;
  padding-right: 44px;
}

.refinement-history {
  display: flex;
  width: min(78%, 700px);
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}

.refinement-thread {
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #dbe5df;
  border-radius: 8px;
  background: #ffffff;
}

.refinement-round {
  display: grid;
  gap: 6px;
}

.refinement-round + .refinement-round {
  padding-top: 8px;
}

.refinement-message {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.refinement-message:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(7, 193, 96, 0.28);
  outline-offset: 3px;
}

.refinement-message + .refinement-message {
  padding-top: 6px;
}

.refinement-message strong {
  display: block;
  margin-bottom: 3px;
  color: #52665a;
  font-size: 10px;
}

.refinement-message.is-assistant strong {
  color: #806229;
}

.refinement-message.is-current {
  padding: 8px 9px !important;
  border: 1px solid var(--amber-line);
  border-radius: var(--radius-sm);
  color: #3c3320;
  background: var(--amber-soft);
}

.refinement-message.is-current + .refinement-message {
  margin-top: 6px;
}

.refinement-message.is-user {
  width: fit-content;
  max-width: 88%;
  justify-self: end;
  margin-left: auto;
  padding: 7px 9px;
  border: 1px solid #c9dfd2;
  border-radius: 8px 8px 2px 8px;
  color: #385847;
  background: #edf8f1;
}

.refinement-message.is-user + .refinement-message {
  padding-top: 0;
  border-top: 0;
}

.refinement-text,
.refinement-translation {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.refinement-translation {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(92, 112, 100, 0.18);
  color: var(--muted);
}

.refinement-message.is-current .refinement-translation {
  border-top-color: rgba(128, 98, 41, 0.2);
}

.refinement-empty-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.new-message-row {
  margin-top: 8px;
}

.new-message-heading {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #735b28;
  font-size: 11px;
}

.new-message-heading > span {
  padding: 0 3px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.new-message-title {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.new-message-actions {
  flex-wrap: nowrap;
}

.new-message-actions .suggestion-action-button {
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
  padding-right: 6px;
  padding-left: 6px;
}

.new-message-error {
  margin-top: 0;
}

.message-column {
  display: flex;
  max-width: min(78%, 760px);
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.message-row.is-me .message-column {
  align-items: flex-end;
}

.message-avatar {
  width: 34px;
  height: 34px;
  margin-top: 2px;
  font-size: 12px;
}

.message-row.is-me .message-avatar {
  order: 2;
  color: #355343;
  background: #d8eadf;
}

.message-bubble {
  position: relative;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #e3e6e4;
  border-radius: 4px 12px 12px 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-original,
.message-translation {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-translation {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(88, 108, 96, 0.28);
  color: #51685a;
  font-size: 12px;
  line-height: 1.55;
}

.message-row.is-me .message-bubble {
  border-color: #9bdcb5;
  border-radius: 12px 4px 12px 12px;
  background: #95ec69;
}

.message-row.is-me .message-translation {
  border-top-color: rgba(53, 92, 64, 0.22);
  color: #3d6148;
}

.message-time {
  padding: 0 3px;
  color: var(--muted);
  font-size: 10px;
}

.suggestion-panel {
  width: min(100%, 700px);
  padding: 13px;
  border: 1px solid var(--amber-line);
  border-radius: 10px;
  background: var(--amber-soft);
  box-shadow: 0 3px 12px rgba(124, 95, 30, 0.06);
}

.suggestion-panel.is-loading {
  min-height: 104px;
}

.suggestion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.suggestion-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #73551b;
  font-size: 12px;
  font-weight: 700;
}

.mini-owl {
  display: block;
  width: 18px;
  height: 16px;
  flex: 0 0 auto;
}

.suggestion-textarea,
.refinement-textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #dcc989;
  border-radius: var(--radius-sm);
  outline: 0;
  color: #302a1d;
  background: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.suggestion-textarea {
  min-height: 76px;
  padding: 9px 10px;
}

.refinement-textarea {
  min-height: 62px;
  padding: 8px 10px;
}

.suggestion-textarea:focus,
.refinement-textarea:focus {
  border-color: #c59936;
  box-shadow: 0 0 0 3px rgba(197, 153, 54, 0.12);
}

.suggestion-textarea:disabled {
  color: #8e846d;
  background: rgba(255, 255, 255, 0.5);
}

.suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.suggestion-actions .button {
  min-height: 31px;
  padding: 0 10px;
  font-size: 12px;
}

.suggestion-panel .button-secondary {
  border-color: #ddca95;
  color: #705b2d;
  background: rgba(255, 255, 255, 0.68);
}

.refinement-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #dec886;
}

.refinement-panel label {
  display: block;
  margin-bottom: 6px;
  color: #735b28;
  font-size: 11px;
}

.suggestion-error {
  margin-top: 8px;
  color: #a4462d;
  font-size: 12px;
}

.suggestion-dock {
  display: block;
  padding: 12px clamp(18px, 3vw, 34px) max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -6px 22px rgba(28, 42, 34, 0.06);
}

.dock-editor {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.refinement-composer {
  margin: 0;
  padding: 2px 2px 10px 2px;
}

.refinement-hint {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.refinement-input-shell {
  display: block;
}

.refinement-composer .refinement-textarea {
  min-height: 72px;
  max-height: 150px;
  flex: 1;
  resize: vertical;
}

.refinement-composer-footer {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 7px;
}

.manual-message-actions {
  display: grid;
  width: 100%;
  flex: 1 1 auto;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  cursor: pointer;
}

.manual-message-actions .button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.manual-message-actions .button:first-child {
  justify-self: start;
}

.manual-message-actions .manual-message-action-me {
  justify-self: end;
}

.composer-toggle-button {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  align-self: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.composer-toggle-button:hover,
.composer-toggle-button:focus-visible {
  border-color: #a9bcb0;
  outline: 0;
  color: var(--brand-green-deep);
  background: var(--surface-soft);
}

.composer-toggle-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15);
}

.composer-toggle-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.composer-toggle-button.is-open svg {
  transform: rotate(180deg);
}

.manual-message-actions .manual-message-action-me {
  border-color: #2f80ed;
  color: #ffffff;
  background: #2f80ed;
}

.manual-message-actions .manual-message-action-me:hover:not(:disabled) {
  border-color: #1769d2;
  background: #1769d2;
}

.suggestion-action-bar {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.suggestion-action-button {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.suggestion-dock .suggestion-error {
  margin-top: 6px;
}

.modal-layer {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 27, 0.38);
  backdrop-filter: blur(4px);
}

.modal-card {
  display: grid;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(17, 28, 21, 0.26);
  animation: modal-in 180ms ease both;
}

.modal-card-wide {
  width: min(760px, 100%);
}

.modal-card-profile {
  width: min(680px, 100%);
}

.modal-card-guide {
  width: min(900px, 100%);
}

.modal-card-suggestion-history {
  width: min(680px, 100%);
}

.suggestion-history-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.suggestion-history-message {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #b8d6c2;
  color: var(--ink-soft);
  background: #f5f9f6;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.suggestion-history-translation {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed rgba(88, 108, 96, 0.24);
  color: var(--muted);
}

.suggestion-history-state {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.suggestion-history-state.is-error {
  color: var(--danger);
}

.suggestion-history-list {
  display: grid;
}

.suggestion-history-round {
  padding: 14px 0;
}

.suggestion-history-round:first-child {
  padding-top: 0;
}

.suggestion-history-round-index {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-green-deep);
  font-size: 11px;
  font-weight: 800;
}

.suggestion-history-footer {
  justify-content: flex-end;
}

.modal-body.guide-modal-body {
  padding: 0;
  background: var(--surface);
}

.guide-content {
  padding: 24px;
}

.guide-intro {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.guide-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-green-deep);
  font-size: 12px;
  font-weight: 800;
}

.guide-quick-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.guide-quick-flow span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.guide-quick-flow i,
.guide-arrow {
  color: var(--muted);
  font-style: normal;
}

.guide-intro p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.guide-step-list {
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
}

.guide-step {
  display: grid;
  min-width: 0;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
}

.guide-step:last-child {
  border-bottom: 0;
}

.guide-step-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.guide-step h3 {
  margin: 2px 0 5px;
  font-size: 14px;
  line-height: 1.35;
}

.guide-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.guide-flow-node {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #dbe5de;
  border-radius: 6px;
  color: var(--ink-soft);
  background: #f7faf8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.guide-flow-node.is-action {
  border: 1px solid #c8e6d3;
  color: #087d40;
  background: #f1faf4;
}

.guide-result {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.modal-footer {
  border-top: 1px solid var(--line);
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.profile-modal-body {
  padding: 0;
  background: var(--surface);
}

.profile-tabs {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: var(--surface);
}

.profile-tab {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  outline: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.profile-tab:hover:not(:disabled) {
  color: var(--ink);
  background: var(--surface-soft);
}

.profile-tab.is-active {
  border-bottom-color: var(--brand-green);
  color: var(--brand-green-deep);
}

.profile-tab:focus-visible {
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 0 0 2px rgba(7, 193, 96, 0.18);
}

.profile-tab:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.profile-tab-panel {
  min-width: 0;
}

.profile-setting {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.profile-setting:last-child {
  border-bottom: 0;
}

.profile-note-setting {
  padding-bottom: 54px;
}

.profile-setting-toggle {
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.profile-setting-label,
.profile-setting-heading strong,
.profile-setting-copy strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.profile-setting-copy {
  min-width: 0;
}

.profile-setting-copy strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.profile-setting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-setting-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.profile-name-input,
.profile-select,
.profile-textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.profile-name-input {
  display: block;
  height: 36px;
  margin: 0;
  padding: 0 12px;
}

.profile-select {
  display: block;
  min-width: 0;
  max-width: 100%;
  height: 36px;
  overflow: hidden;
  padding: 0 34px 0 12px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-select option {
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-textarea {
  min-height: clamp(140px, 22vh, 200px);
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.65;
}

.profile-name-input:focus,
.profile-select:focus,
.profile-textarea:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.11);
}

.profile-note-list {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.profile-note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-note-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  transition: border-color 150ms ease, background 150ms ease;
}

.profile-note-item:hover {
  border-color: #b9dcc5;
  background: #f5faf7;
}

.profile-note-open {
  display: block;
  width: 100%;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 4px;
  outline: 0;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.profile-note-open:focus-visible {
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12);
}

.profile-note-open:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.profile-note-preview {
  display: block;
  width: 100%;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-note-item > time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.profile-note-delete {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #a46a66;
  background: transparent;
  cursor: pointer;
}

.profile-note-delete:hover:not(:disabled) {
  border-color: #efc7c3;
  color: var(--danger);
  background: var(--danger-soft);
}

.profile-note-delete:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.profile-note-delete svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-note-live {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 12px;
}

.profile-note-live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--voice-blue);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  animation: profile-note-pulse 1.2s ease-out infinite;
}

.profile-note-live p {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-note-live time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.profile-note-error,
.profile-note-state {
  margin: 0;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.profile-note-error {
  border-color: #efc7c3;
  color: var(--danger);
  background: var(--danger-soft);
}

.profile-note-state {
  border-color: #c8e6d3;
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
}

.profile-note-editor-layer {
  z-index: 240;
}

.modal-card-note-editor {
  width: min(920px, 100%);
  height: min(700px, calc(100vh - 44px));
}

.profile-note-editor-body {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}

.profile-note-editor-textarea {
  width: 100%;
  min-height: 0;
  flex: 1;
  resize: none;
  padding: 15px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: #fbfcfb;
  font-size: 14px;
  line-height: 1.75;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.profile-note-editor-textarea:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.11);
}

.profile-note-editor-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.profile-note-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-note-button {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-color: var(--voice-blue);
  color: #ffffff;
  background: var(--voice-blue);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
  font-size: 12px;
}

.profile-note-button:hover:not(:disabled) {
  border-color: var(--voice-blue-deep);
  color: #ffffff;
  background: var(--voice-blue-deep);
}

.profile-note-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.profile-note-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-note-button time {
  font-variant-numeric: tabular-nums;
}

.profile-note-button.is-recording {
  border-color: var(--voice-blue-deep);
  color: #ffffff;
  background: var(--voice-blue-deep);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.profile-note-button.is-recording svg {
  animation: profile-note-breathe 1.2s ease-in-out infinite;
}

.profile-modal-footer .button {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.modal-card-profile .modal-header,
.modal-card-guide .modal-header {
  height: 58px;
  min-height: 58px;
  padding: 0 16px;
}

.modal-card-profile .modal-footer {
  padding: 11px 16px;
}

.modal-card-profile .modal-footer {
  background: var(--surface-soft);
}

.modal-card-profile .modal-header h2,
.modal-card-guide .modal-header h2 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.modal-card-profile .modal-body {
  padding: 0;
}

.save-state {
  color: var(--muted);
  font-size: 12px;
}

@keyframes profile-note-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes profile-note-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.settings-body {
  display: grid;
  gap: 14px;
}

.setting-row,
.style-status,
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.setting-row-stacked {
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
}

.path-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.path-control input {
  min-width: 240px;
}

.setting-row strong,
.style-status strong,
.danger-zone strong {
  display: block;
  margin-bottom: 3px;
}

.setting-row p,
.style-status p,
.danger-zone p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #c8ceca;
  cursor: pointer;
  transition: background 160ms ease;
}

.switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--brand-green);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.number-field {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.number-field input {
  width: 86px;
  border: 0;
  outline: 0;
  text-align: right;
  background: transparent;
}

.number-field span {
  color: var(--muted);
  font-size: 12px;
}

.style-status {
  align-items: flex-start;
  background: #fbfdfc;
}

.style-status > div {
  min-width: 0;
  flex: 1;
}

.style-status p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.danger-zone {
  border-color: #f0d3cf;
  background: #fffafa;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 9px;
  pointer-events: none;
}

.page-dashboard .toast-region {
  top: calc(58px + 12px + var(--visual-viewport-top, 0px));
  right: clamp(12px, 3vw, 34px);
  bottom: auto;
}

.toast {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-green);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(20, 37, 27, 0.17);
  animation: toast-in 180ms ease both;
}

.toast.is-error {
  border-left-color: var(--danger);
}

.conversations-shell {
  display: grid;
  height: 100vh;
  min-height: 620px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.conversations-main {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.conversations-panel {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.conversation-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.conversation-brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-backdrop {
  position: fixed;
  z-index: 140;
  inset: 0;
  background: rgba(22, 31, 26, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(2px);
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.main-menu-drawer {
  position: fixed;
  z-index: 150;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: min(330px, 88vw);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
  transform: translateX(-105%);
  visibility: hidden;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 220ms;
}

.main-menu-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 18px 0 50px rgba(20, 34, 26, 0.16);
  transition-delay: 0s;
}

.main-menu-drawer.is-dragging {
  transition: none;
}

.drawer-header {
  display: flex;
  flex: 0 0 auto;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-header .eyebrow {
  margin-bottom: 2px;
  font-size: 9px;
}

.drawer-header strong {
  font-size: 18px;
}

.drawer-nav {
  display: grid;
  flex: 0 0 auto;
  align-content: start;
  gap: 5px;
  padding: 12px;
}

.drawer-nav-bottom {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #f8fbf9;
}

.drawer-menu-item {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
}

.drawer-menu-item:hover,
.drawer-menu-item:focus-visible {
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
  outline: 0;
}

.drawer-menu-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawer-menu-label {
  min-width: 0;
}

.drawer-menu-value {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--brand-green-deep);
  background: #eef9f2;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.drawer-contacts {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  border-top: 1px solid var(--line);
  background: #f8fbf9;
}

.drawer-contacts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px 9px;
}

.drawer-contacts-header div {
  display: grid;
  gap: 1px;
}

.drawer-contacts-header strong {
  font-size: 13px;
}

.drawer-contacts-header span {
  color: var(--muted);
  font-size: 10px;
}

.drawer-contact-add {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #b8d6c2;
  border-radius: 7px;
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
  cursor: pointer;
}

.drawer-contact-add svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.drawer-contact-list-shell {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #f8fbf9;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.drawer-refresh-indicator {
  position: absolute;
  z-index: 2;
  top: 5px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  will-change: transform, opacity;
}

.drawer-refresh-spinner {
  display: block;
  width: 14px;
  height: 14px;
  border: 1.5px solid #b9cec1;
  border-top-color: var(--brand-green-deep);
  border-radius: 50%;
  transition: border-color 120ms ease, transform 160ms ease;
}

.drawer-refresh-indicator.is-ready {
  color: var(--brand-green-deep);
}

.drawer-refresh-indicator.is-ready .drawer-refresh-spinner {
  border-color: var(--brand-green-deep);
  transform: rotate(45deg);
}

.drawer-refresh-indicator.is-refreshing .drawer-refresh-spinner {
  border-color: #b9cec1;
  border-top-color: var(--brand-green-deep);
  animation: drawer-refresh-spin 700ms linear infinite;
}

.drawer-refresh-indicator.is-complete {
  color: var(--brand-green-deep);
}

.drawer-refresh-indicator.is-complete .drawer-refresh-spinner {
  border-color: var(--brand-green);
}

.drawer-contact-list {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 8px 12px;
  overscroll-behavior: contain;
  touch-action: pan-y;
  transform: translate3d(0, 0, 0);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-overflow-scrolling: touch;
}

.drawer-contact-list.is-pulling {
  transition: none;
}

.drawer-contact-loading,
.drawer-contact-empty {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.drawer-contact-item {
  display: grid;
  width: 100%;
  min-width: 0;
  align-items: center;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, background 150ms ease;
}

.drawer-contact-item:hover,
.drawer-contact-item:focus-visible {
  border-color: #d5e5da;
  outline: 0;
  background: #ffffff;
}

.drawer-contact-item.is-active {
  border-color: #b4dbc2;
  background: #ffffff;
  /* box-shadow: inset 3px 0 0 var(--brand-green); */
}

.drawer-contact-item.is-pressing {
  border-color: #c7e2d1;
  background: #edf8f1;
}

.drawer-contact-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(145deg, #42ca7d, #178f50);
  font-size: 13px;
  font-weight: 800;
}

.drawer-contact-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.drawer-contact-copy strong,
.drawer-contact-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-contact-copy strong {
  font-size: 12px;
}

.drawer-contact-copy small {
  color: var(--muted);
  font-size: 10px;
}

.drawer-contact-side {
  display: grid;
  align-items: center;
  justify-items: end;
  gap: 5px;
}

.drawer-contact-side time {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.drawer-contact-side i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd4cf;
}

.drawer-contact-item.is-active .drawer-contact-side i {
  background: var(--brand-green);
}

.drawer-user {
  display: grid;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.drawer-user-identity {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  padding: 1px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.drawer-user-identity:visited {
  color: var(--ink);
}

.drawer-user-identity:hover,
.drawer-user-identity:focus-visible {
  border-color: #c8dfd1;
  outline: 0;
  background: var(--brand-green-soft);
}

.drawer-user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, #41c97c, #169c55);
  font-weight: 800;
}

.drawer-user-identity div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.drawer-user-identity strong,
.drawer-user-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-user-identity > div span {
  color: var(--muted);
  font-size: 11px;
}

.drawer-user-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-left: auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conversations-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.conversations-header h1 {
  margin-bottom: 0;
  font-size: 23px;
}

.conversation-count {
  color: var(--muted);
  font-size: 12px;
}

.conversation-search-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.conversation-search-row .search-field {
  flex: 1;
}

.conversation-list {
  min-height: 0;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf0ee;
  background: #ffffff;
  transition: background 150ms ease;
}

.conversation-item:hover {
  background: #f7faf8;
}

.conversation-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 13px;
  padding: 14px 12px 14px clamp(18px, 4vw, 42px);
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  user-select: none;
  -webkit-touch-callout: none;
}

.conversation-main:focus-visible {
  box-shadow: inset 3px 0 0 var(--brand-green);
}

.conversation-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(145deg, #44ca7e, #178f50);
  font-size: 16px;
  font-weight: 700;
}

.conversation-copy {
  min-width: 0;
  flex: 1;
}

.conversation-copy strong {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-side {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
  padding-right: clamp(18px, 4vw, 42px);
}

.conversation-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.conversation-switch {
  width: 38px;
  height: 22px;
}

.conversation-switch span::after {
  width: 16px;
  height: 16px;
}

.conversation-switch input:checked + span::after {
  transform: translateX(16px);
}

.conversation-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.manager-search {
  width: 100%;
  margin-bottom: 10px;
}

.manager-add-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.manager-add-form input {
  min-width: 0;
  height: 38px;
  flex: 1;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #ffffff;
}

.manager-add-form input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.manager-selection-count {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.manager-contact-list {
  display: grid;
  max-height: min(460px, 54vh);
  gap: 7px;
  overflow-y: auto;
}

.manager-empty {
  margin: 0;
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.manager-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
}

.manager-contact-item:has(input:checked) {
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
}

.manager-contact-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-green);
}

.manager-contact-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-menu {
  position: fixed;
  z-index: 180;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(20, 35, 27, 0.2);
  animation: modal-in 120ms ease both;
}

.chat-view.is-context-menu-open,
.chat-view.is-context-menu-open * {
  -webkit-user-select: none;
  user-select: none;
}

.context-menu button {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.context-menu button:hover,
.context-menu button:focus-visible {
  color: var(--ink);
  background: var(--surface-soft);
  outline: 0;
}

.context-menu button.is-danger {
  color: var(--danger);
}

.context-menu button.is-accent {
  color: var(--brand-green-deep);
  font-weight: 700;
}

.refinement-dialog {
  position: fixed;
  z-index: 190;
  width: min(360px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 54px rgba(20, 35, 27, 0.22);
  animation: modal-in 140ms ease both;
}

.refinement-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.refinement-dialog-header strong {
  color: var(--ink);
  font-size: 13px;
}

.refinement-dialog-header .icon-button {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.refinement-dialog form {
  display: grid;
  gap: 8px;
}

.refinement-dialog .refinement-dialog-textarea {
  min-height: 88px;
  max-height: min(32vh, 180px);
}

.refinement-dialog-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.refinement-dialog-actions .button {
  min-width: 0;
  min-height: 36px;
}

.refinement-dialog-actions .refinement-dialog-close {
  flex: 0 0 88px;
}

.refinement-dialog-actions .refinement-dialog-send {
  flex: 1 1 auto;
}

@keyframes drawer-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes owl-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

@keyframes dot-bounce {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-tagline {
    display: none;
  }

  .message-column {
    max-width: 86%;
  }
}

@media (max-width: 640px) {
  body.page-dashboard {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .page-dashboard .dashboard-shell {
    position: fixed;
    top: var(--visual-viewport-top, 0px);
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: var(--visual-viewport-height, 100dvh);
    min-height: 0;
    align-content: start;
  }

  .page-dashboard .dashboard-topbar {
    position: sticky;
    z-index: 70;
    top: 0;
  }

  .page-dashboard .dashboard-main {
    min-height: 0;
    overflow: hidden;
  }

  .page-dashboard .suggestion-dock {
    align-self: end;
    min-height: 0;
    max-height: calc(var(--visual-viewport-height, 100dvh) - 90px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .brand-bar {
    padding-inline: 14px;
  }

  .select-layout {
    width: calc(100% - 20px);
    padding-top: 22px;
  }

  .panel-intro,
  .contact-toolbar,
  .contact-grid {
    padding-right: 18px;
    padding-left: 18px;
  }

  .contact-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-field {
    width: 100%;
  }

  .selected-count {
    align-self: center;
  }

  .inline-notice {
    margin-right: 18px;
    margin-left: 18px;
  }

  .manual-contact-panel {
    align-items: stretch;
    flex-direction: column;
    margin-right: 18px;
    margin-left: 18px;
  }

  .manual-contact-control {
    width: 100%;
    min-width: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .selection-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 13px 14px;
  }

  .privacy-note {
    align-items: flex-start;
  }

  .button-large {
    width: 100%;
  }

  .conversations-main {
    width: 100%;
    padding: 0;
  }

  .conversations-header,
  .conversation-search-row {
    padding-right: 16px;
    padding-left: 16px;
  }

  .conversation-main {
    padding-left: 16px;
  }

  .conversation-side {
    padding-right: 14px;
  }

  .workspace-toolbar {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dashboard-topbar {
    flex-wrap: nowrap;
    gap: 6px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .dashboard-topbar .toolbar-actions {
    margin-left: auto;
    gap: 4px;
  }

  .dashboard-topbar .toolbar-icon-button {
    width: 31px;
    height: 31px;
  }

  .current-contact {
    min-width: 0;
    flex: 0 1 auto;
  }

  .current-contact strong {
    max-width: 100%;
  }

  .toolbar-actions {
    display: flex;
    flex: 0 0 auto;
  }

  .dashboard-main {
    padding: 0;
  }

  .chat-header {
    padding: 12px 14px;
  }

  .chat-meta {
    align-items: flex-end;
    flex-direction: column;
    gap: 2px;
  }

  .message-list {
    padding: 18px 10px 30px;
  }

  .message-column {
    max-width: calc(100% - 42px);
  }

  .refinement-row {
    margin-top: -8px;
    padding-right: 0;
  }

  .new-message-row {
    margin-top: 0;
  }

  .new-message-actions .suggestion-action-button {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    padding-right: 4px;
    padding-left: 4px;
  }

  .refinement-history {
    width: calc(100% - 42px);
  }

  .message-avatar {
    display: none;
  }

  .suggestion-dock {
    padding: 10px 10px max(12px, env(safe-area-inset-bottom));
  }

  .refinement-composer .refinement-textarea {
    min-height: 68px;
    max-height: 130px;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .manual-message-actions {
    gap: 4px;
  }

  .manual-message-actions .button {
    padding: 0 9px;
  }

  .modal-layer {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
  }

  .guide-content {
    padding: 18px 16px;
  }

  .guide-step {
    padding: 15px 0;
  }

  .setting-row,
  .style-status,
  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .path-control {
    align-items: stretch;
    flex-direction: column;
  }

  .path-control input {
    width: 100%;
    min-width: 0;
  }

  .switch {
    align-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* SPA shell and component pages */
#app,
.spa-loading {
  min-height: 100vh;
}

.spa-loading {
  display: grid;
  place-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.spa-auth-shell {
  margin-block: clamp(18px, 4vh, 40px);
}

.account-page-shell .account-topbar {
  min-height: 58px;
  padding-block: 9px;
}

.spa-account-main {
  padding-top: 32px;
  padding-bottom: 64px;
}

.spa-account-heading {
  max-width: 720px;
}

.spa-back-button {
  width: auto;
  margin-bottom: 20px;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.account-menu-item,
.account-side-link {
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.account-menu-item {
  border-bottom: 1px solid #edf0ee;
}

.account-menu-item:last-child {
  border-bottom: 0;
}

.account-side-link {
  border: 1px solid #bfdbc8;
}

.chat-view {
  display: grid;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f4f6f5;
}

.chat-view:fullscreen,
.chat-view:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #f4f6f5;
}

.chat-view > .brand-bar {
  grid-row: 1;
}

.chat-view .dashboard-main {
  display: grid;
  min-height: 0;
  overflow: hidden;
  grid-row: 2;
}

.chat-view .chat-frame {
  min-height: 0;
}

.chat-view > .suggestion-dock {
  position: relative;
  z-index: 10;
  grid-row: 3;
}

@media (min-width: 861px) {
  .chat-view.is-drawer-persistent {
    padding-left: min(330px, 88vw);
  }

  .chat-view.is-drawer-persistent .main-menu-drawer.is-open {
    box-shadow: 12px 0 34px rgba(20, 34, 26, 0.1);
  }
}

.conversation-remove {
  min-height: 29px;
  padding-inline: 9px;
  font-size: 11px;
}

.spa-toast-region {
  z-index: 260;
}

.toast-region.spa-toast-region {
  position: fixed;
  top: auto;
  right: 24px;
  bottom: 24px;
}

.auth-switch button {
  padding: 0;
  border: 0;
  color: var(--green-deep);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

@media (max-width: 760px) {
  .chat-view {
    position: fixed;
    top: var(--visual-viewport-top, 0px);
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: var(--visual-viewport-height, 100dvh);
    min-height: 0;
  }

  .spa-account-main {
    width: calc(100% - 24px);
    padding-top: 22px;
    padding-bottom: 44px;
  }

  .spa-auth-shell {
    width: calc(100% - 20px);
    min-height: calc(100vh - 20px);
    margin: 10px auto;
  }

  .chat-view .message-column {
    max-width: calc(100% - 42px);
  }

  .chat-view .suggestion-dock {
    align-self: end;
    min-height: 0;
    max-height: calc(var(--visual-viewport-height, 100dvh) - 90px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .conversations-header {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 14px 14px;
  }

  .conversation-header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .conversation-main {
    padding-left: 14px;
  }

  .conversation-side {
    padding-right: 12px;
  }

  .conversation-remove {
    display: none;
  }

  .toast-region.spa-toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .profile-modal-footer {
    flex-wrap: wrap;
  }

  .profile-modal-footer > .button-primary {
    margin-left: auto;
  }

  .profile-note-editor-layer {
    padding: 12px;
  }

  .modal-card-note-editor {
    height: calc(100vh - 24px);
  }

  .profile-note-editor-body {
    padding: 14px;
  }
}
