/* ============================================
   古典フレンチアーカイブ — スタイルシート
   ============================================ */

/* ---- Dark Theme Variables (default) ---- */
:root {
  --bg-base: #0e0d0c;
  --bg-card: #16140f;
  --bg-card-hover: #1e1b14;
  --bg-table-alt: #1a1714;
  --bg-badge: #2a2318;
  --bg-header: rgba(14,13,12,0.92);
  --bg-filter: transparent;
  --bg-wine-intro: #1a1714;

  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-pale: rgba(201, 168, 76, 0.12);
  --gold-border: rgba(201, 168, 76, 0.3);

  --cream: #f0e6ce;
  --cream-soft: #d4c9a8;
  --text-body: #b8a98a;
  --text-muted: #6e6350;
  --text-subtle: #4a4035;

  --wine-red: #8b2e2e;
  --wine-pink: #c4726e;
  --wine-bg: rgba(138, 46, 46, 0.1);
  --wine-border: rgba(138, 46, 46, 0.35);

  --border: rgba(201, 168, 76, 0.18);
  --border-subtle: rgba(255,255,255,0.06);

  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

/* ---- Light Theme Variables ---- */
.theme-light {
  --bg-base: #faf6ef;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f0e6;
  --bg-table-alt: #f8f4ec;
  --bg-badge: #f0e8d0;
  --bg-header: rgba(250,246,239,0.95);
  --bg-filter: transparent;
  --bg-wine-intro: #f8f4ec;

  --gold: #8a5e1a;
  --gold-light: #7a500f;
  --gold-pale: rgba(138, 94, 26, 0.08);
  --gold-border: rgba(138, 94, 26, 0.25);

  --cream: #2a1f0e;
  --cream-soft: #3d2e14;
  --text-body: #4a3a22;
  --text-muted: #8a7055;
  --text-subtle: #b09070;

  --wine-red: #7a2020;
  --wine-pink: #8a3030;
  --wine-bg: rgba(122, 32, 32, 0.08);
  --wine-border: rgba(122, 32, 32, 0.3);

  --border: rgba(138, 94, 26, 0.2);
  --border-subtle: rgba(0,0,0,0.07);

  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ---- Typography & Fonts ---- */
:root {
  --font-serif: 'Cormorant Garamond', 'EB Garamond', 'Noto Serif JP', Georgia, serif;
  --font-jp: 'Noto Serif JP', 'Cormorant Garamond', serif;
  --radius: 2px;
  --radius-md: 4px;
  --transition: 0.3s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-base);
  color: var(--text-body);
  font-family: var(--font-jp);
  line-height: 1.8;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: 3px; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1rem, 4vw, 3rem);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-fleur { color: var(--gold); font-size: 0.65rem; opacity: 0.7; }

.logo-text { display: flex; flex-direction: column; }

.logo-main {
  font-family: var(--font-jp);
  font-size: 1rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.05em;
  line-height: 1;
  transition: color 0.4s ease;
}

.logo-sub {
  font-family: 'EB Garamond', serif;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.4;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  font-family: var(--font-jp);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--cream); }
.nav-link.active { color: var(--gold); }
.nav-link.disabled { opacity: 0.45; pointer-events: none; }

.badge {
  font-size: 0.55rem;
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  padding: 1px 6px;
  border-radius: 20px;
  letter-spacing: 0.06em;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-jp);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.ctrl-btn:hover {
  color: var(--cream);
  border-color: var(--gold-border);
  background: var(--gold-pale);
}

.ctrl-icon { font-size: 0.9rem; line-height: 1; }
.ctrl-label { font-size: 0.7rem; font-weight: 400; letter-spacing: 0.1em; }

/* Theme: sun icon color in dark mode */
.theme-dark .theme-btn .ctrl-icon { color: var(--gold); }
.theme-light .theme-btn .ctrl-icon { color: var(--gold); }


/* ============================================
   HERO
   ============================================ */
