:root {
  --ink: #172136;
  --ink-soft: #455064;
  --paper: #f3f0e7;
  --paper-deep: #e5e0d3;
  --white: #fcfaf4;
  --signal: #f05443;
  --blue: #365f8d;
  --line: rgba(23, 33, 54, 0.18);
  --shadow: 0 18px 50px rgba(28, 35, 48, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 33, 54, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 54, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

button, input, select { font: inherit; }

.masthead {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 231, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  color: var(--white);
  background: var(--ink);
  font: 800 12px/1 "Arial Narrow", sans-serif;
  letter-spacing: 0.08em;
}

.brand b, .brand small { display: block; }
.brand b { font: 800 13px/1.1 "Arial Narrow", sans-serif; letter-spacing: 0.13em; }
.brand small { margin-top: 6px; color: var(--ink-soft); font-size: 9px; letter-spacing: 0.18em; }

.live-status {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(240, 84, 67, 0.14);
}

main {
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 78px clamp(12px, 5vw, 80px) 50px;
  border-inline: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  top: 46px;
  right: clamp(0px, 5vw, 80px);
  content: "CUT";
  color: transparent;
  -webkit-text-stroke: 1px rgba(23, 33, 54, 0.12);
  font: 900 clamp(110px, 21vw, 300px)/0.8 "Arial Narrow", sans-serif;
  letter-spacing: -0.09em;
  pointer-events: none;
}

.hero-kicker, .eyebrow {
  margin: 0 0 18px;
  color: var(--signal);
  font: 800 11px/1.2 "Arial Narrow", sans-serif;
  letter-spacing: 0.2em;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(54px, 9vw, 132px);
  font-weight: 500;
  line-height: 0.93;
  letter-spacing: -0.06em;
}

.hero h1 em {
  color: var(--signal);
  font-style: normal;
}

.hero > p {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 38px 0 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.9;
}

.hero-rule {
  display: flex;
  gap: 30px;
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  font: 800 11px/1 "Arial Narrow", sans-serif;
  letter-spacing: 0.15em;
}

.title-tabs {
  position: sticky;
  z-index: 12;
  top: 74px;
  display: flex;
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--white);
  scrollbar-width: thin;
}

.title-tab {
  flex: 1 0 min(330px, 84vw);
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 82px;
  padding: 13px 18px;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.title-tab:last-child { border-right: 0; }
.title-tab:hover { background: var(--paper); }
.title-tab[aria-selected="true"] { color: var(--white); background: var(--ink); }
.title-tab .tab-number { font: 700 32px/1 "Arial Narrow", sans-serif; }
.title-tab b { display: block; font: 800 13px/1.25 "Arial Narrow", sans-serif; letter-spacing: 0.08em; }
.title-tab small { display: block; margin-top: 6px; opacity: 0.68; font-size: 10px; letter-spacing: 0.08em; }

.project-view {
  min-height: 600px;
  border-inline: 1px solid var(--line);
  background: rgba(252, 250, 244, 0.66);
}

.loading-card { padding: 80px; color: var(--ink-soft); }

.project-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  padding: 70px clamp(18px, 5vw, 78px) 46px;
  border-bottom: 1px solid var(--line);
}

.project-index {
  margin: 0 0 12px;
  color: var(--signal);
  font: 800 12px/1 "Arial Narrow", sans-serif;
  letter-spacing: 0.17em;
}

.project-title {
  margin: 0;
  font: 900 clamp(50px, 8vw, 114px)/0.88 "Arial Narrow", "Yu Gothic UI", sans-serif;
  letter-spacing: -0.05em;
}

.project-logline {
  max-width: 780px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.8;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  margin: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.project-stats div { padding: 14px 18px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.project-stats dt { color: var(--ink-soft); font-size: 9px; letter-spacing: 0.16em; }
.project-stats dd { margin: 8px 0 0; font: 800 24px/1 "Arial Narrow", sans-serif; }

.revision-bar {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 24px clamp(18px, 5vw, 78px);
  border-bottom: 1px solid var(--ink);
  background: var(--paper-deep);
}
.revision-bar .eyebrow { margin-bottom: 8px; }
.revision-bar h3 { margin: 0; font: 700 24px/1.15 "Yu Mincho", serif; }
.revision-controls { min-width: 0; }
.revision-switcher {
  display: flex;
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--white);
}
.revision-button {
  flex: 0 0 auto;
  min-width: 150px;
  padding: 12px 16px;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.revision-button:last-child { border-right: 0; }
.revision-button:hover { background: var(--paper); }
.revision-button[aria-selected="true"] { color: var(--white); background: var(--ink); }
.revision-button b, .revision-button small { display: block; }
.revision-button b { font: 800 13px/1.2 "Arial Narrow", sans-serif; letter-spacing: .08em; }
.revision-button small { margin-top: 6px; opacity: .68; font-size: 9px; letter-spacing: .08em; }
.revision-note { margin: 10px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }

.content-tabs {
  position: sticky;
  z-index: 10;
  top: 156px;
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--ink);
  background: rgba(252, 250, 244, 0.96);
  backdrop-filter: blur(14px);
}
.content-tabs button {
  flex: 1 0 auto;
  min-height: 54px;
  padding: 12px clamp(14px, 2vw, 28px);
  color: var(--ink-soft);
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font: 800 11px/1.2 "Arial Narrow", sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
}
.content-tabs button:hover { color: var(--ink); background: var(--paper-deep); }
.content-tabs button[aria-selected="true"] {
  color: var(--white);
  background: var(--signal);
}
.content-panel[hidden] { display: none !important; }

.screening-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.65fr);
  gap: 0;
  border-bottom: 1px solid var(--ink);
}

