/* ==========================================================================
   Fangfang · rewind（浏览器重置 + 基础排版）
   --------------------------------------------------------------------------
   设计语系：倒带回放（VHS）—— 录像带说明书米纸底 / 磁带黑主色 / 录像红点缀 /
   等宽标签字 / 磁带壳圆角 / 高信息密度。
   ⚠️ 与站内其它模板的分界线（改样式前先看这几条，避免不知不觉「长回现款」）：
     · 底色是**说明书米纸**，叠一层极淡的横向扫描纹（录像机屏的质感，不是纯色）
     · 主色是**磁带壳黑**，录像红只做「当前态 / 评分 / 主行动」，
       荧光屏绿只做「放映中 / 在线」指示，不做大面积填充
     · 标题与正文同一个无衬线字族；标签、计数、英文小标走等宽字
     · 圆角是**磁带壳**语言：上圆下平、小半径，分面靠 1px 线 + 贴纸阴影
     · 版面密度是身份：板块间距 14–18px，卡片间隙 8–10px
   ========================================================================== */

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

html {
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--ff-anchor-offset, 76px);
}

body {
    margin: 0;
    background-color: var(--ff-paper);
    /* 横向扫描纹：间距 4px 的极淡线，只在纸面上隐约可见 */
    background-image: repeating-linear-gradient(0deg, rgba(28, 25, 21, .028) 0 1px, rgba(28, 25, 21, 0) 1px 4px);
    color: var(--ff-ink);
    font: var(--ff-fs-base)/var(--ff-lh) var(--ff-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: var(--ff-lh-tight); color: var(--ff-ink); }
h1 { font-size: var(--ff-fs-h1); }
h2 { font-size: var(--ff-fs-xl); }
h3 { font-size: var(--ff-fs-md); }
h4 { font-size: var(--ff-fs-base); }
p, dl, dd, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
::selection { background: var(--ff-orange-s); color: var(--ff-ink); }

/* 数字一律等宽，行式榜单与统计条才不会左右抖 */
strong, b, em, i, .ff-num, .ff-card__score, .ff-resultbar b {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* 键盘可达性：只给键盘导航出焦点环（录像红） */
:focus-visible {
    outline: 2px solid var(--ff-orange);
    outline-offset: 2px;
    border-radius: var(--ff-r-xs);
}

/* 视觉隐藏但保留语义（页头 h1 / 列表说明） */
.ff-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* 图片骨架底色：加载期间不刺眼 */
.ff-ph { background-color: var(--ff-surface-3); }