.hero {
  padding: clamp(4rem, 8vh, 7rem) clamp(1rem, 4vw, 3rem);
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--gold-pale) 0%, transparent 70%),
    var(--bg-base);
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
}

.theme-dark .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(201,168,76,0.03) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(201,168,76,0.03) 40px);
  pointer-events: none;
}

.hero-ornament { display: flex; align-items: center; gap: 1rem; max-width: 400px; margin: 1.5rem auto; }
.hero-ornament.top { margin-bottom: 2.5rem; }
.hero-ornament.bottom { margin-top: 2.5rem; }
.ornament-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--gold-border), transparent); }
.ornament-diamond { color: var(--gold); font-size: 0.55rem; opacity: 0.6; }

.hero-label {
  font-family: 'EB Garamond', serif;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-jp);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 200;
  color: var(--cream);
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  transition: color 0.4s ease;
}

.hero-subtitle {
  font-size: 0.88rem;
  color: var(--text-body);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 2;
  letter-spacing: 0.04em;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--gold-pale);
  border: 1px solid var(--gold-border);
  padding: 1rem 2.5rem;
  border-radius: var(--radius);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 500; color: var(--gold); line-height: 1; transition: color 0.4s; }
.stat-plus { font-size: 1.2rem; }
.stat-label { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.1em; }
.stat-divider { color: var(--border); font-size: 1.5rem; line-height: 1; }


/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem) 5rem;
}

.section-header { text-align: center; margin-bottom: 2.5rem; }

.section-label {
  font-family: 'EB Garamond', serif;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0.75;
}

.section-title {
  font-family: var(--font-jp);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.1em;
  transition: color 0.4s ease;
}

/* Search Bar */
.search-bar {
  margin: 0 auto 1.5rem;
  max-width: 560px;
}
.search-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.55rem 1.1rem;
  transition: border-color 0.2s;
}
.search-inner:focus-within {
  border-color: var(--gold);
}
.search-icon { font-size: 0.85rem; opacity: 0.55; flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: var(--font-jp);
  font-size: 0.875rem;
  padding: 0;
  min-width: 0;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.search-clear:hover { color: var(--cream); }

/* Filter */
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-subtle); }

.filter-btn {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  background: var(--bg-filter);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}
.filter-btn:hover { color: var(--cream); border-color: var(--gold-border); }
.filter-btn.active { color: var(--gold); border-color: var(--gold-border); background: var(--gold-pale); }


/* ============================================
   DIARY CARD
   ============================================ */
.diary-list { display: flex; flex-direction: column; gap: 1.25rem; }

.diary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), background 0.4s ease, box-shadow var(--transition);
}
.diary-card:hover { border-color: var(--gold-border); box-shadow: var(--shadow); }
.diary-card.is-open { border-color: var(--gold-border); }

/* Card Header */
.card-header {
  padding: 1.5rem 3.5rem 1.5rem 1.75rem;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background var(--transition);
}
.card-header:hover { background: var(--bg-card-hover); }

.card-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.card-date { font-family: 'EB Garamond', serif; font-size: 0.82rem; color: var(--gold); letter-spacing: 0.08em; }

.card-tag { font-size: 0.64rem; padding: 2px 8px; border: 1px solid var(--border-subtle); border-radius: 20px; color: var(--text-muted); letter-spacing: 0.06em; }
.card-tag.wine { border-color: var(--wine-border); color: var(--wine-pink); background: var(--wine-bg); }

.card-title-row { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }

.card-restaurant {
  font-family: var(--font-jp);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.04em;
  transition: color 0.4s ease;
}
.card-restaurant-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85em;
  font-style: italic;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.card-location { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.06em; }
.card-summary { font-size: 0.83rem; color: var(--text-body); line-height: 1.7; max-width: 640px; }

.card-toggle-icon { position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); }
.toggle-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.2rem; line-height: 1;
  transition: transform var(--transition), background var(--transition);
}
.is-open .toggle-icon { transform: rotate(45deg); background: var(--gold-pale); }

