:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --bg: #f4f1ea;
  --card: rgba(255, 255, 255, 0.78);
  --ink: #1e2926;
  --muted: #708079;
  --accent: #176b52;
  --accent-soft: #d9eee5;
  --user: #193f35;
  --line: rgba(30, 41, 38, 0.1);
  --shadow: 0 24px 60px rgba(36, 50, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

html,
body,
button,
a,
input,
textarea,
[role="button"] {
  touch-action: manipulation;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(245, 203, 133, 0.33), transparent 34%),
    radial-gradient(circle at 90% 12%, rgba(87, 159, 132, 0.25), transparent 28%), var(--bg);
  color: var(--ink);
  overflow: hidden;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: var(--app-viewport-height, 100dvh);
  max-width: 820px;
  margin: 0 auto;
  background: rgba(250, 249, 245, 0.66);
  backdrop-filter: blur(18px);
}

.app-shell.me-detail-open {
  grid-template-rows: minmax(0, 1fr);
}

.app-shell.me-detail-open .bottom-tabs {
  display: none;
}

@media (max-width: 720px) {
  html,
  body {
    overscroll-behavior: none;
  }

  .app-shell {
    position: fixed;
    top: var(--app-viewport-offset-top, 0px);
    right: 0;
    left: 0;
    width: 100%;
  }

  body.keyboard-open .bottom-tabs {
    display: none;
  }
}

.app-shell[hidden],
.auth-screen[hidden],
.admin-shell[hidden] {
  display: none;
}

.user-tab-panel {
  min-width: 0;
  min-height: 0;
}

.user-tab-panel[hidden] {
  display: none;
}

.agent-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.circle-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.placeholder-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.hub-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.me-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.auth-screen {
  display: grid;
  min-height: 100dvh;
  padding: 24px;
  place-items: center;
}

.auth-card {
  width: min(100%, 420px);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(250, 249, 245, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.auth-brand {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
  border-radius: 18px;
  background: var(--user);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 26px;
  place-items: center;
}

.auth-card h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
}

.auth-card > p {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form label,
.invite-form label {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 600;
}

.auth-form input,
.invite-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.auth-form input:focus,
.invite-form input:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.auth-form > button:not(.text-button),
.invite-form button {
  min-height: 46px;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.text-button {
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
}

.field-help {
  margin: -3px 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.auth-status {
  min-height: 20px;
  margin: 16px 0 0 !important;
  color: #9b413a !important;
}

.agent-unavailable-card {
  text-align: center;
}

.agent-unavailable-card .auth-brand {
  margin-right: auto;
  margin-left: auto;
}

.agent-unavailable-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-unavailable-actions button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(23, 107, 82, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}

.agent-unavailable-actions button:first-child {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.agent-unavailable-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.admin-shell {
  height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  overflow-y: auto;
  background: rgba(250, 249, 245, 0.78);
  backdrop-filter: blur(20px);
}

.admin-console-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: calc(14px + env(safe-area-inset-top)) 28px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(22px);
}

.admin-console-brand {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--user);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 22px;
  place-items: center;
  box-shadow: 0 10px 26px rgba(25, 63, 53, 0.18);
}

.admin-console-header h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
  font-weight: 600;
}

.admin-console-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-console-header > button {
  margin-left: auto;
}

.admin-console-main {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 28px 28px 60px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-metrics article {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 94px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 42px rgba(34, 55, 48, 0.08);
}

.admin-metrics strong {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 500;
}

.admin-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.admin-tabs {
  display: flex;
  gap: 5px;
  width: fit-content;
  margin: 26px 0 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.admin-tabs button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.admin-tabs button[data-active="true"] {
  background: var(--user);
  color: #fff;
  box-shadow: 0 7px 18px rgba(25, 63, 53, 0.16);
}

.admin-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 20px 54px rgba(34, 55, 48, 0.09);
}

.admin-panel[hidden] {
  display: none;
}

.admin-section-heading h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
  font-weight: 600;
}

.admin-section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-invite-form {
  max-width: 600px;
  margin-top: 20px;
}

.admin-management-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.admin-management-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-card-main {
  min-width: 0;
  flex: 1;
}

.admin-card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-card-title-row h3 {
  margin: 0 3px 0 0;
  font-size: 15px;
}

.admin-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(112, 128, 121, 0.1);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.admin-badge[data-tone="positive"] {
  background: rgba(46, 155, 112, 0.12);
  color: #237a59;
}

.admin-badge[data-tone="negative"] {
  background: rgba(180, 87, 78, 0.11);
  color: #9b413a;
}

.admin-card-email,
.admin-card-details {
  overflow-wrap: anywhere;
}

.admin-card-email {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 13px;
}

.admin-card-details {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.admin-card-actions button,
.admin-back-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(23, 107, 82, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.admin-card-actions .admin-danger-button {
  border-color: rgba(180, 87, 78, 0.22);
  color: #9b413a;
}

.admin-card-actions .admin-primary-button {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.admin-card-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.admin-agent-card {
  align-items: flex-start;
}

.admin-agent-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-agent-stats > span {
  display: grid;
  gap: 2px;
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(217, 238, 229, 0.38);
}

.admin-agent-stats strong {
  font-size: 12px;
}

.admin-agent-stats small {
  color: var(--muted);
  font-size: 9px;
}

.admin-empty {
  margin: 30px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.admin-back-button {
  margin-bottom: 14px;
}

.section-topbar {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.9);
  backdrop-filter: blur(20px);
}

.section-topbar h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
  font-weight: 600;
}

.section-topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar {
  z-index: 2;
  display: flex;
  align-items: center;
  position: relative;
  gap: 12px;
  min-height: 76px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.86);
  backdrop-filter: blur(20px);
}

.chat-menu-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  cursor: pointer;
  place-items: center;
}

.chat-menu-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.chat-menu-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.bottom-tabs {
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 68px;
  padding: 7px 16px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.94);
  backdrop-filter: blur(22px);
}

.bottom-tabs button {
  display: grid;
  position: relative;
  min-width: 0;
  padding: 4px 5px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  gap: 2px;
  place-items: center;
}

.bottom-tabs button[data-active="true"] {
  background: rgba(217, 238, 229, 0.7);
  color: var(--accent);
}

.bottom-tabs svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.placeholder-page-content {
  display: grid;
  min-height: 0;
  padding: 24px 18px;
  overflow-y: auto;
  place-items: center;
}

.coming-soon-card {
  width: min(100%, 480px);
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 44px rgba(36, 50, 45, 0.07);
  text-align: center;
}

.coming-soon-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  place-items: center;
}

.coming-soon-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.coming-soon-card h2 {
  margin: 0;
  font-size: 18px;
}

