:root {
  --bg: #05111f;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8f4ff;
  --muted: #8fb3cc;
  --accent: #5eead4;
  --accent-2: #38bdf8;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 20% 0%, #0b2a45 0%, #05111f 55%, #030a12 100%);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
  color: inherit;
}

input,
textarea {
  font-family: inherit;
}

.app {
  position: relative;
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 背景气泡 */
.bg-bubbles span {
  position: absolute;
  bottom: -30px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(94, 234, 212, 0.16);
  animation: rise 14s linear infinite;
  pointer-events: none;
}

@keyframes rise {
  to {
    transform: translateY(-115vh) translateX(18px);
    opacity: 0;
  }
}

/* 顶栏 */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top)) 18px 10px;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 4px;
  font-weight: 700;
  background: linear-gradient(90deg, #5eead4, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar p {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.me-chip {
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* 内容区 */
.content {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding: 6px 16px 110px;
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  display: none;
}

.section-title {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  margin: 20px 2px 10px;
  font-weight: 600;
}

/* 水族箱 */
.tank {
  position: relative;
  height: 250px;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.16), rgba(4, 20, 34, 0.65));
  border: 1px solid rgba(94, 234, 212, 0.2);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.55), 0 18px 40px -20px rgba(56, 189, 248, 0.5);
}

.tank-bubbles span {
  position: absolute;
  bottom: -14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: tankRise 9s linear infinite;
}

@keyframes tankRise {
  from {
    transform: translateY(0);
    opacity: 0.7;
  }
  to {
    transform: translateY(-270px);
    opacity: 0;
  }
}

.swimmer {
  position: absolute;
  font-size: 28px;
  line-height: 1;
  padding: 3px;
  border: none;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 0 10px currentColor);
  animation: swim 8s ease-in-out infinite alternate;
  transition: transform 0.2s;
}

.swimmer:active {
  transform: scale(1.35);
}

.swimmer.mine {
  font-size: 36px;
  animation: swim 6s ease-in-out infinite alternate;
}

@keyframes swim {
  from {
    transform: translate(-14px, 0) rotate(-4deg);
  }
  to {
    transform: translate(16px, -9px) rotate(4deg);
  }
}

.tank-label {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(3, 12, 22, 0.55);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.tank-label strong {
  color: var(--accent);
  font-size: 13px;
}

/* 鱼卡片 */
.fish-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.fish-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 12px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.fish-card:active {
  transform: scale(0.97);
  background: var(--panel-2);
}

.fish-card-emoji {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 6px;
  box-shadow: 0 0 18px -4px currentColor;
}

.fish-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.fish-card-name em {
  font-style: normal;
  font-size: 10px;
  color: var(--accent);
  margin-left: 2px;
}

.fish-card-kind {
  font-size: 11px;
  color: var(--muted);
}

.fish-card-mood {
  font-size: 11px;
  color: rgba(232, 244, 255, 0.55);
  margin-top: 4px;
  line-height: 1.4;
}

/* 空状态 / 提示 */
.hint-card {
  margin-top: 30px;
  padding: 26px 20px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.empty-welcome {
  margin-top: 46px;
  text-align: center;
  padding: 30px 20px;
}

.big-emoji {
  font-size: 64px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 24px rgba(94, 234, 212, 0.4));
}

.big-emoji.small {
  font-size: 40px;
  margin-bottom: 8px;
}

.empty-welcome h2 {
  font-size: 20px;
  margin: 0 0 10px;
}

.empty-welcome p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 auto 22px;
  max-width: 280px;
}

/* 按钮 */
.primary-btn {
  border: none;
  cursor: pointer;
  padding: 13px 22px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #04211d;
  background: linear-gradient(120deg, #5eead4, #38bdf8);
  box-shadow: 0 10px 26px -12px rgba(94, 234, 212, 0.9);
  transition: transform 0.15s, opacity 0.2s;
}

.primary-btn:active {
  transform: scale(0.96);
}

.primary-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 14px;
  color: var(--text);
}

.ghost-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  padding: 8px 4px;
}

.ghost-btn.strong {
  color: var(--accent);
  font-weight: 600;
}

.ghost-btn:disabled {
  opacity: 0.35;
}

.mini-btn {
  border: 1px solid rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent);
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

/* 聊天列表 */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: none;
  background: var(--panel);
  border-radius: 18px;
  padding: 11px 13px;
  cursor: pointer;
}

.chat-row:active {
  background: var(--panel-2);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 0 16px -6px currentColor;
}

.chat-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.chat-row-top strong {
  font-size: 14px;
}

.chat-row-top time {
  font-size: 10px;
  color: var(--muted);
}

.chat-row-last {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 好友 */
.friend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border-radius: 18px;
  padding: 11px 13px;
}

.friend-row small {
  font-size: 12px;
  color: var(--muted);
}

/* 我的鱼 */
.mine-card {
  margin-top: 18px;
  padding: 26px 20px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: center;
}

.mine-big {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  font-size: 46px;
  box-shadow: 0 0 40px -10px currentColor;
}

.mine-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.mine-kind {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}

.mine-persona {
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 8px;
}

