/* ==========================================================================
   FurryBox — 设计系统
   --------------------------------------------------------------------------
   参考 yunamo.com 的设计语言（不是照抄配色，而是同一套做法）：
     · 深黑实色底 + 实色卡片分层，不用半透明玻璃
     · 1px 极细描边，靠 line 色区分层次
     · 单一强调色（薄荷绿），不用渐变
     · 等宽字体用于域名与数值
     · 圆角分层：10 / 16 / 20

   三个站点（www / id / my）共用。
   ========================================================================== */

/* 字体：Geist / Geist Mono 本地自托管（latin 子集，可变字体）
   Space Grotesk 只用于品牌字 FurryBox
   中文回落到系统字体，不加载中文字体文件 */
@import url("fonts/geist.css");
@import url("fonts/brand.css");

:root {
  /* ---- 底色与面 ---- */
  --bg: #0a0b0d;
  --surface: #111316;
  --surface-2: #1a1d21;
  --surface-3: #22262b;

  /* ---- 线 ---- */
  --line: #22262b;
  --line-strong: #2a2e35;

  /* ---- 文字 ---- */
  --text: #ededed;
  --muted: #9aa0a8;
  --faint: #6b7179;

  /* ---- 强调色 ---- */
  --mint: #3ee6b4;
  --mint-deep: #0b8f6a;
  --mint-text: #3ee6b4;
  --on-mint: #04110c;

  /* ---- 状态 ---- */
  --ok: #3ee6b4;
  --warn: #f2c14e;
  --danger: #ff5a52;
  --danger-text: #ff8a84;
  --info: #7ab8ff;

  /* ---- 圆角 ---- */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
  --r-pill: 9999px;
  --dot-rgb: 255 255 255;

  /* ---- 字体 ---- */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC",
    system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo,
    Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  /* 品牌字：几何感强，用于 FurryBox 字样 */
  --font-brand: "Space Grotesk", "Geist", system-ui, sans-serif;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1;
}

/* ---------------------------------------------------------------- 背景 */

/* yunamo 控制台几乎纯黑。这里用极淡的径向渐变，不抢内容。 */
.fbx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 80% 50% at 50% -10%,
      rgba(62, 230, 180, 0.05),
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 40% at 90% 100%,
      rgba(122, 184, 255, 0.025),
      transparent 60%
    );
}

/* 噪点极轻，只让纯黑不发死 */
.fbx-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- 外壳 */

.fbx-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(16px, 4vw, 40px) 40px;
}

/* ---------------------------------------------------------------- 顶栏 */

.fbx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  height: 62px;
  border-bottom: 1px solid var(--line);
}

.fbx-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex: none;
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
}

.fbx-brand b {
  font-weight: 700;
  color: var(--mint);
}

/* 右侧动作区：扁平，不用浮岛 */
.fbx-island {
  display: flex;
  align-items: center;
  gap: 2px;
}

.fbx-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fbx-pill:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.fbx-pill svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.fbx-pill b {
  color: var(--mint-text);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
}

.fbx-island .fbx-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 6px;
  flex: none;
}

/* ==========================================================================
   语言切换器
   --------------------------------------------------------------------------
   放在顶栏钱包胶囊左边。视觉上与 .fbx-pill 同一套（透明底 + hover 变面）。
   ========================================================================== */

.fbx-lang {
  position: relative;
  display: inline-flex;
  flex: none;
}

/* 各站给切换器预留的挂载点：本身不占空间，只作为定位容器 */
.nav-lang-slot,
.auth-lang-slot {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.fbx-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fbx-lang-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.fbx-lang-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* 下拉箭头比地球小一号 */
.fbx-lang-btn svg:last-of-type {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform 0.18s var(--ease-out, ease);
}

.fbx-lang-btn[aria-expanded="true"] svg:last-of-type {
  transform: rotate(180deg);
}

.fbx-lang-cur {
  font-size: 12.5px;
  font-weight: 500;
}

/* ---- 菜单 ---- */
.fbx-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 148px;
  padding: 5px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.5);
  animation: fbx-lang-in 0.14s ease both;
}

@keyframes fbx-lang-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fbx-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.fbx-lang-item:hover {
  background: var(--surface-3);
  color: var(--text);
}

.fbx-lang-item.on {
  color: var(--mint-text);
}

.li-tick {
  font-size: 12px;
  color: var(--mint-text);
}

/* 窄屏只留图标，省空间 */
@media (max-width: 560px) {
  .fbx-lang-cur,
  .fbx-lang-btn svg:last-of-type {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fbx-lang-menu {
    animation: none;
  }
  .fbx-lang-btn svg:last-of-type {
    transition: none;
  }
}

.fbx-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mint-text);
  border: 1px solid var(--line);
  flex: none;
}

/* ---------------------------------------------------------------- 按钮 */

.fbx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
}

.fbx-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.fbx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 主按钮 = yunamo 的 .y-btn-ink-block：反色白胶囊，不是薄荷绿实心 */
.fbx-btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.fbx-btn-primary:hover:not(:disabled) {
  background: #fff;
  border-color: transparent;
}

.fbx-btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.fbx-btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.fbx-btn-quiet {
  background: transparent;
  color: var(--muted);
  padding: 9px 11px;
}

.fbx-btn-quiet:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-2);
}

.fbx-btn-danger {
  background: transparent;
  color: var(--faint);
}

.fbx-btn-danger:hover:not(:disabled) {
  color: var(--danger-text);
  background: rgba(255, 90, 82, 0.08);
}

/* ---------------------------------------------------------------- 表单 */

.fbx-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.fbx-label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.fbx-input,
.fbx-select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.fbx-input::placeholder {
  color: var(--faint);
}

.fbx-input:focus,
.fbx-select:focus {
  border-color: var(--mint-deep);
  background: var(--surface);
}

.fbx-input.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.fbx-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236b7179' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.fbx-select option {
  background: var(--surface-2);
  color: var(--text);
}

.fbx-hint {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.55;
}

.fbx-hint.error {
  color: var(--danger-text);
}

.fbx-hint.ok {
  color: var(--mint-text);
}

/* ---------------------------------------------------------------- 状态 */

.fbx-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.fbx-status .fbx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.fbx-status.ok {
  color: var(--mint-text);
}
.fbx-status.ok .fbx-dot {
  background: var(--mint);
  box-shadow: 0 0 10px rgba(62, 230, 180, 0.7);
}

.fbx-status.warn {
  color: var(--warn);
}
.fbx-status.warn .fbx-dot {
  background: var(--warn);
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.6);
}

.fbx-status.bad {
  color: var(--danger-text);
}
.fbx-status.bad .fbx-dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 90, 82, 0.6);
}

/* ---------------------------------------------------------------- 面板 */

.fbx-panel {
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.fbx-tile {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------- 表格 */

.fbx-table {
  width: 100%;
  border-collapse: collapse;
}

.fbx-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.fbx-table thead th.r {
  text-align: right;
}

.fbx-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13.5px;
}

.fbx-table tbody tr:last-child td {
  border-bottom: none;
}

.fbx-table tbody tr {
  transition: background 0.12s;
}

.fbx-table tbody tr:hover {
  background: var(--surface-2);
}

.fbx-table td.r {
  text-align: right;
}

/* ---------------------------------------------------------------- 提示条 */

.fbx-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid;
}

.fbx-alert svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
}

.fbx-alert.error {
  background: rgba(255, 90, 82, 0.07);
  border-color: rgba(255, 90, 82, 0.28);
  color: var(--danger-text);
}

.fbx-alert.ok {
  background: rgba(62, 230, 180, 0.06);
  border-color: rgba(62, 230, 180, 0.25);
  color: var(--mint-text);
}

.fbx-alert.info {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.fbx-alert.warn {
  background: rgba(242, 193, 78, 0.06);
  border-color: rgba(242, 193, 78, 0.25);
  color: var(--warn);
}

/* ---------------------------------------------------------------- 加载 */

.fbx-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--mint);
  animation: fbx-spin 0.7s linear infinite;
  flex: none;
}

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

.fbx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  color: var(--faint);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- 工具 */

.fbx-mono {
  font-family: var(--font-mono);
}

.fbx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* hidden 属性必须压过组件自身的 display */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .fbx-spinner {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   以下工具类逐项对齐 yunamo.com 的实现
   证据：_rebuild/mirror/assets/index-C8OdA-Aj.css
   ========================================================================== */

/* ---- 点阵背景（登录/控制台用） ---- */
.y-dot-grid {
  position: absolute;
  inset: 0;
  z-index: -20;
  background-image: radial-gradient(rgb(var(--dot-rgb) / 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}

/* ---- 中心光晕 ---- */
.y-glow {
  position: absolute;
  z-index: -10;
  background: radial-gradient(closest-side, rgb(62 230 180 / 0.16), transparent);
}

/* ---- 标题 ---- */
.y-headline {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--text);
}

.y-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint-text);
}

