:root {
    --mip-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --mip-bg: #0f172a;
    --mip-bg-soft: #111827;
    --mip-surface: #ffffff;
    --mip-surface-muted: #f8fafc;
    --mip-surface-strong: #e2e8f0;
    --mip-text: #0f172a;
    --mip-text-soft: #475569;
    --mip-text-inverse: #f8fafc;
    --mip-primary: #2563eb;
    --mip-primary-strong: #1d4ed8;
    --mip-success: #16a34a;
    --mip-warning: #d97706;
    --mip-danger: #dc2626;
    --mip-border: rgba(148, 163, 184, 0.22);
    --mip-border-strong: rgba(148, 163, 184, 0.38);
    --mip-shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.18);
    --mip-shadow-md: 0 12px 36px rgba(15, 23, 42, 0.12);
    --mip-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --mip-radius-xl: 28px;
    --mip-radius-lg: 20px;
    --mip-radius-md: 14px;
    --mip-radius-sm: 10px;
    --mip-topbar-height: 76px;
}

html {
    background: linear-gradient(180deg, #dbeafe 0%, #f8fafc 55%, #e2e8f0 100%);
}

body {
    margin: 0;
    color: var(--mip-text);
    font-family: var(--mip-font-sans);
    background: linear-gradient(180deg, #dbeafe 0%, #f8fafc 55%, #e2e8f0 100%);
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

body.mip-shell-page .site,
body.mip-shell-page #page,
body.mip-shell-page #primary,
body.mip-shell-page #content,
body.mip-shell-page .site-content,
body.mip-shell-page .content-area,
body.mip-shell-page .entry-content,
body.mip-shell-page article.page,
body.mip-shell-page .post,
body.mip-shell-page .site-main {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

body.mip-shell-page .entry-header,
body.mip-shell-page .entry-title,
body.mip-shell-page .site-header,
body.mip-shell-page .site-footer,
body.mip-shell-page .sidebar,
body.mip-shell-page .widget-area,
body.mip-shell-page .breadcrumbs,
body.mip-shell-page .post-navigation,
body.mip-shell-page .comments-area,
body.mip-shell-page .ast-container > .ast-article-single,
body.mip-shell-page .ast-builder-grid-row-container,
body.mip-shell-page .ast-builder-layout-element,
body.mip-shell-page .ast-single-entry-banner {
    display: none !important;
}

body.mip-shell-page .entry-content,
body.mip-shell-page .wp-block-post-content {
    margin: 0 !important;
}

.mip-site-header,
.mip-site-footer {
    background: rgba(15, 23, 42, 0.92);
    color: var(--mip-text-inverse);
}

.mip-site-header__inner,
.mip-site-footer__inner,
.mip-default-page__inner,
.mip-home-section,
.mip-hero__content {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
}

.mip-site-header__inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mip-site-header__brand,
.mip-site-header__brand:visited {
    color: var(--mip-text-inverse);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.mip-site-header__brand-mark {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.36);
}

.mip-site-header__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.mip-site-header__link {
    color: rgba(248, 250, 252, 0.92);
    padding: 10px 14px;
    border-radius: 999px;
    transition: background 0.18s ease, color 0.18s ease;
}

.mip-site-header__link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mip-site-header__link--button {
    background: rgba(255, 255, 255, 0.12);
}

.mip-site-footer {
    padding: 18px 0;
}

.mip-site-footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: rgba(248, 250, 252, 0.8);
    font-size: 14px;
}

.mip-default-page {
    padding: 32px 0 48px;
}

.mip-default-article,
.mip-panel,
.mip-hero__content {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--mip-border);
    border-radius: var(--mip-radius-xl);
    box-shadow: var(--mip-shadow-md);
    backdrop-filter: blur(12px);
}

.mip-default-article {
    padding: 32px;
}

.mip-default-article__title,
.mip-panel__title,
.mip-hero__title {
    margin: 0 0 18px;
    line-height: 1.08;
}

.mip-default-article__title,
.mip-hero__title {
    font-size: clamp(32px, 4vw, 56px);
}

.mip-home-page {
    padding: 28px 0 48px;
}

.mip-hero {
    margin-bottom: 24px;
}

.mip-hero__content {
    padding: clamp(28px, 4vw, 54px);
}

.mip-eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--mip-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mip-hero__text {
    max-width: 760px;
    margin: 0;
    color: var(--mip-text-soft);
    font-size: 18px;
    line-height: 1.7;
}

.mip-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.mip-button,
.mip-shell-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mip-button:hover,
.mip-shell-button:hover {
    transform: translateY(-1px);
}

.mip-button--primary,
.mip-shell-button--primary {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    color: #ffffff;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.mip-button--ghost,
.mip-shell-button--ghost {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--mip-border-strong);
    color: var(--mip-text);
}

.mip-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 24px;
}

.mip-panel {
    padding: 28px;
}

.mip-panel--wide {
    min-height: 100%;
}

.mip-access-grid,
.mip-app-list {
    display: grid;
    gap: 14px;
}

.mip-access-card,
.mip-app-card,
.mip-empty-state,
.mip-login-box,
.mip-notice,
.mip-shell-inline-notice {
    background: var(--mip-surface);
    border: 1px solid var(--mip-border);
    border-radius: var(--mip-radius-lg);
    box-shadow: var(--mip-shadow-sm);
}

.mip-access-card,
.mip-app-card,
.mip-empty-state,
.mip-notice,
.mip-shell-inline-notice {
    padding: 18px;
}

.mip-access-card__title,
.mip-app-card__title {
    margin-bottom: 8px;
    font-weight: 700;
}

.mip-access-card__text,
.mip-app-card__text,
.mip-empty-state {
    color: var(--mip-text-soft);
    line-height: 1.6;
}

.mip-app-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.mip-app-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.mip-login-box {
    padding: 22px;
}

.mip-login-box form {
    display: grid;
    gap: 14px;
}

.mip-login-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.mip-login-box input[type="text"],
.mip-login-box input[type="password"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--mip-border-strong);
    border-radius: 12px;
    padding: 0 14px;
    font: inherit;
}

