/* jbs reset。jbs 不用 @layer:各檔依 _jbs_assets.html 的順序 link,後面的覆蓋前面的。 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
dl, dd, ol, ul, figure, fieldset, legend { margin: 0; }

ol, ul { padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
h1, h2, h3, h4, h5, h6, p { overflow-wrap: break-word; }

a { color: inherit; text-decoration: none; }

img, svg, video { display: block; max-width: 100%; }
img { border: 0; }

input, button, textarea, select { font: inherit; color: inherit; }
button { padding: 0; background: transparent; border: 0; cursor: pointer; }
textarea { resize: vertical; }

table { border-collapse: collapse; border-spacing: 0; }

/* 元件常設 display:flex,沒有 !important 的話 hidden 屬性會被元件的 display 蓋掉 */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }

  /* 等待中的圈圈(components.css 的 .jbs-toast--busy)停住就看不出在等:改成慢慢明暗、不轉 */
  .jbs-toast__spinner { animation: jbs-pulse 1.6s ease-in-out infinite !important; }
}

/* 第二條在不認得 :focus-visible 的瀏覽器整條失效,第一條的焦點環因此保留 */
:focus { outline: 2px solid var(--jb-color-focus-ring); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
