/* ================================================================
   THEN VS NOW — builds on physique-rater.css (shell) and glp1-check.css
   (two-photo engine UI). Signature color: the GainFrame red, for the
   year-in-review feel of the Year in Frames card.
   ================================================================ */

.tv-body {
  --pr-amber: #e84c3d;
  --pr-amber-50: rgba(232, 76, 61, 0.10);
  --g1-teal: #d6402f;
  --g1-teal-50: rgba(232, 76, 61, 0.09);
  --g1-teal-ink: #b23223;
}
.tv-body ::selection { background: rgba(232, 76, 61, 0.2); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------- Photo grid ---------------- */

.tv-photos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
@media (min-width: 440px) { .tv-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) { .tv-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tv-photo { position: relative; display: grid; gap: 6px; min-width: 0; }
.tv-photo img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 10px; display: block; background: var(--pr-paper-2);
}
.tv-photo-tag {
  position: absolute; left: 6px; top: 6px;
  background: var(--pr-ink); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.tv-photo-remove {
  position: absolute; right: 6px; top: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.92); color: var(--pr-ink);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.tv-photo-date input {
  width: 100%; min-width: 0; box-sizing: border-box;
  font: inherit; font-size: 13px; color: var(--pr-ink);
  border: 1px solid var(--pr-line-2); border-radius: 8px;
  padding: 6px 6px; background: var(--pr-paper);
}
.tv-add {
  width: 100%; aspect-ratio: 3 / 4;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  border: 1.5px dashed var(--pr-line-2); border-radius: 10px;
  background: var(--pr-paper-2); color: var(--pr-muted);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.tv-add span { display: grid; color: var(--g1-teal); transition: transform 0.3s var(--g1-ease); }
.tv-add:hover span { transform: scale(1.12); }
.tv-add:focus-visible, .tv-photo-remove:focus-visible, .tv-body .pr-drop:focus-visible { outline: 2px solid var(--g1-teal); outline-offset: 2px; }
.tv-add:hover { border-color: var(--g1-teal); }

/* ---------------- Result ---------------- */

.tv-card { display: grid; gap: 16px; }
.tv-card-figure { margin: 0; }
.tv-card-figure img {
  width: 100%; max-width: 420px; display: block; margin: 0 auto;
  border-radius: 14px; box-shadow: var(--pr-shadow-2);
}
.tv-share { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tv-share .g1-next, .tv-share .g1-back { flex: 1 1 160px; max-width: 220px; }
.tv-ai-loading { display: flex; align-items: center; gap: 12px; }

/* ---------------- Example result ---------------- */

.tv-sample-card {
  background: #111; color: #fff; border-radius: 12px; padding: 16px;
  display: grid; gap: 4px;
}
.tv-sample-card p { margin: 0; }
.tv-sample-card-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.tv-sample-card-sub { font-size: 12px; color: #a6a6a2; font-variant-numeric: tabular-nums; }
.tv-sample-frames {
  list-style: none; margin: 10px 0 6px; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.tv-sample-frames li {
  aspect-ratio: 4 / 3; border-radius: 6px; position: relative;
  background: linear-gradient(180deg, #2b2b2b, #1c1c1c);
}
.tv-sample-frames li:first-child, .tv-sample-frames li:last-child { box-shadow: inset 0 0 0 1.5px #e84c3d; }
.tv-sample-frames span { position: absolute; left: 8px; bottom: 6px; font-size: 11px; font-weight: 700; }
.tv-sample-card-foot { font-size: 11px; color: #777774; }

@media (min-width: 1040px) {
  .g1-top-tool .tv-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g1-top:has(.g1-result) .tv-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes tv-frame-in { from { opacity: 0; transform: scale(0.86); filter: blur(4px); } }
  /* The recap fills in month by month, then the read arrives. */
  .tv-sample-frames li { animation: tv-frame-in 0.6s var(--g1-ease) backwards; }
  .tv-sample-frames li:nth-child(1) { animation-delay: 0.3s; }
  .tv-sample-frames li:nth-child(2) { animation-delay: 0.48s; }
  .tv-sample-frames li:nth-child(3) { animation-delay: 0.66s; }
  .tv-sample-frames li:nth-child(4) { animation-delay: 0.84s; }
  .tv-sample-frames li:nth-child(5) { animation-delay: 1.02s; }
  .tv-sample-frames li:nth-child(6) { animation-delay: 1.2s; }
  .tv-photo { animation: g1-photo-in 0.5s var(--g1-ease); }
}
