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

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

/* 字体：Geist / Geist Mono 本地自托管（latin 子集，可变字体）
   Space Grotesk 只用于品牌字 FurryBox
   中文回落到系统字体，不加载中文字体文件 */
/* Geist / Geist Mono — latin 子集，本地自托管（可变字体，单文件覆盖全部字重） */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/Geist-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/Geist-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/GeistMono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/GeistMono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk — 品牌字，latin 子集，本地自托管（可变字体） */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/SpaceGrotesk-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/SpaceGrotesk-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


: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);
}

/* ============================================================================
   StarryID — 主题覆盖
   ----------------------------------------------------------------------------
   design.css 的所有颜色都走 :root 变量，所以这里只覆盖变量就够了，
   不需要重写任何规则。

   视觉取向：Deep sky + starlight
     - 底色比 FurryBox 更冷更黑（夜空）
     - 强调色是星光蓝白，不是 FurryBox 的薄荷绿
     - 品牌字仍是 Space Grotesk，但用 --font-brand 单独拉开字距
   ========================================================================== */

:root {
  /* ---- 底色：夜空，比 FurryBox 的 #0a0b0d 更冷 ---- */
  --bg: #05060b;
  --surface: #0c0f18;
  --surface-2: #141824;
  --surface-3: #1c2130;

  /* ---- 线 ---- */
  --line: #1c2130;
  --line-strong: #262c3d;

  /* ---- 文字 ---- */
  --text: #f0f2f7;
  --muted: #a0a8bd;
  --faint: #6e7689;

  /* ---- 强调色：星光 ----
     变量名保持 --mint* 是因为 design.css 到处在用它，
     这里只是把值换成星光色，语义上它就是「强调色」。 */
  --mint: #9db4ff;
  --mint-deep: #4a5fd0;
  --mint-text: #b8c9ff;
  --on-mint: #060a18;

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

  /* 星尘的颗粒底色 */
  --dot-rgb: 180 200 255;
}

/* ---------------------------------------------------------------------------
   夜空背景：多层径向渐变模拟银河 + 稀疏星点
   ------------------------------------------------------------------------- */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 18% -10%, rgba(120, 150, 255, 0.13), transparent 62%),
    radial-gradient(900px 560px at 84% 4%, rgba(160, 130, 255, 0.10), transparent 60%),
    radial-gradient(700px 500px at 50% 108%, rgba(90, 120, 230, 0.07), transparent 66%);
  background-attachment: fixed;
}

/* 星点：用 background-image 画两层不同密度的小点 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 32% 42%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 58% 12%, rgba(200, 215, 255, 0.8), transparent),
    radial-gradient(1px 1px at 74% 34%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 88% 22%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 22% 72%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 46% 86%, rgba(200, 215, 255, 0.5), transparent),
    radial-gradient(1px 1px at 68% 64%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 92% 78%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 8% 52%, rgba(255, 255, 255, 0.3), transparent);
  background-repeat: no-repeat;
  opacity: 0.75;
  animation: starry-twinkle 7s ease-in-out infinite alternate;
}

@keyframes starry-twinkle {
  from { opacity: 0.55; }
  to   { opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

/* 让内容浮在星尘之上 */
.page,
.wrap,
main,
header,
footer {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------------------
   品牌字
   ------------------------------------------------------------------------- */
.brand-word {
  font-family: var(--font-brand);
  letter-spacing: 0.01em;
}

/* 「ID」用强调色区分出层次 */
.brand-id {
  color: var(--mint-text);
}

/* ---------------------------------------------------------------------------
   主按钮：星光填充（design.css 默认是白色 ink pill，这里改成发光蓝）
   ------------------------------------------------------------------------- */
.btn-primary,
.fbx-btn-primary,
button[type="submit"].primary {
  background: linear-gradient(180deg, #c7d5ff, #9db4ff);
  color: var(--on-mint);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 24px -8px rgba(157, 180, 255, 0.55);
}

.btn-primary:hover,
.fbx-btn-primary:hover,
button[type="submit"].primary:hover {
  background: linear-gradient(180deg, #d7e1ff, #adc2ff);
}

/* ---------------------------------------------------------------------------
   语言切换器：胶囊细节跟随主题
   ------------------------------------------------------------------------- */
.fbx-lang-btn {
  border-color: var(--line-strong);
}

/* ===========================================================================
   登录页布局
   ===========================================================================
   这些规则原本写在 index.html 的 <style> 里，后来挪到这里——
   构建时所有站点级 css（starry.css / consent.css）会并进同一个 style.css，
   两张页面共用，省一次请求。 */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 28px 26px;
  position: relative;
}

/* 卡片顶部的一道光 */
.auth-card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 1px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(157, 180, 255, 0.55),
    transparent
  );
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand svg {
  align-self: center;
  margin-right: 7px;
  color: var(--mint-text);
}

.auth-card h1 {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 22px;
}

/* ---- Tab ---- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  margin-bottom: 22px;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

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

.tab.on {
  background: var(--surface-3);
  color: var(--text);
}

/* ---- 表单 ---- */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  transition: border-color 0.15s, background 0.15s;
}

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

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

