/* ==========================================================================
   蝌蚪池塘 · 网页版
   深潜舱 HUD：深渊底色 + 电青描边 + 切角面板 + 等宽数字
   （与小程序端共用同一套视觉语言，rpx 版见 pages/index/index.wxss）
   ========================================================================== */

:root {
  /* 底色：深海 */
  --abyss: #04070e;
  --deep: #07131d;
  --panel: rgba(6, 20, 31, 0.88);
  --panel-solid: rgba(5, 17, 27, 0.96);

  /* 主色与语义色 */
  --cyan: #22e8ff;
  --cyan-1: rgba(34, 232, 255, 0.3);
  --cyan-2: rgba(34, 232, 255, 0.16);
  --cyan-3: rgba(34, 232, 255, 0.08);
  --mint: #5cffc8;
  --mint-1: rgba(92, 255, 200, 0.42);
  --magenta: #ff2f9e;
  --violet: #8b5cff;
  --amber: #ffc857;

  /* 文本 */
  --ink: #dff6ff;
  --muted: #7fa8b8;
  --dim: #4a6b7a;

  --dock-h: 78px;
  --cut: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;

  /* 统一的切角形状：右上 + 左下各切一刀 */
  --cut-shape: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

* {
  box-sizing: border-box;
}

/* hidden 属性优先于组件自身的 display 声明 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--abyss);
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

input {
  font-family: inherit;
  border: none;
  outline: none;
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--abyss);
}

/* 面板顶端的流光：让静止的界面看起来一直在工作 */
@keyframes sweep {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

.sweep-line {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: sweep 4.2s linear infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

/* ---------------- 画布 ---------------- */
#pond {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px 14px;
  background: linear-gradient(180deg, rgba(4, 10, 18, 0.92), rgba(4, 10, 18, 0));
  border-bottom: 1px solid rgba(34, 232, 255, 0.12);
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

/* 六边形标识：深潜舱的舱徽 */
.brand-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  clip-path: polygon(50% 0, 100% 27%, 100% 73%, 50% 100%, 0 73%, 0 27%);
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 0 14px rgba(34, 232, 255, 0.55);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2.4px;
  line-height: 1.15;
  text-shadow: 0 0 14px rgba(34, 232, 255, 0.28);
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

/* 通用 HUD 小胶囊：切右上角 + 电青内描边 */
.pill {
  display: flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 2px;
  background: rgba(6, 22, 34, 0.82);
  box-shadow: inset 0 0 0 1px var(--cyan-1);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: box-shadow 0.16s ease, background 0.16s ease;
}

button.pill:hover {
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.6), 0 0 16px rgba(34, 232, 255, 0.16);
}

.online-pill {
  gap: 6px;
  align-items: baseline;
}

.online-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(34, 232, 255, 0.5);
}

.online-text {
  font-size: 12px;
  color: var(--muted);
}

.follow-pill {
  box-shadow: inset 0 0 0 1px var(--mint-1);
  max-width: 260px;
}

/* ---------------- 深海链 HUD ---------------- */
.chain-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 2px;
  background: rgba(139, 92, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 255, 0.45);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  cursor: default;
}

.chain-chip.is-charged {
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.7), 0 0 18px rgba(34, 232, 255, 0.28);
}

/* 预告 / 争食：这一刻池子里有饭，胶囊脉动一下 */
.chain-chip.is-live {
  box-shadow: inset 0 0 0 1px rgba(92, 255, 200, 0.7), 0 0 18px rgba(92, 255, 200, 0.26);
  animation: chainWork 1.1s ease-in-out infinite;
}

@keyframes chainWork {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

.chain-spin {
  font-size: 11px;
  line-height: 1;
  color: var(--mint);
  animation: spin 1.1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.chain-mark {
  font-size: 11px;
  line-height: 1;
  color: var(--violet);
  text-shadow: 0 0 10px rgba(139, 92, 255, 0.8);
}

.chain-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: #a58cff;
}

.chain-no {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #c9b3ff;
  font-variant-numeric: tabular-nums;
}

.chain-bar {
  width: 46px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(139, 92, 255, 0.24);
}

.chain-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: 0 0 8px rgba(139, 92, 255, 0.85);
  transition: width 0.24s ease;
}

