/* Install guides. Same dark sheet as Play, Standings, and Account. */
html {
    background: #111827;
}

.install-page,
.install-page *,
.install-help-modal,
.install-help-modal * {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: #151a24;
    color: #f3f4f6;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height, 5.5rem) + env(safe-area-inset-bottom, 0px) + 1rem);
}

.install-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.install-hero {
    text-align: center;
    padding: 1.75rem 1.25rem 1.5rem;
    background: #1c2230;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    color: #f3f4f6;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    margin-bottom: 1.6rem;
}

.install-hero img.install-hero-icon {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    margin-bottom: 1rem;
    background: #fff;
}

.install-hero h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.45rem, 6vw, 1.9rem);
    letter-spacing: 0.02em;
    color: #f3f4f6;
}

.install-hero p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #d1d5db;
}

.install-hero .install-hero-badge {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.4rem 0.95rem;
    border-radius: 9999px;
    background: rgba(222, 184, 135, 0.16);
    border: 1px solid rgba(222, 184, 135, 0.35);
    color: #f5deb3;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.install-now {
    text-align: center;
    margin-bottom: 1.6rem;
}

.install-now--prompt {
    display: none;
}

.install-now--prompt.is-available {
    display: block;
}

.install-now .btn {
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
}

.install-now .btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.install-now p {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

.install-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.4rem;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.install-divider::before,
.install-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.install-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.install-steps::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 28px;
    bottom: 48px;
    width: 2px;
    background: linear-gradient(#deb887, rgba(222, 184, 135, 0.15));
}

.install-step {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 0 0 1.7rem;
}

.install-step-num {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: #deb887;
    color: #1f1408;
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}

.install-step-body {
    flex: 1;
    min-width: 0;
}

.install-step-title {
    margin: 0.45rem 0 0.35rem;
    font-size: 1.06rem;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1.35;
}

.install-step-title .key {
    display: inline-block;
    padding: 0.08em 0.5em;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f5deb3;
    white-space: nowrap;
}

.install-step-title .key-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7em;
    height: 1.7em;
    padding: 0;
    border-radius: 9999px;
    vertical-align: middle;
}

.install-step-note {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #9ca3af;
}

.install-step-help {
    appearance: none;
    display: inline;
    margin: 0 0 0.75rem;
    padding: 0;
    border: none;
    background: none;
    color: #deb887;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.install-step-help:hover,
.install-step-help:focus-visible {
    color: #f5deb3;
    outline: none;
}

.install-shot {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 0.35rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.install-shot-sm {
    width: 120px;
    border-radius: 20px;
    background: #1c2230;
    padding: 10px 12px;
    box-sizing: border-box;
}

.install-done {
    text-align: center;
    background: #1c2230;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.install-done img {
    width: 128px;
    border-radius: 22px;
    margin-bottom: 0.75rem;
    background: #151a24;
    padding: 10px 12px;
    box-sizing: border-box;
}

.install-done h2 {
    margin: 0 0 0.35rem;
    color: #f3f4f6;
    font-size: 1.35rem;
    letter-spacing: 0.03em;
}

.install-done p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #d1d5db;
}

.install-footer {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}

.install-footer .install-switch {
    font-size: 0.92rem;
    color: #9ca3af;
}

.install-footer .install-switch a {
    color: #deb887;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(135deg, #deb887 0%, #d2b48c 100%);
    color: #1f1408;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.btn:hover,
.btn:visited {
    color: #1f1408;
    background: linear-gradient(135deg, #f5deb3 0%, #deb887 100%);
}

.install-help-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    box-sizing: border-box;
    background: rgba(5, 8, 14, 0.72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.install-help-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.install-help-modal__dialog {
    position: relative;
    width: min(100%, 22rem);
    padding: 1.35rem 1.25rem 1.25rem;
    border-radius: 20px;
    background: #1c2230;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color: #f3f4f6;
    transform: translateY(10px) scale(0.97);
    transition: transform 0.2s ease;
}

.install-help-modal.is-open .install-help-modal__dialog {
    transform: translateY(0) scale(1);
}

.install-help-modal__close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.install-help-modal__close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.install-help-modal__title {
    margin: 0 2rem 0.65rem 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1.25;
}

.install-help-modal__body {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #d1d5db;
}

