/* Community handwritten letters: source image and thumbnail dimensions remain Wix-authored. */
/* Also consumed explicitly by Home and Events static source replicas. */
.yonsei-home-star-caption {
  position: absolute;
  inset: auto 0 0;
  height: 31.350482%;
  box-sizing: border-box;
  padding: 7% 8% 5%;
  background: #fff;
  color: #777;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  pointer-events: none;
  font-family: Arial, sans-serif;
  font-size: clamp(9px, .85vw, 12px);
  line-height: 1.2;
  white-space: normal !important;
}
.yonsei-home-star-caption-right { height: 41.904762%; }
.yonsei-home-star-caption strong {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 20px;
  background: #9b7652;
  color: #fff;
  font-size: 1.02em;
  white-space: nowrap;
}
.yonsei-home-star-caption-right strong {
  background: #fff;
  border: 1px solid #9b7652;
  color: #9b7652;
}
.yonsei-home-star-caption span { display: block; white-space: normal !important; overflow-wrap: anywhere; }
.yonsei-home-star-caption span:nth-child(2) { color: #5b534e; font-style: italic; }

/* English captions stay inside the original Events video box. */
#comp-mpyu2oo6_video::cue {
  color: #fff;
  background-color: rgba(0, 0, 0, .78);
  font-size: 18px;
}
@media (max-width: 767px) {
  #comp-mpyu2oo6_video::cue { font-size: 13px; }
}
.yonsei-star-caption-grid { position: relative !important; }
.yonsei-star-caption-strip {
  position: absolute;
  top: 434px;
  left: calc(50% - 490px);
  box-sizing: border-box;
  width: 980px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid #e4dbd2;
  background: #fff;
  color: #332e29;
  font: 11px/1.25 Arial, sans-serif;
}
.yonsei-star-caption-strip h2 {
  margin: 0 0 4px;
  color: #80634b;
  font-size: 11px;
}
.yonsei-star-caption-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.yonsei-star-caption { margin: 0; }
@media (max-width: 700px) {
  .yonsei-star-caption-strip {
    position: relative;
    top: auto;
    left: auto;
    grid-area: 4 / 1 / 5 / 2;
    width: 288px;
    justify-self: center;
    margin: 0 auto 12px;
    padding: 12px;
    font-size: 13px;
  }
  .yonsei-star-caption-list { grid-template-columns: 1fr; gap: 8px; }
  .yonsei-star-caption-grid > #comp-lwhib08g1 { grid-area: 5 / 1 / 6 / 2 !important; }
}

.yonsei-letter-gallery-grid[data-mesh-id="comp-lwhhmwpeinlineContent-gridContainer"] {
  grid-template-rows: auto auto !important;
  min-height: 0 !important;
}

.yonsei-letter-gallery-grid > .yonsei-letter-caption {
  grid-area: 2 / 1 / 3 / 2;
  justify-self: center;
  align-self: start;
  box-sizing: border-box;
  width: min(963px, calc(100% - 32px));
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid #e4dbd2;
  background: #fff;
  color: #332e29;
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.yonsei-letter-caption strong {
  display: block;
  margin-bottom: 6px;
  color: #80634b;
  font-size: 13px;
}

.yonsei-letter-caption-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* The complete original paper/photo must remain visible, including its frame. */
.yonsei-letter-gallery [data-hook="gallery-item-image-img"],
.yonsei-star-original-image {
  object-fit: contain !important;
  object-position: center !important;
  background: #fff;
}

.yonsei-letter-gallery [data-hook="gallery-thumbnails-column"] {
  scrollbar-width: none;
}

.yonsei-letter-gallery [data-hook="gallery-thumbnails-column"]::-webkit-scrollbar {
  display: none;
}

.yonsei-letter-gallery .thumbnailItem:focus-visible {
  outline: 2px solid #87674f;
  outline-offset: -2px;
}

body.device-mobile-optimized .yonsei-letter-gallery-grid > .yonsei-letter-caption {
  width: 280px;
  margin: 0 0 18px;
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.45;
}

body.device-mobile-optimized .yonsei-letter-caption strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.yonsei-letter-dialog {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(24, 20, 17, .84);
  font-family: Arial, sans-serif;
}

.yonsei-letter-dialog-panel {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 12px;
  border-radius: 4px;
  background: #fff;
  color: #292522;
  box-sizing: border-box;
}

.yonsei-letter-dialog-toolbar,
.yonsei-letter-dialog-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.yonsei-letter-dialog button {
  padding: 8px 14px;
  border: 1px solid #8b7059;
  border-radius: 3px;
  background: #fff;
  color: #3c3027;
  cursor: pointer;
  font: inherit;
}

.yonsei-letter-dialog button:focus-visible,
.yonsei-letter-caption-text:focus-visible,
.yonsei-letter-dialog-subtitle:focus-visible {
  outline: 2px solid #87674f;
  outline-offset: 2px;
}

.yonsei-letter-dialog-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  flex: 0 0 auto;
  padding: 10px 0;
}

.yonsei-letter-dialog-image {
  width: 100%;
  height: auto;
  max-height: 55vh;
  object-fit: contain;
}

.yonsei-letter-dialog-translation {
  font-size: 15px;
  line-height: 1.6;
}

.yonsei-letter-dialog-translation h2 {
  flex: 0 0 auto;
  margin: 0 0 8px;
  font-size: 17px;
}

.yonsei-letter-dialog-subtitle {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .yonsei-letter-dialog { padding: 8px; }
  .yonsei-letter-dialog-panel { max-height: calc(100vh - 16px); padding: 8px; }
  .yonsei-letter-dialog-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .yonsei-letter-dialog-image { max-height: 45vh; }
  .yonsei-letter-dialog-translation { font-size: 13px; }
}