/* Card Body */
.card-body { display: none; border-top: 1px solid var(--border-subtle); }
.is-open .card-body { display: block; }

/* Tabs */
.tab-bar {
  display: flex;
  padding: 0 1.75rem;
  background: rgba(0,0,0,0.06);
  border-bottom: 1px solid var(--border-subtle);
}
.theme-light .tab-bar { background: rgba(0,0,0,0.03); }

.tab-btn {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--cream); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Organized Content */
.organized-content { padding: 1.75rem; display: flex; flex-direction: column; gap: 1.75rem; }

.section-label-sm {
  font-family: 'EB Garamond', serif;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.75;
}

/* Table */
.table-wrapper { overflow-x: auto; }
.course-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }

.course-table th {
  font-family: 'EB Garamond', serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gold-border);
  white-space: nowrap;
}
.course-table td {
  padding: 0.6rem 0.75rem;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  line-height: 1.6;
  transition: color 0.4s ease;
}
.course-table tr:last-child td { border-bottom: none; }
.course-table tr:nth-child(even) td { background: var(--bg-table-alt); }

.highlight-row td {
  background: var(--gold-pale) !important;
  border-left: 2px solid var(--gold);
}

.td-num { font-family: 'EB Garamond', serif; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; letter-spacing: 0.04em; }
.pairing-cell { white-space: nowrap; }

.wine-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem;
  background: var(--wine-bg);
  border: 1px solid var(--wine-border);
  color: var(--wine-pink);
  padding: 2px 8px; border-radius: 20px;
  white-space: nowrap; letter-spacing: 0.04em;
}

/* Pairing highlight */
.pairing-card {
  display: flex; gap: 1rem;
  background: var(--gold-pale);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
}
.pairing-icon { color: var(--gold); font-size: 0.75rem; flex-shrink: 0; margin-top: 0.15rem; }
.pairing-combo { font-size: 0.85rem; color: var(--cream); margin-bottom: 0.35rem; }
.pairing-note { font-size: 0.8rem; color: var(--text-body); line-height: 1.7; }

/* Wine Intro */
.wine-intro {
  background: var(--bg-wine-intro);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  line-height: 1.8;
}

/* Uchida Note */
.uchida-note {
  background: var(--bg-wine-intro);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
}
.uchida-note ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.uchida-note ul li { font-size: 0.82rem; color: var(--text-body); padding-left: 1.1rem; position: relative; line-height: 1.7; }
.uchida-note ul li::before { content: '✦'; position: absolute; left: 0; color: var(--gold); font-size: 0.5rem; top: 0.45rem; }

/* Original Text */
.original-text { padding: 1.75rem; }
.original-note { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-bottom: 1rem; }


/* ============================================
   FOOTER
   ============================================ */
.site-footer { border-top: 1px solid var(--border); padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem); text-align: center; }
.footer-inner { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
.footer-logo { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-jp); font-size: 0.9rem; font-weight: 300; color: var(--cream); letter-spacing: 0.08em; }
.footer-logo .logo-fleur { font-size: 0.5rem; color: var(--gold); }
.footer-note { font-size: 0.75rem; color: var(--text-muted); line-height: 1.7; }
.footer-copy { font-size: 0.7rem; color: var(--text-subtle); letter-spacing: 0.06em; }


/* ============================================
   RESPONSIVE
   ============================================ */
/* 中間幅: ヘッダー内の余白を詰めてナビを1行に収める */
@media (max-width: 1440px) {
  .header-inner { gap: 0.75rem; }
}

@media (max-width: 1200px) {
  .site-nav { display: none; }
}

@media (max-width: 860px) {
  .logo-sub { display: none; }
  .card-restaurant-en { display: none; }
}

