/* bddai.vip · 琉璃 / 墨色玻璃面板 */

:root {
  --bg: #050809;
  --text: #f3ead9;
  --muted: #c2b5a0;
  --dim: #8d8272;
  --gold: #d9b982;
  --gold-bright: #efd6a2;
  --jade: #8fc7b4;
  --seal: #9d3c32;
  --line: rgba(243, 234, 217, 0.12);
  --line-soft: rgba(243, 234, 217, 0.07);
  --font-brush: "KaiTi", "STKaiti", "楷体", "FangSong", "仿宋", serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", "宋体", serif;
  --font-latin: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-mono: "Cascadia Mono", "JetBrains Mono", Consolas, ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  height: 100%;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(217, 185, 130, 0.3);
  color: #fff9ee;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(217, 185, 130, 0.22);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(217, 185, 130, 0.4);
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid rgba(217, 185, 130, 0.7);
  outline-offset: 2px;
}

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

.depth {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(130% 100% at 68% -14%, #142427 0%, #0a1416 40%, #050809 100%);
}

.depth__layer {
  position: absolute;
  inset: 0;
  transform: translate3d(
    calc(var(--px, 0) * var(--depth, 10) * 1px),
    calc(var(--py, 0) * var(--depth, 10) * 1px),
    0
  );
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.depth__moon {
  position: absolute;
  top: -18vh;
  right: -8vw;
  width: 56vw;
  height: 56vw;
  border-radius: 50%;
  opacity: 0.9;
  filter: blur(34px);
  mix-blend-mode: screen;
  background: radial-gradient(
    circle,
    rgba(255, 247, 227, 0.5) 0%,
    rgba(243, 219, 174, 0.22) 34%,
    rgba(217, 185, 130, 0.06) 56%,
    transparent 72%
  );
  animation: moon-breathe 14s ease-in-out infinite;
}

@keyframes moon-breathe {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.04);
  }
}

.depth__aurora {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(100px);
  mix-blend-mode: screen;
  opacity: 0.65;
}

.depth__aurora--a {
  top: -22vw;
  left: -16vw;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, rgba(72, 166, 164, 0.34), transparent 64%);
  animation: aurora-drift 28s ease-in-out infinite alternate;
}

.depth__aurora--b {
  top: 6vh;
  right: -16vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(126, 106, 184, 0.26), transparent 66%);
  animation: aurora-drift 36s ease-in-out infinite alternate-reverse;
}

.depth__aurora--c {
  bottom: -24vw;
  left: 24vw;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgba(216, 174, 106, 0.24), transparent 68%);
  animation: aurora-drift 44s ease-in-out infinite alternate;
}

.depth__aurora--d {
  top: 22vh;
  left: 32vw;
  width: 40vw;
  height: 40vw;
  opacity: 0.6;
  background: radial-gradient(circle, rgba(255, 238, 205, 0.22), transparent 68%);
  animation: aurora-drift 32s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4vw, 3vh, 0) scale(1.1);
  }
}

.depth__grid {
  position: absolute;
  right: -25vw;
  bottom: -10vh;
  left: -25vw;
  height: 72vh;
  opacity: 0.2;
  transform: perspective(680px) rotateX(74deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(217, 185, 130, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 185, 130, 0.2) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2) 52%, transparent 86%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2) 52%, transparent 86%);
  animation: grid-flow 24s linear infinite;
}

@keyframes grid-flow {
  to {
    background-position: 0 80px, 0 0;
  }
}

.depth__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.depth__scan {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 250, 240, 0.035) 0 1px,
    transparent 1px 4px
  );
}

.depth__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 88% at 50% 42%, transparent 46%, rgba(3, 6, 7, 0.52) 82%, rgba(3, 6, 7, 0.9) 100%),
    linear-gradient(180deg, rgba(3, 6, 7, 0.5) 0%, transparent 20%, transparent 76%, rgba(3, 6, 7, 0.72) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- 布局 ---------- */

.shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(360px, 1fr);
  gap: 14px;
  height: 100svh;
  padding: 14px;
}

.stack {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.stack--left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.stack--top {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 14px;
  flex: 0 0 clamp(124px, 14vh, 150px);
  min-height: 0;
}

.stack--top .panel {
  height: 100%;
}

.stack--left .rail {
  flex: 1 1 auto;
  min-height: 0;
  animation-delay: 0.14s;
}

.stack--left .clock {
  animation-delay: 0.06s;
}

.stack--top .pinned {
  animation-delay: 0.08s;
}

.stack--side {
  grid-template-rows: minmax(0, 1fr) minmax(150px, 0.22fr);
}

.panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(248, 238, 217, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(
      148deg,
      rgba(255, 250, 240, 0.115) 0%,
      rgba(255, 250, 240, 0.035) 32%,
      rgba(255, 255, 255, 0.016) 64%,
      rgba(255, 243, 219, 0.055) 100%
    );
  box-shadow:
    0 34px 80px -40px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  transform:
    perspective(1400px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  transform-origin: 50% 50%;
  transition:
    border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease),
    transform 0.6s var(--ease);
  animation: panel-in 1s var(--ease) backwards;
}

.panel.is-tilting {
  will-change: transform;
  transition:
    border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease),
    transform 0.18s ease-out;
}

