:root {
  --bg: #0c0d0c;
  --panel: #151715;
  --panel-2: #1d201d;
  --line: rgba(238, 232, 220, 0.14);
  --text: #f1ece2;
  --muted: #9d9689;
  --accent: #c66a48;
  --paper: #eee8dc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 55% 10%, rgba(198, 106, 72, 0.2), transparent 28%),
    linear-gradient(135deg, #090a09, #151713 58%, #0a0b0a);
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.boot {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  color: var(--paper);
  background: #080908;
  overflow: hidden;
}

.boot span {
  display: block;
  font-size: clamp(72px, 16vw, 230px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.boot small {
  justify-self: end;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.34em;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  gap: 14px;
  min-height: 100vh;
  padding: 14px 14px 52px;
  overflow: hidden;
}

.backdrop-type {
  position: fixed;
  z-index: -1;
  right: -4vw;
  bottom: -3vw;
  color: rgba(255, 250, 242, 0.035);
  font-size: 31vw;
  font-weight: 950;
  letter-spacing: -0.12em;
  line-height: 0.72;
  pointer-events: none;
}

.sidebar,
.inspector,
.viewer {
  border: 1px solid var(--line);
  background: rgba(16, 18, 16, 0.82);
  backdrop-filter: blur(16px);
}

.sidebar,
.inspector {
  min-height: calc(100vh - 28px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.brand {
  display: inline-grid;
  gap: 2px;
  width: max-content;
}

.brand span {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand small,
.side-copy p,
.project-card span,
.project-card small,
.viewer-top p,
.view-toggle button,
.stage-label,
.metric-grid span,
.panel-kicker,
.contact-button {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand small {
  color: var(--muted);
}

.side-copy {
  margin-top: 62px;
}

.side-copy p,
.viewer-top p,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 800;
}

.side-copy h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.18;
  letter-spacing: 0;
}

.project-list {
  display: grid;
  gap: 10px;
  margin-top: 42px;
}

.project-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 12px;
  width: 100%;
  padding: 18px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.project-card:hover,
.project-card.is-active {
  background: var(--paper);
  color: #111;
}

.project-card span {
  grid-row: span 2;
  color: var(--accent);
  font-weight: 900;
}

.project-card strong {
  font-size: 15px;
}

.project-card small {
  color: var(--muted);
}

.project-card.is-active small,
.project-card:hover small {
  color: #625b51;
}

.contact-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: auto;
  background: var(--text);
  color: #111;
  font-weight: 900;
}

.viewer {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.viewer-rail {
  position: absolute;
  z-index: 5;
  top: 96px;
  right: 16px;
  bottom: 126px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 16px;
  color: rgba(255, 250, 242, 0.62);
  writing-mode: vertical-rl;
}

.viewer-rail span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.viewer-rail i {
  width: 1px;
  min-height: 80px;
  background: linear-gradient(transparent, var(--accent), transparent);
}

.viewer-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.viewer-top h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 46px);
  letter-spacing: 0;
}

.view-toggle {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
}

.view-toggle button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.view-toggle button.is-active {
  background: var(--paper);
  color: #111;
  font-weight: 900;
}

.stage {
  position: relative;
  min-height: 0;
  margin: 18px;
  overflow: hidden;
  background: #080908;
}

.stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 226px);
  min-height: 460px;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  will-change: transform;
}

.stage[data-mode="concept"] img {
  filter: saturate(0.45) contrast(1.1) brightness(0.78);
}

.stage[data-mode="detail"] img {
  filter: contrast(1.12) saturate(1.08);
  transform: scale(1.12);
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mix-blend-mode: screen;
  opacity: 0.32;
}

.focus-grid {
  position: absolute;
  inset: 26px;
  pointer-events: none;
  border: 1px solid rgba(255, 250, 242, 0.42);
  opacity: 0.55;
}

.focus-grid::before,
.focus-grid::after {
  content: "";
  position: absolute;
  background: rgba(255, 250, 242, 0.34);
}

.focus-grid::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}

.focus-grid::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.stage-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  color: #111;
  background: rgba(238, 232, 220, 0.92);
  font-weight: 900;
}

.stage-label span {
  color: var(--accent);
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 18px 18px;
}

.thumb {
  height: 92px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  opacity: 0.56;
}

.thumb.is-active,
.thumb:hover {
  opacity: 1;
  border-color: var(--paper);
}

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

.inspector {
  padding: 22px;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.status-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metric-grid div {
  min-height: 96px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric-grid span {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
}

.metric-grid strong {
  font-size: 22px;
}

.panel {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.panel h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.35;
}

.panel p:not(.panel-kicker),
.panel li {
  color: var(--muted);
  line-height: 1.85;
}

.panel ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
}

.marquee {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: rgba(10, 11, 10, 0.88);
  color: var(--paper);
  backdrop-filter: blur(14px);
}

.marquee div {
  display: flex;
  min-width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee span {
  padding: 14px 22px;
  color: rgba(255, 250, 242, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .inspector {
    grid-column: 1 / -1;
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    padding: 0;
  }

  .backdrop-type,
  .viewer-rail {
    display: none;
  }

  .sidebar,
  .viewer,
  .inspector {
    min-height: auto;
    border-left: 0;
    border-right: 0;
  }

  .sidebar {
    padding: 22px;
  }

  .side-copy {
    margin-top: 36px;
  }

  .project-list {
    margin-top: 28px;
  }

  .contact-button {
    margin-top: 18px;
  }

  .viewer-top {
    display: grid;
    padding: 20px;
  }

  .view-toggle {
    overflow-x: auto;
  }

  .stage {
    margin: 0;
  }

  .stage img {
    min-height: 420px;
    max-height: none;
  }

  .thumb-strip {
    padding: 12px;
  }

  .thumb {
    height: 76px;
  }

  .marquee {
    position: static;
  }
}
