@import url("https://fonts.googleapis.com/css2?family=Futura:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@400;700&display=swap");

/* ===============================
   初期化・ベースリセット
   =============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===============================
   リンクスタイル（全体統一）
   =============================== */
a {
  color: #002f6c;
  text-decoration: underline;
}
a:hover {
  color: #001a40;
  text-decoration: none;
}

/* ===============================
   画像の初期スタイル
   =============================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===============================
   フォーム要素の初期スタイル
   =============================== */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 4px;
}

/* ===============================
   ベーススタイル・初期化設定
   =============================== */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Futura", "Kanit", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* ===============================
   フォントサイズの統一定義
   =============================== */
:root {
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.25rem;
  --font-xl: 1.5rem;
  --font-xxl: 2rem;

  /* テーマカラー変数 */
  --color-primary: #002f6c;
  --color-primary-dark: #001a40;
  --color-accent: red;
  --color-background: #fff;
  --color-text: #333;
}

/* ===============================
   構造レイアウト
   =============================== */
.wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-top: 60px;
  width: 100%;
}

/* ===============================
   テキスト要素
   =============================== */
p {
  color: var(--color-text);
  font-size: var(--font-md);
}

h1 {
  font-size: var(--font-xxl);
  margin-bottom: 15px;
  color: var(--color-text);
}

h2 {
  font-size: var(--font-xl);
  margin-bottom: 15px;
  color: var(--color-text);
}

h3 {
  font-size: var(--font-lg);
  margin-bottom: 12px;
  color: var(--color-text);
}

ul,
ol {
  padding-left: 20px;
  font-size: var(--font-md);
}

table {
  font-size: var(--font-sm);
}

button,
.common-button {
  font-size: var(--font-md);
  transition: background-color 0.3s ease, transform 0.2s ease;
}
button:hover,
.common-button:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ===============================
   アニメーション
   =============================== */
.fade-in {
  opacity: 0;
  transition: opacity 0.5s ease-in;
}
.fade-in.show {
  opacity: 1;
}

/* ===============================
   スクロールトップボタン
   =============================== */
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background-color: var(--color-primary);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5em;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===============================
   共通ページヘッダー
   =============================== */
.page-header {
  text-align: left;
  margin: 5px auto;
  padding: 5px 20px;
}
.page-header h1 {
  margin: 0;
}
.page-header .season-label {
  display: inline-block;
  margin-top: 5px;
  font-weight: bold;
}
.page-header .rank {
  display: inline-block;
  margin-left: 8px;
  font-weight: bold;
  color: #888;
}

/* ===============================
   フォントサイズ：レスポンシブ対応
   =============================== */
@media (max-width: 600px) {
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  h3 {
    font-size: 1.125rem;
  }
  p,
  ul,
  ol,
  button,
  .common-button {
    font-size: 0.9375rem;
  }
  table {
    font-size: 0.8125rem;
  }
}

/* ===============================
   モダンアクセシビリティ配慮
   =============================== */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===============================
   スクロールスナップ
   =============================== */
.snap-container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
}
.snap-section {
  scroll-snap-align: start;
  height: 100vh;
}
