/* 全面性的 CSS 重置 結合 Josh Comeau 的自訂 CSS 重置 */
/* https://www.joshwcomeau.com/css/custom-css-reset/ */

/* 盒模型規則與重置邊距 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 設定核心 body 預設值 */
body {
  min-height: 100vh;
  scroll-behavior: smooth;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 移除清單樣式 */
ul,
ol {
  list-style: none;
}

/* 讓圖片更容易操作 */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 輸入框和按鈕繼承字型 */
input,
button,
textarea,
select {
  font: inherit;
}

/* 避免文字溢出 */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 建立根層疊上下文 */
#root,
#__next {
  isolation: isolate;
}

/* 移除連結預設樣式 */
a {
  text-decoration: none;
  color: inherit;
}

/* 表格重置 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 表單元素重置 */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
}

/* 排版重置 */
pre,
code,
kbd,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

/* 其他元素重置 */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub.sub {
  bottom: -0.25em;
}

sup.sup {
  top: -0.5em;
}

/* 移除所有動畫和轉場，為不想看到動畫的用戶準備 */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 其他有用的預設值 */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
    'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}