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

:root {
  --bg: #F8F7F4;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --text-light: #888888;
  --text-dim: #BBBBBB;
  --accent: #FFE500;
  --accent-dark: #D4BE00;
  --border: #E8E8E8;
  --blue: #4A90D9;
  --coral: #FF6B4A;
  --green: #6BCB77;
  --purple: #9575CD;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #0D0D0D;
  /* TOPページと合わせる */
  color: var(--text);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

.detail-content {
  margin-top: 70px;
  /* ヘッダー分の余白を追加 */
  padding: 24px;
  /* TOPページの .content 相当 */
}

.mockup-frame {
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  position: relative;
  isolation: isolate;
  /* 子要素による角丸の削れを防止 */
}

.tab-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-to-top {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #FFF;
  margin-right: 24px;
  padding: 8px 0;
  border-right: 1px solid #333;
  padding-right: 24px;
  transition: all 0.3s ease;
}

.back-to-top:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.back-to-top .icon {
  font-size: 14px;
}

/* Remove old header styles */
.header,
.header-left,
.back-link,
.back-icon,
.logo,
.logo-text,
.logo-dot,
.nav,
.nav-item {
  display: none !important;
}

/* ==================== */
/* HERO BACK LINK */
/* ==================== */
.hero-back-link {
  position: absolute;
  top: 32px;
  left: 40px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #BBB;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-back-link:hover {
  color: var(--text);
  transform: translateX(-8px);
}

.hero-back-link .icon {
  font-size: 14px;
  font-weight: 300;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-text {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text);
}

.logo-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.nav {
  display: flex;
  gap: 40px;
}

.nav-item {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
}

/* ==================== */
/* PROJECT INDEX (from V5) */
/* ==================== */
.project-index {
  position: fixed;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.index-label {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: #FFF;
  /* 背景が黒いので白に変更 */
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: 12px;
  opacity: 0.5;
}

.index-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
}

.index-total {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  color: var(--text-dim);
}

/* ==================== */
/* SIDE LABEL (left only) */
/* ==================== */
.side-label {
  position: fixed;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  z-index: 100;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  white-space: nowrap;
}

.side-label.left {
  left: 20px;
  transform-origin: left center;
  transform: translateY(-50%) rotate(-90deg) translateX(-50%);
}

/* ==================== */
/* MAIN */
/* ==================== */
.main {
  min-height: 100vh;
}

/* ==================== */
/* HERO SECTION */
/* ==================== */
.hero {
  min-height: 100vh;
  padding: 140px 120px 80px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

/* Title Area */
.hero-title-area {
  position: relative;
  padding-left: 60px;
}

.title-content {
  width: fit-content;
  max-width: 100%;
}

.title-vertical {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
}

.title-jp {
  font-family: 'Shippori Mincho', serif;
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--text-dim);
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.6s;
}

.category-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.3s;
}

.title-category {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-light);
}

