/* ═══════════════════════════════════════════
   base.css — 子页面基础层（继承 style.css 之后）
   
   用途: 所有非 index.html 的子页面引用此文件
   解决: 覆盖 style.css 的 html/body flex 居中，
         提供统一的 body 基础样式 + 角色主题变量
   加载顺序: style.css → components.css → base.css → 页面专属style
   ═══════════════════════════════════════════ */

/* ── 覆盖 style.css 的 flex 居中 ── */
html, body {
  height: auto !important;
  min-height: 100vh;
  display: block !important;
  justify-content: normal !important;
  align-items: normal !important;
}

/* ── 子页面统一 body 基准 ── */
body {
  background: var(--color-bg, #0a060e);
  color: var(--color-text, #e8d8c8);
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ── 链接默认无装饰 ── */
a { text-decoration: none; }

/* ════════════════════════════════════
   角色主题色变量（子页面覆盖使用）
   用法: 在 <body> 或页面 <style> 中设 --role-color
   ════════════════════════════════════ */
:root {
  /* 默认黛玉粉色（向后兼容） */
  --role-hue: 335;          /* 黛玉粉的色相 */
  --role-color: hsla(var(--role-hue), 68%, 58%, 1);       /* 主色 #D4537E */
  --role-alpha-05: hsla(var(--role-hue), 68%, 58%, .05);
  --role-alpha-10: hsla(var(--role-hue), 68%, 58%, .1);
  --role-alpha-15: hsla(var(--role-hue), 68%, 58%, .15);
  --role-alpha-20: hsla(var(--role-hue), 68%, 58%, .2);
  --role-alpha-30: hsla(var(--role-hue), 68%, 58%, .3);
  --role-alpha-35: hsla(var(--role-hue), 68%, 58%, .35);
  --role-alpha-40: hsla(var(--role-hue), 68%, 58%, .4);
  --role-alpha-55: hsla(var(--role-hue), 68%, 58%, .55);
  /* 文字色 */
  --role-text: hsla(var(--role-hue), 65%, 78%, 1);        /* #e8a0b8 */
  --role-text-dim: hsla(var(--role-hue), 40%, 70%, .5);    /* 暗文 */
  --gold: #e8c84c;           /* 金色通用 */
  --text-secondary: rgba(200,180,160,.65);                 /* 次要文字 */
  --text-dim: rgba(200,180,160,.45);                       /* 弱化文字 */
}

/* ── 微信浏览器安全区域适配 ── */
@media not all and (min-resolution:.001dpcm) {
  @supports(-webkit-touch-callout:none) {
    body { padding-top: 44px !important; }
  }
}

/* ── iOS 防止自动缩放（font-size<16px 触发）── */
html { -webkit-text-size-adjust: 100%; }
input, textarea, select {
  font-size: 15px !important;  /* iOS 不缩放的最低阈值 */
}

/* ══ 水墨晕染页面进入动效（Ink Splash Entrance）══ */
.ink-splash{
  position:fixed;inset:0;z-index:99999;pointer-events:none;
  display:flex;align-items:center;justify-content:center
}
.ink-drop{
  width:0;height:0;border-radius:50%;
  background:radial-gradient(circle,
    rgba(212,83,126,.18) 0%,
    rgba(127,119,221,.1) 30%,
    rgba(26,15,46,.6) 60%,
    var(--color-bg,#0a060e) 80%);
  animation:inkSpread .6s cubic-bezier(.22,.61,.36,1) forwards;
  filter:blur(2px)
}
@keyframes inkSpread{
  0%{width:0;height:0;opacity:1}
  70%{opacity:.85}
  100%{width:320vmax;height:320vmax;opacity:0}
}
