/* detail.css */

/* ===== DETAIL HERO ===== */
.detail-hero {
  position: relative;
  height: 70vh;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: 60px;
}

.detail-hero-img-wrap {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.detail-hero-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg3) 100%);
}

.detail-hero-icon { font-size: 6rem; opacity: 0.3; }

.detail-hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 20%,
    rgba(0,0,0,0.3) 60%,
    rgba(0,0,0,0.85) 100%
  );
}

[data-theme="light"] .detail-hero-overlay {
  background: linear-gradient(
    to bottom,
    transparent 20%,
    rgba(0,0,0,0.15) 60%,
    rgba(0,0,0,0.6) 100%
  );
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.back-link:hover { color: #fff; }

.detail-badge {
  display: inline-block;
  background: var(--accent2);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.9rem;
  margin-bottom: 0.8rem;
}

.detail-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.detail-location {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
}

/* ===== GALLERY STRIP ===== */
.detail-gallery-strip {
  display: flex;
  gap: 0.5rem;
  height: 140px;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.strip-img {
  flex: 0 0 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 0.75rem;
}

.strip-img:hover, .strip-img.active {
  border-color: var(--accent);
  opacity: 1;
}

.strip-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== LAYOUT ===== */
.detail-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

/* ===== MAIN ===== */
.detail-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.detail-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.detail-desc {
  color: var(--text2);
  line-height: 1.9;
  font-size: 1rem;
}

/* ===== WIKIPEDIA ===== */
.wiki-excerpt {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text2);
  line-height: 1.8;
  font-size: 0.95rem;
}

.wiki-loading { color: var(--text3); font-style: italic; }

.wiki-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.wiki-link:hover { opacity: 0.7; }

/* ===== MAP ===== */
.detail-map-wrap {
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.detail-map {
  width: 100%;
  height: 320px;
  border: none;
  display: block;
  filter: grayscale(0.3) sepia(0.2);
}

[data-theme="light"] .detail-map { filter: none; }

.map-credit {
  font-size: 0.72rem;
  color: var(--text3);
  text-align: right;
}

/* ===== SIDEBAR ===== */
.detail-sidebar { position: sticky; top: 80px; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.info-list {
  display: grid;
  gap: 0.8rem;
}

.info-list dt {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 0.1rem;
}

.info-list dd {
  font-size: 0.9rem;
  color: var(--text);
}

.caution-list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.caution-list li {
  font-size: 0.85rem;
  color: var(--text2);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.caution-list li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  font-size: 0.75rem;
  color: var(--accent);
}

/* ===== RELATED ===== */
.related-list {
  display: grid;
  gap: 0.8rem;
}

.related-item {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  text-decoration: none;
  padding: 0.6rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.related-item:hover {
  border-color: var(--accent);
  background: var(--surface2);
}

.related-thumb {
  width: 56px; height: 44px;
  background: var(--bg3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  overflow: hidden;
}

.related-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.related-name {
  font-size: 0.85rem;
  color: var(--text);
  font-family: var(--font-heading);
  line-height: 1.3;
}

.related-loc {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 0.15rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  margin-top: 60px;
}
.breadcrumb-inner { max-width:1200px; margin:0 auto; padding:0.6rem 2rem; }
.breadcrumb { list-style:none; display:flex; align-items:center; gap:0.5rem; font-size:0.78rem; flex-wrap:wrap; }
.breadcrumb li { display:flex; align-items:center; gap:0.5rem; }
.breadcrumb li::after { content:'›'; color:var(--text3); }
.breadcrumb li:last-child::after { content:''; }
.breadcrumb a { color:var(--text2); text-decoration:none; transition:color 0.2s; }
.breadcrumb a:hover { color:var(--accent); }
.breadcrumb li:last-child span { color:var(--text3); }

/* ===== TAGS ===== */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem 0;
}

.detail-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.7rem;
}

/* ===== SHINREI BOX ===== */
.shinrei-box {
  background: rgba(192,57,43,0.08);
  border-left: 3px solid var(--danger);
  padding: 1.2rem 1.5rem;
  color: var(--text2);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ===== DANGER STARS SIDEBAR ===== */
.danger-stars-big {
  color: var(--accent2);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

/* ===== DETAIL HERO — breadcrumb でずれ補正 ===== */
.detail-hero { margin-top: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
  }
}
