:root {
  color-scheme: light;
  --ink: #2e2735;
  --muted: #6a6470;
  --paper: #faf9f6;
  --line: #e4e0e5;
  --plum: #45334f;
  --lilac: #eadcf2;
  --orange: #ff984c;
  --peach: #ffe4cf;
  --white: #fff;
  --radius: 18px;
  font-family:
    Inter, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea,
a {
  outline-offset: 4px;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #9667ac;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(32px, 3.7vw, 56px);
  line-height: 1.17;
  letter-spacing: -0.072em;
  font-weight: 760;
}
h2 {
  font-size: 21px;
  line-height: 1.34;
  letter-spacing: -0.055em;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.04em;
}
p {
  line-height: 1.66;
  overflow-wrap: anywhere;
}
small {
  color: var(--muted);
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  padding: 10px;
  background: white;
  z-index: 30;
}
[hidden] {
  display: none !important;
}
.ico {
  width: 19px;
  height: 19px;
  flex: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand b {
  font-family: "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2.6px;
}
.brand b span {
  color: #d67124;
}
.welcome-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1350px;
  margin: auto;
  padding: 28px clamp(24px, 5vw, 78px) 18px;
}
.welcome-product {
  color: #63596b;
  font-size: 13px;
  font-weight: 600;
}
.welcome {
  max-width: 1350px;
  margin: 0 auto;
  padding: 8px clamp(24px, 5vw, 78px) 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr);
  gap: clamp(35px, 7vw, 110px);
  align-items: center;
  min-height: min(780px, calc(100svh - 105px));
}
.art-panel {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background: #cfabdf;
  border-radius: 32px;
  min-height: 530px;
  height: clamp(540px, 76vh, 730px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.art-title {
  position: relative;
  z-index: 1;
  padding: clamp(27px, 4vw, 58px);
}
.art-title h1 {
  margin: 20px 0 0;
  font-size: clamp(42px, 4.5vw, 68px);
  letter-spacing: -0.08em;
}
.mascot-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #493454;
}
.mascot-label i {
  width: 8px;
  height: 8px;
  background: #f9953f;
  border-radius: 100%;
  box-shadow: 0 0 0 3px #ffffff50;
}
.welcome-art {
  position: absolute;
  z-index: -1;
  bottom: 5%;
  width: 100%;
  height: 63%;
  object-fit: cover;
  object-position: center 50%;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 10%,
    #000 85%,
    transparent
  );
}
.art-foot {
  padding: 18px 30px 27px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #4c3758;
}
.welcome-form {
  display: grid;
  align-items: center;
}
.welcome-form-inner {
  width: 100%;
  max-width: 420px;
}
.welcome-form h2 {
  font-size: clamp(30px, 3.05vw, 45px);
  letter-spacing: -0.073em;
  line-height: 1.24;
}
.sub {
  font-size: 15px;
  color: var(--muted);
  margin-top: 8px;
  word-break: keep-all;
}
.switch {
  display: flex;
  background: #eeeaf0;
  border-radius: 13px;
  padding: 4px;
  gap: 3px;
}
.switch button {
  border-radius: 10px;
  flex: 1;
  min-height: 40px;
  font-size: 14px;
  font-weight: 630;
  color: #736a78;
}
.switch button[aria-pressed="true"] {
  background: white;
  color: var(--plum);
  box-shadow: 0 1px 4px #34223d12;
}
.auth-switch {
  margin: 28px 0 22px;
}
.stack {
  display: grid;
  gap: 17px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}
