/* ========================================
   Soft Pop & Airy - ポートフォリオ
   ======================================== */

:root {
  /* ベース */
  --bg-base: #FAFAF9;
  --text-charcoal: #334155;
  --text-muted: #64748b;
  /* パステルアクセント */
  --pastel-pink: #fce7f3;
  --pastel-mint: #d1fae5;
  --pastel-lavender: #ede9fe;
  --pastel-blue: #dbeafe;
  --pastel-peach: #ffedd5;
  /* カード・ごく薄いシャドウ */
  --card-bg: #ffffff;
  /* ボタン用：白より少しグレーで押せることがわかりやすく */
  --btn-bg: #f1f5f9;
  --shadow-soft: 0 2px 10px rgba(51, 65, 85, 0.04);
  --shadow-hover: 0 4px 16px rgba(51, 65, 85, 0.06);
  --radius-card: 28px;
  --radius-btn: 24px;
  /* タイポ */
  --font-heading: 'Outfit', 'M PLUS Rounded 1c', sans-serif;
  --font-body: 'M PLUS Rounded 1c', 'Outfit', sans-serif;
  /* トランジション */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-slow: 0.4s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-charcoal);
  line-height: 1.6;
  /* カスタムカーソル用：PCでは標準カーソルを非表示（JSで有効化時） */
}

body.cursor-custom {
  cursor: none;
}

body.cursor-custom a,
body.cursor-custom button {
  cursor: none;
}

/* SEO・アクセシビリティ：ページタイトル（H1）を視覚非表示・スクリーンリーダーと検索エンジンには表示 */
.page-title-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* カスタムカーソル（追従する円＝マウスカーソル・PCのみ） */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-charcoal);
  transition: width 0.3s var(--ease-smooth), height 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth), opacity 0.2s var(--ease-smooth), visibility 0.2s var(--ease-smooth);
}

/* ボタン・リンク上ではカーソルを非表示（縁で当たりを示すため） */
body.cursor-custom .cursor-dot.hide {
  opacity: 0;
  visibility: hidden;
}

/* マウスが画面外にあるときはカーソルを非表示 */
body.cursor-custom.cursor-outside .cursor-dot {
  opacity: 0;
  visibility: hidden;
}

/* Galleryページではカーソルを白の円に（ダークヘッダー・暗い背景に合わせる） */
body.gallery-page .cursor-dot {
  background: #fff;
}

/* タッチデバイスではカーソル非表示 */
@media (hover: none) or (pointer: coarse) {
  .cursor-dot {
    display: none !important;
  }
}

/* ========== ヘッダー ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 242, 241, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.nav-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0.5rem 1rem 0.5rem auto;
  border: none;
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text-charcoal);
  cursor: pointer;
  transition: background var(--duration-slow) var(--ease-smooth);
}

.nav-menu-btn:hover {
  background: transparent;
}

.nav-menu-btn[aria-expanded="true"] .nav-menu-btn-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-menu-btn[aria-expanded="true"] .nav-menu-btn-bar:nth-child(2) {
  opacity: 0;
}

.nav-menu-btn[aria-expanded="true"] .nav-menu-btn-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-menu-btn-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-charcoal);
  border-radius: 1px;
  transition: transform var(--duration-slow) var(--ease-smooth), opacity var(--duration-slow) var(--ease-smooth);
}

.nav-inner {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* モバイル用オーバーレイ（グレー背景） */
.nav-overlay {
  display: none;
}

@media (max-width: 768px) {
  .site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .nav-menu-btn {
    display: flex;
    position: relative;
    z-index: 100;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(51, 65, 85, 0.45);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: pointer;
    transition: opacity var(--duration-slow) var(--ease-smooth), visibility var(--duration-slow) var(--ease-smooth);
  }

  body.nav-open .nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-inner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    overflow-y: auto;
    flex-direction: column;
    gap: 0;
    padding: 4rem 1rem 2rem;
    margin: 0;
    max-width: none;
    background: var(--bg-base);
    box-shadow: var(--shadow-soft);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-1rem);
    transition: opacity var(--duration-slow) var(--ease-smooth), visibility var(--duration-slow) var(--ease-smooth), transform var(--duration-slow) var(--ease-smooth);
  }

  body.nav-open .nav-inner {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-inner .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-btn);
  }
}

