/* Baroque-inspired, elegant yet readable theme */
:root{
  --moegi:#2f6b2f;            /* 萌葱の深緑 */
  --moegi-ink:#244f24;
  --schiaparelli:#ff2d96;     /* スキャパレッリピンク */
  --rose:#ff4fae;
  --cream:#fff7f2;
  --paper:#fbf6f1;
  --ink:#1b1b1b;
  --gold:#c5a664;
  --shadow: rgba(0,0,0,.08);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; color:var(--ink);
  background:
    linear-gradient(rgba(20,20,20,.25), rgba(20,20,20,.25)),
    url('../img/bookshelf.jpg') center/cover no-repeat fixed,
    linear-gradient(180deg, var(--paper), var(--cream));
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  font-family:"Noto Serif JP", serif; line-height:1.8; letter-spacing:.02em; font-size:16px;
  /* Sticky footer layout */
  min-height:100vh; display:flex; flex-direction:column;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}
.container{max-width:1080px;margin:0 auto;padding:24px}
.container.narrow{max-width:820px}
/* Let main area grow to push footer down */
body > main{flex:1 0 auto}

/* Header & Nav */
.site-bar{
  /* 背景画像から抽出したグリーン×ピンクのグラデ。90%透明（alpha=0.1） */
  background: linear-gradient(90deg, rgba(47, 107, 47, 0.10), rgba(255, 45, 150, 0.10));
  color:#fff; border-bottom:3px double var(--gold); position:sticky; top:0; z-index:10;
  backdrop-filter: saturate(180%) blur(6px);
  -webkit-backdrop-filter: saturate(180%) blur(6px);
}

.brand {
  display: none; /* ロゴを非表示 */
}
/* ナビゲーションバー */
.nav {
  display: flex;
  align-items: center;
  justify-content: center; /* メニューを中央配置 */
  padding: 14px 24px;
  flex-wrap: nowrap;
  position: relative;
}

.nav .menu {
  margin: 0 auto; /* 中央寄せ */
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}

.nav a {
  color: #fff; /* 透明背景上で視認性を確保 */
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav a:hover, 
.nav a[aria-current="page"] {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  cursor: pointer;
  margin-left: auto;
  position: absolute; /* メニュー中央配置時も右端に固定 */
  right: 24px;
  z-index: 100;
}

.menu-toggle {
  display: none;
}

/* デスクトップ表示時は通常のメニューを表示 */
@media (min-width: 901px) {
  .menu {
    display: flex !important;
  }
}
.spacer{flex:1}

/* Footer */
.site-footer{border-top:3px double var(--gold); background:#111; color:#eee; margin-top:auto}
.site-footer .inner{max-width:1080px;margin:0 auto;padding:24px}
.site-footer a{color:#f8c}

/* Hero section with bookshelf feel */
.hero{
  position:relative; 
  border:1px solid var(--gold); 
  padding:36px 20px; 
  margin: 16px;
  border-radius:16px;
  background:
    linear-gradient(rgba(20,20,20,.35), rgba(20,20,20,.35)),
    url('../img/Image_2.jpg') center/cover no-repeat fixed,
    radial-gradient(800px 200px at 50% -80px, rgba(255,45,150,.2), transparent);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color:#fff; 
  text-shadow:0 2px 8px rgba(0,0,0,.5);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}
.lead{font-size:1.05rem}
.cta-row{display:flex; gap:12px; margin-top:16px}

/* Responsive */
@media (max-width: 900px){
  .container{padding:16px}
  .nav{column-gap:20px; padding: 18px 18px; min-height: 72px;} /* 高さを72pxに拡張 */
  .nav .menu{gap:12px}
  .hero{padding:30px 16px; margin: 12px;}
  .cards{gap:16px;}
  /* ヘッダー（ハンバーガー）と本文カードの間に余白を追加 */
  body > main{ padding-top: 52px; }
  /* モバイルではナビ背景を消す */
  .site-bar{
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-bottom: none; /* 下線を消す */
    min-height: 72px; /* ハンバーガー分の高さを確保 */
  }
  
  /* ハンバーガーメニュー */
  .menu-toggle {
    display: none;
  }
  
  .hamburger {
    display: flex !important; /* モバイルでは必ず表示 */
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px; /* タップ領域拡大 */
    cursor: pointer;
    margin-left: auto;
    z-index: 100;
    top: 50%; /* 垂直中央 */
    transform: translateY(-50%);
    right: 16px; /* ヒーローのパディングに合わせる */
    position: absolute;
  }
  
  .hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--schiaparelli); /* ピンクに */
    transition: all 0.3s ease;
  }
  
  .menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: rgba(36, 79, 36, 0.96); /* 画像由来の濃いグリーン */
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    padding: 80px 30px 30px;
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 90;
  }
  
  .menu a {
    display: block;
    padding: 14px 0; /* 標準メニューと同等の余白感 */
    color: #fff; /* 白文字 */
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-align: right;
  }

  /* フォーム幅をメニュー幅(280px)に合わせる */
  .form{ max-width: 280px; margin: 0 auto; }
  
  .menu a:hover {
    background: rgba(255,255,255,0.08);
  }
  
  .menu-toggle:checked ~ .menu {
    right: 0;
  }
  
  .menu-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .menu-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  .nav .menu {
    display: none;
  }
  
  .menu-toggle:checked ~ .menu {
    display: block;
  }
}

