*, *::before, *::after {
  box-sizing: border-box;
}

*:not(dialog) {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

@font-face {
  font-family: "fbb";
  src: url(/static/fonts/fbb.otf);
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 26px;
  font-family: Helvetica, sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  --txt-brown: #26170f;
  --bg-white: #fffffa;
  background-color: var(--bg-white);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

#root, #__next {
  isolation: isolate;
}

.container {
  padding: 0px 208px;
}

.navbar {
  padding: 24px 0px;
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: var(--txt-brown);
}

.navbar > a {
    text-decoration: none;
    font-weight: 600;
    color: var(--txt-brown);
}

.navbar-item {
    font-size: 14px;
    list-style: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 26px;
}

.gallery-image,
.record-gallery-main,
.record-gallery-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.gallery-image img,
.record-gallery-main img,
.record-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.record-article {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.record-gallery {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 48px;
}

.record-gallery-container {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

.record-gallery-thumb-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 16px;
}

.information-row {
  display: grid;
  grid-template-columns: 1fr 3fr;
}

.record-text-body {
  margin-top: 38px;
  font-family: 'fbb', 'Times New Roman', Times, serif;
  font-size: 16px;
  white-space: pre-wrap;
}

.record-text-body::first-letter {
  font-size: 6em;
  float: left;
  line-height: 0.8;
  margin: 0.05em 0.1em 0 0;
}

.footnote {
  display: grid;
  grid-template-columns: 0.1fr 2fr;
}

.ss {
  font-size: 0.75em;
  vertical-align: super;
}

.image-grp {
  border: 1px solid var(--txt-brown);
}

.img-preview-container {
  display: flex;
}

.img-preview {
  max-width: 150px;
  max-height: 150px;
}

.information-article, .admin-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.information-article {
  font-family: "fbb", 'Times New Roman', Times, serif;
  font-size: 16px;
}

.record-gallery-desktop {
  display: block;
}

.record-gallery-mobile {
  display: none;
}

@media (max-width: 767px) {
  .record-gallery-desktop {
    display: none;
  }

  .record-gallery-mobile {
    display: block;
  }

  .container {
    padding: 0px 24px;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .information-row {
    display: grid;
    grid-template-columns: 1.6fr 3fr;
  }

  .record-carousel-btn {
    cursor: pointer;
    padding: 12px 16px;
  }

  .record-carousel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .record-carousel-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .record-carousel-track-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
  }

  .record-carousel-track {
    display: flex;
    width: 100%;
  }

  .record-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
  }

  .record-carousel-slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }

  .record-carousel-counter {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    letter-spacing: 0.04em;
  }
}

/* Required field indicator ------------------------------------------------- */
.field:has(> input[required]) label::after,
.field:has(> textarea[required]) label::after,
.field-group:has(> input[required]) label::after,
.field-group:has(> textarea[required]) label::after {
  content: " *";
  color: #c00;
}
