/* ============================================================
 * ベーススタイル
 * ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Helvetica Neue', 'Yu Gothic Medium', '游ゴシック Medium',
    YuGothic, '游ゴシック体', sans-serif;
}

body {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

h2 {
  font-weight: normal;
  margin: 0;
}

/* ============================================================
 * アニメーション
 * ============================================================ */

@keyframes switch-opacity {
  0% { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
 * ユーティリティ
 * ============================================================ */

/* JS によるメニュー切り替えや表示制御に使用 */
.hidden {
  display: none !important;
}

/* アンカーリンクのオフセット（固定ヘッダー分を補正） */
.anchor-offset {
  position: absolute;
  top: -80px;
  left: 0;
}

/* ============================================================
 * レイアウト（最外ラッパー）
 * ============================================================ */

#container {
  display: flex;
  height: 100vh;
  justify-content: space-between;
}

/* タブレット以下では中央寄せ */
@media (max-width: 1024px) {
  #container {
    justify-content: center;
  }
}

/* ============================================================
 * デスクトップ左パネル（背景画像）
 * ============================================================ */

#backgroundPanel {
  display: none;
}

@media (min-width: 1024px) {
  #backgroundPanel {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    flex-shrink: 0;
    width: 530px;
    height: 100vh;
    background-image: url('/white_graph_background.jpg');
    background-size: cover;
  }
}

/* パネル中央のロゴ＋説明文ブロック */
.bg-panel-center {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  max-width: 224px;
  height: 224px;
}

.bg-panel-center img {
  display: block;
  padding-bottom: 24px;
}

.bg-panel-description {
  font-size: 16px;
  color: #666666;
  line-height: 150%;
  text-align: center;
}

/* ============================================================
 * メインコンテンツエリア
 * ============================================================ */

#mainContainer {
  width: 375px;
  min-width: 375px;
  text-align: center;
  background-color: #fff;
  position: relative;
  animation: switch-opacity 0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

/* デスクトップでは左パネルの分だけ右にずらす */
@media (min-width: 1024px) {
  #mainContainer {
    left: 530px;
  }
}

/* ============================================================
 * ヘッダー
 * ============================================================ */

#header {
  position: fixed;
  top: 0;
  width: 375px;
  background-color: white;
  z-index: 1;
}

.header-inner {
  padding-top: 24px;
  padding-bottom: 24px;
}

.header-logo {
  width: 109.55px;
  height: 32px;
  margin: 0 auto;
  display: block;
}

/* ハンバーガーメニューボタン（デスクトップでは非表示） */
#menuOpenArea {
  position: absolute;
  top: 24px;
  right: 18px;
}

@media (min-width: 1024px) {
  #menuOpenArea {
    display: none;
  }
}

.menu-icon {
  margin-bottom: 8px;
  width: 24px;
  height: 12px;
  cursor: pointer;
  display: block;
}

.menu-label {
  font-size: 10px;
}

/* ============================================================
 * メインコンテンツ
 * ============================================================ */

main {
  padding-top: 80px;
}

/* ============================================================
 * モバイルフッター（デスクトップでは非表示）
 * ============================================================ */

.mobile-footer {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: #fafafa;
  height: 118px;
  margin-top: 32px;
}

@media (min-width: 1024px) {
  .mobile-footer {
    display: none;
  }
}

.footer-logo {
  display: block;
  width: 93px;
  height: auto;
  margin-bottom: 16px;
}

.footer-copyright {
  font-size: 10px;
  color: #666;
  line-height: 130%;
}

/* ============================================================
 * SP 用メニュー
 * ============================================================ */

#mobileMenu {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
  background-color: #fafafa;
  animation: switch-opacity 0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.menu-close-area {
  position: absolute;
  top: 24px;
  right: 18px;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
}

/* ============================================================
 * メニュー共通スタイル（SP・デスクトップ両用）
 * ============================================================ */

.menu-item {
  margin-bottom: 24px;
}

.menu-item-privacy {
  margin-bottom: 34px;
}

.menu-link-title {
  display: block;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1;
}

.menu-link-sub {
  display: block;
  font-size: 12px;
  line-height: 1;
}

.menu-item-inline {
  display: inline-block;
}

.menu-social-item {
  display: flex;
  justify-content: center;
}

.menu-social-list {
  display: flex;
  width: 72px;
  justify-content: center;
  gap: 16px;
}

.menu-social-list img {
  display: block;
}

.follow-us {
  display: block;
  font-size: 12px;
  line-height: 1;
  margin-top: 12px;
}

.menu-footer {
  position: absolute;
  bottom: 32px;
  left: 0;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ============================================================
 * デスクトップ用右サイドメニュー
 * ============================================================ */

#desktopMenu {
  display: none;
}

@media (min-width: 1024px) {
  #desktopMenu {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
  }
}

/* メニュー内コンテンツ（縦中央寄せ） */
.desktop-menu-inner {
  text-align: center;
  position: relative;
  z-index: 1;
  background-color: #fafafa;
  animation: switch-opacity 0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ============================================================
 * 最新刊セクション
 * ============================================================ */

.cover-image-wrap {
  margin-left: 18px;
  margin-right: 18px;
}

.section-label {
  margin-top: 20px;
  font-size: 12px;
}

.section-title {
  margin-top: 2px;
  font-size: 24px;
}

.description-area {
  margin-top: 24px;
  font-size: 14px;
  line-height: 28px;
}

.description-inner {
  margin-top: 24px;
  margin-left: 28px;
  margin-right: 28px;
  font-size: 14px;
  line-height: 28px;
  position: relative;
  text-align: left;
}

/* 6行でクランプ表示 + 下部グラデーションオーバーレイ */
.description-clamped {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.description-clamped::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 64px;
  width: 100%;
  background: linear-gradient(to bottom, transparent, white);
}

.description-full {
  margin-bottom: 32px;
}

/* 「続きを読む」ボタン */
.more-button {
  margin-top: 20px;
  margin-bottom: 36px;
  position: relative;
  cursor: pointer;
}

.more-button img {
  display: inline;
  vertical-align: middle;
}

.more-button span {
  vertical-align: middle;
}

/* 購入リンクボタン */
.buy-button {
  height: 48px;
  background-color: black;
  color: white;
  padding: 18px 32px;
  display: inline-block;
  line-height: 1;
  border-radius: 3px;
  font-size: 14px;
}

/* ============================================================
 * バックナンバー・写真集セクション
 * ============================================================ */

.section-heading {
  position: relative;
  font-size: 24px;
  line-height: 1;
  margin-top: 52px;
}

.section-heading-photo {
  margin-top: 68px;
}

.section-sub {
  margin-top: 8px;
  line-height: 1;
}

/* 2カラムグリッド */
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  row-gap: 16px;
  padding: 0 18px 32px 18px;
  margin-top: 28px;
}

.book-item img {
  width: 100%;
  height: auto;
  display: block;
}
