/* ============================================================
   /assets/ios-polish.css  v1 (1차) — 스타일만, 로직 무변경
   버튼 마감(둥글기·최소높이·누름·포커스)만 통일. 색·패딩·글자·배치 무변경.
   삽입: 각 화면 </head> 직전(mr-tokens 뒤).
   무게: 전부 클래스 1개(0,1,0). :where()=무게 0. 강제 우선순위 선언 없음.
   끄기: 파일 비우기(전체) / 링크 줄 삭제(화면 하나) / data-keep="pill|height|press"(규칙 하나)
   등급: 주요=.btn-primary .btn.primary .btn-cta .btn-mini-primary
         보통=.btn .btn-secondary .btn.outline / 약함=.btn-ghost / 위험=.btn-danger .btn.danger
   ============================================================ */
@media screen {

/* 0. 공통 바탕 + PC 기본 높이 */
.btn:where(:not(.btn-icon, .btn-pill)),
:is(.btn-primary, .btn-secondary, .btn-ghost, .btn-danger, .btn-action,
    .btn-cta, .btn-soft, .btn-mini, .btn-mini-primary) {
  box-sizing: border-box;
  min-height: 36px;
  align-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
:is(.btn-sm, .btn-small, .btn-mini, .btn-mini-primary, .btn:where(.sm)) { min-height: 32px; }

/* 1. 둥글기 — 기본 10 / 작은 8 */
:where(html:not(:has(#ios-polish[data-keep~="pill"]))) .btn:where(:not(.btn-icon, .btn-pill)),
:where(html:not(:has(#ios-polish[data-keep~="pill"]))) :is(.btn-primary, .btn-secondary,
    .btn-ghost, .btn-danger, .btn-action, .btn-cta, .btn-soft) { border-radius: 10px; }
:where(html:not(:has(#ios-polish[data-keep~="pill"]))) :is(.btn-sm, .btn-small,
    .btn-mini, .btn-mini-primary, .btn:where(.sm)) { border-radius: 8px; }

/* 2. 터치(≤1000px) — 기본 44 / 작은·표 안 36 */
@media (max-width: 1000px) {
  :where(html:not(:has(#ios-polish[data-keep~="height"]))) .btn:where(:not(.btn-icon, .btn-pill)),
  :where(html:not(:has(#ios-polish[data-keep~="height"]))) :is(.btn-primary, .btn-secondary,
      .btn-ghost, .btn-danger, .btn-action, .btn-cta, .btn-soft) { min-height: 44px; }
  :where(html:not(:has(#ios-polish[data-keep~="height"]))) :is(.btn-sm, .btn-small,
      .btn-mini, .btn-mini-primary, .btn:where(.sm)),
  :where(html:not(:has(#ios-polish[data-keep~="height"]))) :where(td, th)
      :is(.btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger) { min-height: 36px; }
}

/* 3. PC앱 작은 창 */
:where(html[data-mw-compact="1"], body.mw-compact) .btn:where(:not(.btn-icon, .btn-pill)),
:where(html[data-mw-compact="1"], body.mw-compact) :is(.btn-primary, .btn-secondary,
    .btn-ghost, .btn-danger, .btn-action, .btn-cta, .btn-soft) { min-height: 32px; }
:where(html[data-mw-compact="1"], body.mw-compact) :is(.btn-sm, .btn-small,
    .btn-mini, .btn-mini-primary) { min-height: 28px; }

/* 4. 누름 반응 — transform 아닌 scale 속성(화면의 translate 와 안 싸움) */
:where(html:not(:has(#ios-polish[data-keep~="press"])))
  :is(.btn:where(:not(.btn-icon, .btn-pill)), .btn-primary, .btn-secondary, .btn-ghost,
      .btn-danger, .btn-action, .btn-cta, .btn-soft, .btn-mini, .btn-mini-primary):where(:active):where(:not(:disabled, [disabled], [aria-disabled="true"])) {
  scale: .97; opacity: .92;
  transition: scale .08s ease-out, opacity .08s ease-out;
}

/* 5. 키보드 포커스 링 */
:is(.btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger, .btn-action,
    .btn-cta, .btn-soft, .btn-mini, .btn-mini-primary):where(:focus-visible) {
  outline: 2px solid #A88857; outline-offset: 2px;
}

/* 6. 움직임 줄이기 — 우리 것만 끈다 */
@media (prefers-reduced-motion: reduce) {
  :is(.btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger, .btn-action,
      .btn-cta, .btn-soft, .btn-mini, .btn-mini-primary):where(:active) { scale: none; transition: none; }
}

} /* @media screen */
