:root {
    --mobile-primary: #0a2f47;
    --mobile-secondary: #b51c17;
    --mobile-bg: #faf9f9;
    --mobile-surface: #ffffff;
    --mobile-border: #e3e2e2;
    --mobile-muted: #697179;
    --mobile-text: #1b1c1c;
}

body {
    min-height: 100dvh;
    background: var(--mobile-bg);
    color: var(--mobile-text);
    font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}

.mobile-topbar {
    height: calc(56px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 16px 0;
    background: var(--mobile-surface);
    border-bottom: 1px solid var(--mobile-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1040;
}

.brand {
    color: var(--mobile-primary);
    font-weight: 800;
    font-size: 20px;
    text-decoration: none;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--mobile-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
}

.mobile-shell {
    width: min(100%, 640px);
    margin: 0 auto;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 16px calc(96px + env(safe-area-inset-bottom, 0px));
}

.home-greeting {
    padding: 6px 0 16px;
}

.home-greeting h1 {
    color: var(--mobile-primary);
    font-size: 32px;
    line-height: 36px;
    font-weight: 800;
    margin: 0;
}

.home-greeting p {
    color: var(--mobile-muted);
    font-size: 20px;
    line-height: 26px;
    margin: 4px 0 0;
}

.featured-strip {
    margin: 0 -16px 18px;
}

.scrolling-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    padding: 0 16px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.scrolling-wrapper::-webkit-scrollbar {
    display: none;
}

.featured-card {
    position: relative;
    flex: 0 0 280px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: center;
    border: 1px solid var(--mobile-border);
    background: #d8dde3;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 70%);
}

.featured-copy {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 13px;
    color: #fff;
}

.featured-copy strong {
    display: block;
    margin-top: 7px;
    font-size: 18px;
    line-height: 22px;
}

.home-section {
    margin-bottom: 22px;
}

.home-section h2 {
    color: var(--mobile-primary);
    font-size: 18px;
    line-height: 24px;
    font-weight: 800;
    margin: 0 0 12px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading a {
    color: var(--mobile-secondary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
}

.hero-block {
    padding: 20px 0 16px;
}

.hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #e6f0fa;
    color: var(--mobile-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex: 0 0 auto;
}

.hero-block h1 {
    color: var(--mobile-primary);
    font-size: 28px;
    line-height: 34px;
    font-weight: 800;
    margin: 0;
}

.hero-block p {
    color: var(--mobile-muted);
    font-size: 15px;
    margin: 3px 0 0;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 0;
}

.quick-card {
    min-height: 118px;
    padding: 14px 8px 12px;
    border: 1px solid var(--mobile-border);
    border-radius: 10px;
    background: var(--mobile-surface);
    color: var(--mobile-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.quick-primary {
    color: var(--mobile-primary);
    background: #e6f0fa;
}

.quick-secondary {
    color: var(--mobile-secondary);
    background: #fae6e6;
}

.quick-neutral {
    color: var(--mobile-muted);
    background: #f2f2f2;
}

.quick-card span {
    font-size: 12px;
    font-weight: 700;
    line-height: 15px;
}

.mobile-panel {
    background: var(--mobile-surface);
    border: 1px solid var(--mobile-border);
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.profile-mobile-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-title span {
    color: var(--mobile-primary);
    font-weight: 800;
    font-size: 18px;
}

.panel-title small,
.panel-title a {
    color: var(--mobile-secondary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.mobile-search {
    margin-bottom: 12px;
}

.mobile-search .form-control,
.mobile-search .input-group-text {
    min-height: 48px;
    border-color: var(--mobile-border);
}

.stack-list {
    display: grid;
    gap: 10px;
}

.publication-card {
    min-height: 104px;
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    display: flex;
    gap: 12px;
    color: var(--mobile-text);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.publication-card img,
.publication-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    flex: 0 0 auto;
    object-fit: cover;
    background: #dfe4e8;
}

.publication-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.publication-body small {
    color: var(--mobile-secondary);
    font-size: 12px;
    line-height: 16px;
    font-weight: 800;
    margin-bottom: 3px;
}

.publication-body strong {
    color: var(--mobile-text);
    font-size: 15px;
    line-height: 19px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-body span {
    color: var(--mobile-muted);
    font-size: 12px;
    line-height: 16px;
    margin-top: 4px;
}

.event-list-card {
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.event-row {
    min-height: 76px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--mobile-text);
    text-decoration: none;
    border-bottom: 1px solid var(--mobile-border);
}

.event-row:last-child {
    border-bottom: 0;
}

.event-date {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #edf4fb;
    color: var(--mobile-primary);
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.event-date strong {
    font-size: 20px;
    line-height: 20px;
}

.event-date small {
    font-size: 10px;
    line-height: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

.event-row > span:last-child {
    min-width: 0;
}

.event-row > span:last-child strong,
.event-row > span:last-child small {
    display: block;
}

.event-row > span:last-child strong {
    font-size: 15px;
    line-height: 20px;
}

.event-row > span:last-child small {
    color: var(--mobile-muted);
    font-size: 12px;
    line-height: 16px;
    margin-top: 2px;
}

.article-reader {
    background: var(--mobile-surface);
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.article-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #dfe4e8;
}

.article-reader h2 {
    color: var(--mobile-primary);
    font-size: 26px;
    line-height: 32px;
    font-weight: 800;
    margin: 8px 16px 10px;
}

.article-meta {
    color: var(--mobile-secondary);
    font-size: 12px;
    line-height: 16px;
    font-weight: 800;
    margin: 16px 16px 0;
}

.article-description {
    color: var(--mobile-muted);
    font-size: 16px;
    line-height: 24px;
    margin: 0 16px 16px;
}

.article-content {
    color: var(--mobile-text);
    font-size: 17px;
    line-height: 28px;
    padding: 0 16px 18px;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
    margin-bottom: 16px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--mobile-primary);
    font-weight: 800;
    line-height: 1.2;
    margin: 22px 0 12px;
}

.article-content blockquote {
    border-left: 4px solid var(--mobile-secondary);
    padding-left: 14px;
    color: var(--mobile-muted);
}

.reader-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.reader-state strong {
    color: var(--mobile-primary);
    font-size: 18px;
}

.reader-state span {
    color: var(--mobile-muted);
    margin-top: 4px;
}

.article-author-mobile {
    margin: 0 16px 18px;
    padding: 12px;
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-author-mobile img,
.article-author-mobile > span {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.article-author-mobile > span {
    background: var(--mobile-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.article-author-mobile div {
    min-width: 0;
    flex: 1;
}

.article-author-mobile small,
.article-author-mobile strong {
    display: block;
}

.article-author-mobile small {
    color: var(--mobile-muted);
    font-size: 11px;
}

.article-author-mobile strong {
    color: var(--mobile-primary);
    font-size: 14px;
}

.article-author-mobile a {
    color: var(--mobile-secondary);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.church-mobile-card {
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 12px;
}

.church-card-main {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.church-card-logo {
    width: 46px;
    height: 46px;
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    background: #f4f6f8;
    overflow: hidden;
    flex: 0 0 auto;
}

.church-card-logo img,
.church-logo-fallback {
    width: 100%;
    height: 100%;
}

.church-card-logo img {
    object-fit: cover;
    display: block;
}

.church-logo-fallback {
    color: var(--mobile-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.church-card-copy {
    min-width: 0;
    flex: 1;
}

.church-card-copy strong {
    color: var(--mobile-primary);
    display: block;
    font-size: 15px;
    line-height: 19px;
}

.church-card-copy small {
    color: var(--mobile-muted);
    display: flex;
    gap: 5px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 16px;
    margin-top: 3px;
}

.church-action-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.church-action {
    min-height: 44px;
    border-radius: 10px;
    padding: 5px 3px;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 800;
}

.church-action i,
.church-action .app-logo {
    font-size: 16px;
    line-height: 16px;
}

.church-action.instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.church-action.maps {
    background: #1a73e8;
}

.church-action.waze {
    background: #33ccff;
    color: #06202b;
}

.church-action.uber {
    background: #111;
}

.app-logo {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: currentColor;
    color: inherit;
    font-weight: 900;
}

.church-action.uber .app-logo {
    background: #fff;
    color: #111;
}

.church-details-toggle {
    width: 100%;
    margin-top: 9px;
    border: 0;
    background: transparent;
    color: var(--mobile-secondary);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    padding: 4px 0 0;
}

.church-extra {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--mobile-border);
    display: grid;
    gap: 7px;
}

.church-extra[hidden] {
    display: none;
}

.church-extra div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.church-extra span {
    color: var(--mobile-muted);
    font-size: 12px;
}

.church-extra strong {
    color: var(--mobile-text);
    font-size: 12px;
    text-align: right;
}

.skeleton-card {
    background: linear-gradient(90deg, #f1f3f5, #fff, #f1f3f5);
    background-size: 200% 100%;
    animation: pulse-card 1.4s infinite;
}

@keyframes pulse-card {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.data-card {
    border: 1px solid var(--mobile-border);
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.data-card strong {
    display: block;
    color: var(--mobile-primary);
    font-size: 15px;
    line-height: 20px;
}

.data-card p {
    color: var(--mobile-muted);
    font-size: 13px;
    line-height: 18px;
    margin: 4px 0 0;
}

.data-card a {
    color: var(--mobile-secondary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
}

.empty-state i {
    color: var(--mobile-primary);
    font-size: 42px;
}

.empty-state h2 {
    color: var(--mobile-primary);
    font-size: 21px;
    margin: 0;
    font-weight: 800;
}

.empty-state p {
    color: var(--mobile-muted);
    margin: 0;
    max-width: 32ch;
}

.mobile-action {
    min-height: 48px;
    border-radius: 8px;
    font-weight: 700;
    width: 100%;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:active {
    background: var(--mobile-primary) !important;
    border-color: var(--mobile-primary) !important;
}

.profile-mobile-card,
.profile-mobile-section {
    background: #fff;
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 14px;
}

.profile-mobile-hero {
    display: flex;
    gap: 12px;
    align-items: center;
}

.profile-mobile-hero img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    background: #dfe4e8;
    flex: 0 0 auto;
}

.profile-mobile-hero div {
    min-width: 0;
}

.profile-mobile-hero span,
.profile-mobile-hero strong,
.profile-mobile-hero small {
    display: block;
}

.profile-mobile-hero span,
.profile-mobile-heading small {
    color: var(--mobile-secondary);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-mobile-hero strong {
    color: var(--mobile-primary);
    font-size: 20px;
    line-height: 24px;
}

.profile-mobile-hero small {
    color: var(--mobile-muted);
    font-size: 13px;
    margin-top: 2px;
}

.profile-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.profile-mobile-badges span {
    border-radius: 999px;
    background: #f4f6f8;
    color: var(--mobile-primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 9px;
}

.profile-mobile-bio {
    color: var(--mobile-muted);
    font-size: 14px;
    line-height: 20px;
    margin: 12px 0 0;
}

.profile-social-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.profile-social-row a {
    border: 1px solid var(--mobile-border);
    border-radius: 10px;
    color: var(--mobile-secondary);
    font-size: 12px;
    font-weight: 800;
    padding: 8px 10px;
    text-decoration: none;
}

.profile-mobile-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.profile-mobile-heading span {
    color: var(--mobile-primary);
    font-size: 16px;
    font-weight: 800;
}

.profile-mobile-heading small {
    color: var(--mobile-muted);
    text-align: right;
}

.profile-info-list {
    display: grid;
    gap: 8px;
}

.profile-info-list div {
    border: 1px solid var(--mobile-border);
    border-radius: 10px;
    padding: 9px 10px;
    background: #fbfbfb;
}

.profile-info-list span,
.profile-info-list strong {
    display: block;
}

.profile-info-list span {
    color: var(--mobile-muted);
    font-size: 11px;
    font-weight: 700;
}

.profile-info-list strong {
    color: var(--mobile-text);
    font-size: 14px;
    line-height: 18px;
    margin-top: 2px;
}

.profile-article-list {
    display: grid;
    gap: 8px;
}

.profile-article-card {
    border: 1px solid var(--mobile-border);
    border-radius: 10px;
    color: var(--mobile-text);
    display: flex;
    gap: 10px;
    min-height: 84px;
    padding: 8px;
    text-decoration: none;
}

.profile-article-card img {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    object-fit: cover;
    background: #dfe4e8;
    flex: 0 0 auto;
}

.profile-article-card span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-article-card small {
    color: var(--mobile-secondary);
    font-size: 11px;
    font-weight: 800;
}

.profile-article-card strong {
    color: var(--mobile-text);
    font-size: 14px;
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-article-card em {
    color: var(--mobile-muted);
    font-size: 11px;
    font-style: normal;
    margin-top: 3px;
}

.profile-empty {
    border: 1px dashed var(--mobile-border);
    border-radius: 10px;
    color: var(--mobile-muted);
    font-size: 13px;
    padding: 12px;
    text-align: center;
}

.profile-card {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--mobile-secondary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

.profile-card strong,
.profile-card span {
    display: block;
}

.profile-card span {
    color: var(--mobile-muted);
    font-size: 13px;
}

.bottom-nav {
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding: 6px 6px env(safe-area-inset-bottom, 0px);
    background: var(--mobile-surface);
    border-top: 1px solid var(--mobile-border);
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.bottom-nav a {
    min-width: 0;
    flex: 1;
    border-radius: 10px;
    color: var(--mobile-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
}

.bottom-nav i {
    font-size: 20px;
}

.bottom-nav a.active {
    background: rgba(181, 28, 23, 0.1);
    color: var(--mobile-secondary);
}

.menu-stack {
    display: grid;
    gap: 8px;
}

.menu-link {
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--mobile-text);
    background: #f7f7f7;
    text-decoration: none;
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 700;
}

.menu-link i {
    color: var(--mobile-primary);
    font-size: 20px;
}

@media (max-width: 360px) {
    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .church-action span,
    .bottom-nav span {
        font-size: 10px;
    }
}

body[data-screen="home"] .screen-only,
body:not([data-screen="home"]) .home-only,
body[data-screen="detail"] [data-list-panel],
body[data-screen="detail"] [data-empty-panel],
body:not([data-screen="detail"]) [data-article-reader],
body[data-screen="list"] [data-empty-panel],
body[data-screen="videos"] [data-empty-panel],
body[data-screen="admin-list"] [data-empty-panel],
body[data-screen="profile"] [data-empty-panel],
body[data-screen="auth"] [data-list-panel],
body[data-screen="auth"] [data-empty-panel],
body[data-screen="static"] [data-list-panel] {
    display: none !important;
}
