/* 草地俱乐部：浏览器表面与共享组件 */
:root { color-scheme: light; }

::selection { background: #1f4d30; color: #fffdf7; }

:focus-visible {
  outline: 2px solid #1f4d30;
  outline-offset: 2px;
  border-radius: 4px;
}

/* 深草绿导航带上的焦点环改用浅金，保持可见 */
#nav :focus-visible { outline-color: #f3ead3; }

input, textarea, select { caret-color: #1f4d30; }

a { text-underline-offset: 3px; }

html { scrollbar-color: #c9c0a8 #f7f3e8; }

/* 卡片：只用柔和偏移阴影，不叠边框 */
.card {
  background: #fffdf7;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20, 50, 38, .05), 0 10px 30px -14px rgba(20, 50, 38, .25);
}

/* 表格数字等宽对齐；tab 角标计数缩小弱化，避免与标签粘连 */
.tnum { font-variant-numeric: tabular-nums; }
.tab .tnum, [role="tab"] .tnum { margin-left: 4px; font-size: .8em; opacity: .7; }

/* —— 动效：全部一次性入场/反馈，transform/opacity 为主 —— */
/* 榜单揭榜：行交错升起（--i 由 JS 注入，封顶 8） */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.row-in { animation: rise .45s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* 冠军金牌：一次柔和脉冲，之后归于平静 */
@keyframes champPulse {
  from { box-shadow: 0 0 0 0 rgba(124, 95, 30, .45); }
  to { box-shadow: 0 0 0 10px rgba(124, 95, 30, 0); }
}
.champ-disc { animation: champPulse .7s ease-out .55s both; }

/* 确认弹窗：背板淡入、面板沉落；退出更快 */
@keyframes dlgFade { from { opacity: 0; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(6px); } }
.dlg-backdrop { animation: dlgFade .2s ease-out both; }
.dlg-panel { animation: dlgIn .28s cubic-bezier(0.16, 1, 0.3, 1) both; }
.dlg-out .dlg-backdrop { animation: dlgFade .15s ease-in reverse both; }
.dlg-out .dlg-panel { animation: dlgOut .15s ease-in both; }

/* 报名成功等瞬时确认：轻 pop */
@keyframes pop { from { transform: scale(.94); opacity: .6; } }
.pop { animation: pop .18s ease-out; }

/* 减少动态偏好：位移/缩放类装饰动效整体关闭（揭榜、冠军脉冲、pop、弹窗沉落与退出），
   状态由 DOM 变化本身承载；弹窗进入保留一次无位移的快速淡入，作为「出现了新层」的反馈 */
@media (prefers-reduced-motion: reduce) {
  .row-in,
  .champ-disc,
  .pop,
  .dlg-out .dlg-panel,
  .dlg-out .dlg-backdrop {
    animation: none;
  }
  .dlg-panel,
  .dlg-backdrop {
    animation: dlgFade .15s ease-out both;
  }
  /* 颜色/透明度类过渡瞬时完成（toast、hover 等状态切换不受影响） */
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
