html { scroll-behavior: smooth; }
:root {
  --primary-color: #8E7D68;
  --bg-color: #FDFBF7;
  --text-color: #4A4A4A;
  --accent-color: #D4AF37;
}

body { margin: 0; padding: 0; font-family: 'Noto Serif JP', serif; background-color: var(--bg-color); color: var(--text-color);
  line-height: 1.8; }
.hero { height: 60vh; background-color: #ddd; display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero h1 { font-family: 'Dancing Script', cursive; font-size: 3rem; margin-bottom: 0.5rem;
}
  
main { padding: 2rem 1rem; max-width: 900px; margin: 0 auto; }
.content-block { margin-bottom: 4rem;
  text-align: center; }
  
h2 { font-family: 'Dancing Script', cursive; font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--primary-color); display: inline-block; padding-bottom: 0.5rem; }

/* --- 検索ボックス --- */
.search-container { margin-bottom: 2rem;
}
.search-input { width: 80%; max-width: 400px; padding: 12px 15px; font-size: 1rem; border: 1px solid #ccc; border-radius: 4px;
  text-align: center; outline: none; transition: 0.3s; }
.search-input:focus { border-color: var(--primary-color); }
.note { font-size: 0.9rem; color: #777;
  margin-bottom: 1rem; }

/* --- 会場マップ (Seating Chart) --- */
.venue-container {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  overflow-x: auto;
  /* 横スクロール対応 */
}

/* 配置制御用ラッパー */
.venue-content {
  display: inline-flex;
  flex-direction: column;
  align-items: center; 
  min-width: 100%;
  padding: 3rem 1rem;
  box-sizing: border-box;
}

/* 高砂 */
.main-table {
  margin: 0 0 4rem 0;
  width: 200px;
  padding: 1rem;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
}
.main-table .table-label { display: block; font-size: 0.8rem;
  letter-spacing: 0.1em; opacity: 0.8; }
.main-table .couple-names { font-family: 'Dancing Script', cursive; font-size: 1.5rem;
}

/* 行レイアウト */
.venue-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  min-width: max-content;
  padding: 0 1rem;
}

/* テーブル個票 */
.table-group {
  width: 240px;
  height: 240px;
  position: relative;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  border-radius: 50%;
  flex-shrink: 0;
}

