/* 共通のリセット設定をまとめたブロック */
* {
  box-sizing: border-box;
}

/* ページ全体の色と文字の基本設定を行うブロック */
body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fff7c2 0%, #f3f7ff 40%, #ffffff 100%);
  color: #0f1e46;
}

/* アプリ全体のレイアウトを制御するブロック */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヘッダーの背景や配置を整えるブロック */
.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #1c3f91, #1f6eda);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* タイトルと説明文をまとめた部分のスタイルブロック */
.title-group h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.title-group p {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.92;
}

/* ハンバーガーボタンの装飾を行うブロック */
.menu-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid #ffe37a;
  background: #14316e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.menu-button:hover {
  box-shadow: 0 0 0 3px rgba(255, 227, 122, 0.25);
}

.menu-button:active {
  transform: translateY(1px);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: #ffe37a;
  content: "";
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.menu-icon::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.menu-icon::after {
  position: absolute;
  bottom: -6px;
  left: 0;
}

/* サイドメニューの全体レイアウトを定義するブロック */
.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100vh;
  background: #102751;
  color: #ffffff;
  box-shadow: 8px 0 20px rgba(0, 0, 0, 0.25);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: left 0.25s ease;
  z-index: 20;
}

.side-menu.open {
  left: 0;
}

.side-menu__header {
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 1rem;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.side-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* タブボタンの共通デザインを定義するブロック */
.tab-button {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 227, 122, 0.6);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.tab-button:hover {
  background: rgba(255, 227, 122, 0.12);
}

.tab-button.active {
  background: linear-gradient(90deg, #ffe37a, #ffd400);
  color: #0f1e46;
  transform: translateX(3px);
}

/* オーバーレイを表示するブロック */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 70, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 15;
}

.overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* メインコンテンツエリアの余白や横幅を定義するブロック */
.app-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 24px 18px 40px;
}

/* 内容全体の最大幅を決めるブロック */
.content {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 各タブの見出しと説明を整えるブロック */
.panel-title {
  margin: 0 0 4px 0;
  color: #0f1e46;
  font-size: 1.25rem;
}

.panel-description {
  margin: 0 0 14px 0;
  color: #193b7d;
  font-size: 0.95rem;
}

/* タブパネルの表示切替を制御するブロック */
.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 入力用グリッドを整えるブロック */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

/* カード風の囲みを定義するブロック */
.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(25, 59, 125, 0.08);
}

.card-title {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  color: #14316e;
}

/* フォーム行の配置を整えるブロック */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-row label {
  font-weight: 700;
  color: #0f1e46;
}

/* テキスト入力やセレクトを統一するブロック */
.text-input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(31, 78, 165, 0.3);
  background: rgba(255, 255, 255, 0.92);
  color: #0f1e46;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus {
  outline: none;
  border-color: #1f6eda;
  box-shadow: 0 0 0 4px rgba(31, 110, 218, 0.15);
}

/* ボタンのスタイルをまとめるブロック */
.primary-button {
  padding: 12px 14px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(90deg, #ffd400, #ffea70);
  color: #0f1e46;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 212, 0, 0.24);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.primary-button:hover {
  box-shadow: 0 10px 28px rgba(255, 212, 0, 0.35);
}

.primary-button:active {
  transform: translateY(1px);
}

/* 結果表示の枠を強調するブロック */
.result-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-top: 10px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(31, 110, 218, 0.08), rgba(255, 212, 0, 0.18));
  border: 1px solid rgba(15, 30, 70, 0.08);
}

.result-label {
  color: #14316e;
  font-weight: 700;
}

.result-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: #1c3f91;
}

/* チームリストの表示を整えるブロック */
.team-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-list li {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(31, 110, 218, 0.08);
  border: 1px solid rgba(31, 110, 218, 0.2);
  color: #0f1e46;
  font-weight: 700;
}

/* フッターの配置を整えるブロック */
.app-footer {
  padding: 10px 16px 14px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #0f1e46;
  background: #fff7c2;
  border-top: 1px solid rgba(25, 59, 125, 0.08);
}

/* スマホ向けの調整を行うブロック */
@media (max-width: 720px) {
  .app-main {
    padding: 16px 12px 30px;
  }

  .panel-description {
    margin-bottom: 8px;
  }

  .title-group h1 {
    font-size: 1.2rem;
  }

  .menu-button {
    width: 38px;
    height: 38px;
  }
}