/* 账本只读行：品牌下方的 我的贝 / 我的阶 / 本阶段倒计时 */
.ledger {
  position: absolute;
  left: 20px;
  top: 58px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.4px;
  color: var(--dim);
  pointer-events: none;
  white-space: nowrap;
}

.ledger-pearls {
  color: var(--cyan);
  opacity: 0.85;
}

/*
 * 这一枚是**可点的**：花贝升阶。升阶只换外观，绝不给能力 ——
 * 所以它躺在这行「我的资产」里，而不是在任何操作区。
 */
.ledger-level {
  color: var(--amber);
  pointer-events: auto;
  appearance: none;
  border: 0;
  border-bottom: 1px dotted rgba(255, 214, 122, 0.45);
  background: transparent;
  margin: 0;
  padding: 0 1px;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.ledger-level:hover {
  color: #ffe08a;
  border-bottom-color: rgba(255, 224, 138, 0.8);
}

/* 贝够了：变薄荷色 + 一个向上的箭头，告诉你可以花 */
.ledger-level.is-ready {
  color: var(--mint);
  border-bottom-color: rgba(92, 255, 200, 0.6);
}

.ledger-level.is-ready::after {
  content: ' ↑';
}

.ledger-level.is-max {
  cursor: default;
  color: var(--dim);
  border-bottom-color: transparent;
}

.ledger-next {
  color: var(--violet);
}

.ledger-sep {
  color: rgba(74, 107, 122, 0.7);
}

/* 有「本轮吃到 / 有人在定下一轮随机 / 今日日额」时才出现 */
.ledger-extra {
  color: var(--mint);
  animation: ledgerPulse 1.4s ease-in-out infinite;
}

@keyframes ledgerPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------------- 画布比例 ---------------- */
.zoom-pill {
  gap: 2px;
  padding: 4px 6px;
}

.zoom-btn,
.zoom-val {
  height: 24px;
  min-width: 24px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  transition: color 0.16s ease, background 0.16s ease;
}

.zoom-btn:hover,
.zoom-val:hover {
  color: var(--ink);
  background: rgba(34, 232, 255, 0.12);
}

.zoom-btn:active,
.zoom-val:active {
  background: rgba(34, 232, 255, 0.22);
}

.zoom-val {
  min-width: 46px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* 非 100% 时点亮，一眼看出已放大 / 缩小 */
.zoom-pill.is-zoomed {
  box-shadow: inset 0 0 0 1px var(--mint-1);
}

.zoom-pill.is-zoomed .zoom-val {
  color: var(--mint);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(92, 255, 200, 0.5);
}

.follow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
}

.follow-text {
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.follow-x {
  margin-left: 8px;
  font-size: 12px;
  line-height: 1;
  color: var(--mint);
  padding: 2px;
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 2px;
  background: rgba(6, 22, 34, 0.76);
  box-shadow: inset 0 0 0 1px var(--cyan-2);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 7px var(--amber);
  transition: background 0.3s, box-shadow 0.3s;
}

.status.is-online .status-dot {
  background: var(--mint);
  box-shadow: 0 0 7px var(--mint);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.status-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------------- 断线横幅 ---------------- */
.offline-banner {
  position: absolute;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 2px;
  background: rgba(255, 47, 158, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 47, 158, 0.5), 0 0 20px rgba(255, 47, 158, 0.18);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}

.banner-text {
  font-size: 13px;
  color: #ffd9ec;
}

.banner-btn {
  padding: 4px 14px;
  border-radius: 2px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 47, 158, 0.85);
}

/* ---------------- 世界动态 / 在线 面板 ---------------- */
.panel {
  position: absolute;
  z-index: 25;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--cyan-1), 0 18px 50px rgba(0, 0, 0, 0.5);
  clip-path: var(--cut-shape);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.24s ease;
}

.panel-handle {
  display: none;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(34, 232, 255, 0.1);
}

.tab {
  position: relative;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 2px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-on {
  color: #021016;
  font-weight: 600;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 0 14px rgba(34, 232, 255, 0.3);
}

.tab-count {
  opacity: 0.75;
}

.badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 2px;
  background: var(--magenta);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

.panel-close {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 2px;
  font-size: 11px;
  color: var(--dim);
  background: rgba(34, 232, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--cyan-3);
  line-height: 1;
}

.panel-close:hover {
  color: var(--ink);
  background: rgba(34, 232, 255, 0.16);
}

.panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 232, 255, 0.22) transparent;
}

