/* 틴커랩 움직임 — 모든 화면이 함께 쓴다.
   - 문서 이동과 첫 화면은 지연 없이 표시한다.
   - 탭 · 창 · 단추 · 카드는 누르고 바뀔 때 반응이 보인다(알림은 원래 스스로 움직여서 건드리지 않는다).
   움직임 줄이기 설정이면 모두 끈다. 기존 화면의 규칙을 이기지 않도록 :where() 로 우선순위를 0 으로 둔다. */

/* 문서 이동은 바로 표시한다. 이전 문서의 스냅샷과 비동기로 열리는
   입장 문/편집기 화면을 겹치면 다른 페이지가 잠깐 보이고 입력도 늦어진다. */
@view-transition { navigation: none; }

/* 본문·탭 내용은 page-transition.js의 명시적 reveal로 표시한다.
   자동 저장·입력·실시간 갱신으로 DOM이 바뀌어도 입장 효과를 반복하지 않는다. */
:where(.tabs, .green-tabs) :where(.tab) { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease; }

/* 창(모달) */
:where(.modal-backdrop) { animation: tl-fade .2s ease-out backwards; }
:where(.modal-panel) { animation: tl-pop .26s cubic-bezier(.2, .8, .2, 1) backwards; }
:where(dialog[open]) { animation: tl-pop .24s cubic-bezier(.2, .7, .2, 1); }
:where(dialog[open])::backdrop { animation: tl-fade .2s ease-out; }

/* 누르는 것들: 올리면 살짝 뜨고, 누르면 살짝 눌린다 */
:where(.btn, .pick, .key, .tl-links a, .tl-textbook, .studio-nav a, .studio-btn, .studio-tool, .studio-card, .studio-filter, .catalog-grade, .home-teacher-action, .catalog-teacher-action, a.card, button.card, .lesson, .nb-card, .work-card.uploaded) {
  transition: transform .16s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
:where(.btn, .pick, .tl-textbook, a.card, button.card, .nb-card, .work-card.uploaded):where(:hover:not(:disabled)) { transform: translateY(-1px); }
:where(.btn, .pick, .key, .tab, .tl-textbook, a.card, button.card, .nb-card):where(:active:not(:disabled)) { transform: scale(.97); transition-duration: .06s; }

@keyframes tl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tl-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  :where(.green-top, .eco-top, .explore-top, .unit-hero, .studio-hero, .gb-toolbar, main, [role="tabpanel"], .modal-backdrop, .modal-panel, dialog[open]) { animation: none !important; }
  dialog::backdrop { animation: none !important; }
  :where(.btn, .pick, .key, .tab, .tl-links a, .studio-nav a, .tl-textbook, .studio-btn, .studio-tool, .studio-card, .studio-filter, .catalog-grade, .home-teacher-action, .catalog-teacher-action, a.card, button.card, .nb-card, .work-card.uploaded, .lesson) { transition: none !important; transform: none !important; }
}
@media print { :where(main, .green-top) { animation: none !important; } }
