/* ============================================================
   ミニチュア東京 — style.css
   和モダン × 高級感 × チルトシフト写真美術館
   ============================================================ */

/* ── CSS Variables ── */
:root {
  --ink:      #1a1a18;       /* 墨色 */
  --ink-light:#2e2e2b;
  --cream:    #f5f0e8;       /* 生成り */
  --cream-2:  #ede7d9;
  --vermilion:#c8443c;       /* 朱 */
  --gold:     #b8963e;       /* 金 */
  --indigo:   #2a4f7c;       /* 藍 */
  --moss:     #8b7536;       /* 苔金 */
  --purple:   #5c3b6b;       /* 紫 */
  --white:    #ffffff;
  --gray:     #888880;

  --font-serif: 'Noto Serif JP', serif;
  --font-sans:  'Noto Sans JP', sans-serif;

  --radius:   4px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow:   0 8px 40px rgba(26,26,24,0.18);
  --shadow-lg:0 20px 60px rgba(26,26,24,0.30);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-serif);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  cursor: none;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: none; border: none; background: none; font-family: inherit; }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Scroll Progress Bar ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--vermilion), var(--gold));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Custom Cursor (PC) ── */
#cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
}
.cursor-dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--vermilion);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.2s;
}
.cursor-ring {
  position: absolute;
  width: 32px; height: 32px;
  border: 1.5px solid var(--vermilion);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  transition: transform 0.25s ease, width 0.3s, height 0.3s, opacity 0.2s;
}
body.cursor-hover .cursor-ring {
  width: 52px; height: 52px;
  opacity: 0.8;
}
@media (hover: none) { #cursor { display: none; } body { cursor: auto; } button { cursor: pointer; } }

/* ── Loading Screen ── */
#loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#loading.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease 0.2s;
}
.loading-washi {
  position: absolute;
  inset: 0;
  display: flex;
}
.washi-left, .washi-right {
  flex: 1;
  background: var(--cream);
  transform-origin: center;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
.washi-left  { transform: scaleX(1) translateX(0); transform-origin: left; }
.washi-right { transform: scaleX(1) translateX(0); transform-origin: right; }
#loading.open .washi-left  { transform: scaleX(0); }
#loading.open .washi-right { transform: scaleX(0); }

.loading-content {
  position: relative;
  text-align: center;
  z-index: 1;
}
.loading-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}
.loading-ja {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.2em;
}
.loading-en {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.4em;
}
.loading-bar {
  width: 220px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}
.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--vermilion), var(--gold));
  border-radius: 2px;
  animation: loadingAnim 1.6s ease forwards;
}
@keyframes loadingAnim {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* ── Header ── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}
#site-header.scrolled {
  background: rgba(26,26,24,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  padding: 0;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.4s ease;
}
#site-header.scrolled .header-inner { padding: 14px 40px; }

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}
.logo-ja {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.15em;
}
.logo-en {
  font-size: 0.6rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.35em;
}

.site-nav ul {
  display: flex;
  gap: 36px;
}
.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(245,240,232,0.85);
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 4px;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.site-nav a:hover::after,
.site-nav a:focus::after { width: 100%; }
.site-nav a:hover { color: var(--cream); }

/* ハンバーガー */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero Section ── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: center;
  animation: kenBurns 18s ease-in-out infinite alternate;
}
@keyframes kenBurns {
  0%   { transform: scale(1.0) translate(0%, 0%); }
  100% { transform: scale(1.12) translate(-2%, -1.5%); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,26,24,0.45) 0%,
    rgba(26,26,24,0.35) 40%,
    rgba(26,26,24,0.65) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}
.hero-sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  color: var(--gold);
  margin-bottom: 20px;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.5;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}
.hero-title > span { display: block; }
.hero-desc {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  color: rgba(245,240,232,0.8);
  line-height: 2;
  letter-spacing: 0.05em;
  margin-bottom: 40px;
}
.hero-cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--cream);
  border: 1px solid rgba(245,240,232,0.5);
  padding: 14px 36px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  z-index: -1;
}
.hero-cta:hover::before { transform: scaleX(1); }
.hero-cta:hover { border-color: var(--vermilion); }