.nav-link {
  color: var(--text-charcoal);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-btn);
  background: transparent;
  transition: background var(--duration-slow) var(--ease-smooth), color var(--duration-slow) var(--ease-smooth);
}

.nav-link:hover {
  background: transparent;
  color: var(--text-charcoal);
}

body.cursor-custom .nav-link:hover {
  outline: 4px solid var(--text-charcoal);
  outline-offset: -4px;
}

.nav-link:focus-visible {
  outline: 2px solid var(--text-charcoal);
  outline-offset: 2px;
}

/* ========== ヒーロー ========== */
.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-base);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: var(--text-charcoal);
}

.hero-sub {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 500;
  color: var(--text-muted);
}

.hero-catch {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
}

/* ========== セクション共通 ========== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 2rem;
  color: var(--text-charcoal);
}

.section-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ========== カード共通 ========== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--duration-slow) var(--ease-smooth), transform var(--duration-slow) var(--ease-smooth);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

/* About・Career・Project/Hobby個別ページのカードはボタンではないためホバー時もシャドウはそのまま */
.profile-card:hover,
.career-item:hover,
.project-detail:hover {
  box-shadow: var(--shadow-soft);
}

/* ========== About（Profile） ========== */
.profile-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .profile-card {
    grid-template-columns: 280px 1fr;
  }
}

.profile-visual {
  border-radius: var(--radius-card);
  overflow: hidden;
}

.profile-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.profile-body {
  min-width: 0;
}

.profile-struct {
  background: #fafafa;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-card);
  font-size: 0.85rem;
  overflow-x: auto;
  margin: 0 0 1.5rem;
  color: var(--text-charcoal);
}

.profile-struct code {
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  line-height: 1.6;
}