.scroll::-webkit-scrollbar {
  width: 6px;
}

.scroll::-webkit-scrollbar-thumb {
  background: rgba(34, 232, 255, 0.2);
  border-radius: 2px;
}

.empty {
  padding: 44px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--dim);
}

/* ---------------- 世界动态条目 ---------------- */
.feed {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.16s ease;
}

.feed:hover {
  background: rgba(34, 232, 255, 0.05);
}

.feed.is-head {
  padding-top: 11px;
}

.feed.is-grouped {
  padding-top: 1px;
}

.feed-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin: 7px 9px 0 0;
  flex-shrink: 0;
}

.feed-dot.ghost {
  background: transparent !important;
  box-shadow: none !important;
}

.feed-main {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
}

.feed-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.feed-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--mint);
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.feed-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}

.feed-text {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #c3dde8;
  word-break: break-word;
}

/* 拼图案留下的痕迹：亮一点，一眼能和在聊天里分开 */
.feed-text.is-shape {
  color: var(--cyan);
}

.feed-sys {
  width: 100%;
  padding: 5px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--dim);
}

.feed--disconnect .feed-sys,
.feed--tip .feed-sys {
  color: var(--amber);
}

/* ---------------- 在线蝌蚪 ---------------- */
.user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  cursor: pointer;
}

.user:hover .user-name {
  color: #fff;
}

.user-avatar {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.user-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(92, 255, 200, 0.9);
  animation: ringPulse 2.2s ease-out infinite;
}

@keyframes ringPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.user-main {
  flex: 1;
  min-width: 0;
}

.user-name {
  display: block;
  font-size: 13px;
  color: #cfe4ec;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.16s ease;
}

.user.is-follow .user-name {
  color: var(--mint);
  font-weight: 600;
}

.user-me,
.user-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 10.5px;
}

.user-me {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
}

.user-tag {
  color: var(--mint);
  background: rgba(92, 255, 200, 0.14);
  box-shadow: inset 0 0 0 1px rgba(92, 255, 200, 0.3);
}

.user-chevron {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
  color: var(--dim);
}

.user-sep {
  position: absolute;
  left: 30px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(34, 232, 255, 0.08);
}

/* 性别颜色 */
.g0 {
  background-color: #e2dbe2;
}

.g1 {
  background-color: #c0fdf7;
  box-shadow: 0 0 6px rgba(192, 253, 247, 0.7);
}

.g2 {
  background-color: #ffb5c5;
  box-shadow: 0 0 6px rgba(255, 181, 197, 0.7);
}

/* ---------------- 底部容器 ---------------- */
.bottom {
  position: absolute;
  left: 20px;
  right: auto;
  bottom: 20px;
  width: min(720px, calc(100% - 400px));
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(5, 17, 27, 0.9);
  box-shadow: inset 0 0 0 1px var(--cyan-1), 0 18px 50px rgba(0, 0, 0, 0.5);
  clip-path: var(--cut-shape);
}

/* ---------------- 粒子图案快捷条 ----------------
   自动换行的宫格，所有图案一屏平铺，不出现横向滚动 */
.shapebar {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.26s ease;
  border-bottom: 1px solid transparent;
}

.shapebar.is-open {
  max-height: 150px;
  border-bottom-color: rgba(34, 232, 255, 0.12);
}

.shape-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
}

.shape-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(34, 232, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--cyan-2);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: all 0.16s ease;
}

