/* Safari select 요소 스타일 수정 */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px !important;
  min-height: 42px;
}

select:focus {
  outline: none;
}

/* Dark mode 대응 */
@media (prefers-color-scheme: dark) {
  select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23ccc' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
  }
}

/* Safari SVG 렌더링 개선 */
@supports (-webkit-touch-callout: none) {
  /* SVG 로고 텍스트 렌더링 강제 개선 */
  header img[src*="title.svg"] {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  /* Safari에서 SVG fill/stroke 강제 적용 */
  header img[src*="title.svg"] {
    filter: brightness(1) contrast(1);
  }
  
  /* 다크모드에서 SVG 색상 강제 적용 */
  .dark header img[src*="title.svg"] {
    filter: brightness(0) invert(1);
  }
  
  /* 라이트모드에서 SVG 색상 강제 적용 */
  :not(.dark) header img[src*="title.svg"] {
    filter: brightness(1) contrast(1);
  }
}