/* Explain: App-specific layout utilities for viewport, frame, and screen. */
.app-viewport {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
}

@keyframes ambientGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-4%, 4%) scale(1.1); }
}

.app-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--background-color);
}

.app-frame::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 20% 30%, rgba(242, 106, 33, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(234, 88, 12, 0.04) 0%, transparent 40%);
    animation: ambientGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.app-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.app-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

@keyframes brandPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 106, 33, 0.4); }
    50% { box-shadow: 0 0 12px 2px rgba(242, 106, 33, 0.15); }
}

.app-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    animation: brandPulse 3s infinite ease-in-out;
}

.app-brand__name {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-color);
}

.app-body {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 24px;
}

.app-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

@media (min-width: 640px) {
    .app-viewport {
        padding: 28px;
    }

    .app-frame {
        height: min(88dvh, 880px);
        border: 1px solid var(--border-color);
        border-radius: 34px;
        box-shadow: var(--shadow-soft), 0 0 0 10px rgba(255, 255, 255, 0.55);
    }
}