.shape-chip:hover {
  color: var(--ink);
  background: rgba(34, 232, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.5), 0 0 14px rgba(34, 232, 255, 0.16);
}

.shape-chip.ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(74, 107, 122, 0.5);
}

.shape-glyph {
  font-size: 15px;
  line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(34, 232, 255, 0.5);
}

.shape-label {
  letter-spacing: 0.4px;
}

/* ---------------- 聊天栏 ---------------- */
.chatbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-top: 1px solid rgba(34, 232, 255, 0.1);
}

.spark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 2px;
  font-size: 14px;
  line-height: 1;
  color: var(--violet);
  background: rgba(139, 92, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 255, 0.42);
  transition: all 0.2s ease;
}

.spark:hover {
  color: #fff;
  background: rgba(139, 92, 255, 0.26);
}

.spark.is-on {
  color: #021016;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 0 18px rgba(34, 232, 255, 0.4);
}

/* 顶栏「我的资料」：性别圆点的入口，放在状态右边 */
.me-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 22, 34, 0.82);
  box-shadow: inset 0 0 0 1px var(--cyan-1);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: box-shadow 0.2s ease, transform 0.16s ease;
}

.me-avatar:hover {
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.6), 0 0 16px rgba(34, 232, 255, 0.18);
}

.me-avatar:active {
  transform: scale(0.94);
}

.avatar-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.chat-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border-radius: 2px;
  font-size: 13.5px;
  color: var(--ink);
  background: rgba(2, 8, 14, 0.8);
  box-shadow: inset 0 0 0 1px var(--cyan-2);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.chat-input::placeholder {
  color: var(--dim);
}

.chat-input:focus {
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.6), 0 0 16px rgba(34, 232, 255, 0.14);
  background: rgba(2, 8, 14, 0.95);
}

.send {
  flex-shrink: 0;
  height: 38px;
  padding: 0 18px;
  border-radius: 2px;
  font-size: 13.5px;
  color: var(--dim);
  background: rgba(34, 232, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--cyan-2);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: all 0.2s ease;
}

.send.is-on {
  font-weight: 600;
  color: #021016;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 0 18px rgba(34, 232, 255, 0.42);
}

/* ---------------- 出块封印（上链成功的一次性提示） ---------------- */
.seal {
  position: absolute;
  left: 50%;
  top: 88px;
  z-index: 55;
  transform: translate(-50%, -14px);
  padding: 12px 22px 13px;
  text-align: center;
  background: var(--panel-solid);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.55), 0 0 34px rgba(34, 232, 255, 0.22);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.seal.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.seal-title {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2px;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(34, 232, 255, 0.6);
}

.seal-hash {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.4px;
  color: var(--mint);
}

.seal-meta {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}

/* ---------------- 蝌蚪操作浮层（贴着被点的行弹出的小菜单） ----------------
 * 网页习惯：菜单出现在点击的那一行旁边，不做全屏暗色遮罩、不从底部升起。
 * 摆位由 JS 现算（见 placeMenu），四种朝向只改箭头位置与动画原点。
 */
.action-root {
  position: absolute;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  /* 不拦截点击：只有菜单本体可点，其余位置照常操作（点别处由 JS 收起） */
  pointer-events: none;
  transition: visibility 0s linear 0.14s;
}

