/* 词元码头 · Sub2API 全站换肤
 * 由 Nginx 注入到 Sub2API 每个页面的 <head>（见 nginx/cimatou.conf 的 sub_filter）。
 * 主色的替换（青绿 → 海图品红、石板灰 → 夜航海蓝）在 Nginx 色板映射里完成，这里只做结构上的点睛：
 *   1. 首页 iframe 容器无缝衔接
 *   2. 登录 / 注册 / 找回密码：铺海图底，卡片换成图廓样式
 *   3. 控制台：去掉光斑与发光阴影，顶栏加经纬度刻度条，品牌名用海图宋体
 * 选择器只依赖 Sub2API 的语义类名（card-glass / sidebar-* / btn-*），升级后如有错位，删掉对应段落即可回退。
 */

@font-face {
  font-family: "Dock Serif";
  src: url("/dock/fonts/dock-serif-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --dock-paper: #F7FAFA;
  --dock-ink: #18232E;
  --dock-ink-2: #4B5A68;
  --dock-magenta: #B0156D;
  --dock-rule: rgba(24, 35, 46, 0.14);
  --dock-serif: "Dock Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
}
html.dark {
  --dock-paper: #07111A;
  --dock-ink: #D5E0E8;
  --dock-ink-2: #9CAFBE;
  --dock-magenta: #E25AA8;
  --dock-rule: rgba(213, 224, 232, 0.12);
}

::selection { background: rgba(176, 21, 109, 0.2); }

/* ------------------------------------------------------------ 1. 首页 iframe */
#app .min-h-screen:has(> iframe.h-screen) { background: var(--dock-paper); }
#app iframe.h-screen.w-full.border-0 {
  display: block;
  height: 100vh;
  height: 100dvh;
  background: var(--dock-paper);
}

/* ------------------------------------------------------------ 2. 登录 / 注册 / 找回密码 */
/* AuthLayout 根节点：relative flex min-h-screen items-center justify-center overflow-hidden p-4 */
.min-h-screen.items-center.justify-center.overflow-hidden:has(> .relative.z-10 .card-glass) > .absolute.inset-0:first-child {
  background: radial-gradient(ellipse 46% 58% at 50% 46%, rgba(247, 250, 250, 0.92), rgba(247, 250, 250, 0.55) 70%, rgba(247, 250, 250, 0.4)),
              url("/dock/theme/chart-bg.svg") center / cover no-repeat;
}
html.dark .min-h-screen.items-center.justify-center.overflow-hidden:has(> .relative.z-10 .card-glass) > .absolute.inset-0:first-child {
  background: radial-gradient(ellipse 46% 58% at 50% 46%, rgba(7, 17, 26, 0.9), rgba(7, 17, 26, 0.55) 70%, rgba(7, 17, 26, 0.38)),
              url("/dock/theme/chart-bg-night.svg") center / cover no-repeat;
}
/* 原有的光斑与网格 */
.min-h-screen.items-center.justify-center.overflow-hidden:has(> .relative.z-10 .card-glass) > .pointer-events-none.absolute.inset-0 {
  display: none;
}
/* 品牌区：去掉 Logo 的彩色投影，站名改用海图宋体 */
.relative.z-10.max-w-md > .mb-8.text-center > .inline-flex {
  box-shadow: none;
}
.relative.z-10.max-w-md > .mb-8.text-center > h1 {
  font-family: var(--dock-serif);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: 0.08em;
  background: none;
  color: var(--dock-ink);
  -webkit-text-fill-color: currentColor;
}
.relative.z-10.max-w-md > .mb-8.text-center > p {
  color: var(--dock-ink-2);
}
.relative.z-10.max-w-md > .mb-8.text-center > h1,
.relative.z-10.max-w-md > .mb-8.text-center > p {
  text-shadow: 0 0 10px var(--dock-paper), 0 0 3px var(--dock-paper);
}
/* 卡片：不透明纸面 + 墨线框 + 顶部经纬度刻度条 */
.relative.z-10.max-w-md > .card-glass {
  position: relative;
  background: var(--dock-paper);
  border: 1px solid var(--dock-ink);
  border-radius: 4px;
  box-shadow: 0 18px 40px -24px rgba(24, 35, 46, 0.35);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.relative.z-10.max-w-md > .card-glass::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  border-bottom: 1px solid var(--dock-ink);
  border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(90deg, var(--dock-ink) 0 32px, transparent 32px 64px);
}
.relative.z-10.max-w-md > .card-glass h2 {
  font-family: var(--dock-serif);
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------ 3. 控制台 */
/* 背景光斑 */
.bg-mesh-gradient { background-image: none !important; }

/* 顶栏：底部一条经纬度刻度条（黑白相间，与首页图廓一致） */
header.glass.sticky.top-0 { border-bottom-color: var(--dock-rule); }
header.glass.sticky.top-0::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--dock-ink) 0 56px, transparent 56px 112px);
  opacity: 0.85;
}

/* 侧栏品牌 */
.sidebar-logo { box-shadow: none !important; }
.sidebar-brand-title {
  font-family: var(--dock-serif);
  font-weight: 700;
  letter-spacing: 0.06em;
}
/* 当前菜单：左侧一道品红航线 */
.sidebar-link-active { box-shadow: inset 3px 0 0 var(--dock-magenta); }

/* 主按钮：去掉发光阴影，保留品红 */
.btn-primary,
.btn-primary:hover {
  box-shadow: none;
}
