/* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* 設定 html 頁面基礎排版與字體縮放 */
html {
    line-height: 1.15;           /* 使行高更容易閱讀 */
    -webkit-text-size-adjust: 100%; /* 防止 iOS 自動放大字體 */
}

/* 移除 body 的預設外距 */
body { margin: 0; }

/* 讓 main 標籤在舊版瀏覽器也當成區塊元素顯示 */
main { display: block; }

/* h1 標題大小與間距 */
h1 {
    font-size: 2em;
    margin: .67em 0;
}

/* 水平線樣式調整 */
hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}

/* 預設程式碼區塊字型 */
pre {
    font-family: monospace, monospace;
    font-size: 1em;
}

/* 超連結背景透明 */
a { background-color: transparent; }

/* 當有 title 屬性的縮寫，加底線 */
abbr[title] {
    border-bottom: none;
    text-decoration: underline dotted;
}

/* 讓粗體更明顯 */
b, strong { font-weight: bolder; }

/* code、kbd、samp 保持等寬字型 */
code, kbd, samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

/* 小字體設定 */
small { font-size: 80%; }

/* 上標、下標調整位置與大小 */
sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}
sub { bottom: -.25em; }
sup { top: -.5em; }

/* 移除圖片邊框 */
img { border-style: none; }

/* 按鈕與表單元素字體一致 */
button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

/* 按鈕和輸入框溢出處理 */
button, input { overflow: visible; }

/* 下拉選單與按鈕不轉大寫 */
button, select { text-transform: none; }

/* 統一按鈕外觀（各瀏覽器） */
[type=button], [type=reset], [type=submit], button {
    -webkit-appearance: button;
}

/* 移除 Firefox 裡按鈕的內邊框 */
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner,
button::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

/* 統一 Firefox 下按鈕的焦點外框 */
[type=button]:-moz-focusring,
[type=reset]:-moz-focusring,
[type=submit]:-moz-focusring,
button:-moz-focusring {
    outline: 1px dotted ButtonText;
}

/* 分組表單外距設定 */
fieldset { padding: .35em .75em .625em; }

/* 表單標題調整 */
legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

/* 進度條垂直對齊 */
progress { vertical-align: baseline; }

/* 文字區塊自動捲動 */
textarea { overflow: auto; }

/* 勾選框和單選框調整盒模型與內距 */
[type=checkbox], [type=radio] {
    box-sizing: border-box;
    padding: 0;
}

/* 移除數字輸入框的上下箭頭（Chrome） */
[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
    height: auto;
}

/* 搜尋欄位外觀調整（iOS/Safari） */
[type=search] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}
[type=search]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/* 檔案上傳按鈕樣式 */
::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

/* 詳細資訊區塊 */
details { display: block; }

/* 摘要區塊顯示列表樣式 */
summary { display: list-item; }

/* 樣板區塊預設不顯示 */
template { display: none; }

/* 隱藏指定元素 */
[hidden] { display: none; }
