:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #e0e4ea;
  --text: #263238;
  --muted: #78909c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.site-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.site-header h1 { margin: 0; font-size: 1.4rem; }

.container { max-width: 1080px; margin: 24px auto; padding: 0 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

h2 { font-size: 1.15rem; margin: 0 0 12px; }

/* ---- トップエリア ---- */
.top-area { margin-bottom: 28px; }
.top-area__header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 16px;
}
.top-area__header h2 { margin: 0; }

.info-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 0;
}
.info-grid dt { color: var(--muted); font-weight: 600; }
.info-grid dd { margin: 0; }
.name-list { margin: 0; padding-left: 18px; }
.updated { color: var(--muted); font-size: .85rem; margin: 12px 0 0; text-align: right; }

/* ---- フォーム ---- */
.reg-form { margin-top: 18px; border-top: 1px dashed var(--border); padding-top: 18px; }
.field { margin-bottom: 14px; display: flex; flex-direction: column; }
.field label { font-weight: 600; margin-bottom: 4px; font-size: .9rem; }
.field input[type=text], .field textarea, .field input[type=file] {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: .95rem; font-family: inherit;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21, 101, 192, .12);
}
.hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.form-actions { display: flex; gap: 10px; }

.btn {
  border: none; border-radius: 8px; padding: 9px 18px; font-size: .9rem;
  cursor: pointer; font-family: inherit; transition: background .15s, opacity .15s;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: #eceff1; color: var(--text); }
.btn--ghost:hover { background: #dde3e7; }

/* ---- 写真コーナー ---- */
.photos-area h2 { border-bottom: 2px solid var(--primary); padding-bottom: 8px; }
.lead { color: var(--muted); font-size: .9rem; }
code { background: #eceff1; padding: 1px 6px; border-radius: 4px; font-size: .85em; }

.activity {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 12px; overflow: hidden;
}
.activity__link {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: none; border: none; padding: 14px 18px; cursor: pointer;
  font-size: 1.02rem; font-family: inherit; color: var(--text); text-align: left;
}
.activity__link:hover { background: #f5f8fc; }
.chevron { transition: transform .2s; color: var(--primary); font-size: .8rem; }
.activity__link[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.activity__name { flex: 1; font-weight: 600; }
.activity__count { color: var(--muted); font-size: .82rem; }

.activity__gallery { padding: 0 18px 18px; }
.gallery-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.thumb {
  display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.thumb:hover img { transform: scale(1.05); }
.empty { color: var(--muted); }

.site-footer {
  text-align: center; color: var(--muted); font-size: .85rem;
  padding: 24px 0; margin-top: 20px;
}

/* ---- 写真拡大ライトボックス ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, .88);
  display: flex; align-items: center; justify-content: center;
}
/* 通常モード（非プレビュー時）は非表示。初期表示・✖ボタンでの終了に必要 */
.lightbox[hidden] { display: none; }
.lb-stage {
  flex: 1; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 12px;
}
.lb-image {
  max-width: 90vw; max-height: 82vh;
  object-fit: contain; border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
.lb-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; color: #fff;
  font-size: 2.2rem; line-height: 1; cursor: pointer; opacity: .8;
}
.lb-close:hover { opacity: 1; }
.lb-nav {
  flex: 0 0 auto; z-index: 1;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: none; cursor: pointer;
  width: 56px; height: 56px; margin: 0 10px;
  border-radius: 50%; font-size: 2rem; line-height: 1;
  transition: background .15s;
}
.lb-nav:hover { background: rgba(255, 255, 255, .28); }
.lb-toolbar {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  background: rgba(0, 0, 0, .45); padding: 8px 16px; border-radius: 999px;
}
.lb-counter { color: #fff; font-size: .9rem; min-width: 54px; text-align: center; }
#lb-play.is-playing { background: var(--primary); color: #fff; }