.coming-soon-card p {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.coming-soon-card small {
  display: block;
  margin-top: 14px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1.5;
}

.tab-icon-wrap {
  display: grid;
  position: relative;
  place-items: center;
}

.tab-unread-badge {
  display: grid;
  position: absolute;
  top: -7px;
  right: -11px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #faf9f5;
  border-radius: 999px;
  background: #d84f46;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  place-items: center;
}

.tab-unread-badge[hidden] {
  display: none;
}

.hub-topbar > div:first-of-type,
.hub-detail-heading {
  min-width: 0;
  flex: 1;
}

.hub-detail-heading h1,
.hub-detail-heading p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-topbar[data-friend-chat="true"] {
  position: relative;
  justify-content: center;
}

.hub-topbar[data-friend-chat="true"] .hub-detail-heading {
  display: grid;
  flex: 0 1 auto;
  padding: 0 56px;
  text-align: center;
  place-items: center;
}

.hub-topbar[data-friend-chat="true"] .hub-back-button,
.hub-topbar[data-friend-chat="true"] .friend-chat-menu-wrap {
  position: absolute;
}

.hub-topbar[data-friend-chat="true"] .hub-back-button {
  left: 18px;
}

.hub-topbar[data-friend-chat="true"] .friend-chat-menu-wrap {
  right: 18px;
}

.friend-chat-menu-wrap {
  z-index: 9;
}

.friend-chat-menu-trigger {
  width: 36px;
  padding: 0;
  font-size: 20px;
  letter-spacing: 0.08em;
}

.friend-chat-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 176px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(36, 50, 45, 0.17);
  gap: 2px;
}

.friend-chat-menu[hidden] {
  display: none;
}

.friend-chat-menu button {
  min-height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.friend-chat-menu button:hover,
.friend-chat-menu button:focus-visible {
  background: rgba(23, 107, 82, 0.07);
}

.friend-chat-menu button.danger {
  color: #9b413a;
}

.hub-header-action,
.hub-back-button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(23, 107, 82, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.hub-header-action.danger {
  border-color: rgba(180, 87, 78, 0.2);
  color: #9b413a;
}

.hub-back-button {
  display: grid;
  width: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 17px;
  place-items: center;
}

.hub-header-action:disabled,
.hub-back-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.hub-content {
  min-height: 0;
  overflow-y: auto;
}

.friends-home-content,
.messages-home-content,
.notification-detail-content {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 16px 18px 28px;
}

.hub-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 34px rgba(36, 50, 45, 0.055);
}

.hub-card + .hub-card {
  margin-top: 13px;
}

.hub-card-heading h2 {
  margin: 0;
  font-size: 15px;
}

.hub-card-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.hub-state {
  margin: 14px 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.hub-state[data-tone="error"] {
  color: #9b413a;
}

.add-friend-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 14px;
}

.add-friend-form label,
.add-friend-form .hub-form-status {
  grid-column: 1 / -1;
}

.add-friend-form label {
  font-size: 12px;
  font-weight: 700;
}

.add-friend-form input {
  min-width: 0;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.add-friend-form input:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.add-friend-form button,
.review-requests-button {
  min-height: 43px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.add-friend-form button:disabled {
  cursor: default;
  opacity: 0.55;
}

.hub-form-status {
  min-height: 17px;
  margin: 1px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.request-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.request-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.66);
}

.request-main {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.request-main strong {
  font-size: 12px;
}

.request-main span,
.request-main time {
  color: var(--muted);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.request-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.request-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.request-actions button.primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.request-actions button:disabled {
  cursor: default;
  opacity: 0.5;
}

.friend-list {
  display: grid;
  margin: 10px -5px -5px;
}

.friend-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 57px;
  padding: 8px 7px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.friend-list-item:last-child {
  border-bottom: 0;
}

.friend-list-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-avatar {
  display: grid;
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: #e9e2d5;
  color: #5d655f;
  font-family: Georgia, "Songti SC", serif;
  font-size: 16px;
  font-weight: 600;
  place-items: center;
}

.identity-avatar[data-kind="agent"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.identity-avatar[data-kind="circle"] {
  background: #e3e9f3;
  color: #426186;
}

.identity-avatar[data-kind="pending"] {
  background: #f5e6cc;
  color: #9a652b;
}

.identity-avatar-fallback {
  grid-area: 1 / 1;
}

.identity-avatar img {
  z-index: 1;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.messages-hub-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 34px rgba(36, 50, 45, 0.055);
}

.messages-hub-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--line);
}

.messages-hub-entry:last-child {
  border-bottom: 0;
}

.messages-hub-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 70px;
  padding: 11px 13px;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.messages-hub-hide {
  width: 44px;
  min-height: 44px;
  margin: auto 5px auto 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
}

.messages-hub-hide:hover,
.messages-hub-hide:focus-visible {
  background: rgba(23, 107, 82, 0.08);
  color: var(--accent);
}

.messages-hub-main,
.messages-hub-meta {
  display: grid;
  min-width: 0;
}

.messages-hub-main {
  gap: 5px;
}

.messages-hub-main strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-hub-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-hub-meta {
  justify-items: end;
  gap: 7px;
}

.messages-hub-meta time {
  color: var(--muted);
  font-size: 8px;
}

.unread-badge {
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d84f46;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  place-items: center;
}

.friend-chat-content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.friend-chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 24px;
}

.history-load-button {
  display: block;
  min-height: 38px;
  margin: 0 auto 16px;
  padding: 8px 16px;
  border: 1px solid rgba(23, 107, 82, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.history-load-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.friend-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 15px;
}

.friend-message[data-message-id] {
  -webkit-touch-callout: none;
  cursor: context-menu;
  user-select: none;
}

.friend-message.mine {
  flex-direction: row-reverse;
}

.friend-message .identity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 13px;
}

.friend-message-body {
  display: grid;
  max-width: min(76%, 520px);
  gap: 4px;
}

.friend-message.mine .friend-message-body {
  justify-items: end;
}

.friend-message-label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 3px;
  color: #315f52;
  font-size: 10px;
  font-weight: 800;
}

.former-member-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(112, 128, 121, 0.12);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.circle-v2-member-introduction {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.friend-message-bubble {
  min-width: 44px;
  padding: 9px 11px 7px;
  border: 1px solid var(--line);
  border-radius: 5px 17px 17px 17px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 18px rgba(36, 50, 45, 0.04);
}

.friend-message.mine .friend-message-bubble {
  border-color: rgba(25, 63, 53, 0.1);
  border-radius: 17px 5px 17px 17px;
  background: #95ec69;
}

.friend-message[data-sender-kind="agent"] .friend-message-bubble {
  border-color: rgba(23, 107, 82, 0.22);
  background: rgba(193, 224, 210, 0.96);
}

.friend-message[data-sender-kind="agent"].mine .friend-message-bubble {
  background: #b9dfc8;
}

.friend-message-bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.friend-message-bubble time {
  display: block;
  margin-top: 5px;
  color: rgba(30, 41, 38, 0.54);
  font-size: 8px;
  text-align: right;
}

.friend-message-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(64vw, 330px);
  margin-top: 2px;
}

.friend-message-gallery[data-count="1"] {
  grid-template-columns: 1fr;
  width: min(58vw, 280px);
}

.friend-message-gallery img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 9px;
  object-fit: cover;
}

.friend-message-gallery[data-count="1"] img {
  max-height: 330px;
  aspect-ratio: auto;
  object-fit: contain;
}

