:root {
  --bg: #ededed;
  --panel: #ffffff;
  --panel-soft: #f7f7f7;
  --line: #e9e9e9;
  --text: #111111;
  --muted: #8a8a8a;
  --green: #07c160;
  --green-dark: #07c160;
  --red: #fa5151;
  --blue: #3b82f6;
  --wechat-bg: #ededed;
  --wechat-top: rgba(247, 247, 247, 0.98);
  --shadow: 0 8px 22px rgba(17, 17, 17, 0.05);
  --keyboard-inset: 0px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: var(--wechat-bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html {
  height: -webkit-fill-available;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  overscroll-behavior-x: none;
}

button,
input,
textarea {
  font: inherit;
}

input,
textarea {
  outline: none;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.app-shell {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 430px;
  max-width: min(430px, 100vw);
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  margin: 0 auto;
  background: var(--wechat-bg);
  overflow: hidden;
  font-size: 16px;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 100%;
  padding: 10px 14px 10px;
  background: var(--wechat-top);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-shell.is-detail .topbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 25;
  width: 100%;
  max-width: 430px;
  min-width: 0;
  transform: translateX(-50%);
}

.app-shell.is-login .topbar,
.app-shell:not(.is-login):not(.is-detail) .topbar {
  display: none;
}

.topbar__back,
.topbar__action {
  flex: 0 0 44px;
  height: 42px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
}

.topbar__back {
  font-size: 28px;
}

.topbar__back[hidden] {
  display: block;
  visibility: hidden;
}

.topbar__center {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar__eyebrow {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
}

.topbar__title {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.topbar__action {
  flex-basis: 58px;
  min-width: 58px;
  padding: 0 8px;
  font-size: 14px;
}

.page {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overscroll-behavior-x: none;
  padding: 16px 12px 104px;
}

.app-shell:not(.is-login):not(.is-detail) .page {
  padding-top: 16px;
}

.app-shell.is-login .page {
  padding: 0 0 20px;
  background: #f5f6fa;
}

.app-shell.is-detail .page {
  padding: 62px 0 118px;
  padding-bottom: calc(118px + var(--keyboard-inset, 0px));
}

.tabbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  min-height: 72px;
  padding: 8px 10px 8px;
  background: rgba(247, 247, 247, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tabbar[hidden] {
  display: none;
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  color: var(--muted);
  padding: 10px 4px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
}

.tabbar__item,
.entry-row,
.row,
.mini-btn,
.composer__btn,
.composer__send {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.tabbar__item.is-active {
  color: #111111;
  background: rgba(0, 0, 0, 0.04);
}

.tabbar__icon {
  font-size: 21px;
  line-height: 1;
}

.tabbar__label {
  line-height: 1.1;
}

.stack {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.stack > * + * {
  margin-top: 12px;
}

.stack--sm > * + * {
  margin-top: 8px;
}

.panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel--tight {
  padding: 12px;
}

.biz-probe {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f7f7;
}

.biz-probe__title {
  font-size: 14px;
  font-weight: 700;
}

.biz-probe__meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.biz-probe__meta--warn {
  color: var(--red);
}

.biz-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.biz-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #ececec;
}

.biz-chip__role {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.biz-chip__text {
  color: var(--muted);
  font-size: 12px;
}

.empty--inline {
  padding: 0;
  text-align: left;
}

.auth-page {
  min-height: 100%;
  padding: 76px 18px 22px;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 26%),
    linear-gradient(180deg, #f4f7fb 0%, #eef3f8 100%);
}

.auth-hero {
  padding: 18px 0 36px;
  color: #fff;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.auth-logo {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #cf1111;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(91, 12, 12, 0.22);
}

.auth-brand__body {
  min-width: 0;
}

.auth-brand__name {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
}

.auth-brand__desc {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.88;
}

.auth-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 44px 28px 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.12);
}

.auth-brand-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eeeeed;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.auth-logo-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  object-position: center;
}

.auth-welcome {
  text-align: center;
  color: #111827;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 12px;
}

.auth-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 26px;
}

.auth-form {
  margin-top: 20px;
}

.auth-field .field__input {
  height: 52px;
  border-radius: 16px;
}

.auth-code-row .field__input {
  min-width: 0;
}

.auth-code-btn {
  min-width: 104px;
  border-radius: 999px;
  color: #fff !important;
  background: #cf1111 !important;
  box-shadow: none;
}

.auth-code-btn:disabled {
  color: #fff !important;
  background: #cf1111 !important;
  opacity: 0.62;
}

.auth-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-forgot-link {
  width: fit-content;
  margin: -4px auto 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: #cf1111;
  font-size: 14px;
  font-weight: 800;
}

.auth-bottom-tip {
  max-width: 420px;
  margin: 16px auto 0;
  color: #8a8a8a;
  text-align: center;
  font-size: 12px;
}

.auth-legal {
  max-width: 420px;
  margin: 16px auto 0;
  color: #8a8a8a;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  text-align: left;
  font-size: 12px;
  line-height: 1.5;
}

.auth-legal__check {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: #cf1111;
  flex: 0 0 auto;
}

.auth-legal__link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cf1111;
  font: inherit;
  font-weight: 800;
  vertical-align: baseline;
}

.legal-text {
  max-height: 62vh;
  overflow: auto;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.7;
}

.legal-text p {
  margin: 0 0 12px;
  white-space: pre-wrap;
}

.login-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: #f5f5f5;
}

.login-switch__item {
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  padding: 12px 8px;
  font-weight: 900;
}

.login-switch__item.is-active {
  background: #fff;
  color: #cf1111;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  color: var(--muted);
  font-size: 13px;
}

.field__input,
.field__textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
}

.field__textarea {
  min-height: 96px;
  resize: none;
}

.readonly-field {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 650;
}

.inline-row {
  display: flex;
  gap: 10px;
}

.inline-row .field__input {
  flex: 1 1 auto;
}

.btn,
.mini-btn {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
}

.btn {
  width: 100%;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #15c86a, #07c160);
}

.btn--auth {
  height: 54px;
  border-radius: 999px;
  background: #cf1111;
  box-shadow: 0 12px 24px rgba(207, 17, 17, 0.18);
  font-size: 17px;
  font-weight: 900;
}

.btn--secondary {
  color: var(--text);
  background: var(--panel-soft);
}

.btn--danger {
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #e64340);
}

.mini-btn {
  padding: 10px 12px;
  background: var(--panel-soft);
  color: var(--text);
  white-space: nowrap;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 12px;
}

.section-title h3 {
  margin: 0;
  font-size: 17px;
  min-width: 0;
  white-space: nowrap;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-card__body {
  min-width: 0;
}

.user-card__name {
  font-size: 20px;
  font-weight: 700;
}

.user-card__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #cfd4dc);
  color: #6b7280;
  font-size: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--lg {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 26px;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.entry-list {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.entry-list > * + * {
  margin-top: 10px;
}

.entry-row {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 92px;
  padding: 16px 16px;
  border-radius: 22px;
  color: #fff;
  text-align: left;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
  transform: translateZ(0);
}

.entry-row--green {
  background: radial-gradient(circle at 90% 10%, rgba(255,255,255,0.34), transparent 28%),
    linear-gradient(135deg, #ff6b71 0%, #f43f46 52%, #dc2626 100%);
}

.entry-row--dark {
  background: radial-gradient(circle at 90% 8%, rgba(255,255,255,0.32), transparent 30%),
    linear-gradient(135deg, #62a8ff 0%, #3b82f6 52%, #2563eb 100%);
}

.entry-row__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 34%),
    radial-gradient(circle at 18% 95%, rgba(255,255,255,0.22), transparent 34%);
}

.entry-row__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  flex: 0 0 auto;
}

.entry-row__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-row__body {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  flex: 1 1 auto;
}

.entry-row__label {
  margin-bottom: 2px;
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  font-weight: 700;
}

.entry-row__title {
  font-size: 22px;
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-row__meta {
  margin-top: 5px;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-row__arrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.92);
  font-size: 24px;
  line-height: 1;
}

.entry-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  color: #fff;
  box-shadow: var(--shadow);
}

.entry-card--green {
  background: linear-gradient(135deg, #17c96b, #08a752);
}

.entry-card--dark {
  background: linear-gradient(135deg, #3d434c, #24282e);
}

.entry-card--ghost {
  background: linear-gradient(135deg, #8f98a4, #6b7480);
}

.entry-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 17px;
  font-weight: 700;
}

.entry-card__title {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 700;
}

.entry-card__desc {
  margin-top: 4px;
  min-height: 38px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.92;
}

.list {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  overflow: hidden;
}

.chatRow .avatar {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 17px;
}

.contactRow .avatar,
.friendRow .avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-size: 15px;
}

.avatar-picker-btn {
  justify-content: center;
  min-height: 48px;
  width: 100%;
  border-radius: 14px;
}

.row__avatarWrap {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

.row:last-child {
  border-bottom: 0;
}

.row__body {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.row__name {
  font-size: 17px;
  font-weight: 700;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__tail {
  text-align: right;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 86px;
  overflow: hidden;
}

.row__time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge {
  min-width: 18px;
  height: 18px;
  margin-top: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge--dot {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  margin-top: 0;
  box-shadow: 0 0 0 2px #fff;
}

.badge--owner {
  min-width: auto;
  height: 20px;
  margin-top: 0;
  margin-left: 6px;
  padding: 0 8px;
  background: rgba(7, 193, 96, 0.14);
  color: var(--green-dark);
  vertical-align: middle;
}

.empty {
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
  padding: 24px 6px;
  font-size: 14px;
}

.messages {
  display: block;
  padding: 14px 12px 14px;
}

.messages > * + * {
  margin-top: 14px;
}

.history-more {
  display: block;
  justify-self: center;
  margin: 0 auto;
  max-width: 160px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.message-time-divider {
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.message-time-divider + .bubble-row {
  margin-top: 8px;
}

.bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.bubble-row--me {
  justify-content: flex-end;
}

.bubble-row--me .avatar {
  display: none;
}

.bubble {
  max-width: 78%;
  padding: 10px 12px 8px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  line-height: 1.6;
  word-break: break-word;
}

.bubble-row--me .bubble {
  background: #95ec69;
}

.bubble__sender {
  margin-bottom: 4px;
  color: #7b8492;
  font-size: 12px;
  line-height: 1.2;
}

.bubble--image {
  padding: 4px;
  overflow: hidden;
}

.bubble__image {
  display: block;
  width: 180px;
  min-height: 120px;
  max-width: 220px;
  max-height: 260px;
  object-fit: cover;
  background: #dfe3e8;
  border-radius: 14px;
  cursor: pointer;
}

.bubble__image-fail {
  width: 180px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #dfe3e8;
  color: #667085;
  font-size: 14px;
}

.bubble__statusLine {
  margin-top: 6px;
  font-size: 11px;
  text-align: right;
}

.bubble__status {
  color: rgba(0, 0, 0, 0.52);
}

.composer {
  position: fixed;
  left: 50%;
  bottom: var(--keyboard-inset, 0px);
  z-index: 15;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 430px;
  padding: 10px 12px 10px;
  background: rgba(247, 247, 247, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

@supports (padding: calc(1px + env(safe-area-inset-bottom))) {
  .topbar {
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  }

  .page {
    padding: 16px 12px calc(104px + env(safe-area-inset-bottom));
  }

  .app-shell.is-detail .page {
    padding: calc(62px + env(safe-area-inset-top)) 0 calc(118px + var(--keyboard-inset, 0px) + env(safe-area-inset-bottom));
  }

  .tabbar {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .composer {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
}

.composer__btn,
.composer__send {
  flex: 0 0 auto;
  height: 40px;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.composer__btn {
  background: #fff;
  color: var(--text);
}

.composer__send {
  background: var(--green);
  color: #fff;
}

.composer--disabled .composer__btn,
.composer--disabled .composer__send,
.composer--disabled .composer__input {
  color: #8a8a8a;
  background: #eeeeee;
  cursor: default;
}

.composer__input {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: 108px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  resize: none;
}

.dialog-layer {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.28);
}

.dialog-layer[hidden] {
  display: none;
}

.file-input-ghost {
  position: absolute;
  left: -99999px;
  top: -99999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dialog {
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 60px);
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.22);
}

.dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 0;
}

.dialog__title {
  margin: 0;
  font-size: 18px;
}

.dialog__close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--panel-soft);
  font-size: 22px;
  line-height: 1;
}

.dialog__body {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 14px 16px 16px;
}

.image-preview {
  display: grid;
  gap: 12px;
}

.image-preview__img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 14px;
  background: #f2f3f5;
}

.image-preview__tips {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.image-preview__save {
  display: block;
  text-align: center;
  text-decoration: none;
}

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

.option {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-soft);
  text-align: left;
}

.option__title {
  font-size: 15px;
  font-weight: 700;
}

.option__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-row input {
  margin-top: 3px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  font-weight: 650;
}

.field__hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: var(--panel-soft);
}

.member-row__body {
  min-width: 0;
  flex: 1;
}

.member-row__name {
  font-weight: 750;
}

.member-row__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 60;
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.84);
  color: #fff;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 360px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }
}
