@import "tailwindcss"; html, body, #root { height: 100%; } body { @apply bg-stone-950 text-stone-100 antialiased; /* 顶部一抹极淡的琥珀氛围光,避免大面积纯黑的"朴素感" */ background-image: radial-gradient(60rem 28rem at 50% -8rem, rgb(217 119 6 / 0.07), transparent 70%); background-repeat: no-repeat; } /* 入场:卡片/区块轻微上浮淡入(列表 stagger 用 style.animationDelay) */ @keyframes fx-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } } .fx-rise { animation: fx-rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; } ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { @apply rounded-full border-2 border-transparent bg-clip-padding bg-stone-700/70; } ::-webkit-scrollbar-thumb:hover { @apply bg-stone-600; } /* 阅读页主题:纸/米/夜,文本类阅读器共用 —— 见 lib/readerPrefs.ts */ [data-rd="paper"] { --rd-bg: #faf8f4; --rd-fg: #292524; --rd-link: #9a3412; } [data-rd="sepia"] { --rd-bg: #f0e6d2; --rd-fg: #433a29; --rd-link: #92400e; } [data-rd="night"] { --rd-bg: #171512; --rd-fg: #c6c0b6; --rd-link: #e0a458; } .rd-surface { background: var(--rd-bg); color: var(--rd-fg); font-family: ui-serif, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, Georgia, serif; } .rd-surface ::selection { background: color-mix(in oklab, var(--rd-link) 30%, transparent); } /* 主题内的次级控件(章节条/翻页键),跟随当前阅读主题 */ .rd-btn { @apply rounded-md px-2.5 py-1 text-sm transition-colors; background: color-mix(in oklab, currentColor 8%, transparent); } .rd-btn:hover { background: color-mix(in oklab, currentColor 16%, transparent); } .rd-btn:disabled { @apply cursor-not-allowed opacity-40; } /* 目录侧边栏行 */ .rd-row { @apply block w-full truncate rounded-md px-2.5 py-1.5 text-left text-sm transition-colors; } .rd-row:hover { background: color-mix(in oklab, currentColor 12%, transparent); } .rd-btn-on { @apply font-semibold; background: color-mix(in oklab, currentColor 20%, transparent); } .rd-divider { border-color: color-mix(in oklab, currentColor 14%, transparent); } /* 进度/页码滑条:主题色轨道 + 强调色拇指,触摸友好 */ .rd-range { @apply h-1.5 w-full cursor-pointer appearance-none rounded-full; background: color-mix(in oklab, currentColor 18%, transparent); } .rd-range::-webkit-slider-thumb { @apply h-4 w-4 appearance-none rounded-full ring-2 ring-black/10; background: var(--rd-link, #f59e0b); } .rd-range::-moz-range-thumb { @apply h-4 w-4 rounded-full border-0; background: var(--rd-link, #f59e0b); } /* 沉浸态底部工具抽屉的滑入动效 */ @keyframes rd-rise { from { transform: translateY(100%); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } } .rd-sheet { animation: rd-rise 0.2s ease-out; } @media (prefers-reduced-motion: reduce) { .rd-sheet { animation: none; } .rd-rise-anim { transition: none !important; } .fx-rise { animation: none; } } /* markdown 正文(仅 .md-body 作用域) */ .md-body h1 { @apply mt-8 mb-3 text-2xl font-semibold; } .md-body h2 { @apply mt-6 mb-2 text-xl font-semibold; } .md-body h3 { @apply mt-4 mb-2 text-base font-semibold; } .md-body p { @apply my-3; } .md-body ul { @apply my-3 list-disc space-y-1 pl-6; } .md-body ol { @apply my-3 list-decimal space-y-1 pl-6; } .md-body blockquote { @apply my-3 border-l-2 pl-4; border-color: color-mix(in oklab, currentColor 30%, transparent); opacity: 0.75; } .md-body code { @apply rounded px-1 py-0.5 text-[0.85em]; background: color-mix(in oklab, currentColor 10%, transparent); } .md-body pre { @apply my-3 overflow-x-auto rounded-lg p-3; background: color-mix(in oklab, currentColor 6%, transparent); } .md-body pre code { @apply bg-transparent p-0; } .md-body a { color: var(--rd-link, #f59e0b); @apply underline underline-offset-2; } .md-body img { @apply my-3 max-w-full rounded; } .md-body hr { @apply my-6; border-color: color-mix(in oklab, currentColor 15%, transparent); } .md-body table { @apply my-3 w-full border-collapse text-sm; } .md-body th, .md-body td { @apply border px-2 py-1 text-left; border-color: color-mix(in oklab, currentColor 22%, transparent); }