*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f5f6f8;
  -webkit-font-smoothing: antialiased;
}

.wechat-tip {
  padding: 10px 16px;
  background: #fff7e6;
  color: #ad6800;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid #ffd591;
}

.mobile-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 8px;
  z-index: 2000;
  text-align: center;
}

.mobile-toast--error {
  background: rgba(207, 19, 34, 0.92);
}

.mobile-toast--warn {
  background: rgba(173, 104, 0, 0.92);
}

.mobile-toast[hidden] {
  display: none !important;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.header {
  margin-bottom: 24px;
}

.title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
}

.subtitle {
  margin: 0;
  font-size: 0.9375rem;
  color: #666;
}

.status {
  padding: 16px;
  text-align: center;
  color: #666;
  font-size: 0.9375rem;
}

.status--error {
  color: #cf1322;
}

.question-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-item {
  margin: 0;
}

.question-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px;
}

.question-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.question-link::after {
  content: "›";
  margin-left: auto;
  padding-left: 12px;
  font-size: 1.25rem;
  color: #999;
  flex-shrink: 0;
}

.question-link:active {
  background: #f5f5f5;
}

.question-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
}

.question-meta__time {
  font-size: 0.75rem;
  color: #999;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge--pending {
  background: #e6f4ff;
  color: #0958d9;
}

.badge--success {
  background: #f6ffed;
  color: #389e0d;
}

.badge--info {
  background: #e6f4ff;
  color: #0958d9;
}

.badge--share {
  background: #f9f0ff;
  color: #531dab;
}

.badge--warn {
  background: #fff7e6;
  color: #ad6800;
}

.btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
}

.btn--small {
  min-height: 32px;
  font-size: 0.8125rem;
}

.btn--primary {
  background: #1677ff;
  color: #fff;
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--ghost {
  background: #fff;
  border-color: #d9d9d9;
  color: #1a1a1a;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[hidden] {
  display: none !important;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.modal__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.modal__meta {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: #666;
}

.modal__textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  resize: vertical;
  min-height: 160px;
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.modal__feedback {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: #666;
}

.modal__feedback--info {
  color: #0958d9;
}

.modal__feedback--error {
  color: #cf1322;
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
    padding: 40px 24px 64px;
  }

  .title {
    font-size: 1.75rem;
  }

  .question-link:hover {
    border-color: #4096ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
}

/* --- users admin page --- */

.panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel__title {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.panel__head .panel__title {
  margin-bottom: 0;
}

.panel__hint {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: #666;
}

.panel__feedback {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: #389e0d;
}

.panel__feedback--error {
  color: #cf1322;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 0.875rem;
  color: #666;
}

.input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.input:focus {
  outline: none;
  border-color: #4096ff;
  box-shadow: 0 0 0 2px rgba(64, 150, 255, 0.15);
}

.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-row .input {
  flex: 1 1 220px;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.user-list,
.actor-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-card,
.actor-card {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
}

.actor-card--bound {
  opacity: 0.85;
}

.user-card__title,
.actor-card__main {
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.user-card__meta,
.actor-card__meta,
.actor-card__status,
.user-card__identity {
  font-size: 0.8125rem;
  color: #666;
}

.user-card__identity + .user-card__identity {
  margin-top: 4px;
}

.actor-card__status {
  margin: 6px 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
}
