/* Time capsule flows: /record-time-capsule (one message) and
   /daily-time-capsule (a message a day). Moved out of the record page so both
   share one look (26 Nov 2026). */
.wz-header {
    padding: 8px 80px;
    gap: 48px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
}
.wz-progress-wrap { flex: 1 1 auto; }
.wz-progress-track {
    display: flex;
    align-items: center;
    height: 9px;
    box-sizing: border-box;
    padding: 2px;
    background: #fff;
    border: 0.5px solid #1D4641;
    border-radius: 999px;
    overflow: hidden;
}
.wz-progress-fill {
    height: 4px;
    width: 100%;
    border-radius: 999px;
    background: #1D4641;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.35s ease;
}
.wz-header-back {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #D4E9CA;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.wz-header-back img { transform: rotate(180deg); }
.wz-header-back:hover { background: #C2DDB4; }
.wz-header-back:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; }
@media (max-width: 767px) {
    .wz-header { padding: 8px 16px; gap: 16px; }
    .wz-header-back:not(.d-none) { display: inline-flex; }
    .wz-header-back:not(.d-none) ~ #wzLogoLink { display: none; }
}

.tc-page { background: #fff; padding: 24px 0 88px; min-height: 70vh; }
@media (min-width: 992px) { .tc-page { padding-top: 40px; } }

.tc-card { max-width: 640px; margin: 0 auto; padding: 0 16px; }

.tc-step-title {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 36px;
    letter-spacing: -0.018em;
    color: #180026;
    margin-bottom: 8px;
}
.tc-step-sub {
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #76697E;
    margin-bottom: 28px;
}

/* Nav — same pattern as the Will Builder (.wz-nav): pinned to the
   bottom of the viewport so Back/Next sit in a consistent spot. */
.tc-page { padding-bottom: 156px; }
.tc-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 16px max(16px, calc(50% - 304px)) 48px;
    box-sizing: border-box;
    background: #fff;
    z-index: 10;
}
.tc-nav .btn-secondary-dark2 {
    border: 1.5px solid #48705B;
    color: #48705B;
}
.tc-nav .btn-secondary-dark2:hover { background: rgba(72, 112, 91, 0.06); }
.tc-nav .btn-primary-dark.is-disabled { opacity: 0.5; pointer-events: none; }
@media (max-width: 767.98px) {
    .tc-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
    }
    .tc-nav #tcBack { display: none; }
    .tc-nav .btn {
        width: 100%;
        padding: 9px 16px;
        font-size: 16px;
        line-height: 22px;
    }
}

/* 2-column pairs for the two-prompt steps */
.tc-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 575.98px) { .tc-2col { grid-template-columns: 1fr; } }

/* ── Fields ── (project's own classes, not m3-field, since the flow
   uses plain-label fields with hints and multi-line textareas) */
