:root {
  --paper: #f6f4ed;
  --ink: #182f28;
  --muted: #738078;
  --line: #dedfd4;
  --accent: #cb5e32;
  --white: #fffef8;
  --serif: Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #cf7e4b;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.application {
  max-width: 760px;
  margin: auto;
  padding: 0 28px calc(110px + env(safe-area-inset-bottom));
}
.masthead {
  height: 112px;
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--serif);
  font-size: 43px;
  font-weight: 700;
  letter-spacing: -2px;
}
.brand span {
  color: var(--accent);
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.4px;
}
.connection i {
  width: 6px;
  height: 6px;
  background: #4c7c5a;
  border-radius: 50%;
}
.connection.offline i {
  background: var(--accent);
}
.page-heading {
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.4px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 12px;
}
h1 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 0;
}
h2 {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.5;
  font-weight: 500;
  margin: 13px 0 8px;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: transparent;
  font-size: 23px;
  color: var(--ink);
}
.summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
  margin: 22px 0 26px;
}
.summary strong {
  font-family: var(--serif);
  font-size: 31px;
  color: var(--accent);
  font-weight: 400;
  margin-right: 4px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  gap: 8px;
}
.filters {
  display: flex;
  gap: 3px;
  background: #ebece3;
  padding: 3px;
  border-radius: 24px;
}
.filters button {
  padding: 8px 19px;
  border: none;
  background: transparent;
  border-radius: 22px;
  color: var(--muted);
  font-size: 12px;
}
.filters .selected {
  background: var(--ink);
  color: var(--white);
}
.text-button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  padding: 10px 0;
  min-height: 40px;
}
.text-button:hover {
  color: var(--accent);
}
.message-card {
  position: relative;
  display: flex;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  background: transparent;
  gap: 14px;
  color: var(--ink);
  animation: arrive 0.2s ease-out;
}
.message-card:hover {
  background: #eeeee5;
}
.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: #e6e8dc;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 21px;
  overflow: hidden;
  color: #5d6a53;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.message-main {
  min-width: 0;
  flex: 1;
}
.message-top {
  display: flex;
  align-items: center;
  gap: 7px;
}
.author {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-time {
  font-family: var(--sans);
  font-size: 10px;
  white-space: nowrap;
  color: var(--muted);
  margin-left: auto;
}
.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 6px;
}
.source {
  font-size: 10px;
  letter-spacing: 0.2px;
  color: var(--muted);
  margin: 6px 0 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview {
  font-size: 14px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.attachment-note {
  font-size: 10px;
  color: var(--accent);
  margin-top: 10px;
}
.read .preview {
  color: #758078;
}
.empty {
  padding: 65px 16px;
  text-align: center;
}
.empty-symbol {
  font-family: var(--serif);
  font-size: 49px;
  color: #acb5a4;
  display: block;
  margin-bottom: 15px;
}
.empty h2 {
  font-size: 22px;
}
.empty p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.load-more {
  display: block;
  width: 100%;
  padding: 22px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.back-link {
  display: block;
  border: 0;
  background: transparent;
  padding: 20px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  min-height: 44px;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 760px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #f6f4edf5;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 10;
}
.bottom-nav button {
  position: relative;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  min-height: 44px;
}
.bottom-nav button > span:first-child {
  font-size: 24px;
  font-weight: 400;
  line-height: 25px;
}
.bottom-nav .active {
  color: var(--ink);
  font-weight: 600;
}
.nav-badge {
  position: absolute;
  top: 0;
  left: calc(50% + 12px);
  font-size: 9px;
  border-radius: 20px;
  min-width: 16px;
  background: var(--accent);
  color: white;
  padding: 2px 4px;
}
.intro {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 18px 0 28px;
}
.person-card {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 20px;
  margin-bottom: 12px;
  border-radius: 3px;
  color: var(--ink);
}
.person-card .preview {
  font-size: 12px;
  color: var(--muted);
  -webkit-line-clamp: 1;
  margin-top: 6px;
}
.person-count {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--accent);
  margin-left: auto;
}
.person-count small {
  font-family: var(--sans);
  font-size: 9px;
  display: block;
  color: var(--muted);
  text-align: right;
}
.settings-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.card-number {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}
.settings-card p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.primary {
  background: var(--ink);
  color: var(--white);
  border: 0;
  padding: 16px 20px;
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  gap: 35px;
  align-items: center;
  border-radius: 3px;
  font-size: 13px;
}
.settings-card .primary {
  margin-top: 16px;
}
.status-note {
  color: var(--accent) !important;
  font-size: 12px !important;
}
.footnote {
  font-size: 10px !important;
  line-height: 1.9;
  color: var(--muted);
}
.logout {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  width: 100%;
  padding: 15px;
  margin-top: 28px;
  border-radius: 3px;
}
.detail-content {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.detail-author {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 4px 0 20px;
}
.detail-body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 30px 0;
  font-weight: 400;
}
.detail-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
.detail-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 3px;
  margin: 18px 0;
  background: #e9e9df;
}
.attachment-link {
  display: block;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.source-link {
  display: inline-flex;
  border: 1px solid var(--ink);
  font-size: 12px;
  padding: 14px 18px;
  border-radius: 3px;
  margin-top: 16px;
  gap: 30px;
}
.read-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
}
.error {
  font-size: 12px;
  line-height: 1.8;
  color: var(--accent);
}
.toast {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: 85vw;
  background: var(--ink);
  color: var(--white);
  padding: 13px 20px;
  font-size: 12px;
  border-radius: 3px;
  box-shadow: 0 5px 25px #182f2820;
  z-index: 30;
}
.login {
  max-width: 460px;
  margin: auto;
  padding: calc(48px + env(safe-area-inset-top)) 32px 40px;
}
.login .brand {
  font-size: 64px;
  display: block;
  margin-bottom: 50px;
}
.login h1 {
  font-size: 37px;
  line-height: 1.6;
  margin: 18px 0;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.login form {
  margin-top: 48px;
}
.login label {
  display: block;
  font-size: 11px;
  margin-bottom: 12px;
  color: var(--muted);
}
.login input {
  width: 100%;
  min-height: 51px;
  padding: 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 16px;
  color: var(--ink);
}
.login .primary {
  margin-top: 14px;
  width: 100%;
}
.login .footnote {
  margin-top: 36px;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 650px) {
  .application {
    padding-left: 48px;
    padding-right: 48px;
  }
  .masthead {
    height: 120px;
  }
  .page-heading {
    padding-top: 42px;
  }
  h1 {
    font-size: 38px;
  }
  .message-card {
    padding: 27px 0;
  }
  .preview {
    font-size: 15px;
  }
  .bottom-nav {
    padding-left: 100px;
    padding-right: 100px;
  }
  .settings-card {
    padding: 32px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 360px) {
  .application {
    padding-left: 19px;
    padding-right: 19px;
  }
  .filters button {
    padding: 8px 15px;
  }
  h1 {
    font-size: 28px;
  }
}