/* Swift風シンタックスハイライト（ホワイトモード・見やすく） */
.profile-struct .kw { color: #af00db; }       /* キーワード: struct, var */
.profile-struct .type { color: #267f99; }     /* 型名: Profile */
.profile-struct .prop { color: #001080; }     /* プロパティ名 */
.profile-struct .str { color: #a31515; }      /* 文字列 */
.profile-struct .num { color: #098658; }      /* 数値 */
.profile-struct .id { color: #795e26; }       /* 識別子（タプル内など） */
.profile-struct .punc { color: var(--text-muted); }   /* 記号 */

.profile-text {
  margin: 0 0 1rem;
  color: var(--text-charcoal);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ========== ボタン ========== */
.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--duration-slow) var(--ease-smooth), transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}

.btn:focus-visible {
  outline: 2px solid var(--text-charcoal);
  outline-offset: 2px;
}

.btn-outline {
  background: var(--btn-bg);
  color: var(--text-charcoal);
  border: none;
  box-shadow: var(--shadow-soft);
}
.btn-outline:hover {
  background: var(--btn-bg);
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

/* Xロゴ（SVGは白 fill のため、明るい背景で見えるように暗くする） */
.btn-icon-x {
  filter: brightness(0);
}

/* GitHubロゴ（白ベースのため同様に暗くする） */
.btn-icon-github {
  filter: brightness(0);
}

/* テキストボタン（Contact・X・GitHub）のホバーは Skills ピルと同じ：枠で当たりを表示 */
body.cursor-custom .btn:hover {
  outline: 4px solid var(--text-charcoal);
  outline-offset: -4px;
}

/* Contact も Skills ピル・X・GitHub と同じ見た目に準拠 */
.btn-primary {
  background: var(--btn-bg);
  color: var(--text-charcoal);
  border: none;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background: var(--btn-bg);
}

/* ========== Bento Grid ========== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(200px, auto);
  }

  .bento-large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.bento-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--duration-slow) var(--ease-smooth), transform var(--duration-slow) var(--ease-smooth);
}

.bento-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.bento-card:focus-visible {
  outline: 2px solid var(--text-charcoal);
  outline-offset: 2px;
}

.bento-img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--pastel-peach);
}

.bento-large .bento-img-wrap {
  aspect-ratio: auto;
  min-height: 240px;
}

.bento-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

.bento-card:hover .bento-img-wrap img {
  transform: scale(1.05);
}

.bento-content {
  padding: 1.25rem;
  background: var(--card-bg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bento-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.tag-apps {
  background: var(--pastel-mint);
  color: var(--text-charcoal);
}

.tag-social {
  background: var(--pastel-blue);
  color: var(--text-charcoal);
}

.tag-hobby {
  background: var(--pastel-peach);
  color: var(--text-charcoal);
}

.bento-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-charcoal);
}

.bento-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ========== Career ========== */
.career-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.career-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem 1.5rem;
  text-align: left;
}

@media (max-width: 480px) {
  .career-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.career-date {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-charcoal);
  flex-shrink: 0;
}

.career-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-charcoal);
}

.career-text a {
  color: var(--text-charcoal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-slow) var(--ease-smooth);
}

.career-text a:hover {
  color: #595BD8;
}

/* ========== Skills ========== */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.skill-pill {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 500;
  background: var(--btn-bg);
  color: var(--text-charcoal);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth), background var(--duration-slow) var(--ease-smooth);
}
.skill-pill:hover {
  background: var(--btn-bg);
}

body.cursor-custom .skill-pill:hover {
  outline: 4px solid var(--text-charcoal);
  outline-offset: -4px;
}

/* ========== Picture Gallery CTA ========== */
.gallery-cta {
  padding: 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.btn-gallery {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding: 1.25rem 2rem;
  background: #000;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-card);
}

/* 中間層：写真 */
.btn-gallery::before {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 4 / 1;
  top: 50%;
  transform: translateY(-50%);
  background-image: url('assets/photogallery_background.jpeg');
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: filter var(--duration-slow) var(--ease-smooth);
}

.btn-gallery:hover::before {
  filter: grayscale(100%);
}

/* 最上層：テキスト */
.btn-gallery-label {
  position: relative;
  z-index: 2;
}

.btn-gallery:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ========== Footer ========== */
.site-footer {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-base);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-charcoal);
}

.footer-lead {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.75rem;
}

.footer-copy {
  margin: 2.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-copy.footer-privacy {
  margin-top: 0.5rem;
}

.footer-privacy-link {
  color: inherit;
  text-decoration: none;
}

.footer-privacy-link:hover {
  text-decoration: underline;
}

/* ギャラリーページ末尾の All rights reserved は黒背景 */
.gallery-page .site-footer {
  background: #111;
}

.gallery-page .site-footer .footer-copy {
  color: rgba(255, 255, 255, 0.8);
}

/* ========== プライバシーポリシー一覧ページ ========== */
.privacy-main {
  min-height: 100vh;
  padding-bottom: 2rem;
}

.privacy-section.section {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1200px;
}

/* プライバシー詳細ページ：囲い（コンテナ）を水平方向の中央に配置（block + margin auto） */
.privacy-detail-main .project-breadcrumb,
.privacy-detail-main .project-detail-wrap {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* プライバシー詳細：カードは常に1列（デスクトップでも2列グリッドにしない） */
.privacy-detail-main .project-detail {
  grid-template-columns: 1fr;
}

/* プライバシー詳細：カード内のテキスト部分全体を囲いに対して中央に配置 */
.privacy-detail-main .project-detail-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.privacy-lead {
  margin: 0 0 2rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.privacy-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.privacy-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-charcoal);
  text-decoration: none;
  padding: 0.75rem 1rem;
  min-height: 56px;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--duration-slow) var(--ease-smooth);
  box-sizing: border-box;
}

.privacy-list-item:hover {
  box-shadow: inset 0 0 0 4px var(--btn-bg), var(--shadow-hover);
}

.privacy-list-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.privacy-list-text {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

/* スライダー風：日本語/English を囲んだピル */
.privacy-section {
  display: flex;
  flex-direction: column;
}

.privacy-lang-switcher {
  display: inline-flex;
  align-items: stretch;
  margin-bottom: 1.5rem;
  align-self: flex-end;
  font-size: 0.9rem;
  background: var(--btn-bg);
  border-radius: var(--radius-btn);
  padding: 4px;
  box-shadow: var(--shadow-soft);
}

.privacy-lang-switcher span {
  display: none;
}

.privacy-lang-btn {
  font-family: inherit;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 1rem;
  border-radius: calc(var(--radius-btn) - 4px);
  cursor: pointer;
  transition: background-color var(--duration-slow) var(--ease-smooth), color var(--duration-slow) var(--ease-smooth), box-shadow var(--duration-slow) var(--ease-smooth);
}

.privacy-lang-btn:hover {
  color: var(--text-charcoal);
}

.privacy-lang-btn.active {
  background: var(--card-bg);
  color: var(--text-charcoal);
  font-weight: 500;
  box-shadow: var(--shadow-soft);
}

.privacy-back {
  margin-top: 1rem;
  text-align: center;
}

.privacy-detail-body {
  margin-bottom: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}

.privacy-detail-body p {
  margin: 0 0 0.5em;
  color: var(--text-charcoal);
}

.privacy-lang-ja,
.privacy-lang-en {
  display: none;
}

.privacy-lang-ja.active,
.privacy-lang-en.active {
  display: block;
}

.privacy-detail-body h2,
.privacy-detail-body h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--text-charcoal);
}

