:root {
  color-scheme: light;
  --canvas: #fdfdfe;
  --ink: #1c2438;
  --muted: #5b657c;
  --lavender: #EFEEFA;
  --lavender-dark: #e1e0f5;
  --indigo: #3e497e;
  --line: #dce1ee;
  --muted-pill: #f2f4fa;
  --alert: #8c342e;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); }
body { overflow: hidden; }
button, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid #625594;
  outline-offset: 2px;
}
h1, h2, p { margin: 0; }
h1:focus { outline: none; }
a { color: var(--indigo); text-decoration: none; }
.workspace {
  width: 100%;
  max-width: 38rem;
  height: 100vh;
  height: var(--viewport-height, 100dvh);
  margin: 0 auto;
  background: var(--canvas);
  overflow: hidden;
}
.view { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.scroll-pane { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.login-view { align-items: center; overflow-y: auto; padding: 56px 1.25rem 34px; }
.login-card { flex: none; width: 100%; max-width: 22rem; margin-block: auto; padding: 1.5rem; border: 1px solid var(--line); border-radius: 1.25rem; background: #fff; }
.login-mark { display: inline-grid; width: 3rem; height: 3rem; place-items: center; margin-bottom: 1rem; border-radius: .9rem; background: var(--indigo); color: #fff; font-size: 1.6rem; }
.login-card h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.035em; }
.login-card .pair-start { width: 100%; margin-top: 1rem; }
.pair-details { margin-top: 1rem; color: var(--muted); font-size: .875rem; }
.pair-label { color: var(--ink); font-weight: 600; }
.pair-number { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .25rem 0 .6rem; }
.pair-number code { color: var(--ink); font-size: 1.45rem; letter-spacing: .08em; user-select: all; }
.login-card details { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.login-card summary { padding: .65rem 0; color: var(--indigo); cursor: pointer; font-size: .875rem; }
.login-card form { display: flex; flex-direction: column; gap: .6rem; margin-top: .5rem; }
.login-card label { font-size: .875rem; font-weight: 600; }
.login-card input { min-height: 44px; padding: .65rem .75rem; border: 1px solid #a29fb8; border-radius: .7rem; background: #fff; color: var(--ink); font-size: 16px; }
.login-card form .primary { margin-top: .25rem; }
.login-card .login-status { margin-top: .75rem; color: var(--muted); font-size: .875rem; }
.login-card .login-status[data-error="true"],
.login-error { color: var(--alert); font-size: .8125rem; }

.home-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .9rem;
  padding: 56px 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}
.home-brand { display: flex; flex-direction: column; }
.home-title-row { display: flex; align-items: center; gap: .5rem; }
.home-brand h1 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.035em;
}
.connection {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  width: fit-content;
  margin-top: 0;
  padding: .125rem .5rem;
  border-radius: 999px;
  background: var(--muted-pill);
  color: #4a4c89;
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1.4;
}
.connection-dot {
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: currentColor;
}
.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: .75rem;
  font-size: .9375rem;
  font-weight: 500;
}
.primary { padding: 0 1rem; background: var(--indigo); color: #fff; }
.primary:active { opacity: .9; }
.primary:disabled { background: #e7e5f0; color: #5f5c75; }
.plus-mark { margin-right: .22rem; font-size: 1.15rem; line-height: 1; }
.secondary { padding: .5rem .75rem; background: var(--lavender); color: var(--indigo); }

.list { padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom)); }
.group { margin-bottom: 2rem; }
.group h2 {
  margin-bottom: .75rem;
  padding: 0 .25rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.rows { display: flex; flex-direction: column; gap: .25rem; }
.row {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 49px;
  padding: .75rem .75rem;
  margin: 0 -.5rem;
  border-radius: 1rem;
  background: transparent;
  color: var(--ink);
  text-align: start;
  text-decoration: none;
}
.row:active, .row:hover { background: var(--lavender); }
.pinned-row .row-icon { order: 3; margin-left: auto; }
.row-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
  color: var(--indigo);
}
.row-icon svg, .chevron svg, .project-list .row-icon svg, .send-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.row-main { flex: 1; min-width: 0; }
.row-title, .row-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-title { font-size: 1rem; font-weight: 500; }
.row-subtitle { margin-top: .06rem; color: var(--muted); font-size: .8125rem; }
.chevron {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.chevron svg { width: 1rem; height: 1rem; }
.project { display: flex; flex-direction: column; }
.project + .project { margin-top: .6rem; }
.project > .row {
  min-height: 40px;
  margin: 0;
  padding: .5rem 0;
  border-radius: 0;
}
.project > .row .row-title { font-weight: 600; }
.project-list {
  margin: .25rem 0 0 .375rem;
  padding: .25rem 0 .1rem 1rem;
  border-left: 2px solid var(--lavender-dark);
}
.project-list .row {
  min-height: 42px;
  margin: 0 -.5rem;
  padding: .5rem .5rem;
  border-radius: .75rem;
}
.project-list .row-title { font-size: .9375rem; }
.project-list .row[data-action="new"] {
  display: inline-flex;
  width: fit-content;
  min-height: 36px;
  padding: .25rem .5rem;
  color: var(--indigo);
  font-size: .8125rem;
  font-weight: 500;
}
.project-list .row[data-action="new"] .row-main { flex: 0 0 auto; }
.project-list .row[data-action="new"] .row-icon { width: 1rem; height: 1rem; }
.empty, .page-state {
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.empty { padding: .5rem .25rem; }
.page-state { margin: .75rem 0; }
.page-state[data-error="true"] { color: var(--alert); }

.bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 61px;
  padding: 0 .75rem .75rem 1rem;
  padding-top: 56px;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin-left: -.5rem;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}
.back-glyph { display: inline-flex; width: 1.5rem; height: 1.5rem; }
.back-glyph svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bar-title { flex: 1; min-width: 0; }
.bar-title h1, .bar-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-title h1 { font-size: 1rem; line-height: 1.25; font-weight: 600; }
.bar-title p { margin-top: .125rem; color: var(--muted); font-size: .75rem; }

.transcript { padding: 1.25rem; }
.older { display: flex; width: fit-content; margin: 0 auto .75rem; }
.message { display: flex; flex-direction: column; margin-bottom: 1.5rem; }
.message[data-role="user"] { align-items: flex-end; }
.bubble {
  max-width: 85%;
  min-width: 0;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--muted-pill);
  color: var(--ink);
  font-size: .9375rem;
  line-height: 1.6;
}
.message[data-role="user"] .bubble {
  max-width: 85%;
  border-color: var(--indigo);
  background: var(--indigo);
  color: #fff;
}
.author { display: none; }
.body { overflow-wrap: anywhere; white-space: pre-wrap; }
.delivery { margin: .5rem 0 0 .25rem; color: var(--muted); font-size: .6875rem; }
.message[data-role="user"] .delivery { margin: .5rem .25rem 0 0; }
.pending-status { text-align: right; margin: .1rem .1rem .55rem; }
.delivery[data-error="true"] { color: var(--alert); }
.files { display: grid; gap: .5rem; margin-top: .75rem; }
.attachment {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 62px;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #fff;
  color: var(--ink);
}
.attachment::before {
  content: "";
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  border-radius: .5rem;
  background: var(--lavender);
}
.composer {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem 34px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.composer textarea {
  flex: 1;
  width: 100%;
  min-height: 48px;
  max-height: 8rem;
  padding: .75rem 1rem;
  resize: none;
  border: 0;
  border-radius: 1rem;
  background: var(--muted-pill);
  font-size: .9375rem;
  line-height: 1.4;
}
.composer textarea::placeholder { color: #9da8c0; }
.composer .primary {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--indigo);
}
.send-icon { display: inline-flex; width: 1.5rem; height: 1.5rem; }
.new-body { padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom)); }
.new-body form { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.new-body label { font-size: .875rem; font-weight: 600; }
.new-body textarea { width: 100%; min-height: 120px; resize: none; }
.file-bar .secondary { flex: 0 0 auto; padding-inline: .5rem; font-size: .8rem; }
.file-content { display: grid; place-items: center; background: #eeedf3; }
.file-content iframe { width: 100%; height: 100%; min-height: 18rem; border: 0; background: #fff; }
.file-content img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.file-content .page-state { margin: 1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 700px) {
  .workspace { border-inline: 1px solid var(--line); }
}
