*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== THEME VARIABLES ===== */
:root {
    --accent: #2D6BA8;
    --accent-light: #7CB8E4;
    --accent-warm: #4CAF50;
    --radius: 16px;
    --radius-sm: 10px;
}

[data-theme="light"] {
    --bg: #F7F8FA;
    --bg-alt: #ffffff;
    --text: #1A2332;
    --text-secondary: #5A6A7A;
    --surface: #ffffff;
    --surface-card: #F2F5F8;
    --nav-bg: rgba(247, 248, 250, 0.85);
    --border: rgba(26, 35, 50, 0.1);
    /* Widget colors — light app theme */
    --w-bg: #F2F5F8;
    --w-text: #1A2332;
    --w-text-secondary: #5A6A7A;
    --w-accent: #2D6BA8;
    --w-progress-track: #E8EDF2;
    --w-progress-fill: #2D6BA8;
    /* Phone mockup */
    --phone-body: #1A1E25;
    --phone-screen-bg: #F7F8FA;
    --phone-screen-text: #1A2332;
    --phone-screen-secondary: #5A6A7A;
    /* Material 3 palette — mirrors DefaultThemeColors.Light from the app */
    --md-primary: #2D6BA8;
    --md-on-primary: #FFFFFF;
    --md-primary-container: #CDE3F8;
    --md-on-primary-container: #0E2B47;
    --md-secondary: #388E3C;
    --md-on-secondary: #FFFFFF;
    --md-secondary-container: #C8E6C9;
    --md-on-secondary-container: #1B3A1B;
    --md-tertiary: #E65100;
    --md-error: #D32F2F;
    --md-background: #F7F8FA;
    --md-on-background: #1A1A1A;
    --md-surface: #FFFFFF;
    --md-on-surface: #1A1A1A;
    --md-surface-variant: #EDEFF2;
    --md-on-surface-variant: #50545C;
    --md-outline: #BFC4CC;
    --md-outline-variant: #D9DCE0;
}

[data-theme="dark"] {
    --bg: #0F1114;
    --bg-alt: #161A20;
    --text: #E0E8F0;
    --text-secondary: #8A9AB0;
    --surface: #1A1E25;
    --surface-card: #161A20;
    --nav-bg: rgba(15, 17, 20, 0.85);
    --border: rgba(224, 232, 240, 0.08);
    /* Widget colors — dark app theme */
    --w-bg: #0F1114;
    --w-text: #E0E8F0;
    --w-text-secondary: #8A9AB0;
    --w-accent: #5B9BD5;
    --w-progress-track: #1A1E25;
    --w-progress-fill: #5B9BD5;
    /* Phone mockup */
    --phone-body: #0a0c0e;
    --phone-screen-bg: #0F1114;
    --phone-screen-text: #E0E8F0;
    --phone-screen-secondary: #8A9AB0;
    /* Material 3 palette — mirrors DefaultThemeColors.Dark from the app */
    --md-primary: #5B9BD5;
    --md-on-primary: #FFFFFF;
    --md-primary-container: #274C75;
    --md-on-primary-container: #CDE3F8;
    --md-secondary: #4CAF50;
    --md-on-secondary: #FFFFFF;
    --md-secondary-container: #1B3A1B;
    --md-on-secondary-container: #A5D6A7;
    --md-tertiary: #FF9800;
    --md-error: #E57373;
    --md-background: #0F0F0F;
    --md-on-background: #E8E8E8;
    --md-surface: #1A1A1A;
    --md-on-surface: #E8E8E8;
    --md-surface-variant: #252525;
    --md-on-surface-variant: #B0B0B0;
    --md-outline: #404040;
    --md-outline-variant: #303030;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ===== NAV ===== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--nav-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.3s, background 0.3s;
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(45, 107, 168, 0.1); }
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 1.2rem; color: var(--accent); text-decoration: none;
}
.nav-logo .madi-logo-img { height: 26px; }
.madi-logo-img { width: auto; display: block; }
[data-theme="dark"] .madi-logo-img { filter: invert(1) brightness(1.08); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--surface-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s;
    color: var(--text);
}
.theme-toggle:hover { background: var(--surface); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.theme-toggle-wrap { position: relative; }
.theme-tooltip {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--text); color: var(--bg);
    padding: 6px 14px; border-radius: 8px;
    font-size: 0.78rem; font-weight: 500; white-space: nowrap;
    opacity: 0; transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}
.theme-tooltip::before {
    content: ''; position: absolute; bottom: 100%; right: 16px;
    border: 6px solid transparent;
    border-bottom-color: var(--text);
}
.theme-tooltip.visible {
    opacity: 1; transform: translateY(0);
}
.nav-cta {
    background: var(--accent); color: #fff;
    padding: 10px 22px; border-radius: 50px;
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(45, 107, 168, 0.35); }

/* ===== UTILITIES ===== */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800;
    text-align: center; margin-bottom: 16px;
}
.section-subtitle {
    text-align: center; color: var(--text-secondary);
    font-size: 1.05rem; max-width: 560px; margin: 0 auto 56px;
}

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== HERO ===== */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding-top: 80px; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(45, 107, 168, 0.12) 0%, transparent 70%);
    top: -100px; right: -150px; pointer-events: none;
}
.hero .container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(45, 107, 168, 0.1); color: var(--accent);
    padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800;
    line-height: 1.15; margin-bottom: 20px;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 36px; max-width: 460px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--accent); color: #fff;
    padding: 14px 32px; border-radius: 50px; text-decoration: none;
    font-weight: 600; font-size: 1rem; border: none; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(45, 107, 168, 0.35); }
