/* ========================================
   共通スタイル - 全ページで使用
======================================== */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  margin: 0;
  min-height: 100vh;
  background-color: #f6f7f8;
  color: #222;
  padding-bottom: 30px;
  }


/* --- コンテナ（統一） --- */
.container {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

@media (min-width: 681px) {
  .container {
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
  }
}

/* --- ヘッダー（統一） --- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e5e5;
}

header h1,
header h2 {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  flex: 1;
  margin: 0;
  color: #1a1a1a;
  line-height: 1.4;
}

header span.material-symbols-outlined,
header button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

header span.material-symbols-outlined:hover:not([style*="opacity:0"]),
header button:hover {
  color: #2255A4;
}

/* --- アイコン --- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;
}

/* --- ローディング・エラー --- */
.loading {
  text-align: center;
  padding: 40px;
  color: #888;
}

.error {
  text-align: center;
  padding: 40px;
  color: #e74c3c;
}


/* --- ユーザーメニュー（ドロップダウン） --- */
.user-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 20px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 12px;
  min-width: 200px;
  z-index: 200;
}

.user-menu .user-info {
  padding: 8px 0;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 8px;
}

.user-menu .user-info p {
  margin: 0;
  font-size: 13px;
  color: #666;
}

.user-menu .user-email {
  margin: 4px 0 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.user-menu .logout-btn {
  width: 100%;
  padding: 10px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

/* --- ローディングオーバーレイ --- */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.loading-overlay.show {
  display: flex;
}

.loading-spinner {
  background-color: #fff;
  padding: 24px 32px;
  border-radius: 12px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* アコーディオンUI */
        .accordion {
            max-width: 600px;
            margin: 20px auto;
            padding: 0 15px;
        }

        .accordion-item {
            border: 1px solid #ddd;
            margin-bottom: 5px;
            border-radius: 4px;
        }

        .accordion-header {
            width: 100%;
            padding: 15px;
            background: #dedede;
            border: none;
            text-align: left;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }


.accordion-header:hover {
    opacity: 0.7;
}
        .accordion-content {
            display: none;
            padding: 15px;
        }

        .accordion-content.active {
            display: block;
        }

        /* 画像用のスタイル */
        .accordion-content img {
            max-width: 100%;
            height: auto;
            display: block;
            margin-bottom: 10px;
        }

@media (max-width: 768px) {
    /* アコーディオン全体の幅を調整 */
    .accordion {
        padding: 0 12px;
        margin: 12px auto;
    }

    /* ヘッダーの調整 */
    .accordion-header {
        padding: 16px;
        min-height: 48px; /* タップ領域の確保 */
        font-size: 15px;  /* フォントサイズを少し小さく */
    }
    
    /* コンテンツの調整 */
    .accordion-content {
        padding: 16px;
        font-size: 14px;
    }

    /* 画像の調整 */
    .accordion-content img {
        margin-bottom: 12px;
    }

    /* アイコンのサイズ調整 */
    .icon {
        font-size: 18px;
    }
}

/* さらに小さい画面向け */
@media (max-width: 380px) {
    .accordion {
        padding: 0 8px;
    }

    .accordion-header {
        padding: 14px;
    }

    .accordion-content {
        padding: 14px;
    }
}


.accordion table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ddd;
}

.accordion td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
}

.accordion tr:first-child {
  background-color: #f5f5f5;
  font-weight: bold;
}

.accordion td:first-child {
  width: 60px;
}

.accordion td:nth-child(2) {
  width: auto;
}

.accordion td:nth-child(3) {
  width: 120px;
}
/* アコーディオンUI */


/* --- フッター --- */
footer {
  background-color: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 24px 20px;
  margin-top: 40px;
  text-align: center;
}

footer a {
  color: #666;
  font-size: 14px;
  margin: 8px 0;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}

footer a:hover {
  color: #2255A4;
}

@media (min-width: 480px) {
  footer {
    padding: 28px 24px;
  }
  
  footer a {
    font-size: 15px;
    margin: 10px 0;
  }
}