.app-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: var(--app-accent, #72655a);
    content: "";
}

.app-card--flowtime { --app-accent: #4d7298; }
.app-card--leasingtracker { --app-accent: #4caf50; }
.app-card--podcasts { --app-accent: #8c7d70; }

.app-card__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.app-card__head > div {
    min-width: 0;
}

.app-card__head h3 {
    margin: 6px 0 0;
}

.app-icon {
    display: block;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border: 1px solid rgba(114, 101, 90, 0.12);
    border-radius: 18px;
    background: #fff;
    object-fit: cover;
    box-shadow: 0 14px 30px -18px rgba(44, 39, 36, 0.45);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft, #6f675f);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.35;
}

.status-pill::before {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 0 5px rgba(76, 175, 80, 0.12);
    content: "";
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-top: auto;
    padding-top: 24px;
}

.app-actions .btn,
.app-actions .button,
.test-actions .btn,
.test-actions .button,
.pod-button {
    letter-spacing: 0.01em;
    text-transform: none;
}

.app-detail-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--primary-color, var(--brown, #72655a));
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.test-note {
    margin: 16px 0 0;
    color: var(--text-soft, var(--muted, #6f675f));
    font-size: 0.9rem;
    line-height: 1.6;
}

.test-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.test-step {
    padding: 22px 20px;
    border: 1px solid rgba(114, 101, 90, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
}

.test-step strong {
    display: block;
    color: var(--primary-color, var(--brown, #72655a));
}

.test-step p {
    margin: 8px 0 0;
    font-size: 0.94rem;
}

.test-step__number {
    display: inline-grid;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-color, var(--brown, #72655a));
    color: #fff;
    font-weight: 800;
}

.test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.product-visual {
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(114, 101, 90, 0.12);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 24px 70px -34px rgba(45, 40, 36, 0.38);
}

.product-visual__feature {
    display: block;
    width: 100%;
    border-radius: 20px;
}

.product-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.product-identity strong,
.product-identity span {
    display: block;
}

.product-identity span {
    margin-top: 3px;
    color: var(--text-soft, var(--muted, #6f675f));
    font-size: 0.88rem;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.product-shot {
    min-width: 0;
    margin: 0;
}

.product-shot img {
    display: block;
    width: 100%;
    border: 1px solid rgba(114, 101, 90, 0.12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 48px -28px rgba(44, 39, 36, 0.38);
}

.product-shot figcaption {
    margin-top: 10px;
    color: var(--text-soft, var(--muted, #6f675f));
    font-size: 0.8rem;
    line-height: 1.45;
}

.app-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 16px;
    color: var(--text-soft, var(--muted, #6f675f));
    font-size: 0.88rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .product-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .test-flow {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        display: flex;
        overflow-x: auto;
        gap: 14px;
        padding: 4px 4px 18px;
        scroll-snap-type: x mandatory;
        overscroll-behavior-inline: contain;
    }

    .product-shot {
        width: min(76vw, 300px);
        flex: 0 0 min(76vw, 300px);
        scroll-snap-align: start;
    }

    .app-actions,
    .test-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .app-actions .btn,
    .app-actions .button,
    .test-actions .btn,
    .test-actions .button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .app-icon {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 16px;
    }

    .app-card__head {
        align-items: flex-start;
    }
}