@media (max-width: 900px){
  .nav{flex-wrap:wrap; row-gap:8px; padding: 10px 12px;}
  .nav .brand a{white-space:normal}
  .nav .menu{margin-left:0; margin-right:0; white-space:normal; flex-wrap:wrap; gap:10px}
  .brand{font-size:18px}
  .nav a{padding:8px 12px; font-size:0.95em}
  .container{padding:12px}
  .hero{padding:24px 16px; border-radius:14px; margin: 10px;}
  .cards{grid-template-columns:1fr; gap:14px;}
  .lead{font-size:1rem; margin: 1em 0;}
  .cta-row{flex-direction: row; gap:12px; flex-wrap: wrap;}
  .btn{width:auto; text-align:center; padding:10px 16px;}
  
  /* ハンバーガーメニュー表示 */
  .hamburger {
    display: flex;
  }
  
  .nav .menu {
    display: none;
  }
  
  .menu-toggle:checked ~ .menu {
    display: block;
  }
}

/* Cards */
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px; margin-top:24px}
.card{
  background:rgba(255,255,255,0.92); border:1px solid var(--gold); border-radius:14px; padding:18px 18px 8px; box-shadow:0 6px 16px var(--shadow);
}
.meta{color:#666; font-size:.9rem}

/* Lists */
.list{list-style:none; margin:0; padding:0}
.list li{padding:10px 4px; border-bottom:1px dashed #e6d9c7}
.list li:last-child{border-bottom:none}
.list.inline{display:flex; flex-wrap:wrap; gap:10px}

/* Works */
.list.works .title{font-weight:600}
.preview{color:#5b5b5b; font-size:.95rem}
.work-body{white-space:pre-wrap; font-size:1.05rem}

/* Timeline */
.timeline{list-style:none; padding-left:0; border-left:3px solid var(--moegi); margin-left:12px}
.timeline li{position:relative; padding:10px 12px 10px 14px; margin-left:8px}
.timeline li::before{content:""; position:absolute; left:-10px; top:16px; width:10px; height:10px; background:var(--schiaparelli); border:2px solid #fff; border-radius:50%}

/* Forms */
.form{display:grid; gap:12px}
.form label{display:grid; gap:6px}
input, textarea{font:inherit; padding:10px 12px; border:1px solid #cdbb9e; border-radius:8px; background:#fff}
input:focus, textarea:focus{outline:3px solid rgba(255,45,150,.2); border-color:var(--schiaparelli)}
.status{margin-top:6px}

/* Buttons */
.btn{display:inline-block; border:1px solid var(--gold); padding:10px 14px; border-radius:999px; text-decoration:none}
.btn-primary{background:linear-gradient(180deg, var(--schiaparelli), var(--rose)); color:#fff}
.btn-ghost{background:transparent; color:#fff; border-color:#fff}

/* Headings decoration with 🍙 ... 🍓 */
.decor::before{content:"🍙 ";}
.decor::after{content:" 🍓"}
.decor{font-family:"Cormorant Garamond", serif; font-weight:700; letter-spacing:.04em}
/* 見出しサイズを統一 */
h2.decor{ font-size: clamp(1.25rem, 1.2rem + 0.6vw, 1.6rem); line-height: 1.25; }

/* Accessibility */
:focus-visible{outline:3px solid rgba(0,0,0,.5); outline-offset:2px}

/* Small tweaks */
.more{margin:8px 0 0}
.profile-list{padding-left:0; list-style:none}

/* Page-scoped styles */
body[data-page="feedback"] h1.decor{ color:#d593a3 }
body[data-page="works"] h1.decor{ color:#d593a3 }
body[data-page="diary"] h1.decor{ color:#d593a3 }
body[data-page="progress"] h1.decor{ color:#d593a3 }
body[data-page="information"] h1.decor{ color:#d593a3 }

/* Gate (password overlay) */
.gate-overlay{
  position:fixed; inset:0; z-index:9999;
  background:linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55));
  display:grid; place-items:center;
  backdrop-filter: blur(2px) saturate(110%);
}
.gate-modal{
  background:#111; color:#eee; border:1px solid var(--gold); border-radius:14px;
  padding:22px; width:min(92vw, 420px);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.gate-modal h2{margin:0 0 6px; font-size:20px}
.gate-desc{margin:0 0 12px; color:#ccc; font-size:.95rem}
.gate-form{display:flex; gap:10px}
.gate-input{flex:1; padding:10px 12px; border-radius:10px; border:1px solid #555; background:#222; color:#fff}
.gate-btn{padding:10px 14px; border-radius:999px; border:1px solid var(--gold); background:linear-gradient(180deg, var(--schiaparelli), var(--rose)); color:#fff; cursor:pointer}
.gate-error{margin-top:10px; color:#f88}