/* スクロールインジケーター */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  animation: float 2.4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
.scroll-line {
  display: block;
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(245,240,232,0.7));
}
.scroll-text {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: rgba(245,240,232,0.6);
}

/* ── Character / Line Reveal Animations ── */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: charReveal 0.5s ease forwards;
}
@keyframes charReveal {
  to { opacity: 1; transform: translateY(0); }
}
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up.visible { opacity: 1; transform: translateY(0); }

/* ── Scroll Reveal ── */
.reveal-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-section.visible { opacity: 1; transform: translateY(0); }

/* gallery item stagger */
.gallery-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.gallery-item.visible { opacity: 1; transform: translateY(0); }

/* ── Section Common ── */
.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.4em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.4;
  color: var(--ink);
}

/* ── About Section ── */
.section-about {
  padding: 120px 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-text .section-title { margin-bottom: 32px; }
.about-body {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 2.1;
  color: var(--ink-light);
  margin-bottom: 20px;
}
.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--cream-2);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--vermilion);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.1em;
  margin-top: 6px;
}
.about-image {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-image img { transition: transform 0.8s ease; }
.about-image:hover img { transform: scale(1.03); }
.about-img-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(26,26,24,0.7), transparent);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(245,240,232,0.8);
  letter-spacing: 0.1em;
}

/* ── Area Sections ── */
.section-area {
  padding: 100px 0 80px;
}
.area-header {
  max-width: 1280px;
  margin: 0 auto 60px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: start;
}
.area-number {
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 700;
  color: rgba(26,26,24,0.06);
  line-height: 1;
  letter-spacing: -0.03em;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.area-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.area-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 6px;
}
.area-subtitle {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
}
.area-desc {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 2;
  color: var(--ink-light);
  max-width: 600px;
}

/* ── Image Overlay ── */
.img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,24,0.75) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  cursor: pointer;
}
.masonry-item:hover .img-overlay,
.h-item:hover .img-overlay,
.asym-item:hover .img-overlay,
.duo-item:hover .img-overlay { opacity: 1; }
.img-caption {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 4px;
}
.img-hint {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.15em;
  display: block;
}

/* ── Masonry Gallery (Area 1) ── */
.gallery-masonry {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
}
.masonry-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.masonry-item img {
  transition: transform 0.6s ease;
}
.masonry-item:hover img { transform: scale(1.06); }
.masonry-large { grid-column: span 2; grid-row: span 2; }
.masonry-wide  { grid-column: span 2; }

/* ── Horizontal Gallery (Area 2) ── */
.gallery-horizontal-wrap {
  position: relative;
  padding: 0 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.gallery-horizontal {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--cream-2);
  padding-bottom: 16px;
}
.gallery-horizontal::-webkit-scrollbar { height: 4px; }
.gallery-horizontal::-webkit-scrollbar-track { background: var(--cream-2); }
.gallery-horizontal::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
.h-item {
  flex: 0 0 360px;
  height: 260px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  scroll-snap-align: start;
  cursor: pointer;
}
.h-item img { transition: transform 0.6s ease; }
.h-item:hover img { transform: scale(1.06); }
.h-item-large { flex: 0 0 520px; }
.h-scroll-hint {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.2em;
  margin-top: 16px;
}

/* ── Asymmetric Gallery (Area 3) ── */
.gallery-asymmetric {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 12px;
  height: 520px;
}
.asym-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  height: 100%;
}
.asym-item img { transition: transform 0.6s ease; }
.asym-item:hover img { transform: scale(1.05); }
.asym-feature { height: 100%; }
.asym-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.asym-side .asym-item { flex: 1; }

