/* The decorative layer never receives input or changes the card's dimensions. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .site-header .top { position: relative; isolation: isolate; }
  :is(.auth-feature,.cms-list-row,.campaign)[data-pointer-glow] { position:relative; isolation:isolate; }
  :is(.cms-list-row,.campaign)[data-pointer-glow]::before { --pointer-light:rgb(78 142 108 / 12%); z-index:-1; }
  [data-pointer-glow]::before {
    --pointer-light: rgb(210 245 226 / 17%);
    content: '';
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(200px 145px at var(--pointer-x) var(--pointer-y), var(--pointer-light), transparent 95%);
  }
  .site-header .top[data-pointer-glow]::before {
    --pointer-light: light-dark(rgb(255 255 255 / 44%), rgb(170 198 223 / 13%));
    z-index: -1;
  }
  .bj-feature[data-pointer-glow]::before { --pointer-light: rgb(255 250 245 / 34%); }
  [data-pointer-glow="art"]::before {
    background:
      radial-gradient(circle at calc(var(--pointer-x) + 13px) calc(var(--pointer-y) - 14px), rgb(255 249 245 / 60%) 0 .8px, transparent 1.5px),
      radial-gradient(circle at calc(var(--pointer-x) + 25px) calc(var(--pointer-y) + 5px), rgb(254 241 255 / 42%) 0 .7px, transparent 1.4px),
      radial-gradient(circle at calc(var(--pointer-x) - 17px) calc(var(--pointer-y) + 11px), rgb(252 248 255 / 40%) 0 .6px, transparent 1.3px),
      radial-gradient(200px 145px at var(--pointer-x) var(--pointer-y), var(--pointer-light), transparent 95%);
  }
  .site-header nav a { transition: color .16s ease; }
  :is(.hf-controls, .th-slide-control) button, :is(.th-feature-link, .bj-more) {
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  }
  .th-feature-link:hover { background-color: rgb(24 91 65 / 5%); }
  .bj-more:hover { color: #32644e; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ptr-echo {
    --echo-edge: light-dark(#5f7897,#a7bddb);
    --echo-dot: linear-gradient(130deg, #91bdab, #a5bddf 52%, #b1a1d5);
    --echo-rim: light-dark(#ffffffde,#9bb8d66e);
    position:fixed; z-index:2147483000; width:0; height:0; pointer-events:none;
    contain:layout style; user-select:none;
  }
  .ptr-echo[data-tone="dark"] { --echo-edge:#c2d6ee; --echo-dot:linear-gradient(130deg,#b1dcc9,#bccff2,#cbbbe9); }
  .ptr-echo::before {
    content:''; position:absolute; width:66px; height:66px; left:-33px; top:-33px;
    box-sizing:border-box; border-radius:50%; border:2px solid var(--echo-edge);
    box-shadow:0 0 0 1px var(--echo-rim),0 0 12px #8e9bd16b; animation:ptr-echo-ring .5s cubic-bezier(.16,.63,.3,1) both;
  }
  .ptr-echo > i {
    position:absolute; width:6px; height:6px; left:-3px; top:-3px;
    border-radius:50%; background:var(--echo-dot); box-shadow:0 0 0 .7px var(--echo-rim);
    animation:ptr-echo-dot .46s cubic-bezier(.18,.67,.34,1) both;
  }
  .ptr-echo > i:nth-child(2n) {width:4px;height:4px;left:-2px;top:-2px}
  @keyframes ptr-echo-ring {
    0% {transform:scale(.13);opacity:.93}
    52% {opacity:.8}
    100% {transform:scale(1);opacity:0}
  }
  @keyframes ptr-echo-dot {
    0% {transform:translate3d(0,0,0) scale(.65);opacity:.78}
    45% {opacity:1}
    100% {transform:translate3d(var(--echo-dx),var(--echo-dy),0) scale(.72);opacity:0}
  }
  :is(.hf-photo,.bj-art img,.bj-thumb img,.rd-thumb img,.th-cover img,.pd-card-art img,.auth-page header a img,.cms-brand img,.site-footer .brand img) {
    transition:translate .28s cubic-bezier(.16,.8,.28,1.18), rotate .28s cubic-bezier(.16,.8,.28,1.18);
  }
  .hf-card:hover .hf-photo,.bj-art:hover img,.bj-row:hover .bj-thumb img,
  .rd-entry:hover .rd-thumb img,.th-project:hover .th-cover img,.pd-card:hover .pd-card-art img,
  .auth-page header a:hover img,.cms-brand:hover img,.site-footer .brand:is(:hover,:focus-visible) img {
    translate:1px -2px; rotate:-.45deg;
  }
}
@media (prefers-reduced-motion: reduce) { .ptr-echo {display:none} }

.article-photo-open { cursor: zoom-in; }
.article-photo-open:focus-visible { outline: 2px solid #397961; outline-offset: 4px; }
dialog.article-photo-dialog {
  box-sizing: border-box; width: fit-content; max-width: calc(100vw - 24px);
  height: auto; max-height: calc(100dvh - 24px); padding: 10px;
  border: 1px solid #cadbcf; border-radius: 16px; margin: auto;
  color: #293e33; background: #f8faf7; box-shadow: 0 14px 64px #14251e42;
}
.article-photo-dialog::backdrop { background: rgb(21 32 28 / 69%); }
.article-photo-dialog .article-photo-tools {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 7px;
}
.article-photo-dialog .article-photo-tools button {
  margin: 0; padding: 7px 14px; min-height: 44px; border-radius: 9px; border: 1px solid #bed2c3;
  background: #e7f1e9; color: #294d3b; font: 600 14px/1.4 -apple-system, "PingFang SC", sans-serif;
}
.article-photo-tools button:focus-visible { outline: 2px solid #367956; outline-offset: 1px; }
.article-photo-dialog .article-photo-stage { overflow: auto; max-height: calc(100dvh - 102px); }
.article-photo-dialog .article-photo-stage img {
  display: block; width: auto; height: auto; max-height: calc(100dvh - 104px);
  max-width: min(1300px, calc(100vw - 48px)); margin: auto;
}
.article-photo-dialog.article-photo-original .article-photo-stage img { max-height: none; max-width: none; }
html:has(.article-photo-dialog[open]) { overflow: hidden; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .article-photo-open { transition: scale .19s ease-out; }
  .article-photo-open:hover { scale: 1.012; }
}

@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
 .ptr-trail {
   position:fixed;pointer-events:none;z-index:20;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;
   background:linear-gradient(135deg,light-dark(#6fa58e,#a9cbb8),light-dark(#688cba,#a4bee5) 54%,light-dark(#8c79b6,#c0ade8));
   box-shadow:0 0 0 1px light-dark(#fff9,#a6bde644),0 0 8px light-dark(#829acb85,#9daef3a3);
   animation:ptr-drift .46s ease-out both;
 }
 @keyframes ptr-drift {from{opacity:.9;transform:scale(1)}to{opacity:0;transform:translate(var(--drift),10px) scale(.25)}}
}
