:root {
  --bg: #0d0d12;
  --bg-2: #16161e;
  --card: #1c1c24;
  --line: rgba(237, 237, 237, 0.1);
  --text: #ededed;
  --muted: #c8c4bc;
  --gold: #e5a93c;
  --gold-ink: #1a1408;
  --user: #2c261c;
  --bot: #1a1a22;
  --ok: #b7d7a8;
  --danger: #e3a097;
  --radius: 16px;
  --kb: 0px;
  color-scheme: dark;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  background: #0d0d12;
  color: var(--text);
  overflow-x: hidden;
}
body { display: flex; justify-content: center; }
#app {
  width: 100%;
  max-width: 768px;
  height: calc(100dvh - var(--kb));
  display: grid;
  grid-template-rows: auto auto auto 1fr auto auto auto;
  background: linear-gradient(180deg, #16161e 0%, #121218 38%, #0d0d12 100%);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px 12px;
  background: #121218;
  border-bottom: 1px solid var(--line);
  z-index: 5;
  position: relative;
}
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1 1 160px; }
.brand > div { min-width: 0; }
.avatar, .mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #24242e;
}
a.avatar-link {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
  line-height: 0;
}
.name { font-weight: 650; font-size: 16px; line-height: 1.35; }
.title-row { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; max-width: 100%; }
.title-btn {
  display: block;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
  color: #f6f3ee;
  transform: translateY(3px);
}
.title-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.title-icon svg { width: 18px; height: 18px; display: block; }
.title-row .title-input { flex: 1 1 0; width: 1px; min-width: 0; max-width: 100%; margin: 0; }
.origin { margin: 0; font-size: 12px; line-height: 1.4; color: #8a867c; overflow-wrap: anywhere; }
.title-msg { margin: 2px 0 0; max-width: 100%; font-size: 13px; line-height: 1.4; color: var(--ok); overflow-wrap: anywhere; }
.title-msg:empty { display: none; }
.human-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: calc(100% - 24px);
  margin: 10px 12px 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--gold);
  background: #2c261c;
  color: var(--text);
  text-align: left;
}
.human-entry-title { font-size: 17px; font-weight: 700; color: var(--gold); line-height: 1.35; }
.human-entry-note { font-size: 13px; color: var(--muted); line-height: 1.4; }
.team-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: calc(100% - 24px);
  margin: 8px 12px 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--gold);
  background: #1c1c24;
  color: var(--text);
  text-align: left;
}
.team-entry-title { font-size: 17px; font-weight: 700; color: var(--gold); line-height: 1.35; }
.team-entry-note { font-size: 13px; color: var(--muted); line-height: 1.4; }
.team-label { display: block; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
#teamSheet input, #teamSheet textarea, .team-page input, .team-page textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  margin: 6px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121218;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#teamDetail { min-height: 88px; resize: vertical; }
#teamContact { min-height: 112px; resize: vertical; }
.team-hours { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.team-hours button {
  min-height: 48px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #121218;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}
.team-hours button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: #2c261c; }
.team-gate {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #2a1714;
  color: var(--danger);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.team-gate.ok { background: #17241a; color: var(--ok); }
.team-gate .primary, .team-gate a { display: block; margin-top: 8px; text-align: center; }
.team-card {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: #1c1c24;
  overflow-wrap: anywhere;
}
.team-card h3 { margin-top: 0; }
.team-card p { margin: 6px 0; }
.team-wide { width: 100%; min-height: 48px; margin-top: 8px; }
.team-page {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.team-page h1 { margin: 8px 0; font-size: 24px; line-height: 1.35; overflow-wrap: anywhere; }
.team-banner { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--gold); }
.team-back-row { margin-top: 28px; }
.team-back { color: #8a867c; font-size: 13px; text-decoration: none; }
.nick-save {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  min-height: 44px;
  padding: 10px 16px;
}
.sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.top-actions {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}
.top-actions > a,
.top-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: auto;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 3px;
  border: 1px solid rgba(237, 237, 237, 0.28);
  border-radius: 10px;
  background: #1c1c24;
  color: #e6e2da;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
}
.top-actions #memberEntry { margin-left: 0; }
#askEntry {
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 52px;
  max-width: 9.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: flex-start;
  color: #f6e7c4;
  border-color: rgba(229, 169, 60, 0.55);
  background-color: #1c1c24;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%23e5a93c' d='M6 0l1.1 3.6L11 4.2 8.2 6.7 9.1 11 6 8.8 2.9 11l.9-4.3L1 4.2l3.9-.6z'/></svg>");
  background-repeat: no-repeat;
  background-position: 4px center;
  background-size: 9px 9px;
  padding-left: 15px;
  animation: ask-breathe 3.6s ease-in-out infinite;
}
@keyframes ask-breathe {
  0%, 100% {
    border-color: rgba(229, 169, 60, 0.38);
    box-shadow: 0 0 4px rgba(229, 169, 60, 0.1);
  }
  50% {
    border-color: rgba(243, 214, 140, 0.95);
    box-shadow: 0 0 11px rgba(229, 169, 60, 0.34);
  }
}
@media (prefers-reduced-motion: reduce) {
  #askEntry {
    animation: none;
    border-color: var(--gold);
    box-shadow: none;
  }
}
.ask-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 6px);
  z-index: 6;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(229, 169, 60, 0.45);
  background: #1c1c24;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.ask-panel p { margin: 0 0 8px; color: var(--text); font-size: 16px; font-weight: 650; }
#askSearch {
  width: 100%;
  min-height: 42px;
  margin: 0 0 8px;
  font-size: 16px;
}
.ask-cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 8px;
  padding-bottom: 2px;
}
.ask-cats button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #121218;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.ask-cats button[aria-pressed="true"] {
  border-color: var(--gold);
  color: #f6e7c4;
}
.ask-q {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121218;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
}
.ask-swap { width: 100%; min-height: 40px; }
.team-home {
  margin: 8px 12px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1c1c24;
  overflow: hidden;
}
.team-home-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 6px 4px 12px;
}
.team-home-bar span { font-size: 14px; font-weight: 650; color: var(--gold); }
.team-home-bar a { color: var(--muted); font-size: 13px; text-decoration: none; }
#teamHomeToggle {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.team-home-item {
  display: block;
  padding: 8px 12px 10px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.team-home.is-collapsed { border-radius: 999px; }