/* ── Duo Gallery (Area 4) ── */
.gallery-duo {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.duo-item {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.duo-item img { transition: transform 0.6s ease; }
.duo-item:hover img { transform: scale(1.05); }

/* ── Parallax Divider ── */
.area-divider {
  position: relative;
  height: 380px;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@media (max-width: 768px) {
  .area-divider { background-attachment: scroll; }
}
.divider-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,24,0.65);
}
.divider-text {
  position: relative;
  z-index: 1;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.2em;
  text-align: center;
  padding: 0 24px;
}

/* ── Access Section ── */
.section-access {
  position: relative;
  overflow: hidden;
}
.access-bg {
  position: absolute;
  inset: 0;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
@media (max-width: 768px) { .access-bg { background-attachment: scroll; } }
.section-access .divider-overlay { background: rgba(26,26,24,0.82); }
.access-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 40px;
}
.access-inner .section-label { color: rgba(245,240,232,0.5); }
.access-inner .section-title { color: var(--cream); margin-bottom: 56px; }
.access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
}
.access-block h3 {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184,150,62,0.3);
}
.access-block p {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 300;
  color: rgba(245,240,232,0.85);
  line-height: 2;
}
.access-note {
  font-size: 0.78rem !important;
  color: rgba(245,240,232,0.55) !important;
  margin-top: 8px;
}
.fee-table { width: 100%; border-collapse: collapse; }
.fee-table td {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(245,240,232,0.85);
  padding: 6px 0;
  border-bottom: 1px solid rgba(245,240,232,0.08);
}
.fee-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}

/* ── Footer ── */
#site-footer {
  background: var(--ink);
  padding: 56px 40px;
  text-align: center;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.footer-logo .logo-ja { font-size: 1rem; }
.footer-nav {
  display: flex;
  gap: 32px;
}
.footer-nav a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(245,240,232,0.5);
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--gold); }
.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(245,240,232,0.25);
  letter-spacing: 0.08em;
}

/* ============================================================
   図鑑カードポップアップ
   ============================================================ */
.card-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.card-modal.card-entering .card-container {
  animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.card-modal.card-leaving .card-container {
  animation: cardOut 0.3s ease forwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: scale(0.85) rotate(-1.5deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes cardOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.9); }
}
.card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,14,13,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card-container {
  position: relative;
  z-index: 1;
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.card-container::-webkit-scrollbar { width: 4px; }
.card-container::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* カード本体 */
.card-inner {
  background: var(--cream);
  border-radius: 8px;
  border: 1px solid var(--cream-2);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* 紙質テクスチャ(CSSノイズ) */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #f5f0e8 0%, #ede7d9 100%);
}

/* カードヘッダー */
.card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--cream-2);
  /* エリアカラーは JS で --area-color 変数を設定 */
  background: linear-gradient(135deg, color-mix(in srgb, var(--area-color, #c8443c) 12%, var(--cream)), var(--cream));
}
.card-number {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--area-color, var(--vermilion));
  background: color-mix(in srgb, var(--area-color, #c8443c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--area-color, #c8443c) 35%, transparent);
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
  align-self: center;
  font-variant-numeric: tabular-nums;
}
.card-title-block { align-self: center; }
.card-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.06em;
  line-height: 1.3;
}
.card-subtitle-text {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.2em;
  margin-top: 4px;
}
.card-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gray);
  background: var(--cream-2);
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.card-close:hover { background: var(--vermilion); color: var(--white); }

/* カードビジュアル */
.card-visual {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px 24px;
  background: var(--ink);
}
.card-main-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
}
.card-main-image img {
  transition: transform 0.4s ease;
}
.card-main-image:hover img { transform: scale(1.05); }
.card-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-thumb {
  width: 72px; height: 72px;
  overflow: hidden;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.card-thumb.active { border-color: var(--gold); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card-thumb:hover img { transform: scale(1.08); }

/* カードデータ */
.card-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--cream-2);
}
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-2);
  gap: 16px;
}
.data-row:nth-child(odd):last-child:nth-child(even),
.data-row:nth-last-child(1):nth-child(odd) { grid-column: span 2; }
.data-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.data-value {
  font-family: 'Courier New', 'Noto Sans JP', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.05em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rarity-stars { color: var(--gold); letter-spacing: 2px; font-size: 0.9rem; }

/* stagger animation */
.stagger-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.stagger-item.stagger-visible { opacity: 1; transform: translateY(0); }

/* カード解説 */
.card-desc {
  padding: 20px 24px 0;
}
.card-desc p {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 2;
  color: var(--ink-light);
}

/* ハイライト */
.card-highlights {
  padding: 16px 24px 20px;
}
.highlights-title {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}
#card-highlights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#card-highlights-list li {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-light);
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}
#card-highlights-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--vermilion);
  font-size: 0.7rem;
}

