:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --surface: #fff;
  --ink: #17171b;
  --mid: #67676e;
  --hint: #74747c;
  --line: #d9d9df;
  --blue: #135db1;
  --wash: #e7eef9;
  --bad: #b63835;
  --soft: #e7e7ec;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
}
:root[data-appearance='dark'] {
  color-scheme: dark;
  --bg: #101012;
  --surface: #1e1e21;
  --ink: #f3f3f5;
  --mid: #bebec5;
  --hint: #a5a5ae;
  --line: #3c3c41;
  --blue: #8dbcff;
  --wash: #1d304b;
  --bad: #ff8c87;
  --soft: #2c2c32;
}
:root[data-appearance='light'] {
  color-scheme: light;
}
:root[data-text-size='large'] {
  --reading-size: 1.2rem;
}
:root[data-text-size='larger'] {
  --reading-size: 1.45rem;
}
:root[data-text-size] :is(.tx-text, .composeText, .pn-preview pre) {
  font-size: var(--reading-size, 1rem);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
a {
  color: var(--blue);
}
[hidden] {
  display: none !important;
}
#shell {
  margin: auto;
  max-width: 760px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
}
#screen {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 18px max(24px, env(safe-area-inset-bottom));
  scrollbar-width: thin;
}
#bar {
  min-height: 54px;
  padding: 3px 10px;
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  z-index: 1;
}
#bar h1 {
  font-size: 17px;
  font-weight: 650;
  text-align: center;
  margin: 0;
  max-width: 50vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#bar #back {
  justify-self: start;
}
#actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}
.ic,
#back {
  width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  border-radius: 50%;
}
.ic svg,
#back svg {
  width: 22px;
  height: 22px;
}
.ic:hover,
#back:hover {
  background: var(--soft);
}
.login {
  max-width: 416px;
  margin: clamp(22px, 8vh, 100px) auto 0;
  padding: 0 6px;
}
.loginIntro {
  text-align: center;
  padding-bottom: 30px;
}
.linkmark {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
}
.linkmark svg {
  width: 34px;
  height: 34px;
  transform: rotate(-38deg);
}
.login h1 {
  font-size: 28px;
  letter-spacing: -0.045em;
  margin: 14px 0 6px;
}
.loginIntro p,
.muted {
  color: var(--mid);
  margin: 0;
}
.login label,
.fieldLabel {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 7px;
}
.input,
.search,
.composeText {
  width: 100%;
  border: 0;
  border-radius: 15px;
  background: var(--surface);
  padding: 14px 16px;
  min-height: 50px;
  line-height: 1.4;
}
.login input {
  margin-bottom: 10px;
}
.address {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--mid);
  overflow-wrap: anywhere;
  margin: 0 2px 11px;
}
.address svg {
  flex: none;
}
.solid {
  color: var(--surface);
  background: var(--ink);
  border-radius: 100px;
  font-weight: 650;
  padding: 12px 24px;
  min-height: 46px;
}
.wide {
  width: 100%;
  margin-top: 12px;
}
.help {
  font-size: 14px;
  line-height: 1.6;
  color: var(--mid);
  margin: 20px 3px;
}
.help summary {
  cursor: pointer;
  min-height: 42px;
  line-height: 42px;
}
.help p {
  margin: 0;
}
.error {
  color: var(--bad);
  min-height: 1.4em;
  font-size: 14px;
}
.groupbox {
  overflow: hidden;
  background: var(--surface);
  border-radius: 17px;
  margin: 12px 0 22px;
}
.row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: start;
  padding: 12px 14px;
  min-height: 56px;
}
.row + .row {
  border-top: 1px solid var(--line);
}
.rowText {
  flex: 1;
  min-width: 0;
}
.rowText b,
.rowText small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rowText small {
  margin-top: 4px;
  font-size: 13px;
  color: var(--mid);
}
.row > svg:last-child {
  color: var(--mid);
  width: 15px;
}
.avatar {
  width: 42px;
  height: 42px;
  flex: none;
  display: inline-grid;
  place-items: center;
}
.avatar i {
  width: 100%;
  height: 100%;
  display: block;
  mask: var(--shape) center/contain no-repeat;
  -webkit-mask: var(--shape) center/contain no-repeat;
  background: var(--avatar-color);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.pageTitle {
  font-size: 30px;
  letter-spacing: -0.045em;
  margin: 10px 2px 18px;
}
.searchWrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--mid);
}
.search {
  background: transparent;
  min-height: 42px;
  padding: 7px 0;
  outline-offset: 0;
}
.searchWrap svg {
  width: 18px;
}
.empty {
  color: var(--mid);
  line-height: 1.6;
  text-align: center;
  margin: 30px 10px;
}
.alertbox {
  padding: 16px;
  color: var(--bad);
}
#dock {
  flex: none;
  padding: 8px 12px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.composeText {
  resize: none;
  min-height: 44px;
  max-height: 130px;
  padding: 11px 13px;
  background: var(--bg);
  border-radius: 21px;
}
.send {
  background: var(--ink);
  color: var(--surface);
}
.send:hover {
  background: var(--mid);
}
.attachList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.attachList button {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
  background: var(--wash);
  color: var(--blue);
  border-radius: 9px;
  padding: 6px 10px;
  margin: 3px 0 7px;
}
.tabs {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.tab {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--mid);
  min-width: 72px;
  font-size: 12px;
  min-height: 42px;
}
.tab svg {
  width: 21px;
  height: 21px;
}
.tab[aria-current] {
  color: var(--blue);
  font-weight: 650;
}
#notice {
  position: fixed;
  bottom: max(92px, calc(72px + env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: var(--ink);
  color: var(--surface);
  max-width: min(92vw, 560px);
  width: max-content;
  padding: 11px 17px;
  border-radius: 13px;
  box-shadow: 0 4px 24px #0002;
}
.choice {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}
.formgroup {
  max-width: 540px;
  margin: 12px auto;
}
.retry {
  padding: 10px 14px;
  color: var(--blue);
  min-height: 44px;
}
.found {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  border-radius: 8px;
}
#screen[data-page='chat'] {
  background: var(--surface);
  padding-top: 7px;
}
.callbar {
  border-radius: 12px;
  background: var(--wash);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--blue);
  font-size: 14px;
}
.callbar button {
  min-height: 40px;
  color: var(--bad);
}
@media (min-width: 761px) {
  #shell {
    border-inline: 1px solid var(--line);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .row:active,
  .solid:active {
    opacity: 0.75;
  }
}
.accountRow {
  display: flex;
  align-items: center;
  gap: 4px;
}
.accountRow + .accountRow {
  border-top: 1px solid var(--line);
}
.accountRow > .row {
  flex: 1;
  min-width: 0;
}
.accountRow > .ic {
  margin-right: 8px;
}
