/*
  File: /assets/styles.css
  Wedding-like palette, elegant typography, responsive timetable.
  v2: stronger wedding aesthetic, floral dividers, ribbon badges, light texture.
*/
:root {
  --bg: #fffcfb;
  --paper: #ffffff;
  --ink: #2b2323;
  --muted: #736a6a;
  --blush: #f7e9ee;
  --rose: #efd3da;
  --pearl: #fff7fb;
  --gold: #c4a469;
  --gold-deep: #ac8b4c;
  --shadow: rgba(0,0,0,.06);
  --radius: 20px;
  --radius-lg: 28px;
  --gap: 22px;
}
* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: "Noto Sans JP", system-ui, -apple-system, Segoe UI, Roboto, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.65;
}
img { max-width: 100%; display: block }
a { color: var(--ink); text-decoration: none }

/* Subtle paper texture for sections */
.section--alt { background: linear-gradient(180deg, #fffafc, #fffefe); position: relative; }
.section--alt::before { content:""; position:absolute; inset:0; pointer-events:none; background-image: url('../images/decorations/bs1.png'); opacity:.03; mix-blend-mode:multiply; }

/* Ornaments */
.ornament { position: fixed; width: 30vmin; height: 30vmin; z-index: 0; pointer-events:none; filter: blur(20px); opacity: .22; }
.ornament--tl { top: -6vmin; left: -6vmin; background: radial-gradient(closest-side, var(--blush), transparent 70%); }
.ornament--tr { top: -6vmin; right: -6vmin; background: radial-gradient(closest-side, var(--rose), transparent 70%); }
.ornament--bl { bottom: -6vmin; left: -6vmin; background: radial-gradient(closest-side, var(--rose), transparent 70%); }
.ornament--br { bottom: -6vmin; right: -6vmin; background: radial-gradient(closest-side, var(--blush), transparent 70%); }

.site-header {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.78); backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__script { font-family: "Great Vibes", cursive; font-size: 30px; color: var(--gold); letter-spacing: .02em; }
.brand__serif { font-family: Marcellus, serif; letter-spacing: .12em; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; gap: 16px; }
.nav a { padding: 8px 10px; border-radius: 999px; }
.nav a:hover { background: var(--blush); }

.hero {
  position: relative; z-index: 1; padding: 108px 20px 84px; text-align: center;
}
.hero__inner { max-width: 980px; margin: 0 auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; color: var(--muted); font-size: 12px; text-shadow: 0 1px 2px rgba(255,255,255,0.8), 0 -1px 2px rgba(255,255,255,0.8); }
.hero__title { font-family: "Great Vibes", cursive; font-size: clamp(56px, 7.5vw, 110px); margin: 8px 0 6px; color: var(--ink); text-shadow: 0 2px 4px rgba(255,255,255,0.9), 0 -2px 4px rgba(255,255,255,0.9); }
.hero__subtitle { font-family: Marcellus, serif; letter-spacing: .08em; color: var(--muted); text-shadow: 0 1px 2px rgba(255,255,255,0.8), 0 -1px 2px rgba(255,255,255,0.8); }
.dot { opacity: .5 }
.hero__bg { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(1200px 600px at 50% -220px, var(--blush), transparent 60%),
  radial-gradient(1200px 600px at 100% 0%, var(--rose), transparent 50%),
  radial-gradient(800px 400px at 0% 20%, #fff5f7, transparent 50%),
  url('../images/hero/background.jpg') center/cover no-repeat;
  filter: saturate(1.05);
}

.hero__bg::before { content: ''; position: absolute; inset: 0; }

@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.05); }
}

/* Individual hero decorations with independent durations */
.hero-deco { position: absolute; z-index: 0; pointer-events: none; opacity: .22; animation-timing-function: ease-in-out; }
.hero-deco--bs1 { top: 18%; left: 10%; width: 60px; height: 60px; background: url('../images/decorations/bs1.png') center/contain no-repeat; animation-name: sparkle; animation-duration: 3.5s; animation-iteration-count: infinite; }
.hero-deco--bs2 { top: 30%; right: 15%; width: 40px; height: 80px; background: url('../images/decorations/bs2.png') center/contain no-repeat; animation-name: sparkle; animation-duration: 2.5s; animation-iteration-count: infinite; }
.hero-deco--bs3 { bottom: 15%; left: 20%; width: 70px; height: 70px; background: url('../images/decorations/bs3.png') center/contain no-repeat; animation-name: sparkle; animation-duration: 2.6s; animation-iteration-count: infinite; }
.hero-deco--carmo { bottom: 10%; right: 8%; width: 72px; height: 72px; background: url('../images/decorations/carmo_love.png') center/contain no-repeat; animation-name: sparkle; animation-duration: 4s; animation-iteration-count: infinite; }
.hero__cta { display: flex; gap: 12px; justify-content: center; margin: 20px 0 8px; }
.countdown { margin-top: 8px; color: var(--muted); font-family: Marcellus, serif; text-shadow: 0 1px 2px rgba(255,255,255,0.8), 0 -1px 2px rgba(255,255,255,0.8); }

