/* 流水 · Apple 设计语言：系统字体栈 / 毛玻璃 / 圆角 / 细腻动效 */
:root{
  --ap-font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","PingFang SC","Helvetica Neue",Arial,sans-serif;
  --ap-radius:18px;--ap-radius-sm:12px;
  --ap-ease:cubic-bezier(.32,.72,0,1);
  --ap-glass:rgba(28,40,34,.62);
  --ap-hair:rgba(255,255,255,.12);
  --ap-accent:#d4b678;
}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body{font-family:var(--ap-font)!important;letter-spacing:-.01em}
h1,h2,h3{letter-spacing:-.02em!important}
input,textarea,select,button{font-family:inherit!important;-webkit-tap-highlight-color:transparent}

/* 毛玻璃卡片 */
.glass,.card,.sidebox,.modal,.dbox,.authbox,.panel{
  background:var(--ap-glass)!important;
  -webkit-backdrop-filter:saturate(180%) blur(22px);
  backdrop-filter:saturate(180%) blur(22px);
  border:1px solid var(--ap-hair)!important;
  border-radius:var(--ap-radius)!important;
  box-shadow:0 8px 32px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.06)!important;
  transition:transform .5s var(--ap-ease),box-shadow .5s var(--ap-ease),border-color .3s ease!important;
}
.glass:hover,.card:hover,.sidebox:hover{transform:translateY(-2px);box-shadow:0 14px 44px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.08)!important}

/* 按钮：Apple 触感 */
.btn,.chip,.ghost,.back,.tab,.boardbar .b,.side nav button{
  border-radius:10px!important;
  transition:transform .28s var(--ap-ease),background .28s ease,border-color .28s ease,color .28s ease,box-shadow .28s ease!important;
  will-change:transform;
}
.btn:hover,.chip:hover,.ghost:hover,.back:hover,.tab:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 8px 20px rgba(0,0,0,.22)}
.btn:active,.chip:active,.ghost:active,.back:active{transform:scale(.96)}

/* 输入框：聚焦呼吸 */
input,textarea,select{
  border-radius:10px!important;
  background:rgba(10,20,14,.55)!important;
  border:1px solid rgba(255,255,255,.1)!important;
  transition:border-color .3s ease,box-shadow .3s ease,background .3s ease!important;
}
input:focus,textarea:focus,select:focus{
  outline:none!important;
  border-color:var(--ap-accent)!important;
  box-shadow:0 0 0 4px rgba(212,182,120,.14)!important;
  background:rgba(12,26,18,.75)!important;
}

/* 入场动画 */
@keyframes ap-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@keyframes ap-fade{from{opacity:0}to{opacity:1}}
@keyframes ap-scale{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
header,.hero,.toolbar,.layout,.card,.sidebox,.authbox,.brand{animation:ap-rise .7s var(--ap-ease) both}
.layout>.card{animation-delay:.08s}.layout>aside{animation-delay:.16s}
.modal,.dbox{animation:ap-scale .42s var(--ap-ease) both}
.mask,.dm{animation:ap-fade .3s ease both}
.thread,.ticket,.item,.post,.entry,.bub{animation:ap-rise .5s var(--ap-ease) both}
.thread:nth-child(2){animation-delay:.04s}.thread:nth-child(3){animation-delay:.08s}.thread:nth-child(4){animation-delay:.12s}
.thread:nth-child(5){animation-delay:.16s}.thread:nth-child(n+6){animation-delay:.2s}

/* 气泡 */
.bub{border-radius:18px!important;animation:ap-scale .35s var(--ap-ease) both}
.bub.me{border-bottom-right-radius:5px!important}
.bub.you{border-bottom-left-radius:5px!important}

/* 滚动条 */
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(212,182,120,.28);border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:rgba(212,182,120,.45)}

/* 选中文字 */
::selection{background:rgba(212,182,120,.32);color:#fff}

/* Toast */
.ap-toast{position:fixed;left:50%;bottom:32px;transform:translateX(-50%) translateY(20px);
  background:rgba(28,40,34,.9);backdrop-filter:blur(20px);border:1px solid var(--ap-hair);
  padding:12px 22px;border-radius:14px;font-size:13px;color:#e8e8de;z-index:999;
  opacity:0;transition:opacity .35s ease,transform .45s var(--ap-ease);pointer-events:none;
  box-shadow:0 12px 40px rgba(0,0,0,.35)}
.ap-toast.on{opacity:1;transform:translateX(-50%) translateY(0)}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
