/* Мобильное приложение: блок на главной и страница /app/.
   Основа — классы главной (index.css), здесь только то, чего там нет:
   макет телефона с главной приложения и QR для скачивания.
   Внутри телефона цвета самого приложения: серый фон, белые плитки,
   тёмная карточка подписки, приглушённые зелёный, охра и красный. */

/* ── Телефон ─────────────────────────────────────────────── */
.app-phone {
    --app-bg: #ECECEC;
    --app-tile: #FFFFFF;
    --app-ink: #141414;
    --app-muted: #6E6E73;
    --app-sage: #4E7D72;
    --app-warm: #7A5D2A;
    --app-red: #B04A4A;
    width: 100%;
    max-width: 264px;
    aspect-ratio: 9 / 18.5;
    background: #1E293B;
    border-radius: 36px;
    padding: 9px;
    flex-shrink: 0;
}

.app-phone-screen {
    height: 100%;
    background: var(--app-bg);
    border-radius: 28px;
    padding: 14px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    color: var(--app-ink);
}

.app-phone-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-phone-bar i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--app-tile);
}

.app-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.app-tile {
    background: var(--app-tile);
    border-radius: 10px;
    padding: 6px 7px;
    height: 58px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.app-tile.s2 { grid-column: span 2; }
.app-tile.s3 { grid-column: span 3; }

.app-tile--hero {
    background: linear-gradient(135deg, #141414, #2E2E2E);
    color: #F2F2F2;
}

.app-tile-head {
    font-size: 8.5px;
    font-weight: 600;
    color: var(--app-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-tile--hero .app-tile-head,
.app-tile--hero .app-tile-lab { color: rgba(242, 242, 242, 0.7); }

.app-tile-body {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-width: 0;
}

.app-tile-big {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    display: flex;
    align-items: flex-start;
    gap: 2px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.app-tile-lab {
    font-size: 8px;
    color: var(--app-muted);
    white-space: nowrap;
}

.app-tile-lines {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.app-tile-line {
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 3px;
}

.app-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.app-dot--red { background: var(--app-red); }
.app-dot--warm { background: var(--app-warm); }
.app-dot--sage { background: var(--app-sage); }

.app-tile-right { margin-left: auto; text-align: right; }
.app-tile-right .app-tile-big { font-size: 11px; justify-content: flex-end; }

/* Столбики графика: продажи вверх, отмены вниз от общей черты */
.app-chart {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 3px;
    min-height: 0;
}

.app-chart span {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-chart b { display: block; background: var(--app-sage); border-radius: 1px; }
.app-chart em { display: block; background: var(--app-red); opacity: 0.6; border-radius: 1px; margin-top: 1px; }

/* ── Блок на главной: тёмная панель справа ───────────────── */
/* Панели нужно место под телефон и колонку со скачиванием, карточкам слева
   хватает и меньшего */
.app-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }

@media (max-width: 1024px) {
    .app-grid { grid-template-columns: 1fr; }
}

.app-panel {
    flex-direction: row;
    align-items: center;
    gap: clamp(18px, 2.4vw, 32px);
}

.app-panel .app-phone { max-width: 230px; }
.app-panel .app-tile { height: 51px; }

.app-panel-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 200px;
}

.app-panel-title {
    font-size: clamp(18px, 1.5vw, 21px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0;
}

.app-panel-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.app-btn-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #FFFFFF;
    color: #0F172A;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.app-btn-light:hover { background: #E2E8F0; color: #0F172A; text-decoration: none; }

.app-btn-light svg { width: 16px; height: 16px; flex-shrink: 0; }

.app-panel-link {
    font-size: 14px;
    color: #7FB3C4;
    text-decoration: none;
}

.app-panel-link:hover { color: #FFFFFF; text-decoration: underline; }

/* QR виден только на широком экране: с телефона его не наведёшь сам на себя */
.app-qr {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-qr img {
    width: 84px;
    height: 84px;
    padding: 7px;
    background: #FFFFFF;
    border-radius: 12px;
    flex-shrink: 0;
}

.app-qr span {
    font-size: 12.5px;
    line-height: 1.5;
    color: #94A3B8;
}

@media (max-width: 1024px) {
    .app-qr { display: none; }
}

@media (max-width: 560px) {
    .app-panel { flex-direction: column; align-items: stretch; }
    .app-panel .app-phone { align-self: center; max-width: 240px; }
}

/* ── Страница /app/ ──────────────────────────────────────── */
.app-hero-visual {
    width: 100%;
    max-width: 560px;
    justify-self: center;
    background: #F1F5F9;
    border-radius: 24px;
    padding: clamp(24px, 3vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 3vw, 36px);
}

.app-hero-visual .app-qr {
    flex-direction: column;
    align-items: flex-start;
    max-width: 150px;
}

.app-hero-visual .app-qr img { width: 120px; height: 120px; padding: 0; background: transparent; border-radius: 0; }
.app-hero-visual .app-qr span { color: #64748B; }

.app-facts {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 13.5px;
    color: #64748B;
}

.app-facts b { color: #0F172A; font-weight: 600; }

@media (max-width: 560px) {
    .app-hero-visual .app-qr { display: none; }
}