.title-category::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.title-year {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.title-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(56px, 7vw, 88px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.title-line {
  display: block;
  overflow: hidden;
}

.title-line span,
.title-line {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.title-line:nth-child(1) {
  animation-delay: 0.4s;
}

.title-line:nth-child(2) {
  animation-delay: 0.5s;
}

.title-line.indent {
  padding-left: 80px;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  /* 余白を少し調整 */
  width: 100%;
}

.control-btn {
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-icon {
  font-size: 16px;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.control-btn:hover {
  border-color: var(--text);
  background: var(--text);
}

.control-btn:hover .btn-icon {
  color: var(--bg);
}

.control-counter {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', serif;
}

.control-counter .current {
  font-size: 20px;
  color: var(--text);
  min-width: 24px;
}

.control-counter .separator {
  width: 20px;
  height: 1px;
  background: var(--border);
}

.control-counter .total {
  font-size: 14px;
  color: var(--text-dim);
}

/* Visual Area */
.hero-visual-area {
  position: relative;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.6s;
}

.visual-container {
  position: relative;
  aspect-ratio: 4/3;
}

.visual-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 2px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

.slide-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slide-inner::before {
  content: '';
  width: 70%;
  height: 65%;
  background: var(--surface);
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.slide-inner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(70% - 24px);
  height: 8px;
  border-left: 8px solid var(--coral);
  border-right: 8px solid var(--accent);
  background: transparent;
  margin-top: -28%;
  margin-left: -23%;
  border-radius: 4px;
}

.slide-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 65%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.slide-inner.blue {
  background: linear-gradient(145deg, #5A9FE8 0%, #3A7BC8 100%);
}

.slide-inner.coral {
  background: linear-gradient(145deg, #FF9A7B 0%, #E85A3A 100%);
}

.slide-inner.green {
  background: linear-gradient(145deg, #7BDB87 0%, #4CAF50 100%);
}

.slide-inner.purple {
  background: linear-gradient(145deg, #C3ADEB 0%, #7E57C2 100%);
}

/* Visual Frame */
.visual-frame {
  position: absolute;
  top: -16px;
  right: -16px;
  bottom: 16px;
  left: 16px;
  border: 1px solid var(--border);
  border-radius: 2px;
  pointer-events: none;
  z-index: -1;
}

/* Slide Counter */
.slide-counter {
  position: absolute;
  bottom: -48px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
}

.counter-current {
  font-size: 24px;
  color: var(--text);
}

.counter-divider {
  width: 32px;
  height: 1px;
  background: var(--border);
}

.counter-total {
  color: var(--text-dim);
}

/* Scroll Indicator (from V5) */
.scroll-indicator {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 1s;
}

.scroll-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.scroll-link:hover {
  opacity: 0.6;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollDown 1.5s ease infinite;
}

@keyframes scrollDown {
  0% {
    top: -50%;
  }

  100% {
    top: 150%;
  }
}

.scroll-text {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ==================== */
/* INTRO SECTION */
/* ==================== */
.intro {
  padding: 160px 120px;
  border-top: 1px solid var(--border);
}

.intro-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
  max-width: 1200px;
}

.intro-label {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.label-en {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-light);
}

.label-line {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.intro-content {
  max-width: 560px;
}

.intro-lead {
  font-family: 'Shippori Mincho', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.08em;
  margin-bottom: 48px;
  color: var(--text);
}

.intro-body {
  margin-bottom: 56px;
}

.intro-body p {
  font-size: 14px;
  font-weight: 300;
  line-height: 2.4;
  color: #666;
  margin-bottom: 1.2em;
}

.intro-body p:last-child {
  margin-bottom: 0;
}

/* Site Link */
.title-link-area {
  margin-top: 64px;
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  width: 100%;
}

.site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 18px 64px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.link-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text);
  font-weight: 400;
  text-transform: uppercase;
  transition: color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 2;
}

/* Elegant Fill from Bottom on Hover */
.site-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--text);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.site-link:hover::after {
  transform: translateY(0);
}

.site-link:hover .link-label {
  color: var(--bg);
}

/* ==================== */
/* FOOTER */
/* ==================== */
.footer {
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 48px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.footer-link:hover {
  background: rgba(0, 0, 0, 0.02);
}

.footer-link.prev {
  justify-content: flex-start;
}

.footer-link.next {
  justify-content: flex-end;
}

.footer-arrow {
  font-size: 20px;
  color: var(--text-dim);
  transition: all 0.3s ease;
}

.footer-link:hover .footer-arrow {
  color: var(--accent-dark);
}

.footer-link.prev:hover .footer-arrow {
  transform: translateX(-8px);
}

.footer-link.next:hover .footer-arrow {
  transform: translateX(8px);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link.next .footer-content {
  text-align: right;
}

.footer-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.footer-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  transition: color 0.3s ease;
}

.footer-link:hover .footer-title {
  color: var(--text-light);
}

.footer-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.logo-circle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  position: relative;
}

.logo-circle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* ==================== */
/* ACCENT ELEMENTS */
/* ==================== */
.accent-circle {
  position: fixed;
  bottom: 120px;
  right: 80px;
  width: 80px;
  height: 80px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
  z-index: 50;
}

/* ==================== */
/* SCROLL ANIMATIONS */
/* ==================== */
.intro-lead,
.intro-body,
.site-link {
  opacity: 0;
  transform: translateY(32px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-lead.visible,
.intro-body.visible,
.site-link.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-body.visible {
  transition-delay: 0.15s;
}

.site-link.visible {
  transition-delay: 0.3s;
}

/* ==================== */
/* RESPONSIVE */
/* ==================== */
@media (max-width: 1200px) {
  .hero {
    padding: 140px 80px 80px;
  }

  .hero-grid {
    gap: 60px;
  }

  .intro {
    padding: 120px 80px;
  }

  .intro-grid {
    grid-template-columns: 160px 1fr;
    gap: 60px;
  }
}

@media (max-width: 1024px) {
  .side-label {
    display: none;
  }

  .project-index {
    display: none;
  }

  .accent-circle {
    display: none;
  }

  .hero {
    padding: 120px 48px 80px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 80px;
  }

  .hero-title-area {
    order: 2;
    padding-left: 40px;
  }

  .hero-visual-area {
    order: 1;
  }

  .visual-frame {
    display: none;
  }

  .title-line.indent {
    padding-left: 40px;
  }

  .intro {
    padding: 100px 48px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .intro-label {
    flex-direction: row;
    align-items: center;
  }

  .label-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, var(--accent), transparent);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 24px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 100px 24px 60px;
  }

  .hero-title-area {
    padding-left: 32px;
  }

  .title-main {
    font-size: 42px;
  }

  .title-line.indent {
    padding-left: 24px;
  }

  .slide-counter {
    bottom: -40px;
  }

  .slider-controls {
    margin-top: 24px;
  }

  .scroll-indicator {
    display: none;
  }

  .intro {
    padding: 80px 24px;
  }

  .intro-lead {
    font-size: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-center {
    display: none;
  }

  .footer-link {
    padding: 32px 24px;
    border-bottom: 1px solid var(--border);
  }

  .footer-link.next {
    justify-content: flex-start;
  }

  .footer-link.next .footer-content {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .title-main {
    font-size: 36px;
  }

  .title-vertical {
    display: none;
  }

  .hero-title-area {
    padding-left: 0;
  }

  .title-line.indent {
    padding-left: 16px;
  }

  .control-btn {
    width: 40px;
    height: 40px;
  }

  .intro-lead {
    font-size: 20px;
  }
}