/* ================================================
   Lumière占いポータルサイト - 共通CSS
   ================================================ */

/* カラーパレット */
:root {
  --dusty-pink: #E8D5E5;
  --dusty-lavender: #D5D5E8;
  --greige: #C9C3BD;
  --dusty-blue: #D5E5E8;
  --gold: #D4AF37;
  --text-dark: #4A4A4A;
  --text-light: #8B8B8B;
  --white: #FFFFFF;
  --bg-light: #F9F7F5;
  --border-light: #E0E0E0;
  --success: #4CAF50;
  --warning: #FFC107;
  --error: #F44336;
  --danger: #F44336;
}

/* 絵文字代替アイコン共通スタイル */
.emoji-icon {
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  display: inline-block;
  object-fit: contain;
}

/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基本スタイル */
html {
  width: 100%;
  overflow-x: clip; /* clipはstickyを妨げない */
}

body {
  font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho Pro",
               "Hiragino Mincho ProN", "Noto Serif JP", serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip; /* clipはstickyを妨げない */
  display: flex;
  flex-direction: column;
  padding-top: 160px; /* ヘッダー分の余白（固定ヘッダー対応） */
  margin: 0;
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

/* スクロール時のヘッダー高さを考慮 */
html {
  scroll-padding-top: 160px; /* ヘッダー高さ(120px) + 余白(40px) */
  scroll-behavior: smooth; /* スムーズスクロール */
}

/* メインコンテンツエリア */
main {
  flex: 1;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip; /* clipはstickyを妨げない */
  box-sizing: border-box;
}

/* コンテナ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* リンクのデフォルトスタイル */
a {
  color: inherit;
  text-decoration: none;
}

/* ボタンのデフォルトスタイル */
button {
  font-family: inherit;
  cursor: pointer;
}

/* 画像のデフォルトスタイル */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--greige);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ===============================
   共通コンポーネント
   =============================== */

/* ウェルカムヘッダー */
.welcome-header {
  text-align: center;
  margin: 0 auto 2rem;
  max-width: 1400px;
}

.welcome-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-dark);
  font-weight: 600;
}

/* タブボタン共通スタイル */
.tab-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.tab-btn {
  position: relative;
  padding: 1rem 1rem 1rem 2.5rem;
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

/* タブボタン内の画像アイコン（左端配置） */
.tab-btn .tab-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* タブボタン内の絵文字アイコン（左端配置） */
.tab-btn .tab-icon-emoji {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  line-height: 1;
}

/* タブボタン内のテキスト（センタリング） */
.tab-btn .tab-text {
  display: block;
  text-align: center;
}

.tab-btn:hover {
  border-color: var(--dusty-pink);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--dusty-pink), var(--dusty-lavender));
  color: var(--white);
  border-color: transparent;
}

/* タブコンテンツ */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* プロフィールセクション共通 */
.profile-section {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.profile-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--dusty-pink);
}

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
}

.profile-info {
  margin-top: 1rem;
}

.profile-info h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-weight: 600;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.info-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

.info-value {
  color: var(--text-dark);
  font-weight: 500;
}

/* データなし表示 */
.no-data {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  font-size: 1rem;
}

/* ===============================
   共通ボタンスタイル
   =============================== */

.btn-primary,
.btn-secondary {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--dusty-lavender) 0%, var(--dusty-pink) 100%);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(213, 213, 232, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--text-dark);
  border: 2px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-light);
}

/* レスポンシブ */
@media (max-width: 768px) {
  body {
    padding-top: 120px; /* スマホ用のヘッダー高さ */
  }

  .container {
    padding: 0 0.5rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  html {
    scroll-padding-top: 120px; /* スマホ用のヘッダー高さ + 余白 */
  }

  .tab-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
  }

  .profile-image {
    width: 100px;
    height: 100px;
  }

  .profile-section {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.25rem;
  }
}

/* ===============================
   予約カード点滅ハイライト
   =============================== */
@keyframes highlight-blink {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: #fff3cd;
  }
}

.highlight-blink {
  animation: highlight-blink 0.5s ease-in-out 4;
}