.btn-primary svg { width: 22px; height: 22px; }
.btn-store {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--surface); color: var(--text);
    padding: 12px 16px; border-radius: 14px; text-decoration: none;
    border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s;
}
.btn-store:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.btn-store svg { width: 28px; height: 28px; flex-shrink: 0; }
.btn-store-text { text-align: left; line-height: 1.2; }
.btn-store-text small { font-size: 0.7rem; opacity: 0.7; }
.btn-store-text strong { font-size: 0.95rem; display: block; }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--text);
    padding: 14px 28px; border-radius: 50px; text-decoration: none;
    font-weight: 600; font-size: 1rem; border: 2px solid var(--border);
    transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent-light); }

.store-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }


/* ===== FEATURES ===== */
.features-section { background: var(--bg); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 36px 28px; transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(45, 107, 168, 0.1); }
.feature-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, rgba(45,107,168,0.12), rgba(124,184,228,0.12));
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.feature-icon svg { width: 24px; height: 24px; color: var(--accent); }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }


/* ===== CTA ===== */
.cta-section {
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    color: #fff; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -100px; right: -100px;
}
.cta-section .section-title { color: #fff; }
.cta-stat { font-size: 1.1rem; opacity: 0.9; margin-bottom: 36px; }
.cta-stat strong { font-size: 1.4rem; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-white {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: #fff; color: var(--accent);
    padding: 14px 28px; border-radius: 50px; text-decoration: none;
    font-weight: 700; font-size: 1rem;
    width: 180px; max-width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn-white svg { width: 22px; height: 22px; }
.btn-white-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: transparent; color: #fff;
    padding: 14px 28px; border-radius: 50px; text-decoration: none;
    font-weight: 700; font-size: 1rem;
    width: 180px; max-width: 100%;
    border: 2px solid rgba(255,255,255,0.4);
    transition: transform 0.2s, border-color 0.2s;
}
.btn-white-outline:hover { transform: translateY(-2px); border-color: #fff; }
.btn-white-outline svg { width: 22px; height: 22px; }


/* ===== FOOTER ===== */
.footer {
    background: var(--bg-alt); color: var(--text);
    padding: 48px 0 32px; border-top: 1px solid var(--border);
}
.footer-content {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 24px;
}
.footer-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 1.1rem; color: var(--accent);
}
.footer-logo .madi-logo-img { height: 22px; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.9rem; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 40px; height: 40px; background: var(--surface);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); text-decoration: none;
    transition: background 0.2s, color 0.2s; border: 1px solid var(--border);
}
.footer-social a:hover { background: rgba(45, 107, 168, 0.1); color: var(--accent); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
    text-align: center; margin-top: 36px; padding-top: 24px;
    border-top: 1px solid var(--border); font-size: 0.8rem; opacity: 0.5;
}

/* ===== STORE BUTTON: TELEGRAM ===== */
.btn-store-tg:hover {
    border-color: rgba(42, 171, 238, 0.4);
}

/* ===== PLATFORMS SECTION ===== */
.platforms-section { background: var(--bg-alt); }
.platforms-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 28px; align-items: stretch;
}
.platform-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column;
    position: relative;
}
.platform-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(45, 107, 168, 0.12);
}
.platform-tag {
    position: absolute;
    top: -10px; right: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    color: #fff;
    font-size: 0.65rem; font-weight: 700;
    padding: 4px 12px; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.6px;
    box-shadow: 0 6px 16px rgba(45, 107, 168, 0.3);
    z-index: 2;
}
.platform-device {
    height: 260px;
    border-radius: var(--radius-sm);
    background: var(--md-background);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 22px;
    position: relative;
    display: flex; flex-direction: column;
    transition: background 0.3s;
}

/* Device: Phone — full app screen, no chrome */
.device-phone {
    background: var(--md-background);
}

