/* Brand: turquoise #1df0e5 for the logo and accents, a soft tint of it behind the pages, dark ink for text and
   a deeper teal for buttons and links (white text on it passes WCAG AA; the turquoise itself is too light for that). */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    /* Self-hosted (SIL Open Font License), so no visitor's details go to Google. */
    src: url('fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
    --fv-accent: #1df0e5;
    --fv-accent-hover: #12d6cc;
    --fv-tint: #d2fcfa;
    --fv-ink: #0b2a3c;
    --fv-teal: #08736d;
    --fv-teal-dark: #065a55;
    --fv-line: #c9eeea;
    /* Warm page background, and the light colours the relative cards rotate through. */
    --fv-page: #f5f0f0;
    --fv-mint: #b6faea;
    --fv-cream: #f7efd2;
    --fv-rose: #f0e4ec;
    --fv-muted: #3d5361;
    --fv-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --bs-primary: #08736d;
    --bs-primary-rgb: 8, 115, 109;
    --bs-link-color: #08736d;
    --bs-link-color-rgb: 8, 115, 109;
    --bs-link-hover-color: #065a55;
    --bs-link-hover-color-rgb: 6, 90, 85;
}

html, body {
    font-family: var(--fv-font);
}

body {
    background-color: var(--fv-page);
}

a, .btn-link {
    color: var(--fv-teal);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--fv-teal);
    --bs-btn-border-color: var(--fv-teal);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--fv-teal-dark);
    --bs-btn-hover-border-color: var(--fv-teal-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--fv-teal-dark);
    --bs-btn-active-border-color: var(--fv-teal-dark);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--fv-teal);
    --bs-btn-disabled-border-color: var(--fv-teal);
}

.btn-outline-primary {
    --bs-btn-color: var(--fv-teal);
    --bs-btn-border-color: var(--fv-teal);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--fv-teal);
    --bs-btn-hover-border-color: var(--fv-teal);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--fv-teal-dark);
    --bs-btn-active-border-color: var(--fv-teal-dark);
}

.btn {
    border-radius: 999px;
    font-weight: 600;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(8, 115, 109, 0.55);
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--fv-teal);
}

.form-check-input:checked {
    background-color: var(--fv-teal);
    border-color: var(--fv-teal);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--fv-teal);
    --bs-nav-link-color: var(--fv-teal-dark);
    --bs-nav-link-hover-color: var(--fv-ink);
}

/* Site layout: white top bar with the logo and menu, the page on a white card, a dark footer. */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 4px solid var(--fv-accent);
    box-shadow: 0 2px 10px rgba(11, 42, 60, 0.06);
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    max-width: 72rem;
    min-height: 4.5rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--fv-ink);
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
}

    .brand:hover {
        color: var(--fv-ink);
    }

.menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.menu-link {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    color: var(--fv-ink);
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

    .menu-link:hover {
        background: var(--fv-tint);
        color: var(--fv-ink);
    }

    .menu-link.active {
        background: var(--fv-tint);
        color: var(--fv-teal-dark);
    }

.menu-action {
    margin: 0 0 0 0.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--fv-ink);
    border-radius: 999px;
    color: var(--fv-ink);
    font: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.pill-accent {
    background: var(--fv-accent);
}

    .pill-accent:hover {
        background: var(--fv-accent-hover);
        color: var(--fv-ink);
    }

.pill-outline {
    background: #fff;
}

    .pill-outline:hover {
        background: var(--fv-tint);
    }

/* The phone menu's checkbox: hidden from view but still reachable with the keyboard. */
.menu-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.menu-button, .menu-word-close {
    display: none;
}

.menu-toggle:focus-visible + .menu-button,
.pill:focus-visible, .menu-link:focus-visible, .brand:focus-visible {
    outline: 3px solid var(--fv-teal);
    outline-offset: 2px;
}

.menu-icon {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 6px 0;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

@media (max-width: 991.98px) {
    .menu-button {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        min-height: 3rem;
        margin-left: auto;
        padding: 0.4rem 1.1rem;
        border: 2px solid var(--fv-ink);
        border-radius: 999px;
        color: var(--fv-ink);
        font-size: 1.125rem;
        font-weight: 700;
        cursor: pointer;
        user-select: none;
    }

    .menu {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        margin: 0;
        padding: 0.5rem 0 0.75rem;
        border-top: 1px solid var(--fv-line);
    }

    .menu-toggle:checked ~ .menu {
        display: flex;
    }

    .menu-toggle:checked + .menu-button {
        background: var(--fv-tint);
    }

        .menu-toggle:checked + .menu-button .menu-word-open {
            display: none;
        }

        .menu-toggle:checked + .menu-button .menu-word-close {
            display: inline;
        }

    .menu-link {
        padding: 0.85rem 1rem;
        border-radius: 0.75rem;
        font-size: 1.25rem;
        white-space: normal;
    }

    .menu-action {
        margin: 0.5rem 0 0;
    }

        .menu-action .pill {
            width: 100%;
            min-height: 3.5rem;
            font-size: 1.25rem;
        }
}

.site-main {
    flex: 1;
    width: 100%;
    max-width: 68rem;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2rem;
}

/* Pages sit straight on the warm background; white is kept for panels that need it (players, form sections). */
.site-card {
    min-width: 0;
}

@media (max-width: 575.98px) {
    .site-main {
        padding: 1rem 1rem 1.5rem;
    }
}

.site-footer {
    background: var(--fv-ink);
    border-top: 4px solid var(--fv-accent);
    color: #b9e9e6;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 2rem;
    align-items: start;
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1rem 1.5rem;
}

    .site-footer .brand {
        color: #fff;
    }

.footer-brand p {
    margin: 0.5rem 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
}

    .footer-links a {
        display: inline-block;
        padding: 0.5rem 0;
        color: #fff;
        font-weight: 600;
    }

.footer-copy {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The public Razor pages (privacy notice, invite): the same top bar, logo only. */
.public-page .site-main {
    max-width: 44rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

/* Long floating labels with large phone text: cut off with "…" rather than run off the screen. */
.form-floating > label {
    max-width: 100%;
}

/* A flex child that may hold a long name: lets it wrap instead of widening the row. */
.min-w-0 {
    min-width: 0;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Floating-label inputs (account pages and Settings): normal web size, 52px tall so the label fits above the text. */
.form-floating > .form-control,
.form-floating > .form-select {
    height: 3.25rem;
    min-height: 3.25rem;
    padding: 1.3rem 0.9rem 0.3rem;
    font-size: 1rem;
}

    /* Bootstrap adds more padding once there's text; keep it to what fits the shorter box. */
    .form-floating > .form-control:focus,
    .form-floating > .form-control:not(:placeholder-shown),
    .form-floating > .form-control:-webkit-autofill {
        padding-top: 1.3rem;
        padding-bottom: 0.3rem;
    }

.form-floating > label {
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    color: #555;
}

/* Account pages (register, log in, forgot password...) and the invite page: used by family members, so normal
   website sizes (17px text, 44px buttons). Only the recording page and the privacy notice keep 20px+ text. */
.auth-page {
    max-width: 30rem;
    margin: 0.5rem auto 2rem;
    font-size: 1.0625rem;
}

    .auth-page h1 {
        font-size: 1.75rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .auth-page .lead {
        font-size: 1.125rem;
        color: #333;
        margin-bottom: 1.5rem;
    }

    .auth-page .btn-lg {
        min-height: 2.75rem;
        font-size: 1.0625rem;
        font-weight: 600;
    }

    .auth-page .validation-message,
    .auth-page .validation-errors,
    .auth-page .alert {
        font-size: 1rem;
    }

    .auth-page .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        float: none;
        margin-left: 0;
        margin-top: 0;
        margin-right: 0.6rem;
    }

    .auth-page .form-check {
        display: flex;
        align-items: center;
        padding-left: 0;
        min-height: 2.75rem;
    }

    .auth-page .auth-links {
        list-style: none;
        padding: 0;
        margin: 1.5rem 0 0;
    }

        .auth-page .auth-links a {
            display: inline-block;
            padding: 0.5rem 0;
        }

/* The privacy notice: read by storytellers too (linked from the recording page), so it keeps 20px+ text. */
.auth-page.privacy-notice {
    max-width: 34rem;
    font-size: 1.25rem;
}

    .auth-page.privacy-notice h1 {
        font-size: 2.25rem;
    }

    .auth-page.privacy-notice .lead {
        font-size: 1.375rem;
    }

    .auth-page.privacy-notice .btn-lg {
        min-height: 4rem;
        font-size: 1.375rem;
    }

.privacy-notice h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
}

.privacy-notice li {
    margin-bottom: 0.5rem;
}

/* Settings: the heading above the side menu. */
.settings-title {
    font-size: 1.875rem;
    font-weight: 700;
}

/* Settings → Your data. "Delete my account…" opens the confirmation form. */
.your-data {
    max-width: 36rem;
    font-size: 1rem;
    overflow-wrap: break-word;
}

    .your-data .btn-lg {
        min-height: 2.75rem;
        font-size: 1.0625rem;
    }

.delete-account summary {
    list-style: none;
}

    .delete-account summary::-webkit-details-marker {
        display: none;
    }

.delete-account[open] summary {
    display: none;
}

/* Logged-in pages: normal website sizes (17px text, 44px inputs and buttons). */
.app-page {
    max-width: 52rem;
    font-size: 1.0625rem;
    padding-bottom: 1rem;
    /* Long names and email addresses break rather than run off a phone screen. */
    overflow-wrap: break-word;
}

    .app-page h1 {
        font-size: 1.875rem;
        font-weight: 700;
    }

    .app-page h2 {
        font-size: 1.375rem;
        font-weight: 600;
    }

    .app-page .lead {
        font-size: 1.125rem;
        color: #333;
    }

    .app-page .form-control,
    .app-page .form-select {
        min-height: 2.75rem;
        font-size: 1rem;
    }

    .app-page .btn {
        min-height: 2.75rem;
        font-size: 1rem;
    }

    .app-page .btn-lg {
        min-height: 2.75rem;
        font-size: 1.0625rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .app-page .form-label {
        font-weight: 600;
    }

    .app-page .form-check {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        min-height: 2.75rem;
        padding-left: 0;
    }

    .app-page .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin: 0;
        flex-shrink: 0;
    }

    .app-page .validation-message,
    .app-page .validation-errors {
        font-size: 1rem;
    }

.form-section {
    border: 1px solid #e6dcdc;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1.25rem 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
}

    .form-section legend {
        font-size: 1.2rem;
        font-weight: 600;
        float: none;
        width: auto;
        padding: 0 0.5rem;
        margin: 0 0 0.5rem -0.5rem;
    }

.form-hint, .optional {
    color: #555;
    font-weight: normal;
}

.more-details summary {
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 2.75rem;
    display: list-item;
}

.family-row {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.danger-zone {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.storyteller-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--fv-tint);
    color: var(--fv-teal-dark);
    font-weight: 700;
    font-size: 1.4rem;
}

.storyteller-avatar-lg {
    width: 5.5rem;
    height: 5.5rem;
    font-size: 2rem;
}

.storyteller-grid {
    display: grid;
    /* min(): with large phone text 16rem is wider than the screen. */
    grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
    gap: 0.75rem;
}

/* Each relative gets a light colour, in turn mint, yellow and pink. */
.storyteller-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border: 2px solid transparent;
    border-radius: 1rem;
    color: var(--fv-ink);
    text-decoration: none;
    background: var(--fv-mint);
}

    .storyteller-card:nth-child(3n+2) {
        background: var(--fv-cream);
    }

    .storyteller-card:nth-child(3n) {
        background: var(--fv-rose);
    }

    .storyteller-card:hover, .storyteller-card:focus {
        color: var(--fv-ink);
        border-color: var(--fv-teal);
    }

    .storyteller-card .storyteller-avatar {
        background: #fff;
    }

.storyteller-card-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.storyteller-card-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.storyteller-card-meta {
    color: var(--fv-muted);
    font-size: 0.95rem;
}

.storyteller-card-go {
    font-size: 1.5rem;
    color: var(--fv-teal-dark);
}

.empty-state {
    padding: 2rem;
    border: 2px dashed #ccd;
    border-radius: 0.75rem;
    color: #444;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-list {
    display: grid;
    /* minmax(0, ...): a long email address wraps instead of widening the page. */
    grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
    gap: 0.5rem 1.5rem;
}

    .detail-list dt {
        font-weight: 600;
        color: #444;
    }

    .detail-list dd {
        margin: 0;
        white-space: pre-line;
    }

@media (max-width: 575.98px) {
    .detail-list {
        grid-template-columns: minmax(0, 1fr);
    }

        .detail-list dd {
            margin-bottom: 0.5rem;
        }
}

.family-list {
    padding-left: 1.25rem;
}

/* Story requests */
.question-quote {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0.25rem 0 0.5rem;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

    .choice .form-check-input {
        width: 1.5rem;
        height: 1.5rem;
        margin-top: 0.2rem;
        flex-shrink: 0;
    }

.choice-label {
    font-weight: 600;
    cursor: pointer;
}

.choice-detail {
    margin: 0 0 0.75rem 2.25rem;
}

.message-preview {
    background: #f4f6f9;
    border-left: 4px solid var(--fv-accent);
    padding: 1rem 1.25rem;
    margin: 0;
}

.link-panel {
    border: 2px solid #26b050;
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: #f3fbf5;
}

.link-box {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 1rem !important;
}

.open-request {
    border: 1px solid #f0c36d;
    background: #fff9ec;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.request-history {
    list-style: none;
    padding: 0;
}

    .request-history li {
        display: flex;
        flex-direction: column;
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }

.storyteller-card-badge {
    align-self: flex-start;
    margin-top: 0.25rem;
    padding: 0.1rem 0.6rem;
    border-radius: 1rem;
    background: #fff;
    color: #7a4e00;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Dashboard: greeting with a one-line summary, the relatives, then the stories in white panels. */
.app-page.dashboard {
    max-width: none;
}

.dashboard-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

    .dashboard-head h1 {
        margin: 0;
    }

.dashboard-summary {
    margin: 0.15rem 0 0;
    color: var(--fv-muted);
}

.app-page h2.dashboard-heading {
    margin: 0 0 0.6rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
    gap: 0.75rem;
    align-items: start;
    margin-top: 1.25rem;
}

.panel {
    min-width: 0;
    padding: 1rem 1.15rem 0.5rem;
    background: #fff;
    border-radius: 1rem;
}

    .app-page .panel h2 {
        margin: 0 0 0.25rem;
        font-size: 1.25rem;
        font-weight: 700;
    }

    .panel .story-item:last-child {
        border-bottom: 0;
    }

    .panel .stage-heading {
        margin-top: 0.75rem;
    }

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.question-category summary {
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
}

.question-list li {
    padding: 0.4rem 0;
}

.btn-whatsapp {
    background: #1a7f37;
    color: #fff;
    font-weight: 600;
}

    .btn-whatsapp:hover, .btn-whatsapp:focus {
        background: #146c2e;
        color: #fff;
    }

.also-send {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #cfe9d6;
}

/* Family and sharing */
.person-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #eee;
}

.person-name {
    font-weight: 600;
    font-size: 1.15rem;
}

.shared-notes {
    white-space: pre-line;
}

.shared-group {
    margin-bottom: 1.5rem;
}

/* Stories (recordings) */
.stage-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fv-teal-dark);
    border-bottom: 2px solid var(--fv-tint);
    padding-bottom: 0.35rem;
    margin: 1.25rem 0 0.5rem;
}

.story-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #efe7e7;
}

.story-title {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

    .story-title:hover {
        text-decoration: underline;
    }

.story-meta {
    color: #555;
    margin: 0.25rem 0 0.6rem;
}

.story-audio {
    display: block;
    width: 100%;
    height: 3.25rem;
}

.story-video {
    display: block;
    width: 100%;
    max-height: 60vh;
    background: #000;
    border-radius: 0.75rem;
}

.story-open {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    padding: 0.5rem 0;
    font-weight: 600;
}

/* Simple landing page */
.landing {
    max-width: 44rem;
    margin: 1.5rem auto;
    font-size: 1.125rem;
}

    .landing h1 {
        font-size: clamp(2rem, 5vw, 3rem);
        font-weight: 800;
        letter-spacing: -0.02em;
        line-height: 1.15;
    }

    .landing .hero-logo {
        display: block;
        width: 5rem;
        height: 5rem;
        margin-bottom: 1rem;
    }

    .landing .btn-lg {
        min-height: 3rem;
        font-size: 1.125rem;
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
