/* Time Capsule: the lists, the sealed card, the letter and its Home card. Mobile first (375 px).
   Every colour comes from a theme token. */

.capsule-list { display: flex; flex-direction: column; gap: var(--space-3); }
.capsule-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap); color: inherit; text-decoration: none; }
.capsule-row__body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.capsule-row__title { font-weight: 650; color: var(--text-strong); overflow-wrap: anywhere; }

/* The seal: an envelope mark. Sealed letters are a filled disc with a closed, sealed envelope;
   open letters a soft disc with an open envelope (never an empty ring, which read as a missing image). */
.capsule-seal {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
}
.capsule-seal svg { width: 24px; height: 24px; }
.capsule-seal--open { background: var(--accent-soft); color: var(--accent-strong); }
.capsule-seal--big { width: 80px; height: 80px; margin-inline: auto; }
.capsule-seal--big svg { width: 40px; height: 40px; }

.capsule-sealed { text-align: center; align-items: center; }
.capsule-sealed h1 { margin: 0; overflow-wrap: anywhere; }
.capsule-countdown { margin: 0; font-size: var(--step-h2); font-weight: 700; color: var(--accent-strong); }
.capsule-note { margin: 0; }

/* The letter: paper, a serif face, generous leading. */
.letter {
  padding: var(--space-5) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.letter__eyebrow { margin: 0; font-family: var(--font-body); font-size: var(--step-small); font-weight: 700; color: var(--accent-strong); }
.letter__title { margin: var(--space-2) 0 var(--space-1); overflow-wrap: anywhere; }
.letter__date { margin: 0 0 var(--space-4); font-family: var(--font-body); font-size: var(--step-small); }
.letter__body { max-width: var(--measure); font-size: var(--step-read); line-height: 1.7; overflow-wrap: anywhere; }
.letter__body p { margin: 0 0 1em; }
.letter__sign { margin: var(--space-4) 0 0; font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: var(--step-name); color: var(--text-strong); text-align: end; }
.letter__photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin-top: var(--space-5); }
@media (min-width: 560px) { .letter__photos { grid-template-columns: repeat(3, 1fr); } }
/* Every attached photo the same square, the same corners (no strip under a shorter one) */
.letter__photos .tile { aspect-ratio: 1; min-height: 0; border-radius: var(--radius); }
.letter__photos .tile img { height: 100%; }
.letter { max-width: 42rem; margin-inline: auto; }

.capsule-danger { color: var(--danger); }
.capsule-textarea { min-height: 14rem; font-family: Georgia, "Times New Roman", serif; line-height: 1.6; }
.capsule-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.capsule-remove { display: inline-block; margin-inline-end: var(--space-2); }

.capsule-homecard { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.capsule-homecard__text { flex: 1 1 14rem; margin: 0; font-weight: 650; }