.privacy-detail-body h2:first-child,
.privacy-detail-body h3:first-child {
  margin-top: 0;
}

.privacy-detail-body ul {
  margin: 0.5em 0 1em;
  padding-left: 1.5em;
}

.privacy-detail-body li {
  margin: 0.25em 0;
}

.privacy-detail-meta {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========== プロジェクト詳細ページ ========== */
.project-breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-breadcrumb a {
  color: var(--text-charcoal);
  text-decoration: none;
  transition: color var(--duration-slow) var(--ease-smooth);
}

.project-breadcrumb a:hover {
  color: #595BD8;
}

.project-detail-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.project-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem;
}

@media (min-width: 768px) {
  .project-detail {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.project-detail-image-wrap {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
}

.project-detail-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-detail-body .project-detail-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-charcoal);
}

.project-detail-body .project-detail-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-charcoal);
  margin: 0 0 1.5rem;
}

.project-detail-subtitle {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-charcoal);
}

.project-detail-body .project-detail-list {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-charcoal);
  line-height: 1.7;
}

.project-detail-body .project-detail-list a:hover {
  color: #6366f1;
}

.project-detail-cta-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.project-detail-cta {
  display: inline-block;
}

/* 個別ページ（Project/Hobby）前へ・次へナビ：横にスペースがあるときのみ表示 */
.detail-nav-prev,
.detail-nav-next {
  display: none;
}

@media (min-width: 1024px) {
  .detail-nav-prev,
  .detail-nav-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--btn-bg);
    color: var(--text-charcoal);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    transition: transform var(--duration-slow) var(--ease-smooth), box-shadow var(--duration-slow) var(--ease-smooth);
    z-index: 100;
  }
  .detail-nav-prev {
    left: 4rem;
  }
  .detail-nav-next {
    right: 4rem;
  }
  .detail-nav-prev:hover,
  .detail-nav-next:hover {
    transform: translateY(calc(-50% - 2px));
    box-shadow: var(--shadow-hover);
  }
  body.cursor-custom .detail-nav-prev:hover,
  body.cursor-custom .detail-nav-next:hover {
    box-shadow: var(--shadow-hover), inset 0 0 0 4px var(--text-charcoal);
  }
}

/* note埋め込み（hobby/note.html・project-detail-body内） */
.note-embed-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
  padding: 0;
  border: none;
}