.btn { border: 1px solid #ddd; padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; transition: transform .15s ease, box-shadow .2s ease; }
.btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--ghost { background: transparent; }
.btn--ribbon { position: relative; background: var(--gold); border-color: var(--gold-deep); color: #fff; }
.btn--ribbon::before, .btn--ribbon::after { content:""; position:absolute; top: 100%; width: 8px; height: 10px; background: var(--gold-deep); }
.btn--ribbon::before { left: 10px; transform: skewX(-22deg); }
.btn--ribbon::after { right: 10px; transform: skewX(22deg); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--shadow); }

.section { padding: 70px 20px; position: relative; }
.container { max-width: 1040px; margin: 0 auto; }
.section__title { font-family: Marcellus, serif; letter-spacing: .06em; font-size: 30px; margin: 0 0 16px; text-align: center; }
.lead { font-size: 18px; font-weight: 600; }

/* Floral divider */
.divider { display:grid; place-items:center; margin: 18px 0 28px; }
.divider svg { width: 220px; opacity: .6; }

.card { background: var(--paper); border: 1px solid #eee; border-radius: var(--radius); box-shadow: 0 8px 24px var(--shadow); }
.card__body { padding: 18px; }

.grid { display: grid; gap: var(--gap); }
.grid--2col { grid-template-columns: 1fr; }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 840px) {
  .grid--2col { grid-template-columns: 1.1fr .9fr; }
}

.list { margin: 0; padding-left: 18px; }

/* Timetable */
.filters { display: flex; gap: 16px; flex-wrap: wrap; justify-content:center; margin-bottom: 14px; color: var(--muted); }
.filter input { margin-right: 6px; }

.timetable { border: 1px solid #eee; border-radius: var(--radius-lg); overflow: visible; background: var(--paper); min-height: auto; }

/* Desktop Timetable Layout */
.row { 
  display: grid; 
  grid-template-columns: 90px 90px 2fr 3fr; 
  gap: 0; 
  align-items: center; 
  border-top: 1px solid #f0eaea; 
  min-height: 48px; 
}

/* デフォルトでデスクトップ行を表示 */
.desktop-row {
  display: grid;
}

.row:first-child { border-top: 0; }

.cell { 
  padding: 10px 14px; 
  display: flex; 
  align-items: center; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  line-height: 1.2; 
}

.cell--head { 
  background: linear-gradient(180deg, #fff, #fff7f9); 
  font-weight: 700; 
  font-size: 14px; 
  font-family: Marcellus, serif; 
  letter-spacing: .04em; 
}

.row:nth-child(even) .cell { background: #fffdfd; }

.badge { 
  display: inline-flex; 
  align-items: center; 
  gap: 4px; 
  padding: 3px 10px; 
  border-radius: 999px; 
  font-size: 11px; 
  border: 1px solid #eee; 
  position: relative; 
  white-space: nowrap; 
  margin-right: 6px; 
}

.badge--act { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge--transition { background: #fff; color: #333; }
.badge--ceremony { background: #fff; border-color: var(--gold); color: #6b4b1e; }
.badge--prepare { background: #f0f8ff; color: #1e40af; border-color: #3b82f6; }
.badge--other { background: #fff; color: #333; }

.note { color: var(--muted); font-size: 13px; }
.legend { display: flex; gap: 8px; justify-content:center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1px dashed #e6d8dd; }
.chip--act { background: #121212; color: #fff; border-color: #121212; }
.chip--transition { background: #fff; }
.chip--ceremony { border-color: var(--gold); }
.chip--prepare { background: #f0f8ff; border-color: #3b82f6; color: #1e40af; }

/* Band Cards */
.card-band { display: grid; grid-template-rows: 180px auto; border-radius: var(--radius); overflow: clip; border: 1px solid #eee; background: #fff; }
.card-band__img { background: linear-gradient(120deg, #fff3f6, #fdf1f6 60%, #fff); display: grid; place-items: center; }
.card-band__body { padding: 14px; text-align:center; }
.card-band__name { font-weight: 700; margin: 0 0 6px; }
.card-band__meta { color: var(--muted); font-size: 13px; }

/* Access */
.actions { display: flex; gap: 8px; margin-top: 8px; }
.mapwrap { aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; border: 1px solid #eee; box-shadow: 0 8px 24px var(--shadow); }
#mapFrame { width: 100%; height: 100%; border: 0 }

.details summary { cursor: pointer; font-weight: 600; }

/* Modal (band details + gallery) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal__panel { background: #fff; width: min(920px, 96vw); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal__head { display:flex; align-items:center; justify-content: space-between; padding: 14px 16px; border-bottom:1px solid #eee; background: linear-gradient(180deg,#fff,#fff7fb); }
.modal__title { font-weight:700; }
.modal__close { appearance:none; border:0; background:transparent; font-size: 24px; cursor: pointer; line-height: 1; padding: 6px 8px; }
.modal__body { display:grid; grid-template-columns: 1fr; gap: 14px; padding: 16px; }
.modal__desc { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.gallery img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; border:1px solid #eee; box-shadow: 0 8px 16px var(--shadow); }

/* Footer */
.site-footer { padding: 36px 20px; border-top: 1px solid #eee; background: #fff; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1040px; margin: 0 auto; }
.sns { display: flex; gap: 10px; }
.credits { text-align:center; color: var(--muted); font-size: 12px; margin-top: 10px; }

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
  .site-header {
    padding: 8px 16px;
    flex-wrap: wrap;
  }
  
  .brand__script {
    font-size: 24px;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    border-bottom: 1px solid #eee;
  }
  
  .nav.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
  }
  
  .hero {
    padding: 60px 16px 40px;
  }
  
  .hero__title {
    font-size: clamp(40px, 12vw, 80px);
    margin: 12px 0 8px;
  }
  
  .hero__cta {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 18px;
  }
  
  .section {
    padding: 40px 16px;
  }
  
  .timetable .mobile-row {
    grid-template-columns: 50px 1fr 1fr;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 6px;
    min-height: auto;
    align-items: center;
  }
  
  .timetable .desktop-row {
    display: none !important;
  }
  
  .timetable .row:first-child {
    display: none;
  }
  
  .timetable .cell {
    padding: 6px 8px;
    border-bottom: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 1.2;
    display: flex;
    align-items: center;
  }
  
  .timetable .cell:first-child::before {
    content: "";
  }
  
  .timetable .cell:nth-child(2)::before {
    content: "";
  }
  
  .timetable .cell:nth-child(3)::before {
    content: "";
  }
  
  .timetable .cell:nth-child(4)::before {
    content: "";
  }
  
  .timetable .badge {
    padding: 2px 6px;
    font-size: 10px;
    margin-right: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .grid--2col {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .grid--cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .card-band {
    grid-template-rows: 200px auto;
  }
  
  .modal__panel {
    width: 95vw;
    margin: 20px;
  }
  
  .modal__body {
    padding: 12px;
  }
  
  .gallery {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  /* モバイル: 画像のトリミングを抑え、縦長を許容 */
  .gallery img {
    height: auto;
    max-height: 70vh;
    object-fit: contain;
  }

  /* モバイル: モーダルが画面からはみ出さないように縦スクロールを許容 */
  .modal__panel {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }

  .modal__body {
    overflow: auto;
  }
  
  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .actions .btn {
    width: 100%;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
  
  .timetable .mobile-row {
    display: none !important;
  }
  
  .timetable .desktop-row {
    display: grid !important;
  }
}

/* Password Protection */
.password-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f6e7ea 0%, #fdf1f6 50%, #fff3f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: 'Noto Sans JP', sans-serif;
}

.password-container {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 400px;
  width: 90%;
  border: 2px solid #f0eaea;
}

.password-header h2 {
  color: var(--ink);
  font-family: 'Marcellus', serif;
  font-size: 28px;
  margin: 0 0 16px 0;
  letter-spacing: 0.05em;
}

.password-header p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 32px 0;
  line-height: 1.5;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.password-form input {
  padding: 16px 20px;
  border: 2px solid #e6d8dd;
  border-radius: 12px;
  font-size: 16px;
  font-family: 'Noto Sans JP', sans-serif;
  transition: border-color 0.3s ease;
}

.password-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 126, 0.1);
}

.password-form button {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--ink), #333);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.password-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.password-error {
  margin-top: 16px;
  padding: 12px;
  background: #fee;
  color: #c53030;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid #fecaca;
}

.main-content {
  min-height: 100vh;
}

/* Wedding Decorations */
.wedding-hearts {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  opacity: 0.1;
}

.heart {
  position: absolute;
  width: 20px;
  height: 18px;
  background: none;
  animation: float 6s ease-in-out infinite;
}

.heart:nth-child(2n) {
  animation-delay: -2s;
  animation-duration: 8s;
}

.heart:nth-child(3n) {
  animation-delay: -4s;
  animation-duration: 10s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.wedding-roses {
  position: absolute;
  width: 60px;
  height: 60px;
  background: url('../images/decorations/rose.png') center/cover;
  opacity: 0.15;
  border-radius: 50%;
  animation: rotate 20s linear infinite;
}

.rose-top-left {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.rose-top-right {
  top: 15%;
  right: 8%;
  animation-delay: -5s;
}

.rose-bottom-left {
  bottom: 20%;
  left: 10%;
  animation-delay: -10s;
}

.rose-bottom-right {
  bottom: 15%;
  right: 5%;
  animation-delay: -15s;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.wedding-ribbon {
  position: relative;
  overflow: hidden;
}

.wedding-ribbon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced Wedding Styling */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 182, 193, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 192, 203, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 218, 185, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.section__title::after {
  content: '💕';
  margin-left: 12px;
  font-size: 0.8em;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Utilities */
.hidden { display: none !important; }

/* Print-friendly */
@media print {
  .site-header, .hero__cta, .filters, .legend, .actions, .sns, .divider, .modal, .wedding-hearts, .wedding-roses { display: none !important; }
  .section { padding: 12px 0; }
  .row { grid-template-columns: 70px 70px 1fr 160px; }
}


