/* Embedded gallery: every rule is scoped to this component. */
#bl-middle-sheet {
  --ms-blue: #2a62d2;
  --ms-navy: #0b3659;
  --ms-ink: #333;
  --ms-muted: #666;
  --ms-line: #dedede;
  box-sizing: border-box;
  container-type: inline-size;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--ms-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -.5px;
  text-align: left;
}
#bl-middle-sheet *,
#bl-middle-sheet *::before,
#bl-middle-sheet *::after { box-sizing: border-box; }
#bl-middle-sheet.ms-standalone {
  max-width: 1120px;
  margin: 32px auto;
  padding: 20px;
  font-family: 'Noto Sans KR', 'SCDream', 'Malgun Gothic', sans-serif;
}
#bl-middle-sheet .ms-return {
  display: inline-block;
  margin: 0 0 24px;
  color: var(--ms-blue);
  font-size: 14px;
  text-decoration: none;
}
#bl-middle-sheet .ms-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 14px;
}
#bl-middle-sheet .ms-heading h2 {
  margin: 0;
  padding: 0 0 0 12px;
  border-left: 5px solid var(--ms-blue);
  color: var(--ms-ink);
  font-family: 'SCDream', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  word-break: keep-all;
}
#bl-middle-sheet .ms-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  background: #eef3fc;
  color: var(--ms-blue);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
#bl-middle-sheet .ms-intro {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-radius: 10px;
  background: #f5f5f5;
  color: #555;
  font-size: 16px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
#bl-middle-sheet .ms-range {
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--ms-line);
  color: var(--ms-ink);
  font-size: 15px;
  font-weight: 500;
}
#bl-middle-sheet #ms-range { color: var(--ms-blue); }
#bl-middle-sheet #ms-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0;
}
#bl-middle-sheet .ms-batch { display: contents; }
#bl-middle-sheet figure {
  min-width: 0;
  margin: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--ms-line);
  border-radius: 10px;
  background: #fff;
}
#bl-middle-sheet figure:hover { border-color: var(--ms-blue); }
#bl-middle-sheet a { text-decoration: none; }
#bl-middle-sheet .ms-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  }
#bl-middle-sheet .ms-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: contain;
}
#bl-middle-sheet figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #eee;
  color: var(--ms-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}
#bl-middle-sheet .ms-zoom,
#bl-middle-sheet button,
#bl-middle-sheet #ms-loader a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--ms-blue);
  border-radius: 5px;
  background: #fff;
  color: var(--ms-blue);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}
#bl-middle-sheet .ms-zoom:hover,
#bl-middle-sheet button:hover,
#bl-middle-sheet #ms-loader a:hover {
  background: var(--ms-blue);
  color: #fff;
}
#bl-middle-sheet :focus-visible { outline: 3px solid var(--ms-blue); outline-offset: 3px; }
#bl-middle-sheet #ms-loader {
  margin: 28px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--ms-line);
  color: var(--ms-muted);
  text-align: center;
}
#bl-middle-sheet #ms-status { margin: 0 0 12px; font-size: 14px; }
#bl-middle-sheet #ms-loader nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#bl-middle-sheet .ms-lightbox {
  position: fixed;
  inset: 0;
  width: min(1000px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--ms-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ms-ink);
}
#bl-middle-sheet .ms-lightbox:not([open]) { display: none; }
#bl-middle-sheet .ms-lightbox::backdrop { background: rgb(11 28 44 / 75%); }
#bl-middle-sheet .ms-dialog-bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ms-line);
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
}
#bl-middle-sheet .ms-dialog-bar form { margin: 0; padding: 0; }
#bl-middle-sheet .ms-lightbox > img { display: block; width: 100%; height: auto; margin: 0; padding: 0; }
@media (max-width: 767px) {
  #bl-middle-sheet #ms-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 520px) {
  #bl-middle-sheet #ms-gallery { grid-template-columns: minmax(0, 1fr); }
  #bl-middle-sheet .ms-heading h2 { font-size: 19px; }
  #bl-middle-sheet .ms-intro { padding: 14px; font-size: 15px; }
  #bl-middle-sheet figure { padding: 10px; }
}
@container (max-width: 780px) {
  #bl-middle-sheet #ms-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@container (max-width: 520px) {
  #bl-middle-sheet #ms-gallery { grid-template-columns: minmax(0, 1fr); }
}