@media (max-width: 600px) {
  /* ヘッダーは1段68px固定に圧縮（.mobile-nav の top:68px と整合させる） */
  .site-header { padding: 0 0.75rem; }
  .header-inner { height: 68px; gap: 0.5rem; flex-wrap: nowrap; }
  .logo-fleur { display: none; }
  .logo-main { font-size: 0.9rem; }
  .header-controls { gap: 0.35rem; }
  .hero-subtitle br { display: none; }
  .hero-stats { flex-direction: column; gap: 0.75rem; padding: 0.75rem 1.5rem; }
  .stat-divider { display: none; }
  .ctrl-btn { padding: 0.3rem 0.6rem; }
  .ctrl-label { display: none; }
}


/* ============================================
   ハンバーガーボタン & モバイルナビ
   ============================================ */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.hamburger-btn:hover {
  border-color: var(--gold-border);
  background: var(--gold-pale);
}
.hamburger-btn span {
  display: block;
  width: 14px;
  height: 1px;
  background: var(--text-muted);
  border-radius: 1px;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}
.hamburger-btn.is-open { border-color: var(--gold-border); }
.hamburger-btn.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); background: var(--gold); }
.hamburger-btn.is-open span:nth-child(2) { opacity: 0; }
.hamburger-btn.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); background: var(--gold); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 68px;
  left: 0; right: 0;
  z-index: 90;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gold-border);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease, background 0.4s ease;
}
.mobile-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.mobile-nav-inner { display: flex; flex-direction: column; padding: 0.5rem 0 0.75rem; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-jp);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-body);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.mobile-nav-link.active { color: var(--gold); border-left-color: var(--gold); }
.mobile-nav-link:hover:not(.disabled) { color: var(--cream); background: var(--gold-pale); }
.mobile-nav-link.disabled { opacity: 0.45; pointer-events: none; }
.mobile-nav-link .badge { font-size: 0.6rem; }

/* ============================================
   DROPDOWN NAV — 食録サブメニュー
   ============================================ */
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-jp);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-muted);
  padding: 0.35rem;
  border-radius: var(--radius);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-dropdown-trigger:hover { color: var(--cream); }
.nav-dropdown-trigger.active { color: var(--gold); }
.nav-dd-arrow {
  font-size: 0.55rem;
  opacity: 0.55;
  transition: transform 0.2s ease;
  line-height: 1;
}
.nav-item:hover .nav-dd-arrow,
.nav-item.open .nav-dd-arrow { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 160px;
  background: var(--bg-header);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 200;
  backdrop-filter: blur(16px);
}
.nav-item:hover .nav-dropdown,
.nav-item.open .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: block;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-jp);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-item:hover { color: var(--cream); background: rgba(255,255,255,0.04); }
.nav-dropdown-item.active { color: var(--gold); }

/* Mobile nav — 食録サブメニュー */
.mobile-nav-section-label {
  padding: 0.65rem 1.5rem 0.3rem;
  font-family: 'EB Garamond', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
}
.mobile-nav-sub {
  padding-left: 2.5rem;
  font-size: 0.85rem;
}
.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 1.5rem;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.mobile-nav-overlay.is-open { opacity: 1; pointer-events: auto; }

@media (max-width: 1200px) {
  .hamburger-btn { display: flex; }
  .mobile-nav { display: block; }
  .mobile-nav-overlay { display: block; }
}

/* ============================================
   モバイル テーブル — スタック表示 (≤760px)
   ============================================ */