.team-home.is-collapsed #teamHomeAll,
.team-home.is-collapsed #teamHomeBody { display: none; }
.team-home.is-collapsed .team-home-bar { min-height: 32px; padding-top: 0; padding-bottom: 0; }
button, .ghost, .primary, .linkish {
  font: inherit;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
}
.ghost {
  background: #1c1c24;
  color: var(--muted);
}
.primary {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 650;
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
}
.primary:disabled { opacity: 0.55; }
.recover-box { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.secret-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; }
.secret-row input { margin: 0; flex: 1 1 auto; min-width: 0; }
.secret-toggle { flex: 0 0 auto; width: 46px; height: 46px; min-height: 46px; padding: 0; display: grid; place-items: center; }
.secret-toggle svg { width: 22px; height: 22px; display: block; }
.secret-toggle .eye-shut { display: none; }
.secret-toggle[aria-pressed="true"] .eye-open { display: none; }
.secret-toggle[aria-pressed="true"] .eye-shut { display: block; }
.msg.recover-alert { color: var(--danger); font-size: 18px; font-weight: 650; line-height: 1.45; }
.field-error { border-color: var(--danger) !important; }
.legacy-recover { margin-top: 14px; }
.legacy-recover summary { cursor: pointer; color: var(--muted); }
.short-code { display: block; margin: 8px 0; font-size: 32px; letter-spacing: 0.18em; font-weight: 750; color: var(--gold); }
.ghost:active, button:active { opacity: 0.82; }
.chat {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-padding-bottom: 16px;
}
.bubble {
  max-width: min(92%, 40rem);
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
}
.bubble.bot {
  align-self: flex-start;
  background: var(--bot);
  border-bottom-left-radius: 6px;
}
.bubble.user {
  align-self: flex-end;
  background: var(--user);
  border-bottom-right-radius: 6px;
}
.bubble.sys {
  align-self: center;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  max-width: 100%;
  padding: 0 8px;
}
.meta { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.refs { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.refs summary { cursor: pointer; }
.refs .ref-item { margin-top: 6px; }
.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #121218;
  border-top: 1px solid var(--line);
}
.composer textarea {
  resize: none;
  max-height: 120px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #1c1c24;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  line-height: 1.5;
}
.composer button {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 650;
  border-radius: 16px;
  min-height: 46px;
  padding: 0 16px;
}
.upgrade-banner {
  background: #1c1c24;
  color: var(--text);
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.5;
}
.upgrade-banner button {
  margin-left: 8px;
  background: var(--gold);
  color: var(--gold-ink);
  border: none;
}
.hidden { display: none !important; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  height: var(--vv-height, 100dvh);
  background: rgba(8, 8, 12, 0.72);
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  overflow: hidden;
}
.trial-hint {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 2px 4px 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.trial-hint p { margin: 0; flex: 1 1 auto; min-width: 0; text-align: center; overflow-wrap: anywhere; }
.trial-hint-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
.sheet-card {
  width: 100%;
  max-width: 768px;
  min-height: 0;
  max-height: 100%;
  margin: 0 auto;
  overflow: auto;
  background: #16161e;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  position: relative;
  overscroll-behavior: contain;
}
html.sheet-open, html.sheet-open body { overflow: hidden; }
.sheet-card.wide { max-height: 100%; }
.sheet-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1c1c24;
  color: var(--muted);
}
h2 { margin: 4px 36px 8px 0; font-size: 22px; font-weight: 650; line-height: 1.35; }
h3 { margin: 18px 0 8px; font-size: 16px; color: var(--gold); font-weight: 650; }
.muted { color: var(--muted); font-size: 14px; margin-top: 0; line-height: 1.6; }
#memberSheet.member-view .sheet-card { display: flex; flex-direction: column; }
#memberSheet.member-view .sheet-close { order: 0; }
#memberSheet.member-view #memberHeading { order: 1; }
#memberSheet.member-view #memberPanel { order: 2; }
#memberSheet.member-view #renewHeading { order: 3; }
#memberSheet.member-view #renewNote { order: 4; }
#memberSheet.member-view #planGrid { order: 5; }
#memberSheet.member-view #planDetail { order: 6; }
#memberSheet.member-view #payBox { order: 7; }
#memberSheet.member-view #redeemForm { order: 8; }
#memberSheet.member-view #redeemSuccess { order: 9; }
#memberSummary p { margin: 0 0 6px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.plan-grid button {
  min-height: 48px;
  border-radius: 12px;
  border: 2px solid rgba(237, 237, 237, 0.38);
  background: #121218;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  padding: 8px 6px;
}
.plan-grid button[aria-pressed="true"] { border-color: var(--gold); background: #2c261c; color: var(--gold); }
.plan-price { font-size: 22px; color: var(--gold); margin: 8px 0 0; }
.redeem-box { margin-top: 8px; }
@media (min-width: 800px) {
  .plan-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
.benefits { padding-left: 18px; margin: 10px 0 4px; }
.benefits li { margin: 8px 0; font-size: 15px; color: var(--text); }
.pay-box, label { display: block; font-size: 14px; color: var(--muted); }
input[type=text], input:not([type]), input[type=password], input[type=number], input[type=date], select {
  width: 100%;
  margin: 6px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121218;
  color: var(--text);
  font: inherit;
}
.contact {
  background: #121218;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
.dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--danger); vertical-align: middle; }
.msg { color: var(--ok); font-size: 14px; }
.msg.err { color: var(--danger); }
.human-label { display: block; margin: 10px 0 0; color: var(--muted); font-size: 14px; }
#humanBody, textarea.human-edit {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 9.6em;
  max-height: 240px;
  overflow: auto;
  resize: vertical;
  margin: 6px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121218;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.q { margin: 14px 0; padding: 14px; border-radius: 14px; background: #1c1c24; }
.q .qt { font-weight: 650; margin-bottom: 8px; color: var(--text); }
.q label { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; color: var(--text); cursor: pointer; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; color: var(--text); }
.result {
  background: #121218;
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
.meihua-out { margin-top: 16px; font-size: 15px; line-height: 1.6; }
.gua-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}
.gua-card {
  margin: 0;
  background: #1c1c24;
  border-radius: 14px;
  padding: 12px 6px 14px;
  text-align: center;
}
.gua-card figcaption {
  color: var(--gold);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}
.gua-name { color: var(--text); font-size: 14px; line-height: 1.4; margin-top: 4px; }
.hex-svg { width: 100%; height: auto; max-width: 108px; display: block; margin: 10px auto 8px; }
.meihua-read {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #1a1a22;
  white-space: pre-wrap;
  line-height: 1.6;
}
.guide {
  align-self: stretch;
  background: #1c1c24;
  border-radius: 16px;
  padding: 14px 14px 10px;
}
.guide p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chips button, .linkish {
  border: 1px solid rgba(237, 237, 237, 0.12);
  background: #121218;
  color: var(--text);
}
.chips button.on, .library .chips button.on {
  background: var(--gold);
  border-color: transparent;
  color: var(--gold-ink);
}
.linkish { border: none; background: transparent; color: var(--muted); padding-left: 2px; }
.memory-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.memory-row p { flex: 1 1 100%; margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; }
.memory-row .ghost { width: auto; }
.memory-row input { flex: 1 1 100%; margin: 0; }
.vlink {
  display: block;
  margin-top: 8px;
  padding: 8px 0 0;
  font-size: 14px;
  text-decoration: none;
  color: var(--gold);
}
.library {
  width: min(768px, 100%);
  margin: 0 auto;
  padding: 18px 16px 40px;
  min-height: 100dvh;
  overflow-x: hidden;
  background: linear-gradient(180deg, #16161e 0%, #0d0d12 280px);
}
.library a { color: var(--gold); text-decoration: none; }
.library h1 { font-size: 22px; margin: 10px 0 6px; font-weight: 650; line-height: 1.35; }
.library .lead { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.library .search, .library .note {
  width: 100%;
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #1c1c24;
  color: var(--text);
  font: inherit;
}
.library .note:empty { display: none; padding: 0; margin: 0; border: 0; }
.vcard {
  display: block;
  margin: 12px 0;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  background: #1c1c24;
}
.vcard b { display: block; font-size: 17px; line-height: 1.45; font-weight: 650; margin-bottom: 8px; }
.vcard .kind { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.vcard .where { display: inline-block; margin-top: 10px; color: var(--gold); font-size: 13px; }
.typing::after { content: '▍'; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

.admin-wrap { width: 100%; max-width: min(900px, 100%); margin: 0 auto; padding: 16px; box-sizing: border-box; }
.admin-wrap h1 { font-size: 22px; overflow-wrap: anywhere; }
.admin-wrap h3, .admin-wrap p, .admin-wrap label, .admin-wrap .qt { overflow-wrap: anywhere; }
.admin-wrap .card, .admin-wrap .grid2, .admin-wrap .grid2 > * { min-width: 0; max-width: 100%; }
.admin-wrap input, .admin-wrap select, .admin-wrap textarea, .admin-wrap button.primary, .admin-wrap #humanGrant, .admin-wrap #humanAdmin button {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.admin-wrap #humanAdmin button, .admin-wrap #humanGrant { min-height: 44px; margin-top: 8px; }
.admin-wrap textarea { min-height: 7.5em; }
.admin-scroll, .stat-scroll { display: block; max-width: 100%; overflow-x: auto; }
.stat-scroll table { width: 100%; min-width: 0; }
#statTable th, #statTable td { padding: 6px 4px; font-size: 13px; text-align: left; vertical-align: top; }
#statTable td div { color: var(--muted); font-size: 12px; }
#statCard .check { align-items: center; }
#statCard .check input { width: 22px; min-width: 22px; height: 22px; margin: 0; }
.admin-scroll table { width: max-content; min-width: 100%; }
.admin-scroll input, .admin-scroll textarea, .admin-scroll button { width: auto; max-width: 180px; display: inline-block; min-height: 36px; }
.admin-wrap .result { overflow-wrap: anywhere; max-width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
code { color: var(--gold); }
