/* App detail — wireframe 1d. Mobile-first: the install picker is the primary
   decision, with proof and version info below it. */

.det-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.det-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.det-back {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.det-share {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}

.det-share:hover {
    border-color: var(--accent-blue);
}

.det-empty {
    color: var(--text-muted);
}

/* ---------- Head ---------- */

.det-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
}

.det-icon img,
.det-icon-placeholder {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
}

.det-name {
    margin: 0 0 0.2rem;
    font-size: 1.4rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.det-meta,
.det-subtitle {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.det-subtitle {
    margin-top: 0.2rem;
}

.det-get {
    padding: 0.55rem 1.5rem;
    border-radius: 999px;
    background: var(--accent-blue);
    color: #08111f;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.det-get:hover {
    text-decoration: none;
    filter: brightness(1.08);
}

/* ---------- Install picker (the 1d focal point) ---------- */

.det-install {
    padding: 1.15rem;
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(74, 158, 255, 0.12), rgba(255, 255, 255, 0.02));
}

.det-install-heading {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    scroll-margin-top: 80px;
}

.det-install-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.det-install-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.85rem 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: 13px;
    background: var(--card-bg);
    color: var(--text);
    text-align: center;
    text-decoration: none;
}

.det-install-option:hover {
    text-decoration: none;
    border-color: var(--accent-blue);
}

.det-install-option-recommended {
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.14);
}

.det-install-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.det-install-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
}

.det-install-note {
    margin: 0.85rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ---------- Screenshots ---------- */

.det-shots-track {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
}

.det-shots-track::-webkit-scrollbar {
    display: none;
}

.det-shots-track img {
    flex: none;
    width: 170px;
    scroll-snap-align: start;
    border-radius: 14px;
    border: 1px solid var(--card-border);
}

/* ---------- About ---------- */

.det-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.55rem;
}

.det-section-title {
    margin: 0;
    font-size: 1rem;
}

.det-more {
    border: 0;
    background: none;
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.det-about-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.det-about-body.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Versions ---------- */

.det-version-list {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    border: 1px solid var(--card-border);
    border-radius: var(--dir-radius);
    background: var(--card-bg);
    overflow: hidden;
}

.det-version-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid var(--card-border);
}

.det-version-row:last-child {
    border-bottom: 0;
}

.det-version-num {
    font-size: 0.9rem;
    font-weight: 600;
}

.det-version-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.det-version-dl {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.det-version-dl-off {
    color: var(--text-muted);
    font-weight: 400;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .det-main {
        padding-bottom: calc(var(--dir-tabbar-h) + 2rem);
    }
}

@media (max-width: 520px) {
    .det-head {
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 0.85rem;
    }

    /* Get spans the full width under the title block on phones. */
    .det-get {
        grid-column: 1 / -1;
        text-align: center;
    }

    .det-install-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