/* カードフッター */
.card-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 24px;
  background: var(--ink);
  gap: 8px;
}
.card-nav-btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(245,240,232,0.6);
  padding: 8px 16px;
  border: 1px solid rgba(245,240,232,0.2);
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.card-nav-btn:hover {
  color: var(--cream);
  border-color: var(--gold);
  background: rgba(184,150,62,0.1);
}
.card-nav-btn:nth-child(3) { text-align: right; }
.card-progress {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: rgba(245,240,232,0.4);
  text-align: center;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── slide transition ── */
.card-inner.slide-left  { animation: slideLeft  0.3s ease forwards; }
.card-inner.slide-right { animation: slideRight 0.3s ease forwards; }
@keyframes slideLeft  { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-30px); opacity: 0; } }
@keyframes slideRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(30px);  opacity: 0; } }
.card-inner.slide-in-right { animation: slideInRight 0.3s ease forwards; }
.card-inner.slide-in-left  { animation: slideInLeft  0.3s ease forwards; }
@keyframes slideInRight { from { transform: translateX(30px);  opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft  { from { transform: translateX(-30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .gallery-masonry {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .about-image { max-width: 600px; }
  .access-grid { grid-template-columns: 1fr; gap: 36px; }
  .gallery-asymmetric { grid-template-columns: 1fr; height: auto; }
  .asym-feature { aspect-ratio: 4/3; height: auto; }
  .asym-side { flex-direction: row; }
  .asym-side .asym-item { aspect-ratio: 4/3; height: auto; }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  #cursor { display: none; }
  button { cursor: pointer; }

  .header-inner { padding: 16px 20px; }
  #site-header.scrolled .header-inner { padding: 12px 20px; }

  .site-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(300px, 80vw);
    height: 100vh;
    background: var(--ink);
    padding: 80px 32px 32px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    overflow-y: auto;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 300;
    color: var(--cream);
    border-bottom: 1px solid rgba(245,240,232,0.08);
  }
  .site-nav a::after { display: none; }

  .hamburger { display: flex; z-index: 1001; position: relative; }

  .hero-title { font-size: 1.6rem; }
  .section-about { padding: 80px 20px; }
  .area-header { padding: 0 20px; grid-template-columns: 1fr; gap: 0; }
  .area-number { font-size: 4rem; margin-bottom: -10px; }

  .gallery-masonry {
    padding: 0 20px;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .masonry-large { grid-column: span 2; }
  .masonry-wide  { grid-column: span 2; }

  .gallery-horizontal-wrap { padding: 0 20px; }
  .h-item { flex: 0 0 280px; height: 200px; }
  .h-item-large { flex: 0 0 360px; }

  .gallery-asymmetric { padding: 0 20px; }
  .asym-side { flex-direction: column; }

  .gallery-duo {
    padding: 0 20px;
    grid-template-columns: 1fr;
  }
  .duo-item { aspect-ratio: 16/9; }

  .access-inner { padding: 80px 20px; }
  .access-grid { grid-template-columns: 1fr; gap: 32px; }

  /* カードモーダル on mobile: スライドアップ */
  .card-modal { align-items: flex-end; padding: 0; }
  .card-container {
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
  }
  .card-modal.card-entering .card-container {
    animation: cardSlideUp 0.35s ease forwards;
  }
  .card-modal.card-leaving .card-container {
    animation: cardSlideDown 0.3s ease forwards;
  }
  @keyframes cardSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  @keyframes cardSlideDown {
    from { transform: translateY(0); }
    to   { transform: translateY(100%); }
  }
  .card-visual { grid-template-columns: 1fr; }
  .card-thumbnails { flex-direction: row; }
  .card-thumb { width: 60px; height: 60px; }
  .card-data { grid-template-columns: 1fr; }
  .data-row:nth-last-child(1):nth-child(odd) { grid-column: span 1; }

  #site-footer { padding: 40px 20px; }
  .footer-nav { flex-wrap: wrap; justify-content: center; gap: 16px 24px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.3rem; letter-spacing: 0.04em; }
  .gallery-masonry { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .card-header { grid-template-columns: auto 1fr auto; gap: 10px; }
  .card-name { font-size: 1rem; }
}