.screening { padding: clamp(18px, 3vw, 44px); border-right: 1px solid var(--ink); background: var(--ink); }
.frame-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.72);
  font: 700 10px/1 "Arial Narrow", sans-serif;
  letter-spacing: 0.14em;
}

.video-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16/9;
  background: #05070b;
  box-shadow: 0 18px 60px rgba(0,0,0,0.32);
}
.master-video { display: block; width: 100%; height: 100%; background: #05070b; }
.poster-start {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #05070b;
  cursor: pointer;
}
.poster-start[hidden] { display: none; }
.master-poster { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 320ms ease; }
.poster-start:hover .master-poster { transform: scale(1.015); }
.poster-start span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--white);
  font: 900 11px/1 "Arial Narrow", sans-serif;
  letter-spacing: 0.14em;
}

.story-panel { padding: clamp(28px, 4vw, 58px); background: var(--paper-deep); }
.story-panel h3, .section-heading h3, .qa-section h3, .asset-section h3 { margin: 0; font: 700 clamp(28px, 3vw, 46px)/1.15 "Yu Mincho", serif; }
.story-summary { margin-top: 26px; color: var(--ink-soft); font-size: 14px; line-height: 1.9; white-space: pre-line; }
.document-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.doc-button {
  padding: 10px 13px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
}
.doc-button:hover { color: var(--white); background: var(--ink); }

.board-section, .asset-section { padding: 70px clamp(18px, 4vw, 62px); }
.section-heading { display: grid; grid-template-columns: 1fr minmax(260px, 480px); gap: 30px; align-items: end; }
.section-heading > p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }

.board-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 210px auto;
  gap: 12px;
  align-items: end;
  margin: 38px 0 24px;
  padding: 15px;
  border-block: 1px solid var(--line);
}
.board-tools label span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 9px; letter-spacing: 0.14em; }
.board-tools input, .board-tools select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
}
.result-count { margin: 0 0 12px; font: 800 11px/1 "Arial Narrow", sans-serif; letter-spacing: 0.12em; }