.tc-field { min-width: 0; margin-bottom: 24px; }
.tc-label {
    display: block;
    margin: 0 0 8px;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: -0.01em;
    color: #180026;
}
.tc-req { color: #1D4641; }
.tc-opt { font-weight: 400; color: #463351; }
.tc-input + .tc-hint { margin: 8px 0 0; }
.tc-hint {
    margin: -4px 0 8px;
    font-size: 14px;
    line-height: 22px;
    color: #463351;
}
.tc-input,
.tc-select,
.tc-textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #180026;
    background-color: #FFFFFF;
    border: 1px solid #463351;
    border-radius: 8px;
    transition: transform 0.12s ease;
}
.tc-textarea { min-height: 112px; resize: vertical; line-height: 26px; }
.tc-input::placeholder,
.tc-textarea::placeholder { color: #463351; font-style: italic; opacity: 1; }
.tc-select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231D4641' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 16px;
    cursor: pointer;
}
.tc-input:hover, .tc-select:hover, .tc-textarea:hover { border-color: #1D4641; }
.tc-input:focus-visible, .tc-select:focus-visible, .tc-textarea:focus-visible {
    outline: 2px solid #1D4641;
    outline-offset: 2px;
    border-color: #1D4641;
}
.tc-input[aria-invalid="true"] { border: 2px solid #180026; }
.tc-error {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #180026;
}
.tc-error::before { content: "\26A0\FE0E"; margin-right: 6px; }
.tc-error[hidden] { display: none; }

/* ── Selector tiles: guided vs. free-write (Figma 5664:173283) ── */
.tc-tiles { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tc-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #C0BAC4;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.tc-tile:hover { border-color: #48705B; }
.tc-tile.is-selected { background: rgba(212, 233, 202, 0.2); border: 1.5px solid #48705B; }
.tc-tile-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tc-tile-input:focus-visible + .tc-tile-title { outline: 2px solid #1D4641; outline-offset: 3px; border-radius: 4px; }
.tc-tile-title { font-family: "Poppins", sans-serif; font-weight: 500; font-size: 16px; line-height: 22px; letter-spacing: -0.288px; color: #180026; }
.tc-tile-desc { font-family: "Poppins", sans-serif; font-weight: 400; font-size: 13px; line-height: 18px; letter-spacing: -0.216px; color: #463351; }

/* Mode-specific blocks on the final step */
.tc-final { min-height: 280px; }
.tc-paper.is-screen-hidden { display: none; }

/* ── Summary step: summary cards (Figma 5665:175965) ── */
.tc-sum-card {
    margin: 8px 0 24px;
    padding: 24px;
    background: #F3F7FA;
    border: 0.5px solid #DBE7EF;
    border-radius: 16px;
}
.tc-sum-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.tc-sum-title { font-family: "Poppins", sans-serif; font-weight: 500; font-size: 18px; line-height: 24px; letter-spacing: -0.324px; color: #180026; }
.tc-sum-edit {
    display: inline-flex; align-items: center; gap: 8px; padding: 2px 4px;
    background: none; border: 0; border-radius: 8px; cursor: pointer;
    font-family: "Poppins", sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; letter-spacing: -0.252px; color: #48705B;
}
.tc-sum-edit:hover { text-decoration: underline; text-underline-offset: 2px; }
.tc-sum-edit:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; }
.tc-sum-edit img { width: 16px; height: 16px; display: block; }
.tc-sum-edit:active { color: #180026; }
.tc-sum-rows { margin: 0; }
.tc-sum-row { display: flex; gap: 16px; padding: 4px 0; }
.tc-sum-row dt { flex: 0 0 160px; margin: 0; font-family: "Poppins", sans-serif; font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.252px; color: #180026; }
.tc-sum-row dd { flex: 1 1 auto; min-width: 0; margin: 0; font-family: "Poppins", sans-serif; font-weight: 400; font-size: 14px; line-height: 20px; letter-spacing: -0.252px; color: #180026; }
.tc-sum-row--letter { align-items: flex-start; }
.tc-sum-letter { font-size: 16px; line-height: 22px; letter-spacing: -0.288px; white-space: pre-wrap; }
@media (max-width: 575.98px) {
    .tc-sum-row { flex-direction: column; gap: 2px; }
    .tc-sum-row dt { flex-basis: auto; }
}

/* Ready actions + memorial buttons — full-width stacked */
.tc-ready-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.tc-ready-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 12px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
    font-family: "Poppins", sans-serif; font-weight: 500; font-size: 18px; line-height: 24px; letter-spacing: -0.324px;
    transition: background 0.12s ease, transform 0.12s ease, opacity 0.12s ease;
}
.tc-ready-btn:active { transform: scale(0.99); }
.tc-ready-btn:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; }
.tc-ready-btn .bi { font-size: 18px; }
.tc-ready-btn--primary { background: #1D4641; color: #D4E9CA; }
.tc-ready-btn--primary:hover { background: #163530; }
.tc-ready-btn--secondary { background: #D4E9CA; border-color: #1D4641; color: #1D4641; }
.tc-ready-btn--secondary:hover { background: #c7e2ba; }
.tc-ready-btn[disabled], .tc-ready-btn.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* Memorial-page callout */
.tc-memorial { padding: 24px; background: #F3F4F1; border-radius: 24px; }
.tc-memorial-title { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 20px; line-height: 28px; letter-spacing: -0.36px; color: #180026; margin: 0 0 8px; }
.tc-memorial-body { font-family: "Poppins", sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; letter-spacing: -0.252px; color: #463351; margin: 0 0 8px; }
.tc-memorial-body:last-of-type { margin-bottom: 20px; }
/* Floating-label field — same pattern as the Will Builder (.m3-field), Figma 5665:176370 */
.tc-fl-field { position: relative; margin-bottom: 24px; }
.tc-fl-input { width: 100%; min-height: 56px; padding: 16px; border: 1px solid #180026; border-radius: 12px; font-family: "Poppins", sans-serif; font-size: 16px; line-height: 24px; letter-spacing: -0.288px; color: #180026; background: #fff; outline: none; box-sizing: border-box; appearance: none; transition: border-color 0.2s; }
.tc-fl-input::placeholder { color: transparent; }
.tc-fl-input:hover { border-color: #1D4641; }
.tc-fl-input:focus { border-color: #1D4641; box-shadow: inset 0 0 0 1px #1D4641; }
.tc-fl-label { position: absolute; left: 16px; top: 16px; color: #76697E; font-family: "Poppins", sans-serif; font-size: 16px; line-height: 24px; letter-spacing: -0.288px; pointer-events: none; background: #fff; padding: 0; border-radius: 8px; transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease, padding 0.15s ease; }
.tc-fl-required { color: #FF4E68; font-size: 10px; line-height: 1; vertical-align: top; margin-left: 2px; }
.tc-fl-input:focus ~ .tc-fl-label,
.tc-fl-input:not(:placeholder-shown) ~ .tc-fl-label { top: -8px; left: 10px; font-size: 12px; line-height: 16px; color: #180026; padding: 0 4px; }
.tc-fl-input:focus ~ .tc-fl-label { color: #1D4641; }
.tc-fl-hint { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 0 16px; font-family: "Poppins", sans-serif; font-size: 12px; line-height: 16px; letter-spacing: -0.216px; color: #180026; }
.tc-fl-hint-icon { width: 16px; height: 16px; flex: 0 0 auto; background-color: currentColor; -webkit-mask: url("../icons/ic_info.svg") no-repeat center / contain; mask: url("../icons/ic_info.svg") no-repeat center / contain; }
.tc-fl-hint-url { font-weight: 500; text-decoration: underline; text-underline-position: from-font; word-break: break-all; }
.tc-post { margin-top: 4px; }

/* ── Time capsule additions ── */
.tc-card { max-width: 640px; }
.tc-step-sub strong { color: #180026; font-weight: 600; }
/* Headings take focus on each step for screen readers; no ring for that. */
.tc-step-title:focus { outline: none; }
@media (max-width: 767.98px) { .tc-prompter { max-height: 160px; font-size: 16px; line-height: 24px; } }

/* Recorder (step "record") */
.tc-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #1D4641;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.tc-stage video { width: 100%; height: 100%; object-fit: cover; background: #1D4641; }
.tc-stage video.is-live { transform: scaleX(-1); }
.tc-stage--audio { aspect-ratio: auto; min-height: 200px; flex-direction: column; gap: 16px; padding: 32px 16px; }
.tc-mic {
    width: 88px; height: 88px; border-radius: 50%;
    background: #D4E9CA;
    display: flex; align-items: center; justify-content: center;
    color: #1D4641; font-size: 36px;
    transform: scale(var(--tc-level, 1));
    transition: transform 0.08s linear;
}
.tc-stage-msg { margin: 0; padding: 0 16px; color: #D4E9CA; font-size: 14px; line-height: 20px; text-align: center; max-width: 392px; }
.tc-rec-badge {
    position: absolute; top: 12px; left: 12px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 12px; border-radius: 100px;
    background: rgba(24, 0, 38, 0.72); color: #FFFFFF;
    font-size: 14px; font-weight: 500; line-height: 20px;
}
.tc-rec-badge[hidden] { display: none; }
.tc-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #FF4E68; animation: tc-pulse 1.2s ease-in-out infinite; }
@keyframes tc-pulse { 50% { opacity: 0.35; } }
.tc-stage--audio .tc-rec-badge { position: static; }
.tc-rec-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.tc-rec-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.tc-rec-actions .btn[hidden] { display: none; }
@media (max-width: 575.98px) { .tc-rec-actions .btn { flex: 1 1 100%; justify-content: center; white-space: normal; } }
.tc-rec-note { font-size: 14px; line-height: 20px; color: #463351; margin: 0 0 16px; }
.tc-playback { width: 100%; margin-bottom: 16px; border-radius: 12px; }
.tc-playback[hidden] { display: none; }
.tc-prompter {
    max-height: 220px; overflow-y: auto;
    padding: 16px; margin-bottom: 16px;
    background: #F3F7FA; border: 0.5px solid #DBE7EF; border-radius: 12px;
    font-size: 18px; line-height: 28px; color: #180026; white-space: pre-wrap;
}
.tc-prompter[hidden] { display: none; }
.tc-prompter-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: 0.24em; text-transform: uppercase; color: #76697E; }

/* Recipients (step "who") */
.tc-person { padding: 16px; margin-bottom: 16px; border: 1px solid #C0BAC4; border-radius: 12px; }
.tc-person-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tc-person-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 24px; color: #180026; }
.tc-person .tc-field { margin-bottom: 16px; }
.tc-person .tc-field:last-child { margin-bottom: 0; }
.tc-add-person { display: inline-flex; align-items: center; gap: 8px; }
.tc-add-person[hidden] { display: none; }

/* Saved list + upgrade */
.tc-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.tc-item {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px; background: #F3F7FA; border: 0.5px solid #DBE7EF; border-radius: 12px;
}
.tc-item-main { min-width: 0; }
.tc-item-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 22px; color: #180026; }
.tc-item-meta { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: #463351; }
.tc-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.tc-usage { font-size: 14px; line-height: 20px; color: #463351; margin: 0 0 16px; }
.tc-plus {
    padding: 24px; margin-bottom: 24px;
    background: #D4E9CA; border-radius: 16px;
}
.tc-plus-title { margin: 0 0 8px; font-family: "Taviraj", serif; font-weight: 600; font-size: 24px; line-height: 32px; color: #1D4641; }
.tc-plus-price { margin: 0 0 12px; font-size: 16px; line-height: 24px; color: #180026; }
.tc-plus-price strong { font-size: 20px; }
.tc-plus ul { margin: 0 0 16px; padding-left: 20px; color: #180026; font-size: 14px; line-height: 22px; }
.tc-plus .btn { width: 100%; }
.tc-progress { height: 8px; background: #F3F7FA; border-radius: 100px; overflow: hidden; margin: 16px 0 8px; }
.tc-progress-fill { height: 100%; width: 100%; background: #1D4641; transform-origin: left center; transform: scaleX(0); transition: transform 0.2s ease; }
.tc-saving-label { font-size: 14px; line-height: 20px; color: #463351; margin: 0; }

/* Sign in (step "signin") */
.tc-terms { font-size: 14px; line-height: 20px; color: #180026; margin: 12px 0 20px; }
.tc-terms a, .tc-signin-alt a { color: #48705B; font-weight: 500; }
.tc-signin-alt { font-size: 14px; color: #180026; text-align: center; margin: 16px 0 0; }
.tc-resend { font-size: 14px; line-height: 20px; color: #180026; margin: 4px 0 16px; }
.wz-otp-row { display: flex; gap: 10px; margin: 24px 0 16px; }
.wz-otp-input {
    width: 48px; height: 56px;
    border: 1px solid #180026; border-radius: 12px;
    font-family: "Poppins", sans-serif; font-size: 24px; text-align: center; color: #180026;
    outline: none; transition: border-color 0.2s;
}
.wz-otp-input:focus { border-color: #1D4641; box-shadow: inset 0 0 0 1px #1D4641; }
.wz-otp-input.error { border-color: #180026; border-width: 2px; }
@media (max-width: 400px) { .wz-otp-input { width: 40px; } }
.tc-inline-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tc-link-btn {
    border: none; background: transparent; padding: 0;
    font-family: "Poppins", sans-serif; font-weight: 500; font-size: 14px;
    color: #48705B; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.tc-link-btn:hover { color: #1D4641; }
.tc-link-btn:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; border-radius: 4px; }
.tc-link-btn:active { color: #180026; }
.tc-callout { padding: 16px; margin: 0 0 24px; background: #F3F7FA; border-radius: 12px; font-size: 14px; line-height: 22px; color: #180026; }
.tc-callout[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
    .tc-rec-dot { animation: none; }
    .tc-mic, .tc-progress-fill { transition: none; }
}