.y-container {
  margin-inline: auto;
  width: 100%;
  max-width: 1160px;
  padding-inline: 20px;
}

/* ---- 反色胶囊按钮（yunamo 的主 CTA 样式） ---- */
.y-btn-ink-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 20px;
  border: none;
  border-radius: 9999px;
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.y-btn-ink-block:hover:not(:disabled) {
  box-shadow: 0 0 0 3px rgb(62 230 180 / 0.25);
}

/* ---- 链接瓦片 ---- */
.y-link-tile {
  display: block;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

/* ---- 小标签 ---- */
.y-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- 活点 ---- */
.y-dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--mint);
  box-shadow: 0 0 10px rgb(62 230 180 / 0.7);
}

/* ============================================================================
   按钮反馈 · 全局基础层
   ----------------------------------------------------------------------------
   目的：让**每一个**按钮点下去都有反应，不管它是哪个站点的哪个类。

   之前只有 my 站的 .fbx-btn/.oauth-btn/.dlg-btn 几个类有 :active，
   首页的 search-submit、starry 的 submit/linkbtn 点下去毫无反馈 ——
   用户会觉得"点了没反应"，怀疑是不是卡了。

   设计原则：
     · 按压用 opacity + 1px 下沉，不用 scale —— scale 会让文字重排发虚
     · 只用 :active，不用 JS，零成本
     · 不碰背景色/边框，避免和已有 hover 规则打架
     · 全部走 CSS 变量，各站可覆盖

   放在 design.css（三站共享）而不是各站自己的 css，
   这样新加的按钮天然就有反馈，不用每次记得去补。
   ========================================================================== */

/* 1) 所有按钮、按钮样式的链接、可点卡片 */
button,
[role="button"],
input[type="submit"],
input[type="button"],
.fbx-btn,
.fbx-btn-quiet,
.fbx-btn-primary,
.y-btn-ink-block,
.search-submit,
.motion-toggle,
.oauth-btn,
.dlg-btn,
.side-new,
.btn-block,
.submit,
.linkbtn,
.link-quiet,
.explore-link,
.preview-domain,
.account-link,
.grant-revoke {
  transition:
    opacity 0.12s ease,
    transform 0.12s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  /* 移动端点按不要出灰蓝色高亮块 */
  -webkit-tap-highlight-color: transparent;
}

/* 2) 按下去：轻微下沉 + 压暗。用 translateY 而不是 scale，
      文字不会因为缩放重采样而发虚。 */
button:active:not(:disabled),
[role="button"]:active:not(:disabled),
input[type="submit"]:active:not(:disabled),
input[type="button"]:active:not(:disabled),
.fbx-btn:active:not(:disabled),
.fbx-btn-quiet:active:not(:disabled),
.fbx-btn-primary:active:not(:disabled),
.y-btn-ink-block:active:not(:disabled),
.search-submit:active:not(:disabled),
.motion-toggle:active:not(:disabled),
.oauth-btn:active:not(:disabled),
.dlg-btn:active:not(:disabled),
.side-new:active:not(:disabled),
.btn-block:active:not(:disabled),
.submit:active:not(:disabled),
.explore-link:active:not(:disabled),
.preview-domain:active,
.account-link:active,
.grant-revoke:active:not(:disabled) {
  transform: translateY(1px);
  opacity: 0.88;
}

/* 链接式按钮（文字按钮）下沉会显得别扭，只压暗 */
.linkbtn:active:not(:disabled),
.link-quiet:active:not(:disabled) {
  transform: none;
  opacity: 0.62;
}

/* 3) 键盘可达性：:focus-visible 给一圈薄荷色描边。
      鼠标点击不会触发，只有 Tab 过去才出现 —— 
      不影响视觉，但键盘用户能看清自己在哪。 */
button:focus-visible,
[role="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
a:focus-visible,
.fbx-btn:focus-visible,
.search-submit:focus-visible,
.submit:focus-visible,
.linkbtn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: inherit;
}

/* 4) 禁用态：明确告诉用户点不了，别让他反复试 */
button:disabled,
.fbx-btn:disabled,
.submit:disabled,
.btn-block:disabled,
.grant-revoke:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* 5) 降级：偏好减少动态效果时，去掉位移，只保留压暗 */
@media (prefers-reduced-motion: reduce) {
  button:active:not(:disabled),
  [role="button"]:active:not(:disabled),
  input[type="submit"]:active:not(:disabled),
  input[type="button"]:active:not(:disabled),
  .fbx-btn:active:not(:disabled),
  .fbx-btn-quiet:active:not(:disabled),
  .fbx-btn-primary:active:not(:disabled),
  .y-btn-ink-block:active:not(:disabled),
  .search-submit:active:not(:disabled),
  .motion-toggle:active:not(:disabled),
  .oauth-btn:active:not(:disabled),
  .dlg-btn:active:not(:disabled),
  .side-new:active:not(:disabled),
  .btn-block:active:not(:disabled),
  .submit:active:not(:disabled),
  .explore-link:active:not(:disabled),
  .preview-domain:active,
  .account-link:active,
  .grant-revoke:active:not(:disabled) {
    transform: none !important;
  }
}


/* ============================================================================
   开关（checkbox 的样式化包装）
   ----------------------------------------------------------------------------
   用在账户设置里。原生 checkbox 太小且不可控外观，
   这里用 label + span 做成滑动开关，无障碍属性仍由 input 提供。
   ========================================================================== */
.fbx-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fbx-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fbx-switch-track {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line-strong);
  transition: background 0.18s, border-color 0.18s;
}

.fbx-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s, background 0.18s;
}

.fbx-switch input:checked + .fbx-switch-track {
  background: rgba(62, 230, 180, 0.22);
  border-color: rgba(62, 230, 180, 0.5);
}

.fbx-switch input:checked + .fbx-switch-track .fbx-switch-thumb {
  transform: translateX(18px);
  background: var(--mint);
}

.fbx-switch input:focus-visible + .fbx-switch-track {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.fbx-switch input:disabled + .fbx-switch-track {
  opacity: 0.45;
  cursor: default;
}


/* ==========================================================================
   FurryBox 控制台 (my.furry.box) — 页面级样式
   基础设计系统来自 design.css（构建时合并进 style.css）
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- 返回 */

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
  transition: color 0.15s;
}

.back:hover {
  color: var(--text);
}