.note-embed-item {
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.note-embed-item + .note-embed-item {
  margin-top: 0;
}

.note-embed {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
  margin: 0;
  padding: 0;
  vertical-align: top;
  border-radius: var(--radius-card);
}

/* ========== Picture Gallery ページ ========== */
.gallery-page {
  background: #111;
}

.gallery-page .site-header--dark {
  background: rgba(17, 17, 17, 0.95);
}

.gallery-page .site-header--dark .nav-link {
  color: #fff;
}

.gallery-page .site-header--dark .nav-link:hover {
  color: #000;
  background: rgba(255, 255, 255, 0.9);
}

.gallery-page .site-header--dark .nav-menu-btn-bar {
  background: #fff;
}

.gallery-page .site-header--dark .nav-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ギャラリー・モバイル：オーバーレイメニューは常に文字・縁を黒に */
@media (max-width: 768px) {
  /* オーバーレイの背景ホバー時もカスタムカーソルのまま */
  body.cursor-custom.gallery-page .nav-overlay {
    cursor: none;
  }
  /* メニュー開時は明るいパネル上に合わせてカーソル・閉じるボタンを黒に */
  body.nav-open.gallery-page .cursor-dot {
    background: var(--text-charcoal);
  }
  body.nav-open.gallery-page .site-header--dark .nav-menu-btn-bar,
  body.nav-open.gallery-page .site-header--dark .nav-menu-btn:hover .nav-menu-btn-bar {
    background: var(--text-charcoal);
  }
  .gallery-page .nav-inner {
    border: 2px solid #000;
    box-shadow: var(--shadow-soft);
  }
  .gallery-page .nav-inner .nav-link,
  .gallery-page .nav-inner .nav-link:hover {
    color: #000;
  }
  .gallery-page .nav-inner .nav-link:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
  }
}

.gallery-main {
  min-height: 100vh;
  padding: 2rem 0 4rem;
  max-width: 1820px;
  margin: 0 auto;
}

/* ギャラリー：読み込み中表示 */
.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: opacity 0.3s var(--ease-smooth), visibility 0.3s var(--ease-smooth);
}

.gallery-loading--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gallery-loading-spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gallery-spin 0.8s linear infinite;
}

@keyframes gallery-spin {
  to { transform: rotate(360deg); }
}

.gallery-loading-text {
  font-size: 0.95rem;
}

/* グリッド: 狭い幅では1列（左右にpadding）、それ以外は3列 */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  gap: 10px;
  list-style: none;
  margin: 0 auto;
  padding: 0 1rem; /* 1列レイアウト時は左右に余白 */
  max-width: 920px;
  width: 100%;
  box-sizing: border-box;
  container-type: inline-size;
}

/* 1列レイアウト時のみ: 1行の高さ＝列幅の半分（横長に合わせる）。縦長は2行で横長の2倍の高さに */
@container (max-width: 639px) {
  .gallery-grid {
    grid-auto-rows: calc((100cqw - 10px) / 2); /* 2行＋1gapで列幅に収まるよう gap を考慮 */
  }
}

/* 1列: 横長＝1行、縦長＝2行（縦長の高さは横長の2倍） */
.gallery-item--2-1 {
  grid-column: span 1;
  grid-row: span 1;
  width: 100%;
  align-self: stretch;
}

.gallery-item--1-2 {
  grid-column: span 1;
  grid-row: span 2;
  width: 100%;
  align-self: stretch;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    padding: 0; /* 3列時は左右paddingなし */
  }

  /* 3列レイアウト時: 従来どおりの碁盤の目（高さはグリッド行に合わせる） */
  .gallery-item--2-1 {
    grid-column: span 2;
    grid-row: span 1;
    justify-self: stretch;
    width: auto;
    max-width: none;
    aspect-ratio: auto;
    align-self: stretch;
  }

  .gallery-item--1-2 {
    grid-column: span 1;
    grid-row: span 2;
    aspect-ratio: auto;
    align-self: stretch;
  }
}

.gallery-breadcrumb {
  margin-bottom: 1.5rem;
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #fff;
}

.gallery-breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.gallery-breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* ========== Art ページ ========== */
.art-main {
  min-height: 100vh;
  padding: 0 0 4rem;
}

.art-breadcrumb {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.art-breadcrumb a {
  color: var(--text-charcoal);
  text-decoration: none;
}

.art-breadcrumb a:hover {
  color: var(--text-charcoal);
  text-decoration: underline;
}

.art-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-base);
}