.mine-bio {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 12px;
}

.mine-mood {
  font-size: 12px;
  color: rgba(232, 244, 255, 0.6);
  margin: 0 0 18px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.stat {
  background: var(--panel);
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-size: 19px;
  color: var(--accent);
}

.stat span {
  font-size: 11px;
  color: var(--muted);
}

/* 底部标签 */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(5, 17, 31, 0), rgba(4, 13, 24, 0.94) 38%);
  backdrop-filter: blur(14px);
}

.tab {
  flex: 1;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0 4px;
  color: var(--muted);
  font-size: 10px;
  transition: color 0.2s;
  border-radius: 14px;
}

.tab-icon {
  font-size: 19px;
  filter: grayscale(0.7) opacity(0.75);
  transition: filter 0.2s, transform 0.2s;
}

.tab.on {
  color: var(--accent);
}

.tab.on .tab-icon {
  filter: none;
  transform: translateY(-1px) scale(1.08);
}

/* 底部弹层 */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(2, 8, 15, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.sheet {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, #0d2338, #071626);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(94, 234, 212, 0.22);
  padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  animation: slideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 16px;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.sheet-avatar {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: 0 0 30px -8px currentColor;
}

.sheet-head h2 {
  margin: 0 0 3px;
  font-size: 19px;
}

.sheet-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.sheet-persona {
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 6px;
}

.sheet-bio {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 8px;
}

.sheet-mood {
  font-size: 12px;
  color: rgba(232, 244, 255, 0.55);
  margin: 0 0 20px;
}

.sheet-actions {
  display: flex;
  gap: 10px;
}

.sheet-actions .primary-btn {
  flex: 1.3;
}

.sheet-actions .secondary-btn {
  flex: 1;
}

/* 表单 */
.form-page {
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 20% 0%, #0b2a45 0%, #05111f 60%, #030a12 100%);
}

.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top)) 18px 10px;
  border-bottom: 1px solid var(--line);
}

.form-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.form-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px calc(30px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.field > span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(94, 234, 212, 0.5);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(143, 179, 204, 0.5);
}

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

.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
}

.chip.on {
  border-color: rgba(94, 234, 212, 0.55);
  color: var(--accent);
  background: rgba(94, 234, 212, 0.1);
}

.swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}

.swatch.on {
  border-color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 14px -2px currentColor;
}

/* 聊天室 */
.chatroom {
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 20% 0%, #0b2a45 0%, #05111f 60%, #030a12 100%);
}

.chatroom-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 17, 31, 0.7);
  backdrop-filter: blur(10px);
}

.chatroom-who {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 0 14px -5px currentColor;
}

.chatroom-who strong {
  display: block;
  font-size: 14px;
}

.chatroom-who small {
  font-size: 10px;
  color: var(--muted);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}

.messages::-webkit-scrollbar {
  display: none;
}

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 86%;
}

.msg.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.bubble {
  padding: 10px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.msg.me .bubble {
  background: linear-gradient(120deg, rgba(94, 234, 212, 0.22), rgba(56, 189, 248, 0.22));
  border-color: rgba(94, 234, 212, 0.3);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
}

.bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.bubble time {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: rgba(143, 179, 204, 0.6);
  text-align: right;
}

.composer {
  display: flex;
  gap: 8px;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(5, 17, 31, 0.85);
  backdrop-filter: blur(10px);
}

.composer input {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.composer input:focus {
  border-color: rgba(94, 234, 212, 0.45);
}

.composer input::placeholder {
  color: rgba(143, 179, 204, 0.5);
}

.send-btn {
  border: none;
  cursor: pointer;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #04211d;
  background: linear-gradient(120deg, #5eead4, #38bdf8);
}

.send-btn:disabled {
  opacity: 0.35;
}

/* ===== v0.2 接入版 ===== */
.connect {
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
  gap: 14px;
  text-align: center;
}

.connect-art {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-size: 38px;
  margin-bottom: 6px;
}

.connect-art span:nth-child(1),
.connect-art span:nth-child(3) {
  font-size: 20px;
  opacity: 0.7;
  animation: rise 9s linear infinite;
}

.connect-art span:nth-child(2) {
  font-size: 58px;
  filter: drop-shadow(0 0 24px rgba(94, 234, 212, 0.5));
  animation: swim 6s ease-in-out infinite alternate;
}

.connect h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 2px;
}

.connect p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 300px;
}

.connect input {
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.connect input:focus {
  border-color: rgba(94, 234, 212, 0.5);
}

.connect .primary-btn {
  width: 100%;
  max-width: 340px;
}

.connect-error {
  color: #fda4af !important;
  font-size: 12px;
}

.connect small {
  font-size: 11px;
  color: rgba(143, 179, 204, 0.65);
  line-height: 1.7;
  max-width: 300px;
}

.loading-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.loading-whale {
  font-size: 56px;
  animation: swim 4s ease-in-out infinite alternate;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
}

.refresh-btn.spinning {
  animation: spin 1s linear infinite;
}

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

.banner {
  margin: 0 16px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  font-size: 12px;
  line-height: 1.6;
}

.banner.ok {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.table-action {
  flex: 0 0 auto;
  border: 1px solid rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent);
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.table-action:disabled {
  opacity: 0.4;
}

.place-chip {
  cursor: pointer;
}

.place-chip:active {
  background: var(--panel-2);
}

.mine-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 2px 0;
}

.mine-status span {
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.sheet-actions .primary-btn {
  flex: 1;
}

.mine-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-top: 6px;
}

.mine-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 0 26px -8px currentColor;
}

.mine-hero-body {
  flex: 1;
  min-width: 0;
}

.mine-hero-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mine-hero-title h2 {
  margin: 0;
  font-size: 18px;
}

.badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.3);
}