.back svg {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------------- 页头 */

.pagehead {
  padding: 32px 0 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.pagehead .l h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.pagehead .l p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.pagehead .l p b {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 600;
}

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

.headmain .txt {
  min-width: 0;
}

.headmain h1 {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-all;
  color: var(--text);
}

.headmeta {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
}

.headmeta .sep {
  color: var(--line-strong);
}

.heaactions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- 统计条 */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.stat .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.stat .v {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.stat .v small {
  font-size: 13px;
  color: var(--faint);
  font-weight: 400;
  margin-left: 3px;
}

.stat .sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- 工具条 */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.seg {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.seg button {
  padding: 6px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
}

.seg button:hover {
  color: var(--text);
}

.seg button.on {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 500;
}

.seg button span {
  opacity: 0.45;
  margin-left: 2px;
  font-family: var(--font-mono);
}

.search {
  flex: 1;
  min-width: 180px;
  max-width: 300px;
  position: relative;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: 0.15s;
}

.search input::placeholder {
  color: var(--faint);
}

.search input:focus {
  border-color: var(--mint-deep);
  background: var(--surface-2);
}

/* ---------------------------------------------------------------- 域名行 */

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

/* yunamo 用单色 icon-tile，不用彩色渐变 */
.mark {
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--mint-text);
}

.mark svg {
  width: 56%;
  height: 56%;
  display: block;
}

.dcell .txt {
  min-width: 0;
}

.dcell .nm {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dcell .sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--faint);
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------- 到期 */

.exp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.exp small {
  display: block;
  font-size: 11px;
  color: var(--faint);
  margin-top: 1px;
}

.exp.warn {
  color: var(--warn);
}

.exp.bad {
  color: var(--danger-text);
}

/* ---------------------------------------------------------------- 模式 */

.mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.mode svg {
  width: 13px;
  height: 13px;
  color: var(--faint);
  flex: none;
}

/* ---------------------------------------------------------------- 按钮组 */

.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
}

.mini:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.mini:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mini svg {
  width: 13px;
  height: 13px;
}

/* 行内主操作：yunamo 在列表里用中性胶囊，不抢 mint 强调色 */
.mini.primary {
  background: var(--text);
  border-color: transparent;
  color: var(--bg);
  font-weight: 600;
}

.mini.primary:hover:not(:disabled) {
  background: #fff;
  border-color: transparent;
}

/* ---------------------------------------------------------------- 空状态 */

.empty {
  padding: 64px 24px;
  text-align: center;
}

.empty .ic {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.empty .ic svg {
  width: 21px;
  height: 21px;
  color: var(--faint);
}

.empty h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.empty p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 40ch;
  margin: 0 auto 20px;
  line-height: 1.65;
}

/* ---------------------------------------------------------------- 底部提示 */

.note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.note svg {
  width: 13px;
  height: 13px;
  flex: none;
}

/* ---------------------------------------------------------------- 预览地址 */

.previewbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.previewbar .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.previewbar .url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--mint-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.previewbar .url:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.previewbar .cp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s;
  flex: none;
}

.previewbar .cp:hover {
  background: var(--surface-3);
  color: var(--text);
}

.previewbar .cp svg {
  width: 12px;
  height: 12px;
}

/* ---------------------------------------------------------------- 记录类型 */

.tt {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* 只用薄荷绿/蓝/黄的深浅区分，不用彩虹色 */
.tt.a      { background: rgba(62,230,180,.13); color: #7ff0cd; border-color: rgba(62,230,180,.22); }
.tt.aaaa   { background: rgba(62,230,180,.10); color: #6ddcc0; border-color: rgba(62,230,180,.18); }
.tt.cname  { background: rgba(122,184,255,.12); color: #9ccdff; border-color: rgba(122,184,255,.22); }
.tt.mx     { background: rgba(242,193,78,.12); color: #f5d080; border-color: rgba(242,193,78,.22); }
.tt.txt    { background: rgba(154,160,168,.12); color: #b8bec6; border-color: rgba(154,160,168,.2); }
.tt.srv    { background: rgba(122,184,255,.09); color: #8abff5; border-color: rgba(122,184,255,.18); }
.tt.caa    { background: rgba(242,193,78,.09); color: #e8c773; border-color: rgba(242,193,78,.18); }
.tt.ns     { background: rgba(62,230,180,.08); color: #63d6b3; border-color: rgba(62,230,180,.16); }

.nm {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

.val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.5;
}

.pri {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.iconbtn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: 0.15s;
}

.iconbtn:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--line);
}

.iconbtn.del:hover:not(:disabled) {
  background: rgba(255, 90, 82, 0.1);
  color: var(--danger-text);
}

.iconbtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.iconbtn svg {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------------- 添加记录 */

.addform {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
}

.addform h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.addform h3 svg {
  width: 15px;
  height: 15px;
  color: var(--mint-text);
}

.fields {
  display: grid;
  grid-template-columns: 130px minmax(120px, 1fr) minmax(200px, 2fr);
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.addfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.addfoot .tip {
  font-size: 12px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.addfoot .tip svg {
  width: 12px;
  height: 12px;
  flex: none;
}

/* ---------------------------------------------------------------- 弹窗 */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 5, 7, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  padding: 24px;
}

.modal h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

/* ---------------------------------------------------------------- 账户设置 */

/*
 * 这里的坑：.fbx-panel 没有 padding（只做圆角和 overflow 裁剪），
 * 内边距全靠 .panel-head 自己给（16px 18px）。
 * 所以面板内任何内容块都必须自带左右 padding，否则会贴着卡片边框，
 * 标题和内容左边就对不齐。
 *
 * 另一个坑：内容列如果写成 minmax(0, 1fr)，值 / 输入框会被拉到列的右端，
 * 在宽卡片里看起来就是"字靠最左、框也靠最左、右边一大片空"。
 * 所以这里改成固定宽度的标签列 + 自适应但**有上限**的内容列，整块居中。
 */

/* #view(.wrap) 是 flex column 容器，所以这里的 max-width 只会让内容变窄，
   不会自动居中——必须配 width:100% + margin:0 auto，否则整块贴在左上角。 */
.acct-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* 账户页改两栏后需要更宽：
   720px 塞两栏会让每栏只剩 350px，表格直接挤成一团。
   这里放宽到 1120px，两栏各约 550px，表格有足够空间。 */
.acct-page:has(.acct-2col) {
  max-width: 1120px;
}

/* 键值表 */
.set-rows {
  display: flex;
  flex-direction: column;
  padding: 4px 18px 18px;
}

.set-row {
  display: grid;
  /* 标签列固定，内容列占剩余宽度但不无限拉伸 */
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 5px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.set-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.set-row:first-child {
  padding-top: 16px;
}

/* display:contents 让 label / hint / value 直接成为网格项，
   再用显式 grid-row 排布，这样 hint 能单独换到第二行 */
.set-k {
  display: contents;
}

.set-label {
  grid-column: 1;
  grid-row: 1;
  font-size: 13px;
  line-height: 20px;
  color: var(--faint);
  white-space: nowrap;
}

.set-v {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  line-height: 20px;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.set-v.mono-sm {
  color: var(--text);
}

.set-hint {
  grid-column: 2;
  grid-row: 2;
  font-size: 12px;
  line-height: 1.65;
  color: var(--faint);
  max-width: 52ch;
}

/*
  开关型设置行：左边「标签 + 说明」，右边开关。

  默认布局的标签列固定 96px 且 white-space: nowrap，
  "Show email in WHOIS" / "在 WHOIS 显示邮箱" 这种长标签会溢出到
  内容列、压住右边的开关。这里单独换一套栅格。
*/
.set-row--switch {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.set-row--switch .set-k {
  display: block; /* 不再 display: contents，让标签/说明在左列自己成块 */
  grid-column: 1;
  grid-row: 1;
}

.set-row--switch .set-label {
  display: block;
  white-space: normal;
}

.set-row--switch .set-hint {
  display: block;
  margin-top: 4px;
  max-width: 60ch;
}

.set-row--switch .set-v {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  /*
    .acct-card 有 22px 内边距，.set-rows 又加了 18px 左右内边距，
    开关会停在离卡片边缘 40px 的位置，看起来比标题还靠里。
    往右拉 18px，让它落在卡片自身的内边距线上（距边 22px）。
  */
  margin-right: -18px;
}

/* 登录方式标签 */
.set-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.set-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 9999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* 密码表单：与键值表用同一套标签列，视觉上连成一体 */
.set-form {
  display: grid;
  /*
    标签列 96px 放不下 "Current password" / "Confirm new password"，
    会截断成 "passw"。加到 124px 让它们单行放下。
  */
  grid-template-columns: 124px minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 14px;
  padding: 16px 18px 20px;
  /* 输入框不要拉满整张卡；给一个足够宽松但仍有边界的上限 */
  max-width: 520px;
}

.set-field {
  display: contents;
}

.set-field label {
  grid-column: 1;
  font-size: 13px;
  line-height: 20px;
  /* 和输入框首行基线对齐（输入框 min-height 44 → 文字垂直居中约 12px） */
  padding-top: 12px;
  color: var(--faint);
  /*
    不要 nowrap：英文标签（"Current password" / "Confirm new password"）
    在窄栏里会被截断成 "passw"、"passwo"。
    允许换行，行高和 padding 已对齐，两行也不会错位。
  */
  min-width: 0;
}

.set-field .fbx-input {
  grid-column: 2;
  width: 100%;
}

.set-form .fbx-hint.error,
.set-actions {
  grid-column: 2;
}

.set-actions {
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 560px) {
  .set-rows {
    padding: 4px 16px 16px;
  }

  .set-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
    padding: 14px 0;
  }

  .set-row:first-child {
    padding-top: 14px;
  }

  .set-label,
  .set-v,
  .set-hint {
    grid-column: 1;
    grid-row: auto;
  }

  /* 开关行在窄屏回到单列：开关换到标签下方，左对齐，取消桌面端的右拉 */
  .set-row--switch {
    grid-template-columns: minmax(0, 1fr);
  }

  .set-row--switch .set-v {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin-right: 0;
  }

  .set-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    max-width: none;
  }

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

  .set-field label {
    padding-top: 0;
  }

  .set-actions {
    display: block;
  }
}

/* ---------------------------------------------------------------- 钱包页 */

.acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.acct-card {
  padding: 22px;
}

.acct-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.acct-big {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 10px;
  color: var(--text);
}

.acct-mono {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 12px;
  color: var(--mint-text);
  word-break: break-all;
}

.acct-sub {
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 8px;
  line-height: 1.6;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.mono-sm {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.amt {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.amt.pos {
  color: var(--mint-text);
}

.amt.neg {
  color: var(--danger-text);
}

/* ---------------------------------------------------------------- toast */

.fbx-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 12px);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.9);
  font-size: 13.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  max-width: min(90vw, 520px);
}

.fbx-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fbx-toast svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.fbx-toast.ok svg {
  color: var(--mint-text);
}

.fbx-toast.error svg {
  color: var(--danger-text);
}

.fbx-toast.info svg {
  color: var(--muted);
}

/* ---------------------------------------------------------------- 骨架屏 */

.sk {
  display: inline-block;
  border-radius: 6px;
  background: var(--surface-2);
  animation: sk-pulse 1.5s ease-in-out infinite;
}

@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.sk-page {
  width: 100%;
  padding-top: 32px;
}

.sk-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.sk-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sk-table {
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.sk-row:last-child {
  border-bottom: none;
}

.sk-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .sk {
    animation: none;
  }
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 860px) {
  .hide-sm {
    display: none;
  }
}

@media (max-width: 700px) {
  .fields {
    grid-template-columns: 1fr;
  }

  .fbx-table thead {
    display: none;
  }

  .fbx-table tbody td {
    display: block;
    padding: 0;
    border: none;
  }

  .fbx-table tbody tr {
    display: block;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
  }

  .fbx-table tbody tr:hover {
    background: transparent;
  }

  .dcell {
    margin-bottom: 12px;
  }

  .act {
    justify-content: flex-start;
    margin-top: 12px;
    width: 100%;
  }

  .act .mini {
    flex: 1;
  }

  .toolbar .seg {
    overflow-x: auto;
    max-width: 100%;
  }

  .search {
    max-width: 100%;
  }
}


/* ==========================================================================
   主从布局（yunamo 风格：左列表 + 右详情）
   取代原来的「域名列表页 → 跳转 DNS 页」两页结构
   ========================================================================== */

.console {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 56px;
}

@media (max-width: 900px) {
  .console {
    grid-template-columns: 1fr;
    gap: 16px;
    /* 移动端保持原来的紧凑间距，不跟随桌面的 40px */
    padding-top: 16px;
  }
}

/* ---------------------------------------------------------------- 左侧 */

.console-side {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  max-height: calc(100vh - 100px);
}

@media (max-width: 900px) {
  .console-side {
    position: static;
    max-height: none;
  }
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
}

.side-head h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  flex: none;
}

/* 自己的 PID：紧挨标题，点一下复制。margin-right:auto 把它按在左边，
   同时把右边的「+」推回最右侧。 */
.side-pid {
  flex: none;
  margin-right: auto;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    background var(--dur-fast) ease;
}

.side-pid:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.side-pid.is-copied {
  color: var(--mint);
  border-color: rgba(62, 230, 180, 0.5);
  background: rgba(62, 230, 180, 0.08);
}

.side-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: none;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.side-new:hover {
  background: var(--text);
  color: var(--bg);
}

.side-new svg {
  width: 15px;
  height: 15px;
}

.side-filter {
  padding: 0 10px 10px;
}

.side-search {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s;
}

.side-search::placeholder {
  color: var(--faint);
}

.side-search:focus {
  border-color: var(--mint);
}

.side-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 6px 6px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 8px;
  margin-bottom: 1px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.side-item:hover {
  background: var(--surface-2);
}

.side-item.on {
  background: var(--surface-2);
}

.si-mark {
  display: inline-flex;
  flex: none;
}

.si-mark .mark {
  border-radius: 7px;
}

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

.si-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-item.on .si-name {
  color: var(--text);
}

.si-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--faint);
}

.si-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--faint);
}

.si-dot.ok {
  background: #52d99b;
  box-shadow: 0 0 7px rgb(82 217 155 / 0.8);
}

/* 永久域名：薄荷色实心点，比「正常」更亮，一眼能认出来 */
.si-dot.perm {
  background: var(--mint);
  box-shadow: 0 0 9px rgb(62 230 180 / 0.9);
}

.si-dot.warn {
  background: #f2c14e;
  box-shadow: 0 0 7px rgb(242 193 78 / 0.8);
}

.si-dot.bad {
  background: #ff6b6b;
  box-shadow: 0 0 7px rgb(255 107 107 / 0.8);
}

.side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--faint);
}

.side-foot a {
  color: var(--faint);
  text-decoration: none;
  transition: color 0.15s;
}

.side-foot a:hover {
  color: var(--mint);
}

/* ---------------------------------------------------------------- 右侧 */

.console-main {
  min-width: 0;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
}

.dh-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.dh-txt {
  min-width: 0;
}

.dh-txt h1 {
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
  word-break: break-all;
}

.dh-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--faint);
}

.dh-meta .sep {
  color: var(--line-strong);
}

.dh-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: none;
}

.dh-btn {
  min-height: 34px;
  padding: 6px 13px;
  font-size: 12.5px;
}

.dh-btn svg {
  width: 14px;
  height: 14px;
}

.dh-danger {
  color: #ff8585;
}

/* 续期窗口未开放：视觉上弱化，但仍然可点（点了会解释规则） */
.dh-btn-off {
  opacity: 0.72;
}

.dh-btn-off:hover:not(:disabled) {
  opacity: 1;
}

.dh-danger:hover:not(:disabled) {
  border-color: rgb(255 107 107 / 0.4);
  background: rgb(255 107 107 / 0.08);
}

/* 事实条 */
.detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--line);
  overflow: hidden;
  margin-bottom: 22px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 15px;
  background: var(--surface);
}