.panel:hover {
  border-color: rgba(250, 238, 214, 0.24);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 14%;
  left: 14%;
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  opacity: 0.55;
  pointer-events: none;
}

.panel::after {
  content: "";
  position: absolute;
  inset: -30% -45%;
  z-index: 0;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(255, 255, 255, 0.055) 50%,
    transparent 58%
  );
  transform: translate3d(-46%, 0, 0);
  transition: transform 1.5s var(--ease);
  pointer-events: none;
}

.panel:hover::after {
  transform: translate3d(46%, 0, 0);
}

.panel > * {
  position: relative;
  z-index: 1;
}

.stack--mid > .panel:nth-child(1) {
  animation-delay: 0.08s;
}

.stack--mid > .panel:nth-child(2) {
  animation-delay: 0.16s;
}

.stack--side > .panel:nth-child(1) {
  animation-delay: 0.2s;
}

.stack--side > .panel:nth-child(2) {
  animation-delay: 0.28s;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.996);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* ---------- 左栏 ---------- */

.rail {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 20px;
}

.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rail__head .search {
  width: min(420px, 46%);
  flex-shrink: 0;
  margin-top: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
}

.brand__seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 7px;
  background: linear-gradient(145deg, #ab4c3f, #7d2e26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 230, 0.28),
    inset 0 0 18px rgba(0, 0, 0, 0.34),
    0 10px 24px -12px rgba(157, 60, 50, 0.9);
  color: #f8ebd8;
  font-family: var(--font-brush);
  font-size: 26px;
  line-height: 1;
  transform: rotate(-3deg);
}

.brand__name {
  display: block;
  color: #f8f0e1;
  font-family: var(--font-latin);
  font-size: 26px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.brand__name span {
  color: var(--gold);
  font-size: 0.68em;
  letter-spacing: 0.04em;
}

.brand__sub {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--font-brush);
  font-size: 12px;
  letter-spacing: 0.32em;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin-top: 18px;
  padding: 0 13px;
  border: 1px solid rgba(248, 238, 217, 0.13);
  border-radius: 12px;
  background: rgba(8, 14, 15, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}

.search:focus-within {
  border-color: rgba(217, 185, 130, 0.52);
  background: rgba(10, 17, 18, 0.44);
  box-shadow:
    0 0 0 3px rgba(217, 185, 130, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.search svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--dim);
  transition: color 0.3s;
}

.search:focus-within svg {
  color: var(--gold);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.search input::placeholder {
  color: #7f7566;
}

.search input::-webkit-search-cancel-button {
  appearance: none;
}

.search kbd {
  flex-shrink: 0;
  padding: 1px 6px;
  border: 1px solid rgba(248, 238, 217, 0.16);
  border-radius: 4px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

.rail__section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 26px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-brush);
  font-size: 13px;
  letter-spacing: 0.2em;
}

.rail__section span:last-child {
  color: #6f6556;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.cats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  margin-top: 9px;
  padding-right: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 185, 130, 0.25) transparent;
}

.cat {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-brush);
  font-size: 16px;
  letter-spacing: 0.04em;
  text-align: left;
  transition:
    background 0.35s,
    border-color 0.35s,
    color 0.35s,
    box-shadow 0.35s;
}

.cat:hover {
  border-color: rgba(255, 250, 240, 0.09);
  background: rgba(255, 250, 240, 0.045);
  color: var(--text);
}

.cat.is-active {
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.08));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 16%, transparent),
    rgba(255, 250, 240, 0.035) 62%,
    transparent
  );
  box-shadow: inset 2px 0 0 var(--accent);
  color: #fff8ec;
}