/* Device: Browser */
.device-browser {
    background: var(--md-background);
}
.dev-browser-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.dev-browser-dots { display: flex; gap: 4px; flex-shrink: 0; }
.dev-browser-dots span {
    width: 7px; height: 7px; border-radius: 50%;
}
.dev-browser-dots span:nth-child(1) { background: #FF5F57; }
.dev-browser-dots span:nth-child(2) { background: #FFBD2E; }
.dev-browser-dots span:nth-child(3) { background: #28C940; }
.dev-browser-url {
    flex: 1;
    background: var(--bg);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.7rem; font-weight: 500;
    color: var(--text);
    display: flex; align-items: center; gap: 5px;
    border: 1px solid var(--border);
    min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dev-browser-url svg {
    width: 10px; height: 10px;
    color: var(--accent-warm);
    flex-shrink: 0;
}
.dev-browser-content {
    flex: 1; min-height: 0;
    overflow: hidden;
    background: var(--md-background);
}

/* Device: Telegram — softened header */
.device-telegram {
    background: var(--md-background);
}
.dev-tg-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #5BB3E8, #4EA0CC);
    color: #fff;
    flex-shrink: 0;
}
[data-theme="dark"] .dev-tg-header {
    background: linear-gradient(135deg, #3E7FA8, #356C8E);
}
.dev-tg-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dev-tg-avatar svg { width: 15px; height: 15px; color: #fff; }
.dev-tg-info { line-height: 1.2; min-width: 0; }
.dev-tg-info strong { font-size: 0.75rem; font-weight: 700; display: block; color: #fff; }
.dev-tg-info span {
    font-size: 0.6rem; opacity: 0.9; display: block;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dev-tg-content {
    flex: 1; min-height: 0;
    overflow: hidden;
    background: var(--md-background);
}

/* Card content */
.platform-item h3 {
    font-size: 1.15rem; font-weight: 700;
    margin-bottom: 8px;
}
.platform-item > p {
    font-size: 0.9rem; color: var(--text-secondary);
    line-height: 1.5; margin-bottom: 16px;
    flex: 1;
}
.platform-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent); text-decoration: none;
    font-weight: 600; font-size: 0.92rem;
    align-self: flex-start;
    transition: gap 0.2s;
}
.platform-link svg {
    width: 16px; height: 16px;
    transition: transform 0.2s;
}
.platform-link:hover { gap: 10px; }
.platform-link:hover svg { transform: translateX(2px); }

/* ===== COMPARISON SECTION ===== */
.comparison-section { background: var(--bg); }
.comparison-table-wrap {
    margin-top: 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}
.comparison-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.comparison-table th,
.comparison-table td {
    padding: 7px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table thead th {
    background: var(--surface-card);
    padding: 9px 12px;
    font-weight: 700;
}
.comparison-table tbody td.cmp-feature {
    text-align: left;
    background: var(--surface-card);
    color: var(--text);
    font-weight: 500;
    min-width: 220px;
    position: sticky; left: 0; z-index: 1;
}
.comparison-table thead th.cmp-corner {
    text-align: left;
    vertical-align: middle;
    position: sticky; left: 0; z-index: 2;
}
.cmp-corner-logo { height: 34px; margin-bottom: 8px; }
.cmp-corner-slogan {
    display: block;
    font-size: 0.82rem; font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.cmp-product-name { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.cmp-product-platform {
    margin-top: 4px;
    font-size: 0.7rem; font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

/* Highlighted MadiEasy column */
.comparison-table .cmp-col-mine { background: rgba(45, 107, 168, 0.10); }
.comparison-table .cmp-mine     { background: rgba(45, 107, 168, 0.06); }
[data-theme="dark"] .comparison-table .cmp-col-mine { background: rgba(91, 155, 213, 0.16); }
[data-theme="dark"] .comparison-table .cmp-mine     { background: rgba(91, 155, 213, 0.08); }
.cmp-col-mine .cmp-product-name { color: var(--accent); font-size: 1.05rem; font-weight: 800; }
.cmp-product-tag {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.62rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--accent);
    background: rgba(45, 107, 168, 0.14);
    padding: 2px 9px; border-radius: 50px;
}
[data-theme="dark"] .cmp-product-tag { background: rgba(91, 155, 213, 0.20); }

/* Cell markers */
.cmp-cell { font-weight: 700; }
.cmp-cell.cmp-yes  { color: #2E7D32; font-size: 1.15rem; }
.cmp-cell.cmp-no   { color: var(--text-secondary); opacity: 0.5; font-size: 1.05rem; }
.cmp-cell.cmp-partial { color: var(--text-secondary); font-size: 0.82rem; font-weight: 600; }
.cmp-cell.cmp-yes-text { color: var(--text); font-size: 0.85rem; font-weight: 700; }
.cmp-mine.cmp-yes-text { color: var(--accent); }
[data-theme="dark"] .cmp-cell.cmp-yes { color: #66BB6A; }

/* Summary block */
.comparison-summary {
    margin-top: 36px;
    display: flex; flex-direction: column;
    gap: 14px;
}
.comparison-summary p {
    margin: 0;
    padding: 9px 22px;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius-sm);
}
.comparison-summary p strong { font-weight: 800; color: var(--text); }
.cmp-emph {
    font-weight: 700;
    color: #C62828;
    background: rgba(211, 47, 47, 0.10);
    padding: 1px 7px;
    border-radius: 4px;
}
[data-theme="dark"] .cmp-emph {
    color: #EF9A9A;
    background: rgba(229, 115, 115, 0.16);
}
.comparison-summary p.cmp-summary-mine {
    border-left-color: var(--accent);
    background: linear-gradient(135deg, rgba(45, 107, 168, 0.08), rgba(124, 184, 228, 0.04));
}
[data-theme="dark"] .comparison-summary p.cmp-summary-mine {
    background: linear-gradient(135deg, rgba(91, 155, 213, 0.12), rgba(124, 184, 228, 0.06));
}
.cmp-summary-mine strong { color: var(--accent); }
.cmp-emph-mine {
    font-weight: 700;
    color: var(--accent);
}


/* ===== NAV LINKS ===== */
.nav-links { display: flex; gap: 22px; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.9rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ===================================================================
   APP MOCK — зеркало webapp/styles/screens.css (MadiEasy).
   Цвета берутся из --md-*; блок с другой темой переопределяет их inline.
   =================================================================== */
.phone {
    --pw: 300px;
    width: var(--pw); aspect-ratio: 9 / 19.2;
    background: var(--phone-body);
    border-radius: 40px; padding: 10px;
    box-shadow: 0 40px 80px rgba(45, 107, 168, 0.18), 0 10px 30px rgba(0,0,0,0.08);
    position: relative; flex-shrink: 0;
}
.phone::before {
    content: ''; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
    width: 70px; height: 20px; background: #000; border-radius: 12px; z-index: 3;
}
.phone-sm { --pw: 230px; border-radius: 32px; padding: 8px; }
.phone-sm::before { top: 14px; width: 54px; height: 15px; }
.phone .ma { zoom: 0.86; }
.phone-sm .ma { zoom: 0.68; }
.screen {
    width: 100%; height: 100%; border-radius: 31px; overflow: hidden;
    background: var(--md-background); position: relative;
}
.phone-sm .screen { border-radius: 25px; }

.ma {
    height: 100%; display: flex; flex-direction: column;
    background: var(--md-background); color: var(--md-on-surface);
    font-family: Roboto, 'Inter', system-ui, sans-serif; line-height: 1.35;
    padding-top: 40px; overflow: hidden; text-align: left;
    transition: background 0.4s, color 0.4s;
}
.ma * { transition: background-color 0.4s, color 0.4s, border-color 0.4s; }
.ma-flat { padding-top: 0; }

/* TopBar */
.ma-top {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 6px 6px 16px; min-height: 52px;
    background: var(--md-surface);
}
.ma-top.has-back { padding-left: 4px; }
.ma-titles { flex: 1; min-width: 0; }
.ma-title { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-sub { font-size: 12px; color: var(--md-on-surface-variant); }
.ma-ic {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; color: var(--md-on-surface-variant);
}
.ma-ic svg { width: 21px; height: 21px; fill: currentColor; }
.ma-ic.pri { color: var(--md-primary); }

/* Полоса дней */
.ma-dates {
    display: flex; gap: 6px; padding: 18px 8px 8px;
    background: var(--md-surface); overflow: hidden;
}
.ma-date {
    position: relative; flex: 1 1 0; min-width: 0; text-align: center;
    padding: 10px 6px; border-radius: 10px;
    background: var(--md-surface-variant); color: var(--md-on-surface-variant);
    font-size: 11px; white-space: nowrap;
}
.ma-date.cur { flex-grow: 1.6; background: var(--md-primary); color: var(--md-on-primary); font-size: 13px; font-weight: 700; }
.ma-date.sun { color: var(--md-error); }
.ma-date span { display: block; overflow: hidden; text-overflow: ellipsis; }
.ma-cnt {
    position: absolute; left: 50%; top: -15px; transform: translateX(-50%);
    width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
    font-size: 12px; font-weight: 700;
    background: var(--md-surface); color: var(--md-primary);
    box-shadow: inset 0 0 0 1.5px var(--md-primary);
}
.ma-date.cur .ma-cnt { background: var(--md-primary); color: var(--md-on-primary); box-shadow: 0 0 0 2px var(--md-surface); }

/* Карточки пар */
.ma-list { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 24px; }
.ma-card {
    background: var(--md-surface-variant); border-radius: 12px; padding: 12px;
    display: flex; flex-direction: column; gap: 4px;
}
.ma-card.cur { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.ma-card.past { opacity: 0.5; }
.ma-trow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ma-time { font-size: 14px; font-weight: 700; color: var(--md-primary); white-space: nowrap; }
.ma-card.cur .ma-time, .ma-card.cur .ma-hint { color: var(--md-on-primary-container); }
.ma-hint { flex: 1; min-width: 0; font-size: 12px; font-weight: 500; color: var(--md-on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-room {
    padding: 2px 8px; border-radius: 6px; white-space: nowrap;
    background: var(--md-secondary-container); color: var(--md-on-secondary-container);
    font-size: 12px; font-weight: 600;
}
.ma-room.go { white-space: pre; }
.ma-prog { height: 4px; border-radius: 2px; margin: 4px 0; overflow: hidden; background: color-mix(in srgb, var(--md-on-primary-container) 20%, transparent); }
.ma-prog i { display: block; height: 100%; background: var(--md-on-primary-container); }
.ma-subj { font-size: 15px; font-weight: 500; line-height: 1.3; margin-top: 4px; }
.ma-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.ma-meta-r { display: flex; align-items: center; gap: 6px; }
.ma-chip { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--chip) 15%, transparent); color: var(--chip); }
.ma-chip.sec { --chip: var(--md-secondary); }
.ma-chip.pri { --chip: var(--md-primary); }
.ma-chip.ter { --chip: var(--md-tertiary); }
.ma-chip.err { --chip: var(--md-error); }
.ma-pin { padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; color: var(--md-primary); background: color-mix(in srgb, var(--md-primary) 15%, transparent); }
.ma-freq { font-size: 12px; color: var(--md-on-surface-variant); }
.ma-card.cur .ma-freq, .ma-card.cur .ma-teacher { color: var(--md-on-primary-container); opacity: 0.8; }
.ma-teacher { font-size: 12px; color: var(--md-on-surface-variant); margin-top: 4px; }
.ma-note { font-size: 12px; color: var(--md-tertiary); }
.ma-gap { display: flex; align-items: center; gap: 12px; padding: 4px 0; font-size: 11px; color: var(--md-on-surface-variant); }
.ma-gap::before, .ma-gap::after { content: ''; flex: 1; height: 1px; background: var(--md-outline-variant); }

/* Меню / списки */
.ma-body { flex: 1; overflow: hidden; }
.ma-sect { padding: 14px 16px 6px; font-size: 13px; font-weight: 600; color: var(--md-primary); }
.ma-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.ma-row > svg { width: 22px; height: 22px; fill: var(--md-on-surface-variant); flex-shrink: 0; }
.ma-row-t { flex: 1; min-width: 0; }
.ma-row-t b { display: block; font-size: 14px; font-weight: 400; }
.ma-row-t small { display: block; font-size: 12px; color: var(--md-on-surface-variant); }
.ma-row-t.big b { font-size: 18px; font-weight: 600; }
.ma-switch { width: 34px; height: 20px; border-radius: 10px; background: var(--md-primary); position: relative; flex-shrink: 0; }
.ma-switch::after { content: ''; position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--md-on-primary); }
.ma-switch.off { background: var(--md-surface-variant); box-shadow: inset 0 0 0 2px var(--md-outline); }
.ma-switch.off::after { left: 4px; right: auto; top: 4px; width: 12px; height: 12px; background: var(--md-outline); }
.ma-search {
    margin: 4px 12px 8px; padding: 11px 14px; border-radius: 26px;
    display: flex; align-items: center; gap: 10px;
    background: var(--md-surface-variant); color: var(--md-on-surface-variant); font-size: 14px;
}
.ma-search svg { width: 20px; height: 20px; fill: currentColor; }
.ma-seg { display: flex; margin: 8px 12px; border: 1px solid var(--md-outline); border-radius: 20px; overflow: hidden; }
.ma-seg span { flex: 1; text-align: center; padding: 7px 0; font-size: 13px; font-weight: 500; }
.ma-seg span.on { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.ma-seg span + span { border-left: 1px solid var(--md-outline); }
.ma-gl { display: flex; flex-direction: column; gap: 6px; padding: 0 12px; }
.ma-g { background: var(--md-surface-variant); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 500; }
.ma-g small { display: block; font-size: 11px; color: var(--md-primary); font-weight: 500; }

/* Экран «Маршрут» */
.ma-nav-search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--md-surface); border-bottom: 1px solid var(--md-surface-variant); }
.ma-nav-fields { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ma-nav-f { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--md-surface-variant); font-size: 14px; }
.ma-nav-f i { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); }
.ma-nav-f.to i { background: var(--md-on-surface-variant); box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-on-surface-variant) 18%, transparent); }
.ma-nav-swap { font-size: 22px; color: var(--md-on-surface-variant); width: 32px; text-align: center; }
.ma-map { flex: 1; position: relative; background: var(--md-surface-variant); overflow: hidden; }
.ma-map .floor { position: absolute; inset: 0; transition: opacity 0.5s, transform 0.5s; }
.ma-map .floor.off { opacity: 0; transform: scale(0.94); }
.ma-map svg { width: 100%; height: 100%; display: block; }
.ma-map .route { fill: none; stroke: var(--md-primary); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 8 6; animation: route-dash 1.2s linear infinite; }
.ma-map .pt-from { fill: #ef4444; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ma-map .pt-to { fill: var(--md-tertiary); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ma-map .hl { fill: color-mix(in srgb, var(--md-primary) 35%, transparent) !important; stroke: var(--md-primary) !important; stroke-width: 3 !important; vector-effect: non-scaling-stroke; }
@keyframes route-dash { to { stroke-dashoffset: -28; } }
.ma-sum { padding: 6px 12px; text-align: center; font-size: 13px; color: var(--md-on-surface-variant); background: var(--md-surface); border-top: 1px solid var(--md-surface-variant); }
.ma-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 16px; background: var(--md-surface); border-top: 1px solid var(--md-surface-variant); }
.ma-pager b { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--md-primary); color: var(--md-on-primary); font-size: 15px; }
.ma-pager b.dis { opacity: 0.35; }
.ma-pager span { flex: 1; text-align: center; font-size: 14px; font-weight: 600; }

/* Сравнение */
.ma-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 10px; }
.ma-cmp h5 { font-size: 12px; text-align: center; color: var(--md-primary); padding-bottom: 2px; }
.ma-cmp .ma-card { padding: 8px; }
.ma-cmp .ma-subj { font-size: 12px; margin-top: 0; }
.ma-cmp .ma-time { font-size: 11px; }
.ma-cmp .free { border: 1.5px dashed var(--md-outline); background: transparent; color: var(--md-on-surface-variant); font-size: 11px; text-align: center; padding: 14px 4px; border-radius: 12px; }

/* ===== HERO additions ===== */
.hero-mockup { position: relative; }
.hero-float {
    position: absolute; z-index: 3; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12); font-size: 0.82rem; font-weight: 600;
    display: flex; align-items: center; gap: 8px; animation: bob 5s ease-in-out infinite;
}
.hero-float svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.hero-float.f1 { top: 64%; right: -10px; }
.hero-float.f2 { top: 14%; right: -10px; animation-delay: -2.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.store-buttons { grid-template-columns: repeat(2, 1fr); max-width: 440px; }
.btn-store-web svg, .btn-store-apple svg { color: var(--accent); }
.btn-store-apple svg { color: var(--text); }

/* ===== FEATURES (4 колонки) ===== */
.features-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card { position: relative; }
.feature-new {
    position: absolute; top: 18px; right: 18px; font-size: 0.6rem; font-weight: 800;
    letter-spacing: 0.6px; text-transform: uppercase; color: #fff; padding: 3px 8px; border-radius: 50px;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
}

/* ===== ROUTE SECTION ===== */
.route-section { background: var(--bg-alt); }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.split.rev { grid-template-columns: 0.9fr 1.1fr; }
.split-mock { display: flex; justify-content: center; }
.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(45, 107, 168, 0.1); color: var(--accent);
    padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; margin-bottom: 18px;
}
.kicker svg { width: 16px; height: 16px; }
.split h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.split .lead { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 28px; }
.steps-list { list-style: none; display: flex; flex-direction: column; gap: 16px; counter-reset: s; }
.steps-list li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; counter-increment: s; }
.steps-list li::before {
    content: counter(s); width: 36px; height: 36px; border-radius: 12px;
    display: grid; place-items: center; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
}
.steps-list h4 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.steps-list p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.fact {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 10px 14px; font-size: 0.85rem; color: var(--text-secondary);
}
.fact b { display: block; color: var(--text); font-size: 1.05rem; }

/* ===== THEMES SECTION ===== */
.themes-section { background: var(--bg); }
.modes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.mode {
    padding: 8px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary);
}
.presets-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-secondary); margin: 6px 0 10px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preset {
    border-radius: 14px; padding: 12px; cursor: pointer; text-align: left;
    border: 2px solid transparent; font: inherit; font-size: 0.85rem; font-weight: 600;
    display: flex; flex-direction: column; gap: 8px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.preset:hover { transform: translateY(-2px); }
.preset.on { border-color: var(--accent); box-shadow: 0 8px 24px rgba(45, 107, 168, 0.2); }
.preset.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
.dots { display: flex; gap: 5px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; }
.variants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.variant {
    border-radius: 10px; padding: 8px; font: inherit; font-size: 0.72rem; font-weight: 600; cursor: pointer;
    border: 2px solid transparent; line-height: 1.25; text-align: left;
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
    animation: pop-in 0.35s cubic-bezier(.34,1.56,.64,1) both;
}
.variant:nth-child(2) { animation-delay: 0.05s; }
.variant:nth-child(3) { animation-delay: 0.1s; }
.variant:nth-child(4) { animation-delay: 0.15s; }
.variant .dots i { width: 11px; height: 11px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
.variant.on { border-color: var(--accent); }
.editor-card {
    margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
}
.hsv {
    width: 120px; height: 120px; border-radius: 50%; position: relative;
    background: radial-gradient(circle, #fff 0%, transparent 70%), conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
}
.hsv::after {
    content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.3); left: 74%; top: 30%;
    background: var(--md-primary); animation: hsv-pick 6s ease-in-out infinite;
}
@keyframes hsv-pick { 33% { left: 20%; top: 58%; } 66% { left: 60%; top: 78%; } }
.editor-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.editor-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }
.editor-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.editor-groups span { font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--surface-card); color: var(--text-secondary); }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.langs span { padding: 6px 14px; border-radius: 50px; background: var(--surface-card); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; }

/* ===== WIDGET ===== */
.widget-section { background: var(--bg-alt); }
.widget-stage {
    border-radius: 28px; padding: 48px 32px; display: flex; justify-content: center; align-items: flex-start; gap: 28px; flex-wrap: wrap;
    background: radial-gradient(circle at 20% 20%, #7CB8E4 0%, transparent 50%), radial-gradient(circle at 80% 80%, #4CAF50 0%, transparent 45%), linear-gradient(135deg, #2D6BA8, #1A2332);
}
.aw { width: 330px; background: rgba(26, 26, 26, 0.87); border-radius: 22px; padding: 12px 14px; color: #E8E8E8; font-family: Roboto, Inter, sans-serif; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.aw-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.aw-h b { color: #5B9BD5; font-size: 12px; }
.aw-h span { color: #B0B0B0; font-size: 10px; }
.aw-l + .aw-l { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); }
.aw-t { display: flex; justify-content: space-between; color: #8BBFEA; font-size: 13px; font-weight: 600; }
.aw-t span { color: #B0B0B0; font-size: 10px; font-weight: 400; }
.aw-s { font-size: 13px; margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-r { display: flex; gap: 10px; font-size: 11px; color: #B0B0B0; }
.aw-r b { color: #4CAF50; font-size: 12px; }
.aw-cap { text-align: center; color: rgba(255,255,255,0.85); font-size: 0.8rem; margin-top: 10px; font-weight: 600; }
.widget-notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.widget-notes div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; font-size: 0.88rem; color: var(--text-secondary); }
.widget-notes b { display: block; color: var(--text); margin-bottom: 4px; }

/* ===== PLATFORMS (4) ===== */
.platforms-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.platform-item { padding: 22px 18px; }
.platform-device { height: 230px; }
.platform-device .ma { padding-top: 0; zoom: 0.72; }
.dev-vk-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #0077FF; color: #fff; flex-shrink: 0; }
.dev-vk-header strong { font-size: 0.75rem; display: block; }
.dev-vk-header span { font-size: 0.6rem; opacity: 0.9; }
.dev-vk-pill { margin-left: auto; display: flex; gap: 6px; background: rgba(255,255,255,0.2); border-radius: 12px; padding: 4px 8px; }
.dev-vk-pill i { width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.dev-tg-header .dev-tg-avatar img, .dev-vk-header img { width: 30px; height: 30px; border-radius: 50%; display: block; }

/* ===== IPHONE ===== */
.iphone-section { background: var(--bg-alt); }
.ios-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: s; }
.ios-step { text-align: center; counter-increment: s; }
.ios-shot {
    width: 100%; max-width: 180px; margin: 0 auto 16px; aspect-ratio: 9 / 17;
    background: #1A1E25; border-radius: 26px; padding: 6px; position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.ios-screen { width: 100%; height: 100%; border-radius: 21px; overflow: hidden; background: #F2F2F7; color: #111; position: relative; font-family: -apple-system, 'Inter', sans-serif; display: flex; flex-direction: column; }
.ios-step h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.ios-step h4::before { content: counter(s) '. '; color: var(--accent); }
.ios-step p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }
.ios-page { flex: 1; padding: 30px 10px 0; display: flex; flex-direction: column; gap: 6px; }
.ios-page i { display: block; height: 8px; border-radius: 4px; background: #D9DCE3; }
.ios-page i.s { width: 60%; }
.ios-page i.b { height: 46px; background: #CDE3F8; }
.ios-bar { background: rgba(249,249,249,0.95); border-top: 1px solid #ddd; padding: 6px 8px 10px; }
.ios-url { background: #E3E3E8; border-radius: 10px; padding: 6px; font-size: 10px; text-align: center; font-weight: 600; }
.ios-tools { display: flex; justify-content: space-around; padding-top: 7px; color: #007AFF; }
.ios-tools svg { width: 14px; height: 14px; }
.ios-tools .hl { position: relative; }
.ios-tools .hl::after, .hl-ring::after {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid #FF3B30; animation: ring 1.6s ease-out infinite;
}
@keyframes ring { from { transform: scale(0.7); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.ios-sheet { margin-top: auto; background: #fff; border-radius: 14px 14px 0 0; padding: 10px 8px 14px; box-shadow: 0 -6px 20px rgba(0,0,0,0.12); }
.ios-sheet-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 8px; font-size: 10px; border-radius: 8px; background: #F2F2F7; margin-top: 4px; }
.ios-sheet-row.hl { background: #DCEBFF; font-weight: 700; outline: 2px solid #007AFF; }
.ios-sheet-row svg { width: 12px; height: 12px; }
.ios-home { flex: 1; padding: 34px 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; align-content: start; background: linear-gradient(160deg, #6A8FD8, #A77BCA 60%, #F0A47A); }
.ios-app { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 8px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.ios-app i { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.35); display: block; }
.ios-app img { width: 34px; height: 34px; border-radius: 9px; display: block; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.ios-app.me { position: relative; }
.ios-app.me::after { content: ''; position: absolute; top: -4px; left: calc(50% - 21px); width: 42px; height: 42px; border-radius: 12px; border: 2px solid #fff; animation: ring-sq 1.6s ease-out infinite; }
@keyframes ring-sq { from { transform: scale(0.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.ios-shot .ma { zoom: 0.58; }
.ios-note {
    margin: 36px auto 0; max-width: 760px; background: var(--surface); border: 1px solid var(--border);
    border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 20px;
    font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6;
}
.ios-note b { color: var(--text); }
.ios-cta { text-align: center; margin-top: 28px; }

/* ===== SCREENS ===== */
.screens-section { background: var(--bg); overflow: hidden; }
.screens-row { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.screens-row figure { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.screens-row figcaption { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }

/* ===== COMPARISON tweaks ===== */
.cmp-note { margin-top: 12px; font-size: 0.78rem; color: var(--text-secondary); text-align: center; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    .platforms-grid { grid-template-columns: repeat(2, 1fr); }
    .ios-steps { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
}
@media (max-width: 992px) {
    .nav-links { display: none; }
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .store-buttons { margin-left: auto; margin-right: auto; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .split, .split.rev { grid-template-columns: 1fr; gap: 48px; }
    .widget-notes { grid-template-columns: repeat(2, 1fr); }
    .hero-float { display: none; }
}
@media (max-width: 640px) {
    .section { padding: 72px 0; }
    .hero { padding-top: 100px; }
    .features-grid, .platforms-grid { grid-template-columns: 1fr; }
    .ios-steps { grid-template-columns: repeat(2, 1fr); }
    .widget-notes { grid-template-columns: 1fr; }
    .preset-grid { grid-template-columns: repeat(2, 1fr); }
    .variants { grid-template-columns: repeat(2, 1fr); }
    .variant { white-space: normal; }
    .editor-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .editor-groups { justify-content: center; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    .phone { --pw: 270px; }
    .aw { width: 100%; }
}
@media (max-width: 480px) {
    .store-buttons { grid-template-columns: 1fr; }
}

.feature-icon svg, .kicker svg, .hero-float svg, .ios-sheet-row svg, .btn-store svg, .btn-white svg, .btn-white-outline svg, .btn-primary svg { fill: currentColor; }

.ma > * { flex-shrink: 0; }
.ma > .ma-map, .ma > .ma-body { flex-shrink: 1; min-height: 0; }
.platform-item, .feature-card, .ios-step { min-width: 0; }

/* ===== АНИМАЦИИ ===== */
/* Hero: пары «приезжают» по очереди, прогресс текущей пары дорастает */
.hero .ma-card, .hero .ma-gap { animation: card-in 0.7s cubic-bezier(.2,.7,.2,1) both; }
.hero .ma-list > :nth-child(1) { animation-delay: 0.5s; }
.hero .ma-list > :nth-child(2) { animation-delay: 0.65s; }
.hero .ma-list > :nth-child(3) { animation-delay: 0.8s; }
.hero .ma-list > :nth-child(4) { animation-delay: 0.95s; }
.hero .ma-prog i { animation: prog 2.2s 1s cubic-bezier(.2,.7,.2,1) both; }
.hero .ma-date.cur { animation: pop-in 0.5s 0.35s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
@keyframes prog { from { width: 40%; } }
.hero .phone { animation: phone-float 7s ease-in-out infinite; }
@keyframes phone-float { 50% { transform: translateY(-10px) rotate(-0.6deg); } }

/* Смена этажа: маршрут заново прорисовывается, точки «падают» на место */
.ma-map .floor:not(.off) .pt-from, .ma-map .floor:not(.off) .pt-to { animation: pin-drop 0.6s 0.25s cubic-bezier(.34,1.56,.64,1) both; transform-box: fill-box; transform-origin: center; }
@keyframes pin-drop { from { transform: translateY(-14px) scale(0.4); opacity: 0; } }
.ma-map .floor:not(.off) .hl { animation: hl-pulse 1.6s ease-in-out infinite; }
@keyframes hl-pulse { 50% { fill-opacity: 0.6; } }

/* Кнопки и карточки — отклик на наведение */
.preset { transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), border-color 0.2s, box-shadow 0.2s; }
.feature-card .feature-icon { transition: transform 0.35s cubic-bezier(.34,1.56,.64,1); }
.feature-card:hover .feature-icon { transform: scale(1.1) rotate(-6deg); }

/* Анимации, привязанные к прокрутке (Chrome, Edge, Safari 26+).
   Где не поддерживается — работает обычное появление через .reveal */
@supports (animation-timeline: view()) {
    .reveal {
        opacity: 1; transform: none; transition: none;
        animation: scroll-in linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 22%;
    }
    @keyframes scroll-in { from { opacity: 0; transform: translateY(48px) scale(0.97); } }
    /* лесенка внутри строк сетки */
    .features-grid > :nth-child(4n+2), .platforms-grid > :nth-child(4n+2), .ios-steps > :nth-child(5n+2), .widget-notes > :nth-child(4n+2) { animation-range: entry 4% cover 26%; }
    .features-grid > :nth-child(4n+3), .platforms-grid > :nth-child(4n+3), .ios-steps > :nth-child(5n+3), .widget-notes > :nth-child(4n+3) { animation-range: entry 8% cover 30%; }
    .features-grid > :nth-child(4n+4), .platforms-grid > :nth-child(4n+4), .ios-steps > :nth-child(5n+4), .widget-notes > :nth-child(4n+4) { animation-range: entry 12% cover 34%; }
    .ios-steps > :nth-child(5n+5) { animation-range: entry 16% cover 38%; }
    /* лёгкий параллакс телефонов */
    .split-mock .phone, .screens-row .phone {
        animation: parallax linear both;
        animation-timeline: view();
    }
    @keyframes parallax { from { transform: translateY(50px); } to { transform: translateY(-50px); } }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
.split > * { min-width: 0; }

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
.swipe-hint { display: none; }
@media (max-width: 640px) {
    .section-subtitle { margin-bottom: 36px; }

    /* Возможности: компактные строки, иконка слева */
    .features-grid { gap: 10px; }
    .feature-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 16px; }
    .feature-card .feature-icon { width: 44px; height: 44px; margin: 0; grid-row: span 2; border-radius: 12px; }
    .feature-card h3 { font-size: 1rem; margin-bottom: 2px; padding-right: 56px; }
    .feature-card p { font-size: 0.86rem; }
    .feature-new { top: 14px; right: 14px; }

    /* Платформы, шаги iPhone, экраны — лента со свайпом */
    .platforms-grid, .ios-steps, .screens-row {
        display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 14px;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        margin: 0 -24px; padding: 14px 24px 8px; max-width: none;
    }
    .platforms-grid::-webkit-scrollbar, .ios-steps::-webkit-scrollbar, .screens-row::-webkit-scrollbar { display: none; }
    .platforms-grid > *, .ios-steps > *, .screens-row > * { scroll-snap-align: center; animation: none !important; opacity: 1; transform: none; }
    .platforms-grid > * { flex: 0 0 82%; }
    .ios-steps > * { flex: 0 0 64%; }
    .screens-row > * { flex: 0 0 auto; }
    .swipe-hint { display: block; text-align: center; font-size: 0.8rem; color: var(--text-secondary); margin-top: 6px; }

    /* Таблица: узкая первая колонка, чтобы сравнение было видно */
    .comparison-table { min-width: 600px; font-size: 0.82rem; }
    .comparison-table tbody td.cmp-feature { min-width: 128px; max-width: 128px; padding: 8px 10px; font-size: 0.8rem; line-height: 1.3; }
    .comparison-table th, .comparison-table td { padding: 7px 8px; }
    .cmp-corner-logo { height: 26px; }
    .cmp-corner-slogan { display: none; }
}

@media (max-width: 992px) {
    /* Темы: компактный образец прилипает сверху, результат нажатия виден сразу */
    .themes-section .split { gap: 16px; }
    .themes-section .split-mock {
        position: sticky; top: 70px; z-index: 6; animation: none !important; opacity: 1; transform: none;
        margin: 0 -24px; padding: 8px 0 18px;
        background: linear-gradient(var(--bg) 82%, transparent);
    }
    .themes-section .phone { --pw: 230px; aspect-ratio: auto; height: 236px; padding: 8px 8px 0; border-radius: 30px 30px 18px 18px; animation: none !important; }
    .themes-section .phone::before { top: 14px; width: 54px; height: 15px; }
    .themes-section .screen { border-radius: 23px 23px 12px 12px; }
    .themes-section .ma { zoom: 0.72; }
    .themes-section .ma-card.past { display: none; }

}