.hint {
  font-size: 12px;
  color: var(--faint);
  margin-top: 6px;
  min-height: 16px;
}

.submit {
  width: 100%;
  border: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, #c7d5ff, #9db4ff);
  color: var(--on-mint);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 16px;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity 0.15s, transform 0.08s;
}

.submit:hover { opacity: 0.92; }
.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- 错误 / 提示 ---- */
.error {
  background: rgba(255, 90, 82, 0.09);
  border: 1px solid rgba(255, 90, 82, 0.28);
  color: var(--danger-text);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
}

.notice {
  background: rgba(157, 180, 255, 0.08);
  border: 1px solid rgba(157, 180, 255, 0.24);
  color: var(--mint-text);
  font-size: 12.5px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
}

/* ---- 链接行 ---- */
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 12.5px;
}

.linkbtn {
  background: none;
  border: 0;
  color: var(--mint-text);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.linkbtn:hover { text-decoration: underline; }

/* ---- 页脚 ---- */
.auth-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.6;
}

.auth-foot a {
  color: var(--muted);
  text-decoration: none;
}

.auth-foot a:hover { color: var(--text); }

[hidden] { display: none !important; }

/* 窄屏 */
@media (max-width: 460px) {
  .auth-card { padding: 24px 20px 22px; }
  .auth-card h1 { font-size: 23px; }
}



/* ============================================================================
   StarryID — 授权同意页专属样式
   ----------------------------------------------------------------------------
   .auth-wrap / .auth-card / .auth-top / .brand / h1 / .subtitle /
   .error / .submit / [hidden] / 窄屏这些公共部分都在 starry.css 里，
   两张页面共用同一个 style.css，这里只写授权页独有的东西。
   ========================================================================== */

/* 授权卡片略宽一点（要放客户端信息和 scope 列表） */
.consent-card {
  max-width: 440px;
}

/* ---- 客户端信息 ---- */
.client-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 18px;
}

.client-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #2a3350, #171c2c);
  border: 1px solid var(--line-strong);
  color: var(--mint-text);
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 600;
}

.client-meta { min-width: 0; }

.client-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-sub {
  font-size: 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- scope 列表 ---- */
.scopes {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.scopes-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.scopes ul {
  list-style: none;
  display: grid;
  gap: 9px;
}

.scopes li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.scopes li svg {
  flex: 0 0 15px;
  margin-top: 2px;
  color: var(--mint-text);
}

/* ---- 当前账号 ---- */
.signed-as {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  margin-bottom: 18px;
}

.signed-as strong {
  color: var(--muted);
  font-weight: 500;
  word-break: break-all;
}

/* ---- 按钮组 ---- */
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
}

.consent-actions .submit {
  margin-top: 0;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-ghost:hover {
  background: var(--surface-3);
  border-color: var(--muted);
}

.btn-ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 链接样式的按钮（去登录 / 回首页） */
.submit.as-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 460px) {
  .consent-actions { grid-template-columns: 1fr; }
}
