/* n148 사이트 공통 움직임: 누를 때 살짝 눌림, 창·메뉴는 부드럽게 열고 닫기. transform 대신 scale/translate 속성을 써서 기존 배치(transform)를 건드리지 않는다. */
@media (prefers-reduced-motion: no-preference) {
  button, summary, [role="button"], .db-btn, .nh-card, .ab-tool, .ns-locale, .gh-dband a, .ft-cp, .ft-rc, .ft-lvopt, .cx-opt-row {
    transition: scale .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, opacity .15s ease;
  }
  button:active:not(:disabled), summary:active, [role="button"]:active, .db-btn:active, .nh-card:active, .ab-tool:active, .gh-dband a:active, .ft-cp:active, .ft-rc:active, .ft-lvopt:active, .cx-opt-row:active { scale: .97; }
  dialog[open] { animation: gm-pop .2s cubic-bezier(.2, .9, .3, 1.15) both; }
  dialog[open]::backdrop { animation: gm-fade .2s ease both; }
  dialog.gm-closing { animation: gm-out .14s ease both; }
  dialog.gm-closing::backdrop { animation: gm-fade-out .14s ease both; }
  details[open] > .ns-navigation-panel { animation: gm-drop .18s ease both; }
  #grayLangMenu, .cx-pop, .fw-fpop, .n46-pop, .gt-dx-editor:not([hidden]), .ns-install-slot:not(:empty) { animation: gm-drop .16s ease both; }
  .na-toast, #accountStatus:not([hidden]) { animation: gm-up .22s ease both; }
  .gm-out { animation: gm-out .14s ease both !important; }
}
@keyframes gm-pop { from { opacity: 0; scale: .96; translate: 0 8px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes gm-out { from { opacity: 1; scale: 1; } to { opacity: 0; scale: .97; } }
@keyframes gm-drop { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
@keyframes gm-up { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes gm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gm-fade-out { from { opacity: 1; } to { opacity: 0; } }
/* n149 카드·버튼 움직임이 기존 스타일에 덮이지 않게 + 카드 등장 + 페이지 넘김 */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: gm-fade-out .16s ease both; }
  ::view-transition-new(root) { animation: gm-fade .24s ease both; }
  .nh-card, .ab-tool, .db-feat, .ft-cp, .ft-lvopt, .cx-opt-row, .rf-bait-card, .rf-rod-card, .rf-friend-card, .dx-card, .rcs-toolnav a, .ns-tool-strip a {
    transition: scale .14s cubic-bezier(.2, .9, .3, 1.2), transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
  }
  .nh-card:active, .ab-tool:active, .ft-cp:active, .ft-lvopt:active, .cx-opt-row:active, .rf-bait-card:active, .rf-rod-card:active, .rf-friend-card:active, .dx-card:active, .rcs-toolnav a:active, .ns-tool-strip a:active { scale: .95 !important; }
  .nh-grid > .nh-card { animation: gm-up .38s cubic-bezier(.2, .8, .3, 1) both; }
  .nh-grid > .nh-card:nth-child(2) { animation-delay: .03s; } .nh-grid > .nh-card:nth-child(3) { animation-delay: .06s; }
  .nh-grid > .nh-card:nth-child(4) { animation-delay: .09s; } .nh-grid > .nh-card:nth-child(5) { animation-delay: .12s; }
  .nh-grid > .nh-card:nth-child(6) { animation-delay: .15s; }
  .rcs-shell > .split > .card, .ft-card, .db-hero, .ab-meta > .ab-box { animation: gm-up .32s cubic-bezier(.2, .8, .3, 1) both; }
}
/* n154 빠져 있던 곳: 언어·계정 메뉴, 팁 말풍선, 선택 목록, 탭 내용 */
@media (prefers-reduced-motion: no-preference) {
  .ns-locale-menu:not([hidden]), .na-account-menu:not([hidden]), .nt-tip-pop:not([hidden]), .nc-select-panel:not([hidden]),
  .custom-select.open .select-options, .td-dock:not([hidden]) { animation: gm-drop .16s ease both; transform-origin: top right; }
  .ft:not([hidden]), .rcs-shell > .split:not([hidden]), [role="tabpanel"]:not([hidden]), .np-section, #accountView > * { animation: gm-up .24s cubic-bezier(.2, .8, .3, 1) both; }
  .ns-theme, .ns-navigation > summary, .ns-locale-trigger, .ns-account { transition: scale .12s ease, background-color .15s ease, border-color .15s ease !important; }
  .ns-theme:active, .ns-navigation > summary:active, .ns-locale-trigger:active, .ns-account:active { scale: .92 !important; }
  .na-menu-item, .ns-locale-menu a, .ns-locale-menu button, .ns-navigation-panel a, .select-options > *, .nc-select-panel > * { transition: background-color .12s ease, color .12s ease, scale .12s ease; }
  .na-menu-item:active, .ns-locale-menu a:active, .ns-locale-menu button:active, .ns-navigation-panel a:active, .select-options > *:active { scale: .98; }
}
/* n159 사이트 전체: 페이지 본문 등장, 입력칸·선택칸, 접기 칸, 링크·그림 */
@media (prefers-reduced-motion: no-preference) {
  .rcs-shell > :not(script):not(style), .n52-wrap > *, .nh-main > section, .db-main > section, .np-layout > aside, .np-page-heading, .gh-dband, .ns-footer-layout > * { animation: gm-up .34s cubic-bezier(.2, .8, .3, 1) both; }
  .rcs-shell > :nth-child(2), .nh-main > section:nth-child(2), .db-main > section:nth-child(2), .ns-footer-layout > :nth-child(2) { animation-delay: .04s; }
  .rcs-shell > :nth-child(3), .nh-main > section:nth-child(3), .db-main > section:nth-child(3), .ns-footer-layout > :nth-child(3) { animation-delay: .08s; }
  .rcs-shell > :nth-child(n+4), .nh-main > section:nth-child(n+4), .db-main > section:nth-child(n+4), .ns-footer-layout > :nth-child(n+4) { animation-delay: .12s; }
  input, select, textarea { transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
  details[open] > :not(summary) { animation: gm-drop .2s ease both; }
  details > summary { transition: color .15s ease; }
  a { transition: color .15s ease, opacity .15s ease, background-color .15s ease; }
  .ns-footer a:hover, .ns-navigation-panel a:hover { translate: 2px 0; }
  .ns-footer a, .ns-navigation-panel a { transition: translate .15s ease, color .15s ease, background-color .15s ease; }
  img { transition: opacity .2s ease; }
  .rcs-mobile-dock { animation: gm-up .3s ease both; }
}
