/* ==========================================================
 * 花再 · 六边形工坊 —— 动效层 v5（Salis 亮白编辑风 × 克制交互）
 * 零乱闪光效、零鼠标星尾、零 backdrop-filter、零伪元素透明渐变亮光。
 * 保留：分批入场、卡片轻 3D 悬停、滚动进度细线、双封面轮播、TD 花束互斥、看板娘。
 * ========================================================== */

/* ---------- 0. 滚动进度条（极细青绿线） ---------- */
.fx-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 300;
  transform-origin: 0 50%; transform: scaleX(0);
  background: var(--accent, #0b8a8f);
  pointer-events: none;
}

/* ---------- 1. 分批入场（克制上浮，无浮夸旋转） ---------- */
.fx-stagger > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .65s var(--ease), transform .75s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.fx-stagger.is-in > *, .fx-stagger > .is-in { opacity: 1; transform: none; }
.gallery.fx-stagger > * { transform: translateY(26px) scale(.97); }
.gallery.fx-stagger.is-in > * { transform: none; }
.gallery.fx-stagger.is-in > *.is-hidden { opacity: 0; transform: scale(.94); }

/* ---------- 2. 卡片轻 3D 悬停（仅保留微倾斜，彻底去掉跟手亮斑） ---------- */
.fx-tilt { transform-style: preserve-3d; }
.fx-tilt.is-tilting { will-change: transform; transition: transform .14s linear, box-shadow .3s, border-color .3s !important; }

/* 有插画封面的文章卡：精选大卡铺满 */
.bento-post-card.is-featured .bento-cover img[src*="covers-art"] { height: 100%; aspect-ratio: auto; object-fit: cover; box-shadow: none; }
.bento-cover img[src*="covers-art"] { filter: contrast(1.01); }
.bento-post-card:hover .bento-cover img[src*="covers-art"] { transform: scale(1.04); }
.bento-cover-shade { background: linear-gradient(180deg, rgba(17, 19, 21, .04), rgba(17, 19, 21, .34)); }
.bento-cover .fx-cover-cat {
  position: absolute; left: 14px; bottom: 12px; z-index: 3;
  font: 600 11px/1 var(--sans); color: #ffffff; padding: 6px 11px; border-radius: 999px;
  background: rgba(17, 19, 21, .72); border: 1px solid rgba(255, 255, 255, .18); letter-spacing: .04em;
}

/* ---------- 3. 轻磁吸按钮 ---------- */
.fx-magnet { transition: transform .3s var(--ease) !important; }

/* ---------- 4. 轻提示胶囊 ---------- */
.fx-toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 420;
  transform: translate(-50%, 24px); opacity: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  color: #ffffff; font-weight: 600; font-size: 13.5px;
  background: #111315; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 32px -12px rgba(17, 19, 21, .45);
  transition: .35s var(--ease); pointer-events: none;
}
.fx-toast img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: top; background: #fff; }
.fx-toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- 5. 标题轻浮现（去掉旋转与模糊闪烁） ---------- */
.fx-split .fx-ch {
  display: inline-block; opacity: 0; transform: translateY(.32em);
  transition: opacity .5s var(--ease), transform .55s var(--ease);
  transition-delay: calc(var(--c) * 24ms);
}
.is-in .fx-split .fx-ch, .fx-split.is-in .fx-ch { opacity: 1; transform: none; }

/* ---------- 6. 首屏：换封面 + 视差 ---------- */
.hero-bg-next { position: absolute; inset: -4%; z-index: -2; background: center 42% / cover no-repeat; opacity: 0; transition: opacity 1.2s ease; }
.hero-bg-next.is-on { opacity: 1; }
.hero-switch {
  position: relative; z-index: 6; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .32); background: rgba(11, 15, 26, .58);
  color: #fff; font: 700 11px/1 var(--mono); letter-spacing: .1em;
  cursor: pointer; transition: background .25s, border-color .25s, transform .25s;
}
.hero-switch:hover { background: rgba(11, 138, 143, .82); border-color: rgba(255, 255, 255, .55); }
.hero-switch svg { transition: transform .55s var(--ease); }
.hero-switch:hover svg { transform: rotate(180deg); }
.hero-switch i { font-style: normal; opacity: .75; }
.hero-credit {
  position: absolute; right: 160px; bottom: 24px; z-index: 6;
  font: 500 11.5px/1.4 var(--sans); color: rgba(255, 255, 255, .82);
  padding: 5px 12px; border-radius: 999px; background: rgba(11, 15, 26, .48);
  opacity: 0; transform: translateY(-4px); transition: .45s;
}
.hero-credit.is-on { opacity: 1; transform: none; }