.art-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.art-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
}

.art-hero-lead {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.art-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 700;
  margin: 0 0 0.25rem;
  line-height: 1.1;
  color: var(--text-charcoal);
}

.art-hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin: 0;
}

.art-showcase .section-title {
  margin-bottom: 2rem;
}

.art-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .art-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .art-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.art-card {
  overflow: hidden;
  padding: 0;
}

.art-card:hover {
  box-shadow: var(--shadow-soft);
}

.art-card-visual {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.art-card-placeholder {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.art-card-body {
  padding: 1.25rem 1.5rem;
}

.art-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-charcoal);
}

.art-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}


.gallery-item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

/* ギャラリー：カスタムカーソル時は写真の上でもポインターに変えず、ドットのまま */
body.cursor-custom.gallery-page .gallery-item,
body.cursor-custom.gallery-page .gallery-item img {
  cursor: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
  transition: filter 0.3s ease;
}

.gallery-item:hover img {
  filter: grayscale(50%);
}

.gallery-back {
  text-align: center;
  margin: 3rem 0 0;
  padding: 0 1rem;
}

.gallery-back-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
}

.gallery-back-link:hover {
  color: #fff;
}

.gallery-error {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 2rem;
}

/* ========== Gallery 写真オーバーレイ ========== */
.gallery-photo-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-photo-overlay--open {
  opacity: 1;
  visibility: visible;
}

.gallery-photo-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

/* カスタムカーソル時：ギャラリー詳細オーバーレイ全体でデフォルトカーソルを非表示 */
body.cursor-custom .gallery-photo-overlay,
body.cursor-custom .gallery-photo-overlay-backdrop,
body.cursor-custom .gallery-photo-overlay * {
  cursor: none;
}

.gallery-photo-overlay-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: #1a1a1a;
  border-radius: 16px;
  padding: 1.5rem;
  overflow: auto;
}

.gallery-photo-overlay-image {
  max-width: 85vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-photo-overlay-meta {
  width: 100%;
  max-width: 400px;
  color: #fff;
  font-size: 0.9rem;
}

.gallery-photo-overlay-link {
  margin-top: 1rem;
}

.gallery-photo-overlay-link[aria-hidden="true"] {
  display: none;
}

.gallery-photo-overlay-btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-btn);
  transition: background var(--duration-slow) var(--ease-smooth), color var(--duration-slow) var(--ease-smooth);
}

.gallery-photo-overlay-close {
  display: block;
  margin: 1rem auto 0;
}

.gallery-photo-overlay-info {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-photo-overlay-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.5rem;
}

.gallery-photo-overlay-row dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.gallery-photo-overlay-row dd {
  margin: 0;
}

/* ========== Activity FAB（右下浮遊ボタン） ========== */
/* 背景色 #FFB14C、テキスト左にアイコン画像 */
/* 角丸は最初の比率（24px / 0.875rem 縦padding ≈ 1.71）に合わせてスケール */
.activity-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: #FFB14C;
  color: var(--text-charcoal);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 2rem; /* 縦padding 1rem に合わせた角丸 */
  box-shadow: 0 6px 22px rgba(51, 65, 85, 0.1), 0 3px 10px rgba(51, 65, 85, 0.06);
  transition: box-shadow var(--duration-slow) var(--ease-smooth);
}

.activity-fab:hover {
  box-shadow: 0 10px 32px rgba(51, 65, 85, 0.12), 0 4px 14px rgba(51, 65, 85, 0.08);
}

body.cursor-custom .activity-fab:hover {
  box-shadow: inset 0 0 0 4px var(--text-charcoal), 0 10px 32px rgba(51, 65, 85, 0.12), 0 4px 14px rgba(51, 65, 85, 0.08);
}

.activity-fab-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.activity-fab:focus-visible {
  outline: 2px solid var(--text-charcoal);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .activity-fab {
    right: 1rem;
    bottom: 1rem;
    padding: 0.875rem 1.625rem;
    font-size: 1.1rem;
    border-radius: 1.75rem; /* 縦padding 0.875rem に合わせた角丸 */
  }
}

