:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: #f4f3f0;
  background: #050505;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: #050505;
}

body {
  min-width: 280px;
  margin: 0;
  background: #050505;
}

.bts-close:focus,
.lightbox-close:focus {
  outline: none;
  box-shadow: none;
}

.bts-close {
  position: fixed;
  z-index: 10;
  top: 20px;
  left: clamp(22px, 4vw, 64px);
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: rgba(244, 243, 240, 0.88);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
}

.bts-close:hover,
.bts-close:focus-visible {
  color: #fff;
}

.bts-header {
  position: sticky;
  z-index: 5;
  top: 0;
  padding: 26px clamp(64px, 8vw, 140px) 24px;
  text-align: center;
  background: linear-gradient(to bottom, #050505 78%, rgba(5, 5, 5, 0));
}

.bts-kicker,
.bts-title-line p,
.bts-title-line h1 {
  margin: 0;
}

.bts-kicker {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  color: rgba(244, 243, 240, 0.5);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bts-title-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 18px;
}

.bts-title-line h1 {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 600;
}

.bts-meta,
.bts-cn {
  color: rgba(244, 243, 240, 0.52);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

main {
  padding: 18px clamp(22px, 4vw, 64px) 64px;
}

.bts-project-section {
  padding: 0;
  border-top: 1px solid rgba(244, 243, 240, 0.16);
}

.bts-project-section + .bts-project-section {
  margin-top: 0;
}

.bts-project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: clamp(20px, 2.6vw, 30px) 0;
  list-style: none;
  cursor: pointer;
}

.bts-project-heading::-webkit-details-marker { display: none; }
.bts-project-heading::after { content: ""; flex: 0 0 7px; width: 7px; height: 7px; margin-right: 3px; border-right: 1px solid rgba(244, 243, 240, 0.56); border-bottom: 1px solid rgba(244, 243, 240, 0.56); transform: rotate(45deg); transition: transform 160ms ease; }
.bts-project-section[open] > .bts-project-heading::after { transform: rotate(225deg); }
.bts-project-heading:focus-visible { outline: 1px solid rgba(244, 243, 240, 0.45); outline-offset: -1px; }
.bts-project-section[open] { padding-bottom: 26px; }

.bts-project-heading h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: clamp(1rem, 1.65vw, 1.38rem);
  font-weight: 500;
}

.bts-project-cn {
  color: rgba(244, 243, 240, 0.46);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bts-gallery {
  column-count: 4;
  column-gap: 4px;
}

.bts-frame {
  display: block;
  overflow: hidden;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
  break-inside: avoid;
  border: 0;
  appearance: none;
  background: #0b0b0b;
  cursor: zoom-in;
}

.bts-frame img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 180ms ease;
}

.bts-frame:hover img,
.bts-frame:focus-visible img {
  opacity: 0.82;
}

.bts-lightbox {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: clamp(28px, 5vw, 64px);
  border: 0;
  color: #f4f3f0;
  background: rgba(3, 3, 3, 0.96);
}

.bts-lightbox[open] {
  display: grid;
  place-items: center;
}

.bts-lightbox::backdrop {
  background: rgba(3, 3, 3, 0.96);
}

.bts-lightbox img {
  display: block;
  max-width: min(92vw, 1800px);
  max-height: calc(100svh - 90px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  z-index: 2;
  top: 20px;
  left: clamp(22px, 4vw, 64px);
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  color: rgba(244, 243, 240, 0.9);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.lightbox-count {
  position: fixed;
  right: clamp(22px, 4vw, 64px);
  bottom: 20px;
  margin: 0;
  color: rgba(244, 243, 240, 0.48);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bts-return {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 54px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(244, 243, 240, 0.28);
  color: rgba(244, 243, 240, 0.7);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
}

.bts-return:hover,
.bts-return:focus-visible {
  color: #fff;
  border-color: rgba(244, 243, 240, 0.74);
}

.bts-footer {
  display: flex;
  justify-content: space-between;
  padding: 22px clamp(22px, 4vw, 64px) 26px;
  border-top: 1px solid rgba(244, 243, 240, 0.12);
  color: rgba(244, 243, 240, 0.42);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .bts-kicker,
  .bts-meta {
    display: none;
  }

  .bts-header {
    padding: 52px 58px 20px;
  }

  .bts-title-line {
    display: grid;
    justify-items: center;
    gap: 5px;
  }

  .bts-title-line h1 {
    max-width: 78vw;
    line-height: 1.14;
  }

  .bts-meta {
    order: 3;
  }

  .bts-gallery {
    column-count: 3;
    column-gap: 3px;
  }

  .bts-frame {
    margin-bottom: 3px;
  }

  .bts-project-heading h2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    font-size: clamp(0.75rem, 4.1vw, 1rem);
    line-height: 1.35;
    white-space: nowrap;
  }

  .bts-project-cn {
    line-height: 1.4;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .bts-gallery {
    column-count: 2;
  }
}
