/* apps.riverma.com — self-contained, offline-first, mobile-first launcher. */
:root {
    --ink: #1e293b;
    --ink-soft: #475569;
    --ink-faint: #7c8598;
    --bg: linear-gradient(180deg, #eef1f6 0%, #e3e7ee 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    background: var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
}
body { max-width: 46rem; margin: 0 auto; padding: 1.75rem 1.05rem 2.5rem; }

/* ---------- header ---------- */
.site-header { text-align: center; margin: 0.5rem 0 1.6rem; }
.site-title { font-size: 2.9rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.site-sub { margin-top: 0.4rem; font-size: 0.98rem; font-weight: 600; color: var(--ink-soft); }
.site-lead {
    margin: 0.7rem auto 0; max-width: 32rem;
    font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); font-weight: 500;
}
.badges {
    list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
    gap: 0.4rem; margin: 1rem auto 0; max-width: 34rem;
}
.badges li { display: flex; }
.badges img { height: 20px; display: block; border-radius: 3px; }
.guide-link {
    margin-top: 1rem;
    background: #fff; color: var(--ink); border: 1px solid #d3d9e2;
    padding: 0.5rem 0.95rem; border-radius: 999px;
    font-size: 0.85rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 8px rgba(30,41,59,.08);
}
.guide-link:hover, .guide-link:focus-visible { border-color: #b9c1ce; }

/* ---------- tiles ---------- */
.tile-grid { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.7rem;
    min-height: 138px;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    overflow: hidden;
    color: #fff;
    background-color: #111;
    background-image: var(--shot);
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 22px rgba(30, 41, 59, 0.16);
}
.tile::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.35) 100%);
}
.tile-content, .tile-actions { position: relative; z-index: 1; }

.tile-title {
    display: block;
    font-size: 1.2rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    line-height: 1.15; text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.tile-desc {
    display: block; margin-top: 0.3rem; max-width: 30rem;
    font-size: 0.88rem; line-height: 1.35; color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.tile-badge {
    display: inline-block; margin-top: 0.5rem;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
    padding: 0.15rem 0.5rem; border-radius: 999px;
    background: rgba(255,255,255,0.18); color: #fff;
}
.tile-actions { display: flex; gap: 0.55rem; align-self: flex-end; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    padding: 0.5rem 1.05rem; border-radius: 999px;
    font-size: 0.85rem; font-weight: 700; cursor: pointer;
    text-decoration: none; border: 1.5px solid transparent; line-height: 1;
    transition: transform 0.12s ease, background 0.12s ease;
}
.btn .dl-ico { flex: none; margin-left: -0.15rem; }
.btn:active { transform: translateY(1px); }
.btn-open { background: #fff; color: #16233f; }
.btn-open:hover, .btn-open:focus-visible { background: #eef2f8; }
.btn-install { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-install:hover, .btn-install:focus-visible { background: rgba(255,255,255,0.22); }

/* ---------- footer ---------- */
.app-footer { text-align: center; margin-top: 2.25rem; color: var(--ink-faint); }
.app-footer .app-updated { margin: 0 0 0.6rem; font-size: 0.78rem; }
.app-footer .app-links { margin: 0; display: flex; align-items: center; justify-content: center; gap: 0.9rem; }
.app-footer .gh { color: var(--ink-soft); display: inline-flex; line-height: 0; }
.app-footer .gh:hover, .app-footer .gh:focus-visible { color: var(--ink); }
.app-footer .app-home { color: var(--ink); font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.app-footer .app-home:hover { text-decoration: underline; }
.app-footer .app-copyright { margin: 0.9rem 0 0; font-size: 0.72rem; color: var(--ink-faint); }
.app-footer .app-copyright a { color: inherit; text-decoration: underline; }
.app-footer .app-copyright a:hover { color: var(--ink-soft); }

/* ---------- install guide dialog ---------- */
.guide {
    border: 0; border-radius: 16px; padding: 0; max-width: 30rem; width: calc(100% - 2rem);
    box-shadow: 0 24px 60px rgba(0,0,0,0.3); color: var(--ink); background: #fff;
    /* Always centred, on any device; scroll internally if taller than the viewport. */
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    margin: 0; max-height: 92vh; overflow-y: auto;
}
.guide::backdrop { background: rgba(15,23,42,0.55); }
.guide-inner { padding: 1.3rem 1.4rem 1.5rem; }
.guide-head { display: flex; align-items: center; justify-content: space-between; }
.guide-head h2 { font-size: 1.2rem; }
.guide-close { border: 0; background: #eef1f6; width: 2rem; height: 2rem; border-radius: 999px; cursor: pointer; font-size: 0.9rem; color: var(--ink-soft); }
.guide-lead { margin: 0.6rem 0 0.9rem; font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }
.guide-platform { margin-top: 1rem; }
.guide-platform h3 { font-size: 0.95rem; }
.guide-platform ol { margin: 0.4rem 0 0 1.1rem; font-size: 0.88rem; line-height: 1.55; color: var(--ink-soft); }
.guide-note { margin-top: 1.1rem; font-size: 0.8rem; line-height: 1.45; color: var(--ink-faint); }
.btn-guide-done { display: block; width: 100%; margin-top: 1.2rem; background: #16233f; color: #fff; text-align: center; }
.btn-guide-done:hover, .btn-guide-done:focus-visible { background: #0f1830; color: #fff; }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
