/* Media for the selected star sits alongside its date and message. */
.star-album {
  min-width: 0;
  margin-top: 23px;
  padding-top: 15px;
  border-top: 1px solid #d9c0c226;
}
.star-album[hidden], .star-album [hidden] { display: none !important; }
.sa-header, .sa-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sa-heading {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .12em;
  color: #ead7c9;
}
.sa-add, .sa-retry {
  min-height: 34px;
  padding: 3px 0 3px 8px;
  border: 0;
  background: transparent;
  color: #dabba9;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .04em;
}
.sa-add::before { content: '+'; display: inline-block; margin-right: 5px; font-size: 15px; }
.sa-add:hover, .sa-retry:hover { color: #ffe2c8; text-decoration: underline; text-underline-offset: 4px; }
.sa-add:disabled { color: #a89aa5; }
.sa-help, .sa-status {
  margin: 4px 0 0;
  color: #b5a3b0;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.sa-status { color: #dfbfae; white-space: pre-line; }
.sa-status:empty { display: none; }
.sa-retry { padding-left: 0; text-decoration: underline; }
.sa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 10px;
}
.sa-grid:empty { display: none; }
.sa-card { min-width: 0; margin: 0; }
.sa-card:only-child, .sa-card[data-kind='video'] { grid-column: 1 / -1; }
.sa-photo, .sa-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #e6c7bb32;
  border-radius: 9px;
  background: #171722;
}
.sa-photo {
  position: relative;
  padding: 0;
  cursor: zoom-in;
  transition: border-color .18s;
}
.sa-photo:hover, .sa-photo:focus-visible { border-color: #ddbea990; }
.sa-thumbnail { display: block; width: 100%; height: 100%; object-fit: cover; }
.sa-card:only-child .sa-photo { max-height: 250px; }
.sa-video { aspect-ratio: 16 / 9; max-height: 280px; object-fit: contain; background: #0d0e14; }
.sa-original { display: inline-block; margin-top: 4px; color: var(--peach); font-size: 12px; text-decoration: underline; }
.sa-caption { gap: 5px; min-height: 29px; color: #b9a5b5; font-size: 11px; line-height: 1.5; }
.sa-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-remove {
  flex: 0 0 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #b9a5b5;
  font-size: 19px;
  line-height: 1;
}
.sa-remove:hover { color: #f0c5bd; background: #dec1b215; }
.sa-viewer {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 72px);
  background: #14141e;
  color: #fff;
}
.sa-viewer::backdrop { background: #070912e8; }
.sa-full-photo { display: block; max-width: 100%; max-height: calc(100dvh - 72px); object-fit: contain; }
.sa-close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  min-height: 40px;
  padding: 5px 16px;
  border: 1px solid #ead2c755;
  border-radius: 20px;
  background: #191923f0;
  color: #f7e7de;
  font-size: 14px;
}
@media (pointer: coarse) {
  .sa-add, .sa-retry { min-height: 44px; }
  .sa-remove { min-height: 40px; flex-basis: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .sa-photo { transition: none; }
}