/* ========== ミニゲーム FAB・トリガーリンク ========== */
.minigame-fab {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--btn-bg);
  color: var(--text-charcoal);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 2rem;
  box-shadow: 0 6px 22px rgba(51, 65, 85, 0.1), 0 3px 10px rgba(51, 65, 85, 0.06);
  transition: box-shadow var(--duration-slow) var(--ease-smooth);
  cursor: pointer;
}

.minigame-fab:hover {
  box-shadow: 0 10px 32px rgba(51, 65, 85, 0.12), 0 4px 14px rgba(51, 65, 85, 0.08);
}

body.cursor-custom .minigame-fab:hover {
  box-shadow: inset 0 0 0 4px var(--text-charcoal), 0 10px 32px rgba(51, 65, 85, 0.12), 0 4px 14px rgba(51, 65, 85, 0.08);
}

.minigame-fab:focus-visible {
  outline: 2px solid var(--text-charcoal);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .minigame-fab {
    left: 1rem;
    bottom: 1rem;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border-radius: 1.75rem;
  }
}

.btn-link-minigame {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: #595BD8;
  text-decoration: underline;
  cursor: pointer;
  transition: color var(--duration-slow) var(--ease-smooth);
}

.btn-link-minigame:hover {
  color: var(--text-charcoal);
}

/* ========== ミニゲーム オーバーレイ ========== */
.minigame-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-smooth), visibility 0.25s var(--ease-smooth);
}

.minigame-overlay.minigame-overlay--open {
  opacity: 1;
  visibility: visible;
}

body.minigame-open {
  overflow: hidden;
}

/* ゲーム画面でもカスタムカーソルを最前面で表示・追従させる */
body.minigame-open .cursor-dot {
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

/* ミニゲーム表示中はオーバーレイ内でシステムカーソルを非表示（カスタムのみ表示） */
body.minigame-open.cursor-custom .minigame-overlay,
body.minigame-open.cursor-custom .minigame-overlay * {
  cursor: none;
}

.minigame-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(51, 65, 85, 0.4);
  cursor: pointer;
}

.minigame-overlay-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--bg-base);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  max-width: 100%;
}

.minigame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
}

.minigame-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-charcoal);
}

.minigame-scores {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-charcoal);
}

.minigame-score-label,
.minigame-high-label {
  color: var(--text-muted);
}

.minigame-score,
.minigame-high {
  font-weight: 600;
}

.minigame-canvas-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--pastel-mint);
  box-shadow: var(--shadow-soft);
}

.minigame-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 800px;
}

/* 開始前・Game Over はゲーム画面の上に薄いグレーを被せるだけ（基本はゲーム画面が見える） */
.minigame-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(148, 163, 184, 0.28);
  font-family: var(--font-heading);
  color: var(--text-charcoal);
  pointer-events: none;
}

.minigame-message[hidden] {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

.minigame-message--start {
  pointer-events: auto;
  cursor: pointer;
}

.minigame-message-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.minigame-message--gameover {
  pointer-events: auto;
}

.minigame-gameover-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.minigame-final-score {
  margin: 0;
  font-size: 1.1rem;
}

.minigame-retry {
  margin-top: 0.5rem;
}

.minigame-close {
  align-self: center;
}

@media (max-width: 768px) {
  .minigame-overlay-content {
    padding: 1rem;
  }
  .minigame-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========== Activity ページ（一行ニュース） ========== */
.activity-page .site-footer {
  margin-top: 0;
}

.activity-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.activity-breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.activity-breadcrumb a {
  color: var(--text-charcoal);
  text-decoration: none;
  transition: color var(--duration-slow) var(--ease-smooth);
}

.activity-breadcrumb a:hover {
  color: #595BD8;
}

.activity-page-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-charcoal);
}

.activity-page-title-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.activity-lead {
  margin: 0 0 2rem;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Activity：読み込み中表示（ギャラリーと同様） */
.activity-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  transition: opacity 0.3s var(--ease-smooth), visibility 0.3s var(--ease-smooth);
}

