/* =========================================================
   SirenGirl — base.css
   Reset · design tokens · typography · utilities
   Phase 1 — fully self-hosted, no external fonts or CDNs
   ========================================================= */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

:root {
    /* Palette */
    --bg:            #0b0d12;
    --bg-soft:       #10131b;
    --surface:       #161a24;
    --surface-2:     #1e2331;
    --surface-3:     #262c3d;
    --border:        rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .18);

    --text:          #eef1f7;
    --text-dim:      #a3abc0;
    --text-mute:     #737b93;

    --brand:         #ff4d7e;
    --brand-2:       #7a5cff;
    --accent:        #22d3ee;
    --success:       #34d399;

    --brand-grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);

    /* Radius */
    --r-xs: 8px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-pill: 999px;

    /* Spacing scale */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;

    /* Elevation */
    --shadow-2: 0 8px 24px rgba(0, 0, 0, .40);
    --shadow-3: 0 18px 48px rgba(0, 0, 0, .55);

    /* Layout metrics */
    /* Phase 32：--sidebar-w 已删除 —— 抽屉宽度改用 min(210px, 88vw)
       （对齐 onlykiss），该变量再无任何 var() 引用。 */
    /* Phase 10：搜索框移出页眉后，页眉只剩单行（桌面 75px 对齐 OnlyKiss） */
    --topbar-h: 60px;
    --content-max: 1500px;

    /* Motion */
    --t-fast: .15s ease;
    --t-base: .22s ease;
    --t-slow: .35s cubic-bezier(.22, .61, .36, 1);

    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
                 Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

body {
    margin: 0;
    min-height: 100dvh;
    background-color: var(--bg);
    background-image:
        radial-gradient(1100px 620px at 82% -12%, rgba(122, 92, 255, .18), transparent 62%),
        radial-gradient(820px 520px at -8% 8%, rgba(255, 77, 126, .13), transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, video, canvas {
    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; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--sp-5) 0;
}

/* ---------- Focus visibility ---------- */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

::selection {
    background: var(--brand);
    color: #fff;
}

/* ---------- Scrollbars ---------- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: var(--r-pill);
}

/* ---------------------------------------------------------
   Phase 12：隐藏**页面本身**右侧的纵向滚动条。
   ⚠ 只是「隐藏」，不是「禁止滚动」——
     绝对不能用 overflow: hidden：本站首页高约 1890px，
     那样会让底部内容永久不可达。滚轮 / 触摸 / 键盘 / 拖动
     全都不受影响，只是不再画出滚动条。
   ⚠ 只作用于根元素 html，**不**动上面那条 * 规则：
     抽屉（.sidebar, overflow-y:auto）等内部滚动区仍保留
     4px 胶囊滚动条 —— 那里需要可见提示表明还有内容。
   ⚠ 浏览器必须分别设置三套属性，没有统一写法：
     · scrollbar-width         → Firefox 64+
     · -ms-overflow-style      → 旧 Edge / IE11
     · ::-webkit-scrollbar     → Chrome / Edge / Safari
   --------------------------------------------------------- */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* ---------- Utilities ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: var(--sp-4);
    z-index: 200;
    padding: 10px 16px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    border-radius: var(--r-sm);
    transition: top var(--t-base);
}

.skip-link:focus { top: var(--sp-3); }

[hidden] { display: none !important; }
