/* ── 顶栏 ── */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    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: 12px;
    letter-spacing: 2px;
    color: rgba(var(--system-rgb), 0.45);
}
.topbar .tb-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 120px;
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    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: 13px;
    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、首页的 .glass-panel 用同一套表面。
   毛玻璃原先只有 .card 和 .glass-panel 有，.panel 漏了（Safari 前缀也漏了），一并补齐。
   底色深浅与内外边距是各页刻意的差异，留在各自文件里，别往这里加。 */
.card,
.panel,
.glass-panel {
    position: relative;
    z-index: 2;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--gold-rgb), 0.15);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(var(--shadow-rgb), 0.35);
}
