html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 255, 159, .16), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(57, 217, 138, .12), transparent 26%),
    linear-gradient(180deg, #07120c 0%, #0b1710 52%, #050806 100%);
  color: #eef7f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.wechat-app {
  width: min(980px, 100%);
  height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  background: rgba(7, 16, 10, .72);
  box-shadow: 0 0 80px rgba(0,0,0,.35);
}
.chat-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid rgba(141,255,182,.14);
  background: rgba(5, 14, 8, .88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.back-btn, .top-action, .account-badge, .chat-inputbar button, .modal-actions button, .account-actions button, .quickbar button, .interact-menu button {
  border: 1px solid rgba(141,255,182,.18);
  background: rgba(255,255,255,.06);
  color: #eef7f0;
  border-radius: 999px;
}
.back-btn { width: 34px; height: 34px; font-size: 28px; line-height: 28px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { margin: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main-link { color: #7cff9f; font-size: 12px; margin-left: 8px; text-decoration: none; }
.topbar-actions { display: flex; gap: 6px; align-items: center; }
.top-action, .account-badge { padding: 7px 9px; font-size: 12px; }
.account-badge { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oracle-strip {
  padding: 10px 14px;
  color: rgba(238,247,240,.78);
  font-size: 13px;
  background: rgba(124,255,159,.08);
  border-bottom: 1px solid rgba(141,255,182,.12);
}
.dogshit-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(124,255,159,.13), rgba(255,214,102,.08));
}
.strip-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(141,255,182,.12);
}
.strip-pill.up { color: #7cff9f; }
.strip-pill.down { color: #ff9c9c; }
.message-list {
  overflow-y: auto;
  padding: 16px 12px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-msg { display: flex; gap: 9px; align-items: flex-start; }
.chat-msg.mine { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,255,159,.22), rgba(255,255,255,.08));
  border: 1px solid rgba(141,255,182,.16);
}
.msg-body { max-width: min(74%, 660px); }
.msg-meta { font-size: 11px; color: rgba(238,247,240,.48); margin: 0 0 4px 3px; }
.mine .msg-meta { text-align: right; margin: 0 3px 4px 0; }
.msg-wallet {
  display: inline-flex;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #7cff9f;
  background: rgba(124,255,159,.09);
  border: 1px solid rgba(124,255,159,.14);
}
.msg-bubble {
  padding: 10px 12px;
  border-radius: 15px 15px 15px 4px;
  color: #f7fff9;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(141,255,182,.12);
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}
.mine .msg-bubble {
  border-radius: 15px 15px 4px 15px;
  background: linear-gradient(135deg, #5ee987, #2fc579);
  color: #031107;
  border-color: transparent;
}
.chat-msg.command .msg-bubble, .chat-msg.event .msg-bubble, .chat-msg.chain .msg-bubble {
  background: rgba(255, 214, 102, .10);
  border-color: rgba(255, 214, 102, .22);
}
.chat-msg.chain .msg-avatar { background: linear-gradient(135deg, rgba(255,214,102,.26), rgba(124,255,159,.14)); }
.empty-chat, .error-card {
  margin: auto;
  padding: 18px;
  text-align: center;
  border-radius: 18px;
  color: rgba(238,247,240,.72);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(141,255,182,.12);
}
.error-card { color: #ffb3b3; }
.quickbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 10px;
  border-top: 1px solid rgba(141,255,182,.10);
  scrollbar-width: none;
}
.quickbar::-webkit-scrollbar { display: none; }
.quickbar button { flex: 0 0 auto; padding: 8px 11px; font-size: 13px; color: #cfffda; }
.chat-inputbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(141,255,182,.14);
  background: rgba(5, 14, 8, .92);
}
.interact-wrap { position: relative; }
.interact-toggle { width: 36px; height: 36px; font-size: 22px; }
.chat-inputbar input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(141,255,182,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 18px;
  padding: 10px 13px;
  outline: none;
}
.chat-inputbar input:focus { border-color: rgba(124,255,159,.58); }
.chat-inputbar button[type="submit"] {
  padding: 10px 15px;
  font-weight: 700;
  color: #031107;
  background: linear-gradient(135deg, #7cff9f, #39d98a);
  border: 0;
}
.interact-menu {
  position: absolute;
  left: 0;
  bottom: 46px;
  width: min(90vw, 420px);
  max-height: 58vh;
  overflow-y: auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(8, 20, 12, .98);
  border: 1px solid rgba(141,255,182,.18);
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.interact-menu-title { font-weight: 800; margin-bottom: 10px; }
.interact-section-title { color: rgba(238,247,240,.62); font-size: 12px; margin: 10px 0 6px; }
.interact-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.interact-menu button { border-radius: 14px; padding: 9px; text-align: left; display: grid; gap: 2px; }
.interact-menu button span { font-size: 11px; color: rgba(238,247,240,.56); }
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.58);
}
.modal-mask[hidden] { display: none; }
.wechat-modal {
  width: min(520px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 22px;
  padding: 20px;
  background: #0b1710;
  border: 1px solid rgba(141,255,182,.18);
  box-shadow: 0 24px 90px rgba(0,0,0,.52);
}
.wechat-modal h2 { margin: 0 0 12px; font-size: 20px; }
.account-tabs, .rank-tabs, .modal-actions, .account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.account-tabs button, .rank-tabs button, .modal-actions button, .account-actions button { padding: 8px 12px; }
.account-tabs .selected, .rank-tabs .selected, .primary { background: linear-gradient(135deg, #7cff9f, #39d98a) !important; color: #031107 !important; border: 0 !important; }
.account-form-grid { display: grid; gap: 10px; }
.account-field { display: grid; gap: 5px; color: rgba(238,247,240,.72); font-size: 13px; }
.account-field input, .account-field select {
  border: 1px solid rgba(141,255,182,.18);
  background: rgba(255,255,255,.07);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
.wallet-tip, .account-message, .guide-copy { color: rgba(238,247,240,.62); font-size: 13px; line-height: 1.6; }
.guide-cards { display: grid; gap: 10px; }
.guide-card, .guide-hero, .status-card, .daily-tasks, .rank-list, .online-list, .game-message {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(141,255,182,.10);
}
.task-row, .rank-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(141,255,182,.08);
}
.task-row:last-child, .rank-row:last-child { border-bottom: 0; }
.task-row span, .rank-row span { color: rgba(238,247,240,.62); font-size: 12px; text-align: right; }
.task-row.done b { color: #7cff9f; }
.clean-mode .oracle-strip, .clean-mode .quickbar { display: none; }
.clean-mode .wechat-app { grid-template-rows: auto 1fr auto; }
@media (max-width: 640px) {
  .top-action:not(.online-action) { display: none; }
  .topbar-title h1 { font-size: 16px; }
  .chat-main-link { display: none; }
  .msg-body { max-width: 78%; }
  .quickbar { padding-left: 8px; }
  .wechat-app { width: 100%; }
}
