.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-tight {
  padding-top: 18px;
}

.page-hero {
  position: relative;
  min-height: 52svh;
  padding: 92px 0 42px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 20% 30%, rgba(255, 255, 255, .06), rgba(0, 0, 0, 0)),
    linear-gradient(to bottom, rgba(7, 8, 11, .92), rgba(7, 8, 11, .42));
}

.page-hero-inner {
  position: relative;
}

.page-kicker {
  opacity: .74;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0;
}

.page-title {
  font-size: 40px;
  margin: 10px 0 10px;
}

.page-sub {
  opacity: .84;
  line-height: 1.7;
  max-width: 920px;
  margin: 0 0 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 22px;
  margin: 0 0 10px;
}

.muted {
  opacity: .78;
  line-height: 1.7;
  margin: 0;
}

.hint {
  margin-top: 10px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .02);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .03);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .06em;
  opacity: .86;
}

.chip:hover {
  background: rgba(255, 255, 255, .06);
}

.chip.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .20);
}

.search {
  flex: 1 1 260px;
  max-width: 420px;
}

.search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .22);
  color: var(--fg);
  outline: none;
}

.search input::placeholder {
  color: rgba(243, 244, 246, .55);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.work-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, .02);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
  cursor: pointer;
  color: #ffffff;
}

.work-card:hover {
  transform: translateY(-2px);
  transition: transform .18s ease, background .18s ease;
  background: rgba(255, 255, 255, .04);
}

.thumb {
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, .03);
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meta {
  padding: 14px 14px 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.title {
  margin: 0;
  font-size: 15px;
  letter-spacing: .02em;
}

.badge {
  font-size: 11px;
  opacity: .82;
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  white-space: nowrap;
}

.cap {
  margin: 10px 0 12px;
  opacity: .86;
  line-height: 1.6;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  opacity: .82;
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
}

/* Empty */
.empty {
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--radius);
  padding: 22px 18px;
  background: rgba(255, 255, 255, .02);
  margin-top: 14px;
  text-align: center;
}

.empty-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.is-hidden {
  display: none !important;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .62);
}

.modal-panel {
  position: relative;
  width: min(980px, 94vw);
  margin: 6vh auto 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  overflow: auto;
  background: rgba(12, 12, 14, .92);
  box-shadow: 0 30px 120px rgba(0, 0, 0, .55);
  max-height: 92svh;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;
}

.modal-panel::-webkit-scrollbar{
  width: 0;
  height: 0;
}

.modal-panel::after{
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34px;
  margin-top: -34px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.55));
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: var(--fg);
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

.modal-media {
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, .03);
  flex: 0 0 auto;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-body {
  padding: 16px 16px 18px;
  flex: 0 0 auto;
}

.modal-title {
  margin: 0;
  font-size: 18px;
}

.modal-sub {
  margin: 8px 0 0;
  opacity: .78;
}

.modal-desc {
  margin: 14px 0 0;
  opacity: .92;
  line-height: 1.8;
}

.modal-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

/* Gallery grid in modal */
.modal-gallery {
  padding: 12px 16px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gallery-grid button {
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .74);
}

.lightbox-ui{
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  justify-items: center;
  padding: 20px 14px;
}

#lightboxImg{
  width: min(92vw, 1200px);
  max-height: 84svh;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  box-shadow: 0 30px 120px rgba(0,0,0,.55);
}

/* close button (top-right) */
.lb-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* prev/next buttons */
.lb-nav{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.lb-prev{ justify-self: start; }
.lb-next{ justify-self: end; }

/* responsive */
@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


.info {
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, .02);
}

.k {
  font-size: 12px;
  opacity: .74;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v {
  margin-top: 8px;
  opacity: .92;
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 980px) {
  .page-title {
    font-size: 32px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .modal-panel {
    margin-top: 4vh;
  }

  .modal-info {
    grid-template-columns: 1fr;
  }
}

/* ===== SP tuning ===== */
@media (max-width: 860px) {
  .page-hero {
    min-height: 44svh;
    padding: 84px 0 34px;
  }

  .page-title {
    font-size: 30px;
  }

  .page-sub {
    font-size: 14px;
  }

  /* フィルタは横スクロールできるタブに */
  .filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .filters::-webkit-scrollbar {
    height: 6px;
  }

  .filters::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
  }

  .controls {
    padding: 12px 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .modal-panel {
    width: 94vw;
    margin: 3vh auto 0;
  }

  @media (max-width: 860px){
  .lightbox-ui{ grid-template-columns: 44px 1fr 44px; }
  #lightboxImg{ width: min(94vw, 980px); max-height: 82svh; }
}
}