/* ── 顶栏 ── */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: var(--frame-pad);
    left: var(--frame-pad);
    right: var(--frame-pad);
    z-index: 10;
    height: var(--topbar-h);
    padding: 14px 28px;
    background: rgba(var(--bg-deep-rgb), 0.8);
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.15);
}
.topbar .user-info {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-family: var(--font-serif);
    min-width: 260px;
}
.topbar .user-info .name {
    font-size: 18px;
    letter-spacing: 4px;
    color: var(--gold);
}
.topbar .user-info .time {
    font-size: var(--t-micro);
    letter-spacing: 2px;
    color: rgba(var(--system-rgb), 0.65);
}
.topbar .tb-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    color: var(--gold);
    text-decoration: none;
    font-size: var(--t-small);
    letter-spacing: 2px;
    border: 1px solid rgba(var(--gold-rgb), 0.4);
    padding: 0 16px;
    height: 32px;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.topbar a:hover {
    background: rgba(var(--system-rgb), 0.12);
    border-color: rgba(var(--system-rgb), 0.5);
    color: var(--system);
}

/* ── 手表时钟（右下角，watch.js 注入并驱动） ── */
.watch {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 5;
    width: 80px; height: 80px;
    border: 1px solid rgba(var(--gold-rgb), 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: var(--t-small);
    color: rgba(var(--gold-rgb), 0.6);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    /* 表盘微光（左上受光）+ 外圈光晕 */
    background: radial-gradient(circle at 45% 38%, rgba(var(--gold-rgb), 0.07), rgba(var(--gold-rgb), 0) 62%);
    box-shadow: 0 0 18px rgba(var(--gold-rgb), 0.08);
}
/* 表盘内圈发线 */
.watch .dial {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(var(--gold-rgb), 0.12);
    border-radius: 50%;
}
/* 12 个小时刻度：刻度框与 .dial 同框，整框绕自身中心旋转，刻度钉在框顶
   （用默认 transform-origin: 50% 50%，圆心不受边框设备像素吸附影响；3/6/9/12 为主刻度，12 点最亮） */
.watch .tick {
    position: absolute;
    inset: 4px;
}
.watch .tick::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -0.5px;
    width: 1px;
    height: 3px;
    background: rgba(var(--gold-rgb), 0.22);
}
.watch .tick.major::before { height: 5px; background: rgba(var(--gold-rgb), 0.38); }
.watch .tick.apex::before  { height: 6px; background: rgba(var(--gold-rgb), 0.55); }
/* 数字时间的冒号按秒呼吸（亮 1s / 暗 1s） */
.watch .time .colon { animation: colon-pulse 2s infinite; }
@keyframes colon-pulse {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}
/* 两根指针：贴到表盘中心，绕自身底端旋转 = 绕圆心旋转 */
.watch::before,
.watch::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: bottom center;
}
.watch::before {            /* 分针，角度由 JS 写入 --min-deg */
    width: 1px; height: 25px;
    margin-left: -0.5px;
    background: rgba(var(--gold-rgb), 0.45);
    transform: rotate(var(--min-deg, 0deg));
}
.watch::after {             /* 时针，角度由 JS 写入 --hour-deg */
    width: 2px; height: 13px;
    margin-left: -1px;
    background: rgba(var(--gold-rgb), 0.45);
    transform: rotate(var(--hour-deg, 0deg));
}
/* 秒针（冷青 = 获批的系统指示例外，角度由 JS 写入 --sec-deg）；
   长度 30px 越过数字文字区 */
.watch .sec {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 1px;
    height: 30px;
    margin-left: -0.5px;
    background: rgba(var(--system-rgb), 0.45);
    transform-origin: bottom center;
    transform: rotate(var(--sec-deg, 0deg));
}

/* ── 玻璃面板 ──
   登录/注册/找回的 .card、语音的 .panel、首页/fate 的 .glass-panel 用同一套表面：
   填充 / 描边 / 圆角 / 投影全部走 tokens.css 的面板档，页内只留内外边距与高度差异。 */
.card,
.panel,
.glass-panel {
    position: relative;
    z-index: 2;
    background: var(--panel-fill);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-edge);
    border-radius: var(--r-panel);
    box-shadow: var(--depth-raise);
}

/* ── 备案号（_beian.html）──
   body 是 overflow-x:hidden 的居中弹性布局，放进流里会把面板顶偏，所以固定定位。
   底部居中不会和右下角的 .watch（bottom:40px / right:40px）撞上。 */
.beian {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 5;
    text-align: center;
    font-family: var(--font-serif);
    font-size: var(--t-micro);
    letter-spacing: 1px;
    /* 整条是通栏固定元素，不让它盖住页面底边任何交互；只有链接本身可点 */
    pointer-events: none;
}
.beian a {
    pointer-events: auto;
    color: rgba(var(--gold-dim-rgb), 0.7);
    text-decoration: none;
    transition: color 0.5s;
    padding: 8px 12px;
    display: inline-block;
}
.beian a:hover { color: var(--system); }
/* 公安备案徽章：官方图按原色显示，不做滤镜/调透明度；负下移让图标底边与 12px 文字基线对齐 */
.beian-icon {
    width: 16px;
    height: 18px;
    vertical-align: -4px;
    margin-right: 4px;
}

/* 全站共用的加载圈关键帧：picture 的 .spinner、voice 状态行的 .status.pending::before 都吃它 */
@keyframes spin { to { transform: rotate(360deg); } }