/* テーブル（中央） */
.table-circle {
  width: 60px;
  height: 60px; 
  background-color: #f0ece6;
  border: 2px solid var(--primary-color); 
  border-radius: 50%; 
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.table-name { font-family: 'Dancing Script', cursive; font-size: 1.5rem; color: var(--primary-color); font-weight: bold;
}

/* 座席（円周配置） */
.seat {
  position: absolute;
  width: 80px;
  text-align: center;
  transform: translate(-50%, -50%); 
  z-index: 3;
  pointer-events: none; 
}

/* 椅子のアイコン的表現 */
.seat::before {
  content: '';
  display: block;
  width: 12px; height: 12px;
  background-color: #ddd;
  border-radius: 50%;
  margin: 0 auto 4px auto;
  border: 1px solid #bbb;
}

/* 肩書 */
.guest-title {
  display: block;
  font-size: 0.6rem;
  color: var(--primary-color);
  margin-bottom: 2px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ゲスト名 */
.guest-name { 
  display: block;
  font-size: 0.75rem; 
  color: #555; 
  line-height: 1.1;
  white-space: nowrap; 
  overflow: visible;
}

/* ハイライト効果 (テーブル) */
.table-group.highlight { background-color: #fffbf0;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5); border: 1px solid var(--accent-color); z-index: 10;
}
.table-group.highlight .table-circle { background-color: var(--accent-color); border-color: var(--accent-color); }
.table-group.highlight .table-name { color: #fff;
}
.table-group.highlight .guest-name { color: #555;
}

/* ハイライト効果 (座席ピンポイント) */
.seat.highlight-seat {
  transform: translate(-50%, -50%) scale(1.4);
  z-index: 20;
}
.seat.highlight-seat::before {
  background-color: var(--accent-color);
  border-color: #b89726;
  box-shadow: 0 0 8px var(--accent-color);
}
.seat.highlight-seat .guest-name {
  font-weight: bold;
  color: #000;
}

.table-group.dimmed { opacity: 0.2; filter: grayscale(100%);
}

/* --- ドリンクメニュー (共通) --- */
.menu-list { list-style: none; padding: 0; text-align: left;
}
.menu-item { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px dotted #ccc; }
.menu-category { font-size: 0.8rem; color: var(--primary-color);
  text-transform: uppercase; }
.menu-name { margin: 0.2rem 0; font-size: 1.2rem; }
.menu-desc { margin: 0; font-size: 0.9rem;
  color: #777; }

/* --- ギャラリー --- */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 0 0.5rem;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  background: #fff;
  padding: 0.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.gallery-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1; 
  background-color: #f0f0f0;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  color: transparent; 
  overflow: hidden;
  font-size: 0;
}
.gallery-img:-moz-broken { opacity: 0; }
.gallery-img:not([src]) { visibility: hidden;
}
.gallery-caption {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.5rem;
  text-align: center;
}

.loading { color: #999; font-style: italic; }
.error { color: #d9534f;
}

/* --- モバイル最適化 --- */
@media screen and (max-width: 768px) {
  :root { font-size: 14px;
  }
  .hero { height: 40vh; min-height: 250px;
  }
  .hero h1 { font-size: 2.0rem; }
  h2 { font-size: 1.6rem;
  }

  .venue-container {
    width: 100%;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
  }

  .venue-content {
    zoom: 0.55;
    width: auto;
    margin: 0;
  }

  .venue-row {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;
  }
  
  .table-group {
    margin: 0 10px;
  }

  .search-input { font-size: 16px; width: 90%;
  }
  
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* --- カスタムオートコンプリート --- */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px; 
  margin: 0 auto;
}

.autocomplete-items {
  position: absolute;
  border: 1px solid #ddd;
  border-top: none;
  z-index: 99;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
}

.autocomplete-item {
  padding: 12px 15px;
  cursor: pointer;
  background-color: #fff;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px; 
}

.autocomplete-item:hover {
  background-color: #f9f9f9;
}

.autocomplete-item strong {
  color: var(--primary-color);
  font-weight: bold;
}

.search-result-text {
  margin-top: 1rem;
  font-family: 'Noto Serif JP', serif;
  font-weight: bold;
  font-size: 1.1rem; 
  color: var(--primary-color);
  min-height: 2.5rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}
.found-table-name {
  font-family: 'Noto Serif JP', serif;
  font-weight: bold;
  font-size: 2rem;
  color: var(--accent-color);
  margin-left: 0.5rem;
}

/* --- ハンバーガーメニュー --- */
.nav-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: background-color 0.3s;
}
.nav-toggle:hover { opacity: 0.9;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: #fff;
  margin: 3px 0;
  transition: all 0.3s ease;
}

.nav-toggle.active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 6px);
}
.nav-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle.active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px);
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(253, 251, 247, 0.98); 
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-list {
  list-style: none;
  padding: 0;
  text-align: center;
}
.nav-item { margin: 1.5rem 0; }
.nav-link {
  font-family: 'Dancing Script', cursive;
  font-size: 2.2rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.nav-link:hover { color: var(--accent-color); }

.nav-jp {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
  opacity: 0.8;
  font-weight: normal;
}

/* --- プロフィール --- */
.profile-wrapper {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap; 
}
.profile-card {
  background: #fff;
  width: 100%;
  max-width: 350px;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  text-align: center;
  box-sizing: border-box;
}
.profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid #f0ece6;
}
.profile-img-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #f0ece6;
  color: var(--primary-color);
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  line-height: 100px;
  margin: 0 auto 1rem auto;
}
.profile-role {
  display: block;
  font-size: 0.8rem;
  color: var(--accent-color);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.profile-name-jp {
  font-size: 1.4rem;
  margin: 0;
  color: var(--text-color);
}
.profile-name-en {
  font-family: 'Dancing Script', cursive;
  font-size: 1.2rem;
  color: #999;
  margin: 0 0 1.5rem 0;
}
.profile-message {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.profile-qa {
  text-align: left;
  background-color: #fafafa;
  padding: 1rem;
  border-radius: 6px;
}
.profile-qa dt {
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: bold;
  margin-bottom: 0.2rem;
}
.profile-qa dd {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  padding-left: 0.5rem;
  border-left: 2px solid #eee;
}
.profile-qa dd:last-child { margin-bottom: 0;
}

/* --- ゲストブック --- */
.guestbook-form-container {
  margin-bottom: 2rem;
  text-align: center;
}
.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: 'Noto Serif JP', serif;
  transition: 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn-primary:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.form-wrapper {
  margin-top: 1.5rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.4s ease;
  overflow: hidden;
}
.form-wrapper.hidden {
  display: none;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  box-sizing: border-box;
}
.form-textarea { height: 80px; resize: vertical;
}

.file-input-wrapper {
  margin-bottom: 1.5rem;
  text-align: center;
}
.file-input-hidden { display: none;
}
.file-label {
  display: inline-block;
  padding: 8px 16px;
  background-color: #f0ece6;
  color: var(--text-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.preview-area { margin-top: 10px; }
.img-preview { max-width: 100%; max-height: 200px; border-radius: 4px;
}

.btn-submit {
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 40px;
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}
.btn-submit:disabled { background-color: #ccc; cursor: not-allowed;
}

.status-text { margin-top: 10px; font-size: 0.9rem; min-height: 1.5em; }
.status-text.error { color: #d9534f;
}

/* タイムライン表示 */
.timeline-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}
.gb-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: relative;
}
/* 吹き出しのしっぽ */
.gb-card::after {
  content: '';
  position: absolute;
  top: 20px;
  left: -10px;
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

.gb-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
  border-bottom: 1px dashed #eee;
  padding-bottom: 0.5rem;
}
.gb-name { font-weight: bold; color: var(--primary-color); font-size: 1.1rem;
}
.gb-time { font-size: 0.8rem; color: #999; }

.gb-message { margin: 0; line-height: 1.6; color: #444;
  word-break: break-all; }

.gb-image-wrapper { margin-top: 1rem; border-radius: 4px; overflow: hidden; }
.gb-image { width: 100%;
  display: block; height: auto; }

/* --- オープニングローディング画面 --- */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  z-index: 9999; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 1.5s ease, visibility 1.5s ease;
}

#loading-overlay.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-text {
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  color: var(--primary-color); 
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInText 2s ease forwards;
}

.loader-date {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  color: var(--accent-color);
  letter-spacing: 0.2em;
  opacity: 0;
  animation: fadeInText 2s ease 0.5s forwards;
}

.loader-spinner {
  margin-top: 2rem;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  opacity: 0;
  animation: spin 1s linear infinite, fadeInOnly 1s ease 1s forwards;
}

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0);
  }
}

@keyframes fadeInOnly {
  from { opacity: 0; }
  to { opacity: 1;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}