/* マイページタブ専用スタイル（共通部分） */

/* マイページ（設定）用スタイル */
.mypage-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.mypage-layout {
  display: flex;
  gap: 24px;
  height: 100%;
  min-height: 0;
}

.mypage-sidebar {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 16px;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}

.mypage-tab-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-size: var(--fs-14);
  color: var(--text-sub);
  position: relative;
}

.mypage-tab-button:hover {
  background: rgba(245, 248, 255, 0.6);
  color: var(--text-main);
}

.mypage-tab-button.active {
  background: linear-gradient(135deg, rgba(94, 200, 216, 0.14), rgba(143, 140, 243, 0.12));
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(150, 175, 220, 0.2);
}

.mypage-tab-button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, var(--mint), var(--lavender));
  border-radius: 0 4px 4px 0;
}

.mypage-tab-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.mypage-tab-label {
  flex: 1;
}

.mypage-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 160, 190, 0.3) transparent;
  min-height: 0;
}

.mypage-content::-webkit-scrollbar {
  width: 12px;
}

.mypage-content::-webkit-scrollbar-track {
  background: transparent;
}

.mypage-content::-webkit-scrollbar-thumb {
  background: rgba(140, 160, 190, 0.3);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.mypage-content::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 160, 190, 0.5);
  background-clip: padding-box;
}

.mypage-tab-panel {
  display: none;
}

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

.mypage-tab-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.mypage-tab-title {
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.mypage-tab-subtitle {
  font-size: var(--fs-14);
  color: var(--text-sub);
}

.mypage-content-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mypage-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
}
.mypage-col {
  display: flex;
  flex-direction: column;
}

.settings-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: var(--fs-18);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.section-title-wrapper .section-title {
  margin-bottom: 0;
  flex: 1;
}


.section-subtitle {
  font-size: var(--fs-12);
  color: var(--text-muted);
  margin-bottom: 16px;
}

@media (max-width: 1024px) {
  .mypage-layout {
    flex-direction: column;
  }

  .mypage-sidebar {
    flex: 0 0 auto;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    padding-right: 0;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .mypage-tab-button {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mypage-tab-button.active::before {
    display: none;
  }

  .mypage-tab-button.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: linear-gradient(90deg, var(--mint), var(--lavender));
    border-radius: 3px 3px 0 0;
  }

  .mypage-content {
    padding-right: 0;
  }

  .mypage-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1025px) {
  #tab-mypage {
    overflow: hidden;
  }
}

/* スマホ版（768px以下）のマイページタブ最適化 */
@media (max-width: 768px) {
  .mypage-container {
    width: 100%;
    height: 100%;
  }

  .mypage-layout {
    flex-direction: column;
    gap: 0;
    height: 100%;
  }

  /* スマホ版ではサイドバーを非表示（ドロワーメニューで操作） */
  .mypage-sidebar {
    display: none;
  }

  .mypage-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0 0;
    min-height: 0;
    width: 100%;
  }

  .mypage-tab-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom-width: 1px;
  }

  .mypage-tab-title {
    font-size: var(--fs-18);
    margin-bottom: 3px;
    line-height: 1.3;
  }

  .mypage-tab-subtitle {
    font-size: var(--fs-12);
    line-height: 1.3;
  }

  .mypage-content-grid {
    gap: 10px;
  }

  .mypage-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .settings-section {
    margin-bottom: 12px;
  }

  .section-title {
    font-size: var(--fs-14);
    margin-bottom: 4px;
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: var(--fs-11);
    margin-bottom: 8px;
    line-height: 1.3;
  }

  /* カードのパディングを削減 */
  .card {
    padding: 10px 12px;
  }

  /* カード内の余白を削減 */
  .card-inner {
    line-height: 1.4;
  }
}