.action-root.is-open {
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.action-panel {
  position: fixed; /* 用视口坐标，永远跟着被点的那一行 */
  left: 0;
  top: 0;
  width: 176px;
  padding: 6px;
  background: var(--panel-solid);
  box-shadow: inset 0 0 0 1px var(--cyan-1), 0 16px 40px rgba(0, 0, 0, 0.56);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  opacity: 0;
  transform: scale(0.93);
  transform-origin: 0 0;
  transition: opacity 0.14s ease, transform 0.14s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

.action-root.is-open .action-panel {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* 朝向决定动画从哪儿长出来 */
.action-panel.is-right {
  transform-origin: 0 50%;
}

.action-panel.is-left {
  transform-origin: 100% 50%;
}

.action-panel.is-bottom {
  transform-origin: 50% 0;
}

.action-panel.is-top {
  transform-origin: 50% 100%;
}

/* 指向被点行的小三角 */
.action-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--panel-solid);
  border: 1px solid var(--cyan-1);
  transform: rotate(45deg);
}

.action-panel.is-right .action-arrow {
  left: -6px;
  top: var(--arrow-y, 26px);
  margin-top: -5px;
  border-right: none;
  border-top: none;
}

.action-panel.is-left .action-arrow {
  right: -6px;
  top: var(--arrow-y, 26px);
  margin-top: -5px;
  border-left: none;
  border-bottom: none;
}

.action-panel.is-bottom .action-arrow {
  top: -6px;
  left: var(--arrow-x, 22px);
  margin-left: -5px;
  border-right: none;
  border-bottom: none;
}

.action-panel.is-top .action-arrow {
  bottom: -6px;
  left: var(--arrow-x, 22px);
  margin-left: -5px;
  border-left: none;
  border-top: none;
}

.action-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px 8px;
}

.action-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.action-name {
  font-size: 12.5px;
  font-weight: 600;
  max-width: 84px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.action-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.action-group {
  overflow: hidden;
  padding-top: 5px;
  border-top: 1px solid rgba(34, 232, 255, 0.12);
}

.action-item {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border-radius: 2px;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
  transition: background 0.13s ease, color 0.13s ease;
}

.action-item:hover {
  color: var(--ink);
  background: rgba(34, 232, 255, 0.1);
}

.action-ico {
  width: 14px;
  flex-shrink: 0;
  text-align: center;
  font-size: 12px;
  color: var(--cyan);
  opacity: 0.85;
}

.action-item:hover .action-ico {
  opacity: 1;
}

.action-item.danger {
  color: #ff7ab5;
}

.action-item.danger .action-ico {
  color: var(--magenta);
}

.action-item.danger:hover {
  background: rgba(255, 47, 158, 0.14);
}

/* 菜单正在指着的那一条（在线行 / 动态条目） */
.user.is-menu-target::before {
  content: '';
  position: absolute;
  inset: 1px -7px;
  border-radius: 2px;
  background: rgba(34, 232, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.42);
  pointer-events: none;
}

.feed.is-menu-target {
  background: rgba(34, 232, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.34);
}

/* ---------------- 身份设置弹窗 ---------------- */
.mask {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card {
  position: relative;
  width: min(340px, 100%);
  padding: 30px 26px 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(160deg, rgba(10, 30, 44, 0.98), rgba(4, 12, 20, 0.98));
  box-shadow: inset 0 0 0 1px var(--cyan-1), 0 26px 70px rgba(0, 0, 0, 0.6);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.card-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.card-desc {
  margin: 0 0 22px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------------- 登录 ---------------- */
.login-pill {
  gap: 6px;
  padding: 5px 11px;
  color: var(--cyan);
  background: rgba(34, 232, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.42);
  cursor: pointer;
  transition: all 0.18s ease;
}

.login-pill:hover {
  color: #021016;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 0 18px rgba(34, 232, 255, 0.42);
}

.login-ico {
  font-size: 11px;
  line-height: 1;
}

.login-text {
  font-size: 11.5px;
  letter-spacing: 0.5px;
}

/* 已登录：头像框亮一圈薄荷色（clip-path 会裁掉外阴影，所以用内描边） */
.me-avatar.is-logged {
  box-shadow: inset 0 0 0 1px rgba(92, 255, 200, 0.85), inset 0 0 12px rgba(92, 255, 200, 0.28);
}

.card-account {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 16px;
  padding: 8px 10px;
  border-radius: 2px;
  background: rgba(34, 232, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.14);
}

.acc-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(74, 107, 122, 0.9);
}

.acc-dot.is-on {
  background: var(--mint);
  box-shadow: 0 0 8px rgba(92, 255, 200, 0.85);
}

.acc-text {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.acc-btn {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 2px;
  font-size: 11px;
  color: var(--cyan);
  background: rgba(34, 232, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.34);
  cursor: pointer;
  transition: all 0.18s ease;
}

.acc-btn:hover {
  color: #021016;
  background: var(--cyan);
}

.acc-btn.ghost {
  color: var(--dim);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(74, 107, 122, 0.5);
}

.acc-btn.ghost:hover {
  color: #cfe4ec;
  background: rgba(255, 255, 255, 0.06);
}

.profile-input {
  width: 100%;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 2px;
  text-align: center;
  font-size: 14px;
  color: var(--ink);
  background: rgba(2, 8, 14, 0.8);
  box-shadow: inset 0 0 0 1px var(--cyan-2);
}

.profile-input:focus {
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.6);
}

.gender-row {
  width: 100%;
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.gender-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 11px 0;
  border-radius: 2px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.16);
  transition: all 0.16s ease;
}

.gender-opt:hover {
  box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.45);
}

.gender-opt.is-on {
  color: var(--mint);
  box-shadow: inset 0 0 0 1px var(--mint), 0 0 16px rgba(92, 255, 200, 0.16);
  background: rgba(92, 255, 200, 0.1);
}

.g-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
}