.friend-chat-composer {
  padding: 9px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.96);
  backdrop-filter: blur(18px);
}

.friend-identity-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.friend-agent-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 126px;
  min-height: 38px;
  padding: 3px 4px 3px 9px;
  border: 1px solid rgba(23, 107, 82, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 5px 16px rgba(36, 50, 45, 0.05);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.friend-agent-toggle::after {
  content: "";
  position: absolute;
  inset: -3px;
}

.friend-agent-toggle-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.friend-agent-toggle-copy strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  transition: color 160ms ease;
}

.friend-agent-toggle-copy strong[data-active="true"] {
  color: var(--accent);
}

.friend-agent-toggle-separator {
  color: rgba(112, 128, 121, 0.52);
  font-size: 10px;
}

.friend-agent-toggle-input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: #c8cfcc;
  cursor: pointer;
  transition: background 160ms ease;
}

.friend-agent-toggle-input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(30, 41, 38, 0.24);
  transition: transform 160ms ease;
}

.friend-agent-toggle-input:checked {
  background: var(--accent);
}

.friend-agent-toggle-input:checked::before {
  transform: translateX(14px);
}

.friend-agent-toggle-input:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 107, 82, 0.2);
}

.friend-agent-toggle-input:disabled {
  cursor: wait;
  opacity: 0.62;
}


.friend-agent-run-controls {
  display: flex;
  gap: 7px;
  margin-bottom: 8px;
  overflow-x: auto;
}

.friend-agent-run-controls button {
  min-height: 44px;
  padding: 0 12px;
  flex: 0 0 auto;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
}

.friend-agent-run-controls button.danger {
  border-color: rgba(155, 65, 58, 0.18);
  color: #9b413a;
}

.friend-image-previews {
  display: flex;
  gap: 7px;
  margin-bottom: 8px;
  overflow-x: auto;
}

.friend-image-previews[hidden] {
  display: none;
}

.friend-image-preview {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
}

.friend-image-preview img {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
}

.remove-preview-button {
  display: grid;
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 2px solid #faf9f5;
  border-radius: 50%;
  background: #32423d;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  place-items: center;
}

.friend-composer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
}

.friend-image-picker-wrap {
  position: relative;
  width: 38px;
  height: 38px;
}

.friend-image-picker {
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 23px;
  line-height: 1;
  place-items: center;
}

