:root {
  color-scheme: light;
  --ink: #1c2924;
  --muted: #62706a;
  --quiet: #62736b;
  --line: #e3ebe5;
  --soft: #f3f6f3;
  --canvas: #f6f8f6;
  --paper: #fff;
  --rail: #15362d;
  --green: #1c7255;
  --green-dark: #15583f;
  --mint: #e6f4ea;
  --danger: #a43838;
  --rail-size: 76px;
  --top-size: 62px;
  --details-size: 284px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); background: var(--canvas); }
body { font-size: 16px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #277e61; outline-offset: 3px;
}
button, input, textarea, summary { touch-action: manipulation; }
button svg, a svg { flex: 0 0 auto; }
[hidden] { display: none !important; }
.relative { position: relative; }
.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; }
.brand-symbol {
  display: grid; place-items: center; width: 41px; height: 41px; border-radius: 14px;
  color: #183f31; background: #b6e7bf; box-shadow: inset 0 1px 0 #e1f8e3;
}
.brand-small { width: 34px; height: 34px; border-radius: 11px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px;
  border: 0; border-radius: 9px; color: var(--quiet); background: transparent; padding: 0;
}
.icon-btn:hover:not(:disabled) { color: var(--green-dark); background: var(--soft); }
.icon-btn:disabled { opacity: .46; }
.button, .text-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: .875rem;
  line-height: 1.35; font-weight: 650; white-space: nowrap;
}
.button { min-height: 39px; padding: 8px 14px; border-radius: 9px; border: 1px solid transparent; }
.button.sm { min-height: 33px; padding: 6px 10px; }
.primary { color: white; background: var(--green); border-color: var(--green); }
.primary:hover:not(:disabled) { background: var(--green-dark); border-color: var(--green-dark); }
.primary:disabled { background: #e2eee6; color: #567465; border-color: #e2eee6; }
.secondary { color: var(--ink); border-color: var(--line); background: white; }
.secondary:hover:not(:disabled) { border-color: #b7cfbe; background: var(--soft); }
.secondary:disabled { opacity: .5; }
.danger { color: white; background: var(--danger); }
.danger:hover:not(:disabled) { background: #842626; }
.danger:disabled { opacity: .55; }
.danger-text { color: var(--danger); padding-inline: 5px; background: transparent; }
.danger-text:hover { background: #fff3f2; }
.text-button { padding: 3px 0; color: var(--green); background: none; border: 0; border-radius: 4px; }
.text-button:hover:not(:disabled) { color: var(--green-dark); text-decoration: underline; text-underline-offset: 4px; }
.text-button:disabled { opacity: .52; }
.neutral-tag {
  display: inline-flex; gap: 5px; align-items: center; flex: 0 0 auto; border-radius: 6px;
  background: #edf4ee; color: #476153; padding: 4px 8px; font-size: .8125rem; font-weight: 600;
}
.counter {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 20px; padding: 0 5px;
  background: #20815e; color: white; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.avatar {
  display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 31%;
  font-weight: 700; line-height: 1; background: #dcefe1; color: #266149; user-select: none;
}
.avatar-1 { background: #f5e8d9; color: #8d5c3d; }
.avatar-2 { background: #e2edf7; color: #42688e; }
.avatar-3 { background: #ebe6f7; color: #6b548e; }
.avatar-4 { background: #f7e4ea; color: #90516b; }
.avatar-5 { background: #e8edde; color: #576d45; }
.avatar-group.avatar-0 { background: #d4efdd; color: #24644d; }
.searchbox {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 40px; padding: 0 11px;
  background: #f3f6f3; color: var(--quiet); border: 1px solid #eef2ee; border-radius: 9px;
}
.searchbox:focus-within { border-color: #94b9a2; background: #fff; }
.searchbox input { width: 100%; min-width: 0; font-size: .875rem; border: 0; background: transparent; color: var(--ink); outline: none; }
.searchbox input::placeholder { color: #64736a; opacity: 1; }
.searchbox input:focus-visible { outline: none; }
.empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; min-height: 140px; padding: 28px 16px; text-align: center; color: var(--muted); font-size: .9375rem; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--mint); color: var(--green); }
.progress { height: 7px; border-radius: 10px; background: #dbe8de; overflow: hidden; }
.progress > span { display: block; height: 100%; background: #37946d; border-radius: inherit; transition: width 180ms ease; }

.desk {
  display: grid; grid-template: var(--top-size) minmax(0, 1fr) / var(--rail-size) minmax(0, 1fr);
  height: 100dvh; min-height: 360px; overflow: hidden; background: var(--paper);
}
.rail {
  grid-row: 1 / -1; display: flex; flex-direction: column; align-items: center;
  background: var(--rail); color: #d2e3d8; z-index: 4; padding: 13px 8px 17px;
}
.rail-logo { padding: 0; border: 0; background: transparent; border-radius: 14px; }
.rail-logo:focus-visible, .rail-item:focus-visible { outline-color: #b6e7bf; }
.rail-nav { display: grid; gap: 10px; margin-top: 37px; width: 100%; }
.rail-item {
  width: 100%; min-height: 61px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; border: 0; border-radius: 12px; padding: 7px 1px; background: transparent; color: #c1d9cb;
  font-size: .75rem; font-weight: 650;
}
.rail-item:hover, .rail-item.active { background: #295144; color: #e7faea; }
.rail-item.active .rail-item-icon { color: #bceec8; }
.rail-item-icon { position: relative; display: grid; place-items: center; }
.rail-item-icon i { position: absolute; top: -1px; right: -4px; background: #abdeb1; border: 2px solid #244c3e; height: 9px; width: 9px; border-radius: 20px; }
.rail-foot { margin-top: auto; padding-top: 9px; align-self: stretch; display: grid; place-items: center; }
.rail-foot .avatar { border: 2px solid #769e87; }
.desk-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0;
  padding: 0 23px; border-bottom: 1px solid var(--line); background: #fff; z-index: 5;
}
.top-title, .top-actions, .top-account, .top-quota, .sandbox-tag { display: flex; align-items: center; }
.top-title { min-width: 0; gap: 11px; white-space: nowrap; font-size: .875rem; color: var(--muted); }
.top-title strong { font-size: 1.025rem; font-weight: 800; letter-spacing: .045em; color: #23332c; }
.top-title svg { color: #93a398; }
.top-actions { gap: 13px; }
.sandbox-tag { color: #547060; background: #edf5ee; border: 1px solid #e6efe7; padding: 5px 9px; gap: 6px; border-radius: 7px; font-size: .8125rem; white-space: nowrap; }
.sandbox-tag:hover { background: #e5f1e7; }
.sandbox-tag > span { width: 6px; height: 6px; border-radius: 50%; background: #72a887; }
.top-quota { gap: 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; padding: 7px 9px; font-size: .8125rem; white-space: nowrap; }
.top-quota:hover { background: var(--soft); }
.top-quota svg, .top-quota strong { color: var(--green); }
.top-quota strong { font-size: .8125rem; font-variant-numeric: tabular-nums; }
.top-account { list-style: none; cursor: pointer; gap: 7px; font-size: .875rem; font-weight: 650; border-radius: 8px; padding: 3px 0 3px 4px; white-space: nowrap; }
.top-account > svg { color: var(--quiet); }
.dropdown { position: relative; }
.dropdown summary { list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown-content {
  position: absolute; z-index: 12; right: 0; min-width: 168px; background: white; padding: 5px; top: calc(100% + 8px);
  border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 14px 34px #23362a24;
}
.dropdown-content button, .dropdown-content a {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px;
  background: white; color: var(--ink); text-align: left; font-size: .875rem; white-space: nowrap;
}
.dropdown-content button:hover, .dropdown-content a:hover { background: #eff5ef; }
.dropdown-content svg { color: var(--green); }
.account-menu-name { display: flex; flex-direction: column; gap: 3px; padding: 7px 10px 9px; border-bottom: 1px solid var(--line); margin-bottom: 3px; font-size: .875rem; }
.account-menu-name small { color: var(--muted); font-size: .8125rem; }
.desk-content { position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.sync-error { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); z-index: 9; display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 8px; border: 1px solid #ead3cb; color: #8f4b39; background: #fff7f4; font-size: .875rem; }

.message-workspace { display: grid; grid-template-columns: minmax(257px, 300px) minmax(0, 1fr); height: 100%; min-width: 0; }
.message-workspace.with-details { grid-template-columns: minmax(257px, 300px) minmax(0, 1fr) var(--details-size); }
.inbox, .details, .chat-stage { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.inbox { border-right: 1px solid var(--line); }
.inbox-header { padding: 20px 16px 10px; }
.inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.inbox-heading h1 { font-size: 1.62rem; font-weight: 760; letter-spacing: -.035em; }
.add-btn { background: #edf6ef; color: var(--green); width: 34px; height: 34px; cursor: pointer; }
.add-btn:hover:not(:disabled) { background: #e2f0e5; }
.inbox-filters { display: flex; gap: 7px; align-items: center; margin-top: 15px; }
.inbox-filters button { display: flex; align-items: center; gap: 5px; padding: 6px 11px; min-height: 31px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: .875rem; font-weight: 650; }
.inbox-filters button:hover { background: var(--soft); }
.inbox-filters button[aria-pressed="true"] { background: #e8f4eb; color: #24654f; }
.inbox-filters button span { color: #426957; font-size: .75rem; padding: 1px 4px; background: #edf3ee; border-radius: 5px; }
.conversation-list { flex: 1; overflow: auto; scrollbar-width: thin; padding: 0 10px 10px; }
.conversation-item {
  display: flex; align-items: center; text-align: left; gap: 10px; width: 100%; min-height: 68px; border: 1px solid transparent;
  border-radius: 10px; padding: 8px 7px 8px 8px; background: white; color: var(--ink);
}
.conversation-item:hover { background: #f1f6f1; }
.conversation-item.current { background: #e8f4eb; border-color: #dbeee0; }
.conversation-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.conversation-title { color: #23362b; font-size: .9375rem; line-height: 1.25; font-weight: 710; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-preview { color: var(--muted); font-size: .8125rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-meta { align-self: stretch; display: flex; flex-direction: column; align-items: end; gap: 6px; padding-top: 4px; flex: 0 0 auto; }
.conversation-meta time { font-size: .75rem; white-space: nowrap; color: #697b70; font-variant-numeric: tabular-nums; }
.inbox-footer { width: 100%; display: flex; align-items: center; gap: 8px; background: #fbfcfb; color: var(--green); border: 0; border-top: 1px solid var(--line); padding: 13px 15px; text-align: left; font-size: .875rem; font-weight: 650; }
.inbox-footer:hover { background: var(--soft); }
.inbox-footer span { flex: 1; }

.chat-stage { background: var(--canvas); }
.stage-empty { justify-content: center; }
.chat-header { display: flex; align-items: center; gap: 11px; padding: 12px 21px; min-height: 70px; border-bottom: 1px solid var(--line); background: white; }
.chat-header-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.chat-header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.0625rem; line-height: 1.2; font-weight: 760; }
.chat-header-copy > span { color: var(--muted); font-size: .8125rem; }
.panel-button { border: 1px solid var(--line); background: var(--paper); }
.mobile-back { display: none; }
.chat-scroll { flex: 1; overflow: auto; scrollbar-width: thin; padding: 0 clamp(16px, 2.45vw, 36px) 25px; }
.loading-inline { color: var(--muted); padding: 28px 12px; text-align: center; font-size: .875rem; }
.history-links { display: flex; justify-content: center; gap: 13px; }
.history-links button { margin: 13px 0 0; }
.day-divider { display: flex; align-items: center; justify-content: center; margin: 18px 0 16px; font-size: .75rem; color: #6c7b72; font-weight: 600; }
.day-divider span { background: #edf2ee; padding: 4px 11px; border-radius: 18px; }
.message-row { display: flex; align-items: start; gap: 9px; margin: 0 0 15px; }
.message-row.mine { flex-direction: row-reverse; }
.message-row.message-consecutive { margin-top: -9px; }
.message-avatar { width: 34px; min-width: 34px; display: flex; align-items: start; }
.message-content { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(81%, 465px); }
.mine .message-content { align-items: flex-end; }
.message-byline { display: flex; align-items: center; gap: 7px; margin: 0 2px 6px; line-height: 1.22; font-size: .8125rem; }
.mine .message-byline { flex-direction: row-reverse; }
.message-byline strong { color: #43564a; font-weight: 680; }
.message-byline time { color: #738178; font-size: .75rem; }
.message-payload { display: flex; gap: 5px; align-items: center; min-width: 0; }
.message-payload-inner { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.mine .message-payload-inner { justify-items: end; }
.bubble {
  max-width: 100%; background: white; border: 1px solid #e7ede7; border-radius: 4px 12px 12px 12px;
  padding: 9px 12px; font-size: .9375rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.mine .bubble { background: #dcf2e3; border-color: #d4ecdc; border-radius: 12px 4px 12px 12px; }
.message-actions { opacity: .42; flex: 0 0 auto; width: 27px; height: 29px; }
.mine:hover .message-actions, .message-actions:focus-visible { opacity: 1; }
.message-image { display: block; width: min(246px, 100%); padding: 0; overflow: hidden; border: 1px solid #dfe9df; border-radius: 9px; background: #e7eee6; }
.message-image:hover { border-color: #72ab8a; }
.message-image img { display: block; width: 100%; aspect-ratio: 1.53; object-fit: cover; color: var(--muted); }
.recall-line { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0 13px; color: var(--muted); font-size: .8125rem; }
.composer-wrap { padding: 0 clamp(12px, 1.6vw, 24px) 16px; background: var(--canvas); }
.composer { position: relative; padding: 10px 10px 8px; border: 1px solid #dfe9e1; border-radius: 13px; background: white; box-shadow: 0 2px 6px #344c3708; }
.composer:focus-within { border-color: #a0c8ac; }
.composer-disabled { background: #f4f6f4; }
.composer textarea { display: block; width: 100%; min-height: 46px; max-height: 110px; background: transparent; border: 0; border-radius: 6px; outline: none; padding: 3px 6px; resize: vertical; font-size: .9375rem; line-height: 1.55; }
.composer textarea:focus-visible { outline: 0; }
.composer textarea::placeholder { color: #697b70; opacity: 1; }
.composer-tools, .tool-buttons, .send-tools { display: flex; align-items: center; gap: 6px; }
.composer-tools { margin-top: 2px; justify-content: space-between; }
.tool-buttons { gap: 2px; }
.tool-selected { color: var(--green-dark); background: var(--mint); }
.send-tools { gap: 11px; }
.enter-hint { color: #6c7b72; font-size: .75rem; }
.send-button { min-height: 34px; padding: 6px 11px 6px 13px; gap: 8px; }
.emoji-panel { display: grid; grid-template-columns: repeat(6, 31px); gap: 3px; z-index: 8; position: absolute; bottom: calc(100% + 8px); left: 0; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 27px #23362a1e; }
.emoji-panel button { border: 0; background: white; border-radius: 6px; width: 31px; height: 31px; padding: 0; font-size: 1.125rem; }
.emoji-panel button:hover { background: var(--soft); }
.file-preview { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 3px 5px; margin: 2px 0 5px 4px; background: #f2f6f2; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: .8125rem; }
.file-preview img { width: 29px; height: 29px; object-fit: cover; border-radius: 4px; }
.file-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview .icon-btn { width: 27px; height: 27px; }

.details { border-left: 1px solid var(--line); background: white; }
.without-details .details:not(.details-drawer) { display: none; }
.details-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 57px; padding: 0 15px 0 18px; }
.details-heading h2 { font-size: .9375rem; font-weight: 720; }
.details-scroll { min-height: 0; flex: 1; overflow: auto; scrollbar-width: thin; padding: 0 17px; }
.details-identity { display: flex; align-items: center; flex-direction: column; text-align: center; gap: 7px; padding: 8px 0 21px; }
.details-identity h3 { margin-top: 4px; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.details-identity > span:not(.avatar) { color: var(--muted); font-size: .8125rem; }
.detail-section { padding: 13px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 25px; gap: 8px; color: var(--ink); }
.section-heading h2 { font-size: 1.05rem; }
.section-heading h3 { display: flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 710; }
.section-heading h3 span { color: #78867d; font-size: .8125rem; font-weight: 590; font-variant-numeric: tabular-nums; }
.section-heading > svg { color: var(--quiet); }
.section-heading .text-button { font-size: .8125rem; }
.group-members { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.group-member { display: flex; align-items: center; min-height: 34px; gap: 7px; }
.group-member-name { min-width: 0; flex: 1; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: .875rem; line-height: 1.3; }
.group-member-name small { margin-left: 4px; color: #78867e; font-size: .75rem; }
.role-pill { color: #446958; padding: 3px 5px; border-radius: 5px; background: #eef4ed; font-size: .75rem; white-space: nowrap; }
.role-pill.owner { color: #236449; background: #e1f1e5; }
.member-action { width: 23px; height: 26px; flex: 0 0 auto; }
.mute-setting { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.setting-icon { display: inline-grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; background: #eaf3ec; color: var(--green); border-radius: 9px; }
.mute-setting > div { display: grid; flex: 1; min-width: 0; gap: 4px; padding-block: 1px; }
.mute-setting strong { font-size: .875rem; line-height: 1.1; }
.mute-setting small { color: var(--muted); font-size: .75rem; }
.setting-state { flex: 0 0 auto; color: var(--muted); font-size: .75rem; }
.switch { width: 37px; height: 22px; border: 0; border-radius: 16px; padding: 3px; background: #dbe5dd; flex: 0 0 auto; }
.switch > span { display: block; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #25493636; transition: transform 160ms ease; }
.switch[aria-checked="true"] { background: #26815d; }
.switch[aria-checked="true"] > span { transform: translateX(15px); }
.detail-images { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.detail-images button { width: 55px; height: 50px; border-radius: 7px; padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.detail-images img { width: 100%; height: 100%; object-fit: cover; }
.details-footer { padding: 12px 16px 16px; border-top: 1px solid #edf2ed; }
.small-quota { display: flex; flex-direction: column; align-items: start; gap: 10px; padding: 12px; border: 1px solid #deece1; border-radius: 12px; background: #f0f7f1; color: #355641; }
.small-quota-title { display: flex; width: 100%; align-items: center; gap: 6px; font-size: .875rem; }
.small-quota-title > span { margin-left: auto; font-size: .8125rem; font-weight: 650; }
.small-quota-title > svg { color: var(--green); }
.small-quota > .progress { width: 100%; height: 6px; }
.small-quota > button { font-size: .8125rem; }
.drawer-scrim { display: none; }

.work-page { height: 100%; overflow: auto; scrollbar-width: thin; background: var(--canvas); }
.page-inner { max-width: 1152px; margin: auto; padding: clamp(24px, 3.2vw, 44px) clamp(18px, 4vw, 51px) 42px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 23px; }
.page-heading h1 { font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 790; line-height: 1.3; letter-spacing: -.03em; }
.page-heading p { max-width: 55ch; color: var(--muted); line-height: 1.5; margin-top: 6px; font-size: .9375rem; }
.page-buttons, .inline-buttons { display: flex; align-items: center; gap: 8px; }
.surface { margin-bottom: 19px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.surface-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.surface-header .searchbox { max-width: 220px; }
.view-tabs { display: flex; gap: 5px; }
.view-tabs > button { display: inline-flex; gap: 6px; align-items: center; background: none; border: 0; border-radius: 8px; padding: 7px 10px; color: var(--muted); font-size: .875rem; font-weight: 650; white-space: nowrap; }
.view-tabs > button:hover { background: var(--soft); }
.view-tabs > button[aria-pressed="true"] { color: var(--green-dark); background: #e8f4eb; }
.contact-row, .record-row { display: flex; align-items: center; gap: 10px; padding: 11px 17px; border-bottom: 1px solid #edf1ed; }
.contact-row:last-child, .record-row:last-child { border-bottom: 0; }
.person-label { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; line-height: 1.3; text-align: left; }
.person-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 680; font-size: .9375rem; }
.person-label small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .8125rem; }
.broadcast-grid { display: grid; grid-template-columns: minmax(235px, .87fr) minmax(0, 1.2fr); gap: 15px; }
.broadcast-card { padding: 17px; display: flex; flex-direction: column; align-items: stretch; }
.broadcast-card .pick-list { max-height: 290px; }
.subheading { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.subheading h2 { font-size: 1rem; }
.broadcast-tools { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .8125rem; margin: 4px 0 10px; }
.broadcast-send { align-self: flex-end; margin-top: auto; }
.record-surface .section-heading { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.record-row > strong { font-size: .9375rem; white-space: nowrap; padding-inline: 4px; }
.record-surface .empty { min-height: 92px; }
.quota-overview { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 25px; border: 1px solid #d7ecdc; border-radius: 14px; background: #eaf6ed; }
.quota-overview-icon { display: grid; place-items: center; width: 57px; height: 57px; background: #d8eedf; border-radius: 15px; color: var(--green); flex: 0 0 auto; }
.quota-metric { display: grid; gap: 5px; }
.quota-metric > span, .quota-meter > div:first-child { font-size: .875rem; color: #4a6656; }
.quota-metric strong { font-size: 1.9rem; line-height: 1.2; color: #24543f; white-space: nowrap; }
.quota-metric small { color: #557961; font-size: 1rem; font-weight: 650; }
.quota-meter { margin-left: auto; width: min(285px, 35%); }
.quota-meter > div:first-child { display: flex; justify-content: space-between; gap: 5px; margin-bottom: 10px; }
.plans-heading { margin: 0 0 11px; }
.package-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 15px; margin-bottom: 16px; }
.package-banner .person-label { flex: 1 0 155px; }
.package-banner .person-label small { white-space: normal; }
.package-note { margin: 0 0 14px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.package-note-after { margin-top: -12px; margin-bottom: 20px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 23px; }
.plans-grid.with-top-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-card { padding: 17px; background: white; border: 1px solid var(--line); border-radius: 13px; min-width: 0; }
.plan-accent { border-color: #9dc9aa; background: #f7fcf8; }
.plan-title { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; flex-wrap: wrap; min-height: 33px; }
.plan-title h3 { font-size: .9375rem; font-weight: 730; white-space: nowrap; }
.plan-title > span { font-size: .75rem; font-weight: 650; color: #28614b; background: #e6f4ea; border-radius: 6px; padding: 4px 6px; white-space: nowrap; }
.plan-price { display: flex; gap: 2px; align-items: baseline; color: #203d2e; margin: 8px 0; }
.plan-price strong { font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -.035em; }
.plan-price span { font-size: 1rem; font-weight: 670; }
.plan-card p { color: var(--muted); font-size: .8125rem; margin: 0 0 16px; line-height: 1.5; }
.plan-card .button { width: 100%; }

.dialog { max-height: calc(100dvh - 40px); width: min(500px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: white; box-shadow: 0 18px 65px #16332738; }
.dialog-narrow { width: min(410px, calc(100% - 30px)); }
.dialog::backdrop { background: #112a2190; backdrop-filter: blur(2px); }
.dialog-inner { padding: 17px 19px 18px; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.dialog-header h2 { font-size: 1.15rem; font-weight: 760; overflow-wrap: anywhere; }
.dialog-description { color: var(--muted); font-size: .9375rem; line-height: 1.6; margin-bottom: 13px; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; }
.dialog-form, .auth-form { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: .875rem; font-weight: 650; color: #35493c; }
.field input, .field textarea { border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fbfcfb; color: var(--ink); padding: 9px 10px; font-weight: 400; font-size: .9375rem; }
.field input { min-height: 39px; }
.field textarea { resize: vertical; min-height: 95px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.form-message { display: flex; gap: 7px; align-items: center; margin: 6px 0 2px; padding: 8px 10px; border-radius: 7px; background: var(--soft); color: var(--muted); font-size: .875rem; line-height: 1.4; }
.form-message.bad { color: #8d3030; background: #fcefee; }
.form-message.good { color: var(--green-dark); background: var(--mint); }
.lookup { display: flex; align-items: center; gap: 8px; }
.lookup-result, .handle-card, .checkout-summary { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px; background: #f3f7f3; border: 1px solid var(--line); border-radius: 9px; }
.handle-card { font-size: .875rem; color: var(--muted); }
.handle-card strong { color: var(--green-dark); }
.people-picker { min-width: 0; }
.pick-meta { display: flex; justify-content: space-between; align-items: center; margin: 7px 0 5px; color: var(--muted); font-size: .8125rem; }
.pick-meta .text-button { font-size: .8125rem; }
.pick-list, .account-list { max-height: 260px; overflow: auto; scrollbar-width: thin; border: 1px solid var(--line); border-radius: 8px; }
.person-option, .account-choice { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid #edf1ed; min-height: 48px; }
.person-option { cursor: pointer; }
.account-choice { width: 100%; border: 0; border-bottom: 1px solid #edf1ed; background: white; color: var(--ink); }
.person-option:last-child, .account-choice:last-child { border-bottom: 0; }
.person-option:hover, .account-choice:hover:not(:disabled) { background: #f2f8f3; }
.person-option input { width: 16px; height: 16px; accent-color: var(--green); }
.pick-list .empty { min-height: 100px; }
.checkout-summary { margin: 0 0 13px; }
.checkout-summary > div { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.checkout-summary small { color: var(--muted); }
.checkout-summary b { color: var(--green-dark); font-size: 1.23rem; }
.checkout-qty { max-width: 130px; margin: 0 0 10px; }
.qr-panel { display: grid; place-items: center; gap: 7px; margin: 12px 0; color: var(--muted); font-size: .875rem; text-align: center; }
.qr-panel img { width: 186px; height: 186px; border: 1px solid var(--line); border-radius: 8px; }
.qr-panel span { display: inline-flex; align-items: center; gap: 5px; }
.lightbox-image { display: block; width: 100%; max-height: 68dvh; object-fit: contain; border-radius: 9px; background: var(--soft); }
.toast { z-index: 20; position: fixed; bottom: 23px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; width: max-content; max-width: calc(100% - 24px); padding: 6px 7px 6px 12px; border: 1px solid #35634b; border-radius: 9px; background: #193f32; color: white; box-shadow: 0 7px 26px #173a2b27; font-size: .875rem; }
.toast-error { background: #823838; border-color: #a65656; }
.toast .icon-btn { color: #f5f8f5; width: 27px; height: 27px; }
.toast .icon-btn:hover { background: #ffffff22; color: white; }
.welcome { min-height: 100dvh; display: grid; align-content: center; justify-items: center; padding: 74px 16px 24px; background: radial-gradient(ellipse at 30% 5%, #e0f0e4 0%, transparent 58%), #f5f8f5; }
.welcome-brand { display: flex; align-items: center; gap: 8px; position: absolute; top: 19px; left: 24px; letter-spacing: .05em; }
.welcome-card { width: min(100%, 410px); background: white; border: 1px solid #e2ebe2; border-radius: 16px; padding: 25px; box-shadow: 0 18px 44px #294f3614; }
.welcome-symbol { width: 57px; height: 57px; display: grid; place-items: center; border-radius: 17px; background: #e8f5eb; color: var(--green); margin-bottom: 13px; }
.welcome-card h1 { font-size: 1.45rem; margin-bottom: 16px; }
.welcome-card > .button { margin-top: 9px; }
.welcome-demo { margin-top: 13px; }
.auth-submit { margin-top: 4px; }
.auth-switch { align-self: center; }

@media (max-width: 1260px) {
  :root { --details-size: 258px; }
  .message-workspace, .message-workspace.with-details { grid-template-columns: 262px minmax(0, 1fr); }
  .message-workspace.with-details { grid-template-columns: 262px minmax(0, 1fr) var(--details-size); }
  .details-scroll { padding-inline: 14px; }
  .inbox-header { padding-inline: 13px; }
}
@media (max-width: 1110px) {
  .message-workspace.with-details { grid-template-columns: 262px minmax(0, 1fr); }
  .details:not(.details-drawer) { display: none; }
  .details-drawer { position: absolute; inset: 0 0 0 auto; width: min(313px, 90%); z-index: 8; box-shadow: -8px 0 32px #13392917; }
  .drawer-scrim { display: block; position: absolute; inset: 0; z-index: 7; background: #1c352b48; border: 0; }
}
@media (max-width: 750px) {
  :root { --top-size: 53px; }
  .desk { grid-template: var(--top-size) minmax(0, 1fr) 59px / minmax(0, 1fr); }
  .rail { grid-row: 3; grid-column: 1; flex-direction: row; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); }
  .rail-logo, .rail-foot { display: none; }
  .rail-nav { display: flex; justify-content: space-around; gap: 4px; margin: 0; }
  .rail-item { min-height: 47px; width: min(25%, 115px); padding: 3px 0; gap: 4px; border-radius: 8px; }
  .rail-item-icon svg { width: 18px; height: 18px; }
  .desk-top { grid-row: 1; padding-inline: 12px; gap: 6px; }
  .top-title, .top-actions { gap: 7px; }
  .top-title > span, .top-title > svg, .top-account > span:not(.avatar) { display: none; }
  .top-quota > span { display: none; }
  .desk-content { grid-row: 2; }
  .message-workspace, .message-workspace.with-details { grid-template-columns: minmax(0, 1fr); }
  .inbox { border: 0; }
  .message-workspace:not(.show-mobile-chat) > .chat-stage, .show-mobile-chat > .inbox { display: none; }
  .mobile-back { display: inline-flex; margin-left: -6px; }
  .chat-header { padding: 9px 12px; min-height: 58px; gap: 7px; }
  .chat-header > .avatar { width: 36px !important; height: 36px !important; font-size: .875rem !important; }
  .chat-header > .avatar svg { width: 18px; }
  .chat-header h2 { font-size: .975rem; }
  .chat-header-copy { gap: 3px; }
  .message-content { max-width: 84%; }
  .chat-scroll { padding-inline: 12px; }
  .composer-wrap { padding: 0 8px 8px; }
  .toast { bottom: 69px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .plans-grid, .plans-grid.with-top-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .broadcast-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .surface-header { align-items: stretch; flex-direction: column; }
  .surface-header .searchbox { max-width: none; }
  .plan-card { padding: 12px; }
  .quota-overview { flex-wrap: wrap; padding: 14px; }
  .quota-meter { width: 100%; }
  .record-row, .contact-row { padding-inline: 10px; gap: 7px; }
  .contact-row .button, .record-row .button { padding-inline: 7px; }
  .contact-row .button > svg { display: none; }
  .record-row { flex-wrap: wrap; }
  .record-row .person-label { flex-basis: 110px; }
  .enter-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; }
}

.desk { height: var(--app-height, 100dvh); }
.top-account { border: 0; background: transparent; color: var(--ink); }
.top-account:hover { background: var(--soft); }
.notice-trigger { position: relative; border: 1px solid var(--line); }
.notice-trigger i { width: 7px; height: 7px; border-radius: 50%; background: #22815d; position: absolute; top: 5px; right: 6px; border: 1px solid white; }
.menu-list { display: grid; gap: 8px; margin-top: 12px; }
.menu-list .button { justify-content: flex-start; }
.device-reminders { display: grid; align-items: start; justify-items: start; gap: 9px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.device-reminders p { color: var(--muted); line-height: 1.55; font-size: .9375rem; }
.emoji-panel button { font-family: system-ui, sans-serif; }
.inbox-footer { min-height: 43px; }

@media (max-width: 750px) {
  .desk { grid-template-rows: calc(var(--top-size) + env(safe-area-inset-top)) minmax(0, 1fr) calc(59px + env(safe-area-inset-bottom)); }
  .desk:not(.chat-open) .desk-top { padding-top: env(safe-area-inset-top); }
  .desk.chat-open { grid-template-rows: minmax(0, 1fr); }
  .desk.chat-open .desk-top, .desk.chat-open .rail { display: none; }
  .desk.chat-open .desk-content { grid-row: 1; }
  .rail { border-top: 1px solid var(--line); background: white; }
  .rail-item { color: #53675b; }
  .rail-item:hover, .rail-item.active { background: #e8f4eb; color: #236449; }
  .rail-item.active .rail-item-icon { color: #236449; }
  .rail-item-icon i { background: #22815d; border-color: white; }
  .rail-item:focus-visible { outline-color: #277e61; }
  .inbox-header { padding-top: 15px; }
  .inbox-heading h1 { font-size: 1.52rem; }
  .inbox-filters button { min-height: 40px; }
  .top-actions { gap: 6px; }
  .top-actions .icon-btn, .top-account, .add-btn { min-width: 42px; min-height: 42px; justify-content: center; }
  .top-quota, .sandbox-tag { min-height: 35px; }
  .chat-header { padding-top: calc(9px + env(safe-area-inset-top)); }
  .chat-header .icon-btn { width: 43px; height: 43px; }
  .chat-scroll { padding-bottom: 12px; }
  .composer-wrap { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .composer { padding-top: 7px; }
  .composer textarea { font-size: 1rem; resize: none; min-height: 44px; }
  .composer-tools .icon-btn, .send-button { min-height: 42px; }
  .composer-tools .icon-btn { min-width: 42px; }
  .message-actions { opacity: .8; }
  .searchbox input, .field input, .field textarea { font-size: 1rem; }
  .dialog { max-height: min(calc(var(--app-height, 100dvh) - 25px), 810px); }
  .dialog .button { min-height: 42px; }
  .dialog .icon-btn { min-height: 42px; min-width: 42px; }
  .details-drawer { padding-top: env(safe-area-inset-top); }
  .toast { bottom: calc(66px + env(safe-area-inset-bottom)); }
  body:has(.chat-open) .toast { bottom: calc(108px + env(safe-area-inset-bottom)); }
}

@media (max-width: 400px) {
  .desk-top { padding-inline: 9px; }
  .top-actions .top-account > svg { display: none; }
  .top-actions .notice-trigger { width: 38px; min-width: 38px; }
  .top-title strong { font-size: .95rem; }
  .plan-title h3 { font-size: .875rem; }
}

.auth-tabs {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px;
  padding: 4px; background: var(--soft); border-radius: 10px; margin-bottom: 15px;
}
.auth-tabs > button { justify-content: center; min-height: 36px; }
.auth-tabs > button[aria-pressed="true"] { background: white; box-shadow: 0 1px 3px #1836241a; }
.onboarding-invite {
  display: flex; align-items: center; gap: 9px; padding: 10px;
  background: #eaf5ed; border: 1px solid #dcece0; border-radius: 9px; margin: -2px 0 13px;
}
.onboarding-invite div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.onboarding-invite strong { font-size: .875rem; }
.onboarding-invite small, .field small { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.field span small { margin-left: 4px; }
.account-identity {
  display: flex; align-items: center; gap: 13px; padding: 16px; margin-bottom: 15px;
  border: 1px solid #d9eae0; background: #eaf5ed; border-radius: 14px;
}
.account-identity-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.account-identity-title h2 { font-size: 1.15rem; }
.account-identity-title p { color: var(--muted); margin-top: 4px; font-size: .875rem; }
.account-header-actions, .account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.account-grid:has(#account-invites[hidden]) { grid-template-columns: minmax(0, 1fr); }
.account-card { padding: 16px; }
.account-help { color: var(--muted); font-size: .9375rem; line-height: 1.6; margin-bottom: 10px; }
.account-edit { display: grid; gap: 10px; }
.account-actions { margin-top: 9px; }
.invite-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--green-dark); margin: 0 0 11px; }
.invite-summary span { font-size: .9rem; }
.invite-summary strong { font-size: 1.25rem; }
.invite-summary strong small { font-size: .875rem; font-weight: 600; }
.invite-registrations { margin-top: 14px; max-height: 264px; overflow: auto; }
.invite-registrations h3 { font-size: .9375rem; margin-bottom: 5px; }
.device-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.device-row time { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.security-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 7px; }
.download-card {
  display: flex; align-items: center; gap: 8px; width: min(270px, 100%); min-width: 0;
  padding: 8px; border: 1px solid #dce8df; border-radius: 10px; background: #fff; color: var(--green-dark);
}
.download-card:hover { border-color: #9ac0a6; background: #f5faf6; }
.download-card .person-label strong { color: var(--ink); }
.download-card > svg { flex: 0 0 auto; }
.detail-files { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.detail-files .download-card { width: 100%; }
.chat-management { display: grid; justify-items: start; gap: 3px; }
.file-preview .setting-icon { width: 28px; height: 28px; border-radius: 6px; }

.group-link-heading { display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere; }
.group-link-description { margin-top: 12px; }
.group-link-qr { margin: 14px 0; gap: 6px; }
.group-link-qr img { width: 180px; height: 180px; }
.group-link-actions, .group-link-settings, .join-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.group-link-settings { justify-content: space-between; margin-top: 6px; }
.group-link-confirm p { color: var(--muted); line-height: 1.5; font-size: .875rem; margin-top: 12px; }
.join-card .welcome-symbol { margin-bottom: 12px; }
.join-label { font-size: .875rem; color: var(--green-dark); font-weight: 680; margin-bottom: 5px; }
.join-card h1 { margin-bottom: 9px; overflow-wrap: anywhere; }
.join-meta, .join-current { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .875rem; }
.join-copy { color: var(--muted); line-height: 1.55; margin: 13px 0; font-size: .9375rem; }
.join-current { margin-bottom: 10px; }
.join-actions .primary { flex: 1; }
.join-actions .button { min-height: 44px; }

@media (max-width: 630px) {
  .account-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .account-identity { flex-wrap: wrap; gap: 9px; }
  .account-header-actions { flex-basis: 100%; }
  .account-header-actions .button { padding-inline: 8px; }
  .security-title h2 { line-height: 1.3; }
}
