
/* ボックスモデルとボーダーのリセット */
/* ============================================ */

*,
::before,
::after {
  box-sizing: border-box;
  border-style: solid;
  border-width: 0;
  min-width: 0;
}

/* ドキュメント関連の初期化 */
/* ============================================ */

/**
 * 1. すべてのブラウザで行の高さを修正
 * 2. iOSで画面回転後にフォントサイズが変わるのを防ぐ
 * 3. iOSでリンクをタップしたときのグレーオーバーレイを削除
 */

html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -webkit-tap-highlight-color: transparent; /* 3 */
  scroll-behavior: smooth;
}

/* セクション要素の初期化 */
/* ============================================ */

/**
 * すべてのブラウザで余白を削除
 */

body {
  margin: 0;
}

/**
 * IEで`main`要素を正しく表示
 */

main {
  display: block;
}

/* 垂直リズムの調整 */
/* ============================================ */

p,
table,
blockquote,
address,
pre,
iframe,
form,
figure,
dl {
  margin: 0;
}

/* 見出しのスタイルリセット */
/* ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

/* 番号付き/無しリストのリセット */
/* ============================================ */

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

/* 定義リストの整備 */
/* ============================================ */

dt {
  font-weight: bold;
}

dd {
  margin-left: 0;
}

/* グループ化コンテンツの整備 */
/* ============================================ */

/**
 * 1. Firefoxでのbox-sizing調整
 * 2. EdgeとIEでoverflowを表示する
 */

hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
  border-top-width: 1px;
  margin: 0;
  clear: both;
  color: inherit;
}

/**
 * 1. フォントサイズの継承と拡大の問題を修正
 * 2. `em`単位のフォントサイズの不具合を修正
 */

pre {
  font-family: monospace, monospace; /* 1 */
  font-size: inherit; /* 2 */
}

address {
  font-style: inherit;
}

/* インラインテキスト要素の整備 */
/* ============================================ */

/**
 * IE10でアクティブリンクの背景色を削除
 */

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

/**
 * 1. Chrome 57以前で下線を削除
 * 2. 各ブラウザで下線のスタイルを統一
 */

abbr[title] {
  text-decoration: underline dotted; /* 2 */
}

/**
 * Chrome, Edge, Safariでフォントの太さを調整
 */

b,
strong {
  font-weight: bolder;
}

/**
 * フォントサイズ継承とemサイズの不具合修正
 */

code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: inherit; /* 2 */
}

/**
 * すべてのブラウザでフォントサイズを調整
 */

small {
  font-size: 80%;
}

/**
 * subとsupのベースラインを調整
 */

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* 置換コンテンツの整備 */
/* ============================================ */

/**
 * 垂直方向のズレを防ぐ
 */

svg,
img,
embed,
object,
iframe {
  vertical-align: bottom;
}

/* フォーム要素の初期化 */
/* ============================================ */

/**
 * 1. iOSでフォーム要素をスタイル可能にする
 * 2. 親からのtext-transformを継承
 */

button,
input,
optgroup,
select,
textarea {
  -webkit-appearance: none; /* 1 */
  appearance: none;
  vertical-align: middle;
  color: inherit;
  font: inherit;
  background: transparent;
  padding: 0;
  margin: 0;
  border-radius: 0;
  text-align: inherit;
  text-transform: inherit; /* 2 */
}

/**
 * クリック可能な要素のカーソルを修正
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  cursor: pointer;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
  cursor: default;
}

/**
 * Firefox用outline調整
 */

:-moz-focusring {
  outline: auto;
}

/**
 * フォーカススタイルの初期化と調整
 */

:focus {
  outline: none;
}
:focus-visible {
  outline: 2px dashed #0ff;
  outline-offset: 3px;
  border-radius: 4px;
}

select:disabled {
  opacity: inherit;
}

/**
 * パディングをリセット
 */

option {
  padding: 0;
}

/**
 * 初期化
 */

fieldset {
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

/**
 * progress要素の垂直位置を調整
 */

progress {
  vertical-align: baseline;
}

/**
 * IE10+でデフォルトの縦スクロールを削除
 */

textarea {
  overflow: auto;
}

/**
 * Chromeでの増減ボタンのカーソルを修正
 */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
 * Safariでのoutlineスタイルを修正
 */

[type="search"] {
  outline-offset: -2px;
}

/**
 * macOSのChrome/Safariでの余白を削除
 */

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * iOSやSafariでのボタンスタイル修正
 * フォント継承の修正
 */

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

/**
 * Firefox用外観修正
 */
[type="number"] {
  -moz-appearance: textfield;
}

/**
 * ラベルクリックで対応する入力にフォーカスできるように
 */

label[for] {
  cursor: pointer;
}

/* インタラクティブ要素の整備 */
/* ============================================ */

/**
 * Edge, IE10+, Firefoxでの表示修正
 */

details {
  display: block;
}

/**
 * すべてのブラウザでsummary要素をリスト表示に
 */

summary {
  display: list-item;
}

/**
 * 編集可能領域のフォーカス時アウトライン調整
 */

[contenteditable]:focus {
  outline: auto;
}

/* テーブルの整備 */
/* ============================================ */

/**
 * ChromeとSafariでテーブルボーダーの継承を修正
 */

table {
  border-color: inherit;
  border-collapse: collapse;
}

caption {
  text-align: left;
}

td,
th {
  vertical-align: top;
  padding: 0;
}

th {
  text-align: left;
  font-weight: bold;
}