.cut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.cut-card { min-width: 0; background: var(--white); }
.cut-jump { display: block; width: 100%; padding: 0; border: 0; background: #090d15; cursor: pointer; }
.cut-image-wrap { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.cut-image { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.cut-jump:hover .cut-image { transform: scale(1.025); }
.cut-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink);
  background: var(--white);
  font-weight: 900;
}

.cut-meta-row { display: grid; grid-template-columns: auto auto 1fr; gap: 9px; align-items: center; padding: 13px 14px 0; }
.cut-id { color: var(--signal); font: 900 15px/1 "Arial Narrow", sans-serif; letter-spacing: 0.08em; }
.cut-time { color: var(--ink-soft); font: 700 10px/1 "Arial Narrow", sans-serif; }
.cut-method { justify-self: end; overflow: hidden; max-width: 130px; color: var(--blue); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.cut-sequence { min-height: 42px; margin: 10px 14px 4px; font-size: 14px; line-height: 1.5; }
.cut-notes { margin: 0; padding: 0 14px 18px; }
.cut-notes > div { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.cut-notes dt { color: var(--ink-soft); font-size: 9px; letter-spacing: 0.08em; }
.cut-notes dd { margin: 0; font-size: 11px; line-height: 1.65; }
.still-row { background: rgba(240, 84, 67, 0.08); }
.hold-row { background: rgba(54, 95, 141, 0.08); }
.still-row[hidden], .hold-row[hidden] { display: none; }

.asset-section { min-height: 560px; }
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 38px;
  border: 1px solid var(--ink);
  background: var(--ink);
}
.asset-card { min-width: 0; margin: 0; background: var(--white); }
.asset-image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #0c1320;
}
.asset-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 240ms ease, filter 240ms ease;
}
.asset-image-link:hover .asset-image { transform: scale(1.018); filter: saturate(1.05); }
.asset-card figcaption { padding: 16px; border-top: 1px solid var(--ink); }
.asset-card h4 { margin: 0; font: 800 18px/1.3 "Yu Mincho", serif; }
.asset-card p {
  margin: 8px 0 16px;
  color: var(--blue);
  font: 800 9px/1.3 "Arial Narrow", sans-serif;
  letter-spacing: .13em;
}
.asset-path-button {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}
.asset-path-button:hover { color: var(--white); background: var(--ink); }

.qa-section {
  padding: 64px clamp(18px, 4vw, 62px) 80px;
  border-top: 1px solid var(--ink);
  background: var(--paper-deep);
}
.qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 32px; border: 1px solid var(--ink); background: var(--ink); }
.qa-grid details { background: var(--white); }
.qa-grid summary { padding: 20px; cursor: pointer; font-weight: 800; }
.qa-grid pre {
  overflow: auto;
  max-height: 560px;
  margin: 0;
  padding: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font: 12px/1.75 "Yu Gothic UI", sans-serif;
  white-space: pre-wrap;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 64px);
  color: rgba(255,255,255,0.66);
  background: var(--ink);
  font: 700 10px/1.4 "Arial Narrow", sans-serif;
  letter-spacing: 0.12em;
}
footer b { color: var(--white); }
.deerflow-signature {
  color: rgba(255,255,255,.42);
  text-decoration: none;
  transition: color 180ms ease;
}
.deerflow-signature:hover { color: var(--white); }

:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

@media (max-width: 980px) {
  .project-header, .revision-bar, .screening-grid, .section-heading { grid-template-columns: 1fr; }
  .screening { border-right: 0; border-bottom: 1px solid var(--ink); }
  .project-stats { width: 100%; }
  .cut-grid, .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-tabs { top: 156px; }
}

@media (max-width: 640px) {
  .masthead { min-height: 64px; }
  .live-status { display: none; }
  main { width: calc(100% - 16px); }
  .hero { min-height: 360px; padding-top: 60px; }
  .hero::after { top: 70px; }
  .hero-rule { flex-direction: column; gap: 10px; }
  .title-tabs { top: 64px; }
  .title-tab { flex-basis: 82vw; min-height: 70px; }
  .content-tabs { position: relative; top: auto; }
  .project-header { padding-top: 46px; }
  .project-title {
    font-size: clamp(38px, 11.5vw, 50px);
    overflow-wrap: anywhere;
  }
  .project[data-slug="veil-breaker"] .project-title {
    font-size: clamp(34px, 10.4vw, 44px);
    white-space: nowrap;
  }
  .board-tools { grid-template-columns: 1fr; }
  .result-count { margin: 7px 0; }
  .cut-grid, .qa-grid, .asset-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
