/* ==========================================================================
   拦江榜 · 柔和界面层 soft-ui.css
   放在所有样式之后加载。只调整圆角、描边、阴影、过渡与交互反馈，
   不改动任何排布（宽度、栅格、间距、字号保持原样）。
   想整体回退：删掉各页面里引用本文件的那一行 <link> 即可。
   ========================================================================== */

:root{
  /* 圆角 */
  --soft-r-xl:22px;   /* 大面板：主卡片、首屏图框 */
  --soft-r-lg:16px;   /* 普通卡片、列表容器 */
  --soft-r-md:12px;   /* 输入框、次级面板、提示条 */
  --soft-r-sm:10px;   /* 按钮 */
  --soft-pill:999px;  /* 标签、分段切换 */
  /* 描边：用带一点墨绿的半透明线，比纯灰线更轻 */
  --soft-line:rgba(33,100,71,.11);
  --soft-line-2:rgba(33,100,71,.20);
  --soft-line-hi:rgba(33,100,71,.42);
  /* 阴影：分层、带墨绿色调，模拟宣纸上的自然投影 */
  --soft-shadow-xs:0 1px 2px rgba(22,60,40,.05);
  --soft-shadow-sm:0 1px 2px rgba(22,60,40,.04),0 4px 14px -6px rgba(22,60,40,.10);
  --soft-shadow-md:0 2px 4px rgba(22,60,40,.04),0 14px 34px -14px rgba(22,60,40,.18);
  --soft-shadow-lg:0 4px 10px rgba(22,60,40,.05),0 24px 56px -20px rgba(22,60,40,.24);
  --soft-shadow-btn:0 1px 2px rgba(16,58,38,.18),0 6px 16px -6px rgba(16,58,38,.38);
  --soft-shadow-btn-hi:0 2px 4px rgba(16,58,38,.18),0 12px 24px -8px rgba(16,58,38,.42);
  --soft-ring:0 0 0 3px rgba(33,100,71,.18);
  /* 动效曲线 */
  --soft-ease:cubic-bezier(.22,.61,.36,1);
  --soft-spring:cubic-bezier(.34,1.36,.64,1);
  --soft-t:.28s;
  /* 让原有使用变量的地方一起变柔和 */
  --r:var(--soft-r-lg);
  --r-sm:var(--soft-r-md);
}

