: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;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

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

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

.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 {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.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;
}

.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;
}

.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;
}

.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;
}

@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;
  }

  .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;
  }
}
