@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;600;700&family=Noto+Sans+JP:wght@300;400;500&display=swap');

:root {
  --bg: #f4f1eb;
  --bg-dark: #1a1714;
  --text: #1e1a17;
  --text-muted: #5c5650;
  --accent: #6b1a2c;
  --accent-light: #9a2a40;
  --gold: #8a6c3a;
  --border: #c8bfb0;
  --border-light: #ddd8ce;
  --header-bg: #1a1714;
  --header-text: #e8e2d8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== HEADER ========== */
header {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 2px solid var(--accent);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  border-bottom: 1px solid #333;
  font-size: 12px;
  color: #888;
  letter-spacing: 0.05em;
}

.header-main {
  padding: 20px 40px 18px;
}

.museum-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #888;
  margin-bottom: 4px;
}

.site-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--header-text);
  line-height: 1.3;
}

.site-subtitle {
  font-size: 12px;
  color: #888;
  letter-spacing: 0.15em;
  margin-top: 4px;
}

nav {
  background: #111;
  padding: 0 40px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

nav ul li a {
  display: block;
  padding: 14px 20px;
  font-size: 13px;
  color: #ccc;
  letter-spacing: 0.08em;
  border-right: 1px solid #2a2a2a;
  transition: background 0.2s, color 0.2s;
}

nav ul li:first-child a { border-left: 1px solid #2a2a2a; }

nav ul li a:hover,
nav ul li a.active {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ========== MAIN LAYOUT ========== */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 40px 80px;
}

/* ========== WARNING BANNER ========== */
.warning-banner {
  background: #fff8f0;
  border: 1px solid #c8882a;
  border-left: 4px solid #c8882a;
  padding: 16px 20px;
  margin-bottom: 40px;
  font-size: 13px;
  color: #5a3a10;
  line-height: 1.7;
}

.warning-banner strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #8a4a00;
}

/* ========== HERO ========== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
  align-items: center;
}

.hero-text h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}

.hero-text .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.hero-text p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-image {
  background: var(--bg-dark);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #555;
  font-size: 12px;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #1a1714 0%, #0d0b09 50%, #1a1714 100%);
}

.cam-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
}

/* ========== SECTION TITLES ========== */
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-title span.en {
  font-size: 11px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

/* ========== NEWS ========== */
.news-list {
  list-style: none;
  margin-bottom: 60px;
}

.news-list li {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  align-items: baseline;
}

.news-list li:first-child { border-top: 1px solid var(--border-light); }

.news-date {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  min-width: 90px;
}

.news-category {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ========== CTA CARDS ========== */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 60px;
}

.cta-card {
  border: 1px solid var(--border);
  padding: 28px;
  display: block;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cta-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(107,26,44,0.1);
  text-decoration: none;
}

.cta-card h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.cta-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.cta-card .arrow {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ========== FOOTER ========== */
footer {
  background: var(--header-bg);
  color: #666;
  padding: 40px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-align: center;
  margin-top: 0;
}

footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

footer p { margin-bottom: 6px; }

/* ========== EXHIBITION PAGE ========== */
.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 60px;
}

.artifact-thumb {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
  background: #fff;
}

.artifact-thumb:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-decoration: none;
}

.artifact-thumb-img {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.artifact-thumb-img canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.artifact-cam-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 9px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.1em;
  background: rgba(0,0,0,0.5);
  padding: 2px 5px;
}

.artifact-thumb-info {
  padding: 10px 12px;
}

.artifact-thumb-info .num {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.artifact-thumb-info .name {
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  line-height: 1.4;
}

.artifact-thumb-info .origin {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== ARTIFACT DETAIL PAGE ========== */
.artifact-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.camera-viewer {
  position: relative;
  background: #000;
  aspect-ratio: 4/3;
  overflow: hidden;
}

#artifactCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

#staticCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.cam-ui {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}

.cam-rec {
  position: absolute;
  top: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.1em;
  font-family: monospace;
}

.cam-rec .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #e02020;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cam-timestamp {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  font-family: monospace;
  letter-spacing: 0.05em;
}

.cam-channel {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  font-family: monospace;
}

.scanlines {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
}

.cam-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--border);
  line-height: 1.6;
}

.artifact-info h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}

.artifact-info .artifact-id {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.artifact-meta {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  margin-bottom: 24px;
}

.artifact-meta dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 12px;
}

.artifact-meta dt {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.artifact-meta dd {
  font-size: 13px;
}

.artifact-description {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-line;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.back-link:hover { color: var(--accent); }

/* ========== FLOOR MAP ========== */
.floormap-container {
  background: #fff;
  border: 1px solid var(--border);
  padding: 30px;
  margin-bottom: 30px;
}

.floormap-container svg {
  width: 100%;
  height: auto;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-box {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  main { padding: 30px 20px 60px; }
  nav { padding: 0 20px; }
  .header-top, .header-main { padding-left: 20px; padding-right: 20px; }
  .hero { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .artifact-grid { grid-template-columns: repeat(2, 1fr); }
  .artifact-detail { grid-template-columns: 1fr; }
}
