.record-photos398,
.weekly398,
.pro398-health > section {
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 8px;
  margin: 10px 0;
  padding: 10px 12px;
  min-width: 0;
}

.record-photos398 > summary {
  cursor: pointer;
  font-size: .9rem;
  font-weight: 650;
}

.photo398-body {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.photo398-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  font-size: .88rem;
}

.photo398-pick input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.photo398-status {
  font-size: .84rem;
  overflow-wrap: anywhere;
}

.photo398-status:empty,
.photo398-grid:empty,
.weekly398 [data-final398-status]:empty,
.pro398-health [data-files398-status]:empty {
  display: none;
}

.photo398-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.photo398-grid figure {
  margin: 0;
  text-align: center;
}

.photo398-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 6px;
  background: transparent;
  overflow: hidden;
  cursor: zoom-in;
}

.photo398-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo398-dialog {
  width: min(94vw, 760px);
  max-height: 94dvh;
  border: 0;
  border-radius: 8px;
  padding: 10px;
}

.photo398-dialog::backdrop {
  background: rgb(0 0 0 / .6);
}

.photo398-dialog img {
  display: block;
  max-width: 100%;
  max-height: 78dvh;
  margin: 8px auto 0;
  object-fit: contain;
}

.weekly398-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.weekly398-actions label {
  display: grid;
  gap: 4px;
}

.weekly398-actions input {
  min-width: 0;
  max-width: 100%;
}

.weekly398-sources,
.pro398-errors {
  padding: 0;
  margin: 8px 0;
  list-style: none;
}

.weekly398-sources li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line, #e5e5e5);
}

.pro398-errors li {
  display: grid;
  gap: 3px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line, #e5e5e5);
}

.weekly398-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 45vh;
  overflow: auto;
  font: inherit;
}