.activity-loading--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.activity-loading-spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(51, 65, 85, 0.2);
  border-top-color: var(--text-charcoal);
  border-radius: 50%;
  animation: activity-spin 0.8s linear infinite;
}

@keyframes activity-spin {
  to { transform: rotate(360deg); }
}

.activity-loading-text {
  font-size: 0.95rem;
}

/* Activity フィルター（タグで絞り込み） */
.activity-filter-wrap {
  margin-bottom: 1.25rem;
}

.activity-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.activity-filter-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-charcoal);
  background: var(--btn-bg);
  border: none;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform var(--duration-slow) var(--ease-smooth), box-shadow var(--duration-slow) var(--ease-smooth);
}

.activity-filter-btn:hover {
  background: var(--btn-bg);
}

body.cursor-custom .activity-filter-btn:hover {
  outline: 4px solid var(--text-charcoal);
  outline-offset: -4px;
}

.activity-filter-btn.active {
  background: var(--text-charcoal);
  color: var(--bg-base);
  box-shadow: var(--shadow-hover);
}

.activity-filter-btn:focus-visible {
  outline: 2px solid var(--text-charcoal);
  outline-offset: 2px;
}

/* Activity 各ニュースのタグ（最大2つ・色付き） */
.activity-news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.activity-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  color: var(--text-charcoal);
}

/* 淡いパステル（タグ用・文字色は Projects と同様） */
/* タグの背景・文字色は tags.json で指定（JS でインライン適用） */

.activity-news-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.activity-news-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.activity-news-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.activity-news-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-charcoal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}

.activity-news-text a {
  color: var(--text-charcoal);
  text-decoration: none;
  transition: color var(--duration-slow) var(--ease-smooth);
}

.activity-news-text a:hover {
  color: #595BD8;
}

.activity-news-text-wrap {
  margin: 0;
  min-width: 0;
}

.activity-news-actions {
  grid-column: 2;
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.activity-news-more {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

/* Activity content overlay（ギャラリー同様） */
.activity-content-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) var(--ease-smooth), visibility var(--duration-slow) var(--ease-smooth);
}

.activity-content-overlay--open {
  opacity: 1;
  visibility: visible;
}

.activity-content-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(51, 65, 85, 0.5);
  cursor: pointer;
}

/* カスタムカーソル時：詳細オーバーレイ全体でデフォルトカーソルを非表示 */
body.cursor-custom .activity-content-overlay,
body.cursor-custom .activity-content-overlay-backdrop,
body.cursor-custom .activity-content-overlay * {
  cursor: none;
}

.activity-content-overlay-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.activity-content-overlay-inner {
  padding: 1.5rem 1.75rem;
  max-height: 85vh;
  overflow-y: auto;
}

.activity-content-overlay-date {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.activity-content-overlay-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-charcoal);
}

.activity-content-overlay-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1rem;
}

.activity-content-overlay-body {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-charcoal);
  white-space: pre-wrap;
}

.activity-content-overlay-body p {
  margin: 0 0 0.75rem;
}

.activity-content-overlay-body p:last-child {
  margin-bottom: 0;
}

.activity-content-overlay-close {
  display: block;
  margin: 1rem auto 0;
}

.activity-error {
  padding: 1.5rem;
  color: var(--text-muted);
  text-align: center;
}

.activity-back {
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .activity-news-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .activity-news-actions {
    grid-column: 1;
  }
}

/* ========== 404 ページ ========== */
.section-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem 1rem;
}

.card-404 {
  max-width: 480px;
  width: 100%;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.card-404 .error-code {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--pastel-lavender);
  margin: 0 0 0.5rem;
}

.card-404 .error-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-charcoal);
  margin: 0 0 1rem;
}

.card-404 .error-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

.card-404 .btn-404 {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: 500;
  transition: transform var(--duration-slow) var(--ease-smooth), box-shadow var(--duration-slow) var(--ease-smooth);
}

.card-404 .btn-404:hover {
  box-shadow: var(--shadow-hover);
}

body.cursor-custom .card-404 .btn-404:hover {
  box-shadow: var(--shadow-hover), inset 0 0 0 4px var(--text-charcoal);
}