/* ---------- 7. 精简编辑信息条（问候 / 实时时钟 / 日历 / 站点统计） ---------- */
.widgets {
  display: grid; grid-template-columns: 1.45fr 1fr 1.15fr 1fr;
  gap: 16px; margin-top: 20px;
}
.wg {
  padding: 20px 22px; min-height: 146px;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--hairline, #e6e9ed);
  border-radius: var(--radius-card, 18px);
  box-shadow: none;
}
.wg-kicker { font-size: 10.5px; letter-spacing: .16em; color: var(--accent, #0b8a8f); font-weight: 700; }
.wg-hello { margin: 10px 0 6px; font: 500 22px/1.3 var(--serif); color: var(--ink); }
.wg-hello b { font-weight: 600; color: var(--accent, #0b8a8f); }
.wg p { margin: 0; color: var(--ink-secondary); font-size: 13px; line-height: 1.6; }
.wg-greet .wg-orb { display: none; }
.wg-clock { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.wg-time {
  font-size: 40px; font-weight: 600; letter-spacing: .04em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.wg-time .wg-colon { animation: fxBlink 1.2s steps(1) infinite; color: var(--accent, #0b8a8f); }
@keyframes fxBlink { 50% { opacity: .22; } }
.wg-date { margin-top: 10px; font-size: 12.5px; color: var(--ink-muted); font-weight: 500; }
.wg-cal { padding-top: 16px; padding-bottom: 14px; }
.wg-cal-head { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--ink-muted); margin-bottom: 6px; }
.wg-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font: 500 11px/19px var(--mono); color: var(--ink-secondary); }
.wg-cal-grid .wd { color: var(--ink-muted); font-weight: 700; }
.wg-cal-grid .today { color: #ffffff; border-radius: 6px; background: var(--accent, #0b8a8f); font-weight: 700; }
.wg-stats { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.wg-stat { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--hairline, #e6e9ed); padding-bottom: 7px; }
.wg-stat:last-child { border-bottom: 0; padding-bottom: 0; }
.wg-stat span { font-size: 12.5px; color: var(--ink-secondary); }
.wg-stat b { font: 600 20px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 8. AI 兵器库（Salis 白底细线横向慢速滚动徽章带） ---------- */
.arsenal { position: relative; margin: 72px 0 0; }
.arsenal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.arsenal-head h3 { margin: 6px 0 0; font: 500 clamp(24px, 3vw, 32px)/1.25 var(--serif); color: var(--ink); letter-spacing: -0.02em; }
.arsenal-head h3 em { font-style: normal; color: var(--accent, #0b8a8f); }
.arsenal-head p { margin: 0; color: var(--ink-secondary); font-size: 14px; max-width: 440px; text-align: right; }
.arsenal-stage {
  position: relative; padding: 22px 0; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--hairline, #e6e9ed); background: var(--surface, #f8f9fa);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.arsenal-tilt { position: relative; display: grid; gap: 12px; }
.arsenal-row { display: flex; gap: 12px; width: max-content; animation: fxMarquee var(--dur, 52s) linear infinite; }
.arsenal-row[data-dir="r"] { animation-direction: reverse; }
.arsenal-stage:hover .arsenal-row { animation-play-state: paused; }
@keyframes fxMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ars-tile {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 18px 0 12px; border-radius: 14px;
  color: var(--ink, #111315); background: var(--bg, #ffffff);
  border: 1px solid var(--hairline, #e6e9ed);
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.ars-tile:hover {
  transform: translateY(-3px);
  background: var(--ink, #111315);
  color: var(--bg, #ffffff);
  border-color: var(--ink, #111315);
}
.ars-ico {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  font: 700 15px/1 var(--mono);
  background: var(--surface-soft, #f3f5f6);
  color: var(--accent, #0b8a8f);
  border: 1px solid var(--hairline, #e6e9ed);
  transition: background-color .25s, color .25s, border-color .25s;
}
.ars-tile:hover .ars-ico {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, .2);
}
.ars-txt b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.ars-txt small { display: block; font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; transition: color .25s; }
.ars-tile:hover .ars-txt small { color: rgba(255, 255, 255, .72); }

/* ---------- 9. 相册筛选 ---------- */
.gal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 22px; }
.gal-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 15px;
  border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px;
  border: 1px solid var(--hairline, #e6e9ed); background: var(--bg, #ffffff);
  color: var(--ink-secondary); transition: .22s var(--ease);
}
.gal-chip i {
  font: 700 10.5px/1 var(--mono); font-style: normal;
  padding: 2px 6px; border-radius: 999px;
  background: var(--surface-soft, #f3f5f6); color: var(--ink-muted);
}
.gal-chip:hover { border-color: var(--ink); color: var(--ink); }
.gal-chip.is-active { background: var(--ink, #111315); color: var(--bg, #ffffff); border-color: var(--ink, #111315); }
.gal-chip.is-active i { background: rgba(255, 255, 255, .18); color: #ffffff; }
.gallery-tile.is-hidden { display: none; }
.gallery-tile.is-entering { animation: fxTileIn .45s var(--ease) both; animation-delay: calc(var(--k, 0) * 35ms); }
@keyframes fxTileIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* 灯箱：克制淡入 */
.lightbox:not([hidden]) > * { animation: fxLbIn .35s var(--ease) both; }
@keyframes fxLbIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }

/* ---------- 10. 看板娘 · 姜澜（浅底高对比气泡） ---------- */
.mascot {
  position: fixed; left: 6px; bottom: 0; z-index: 120;
  width: clamp(92px, calc((100vw - 1200px) / 2 - 6px), 168px);
  user-select: none; transition: transform .55s var(--ease);
}
.mascot.is-away { transform: translateY(78%); }
.mascot-stage { position: relative; width: 100%; aspect-ratio: 440 / 632; cursor: pointer; touch-action: manipulation; }
.mascot-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.mascot-still, .mascot-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.mascot-still { opacity: 1; transition: opacity .16s ease; z-index: 1; }
.mascot-still.is-hidden { opacity: 0; }
.mascot-canvas { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; display: block; pointer-events: none; opacity: 0; transition: opacity .16s ease; z-index: 2; }
.mascot-canvas.is-live { opacity: 1; }
.mascot-video { opacity: 0; z-index: 3; }
.mascot-video.is-live { opacity: 1; }
.mascot-bubble {
  position: absolute; left: 72%; bottom: 76%; z-index: 5;
  width: max-content; max-width: 224px; padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  font-size: 12.5px; font-weight: 600; line-height: 1.5;
  color: var(--ink, #111315); background: var(--bg, #ffffff);
  border: 1px solid var(--hairline, #e6e9ed);
  box-shadow: 0 12px 28px -12px rgba(17, 19, 21, .22);
  transform-origin: 0 100%; transform: scale(0); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .25s;
}
.mascot-bubble.is-on { transform: scale(1); opacity: 1; }
.mascot-close {
  position: absolute; right: 6px; top: 8%; z-index: 6;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--hairline, #e6e9ed); background: var(--bg, #ffffff);
  color: var(--ink-muted); font-size: 14px; line-height: 1; cursor: pointer;
  opacity: 0; transition: .25s;
}
.mascot:hover .mascot-close { opacity: 1; }
.mascot.is-away .mascot-close { opacity: 1; top: -4px; transform: rotate(180deg); }

/* ---------- 11. 数字滚动 ---------- */
.fx-count { font-variant-numeric: tabular-nums; }

/* ---------- 12. TD 光感花束互动展窗（深黑独立画框，零 backdrop-filter） ---------- */
.td-showcase {
  margin: 0 0 28px; border-radius: 20px; overflow: hidden;
  background: #090b10; border: 1px solid #1e222a;
  box-shadow: 0 20px 44px -26px rgba(9, 11, 16, .45);
}
.td-showcase-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px; padding: 20px 24px 16px;
  background: #0f1218; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.td-badge {
  display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: .12em; color: #7cd8dc;
  background: rgba(11, 138, 143, .18); border: 1px solid rgba(11, 138, 143, .42);
}
.td-showcase-head h3 { margin: 0 0 6px; font: 500 20px/1.3 var(--serif); color: #f8fafc; }
.td-showcase-head p { margin: 0; font-size: 13.5px; color: #9aa3b0; max-width: 560px; }
.td-showcase-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.td-theme-chip {
  appearance: none; cursor: pointer; height: 32px; padding: 0 13px; border-radius: 999px;
  font: 600 12px/1 var(--sans); color: #cbd5e1;
  background: #171b24; border: 1px solid rgba(255, 255, 255, .12);
  transition: background .2s, border-color .2s, color .2s;
}
.td-theme-chip:hover { border-color: rgba(255, 255, 255, .36); color: #fff; }
.td-theme-chip.is-active { background: #0b8a8f; border-color: #0b8a8f; color: #fff; }
.td-open-full {
  display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 999px;
  font: 600 12px/1 var(--sans); text-decoration: none; color: #e2e8f0;
  background: #1c222d; border: 1px solid rgba(255, 255, 255, .16);
}
.td-open-full:hover { background: #2a3242; color: #fff; }
.td-showcase-stage { position: relative; width: 100%; height: clamp(320px, 44vw, 480px); background: #05060a; }
.td-showcase-stage iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- 响应式 & 省电 ---------- */
@media (max-width: 1000px) {
  .widgets { grid-template-columns: 1fr 1fr; }
  .arsenal-head { flex-direction: column; align-items: flex-start; }
  .arsenal-head p { text-align: left; }
}
@media (max-width: 640px) {
  .widgets { grid-template-columns: 1fr; }
  .wg-cal { display: none; }
  .arsenal-stage { padding: 16px 0; }
  .ars-tile { height: 56px; padding: 0 14px 0 10px; }
  .ars-ico { width: 34px; height: 34px; font-size: 13px; }
  .td-showcase-head { padding: 16px; }
  .td-showcase-head h3 { font-size: 17px; }
  .td-showcase-stage { height: 280px; }
  .mascot { width: 76px; left: 2px; }
  .mascot-close { display: none; }
  .mascot-bubble { max-width: 168px; font-size: 12px; }
  .hero-credit { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-stagger > *, .gallery.fx-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .fx-split .fx-ch { opacity: 1; transform: none; transition: none; }
  .arsenal-row { animation: none; }
  .fx-progress { display: none; }
}
