html {
  scroll-behavior: smooth;
}

body {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 60;
  background: #0B1F3A;
  color: white;
  padding: 0.4rem 0.7rem;
}

.skip:focus {
  top: 0.6rem;
}

.quote-form {
  display: grid;
  gap: 1.25rem;
}

nav[aria-label="연도"] {
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.case-year::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 1.35rem;
  bottom: -2.5rem;
  width: 1px;
  background: rgba(11, 31, 58, 0.12);
}

.case-year:last-child::before {
  bottom: 0;
}

.case-year__dot {
  display: inline-block;
  height: 0.65rem;
  width: 0.65rem;
  flex-shrink: 0;
  border-radius: 999px;
  border: 2px solid #d0121a;
  background: #fff;
  box-shadow: 0 0 0 4px #f5f6f8;
}

.case-photo-btn {
  display: inline-flex;
  height: 44px;
  width: 44px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #d0121a;
  cursor: pointer;
}

.case-preview {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .case-preview {
    position: absolute;
    right: 3.25rem;
    top: calc(100% - 0.25rem);
    z-index: 20;
    display: block;
    width: 15rem;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 12px 30px rgba(11, 31, 58, 0.18);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.15s ease;
  }

  .case-row:hover,
  .case-row:focus-within {
    z-index: 21;
  }

  .case-row:hover .case-preview,
  .case-row:focus-within .case-preview {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .case-preview__hit {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #0b1f3a;
    cursor: pointer;
  }

  .case-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
}

body.lightbox-open {
  overflow: hidden;
}

.case-lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1.5rem;
}

.case-lightbox[hidden] {
  display: none;
}

.case-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: #071528;
}

.case-lightbox__stage {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(72rem, 100%);
}

.case-lightbox__stage img {
  display: block;
  max-height: min(78vh, 900px);
  max-width: 100%;
  margin: 0 auto;
  border-radius: 0.75rem;
  background: #132a4d;
}

.case-lightbox__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  color: #e2e8f0;
  font-size: 0.875rem;
}

.case-lightbox__close,
.case-lightbox__nav {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.case-lightbox__close {
  top: 0.75rem;
  right: 0.75rem;
  height: 44px;
  width: 44px;
}

.case-lightbox__nav {
  top: 50%;
  height: 48px;
  width: 48px;
  transform: translateY(-50%);
}

.case-lightbox__nav--prev {
  left: 0.25rem;
}

.case-lightbox__nav--next {
  right: 0.25rem;
}

.case-lightbox__nav[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .case-lightbox__nav--prev {
    left: 1rem;
  }

  .case-lightbox__nav--next {
    right: 1rem;
  }
}