.friend-image-input {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.friend-image-picker[data-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.44;
}

.friend-image-picker-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 24;
  min-width: 118px;
  padding: 5px;
  border: 1px solid rgba(30, 41, 38, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(30, 41, 38, 0.14);
}

.friend-image-picker-menu[hidden] {
  display: none;
}

.friend-image-picker-menu-item {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.friend-image-picker-menu-item:active {
  background: rgba(23, 107, 82, 0.08);
}

.friend-composer-row textarea {
  width: 100%;
  min-height: 38px;
  max-height: 112px;
  padding: 9px 11px;
  resize: none;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.friend-composer-row textarea:focus {
  border-color: rgba(23, 107, 82, 0.42);
}

.friend-composer-row textarea:disabled {
  cursor: not-allowed;
  background: rgba(239, 241, 239, 0.88);
  color: var(--muted);
}

.friend-send-button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.friend-send-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.friend-composer-status {
  margin-top: 4px;
  text-align: right;
}

.notification-detail-content {
  display: grid;
  align-content: start;
  gap: 11px;
}

.review-requests-button {
  justify-self: start;
  min-height: 37px;
  border-radius: 999px;
}

.notification-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

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

.notification-item[data-read="false"] {
  background: rgba(217, 238, 229, 0.34);
}

.notification-main {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.notification-main strong {
  font-size: 12px;
  line-height: 1.45;
}

.notification-main time {
  color: var(--muted);
  font-size: 9px;
}

.notification-target {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.notification-target strong,
.notification-target time {
  grid-column: 1;
}

.notification-target::after {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--accent);
  content: "›";
  font-size: 16px;
}

.pending-circle-invite-list {
  display: grid;
  gap: 9px;
}

.pending-circle-invite {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.pending-circle-invite-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.pending-circle-invite-copy small {
  color: var(--muted);
  line-height: 1.4;
}

.pending-circle-invite-copy time {
  color: var(--muted);
  font-size: 9px;
}

.pending-action-card .pending-circle-invite-copy small {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.pending-circle-invite-actions {
  display: flex;
  gap: 7px;
}

.pending-circle-invite-actions button {
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.pending-circle-invite-actions button.primary {
  background: var(--accent);
  color: #fff;
}

.circle-v2-target-highlight {
  animation: circle-target-pulse 2.4s ease-out;
}

@keyframes circle-target-pulse {
  0%, 35% { box-shadow: 0 0 0 3px rgba(23, 107, 82, 0.28); }
  100% { box-shadow: 0 0 0 0 rgba(23, 107, 82, 0); }
}

.notification-item > button {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.notification-item > .notification-target {
  min-height: 44px;
  flex: 1;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.agent-heading {
  position: absolute;
  left: 50%;
  min-width: 0;
  max-width: 42%;
  transform: translateX(-50%);
}

.agent-heading h1 {
  overflow: hidden;
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 7px;
}

.history-button,
.stop-button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.circle-button {
  position: relative;
}

.circle-unread-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #b4574e;
}

.agent-unread-dot {
  position: absolute;
  top: -1px;
  right: -4px;
  width: 8px;
  height: 8px;
  border: 2px solid #faf9f5;
  border-radius: 50%;
  background: #b4574e;
}

.agent-unread-dot[hidden],
.circle-unread-dot[hidden] {
  display: none;
}

.history-button,
.chat-menu-button {
  border: 1px solid rgba(23, 107, 82, 0.22);
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent);
}

.history-button:disabled,
.chat-menu-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.chat-menu-wrap {
  position: relative;
}

.chat-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 7px);
  right: 0;
  width: 156px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(36, 50, 45, 0.17);
}

.chat-menu[hidden] {
  display: none;
}

.chat-menu button {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9b413a;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.chat-menu button:hover {
  background: rgba(180, 87, 78, 0.08);
}

.chat-menu button:disabled {
  cursor: default;
  opacity: 0.42;
}

.stop-button {
  border: 1px solid rgba(180, 87, 78, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: #9b413a;
}

.messages {
  overflow-y: auto;
  padding: 24px 18px 22px;
  scroll-behavior: smooth;
}

.agent-history-load-button {
  margin-top: -8px;
}

.message {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 18px;
  gap: 10px;
}

.message[data-message-id] .message-bubble {
  cursor: context-menu;
  -webkit-touch-callout: none;
}

.assistant-message {
  justify-content: flex-start;
}

.user-message {
  justify-content: flex-end;
}

.message-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 6px;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  place-items: center;
  user-select: none;
}

.agent-message-avatar {
  background: var(--user);
}

.user-message-avatar {
  background: #77847f;
}

.message-bubble {
  position: relative;
  width: fit-content;
  max-width: min(72%, 540px);
  padding: 10px 13px;
  border: 1px solid rgba(0, 0, 0, 0.035);
  border-radius: 5px;
  background: #fff;
  color: #181818;
}

.assistant-message .message-bubble::before,
.user-message .message-bubble::before {
  position: absolute;
  top: 13px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  content: "";
}

.assistant-message .message-bubble::before {
  left: -12px;
  border-right-color: #fff;
}

.user-message .message-bubble {
  background: #95ec69;
}

.user-message .message-bubble::before {
  right: -12px;
  border-left-color: #95ec69;
}

.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.55;
}

.proactive-message .message-bubble {
  min-width: min(72%, 340px);
  border-color: rgba(23, 107, 82, 0.12);
  background: #fbfdfb;
}

.proactive-message .message-bubble::before {
  border-right-color: #fbfdfb;
}

.proactive-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 650;
  gap: 12px;
}

.proactive-message-header time {
  color: var(--muted);
  font-weight: 500;
}

.proactive-share-draft {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(23, 107, 82, 0.14);
  border-radius: 10px;
  background: rgba(217, 238, 229, 0.28);
}

.proactive-share-draft label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.proactive-share-draft textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.proactive-share-draft textarea:focus {
  border-color: rgba(23, 107, 82, 0.55);
  box-shadow: 0 0 0 3px rgba(23, 107, 82, 0.08);
}

.proactive-share-draft p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.proactive-share-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.proactive-share-draft-actions button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(23, 107, 82, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.proactive-share-draft-actions button:last-child {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

@media (max-width: 480px) {
  .proactive-message .message-bubble {
    width: calc(100vw - 92px);
    max-width: calc(100vw - 92px);
  }

  .proactive-share-draft-actions button {
    flex: 1 1 auto;
  }
}

.retry-button {
  margin-top: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(23, 107, 82, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
}

.thinking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 34px;
  min-height: 25px;
}

.thinking-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s infinite ease-in-out;
}

.thinking-indicator span:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-indicator span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pulse {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.composer {
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.9);
  backdrop-filter: blur(20px);
}

.composer textarea {
  min-height: 48px;
  max-height: 150px;
  width: 100%;
  resize: none;
  overflow-y: auto;
  padding: 13px 16px;
  border: 1px solid rgba(30, 41, 38, 0.13);
  border-radius: 20px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  line-height: 1.45;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.agent-image-button {
  display: grid;
  width: 44px;
  height: 48px;
  border: 1px solid rgba(23, 107, 82, 0.18);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  cursor: pointer;
  place-items: center;
}

.agent-image-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.agent-image-button[data-disabled="true"] {
  cursor: default;
  opacity: 0.45;
  pointer-events: none;
}

.agent-image-previews,
.agent-composer-status {
  grid-column: 1 / -1;
}

.agent-image-previews,
.feedback-image-previews,
.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-image-previews[hidden],
.feedback-image-previews[hidden] {
  display: none;
}

.image-preview-item,
.message-attachment {
  position: relative;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eceae4;
}

.image-preview-item img,
.message-attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item button {
  display: grid;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 27, 25, 0.78);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  place-items: center;
}

.message-attachments {
  margin-bottom: 7px;
}

.message-attachment {
  width: min(180px, 46vw);
  height: min(180px, 46vw);
}

.agent-composer-status {
  min-height: 0;
  margin: 0 3px -4px;
  color: #9b413a;
  font-size: 10px;
}

.composer textarea:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.composer textarea:disabled {
  opacity: 0.7;
}

.send-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 107, 82, 0.22);
  transition: transform 120ms ease, opacity 120ms ease;
}

.send-button:active {
  transform: scale(0.96);
}

.send-button:disabled {
  cursor: default;
  opacity: 0.4;
  box-shadow: none;
}

.send-button svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.session-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(22, 32, 29, 0.14);
  backdrop-filter: blur(1px);
}

.message-action-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgba(22, 32, 29, 0.22);
  backdrop-filter: blur(1px);
}

.message-action-sheet {
  position: fixed;
  z-index: 31;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  width: min(calc(100% - 24px), 440px);
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(250, 249, 245, 0.98);
  box-shadow: 0 22px 60px rgba(24, 39, 34, 0.22);
  gap: 6px;
}

.message-action-sheet p {
  margin: 5px 8px 1px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.message-action-sheet button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.message-action-sheet .message-delete-button {
  color: #9b413a;
}

.message-action-sheet button:disabled {
  cursor: default;
  opacity: 0.55;
}

.admin-inspector {
  position: fixed;
  z-index: 21;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(94vw, 620px);
  height: 100dvh;
  padding-top: env(safe-area-inset-top);
  border-left: 1px solid rgba(30, 41, 38, 0.1);
  background: rgba(250, 249, 245, 0.98);
  box-shadow: -24px 0 70px rgba(34, 55, 48, 0.18);
}

.session-overlay[hidden],
.admin-inspector[hidden],
.message-action-overlay[hidden],
.message-action-sheet[hidden] {
  display: none;
}

.admin-inspector-body {
  overflow-y: auto;
  padding: 20px;
}

.invite-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.invite-form button {
  min-height: 42px;
  margin: 0;
  padding: 0 15px;
}

.invite-result {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-conversation-list {
  display: grid;
  gap: 8px;
}

.admin-conversation-item {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.admin-conversation-item strong,
.admin-conversation-item span {
  display: block;
}

.admin-conversation-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-messages {
  display: grid;
  gap: 10px;
}

.admin-message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.admin-message[data-role="user"] {
  border-color: rgba(23, 107, 82, 0.2);
  background: rgba(217, 238, 229, 0.48);
}

.admin-message::before {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  content: attr(data-label);
  font-size: 10px;
  font-weight: 700;
}

.circle-drawer {
  width: min(94vw, 480px);
}

.circle-page-header {
  align-items: center;
}

.circle-page .circle-content {
  width: min(100%, 760px);
  min-height: 0;
  margin: 0 auto;
}

.circle-drawer-header {
  align-items: center;
}

.circle-heading {
  min-width: 0;
  flex: 1;
}

.circle-heading h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
  font-weight: 600;
}

.circle-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.circle-back-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  cursor: pointer;
  font-size: 18px;
}

.circle-back-button[hidden] {
  display: none;
}

.circle-content {
  overflow-y: auto;
  padding: 16px;
}

.circle-content[data-view="chat"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0;
}

.circle-setup-card,
.circle-overview,
.circle-section {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.circle-setup-card + .circle-setup-card,
.circle-section {
  margin-top: 12px;
}

.circle-section-heading h3 {
  margin: 0;
  font-size: 14px;
}

.circle-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.circle-setup-card input {
  width: 100%;
  min-height: 43px;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.circle-setup-card input:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.circle-setup-card > button,
.circle-invite-row button {
  min-height: 39px;
  margin-top: 9px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.circle-setup-card button:disabled,
.circle-invite-row button:disabled {
  cursor: default;
  opacity: 0.55;
}

.circle-form-status {
  min-height: 16px;
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.circle-invite-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.circle-join-code {
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.circle-contact-list,
.circle-thread-list {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.circle-contact {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.circle-contact:disabled {
  cursor: default;
  opacity: 0.55;
}

.circle-contact-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: Georgia, serif;
  place-items: center;
}

.circle-contact-avatar[data-kind="user"] {
  background: var(--user);
  color: #fff;
}

.circle-contact > span:last-child,
.circle-contact strong,
.circle-contact small {
  display: block;
}

.circle-contact strong {
  font-size: 13px;
}

.circle-contact small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.circle-thread-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.circle-thread-item strong {
  font-size: 13px;
}

.circle-thread-item span {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-thread-item small {
  color: var(--muted);
  font-size: 9px;
}

.circle-messages {
  overflow-y: auto;
  padding: 18px 15px;
}

.circle-message {
  width: fit-content;
  max-width: 84%;
  margin-bottom: 13px;
  padding: 10px 12px;
  border-radius: 16px;
}

.circle-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.circle-message time {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  opacity: 0.62;
}

.circle-message-mine {
  margin-left: auto;
  border-radius: 16px 16px 5px 16px;
  background: var(--user);
  color: #fff;
}

.circle-message-peer {
  margin-right: auto;
  border: 1px solid var(--line);
  border-radius: 5px 16px 16px 16px;
  background: rgba(255, 255, 255, 0.78);
}

.circle-message-label {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.circle-composer {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.94);
}

.circle-composer textarea {
  width: 100%;
  min-height: 60px;
  max-height: 130px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  line-height: 1.45;
}

.circle-composer button {
  min-height: 37px;
  margin-top: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.circle-composer button:disabled,
.circle-composer textarea:disabled {
  cursor: default;
  opacity: 0.55;
}

.me-content {
  display: grid;
  width: min(100%, 740px);
  margin: 0 auto;
  padding: 18px 18px 28px;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 28px;
}

.me-topbar {
  position: relative;
  justify-content: center;
}

.me-topbar-heading {
  min-width: 0;
  text-align: center;
}

.me-topbar-heading p {
  max-width: 340px;
}

.me-back-button {
  display: grid;
  position: absolute;
  left: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}

.me-back-button[hidden] {
  display: none;
}

.me-back-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.me-home {
  display: grid;
  gap: 16px;
}

.me-entry-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 34px rgba(36, 50, 45, 0.055);
}

.me-entry-group > h2 {
  margin: 0;
  padding: 10px 16px 8px;
  background: rgba(244, 241, 234, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.me-entry {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  gap: 13px;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.me-entry:last-child {
  border-bottom: 0;
}

.me-entry:active {
  background: rgba(30, 41, 38, 0.045);
}

.me-entry-profile {
  min-height: 78px;
}

.me-entry-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 13px;
  font-size: 18px;
}

.me-entry .me-agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.me-entry .me-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.me-entry-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}

.me-entry-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-entry-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-entry-danger strong {
  color: #9b413a;
}

.me-entry-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-right: 3px;
  border-top: 1.5px solid rgba(30, 41, 38, 0.36);
  border-right: 1.5px solid rgba(30, 41, 38, 0.36);
  transform: rotate(45deg);
}

.me-detail-view {
  align-self: start;
}

.me-detail-view[hidden],
.me-home[hidden] {
  display: none;
}

.me-profile-card,
.me-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 34px rgba(36, 50, 45, 0.06);
}

.me-profile-card,
.me-profile-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.me-profile-card {
  padding: 17px;
}

.me-profile-card-inner {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.me-profile-avatar,
.me-agent-avatar {
  display: grid;
  flex: 0 0 auto;
  background: var(--user);
  color: #fff;
  font-family: Georgia, serif;
  place-items: center;
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.me-profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 19px;
  font-size: 21px;
}

.me-profile-main {
  min-width: 0;
}

.me-profile-main h2,
.me-section-heading h2 {
  margin: 0;
  font-size: 16px;
}

.me-profile-main p {
  margin: 5px 0 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 12px;
}

.me-inline-meta {
  color: var(--muted);
  font-size: 10px;
}

.me-section {
  padding: 17px;
}

.me-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.agent-summary-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.me-agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  font-size: 19px;
}

.agent-settings-form {
  display: grid;
  gap: 13px;
  padding-top: 16px;
}

.agent-settings-form h3,
.me-settings-form h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.me-settings-form {
  display: grid;
  gap: 13px;
  padding-top: 16px;
}

.me-settings-form + .me-settings-form,
.agent-settings-form + .me-settings-form,
.me-settings-form + .agent-settings-form {
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.me-settings-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.me-settings-form input:not([type="checkbox"]):not([type="file"]),
.me-settings-form textarea,
.me-settings-form select {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.45;
}

.me-settings-form textarea {
  resize: vertical;
}

.me-settings-form input:focus,
.me-settings-form textarea:focus,
.me-settings-form select:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.image-upload-field input[type="file"] {
  width: 100%;
  padding: 9px;
  border: 1px dashed rgba(23, 107, 82, 0.3);
  border-radius: 13px;
  background: rgba(217, 238, 229, 0.22);
  color: var(--muted);
  font-weight: 400;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.friend-qr-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(23, 107, 82, 0.15);
  border-radius: 17px;
  background: rgba(217, 238, 229, 0.22);
}

.friend-qr-card[hidden] {
  display: none;
}

.friend-qr-copy h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.friend-qr-copy p,
.friend-qr-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.friend-qr-copy strong {
  display: block;
  margin-top: 9px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.friend-qr-image-wrap {
  display: grid;
  place-items: center;
}

.friend-qr-image-wrap img {
  width: 132px;
  height: 132px;
  border-radius: 11px;
  background: #fff;
}

.friend-qr-status {
  color: #9b413a;
  text-align: center;
}

.copy-field button,
.me-form-actions button {
  min-height: 41px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.copy-field button {
  border: 1px solid rgba(23, 107, 82, 0.2);
  background: #fff;
  color: var(--accent);
}

.me-form-actions {
  display: flex;
  justify-content: flex-end;
}

.me-form-actions button:disabled {
  cursor: default;
  opacity: 0.5;
}

.switch-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 45px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.switch-row > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.switch-row strong {
  font-size: 12px;
}

.switch-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.45;
}

.switch-row input[type="checkbox"] {
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.switch-row-warning strong {
  color: #9b413a;
}

.notification-category-settings {
  display: grid;
  padding-left: 12px;
  border-left: 2px solid rgba(23, 107, 82, 0.12);
}

.feedback-image-previews {
  margin-top: -3px;
}

.agent-settings-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.agent-settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 10px;
}

.agent-settings-form input,
.agent-settings-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.45;
}

.agent-settings-form input:focus,
.agent-settings-form textarea:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.agent-settings-form textarea {
  resize: vertical;
}

.agent-advanced-settings {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(244, 241, 234, 0.55);
}

.agent-advanced-settings summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.agent-advanced-settings[open] {
  display: grid;
  gap: 12px;
}

.agent-settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.agent-settings-actions button,
.me-logout-button {
  min-height: 39px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.agent-settings-actions .secondary-button {
  border: 1px solid rgba(23, 107, 82, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
}

.agent-settings-actions button:disabled {
  cursor: default;
  opacity: 0.5;
}

.me-form-status {
  min-height: 17px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.memory-center .memory-content {
  overflow: visible;
  padding: 15px 0 0;
}

.language-settings-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: 16px;
  margin-top: 15px;
}

.language-settings-control label {
  font-size: 12px;
  font-weight: 600;
}

.language-settings-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.language-settings-control select:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.language-settings-section .me-form-status {
  margin-top: 8px;
}

.account-settings-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.me-logout-button {
  flex: 0 0 auto;
  border: 1px solid rgba(180, 87, 78, 0.25);
  background: rgba(255, 255, 255, 0.8);
  color: #9b413a;
}

.memory-content {
  overflow-y: auto;
  padding: 16px;
}

.memory-form {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.memory-form label {
  font-size: 13px;
  font-weight: 600;
}

.memory-form textarea,
.memory-toolbar input {
  width: 100%;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.memory-form textarea {
  min-height: 82px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.5;
}

.memory-form textarea:focus,
.memory-toolbar input:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.memory-form-actions,
.memory-toolbar,
.memory-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.memory-form-actions {
  justify-content: space-between;
}

.memory-form-actions span,
.memory-status,
.memory-item-meta {
  color: var(--muted);
  font-size: 11px;
}

.memory-form-actions button,
.memory-export-button,
.memory-clear-button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.memory-toolbar {
  margin: 14px 0 8px;
}

.memory-toolbar input {
  min-height: 40px;
  flex: 1;
  padding: 0 12px;
}

.memory-export-button {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  border: 1px solid rgba(23, 107, 82, 0.22);
}

.memory-clear-button {
  border: 1px solid rgba(180, 87, 78, 0.22);
  background: rgba(255, 255, 255, 0.82);
  color: #9b413a;
}

.memory-clear-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.memory-status {
  min-height: 16px;
  margin: 4px 2px 10px;
}

.memory-list {
  display: grid;
  gap: 9px;
}

.memory-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
}

.memory-item-content {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.55;
}

.memory-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.memory-item-actions button {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
}

.memory-item-actions .danger-button {
  color: #9b413a;
}

.memory-empty {
  margin: 30px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.readonly-memory-list .memory-item-footer {
  justify-content: flex-start;
}

.session-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 18px 12px;
}

.session-drawer-header h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 600;
}

.session-drawer-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.drawer-close-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0 0 3px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.session-list-state {
  margin: 24px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

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

/* Circle v2 keeps posts and tasks in one private, mobile-first feed. */
.circle-v2-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.circle-v2-header-button,
.circle-v2-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(23, 107, 82, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
  place-items: center;
}

.circle-v2-more-button {
  padding-bottom: 7px;
  font-size: 15px;
  letter-spacing: 1px;
}

.circle-content[data-view^="circle-v2"] {
  padding: 16px 18px 30px;
}

.circle-v2-home-section,
.circle-v2-feed,
.circle-v2-intro {
  display: grid;
  gap: 11px;
}

.circle-v2-history-load {
  margin-top: 16px;
}

.notifications-history-load {
  margin-top: 16px;
}

.circle-v2-home-section + .circle-v2-home-section {
  margin-top: 20px;
}

.circle-v2-home-section > h2,
.circle-v2-section-title h2 {
  margin: 0 3px 2px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 16px;
  font-weight: 600;
}

.circle-v2-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.circle-v2-section-title span {
  color: var(--muted);
  font-size: 10px;
}

.circle-v2-list-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(36, 50, 45, 0.055);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.circle-v2-list-icon {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: linear-gradient(145deg, #dceee6, #f2ead8);
  color: var(--accent);
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  place-items: center;
}

.circle-v2-list-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.circle-v2-list-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-v2-list-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-v2-chevron {
  color: #9aa69f;
  font-size: 24px;
}

.circle-v2-invite-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(204, 145, 57, 0.22);
  border-radius: 17px;
  background: rgba(255, 247, 230, 0.78);
}

.circle-v2-invite-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.circle-v2-invite-copy strong {
  font-size: 12px;
}

.circle-v2-invite-copy small {
  color: var(--muted);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.circle-v2-empty-card {
  display: grid;
  justify-items: center;
  padding: 34px 22px;
  border: 1px dashed rgba(23, 107, 82, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.circle-v2-empty-card h3 {
  margin: 12px 0 6px;
  font-size: 15px;
}

.circle-v2-empty-card p {
  max-width: 380px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.circle-v2-empty-card button,
.circle-v2-primary-button,
.circle-v2-settings-section > button:not(.text-button),
.circle-v2-invite-picker button,
.circle-v2-task-actions button,
.circle-v2-inline-actions button:not(.text-button) {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.circle-v2-empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 25px;
  place-items: center;
}

.circle-v2-intro {
  margin: 0 2px 14px;
}

.circle-v2-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.circle-v2-post {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 30px rgba(36, 50, 45, 0.05);
}

.circle-v2-post-head,
.circle-v2-post-author {
  display: flex;
  align-items: center;
}

.circle-v2-post-head {
  position: relative;
  gap: 10px;
}

.circle-v2-post-author {
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.circle-v2-post-author-line {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
}

.circle-v2-post-author strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-v2-post-author time {
  color: var(--muted);
  font-size: 9px;
}

.circle-v2-post-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 7px;
  color: var(--muted);
  font-size: 9px;
}

.circle-v2-post-time time {
  color: inherit;
  font-size: inherit;
}

.circle-v2-avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 14px;
}

.circle-v2-type-chip,
.circle-v2-pin-chip,
.circle-v2-task-status {
  display: inline-flex;
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef1ed;
  color: #66736d;
  font-size: 9px;
  font-weight: 700;
}

.circle-v2-type-chip,
.circle-v2-pin-chip {
  flex: 0 0 auto;
}

.circle-v2-pin-chip {
  background: var(--accent-soft);
  color: var(--accent);
}

.circle-v2-post-menu {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
}

.circle-v2-post-menu-trigger {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  list-style: none;
  place-items: center;
  touch-action: manipulation;
}

.circle-v2-post-menu-trigger::-webkit-details-marker {
  display: none;
}

.circle-v2-post-menu[open] .circle-v2-post-menu-trigger {
  background: rgba(231, 235, 230, 0.9);
  color: var(--text);
}

.circle-v2-post-menu-list {
  display: grid;
  position: absolute;
  z-index: 4;
  top: calc(100% + 5px);
  right: 0;
  min-width: 132px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 13px 36px rgba(34, 47, 42, 0.17);
}

.circle-v2-post-menu-list button {
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
  text-align: left;
  touch-action: manipulation;
}

.circle-v2-post-menu-list button:hover,
.circle-v2-post-menu-list button:focus-visible {
  background: rgba(236, 240, 235, 0.9);
  outline: none;
}

.circle-v2-post-menu-list .circle-v2-danger-text {
  color: #a84343;
}

.circle-v2-post-content {
  margin: 13px 1px 2px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.62;
}

.circle-v2-post.is-deleted {
  box-shadow: none;
}

.circle-v2-deleted-placeholder {
  margin: 13px 1px 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

.circle-v2-post-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 14px;
}

.circle-v2-post-images.count-1 {
  grid-template-columns: 1fr;
}

.circle-v2-post-images img {
  width: 100%;
  height: 180px;
  background: #e8e7e2;
  object-fit: cover;
}

.circle-v2-post-images.count-1 img {
  height: auto;
  max-height: 460px;
  object-fit: contain;
}

.circle-v2-post-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.circle-v2-agent-limit {
  display: flex;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(23, 107, 82, 0.14);
  border-radius: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(228, 242, 236, 0.58);
}

.circle-v2-agent-limit > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.circle-v2-agent-limit strong {
  color: #2d413a;
  font-size: 10px;
}

.circle-v2-agent-limit small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.circle-v2-agent-limit button {
  min-width: 82px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(23, 107, 82, 0.2);
  border-radius: 10px;
  flex: 0 0 auto;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  touch-action: manipulation;
}

.circle-v2-comment-button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.circle-v2-task-body {
  display: grid;
  gap: 9px;
  margin-top: 13px;
  padding: 14px;
  border-radius: 15px;
  background: rgba(236, 243, 239, 0.78);
}

.circle-v2-task-body h3,
.circle-v2-task-body p {
  margin: 0;
}

.circle-v2-task-body h3 {
  font-size: 15px;
}

.circle-v2-task-body p {
  color: #4e5d57;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.circle-v2-task-status.status-in_progress {
  background: #fff1d6;
  color: #9a652b;
}

.circle-v2-task-status.status-completed {
  background: var(--accent-soft);
  color: var(--accent);
}

.circle-v2-task-status.status-cancelled {
  background: #eee;
  color: #777;
}

.circle-v2-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 9px;
}

.circle-v2-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.circle-v2-inline-actions button,
.circle-v2-task-actions button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 9px;
}

.circle-v2-inline-actions .secondary-button,
.circle-v2-task-actions .secondary-button,
.circle-v2-compose-choices .secondary-button {
  border: 1px solid rgba(23, 107, 82, 0.18);
  background: #fff;
  color: var(--accent);
}

.circle-v2-comments {
  display: grid;
  gap: 9px;
  margin: 8px -3px -4px;
  padding: 11px 4px 0;
  border-top: 1px solid var(--line);
}

.circle-v2-comment {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.circle-v2-comment .circle-v2-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 11px;
}

.circle-v2-comment-copy {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(237, 239, 234, 0.8);
}

.circle-v2-comment-copy p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.5;
}

.circle-v2-reply-target {
  display: grid;
  margin-bottom: 7px;
  padding: 6px 8px;
  border-left: 2px solid rgba(23, 107, 82, 0.32);
  border-radius: 0 7px 7px 0;
  gap: 2px;
  background: rgba(255, 255, 255, 0.56);
}

.circle-v2-reply-target strong,
.circle-v2-reply-target span {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-v2-reply-target strong {
  color: var(--accent);
}

.circle-v2-reply-target span {
  color: var(--muted);
}

.circle-v2-comment-copy small,
.circle-v2-comments-empty {
  color: var(--muted);
  font-size: 8px;
}

.circle-v2-comment-meta {
  display: flex;
  min-height: 20px;
  margin-top: 3px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.circle-v2-comment-actions {
  display: flex;
  align-items: center;
}

.circle-v2-comment-action {
  min-width: 42px;
  min-height: 28px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 8px;
  touch-action: manipulation;
}

.circle-v2-comment-delete {
  color: #9c5151;
}

.circle-v2-comment.is-deleted .circle-v2-comment-copy {
  background: rgba(237, 239, 234, 0.45);
}

.circle-v2-deleted-comment {
  color: var(--muted);
  font-style: italic;
}

.circle-v2-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.circle-v2-replying {
  display: flex;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 9px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
}

.circle-v2-comment-form .circle-v2-reply-cancel {
  min-width: 54px;
  min-height: 28px;
  padding: 0 7px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.circle-v2-comment-form textarea {
  min-height: 36px;
  padding: 8px 10px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  font-size: 11px;
}

.circle-v2-comment-form button {
  min-width: 54px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.circle-v2-sheet-overlay {
  display: grid;
  position: fixed;
  z-index: 120;
  top: var(--app-viewport-offset-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  height: var(--app-viewport-height, 100dvh);
  align-items: end;
  padding: 16px;
  background: rgba(24, 31, 28, 0.36);
  backdrop-filter: blur(3px);
}

.circle-v2-draft-circle-list {
  display: grid;
  gap: 9px;
  padding: 4px 0 12px;
}

.circle-v2-draft-circle-list .circle-v2-list-card {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  justify-content: flex-start;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.circle-v2-sheet {
  width: min(100%, 620px);
  max-height: min(88dvh, 820px);
  margin: 0 auto;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 24px;
  background: #f8f7f2;
  box-shadow: 0 28px 80px rgba(27, 42, 36, 0.25);
}

.circle-v2-sheet-header {
  display: flex;
  position: sticky;
  z-index: 2;
  top: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px 11px;
  background: rgba(248, 247, 242, 0.94);
  backdrop-filter: blur(16px);
}

.circle-v2-sheet-header h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
}

.circle-v2-icon-button {
  width: auto;
  min-width: 52px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.circle-v2-form,
.circle-v2-settings {
  display: grid;
  gap: 14px;
  padding: 11px 17px 22px;
}

.circle-v2-field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.circle-v2-field input,
.circle-v2-field textarea,
.circle-v2-field select,
.circle-v2-invite-picker select {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  resize: vertical;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
}

.circle-v2-field small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.45;
}

.circle-v2-field input:focus,
.circle-v2-field textarea:focus,
.circle-v2-field select:focus {
  border-color: rgba(23, 107, 82, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 82, 0.08);
}

.circle-v2-form-status {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.circle-v2-publish-identity {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.circle-v2-publish-identity legend {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.circle-v2-publish-identity-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.circle-v2-publish-identity-option {
  display: flex;
  min-width: 0;
  min-height: 50px;
  padding: 7px 9px;
  border: 1px solid rgba(30, 41, 38, 0.14);
  border-radius: 14px;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.circle-v2-publish-identity-option.selected {
  border-color: rgba(23, 107, 82, 0.48);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(23, 107, 82, 0.07);
}

.circle-v2-publish-identity-option:focus-visible {
  outline: 3px solid rgba(23, 107, 82, 0.18);
  outline-offset: 1px;
}

.circle-v2-publish-identity-option:disabled {
  cursor: wait;
  opacity: 0.62;
}

.circle-v2-publish-identity-option .circle-v2-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 12px;
}

.circle-v2-publish-identity-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.circle-v2-publish-identity-copy strong,
.circle-v2-publish-identity-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-v2-publish-identity-copy strong {
  font-size: 11px;
}

.circle-v2-publish-identity-copy small {
  color: var(--muted);
  font-size: 8px;
}

.circle-v2-compose-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 6px 17px 0;
}

.circle-v2-compose-choices button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.circle-v2-image-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.circle-v2-image-preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #e9e7df;
}

.circle-v2-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.circle-v2-image-preview button {
  display: grid;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 25px;
  height: 25px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  background: rgba(19, 26, 23, 0.74);
  color: #fff;
  place-items: center;
}

.circle-v2-settings-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.64);
}

.circle-v2-settings-section h3,
.circle-v2-settings-note {
  margin: 0;
}

.circle-v2-settings-section h3 {
  font-size: 13px;
}

.circle-v2-settings-note {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.circle-v2-switch-row {
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.circle-v2-switch-row + .circle-v2-switch-row {
  border-top: 1px solid var(--line);
}

.circle-v2-invite-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.circle-v2-invite-picker .circle-v2-form-status,
.circle-v2-invite-picker .circle-v2-settings-note {
  grid-column: 1 / -1;
}

.circle-v2-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.circle-v2-member-row:first-of-type {
  border-top: 0;
}

.circle-v2-member-identity {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
}

.circle-v2-member-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.circle-v2-member-identity strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-v2-member-identity small {
  color: var(--muted);
  font-size: 8px;
}

.circle-v2-member-actions {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.circle-v2-member-actions button,
.circle-v2-danger-text {
  min-height: 26px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 9px;
}

.circle-v2-member-actions .circle-v2-danger-text,
.circle-v2-danger-text {
  color: #9b413a;
}

.circle-v2-danger-button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: #9b413a;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.circle-v2-warning {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f7e6e3;
  color: #7f3731;
  font-size: 10px;
  line-height: 1.55;
}

.circle-v2-toast {
  position: fixed;
  z-index: 150;
  right: 18px;
  bottom: 104px;
  left: 18px;
  width: fit-content;
  max-width: min(500px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 11px 14px;
  border-radius: 13px;
  background: #1e3d34;
  box-shadow: 0 15px 45px rgba(19, 35, 29, 0.22);
  color: #fff;
  font-size: 10px;
  line-height: 1.45;
}

.circle-v2-toast.danger {
  background: #823c36;
}

.circle-v2-state p {
  margin: 0 0 10px;
}

.circle-v2-state button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--accent);
  font-size: 10px;
}

.circle-v2-sheet button:disabled,
.circle-v2-post button:disabled {
  cursor: default;
  opacity: 0.5;
}

@media (min-width: 821px) {
  body {
    padding: 22px 0;
  }

  .app-shell {
    height: calc(100dvh - 44px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(34, 55, 48, 0.16);
    overflow: hidden;
  }

  .admin-shell {
    height: calc(100dvh - 44px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(34, 55, 48, 0.16);
  }
}

@media (max-width: 720px) {
  .admin-console-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .admin-console-header h1 {
    font-size: 18px;
  }

  .admin-console-main {
    padding: 18px 14px 42px;
  }

  .admin-metrics {
    gap: 8px;
  }

  .admin-metrics article {
    display: grid;
    gap: 2px;
    min-height: 80px;
    padding: 14px;
  }

  .admin-metrics strong {
    font-size: 26px;
  }

  .admin-panel {
    padding: 18px 14px;
  }

  .admin-management-card {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .admin-card-actions {
    flex-wrap: wrap;
  }

  .admin-card-actions button {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .section-topbar {
    min-height: 68px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .section-topbar h1,
  .circle-heading h1 {
    font-size: 19px;
  }

  .friends-home-content,
  .messages-home-content,
  .notification-detail-content {
    padding: 12px 11px 22px;
  }

  .hub-card,
  .messages-hub-list {
    border-radius: 17px;
  }

  .request-item {
    align-items: stretch;
    flex-direction: column;
  }

  .request-actions {
    justify-content: flex-end;
  }

  .friend-chat-messages {
    padding-right: 11px;
    padding-left: 11px;
  }

  .friend-message-body {
    max-width: 78%;
  }

  .messages-hub-item {
    min-height: 66px;
    padding-right: 7px;
  }

  .messages-hub-hide {
    width: 44px;
    margin-right: 2px;
  }

  .pending-circle-invite {
    align-items: stretch;
    flex-direction: column;
  }

  .pending-circle-invite-actions button {
    flex: 1;
  }

  .friend-identity-controls {
    align-items: center;
    flex-wrap: wrap;
  }

  .friend-agent-toggle {
    flex: 0 0 auto;
  }

  .topbar {
    gap: 9px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .chat-menu-button {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .agent-heading h1 {
    font-size: 16px;
  }

  .history-button,
  .stop-button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }

  .me-content {
    width: 100%;
    padding: 12px 0 22px;
  }

  .me-home {
    gap: 10px;
  }

  .me-entry-group {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .me-entry-group > h2 {
    padding-right: 18px;
    padding-left: 18px;
  }

  .me-entry {
    min-height: 62px;
    padding-right: 17px;
    padding-left: 18px;
  }

  .me-entry-profile {
    min-height: 76px;
  }

  .me-detail-view {
    margin: 0 12px;
  }

  .friend-qr-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 11px;
    padding: 12px;
  }

  .friend-qr-image-wrap img {
    width: 112px;
    height: 112px;
  }

  .me-section,
  .me-profile-card {
    border-radius: 18px;
  }

  .agent-settings-grid {
    grid-template-columns: 1fr;
  }

  .agent-settings-actions,
  .account-settings-section {
    align-items: stretch;
    flex-direction: column;
  }

  .language-settings-control {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .agent-settings-actions button,
  .me-logout-button {
    width: 100%;
  }

  .memory-form-actions {
    align-items: flex-end;
  }

  .admin-console-brand {
    width: 38px;
    height: 38px;
  }

  .admin-console-header p {
    display: none;
  }

  .admin-console-header > button {
    min-height: 34px;
    padding: 0 9px;
  }

  .admin-tabs {
    width: 100%;
  }

  .admin-tabs button {
    flex: 1;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .circle-content[data-view^="circle-v2"] {
    padding: 12px 11px 24px;
  }

  .circle-v2-sheet-overlay {
    padding: 0;
  }

  .circle-v2-sheet {
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
  }

  .circle-v2-post {
    padding: 13px;
    border-radius: 18px;
  }

  .circle-v2-post-head {
    gap: 8px;
  }

  .circle-v2-post-menu-trigger {
    width: 40px;
    height: 40px;
  }

  .circle-v2-post-menu-list {
    min-width: 144px;
  }

  .circle-v2-post-menu-list button {
    min-height: 44px;
    font-size: 11px;
  }

  .circle-v2-comment-action,
  .circle-v2-agent-limit button,
  .circle-v2-task-actions button,
  .circle-v2-settings-section > button {
    min-width: 44px;
    min-height: 44px;
  }

  .circle-v2-agent-limit {
    align-items: stretch;
    flex-direction: column;
  }

  .circle-v2-post-images img {
    height: 145px;
  }

  .circle-v2-invite-card {
    align-items: stretch;
    flex-direction: column;
  }

  .circle-v2-member-row {
    align-items: flex-start;
  }

}
