/* One person's page: her photos, her reports with their reading and swatches, her events and errors. */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
}

.photo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.photo figcaption {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
}

.photo figcaption .muted {
  font-size: 11.5px;
}

.thumb {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-hover);
  cursor: zoom-in;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-small {
  width: 40px;
  height: 52px;
  border-radius: 7px;
}

.thumb-tall {
  width: 100%;
  aspect-ratio: 3 / 4;
}

.thumb-portrait {
  width: 132px;
  aspect-ratio: 3 / 4;
  flex: none;
}

.thumb-fill {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius) var(--radius) 0 0;
}

.thumb.is-empty {
  cursor: default;
}

.thumb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 4px;
  color: var(--ink-3);
  font-size: 11px;
  text-align: center;
}

.thumb-small .thumb-empty span {
  display: none;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-item {
  display: flex;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.report-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.report-main {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 8px 24px;
  min-width: 0;
}

.report-line {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
}

.reading {
  min-width: 0;
}

.reading-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.reading-season {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.reading-korean {
  font-size: 13px;
  color: var(--ink-2);
}

.reading-facts {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.reading-signature {
  margin-top: 8px;
  font-size: 12.5px;
}

.measured {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.measured-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swatch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.swatch .swatch-chip {
  width: 100%;
  height: 30px;
  border-radius: 7px;
}

.swatch.is-signature .swatch-chip {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3.5px var(--ink-2);
}

.swatch-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.swatch-name {
  overflow: hidden;
  font-size: 11px;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline {
  max-height: 420px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 2px 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.timeline-time {
  color: var(--ink-3);
  font-size: 12px;
}

.timeline-name {
  font-weight: 550;
}

.timeline-props {
  grid-column: 2;
  overflow-wrap: anywhere;
  color: var(--ink-3);
  font-size: 12px;
}

.error-list,
.recent-list,
.device-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.error-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.error-item:last-child {
  border-bottom: 0;
}

.error-message {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.error-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
}

@media (max-width: 860px) {
  .report-item {
    flex-direction: column;
  }

  .report-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .thumb-portrait {
    width: 140px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-props {
    grid-column: 1;
  }
}