.fk {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.fv {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* 记录区 */
.records-sec {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.rec-head h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.rec-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}

.rec-table-wrap {
  overflow-x: auto;
}

.rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rec-table th {
  padding: 9px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.rec-table td {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text);
}

.rec-table .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.rec-table .dim {
  color: var(--faint);
}

.rec-table .ta-r {
  text-align: right;
}

.rec-val {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-empty {
  padding: 40px 16px !important;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}

.rt {
  display: inline-block;
  flex: none;
  min-width: 44px;
  padding: 2px 7px;
  border-radius: 5px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.rt.a      { background: rgb(62 230 180 / 0.13); color: #7ff0cd; }
.rt.aaaa   { background: rgb(62 230 180 / 0.13); color: #7ff0cd; }
.rt.cname  { background: rgb(122 184 255 / 0.12); color: #9ccdff; }
.rt.mx     { background: rgb(242 193 78 / 0.12);  color: #f5d080; }
.rt.txt    { background: rgb(154 160 168 / 0.12); color: #b8bec6; }
.rt.srv    { background: rgb(186 140 255 / 0.12); color: #c9a9ff; }
.rt.caa    { background: rgb(242 193 78 / 0.09);  color: #e8c773; }
.rt.ns     { background: rgb(122 184 255 / 0.12); color: #9ccdff; }

/* 添加记录表单 */
.add-form {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

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

.af-f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.af-grow {
  flex: 1;
  min-width: 180px;
}

.af-lb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.af-type {
  width: 96px;
}

.af-extra {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.af-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.af-bottom .fbx-btn {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}

.af-bottom .fbx-hint {
  flex: 1;
  min-width: 0;
  margin: 0;
}

/* NS 面板 */
.ns-panel {
  padding: 18px;
}

.ns-hint {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.ns-hint strong {
  color: var(--text);
}

/* 提示文案里的域名 / 主机名，继承父级颜色，只换等宽字体 */
.fbx-alert code.inline,
.ns-hint code.inline {
  font-family: var(--font-mono);
  font-size: 0.94em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

/* 提示条里的多段文字 */
.alert-body p {
  margin: 0;
}

.alert-body .alert-sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(242, 193, 78, 0.18);
}

.ns-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  list-style: none;
}

.ns-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.ns-host {
  font-size: 12.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ns-empty {
  font-size: 13px;
  color: var(--faint);
}

.mini.danger {
  color: #ff8585;
}

.mini.danger:hover:not(:disabled) {
  background: rgb(255 107 107 / 0.1);
  border-color: rgb(255 107 107 / 0.3);
}

/* 空状态 */
.console-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 96px 24px;
  text-align: center;
}

.ce-ic {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
}

.ce-ic svg {
  width: 26px;
  height: 26px;
}

.console-empty h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.console-empty p {
  font-size: 13.5px;
  color: var(--muted);
}

.console-empty .fbx-btn {
  margin-top: 6px;
}

/* ==========================================================================
   对话框（替代原生 alert / confirm）
   ========================================================================== */

.dlg-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(5 6 8 / 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.dlg-mask.show {
  opacity: 1;
}

.dlg {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.6);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dlg-mask.show .dlg {
  transform: translateY(0) scale(1);
}

/* 危险操作的图标 */
.dlg-ic.warn {
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: rgb(255 107 107 / 0.1);
  border: 1px solid rgb(255 107 107 / 0.28);
  position: relative;
}

.dlg-ic.warn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ff8585;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E")
    center / 19px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E")
    center / 19px no-repeat;
}

.dlg-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--text);
}

.dlg-body {
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-line;
}

.dlg-detail {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--faint);
  white-space: pre-line;
}

.dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.dlg-btn {
  min-height: 38px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.dlg-cancel {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
}

.dlg-cancel:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dlg-confirm {
  border: none;
  background: var(--text);
  color: var(--bg);
}

.dlg-confirm:hover {
  background: #fff;
}

.dlg-confirm.danger {
  background: #ff6b6b;
  color: #1a0a0a;
}

.dlg-confirm.danger:hover {
  background: #ff8585;
}

.dlg-btn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .dlg {
    max-width: none;
    padding: 20px;
  }

  .dlg-actions {
    flex-direction: column-reverse;
  }

  .dlg-btn {
    width: 100%;
  }
}

/* ==========================================================================
   控制台切换体验：骨架屏
   目标：切换域名时"感觉"是瞬时的，没有转圈等待
   ========================================================================== */

/* 详情骨架屏 */
.sk-detail {
  animation: sk-fade-in 0.2s ease both;
}

@keyframes sk-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sk-detail .dh-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sk-detail .detail-facts .fact {
  gap: 7px;
}

.sk-rec-body {
  padding: 6px 16px 14px;
}

.sk-rec-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.sk-rec-row:first-child {
  border-top: none;
}

/* 骨架块微光扫过，比死灰更有"快了"的感觉 */
.sk {
  background: var(--surface-2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 0.045),
    transparent
  );
  transform: translateX(-100%);
  animation: sk-shimmer 1.1s ease-in-out infinite;
}

@keyframes sk-shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk::after {
    animation: none;
  }

  .console-main {
    transition: none;
  }
}

/* 待结算的邀请奖励提示（余额卡片内） */
.acct-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid rgb(242 193 78 / 0.22);
  background: rgb(242 193 78 / 0.06);
}

.ap-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #f2c14e;
  box-shadow: 0 0 7px rgb(242 193 78 / 0.8);
}

.ap-txt {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.ap-txt b {
  color: #f5d080;
  font-family: var(--font-mono);
  font-weight: 600;
}

.ap-when {
  color: var(--faint);
}
/* ==TRANSFER-STYLES== */

/* ---------------------------------------------------------------- 三点菜单 */

.dh-menu-wrap {
  position: relative;
  flex: none;
}

/* 只有图标的方按钮 */
.dh-more {
  padding: 6px 9px;
}

.dh-more svg {
  width: 16px;
  height: 16px;
}

.dh-more[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--text);
}

.dh-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 152px;
  padding: 5px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.dh-menu[hidden] {
  display: none;
}

.dh-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.dh-menu-item svg {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.85;
}

.dh-menu-item:hover,
.dh-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.dh-menu-item.danger {
  color: #ff8585;
}

.dh-menu-item.danger:hover,
.dh-menu-item.danger:focus-visible {
  background: rgba(255, 90, 82, 0.12);
}

/* ---------------------------------------------------------------- 转移横幅 */

.transfer-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 17px;
  margin-bottom: 18px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(242, 193, 78, 0.3);
  background: rgba(242, 193, 78, 0.07);
}

.transfer-banner.is-in {
  border-color: rgba(62, 230, 180, 0.32);
  background: rgba(62, 230, 180, 0.07);
}

.tb-ic {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(242, 193, 78, 0.14);
  color: var(--warn);
}

.transfer-banner.is-in .tb-ic {
  background: rgba(62, 230, 180, 0.14);
  color: var(--mint-text);
}

.tb-ic svg {
  width: 16px;
  height: 16px;
}

.tb-txt {
  flex: 1;
  min-width: 0;
}

.tb-line {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

.tb-line strong {
  color: var(--text);
  font-weight: 600;
}

.tb-sub {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--faint);
}

/* 带价转移的价格行 */
.tb-price {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.tb-price strong {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
}

.tb-lack {
  color: #ff8585;
  margin-left: 4px;
}

.tb-actions {
  display: flex;
  gap: 8px;
  flex: none;
  align-self: center;
}

.tb-actions .fbx-btn {
  min-height: 32px;
  padding: 6px 15px;
  font-size: 12.5px;
}

@media (max-width: 620px) {
  .transfer-banner {
    flex-wrap: wrap;
  }

  .tb-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ---------------------------------------------------------------- 长按确认按钮 */

.hold-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.hold-btn .hold-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: currentColor;
  opacity: 0.22;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* 进度条不吃事件，文字在上层 */
.hold-btn .hold-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hold-btn.holding {
  border-color: rgba(255, 255, 255, 0.3);
}

/* 空白/回车按住时，聚焦样式别太抢 */
.hold-btn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.hold-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ---------------------------------------------------------------- 转移弹窗 */

/* 这个弹窗内容天然比确认框多（注意事项 + 勾选 + 邮箱），
   所以专门收紧：去掉顶部大图标、压缩段落间距、限制总高度。 */
.dlg-lg {
  max-width: 460px;
  padding: 20px;
}

.dlg-mask .dlg-lg {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
}

/* 内容区自己滚动，底部按钮始终可见 */
.dlg-body-custom {
  line-height: 1.65;
  overflow-y: auto;
  min-height: 0;
  margin-right: -6px;
  padding-right: 6px;
  /* .dlg-body 有 white-space: pre-line（给纯文本正文用的），
     这里塞的是 HTML，不关掉的话模板里的换行会变成大片空白 */
  white-space: normal;
}

.dlg-lg .dlg-title {
  font-size: 15px;
}

.dlg-lg .dlg-actions {
  flex: none;
  margin-top: 16px;
}

.dlg-lead {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.dlg-sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--faint);
}

/* 注意事项：单行紧凑列表，不用项目符号占位 */
.push-notes {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.push-notes > p {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.push-notes ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.push-notes li {
  position: relative;
  padding-left: 11px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--faint);
}

.push-notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.push-notes strong {
  color: var(--text);
  font-weight: 600;
}

/* 高危提示：清空 DNS 这种不可逆影响单独标出来 */
.push-danger {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: rgb(255 90 82 / 0.08);
  border: 1px solid rgb(255 90 82 / 0.26);
  font-size: 12px;
  line-height: 1.55;
  color: #ff9d9d;
}

.push-danger svg {
  width: 13px;
  height: 13px;
  flex: none;
  margin-top: 2px;
}

.push-danger strong {
  color: #ffb3b3;
  font-weight: 600;
}

/* 勾选确认 */
.push-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.push-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--mint);
  cursor: pointer;
  flex: none;
}

/* 邮箱输入 */
.push-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}

.push-field > label {
  font-size: 12px;
  color: var(--muted);
}

.push-field .fbx-input {
  min-height: 40px;
}

.push-status {
  font-size: 11.5px;
  line-height: 1.45;
}

/* 带价转移的价格输入区 */
.push-price {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.push-price[hidden] {
  display: none;
}

.push-price > label {
  font-size: 12px;
  color: var(--muted);
}

.push-price .fbx-input {
  min-height: 38px;
  font-family: var(--font-mono);
}

.push-hint {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

.push-status.pending {
  color: var(--faint);
}

.push-status.ok {
  color: var(--mint-text);
}

.push-status.bad {
  color: #ff8585;
}

/* 确认按钮被禁用时的提示感 */
.dlg-btn-off {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 危险操作的长按按钮：进度条用红色 */
.dlg-confirm.danger.hold-btn .hold-fill {
  background: #ff5a52;
  opacity: 0.3;
}

/* ==========================================================================
   续期 / 永久化 二选一
   --------------------------------------------------------------------------
   两个选项做成整块可点的卡片，而不是 radio + 小字：
   这样一个弹窗里能放下「价格、说明、余额不足提示」，
   用户不用点进去才发现买不起。
   ========================================================================== */

.renew-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.renew-opt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.1s var(--ease-soft, ease);
}

.renew-opt:hover:not(:disabled) {
  border-color: var(--mint);
  background: var(--surface-3);
}

.renew-opt:active:not(:disabled) {
  transform: scale(0.99);
}

.renew-opt:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ro-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ro-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.ro-price {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mint-text);
  white-space: nowrap;
}

.ro-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.ro-warn {
  font-size: 12px;
  color: var(--warn);
}

.renew-foot {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

.renew-foot strong {
  font-family: var(--font-mono);
  color: var(--text);
}

/* 永久域名的状态标记，跟「正常」区分开 */
.fbx-status.perm {
  color: var(--mint-text);
}

.fbx-status.perm .fbx-dot {
  background: var(--mint);
  box-shadow: 0 0 10px rgb(62 230 180 / 0.7);
}

/* ==========================================================================
   兑换码
   --------------------------------------------------------------------------
   .fbx-panel 本身没有 padding（只做圆角裁剪），内边距由 .panel-head 提供
   16px 18px。所以内容区必须自带 18px 左右，才能和标题左对齐。
   ========================================================================== */

.redeem-body {
  padding: 16px 18px 18px;
}

.redeem-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.redeem-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.redeem-input::placeholder {
  color: var(--faint);
  letter-spacing: normal;
  text-transform: none;
}

.redeem-input:focus {
  outline: none;
  border-color: var(--mint);
  background: var(--surface-3);
}

.redeem-form .fbx-btn {
  flex: none;
  min-width: 96px;
  min-height: 42px;
}

#redeemError {
  margin-top: 12px;
}

.redeem-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid rgb(62 230 180 / 0.3);
  background: rgb(62 230 180 / 0.07);
  color: var(--mint-text);
  font-size: 13px;
  animation: fb-rise 0.32s var(--ease-out) both;
}

.redeem-ok svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.redeem-ok b {
  font-family: var(--font-mono);
  font-size: 14px;
}

/* 兑换记录 */
.redeem-hist {
  margin-top: 6px;
}

.rh-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.rh-row:last-child {
  border-bottom: none;
}

.rh-code {
  flex: 1;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.rh-amt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--mint-text);
  flex: none;
}

.rh-when {
  flex: none;
  color: var(--faint);
  font-size: 12px;
}

@media (max-width: 560px) {
  .redeem-form {
    flex-direction: column;
  }

  .redeem-form .fbx-btn {
    width: 100%;
  }
}


/* ==========================================================================
   动效层
   --------------------------------------------------------------------------
   原则：只在"状态真的变了"的地方给动效。
     · 进场用位移+淡入，幅度小（6~10px），时长 320~420ms
     · 数值变化用上滑翻牌，传达"这是新值"
     · 危险态（转移中/已过期）用呼吸光晕，让人一眼注意到
     · 全部受 prefers-reduced-motion 保护
   不用渐变装饰、不用弹跳曲线，保持这块 UI 的克制。
   ========================================================================== */

/* ---------------------------------------------------------------- 基础曲线 */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-fast: 0.16s;
  --dur: 0.32s;
  --dur-slow: 0.42s;
}

/* ---------------------------------------------------------------- 页面进场 */
/* 每次路由渲染后 viewEl 内容整个换掉，所以动画直接挂在块级子元素上。
   用 animation 而不是 transition，避免需要 toggle 类名。 */
@keyframes fb-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fb-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.console,
.acct-page {
  animation: fb-rise var(--dur-slow) var(--ease-out) both;
}

/* 左侧列表逐条错开进场，像"刷出来"的 */
@keyframes fb-item-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.side-item {
  animation: fb-item-in 0.34s var(--ease-out) both;
  /* 给 hover 的背景过渡留位置 */
  transition:
    background var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-soft);
}

/* 前 12 条错开，再多就不错开了（太长会显得卡） */
.side-item:nth-child(1) { animation-delay: 0ms; }
.side-item:nth-child(2) { animation-delay: 18ms; }
.side-item:nth-child(3) { animation-delay: 36ms; }
.side-item:nth-child(4) { animation-delay: 54ms; }
.side-item:nth-child(5) { animation-delay: 72ms; }
.side-item:nth-child(6) { animation-delay: 90ms; }
.side-item:nth-child(7) { animation-delay: 108ms; }
.side-item:nth-child(8) { animation-delay: 126ms; }
.side-item:nth-child(9) { animation-delay: 144ms; }
.side-item:nth-child(10) { animation-delay: 162ms; }
.side-item:nth-child(11) { animation-delay: 180ms; }
.side-item:nth-child(12) { animation-delay: 198ms; }

/* 悬停时轻微右移，暗示"可以点" */
.side-item:hover {
  transform: translateX(2px);
}

/* 选中项左侧加一条薄荷色指示条 */
.side-item {
  position: relative;
}

.side-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--mint);
  transform: translateY(-50%);
  transition:
    height var(--dur) var(--ease-out),
    opacity var(--dur-fast) ease;
  opacity: 0;
}

