/* =============================================================
   fukumachi-basic / reset.css
   ============================================================= */

/* -------------------------------------------------------------
   1. Box sizing
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* -------------------------------------------------------------
   2. リセット基本
   ------------------------------------------------------------- */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img,
ins, kbd, q, samp, small, strong, sub, sup, var,
b, i, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 ブロック要素を block に */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
  display: block;
}

/* -------------------------------------------------------------
   3. ベーススタイル
   ------------------------------------------------------------- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%; /* iOS 横向き時の文字サイズ自動拡大を防ぐ */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------
   4. リスト
   ------------------------------------------------------------- */
ol, ul {
  list-style: none;
}

/* -------------------------------------------------------------
   5. 引用・略語
   ------------------------------------------------------------- */
blockquote, q {
  quotes: none;
}
blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
}
abbr[title] {
  border-bottom: none;
  text-decoration: underline dotted;
}

/* -------------------------------------------------------------
   6. テーブル
   ------------------------------------------------------------- */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* -------------------------------------------------------------
   7. メディア
   ------------------------------------------------------------- */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* -------------------------------------------------------------
   8. フォーム全般 — iOS / iPhone 対応
   ------------------------------------------------------------- */

/* Safari/iOS がデフォルトで付けるネイティブ外観を除去 */
input,
textarea,
select,
button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 0; /* iOS が勝手に角丸にするのを防ぐ */
  font: inherit;
  font-size: 1rem;  /* iOS が 16px 未満だとズームするため */
  color: inherit;
  outline: none;
  margin: 0;
  padding: 0;
}

/* テキスト系インプット */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime-local"],
textarea {
  display: block;
  width: 100%;
  padding: 0.5em 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  line-height: 1.5;
  /* iOS でテキストが潰れないよう最小フォントサイズを確保 */
  font-size: max(1rem, 16px);
}

/* テキストエリア */
textarea {
  resize: vertical;
  min-height: 8em;
}

/* select */
select {
  display: block;
  width: 100%;
  padding: 0.5em 2em 0.5em 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E") no-repeat right 0.75em center;
  background-size: 10px 7px;
  cursor: pointer;
  font-size: max(1rem, 16px);
}

/* チェックボックス・ラジオは appearance を戻す */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
  width: auto;
  cursor: pointer;
}

/* ボタン */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-block;
  cursor: pointer;
  line-height: 1.5;
  /* タップターゲットを確保 */
  min-height: 44px;
  padding: 0.5em 1.25em;
}

/* フォーカス時のリング（アクセシビリティ確保） */
:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* disabled */
input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* iOS の input[type="search"] に付くクリアボタンを除去 */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

/* iOS の日付インプット内矢印を除去 */
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* placeholder の色統一 */
::placeholder {
  color: #aaa;
  opacity: 1;
}

/* -------------------------------------------------------------
   9. リンク
   ------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------
   10. レスポンシブ — ブレークポイント変数
       使い方: @media (max-width: 768px) { ... }
   ------------------------------------------------------------- */

/*
  想定ブレークポイント:
    スマホ    : ~  767px
    タブレット: 768px ~ 1023px
    PC        : 1024px ~
*/

/* タップ時のハイライト除去（iOS / Android） */
* {
  -webkit-tap-highlight-color: transparent;
}

/* スクロール慣性（iOS でネイティブスクロールを有効化） */
.scroll-inner {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

/* 画像のドラッグを無効化 */
img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* visually hidden（スクリーンリーダー向け） */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
