Files
woniu336 8ef24eb90c fix: 排出此卦不再先闪旧表单;案例页卦盘窄屏对齐、伏神注记;原文不再截断
- /liuyao 加三态门(boot → restoring / form):静态页首帧只渲染「载入中…」,
  带 ?c=/?case= 进来时不再先闪出旧的起卦表单,直接「排盘中…」→ 盘面
- 案例页:卦盘表头与数据行共用 .ex-grid(CSS 变量化列宽),窄屏收起伏神列时
  不再错位(有伏神时整盘仍在 430px 内对齐),表下补一行「伏神:…(N爻)」注记
- 抽取脚本不再截断原注与 1/2/3 三段(例1 原注此前断在句中),JSON 74KB → 313KB
2026-11-06 13:20:21 +08:00

418 lines
12 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@import "tailwindcss";
/* ==========================================================================
设计系统 v2 —— 雾霾蓝 · 墨 · 赭金(配一点朱砂)
取自参考封面:底 #9FB4BD / 墨字 #333D42 / 赭金纹样 #8A6A3A
用于 App 时提亮为浅雾蓝,赭金与朱砂负责"点睛",避免全冷色滑向医院感。
字体策略:正文系统无衬线;卦名、标题用宋/楷,靠字形对比而非花字。
========================================================================== */
@theme {
/* ── 底与面:雾蓝做"水",纸做"面",两者分工,不再糊成一片灰 ── */
--color-water-1: #E2EAED; /* 页底:雾蓝,略压深以拉开与纸卡的层次 */
--color-water-2: #DCE6E9;
--color-water-3: #CBD9DE;
--color-paper-0: #FFFEF9; /* 纸面:纯暖白,与雾蓝底拉开明度差 */
--color-paper-1: #F6F3EA;
--color-paper-2: #EDE8DB;
--color-line: #DCD5C5; /* 纸上的发丝线偏暖 */
--color-line-strong: #C0B8A4;
/* ── 墨 ── */
--color-ink-900: #141C22;
--color-ink-800: #1F2A31;
--color-ink-700: #33424A;
--color-ink-600: #4A5D66;
--color-ink-500: #667A83;
--color-ink-400: #97A9B0;
/* ── 主色:青黛(比雾蓝更沉、更清),用作强调线与选中态 ── */
--color-mist-300: #A9C3CB;
--color-mist-400: #8AACB6;
--color-mist-500: #6C94A0;
--color-mist-600: #4F7C8A;
--color-mist-700: #3D6673;
--color-mist-900: #244450;
/* ── 赭石:唯一的热色,用于用神/印章/主按钮边 ── */
--color-gold-200: #EFE2C9;
--color-gold-300: #D9BC8A;
--color-gold-500: #A9713F;
--color-gold-600: #8E582B;
/* ── 朱砂:动爻 ── */
--color-cinnabar-300: #D08C7C;
--color-cinnabar-500: #A8402F;
--color-cinnabar-600: #8F3323;
--color-jade-500: #3F6B55;
--font-sans-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, sans-serif;
--font-song: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
--font-kai: "Kaiti SC", "KaiTi", "STKaiti", "Songti SC", serif;
--radius-xs: 2px;
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 10px;
--ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
}
:root {
/* 语义别名 */
--bg: #E2EAED;
--bg-sunken: #DCE6E9;
--surface: #FFFEF9;
--surface-raised: #FFFFFF;
--ink: #141C22;
--ink-soft: #53666F;
--ink-faint: #74878F;
--hairline: #D8D2C2;
--primary: #4F7C8A;
--primary-deep: #244450;
--accent: #8E582B;
--accent-tint: #F3E9D8;
--danger: #8F3323;
--ok: #3F6B55;
--yao-yang: #141C22;
--yao-yin: #6C94A0;
--yao-moving: #8F3323;
/* 兼容旧令牌 */
--yi-bg: var(--bg);
--yi-surface: var(--surface);
--yi-ink: var(--ink);
--yi-muted: var(--ink-soft);
--yi-faint: var(--ink-faint);
--yi-line: var(--hairline);
--yi-accent: var(--danger);
--yi-accent-soft: #F3E4E1;
}
/* 宣纸米皮肤(备选):把"水"也换成纸 */
[data-skin='paper'] {
--color-water-1: #EFEADC;
--color-water-2: #E4DDCB;
--color-water-3: #D6CDB8;
--bg: #EFEADC;
--bg-sunken: #E4DDCB;
}
html,
body {
background: var(--bg);
color: var(--ink);
}
body {
font-family: var(--font-sans-cn);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-webkit-tap-highlight-color: transparent;
overscroll-behavior-y: none;
}
/* 手机端细节:安全区、禁双击缩放、滚动惯性 */
.safe-bottom {
padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.safe-top {
padding-top: env(safe-area-inset-top, 0px);
}
.no-scrollbar {
scrollbar-width: none;
-ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
/* 细分隔线:0.5px 观感,替代卡片描边 */
.hair-t {
border-top: 1px solid var(--hairline);
}
.hair-b {
border-bottom: 1px solid var(--hairline);
}
/* 触控目标下限(Android 无障碍建议 ≥48dp) */
.tap {
min-height: 44px;
min-width: 44px;
}
/* 按压反馈:App 手感,不用 hover 依赖 */
.press {
transition: transform 120ms var(--ease-out-soft), background-color 150ms ease, border-color 150ms ease,
color 150ms ease;
}
.press:active {
transform: scale(0.975);
}
input::placeholder,
textarea::placeholder {
color: #7a7264;
opacity: 1;
font-size: 15px;
}
/* 铜钱翻滚:CastWorkbench 的三枚铜钱用 */
@keyframes coin-roll-0 {
0% { transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); }
35% { transform: translateY(-46px) rotateX(450deg) rotateY(540deg) rotateZ(-15deg) scale(1.08); }
68% { transform: translateY(4px) rotateX(720deg) rotateY(900deg) rotateZ(8deg) scale(0.98); }
85% { transform: translateY(-8px) rotateX(900deg) rotateY(1080deg) rotateZ(-6deg) scale(1.02); }
100% { transform: translateY(0) rotateX(1080deg) rotateY(1080deg) rotateZ(-10deg) scale(1); }
}
@keyframes coin-roll-1 {
0% { transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); }
35% { transform: translateY(-58px) rotateX(540deg) rotateY(720deg) rotateZ(18deg) scale(1.1); }
68% { transform: translateY(5px) rotateX(900deg) rotateY(1080deg) rotateZ(-8deg) scale(0.97); }
85% { transform: translateY(-10px) rotateX(1080deg) rotateY(1260deg) rotateZ(6deg) scale(1.02); }
100% { transform: translateY(0) rotateX(1260deg) rotateY(1440deg) rotateZ(4deg) scale(1); }
}
@keyframes coin-roll-2 {
0% { transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); }
35% { transform: translateY(-48px) rotateX(400deg) rotateY(600deg) rotateZ(-22deg) scale(1.07); }
68% { transform: translateY(4px) rotateX(700deg) rotateY(960deg) rotateZ(12deg) scale(0.98); }
85% { transform: translateY(-7px) rotateX(860deg) rotateY(1140deg) rotateZ(-4deg) scale(1.01); }
100% { transform: translateY(0) rotateX(1000deg) rotateY(1260deg) rotateZ(14deg) scale(1); }
}
.coin-physical-roll-0 { animation: coin-roll-0 1100ms cubic-bezier(.25, .8, .25, 1) both; transform-style: preserve-3d; will-change: transform; }
.coin-physical-roll-1 { animation: coin-roll-1 1100ms cubic-bezier(.25, .8, .25, 1) both; transform-style: preserve-3d; will-change: transform; }
.coin-physical-roll-2 { animation: coin-roll-2 1100ms cubic-bezier(.25, .8, .25, 1) both; transform-style: preserve-3d; will-change: transform; }
/* 矢量爻象 */
@keyframes yi-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.35; }
}
@keyframes yi-line {
0% { opacity: 0; transform: scaleX(0.2); }
100% { opacity: 1; transform: scaleX(1); }
}
.hexwrap {
line-height: 0;
display: inline-block;
}
.hex {
display: block;
overflow: visible;
}
.hex .line rect {
fill: var(--yi-ink);
transition: fill 0.35s ease;
}
.hex .line.moving rect {
fill: var(--yi-accent);
}
.hex .line.pending .ph {
fill: var(--yi-line);
}
.hex .mark {
fill: var(--yi-accent);
animation: 2.4s ease-in-out infinite yi-pulse;
}
.hex .line {
transform-box: fill-box;
transform-origin: 50%;
}
.hex.stagger .line {
animation: 0.5s cubic-bezier(0.2, 0.9, 0.25, 1) both yi-line;
animation-delay: calc(var(--i, 0) * 45ms);
}
@media (prefers-reduced-motion: reduce) {
.hex .mark { opacity: 1; animation: none; }
.hex.stagger .line { animation: none; }
}
/* 站名艺术字:马善政毛笔楷书,只子集「野鹤六爻」四字(2.7KB,OFL-1.1,见 public/fonts/OFL-MaShanZheng.txt) */
@font-face {
font-family: 'YeheBrand';
src: url('/fonts/yehe-brand.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
unicode-range: U+516D, U+723B, U+91CE, U+9E64;
}
.font-brand {
font-family: 'YeheBrand', 'STXingkai', '华文行楷', 'FZShuTi', 'STKaiti', 'KaiTi', serif;
font-weight: 400;
}
/* 案例页卦盘:表头与数据行共用同一套列宽(有伏神时多一列,窄屏收起该列) */
.ex-grid {
display: grid;
column-gap: 4px;
align-items: center;
grid-template-columns: 28px 34px 74px 18px 22px 34px 74px 18px;
}
.ex-grid[data-hidden='1'] {
grid-template-columns: 28px 56px 34px 74px 18px 22px 34px 74px 18px;
}
@media (max-width: 639px) {
.ex-grid[data-hidden='1'] {
grid-template-columns: 28px 34px 74px 18px 22px 34px 74px 18px;
}
}
/* 隐藏原生日期选择器图标(起卦时间改用「修改」文字按钮唤起) */
.no-native-picker::-webkit-calendar-picker-indicator {
display: none;
}
.no-native-picker::-webkit-inner-spin-button {
display: none;
}
/* 研墨中:一滴墨落纸,涟漪两圈(解卦等待态用) */
@keyframes ink-ripple {
0% { transform: scale(0.55); opacity: 0.55; }
70% { transform: scale(1.55); opacity: 0; }
100% { transform: scale(1.55); opacity: 0; }
}
@keyframes ink-drop {
0%, 100% { transform: scale(1); opacity: 0.9; }
50% { transform: scale(1.25); opacity: 0.55; }
}
.ink-ripple {
animation: ink-ripple 1.8s ease-out infinite;
}
.ink-drop {
animation: ink-drop 1.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
.ink-ripple { animation: none; opacity: 0; }
.ink-drop { animation: none; }
}
/* 基础按钮(CastWorkbench 依赖 .btn / .btn.primary) */
.btn {
font: inherit;
border-radius: 6px;
cursor: pointer;
border: 1px solid var(--line);
background: var(--surface);
color: var(--ink);
white-space: nowrap;
justify-content: center;
align-items: center;
gap: 7px;
padding: 12px 24px;
font-size: 15px;
line-height: 1.2;
text-decoration: none;
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
display: inline-flex;
box-sizing: border-box;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary {
background: #1F2A30;
border-color: #1F2A30;
color: #FBFBF7;
letter-spacing: 0.06em;
}
.btn.primary:hover { background: #2C3A42; border-color: #2C3A42; color: #FBFBF7; }
.btn:disabled,
.btn[aria-disabled='true'] { opacity: 0.45; cursor: default; }
.btn.primary:disabled,
.btn.primary[aria-disabled='true'] {
opacity: 1;
background: #E4EBED;
color: #7C9099;
border-color: transparent;
}
.btn.sm { padding: 9px 16px; font-size: 13.5px; }
.btn.block { width: 100%; }
/* --------------------------------------------------------------------------
皮肤:雾蓝(默认)/ 宣纸米(备选)
Tailwind 4 的 bg-* 工具类引用 var(--color-*),所以覆盖这些变量即可整体换肤。
-------------------------------------------------------------------------- */
[data-skin='paper'] {
--color-paper-0: #FDFCF7;
--color-paper-1: #F4F3EE;
--color-paper-2: #EAE8E0;
--color-paper-3: #DFDCD1;
--color-line: #DFD9CB;
--color-line-strong: #C9C1AE;
--color-ink-900: #23201A;
--color-ink-800: #332F27;
--color-ink-700: #4A4438;
--color-ink-600: #5E574B;
--color-ink-500: #7D7565;
--color-mist-300: #C6CBBE;
--color-mist-400: #A8B0A2;
--color-mist-500: #8A9686;
--color-mist-600: #6F7D6E;
--color-mist-700: #5C6A5C;
--color-mist-900: #3D4A3F;
--bg: #F4F3EE;
--bg-sunken: #EAE8E0;
--surface: #FDFCF7;
--hairline: #DFD9CB;
}
/* 铜钱尺寸:与原项目一致(移动 74、宽屏 84);源图 85×85,别再放大以免糊 */
.coin-size {
width: 74px;
height: 74px;
}
@media (min-width: 640px) {
.coin-size {
width: 84px;
height: 84px;
}
}
/* 铜钱翻滚:3D 翻转 + 轻微抛起;时长与落地由组件控制(animationend 后才定格) */
@keyframes coin-toss {
0% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
28% { transform: translateY(-26px) rotateX(220deg) rotateY(360deg); }
55% { transform: translateY(-6px) rotateX(420deg) rotateY(720deg); }
78% { transform: translateY(-14px) rotateX(560deg) rotateY(980deg); }
100% { transform: translateY(0) rotateX(720deg) rotateY(1080deg); }
}
.coin-spin {
animation: coin-toss 900ms cubic-bezier(0.24, 0.8, 0.28, 1) both;
will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
.coin-spin {
animation: none;
}
}