:root {
    --app-bg: #edf3ff;
    --app-card: #ffffff;
    --app-primary: #1351b4;
    --app-primary-dark: #0e3f8f;
    --app-text: #17324d;
    --app-muted: #5a7184;
    --app-border: rgba(19,81,180,.12);
}

body.app-mode-body {
    background: linear-gradient(180deg, #dce8ff 0%, #edf3ff 24%, #f6f9ff 100%);
    min-height: 100vh;
    color: var(--app-text);
}

.app-phone-shell {
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: transparent;
}

.app-topbar {
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 14px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(237,243,255,.88);
    border-bottom: 1px solid rgba(255,255,255,.35);
}

.app-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.app-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--app-primary);
}

.app-admin-link {
    text-decoration: none;
    color: var(--app-primary);
    font-weight: 700;
    background: rgba(19,81,180,.08);
    padding: 8px 12px;
    border-radius: 999px;
}

.app-welcome-card {
    background: linear-gradient(135deg, var(--app-primary) 0%, #2d78eb 100%);
    color: #fff;
    border-radius: 24px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 18px 40px rgba(19,81,180,.25);
}

.app-welcome-card.compact {
    padding: 16px 18px;
}

.app-welcome-card h1 {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.12;
}

.app-install-chip {
    border: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
    padding: 10px 12px;
    border-radius: 16px;
    font-weight: 700;
}

.app-screen-content {
    padding: 18px 16px 98px;
}

.app-hero-card,
.app-info-card,
.app-quick-card,
body.app-mode-body .form-card,
body.app-mode-body .success-card,
body.app-mode-body .card.mt {
    background: var(--app-card);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(18,53,103,.08);
    border: 1px solid var(--app-border);
}

.app-hero-card {
    padding: 22px;
    margin-bottom: 16px;
}

.app-hero-badge {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(19,81,180,.1);
    color: var(--app-primary);
    font-weight: 700;
    font-size: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.app-hero-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.08;
}

.app-hero-card p {
    margin: 0;
    color: var(--app-muted);
}

.app-hero-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.app-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.app-quick-card {
    text-decoration: none;
    color: inherit;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-quick-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(19,81,180,.1);
    font-size: 22px;
}

.app-quick-card strong {
    font-size: 16px;
}

.app-quick-card small,
.app-info-card p,
.app-step-item p {
    color: var(--app-muted);
}

.app-info-card {
    padding: 18px;
    margin-bottom: 16px;
}

.app-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.app-section-title h3 {
    margin: 0;
}

.app-section-title span {
    font-size: 12px;
    font-weight: 700;
    color: var(--app-primary);
    background: rgba(19,81,180,.08);
    border-radius: 999px;
    padding: 6px 10px;
}

.app-steps-list {
    display: grid;
    gap: 12px;
}

.app-step-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: start;
}

.app-step-item b {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(19,81,180,.1);
    color: var(--app-primary);
}

.soft-highlight {
    background: linear-gradient(135deg, rgba(19,81,180,.07) 0%, #fff 100%);
}

body.app-mode-body .page-header,
body.app-mode-body .mobile-page-header {
    margin-bottom: 14px;
}

body.app-mode-body .page-header h2,
body.app-mode-body .mobile-page-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

body.app-mode-body .form-card {
    padding: 18px;
}

body.app-mode-body .field-group,
body.app-mode-body .coords-card,
body.app-mode-body .detail-list {
    margin-bottom: 10px;
}

body.app-mode-body input,
body.app-mode-body select,
body.app-mode-body textarea {
    border-radius: 16px;
    padding: 14px 14px;
    border: 1px solid rgba(18,53,103,.12);
    background: #f9fbff;
    font-size: 16px;
}

body.app-mode-body .btn {
    border-radius: 18px;
}

body.app-mode-body .map-box,
body.app-mode-body .app-map {
    height: 340px;
    border-radius: 20px;
    overflow: hidden;
}

.app-tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(560px, 100%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
    background: rgba(255,255,255,.94);
    border-top: 1px solid rgba(18,53,103,.08);
    backdrop-filter: blur(14px);
    z-index: 30;
}

.app-tabbar a {
    text-decoration: none;
    color: #5c7083;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 16px;
    font-weight: 700;
}

.app-tabbar a.active {
    color: var(--app-primary);
    background: rgba(19,81,180,.08);
}

@media (min-width: 700px) {
    .app-screen-content {
        padding-left: 20px;
        padding-right: 20px;
    }
}


.app-home-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.app-home-kicker {
    display: inline-block;
    color: var(--app-primary);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}

.app-home-intro h2 {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.08;
}

.app-home-intro p {
    margin: 0;
    color: var(--app-muted);
}

.app-secondary-action {
    flex-shrink: 0;
    text-decoration: none;
    background: rgba(19,81,180,.08);
    color: var(--app-primary);
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
}

.app-category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.app-category-card {
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 22px;
    padding: 16px;
    border: 1px solid var(--app-border);
    box-shadow: 0 10px 24px rgba(18,53,103,.08);
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.app-category-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: inset 0 -6px 14px rgba(0,0,0,.10);
}

.app-category-card strong {
    font-size: 16px;
    line-height: 1.15;
}

.app-category-card small {
    color: var(--app-muted);
}

.app-shortcuts-row {
    display: grid;
    gap: 12px;
}

.app-shortcut-card {
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,.88);
    border: 1px solid var(--app-border);
    border-radius: 20px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    box-shadow: 0 10px 24px rgba(18,53,103,.06);
}

.app-shortcut-card > span {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(19,81,180,.10);
    font-size: 22px;
}

.app-shortcut-card small {
    color: var(--app-muted);
}

@media (max-width: 560px) {
    .app-home-intro {
        display: block;
    }

    .app-secondary-action {
        display: inline-flex;
        margin-top: 12px;
    }

    .app-category-grid {
        grid-template-columns: 1fr 1fr;
    }
}