@media (max-width: 760px) {
  /* organized領域のパディングを縮小 */
  .organized-content { padding: 1rem; gap: 1.25rem; }
  .section-label-sm { font-size: 0.6rem; }

  /* テーブルをラップなし・カード列に変換 */
  .table-wrapper { overflow-x: visible; }
  .course-table { font-size: 0.8rem; display: block; width: 100%; }
  .course-table tbody { display: block; }

  /* ヘッダー行を非表示 */
  .course-table thead { display: none; }

  /* tbody の各行をカードに */
  .course-table tbody tr {
    display: block;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.45rem;
    background: var(--bg-card);
  }
  /* 交互背景 */
  .course-table tbody tr:nth-child(even) { background: var(--bg-table-alt); }

  /* ハイライト行（★ペアリング等）*/
  .course-table .highlight-row {
    border-color: var(--gold-border) !important;
    border-left: 3px solid var(--gold) !important;
    background: var(--gold-pale) !important;
  }

  /* 各セルをブロックに */
  .course-table td {
    display: block;
    border: none !important;
    padding: 0.05rem 0;
    background: transparent !important;
    line-height: 1.5;
  }

  /* ① カテゴリラベル（#列）— ゴールドの小見出し */
  .course-table .td-num {
    font-size: 0.62rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    opacity: 0.85;
    margin-bottom: 0.1rem;
    white-space: normal;
  }

  /* ② 料理名 — クリームで大きめ */
  .course-table td:nth-child(2) {
    font-size: 0.85rem;
    color: var(--cream);
    font-weight: 400;
    line-height: 1.55;
  }

  /* ③ 素材・特記 — 小さく・ミュート */
  .course-table td:nth-child(3) {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
  }

  /* ④ ペアリング */
  .course-table td:nth-child(4) { margin-top: 0.2rem; }

  /* 「—」だけのセルは JS で .is-dash を付与して非表示 */
  .course-table .is-dash { display: none !important; }

  /* wine-badge を少し小さく・折り返し可能に */
  .course-table .pairing-cell { white-space: normal; }
  .course-table .wine-badge { font-size: 0.68rem; padding: 1px 6px; }
  .wine-badge { white-space: normal; flex-wrap: wrap; height: auto; }

  /* pairing-card（ペアリング解説）を縦並びに */
  .pairing-card { flex-direction: column; gap: 0.5rem; padding: 0.85rem 1rem; }

  /* カード内のpaddingも縮小 */
  .uchida-note { padding: 0.85rem 1rem; }
  .wine-intro { padding: 0.85rem 1rem; }
}


/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.diary-card { animation: fadeSlideIn 0.5s ease both; }
.diary-card:nth-child(1) { animation-delay: 0.05s; }
.diary-card:nth-child(2) { animation-delay: 0.12s; }
.diary-card:nth-child(3) { animation-delay: 0.19s; }
.diary-card:nth-child(4) { animation-delay: 0.26s; }
.diary-card:nth-child(5) { animation-delay: 0.33s; }
.diary-card:nth-child(6) { animation-delay: 0.40s; }
.diary-card:nth-child(7) { animation-delay: 0.47s; }
.diary-card:nth-child(8) { animation-delay: 0.54s; }
.diary-card:nth-child(9) { animation-delay: 0.61s; }

/* ===============================================
   (1) 印刷スタイル
   =============================================== */
@media print {
  body {
    background: white;
    color: black;
  }

  header, footer, aside, nav, .hamburger-btn, .site-nav, .mobile-nav {
    display: none !important;
  }

  .diary-card .card-body,
  .accordion-body,
  .collapse {
    display: block !important;
  }

  a:not([href^="#"]):not([href^="/"]):not([href^="."]) {
    color: black;
  }

  a:not([href^="#"]):not([href^="/"]):not([href^="."])::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #666;
  }

  .rest-card, .rcp-card {
    page-break-inside: avoid;
  }

  body {
    font-size: 11pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

  .main-content {
    margin: 0;
    padding: 1in;
  }
}

/* ===============================================
   (2) スキップリンク
   =============================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--bg-base);
  padding: 8px 12px;
  z-index: 1000;
  text-decoration: none;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
}

/* ===============================================
   (3) フォーカス可視化 (WCAG AA対応)
   =============================================== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===============================================
   (4) 動きの削減設定
   =============================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===============================================
   (5) スクリーンリーダー専用クラス
   =============================================== */
.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}