.side-item.on::before {
  height: 18px;
  opacity: 1;
}

/* ---------------------------------------------------------------- 详情面板 */
/* ensureActions 之类的复查会重画，这里只对面板本身做进场 */
@keyframes fb-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.detail-head,
.records-sec,
.fbx-panel {
  animation: fb-panel-in var(--dur-slow) var(--ease-out) both;
}

/* 后面的块稍微晚一点，形成层次 */
.records-sec {
  animation-delay: 60ms;
}

/* ---------------------------------------------------------------- 按钮按压 */
/* 所有可点按钮按下去有 1px 下沉，是最便宜也最有效的"手感" */
.fbx-btn,
.y-btn-ink-block,
.side-new,
.oauth-btn,
.dlg-btn {
  transition:
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    transform 0.1s var(--ease-soft);
}

.fbx-btn:active:not(:disabled),
.y-btn-ink-block:active:not(:disabled),
.side-new:active:not(:disabled),
.oauth-btn:active:not(:disabled),
.dlg-btn:active:not(:disabled) {
  transform: scale(0.985);
}

/* ---------------------------------------------------------------- 余额翻牌 */
/* 数值变化时上滑淡入，让"我又多了 X boxes"这个信息被看见 */
@keyframes fb-count-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fbx-num.is-bumped,
[data-count] {
  animation: fb-count-in 0.36s var(--ease-out) both;
}