.mip-login-box input[type="submit"] {
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.mip-notice--warning,
.mip-shell-inline-notice--warning {
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(255, 247, 237, 0.96);
    color: #9a3412;
}

.mip-notice--danger {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(254, 242, 242, 0.96);
    color: #991b1b;
}

.mip-notice--success {
    border-color: rgba(22, 163, 74, 0.28);
    background: rgba(240, 253, 244, 0.96);
    color: #166534;
}

.mip-shell-page.admin-bar {
    --mip-admin-bar-offset: 32px;
}

@media (max-width: 782px) {
    .mip-shell-page.admin-bar {
        --mip-admin-bar-offset: 46px;
    }
}

.mip-shell-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.mip-shell-topbar {
    position: sticky;
    top: var(--mip-admin-bar-offset, 0px);
    z-index: 1000;
    display: grid;
}

.mip-shell-topbar.mip-shell-topbar-hidden {
    transform: translateY(calc(-100% - 8px));
    opacity: 0;
    pointer-events: none;
}

.mip-shell-topbar {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: var(--mip-topbar-height);
    padding: 14px 22px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--mip-text-inverse);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
}

.mip-shell-topbar__left,
.mip-shell-topbar__center,
.mip-shell-topbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mip-shell-topbar__center {
    flex-wrap: wrap;
    justify-content: center;
}

.mip-shell-topbar__right {
    justify-content: flex-end;
}

.mip-shell-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--mip-text-inverse);
    text-decoration: none;
}

.mip-shell-topbar__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.36);
}

.mip-shell-topbar__meta {
    color: rgba(248, 250, 252, 0.76);
    font-size: 14px;
}

.mip-shell-app-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: rgba(248, 250, 252, 0.88);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
}

.mip-shell-app-link.is-active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(14, 165, 233, 0.88));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.mip-shell-main {
    flex: 1;
    padding: 20px;
}

.mip-shell-app-frame {
    min-height: calc(100vh - var(--mip-topbar-height) - var(--mip-admin-bar-offset, 0px) - 40px);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: var(--mip-shadow-lg);
}

.mip-shell-inline-notice {
    width: min(100% - 32px, 1280px);
    margin: 18px auto 0;
}

@media (max-width: 960px) {
    .mip-home-grid {
        grid-template-columns: 1fr;
    }

    .mip-site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 0;
    }
}

@media (max-width: 1024px) and (orientation: portrait) {
    :root {
        --mip-topbar-height: 52px;
    }

    .mip-site-header__inner {
        min-height: 52px;
        gap: 10px;
        padding: 6px 0;
        flex-wrap: nowrap;
    }

    .mip-site-header__brand {
        gap: 8px;
        min-width: 0;
        flex: 0 1 auto;
    }

    .mip-site-header__brand-text {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
    }

    .mip-site-header__brand-mark {
        min-width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 12px;
        box-shadow: none;
    }

    .mip-site-header__nav {
        min-width: 0;
        flex: 1 1 auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mip-site-header__nav::-webkit-scrollbar {
        display: none;
    }

    .mip-site-header__link {
        flex: 0 0 auto;
        padding: 7px 10px;
        font-size: 13px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .mip-shell-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 52px;
        gap: 10px;
        padding: 6px 12px;
    }

    .mip-shell-topbar__left,
    .mip-shell-topbar__center,
    .mip-shell-topbar__right {
        min-width: 0;
    }

    .mip-shell-topbar__left {
        gap: 8px;
    }

    .mip-shell-topbar__brand {
        gap: 8px;
        min-width: 0;
    }

    .mip-shell-topbar__brand-text {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
    }

    .mip-shell-topbar__brand-mark {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        border-radius: 10px;
        box-shadow: none;
    }

    .mip-shell-topbar__meta {
        display: none;
    }

    .mip-shell-topbar__center {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mip-shell-topbar__center::-webkit-scrollbar {
        display: none;
    }

    .mip-shell-topbar__right {
        justify-content: flex-end;
        gap: 8px;
    }

    .mip-shell-app-link,
    .mip-shell-button {
        min-height: 34px;
        padding: 0 10px;
        font-size: 13px;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .mip-site-header__inner,
    .mip-site-footer__inner,
    .mip-default-page__inner,
    .mip-home-section,
    .mip-hero__content,
    .mip-shell-inline-notice {
        width: min(100% - 20px, 1280px);
    }

    .mip-panel,
    .mip-default-article,
    .mip-hero__content {
        padding: 20px;
    }

    .mip-shell-main {
        padding: 12px;
    }
}


.mip-site-header--front {
    background: rgba(15, 23, 42, 0.96);
}

.mip-home-simple {
    min-height: calc(100vh - 74px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
}

.mip-home-center {
    width: min(100%, 720px);
    text-align: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--mip-border);
    border-radius: var(--mip-radius-xl);
    box-shadow: var(--mip-shadow-md);
    backdrop-filter: blur(12px);
    padding: clamp(28px, 5vw, 54px);
}

.mip-home-kicker {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 800;
    color: var(--mip-text);
}

.mip-home-subtitle {
    margin-top: 14px;
    color: var(--mip-text-soft);
    font-size: 18px;
    line-height: 1.6;
}

.mip-home-actions {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.mip-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.mip-home-notice {
    margin: 0 auto 18px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    max-width: 560px;
}

.mip-home-notice--warning {
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.24);
}

.mip-home-notice--success {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.24);
}