/* ---------- 全局：过渡、焦点、选区、滚动条 ---------- */
html:root body :is(a,button,.button,summary,input,select,textarea,label,.tile,.tool-entry,.next-link,.qs-opt){
  transition:color var(--soft-t) var(--soft-ease),background-color var(--soft-t) var(--soft-ease),
    border-color var(--soft-t) var(--soft-ease),box-shadow var(--soft-t) var(--soft-ease),
    transform var(--soft-t) var(--soft-spring),opacity var(--soft-t) var(--soft-ease);
}
html:root body :is(a,button,.button,summary,[tabindex]):focus-visible{
  outline:2px solid rgba(33,100,71,.55);outline-offset:3px;border-radius:var(--soft-r-sm);
}
html{scroll-behavior:smooth}
html::-webkit-scrollbar{width:10px;height:10px}
html::-webkit-scrollbar-thumb{background:rgba(33,100,71,.22);border-radius:10px;border:2px solid #fff}
html::-webkit-scrollbar-thumb:hover{background:rgba(33,100,71,.38)}
html::-webkit-scrollbar-track{background:transparent}
html:root body .skip-link{border-radius:0 0 var(--soft-r-sm) var(--soft-r-sm)}

/* ---------- 顶栏导航 ---------- */
html:root body #site-nav a{border-radius:var(--soft-r-sm)}
html:root body #site-nav a:not([aria-current]):hover{color:#164e37}
/* 卡片式链接、按钮式链接悬停时不出现下划线 */
html:root body a[href]:is(.tile,.next-link,.home-rank-link,.plain-link,.back-link,.more,.btn-sm,.primary,.action-link,#site-nav a,.section-nav a):hover{text-decoration:none}
@media (min-width:761px){
  html:root body #site-nav a::after{
    content:'';position:absolute;bottom:3px;left:10px;right:10px;height:2px;border-radius:2px;
    background:#216447;transform:scaleX(0);transform-origin:center;opacity:0;
    transition:transform .32s var(--soft-ease),opacity .32s var(--soft-ease);
  }
  html:root body #site-nav a:hover::after{transform:scaleX(.6);opacity:.35}
  html:root body #site-nav a[aria-current]::after{left:4px;right:4px;transform:scaleX(1);opacity:1}
}
html:root body .site-header .site-cta{
  border-radius:var(--soft-pill);
  box-shadow:inset 0 0 0 1px var(--soft-line),var(--soft-shadow-xs);
}
html:root body .site-header .site-cta:hover{background-color:#e6f1ea;box-shadow:inset 0 0 0 1px var(--soft-line-2),var(--soft-shadow-sm);transform:translateY(-1px)}
html:root body .brand-seal{border-radius:4px}

/* ---------- 按钮：主按钮 ---------- */
html:root body :is(.primary,.button.primary,.action-link,.btn-gold,.qs-submit,.bf-submit,.download-button):not(:disabled){
  border-radius:var(--soft-r-sm);
  box-shadow:var(--soft-shadow-btn);
}
html:root body :is(.primary,.button.primary,.btn-gold,.qs-submit,.bf-submit):disabled{border-radius:var(--soft-r-sm)}
html:root body :is(.primary,.button.primary,.action-link,.btn-gold,.qs-submit,.bf-submit):not(:disabled):hover,
html:root body .tool-hub .tool-entry:is(:hover,:focus-visible) .tool-enter{
  box-shadow:var(--soft-shadow-btn-hi);transform:translateY(-2px);
}
html:root body :is(.primary,.button.primary,.action-link,.btn-gold,.qs-submit,.bf-submit):not(:disabled):active,
html:root body .tool-hub .tool-entry:active .tool-enter{
  transform:translateY(0) scale(.98)!important;box-shadow:0 1px 2px rgba(16,58,38,.2)!important;
  transition-duration:.08s;
}
html:root body .tool-hub .tool-enter{border-radius:var(--soft-r-sm);box-shadow:var(--soft-shadow-btn)}

/* ---------- 按钮：线框 / 次级 ---------- */
html:root body :is(.text-button,.btn-sm,.more,.plain-link,.back-link,[id=retry],[id=retry-profile],.pagination button,.rank-row-actions button,.sheet-card button,.link-btn){
  border-radius:var(--soft-r-sm);
  border-color:var(--soft-line-2);
  box-shadow:var(--soft-shadow-xs);
}
html:root body :is(.text-button,.btn-sm,.more,.plain-link,.back-link,[id=retry],[id=retry-profile],.pagination button,.rank-row-actions button,.sheet-card button,.link-btn):not(:disabled):hover{
  border-color:var(--soft-line-hi);background-color:#eaf3ee;box-shadow:var(--soft-shadow-sm);transform:translateY(-1px);
}
html:root body :is(.text-button,.btn-sm,.more,.plain-link,.back-link,[id=retry],[id=retry-profile],.pagination button,.rank-row-actions button,.sheet-card button,.link-btn):not(:disabled):active{
  transform:scale(.98)!important;box-shadow:none!important;transition-duration:.08s;
}
/* 首页「查看排行榜」 */
html:root body .home-rank-link{
  border-color:rgba(33,100,71,.55);border-radius:var(--soft-pill);
  background:rgba(255,255,255,.62);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  box-shadow:var(--soft-shadow-sm);
}
html:root body .home-rank-link span{display:inline-block;transition:transform var(--soft-t) var(--soft-spring)}
html:root body .home-rank-link:is(:hover,:focus-visible){box-shadow:var(--soft-shadow-btn);transform:translateY(-2px)}
html:root body .home-rank-link:is(:hover,:focus-visible) span{transform:translateX(4px)}
html:root body .download-button{border-radius:var(--soft-r-md)}
html:root body .download-button:disabled{box-shadow:var(--soft-shadow-sm)}

/* 内页其余按钮统一圆角 */
html:root body.inner-light button:not(.tab):not([role=tab]):not(.link-btn):not(.site-cta){border-radius:var(--soft-r-sm)}
/* 通用按钮的悬停位移改得更轻 */
html:root body button:not(:disabled):hover,html:root body .button:hover{transform:translateY(-1px)}

/* ---------- 栏目切换（每日打榜 / 拦江榜 / 我的参赛记录） ---------- */
html:root body .section-nav a{border-radius:var(--soft-pill)}
html:root body .daily-main .section-nav a{
  border-radius:var(--soft-pill);border-color:var(--soft-line);
  box-shadow:var(--soft-shadow-xs);background-color:rgba(255,255,255,.78);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
}
html:root body .daily-main .section-nav a:not([aria-current]):hover{background-color:#fff;border-color:var(--soft-line-2);transform:translateY(-1px);text-decoration:none}
html:root body .daily-main .section-nav a[aria-current]{border-color:rgba(33,100,71,.30);background-color:#eaf3ee}

/* ---------- 榜单 tab（每日榜 / 月度榜…） ---------- */
html:root body .tabs .tab{border-radius:var(--soft-r-sm) var(--soft-r-sm) 0 0;position:relative}
html:root body .tabs .tab:not(.is-active):hover{background:rgba(33,100,71,.05);color:#164e37}
html:root body .tabs{border-bottom-color:var(--soft-line)}

/* ---------- 卡片与面板 ---------- */
html:root body :is(.event-surface,.library-search,.rank-workspace,.account-card,.bf,.card.setup){
  border-radius:var(--soft-r-xl);border-color:var(--soft-line);box-shadow:var(--soft-shadow-md);
}
html:root body :is(.library-shelf,.tool-list,.rank-tail,.study-strip,.calendar-strip,.future-tools,.mini-note,.next-link,.page-note,.help.card,.profile-card){
  border-radius:var(--soft-r-lg);border-color:var(--soft-line);box-shadow:var(--soft-shadow-sm);
}
html:root body .tool-list{overflow:hidden}
/* 「我的」等页面的分区只有部分带边框，只改圆角与线色，不加阴影 */
html:root body .sec{border-radius:var(--soft-r-lg);border-color:var(--soft-line)}
html:root body .account-card.sec{box-shadow:var(--soft-shadow-md)}
/* 用 ID 写死的状态框 */
html:root body :is(#load-status,#material-status,#board-state){border-radius:var(--soft-r-md)!important;border-color:var(--soft-line)!important}
html:root body :is(.status,.tip,.identity-notice,.rule,.insight-box,.contest-note,.board-shell .is-empty,.locked-preview){
  border-radius:var(--soft-r-md);border-color:var(--soft-line);
}
html:root body .event-surface .section-line,html:root body .rank-workspace .section-line{border-bottom-color:var(--soft-line)}
/* 首屏图框 */
html:root body :is(.tool-hub .editorial-hero,.ranking-hero,.library-hero,.daily-hero,.account-card-wrap){border-radius:var(--soft-r-xl)}
html:root body .tool-hub .editorial-hero{overflow:hidden}

/* 可点击卡片：悬停轻抬 */
html:root body :is(.next-link,.tile){border-color:var(--soft-line);border-radius:var(--soft-r-lg);box-shadow:var(--soft-shadow-sm)}
html:root body :is(.next-link,.tile):hover{
  transform:translateY(-3px);box-shadow:var(--soft-shadow-md)!important;
  border-color:var(--soft-line-2);text-decoration:none;
}
html:root body .tile:hover{background-color:#f5faf6}
html:root body .tile .ic{border-radius:14px}
html:root body :is(.next-link,.tile)::after{transition:transform var(--soft-t) var(--soft-spring)}
html:root body :is(.next-link,.tile):hover::after{transform:translate(3px,-3px)}

/* 工具列表行 */
html:root body .tool-hub .tool-entry{border-bottom-color:var(--soft-line)}
html:root body .tool-hub .tool-entry:hover{background:rgba(234,243,238,.7);box-shadow:none}
html:root body .tool-hub .tool-mark{transition:transform .45s var(--soft-spring)}
html:root body .tool-hub .tool-entry:hover .tool-mark{transform:translateY(-3px) rotate(-2deg)}

/* 折叠面板 */
html:root body details > summary{border-radius:var(--soft-r-md);cursor:pointer}
html:root body details > summary:hover{color:#164e37}

/* ---------- 表单 ---------- */
html:root body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){
  border-radius:var(--soft-r-md);border-color:var(--soft-line-2);
  box-shadow:inset 0 1px 2px rgba(22,60,40,.04);
}
html:root body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea):hover{border-color:rgba(33,100,71,.34)}
html:root body #form-view :is(select,input:not([type=checkbox])){border-radius:var(--soft-r-md);border-color:var(--soft-line-2)}
html:root body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea):focus{
  border-color:rgba(33,100,71,.6);box-shadow:var(--soft-ring),inset 0 1px 2px rgba(22,60,40,.03);outline:0;
  background-color:#fff;
}
html:root body input[type=checkbox]{accent-color:#216447;border-radius:4px}

/* 登录方式切换、六爻起卦方式等分段控件 */
html:root body :is(.mode-tabs,.seg,.bf-seg,.qs-tabs){border-radius:var(--soft-r-md);border-color:var(--soft-line)}
html:root body .mode-tabs button,html:root body .seg button{border-radius:9px}
html:root body .mode-tabs button[aria-selected=true]{box-shadow:var(--soft-shadow-btn)}
html:root body .bf-row button{border-radius:8px}
html:root body .bf-row button.is-on{box-shadow:0 1px 2px rgba(16,58,38,.18),0 4px 10px -4px rgba(16,58,38,.35)}
html:root body .bf-row{border-bottom-color:var(--soft-line)}
html:root body .shell-top{border-bottom-color:var(--soft-line)}

/* ---------- 打榜答题（数据加载后出现） ---------- */
html:root body .qs-q{border-radius:var(--soft-r-lg);border-color:var(--soft-line-2);box-shadow:var(--soft-shadow-xs)}
html:root body .qs-opt{border-radius:var(--soft-r-md);border-color:var(--soft-line-2)}
html:root body .qs-opt:hover{transform:translateX(2px)}
html:root body .qs-opt:has(input:checked){box-shadow:0 0 0 3px rgba(33,100,71,.10)}
html:root body .qs-frame{border-radius:var(--soft-r-md)}

/* ---------- 二维码弹层 ---------- */
html:root body .sheet:not([hidden]){animation:soft-fade .28s var(--soft-ease) both}
html:root body .sheet{background:rgba(16,36,25,.42);backdrop-filter:blur(8px) saturate(1.1);-webkit-backdrop-filter:blur(8px) saturate(1.1)}
html:root body .sheet-card{border-radius:var(--soft-r-xl);box-shadow:0 30px 80px -20px rgba(10,40,25,.45);animation:soft-pop .42s var(--soft-spring) both}
html:root body .sheet-card img{border-radius:var(--soft-r-md)}
@keyframes soft-fade{from{opacity:0}to{opacity:1}}
@keyframes soft-pop{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}

/* ---------- 页脚 ---------- */
html:root body .site-footer{border-top-color:var(--soft-line)}
html:root body .site-footer .footer-links a{border-radius:6px}
html:root body[data-home-display=brand] .site-footer{border-radius:var(--soft-r-lg) var(--soft-r-lg) 0 0;border-color:rgba(255,255,255,.6);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}

/* ---------- 手机端 ---------- */
@media (max-width:760px){
  :root{--soft-r-xl:18px;--soft-r-lg:14px}
  /* 底部标签栏：毛玻璃 + 顶部柔影，当前项加一枚小圆点 */
  html:root body #site-nav,html:root body .site-tabbar{
    background:rgba(255,255,255,.86)!important;
    backdrop-filter:blur(14px) saturate(1.2)!important;-webkit-backdrop-filter:blur(14px) saturate(1.2)!important;
    box-shadow:0 -1px 0 rgba(33,100,71,.08),0 -10px 30px -12px rgba(22,60,40,.18);
  }
  html:root body #site-nav a:hover::after{opacity:0}
}
@media (hover:none){
  /* 触屏上不保留悬停位移，避免点完后卡片停在“抬起”状态 */
  html:root body :is(.next-link,.tile,button,.button,.home-rank-link,.site-cta):hover{transform:none}
}

/* ---------- 尊重“减少动态效果”设置 ---------- */
@media (prefers-reduced-motion:reduce){
  html:root body *{transition-duration:.01ms!important;animation-duration:.01ms!important}
  html:root body :is(.next-link,.tile,button,.button,.home-rank-link,.tool-mark,.tool-enter):hover{transform:none!important}
}
html.motion-off body *{transition-duration:.01ms!important;animation-duration:.01ms!important}