/* ---------------------------------------------------------------- 状态呼吸 */
/* 转移中 / 待接收 / 已过期这类"需要你注意"的状态，用很轻的光晕呼吸 */
@keyframes fb-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(242 193 78 / 0);
    border-color: rgb(242 193 78 / 0.34);
  }
  50% {
    box-shadow: 0 0 0 3px rgb(242 193 78 / 0.07);
    border-color: rgb(242 193 78 / 0.5);
  }
}

.transfer-banner {
  animation: fb-breathe 3.4s ease-in-out infinite;
}

/* 侧栏里"等待转出/等待接收"的小圆点闪烁 */
.si-meta .warn,
.si-meta .pending {
  animation: fb-blink 2s ease-in-out infinite;
}

@keyframes fb-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ---------------------------------------------------------------- 列表增删 */
/* 新注册的域名在列表里"落位" */
@keyframes fb-pop-in {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.side-item.is-new {
  animation: fb-pop-in 0.42s var(--ease-out) both;
}

/* 被删掉的条目先收缩再消失 */
@keyframes fb-collapse-out {
  to {
    opacity: 0;
    transform: translateX(-12px) scale(0.96);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

.side-item.is-leaving {
  overflow: hidden;
  pointer-events: none;
  animation: fb-collapse-out 0.26s ease forwards;
}

/* ---------------------------------------------------------------- 图标 */
/* 3 点菜单按钮 hover 时图标轻微转一下 */
.dh-more svg,
#moreBtn svg {
  transition: transform var(--dur) var(--ease-out);
}

.dh-more:hover svg,
#moreBtn:hover svg {
  transform: rotate(90deg);
}

/* 复制按钮点完打个勾的小弹跳 */
@keyframes fb-tick {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.copied,
.is-copied {
  animation: fb-tick 0.28s var(--ease-out) both;
}

/* ---------------------------------------------------------------- 表格行 */
/* 交易流水逐行进场，方便一眼扫到新记录 */
@keyframes fb-row-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fbx-table tbody tr {
  animation: fb-row-in 0.3s var(--ease-out) both;
}

.fbx-table tbody tr:nth-child(1) { animation-delay: 0ms; }
.fbx-table tbody tr:nth-child(2) { animation-delay: 22ms; }
.fbx-table tbody tr:nth-child(3) { animation-delay: 44ms; }
.fbx-table tbody tr:nth-child(4) { animation-delay: 66ms; }
.fbx-table tbody tr:nth-child(5) { animation-delay: 88ms; }
.fbx-table tbody tr:nth-child(6) { animation-delay: 110ms; }

/* ---------------------------------------------------------------- 顶栏 */
/* 顶栏余额数字变化后闪一下薄荷色（选择器对应 ui.js 的 .fbx-pill > b） */
@keyframes fb-flash {
  0% {
    color: var(--mint-text);
    text-shadow: 0 0 12px rgb(62 230 180 / 0.6);
  }
  100% {
    color: inherit;
    text-shadow: none;
  }
}

.fbx-island .fbx-pill.is-bumped > b {
  animation: fb-flash 0.9s ease both;
}

/* ---------------------------------------------------------------- DNS 记录 */
/* 新加的一条记录高亮后褪去，让人确认"加上了" */
@keyframes fb-record-in {
  0% {
    opacity: 0;
    background: rgb(62 230 180 / 0.12);
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    background: transparent;
    transform: translateY(0);
  }
}

.rec-row.is-new {
  animation: fb-record-in 1.1s var(--ease-out) both;
}

/* ---------------------------------------------------------------- 降级 */
@media (prefers-reduced-motion: reduce) {
  .console,
  .acct-page,
  .side-item,
  .detail-head,
  .records-sec,
  .fbx-panel,
  .fbx-table tbody tr,
  .fbx-num,
  [data-count],
  .side-item.is-new,
  .rec-row.is-new,
  .copied,
  .is-copied {
    animation: none !important;
  }

  .transfer-banner,
  .si-meta .warn,
  .si-meta .pending {
    animation: none !important;
  }

  .side-item:hover,
  .side-item::before,
  .dh-more:hover svg,
  #moreBtn:hover svg,
  .fbx-btn:active,
  .y-btn-ink-block:active,
  .side-new:active,
  .oauth-btn:active,
  .dlg-btn:active {
    transform: none !important;
  }
}

/* ============================================================================
   动效层 · 方案二：「适中 + 一点呼吸感」
   ----------------------------------------------------------------------------
   相比原来的「只在状态变了的地方给动效」，这一层额外加入：
     1. 钱包胶囊呼吸光   —— 只在有余额时，缓慢的发光脉动
     2. 卡片悬停上浮     —— pointer 进入时轻微抬起 + 阴影加深
     3. 成功涟漪         —— 操作成功时从控件中心扩散一圈

   原则没变：**不挡路**。所有时长都 ≥ 2s，幅度都 < 3px。
   全部受 prefers-reduced-motion 保护（文件末尾统一降级）。
   ========================================================================== */

/* ---------------------------------------------------------------- 1) 钱包胶囊呼吸光 */
/* 只给「有余额」的那个胶囊（带 b 元素的），空胶囊不呼吸 —— 
   否则顶栏三四个胶囊一起脉动，像圣诞树。 */
@keyframes fb-pill-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(62, 230, 180, 0);
    border-color: transparent;
  }
  50% {
    box-shadow: 0 0 0 3px rgba(62, 230, 180, 0.10),
                0 0 16px -2px rgba(62, 230, 180, 0.22);
    border-color: rgba(62, 230, 180, 0.18);
  }
}

