/* 苓简 UX 补充：转场、触控热区、深色模式、对比度 */
@keyframes jfPageIn{from{opacity:0}to{opacity:1}}
body{animation:jfPageIn .22s ease-out both}
@media (prefers-reduced-motion: reduce){body{animation:none !important}}

/* 手机主要交互热区不低于 40vp */
@media (max-width:640px){
  .jf-guide-chip{min-width:40px !important;min-height:40px !important;padding:6px 10px !important}
  .tab,.go,.jf-btn{min-height:40px !important}
  .top .nav a,.nav a,#jfNav a{min-height:40px;display:inline-flex;align-items:center}
  .card a:not(.btn):not(.jf-btn){min-height:40px;display:inline-flex;align-items:center}
}

/* 常见弱对比文字统一加深 */
:root{--text-3:#66756e}
[style*="color:#999"],[style*="color: #999"],
[style*="color:#7b8794"],[style*="color: #7b8794"]{color:#5d6c66 !important}

/* 深色模式基础适配 */
@media (prefers-color-scheme: dark){
  :root{
    --ink:#dce8e2; --ink-2:#c7d8e4; --ink-3:#b8cbc2;
    --paper:#111714; --paper-2:#1a231f;
    --line:#2f3d36; --line-2:#405149;
    --text:#e4ece7; --text-2:#b9c7c0; --text-3:#9aaba2;
    --cinnabar:#e07a6f; --gold:#c9a76a;
    --ok:#63b98c; --warn:#d7a85c; --err:#e07a6f;
    --sh-1:0 1px 2px rgba(0,0,0,.35); --sh-2:0 6px 18px rgba(0,0,0,.35);
  }
  html,body{background:var(--paper) !important;color:var(--text) !important}
  body::before{opacity:.25}
  h1,h2,h3,h4,h5{color:var(--ink) !important}
  .card,.panel,.box,section{background:var(--paper-2) !important;border-color:var(--line) !important;color:var(--text) !important}
  .top,.nav,header,#jfNav{background:rgba(17,23,20,.94) !important;border-color:var(--line) !important}
  input[type=text],input[type=search],input[type=tel],input[type=number],select,textarea{background:#202b26 !important;color:#e4ece7 !important;border-color:var(--line-2) !important}
  button,.btn{background:#202b26 !important;color:#e4ece7 !important;border-color:#405149 !important}
  table{background:#1a231f !important;color:#e4ece7 !important}
  th{background:#24312b !important;color:#e4ece7 !important}
  a{color:#a9d4c3}
  [style*="background:#fff"],[style*="background: #fff"],
  [style*="background:#ffffff"],[style*="background: #ffffff"],
  [style*="background:white"],[style*="background: white"],
  [style*="background:#f7f3ea"],[style*="background: #f7f3ea"],
  [style*="background:#fbf9f4"],[style*="background: #fbf9f4"],
  [style*="background:#f4f7f6"],[style*="background: #f4f7f6"],
  [style*="background:#fffdf8"],[style*="background: #fffdf8"],
  [style*="background:#f5f7f8"],[style*="background: #f5f7f8"]{
    background:#1a231f !important;color:#e4ece7 !important;border-color:#2f3d36 !important
  }
  [style*="color:#333"],[style*="color: #333"],
  [style*="color:#1f2933"],[style*="color: #1f2933"],
  [style*="color:#26332f"],[style*="color: #26332f"],
  [style*="color:#17402f"],[style*="color: #17402f"],
  [style*="color:#1f4d3a"],[style*="color: #1f4d3a"],
  [style*="color:#3e4c59"],[style*="color: #3e4c59"],
  [style*="color:#000"],[style*="color: #000"]{color:#e4ece7 !important}
  [style*="border:1px solid #e"],[style*="border: 1px solid #e"]{border-color:#2f3d36 !important}
}

/* 深色模式弹窗/介绍页 */
@media (prefers-color-scheme: dark){
  #jfIntroMask,[id*="IntroMask"],.intro-mask{background:rgba(0,0,0,.62) !important}
  #jfIntroMask > div,[class*="intro-"] > div,.intro-card{background:#1a231f !important;color:#e4ece7 !important;border-color:#2f3d36 !important}
  #jfIntroMask h1,#jfIntroMask h2,#jfIntroMask h3,.intro-card h1,.intro-card h2{color:#dce8e2 !important}
  #jfIntroMask p,#jfIntroMask div,.intro-card p{color:#e4ece7 !important}
  #jfIntroMask button:not(:disabled){background:#dce8e2 !important;color:#111714 !important;border-color:#dce8e2 !important}
  #jfIntroMask button:disabled{background:#2a352f !important;color:#b9c7c0 !important}
}

/* 触控热区补强 */
@media (max-width:640px){
  .jf-guide-chip{height:40px !important;min-height:40px !important;min-width:40px !important}
  button,.jf-btn,.tab,.go{height:auto !important;min-height:40px !important}
  .card a:not(.btn):not(.jf-btn){display:inline-flex !important;min-height:40px !important;align-items:center}
  .top .nav a,.nav a,#jfNav a{min-width:40px;min-height:40px}
}

/* 深色模式：页面私有卡片/弹窗补强 */
@media (prefers-color-scheme: dark){
  .jf-card,.jf-panel,.jf-sec{background:#1a231f !important;border-color:#2f3d36 !important;color:#e4ece7 !important}
  .jf-card h1,.jf-card h2,.jf-card h3,.jf-card h4,.jf-panel h1,.jf-panel h2,.jf-panel h3{color:#dce8e2 !important}
  #jfIntroMask,#jfIntroMask *{color:#e4ece7 !important}
  #jfIntroMask h1,#jfIntroMask h2,#jfIntroMask h3{color:#dce8e2 !important}
  #jfIntroMask [style*="background:#fef0f0"],#jfIntroMask [style*="background: #fef0f0"],
  #jfIntroMask [style*="background:#fff8e6"],#jfIntroMask [style*="background: #fff8e6"]{background:#2a211c !important;color:#e4ece7 !important}
}

/* 页脚法规入口热区 */
@media (max-width:640px){
  .note a,.site a,.jf-footer a,footer a{display:inline-flex !important;align-items:center !important;min-height:40px !important;padding:2px 0}
}

/* 页面退出转场 */
body.jf-page-exit{opacity:0 !important;transition:opacity .2s ease !important;animation:none !important}
@media (prefers-reduced-motion: reduce){body.jf-page-exit{opacity:1 !important;transition:none !important}}