.cat__idx {
  color: #776c5c;
  font-family: var(--font-latin);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.cat.is-active .cat__idx {
  color: var(--accent);
}

.cat__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat__count {
  color: #7b7161;
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.cat.is-active .cat__count {
  color: color-mix(in srgb, var(--accent) 76%, #ffffff 8%);
}

.cat--skeleton {
  height: 41px;
  border-color: rgba(255, 250, 240, 0.04);
  background: linear-gradient(
    100deg,
    rgba(255, 250, 240, 0.03) 28%,
    rgba(255, 250, 240, 0.07) 48%,
    rgba(255, 250, 240, 0.03) 68%
  );
  background-size: 220% 100%;
  animation: shimmer 1.9s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #7f7566;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.rail__foot p:last-child {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #6a6152;
}

/* ---------- 快捷授权 ---------- */

.auth {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 20px;
}

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

.auth__seal {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 5px;
  background: linear-gradient(145deg, #a8473a, #7d2f26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 230, 0.24),
    inset 0 0 12px rgba(0, 0, 0, 0.28);
  color: #f8ead7;
  font-family: var(--font-brush);
  font-size: 15px;
  line-height: 1;
  transform: rotate(-3deg);
}

.auth__title {
  color: #f7efdf;
  font-family: var(--font-brush);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.auth__tag {
  margin-left: auto;
  color: #776c5c;
  font-family: var(--font-brush);
  font-size: 10px;
  letter-spacing: 0.24em;
}

.auth__hint {
  margin-top: 3px;
  color: #8d8272;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.auth__form {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.auth__input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(248, 238, 217, 0.13);
  border-radius: 9px;
  outline: none;
  background: rgba(8, 14, 15, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  transition: border-color 0.35s, box-shadow 0.35s, background 0.35s;
}

.auth__input::placeholder {
  color: #776c5c;
  letter-spacing: 0.02em;
}

.auth__input:focus {
  border-color: rgba(217, 185, 130, 0.52);
  background: rgba(10, 17, 18, 0.4);
  box-shadow:
    0 0 0 3px rgba(217, 185, 130, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth__btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(217, 185, 130, 0.36);
  border-radius: 9px;
  background: rgba(217, 185, 130, 0.07);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 13px;
  letter-spacing: 0.12em;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.auth__btn:hover {
  border-color: rgba(217, 185, 130, 0.58);
  background: rgba(217, 185, 130, 0.15);
  box-shadow: 0 0 26px -10px rgba(217, 185, 130, 0.55);
}

.auth__status {
  min-height: 14px;
  margin-top: 7px;
  color: #776c5c;
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.auth__status[data-state="warn"] {
  color: var(--gold);
}

.auth__status[data-state="ok"] {
  color: var(--jade);
}

.auth__status[data-state="error"] {
  color: #d98b7f;
}

.auth__status[data-state="pending"] {
  color: var(--muted);
}

/* ---------- 日期时间 ---------- */

.clock {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 26px;
}

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

.clock__solar-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.clock__solar {
  overflow: hidden;
  color: #b9ab94;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock__lunar-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.clock__festival {
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  margin-top: 2px;
  padding: 1px 9px;
  border: 1px solid rgba(217, 185, 130, 0.24);
  border-radius: 999px;
  background: rgba(217, 185, 130, 0.06);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock__festival[data-state="today"] {
  border-color: rgba(217, 185, 130, 0.42);
  background: rgba(217, 185, 130, 0.13);
}

.clock__label {
  color: var(--gold);
  font-family: var(--font-brush);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.clock__lunar {
  color: #f8f0e2;
  font-family: var(--font-brush);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.clock__week {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.clock__time {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-shrink: 0;
}

.clock__time strong {
  color: #fbf4e6;
  font-family: var(--font-brush);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-shadow: 0 0 36px rgba(217, 185, 130, 0.18);
  font-variant-numeric: tabular-nums;
}

.clock__time span {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
}

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

.board {
  display: flex;
  flex-direction: column;
  padding: 24px 26px 16px;
}

.board__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.board__heading {
  min-width: 0;
}

.board__kicker {
  color: var(--gold);
  font-family: var(--font-brush);
  font-size: 12px;
  letter-spacing: 0.28em;
}

.board__title {
  overflow: hidden;
  margin-top: 4px;
  color: #fbf4e6;
  font-family: var(--font-brush);
  font-size: clamp(28px, 2.5vw, 38px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board__desc {
  overflow: hidden;
  margin-top: 3px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board__count {
  flex-shrink: 0;
  margin-top: 4px;
  padding: 5px 10px;
  border: 1px solid rgba(248, 238, 217, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.035);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.links {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 185, 130, 0.24) transparent;
}

/* ---------- 常用站点拼图占位 ---------- */

.site-mosaic {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  grid-template-areas:
    "a a b b c d"
    "a a e f g h"
    "i i e j j k"
    "l m n j j o"
    "p p q r s t";
  gap: 8px;
  flex: 1 1 auto;
  min-height: 300px;
  margin-top: 22px;
}

.site-tile {
  min-height: 0;
  border: 1px solid rgba(248, 238, 217, 0.09);
  border-radius: 10px;
  background: linear-gradient(
    150deg,
    rgba(255, 250, 240, 0.035),
    rgba(255, 250, 240, 0.008)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.site-tile--a { grid-area: a; }
.site-tile--b { grid-area: b; }
.site-tile--c { grid-area: c; }
.site-tile--d { grid-area: d; }
.site-tile--e { grid-area: e; }
.site-tile--f { grid-area: f; }
.site-tile--g { grid-area: g; }
.site-tile--h { grid-area: h; }
.site-tile--i { grid-area: i; }
.site-tile--j { grid-area: j; }
.site-tile--k { grid-area: k; }
.site-tile--l { grid-area: l; }
.site-tile--m { grid-area: m; }
.site-tile--n { grid-area: n; }
.site-tile--o { grid-area: o; }
.site-tile--p { grid-area: p; }
.site-tile--q { grid-area: q; }
.site-tile--r { grid-area: r; }
.site-tile--s { grid-area: s; }
.site-tile--t { grid-area: t; }

.link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 14px;
  gap: 13px;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 9px;
  transition:
    background 0.35s,
    transform 0.4s var(--ease),
    border-color 0.35s;
}

.link:last-child {
  border-bottom-color: transparent;
}

.link:hover,
.link:focus-visible {
  border-bottom-color: transparent;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 12%, transparent),
    rgba(255, 250, 240, 0.03) 58%,
    transparent
  );
  transform: translateX(3px);
}

.link__mono {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: color-mix(in srgb, var(--accent) 78%, #ffffff 16%);
  font-family: var(--font-brush);
  font-size: 16px;
  transition: border-color 0.35s, box-shadow 0.35s;
}

.link:hover .link__mono {
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, 0.1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 18px -8px var(--accent);
}

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

.link__body strong {
  overflow: hidden;
  color: #f7efe1;
  font-family: var(--font-brush);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link__body small {
  overflow: hidden;
  color: #8f8473;
  font-size: 12px;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link__domain {
  max-width: 130px;
  overflow: hidden;
  color: #6f6556;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link__arrow {
  width: 13px;
  height: 13px;
  color: #6f6556;
  transition: color 0.3s, transform 0.35s var(--ease);
}

.link:hover .link__arrow {
  color: var(--accent);
  transform: translate3d(2px, -2px, 0);
}

.link--skeleton {
  height: 64px;
  border-bottom-color: transparent;
  background: linear-gradient(
    100deg,
    rgba(255, 250, 240, 0.025) 28%,
    rgba(255, 250, 240, 0.06) 48%,
    rgba(255, 250, 240, 0.025) 68%
  );
  background-size: 220% 100%;
  animation: shimmer 1.9s linear infinite;
}

.board__empty {
  display: grid;
  place-items: center;
  flex: 1;
  color: #827767;
  font-family: var(--font-brush);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.board__state {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.board__state-title {
  color: #f3e8d5;
  font-family: var(--font-brush);
  font-size: 20px;
  letter-spacing: 0.06em;
}

.board__state-desc {
  color: var(--dim);
  font-size: 12px;
}

.board__retry {
  margin-top: 14px;
  padding: 8px 22px;
  border: 1px solid rgba(217, 185, 130, 0.36);
  border-radius: 8px;
  background: rgba(217, 185, 130, 0.07);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 14px;
  letter-spacing: 0.16em;
  transition: background 0.35s, box-shadow 0.35s;
}

.board__retry:hover {
  background: rgba(217, 185, 130, 0.14);
  box-shadow: 0 0 26px -10px rgba(217, 185, 130, 0.6);
}

/* ---------- 仓库分享 ---------- */

.repos {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.repos__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.repos__kicker {
  color: var(--gold);
  font-family: var(--font-brush);
  font-size: 12px;
  letter-spacing: 0.28em;
}

.repos__title {
  margin-top: 4px;
  color: #fbf4e6;
  font-family: var(--font-brush);
  font-size: clamp(28px, 2.5vw, 38px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.repos__count {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid rgba(248, 238, 217, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.035);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.repos__filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 14px;
}

.repos__row {
  display: flex;
  gap: 8px;
}

.repos__row--split .repos__input {
  flex: 1;
  min-width: 0;
}

.repos__input--filter {
  height: 34px;
  font-size: 10.5px;
}

.repos__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(248, 238, 217, 0.13);
  border-radius: 10px;
  outline: none;
  background: rgba(8, 14, 15, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.01em;
  transition: border-color 0.35s, box-shadow 0.35s, background 0.35s;
}

.repos__input::placeholder {
  color: #776c5c;
}

.repos__input:focus {
  border-color: rgba(217, 185, 130, 0.52);
  background: rgba(10, 17, 18, 0.4);
  box-shadow:
    0 0 0 3px rgba(217, 185, 130, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.repos__submit {
  flex-shrink: 0;
  height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(217, 185, 130, 0.36);
  border-radius: 10px;
  background: rgba(217, 185, 130, 0.07);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 14px;
  letter-spacing: 0.12em;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.repos__submit:hover {
  border-color: rgba(217, 185, 130, 0.58);
  background: rgba(217, 185, 130, 0.15);
  box-shadow: 0 0 26px -10px rgba(217, 185, 130, 0.55);
}

.repos__status {
  min-height: 15px;
  margin-top: 8px;
  color: var(--dim);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.repos__status[data-state="ok"] {
  color: var(--jade);
}

.repos__status[data-state="warn"] {
  color: var(--gold);
}

.repos__status[data-state="error"] {
  color: #d98b7f;
}

.repos__status[data-state="pending"] {
  color: var(--muted);
}

.repos__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  flex: 1;
  min-height: 0;
  margin-top: 12px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 185, 130, 0.24) transparent;
}

.repo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 0;
  aspect-ratio: 4 / 3;
  padding: 11px 12px;
  border: 1px solid rgba(248, 238, 217, 0.09);
  border-radius: 12px;
  background: linear-gradient(
    150deg,
    rgba(255, 250, 240, 0.045),
    rgba(255, 250, 240, 0.012)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s,
    background 0.35s;
}

.repo:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 185, 130, 0.28);
  background: linear-gradient(
    150deg,
    rgba(255, 250, 240, 0.075),
    rgba(255, 250, 240, 0.02)
  );
}

.repo__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.repo__name {
  display: -webkit-box;
  overflow: hidden;
  color: #f7efe1;
  font-family: var(--font-brush);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

.repo__date {
  flex-shrink: 0;
  color: #6f6556;
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.repo__auth {
  overflow: hidden;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  opacity: 0.75;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.repo__host {
  overflow: hidden;
  color: #807565;
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo__arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: #6f6556;
  transition: color 0.3s, transform 0.35s var(--ease);
}

.repo:hover .repo__arrow {
  color: var(--gold);
  transform: translate3d(2px, -2px, 0);
}

.repos__empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 220px;
  height: 100%;
  color: #7b7161;
  font-family: var(--font-brush);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-align: center;
}

/* ---------- 授权码入口 ---------- */

.auth-entry {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-height: 0;
  padding: 1px 2px;
}

.auth-entry__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.auth-entry__title {
  color: #f7efdf;
  font-family: var(--font-brush);
  font-size: 20px;
  letter-spacing: 0.12em;
}

.auth-entry__tag {
  position: absolute;
  top: 50%;
  right: 0;
  flex-shrink: 0;
  color: var(--dim);
  font-family: var(--font-brush);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  transform: translateY(-50%);
}

.auth-entry__form {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: center;
  width: min(100%, 360px);
}

.auth-entry__input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(248, 238, 217, 0.13);
  border-radius: 9px;
  outline: none;
  background: rgba(8, 14, 15, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  transition: border-color 0.35s, box-shadow 0.35s, background 0.35s;
}

.auth-entry__input::placeholder {
  color: #776c5c;
  letter-spacing: 0.02em;
}

.auth-entry__input:focus {
  border-color: rgba(217, 185, 130, 0.52);
  background: rgba(10, 17, 18, 0.4);
  box-shadow:
    0 0 0 3px rgba(217, 185, 130, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-entry__submit {
  flex-shrink: 0;
  height: 34px;
  padding: 0 18px;
  border: 1px solid rgba(217, 185, 130, 0.36);
  border-radius: 9px;
  background: rgba(217, 185, 130, 0.07);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 13px;
  letter-spacing: 0.12em;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.auth-entry__submit:hover {
  border-color: rgba(217, 185, 130, 0.58);
  background: rgba(217, 185, 130, 0.15);
  box-shadow: 0 0 26px -10px rgba(217, 185, 130, 0.55);
}

.auth-entry__status {
  min-height: 13px;
  color: #776c5c;
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.auth-entry__status[data-state="warn"] {
  color: var(--gold);
}

.auth-entry__status[data-state="ok"] {
  color: var(--jade);
}

.auth-entry__status[data-state="error"] {
  color: #d98b7f;
}

.auth-entry__status[data-state="pending"] {
  color: var(--muted);
}

/* ---------- 常用 ---------- */

.pinned {
  display: flex;
  flex-direction: column;
  padding: 15px 20px 16px;
}

.pinned__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-shrink: 0;
}

.pinned__head h2 {
  color: #f5ecdc;
  font-family: var(--font-brush);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.pinned__head span {
  color: #7b7161;
  font-family: var(--font-mono);
  font-size: 9px;
}

.pinned__list {
  display: flex;
  gap: 9px;
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.pin {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  flex: 1 0 27%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(248, 238, 217, 0.09);
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.03);
  transition:
    background 0.35s,
    border-color 0.35s,
    transform 0.35s var(--ease);
}

.pin:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.09));
  background: rgba(255, 250, 240, 0.065);
  transform: translateY(-2px);
}

.pin__mono {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: color-mix(in srgb, var(--accent) 80%, #ffffff 12%);
  font-family: var(--font-brush);
  font-size: 13px;
}

.pin__text {
  min-width: 0;
}

.pin__name {
  display: -webkit-box;
  overflow: hidden;
  color: #f1e7d7;
  font-family: var(--font-brush);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

.pin__domain {
  display: none;
}

.pinned__empty {
  display: grid;
  place-items: center;
  flex: 1;
  color: #7b7161;
  font-family: var(--font-brush);
  font-size: 13px;
}

/* ---------- 详情 ---------- */

.detail {
  display: flex;
  flex-direction: column;
  padding: 24px 26px 22px;
}

.detail__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-shrink: 0;
  color: var(--gold);
  font-family: var(--font-brush);
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: 0.24em;
}

.detail__title {
  padding-left: 0.24em;
  line-height: 1.2;
  text-align: center;
}

.detail__grid {
  display: grid;
  grid-template-rows: auto repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-height: 0;
  margin-top: 16px;
}

.detail__row {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.detail__row--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail__cell {
  min-height: 0;
  border: 1px solid rgba(248, 238, 217, 0.09);
  border-radius: 10px;
  background: linear-gradient(
    150deg,
    rgba(255, 250, 240, 0.035),
    rgba(255, 250, 240, 0.008)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.detail__cell--label {
  display: grid;
  place-items: center;
  padding: 0 6px;
  appearance: none;
  cursor: pointer;
  color: color-mix(in srgb, var(--gold) 78%, #ffffff 8%);
  font-family: var(--font-brush);
  font-size: clamp(14px, 1.25vw, 19px);
  letter-spacing: 0.14em;
  text-align: center;
  text-shadow: 0 0 18px rgba(217, 185, 130, 0.22);
  transition: border-color 0.35s, background 0.35s, color 0.35s;
}

.detail__cell--label:hover {
  border-color: rgba(217, 185, 130, 0.32);
  background: linear-gradient(
    150deg,
    rgba(255, 250, 240, 0.06),
    rgba(255, 250, 240, 0.015)
  );
  color: var(--gold-bright);
}

/* ---------- 个人中心 ---------- */

.detail__cell--profile {
  display: flex;
  padding: 8px 10px;
}

.profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "avatar meta"
    "banner banner";
  align-items: center;
  gap: 7px 10px;
  width: 100%;
  min-width: 0;
}

.profile__avatar {
  grid-area: avatar;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(104, 201, 255, 0.55);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.28), transparent 58%),
    linear-gradient(150deg, #35b6f2, #0d7fbe);
  color: #f2fbff;
  font-family: var(--font-brush);
  font-size: 22px;
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 8px 18px -10px rgba(0, 0, 0, 0.9);
}

.profile__avatar--guest {
  border-color: rgba(104, 201, 255, 0.3);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.16), transparent 58%),
    linear-gradient(150deg, #2b6f8f, #1d4258);
  color: #cfeaf7;
}

.profile__meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.profile__name {
  overflow: hidden;
  color: #ff5f68;
  font-family: var(--font-brush);
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile__level {
  flex-shrink: 0;
  padding: 1px 7px;
  border: 1px solid rgba(246, 195, 32, 0.45);
  border-radius: 999px;
  background: rgba(246, 195, 32, 0.1);
  color: #f6c320;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}

.profile__sign {
  overflow: hidden;
  color: #ffffff;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile__banner {
  grid-area: banner;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  padding: 2px 7px 2px 10px;
  border: 1px solid rgba(141, 198, 63, 0.42);
  border-radius: 7px;
  background: linear-gradient(
    110deg,
    rgba(141, 198, 63, 0.2),
    rgba(141, 198, 63, 0.07)
  );
}

.profile__title {
  overflow: hidden;
  color: #9bdc45;
  font-family: var(--font-brush);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile__btn {
  flex-shrink: 0;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(141, 198, 63, 0.45);
  border-radius: 999px;
  background: rgba(141, 198, 63, 0.12);
  color: #b7e86f;
  font-family: var(--font-brush);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  line-height: 1;
  transition: background 0.3s, border-color 0.3s;
}

.profile__btn:hover {
  border-color: rgba(141, 198, 63, 0.7);
  background: rgba(141, 198, 63, 0.22);
}

.profile__btn--ghost {
  border-color: rgba(248, 238, 217, 0.16);
  background: transparent;
  color: var(--dim);
}

.profile__btn--ghost:hover {
  border-color: rgba(248, 238, 217, 0.3);
  background: rgba(255, 250, 240, 0.05);
  color: var(--muted);
}

.detail__cat {
  position: absolute;
  top: 50%;
  right: 0;
  max-width: 42%;
  overflow: hidden;
  color: #847968;
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
}

.detail__body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-top: 34px;
}

.detail__mark {
  position: absolute;
  top: -28px;
  right: -12px;
  z-index: 0;
  color: color-mix(in srgb, var(--accent, var(--gold)) 60%, #ffffff 8%);
  font-family: var(--font-brush);
  font-size: clamp(120px, 12vw, 200px);
  line-height: 1;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  transition: color 0.6s;
}

.detail__name {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: #fbf4e6;
  font-family: var(--font-brush);
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.detail__desc {
  position: relative;
  z-index: 1;
  max-width: 30ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

.detail__domain {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.detail.is-shown .detail__name,
.detail.is-shown .detail__desc,
.detail.is-shown .detail__domain {
  animation: detail-in 0.55s var(--ease) both;
}

.detail.is-shown .detail__desc {
  animation-delay: 0.04s;
}

.detail.is-shown .detail__domain {
  animation-delay: 0.08s;
}

@keyframes detail-in {
  from {
    opacity: 0;
    transform: translate3d(0, 9px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.detail__go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-top: 18px;
  padding: 12px 15px;
  border: 1px solid rgba(217, 185, 130, 0.34);
  border-radius: 10px;
  background: rgba(217, 185, 130, 0.07);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 15px;
  letter-spacing: 0.14em;
  transition: background 0.35s, box-shadow 0.35s, border-color 0.35s;
}

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

.detail__go:hover {
  border-color: rgba(217, 185, 130, 0.58);
  background: rgba(217, 185, 130, 0.15);
  box-shadow: 0 0 30px -10px rgba(217, 185, 130, 0.55);
}

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

.status {
  display: flex;
  flex-direction: column;
  padding: 15px 22px 13px;
}

.status__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-shrink: 0;
}

.status__head h2 {
  color: #f5ecdc;
  font-family: var(--font-brush);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.status__head span {
  color: #6f6556;
  font-family: var(--font-mono);
  font-size: 9px;
}

.status__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 1;
  align-content: center;
  margin-top: 6px;
}

.status__metrics > div {
  min-width: 0;
  padding-right: 12px;
}

.status__metrics > div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.status__metrics dt {
  overflow: hidden;
  color: #8d8272;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status__metrics dd {
  overflow: hidden;
  margin-top: 6px;
  color: #f8f0e2;
  font-family: var(--font-brush);
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.status__metrics dd small {
  margin-left: 2px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

/* 内容清空状态：只保留面板骨架 */
body.is-blank .rail__section,
body.is-blank .cats,
body.is-blank .rail__foot,
body.is-blank .board__head,
body.is-blank .links,
body.is-blank .board__state,
body.is-blank .pinned__head,
body.is-blank .pinned__list,
body.is-blank .detail__body,
body.is-blank .detail__go,
body.is-blank .detail__cat {
  display: none !important;
}

/* ---------- 窄屏 ---------- */

@media (min-width: 981px) {
  body {
    overflow: hidden;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .shell {
    gap: 10px;
    padding: 10px;
  }

  .rail {
    padding: 20px 16px 16px;
  }

  .board {
    padding: 18px 18px 12px;
  }

  .board__title {
    font-size: 30px;
  }

  .link {
    grid-template-columns: 36px minmax(0, 1fr) 13px;
    gap: 10px;
  }

  .link__domain {
    display: none;
  }

  .link__mono {
    width: 36px;
    height: 36px;
  }

  .clock {
    padding: 14px 18px;
  }

  .clock__time strong {
    font-size: 42px;
  }

  .clock__lunar {
    font-size: 24px;
  }

  .detail {
    padding: 20px;
  }

  .detail__name {
    font-size: 34px;
  }

  .pinned {
    padding: 12px 14px;
  }

  .pin__domain {
    display: none;
  }

  .status {
    padding: 12px 16px;
  }

  .status__metrics dt {
    font-size: 9px;
  }

  .status__metrics dd {
    font-size: 24px;
  }

  .status__metrics > div + div {
    padding-left: 10px;
  }
}

@media (max-width: 980px) {
  body {
    overflow-y: auto;
  }

  .shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: 100svh;
    padding: 12px;
  }

  .stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .rail {
    padding: 22px 20px 18px;
  }

  .rail__intro {
    margin-top: 16px;
  }

  .cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    max-height: 220px;
    flex: none;
  }

  .cat {
    font-size: 15px;
  }

  .clock {
    padding: 18px 20px;
  }

  .board {
    min-height: 560px;
    padding: 20px 20px 14px;
  }

  .board__title {
    font-size: 32px;
  }

  .links {
    min-height: 380px;
  }

  .link {
    grid-template-columns: 38px minmax(0, 1fr) 13px;
  }

  .link__domain {
    display: none;
  }

  .pinned {
    min-height: 132px;
  }

  .pinned__list {
    overflow-x: auto;
  }

  .pin {
    flex: 0 0 46%;
  }

  .detail {
    min-height: 360px;
    padding: 22px 20px;
  }

  .detail__name {
    font-size: 36px;
  }

  .status {
    min-height: 150px;
  }
}

@media (max-width: 520px) {
  .brand__name {
    font-size: 23px;
  }

  .brand__seal {
    width: 40px;
    height: 40px;
    font-size: 23px;
  }

  .stack--top {
    display: flex;
    flex-direction: column;
    flex: none;
  }

  .stack--top .panel {
    height: auto;
  }

  .rail__head {
    flex-wrap: wrap;
    gap: 14px;
  }

  .rail__head .search {
    width: 100%;
    margin-top: 0;
  }

  .board {
    min-height: 520px;
    padding: 18px 16px 12px;
  }

  .board__title {
    font-size: 28px;
  }

  .link {
    padding: 11px 6px;
  }

  .link__body strong {
    font-size: 17px;
  }
}

/* ---------- 授权码页 ---------- */

body.bind-page {
  overflow-y: auto;
}

.bind-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px;
}

.bind-card {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  padding: 30px 34px 22px;
  animation-delay: 0.08s;
}

.bind__mark {
  position: absolute;
  top: -44px;
  right: -18px;
  z-index: 0;
  color: var(--gold);
  font-family: var(--font-brush);
  font-size: clamp(160px, 22vw, 240px);
  line-height: 1;
  opacity: 0.055;
  pointer-events: none;
  user-select: none;
}

.bind__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bind__tag {
  color: var(--dim);
  font-family: var(--font-brush);
  font-size: 11px;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.bind__body {
  position: relative;
  z-index: 1;
  margin-top: 42px;
}

.bind__kicker {
  color: var(--gold);
  font-family: var(--font-brush);
  font-size: 11px;
  letter-spacing: 0.32em;
}

.bind__title {
  margin-top: 8px;
  color: #fbf4e6;
  font-family: var(--font-brush);
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.bind__desc {
  max-width: 46ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.bind__form {
  margin-top: 26px;
}

.bind__input {
  height: 48px;
  border-radius: 10px;
  font-size: 13px;
}

.bind__btn {
  height: 48px;
  padding: 0 26px;
  border-radius: 10px;
  font-size: 15px;
}

.bind__status {
  margin-top: 12px;
  font-size: 10.5px;
}

.bind__back {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-brush);
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.bind__back:hover {
  color: var(--gold-bright);
}

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

@media (max-width: 520px) {
  .bind-shell {
    padding: 14px;
  }

  .bind-card {
    padding: 22px 20px 18px;
  }

  .bind__body {
    margin-top: 34px;
  }

  .bind__title {
    font-size: 38px;
  }

  .bind__form {
    flex-direction: column;
  }

  .bind__btn {
    width: 100%;
  }
}

/* ---------- 功能提示 ---------- */

.feature-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 70;
  padding: 9px 18px;
  border: 1px solid rgba(217, 185, 130, 0.28);
  border-radius: 999px;
  background: rgba(10, 17, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 13px;
  letter-spacing: 0.08em;
  pointer-events: none;
  transform: translateX(-50%);
  animation: toast-in 0.3s var(--ease) both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---------- 登录弹窗 ---------- */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-modal[hidden] {
  display: none !important;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 7, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-modal__card {
  position: relative;
  width: min(430px, 100%);
  padding: 26px 28px 22px;
  border: 1px solid rgba(248, 238, 217, 0.16);
  border-radius: 16px;
  background: linear-gradient(
    148deg,
    rgba(255, 250, 240, 0.12) 0%,
    rgba(255, 255, 255, 0.02) 58%,
    rgba(255, 243, 219, 0.05) 100%
  );
  box-shadow:
    0 40px 90px -40px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: auth-modal-in 0.45s var(--ease) both;
}

@keyframes auth-modal-in {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-modal__head h2 {
  color: #f8f0e2;
  font-family: var(--font-brush);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.auth-modal__close {
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(248, 238, 217, 0.16);
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: border-color 0.3s, color 0.3s;
}

.auth-modal__close:hover {
  border-color: rgba(248, 238, 217, 0.3);
  color: var(--text);
}

.auth-modal__desc {
  margin-top: 8px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.75;
}

.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.auth-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-modal__field > label {
  color: #8d8272;
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.auth-modal__field input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(248, 238, 217, 0.13);
  border-radius: 10px;
  outline: none;
  background: rgba(8, 14, 15, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 0.35s, box-shadow 0.35s, background 0.35s;
}

.auth-modal__field input::placeholder {
  color: #776c5c;
  letter-spacing: 0.02em;
}

.auth-modal__field input:focus {
  border-color: rgba(217, 185, 130, 0.52);
  background: rgba(10, 17, 18, 0.44);
  box-shadow:
    0 0 0 3px rgba(217, 185, 130, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-modal__code {
  display: flex;
  gap: 8px;
}

.auth-modal__code input {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.2em;
}

.auth-modal__code button {
  flex-shrink: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(217, 185, 130, 0.36);
  border-radius: 10px;
  background: rgba(217, 185, 130, 0.07);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: background 0.3s, border-color 0.3s;
}

.auth-modal__code button:hover:not(:disabled) {
  border-color: rgba(217, 185, 130, 0.58);
  background: rgba(217, 185, 130, 0.15);
}

.auth-modal__code button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-modal__submit {
  height: 44px;
  margin-top: 4px;
  border: 1px solid rgba(217, 185, 130, 0.42);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(217, 185, 130, 0.16),
    rgba(217, 185, 130, 0.07)
  );
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 16px;
  letter-spacing: 0.16em;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.auth-modal__submit:hover {
  border-color: rgba(217, 185, 130, 0.6);
  background: linear-gradient(
    180deg,
    rgba(217, 185, 130, 0.24),
    rgba(217, 185, 130, 0.1)
  );
  box-shadow: 0 0 30px -12px rgba(217, 185, 130, 0.6);
}

.auth-modal__status {
  min-height: 14px;
  color: #776c5c;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.auth-modal__status[data-state="ok"] {
  color: var(--jade);
}

.auth-modal__status[data-state="warn"] {
  color: var(--gold);
}

.auth-modal__status[data-state="error"] {
  color: #d98b7f;
}

.auth-modal__status[data-state="pending"] {
  color: var(--muted);
}

/* ---------- 卡片内部跟手辉光（玻璃底下的光） ---------- */

.panel > .panel-glow {
  position: absolute;
  top: var(--glow-y, 50%);
  left: var(--glow-x, 50%);
  z-index: 0;
  width: clamp(180px, 46%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(
      38% 38% at 50% 48%,
      rgba(255, 249, 238, 0.32),
      transparent 72%
    ),
    radial-gradient(
      closest-side,
      color-mix(in srgb, var(--accent, var(--gold)) 62%, transparent),
      transparent 74%
    ),
    radial-gradient(
      closest-side,
      color-mix(in srgb, var(--accent, var(--gold)) 26%, transparent),
      transparent 92%
    );
  filter: blur(28px);
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.82);
  transition: opacity 0.45s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
  mix-blend-mode: screen;
}

.panel:hover > .panel-glow,
.panel:focus-within > .panel-glow {
  opacity: 0.9;
  transform: translate3d(-50%, -50%, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