.motion-enabled .fbx-island .fbx-pill:has(b) {
  animation: fb-pill-breathe 3.6s ease-in-out infinite;
}

/* 余额变化时的强调闪光盖过呼吸（is-bumped 优先级更高） */
.motion-enabled .fbx-island .fbx-pill.is-bumped {
  animation: fb-flash 0.9s var(--ease-out) both;
}

/* ---------------------------------------------------------------- 2) 卡片悬停上浮 */
/* 只在能 hover 的设备上启用，触摸屏不会有「浮起来不落下」的粘滞感。 */
@media (hover: hover) and (pointer: fine) {
  .fbx-panel,
  .acct-card {
    transition: transform 0.28s var(--ease-out),
                border-color 0.28s var(--ease-out),
                box-shadow 0.28s var(--ease-out);
    will-change: transform;
  }

  .fbx-panel:hover,
  .acct-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(62, 230, 180, 0.05);
  }

  /* 面板里再嵌面板时不要叠加抬升，否则会「漂」 */
  .fbx-panel .fbx-panel:hover {
    transform: none;
    box-shadow: none;
  }
}

/* 域名列表行也用同样的抬升语言，但更轻 */
@media (hover: hover) and (pointer: fine) {
  .side-item {
    transition: transform 0.22s var(--ease-out),
                background 0.22s var(--ease-out);
  }
  .side-item:hover {
    transform: translateX(2px);
  }
}

/* ---------------------------------------------------------------- 3) 成功涟漪 */
/* 用 ::after 画一圈扩散的环，不占布局、不改颜色。
   触发方式：给元素加 .is-ripple，动画跑完由 JS 摘掉（或靠 forwards 留空）。 */
@keyframes fb-ripple {
  0% {
    opacity: 0.55;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

.fbx-btn,
.y-btn-ink-block,
.side-new,
.dlg-btn,
.btn {
  position: relative;
}

.motion-enabled .is-ripple::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1.5px solid var(--mint);
  pointer-events: none;
  animation: fb-ripple 0.62s var(--ease-out) forwards;
}

/* 成功状态的短促脉冲：比涟漪更收敛，用于「已复制」「已保存」这类小确认 */
@keyframes fb-success-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(62, 230, 180, 0.35);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(62, 230, 180, 0);
  }
}

.motion-enabled .is-success {
  animation: fb-success-pulse 0.7s var(--ease-out) both;
}

/* ---------------------------------------------------------------- 降级 */
/* 本层新增的动效统一在这里关掉。上面文件已有降级规则，这里只补新增的。 */
@media (prefers-reduced-motion: reduce) {
  .motion-enabled .fbx-island .fbx-pill:has(b),
  .motion-enabled .is-ripple::after,
  .motion-enabled .is-success {
    animation: none !important;
  }

  .fbx-panel:hover,
  .acct-card:hover,
  .side-item:hover,
  .fbx-panel .fbx-panel:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .is-ripple::after {
    display: none !important;
  }
}

/* ============================================================================
   高级域名标记
   ----------------------------------------------------------------------------
   premium 后缀（.site.tv / .end.ac）的域名在控制台里要有可见区分：
     · 侧栏名字后面一个小金标
     · 详情页大标题后面一个金标胶囊
   金色取自 premium 页的强调色 #ffcc33，跟注册页是同一套视觉语言。
   ========================================================================== */

/* 侧栏：名字后面的小金标 */
.si-name .si-tier {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
  color: #ffcc33;
  background: rgba(255, 204, 51, 0.12);
  border: 1px solid rgba(255, 204, 51, 0.32);
}

/* 侧栏选中态：金标更亮一点 */
.side-item.on .si-name .si-tier {
  background: rgba(255, 204, 51, 0.18);
  border-color: rgba(255, 204, 51, 0.45);
}

/* 详情页：大标题后面的金标胶囊 */
.dh-tier {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 3px;
  color: #ffcc33;
  background: rgba(255, 204, 51, 0.10);
  border: 1px solid rgba(255, 204, 51, 0.34);
}

/* ============================================================================
   控制台：等高双栏 + 内部滚动
   ----------------------------------------------------------------------------
   问题：
     · 域名一多，列表往下长，冒出浏览器默认滚动条（深色面板上很扎眼）
     · 左栏有 max-height、右栏没有 —— 两边高度对不上，视觉上断成两截
     · DNS 记录多的时候把整块面板拉长，而不是在表内滚动

   做法：
     · 两栏统一用「视口高度 - 顶栏」作为高度，各自内部滚动
     · 右栏是纵向 flex：头部 / 事实卡固定，records-sec 吃掉剩余高度，
       其内部的表格区再内滚
     · 滚动条换成细的自定义样式，平时很低调，hover 才明显
   ========================================================================== */

@media (min-width: 901px) {
  /*
    布局原则：
      · 两栏高度跟着内容走，不撑满一屏
      · 列表封顶在「视口约一半」，域名多时在这里滚，
        而不是把整个列表拉成一长条
      · DNS 面板同理：内容少就矮，多了在表格里滚
  */

  .console {
    /* 面板可用的最大高度：视口 - 顶栏 - 底部留白 */
    --avail: calc(100dvh - 116px);
    /* 两栏各自按内容高度，互不拉伸 */
    align-items: start;
  }

  /* ---- 左栏 ---- */
  .console-side {
    display: flex;
    flex-direction: column;
    /* 内容少 → 按内容高度；内容多 → 封顶后内部滚动 */
    max-height: var(--avail);
    min-height: 0;
    overflow: hidden;
  }

  .side-head,
  .side-filter,
  .side-foot {
    flex: none;
  }

  /*
    列表：高度跟内容走，但封顶。
      上限取「视口一半」而不是固定 480px ——
      固定值在小屏上太高、大屏上又太矮，跟内容也没关系。
    flex: 0 1 auto 表示不主动撑开，只在超限时收缩并滚动。
  */
  .side-list {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 45dvh;
    overflow-y: auto;
  }

  /* ---- 右栏 ---- */
  .console-main {
    display: flex;
    flex-direction: column;
    max-height: var(--avail);
    min-height: 0;
    overflow: hidden;
  }

  .detail-head,
  .detail-facts {
    flex: none;
  }

  .records-sec {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 0 1 auto;
  }

  /* DNS 表格：同样跟内容走，封顶后内滚 */
  .rec-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 45dvh;
    overflow-y: auto;
  }

  .rec-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg);
  }

  .add-form {
    flex: none;
  }
}