input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dcd6df;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 13px 15px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 450;
}
input::placeholder,
textarea::placeholder {
  color: #807986;
  opacity: 1;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  accent-color: var(--plum);
}
.primary,
.quiet,
.text-button,
.icon-btn,
.submit-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary,
.quiet {
  font-weight: 660;
  border-radius: 12px;
  min-height: 44px;
  padding: 11px 17px;
  font-size: 14px;
  line-height: 1.35;
}
.primary {
  background: var(--plum);
  color: white;
}
.primary:hover,
.submit-round:hover {
  background: #5b4168;
}
.quiet {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.quiet:hover,
.examples button:hover,
.icon-btn:hover {
  background: #f4eef6;
}
.whole {
  width: 100%;
  min-height: 49px;
}
.auth-switch + .stack .whole {
  margin-top: 4px;
}
.text-button {
  padding: 4px 0;
  color: #675070;
  font-size: 14px;
  font-weight: 630;
  min-height: 34px;
}
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.restore {
  margin-top: 16px;
  color: #655b6b;
  font-size: 13px;
}
.restore .ico {
  width: 16px;
}
.icon-btn {
  height: 38px;
  width: 38px;
  border-radius: 100%;
}
.boot {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
}
.error {
  padding: 9px 12px;
  color: #8c2a24;
  background: #fff0eb;
  border-radius: 10px;
  font-size: 14px;
}
.workspace {
  display: flex;
  min-height: 100svh;
  background: #fff;
}
.sidebar {
  width: 232px;
  flex: none;
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f8f7f5;
  padding: 33px 18px 21px;
}
.sidebar > .brand {
  margin: 0 12px 42px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 47px;
  padding: 10px 14px;
  color: #615967;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 600;
}
.nav-link:hover {
  background: #efedf0;
}
.nav-link.active {
  background: #ebe1f0;
  color: var(--plum);
}
.nav-count {
  margin-left: auto;
  background: #574163;
  color: white;
  padding: 1px 6px;
  border-radius: 20px;
  line-height: 17px;
  font-size: 11px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 13px 10px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: #46324e;
  font-weight: 700;
}
.personal,
.peach {
  background: var(--peach);
}
.lilac {
  background: var(--lilac);
}
.profile span:last-child,
.row-text {
  min-width: 0;
}
.profile strong,
.profile small,
.handoff-meta small {
  display: block;
  overflow-wrap: anywhere;
}
.profile strong {
  font-size: 14px;
}
.profile small {
  font-size: 12px;
  margin-top: 3px;
}
.main-wrap {
  flex: 1;
  min-width: 0;
}
.workspace-bar {
  min-height: 73px;
  border-bottom: 1px solid #edeaee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(26px, 5vw, 74px);
  gap: 10px;
}
.workspace-bar > span {
  min-width: 0;
}
.workspace-bar .brand,
.mobile-name,
.mobile-menu {
  display: none;
}
.desktop-path {
  font-size: 14px;
  color: #5f5865;
  overflow-wrap: anywhere;
}
.desktop-path span {
  color: #b3aab6;
  margin: 0 10px;
}
.compact {
  font-size: 13px;
  min-height: 37px;
  padding: 8px 12px;
  border-radius: 10px;
}
.compact .ico {
  width: 16px;
  height: 16px;
}
.main-content {
  max-width: 1000px;
  margin: auto;
  padding: clamp(23px, 3.5vw, 54px) clamp(24px, 4.7vw, 70px) 70px;
}
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(245px, 22vw, 335px);
  border-radius: 26px;
  background: #e7d6ee;
  display: flex;
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 28px clamp(20px, 3.2vw, 45px);
  max-width: 67%;
  pointer-events: none;
}
.hero-copy h1 {
  font-size: clamp(29px, 3.4vw, 50px);
  margin: 13px 0;
  line-height: 1.28;
}
.hero-copy p {
  color: #5b4b63;
  font-size: 14px;
  word-break: keep-all;
}
.home-hero > img {
  width: 51%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  position: absolute;
  z-index: -1;
  right: 0;
  top: 0;
  mask-image: linear-gradient(to right, transparent 0%, #000 22%);
}
.composer {
  border: 1.5px solid #d7cddd;
  border-radius: 21px;
  padding: 14px 15px 12px;
  background: white;
  margin-top: 22px;
  box-shadow: 0 4px 16px #34243d09;
}
.composer:focus-within {
  border-color: #987aa8;
}
.composer textarea {
  border: 0;
  border-radius: 0;
  resize: vertical;
  max-height: 35vh;
  min-height: 62px;
  padding: 4px 4px 8px;
  font-size: 16px;
  outline: none;
}
.composer textarea:focus-visible {
  outline: none;
}
.composer-tools,
.section-head,
.page-heading,
.dialog-head,
.handoff-meta,
.team-banner,
.card-actions,
.examples,
.mode-switch,
.account-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}
.composer-tools,
.section-head,
.page-heading,
.dialog-head {
  justify-content: space-between;
}
.mode-switch {
  gap: 3px;
}
.mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 9px;
  color: #726879;
}
.mode-switch button[aria-pressed="true"] {
  background: #f1eaf4;
  color: #4c3758;
}
.mode-switch .ico,
.examples .ico {
  width: 15px;
  height: 15px;
}
.submit-round {
  background: var(--plum);
  color: white;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 11px;
  padding: 0 9px;
}
.composer .error {
  margin-top: 7px;
}
.examples,
.card-actions {
  flex-wrap: wrap;
}
.examples {
  margin-top: 13px;
  gap: 7px;
}
.examples button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  min-height: 33px;
  border: 1px solid var(--line);
  background: white;
  color: #665b6c;
  border-radius: 20px;
  padding: 5px 11px;
}
.section-gap {
  margin-top: 33px;
}
.section-head {
  min-height: 35px;
  margin-bottom: 8px;
}
.section-gap > h2 {
  margin-bottom: 12px;
}
.empty-line {
  color: #746d77;
  font-size: 14px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.record-row {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 3px;
}
.record-row[href]:hover {
  background: #faf8fb;
}
.record-row > .ico {
  color: #8c818e;
  width: 16px;
}
.row-icon {
  height: 39px;
  width: 39px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.row-text {
  flex: 1;
}
.row-text b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.row-text small,
.item-list small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.page-heading {
  margin: 4px 0 27px;
  gap: 16px;
  align-items: flex-start;
}
.page-heading h1 {
  font-size: clamp(31px, 3.5vw, 46px);
}
.page-heading .compact {
  white-space: nowrap;
}
.empty-state {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 14px;
  gap: 10px;
  text-align: center;
}
.empty-state p {
  font-size: 14px;
  color: var(--muted);
  word-break: keep-all;
}
.empty-state .quiet {
  margin-top: 5px;
}
.inbox-switch {
  display: inline-flex;
  margin-bottom: 20px;
}
.inbox-switch button {
  padding: 7px 17px;
  min-height: 34px;
  white-space: nowrap;
}
.card-list {
  display: grid;
  gap: 14px;
}
.handoff-card,
.review-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  background: #fff;
}
.section-gap > .handoff-card + .handoff-card {
  margin-top: 12px;
}
.handoff-meta strong {
  font-size: 14px;
}
.handoff-meta small {
  font-size: 12px;
  margin-top: 3px;
}
.handoff-meta > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.state-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 4px 8px;
  line-height: 1.3;
  font-size: 11px;
  font-weight: 650;
  background: #e9f0e9;
  color: #466047;
  white-space: nowrap;
}
.state-chip.pending {
  background: #fff0db;
  color: #785223;
}
.handoff-meta .state-chip {
  margin-left: auto;
}
.message-text,
.summary,
.reply p,
.receipt p,
.request-quote,
.user-msg {
  white-space: pre-wrap;
  word-break: break-word;
}
.message-text {
  margin-top: 14px;
  font-size: 15px;
}
.receipt,
.reply {
  margin-top: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f1f7;
}
.reply {
  background: #fff3e9;
}
.receipt strong,
.reply strong,
.request-quote b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.receipt .ico {
  width: 14px;
  height: 14px;
}
.receipt p,
.reply p {
  margin-top: 4px;
  font-size: 14px;
}
.card-actions:not(:empty) {
  margin-top: 14px;
}
.team-banner {
  padding: 20px;
  background: #f4eef6;
  border-radius: 18px;
}
.team-banner > div {
  flex: 1;
  overflow-wrap: anywhere;
}
.team-banner p {
  font-size: 13px;
  color: var(--muted);
}
.account-foot {
  margin-top: 30px;
  justify-content: flex-end;
}
.back {
  margin-bottom: 10px;
  font-size: 13px;
}
.back .ico {
  width: 16px;
}
.user-msg {
  margin: 18px 0 20px auto;
  max-width: 87%;
  width: fit-content;
  background: #f0e8f5;
  border-radius: 18px 18px 4px 18px;
  padding: 13px 17px;
  line-height: 1.6;
}
.agent-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.summary {
  font-size: 16px;
  margin: 10px 0 19px;
}
.context-link {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: #faf7fb;
  border-radius: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.context-link .ico {
  width: 16px;
}
.review-card h2 {
  font-size: 18px;
}
.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.item-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #ede9ee;
}
.item-list b {
  font-weight: 580;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.item-dot {
  width: 7px;
  height: 7px;
  background: #b39ac0;
  border-radius: 100%;
  flex: none;
  margin-top: 7px;
}
.item-list .deselected b {
  color: #77717a;
  text-decoration: line-through;
}
.item-list .deselected .item-dot {
  background: #d9d6da;
}
.item-list small {
  overflow-wrap: anywhere;
}
dialog {
  color: var(--ink);
  border: 1px solid #e2dbe5;
  border-radius: 23px;
  padding: 24px;
  width: min(480px, calc(100vw - 30px));
  overflow: auto;
  max-height: calc(100dvh - 44px);
  box-shadow: 0 20px 80px #30213729;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #271a2e59;
}
body:has(dialog:modal) {
  overflow: hidden;
}
dialog h2 {
  font-size: 23px;
}
dialog > .sub {
  margin: 8px 0 20px;
}
dialog > label + label {
  margin-top: 17px;
}
dialog > .whole,
dialog form > .whole:last-child {
  margin-top: 16px;
}
dialog .stack {
  gap: 14px;
}
dialog .stack > .whole:last-child {
  margin-top: 0;
}
.copy-field {
  display: flex;
  gap: 7px;
}
.copy-field input {
  flex: 1;
}
.copy-field .quiet {
  white-space: nowrap;
}
.request-quote {
  background: #f4eff6;
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 14px;
  margin: 12px 0 18px;
  max-height: 24vh;
  overflow: auto;
}
.request-quote b {
  margin-bottom: 4px;
}
.draft {
  justify-self: start;
  font-size: 13px;
  min-height: 38px;
}
.edit-row {
  margin: 0 0 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  display: grid;
  gap: 10px;
}
.edit-row legend {
  font-size: 13px;
  font-weight: 700;
  padding: 0 4px;
}
.edit-meta {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 7px;
}
.edit-meta label,
.edit-row label {
  font-size: 12px;
}
.edit-row input:not([type="checkbox"]) {
  padding: 8px;
  min-height: 40px;
  font-size: 14px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.check-label input {
  width: 17px;
  height: 17px;
}
.edit-row .text-button {
  justify-self: start;
  color: #775c65;
  font-size: 12px;
}
.edit-row .text-button:hover {
  color: #973624;
}
.menu-links {
  display: grid;
  margin: 14px 0 0;
}
.menu-links a {
  padding: 12px;
  display: flex;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.menu-links a:hover {
  background: #f3edf5;
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 10px);
  z-index: 20;
  padding: 10px 17px;
  border-radius: 12px;
  max-width: calc(100% - 28px);
  color: white;
  background: #3f3048;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.14s,
    transform 0.14s;
}
#notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1500px) {
  .welcome {
    min-height: calc(100svh - 124px);
  }
  .sidebar {
    width: 260px;
  }
  .main-content {
    max-width: 1100px;
  }
}
@media (max-width: 1050px) {
  .sidebar {
    width: 185px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .main-content {
    padding-left: 28px;
    padding-right: 28px;
  }
  .welcome {
    gap: 5vw;
  }
  .art-panel {
    height: clamp(500px, 71vh, 660px);
    min-height: 0;
  }
  .welcome-art {
    height: 58%;
  }
  .art-title {
    padding: 33px;
  }
  .hero-copy {
    padding-left: 27px;
  }
  .hero-copy h1 {
    font-size: clamp(28px, 3.35vw, 40px);
  }
}
@media (max-width: 740px), (pointer: coarse) and (max-width: 1000px) and (max-height: 520px) {
  .welcome-header {
    padding: 18px 20px 12px;
  }
  .welcome-header .brand img {
    width: 29px;
    height: 29px;
  }
  .brand b {
    font-size: 29px;
  }
  .welcome-product {
    font-size: 12px;
  }
  .welcome {
    display: block;
    min-height: auto;
    padding: 0 17px 32px;
    max-width: 560px;
  }
  .art-panel {
    height: clamp(165px, 31vh, 234px);
    min-height: 0;
    border-radius: 20px;
    display: block;
  }
  .welcome-art {
    width: 63%;
    height: 100%;
    top: 0;
    bottom: 0;
    right: 0;
    object-fit: cover;
    object-position: 53% 50%;
    mask-image: linear-gradient(90deg, transparent, #000 19%);
  }
  .art-title {
    padding: 20px 17px;
  }
  .art-title h1 {
    font-size: clamp(28px, 7vw, 40px);
    margin-top: 13px;
  }
  .art-foot {
    position: absolute;
    bottom: 13px;
    left: 17px;
    text-align: left;
    padding: 0;
    font-size: 10px;
    max-width: 42%;
  }
  .welcome-form-inner {
    margin: auto;
  }
  .welcome-form {
    padding: 26px 4px 0;
  }
  .welcome-form h2 {
    font-size: 30px;
  }
  .auth-switch {
    margin: 20px 0 17px;
  }
  .sub {
    font-size: 14px;
  }
  .stack {
    gap: 13px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 5;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    padding: 0 5px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--line);
    background: #fffc;
    backdrop-filter: blur(14px);
  }
  .sidebar > .brand,
  .sidebar > .profile {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .nav-link {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 61px;
    font-size: 10px;
    border-radius: 0;
    padding: 6px 2px;
    color: #786f7d;
  }
  .nav-link .ico {
    height: 21px;
    width: 21px;
  }
  .nav-link.active {
    background: transparent;
    color: #4f345c;
  }
  .nav-link.active .ico {
    fill: #eee3f3;
    stroke-width: 2.2;
  }
  .nav-count {
    position: absolute;
    left: calc(50% + 7px);
    top: 3px;
    font-size: 9px;
    line-height: 14px;
    padding: 0 4px;
  }
  .workspace-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 54px;
    padding: max(5px, env(safe-area-inset-top)) max(13px, env(safe-area-inset-right)) 5px max(13px, env(safe-area-inset-left));
    gap: 5px;
    border-bottom: 1px solid #f0edf0;
  }
  .workspace-bar > span {
    justify-self: center;
  }
  .workspace-bar > .quiet {
    justify-self: end;
  }
  .workspace-bar .desktop-path {
    display: none;
  }
  .workspace-bar .mobile-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    letter-spacing: -0.04em;
  }
  .workspace-bar .mobile-name img {
    height: 26px;
    width: 26px;
  }
  .workspace-bar > .mobile-menu {
    display: grid;
    place-items: center;
    justify-self: start;
    height: 38px;
    width: 38px;
  }
  .workspace-bar > .compact {
    padding: 6px 8px;
    min-height: 34px;
    font-size: 12px;
  }
  .workspace-bar > .compact .ico {
    width: 15px;
  }
  .main-content {
    max-width: 580px;
    padding: 20px 17px calc(85px + env(safe-area-inset-bottom));
    margin: auto;
  }
  .home-hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border-radius: 23px;
    overflow: hidden;
    background: #f5eef8;
  }
  .home-hero > img {
    position: static;
    order: -1;
    width: 100%;
    height: clamp(170px, 27vh, 245px);
    object-fit: cover;
    object-position: 50% 48%;
    mask-image: linear-gradient(180deg, #000 85%, transparent);
    z-index: 0;
  }
  .hero-copy {
    padding: 2px 13px 21px;
    max-width: 100%;
  }
  .hero-copy .mascot-label {
    display: none;
  }
  .hero-copy h1 {
    font-size: 26px;
    letter-spacing: -0.07em;
    margin: 4px 0 5px;
    line-height: 1.3;
  }
  .hero-copy h1 br {
    display: none;
  }
  .hero-copy h1 br:after {
    content: " ";
  }
  .hero-copy p {
    font-size: 13px;
  }
  .main-content:has(.home-hero) {
    padding-bottom: calc(185px + env(safe-area-inset-bottom));
  }
  .home-hero + .composer {
    position: fixed;
    z-index: 4;
    bottom: calc(67px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: min(544px, calc(100% - 24px));
    margin: 0;
    background: white;
    box-shadow: 0 3px 22px #3923451b;
    padding: 10px 11px 8px;
    border-radius: 17px;
  }
  .home-hero + .composer textarea {
    min-height: 30px;
    height: 34px;
    max-height: 22vh;
    resize: none;
    font-size: 16px;
    padding: 3px 3px 4px;
  }
  .home-hero + .composer:focus-within textarea {
    height: 57px;
  }
  .composer-tools .submit-round {
    min-width: 33px;
    height: 33px;
  }
  .examples {
    justify-content: center;
    margin-top: 14px;
    gap: 6px;
  }
  .examples button {
    font-size: 11px;
    padding: 5px 8px;
  }
  .section-gap {
    margin-top: 24px;
  }
  .section-head h2,
  .section-gap > h2 {
    font-size: 19px;
  }
  .page-heading {
    margin: 3px 0 20px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .page-heading .sub {
    font-size: 13px;
  }
  .page-heading > .primary {
    margin-top: 1px;
    flex: none;
  }
  .record-row {
    gap: 10px;
    padding: 14px 1px;
  }
  .row-text b {
    font-size: 14px;
  }
  .row-icon {
    height: 35px;
    width: 35px;
  }
  .record-row .state-chip {
    font-size: 10px;
    padding: 3px 6px;
  }
  .handoff-card,
  .review-card {
    padding: 15px;
  }
  .team-banner {
    padding: 13px;
    gap: 8px;
  }
  .team-banner h2 {
    font-size: 18px;
  }
  .profile strong,
  .team-banner h2 {
    overflow-wrap: anywhere;
  }
  .team-banner .compact {
    padding: 7px;
  }
  .edit-meta {
    grid-template-columns: 1fr 1fr;
  }
  .edit-meta label:first-child {
    grid-column: 1/-1;
  }
  .copy-field input,
  dialog input:not([type="checkbox"]),
  dialog select,
  dialog textarea,
  .welcome-form input {
    font-size: 16px;
  }
  .welcome-form .switch button,
  .whole {
    font-size: 14px;
  }
  dialog {
    padding: 18px;
    max-height: calc(100dvh - 26px);
    border-radius: 18px;
  }
  #notice {
    bottom: calc(85px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 13px;
    width: max-content;
  }
  .handoff-meta {
    flex-wrap: wrap;
  }
  .handoff-meta .state-chip {
    font-size: 10px;
  }
  .empty-state {
    padding: 38px 12px;
  }
  .text-button {
    font-size: 13px;
  }
}
@media (max-width: 365px) {
  .art-foot {
    display: none;
  }
  .examples {
    gap: 4px;
  }
  .examples button {
    font-size: 10px;
  }
  .examples button .ico {
    width: 12px;
  }
  .main-content {
    padding-left: 12px;
    padding-right: 12px;
  }
  .switch button {
    font-size: 12px;
  }
  .page-heading {
    gap: 7px;
  }
  .compact {
    font-size: 12px;
  }
  .hero-copy h1 {
    font-size: 23px;
  }
  .handoff-meta .avatar {
    width: 28px;
    height: 28px;
  }
  .card-actions {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
.welcome-form .sub + .stack {
  margin-top: 24px;
}
.dialog-feedback {
  margin-top: 14px;
  color: #51425a;
  background: #f3eef6;
  font-size: 13px;
  border-radius: 10px;
  padding: 8px 12px;
}

/* Conversation viewport keeps the editor in reach as the transcript grows. */
.workspace:has(.chat-room) .main-wrap {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.main-content:has(.chat-room) {
  max-width: none;
  min-height: 0;
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 0;
}
.chat-room {
  --chat-gutter: clamp(16px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-column, .chat-dock {
  width: min(100%, 830px);
  margin-inline: auto;
  padding-inline: var(--chat-gutter);
}
.chat-column { min-height: 100%; display: flex; flex-direction: column; }
.chat-welcome {
  margin: auto 0;
  padding-block: 28px;
  text-align: center;
}
.chat-welcome[hidden] { display: none; }
.chat-welcome img {
  width: clamp(112px, 18vh, 170px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 38%;
}
.chat-welcome h2 {
  margin: 20px auto 16px;
  line-height: 1.35;
  font-size: clamp(21px, 3vw, 32px);
  letter-spacing: -.055em;
  text-wrap: balance;
}
.chat-welcome .examples { justify-content: center; margin-top: 0; }
.chat-dock { flex: none; padding-block: 9px clamp(12px, 2.5vh, 26px); }
.chat-dock .composer { margin: 0; }
.dock-bar, .chat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dock-bar { justify-content: flex-end; padding-bottom: 6px; }
.dock-bar button, .chat-actions button { font-size: 13px; }
#chat-stream article { padding-block: 16px 8px; overflow-wrap: anywhere; }
.chat-actions { margin: 3px 0 5px; }
.chat-context { display: block; color: #715c7c; margin-bottom: 5px; font-size: 12px; }
.chat-room .user-msg, .chat-room .message-text, .chat-room .summary, .chat-room .receipt p { white-space: pre-wrap; }
.chat-room .summary { margin: 10px 0 12px; line-height: 1.65; }
.chat-room .agent-head small { font-size: 12px; color: #766d79; }
.chat-room .review-card { margin-block: 10px; }
.chat-handoff, #chat-editor {
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-block: 10px;
}
.chat-handoff .card-actions { margin-top: 12px; }
#chat-editor { background: #fcfafc; scroll-margin: 12px; }
#chat-editor h2 { font-size: 19px; }
.chat-answer-dots { display:inline-flex; align-items:center; gap:3px; color:var(--plum); vertical-align:middle; }
.chat-answer-dots i { width:5px; height:5px; border-radius:50%; background:currentColor; animation:chat-answer-dot 1.2s ease-in-out infinite; }
.chat-answer-dots i:nth-child(2) { animation-delay:140ms; }
.chat-answer-dots i:nth-child(3) { animation-delay:280ms; }
@keyframes chat-answer-dot {
  0%, 65%, 100% { opacity:.5; transform:translateY(0); }
  32% { opacity:1; transform:translateY(-3px); }
}
@media (prefers-reduced-motion:reduce) {
  .chat-answer-dots i { animation:none; }
}
@media (max-width: 740px), (pointer: coarse) and (max-width: 1000px) and (max-height: 520px) {
  .workspace:has(.chat-room) .main-wrap { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .chat-dock { padding-block: 5px 8px; }
  .chat-dock .composer { padding: 8px 10px; }
  .chat-dock .composer textarea { min-height: 40px; max-height: 15dvh; }
  .chat-welcome .examples { flex-wrap: wrap; }
}

.sidebar-features {
  border-top: 1px solid var(--line);
  margin: 20px 5px 0;
  padding-top: 14px;
  display: grid;
  gap: 4px;
}
.compose-icon {
  width: 37px;
  height: 37px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  flex: none;
  color: var(--plum);
}
.compose-icon:hover {
  background: #f2ecf4;
}
.compose-icon .ico {
  width: 20px;
  height: 20px;
}
.voice-shortcuts {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.chat-dock .composer-tools {
  justify-content: initial;
  gap: 8px;
}
.chat-dock .composer {
  border-radius: 23px;
}
.chat-dock .composer .submit-round {
  box-shadow: none;
}
.preview-disclosure {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 4px 0;
}
.chat-welcome img {
  width: clamp(126px, 21vh, 196px);
  border-radius: 35%;
  box-shadow: 0 8px 28px #5b376119;
}
.chat-welcome h2 {
  max-width: 590px;
}
.feature-group {
  border-block: 1px solid var(--line);
}
.feature-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 4px;
}
.feature-row + .feature-row {
  border-top: 1px solid var(--line);
}
.feature-row:hover {
  background: #faf8fb;
}
.feature-icon,
.service-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: #efe6f4;
  color: #553a64;
}
.feature-row > b {
  flex: 1;
}
.feature-row b,
.feature-row small {
  display: block;
}
.feature-row small {
  margin-top: 4px;
  font-size: 13px;
}
.service-list {
  display: grid;
  gap: 12px;
}
.service-card {
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 20px;
  background: #fff;
}
.service-head,
.voice-companion {
  display: flex;
  align-items: center;
  gap: 13px;
}
.service-head > div,
.voice-companion > div {
  min-width: 0;
  flex: 1;
}
.service-head h2,
.voice-companion h2 {
  font-size: 18px;
}
.service-head p,
.voice-companion p,
.service-hint,
.connected-account {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.service-card .service-hint,
.connected-account,
.service-card .error {
  margin-top: 12px;
}
.service-card .card-actions {
  margin-left: 57px;
}
.service-card .card-actions:empty {
  display: none;
}
.service-glyph {
  background: #ffead9;
  color: #82562d;
}
.service-card:nth-child(even) .service-glyph {
  background: #ede4f4;
  color: #5c4070;
}
.preview-result {
  margin: 15px 0;
  padding: 15px;
  border-radius: 13px;
  background: #f7f3f9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 44dvh;
  overflow: auto;
}
.service-list + button {
  margin-top: 14px;
}
.voice-companion {
  padding: 18px;
  background: #f3edf6;
  border-radius: 20px;
}
.voice-companion img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 20px;
}
.call-history {
  margin-top: 16px;
}
.call-row {
  padding: 15px 2px;
  border-top: 1px solid var(--line);
}
.call-row > div {
  display: flex;
  gap: 12px;
  align-items: center;
}
.call-row p {
  margin: 6px 0;
  font-size: 14px;
}
.call-row small {
  font-size: 12px;
}
.call-row .text-button {
  margin-left: 15px;
  font-size: 12px;
}
.call-check {
  display: grid;
  gap: 4px;
  margin: 16px 0;
  padding: 16px;
  border-radius: 13px;
  background: #f5f1f7;
}
.call-check dt {
  font-size: 12px;
  color: var(--muted);
}
.call-check dt:not(:first-child) {
  margin-top: 8px;
}
.call-check dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.menu-links button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 15px;
  padding: 12px;
  text-align: left;
}
.contacts-picker {
  justify-self: start;
}
@media (max-width: 740px), (pointer: coarse) and (max-width: 1000px) and (max-height: 520px) {
  .sidebar-features {
    display: none;
  }
  .workspace-bar .mobile-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 10px;
    line-height: 1.14;
  }
  .mobile-name img {
    border-radius: 9px;
  }
  .workspace-bar > .mobile-menu {
    border: 1px solid #eee9ef;
    border-radius: 50%;
    width: 44px;
    height: 44px;
  }
  .workspace-bar > .compact {
    min-height: 44px;
    border-radius: 22px;
  }
  .chat-dock .composer-tools {
    gap: 4px;
  }
  .chat-dock .composer {
    border-radius: 20px;
  }
  .chat-dock .mode-switch button {
    padding: 5px 6px;
    font-size: 11px;
  }
  .compose-icon {
    width: 32px;
    height: 33px;
  }
  .chat-dock .mode-switch .ico {
    width: 14px;
  }
  .voice-shortcuts {
    gap: 0;
  }
  .chat-dock .composer textarea {
    height: 40px;
  }
  .chat-welcome img {
    width: clamp(115px, 19dvh, 154px);
  }
  .service-card {
    padding: 15px;
  }
  .service-card .card-actions {
    margin-left: 0;
  }
  .service-head {
    gap: 10px;
    align-items: flex-start;
  }
  .service-glyph,
  .feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .service-head h2,
  .voice-companion h2 {
    font-size: 16px;
  }
  .service-head p,
  .feature-row small,
  .voice-companion p {
    font-size: 12px;
  }
  .service-head .state-chip {
    font-size: 10px;
  }
  .voice-companion {
    padding: 13px;
    gap: 9px;
  }
  .voice-companion img {
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }
  .page-heading:has(+ #service-screen) {
    margin-bottom: 19px;
  }
  .voice-companion .compact,
  .section-head .compact {
    white-space: nowrap;
  }
}
@media (max-width: 360px) {
  .chat-dock .mode-switch .ico {
    display: none;
  }
  .service-head {
    flex-wrap: wrap;
  }
  .service-head > div {
    min-width: 120px;
  }
}
.connection-result {
  margin-bottom: 16px;
}
.connection-result.success {
  background: #eaf2ed;
  color: #36523d;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
}

.auth-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
.auth-options a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  color: var(--plum);
  font-weight: 650;
}
.auth-options a:hover {
  text-decoration: underline;
}
.auth-options .recovery-option {
  margin-left: auto;
}
.recovery-option .ico {
  width: 15px;
  height: 15px;
}
.field-help {
  margin-top: -8px;
  color: var(--muted);
  font-size: 12px;
}
.login-settings {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.login-settings .quiet {
  margin-top: 12px;
}
.login-settings > .text-button {
  display: flex;
  margin-top: 14px;
}
@media (max-width: 740px), (pointer: coarse) and (max-width: 1000px) and (max-height: 520px) {
  .welcome[data-welcome-mode="signup"] .art-panel {
    height: clamp(132px, 20vh, 170px);
  }
  .welcome[data-welcome-mode="signup"] .art-foot {
    display: none;
  }
  .welcome[data-welcome-mode="signup"] .welcome-form {
    padding-top: 20px;
  }
}

/* Personal assistant identity and setup */
.assistant-avatar {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
.assistant-brand {
  gap: 9px;
  min-width: 0;
}
.assistant-brand .assistant-name,
.mobile-name .assistant-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.assistant-brand .assistant-name {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.06em;
}
.mobile-name .assistant-name {
  max-width: min(30vw, 120px);
}
.chat-welcome [data-assistant-hero] .assistant-avatar {
  width: clamp(126px, 21vh, 196px);
  height: auto;
  aspect-ratio: 1;
}
.assistant-sample,
.profile-setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.assistant-sample {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--paper);
}
.assistant-sample > div,
.profile-setting-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.assistant-sample img {
  border-radius: 14px;
}
.assistant-sample strong,
.profile-setting-row strong {
  font-size: 17px;
}
.assistant-sample p,
.profile-setting-row p {
  margin: 4px 0 0;
  line-height: 1.5;
  color: var(--muted);
  font-size: 13px;
}
.avatar-picker {
  margin: 0;
  padding: 0;
  min-width: 0;
  border: 0;
}
.avatar-picker legend {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 650;
}
.avatar-picker > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}
.avatar-choice {
  position: relative;
  display: block;
  cursor: pointer;
}
.avatar-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.avatar-choice > span {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 5px 1px;
  border: 1px solid transparent;
  border-radius: 12px;
}
.avatar-choice small {
  font-size: 11px;
  font-weight: 550;
}
.avatar-choice input:checked + span {
  border-color: var(--plum);
  background: #f7f1fa;
}
.avatar-choice input:focus-visible + span {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}
.profile-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-buttons {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-setting-row {
  padding-block: 12px;
}
.profile-setting-row > button {
  margin-left: auto;
  flex-shrink: 0;
}
@media (max-width: 740px), (pointer: coarse) and (max-width: 1000px) and (max-height: 520px) {
  .chat-welcome [data-assistant-hero] .assistant-avatar {
    width: clamp(115px, 19dvh, 154px);
  }
}
@media (max-width: 360px) {
  .avatar-picker > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#sync-status { position:fixed; z-index:20; top:8px; left:50%; transform:translateX(-50%); background:#392e24; color:white; padding:8px 16px; border-radius:12px; }

.auth-header-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.auth-header-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--plum);
  font-size: 14px;
  font-weight: 650;
}
.auth-header-links a:hover { text-decoration: underline; }


@media (max-width: 740px), (pointer: coarse) and (max-width: 1000px) and (max-height: 520px) {
  .workspace-bar .mobile-name {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
    color: var(--ink);
    font-weight: 650;
  }
  .workspace .sidebar,
  .workspace-bar [data-secondary-invite] {
    display: none;
  }
  .workspace .mobile-tabs {
    position: fixed;
    z-index: 5;
    inset: auto auto calc(8px + env(safe-area-inset-bottom)) 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, minmax(44px, 1fr));
    align-items: center;
    width: clamp(232px, 80vw, 330px);
    max-width: calc(100vw - 24px);
    padding: 3px;
    border: 1px solid #e9e7e6;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px #241b2410;
  }
  .mobile-tabs a {
    display: grid;
    min-height: 44px;
    place-items: center;
    border-radius: 999px;
    color: #151515;
    touch-action: manipulation;
  }
  .mobile-tabs .ico {
    width: 23px;
    height: 23px;
    stroke-width: 1.9;
  }
  .mobile-tabs a[aria-current="page"] { background: #f4f3f2; }
  .mobile-tabs a[aria-current="page"] .tab-shape { fill: currentColor; }
  .mobile-tabs a[aria-current="page"] .tab-detail { color: #fff; }
  .chat-dock .composer {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: end;
    padding: 4px 6px;
    border-radius: 24px;
  }
  .chat-column, .chat-dock {
    padding-left: max(var(--chat-gutter), env(safe-area-inset-left));
    padding-right: max(var(--chat-gutter), env(safe-area-inset-right));
  }
  html[data-chat-keyboard] .workspace:has(.chat-room) .main-wrap {
    position: fixed;
    top: var(--keyboard-top);
    inset-inline: 0;
    height: var(--keyboard-height);
    padding-bottom: 0;
  }
  html[data-chat-keyboard] .workspace:has(.chat-room) .mobile-tabs { display: none; }
  .chat-dock .composer-tools { display: contents; }
  .chat-dock .mode-switch { display: none; }
  .chat-dock [data-chat-add] { grid-area: 1 / 1; }
  .chat-dock .composer textarea {
    grid-area: 1 / 2;
    align-self: center;
    height: auto;
    min-height: 38px;
    max-height: 17dvh;
    field-sizing: content;
    padding: 8px 3px;
    resize: none;
  }
  .chat-dock .voice-shortcuts, .chat-dock .submit-round {
    grid-area: 1 / 3;
    align-self: end;
  }
  .chat-dock .compose-icon, .chat-dock .submit-round {
    width: 44px;
    height: 44px;
  }
  .chat-dock .voice-shortcuts a {
    background: var(--plum);
    color: white;
  }
  .chat-dock .composer:has(textarea:placeholder-shown) .submit-round,
  .chat-dock .composer:has(textarea:not(:placeholder-shown)) .voice-shortcuts {
    display: none;
  }
  .chat-dock .preview-disclosure, .chat-dock .error { grid-column: 1 / -1; }
  .chat-dock .dock-bar > button[data-handoff] { display: none; }
  .chat-dock .dock-bar:has(> button:only-child) { display: none; }
}

.chat-dock .assistant-call {
  color: #fff;
  background: var(--plum);
}
.chat-dock .assistant-call:hover { background: #624c6d; }
.chat-dock .composer:has(textarea:placeholder-shown) .submit-round,
.chat-dock .composer:has(textarea:not(:placeholder-shown)) .voice-shortcuts {
  display: none;
}
.chat-dock .submit-round { margin-left: auto; }
.mobile-tabs { display: none; }
[data-live-panel] {
  justify-items: center;
  text-align: center;
}
[data-live-body] { width: 100%; }
.live-clock {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
[data-live-time] { font-variant-numeric: tabular-nums; }
.live-controls { justify-content: center; }
.live-controls [aria-pressed="true"] {
  background: var(--lilac);
  border-color: #a68db3;
}
.live-mini {
  position: fixed;
  z-index: 9;
  top: max(8px,env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 20px);
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 4px 20px #432c4928;
}
.live-expand {
  padding: 5px;
  text-align: left;
  overflow-wrap: anywhere;
  font-weight: 650;
}
.live-expand [data-live-time] {
  color: var(--muted);
  font-size: 12px;
}

/* The first conversation builds the same profile used in chat and voice settings. */
dialog[open]:has(.profile-wizard) { display: flex; flex-direction: column; overflow: hidden; }
dialog:has(.profile-wizard) .dialog-head { flex: none; }
.profile-wizard { display: flex; flex-direction: column; min-height: 0; padding-top: 8px; }
.profile-wizard-body { display: grid; gap: 17px; min-height: 0; overflow: auto; padding: 4px 3px 7px; }
.profile-progress { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.profile-progress span { font-size: 12px; font-weight: 600; color: var(--muted); border-top: 3px solid #eae4e9; padding-top: 5px; }
.profile-progress span.filled { border-color: var(--plum); }
.profile-progress [aria-current] { color: var(--plum); font-weight: 750; }
.profile-dialogue { display: flex; align-items: flex-end; gap: 12px; min-height: 95px; }
.profile-dialogue [data-wizard-poster] { flex: none; }
.profile-dialogue .assistant-avatar { display: block; width: 67px; height: 67px; border-radius: 18px; object-fit: cover; }
.profile-question { flex: 1; min-width: 0; background: #f2eaf4; border-radius: 17px 17px 17px 3px; padding: 13px 15px; }
.profile-question h3 { color: var(--plum); font-size: 18px; line-height: 1.35; margin: 0; }
.profile-question h3:focus { outline: none; }
.profile-question p { margin-top: 6px; color: #65576a; font-size: 13px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.profile-name-field, .profile-tone { font-size: 14px; font-weight: 650; }
.profile-name-field input, .profile-tone select { width: 100%; }
.profile-icon-grid > div { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.profile-icon-grid .avatar-choice > span { padding: 8px 2px; border-color: var(--line); }
.profile-icon-grid .avatar-choice small { font-size: 12px; }
.profile-voices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; min-width: 0; padding: 0; margin: 0; border: 0; }
.profile-voice-row { min-width: 0; display: flex; align-items: center; gap: 3px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 2px 5px; }
.profile-voice-row:has(input:checked) { border-color: var(--plum); background: #f9f3fa; }
.profile-voice-row label { flex: 1; display: flex; align-items: center; gap: 5px; min-height: 44px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.profile-voice-row input { margin: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--plum); }
.profile-listen { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 40px; min-width: 44px; padding: 0 4px; border-radius: 9px; color: var(--plum); font-size: 12px; font-weight: 650; }
.profile-listen[aria-pressed=true] { background: var(--plum); color: white; }
.profile-listen [data-sample-glyph] { font-size: 10px; }
.profile-editor-sample { display: flex; justify-content: flex-end; }
.profile-audio-status { margin: 0; color: var(--muted); font-size: 12px; }
.profile-audio-status:empty { display: none; }
.profile-wizard audio, #assistant-profile-form audio { display: none; }
.profile-wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-wizard-actions button { min-height: 44px; }

.setup-resume { margin: 4px auto 8px; }
@media(max-width:380px) {
  .profile-dialogue { gap: 8px; }
  .profile-dialogue .assistant-avatar { width: 52px; height: 52px; }
  .profile-voice-row { padding-inline: 3px; }
}
.appearance-group { margin: 12px 0 0; padding: 0; min-width: 0; border: 0; }
.appearance-group:first-child { margin-top: 0; }
.appearance-group legend,.appearance-details label { padding: 0; margin-bottom: 5px; font-size: 13px; font-weight: 650; }
.appearance-options { display: grid; gap: 4px; }
.appearance-options.type, .appearance-options.swatch { grid-template-columns: repeat(3,minmax(0,1fr)); }
.appearance-options.character { grid-template-columns: repeat(6,minmax(0,1fr)); }
.appearance-options.letter { grid-template-columns: repeat(7,minmax(0,1fr)); }
.appearance-choice { position: relative; display: block; cursor: pointer; min-width: 0; }
.appearance-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.appearance-choice > span { min-height: 44px; display: flex; gap: 5px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; padding: 3px; font-size: 13px; color: var(--ink); }
.appearance-choice input:checked + span { border-color: var(--plum); background: #f5eff7; box-shadow: inset 0 0 0 1px var(--plum); }
.appearance-choice input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }
.appearance-choice.character > span { flex-direction: column; gap: 1px; font-size: 12px; }
.appearance-choice small { font-size: 11px; white-space: nowrap; }
.appearance-choice i { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #0002; }
.original-swatch { background: linear-gradient(120deg,#f5b387 0 50%,#e6d5eb 50%); }
.appearance-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.appearance-details select { width: 100%; min-height: 44px; }
dialog:has(.profile-wizard) { max-height: calc(100dvh - 24px); }
.profile-wizard-actions { flex: none; background: white; padding-top: 12px; }
@media(max-width:420px) {
  dialog:has(.profile-wizard) { padding: 16px; }
  .appearance-options.character { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .appearance-choice.character > span { flex-direction: row; justify-content: flex-start; padding-inline: 5px; }
  .appearance-choice.character .assistant-avatar { width: 29px; height: 29px; }
  .appearance-options.letter { grid-template-columns: repeat(auto-fit,minmax(44px,1fr)); }
}
@media(max-height:500px) {
  .profile-wizard-body {gap:9px;}
  .profile-dialogue {min-height:0;}
  .profile-dialogue .assistant-avatar {width:44px;height:44px;}
  .profile-question {padding:9px 12px;}
}

@media (pointer: coarse), (max-width: 740px) {
  dialog[open]:has(.profile-wizard) {
    inset-block-start: calc(var(--setup-top,0px) + var(--setup-height,100dvh) / 2);
    inset-block-end: auto; margin-block: 0; transform: translateY(-50%);
    max-height: calc(var(--setup-height,100dvh) - 18px);
  }
  .profile-listen { min-height: 44px; }
  dialog:has(.profile-wizard) .dialog-head .icon-btn { min-width: 44px; min-height: 44px; }
}

.dictation-trigger, .dictation-panel { display: none; }
@media (max-width: 740px), (pointer: coarse) and (max-width: 1000px) and (max-height: 520px) {
  .chat-dock .composer { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .chat-dock .dictation-trigger {
    display: inline-grid;
    grid-area: 1 / 3;
    margin-inline-end: 12px;
    color: var(--plum);
    touch-action: manipulation;
  }
  :is(#reply-form, #handoff-form) .dictation-trigger {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: 44px;
    padding-inline: 12px;
    border-radius: 22px;
    font-size: 14px;
  }
  .dictation-trigger[aria-pressed="true"] { color: #a83231; background: #fff1ed; }
  .chat-dock .voice-shortcuts, .chat-dock .submit-round { grid-area: 1 / 4; }
  .dictation-panel:not([hidden]) {
    grid-column: 1 / -1;
    display: block;
    padding: 6px 5px 2px;
    color: var(--muted);
    font-size: 13px;
  }
}
.dictation-bar[hidden] { display:none; }
.chat-dock .composer[data-dictating] > textarea,
.chat-dock .composer[data-dictating] > .composer-tools { display:none; }
.chat-dock .dictation-bar {
  grid-column:1 / -1; display:grid; grid-template-columns:44px minmax(0,1fr) 44px 44px;
  align-items:center; gap:4px; width:100%; min-width:0;
}
.chat-dock .dictation-bar[hidden] { display:none; }
.dictation-bar button { display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:50%; touch-action:manipulation; }
.dictation-bar button:focus-visible { outline:2px solid var(--plum); outline-offset:-2px; }
.dictation-bar button .ico { width:21px; height:21px; }
.dictation-bar [data-dictation-stop] > span { width:13px; height:13px; border-radius:3px; background:currentColor; }
.dictation-bar [data-dictation-send] { background:var(--ink); color:white; }
.dictation-bar [data-dictation-send]:disabled { opacity:.4; }
.dictation-wave { display:flex; align-items:center; justify-content:space-between; gap:2px; height:34px; min-width:0; overflow:hidden; padding:0 3px; color:var(--ink); }
.dictation-wave i { flex:0 1 3px; min-width:2px; height:3px; border-radius:4px; background:currentColor; --bar-height:12px; --beat:300ms; --phase:-80ms; }
.dictation-wave i:nth-child(3n+1) { --bar-height:18px; --beat:260ms; --phase:-175ms; }
.dictation-wave i:nth-child(4n+2) { --bar-height:24px; --beat:340ms; --phase:-40ms; }
.dictation-wave i:nth-child(5n+3) { --bar-height:28px; --beat:290ms; --phase:-215ms; }
.dictation-wave i:nth-child(-n+2), .dictation-wave i:nth-last-child(-n+2) { --bar-height:9px; }
.dictation-bar[data-speaking] .dictation-wave i { height:var(--bar-height); animation:dictation-waveform var(--beat) ease-in-out var(--phase) infinite; }
@keyframes dictation-waveform { 0%,100% { transform:scaleY(.22); } 38% { transform:scaleY(1); } 72% { transform:scaleY(.48); } }
@media (prefers-reduced-motion:reduce) { .dictation-bar[data-speaking] .dictation-wave i { animation:none; } }

.result-view { white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.result-view p { margin: .35em 0; white-space: pre-line; }
.result-view h3 { font-size: 1em; line-height: 1.4; margin: .8em 0 .35em; }
.result-view > :first-child { margin-top: 0; }
.result-view ul, .result-view ol { margin: .4em 0; padding-inline-start: 1.45em; }
.result-view li + li { margin-top: .4em; }
.result-view .result-more { margin: .25em 0; }
.result-more > summary { color: var(--plum); cursor: pointer; font-size: .88em; font-weight: 600; padding: .6em .25em; width: fit-content; }
.result-table { max-width: 100%; overflow-x: auto; margin: .5em 0; border: 1px solid var(--edge); border-radius: 12px; }
.result-table table { border-collapse: collapse; width: 100%; font-size: .92em; }
.result-table th, .result-table td { min-width: 7em; padding: .55em .7em; text-align: start; vertical-align: top; }
.result-table th { background: var(--panel); }
.result-table tbody tr { border-top: 1px solid var(--edge); }
.result-view .notice-results { list-style: none; padding: 0; }
.notice-results li { border-inline-start: 3px solid var(--edge); padding: .25em 0 .25em .8em; }
.notice-results small { display: block; color: var(--muted); }
.notice-results p { font-size: .94em; }

.notice-note > summary { cursor: pointer; padding: .15em 0; }
.notice-note > summary::marker { color: var(--muted); font-size: .75em; }
.notice-note[open] > summary { margin-bottom: .35em; }
