/* ===========================================================================
   OASIS V3 候选版 · 设计变量与排版原语
   会员端与管理端共用。任何颜色、字号、间距都必须来自本文件，不在页面样式里硬编码。
   版本：MEMBER_POSTER_V3_CANDIDATE_2026-07-27
   =========================================================================== */

:root {
  /* ---- 品牌 ------------------------------------------------------------ */
  --brand: #d9ff45;
  --brand-dim: rgba(217, 255, 69, 0.16);
  --brand-line: rgba(217, 255, 69, 0.42);
  --ink-on-brand: #0d0f08;

  --alert: #ff8a6b;
  --alert-dim: rgba(255, 138, 107, 0.14);

  /* ---- 字体 ------------------------------------------------------------ */
  --font-sans: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* ---- 字号阶梯（下限 11px，取消 V1 的 7/8/9/10px） -------------------- */
  --fs-micro: 11px;   /* 英文标签、编号、时间戳 */
  --fs-caption: 12px; /* 次要说明、状态 */
  --fs-body: 13px;    /* 正文、留言 */
  --fs-body-lg: 15px; /* 卡片主信息 */
  --fs-h4: 18px;
  --fs-h3: 22px;
  --fs-h2: 28px;
  --fs-h1: 36px;
  --fs-display: 48px;
  --fs-display-lg: 64px;

  /* ---- 行高 ------------------------------------------------------------
     中文字形填满 em box，行高一律 >= 1.0，禁止 V1 的 0.82~0.94。 */
  --lh-title: 1.04;
  --lh-snug: 1.35;
  --lh-body: 1.65;

  /* ---- 字距 ------------------------------------------------------------
     --ls-en 只允许用在英文标签；中文一律 normal，禁止负字距。 */
  --ls-en: 0.14em;
  --ls-en-tight: 0.08em;
  --ls-cn: normal;

  /* ---- 字重 ------------------------------------------------------------ */
  --fw-regular: 400;
  --fw-medium: 550;
  --fw-bold: 700;
  --fw-black: 860;

  /* ---- 间距（4px 基） --------------------------------------------------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* ---- 触控与控件 ------------------------------------------------------ */
  --tap-min: 44px;
  --control-h: 44px;
  --control-h-sm: 36px;

  /* ---- 动效 ------------------------------------------------------------ */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
}

/* ===========================================================================
   会员端配色（深暖黑，单主题）
   灰阶全部实测 >= WCAG AA 4.5:1，最弱一级也在 5:1 以上。
   =========================================================================== */
.oasis-dark {
  --surface-page: #0a0a09;
  --surface-panel: #111110;
  --surface-raised: #191917;
  --surface-sunken: #050504;

  --line-soft: #262622;
  --line: #34342f;
  --line-strong: #4a4a43;

  --ink-1: #f5f5ef; /* 17.5:1  标题、主信息 */
  --ink-2: #c8c8bd; /* 11.2:1  正文 */
  --ink-3: #a3a398; /*  7.4:1  次要说明 */
  --ink-4: #8b8b80; /*  5.5:1  最弱一级，仍高于 AA */
}

/* ===========================================================================
   管理端配色
   固定框架（顶栏 + 侧栏）在 Light / Dark 下始终深蓝灰，只切换工作区。
   =========================================================================== */
.oasis-admin {
  --frame-bg: #171825;
  --frame-bg-2: #202130;
  --frame-line: #2c2d3e;
  --frame-ink-1: #e8ebff; /* 14.9:1 */
  --frame-ink-2: #a8aec8; /*  8.0:1 */
}

.oasis-admin[data-admin-theme="light"] {
  --work-bg: #eef0f5;
  --panel: #f8f9fc;
  --panel-2: #e5e8ef;
  --panel-sunken: #dfe3ec;
  --line-soft: #dde1ea;
  --line: #cfd4df;
  --line-strong: #b4bbca;

  --ink-1: #292d42; /* 12.9:1 */
  --ink-2: #5a6079; /*  5.9:1 */
  --ink-3: #6b7189; /*  4.6:1  最弱一级 */

  --solid: #181925;      /* 深色操作块 */
  --solid-ink: #e8ebff;
  --shadow-panel: 0 1px 2px rgba(24, 25, 37, 0.06), 0 8px 24px rgba(24, 25, 37, 0.05);
}

.oasis-admin[data-admin-theme="dark"] {
  --work-bg: #1b1c2b;
  --panel: #222331;
  --panel-2: #2a2c3b;
  --panel-sunken: #191a27;
  --line-soft: #2e3040;
  --line: #373950;
  --line-strong: #474a63;

  --ink-1: #e8ebff; /* 13.1:1 */
  --ink-2: #a8aec8; /*  7.1:1 */
  --ink-3: #8f95b0; /*  5.2:1 */

  --solid: #12131d;
  --solid-ink: #e8ebff;
  --shadow-panel: none;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-cn);
  /* 关键：禁止合成倾斜。拉丁字体用自带真斜体，中文字形保持正体，
     中英混排标签（如「TODAY / 今日训练」）不会再被整体拉斜。 */
  font-synthesis-style: none;
}

h1,
h2,
h3,
h4,
p,
figure,
form {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  border-radius: 0;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.hidden,
[hidden] {
  display: none !important;
}

/* ===========================================================================
   排版原语
   =========================================================================== */

/* 中文标题：正体、行高 >= 1，无负字距。斜切与速度感由 .u-en 和刻度带承担。 */
.u-title {
  font-weight: var(--fw-black);
  font-style: normal;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-cn);
  text-wrap: balance;
}

/* 英文标签：唯一允许斜体和字距的地方 */
.u-en {
  font-size: var(--fs-micro);
  font-style: italic;
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-en);
  line-height: 1.2;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.u-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ===========================================================================
   视觉母题
   =========================================================================== */

/* 斜刻度带：替代伪斜体承担运动感，用于区块起始与强调 */
.u-tick {
  display: block;
  height: 4px;
  background-image: repeating-linear-gradient(
    115deg,
    var(--brand) 0 3px,
    transparent 3px 7px
  );
}

/* 选中信号：左侧 4px 荧光绿竖条 */
.u-signal {
  position: relative;
}

.u-signal::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
}

/* 对角裁切影像蒙版 */
.u-clip-diag {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.u-clip-notch {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

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