/* ---- 细滚动条：平时很淡，hover 才明显 ---- */
/* ---- 细滚动条：平时很淡，hover 才明显 ---- */
/* ---- 细滚动条：平时很淡，hover 才明显 ---- */
/* ---- 细滚动条：平时很淡，hover 才明显 ---- */
.side-list,
.rec-table-wrap,
.console-main,
.ns-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.side-list::-webkit-scrollbar,
.rec-table-wrap::-webkit-scrollbar,
.console-main::-webkit-scrollbar,
.ns-panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.side-list::-webkit-scrollbar-track,
.rec-table-wrap::-webkit-scrollbar-track,
.console-main::-webkit-scrollbar-track,
.ns-panel::-webkit-scrollbar-track {
  background: transparent;
}

.side-list::-webkit-scrollbar-thumb,
.rec-table-wrap::-webkit-scrollbar-thumb,
.console-main::-webkit-scrollbar-thumb,
.ns-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}

.side-list:hover::-webkit-scrollbar-thumb,
.rec-table-wrap:hover::-webkit-scrollbar-thumb,
.console-main:hover::-webkit-scrollbar-thumb,
.ns-panel:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}

.side-list::-webkit-scrollbar-thumb:hover,
.rec-table-wrap::-webkit-scrollbar-thumb:hover,
.console-main::-webkit-scrollbar-thumb:hover,
.ns-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* ============================================================================
   管理后台  /admin
   ========================================================================== */
.admin-sec {
  margin-top: 16px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 4px;
  color: #ffcc33;
  background: rgba(255, 204, 51, 0.12);
  border: 1px solid rgba(255, 204, 51, 0.32);
}

/* 顶栏的管理入口：金色小胶囊 */
.fbx-pill-admin {
  color: #ffcc33;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fbx-pill-admin:hover {
  background: rgba(255, 204, 51, 0.12);
  border-color: rgba(255, 204, 51, 0.4);
}

/* 表单行 */
.admin-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-field > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.admin-field .fbx-input {
  width: 130px;
  min-height: 42px;
}

.admin-field-wide .fbx-input {
  width: 240px;
}

/* 刚生成的码 */
.admin-fresh {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(62, 230, 180, 0.07);
  border: 1px solid rgba(62, 230, 180, 0.28);
}

.acf-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 8px;
}

.acf-code {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 12px;
  word-break: break-all;
}

/* 列表 */
.admin-list {
  margin-top: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  padding: 8px 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}

.admin-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ac-code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: var(--text);
  word-break: break-all;
}

.ac-dim {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ac-state {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  white-space: nowrap;
}

.ac-state.ok {
  color: var(--mint);
  background: rgba(62, 230, 180, 0.12);
}

.ac-state.used {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.ac-state.off {
  color: var(--danger-text);
  background: rgba(255, 90, 82, 0.12);
}

/* ---------------------------------------------------------------------------
   举报条目（管理员后台）
   --------------------------------------------------------------------------- */
.abuse-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.abuse-item:first-child {
  padding-top: 0;
}

.abuse-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* 已处理过的调暗，让待处理的更显眼 */
.abuse-item.is-done {
  opacity: 0.62;
}

.abuse-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.abuse-kind {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}

.abuse-time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--faint);
}

.abuse-target {
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--mint);
  word-break: break-all;
}

.abuse-detail {
  margin-bottom: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.abuse-item-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.abuse-ops {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

/* 举报里的操作按钮带文字，不是 .ac-btn 那种正方形图标 */
.abuse-ops .ac-btn {
  width: auto;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* 破坏性操作（封账号）视觉上和普通按钮区分开 */
.abuse-ops .ac-btn.danger {
  color: var(--danger-text);
  border-color: rgba(255, 90, 82, 0.35);
}

.abuse-ops .ac-btn.danger:hover {
  background: rgba(255, 90, 82, 0.1);
}

/* 警示标签：已封禁 / 多次举报 */
.abuse-flag {
  display: inline-block;
  padding: 1px 7px;
  margin-left: 4px;
  border-radius: 9999px;
  background: rgba(255, 90, 82, 0.14);
  color: var(--danger-text);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

/* ---- 展开的详情区 ---- */
.abuse-extra {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 12.5px;
}

.abuse-extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.abuse-extra-label {
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.abuse-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.abuse-mini-table td {
  padding: 5px 8px 5px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}

.abuse-mini-table tr:last-child td {
  border-bottom: 0;
}

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

.abuse-chip {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.ac-ops {
  text-align: right;
  white-space: nowrap;
}

.ac-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ac-btn:hover {
  color: var(--text);
  border-color: var(--faint);
  background: rgba(255, 255, 255, 0.05);
}

.ac-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.ac-btn svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .admin-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-field .fbx-input,
  .admin-field-wide .fbx-input {
    width: 100%;
  }

  .acf-code {
    font-size: 20px;
  }
}

/* ============================================================================
   控制台：未选中域名时的提示
   ----------------------------------------------------------------------------
   进控制台不再默认打开第一个域名，右侧先显示这个提示。
   高度和旁边的 DNS 面板对齐，避免右侧突然空一大截。
   ========================================================================== */
.pick-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 320px;
  padding: 56px 28px;
  border-radius: var(--r);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.012);
  text-align: center;
}

.pick-hint-ic {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--faint);
}

.pick-hint-ic svg {
  width: 21px;
  height: 21px;
}

.pick-hint h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.pick-hint p {
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
}

/* ============================================================================
   账户页：API 密钥
   ========================================================================== */
.api-base {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.api-base-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.api-base code {
  font-size: 13px;
  color: var(--mint);
}

/* 新建后的一次性明文展示 */
.api-token {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 204, 51, 0.08);
  border: 1px solid rgba(255, 204, 51, 0.32);
}

.api-token-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #ffcc33;
}

.api-token-head svg {
  flex: none;
  width: 15px;
  height: 15px;
}

.api-token-value {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-all;
  user-select: all;
}

.api-token-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* 列表 */
.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.api-table th {
  padding: 8px 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}

.api-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.api-prefix {
  font-size: 12.5px;
  color: var(--muted);
}

.api-dim {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.api-ops {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .api-table th:nth-child(3),
  .api-table td:nth-child(3) {
    display: none;
  }
}

/* ============================================================================
   账户页：两栏布局
   ----------------------------------------------------------------------------
   原来所有卡片竖着排，一屏放不下、要一直滚。
   改成：身份 + 改密码并排两栏，API 密钥整行放在下面。

   为什么密钥面板不占半栏：
     它里面有表格（名称/前缀/最后使用/状态/操作），
     半栏宽度下四列会挤在一起、按钮被裁掉，只能整行。

   用 grid 而不是 columns：
     columns 会把卡片拆散到两栏流里，顺序不可控。
     grid + align-items: start 让每张卡按自己高度排，不会强行拉齐。
   ========================================================================== */
.acct-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1080px) {
  .acct-2col {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 两栏里去掉原来手动加的 margin-bottom（gap 已经在管间距） */
.acct-2col > .fbx-panel {
  margin-bottom: 0;
}

/* API 密钥面板横跨两栏：里面有表格，半栏宽度会把列挤爆 */
.acct-2col > #apiKeysMount {
  grid-column: 1 / -1;
}

@media (max-width: 1080px) {
  .acct-2col > #apiKeysMount {
    grid-column: auto;
  }
}

/* ============================================================================
   修复：API 面板里的文字贴左
   ----------------------------------------------------------------------------
   原因：page-api-keys 复用了 .fbx-panel，但 .fbx-panel 自己不带内边距，
   内边距由各面板的头部/内容块自己加。API 面板的段落是直接子元素，
   没有 padding 所以贴着边框。
   ========================================================================== */
#apiKeysPanel,
#apiKeysMount > .fbx-panel {
  padding: 18px 20px 20px;
}

#apiKeysPanel .panel-head {
  padding: 0 0 14px;
}

#apiKeysPanel .fbx-hint {
  margin: 0 0 14px;
}

/* 面板内的表格在窄卡片里要能自适应 */
#apiKeysPanel .api-table th,
#apiKeysPanel .api-table td {
  padding-left: 0;
}

#apiKeysPanel .api-table th:first-child,
#apiKeysPanel .api-table td:first-child {
  padding-left: 0;
}

#apiKeysPanel .api-table th:last-child,
#apiKeysPanel .api-table td:last-child {
  padding-right: 0;
}

/* 密码表单底部的说明：横跨输入列，和按钮左对齐 */
.set-form .set-form-note {
  grid-column: 2;
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
}

/* 新建密钥模态框里的输入提示 */
.dkg-hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--faint);
}