.card-btn {
  width: 100%;
  height: 44px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  color: #021016;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 0 20px rgba(34, 232, 255, 0.32);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.card-btn.ghost {
  margin-top: 8px;
  height: 34px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-weight: 400;
  clip-path: none;
}

/* ---------------- 轻提示 ---------------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--dock-h) + 24px);
  transform: translateX(-50%) translateY(6px);
  z-index: 80;
  padding: 9px 18px;
  border-radius: 2px;
  font-size: 13px;
  color: var(--ink);
  background: rgba(5, 17, 27, 0.95);
  box-shadow: inset 0 0 0 1px var(--cyan-1), 0 10px 30px rgba(0, 0, 0, 0.5);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   窄屏：面板改为贴底的抽屉，与输入坞上下叠放（与小程序一致）
   ========================================================================== */
@media (max-width: 899px) {
  .brand-sub {
    display: none;
  }

  .ledger {
    display: none;
  }

  .bottom {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    clip-path: none;
    box-shadow: inset 0 0 0 1px var(--cyan-2);
  }

  .panel {
    left: 0;
    right: 0;
    bottom: var(--dock-h);
    clip-path: none;
    max-height: 0;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
  }

  .panel.is-open {
    max-height: 56vh;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .panel-handle {
    display: flex;
    justify-content: center;
    padding: 8px 0 2px;
    cursor: pointer;
  }

  .handle-bar {
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: rgba(34, 232, 255, 0.3);
  }

  .panel-close {
    display: none;
  }

  .tabs {
    padding: 8px 14px 6px;
  }

  .toast {
    bottom: calc(var(--dock-h) + 46px);
  }
}

/* 窄屏：顶栏只留必要信息，把空间让给画布比例控件 */
@media (max-width: 640px) {
  .online-text {
    display: none;
  }

  /* 窄屏把倒计时条收掉，但保留「静水 / 预告 / 争食」——那是唯一有行动含义的字 */
  .chain-bar {
    display: none;
  }

  /* 状态只留呼吸点，给「我的资料」腾位置 */
  .status-text {
    display: none;
  }

  .status {
    padding: 6px 8px;
  }

  .me-avatar {
    width: 30px;
    height: 30px;
  }

  .brand-title {
    font-size: 14px;
    letter-spacing: 1.6px;
  }

  .topbar {
    padding: 11px 14px 12px;
  }

  /* 图案宫格：窄屏压缩 chip，保证两行放得下 */
  .shape-chip {
    height: 30px;
    padding: 0 9px;
    font-size: 11.5px;
    gap: 4px;
  }

  .shape-glyph {
    font-size: 14px;
  }
}

/* 桌面：面板贴在右侧，默认展开 */
@media (min-width: 900px) {
  .panel {
    top: 76px;
    right: 20px;
    width: 336px;
    bottom: 20px;
    opacity: 0;
    transform: translateX(calc(100% + 26px));
    pointer-events: none;
  }

  .panel.is-open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
}