.mine-hero-state {
  margin: 4px 0 2px;
  font-size: 11px;
  color: var(--muted);
}

.mine-hero-doing {
  margin: 0;
  font-size: 12px;
  color: rgba(232, 244, 255, 0.75);
  line-height: 1.5;
}

.stat-row.three {
  grid-template-columns: repeat(3, 1fr);
}

.stat-row.two {
  grid-template-columns: repeat(2, 1fr);
}

.stat-chip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 6px;
  text-align: center;
}

.stat-chip strong {
  display: block;
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 3px;
}

.stat-chip span {
  font-size: 10px;
  color: var(--muted);
}

.fish-pool {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}

.fish-pool::-webkit-scrollbar {
  display: none;
}

.pool-fish {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  min-width: 76px;
}

.pool-fish:active {
  background: var(--panel-2);
}

.pool-fish-emoji {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.pool-fish-name {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pool-fish-tag {
  font-size: 9px;
  color: var(--muted);
}

.table-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.table-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.table-game {
  flex: 0 0 auto;
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.24);
}

.table-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-main strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-main small {
  font-size: 10px;
  color: var(--muted);
}

.table-seat {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.table-seat.hot {
  color: var(--accent);
}

.more-line {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 0 0;
}

.place-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.place-row::-webkit-scrollbar {
  display: none;
}

.place-chip {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: rgba(232, 244, 255, 0.8);
}

.info-card {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.info-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}

.info-card p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.info-card small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.info-card .mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--accent);
  font-size: 14px;
}

.mine-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-bottom: 10px;
}

.ghost-btn.danger {
  color: #fda4af;
}

.fish-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fish-list .friend-row {
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sheet-tip {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 4px;
  line-height: 1.6;
}

/* ===== v0.4 自建账号 ===== */
.auth {
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
  gap: 12px;
  text-align: center;
}

.auth-art {
  display: flex;
  gap: 4px;
  align-items: flex-end;
}

.auth-art span:nth-child(1) {
  font-size: 20px;
  opacity: 0.7;
}

.auth-art span:nth-child(2) {
  font-size: 62px;
  filter: drop-shadow(0 0 24px rgba(94, 234, 212, 0.5));
  animation: swim 6s ease-in-out infinite alternate;
}

.auth h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 6px;
  background: linear-gradient(90deg, #5eead4, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--panel);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-top: 6px;
}

.auth-tab {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-tab.on {
  background: rgba(94, 234, 212, 0.14);
  color: var(--accent);
}

.auth input {
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.auth input:focus {
  border-color: rgba(94, 234, 212, 0.5);
}

.auth .primary-btn {
  width: 100%;
  max-width: 340px;
  margin-top: 4px;
}

.auth-error {
  color: #fda4af;
  font-size: 12px;
  margin: 0;
}

.auth small {
  font-size: 11px;
  color: rgba(143, 179, 204, 0.6);
}

.create-fish {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 30px;
  text-align: center;
}

.create-fish h2 {
  margin: 0;
  font-size: 20px;
}

.create-fish p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 300px;
}

.create-fish input,
.create-fish textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  resize: none;
}

.create-fish .primary-btn {
  width: 100%;
}

.code-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.1), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(94, 234, 212, 0.3);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.code-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}

.code-text {
  margin: 0 0 10px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--accent);
  word-break: break-all;
  user-select: all;
}

.code-box small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

/* ================= 鱼缸 v2 补充 ================= */
.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.msg-row.me {
  flex-direction: row-reverse;
}
.avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.msg-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 78%;
}
.msg-row.me .msg-col {
  align-items: flex-end;
}
.msg-name {
  font-size: 9px;
  color: rgba(143, 179, 204, 0.65);
  padding: 0 4px;
}
.bubble {
  max-width: 100%;
}
.msg-row.me .bubble {
  background: linear-gradient(120deg, rgba(94, 234, 212, 0.26), rgba(56, 189, 248, 0.18));
  border-color: rgba(94, 234, 212, 0.35);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
}

.section-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.section-card .section-title {
  margin: 0 0 8px;
}
.muted-line {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 4px 0 10px;
}
.row-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.row-inline .primary-btn,
.row-inline .secondary-btn {
  flex: 1;
}
select {
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
}
.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.chip.on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(94, 234, 212, 0.1);
}
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feed-line {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  gap: 6px;
}
.feed-emoji {
  flex: 0 0 auto;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  background: rgba(8, 26, 42, 0.96);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  max-width: 80vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
body.in-chat {
  overflow: hidden;
}
