*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  height: -webkit-fill-available;
  height: 100dvh;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700.woff2") format("woff2");
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  color: #111b21;
  -webkit-font-smoothing: antialiased;
  background: #fff;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

button, input, textarea, select { font-family: inherit; color: inherit; font-size: 16px; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
#app {
  height: 100%;
  height: -webkit-fill-available;
  height: 100dvh;
  min-height: 0;
}

body.in-app { background: #efeae2; }

@media (min-width: 841px) {
  body.in-app { background: #d1d7db; }
  body.in-app::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 127px;
    background: #00a884;
  }
  body.in-app #app {
    position: relative;
    z-index: 1;
    height: calc(100dvh - 38px);
    max-width: 1600px;
    width: calc(100% - 32px);
    margin: 19px auto 0;
  }
}

.boot {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: #00a884;
  color: #fff;
}
.boot p { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.boot-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 72% 28%, #25d366 0 10px, transparent 11px),
    #fff;
  position: relative;
}
.boot-mark::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 22px;
  width: 28px;
  height: 18px;
  border-radius: 6px;
  background: #00a884;
}

.auth-wrap {
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    linear-gradient(#00a884, #00a884) top / 100% 220px no-repeat,
    #d1d7db;
}
.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11, 20, 26, 0.18);
  padding: 32px 28px 24px;
  text-align: center;
}
.auth-card h1 {
  margin: 12px 0 6px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.auth-card .lede {
  margin: 0 0 22px;
  color: #667781;
  font-size: 15px;
  line-height: 1.45;
}
.stack { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.pin-slot:not(.open) { display: none; }
.pin-slot.open {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pin-drop 0.32s ease;
}
@keyframes pin-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pin-slot.open { animation: none; }
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #3b4a54; }
.field input,
.field textarea,
.composer textarea,
.link-row input {
  font-weight: 400;
  font-size: 16px;
  border: 1px solid #e9edef;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: #111b21;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.field input:focus,
.field textarea:focus,
.composer textarea:focus,
.search input:focus,
.link-row input:focus {
  border-color: #00a884;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.16);
}
.fine { margin: 14px 0 0; color: #8696a0; font-size: 12.5px; line-height: 1.45; text-align: left; }
.form-error { margin: 0; color: #c0392b; font-size: 13px; line-height: 1.4; }

.primary, .reply-btn, .send {
  background: #00a884;
  color: #fff;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 24px;
  min-height: 44px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.primary:hover, .reply-btn:hover, .send:hover { background: #008f72; }
.primary:disabled, .reply-btn:disabled, .send:disabled { background: #8696a0; }
.auth-card .primary, .join-panel .primary { width: 100%; }
.btn-ghost {
  background: transparent;
  border: 0;
  color: #008069;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.btn-ghost:hover { background: rgba(0, 168, 132, 0.08); }

.logo { width: 56px; height: 56px; display: block; margin: 0 auto; }
.logo.tiny { width: 40px; height: 40px; margin: 0; }

.shell {
  height: 100%;
  display: flex;
  background: #fff;
  min-height: 0;
}
@media (min-width: 841px) {
  body.in-app .shell { box-shadow: 0 6px 18px rgba(11, 20, 26, 0.18); }
}

.sidebar {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
}
@media (min-width: 841px) {
  .sidebar {
    width: 34%;
    min-width: 320px;
    max-width: 460px;
    border-right: 1px solid #e9edef;
  }
}

.side-head, .chat-head {
  height: 60px;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 16px;
  flex: none;
}
.chat-head {
  height: auto;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(2px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #16866e 0%, #0b5e4a 82%);
  color: #fff;
}
.chat-head .icon-btn { color: #fff; }
.chat-head .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.chat-head .name-hit,
.chat-head .chat-title,
.chat-head .name-text,
.chat-head .who strong { color: #fff; font-weight: 600; }
.chat-head .chat-sub { color: rgba(255, 255, 255, 0.78); }
.chat-head .chat-sub.online { color: #d9fdd3; }
.chat-head .avatar .dot { border-color: #0b5e4a; }
.chat-head .menu { color: #111b21; }
.chat-head .menu button { color: #111b21; font-weight: 600; }
.side-head { justify-content: space-between; }
.me, .who-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who strong, .chat-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.name-line { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.name-hit {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  font: inherit;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-align: left;
}
.verified {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: none;
  cursor: pointer;
}
.verified svg { width: 16px; height: 16px; display: block; }
.verified circle { fill: #0095F6; }
.verified path { fill: #fff; }
.verified-tip {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  background: #111b21;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(11, 20, 26, 0.24);
}
.verified:hover .verified-tip,
.verified.open .verified-tip,
.verified:focus-visible .verified-tip { display: block; }
.profile-name { margin: 8px 0 4px; font-size: 18px; justify-content: center; }
.contact-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.contact-card .avatar { width: 96px; height: 96px; font-size: 32px; }
.contact-card h2 { margin: 4px 0 0; font-size: 20px; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 8px 0;
  min-height: 52px;
  text-align: left;
}
.contact-action { margin-left: auto; color: #008069; font-size: 14px; }
.contact-detail .danger, .contact-detail .primary { width: 100%; margin-top: 12px; }
.contact-person { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0; }
button.danger {
  background: #d93025;
  color: #fff;
  border: 0;
  border-radius: 24px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 600;
}
button.danger:hover { background: #b3261e; }
.notify-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  color: #111b21;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(11, 20, 26, 0.18);
  padding: 14px 16px;
}
.notify-banner strong { display: block; margin-bottom: 4px; }
.notify-banner p { margin: 0 0 8px; color: #3b4a54; }
.notify-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notify-actions .primary, .notify-actions .btn-ghost { min-height: 44px; }
.unavailable {
  margin: 8px 12px calc(8px + env(safe-area-inset-bottom));
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  color: #667781;
  text-align: center;
}
.who small, .chat-sub { color: #667781; font-size: 13px; }
.chat-sub.online { color: #008069; }
.chat-head .who { flex: 1; }
.side-actions, .head-actions { display: flex; align-items: center; }
.head-actions { margin-left: auto; flex: none; }
.chat-head .assist-toggle { color: rgba(255, 255, 255, 0.5); }
.chat-head .assist-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.chat-head .assist-toggle.on { color: #d9fdd3; }
.chat-head .assist-toggle.on svg { fill: currentColor; stroke: none; }
.assist-wait {
  margin-right: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 16px;
}
.session-picks { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; max-height: 280px; overflow: auto; }
.session-pick {
  border: 0;
  background: #f0f2f5;
  border-radius: 10px;
  min-height: 48px;
  padding: 8px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.session-pick strong { font-size: 15px; font-weight: 600; }
.session-pick small { color: #667781; font-size: 12px; }
.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #54656f;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}
.icon-btn:hover { background: rgba(11, 20, 26, 0.06); }
.icon-btn svg, .search svg { width: 22px; height: 22px; fill: currentColor; }
.back-btn { display: none; }
.back-btn.show { display: grid; }

.menu-wrap { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: 42px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(11, 20, 26, 0.18);
  min-width: 180px;
  z-index: 6;
  padding: 6px;
}
.menu button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14.5px;
}
.menu button:hover { background: #f5f6f6; }
.menu small { display: block; color: #667781; font-size: 12px; margin-top: 2px; }

.search {
  position: relative;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #e9edef;
  flex: none;
}
.search > svg {
  position: absolute;
  left: 24px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: #54656f;
}
.search input {
  width: 100%;
  border: 0;
  background: #f0f2f5;
  border-radius: 8px;
  padding: 11px 12px 11px 36px;
  font-size: 16px;
}
.chat-list { flex: 1; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.list-empty { padding: 36px 28px; color: #667781; text-align: center; font-size: 14px; line-height: 1.45; }

.chat-row {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  -webkit-touch-callout: none;
  user-select: none;
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr);
  gap: 13px;
  padding: 10px 14px 10px 13px;
  position: relative;
  align-items: center;
  min-height: 72px;
}
.chat-row::after {
  content: "";
  position: absolute;
  left: 76px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #e9edef;
}
.chat-row:hover { background: #f5f6f6; }
.chat-row.active, .chat-row.active:hover { background: #f0f2f5; }
.chat-top, .chat-bottom { display: flex; align-items: center; gap: 8px; }
.chat-name, .chat-preview { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-name { color: #111b21; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.chat-name.name-line { overflow: visible; }
.chat-preview { color: #667781; font-size: 14px; font-weight: 400; margin-top: 2px; }
.pin-mark { color: #8696a0; display: inline-flex; flex: none; }
.pin-mark svg { width: 15px; height: 15px; fill: currentColor; }
.chat-menu {
  position: fixed;
  z-index: 30;
  background: #fff;
  color: #111b21;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(11, 20, 26, 0.2);
  padding: 6px;
  min-width: 148px;
}
.chat-menu button {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: 600;
}
.chat-menu button:hover { background: #f5f6f6; }
.chat-row.unread .chat-name,
.chat-row.unread .name-text,
.chat-row.unread .chat-preview { font-weight: 700; color: #111b21; }
.chat-time { color: #667781; font-size: 12px; flex: none; }
.chat-time.fresh, .chat-row.unread .chat-time { color: #25d366; font-weight: 600; }
.badge {
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.badge.wide { width: auto; padding: 0 6px; border-radius: 11px; }

.avatar {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  position: relative;
  flex: none;
  letter-spacing: 0.02em;
}
.avatar.sm { width: 40px; height: 40px; font-size: 14px; }
.avatar.pending { background: #dfe5e7; color: #54656f; }
.avatar.pending svg { width: 22px; height: 22px; fill: currentColor; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; border: 0; cursor: pointer; }
.avatar.ai-avatar, .ai-avatar { background: #0b5e4a; color: #fff; font-size: 16px; font-weight: 700; }
.avatar .dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #25d366;
  border: 2px solid #fff;
  right: -1px;
  bottom: -1px;
  z-index: 1;
}

.stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f0f2f5;
}
.stage.talking { background: #efeae2; }
.empty-stage {
  margin: auto;
  max-width: 480px;
  text-align: center;
  padding: 24px;
  color: #667781;
}
.empty-stage h1 { font-weight: 300; font-size: 32px; color: #41525d; margin: 12px 0 8px; }
.empty-stage p { font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.empty-art { width: min(280px, 80%); height: auto; }

.banner-slot:empty { display: none; }
.invite-banner {
  background: #fff;
  margin: 10px 16px 0;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  flex: none;
}
.invite-banner p { margin: 0 0 8px; color: #3b4a54; font-size: 13.5px; line-height: 1.4; }
.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1;
  min-width: 0;
  background: #f0f2f5;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-variant-ligatures: none;
  font-size: 16px;
  letter-spacing: 0.01em;
  padding: 8px 10px;
}
.link-row .icon-btn { background: #f0f2f5; }

.transcript {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 6% 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #efeae2;
  background-image: url("/wallpaper.svg");
  background-size: 320px;
}
.stage:not(.talking) .transcript { background: transparent; }
.day span, .loading-line {
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}
.e2e {
  align-self: center;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: min(440px, 92%);
  background: rgba(255, 255, 255, 0.46);
  color: rgba(84, 101, 111, 0.92);
  font-size: 11.5px;
  line-height: 1.35;
  text-align: left;
  padding: 6px 10px;
  border-radius: 12px;
  margin: 2px auto 8px;
}
.e2e-ico { display: grid; place-items: center; flex: none; margin-top: 1px; color: #8696a0; }
.e2e-ico svg { width: 14px; height: 14px; fill: currentColor; }
.day { align-self: center; margin: 8px 0; }
.day span {
  background: #fff;
  color: #54656f;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 10px;
}
.loading-line {
  margin: 16px auto;
  color: #667781;
  font-size: 14px;
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
}

.bubble {
  position: relative;
  max-width: min(78%, 560px);
  margin: 1px 12px;
  padding: 6px 8px 4px 9px;
  border-radius: 12px;
  background: #fff;
  color: #111b21;
  box-shadow: 0 1px 1px rgba(17, 27, 33, 0.08), 0 1px 3px rgba(17, 27, 33, 0.05);
  font-size: 14.5px;
  line-height: 19px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.bubble.arrive.in { animation: slide-in-left 280ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.bubble.arrive.out { animation: slide-in-right 280ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes slide-in-left {
  from { opacity: 0; transform: translate(-14px, 8px); }
  to { opacity: 1; transform: none; }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translate(14px, 8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bubble.arrive.in, .bubble.arrive.out, .stage.entering { animation: none; }
}
@keyframes screen-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .stage.entering { animation: screen-in 240ms ease; }
  .icon-btn, .attach-btn, .pill-mic, .send-round, .voice-play, .media-hit, .nav-pill, .chat-row, .mint-btn, .set-add, .primary {
    transition: transform 120ms ease, background-color 120ms ease;
  }
  .icon-btn:active, .attach-btn:active, .pill-mic:active, .send-round:not(:disabled):active, .voice-play:active, .media-hit:active, .nav-pill:active, .chat-row:active, .mint-btn:active, .set-add:active, .primary:active {
    transform: scale(0.96);
  }
}
.bubble.out { align-self: flex-end; background: #d9fdd3; }
.bubble.tail { margin-top: 6px; }
.bubble.tail.in { border-top-left-radius: 4px; }
.bubble.tail.out { border-top-right-radius: 4px; }
.bubble .text, .bubble .text a {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.bubble.has-react { margin-bottom: 18px; }
.react-pill {
  position: absolute;
  bottom: -12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.18);
  font-size: 14px;
  line-height: 22px;
}
.bubble.in .react-pill { right: 8px; }
.bubble.out .react-pill { left: 8px; }
.react-pill .count { color: #54656f; font-size: 12px; font-weight: 600; }
.react-layer { position: fixed; inset: 0; z-index: 70; }
.react-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 20, 26, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.react-float {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.react-float.out { align-items: flex-end; }
.react-bar, .react-menu { pointer-events: auto; }
.react-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(11, 20, 26, 0.22);
}
.react-bar button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}
.react-bar button.on { background: #f0f2f5; }
.react-hold { pointer-events: none; }
.react-float .bubble.lifted {
  margin: 0;
  max-width: none;
  pointer-events: none;
  box-shadow: 0 16px 40px rgba(11, 20, 26, 0.32);
}
.react-menu {
  min-width: 196px;
  padding: 4px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(11, 20, 26, 0.22);
  display: flex;
  flex-direction: column;
}
.react-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 16px;
  color: #111b21;
}
.react-menu button:hover, .react-menu button:active { background: #f5f6f6; }
.react-menu button.danger {
  background: transparent;
  color: #d93025;
  border-radius: 10px;
  font-weight: 500;
  width: 100%;
}
.react-menu button.danger:hover { background: #fdecea; }
.react-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0 auto;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 8px 8px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(11, 20, 26, 0.18);
}
.react-sheet h2 { margin: 8px 12px 4px; font-size: 16px; font-weight: 600; }
.react-sheet ul { list-style: none; margin: 0; padding: 0; }
.react-who-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px;
  border-top: 1px solid #f0f2f5;
  font-size: 16px;
}
.react-who-emoji { font-size: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .react-float { animation: react-in 160ms ease; }
  .react-sheet { animation: react-sheet 180ms ease; }
}
@keyframes react-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes react-sheet {
  from { transform: translateY(16px); }
  to { transform: none; }
}
.bubble .text a {
  color: #027eb5;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.bubble.out .text a { color: #075985; }
.bubble .meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 6px 0 -4px 12px;
  color: #667781;
  font-size: 11px;
  line-height: 15px;
  user-select: none;
}
.ticks { width: 16px; height: 11px; fill: #8696a0; }
.bubble.out .ticks { fill: #53bdeb; }
.ai-mark {
  color: #008069;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-right: 4px;
}
.edited { margin-right: 4px; font-style: italic; }
.msg-menu { position: absolute; top: 2px; right: 4px; }
.bubble.in .msg-menu { left: 4px; right: auto; }
.msg-more {
  border: 0;
  background: transparent;
  color: #8696a0;
  width: 44px;
  height: 44px;
  margin: -13px -10px -13px 0;
  padding: 0;
  opacity: 0.55;
}
.bubble:hover .msg-more, .msg-menu.open .msg-more { opacity: 1; }
.msg-pop {
  display: none;
  position: absolute;
  top: 18px;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(11, 20, 26, 0.18);
  z-index: 3;
  min-width: 120px;
  padding: 4px;
}
.bubble.in .msg-pop { left: 0; right: auto; }
.msg-menu.open .msg-pop { display: flex; flex-direction: column; }
.msg-pop button { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 6px; min-height: 44px; }
.msg-pop button:hover { background: #f5f6f6; }
.bubble.has-media { padding: 4px 4px 2px; }
.bubble.has-voice { min-width: min(280px, 78vw); }
.media-hit {
  position: relative;
  display: block;
  width: min(270px, 68vw);
  height: 230px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #111b21;
}
.media-hit img, .media-hit video, .bubble img, .bubble video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  pointer-events: none;
}
.media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(11, 20, 26, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
}
.media-play svg { width: 20px; height: 20px; fill: #fff; margin-left: 2px; }
.voice {
  display: grid;
  grid-template-columns: 42px 36px minmax(72px, 1fr) auto;
  grid-template-rows: 36px 16px;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  min-width: 230px;
  padding: 2px 2px 0;
}
.voice-person { grid-column: 1; grid-row: 1 / span 2; position: relative; width: 42px; height: 42px; align-self: center; }
.voice-person .avatar { width: 42px; height: 42px; font-size: 14px; }
.mic-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00a884;
  color: #fff;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}
.bubble.out .mic-badge { border-color: #d9fdd3; }
.mic-badge svg { width: 11px; height: 11px; fill: currentColor; }
.voice-play {
  grid-column: 2;
  grid-row: 1;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #0b5e4a;
  color: #fff;
  padding: 0;
  display: grid;
  place-items: center;
}
.voice-play svg { width: 14px; height: 14px; fill: #fff; }
.voice-play.playing svg { margin-left: 0; }
.voice-track {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  height: 28px;
  cursor: pointer;
  touch-action: none;
}
.voice-bars { position: relative; z-index: 1; display: flex; align-items: center; gap: 2px; height: 100%; }
.voice-bars i { flex: 1; background: #c5ced6; border-radius: 99px; display: block; min-height: 3px; width: 3px; }
.voice-bars i.played { background: #0b5e4a; }
.voice-clock { grid-column: 4; grid-row: 1; font-size: 12px; color: #667781; font-variant-numeric: tabular-nums; padding-left: 4px; }
.voice-time { grid-column: 3 / span 2; grid-row: 2; justify-self: end; }
.voice-time .meta { float: none; margin: 0; }
.voice-thumb {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: var(--pct, 0%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00a884;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
  pointer-events: none;
}
.voice-foot { display: none; }
.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(11, 20, 26, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.viewer-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.viewer-stage img, .viewer-stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  pointer-events: auto;
}
.viewer-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}
.pending-note {
  margin: 8px 16px 0;
  background: #fff;
  border-left: 3px solid #00a884;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}
.pending-note strong { display: block; font-size: 13px; }
.pending-note p { margin: 6px 0; white-space: pre-wrap; }
.pending-note span, .pending-note p { color: #3b4a54; font-size: 13px; }
.pending-note button { margin-top: 6px; }
.pending-note.error { border-left-color: #c0392b; }
.edit-bar { display: flex; justify-content: space-between; padding: 6px 16px; background: #fff; color: #008069; font-size: 13px; }
.edit-bar button { border: 0; background: transparent; color: #667781; }
.recorder { display: flex; align-items: center; gap: 10px; padding: 10px 16px 8px; background: #efeae2; }
.recorder[hidden] { display: none !important; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; }
.rec-waves { display: flex; align-items: center; gap: 2px; height: 28px; flex: 1; }
.rec-waves i { flex: 1; background: #00a884; border-radius: 99px; display: block; }
.ai-pill { border: 0; border-radius: 999px; padding: 4px 10px; background: #fff; color: #54656f; font-size: 12px; font-weight: 700; }
.ai-pill.on { background: #d9fdd3; color: #067a63; }
.settings-scroll { flex: 1; overflow: auto; background: #f0f2f5; padding: 12px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.settings-block { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.settings-block h2 { margin: 0 0 6px; font-size: 16px; }
.settings-block .hint, .settings-block .fine { margin: 0 0 12px; }
.settings-block select, .settings-block input, .settings-block textarea { width: 100%; }
.delay-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; font-size: 14px; }
.settings-block .delay-range input { width: 88px; min-height: 44px; }
.delay-range[hidden] { display: none; }
.profile-block { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-block .field, .profile-block .primary, .profile-block .fine { width: 100%; text-align: left; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: 14px; }
.assist-option { width: 100%; text-align: left; border: 0; background: transparent; font-size: 16px; padding: 8px 0; }
.chat-ai { border-top: 1px solid #e9edef; padding-top: 10px; margin-top: 10px; }
.chat-ai .memory-list span { flex: 1; }
.check input { width: auto; }
.memory-list, .file-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.memory-list li, .file-list li { display: flex; gap: 8px; align-items: center; }
.memory-list input { flex: 1; min-height: 44px; }
.memory-list button, .file-list button { min-height: 44px; min-width: 44px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.file-btn { cursor: pointer; }
.file-list .empty, .memory-list .empty { color: #667781; }
.auth-install { margin-top: 16px; display: flex; justify-content: center; align-items: center; gap: 6px; color: #667781; font-size: 13px; }
.auth-install .icon-btn { width: 32px; height: 32px; color: #3b4a54; }
.auth-install .icon-btn:hover { background: rgba(11, 20, 26, 0.06); }
.auth-install .icon-btn svg { width: 20px; height: 20px; }
.steps { text-align: left; color: #3b4a54; line-height: 1.5; }
.lightbox { width: min(92vw, 720px); border-radius: 8px; }
.primary.danger { background: #c0392b; }
.me { border: 0; background: transparent; padding: 0; text-align: left; color: inherit; }
.bubble.tail.in::before,
.bubble.tail.out::before {
  content: "";
  position: absolute;
  top: 0;
  width: 8px;
  height: 13px;
}
.bubble.tail.in::before {
  left: -8px;
  background: #fff;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.bubble.tail.out::before {
  right: -8px;
  background: #d9fdd3;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

#composer-slot,
#join-slot {
  flex: none;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #efeae2;
}
.composer, .reply-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px 8px;
  background: #efeae2;
  border-top: 0;
  box-shadow: none;
  flex: none;
}
.composer .icon-btn,
.recorder .icon-btn {
  color: #1f2c34;
}
.attach-btn {
  width: 40px;
  height: 44px;
  margin-bottom: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #54656f;
  box-shadow: none;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
}
.attach-btn svg { width: 22px; height: 22px; fill: currentColor; }
.composer-pill {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-height: 44px;
  background: #fff;
  border: 1px solid #e4e8ec;
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.08), 0 6px 14px rgba(11, 20, 26, 0.04);
  padding: 4px 5px 4px 14px;
}
.composer-pill:focus-within {
  border-color: #b7c4cc;
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.08), 0 0 0 3px rgba(0, 168, 132, 0.12);
}
.composer textarea,
.composer textarea:focus {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 8px 2px;
  resize: none;
  max-height: 120px;
  min-height: 36px;
  line-height: 20px;
  font-size: 16px;
  background: transparent;
  box-shadow: none;
  outline: none;
}
.pill-mic {
  width: 34px;
  height: 34px;
  margin-bottom: 1px;
  border: 0;
  background: transparent;
  color: #8696a0;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
}
.pill-mic svg { width: 18px; height: 18px; fill: currentColor; }
.composer .pill-go {
  height: 34px;
  min-width: 48px;
  margin-bottom: 1px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  display: grid;
  place-items: center;
  flex: none;
}
.composer .pill-go.record { background: #1f2c34; color: #fff; }
.send-round {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
  border: 0;
  border-radius: 50%;
  background: #0b5e4a;
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
}
.send-round:hover,
.send-round:disabled { background: #0b5e4a; opacity: 1; }
.send-round svg { width: 18px; height: 18px; fill: #fff; margin-left: 1px; }
.send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
.send svg { width: 20px; height: 20px; fill: #fff; margin-left: 2px; }
.reply-btn {
  flex: 1;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}

.join-panel {
  margin: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #f0f2f5;
  flex: none;
}
.join-panel .card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}
.join-panel h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.join-panel .hint { margin: 0 0 12px; color: #667781; font-size: 13px; line-height: 1.4; }
.join-panel .stack { gap: 10px; }

.intro { background: #f7f8fa; }
.intro-inner { padding: 36px 28px; }
.intro-inner h1 { margin: 14px 0 8px; font-size: 32px; font-weight: 500; letter-spacing: -0.03em; }
.intro-inner p { margin: 0; color: #3b4a54; line-height: 1.5; font-size: 15px; }
.intro .logo { margin: 0; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 26, 0.5);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
}
.modal {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 20px 20px 16px;
  box-shadow: 0 16px 40px rgba(11, 20, 26, 0.28);
}
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal .lead { margin: 0 0 14px; color: #667781; font-size: 14px; line-height: 1.45; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: #111b21;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 80;
  max-width: min(420px, calc(100% - 32px));
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.avatar-hit {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
}
.limit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.curriculum-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.curriculum-list li { border-top: 1px solid #e9edef; padding-top: 12px; }
.curriculum-list li:first-child { border-top: 0; padding-top: 0; }
.curriculum-list p { margin: 4px 0; }
.curriculum-list small { display: block; color: #667781; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7fce3;
  color: #027a58;
  font-size: 12px;
  font-weight: 600;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.row-actions button, .settings-block .btn-ghost {
  min-height: 44px;
  border: 0;
  border-radius: 22px;
  background: #f0f2f5;
  padding: 8px 14px;
}
.cal { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; }
.cal-nav strong { font-size: 16px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { color: #667781; font-size: 12px; margin: 8px 0; }
.cal-day, .cal-empty {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  position: relative;
}
.cal-day.today { background: #e7fce3; font-weight: 700; }
.cal-day.has i {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #00a884;
}
.crop-stage {
  width: 280px;
  height: 280px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: #111b21;
  touch-action: none;
}
.crop-stage canvas { display: block; width: 280px; height: 280px; }
.modal-actions.column { flex-direction: column; align-items: stretch; }
.modal-actions.column .primary, .modal-actions.column .btn-ghost { width: 100%; }

@media (max-width: 840px) {
  .side-head, .chat-head {
    color: #fff;
    height: auto;
    min-height: calc(56px + env(safe-area-inset-top));
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .side-head { background: #008069; }
  .chat-head {
    background: linear-gradient(180deg, #16866e 0%, #0b5e4a 82%);
    padding-top: env(safe-area-inset-top);
    padding-left: max(2px, env(safe-area-inset-left));
  }
  .who small, .chat-sub, .icon-btn { color: rgba(255, 255, 255, 0.88); }
  .chat-sub.online { color: #d9fdd3; }
  .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
  .chat-head .avatar .dot { border-color: #0b5e4a; }
  .back-btn { display: grid; }
  .shell.chat-open .sidebar { display: none; }
  .shell:not(.chat-open) .stage { display: none; }
  .invite-shell .sidebar { display: none; }
  .invite-shell .stage { display: flex !important; }
  .search {
    background: #008069;
    border-bottom: 0;
    padding-bottom: 10px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  html, body {
    height: 100%;
    height: -webkit-fill-available;
    height: 100dvh;
    background: #efeae2;
  }
  html:has(.stage.talking),
  body.in-app:has(.stage.talking) {
    background: #efeae2;
  }
  #app {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    height: -webkit-fill-available;
    height: 100dvh;
  }
  .stage.talking { background: #efeae2; }
  .transcript { padding-left: 10px; padding-right: 10px; background-color: #efeae2; }
  .composer, .reply-bar, .recorder {
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
    background: #efeae2;
  }
  .join-panel { padding-bottom: env(safe-area-inset-bottom); }
  html.keyboard-open .composer,
  html.keyboard-open .reply-bar,
  html.keyboard-open .recorder,
  html.keyboard-open .join-panel,
  html.keyboard-open .session-composer {
    padding-bottom: 8px;
  }
  html:has(.session-screen),
  body.in-app:has(.session-screen) {
    background: #efeae2;
  }
  .bubble { max-width: 86%; }
}

@media (min-width: 841px) {
  .invite-shell .sidebar { display: flex; }
}

.sidebar {
  background: #f7f6f3;
  position: relative;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
.list-head {
  background: #f7f6f3;
  color: #14241e;
  height: auto;
  min-height: calc(64px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 6px 6px 16px;
}
.chat-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.list-head .avatar { width: 48px; height: 48px; font-size: 16px; }
.list-head .name-text,
.list-head .who strong { color: #14241e; font-weight: 700; font-size: 17px; }
.list-head .who small { color: #8a9690; font-size: 13px; }
.list-head .icon-btn { color: #1c2b26; }
.list-head .icon-btn:hover { background: rgba(11, 94, 74, 0.08); }
.presence {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  display: inline-block;
  margin-left: 6px;
  box-shadow: 0 0 0 2px #f7f6f3;
  flex: none;
}
.line { display: inline-grid; place-items: center; }
.list-head .line svg,
.search .line svg,
.tab .line svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar .search {
  background: transparent;
  border-bottom: 0;
  padding: 6px 16px 14px;
}
.sidebar .search input {
  background: #e5eee8;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 16px 10px 42px;
  color: #14241e;
}
.sidebar .search input::placeholder { color: #8a9690; }
.sidebar .search .line {
  position: absolute;
  left: 30px;
  top: 6px;
  bottom: 14px;
  height: auto;
  transform: none;
  display: flex;
  align-items: center;
  color: #5d6b66;
}
.home-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.chat-row {
  grid-template-columns: 56px minmax(0, 1fr) auto;
  min-height: 80px;
  padding: 12px 14px 12px 16px;
  gap: 12px;
}
.chat-row .chat-name { font-weight: 600; }
.chat-row::after { left: 84px; background: #e4ebe6; }
.chat-row .avatar .dot { border-color: #f7f6f3; }
.chat-end { display: grid; place-items: center; color: #c5cec9; min-width: 22px; }
.row-chev svg { width: 16px; height: 16px; fill: currentColor; }
.chat-list, .contact-home { padding-bottom: 84px; }
.contact-home { flex: 1; overflow-y: auto; min-height: 0; }
.contact-subhead { margin: 14px 16px 4px; color: #8a9690; font-size: 13px; font-weight: 700; }
.contact-open .contact-action { color: #0b5e4a; font-weight: 700; font-size: 13px; }
.tabbar {
  display: flex;
  background: #fff;
  border-top: 1px solid #e7eeea;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  flex: none;
  z-index: 2;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #8d9994;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 0 4px;
  font-size: 11px;
  font-weight: 600;
}
.tab.on { color: #0b5e4a; }
.tab.on::after {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: #0b5e4a;
  margin-top: 2px;
}
.fab {
  position: absolute;
  right: 18px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #0b5e4a;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(11, 94, 74, 0.28);
  z-index: 3;
  padding: 0;
}
.fab svg { width: 22px; height: 22px; fill: #fff; }
@media (max-width: 840px) {
  .side-head.list-head {
    background: #f7f6f3;
    color: #14241e;
  }
  .list-head .icon-btn,
  .list-head .name-text,
  .list-head .who strong { color: #14241e; }
  .list-head .who small { color: #8a9690; }
  .list-head .icon-btn:hover { background: rgba(11, 94, 74, 0.08); }
  .sidebar .search { background: transparent; }
}
@media (prefers-reduced-motion: no-preference) {
  .tab, .fab { transition: transform 120ms ease, color 120ms ease; }
  .tab:active, .fab:active { transform: scale(0.96); }
}

.curriculum {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f4f7f6;
  color: #163028;
}
.cur-head {
  position: relative;
  overflow: hidden;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(92px + env(safe-area-inset-top));
  padding: calc(14px + env(safe-area-inset-top)) 16px 36px;
  color: #fff;
  background: linear-gradient(165deg, #12856a 0%, #0b5e4a 48%, #084a3b 100%);
  border-radius: 0 0 28px 28px;
}
.cur-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cur-head h1,
.cur-nav { position: relative; z-index: 1; }
.cur-head h1 {
  margin: 0;
  flex: 1;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cur-nav {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
}
.cur-nav svg { width: 22px; height: 22px; fill: currentColor; }
.curriculum-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-top: -22px;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}
.cur-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(145deg, #eefbf4 0%, #d7f3e6 100%);
  box-shadow: 0 10px 28px rgba(11, 94, 74, 0.08);
}
.cur-info p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: #1c3d32;
}
.cur-info.pulse { animation: cur-pulse 0.9s ease; }
@keyframes cur-pulse {
  0% { box-shadow: 0 0 0 0 rgba(11, 94, 74, 0.28); }
  100% { box-shadow: 0 0 0 14px rgba(11, 94, 74, 0); }
}
.cur-badge {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0b5e4a;
  color: #fff;
}
.cur-badge.mint { background: #d9f3e6; color: #0b5e4a; }
.cur-badge svg { width: 20px; height: 20px; fill: currentColor; }
.cur-card {
  background: #fff;
  border-radius: 22px;
  padding: 16px;
  margin: 0 0 14px;
  box-shadow: 0 8px 28px rgba(16, 40, 32, 0.07);
}
.cur-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cur-card-head strong,
.curriculum .cal-nav strong,
.cur-upcoming-copy strong {
  font-size: 17px;
  font-weight: 700;
  color: #12241d;
  letter-spacing: -0.02em;
}
.curriculum .cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.cal-chevs { margin-left: auto; display: flex; gap: 8px; }
.cal-chev {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eef1f0;
  color: #3c4c46;
  display: grid;
  place-items: center;
  padding: 0;
}
.cal-chev svg { width: 18px; height: 18px; fill: currentColor; }
.curriculum .cal-dow,
.curriculum .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.curriculum .cal-dow {
  margin: 6px 0 4px;
  color: #8b9a94;
  font-size: 12px;
  font-weight: 600;
}
.curriculum .cal-grid { gap: 4px 0; }
.curriculum .cal-day,
.curriculum .cal-empty {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: #1a2e28;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.curriculum .cal-day b {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
}
.curriculum .cal-day.today { background: transparent; font-weight: 600; }
.curriculum .cal-day.mark b {
  background: #0b5e4a;
  color: #fff;
  box-shadow: 0 0 0 4px #d7f3e4;
}
.curriculum .cal-day.has i {
  position: static;
  width: 5px;
  height: 5px;
  margin: 3px 0 0;
  border-radius: 50%;
  background: #1a8f63;
}
.curriculum .field {
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #163028;
}
.curriculum .limit-row { margin-bottom: 0; }
.curriculum .limit-row .field { margin-bottom: 12px; }
.cur-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  background: #f3fbf7;
  border: 1px solid #d5ebe2;
  border-radius: 14px;
}
.cur-control.area { align-items: flex-start; }
.cur-lead,
.cur-control .cur-chev {
  position: absolute;
  display: grid;
  place-items: center;
  color: #5d8a78;
  pointer-events: none;
}
.cur-lead { left: 12px; }
.cur-control.area .cur-lead { top: 14px; }
.cur-control .cur-chev { right: 10px; }
.cur-lead svg,
.cur-chev svg { width: 18px; height: 18px; fill: currentColor; }
.cur-ph,
.cur-face {
  color: #8aa396;
  font-weight: 500;
  font-size: 15px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cur-ph {
  position: absolute;
  left: 40px;
  right: 36px;
}
.cur-face {
  flex: 1;
  min-width: 0;
  padding: 0 36px 0 40px;
}
.cur-control.has-value .cur-ph { display: none; }
.cur-control.has-value .cur-face { color: #163028; }
.curriculum .field input.cur-datetime-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.curriculum .field select,
.curriculum .field input,
.curriculum .field textarea {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 14px;
  color: #163028;
  font-weight: 500;
  font-size: 15px;
  min-height: 48px;
  padding: 12px 36px 12px 40px;
  appearance: none;
  -webkit-appearance: none;
}
.curriculum .field textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.4;
  padding-top: 14px;
  padding-right: 14px;
}
.curriculum .field textarea::placeholder { color: #8aa396; font-weight: 500; }
.curriculum .field select {
  text-overflow: ellipsis;
}
.curriculum input[type="datetime-local"] { color: transparent; }
.curriculum .has-value input[type="datetime-local"] { color: #163028; }
.curriculum input[type="datetime-local"]::-webkit-datetime-edit,
.curriculum input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper { color: transparent; }
.curriculum .has-value input[type="datetime-local"]::-webkit-datetime-edit,
.curriculum .has-value input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper { color: #163028; }
.curriculum input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.curriculum .field input:focus,
.curriculum .field textarea:focus,
.curriculum .field select:focus {
  outline: none;
  box-shadow: none;
}
.cur-control:focus-within {
  border-color: #0b5e4a;
  box-shadow: 0 0 0 3px rgba(11, 94, 74, 0.14);
}
.cur-add {
  width: 100%;
  border: 0;
  border-radius: 999px;
  min-height: 50px;
  margin-top: 4px;
  background: #0b5e4a;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.cur-add:hover { background: #094c3c; }
.cur-add:disabled { background: #8aa396; }
.cur-cancel {
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #0b5e4a;
  font-weight: 700;
  min-height: 44px;
}
.cur-upcoming-wrap { margin-bottom: 8px; }
.cur-upcoming {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 20px;
  padding: 12px 14px;
  background: #e7f6ee;
  color: #12241d;
  text-align: left;
}
.cur-upcoming-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cur-upcoming-copy small { color: #5d7a6e; font-size: 13px; font-weight: 500; }
.cur-upcoming .cur-chev {
  position: static;
  color: #3d6b5a;
  transition: transform 0.15s ease;
}
.cur-upcoming-wrap.open .cur-upcoming .cur-chev { transform: rotate(90deg); }
.cur-upcoming-wrap.open .cur-upcoming { border-radius: 20px 20px 0 0; }
.cur-list {
  list-style: none;
  margin: 0;
  padding: 4px 14px 14px;
  background: #f4fbf7;
  border-radius: 0 0 20px 20px;
}
.cur-list li { border-top: 1px solid #d7ebe2; padding: 12px 0 0; }
.cur-list li:first-child { border-top: 0; }
.cur-list p { margin: 4px 0; color: #163028; }
@media (min-width: 841px) {
  .curriculum-scroll { max-width: 560px; width: 100%; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cur-info.pulse { animation: none; }
  .cur-upcoming .cur-chev { transition: none; }
}

.settings-screen,
.session-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f7f6f3;
  color: #14241e;
}
.session-screen {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #efeae2;
}
.stage:has(.session-screen) {
  overflow: hidden;
  background: #efeae2;
}
.set-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0 4px;
  background: linear-gradient(180deg, #127a62 0%, #0b5e4a 70%);
  color: #fff;
}
.set-head h1 {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-nav {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
}
.set-nav svg { width: 22px; height: 22px; fill: currentColor; }
.settings-screen .settings-scroll { background: transparent; }
.set-div { border: 0; border-top: 1px solid #e3e6e3; margin: 6px 0 14px; }
.settings-screen .settings-block,
.ai-acc,
.session-row {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(16, 40, 32, 0.06);
}
.settings-screen h2,
.ai-acc-body h3,
.session-open strong {
  color: #14241e;
  font-weight: 700;
}
.settings-screen .hint,
.settings-screen .fine,
.ai-acc-copy small,
.session-open small,
.nav-copy small { color: #6d7b76; }
.settings-screen input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid #0b5e4a;
  background: #fff;
  margin: 0;
  flex: none;
}
.settings-screen input[type="checkbox"]:checked,
.session-screen input[type="checkbox"]:checked {
  background: #0b5e4a url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M6.2 11.6 2.9 8.3l1.2-1.2 2.1 2.1 4.7-4.7 1.2 1.2z'/></svg>") center / 14px 14px no-repeat;
  border-color: #0b5e4a;
}
.settings-screen .check { display: flex; align-items: center; gap: 10px; }
.settings-screen .field input,
.settings-screen .field textarea,
.settings-screen .field select,
.settings-screen .memory-list input,
.session-connect input,
.session-connect select,
.session-composer textarea {
  border: 1px solid #d9e3de;
  border-radius: 14px;
  background: #fff;
}
.set-add,
.mint-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 15px;
}
.set-add { background: #0b5e4a; color: #fff; }
.set-add.wide { width: 100%; margin-bottom: 12px; }
.mint-btn { background: #e5f6ee; color: #0b5e4a; }
.model-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.model-tools .check { margin: 0; }
.model-tools .mint-btn { min-height: 36px; }
.mint-btn.tiny { min-height: 36px; padding: 6px 12px; }
.mint-btn svg,
.nav-ico svg,
.ai-acc-chev svg,
.nav-chev svg { width: 18px; height: 18px; fill: currentColor; }
.nav-pill {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 0;
  border-radius: 18px;
  background: #e7f6ee;
  color: #143028;
  text-align: left;
}
.nav-pill.slim { margin-top: 8px; }
.nav-ico, .nav-chev, .ai-acc-chev {
  display: grid;
  place-items: center;
  color: #0b5e4a;
}
.nav-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nav-copy strong { font-weight: 700; }
.ai-acc { margin: 0 0 12px; overflow: hidden; }
.ai-acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 12px;
  text-align: left;
  color: inherit;
}
.ai-acc-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-acc-copy strong { font-size: 15px; font-weight: 700; }
.ai-acc-chev { transition: transform 0.15s ease; }
.ai-acc.open .ai-acc-chev { transform: rotate(-90deg); }
.live-strip .ai-acc-chev.open { transform: rotate(90deg); }
.ai-acc-body { display: none; padding: 0 12px 14px; flex-direction: column; gap: 8px; }
.ai-acc.open .ai-acc-body { display: flex; }
.ai-acc-body h3 { margin: 8px 0 0; font-size: 14px; }
.session-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; margin-bottom: 10px; }
.session-open { flex: 1; border: 0; background: transparent; text-align: left; padding: 8px 0; color: inherit; }
.session-open strong, .session-open small { display: block; }
.session-settings {
  flex: none;
  max-height: 46%;
  overflow: auto;
  background: #f7f6f3;
  border-bottom: 1px solid #e3e6e3;
}
.session-settings-title {
  margin: 12px 16px 0;
  color: #6d7b76;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.session-connect {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 12px;
}
.session-connect label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.session-connect form { display: flex; gap: 8px; }
.session-connect input, .session-connect select { flex: 1; min-height: 44px; padding: 8px 12px; }
.session-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 16px 8px;
  background: #efeae2;
}
.live-strip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  background: #e7f6ee;
  padding: 10px 12px;
  text-align: left;
  color: inherit;
}
.live-list { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.live-list li { background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 14px; }
.coach-msg { max-width: 88%; background: #fff; border-radius: 16px; padding: 10px 12px; margin: 0 0 10px; box-shadow: 0 4px 14px rgba(16, 40, 32, 0.05); }
.coach-msg p { margin: 0; white-space: pre-wrap; }
.coach-msg button { margin-top: 8px; border: 0; background: transparent; color: #0b5e4a; font-weight: 700; padding: 0; }
.coach-msg.mine { margin-left: auto; background: #0b5e4a; color: #fff; }
.coach-msg.mine button { color: #d9f3e6; }
.sent-note { margin: 0 0 10px; color: #3d6b5a; font-size: 13px; font-weight: 600; text-align: center; }
.pending-card { flex: none; margin: 0 16px 8px; background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 8px 20px rgba(16, 40, 32, 0.06); }
.pending-card p { margin: 6px 0; }
.pending-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.session-composer {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
  background: #efeae2;
}
.session-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.session-composer textarea { flex: 1; min-height: 44px; padding: 10px 12px; resize: none; }
.session-clip {
  width: 40px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #54656f;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
}
.session-clip svg { width: 22px; height: 22px; fill: currentColor; }
.session-keep { margin: 0; font-size: 13px; color: #3d4a45; }
.attach-row { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-chip, .attach-thumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: 14px;
  background: #fff;
  color: #14241e;
  text-decoration: none;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
}
.attach-chip img, .attach-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.attach-thumb { padding: 4px; }
.attach-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.attach-chip button {
  border: 0;
  background: transparent;
  color: #54656f;
  font-weight: 700;
  padding: 0 2px;
}
.coach-msg.mine .attach-chip, .coach-msg.mine .attach-thumb { background: rgba(255, 255, 255, 0.16); color: #fff; }
@media (max-width: 840px) {
  .session-screen {
    height: 100dvh;
    max-height: 100%;
  }
  html.keyboard-open .session-screen {
    height: 100%;
    max-height: 100%;
  }
  .session-composer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    background: #efeae2;
  }
  html.keyboard-open .session-composer {
    padding-bottom: 8px;
  }
}
@media (min-width: 841px) {
  .settings-screen .settings-scroll,
  .session-scroll { max-width: 640px; width: 100%; margin-left: auto; margin-right: auto; }
}
